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 _0x389c=['../../mysqldb','VoicePrefix','setMaxListeners','save','remove','emit','hasOwnProperty','hook','events'];(function(_0x501510,_0x61caa9){var _0x1e6ee5=function(_0x32845b){while(--_0x32845b){_0x501510['push'](_0x501510['shift']());}};_0x1e6ee5(++_0x61caa9);}(_0x389c,0x1ca));var _0xc389=function(_0x49e640,_0x233e13){_0x49e640=_0x49e640-0x0;var _0x53bd33=_0x389c[_0x49e640];return _0x53bd33;};'use strict';var EventEmitter=require(_0xc389('0x0'));var VoicePrefix=require(_0xc389('0x1'))['db'][_0xc389('0x2')];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents[_0xc389('0x3')](0x0);var events={'afterCreate':_0xc389('0x4'),'afterUpdate':'update','afterDestroy':_0xc389('0x5')};function emitEvent(_0x5e739b){return function(_0x848ff7,_0x51240c,_0x31d04a){VoicePrefixEvents[_0xc389('0x6')](_0x5e739b+':'+_0x848ff7['id'],_0x848ff7);VoicePrefixEvents[_0xc389('0x6')](_0x5e739b,_0x848ff7);_0x31d04a(null);};}for(var e in events){if(events[_0xc389('0x7')](e)){var event=events[e];VoicePrefix[_0xc389('0x8')](e,emitEvent(event));}}module['exports']=VoicePrefixEvents;