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 _0x248f=['emit','hasOwnProperty','exports','events','../../mysqldb','VoiceQueue','save','update','remove'];(function(_0x19a08d,_0x41aa77){var _0x2485ed=function(_0x50472b){while(--_0x50472b){_0x19a08d['push'](_0x19a08d['shift']());}};_0x2485ed(++_0x41aa77);}(_0x248f,0x108));var _0xf248=function(_0xce7dc4,_0x13498e){_0xce7dc4=_0xce7dc4-0x0;var _0x31f02f=_0x248f[_0xce7dc4];return _0x31f02f;};'use strict';var EventEmitter=require(_0xf248('0x0'));var VoiceQueue=require(_0xf248('0x1'))['db'][_0xf248('0x2')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xf248('0x3'),'afterUpdate':_0xf248('0x4'),'afterDestroy':_0xf248('0x5')};function emitEvent(_0x4589ab){return function(_0x538aa3,_0x2c3b4b,_0x4bd663){VoiceQueueEvents[_0xf248('0x6')](_0x4589ab+':'+_0x538aa3['id'],_0x538aa3);VoiceQueueEvents[_0xf248('0x6')](_0x4589ab,_0x538aa3);_0x4bd663(null);};}for(var e in events){if(events[_0xf248('0x7')](e)){var event=events[e];VoiceQueue['hook'](e,emitEvent(event));}}module[_0xf248('0x8')]=VoiceQueueEvents;