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 _0x5e38=['../../mysqldb','VoiceQueueReport','setMaxListeners','remove','emit','hasOwnProperty','hook'];(function(_0x3b53b0,_0x23dc58){var _0x4eddc6=function(_0x46254f){while(--_0x46254f){_0x3b53b0['push'](_0x3b53b0['shift']());}};_0x4eddc6(++_0x23dc58);}(_0x5e38,0x70));var _0x85e3=function(_0x1ce492,_0x6f13fc){_0x1ce492=_0x1ce492-0x0;var _0x34ac6f=_0x5e38[_0x1ce492];return _0x34ac6f;};'use strict';var EventEmitter=require('events');var VoiceQueueReport=require(_0x85e3('0x0'))['db'][_0x85e3('0x1')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0x85e3('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0x85e3('0x3')};function emitEvent(_0x4853c5){return function(_0x584e21,_0x17d393,_0xdbd076){VoiceQueueReportEvents[_0x85e3('0x4')](_0x4853c5+':'+_0x584e21['id'],_0x584e21);VoiceQueueReportEvents[_0x85e3('0x4')](_0x4853c5,_0x584e21);_0xdbd076(null);};}for(var e in events){if(events[_0x85e3('0x5')](e)){var event=events[e];VoiceQueueReport[_0x85e3('0x6')](e,emitEvent(event));}}module['exports']=VoiceQueueReportEvents;