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 _0x6c8a=['events','../../mysqldb','VoiceQueue','save','update','remove','emit','hasOwnProperty','exports'];(function(_0x266bc6,_0x56409d){var _0x481e33=function(_0x14e5ad){while(--_0x14e5ad){_0x266bc6['push'](_0x266bc6['shift']());}};_0x481e33(++_0x56409d);}(_0x6c8a,0x90));var _0xa6c8=function(_0x325fb9,_0x331331){_0x325fb9=_0x325fb9-0x0;var _0x30ddc0=_0x6c8a[_0x325fb9];return _0x30ddc0;};'use strict';var EventEmitter=require(_0xa6c8('0x0'));var VoiceQueue=require(_0xa6c8('0x1'))['db'][_0xa6c8('0x2')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xa6c8('0x3'),'afterUpdate':_0xa6c8('0x4'),'afterDestroy':_0xa6c8('0x5')};function emitEvent(_0x5be50b){return function(_0x30bc62,_0x29e351,_0x485304){VoiceQueueEvents[_0xa6c8('0x6')](_0x5be50b+':'+_0x30bc62['id'],_0x30bc62);VoiceQueueEvents[_0xa6c8('0x6')](_0x5be50b,_0x30bc62);_0x485304(null);};}for(var e in events){if(events[_0xa6c8('0x7')](e)){var event=events[e];VoiceQueue['hook'](e,emitEvent(event));}}module[_0xa6c8('0x8')]=VoiceQueueEvents;