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 _0x5c36=['exports','DashboardItem','setMaxListeners','save','update','remove','emit','hook'];(function(_0x31b56b,_0xdbf877){var _0x3c7b85=function(_0x54fd2d){while(--_0x54fd2d){_0x31b56b['push'](_0x31b56b['shift']());}};_0x3c7b85(++_0xdbf877);}(_0x5c36,0x1d1));var _0x65c3=function(_0x2641f9,_0x26715f){_0x2641f9=_0x2641f9-0x0;var _0x585741=_0x5c36[_0x2641f9];return _0x585741;};'use strict';var EventEmitter=require('events');var DashboardItem=require('../../mysqldb')['db'][_0x65c3('0x0')];var DashboardItemEvents=new EventEmitter();DashboardItemEvents[_0x65c3('0x1')](0x0);var events={'afterCreate':_0x65c3('0x2'),'afterUpdate':_0x65c3('0x3'),'afterDestroy':_0x65c3('0x4')};function emitEvent(_0x5a1548){return function(_0x2cb591,_0xdcac86,_0x418f78){DashboardItemEvents[_0x65c3('0x5')](_0x5a1548+':'+_0x2cb591['id'],_0x2cb591);DashboardItemEvents['emit'](_0x5a1548,_0x2cb591);_0x418f78(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];DashboardItem[_0x65c3('0x6')](e,emitEvent(event));}}module[_0x65c3('0x7')]=DashboardItemEvents;