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 _0x3f5d=['setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','exports','../../mysqldb'];(function(_0x3a4f18,_0x1af741){var _0x4c20fc=function(_0x27115f){while(--_0x27115f){_0x3a4f18['push'](_0x3a4f18['shift']());}};_0x4c20fc(++_0x1af741);}(_0x3f5d,0xaa));var _0xd3f5=function(_0x3549c0,_0x2a3574){_0x3549c0=_0x3549c0-0x0;var _0x374a04=_0x3f5d[_0x3549c0];return _0x374a04;};'use strict';var EventEmitter=require('events');var SquareProject=require(_0xd3f5('0x0'))['db']['SquareProject'];var SquareProjectEvents=new EventEmitter();SquareProjectEvents[_0xd3f5('0x1')](0x0);var events={'afterCreate':_0xd3f5('0x2'),'afterUpdate':_0xd3f5('0x3'),'afterDestroy':_0xd3f5('0x4')};function emitEvent(_0x564d12){return function(_0x5559a,_0x2dab82,_0x155862){SquareProjectEvents['emit'](_0x564d12+':'+_0x5559a['id'],_0x5559a);SquareProjectEvents[_0xd3f5('0x5')](_0x564d12,_0x5559a);_0x155862(null);};}for(var e in events){if(events[_0xd3f5('0x6')](e)){var event=events[e];SquareProject[_0xd3f5('0x7')](e,emitEvent(event));}}module[_0xd3f5('0x8')]=SquareProjectEvents;