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 _0xdc0d=['emit','hasOwnProperty','exports','events','../../mysqldb','setMaxListeners','update','remove'];(function(_0x533381,_0x8a69fa){var _0x2877ed=function(_0x45cb54){while(--_0x45cb54){_0x533381['push'](_0x533381['shift']());}};_0x2877ed(++_0x8a69fa);}(_0xdc0d,0x1db));var _0xddc0=function(_0x1779ed,_0x1b2d3e){_0x1779ed=_0x1779ed-0x0;var _0xbca07f=_0xdc0d[_0x1779ed];return _0xbca07f;};'use strict';var EventEmitter=require(_0xddc0('0x0'));var ChatWebsite=require(_0xddc0('0x1'))['db']['ChatWebsite'];var ChatWebsiteEvents=new EventEmitter();ChatWebsiteEvents[_0xddc0('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0xddc0('0x3'),'afterDestroy':_0xddc0('0x4')};function emitEvent(_0x333d21){return function(_0x32ad85,_0xb4e3f,_0x88b8b1){ChatWebsiteEvents[_0xddc0('0x5')](_0x333d21+':'+_0x32ad85['id'],_0x32ad85);ChatWebsiteEvents[_0xddc0('0x5')](_0x333d21,_0x32ad85);_0x88b8b1(null);};}for(var e in events){if(events[_0xddc0('0x6')](e)){var event=events[e];ChatWebsite['hook'](e,emitEvent(event));}}module[_0xddc0('0x7')]=ChatWebsiteEvents;