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 _0xf415=['events','../../mysqldb','OpenchannelQueue','remove','emit','hasOwnProperty','hook','exports'];(function(_0x9cfe28,_0x1a335c){var _0x54a1d0=function(_0x46bc02){while(--_0x46bc02){_0x9cfe28['push'](_0x9cfe28['shift']());}};_0x54a1d0(++_0x1a335c);}(_0xf415,0x130));var _0x5f41=function(_0x177c8d,_0x15a8af){_0x177c8d=_0x177c8d-0x0;var _0x2a771b=_0xf415[_0x177c8d];return _0x2a771b;};'use strict';var EventEmitter=require(_0x5f41('0x0'));var OpenchannelQueue=require(_0x5f41('0x1'))['db'][_0x5f41('0x2')];var OpenchannelQueueEvents=new EventEmitter();OpenchannelQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0x5f41('0x3')};function emitEvent(_0x4c16d6){return function(_0x477245,_0x59720f,_0x3db68d){OpenchannelQueueEvents[_0x5f41('0x4')](_0x4c16d6+':'+_0x477245['id'],_0x477245);OpenchannelQueueEvents[_0x5f41('0x4')](_0x4c16d6,_0x477245);_0x3db68d(null);};}for(var e in events){if(events[_0x5f41('0x5')](e)){var event=events[e];OpenchannelQueue[_0x5f41('0x6')](e,emitEvent(event));}}module[_0x5f41('0x7')]=OpenchannelQueueEvents;