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 _0x051c=['emit','hasOwnProperty','exports','events','../../mysqldb','setMaxListeners','update','remove'];(function(_0x1127e3,_0x1394c7){var _0x3f33af=function(_0x5e644b){while(--_0x5e644b){_0x1127e3['push'](_0x1127e3['shift']());}};_0x3f33af(++_0x1394c7);}(_0x051c,0x13b));var _0xc051=function(_0x395221,_0x4f3714){_0x395221=_0x395221-0x0;var _0x2311d0=_0x051c[_0x395221];return _0x2311d0;};'use strict';var EventEmitter=require(_0xc051('0x0'));var FaxQueue=require(_0xc051('0x1'))['db']['FaxQueue'];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0xc051('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0xc051('0x3'),'afterDestroy':_0xc051('0x4')};function emitEvent(_0x44a8d4){return function(_0x5699f3,_0x574ec0,_0x18bfab){FaxQueueEvents[_0xc051('0x5')](_0x44a8d4+':'+_0x5699f3['id'],_0x5699f3);FaxQueueEvents['emit'](_0x44a8d4,_0x5699f3);_0x18bfab(null);};}for(var e in events){if(events[_0xc051('0x6')](e)){var event=events[e];FaxQueue['hook'](e,emitEvent(event));}}module[_0xc051('0x7')]=FaxQueueEvents;