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 _0xf6cc=['save','update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','FaxQueue','setMaxListeners'];(function(_0x42cae2,_0x284ef8){var _0x5f256f=function(_0x41abc8){while(--_0x41abc8){_0x42cae2['push'](_0x42cae2['shift']());}};_0x5f256f(++_0x284ef8);}(_0xf6cc,0x188));var _0xcf6c=function(_0x4eed26,_0x33d9b4){_0x4eed26=_0x4eed26-0x0;var _0x43326f=_0xf6cc[_0x4eed26];return _0x43326f;};'use strict';var EventEmitter=require(_0xcf6c('0x0'));var FaxQueue=require(_0xcf6c('0x1'))['db'][_0xcf6c('0x2')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0xcf6c('0x3')](0x0);var events={'afterCreate':_0xcf6c('0x4'),'afterUpdate':_0xcf6c('0x5'),'afterDestroy':_0xcf6c('0x6')};function emitEvent(_0x547e73){return function(_0x48f359,_0x2ba70d,_0x176b9f){FaxQueueEvents[_0xcf6c('0x7')](_0x547e73+':'+_0x48f359['id'],_0x48f359);FaxQueueEvents[_0xcf6c('0x7')](_0x547e73,_0x48f359);_0x176b9f(null);};}for(var e in events){if(events[_0xcf6c('0x8')](e)){var event=events[e];FaxQueue[_0xcf6c('0x9')](e,emitEvent(event));}}module[_0xcf6c('0xa')]=FaxQueueEvents;