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 _0xa95c=['../../mysqldb','VoicePrefix','setMaxListeners','save','update','emit','exports','events'];(function(_0x4f8937,_0x4a31e0){var _0xfe91d7=function(_0x1a1dbf){while(--_0x1a1dbf){_0x4f8937['push'](_0x4f8937['shift']());}};_0xfe91d7(++_0x4a31e0);}(_0xa95c,0x147));var _0xca95=function(_0x3e3f5f,_0x410fc0){_0x3e3f5f=_0x3e3f5f-0x0;var _0x382b1c=_0xa95c[_0x3e3f5f];return _0x382b1c;};'use strict';var EventEmitter=require(_0xca95('0x0'));var VoicePrefix=require(_0xca95('0x1'))['db'][_0xca95('0x2')];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents[_0xca95('0x3')](0x0);var events={'afterCreate':_0xca95('0x4'),'afterUpdate':_0xca95('0x5'),'afterDestroy':'remove'};function emitEvent(_0x27daa1){return function(_0x457ab0,_0x529745,_0x18c999){VoicePrefixEvents[_0xca95('0x6')](_0x27daa1+':'+_0x457ab0['id'],_0x457ab0);VoicePrefixEvents['emit'](_0x27daa1,_0x457ab0);_0x18c999(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoicePrefix['hook'](e,emitEvent(event));}}module[_0xca95('0x7')]=VoicePrefixEvents;