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 _0xf875=['emit','hook','exports','events','SquareProject','setMaxListeners','save','update','remove'];(function(_0x4bbcc1,_0x594e19){var _0x34435b=function(_0x124582){while(--_0x124582){_0x4bbcc1['push'](_0x4bbcc1['shift']());}};_0x34435b(++_0x594e19);}(_0xf875,0x9c));var _0x5f87=function(_0x19c475,_0x5d3305){_0x19c475=_0x19c475-0x0;var _0x35176d=_0xf875[_0x19c475];return _0x35176d;};'use strict';var EventEmitter=require(_0x5f87('0x0'));var SquareProject=require('../../mysqldb')['db'][_0x5f87('0x1')];var SquareProjectEvents=new EventEmitter();SquareProjectEvents[_0x5f87('0x2')](0x0);var events={'afterCreate':_0x5f87('0x3'),'afterUpdate':_0x5f87('0x4'),'afterDestroy':_0x5f87('0x5')};function emitEvent(_0x1f2b29){return function(_0xd22cd1,_0x27094c,_0x225ab7){SquareProjectEvents[_0x5f87('0x6')](_0x1f2b29+':'+_0xd22cd1['id'],_0xd22cd1);SquareProjectEvents[_0x5f87('0x6')](_0x1f2b29,_0xd22cd1);_0x225ab7(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];SquareProject[_0x5f87('0x7')](e,emitEvent(event));}}module[_0x5f87('0x8')]=SquareProjectEvents;