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 _0x8ac5=['setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','VoiceExtension'];(function(_0x349481,_0x1f4059){var _0x3cc046=function(_0xb2acaf){while(--_0xb2acaf){_0x349481['push'](_0x349481['shift']());}};_0x3cc046(++_0x1f4059);}(_0x8ac5,0x105));var _0x58ac=function(_0x49c6cc,_0x308bdb){_0x49c6cc=_0x49c6cc-0x0;var _0x22e239=_0x8ac5[_0x49c6cc];return _0x22e239;};'use strict';var EventEmitter=require(_0x58ac('0x0'));var VoiceExtension=require(_0x58ac('0x1'))['db'][_0x58ac('0x2')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents[_0x58ac('0x3')](0x0);var events={'afterCreate':_0x58ac('0x4'),'afterUpdate':_0x58ac('0x5'),'afterDestroy':_0x58ac('0x6')};function emitEvent(_0x276bc0){return function(_0x474fa3,_0x27aae0,_0x4d6dfb){VoiceExtensionEvents[_0x58ac('0x7')](_0x276bc0+':'+_0x474fa3['id'],_0x474fa3);VoiceExtensionEvents[_0x58ac('0x7')](_0x276bc0,_0x474fa3);_0x4d6dfb(null);};}for(var e in events){if(events[_0x58ac('0x8')](e)){var event=events[e];VoiceExtension[_0x58ac('0x9')](e,emitEvent(event));}}module[_0x58ac('0xa')]=VoiceExtensionEvents;