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 _0xf0f3=['events','../../mysqldb','VoiceQueueReport','setMaxListeners','update','emit','hasOwnProperty','hook','exports'];(function(_0x38fb8b,_0x70dd0a){var _0x1ec681=function(_0x58f130){while(--_0x58f130){_0x38fb8b['push'](_0x38fb8b['shift']());}};_0x1ec681(++_0x70dd0a);}(_0xf0f3,0x1ef));var _0x3f0f=function(_0x543259,_0x537ff6){_0x543259=_0x543259-0x0;var _0x8a88f5=_0xf0f3[_0x543259];return _0x8a88f5;};'use strict';var EventEmitter=require(_0x3f0f('0x0'));var VoiceQueueReport=require(_0x3f0f('0x1'))['db'][_0x3f0f('0x2')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0x3f0f('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0x3f0f('0x4'),'afterDestroy':'remove'};function emitEvent(_0x454919){return function(_0x2ea36c,_0xeb5a23,_0xfe2218){VoiceQueueReportEvents[_0x3f0f('0x5')](_0x454919+':'+_0x2ea36c['id'],_0x2ea36c);VoiceQueueReportEvents[_0x3f0f('0x5')](_0x454919,_0x2ea36c);_0xfe2218(null);};}for(var e in events){if(events[_0x3f0f('0x6')](e)){var event=events[e];VoiceQueueReport[_0x3f0f('0x7')](e,emitEvent(event));}}module[_0x3f0f('0x8')]=VoiceQueueReportEvents;