Built motion from commit da617fac.|2.6.6
[motion2.git] / server / services / routing / server / index.js
index 0f663c2..bdf9ec8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf725=['busyQueue','end','QueueReport','update','UserId','message\x20is\x20empty','busy','stack','hasOwnProperty','capacity','CurrentCapacity','values','chatQueues','available','loggedIn','name','paused','mailQueues','waiting','openchannelQueues','smsQueues','faxQueues','whatsappQueues','mailQueuesWaitingInteractions','openchannelQueuesWaitingInteractions','smsQueuesWaitingInteractions','faxQueuesWaitingInteractions','http','127.0.0.1','log','Routing\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!','RPC\x20listening\x20on\x20port:','lodash','util','path','jayson/promise','bluebird','uuid','../../../config/environment','../../../config/logger','routing','../rpc/openchannelQueueReport','../rpc/chatQueueReport','../rpc/smsQueueReport','../rpc/faxQueueReport','../rpc/whatsappQueueReport','../lib/rule-engine','%s.%s.%s','isNil','IntervalId','Intervals','map','interval','listen','rules','channel','message','interaction','applications','length','join','app','.js','toLowerCase','autoreply','appdata','split','mail','push','slice','amazonlex','tag','format','%s:%s:%s','./interval','condition','intervals','./applications/','consequence','priority','Push\x20new\x20rule','\x20|\x20','error','Please\x20create\x20a\x20new\x20file\x20under','execute','info','Applications\x20executed','stringify','matchPath','emit','complete','routing\x20is\x20empty','agent','agents'];(function(_0x51426b,_0x56069c){var _0xb53cc3=function(_0x24363c){while(--_0x24363c){_0x51426b['push'](_0x51426b['shift']());}};_0xb53cc3(++_0x56069c);}(_0xf725,0x7e));var _0x5f72=function(_0x1b536b,_0x12a816){_0x1b536b=_0x1b536b-0x0;var _0x1aca27=_0xf725[_0x1b536b];return _0x1aca27;};'use strict';var _=require(_0x5f72('0x0'));var util=require(_0x5f72('0x1'));var path=require(_0x5f72('0x2'));var fs=require('fs');var jayson=require(_0x5f72('0x3'));var BPromise=require(_0x5f72('0x4'));var uuid=require(_0x5f72('0x5'));var config=require(_0x5f72('0x6'));var logger=require(_0x5f72('0x7'))(_0x5f72('0x8'));var rpc={'openchannelQueueReport':require(_0x5f72('0x9')),'mailQueueReport':require('../rpc/mailQueueReport'),'chatQueueReport':require(_0x5f72('0xa')),'smsQueueReport':require(_0x5f72('0xb')),'faxQueueReport':require(_0x5f72('0xc')),'whatsappQueueReport':require(_0x5f72('0xd'))};var RuleEngine=require(_0x5f72('0xe'));function getId(_0x4961d1,_0x158aa3,_0x523365){return util['format'](_0x5f72('0xf'),_0x4961d1,_0x158aa3||0x0,_0x523365||0x0);}function getIntervals(_0x3f189d,_0x5b74cf){var _0x994d2e=[];if(!_[_0x5f72('0x10')](_0x5b74cf['IntervalId'])&&!_[_0x5f72('0x10')](_0x3f189d[_0x5b74cf[_0x5f72('0x11')]])&&!_[_0x5f72('0x10')](_0x3f189d[_0x5b74cf[_0x5f72('0x11')]][_0x5f72('0x12')])){_0x994d2e=_[_0x5f72('0x13')](_0x3f189d[_0x5b74cf[_0x5f72('0x11')]]['Intervals'],_0x5f72('0x14'));}else if(!_[_0x5f72('0x10')](_0x5b74cf[_0x5f72('0x14')])){_0x994d2e=[_0x5b74cf[_0x5f72('0x14')]];}return _0x994d2e;}exports[_0x5f72('0x15')]=function(_0x57007a){_0x57007a[_0x5f72('0x16')]={};return new BPromise(function(_0x4f81e9,_0x50f8c8){var _0x1665be={'Start':function(_0x5a036c){var _0x3267a=this;return new Promise(function(_0x4adc76,_0x317eed){if(_0x5a036c){try{var _0x4e0c32=[];var _0x44893b=getId(_0x5a036c[_0x5f72('0x17')],_0x5a036c['message']?_0x5a036c[_0x5f72('0x18')]['id']:0x0,_0x5a036c[_0x5f72('0x19')]?_0x5a036c[_0x5f72('0x19')]['id']:0x0);if(_0x5a036c['applications']&&_['isArray'](_0x5a036c['applications'])&&_0x5a036c[_0x5f72('0x1a')][_0x5f72('0x1b')]){for(var _0x269dae=0x0;_0x269dae<_0x5a036c[_0x5f72('0x1a')][_0x5f72('0x1b')];_0x269dae+=0x1){var _0x16b13e=_0x5a036c[_0x5f72('0x1a')][_0x269dae];if(fs['existsSync'](path[_0x5f72('0x1c')](__dirname,_0x5f72('0x1a'),_0x16b13e[_0x5f72('0x1d')]+_0x5f72('0x1e')))){var _0x471a9c=[];switch(_0x16b13e[_0x5f72('0x1d')][_0x5f72('0x1f')]()){case _0x5f72('0x20'):var _0x27b1f6=_0x16b13e[_0x5f72('0x21')][_0x5f72('0x22')](',');if(_0x5a036c['channel']===_0x5f72('0x23')){_0x471a9c[_0x5f72('0x24')](_0x27b1f6[0x0]);_0x471a9c[_0x5f72('0x24')](_0x27b1f6[0x1]);_0x471a9c[_0x5f72('0x24')](_0x27b1f6['slice'](0x2,_0x27b1f6[_0x5f72('0x1b')])[_0x5f72('0x1c')](','));}else{_0x471a9c['push'](_0x27b1f6[0x0]);_0x471a9c[_0x5f72('0x24')](_0x27b1f6[_0x5f72('0x25')](0x1,_0x27b1f6[_0x5f72('0x1b')])['join'](','));}break;case'dialogflow':var _0x3d4cfe=_0x16b13e[_0x5f72('0x21')][_0x5f72('0x22')](',');_0x471a9c[_0x5f72('0x24')](_0x3d4cfe[0x0]);_0x471a9c[_0x5f72('0x24')](_0x3d4cfe[0x1]);_0x471a9c[_0x5f72('0x24')](_0x3d4cfe[_0x5f72('0x25')](0x2,_0x3d4cfe['length'])[_0x5f72('0x1c')](','));break;case'dialogflowv2':var _0xc8ca5a=_0x16b13e[_0x5f72('0x21')][_0x5f72('0x22')](',');_0x471a9c[_0x5f72('0x24')](_0xc8ca5a[0x0]);_0x471a9c[_0x5f72('0x24')](_0xc8ca5a[0x1]);_0x471a9c['push'](_0xc8ca5a[0x2]);_0x471a9c['push'](_0xc8ca5a[0x3]);_0x471a9c[_0x5f72('0x24')](_0xc8ca5a[_0x5f72('0x25')](0x4,_0xc8ca5a[_0x5f72('0x1b')])[_0x5f72('0x1c')](','));break;case _0x5f72('0x26'):var _0x7ed167=_0x16b13e[_0x5f72('0x21')]['split'](',');_0x471a9c[_0x5f72('0x24')](_0x7ed167[0x0]);_0x471a9c[_0x5f72('0x24')](_0x7ed167[0x1]);_0x471a9c[_0x5f72('0x24')](_0x7ed167[0x2]);_0x471a9c[_0x5f72('0x24')](_0x7ed167[0x3]);_0x471a9c[_0x5f72('0x24')](_0x7ed167['slice'](0x4,_0x7ed167[_0x5f72('0x1b')])[_0x5f72('0x1c')](','));break;case _0x5f72('0x18'):_0x471a9c[_0x5f72('0x24')](_0x16b13e[_0x5f72('0x21')]);break;case _0x5f72('0x27'):_0x471a9c['push'](_0x16b13e['TagId']);_0x471a9c[_0x5f72('0x24')](_0x16b13e[_0x5f72('0x21')]);break;default:_0x471a9c=_['isNil'](_0x16b13e[_0x5f72('0x21')])?[]:_0x16b13e[_0x5f72('0x21')][_0x5f72('0x22')](',');}var _0xf15ac8={'id':util[_0x5f72('0x28')](_0x5f72('0x29'),_0x44893b,_0x16b13e['id'],_0x16b13e[_0x5f72('0x1d')]),'condition':require(_0x5f72('0x2a'))[_0x5f72('0x2b')](_0x44893b,getIntervals(_0x57007a[_0x5f72('0x2c')],_0x16b13e),_0x57007a),'consequence':require(_0x5f72('0x2d')+_0x16b13e[_0x5f72('0x1d')])[_0x5f72('0x2e')](_0x44893b,_0x471a9c,_0x57007a,_0x5a036c),'p':_0x16b13e[_0x5f72('0x2f')]||0x0};logger['info'](_0x5f72('0x30'),_0xf15ac8['id'],'on\x20interval',getIntervals(_0x57007a['intervals'],_0x16b13e)[_0x5f72('0x1c')](_0x5f72('0x31')));_0x4e0c32[_0x5f72('0x24')](_0xf15ac8);}else{logger[_0x5f72('0x32')](_0x5f72('0x33'),path[_0x5f72('0x1c')](__dirname,'applications',_0x16b13e[_0x5f72('0x1d')]+_0x5f72('0x1e')));}}_0x57007a[_0x5f72('0x16')][_0x44893b]=new RuleEngine(_0x4e0c32);_0x57007a[_0x5f72('0x16')][_0x44893b][_0x5f72('0x34')](_0x5a036c,function(_0xccfc5d){logger[_0x5f72('0x35')](_0x5f72('0x36'),JSON[_0x5f72('0x37')](_0xccfc5d[_0x5f72('0x38')]));if(_0x57007a[_0x5f72('0x16')][_0x44893b]){_0x57007a[_0x5f72('0x16')][_0x44893b][_0x5f72('0x39')](_0x5f72('0x3a'));}});return _0x4adc76({'code':0xc8,'message':_0x5a036c});}else{logger[_0x5f72('0x35')]('No\x20applications\x20to\x20execute');return _0x4adc76({'code':0xc8,'message':_0x5a036c});}}catch(_0x594bb4){logger[_0x5f72('0x32')](_0x594bb4['stack']);return _0x317eed(_0x3267a['error'](0x1f4,_0x594bb4));}}return _0x317eed(_0x5f72('0x3b'));});},'AcceptMessage':function(_0x71e8e7){var _0x57d320=this;return new Promise(function(_0x3f0f8d,_0x42298c){if(_0x71e8e7['agent']&&_0x71e8e7[_0x5f72('0x3c')]['id']){if(_0x57007a[_0x5f72('0x3d')][_0x71e8e7[_0x5f72('0x3c')]['id']]){_0x57007a[_0x5f72('0x3d')][_0x71e8e7['agent']['id']]['busy']=![];_0x57007a[_0x5f72('0x3d')][_0x71e8e7[_0x5f72('0x3c')]['id']][_0x5f72('0x3e')]=undefined;}}if(_0x71e8e7[_0x5f72('0x18')]&&_0x71e8e7[_0x5f72('0x18')]['id']){try{var _0x6be017=getId(_0x71e8e7[_0x5f72('0x17')],_0x71e8e7['message']?_0x71e8e7[_0x5f72('0x18')]['id']:0x0,_0x71e8e7[_0x5f72('0x19')]?_0x71e8e7[_0x5f72('0x19')]['id']:0x0);if(_0x57007a[_0x5f72('0x16')][_0x6be017]){_0x57007a['rules'][_0x6be017][_0x5f72('0x39')](_0x5f72('0x3f'));if(rpc[_0x71e8e7[_0x5f72('0x17')]+_0x5f72('0x40')]){rpc[_0x71e8e7['channel']+_0x5f72('0x40')][_0x5f72('0x41')](_0x6be017,{'UserId':_0x71e8e7[_0x5f72('0x18')][_0x5f72('0x42')]})['catch'](function(_0x942c55){logger[_0x5f72('0x32')]('error\x20update\x20queue\x20report');});}}return _0x3f0f8d({'code':0xc8,'message':_0x71e8e7});}catch(_0x1911b0){logger[_0x5f72('0x32')](_0x1911b0['stack']);return _0x42298c(_0x57d320[_0x5f72('0x32')](0x1f4,_0x1911b0));}}logger[_0x5f72('0x32')](_0x5f72('0x43'));return _0x42298c(_0x57d320['error'](0x1f4,_0x5f72('0x43')));});},'RejectMessage':function(_0x5efa48){var _0x30a9b6=this;return new Promise(function(_0x355e23,_0x53e8d0){if(_0x5efa48[_0x5f72('0x3c')]&&_0x5efa48[_0x5f72('0x3c')]['id']){try{if(_0x57007a[_0x5f72('0x3d')][_0x5efa48[_0x5f72('0x3c')]['id']]){_0x57007a['agents'][_0x5efa48[_0x5f72('0x3c')]['id']][_0x5f72('0x44')]=![];_0x57007a[_0x5f72('0x3d')][_0x5efa48[_0x5f72('0x3c')]['id']]['busyQueue']=undefined;}return _0x355e23({'code':0xc8,'message':_0x5efa48});}catch(_0x16a452){logger['error'](_0x16a452[_0x5f72('0x45')]);return _0x53e8d0(_0x30a9b6[_0x5f72('0x32')](0x1f4,_0x16a452));}}logger[_0x5f72('0x32')](_0x5f72('0x43'));return _0x53e8d0(_0x30a9b6[_0x5f72('0x32')](0x1f4,_0x5f72('0x43')));});},'AbandonInteraction':function(_0x28008c){var _0x35116c=this;return new Promise(function(_0xfab233,_0x1d4a2f){if(_0x28008c['channel']&&_0x28008c[_0x5f72('0x19')]&&_0x28008c[_0x5f72('0x19')]['id']){try{var _0x5c5d94=getId(_0x28008c[_0x5f72('0x17')],_0x28008c[_0x5f72('0x18')]?_0x28008c['message']['id']:0x0,_0x28008c[_0x5f72('0x19')]?_0x28008c[_0x5f72('0x19')]['id']:0x0);if(_0x57007a[_0x5f72('0x16')][_0x5c5d94]){_0x57007a[_0x5f72('0x16')][_0x5c5d94][_0x5f72('0x39')]('end');}return _0xfab233({'code':0xc8,'message':_0x28008c});}catch(_0x540144){logger[_0x5f72('0x32')](_0x540144[_0x5f72('0x45')]);return _0x1d4a2f(_0x35116c[_0x5f72('0x32')](0x1f4,_0x540144));}}logger['error'](_0x5f72('0x43'));return _0x1d4a2f(_0x35116c[_0x5f72('0x32')](0x1f4,_0x5f72('0x43')));});},'AgentCapacity':function(_0x587edd){var _0x397b2a=this;return new Promise(function(_0x241231,_0x5e0fd9){if(_0x57007a['agents'][_0x5f72('0x46')](_0x587edd['id'])){for(var _0x57655b in _0x587edd['capacity']){if(_0x587edd[_0x5f72('0x47')][_0x5f72('0x46')](_0x57655b)){if(_0x57007a[_0x5f72('0x3d')][_0x587edd['id']][_0x5f72('0x46')](_0x57655b+_0x5f72('0x48'))){_0x57007a[_0x5f72('0x3d')][_0x587edd['id']][_0x57655b+_0x5f72('0x48')]=parseInt(_0x587edd['capacity'][_0x57655b],0xa);}}}_0x57007a[_0x5f72('0x3d')][_0x587edd['id']]['updateRealtime']();return _0x241231({'code':0xc8,'message':_0x57007a[_0x5f72('0x3d')][_0x587edd['id']]});}else{return _0x5e0fd9(_0x397b2a[_0x5f72('0x32')](0x1f4,'agent\x20not\x20found'));}});},'Agents':function(_0x4c3930){return new Promise(function(_0x2995dc,_0x269f23){var _0x39036d=_[_0x5f72('0x49')](_0x57007a['agents']);_0x2995dc({'count':_0x39036d[_0x5f72('0x1b')],'rows':_0x39036d});});},'ChatQueues':function(_0x1db15b){return new Promise(function(_0x14e20b,_0x48cae9){var _0x12a464=[];for(var _0x29113a in _0x57007a[_0x5f72('0x4a')]){if(_0x57007a[_0x5f72('0x4a')][_0x5f72('0x46')](_0x29113a)){var _0x36774e=_0x57007a[_0x5f72('0x4a')][_0x29113a];var _0x15e9a5={'id':_0x36774e['id'],'available':_0x36774e[_0x5f72('0x4b')],'loggedIn':_0x36774e[_0x5f72('0x4c')],'name':_0x36774e[_0x5f72('0x4d')],'paused':_0x36774e[_0x5f72('0x4e')],'waiting':_0x36774e['waiting']};_0x12a464[_0x5f72('0x24')](_0x15e9a5);}}_0x14e20b({'count':_0x12a464[_0x5f72('0x1b')],'rows':_0x12a464});});},'MailQueues':function(_0x27b9d7){return new Promise(function(_0x339a8d,_0xf1d356){var _0x39bc0e=[];for(var _0x55daf6 in _0x57007a[_0x5f72('0x4f')]){if(_0x57007a[_0x5f72('0x4f')][_0x5f72('0x46')](_0x55daf6)){var _0x419279=_0x57007a['mailQueues'][_0x55daf6];var _0x306c75={'id':_0x419279['id'],'available':_0x419279['available'],'loggedIn':_0x419279[_0x5f72('0x4c')],'name':_0x419279[_0x5f72('0x4d')],'paused':_0x419279[_0x5f72('0x4e')],'waiting':_0x419279[_0x5f72('0x50')]};_0x39bc0e['push'](_0x306c75);}}_0x339a8d({'count':_0x39bc0e[_0x5f72('0x1b')],'rows':_0x39bc0e});});},'OpenchannelQueues':function(_0x86b9a){return new Promise(function(_0x23d8c2,_0xb07770){var _0x59af10=[];for(var _0x50bd1a in _0x57007a[_0x5f72('0x51')]){if(_0x57007a['openchannelQueues']['hasOwnProperty'](_0x50bd1a)){var _0x130e4b=_0x57007a[_0x5f72('0x51')][_0x50bd1a];var _0x2a5dcb={'id':_0x130e4b['id'],'available':_0x130e4b['available'],'loggedIn':_0x130e4b[_0x5f72('0x4c')],'name':_0x130e4b[_0x5f72('0x4d')],'paused':_0x130e4b[_0x5f72('0x4e')],'waiting':_0x130e4b[_0x5f72('0x50')]};_0x59af10[_0x5f72('0x24')](_0x2a5dcb);}}_0x23d8c2({'count':_0x59af10[_0x5f72('0x1b')],'rows':_0x59af10});});},'SmsQueues':function(_0x342a31){return new Promise(function(_0x2475e9,_0x2369ec){var _0x24aa1e=[];for(var _0x196482 in _0x57007a[_0x5f72('0x52')]){if(_0x57007a[_0x5f72('0x52')]['hasOwnProperty'](_0x196482)){var _0x1c0ba1=_0x57007a[_0x5f72('0x52')][_0x196482];var _0x3753b5={'id':_0x1c0ba1['id'],'available':_0x1c0ba1['available'],'loggedIn':_0x1c0ba1[_0x5f72('0x4c')],'name':_0x1c0ba1['name'],'paused':_0x1c0ba1['paused'],'waiting':_0x1c0ba1['waiting']};_0x24aa1e['push'](_0x3753b5);}}_0x2475e9({'count':_0x24aa1e['length'],'rows':_0x24aa1e});});},'FaxQueues':function(_0x1cd273){return new Promise(function(_0x4cc70c,_0x551736){var _0x2a846b=[];for(var _0x2404fd in _0x57007a[_0x5f72('0x53')]){if(_0x57007a[_0x5f72('0x53')][_0x5f72('0x46')](_0x2404fd)){var _0x3352c5=_0x57007a[_0x5f72('0x53')][_0x2404fd];var _0x23ebb4={'id':_0x3352c5['id'],'available':_0x3352c5['available'],'loggedIn':_0x3352c5[_0x5f72('0x4c')],'name':_0x3352c5[_0x5f72('0x4d')],'paused':_0x3352c5[_0x5f72('0x4e')],'waiting':_0x3352c5[_0x5f72('0x50')]};_0x2a846b[_0x5f72('0x24')](_0x23ebb4);}}_0x4cc70c({'count':_0x2a846b[_0x5f72('0x1b')],'rows':_0x2a846b});});},'WhatsappQueues':function(_0x1da7de){return new Promise(function(_0x3317d9,_0x251883){var _0x14b72b=[];for(var _0x18e110 in _0x57007a[_0x5f72('0x54')]){if(_0x57007a[_0x5f72('0x54')][_0x5f72('0x46')](_0x18e110)){var _0x1d5d04=_0x57007a['whatsappQueues'][_0x18e110];var _0x164fba={'id':_0x1d5d04['id'],'available':_0x1d5d04[_0x5f72('0x4b')],'loggedIn':_0x1d5d04[_0x5f72('0x4c')],'name':_0x1d5d04['name'],'paused':_0x1d5d04[_0x5f72('0x4e')],'waiting':_0x1d5d04['waiting']};_0x14b72b[_0x5f72('0x24')](_0x164fba);}}_0x3317d9({'count':_0x14b72b[_0x5f72('0x1b')],'rows':_0x14b72b});});},'ChatQueuesWaitingInteractions':function(_0x43cfc0){return new Promise(function(_0x4281b7,_0x4ee2f6){var _0x8886b4=_[_0x5f72('0x49')](_0x57007a['chatQueuesWaitingInteractions']);_0x4281b7({'count':_0x8886b4[_0x5f72('0x1b')],'rows':_0x8886b4});});},'MailQueuesWaitingInteractions':function(_0x2ee75d){return new Promise(function(_0x3fb18b,_0x2cc457){var _0x2500d1=_[_0x5f72('0x49')](_0x57007a[_0x5f72('0x55')]);_0x3fb18b({'count':_0x2500d1[_0x5f72('0x1b')],'rows':_0x2500d1});});},'OpenchannelQueuesWaitingInteractions':function(_0x5ba635){return new Promise(function(_0x71d3c6,_0x653bd0){var _0xaaae35=_[_0x5f72('0x49')](_0x57007a[_0x5f72('0x56')]);_0x71d3c6({'count':_0xaaae35[_0x5f72('0x1b')],'rows':_0xaaae35});});},'SmsQueuesWaitingInteractions':function(_0x139175){return new Promise(function(_0x28e4e8,_0x50d2ae){var _0x2f1346=_[_0x5f72('0x49')](_0x57007a[_0x5f72('0x57')]);_0x28e4e8({'count':_0x2f1346['length'],'rows':_0x2f1346});});},'FaxQueuesWaitingInteractions':function(_0x3b2cff){return new Promise(function(_0xb078a3,_0x2aff96){var _0x54b9cd=_[_0x5f72('0x49')](_0x57007a[_0x5f72('0x58')]);_0xb078a3({'count':_0x54b9cd[_0x5f72('0x1b')],'rows':_0x54b9cd});});},'WhatsappQueuesWaitingInteractions':function(_0x3afc6a){return new Promise(function(_0xc929da,_0x310930){var _0x43064f=_['values'](_0x57007a['whatsappQueuesWaitingInteractions']);_0xc929da({'count':_0x43064f['length'],'rows':_0x43064f});});}};var _0x4d2539=jayson['server'](_0x1665be)[_0x5f72('0x59')]();_0x4d2539['on']('error',function(_0xa0db47){logger[_0x5f72('0x32')](JSON[_0x5f72('0x37')](_0xa0db47));return _0x50f8c8(_0xa0db47);});_0x4d2539[_0x5f72('0x15')](0x232c,_0x5f72('0x5a'),function(){console[_0x5f72('0x5b')](_0x5f72('0x5c'),0x232c);return _0x4f81e9(_0x5f72('0x5d')+0x232c);});});};
\ No newline at end of file
+var _0x9b87=['routing\x20is\x20empty','agent','agents','busyQueue','channel','end','QueueReport','error\x20update\x20queue\x20report','message\x20is\x20empty','hasOwnProperty','capacity','CurrentCapacity','updateRealtime','agent\x20not\x20found','find','chatQueues','loggedIn','name','waiting','mailQueues','available','paused','openchannelQueues','smsQueues','faxQueues','whatsappQueues','values','chatQueuesWaitingInteractions','mailQueuesWaitingInteractions','openchannelQueuesWaitingInteractions','smsQueuesWaitingInteractions','faxQueuesWaitingInteractions','whatsappQueuesWaitingInteractions','server','http','127.0.0.1','Routing\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!','RPC\x20listening\x20on\x20port:','lodash','util','path','jayson/promise','bluebird','./applications/utils','../../../config/logger','routing','../rpc/openchannelQueueReport','../rpc/mailQueueReport','../rpc/chatQueueReport','../rpc/smsQueueReport','../rpc/faxQueueReport','../rpc/whatsappQueueReport','../lib/rule-engine','IntervalId','isNil','Intervals','map','interval','listen','rules','message','interaction','applications','isArray','length','existsSync','join','app','.js','toLowerCase','autoreply','appdata','split','mail','push','slice','dialogflow','dialogflowv2','amazonlex','tag','tvox','getMustacheRender','account','ChatWebsiteId','format','%s:%s:%s','./interval','condition','intervals','./applications/','consequence','priority','Push\x20new\x20rule','on\x20interval','\x20|\x20','error','Please\x20create\x20a\x20new\x20file\x20under','execute','info','Applications\x20executed','emit','complete','No\x20applications\x20to\x20execute','stack'];(function(_0x1a8eb0,_0x4380f4){var _0xec7ffc=function(_0x3ca41f){while(--_0x3ca41f){_0x1a8eb0['push'](_0x1a8eb0['shift']());}};_0xec7ffc(++_0x4380f4);}(_0x9b87,0x8e));var _0x79b8=function(_0x27bf93,_0x70e684){_0x27bf93=_0x27bf93-0x0;var _0x33f008=_0x9b87[_0x27bf93];return _0x33f008;};'use strict';var _=require(_0x79b8('0x0'));var util=require(_0x79b8('0x1'));var path=require(_0x79b8('0x2'));var fs=require('fs');var jayson=require(_0x79b8('0x3'));var BPromise=require(_0x79b8('0x4'));var utils=require(_0x79b8('0x5'));var logger=require(_0x79b8('0x6'))(_0x79b8('0x7'));var rpc={'openchannelQueueReport':require(_0x79b8('0x8')),'mailQueueReport':require(_0x79b8('0x9')),'chatQueueReport':require(_0x79b8('0xa')),'smsQueueReport':require(_0x79b8('0xb')),'faxQueueReport':require(_0x79b8('0xc')),'whatsappQueueReport':require(_0x79b8('0xd'))};var RuleEngine=require(_0x79b8('0xe'));function getId(_0xf5e0f2,_0x5e10fe,_0x4e0dd8){return util['format']('%s.%s.%s',_0xf5e0f2,_0x5e10fe||0x0,_0x4e0dd8||0x0);}function getIntervals(_0x1caae2,_0x317e29){var _0x2f3453=[];if(!_['isNil'](_0x317e29[_0x79b8('0xf')])&&!_[_0x79b8('0x10')](_0x1caae2[_0x317e29[_0x79b8('0xf')]])&&!_['isNil'](_0x1caae2[_0x317e29['IntervalId']][_0x79b8('0x11')])){_0x2f3453=_[_0x79b8('0x12')](_0x1caae2[_0x317e29[_0x79b8('0xf')]][_0x79b8('0x11')],_0x79b8('0x13'));}else if(!_[_0x79b8('0x10')](_0x317e29[_0x79b8('0x13')])){_0x2f3453=[_0x317e29[_0x79b8('0x13')]];}return _0x2f3453;}exports[_0x79b8('0x14')]=function(_0x1614fe){_0x1614fe[_0x79b8('0x15')]={};return new BPromise(function(_0x59e229,_0x150fb7){var _0x4d5cd7={'Start':function(_0x565b54){var _0x3142e9=this;return new Promise(function(_0x21aae0,_0x57a248){if(_0x565b54){try{var _0x5ddab5=[];var _0x3e3de3=getId(_0x565b54['channel'],_0x565b54['message']?_0x565b54[_0x79b8('0x16')]['id']:0x0,_0x565b54[_0x79b8('0x17')]?_0x565b54[_0x79b8('0x17')]['id']:0x0);if(_0x565b54[_0x79b8('0x18')]&&_[_0x79b8('0x19')](_0x565b54[_0x79b8('0x18')])&&_0x565b54['applications'][_0x79b8('0x1a')]){for(var _0x5bdfb9=0x0;_0x5bdfb9<_0x565b54['applications'][_0x79b8('0x1a')];_0x5bdfb9+=0x1){var _0x131d04=_0x565b54[_0x79b8('0x18')][_0x5bdfb9];if(fs[_0x79b8('0x1b')](path[_0x79b8('0x1c')](__dirname,_0x79b8('0x18'),_0x131d04[_0x79b8('0x1d')]+_0x79b8('0x1e')))){var _0x2e1a65=[];switch(_0x131d04['app'][_0x79b8('0x1f')]()){case _0x79b8('0x20'):var _0x4dbfcf=_0x131d04[_0x79b8('0x21')][_0x79b8('0x22')](',');if(_0x565b54['channel']===_0x79b8('0x23')){_0x2e1a65['push'](_0x4dbfcf[0x0]);_0x2e1a65['push'](_0x4dbfcf[0x1]);_0x2e1a65[_0x79b8('0x24')](_0x4dbfcf[_0x79b8('0x25')](0x2,_0x4dbfcf[_0x79b8('0x1a')])[_0x79b8('0x1c')](','));}else{_0x2e1a65[_0x79b8('0x24')](_0x4dbfcf[0x0]);_0x2e1a65['push'](_0x4dbfcf[_0x79b8('0x25')](0x1,_0x4dbfcf[_0x79b8('0x1a')])[_0x79b8('0x1c')](','));}break;case _0x79b8('0x26'):var _0x4bbbf8=_0x131d04[_0x79b8('0x21')][_0x79b8('0x22')](',');_0x2e1a65[_0x79b8('0x24')](_0x4bbbf8[0x0]);_0x2e1a65['push'](_0x4bbbf8[0x1]);_0x2e1a65[_0x79b8('0x24')](_0x4bbbf8[_0x79b8('0x25')](0x2,_0x4bbbf8[_0x79b8('0x1a')])[_0x79b8('0x1c')](','));break;case _0x79b8('0x27'):var _0x23483f=_0x131d04['appdata'][_0x79b8('0x22')](',');_0x2e1a65['push'](_0x23483f[0x0]);_0x2e1a65[_0x79b8('0x24')](_0x23483f[0x1]);_0x2e1a65['push'](_0x23483f[0x2]);_0x2e1a65[_0x79b8('0x24')](_0x23483f[0x3]);_0x2e1a65[_0x79b8('0x24')](_0x23483f[_0x79b8('0x25')](0x4,_0x23483f['length'])[_0x79b8('0x1c')](','));break;case _0x79b8('0x28'):var _0x252472=_0x131d04[_0x79b8('0x21')]['split'](',');_0x2e1a65[_0x79b8('0x24')](_0x252472[0x0]);_0x2e1a65['push'](_0x252472[0x1]);_0x2e1a65['push'](_0x252472[0x2]);_0x2e1a65[_0x79b8('0x24')](_0x252472[0x3]);_0x2e1a65[_0x79b8('0x24')](_0x252472['slice'](0x4,_0x252472[_0x79b8('0x1a')])['join'](','));break;case'message':_0x2e1a65[_0x79b8('0x24')](_0x131d04['appdata']);break;case _0x79b8('0x29'):_0x2e1a65[_0x79b8('0x24')](_0x131d04['TagId']);_0x2e1a65[_0x79b8('0x24')](_0x131d04[_0x79b8('0x21')]);break;case _0x79b8('0x2a'):var _0x1e5bd9=utils[_0x79b8('0x2b')](_0x565b54[_0x79b8('0x2c')]['notificationTemplate'],_0x565b54);var _0x2ed1a3=_0x131d04[_0x79b8('0x21')][_0x79b8('0x22')](',');_0x2e1a65[_0x79b8('0x24')](_0x2ed1a3[0x0]);_0x2e1a65[_0x79b8('0x24')](_0x2ed1a3[0x1]);_0x2e1a65[_0x79b8('0x24')](_0x2ed1a3[0x2]);_0x2e1a65[_0x79b8('0x24')](_0x2ed1a3[0x3]);_0x2e1a65[_0x79b8('0x24')](_0x2ed1a3[0x4]);_0x2e1a65[_0x79b8('0x24')](_0x2ed1a3[0x5]);_0x2e1a65[_0x79b8('0x24')](_0x2ed1a3[0x6]);_0x2e1a65[_0x79b8('0x24')](_0x2ed1a3[0x7]);_0x2e1a65['push'](_0x2ed1a3[0x8]);_0x2e1a65[_0x79b8('0x24')](_0x2ed1a3[0x9]);_0x2e1a65[_0x79b8('0x24')](_0x2ed1a3[0xa]);_0x2e1a65[_0x79b8('0x24')](_0x565b54['interaction']['id']);_0x2e1a65[_0x79b8('0x24')](_0x565b54[_0x79b8('0x16')]['id']);_0x2e1a65[_0x79b8('0x24')](_0x131d04[_0x79b8('0x2d')]);_0x2e1a65[_0x79b8('0x24')](_0x565b54[_0x79b8('0x17')]['ContactId']);_0x2e1a65[_0x79b8('0x24')](_0x565b54['body']['body']);_0x2e1a65[_0x79b8('0x24')](_0x1e5bd9);break;default:_0x2e1a65=_['isNil'](_0x131d04['appdata'])?[]:_0x131d04[_0x79b8('0x21')][_0x79b8('0x22')](',');}var _0x422c56={'id':util[_0x79b8('0x2e')](_0x79b8('0x2f'),_0x3e3de3,_0x131d04['id'],_0x131d04[_0x79b8('0x1d')]),'condition':require(_0x79b8('0x30'))[_0x79b8('0x31')](_0x3e3de3,getIntervals(_0x1614fe[_0x79b8('0x32')],_0x131d04),_0x1614fe),'consequence':require(_0x79b8('0x33')+_0x131d04[_0x79b8('0x1d')])[_0x79b8('0x34')](_0x3e3de3,_0x2e1a65,_0x1614fe,_0x565b54),'p':_0x131d04[_0x79b8('0x35')]||0x0};logger['info'](_0x79b8('0x36'),_0x422c56['id'],_0x79b8('0x37'),getIntervals(_0x1614fe['intervals'],_0x131d04)[_0x79b8('0x1c')](_0x79b8('0x38')));_0x5ddab5['push'](_0x422c56);}else{logger[_0x79b8('0x39')](_0x79b8('0x3a'),path[_0x79b8('0x1c')](__dirname,_0x79b8('0x18'),_0x131d04[_0x79b8('0x1d')]+_0x79b8('0x1e')));}}_0x1614fe[_0x79b8('0x15')][_0x3e3de3]=new RuleEngine(_0x5ddab5);_0x1614fe[_0x79b8('0x15')][_0x3e3de3][_0x79b8('0x3b')](_0x565b54,function(_0x37ca43){logger[_0x79b8('0x3c')](_0x79b8('0x3d'),JSON['stringify'](_0x37ca43['matchPath']));if(_0x1614fe[_0x79b8('0x15')][_0x3e3de3]){_0x1614fe[_0x79b8('0x15')][_0x3e3de3][_0x79b8('0x3e')](_0x79b8('0x3f'));}});return _0x21aae0({'code':0xc8,'message':_0x565b54});}else{logger['info'](_0x79b8('0x40'));return _0x21aae0({'code':0xc8,'message':_0x565b54});}}catch(_0x45d7d7){logger[_0x79b8('0x39')](_0x45d7d7[_0x79b8('0x41')]);return _0x57a248(_0x3142e9['error'](0x1f4,_0x45d7d7));}}return _0x57a248(_0x79b8('0x42'));});},'AcceptMessage':function(_0xa52611){var _0x18176e=this;return new Promise(function(_0x24297e,_0x49d365){if(_0xa52611[_0x79b8('0x43')]&&_0xa52611[_0x79b8('0x43')]['id']){if(_0x1614fe[_0x79b8('0x44')][_0xa52611[_0x79b8('0x43')]['id']]){_0x1614fe[_0x79b8('0x44')][_0xa52611[_0x79b8('0x43')]['id']]['busy']=![];_0x1614fe[_0x79b8('0x44')][_0xa52611[_0x79b8('0x43')]['id']][_0x79b8('0x45')]=undefined;}}if(_0xa52611[_0x79b8('0x16')]&&_0xa52611['message']['id']){try{var _0x49ec63=getId(_0xa52611[_0x79b8('0x46')],_0xa52611[_0x79b8('0x16')]?_0xa52611[_0x79b8('0x16')]['id']:0x0,_0xa52611[_0x79b8('0x17')]?_0xa52611[_0x79b8('0x17')]['id']:0x0);if(_0x1614fe[_0x79b8('0x15')][_0x49ec63]){_0x1614fe[_0x79b8('0x15')][_0x49ec63][_0x79b8('0x3e')](_0x79b8('0x47'));if(rpc[_0xa52611['channel']+_0x79b8('0x48')]){rpc[_0xa52611[_0x79b8('0x46')]+_0x79b8('0x48')]['update'](_0x49ec63,{'UserId':_0xa52611[_0x79b8('0x16')]['UserId']})['catch'](function(){logger[_0x79b8('0x39')](_0x79b8('0x49'));});}}return _0x24297e({'code':0xc8,'message':_0xa52611});}catch(_0x5b4d56){logger[_0x79b8('0x39')](_0x5b4d56['stack']);return _0x49d365(_0x18176e['error'](0x1f4,_0x5b4d56));}}logger[_0x79b8('0x39')](_0x79b8('0x4a'));return _0x49d365(_0x18176e[_0x79b8('0x39')](0x1f4,_0x79b8('0x4a')));});},'RejectMessage':function(_0x2ff973){var _0xcfb9c2=this;return new Promise(function(_0x3f3ffc,_0x3d1078){if(_0x2ff973[_0x79b8('0x43')]&&_0x2ff973[_0x79b8('0x43')]['id']){try{if(_0x1614fe[_0x79b8('0x44')][_0x2ff973[_0x79b8('0x43')]['id']]){_0x1614fe[_0x79b8('0x44')][_0x2ff973[_0x79b8('0x43')]['id']]['busy']=![];_0x1614fe[_0x79b8('0x44')][_0x2ff973[_0x79b8('0x43')]['id']][_0x79b8('0x45')]=undefined;}return _0x3f3ffc({'code':0xc8,'message':_0x2ff973});}catch(_0x2bbe40){logger['error'](_0x2bbe40['stack']);return _0x3d1078(_0xcfb9c2[_0x79b8('0x39')](0x1f4,_0x2bbe40));}}logger[_0x79b8('0x39')](_0x79b8('0x4a'));return _0x3d1078(_0xcfb9c2[_0x79b8('0x39')](0x1f4,'message\x20is\x20empty'));});},'AbandonInteraction':function(_0x34e57f){var _0x2dd536=this;return new Promise(function(_0x58c737,_0x8e0f70){if(_0x34e57f[_0x79b8('0x46')]&&_0x34e57f[_0x79b8('0x17')]&&_0x34e57f['interaction']['id']){try{var _0x152a80=getId(_0x34e57f['channel'],_0x34e57f[_0x79b8('0x16')]?_0x34e57f[_0x79b8('0x16')]['id']:0x0,_0x34e57f[_0x79b8('0x17')]?_0x34e57f[_0x79b8('0x17')]['id']:0x0);if(_0x1614fe[_0x79b8('0x15')][_0x152a80]){_0x1614fe[_0x79b8('0x15')][_0x152a80][_0x79b8('0x3e')](_0x79b8('0x47'));}return _0x58c737({'code':0xc8,'message':_0x34e57f});}catch(_0xe0d55d){logger[_0x79b8('0x39')](_0xe0d55d['stack']);return _0x8e0f70(_0x2dd536[_0x79b8('0x39')](0x1f4,_0xe0d55d));}}logger['error'](_0x79b8('0x4a'));return _0x8e0f70(_0x2dd536['error'](0x1f4,_0x79b8('0x4a')));});},'AgentCapacity':function(_0x13a87f){var _0x4146b0=this;return new Promise(function(_0x20b2f3,_0x2fcd4e){if(_0x1614fe[_0x79b8('0x44')][_0x79b8('0x4b')](_0x13a87f['id'])){for(var _0x57d73d in _0x13a87f[_0x79b8('0x4c')]){if(_0x13a87f[_0x79b8('0x4c')][_0x79b8('0x4b')](_0x57d73d)){if(_0x1614fe[_0x79b8('0x44')][_0x13a87f['id']][_0x79b8('0x4b')](_0x57d73d+_0x79b8('0x4d'))){_0x1614fe['agents'][_0x13a87f['id']][_0x57d73d+_0x79b8('0x4d')]=parseInt(_0x13a87f[_0x79b8('0x4c')][_0x57d73d],0xa);}}}_0x1614fe['agents'][_0x13a87f['id']][_0x79b8('0x4e')]();return _0x20b2f3({'code':0xc8,'message':_0x1614fe['agents'][_0x13a87f['id']]});}else{return _0x2fcd4e(_0x4146b0[_0x79b8('0x39')](0x1f4,_0x79b8('0x4f')));}});},'Agents':function(_0x5bcdde){return new Promise(function(_0xecf12a){var _0x11c26a=_['values'](_0x1614fe[_0x79b8('0x44')]);if(_0x5bcdde&&_0x5bcdde['id']){var _0x4b197b=_[_0x79b8('0x50')](_0x11c26a,function(_0x5d2bfc){return _0x5d2bfc['id']===_0x5bcdde['id'];});_0xecf12a(_0x4b197b);}else{_0xecf12a({'count':_0x11c26a[_0x79b8('0x1a')],'rows':_0x11c26a});}});},'ChatQueues':function(){return new Promise(function(_0x1e101d){var _0x41f243=[];for(var _0x26722c in _0x1614fe[_0x79b8('0x51')]){if(_0x1614fe[_0x79b8('0x51')]['hasOwnProperty'](_0x26722c)){var _0x291ef1=_0x1614fe[_0x79b8('0x51')][_0x26722c];var _0x5c02a7={'id':_0x291ef1['id'],'available':_0x291ef1['available'],'loggedIn':_0x291ef1[_0x79b8('0x52')],'name':_0x291ef1[_0x79b8('0x53')],'paused':_0x291ef1['paused'],'waiting':_0x291ef1[_0x79b8('0x54')]};_0x41f243[_0x79b8('0x24')](_0x5c02a7);}}_0x1e101d({'count':_0x41f243[_0x79b8('0x1a')],'rows':_0x41f243});});},'MailQueues':function(){return new Promise(function(_0x57787f){var _0x1a15ac=[];for(var _0x1f98ea in _0x1614fe[_0x79b8('0x55')]){if(_0x1614fe[_0x79b8('0x55')][_0x79b8('0x4b')](_0x1f98ea)){var _0x441aad=_0x1614fe['mailQueues'][_0x1f98ea];var _0x33d1f6={'id':_0x441aad['id'],'available':_0x441aad[_0x79b8('0x56')],'loggedIn':_0x441aad[_0x79b8('0x52')],'name':_0x441aad['name'],'paused':_0x441aad[_0x79b8('0x57')],'waiting':_0x441aad[_0x79b8('0x54')]};_0x1a15ac[_0x79b8('0x24')](_0x33d1f6);}}_0x57787f({'count':_0x1a15ac['length'],'rows':_0x1a15ac});});},'OpenchannelQueues':function(){return new Promise(function(_0xfd5147){var _0x2e3b8c=[];for(var _0x4f47e9 in _0x1614fe['openchannelQueues']){if(_0x1614fe[_0x79b8('0x58')][_0x79b8('0x4b')](_0x4f47e9)){var _0x172532=_0x1614fe[_0x79b8('0x58')][_0x4f47e9];var _0xd39bc0={'id':_0x172532['id'],'available':_0x172532[_0x79b8('0x56')],'loggedIn':_0x172532[_0x79b8('0x52')],'name':_0x172532[_0x79b8('0x53')],'paused':_0x172532['paused'],'waiting':_0x172532[_0x79b8('0x54')]};_0x2e3b8c['push'](_0xd39bc0);}}_0xfd5147({'count':_0x2e3b8c['length'],'rows':_0x2e3b8c});});},'SmsQueues':function(){return new Promise(function(_0xbb092e){var _0x54e855=[];for(var _0x3cd784 in _0x1614fe[_0x79b8('0x59')]){if(_0x1614fe[_0x79b8('0x59')]['hasOwnProperty'](_0x3cd784)){var _0x7795d5=_0x1614fe[_0x79b8('0x59')][_0x3cd784];var _0xcd4ac5={'id':_0x7795d5['id'],'available':_0x7795d5[_0x79b8('0x56')],'loggedIn':_0x7795d5[_0x79b8('0x52')],'name':_0x7795d5[_0x79b8('0x53')],'paused':_0x7795d5[_0x79b8('0x57')],'waiting':_0x7795d5[_0x79b8('0x54')]};_0x54e855[_0x79b8('0x24')](_0xcd4ac5);}}_0xbb092e({'count':_0x54e855[_0x79b8('0x1a')],'rows':_0x54e855});});},'FaxQueues':function(){return new Promise(function(_0x3c6ad8){var _0x65f178=[];for(var _0x57c6e5 in _0x1614fe[_0x79b8('0x5a')]){if(_0x1614fe[_0x79b8('0x5a')][_0x79b8('0x4b')](_0x57c6e5)){var _0x2fda2d=_0x1614fe[_0x79b8('0x5a')][_0x57c6e5];var _0x39ef00={'id':_0x2fda2d['id'],'available':_0x2fda2d[_0x79b8('0x56')],'loggedIn':_0x2fda2d[_0x79b8('0x52')],'name':_0x2fda2d[_0x79b8('0x53')],'paused':_0x2fda2d[_0x79b8('0x57')],'waiting':_0x2fda2d[_0x79b8('0x54')]};_0x65f178['push'](_0x39ef00);}}_0x3c6ad8({'count':_0x65f178[_0x79b8('0x1a')],'rows':_0x65f178});});},'WhatsappQueues':function(){return new Promise(function(_0x4a8cd0){var _0x5b785b=[];for(var _0x211575 in _0x1614fe[_0x79b8('0x5b')]){if(_0x1614fe[_0x79b8('0x5b')][_0x79b8('0x4b')](_0x211575)){var _0x211c60=_0x1614fe[_0x79b8('0x5b')][_0x211575];var _0x233b9c={'id':_0x211c60['id'],'available':_0x211c60[_0x79b8('0x56')],'loggedIn':_0x211c60['loggedIn'],'name':_0x211c60['name'],'paused':_0x211c60['paused'],'waiting':_0x211c60[_0x79b8('0x54')]};_0x5b785b[_0x79b8('0x24')](_0x233b9c);}}_0x4a8cd0({'count':_0x5b785b[_0x79b8('0x1a')],'rows':_0x5b785b});});},'ChatQueuesWaitingInteractions':function(){return new Promise(function(_0x722630){var _0x3bbb52=_[_0x79b8('0x5c')](_0x1614fe[_0x79b8('0x5d')]);_0x722630({'count':_0x3bbb52[_0x79b8('0x1a')],'rows':_0x3bbb52});});},'MailQueuesWaitingInteractions':function(){return new Promise(function(_0x397830){var _0x5c1ca=_[_0x79b8('0x5c')](_0x1614fe[_0x79b8('0x5e')]);_0x397830({'count':_0x5c1ca['length'],'rows':_0x5c1ca});});},'OpenchannelQueuesWaitingInteractions':function(){return new Promise(function(_0x1fbf40){var _0x439006=_['values'](_0x1614fe[_0x79b8('0x5f')]);_0x1fbf40({'count':_0x439006[_0x79b8('0x1a')],'rows':_0x439006});});},'SmsQueuesWaitingInteractions':function(){return new Promise(function(_0x4208cc){var _0x371ecc=_[_0x79b8('0x5c')](_0x1614fe[_0x79b8('0x60')]);_0x4208cc({'count':_0x371ecc[_0x79b8('0x1a')],'rows':_0x371ecc});});},'FaxQueuesWaitingInteractions':function(){return new Promise(function(_0x2c7eb4){var _0x5f4420=_['values'](_0x1614fe[_0x79b8('0x61')]);_0x2c7eb4({'count':_0x5f4420[_0x79b8('0x1a')],'rows':_0x5f4420});});},'WhatsappQueuesWaitingInteractions':function(){return new Promise(function(_0x446735){var _0x1617af=_[_0x79b8('0x5c')](_0x1614fe[_0x79b8('0x62')]);_0x446735({'count':_0x1617af[_0x79b8('0x1a')],'rows':_0x1617af});});}};var _0x376fb8=jayson[_0x79b8('0x63')](_0x4d5cd7)[_0x79b8('0x64')]();_0x376fb8['on']('error',function(_0x56f946){logger['error'](JSON['stringify'](_0x56f946));return _0x150fb7(_0x56f946);});_0x376fb8[_0x79b8('0x14')](0x232c,_0x79b8('0x65'),function(){console['log'](_0x79b8('0x66'),0x232c);return _0x59e229(_0x79b8('0x67')+0x232c);});});};
\ No newline at end of file