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 _0xcc4e=['save','remove','emit','hook','exports','events','../../mysqldb','setMaxListeners'];(function(_0x4d6491,_0x1fa564){var _0x30a576=function(_0x150675){while(--_0x150675){_0x4d6491['push'](_0x4d6491['shift']());}};_0x30a576(++_0x1fa564);}(_0xcc4e,0x19d));var _0xecc4=function(_0x153120,_0x5f522c){_0x153120=_0x153120-0x0;var _0x237187=_0xcc4e[_0x153120];return _0x237187;};'use strict';var EventEmitter=require(_0xecc4('0x0'));var DashboardItem=require(_0xecc4('0x1'))['db']['DashboardItem'];var DashboardItemEvents=new EventEmitter();DashboardItemEvents[_0xecc4('0x2')](0x0);var events={'afterCreate':_0xecc4('0x3'),'afterUpdate':'update','afterDestroy':_0xecc4('0x4')};function emitEvent(_0x41e95a){return function(_0x52284d,_0x375da0,_0x5b1f88){DashboardItemEvents[_0xecc4('0x5')](_0x41e95a+':'+_0x52284d['id'],_0x52284d);DashboardItemEvents[_0xecc4('0x5')](_0x41e95a,_0x52284d);_0x5b1f88(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];DashboardItem[_0xecc4('0x6')](e,emitEvent(event));}}module[_0xecc4('0x7')]=DashboardItemEvents;