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 _0x82df=['setMaxListeners','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb'];(function(_0x57b54c,_0x54ce0d){var _0x59cc19=function(_0xa33bc6){while(--_0xa33bc6){_0x57b54c['push'](_0x57b54c['shift']());}};_0x59cc19(++_0x54ce0d);}(_0x82df,0x1d6));var _0xf82d=function(_0x15b71c,_0x25708f){_0x15b71c=_0x15b71c-0x0;var _0x35c8c8=_0x82df[_0x15b71c];return _0x35c8c8;};'use strict';var EventEmitter=require(_0xf82d('0x0'));var OpenchannelQueue=require(_0xf82d('0x1'))['db']['OpenchannelQueue'];var OpenchannelQueueEvents=new EventEmitter();OpenchannelQueueEvents[_0xf82d('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0xf82d('0x3')};function emitEvent(_0x2c75f7){return function(_0x2ca9ba,_0x4bf301,_0x37f7fc){OpenchannelQueueEvents[_0xf82d('0x4')](_0x2c75f7+':'+_0x2ca9ba['id'],_0x2ca9ba);OpenchannelQueueEvents[_0xf82d('0x4')](_0x2c75f7,_0x2ca9ba);_0x37f7fc(null);};}for(var e in events){if(events[_0xf82d('0x5')](e)){var event=events[e];OpenchannelQueue[_0xf82d('0x6')](e,emitEvent(event));}}module[_0xf82d('0x7')]=OpenchannelQueueEvents;