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 _0x92af=['VoiceExtension','setMaxListeners','save','update','emit','hook','events','../../mysqldb'];(function(_0x2d2ccc,_0x30f2fe){var _0x54dc55=function(_0x378643){while(--_0x378643){_0x2d2ccc['push'](_0x2d2ccc['shift']());}};_0x54dc55(++_0x30f2fe);}(_0x92af,0xee));var _0xf92a=function(_0x38314c,_0xc7487f){_0x38314c=_0x38314c-0x0;var _0x4d0d62=_0x92af[_0x38314c];return _0x4d0d62;};'use strict';var EventEmitter=require(_0xf92a('0x0'));var VoiceExtension=require(_0xf92a('0x1'))['db'][_0xf92a('0x2')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents[_0xf92a('0x3')](0x0);var events={'afterCreate':_0xf92a('0x4'),'afterUpdate':_0xf92a('0x5'),'afterDestroy':'remove'};function emitEvent(_0xacb462){return function(_0x4240e1,_0x2b4c41,_0x9a9e43){VoiceExtensionEvents[_0xf92a('0x6')](_0xacb462+':'+_0x4240e1['id'],_0x4240e1);VoiceExtensionEvents[_0xf92a('0x6')](_0xacb462,_0x4240e1);_0x9a9e43(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceExtension[_0xf92a('0x7')](e,emitEvent(event));}}module['exports']=VoiceExtensionEvents;