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 _0x48f1=['exports','events','../../mysqldb','FaxAccount','save','update','emit','hook'];(function(_0x2de8f1,_0x3683f0){var _0x42eb5b=function(_0xbc047f){while(--_0xbc047f){_0x2de8f1['push'](_0x2de8f1['shift']());}};_0x42eb5b(++_0x3683f0);}(_0x48f1,0xd9));var _0x148f=function(_0x52c349,_0x17aac0){_0x52c349=_0x52c349-0x0;var _0xd7bc0b=_0x48f1[_0x52c349];return _0xd7bc0b;};'use strict';var EventEmitter=require(_0x148f('0x0'));var FaxAccount=require(_0x148f('0x1'))['db'][_0x148f('0x2')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x148f('0x3'),'afterUpdate':_0x148f('0x4'),'afterDestroy':'remove'};function emitEvent(_0x3313){return function(_0x200a73,_0x111dd6,_0x2908cc){FaxAccountEvents[_0x148f('0x5')](_0x3313+':'+_0x200a73['id'],_0x200a73);FaxAccountEvents[_0x148f('0x5')](_0x3313,_0x200a73);_0x2908cc(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];FaxAccount[_0x148f('0x6')](e,emitEvent(event));}}module[_0x148f('0x7')]=FaxAccountEvents;