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 _0xc736=['events','../../mysqldb','FaxQueue','setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','exports'];(function(_0x176b3c,_0x3016ca){var _0x459e58=function(_0x49dd1b){while(--_0x49dd1b){_0x176b3c['push'](_0x176b3c['shift']());}};_0x459e58(++_0x3016ca);}(_0xc736,0xf2));var _0x6c73=function(_0x4b01c0,_0x199466){_0x4b01c0=_0x4b01c0-0x0;var _0x33c771=_0xc736[_0x4b01c0];return _0x33c771;};'use strict';var EventEmitter=require(_0x6c73('0x0'));var FaxQueue=require(_0x6c73('0x1'))['db'][_0x6c73('0x2')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0x6c73('0x3')](0x0);var events={'afterCreate':_0x6c73('0x4'),'afterUpdate':_0x6c73('0x5'),'afterDestroy':_0x6c73('0x6')};function emitEvent(_0x4414ad){return function(_0x1652bf,_0x21980c,_0x2a885d){FaxQueueEvents[_0x6c73('0x7')](_0x4414ad+':'+_0x1652bf['id'],_0x1652bf);FaxQueueEvents[_0x6c73('0x7')](_0x4414ad,_0x1652bf);_0x2a885d(null);};}for(var e in events){if(events[_0x6c73('0x8')](e)){var event=events[e];FaxQueue[_0x6c73('0x9')](e,emitEvent(event));}}module[_0x6c73('0xa')]=FaxQueueEvents;