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 _0xcfbd=['save','emit','hasOwnProperty','hook','exports','events','../../mysqldb','UserVoiceQueueRt'];(function(_0x18ab2a,_0x4debcd){var _0x16dcee=function(_0x10107a){while(--_0x10107a){_0x18ab2a['push'](_0x18ab2a['shift']());}};_0x16dcee(++_0x4debcd);}(_0xcfbd,0x16d));var _0xdcfb=function(_0x2840b6,_0x3abb8b){_0x2840b6=_0x2840b6-0x0;var _0x38169f=_0xcfbd[_0x2840b6];return _0x38169f;};'use strict';var EventEmitter=require(_0xdcfb('0x0'));var UserVoiceQueueRt=require(_0xdcfb('0x1'))['db'][_0xdcfb('0x2')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xdcfb('0x3'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x5b2da3){return function(_0x39cdab,_0x438f7f,_0x209728){UserVoiceQueueRtEvents[_0xdcfb('0x4')](_0x5b2da3+':'+_0x39cdab['id'],_0x39cdab);UserVoiceQueueRtEvents[_0xdcfb('0x4')](_0x5b2da3,_0x39cdab);_0x209728(null);};}for(var e in events){if(events[_0xdcfb('0x5')](e)){var event=events[e];UserVoiceQueueRt[_0xdcfb('0x6')](e,emitEvent(event));}}module[_0xdcfb('0x7')]=UserVoiceQueueRtEvents;