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 _0x1b6e=['save','update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','VoicePrefix'];(function(_0x1d0b2e,_0x1a6a14){var _0x58e36c=function(_0x13187c){while(--_0x13187c){_0x1d0b2e['push'](_0x1d0b2e['shift']());}};_0x58e36c(++_0x1a6a14);}(_0x1b6e,0x101));var _0xe1b6=function(_0x4f8219,_0x31ac49){_0x4f8219=_0x4f8219-0x0;var _0x524760=_0x1b6e[_0x4f8219];return _0x524760;};'use strict';var EventEmitter=require(_0xe1b6('0x0'));var VoicePrefix=require(_0xe1b6('0x1'))['db'][_0xe1b6('0x2')];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xe1b6('0x3'),'afterUpdate':_0xe1b6('0x4'),'afterDestroy':_0xe1b6('0x5')};function emitEvent(_0x3547ed){return function(_0x2307e2,_0x1a97f8,_0xd155ee){VoicePrefixEvents[_0xe1b6('0x6')](_0x3547ed+':'+_0x2307e2['id'],_0x2307e2);VoicePrefixEvents[_0xe1b6('0x6')](_0x3547ed,_0x2307e2);_0xd155ee(null);};}for(var e in events){if(events[_0xe1b6('0x7')](e)){var event=events[e];VoicePrefix[_0xe1b6('0x8')](e,emitEvent(event));}}module[_0xe1b6('0x9')]=VoicePrefixEvents;