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 _0xfab7=['events','../../mysqldb','VoiceQueueReport','setMaxListeners','save','update','remove','emit','hook','exports'];(function(_0x26d7da,_0x5338bf){var _0x4d8e7b=function(_0x226898){while(--_0x226898){_0x26d7da['push'](_0x26d7da['shift']());}};_0x4d8e7b(++_0x5338bf);}(_0xfab7,0xfa));var _0x7fab=function(_0x2d2b3f,_0x498c26){_0x2d2b3f=_0x2d2b3f-0x0;var _0x4fc433=_0xfab7[_0x2d2b3f];return _0x4fc433;};'use strict';var EventEmitter=require(_0x7fab('0x0'));var VoiceQueueReport=require(_0x7fab('0x1'))['db'][_0x7fab('0x2')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0x7fab('0x3')](0x0);var events={'afterCreate':_0x7fab('0x4'),'afterUpdate':_0x7fab('0x5'),'afterDestroy':_0x7fab('0x6')};function emitEvent(_0x4c9387){return function(_0x2ed313,_0x5c7f76,_0x362d42){VoiceQueueReportEvents[_0x7fab('0x7')](_0x4c9387+':'+_0x2ed313['id'],_0x2ed313);VoiceQueueReportEvents[_0x7fab('0x7')](_0x4c9387,_0x2ed313);_0x362d42(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceQueueReport[_0x7fab('0x8')](e,emitEvent(event));}}module[_0x7fab('0x9')]=VoiceQueueReportEvents;