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 _0x94b1=['setMaxListeners','save','update','emit','hasOwnProperty','exports','../../mysqldb'];(function(_0x349a9e,_0x473cb8){var _0x24c207=function(_0x22f148){while(--_0x22f148){_0x349a9e['push'](_0x349a9e['shift']());}};_0x24c207(++_0x473cb8);}(_0x94b1,0x102));var _0x194b=function(_0x170b20,_0x49fc52){_0x170b20=_0x170b20-0x0;var _0xbe0395=_0x94b1[_0x170b20];return _0xbe0395;};'use strict';var EventEmitter=require('events');var ChatWebsite=require(_0x194b('0x0'))['db']['ChatWebsite'];var ChatWebsiteEvents=new EventEmitter();ChatWebsiteEvents[_0x194b('0x1')](0x0);var events={'afterCreate':_0x194b('0x2'),'afterUpdate':_0x194b('0x3'),'afterDestroy':'remove'};function emitEvent(_0x13fda1){return function(_0x3a21be,_0x32586a,_0x23ab83){ChatWebsiteEvents['emit'](_0x13fda1+':'+_0x3a21be['id'],_0x3a21be);ChatWebsiteEvents[_0x194b('0x4')](_0x13fda1,_0x3a21be);_0x23ab83(null);};}for(var e in events){if(events[_0x194b('0x5')](e)){var event=events[e];ChatWebsite['hook'](e,emitEvent(event));}}module[_0x194b('0x6')]=ChatWebsiteEvents;