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 _0x374f=['remove','emit','hook','exports','events','../../mysqldb','VoiceQueue','save','update'];(function(_0x57cb4f,_0x541f57){var _0x29bb45=function(_0x462bee){while(--_0x462bee){_0x57cb4f['push'](_0x57cb4f['shift']());}};_0x29bb45(++_0x541f57);}(_0x374f,0x100));var _0xf374=function(_0x4a1a37,_0x37be60){_0x4a1a37=_0x4a1a37-0x0;var _0x52a3c9=_0x374f[_0x4a1a37];return _0x52a3c9;};'use strict';var EventEmitter=require(_0xf374('0x0'));var VoiceQueue=require(_0xf374('0x1'))['db'][_0xf374('0x2')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xf374('0x3'),'afterUpdate':_0xf374('0x4'),'afterDestroy':_0xf374('0x5')};function emitEvent(_0x57c936){return function(_0xc26170,_0x38204b,_0x582fad){VoiceQueueEvents[_0xf374('0x6')](_0x57c936+':'+_0xc26170['id'],_0xc26170);VoiceQueueEvents['emit'](_0x57c936,_0xc26170);_0x582fad(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceQueue[_0xf374('0x7')](e,emitEvent(event));}}module[_0xf374('0x8')]=VoiceQueueEvents;