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 _0x79b5=['hook','exports','events','../../mysqldb','VoiceQueue','remove','emit','hasOwnProperty'];(function(_0x351ad8,_0x4e83cb){var _0x6726de=function(_0x5ea2a6){while(--_0x5ea2a6){_0x351ad8['push'](_0x351ad8['shift']());}};_0x6726de(++_0x4e83cb);}(_0x79b5,0x1d2));var _0x579b=function(_0x1fb28c,_0x306808){_0x1fb28c=_0x1fb28c-0x0;var _0x505e0b=_0x79b5[_0x1fb28c];return _0x505e0b;};'use strict';var EventEmitter=require(_0x579b('0x0'));var VoiceQueue=require(_0x579b('0x1'))['db'][_0x579b('0x2')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0x579b('0x3')};function emitEvent(_0x39373e){return function(_0x4c2f80,_0x131e8b,_0x3ff52e){VoiceQueueEvents['emit'](_0x39373e+':'+_0x4c2f80['id'],_0x4c2f80);VoiceQueueEvents[_0x579b('0x4')](_0x39373e,_0x4c2f80);_0x3ff52e(null);};}for(var e in events){if(events[_0x579b('0x5')](e)){var event=events[e];VoiceQueue[_0x579b('0x6')](e,emitEvent(event));}}module[_0x579b('0x7')]=VoiceQueueEvents;