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 _0xb5d0=['events','../../mysqldb','FaxAccount','setMaxListeners','save','update','emit','hook','exports'];(function(_0x53c99e,_0x1f751c){var _0x5936c8=function(_0x4bb202){while(--_0x4bb202){_0x53c99e['push'](_0x53c99e['shift']());}};_0x5936c8(++_0x1f751c);}(_0xb5d0,0x75));var _0x0b5d=function(_0x44decb,_0x5e98c4){_0x44decb=_0x44decb-0x0;var _0x1e249a=_0xb5d0[_0x44decb];return _0x1e249a;};'use strict';var EventEmitter=require(_0x0b5d('0x0'));var FaxAccount=require(_0x0b5d('0x1'))['db'][_0x0b5d('0x2')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents[_0x0b5d('0x3')](0x0);var events={'afterCreate':_0x0b5d('0x4'),'afterUpdate':_0x0b5d('0x5'),'afterDestroy':'remove'};function emitEvent(_0x1742a5){return function(_0x28afb1,_0xf942cf,_0x3a3850){FaxAccountEvents[_0x0b5d('0x6')](_0x1742a5+':'+_0x28afb1['id'],_0x28afb1);FaxAccountEvents[_0x0b5d('0x6')](_0x1742a5,_0x28afb1);_0x3a3850(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];FaxAccount[_0x0b5d('0x7')](e,emitEvent(event));}}module[_0x0b5d('0x8')]=FaxAccountEvents;