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 _0xe9b1=['save','update','remove','emit','hasOwnProperty','exports','events','VoiceExtension','setMaxListeners'];(function(_0x27c539,_0x143796){var _0x49e903=function(_0x181639){while(--_0x181639){_0x27c539['push'](_0x27c539['shift']());}};_0x49e903(++_0x143796);}(_0xe9b1,0xc3));var _0x1e9b=function(_0x2247ab,_0x3f4162){_0x2247ab=_0x2247ab-0x0;var _0x430062=_0xe9b1[_0x2247ab];return _0x430062;};'use strict';var EventEmitter=require(_0x1e9b('0x0'));var VoiceExtension=require('../../mysqldb')['db'][_0x1e9b('0x1')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents[_0x1e9b('0x2')](0x0);var events={'afterCreate':_0x1e9b('0x3'),'afterUpdate':_0x1e9b('0x4'),'afterDestroy':_0x1e9b('0x5')};function emitEvent(_0x55f3b5){return function(_0x2a7c75,_0x4180ad,_0x2feb6b){VoiceExtensionEvents[_0x1e9b('0x6')](_0x55f3b5+':'+_0x2a7c75['id'],_0x2a7c75);VoiceExtensionEvents[_0x1e9b('0x6')](_0x55f3b5,_0x2a7c75);_0x2feb6b(null);};}for(var e in events){if(events[_0x1e9b('0x7')](e)){var event=events[e];VoiceExtension['hook'](e,emitEvent(event));}}module[_0x1e9b('0x8')]=VoiceExtensionEvents;