1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
17 // *************************************************************************
18 var _0x05bc=['save','remove','emit','hasOwnProperty','hook','exports','../../mysqldb','setMaxListeners'];(function(_0x594e11,_0x28f652){var _0x5418ad=function(_0x5dcfa7){while(--_0x5dcfa7){_0x594e11['push'](_0x594e11['shift']());}};_0x5418ad(++_0x28f652);}(_0x05bc,0xae));var _0xc05b=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x05bc[_0x3dd15e];return _0x231fd0;};'use strict';var EventEmitter=require('events');var ChatWebsite=require(_0xc05b('0x0'))['db']['ChatWebsite'];var ChatWebsiteEvents=new EventEmitter();ChatWebsiteEvents[_0xc05b('0x1')](0x0);var events={'afterCreate':_0xc05b('0x2'),'afterUpdate':'update','afterDestroy':_0xc05b('0x3')};function emitEvent(_0x2deceb){return function(_0xf971c9,_0x36356e,_0x27d374){ChatWebsiteEvents[_0xc05b('0x4')](_0x2deceb+':'+_0xf971c9['id'],_0xf971c9);ChatWebsiteEvents[_0xc05b('0x4')](_0x2deceb,_0xf971c9);_0x27d374(null);};}for(var e in events){if(events[_0xc05b('0x5')](e)){var event=events[e];ChatWebsite[_0xc05b('0x6')](e,emitEvent(event));}}module[_0xc05b('0x7')]=ChatWebsiteEvents;