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 _0x70c8=['exports','SquareProject','save','update','emit','hasOwnProperty','hook'];(function(_0x28b4cd,_0x573ff1){var _0x4229cc=function(_0x2ba663){while(--_0x2ba663){_0x28b4cd['push'](_0x28b4cd['shift']());}};_0x4229cc(++_0x573ff1);}(_0x70c8,0xa9));var _0x870c=function(_0xe2d6a0,_0x5d4ee2){_0xe2d6a0=_0xe2d6a0-0x0;var _0x17b9c3=_0x70c8[_0xe2d6a0];return _0x17b9c3;};'use strict';var EventEmitter=require('events');var SquareProject=require('../../mysqldb')['db'][_0x870c('0x0')];var SquareProjectEvents=new EventEmitter();SquareProjectEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x870c('0x1'),'afterUpdate':_0x870c('0x2'),'afterDestroy':'remove'};function emitEvent(_0x4ea522){return function(_0x4b64b6,_0x1007f2,_0x25f057){SquareProjectEvents[_0x870c('0x3')](_0x4ea522+':'+_0x4b64b6['id'],_0x4b64b6);SquareProjectEvents[_0x870c('0x3')](_0x4ea522,_0x4b64b6);_0x25f057(null);};}for(var e in events){if(events[_0x870c('0x4')](e)){var event=events[e];SquareProject[_0x870c('0x5')](e,emitEvent(event));}}module[_0x870c('0x6')]=SquareProjectEvents;