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 _0x594d=['setMaxListeners','save','update','remove','emit','exports','ChatWebsite'];(function(_0x5a79e2,_0x319b1a){var _0x266c45=function(_0x172478){while(--_0x172478){_0x5a79e2['push'](_0x5a79e2['shift']());}};_0x266c45(++_0x319b1a);}(_0x594d,0x172));var _0xd594=function(_0x5b88b9,_0x30f7bd){_0x5b88b9=_0x5b88b9-0x0;var _0x5822c2=_0x594d[_0x5b88b9];return _0x5822c2;};'use strict';var EventEmitter=require('events');var ChatWebsite=require('../../mysqldb')['db'][_0xd594('0x0')];var ChatWebsiteEvents=new EventEmitter();ChatWebsiteEvents[_0xd594('0x1')](0x0);var events={'afterCreate':_0xd594('0x2'),'afterUpdate':_0xd594('0x3'),'afterDestroy':_0xd594('0x4')};function emitEvent(_0x4897eb){return function(_0x2f523e,_0x43c803,_0x200776){ChatWebsiteEvents[_0xd594('0x5')](_0x4897eb+':'+_0x2f523e['id'],_0x2f523e);ChatWebsiteEvents['emit'](_0x4897eb,_0x2f523e);_0x200776(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatWebsite['hook'](e,emitEvent(event));}}module[_0xd594('0x6')]=ChatWebsiteEvents;