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 _0x46cb=['update','remove','emit','hasOwnProperty','hook','exports','setMaxListeners','save'];(function(_0xc0f7e2,_0x354007){var _0xf95000=function(_0x248727){while(--_0x248727){_0xc0f7e2['push'](_0xc0f7e2['shift']());}};_0xf95000(++_0x354007);}(_0x46cb,0xd6));var _0xb46c=function(_0x40c58d,_0xca539f){_0x40c58d=_0x40c58d-0x0;var _0x2a8381=_0x46cb[_0x40c58d];return _0x2a8381;};'use strict';var EventEmitter=require('events');var ChatWebsite=require('../../mysqldb')['db']['ChatWebsite'];var ChatWebsiteEvents=new EventEmitter();ChatWebsiteEvents[_0xb46c('0x0')](0x0);var events={'afterCreate':_0xb46c('0x1'),'afterUpdate':_0xb46c('0x2'),'afterDestroy':_0xb46c('0x3')};function emitEvent(_0x409dfd){return function(_0x2aab0a,_0x2a6e97,_0x65e78a){ChatWebsiteEvents[_0xb46c('0x4')](_0x409dfd+':'+_0x2aab0a['id'],_0x2aab0a);ChatWebsiteEvents[_0xb46c('0x4')](_0x409dfd,_0x2aab0a);_0x65e78a(null);};}for(var e in events){if(events[_0xb46c('0x5')](e)){var event=events[e];ChatWebsite[_0xb46c('0x6')](e,emitEvent(event));}}module[_0xb46c('0x7')]=ChatWebsiteEvents;