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 _0xa1af=['update','remove','emit','hasOwnProperty','exports','events','../../mysqldb','FaxQueue'];(function(_0x136619,_0x31c9b2){var _0x38c4a5=function(_0x10b74d){while(--_0x10b74d){_0x136619['push'](_0x136619['shift']());}};_0x38c4a5(++_0x31c9b2);}(_0xa1af,0x19d));var _0xfa1a=function(_0x449003,_0x1ea9c4){_0x449003=_0x449003-0x0;var _0x377bd8=_0xa1af[_0x449003];return _0x377bd8;};'use strict';var EventEmitter=require(_0xfa1a('0x0'));var FaxQueue=require(_0xfa1a('0x1'))['db'][_0xfa1a('0x2')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0xfa1a('0x3'),'afterDestroy':_0xfa1a('0x4')};function emitEvent(_0x1c73f6){return function(_0x4c3182,_0x1f11ed,_0xebf2b6){FaxQueueEvents[_0xfa1a('0x5')](_0x1c73f6+':'+_0x4c3182['id'],_0x4c3182);FaxQueueEvents[_0xfa1a('0x5')](_0x1c73f6,_0x4c3182);_0xebf2b6(null);};}for(var e in events){if(events[_0xfa1a('0x6')](e)){var event=events[e];FaxQueue['hook'](e,emitEvent(event));}}module[_0xfa1a('0x7')]=FaxQueueEvents;