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 _0xc7c6=['save','update','remove','emit','hasOwnProperty','hook','exports','../../mysqldb','setMaxListeners'];(function(_0x126b1f,_0x34eacf){var _0x1facf5=function(_0x578b04){while(--_0x578b04){_0x126b1f['push'](_0x126b1f['shift']());}};_0x1facf5(++_0x34eacf);}(_0xc7c6,0x85));var _0x6c7c=function(_0x5a910a,_0x578117){_0x5a910a=_0x5a910a-0x0;var _0x389e26=_0xc7c6[_0x5a910a];return _0x389e26;};'use strict';var EventEmitter=require('events');var VoiceExtension=require(_0x6c7c('0x0'))['db']['VoiceExtension'];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents[_0x6c7c('0x1')](0x0);var events={'afterCreate':_0x6c7c('0x2'),'afterUpdate':_0x6c7c('0x3'),'afterDestroy':_0x6c7c('0x4')};function emitEvent(_0x39afb8){return function(_0x45d673,_0x168a15,_0x66b4){VoiceExtensionEvents[_0x6c7c('0x5')](_0x39afb8+':'+_0x45d673['id'],_0x45d673);VoiceExtensionEvents[_0x6c7c('0x5')](_0x39afb8,_0x45d673);_0x66b4(null);};}for(var e in events){if(events[_0x6c7c('0x6')](e)){var event=events[e];VoiceExtension[_0x6c7c('0x7')](e,emitEvent(event));}}module[_0x6c7c('0x8')]=VoiceExtensionEvents;