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 _0xa4b2=['save','remove','emit','hasOwnProperty','hook','exports','events','VoiceExtension','setMaxListeners'];(function(_0x5899f9,_0x45c909){var _0x102429=function(_0x34ac44){while(--_0x34ac44){_0x5899f9['push'](_0x5899f9['shift']());}};_0x102429(++_0x45c909);}(_0xa4b2,0x1da));var _0x2a4b=function(_0x20e29e,_0x5d8456){_0x20e29e=_0x20e29e-0x0;var _0x1058ac=_0xa4b2[_0x20e29e];return _0x1058ac;};'use strict';var EventEmitter=require(_0x2a4b('0x0'));var VoiceExtension=require('../../mysqldb')['db'][_0x2a4b('0x1')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents[_0x2a4b('0x2')](0x0);var events={'afterCreate':_0x2a4b('0x3'),'afterUpdate':'update','afterDestroy':_0x2a4b('0x4')};function emitEvent(_0x1a5867){return function(_0x5c7dd8,_0x2d15c7,_0x396190){VoiceExtensionEvents[_0x2a4b('0x5')](_0x1a5867+':'+_0x5c7dd8['id'],_0x5c7dd8);VoiceExtensionEvents['emit'](_0x1a5867,_0x5c7dd8);_0x396190(null);};}for(var e in events){if(events[_0x2a4b('0x6')](e)){var event=events[e];VoiceExtension[_0x2a4b('0x7')](e,emitEvent(event));}}module[_0x2a4b('0x8')]=VoiceExtensionEvents;