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 _0x44c6=['setMaxListeners','save','update','emit','hasOwnProperty','exports','events','../../mysqldb','ChatWebsite'];(function(_0x48841b,_0x3d1c03){var _0x3dc6db=function(_0x271e61){while(--_0x271e61){_0x48841b['push'](_0x48841b['shift']());}};_0x3dc6db(++_0x3d1c03);}(_0x44c6,0x96));var _0x644c=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x44c6[_0x3dd15e];return _0x231fd0;};'use strict';var EventEmitter=require(_0x644c('0x0'));var ChatWebsite=require(_0x644c('0x1'))['db'][_0x644c('0x2')];var ChatWebsiteEvents=new EventEmitter();ChatWebsiteEvents[_0x644c('0x3')](0x0);var events={'afterCreate':_0x644c('0x4'),'afterUpdate':_0x644c('0x5'),'afterDestroy':'remove'};function emitEvent(_0x15ca74){return function(_0x48cade,_0xbb4c7b,_0x43bc01){ChatWebsiteEvents[_0x644c('0x6')](_0x15ca74+':'+_0x48cade['id'],_0x48cade);ChatWebsiteEvents[_0x644c('0x6')](_0x15ca74,_0x48cade);_0x43bc01(null);};}for(var e in events){if(events[_0x644c('0x7')](e)){var event=events[e];ChatWebsite['hook'](e,emitEvent(event));}}module[_0x644c('0x8')]=ChatWebsiteEvents;