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 _0xf014=['emit','hook','exports','events','../../mysqldb','VoiceQueue','setMaxListeners','save','update','remove'];(function(_0x13ce0c,_0x3f2a0d){var _0x4388fb=function(_0x27db4b){while(--_0x27db4b){_0x13ce0c['push'](_0x13ce0c['shift']());}};_0x4388fb(++_0x3f2a0d);}(_0xf014,0x17f));var _0x4f01=function(_0x4d9475,_0x1a6c26){_0x4d9475=_0x4d9475-0x0;var _0x23aa82=_0xf014[_0x4d9475];return _0x23aa82;};'use strict';var EventEmitter=require(_0x4f01('0x0'));var VoiceQueue=require(_0x4f01('0x1'))['db'][_0x4f01('0x2')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0x4f01('0x3')](0x0);var events={'afterCreate':_0x4f01('0x4'),'afterUpdate':_0x4f01('0x5'),'afterDestroy':_0x4f01('0x6')};function emitEvent(_0x37148b){return function(_0x5e1cbc,_0x705bd2,_0x1fe21f){VoiceQueueEvents[_0x4f01('0x7')](_0x37148b+':'+_0x5e1cbc['id'],_0x5e1cbc);VoiceQueueEvents[_0x4f01('0x7')](_0x37148b,_0x5e1cbc);_0x1fe21f(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceQueue[_0x4f01('0x8')](e,emitEvent(event));}}module[_0x4f01('0x9')]=VoiceQueueEvents;