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 _0x7a5a=['exports','events','CmList','setMaxListeners','save','update','remove','emit'];(function(_0x482767,_0x4af19d){var _0x45f3de=function(_0x43919c){while(--_0x43919c){_0x482767['push'](_0x482767['shift']());}};_0x45f3de(++_0x4af19d);}(_0x7a5a,0x1f1));var _0xa7a5=function(_0x17a17a,_0x3bed47){_0x17a17a=_0x17a17a-0x0;var _0x5397b1=_0x7a5a[_0x17a17a];return _0x5397b1;};'use strict';var EventEmitter=require(_0xa7a5('0x0'));var CmList=require('../../mysqldb')['db'][_0xa7a5('0x1')];var CmListEvents=new EventEmitter();CmListEvents[_0xa7a5('0x2')](0x0);var events={'afterCreate':_0xa7a5('0x3'),'afterUpdate':_0xa7a5('0x4'),'afterDestroy':_0xa7a5('0x5')};function emitEvent(_0x1c15dd){return function(_0x297ae8,_0x5cbc77,_0x12a901){CmListEvents[_0xa7a5('0x6')](_0x1c15dd+':'+_0x297ae8['id'],_0x297ae8);CmListEvents['emit'](_0x1c15dd,_0x297ae8);_0x12a901(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];CmList['hook'](e,emitEvent(event));}}module[_0xa7a5('0x7')]=CmListEvents;