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 _0x5fe0=['setMaxListeners','update','emit','hasOwnProperty','hook','events','../../mysqldb'];(function(_0x2d085c,_0x31eec0){var _0x3cb85d=function(_0xa9eb7e){while(--_0xa9eb7e){_0x2d085c['push'](_0x2d085c['shift']());}};_0x3cb85d(++_0x31eec0);}(_0x5fe0,0x1e1));var _0x05fe=function(_0x3a0224,_0x58f3d9){_0x3a0224=_0x3a0224-0x0;var _0x582ecb=_0x5fe0[_0x3a0224];return _0x582ecb;};'use strict';var EventEmitter=require(_0x05fe('0x0'));var VoicePrefix=require(_0x05fe('0x1'))['db']['VoicePrefix'];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents[_0x05fe('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0x05fe('0x3'),'afterDestroy':'remove'};function emitEvent(_0xc485c5){return function(_0x222a94,_0x503210,_0x4267ec){VoicePrefixEvents[_0x05fe('0x4')](_0xc485c5+':'+_0x222a94['id'],_0x222a94);VoicePrefixEvents['emit'](_0xc485c5,_0x222a94);_0x4267ec(null);};}for(var e in events){if(events[_0x05fe('0x5')](e)){var event=events[e];VoicePrefix[_0x05fe('0x6')](e,emitEvent(event));}}module['exports']=VoicePrefixEvents;