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 _0x26cf=['remove','emit','hasOwnProperty','hook','exports','../../mysqldb','ChatWebsite','save'];(function(_0x1d3ca3,_0x3d99af){var _0x53c51e=function(_0x4227c6){while(--_0x4227c6){_0x1d3ca3['push'](_0x1d3ca3['shift']());}};_0x53c51e(++_0x3d99af);}(_0x26cf,0x135));var _0xf26c=function(_0x52d634,_0x3b58d5){_0x52d634=_0x52d634-0x0;var _0x9eae82=_0x26cf[_0x52d634];return _0x9eae82;};'use strict';var EventEmitter=require('events');var ChatWebsite=require(_0xf26c('0x0'))['db'][_0xf26c('0x1')];var ChatWebsiteEvents=new EventEmitter();ChatWebsiteEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xf26c('0x2'),'afterUpdate':'update','afterDestroy':_0xf26c('0x3')};function emitEvent(_0x4c414f){return function(_0x314cdf,_0xf4a93f,_0x58d7b7){ChatWebsiteEvents[_0xf26c('0x4')](_0x4c414f+':'+_0x314cdf['id'],_0x314cdf);ChatWebsiteEvents[_0xf26c('0x4')](_0x4c414f,_0x314cdf);_0x58d7b7(null);};}for(var e in events){if(events[_0xf26c('0x5')](e)){var event=events[e];ChatWebsite[_0xf26c('0x6')](e,emitEvent(event));}}module[_0xf26c('0x7')]=ChatWebsiteEvents;