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 _0x1f51=['remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','OpenchannelQueue','save','update'];(function(_0x291f8b,_0x3b5591){var _0x275171=function(_0xb33d67){while(--_0xb33d67){_0x291f8b['push'](_0x291f8b['shift']());}};_0x275171(++_0x3b5591);}(_0x1f51,0x131));var _0x11f5=function(_0x2dad90,_0x466f3e){_0x2dad90=_0x2dad90-0x0;var _0x37af4f=_0x1f51[_0x2dad90];return _0x37af4f;};'use strict';var EventEmitter=require(_0x11f5('0x0'));var OpenchannelQueue=require(_0x11f5('0x1'))['db'][_0x11f5('0x2')];var OpenchannelQueueEvents=new EventEmitter();OpenchannelQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x11f5('0x3'),'afterUpdate':_0x11f5('0x4'),'afterDestroy':_0x11f5('0x5')};function emitEvent(_0x4e06fa){return function(_0x427c74,_0x4ff0c9,_0x2b27c9){OpenchannelQueueEvents[_0x11f5('0x6')](_0x4e06fa+':'+_0x427c74['id'],_0x427c74);OpenchannelQueueEvents[_0x11f5('0x6')](_0x4e06fa,_0x427c74);_0x2b27c9(null);};}for(var e in events){if(events[_0x11f5('0x7')](e)){var event=events[e];OpenchannelQueue[_0x11f5('0x8')](e,emitEvent(event));}}module[_0x11f5('0x9')]=OpenchannelQueueEvents;