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 _0x1e08=['save','update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','setMaxListeners'];(function(_0xe046b7,_0x2ba267){var _0x2012aa=function(_0x58ca28){while(--_0x58ca28){_0xe046b7['push'](_0xe046b7['shift']());}};_0x2012aa(++_0x2ba267);}(_0x1e08,0x133));var _0x81e0=function(_0x254d46,_0x77078b){_0x254d46=_0x254d46-0x0;var _0xa15a30=_0x1e08[_0x254d46];return _0xa15a30;};'use strict';var EventEmitter=require(_0x81e0('0x0'));var VoiceQueue=require(_0x81e0('0x1'))['db']['VoiceQueue'];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0x81e0('0x2')](0x0);var events={'afterCreate':_0x81e0('0x3'),'afterUpdate':_0x81e0('0x4'),'afterDestroy':_0x81e0('0x5')};function emitEvent(_0x400bf2){return function(_0x1c2b67,_0x4a6558,_0x12af53){VoiceQueueEvents[_0x81e0('0x6')](_0x400bf2+':'+_0x1c2b67['id'],_0x1c2b67);VoiceQueueEvents[_0x81e0('0x6')](_0x400bf2,_0x1c2b67);_0x12af53(null);};}for(var e in events){if(events[_0x81e0('0x7')](e)){var event=events[e];VoiceQueue[_0x81e0('0x8')](e,emitEvent(event));}}module[_0x81e0('0x9')]=VoiceQueueEvents;