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 _0xda19=['events','../../mysqldb','VoicePrefix','save','update','emit','hasOwnProperty','exports'];(function(_0x83b14,_0x2991a4){var _0x5b06d1=function(_0x3e5cc3){while(--_0x3e5cc3){_0x83b14['push'](_0x83b14['shift']());}};_0x5b06d1(++_0x2991a4);}(_0xda19,0x178));var _0x9da1=function(_0x2ef2b3,_0x3b4f6b){_0x2ef2b3=_0x2ef2b3-0x0;var _0x57bfd8=_0xda19[_0x2ef2b3];return _0x57bfd8;};'use strict';var EventEmitter=require(_0x9da1('0x0'));var VoicePrefix=require(_0x9da1('0x1'))['db'][_0x9da1('0x2')];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x9da1('0x3'),'afterUpdate':_0x9da1('0x4'),'afterDestroy':'remove'};function emitEvent(_0x37b056){return function(_0x1f59ca,_0xe26e78,_0x4c16ab){VoicePrefixEvents[_0x9da1('0x5')](_0x37b056+':'+_0x1f59ca['id'],_0x1f59ca);VoicePrefixEvents[_0x9da1('0x5')](_0x37b056,_0x1f59ca);_0x4c16ab(null);};}for(var e in events){if(events[_0x9da1('0x6')](e)){var event=events[e];VoicePrefix['hook'](e,emitEvent(event));}}module[_0x9da1('0x7')]=VoicePrefixEvents;