Built motion from commit ffdca78c.|2.6.24
[motion2.git] / server / services / routing / server / index.js
index 68a04c4..a2889f1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4d1b=['TagId','getMustacheRender','notificationTemplate','ChatWebsiteId','ContactId','body','app','./interval','condition','intervals','./applications/','priority','info','on\x20interval','\x20|\x20','Applications\x20executed','stringify','emit','complete','format','Skipped\x20routing\x20for\x20%s','No\x20applications\x20to\x20execute','error','stack','routing\x20is\x20empty','agent','agents','busy','busyQueue','end','QueueReport','update','UserId','catch','message\x20is\x20empty','capacity','hasOwnProperty','CurrentCapacity','agent\x20not\x20found','values','chatQueues','available','loggedIn','paused','waiting','mailQueues','openchannelQueues','name','faxQueues','whatsappQueues','chatQueuesWaitingInteractions','mailQueuesWaitingInteractions','openchannelQueuesWaitingInteractions','smsQueuesWaitingInteractions','faxQueuesWaitingInteractions','whatsappQueuesWaitingInteractions','http','127.0.0.1','Routing\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!','RPC\x20listening\x20on\x20port:','lodash','path','jayson/promise','bluebird','./applications/utils','../../../config/logger','../rpc/openchannelQueueReport','../rpc/mailQueueReport','../rpc/smsQueueReport','../rpc/faxQueueReport','../rpc/whatsappQueueReport','../lib/rule-engine','%s.%s.%s','isNil','IntervalId','Intervals','map','interval','listen','rules','channel','message','interaction','checkWaitingNotifications','transfer','applications','length','existsSync','toLowerCase','appdata','split','mail','push','slice','join','dialogflow','dialogflowv2','amazonlex','tag'];(function(_0x15166d,_0x3f5651){var _0x26c65d=function(_0x3f3963){while(--_0x3f3963){_0x15166d['push'](_0x15166d['shift']());}};_0x26c65d(++_0x3f5651);}(_0x4d1b,0x102));var _0xb4d1=function(_0x32a884,_0x183853){_0x32a884=_0x32a884-0x0;var _0x242f9b=_0x4d1b[_0x32a884];return _0x242f9b;};'use strict';var _=require(_0xb4d1('0x0'));var util=require('util');var path=require(_0xb4d1('0x1'));var fs=require('fs');var jayson=require(_0xb4d1('0x2'));var BPromise=require(_0xb4d1('0x3'));var utils=require(_0xb4d1('0x4'));var sUtils=require('./applications/strategy/util');var logger=require(_0xb4d1('0x5'))('routing');var rpc={'openchannelQueueReport':require(_0xb4d1('0x6')),'mailQueueReport':require(_0xb4d1('0x7')),'chatQueueReport':require('../rpc/chatQueueReport'),'smsQueueReport':require(_0xb4d1('0x8')),'faxQueueReport':require(_0xb4d1('0x9')),'whatsappQueueReport':require(_0xb4d1('0xa'))};var RuleEngine=require(_0xb4d1('0xb'));function getId(_0x49437b,_0x1e09fb,_0x205fe1){return util['format'](_0xb4d1('0xc'),_0x49437b,_0x1e09fb||0x0,_0x205fe1||0x0);}function getIntervals(_0x23c12e,_0xf3010d){var _0xfc12a6=[];if(!_[_0xb4d1('0xd')](_0xf3010d[_0xb4d1('0xe')])&&!_['isNil'](_0x23c12e[_0xf3010d[_0xb4d1('0xe')]])&&!_[_0xb4d1('0xd')](_0x23c12e[_0xf3010d[_0xb4d1('0xe')]][_0xb4d1('0xf')])){_0xfc12a6=_[_0xb4d1('0x10')](_0x23c12e[_0xf3010d[_0xb4d1('0xe')]][_0xb4d1('0xf')],_0xb4d1('0x11'));}else if(!_[_0xb4d1('0xd')](_0xf3010d[_0xb4d1('0x11')])){_0xfc12a6=[_0xf3010d[_0xb4d1('0x11')]];}return _0xfc12a6;}exports[_0xb4d1('0x12')]=function(_0x3baccd){_0x3baccd[_0xb4d1('0x13')]={};return new BPromise(function(_0x37cb4c,_0x295264){var _0x3ba994={'Start':function(_0x36c711){var _0x2599fd=this;return new Promise(function(_0x433e6d,_0x4987d1){if(_0x36c711){try{var _0x513886=[];var _0x785af3=getId(_0x36c711[_0xb4d1('0x14')],_0x36c711['message']?_0x36c711[_0xb4d1('0x15')]['id']:0x0,_0x36c711[_0xb4d1('0x16')]?_0x36c711['interaction']['id']:0x0);var _0x388798=sUtils[_0xb4d1('0x17')](_0x3baccd,_0x36c711);if(_0x36c711[_0xb4d1('0x18')]||!_0x388798&&_0x36c711['applications']&&_['isArray'](_0x36c711[_0xb4d1('0x19')])&&_0x36c711['applications']['length']){for(var _0x459615=0x0;_0x459615<_0x36c711[_0xb4d1('0x19')][_0xb4d1('0x1a')];_0x459615+=0x1){var _0x136d10=_0x36c711['applications'][_0x459615];if(fs[_0xb4d1('0x1b')](path['join'](__dirname,'applications',_0x136d10['app']+'.js'))){var _0x41fa10=[];switch(_0x136d10['app'][_0xb4d1('0x1c')]()){case'autoreply':var _0x3fe374=_0x136d10[_0xb4d1('0x1d')][_0xb4d1('0x1e')](',');if(_0x36c711[_0xb4d1('0x14')]===_0xb4d1('0x1f')){_0x41fa10['push'](_0x3fe374[0x0]);_0x41fa10[_0xb4d1('0x20')](_0x3fe374[0x1]);_0x41fa10[_0xb4d1('0x20')](_0x3fe374[_0xb4d1('0x21')](0x2,_0x3fe374[_0xb4d1('0x1a')])[_0xb4d1('0x22')](','));}else{_0x41fa10['push'](_0x3fe374[0x0]);_0x41fa10[_0xb4d1('0x20')](_0x3fe374[_0xb4d1('0x21')](0x1,_0x3fe374[_0xb4d1('0x1a')])[_0xb4d1('0x22')](','));}break;case _0xb4d1('0x23'):var _0x3721fb=_0x136d10['appdata']['split'](',');_0x41fa10[_0xb4d1('0x20')](_0x3721fb[0x0]);_0x41fa10[_0xb4d1('0x20')](_0x3721fb[0x1]);_0x41fa10[_0xb4d1('0x20')](_0x3721fb[_0xb4d1('0x21')](0x2,_0x3721fb['length'])[_0xb4d1('0x22')](','));break;case _0xb4d1('0x24'):var _0x307abe=_0x136d10[_0xb4d1('0x1d')][_0xb4d1('0x1e')](',');_0x41fa10[_0xb4d1('0x20')](_0x307abe[0x0]);_0x41fa10[_0xb4d1('0x20')](_0x307abe[0x1]);_0x41fa10[_0xb4d1('0x20')](_0x307abe[0x2]);_0x41fa10['push'](_0x307abe[0x3]);_0x41fa10[_0xb4d1('0x20')](_0x307abe[_0xb4d1('0x21')](0x4,_0x307abe[_0xb4d1('0x1a')])['join'](','));break;case _0xb4d1('0x25'):var _0x516dd7=_0x136d10[_0xb4d1('0x1d')][_0xb4d1('0x1e')](',');_0x41fa10[_0xb4d1('0x20')](_0x516dd7[0x0]);_0x41fa10[_0xb4d1('0x20')](_0x516dd7[0x1]);_0x41fa10[_0xb4d1('0x20')](_0x516dd7[0x2]);_0x41fa10[_0xb4d1('0x20')](_0x516dd7[0x3]);_0x41fa10[_0xb4d1('0x20')](_0x516dd7[_0xb4d1('0x21')](0x4,_0x516dd7[_0xb4d1('0x1a')])[_0xb4d1('0x22')](','));break;case _0xb4d1('0x15'):_0x41fa10[_0xb4d1('0x20')](_0x136d10['appdata']);break;case _0xb4d1('0x26'):_0x41fa10[_0xb4d1('0x20')](_0x136d10[_0xb4d1('0x27')]);_0x41fa10[_0xb4d1('0x20')](_0x136d10[_0xb4d1('0x1d')]);break;case'tvox':var _0x2d90d3=utils[_0xb4d1('0x28')](_0x36c711['account'][_0xb4d1('0x29')],_0x36c711);var _0x32f321=_0x136d10[_0xb4d1('0x1d')]['split'](',');_0x41fa10['push'](_0x32f321[0x0]);_0x41fa10[_0xb4d1('0x20')](_0x32f321[0x1]);_0x41fa10[_0xb4d1('0x20')](_0x32f321[0x2]);_0x41fa10[_0xb4d1('0x20')](_0x32f321[0x3]);_0x41fa10[_0xb4d1('0x20')](_0x32f321[0x4]);_0x41fa10[_0xb4d1('0x20')](_0x32f321[0x5]);_0x41fa10[_0xb4d1('0x20')](_0x32f321[0x6]);_0x41fa10[_0xb4d1('0x20')](_0x32f321[0x7]);_0x41fa10[_0xb4d1('0x20')](_0x32f321[0x8]);_0x41fa10[_0xb4d1('0x20')](_0x32f321[0x9]);_0x41fa10[_0xb4d1('0x20')](_0x32f321[0xa]);_0x41fa10[_0xb4d1('0x20')](_0x36c711[_0xb4d1('0x16')]['id']);_0x41fa10[_0xb4d1('0x20')](_0x36c711[_0xb4d1('0x15')]['id']);_0x41fa10['push'](_0x136d10[_0xb4d1('0x2a')]);_0x41fa10[_0xb4d1('0x20')](_0x36c711[_0xb4d1('0x16')][_0xb4d1('0x2b')]);_0x41fa10[_0xb4d1('0x20')](_0x36c711[_0xb4d1('0x2c')][_0xb4d1('0x2c')]);_0x41fa10[_0xb4d1('0x20')](_0x2d90d3);break;default:_0x41fa10=_[_0xb4d1('0xd')](_0x136d10[_0xb4d1('0x1d')])?[]:_0x136d10[_0xb4d1('0x1d')][_0xb4d1('0x1e')](',');}var _0x2fbaf1={'id':util['format']('%s:%s:%s',_0x785af3,_0x136d10['id'],_0x136d10[_0xb4d1('0x2d')]),'condition':require(_0xb4d1('0x2e'))[_0xb4d1('0x2f')](_0x785af3,getIntervals(_0x3baccd[_0xb4d1('0x30')],_0x136d10),_0x3baccd),'consequence':require(_0xb4d1('0x31')+_0x136d10['app'])['consequence'](_0x785af3,_0x41fa10,_0x3baccd,_0x36c711),'p':_0x136d10[_0xb4d1('0x32')]||0x0};logger[_0xb4d1('0x33')]('Push\x20new\x20rule',_0x2fbaf1['id'],_0xb4d1('0x34'),getIntervals(_0x3baccd[_0xb4d1('0x30')],_0x136d10)['join'](_0xb4d1('0x35')));_0x513886[_0xb4d1('0x20')](_0x2fbaf1);}else{logger['error']('Please\x20create\x20a\x20new\x20file\x20under',path['join'](__dirname,_0xb4d1('0x19'),_0x136d10[_0xb4d1('0x2d')]+'.js'));}}_0x3baccd[_0xb4d1('0x13')][_0x785af3]=new RuleEngine(_0x513886);_0x3baccd[_0xb4d1('0x13')][_0x785af3]['execute'](_0x36c711,function(_0x576f0a){logger[_0xb4d1('0x33')](_0xb4d1('0x36'),JSON[_0xb4d1('0x37')](_0x576f0a['matchPath']));if(_0x3baccd[_0xb4d1('0x13')][_0x785af3]){_0x3baccd[_0xb4d1('0x13')][_0x785af3][_0xb4d1('0x38')](_0xb4d1('0x39'));}});return _0x433e6d({'code':0xc8,'message':_0x36c711});}else{if(_0x388798){logger['info'](util[_0xb4d1('0x3a')](_0xb4d1('0x3b'),_0x785af3));}else{logger[_0xb4d1('0x33')](_0xb4d1('0x3c'));}return _0x433e6d({'code':0xc8,'message':_0x36c711});}}catch(_0x362b77){logger[_0xb4d1('0x3d')](_0x362b77[_0xb4d1('0x3e')]);return _0x4987d1(_0x2599fd[_0xb4d1('0x3d')](0x1f4,_0x362b77));}}return _0x4987d1(_0xb4d1('0x3f'));});},'AcceptMessage':function(_0x19e006){var _0x3f0dcf=this;return new Promise(function(_0x576902,_0x3eeea7){if(_0x19e006[_0xb4d1('0x40')]&&_0x19e006[_0xb4d1('0x40')]['id']){if(_0x3baccd[_0xb4d1('0x41')][_0x19e006[_0xb4d1('0x40')]['id']]){_0x3baccd['agents'][_0x19e006[_0xb4d1('0x40')]['id']][_0xb4d1('0x42')]=![];_0x3baccd[_0xb4d1('0x41')][_0x19e006[_0xb4d1('0x40')]['id']][_0xb4d1('0x43')]=undefined;}}if(_0x19e006[_0xb4d1('0x15')]&&_0x19e006[_0xb4d1('0x15')]['id']){try{var _0x57e935=getId(_0x19e006[_0xb4d1('0x14')],_0x19e006[_0xb4d1('0x15')]?_0x19e006[_0xb4d1('0x15')]['id']:0x0,_0x19e006['interaction']?_0x19e006[_0xb4d1('0x16')]['id']:0x0);if(_0x3baccd[_0xb4d1('0x13')][_0x57e935]){_0x3baccd[_0xb4d1('0x13')][_0x57e935][_0xb4d1('0x38')](_0xb4d1('0x44'));if(rpc[_0x19e006['channel']+_0xb4d1('0x45')]){rpc[_0x19e006[_0xb4d1('0x14')]+_0xb4d1('0x45')][_0xb4d1('0x46')](_0x57e935,{'UserId':_0x19e006[_0xb4d1('0x15')][_0xb4d1('0x47')]})[_0xb4d1('0x48')](function(){logger['error']('error\x20update\x20queue\x20report');});}}return _0x576902({'code':0xc8,'message':_0x19e006});}catch(_0x5e529a){logger[_0xb4d1('0x3d')](_0x5e529a[_0xb4d1('0x3e')]);return _0x3eeea7(_0x3f0dcf['error'](0x1f4,_0x5e529a));}}logger[_0xb4d1('0x3d')]('message\x20is\x20empty');return _0x3eeea7(_0x3f0dcf[_0xb4d1('0x3d')](0x1f4,_0xb4d1('0x49')));});},'RejectMessage':function(_0xcf7067){var _0x4254cc=this;return new Promise(function(_0x21ef5b,_0xa733df){if(_0xcf7067[_0xb4d1('0x40')]&&_0xcf7067['agent']['id']){try{if(_0x3baccd[_0xb4d1('0x41')][_0xcf7067[_0xb4d1('0x40')]['id']]){_0x3baccd[_0xb4d1('0x41')][_0xcf7067[_0xb4d1('0x40')]['id']]['busy']=![];_0x3baccd[_0xb4d1('0x41')][_0xcf7067[_0xb4d1('0x40')]['id']][_0xb4d1('0x43')]=undefined;}return _0x21ef5b({'code':0xc8,'message':_0xcf7067});}catch(_0x1a9b79){logger[_0xb4d1('0x3d')](_0x1a9b79['stack']);return _0xa733df(_0x4254cc[_0xb4d1('0x3d')](0x1f4,_0x1a9b79));}}logger[_0xb4d1('0x3d')](_0xb4d1('0x49'));return _0xa733df(_0x4254cc[_0xb4d1('0x3d')](0x1f4,_0xb4d1('0x49')));});},'AbandonInteraction':function(_0x446498){var _0x51fff9=this;return new Promise(function(_0x259667,_0xe788d8){if(_0x446498['channel']&&_0x446498[_0xb4d1('0x16')]&&_0x446498[_0xb4d1('0x16')]['id']){try{var _0x1898e9=getId(_0x446498[_0xb4d1('0x14')],_0x446498[_0xb4d1('0x15')]?_0x446498[_0xb4d1('0x15')]['id']:0x0,_0x446498[_0xb4d1('0x16')]?_0x446498[_0xb4d1('0x16')]['id']:0x0);if(_0x3baccd[_0xb4d1('0x13')][_0x1898e9]){_0x3baccd[_0xb4d1('0x13')][_0x1898e9][_0xb4d1('0x38')](_0xb4d1('0x44'));}return _0x259667({'code':0xc8,'message':_0x446498});}catch(_0x1e4f6e){logger[_0xb4d1('0x3d')](_0x1e4f6e[_0xb4d1('0x3e')]);return _0xe788d8(_0x51fff9[_0xb4d1('0x3d')](0x1f4,_0x1e4f6e));}}logger['error'](_0xb4d1('0x49'));return _0xe788d8(_0x51fff9[_0xb4d1('0x3d')](0x1f4,'message\x20is\x20empty'));});},'AgentCapacity':function(_0x46e9e1){var _0x34cfff=this;return new Promise(function(_0x18b9ab,_0x4ec3d6){if(_0x3baccd[_0xb4d1('0x41')]['hasOwnProperty'](_0x46e9e1['id'])){for(var _0x2c1166 in _0x46e9e1[_0xb4d1('0x4a')]){if(_0x46e9e1[_0xb4d1('0x4a')][_0xb4d1('0x4b')](_0x2c1166)){if(_0x3baccd[_0xb4d1('0x41')][_0x46e9e1['id']][_0xb4d1('0x4b')](_0x2c1166+_0xb4d1('0x4c'))){_0x3baccd[_0xb4d1('0x41')][_0x46e9e1['id']][_0x2c1166+_0xb4d1('0x4c')]=parseInt(_0x46e9e1[_0xb4d1('0x4a')][_0x2c1166],0xa);}}}_0x3baccd[_0xb4d1('0x41')][_0x46e9e1['id']]['updateRealtime']();return _0x18b9ab({'code':0xc8,'message':_0x3baccd['agents'][_0x46e9e1['id']]});}else{return _0x4ec3d6(_0x34cfff[_0xb4d1('0x3d')](0x1f4,_0xb4d1('0x4d')));}});},'Agents':function(_0x1da2cb){return new Promise(function(_0x465623){var _0x16fc0e=_[_0xb4d1('0x4e')](_0x3baccd[_0xb4d1('0x41')]);if(_0x1da2cb&&_0x1da2cb['id']){var _0x5733ca=_['find'](_0x16fc0e,function(_0x3211c6){return _0x3211c6['id']===_0x1da2cb['id'];});_0x465623(_0x5733ca);}else{_0x465623({'count':_0x16fc0e[_0xb4d1('0x1a')],'rows':_0x16fc0e});}});},'ChatQueues':function(){return new Promise(function(_0x2cd71c){var _0x11bea3=[];for(var _0x17d1fa in _0x3baccd[_0xb4d1('0x4f')]){if(_0x3baccd[_0xb4d1('0x4f')][_0xb4d1('0x4b')](_0x17d1fa)){var _0x4ce9d4=_0x3baccd[_0xb4d1('0x4f')][_0x17d1fa];var _0x54204={'id':_0x4ce9d4['id'],'available':_0x4ce9d4[_0xb4d1('0x50')],'loggedIn':_0x4ce9d4[_0xb4d1('0x51')],'name':_0x4ce9d4['name'],'paused':_0x4ce9d4[_0xb4d1('0x52')],'waiting':_0x4ce9d4[_0xb4d1('0x53')]};_0x11bea3[_0xb4d1('0x20')](_0x54204);}}_0x2cd71c({'count':_0x11bea3[_0xb4d1('0x1a')],'rows':_0x11bea3});});},'MailQueues':function(){return new Promise(function(_0x37244b){var _0x1db58c=[];for(var _0x25495e in _0x3baccd[_0xb4d1('0x54')]){if(_0x3baccd[_0xb4d1('0x54')][_0xb4d1('0x4b')](_0x25495e)){var _0x1303f5=_0x3baccd[_0xb4d1('0x54')][_0x25495e];var _0x38e0ee={'id':_0x1303f5['id'],'available':_0x1303f5[_0xb4d1('0x50')],'loggedIn':_0x1303f5[_0xb4d1('0x51')],'name':_0x1303f5['name'],'paused':_0x1303f5[_0xb4d1('0x52')],'waiting':_0x1303f5[_0xb4d1('0x53')]};_0x1db58c['push'](_0x38e0ee);}}_0x37244b({'count':_0x1db58c['length'],'rows':_0x1db58c});});},'OpenchannelQueues':function(){return new Promise(function(_0x5f4c77){var _0x74487e=[];for(var _0x2eccff in _0x3baccd[_0xb4d1('0x55')]){if(_0x3baccd[_0xb4d1('0x55')][_0xb4d1('0x4b')](_0x2eccff)){var _0x871af3=_0x3baccd['openchannelQueues'][_0x2eccff];var _0x3305a0={'id':_0x871af3['id'],'available':_0x871af3['available'],'loggedIn':_0x871af3[_0xb4d1('0x51')],'name':_0x871af3['name'],'paused':_0x871af3[_0xb4d1('0x52')],'waiting':_0x871af3[_0xb4d1('0x53')]};_0x74487e[_0xb4d1('0x20')](_0x3305a0);}}_0x5f4c77({'count':_0x74487e[_0xb4d1('0x1a')],'rows':_0x74487e});});},'SmsQueues':function(){return new Promise(function(_0x316d2f){var _0x5d9074=[];for(var _0x202fab in _0x3baccd['smsQueues']){if(_0x3baccd['smsQueues'][_0xb4d1('0x4b')](_0x202fab)){var _0x14bfbe=_0x3baccd['smsQueues'][_0x202fab];var _0x5bf701={'id':_0x14bfbe['id'],'available':_0x14bfbe['available'],'loggedIn':_0x14bfbe[_0xb4d1('0x51')],'name':_0x14bfbe[_0xb4d1('0x56')],'paused':_0x14bfbe['paused'],'waiting':_0x14bfbe[_0xb4d1('0x53')]};_0x5d9074['push'](_0x5bf701);}}_0x316d2f({'count':_0x5d9074[_0xb4d1('0x1a')],'rows':_0x5d9074});});},'FaxQueues':function(){return new Promise(function(_0x2031d2){var _0x1cd16b=[];for(var _0x31bee3 in _0x3baccd['faxQueues']){if(_0x3baccd[_0xb4d1('0x57')][_0xb4d1('0x4b')](_0x31bee3)){var _0x3900f8=_0x3baccd[_0xb4d1('0x57')][_0x31bee3];var _0x15871c={'id':_0x3900f8['id'],'available':_0x3900f8[_0xb4d1('0x50')],'loggedIn':_0x3900f8['loggedIn'],'name':_0x3900f8['name'],'paused':_0x3900f8['paused'],'waiting':_0x3900f8[_0xb4d1('0x53')]};_0x1cd16b[_0xb4d1('0x20')](_0x15871c);}}_0x2031d2({'count':_0x1cd16b[_0xb4d1('0x1a')],'rows':_0x1cd16b});});},'WhatsappQueues':function(){return new Promise(function(_0x398f6f){var _0x10078e=[];for(var _0x5edbf2 in _0x3baccd[_0xb4d1('0x58')]){if(_0x3baccd[_0xb4d1('0x58')][_0xb4d1('0x4b')](_0x5edbf2)){var _0x58c4aa=_0x3baccd[_0xb4d1('0x58')][_0x5edbf2];var _0xe45d7f={'id':_0x58c4aa['id'],'available':_0x58c4aa['available'],'loggedIn':_0x58c4aa[_0xb4d1('0x51')],'name':_0x58c4aa[_0xb4d1('0x56')],'paused':_0x58c4aa[_0xb4d1('0x52')],'waiting':_0x58c4aa[_0xb4d1('0x53')]};_0x10078e[_0xb4d1('0x20')](_0xe45d7f);}}_0x398f6f({'count':_0x10078e['length'],'rows':_0x10078e});});},'ChatQueuesWaitingInteractions':function(){return new Promise(function(_0x15285a){var _0xa35671=_[_0xb4d1('0x4e')](_0x3baccd[_0xb4d1('0x59')]);_0x15285a({'count':_0xa35671['length'],'rows':_0xa35671});});},'MailQueuesWaitingInteractions':function(){return new Promise(function(_0x1db69a){var _0x2b41d9=_[_0xb4d1('0x4e')](_0x3baccd[_0xb4d1('0x5a')]);_0x1db69a({'count':_0x2b41d9[_0xb4d1('0x1a')],'rows':_0x2b41d9});});},'OpenchannelQueuesWaitingInteractions':function(){return new Promise(function(_0x4fc3db){var _0x263e22=_[_0xb4d1('0x4e')](_0x3baccd[_0xb4d1('0x5b')]);_0x4fc3db({'count':_0x263e22['length'],'rows':_0x263e22});});},'SmsQueuesWaitingInteractions':function(){return new Promise(function(_0x2cd804){var _0x358dae=_['values'](_0x3baccd[_0xb4d1('0x5c')]);_0x2cd804({'count':_0x358dae[_0xb4d1('0x1a')],'rows':_0x358dae});});},'FaxQueuesWaitingInteractions':function(){return new Promise(function(_0x4adc46){var _0x567962=_['values'](_0x3baccd[_0xb4d1('0x5d')]);_0x4adc46({'count':_0x567962['length'],'rows':_0x567962});});},'WhatsappQueuesWaitingInteractions':function(){return new Promise(function(_0x1d3435){var _0x29d8dc=_[_0xb4d1('0x4e')](_0x3baccd[_0xb4d1('0x5e')]);_0x1d3435({'count':_0x29d8dc[_0xb4d1('0x1a')],'rows':_0x29d8dc});});}};var _0x5569e7=jayson['server'](_0x3ba994)[_0xb4d1('0x5f')]();_0x5569e7['on'](_0xb4d1('0x3d'),function(_0x355509){logger[_0xb4d1('0x3d')](JSON[_0xb4d1('0x37')](_0x355509));return _0x295264(_0x355509);});_0x5569e7['listen'](0x232c,_0xb4d1('0x60'),function(){console['log'](_0xb4d1('0x61'),0x232c);return _0x37cb4c(_0xb4d1('0x62')+0x232c);});});};
\ No newline at end of file
+var _0x81f8=['format','isNil','IntervalId','Intervals','interval','listen','rules','channel','message','interaction','checkWaitingNotifications','transfer','applications','length','existsSync','join','app','toLowerCase','split','mail','push','slice','dialogflow','appdata','amazonlex','tag','TagId','tvox','getMustacheRender','account','ChatWebsiteId','body','%s:%s:%s','condition','./applications/','consequence','priority','info','Push\x20new\x20rule','intervals','error','.js','Applications\x20executed','stringify','matchPath','emit','complete','Skipped\x20routing\x20for\x20%s','No\x20applications\x20to\x20execute','routing\x20is\x20empty','agent','agents','busy','busyQueue','QueueReport','update','UserId','catch','error\x20update\x20queue\x20report','stack','message\x20is\x20empty','end','hasOwnProperty','capacity','CurrentCapacity','agent\x20not\x20found','values','find','chatQueues','available','loggedIn','name','paused','waiting','mailQueues','openchannelQueues','smsQueues','faxQueues','whatsappQueues','chatQueuesWaitingInteractions','openchannelQueuesWaitingInteractions','smsQueuesWaitingInteractions','faxQueuesWaitingInteractions','http','127.0.0.1','log','RPC\x20listening\x20on\x20port:','lodash','util','jayson/promise','bluebird','./applications/utils','./applications/strategy/util','../../../config/logger','../rpc/openchannelQueueReport','../rpc/mailQueueReport','../rpc/chatQueueReport','../rpc/smsQueueReport','../rpc/faxQueueReport','../rpc/whatsappQueueReport','../lib/rule-engine'];(function(_0x61c264,_0x1237f0){var _0x20797b=function(_0x1c3554){while(--_0x1c3554){_0x61c264['push'](_0x61c264['shift']());}};_0x20797b(++_0x1237f0);}(_0x81f8,0x186));var _0x881f=function(_0x5accb2,_0x490563){_0x5accb2=_0x5accb2-0x0;var _0x2e200c=_0x81f8[_0x5accb2];return _0x2e200c;};'use strict';var _=require(_0x881f('0x0'));var util=require(_0x881f('0x1'));var path=require('path');var fs=require('fs');var jayson=require(_0x881f('0x2'));var BPromise=require(_0x881f('0x3'));var utils=require(_0x881f('0x4'));var sUtils=require(_0x881f('0x5'));var logger=require(_0x881f('0x6'))('routing');var rpc={'openchannelQueueReport':require(_0x881f('0x7')),'mailQueueReport':require(_0x881f('0x8')),'chatQueueReport':require(_0x881f('0x9')),'smsQueueReport':require(_0x881f('0xa')),'faxQueueReport':require(_0x881f('0xb')),'whatsappQueueReport':require(_0x881f('0xc'))};var RuleEngine=require(_0x881f('0xd'));function getId(_0x521af3,_0x5b1564,_0x8ae33d){return util[_0x881f('0xe')]('%s.%s.%s',_0x521af3,_0x5b1564||0x0,_0x8ae33d||0x0);}function getIntervals(_0x8d94d7,_0x213a06){var _0x44b3e2=[];if(!_[_0x881f('0xf')](_0x213a06['IntervalId'])&&!_['isNil'](_0x8d94d7[_0x213a06[_0x881f('0x10')]])&&!_[_0x881f('0xf')](_0x8d94d7[_0x213a06[_0x881f('0x10')]]['Intervals'])){_0x44b3e2=_['map'](_0x8d94d7[_0x213a06[_0x881f('0x10')]][_0x881f('0x11')],'interval');}else if(!_['isNil'](_0x213a06[_0x881f('0x12')])){_0x44b3e2=[_0x213a06[_0x881f('0x12')]];}return _0x44b3e2;}exports[_0x881f('0x13')]=function(_0x52c140){_0x52c140[_0x881f('0x14')]={};return new BPromise(function(_0x1f51aa,_0x58bd20){var _0x3d8353={'Start':function(_0x3d9e50){var _0x4b7378=this;return new Promise(function(_0x301d66,_0x167107){if(_0x3d9e50){try{var _0x3704fa=[];var _0xf35b6e=getId(_0x3d9e50[_0x881f('0x15')],_0x3d9e50[_0x881f('0x16')]?_0x3d9e50['message']['id']:0x0,_0x3d9e50[_0x881f('0x17')]?_0x3d9e50['interaction']['id']:0x0);var _0x5d2955=sUtils[_0x881f('0x18')](_0x52c140,_0x3d9e50);if(_0x3d9e50[_0x881f('0x19')]||!_0x5d2955&&_0x3d9e50[_0x881f('0x1a')]&&_['isArray'](_0x3d9e50[_0x881f('0x1a')])&&_0x3d9e50[_0x881f('0x1a')]['length']){for(var _0x954062=0x0;_0x954062<_0x3d9e50[_0x881f('0x1a')][_0x881f('0x1b')];_0x954062+=0x1){var _0x537c77=_0x3d9e50['applications'][_0x954062];if(fs[_0x881f('0x1c')](path[_0x881f('0x1d')](__dirname,_0x881f('0x1a'),_0x537c77[_0x881f('0x1e')]+'.js'))){var _0x1b434d=[];switch(_0x537c77[_0x881f('0x1e')][_0x881f('0x1f')]()){case'autoreply':var _0x16392b=_0x537c77['appdata'][_0x881f('0x20')](',');if(_0x3d9e50['channel']===_0x881f('0x21')){_0x1b434d[_0x881f('0x22')](_0x16392b[0x0]);_0x1b434d[_0x881f('0x22')](_0x16392b[0x1]);_0x1b434d[_0x881f('0x22')](_0x16392b['slice'](0x2,_0x16392b[_0x881f('0x1b')])[_0x881f('0x1d')](','));}else{_0x1b434d[_0x881f('0x22')](_0x16392b[0x0]);_0x1b434d[_0x881f('0x22')](_0x16392b[_0x881f('0x23')](0x1,_0x16392b[_0x881f('0x1b')])['join'](','));}break;case _0x881f('0x24'):var _0x269741=_0x537c77[_0x881f('0x25')][_0x881f('0x20')](',');_0x1b434d[_0x881f('0x22')](_0x269741[0x0]);_0x1b434d['push'](_0x269741[0x1]);_0x1b434d['push'](_0x269741[_0x881f('0x23')](0x2,_0x269741[_0x881f('0x1b')])[_0x881f('0x1d')](','));break;case'dialogflowv2':var _0x213d9d=_0x537c77[_0x881f('0x25')][_0x881f('0x20')](',');_0x1b434d[_0x881f('0x22')](_0x213d9d[0x0]);_0x1b434d[_0x881f('0x22')](_0x213d9d[0x1]);_0x1b434d[_0x881f('0x22')](_0x213d9d[0x2]);_0x1b434d[_0x881f('0x22')](_0x213d9d[0x3]);_0x1b434d[_0x881f('0x22')](_0x213d9d[_0x881f('0x23')](0x4,_0x213d9d[_0x881f('0x1b')])[_0x881f('0x1d')](','));break;case _0x881f('0x26'):var _0x33e2a9=_0x537c77['appdata'][_0x881f('0x20')](',');_0x1b434d[_0x881f('0x22')](_0x33e2a9[0x0]);_0x1b434d[_0x881f('0x22')](_0x33e2a9[0x1]);_0x1b434d['push'](_0x33e2a9[0x2]);_0x1b434d[_0x881f('0x22')](_0x33e2a9[0x3]);_0x1b434d[_0x881f('0x22')](_0x33e2a9['slice'](0x4,_0x33e2a9[_0x881f('0x1b')])[_0x881f('0x1d')](','));break;case _0x881f('0x16'):_0x1b434d[_0x881f('0x22')](_0x537c77[_0x881f('0x25')]);break;case _0x881f('0x27'):_0x1b434d[_0x881f('0x22')](_0x537c77[_0x881f('0x28')]);_0x1b434d[_0x881f('0x22')](_0x537c77[_0x881f('0x25')]);break;case _0x881f('0x29'):var _0x5da091=utils[_0x881f('0x2a')](_0x3d9e50[_0x881f('0x2b')]['notificationTemplate'],_0x3d9e50);var _0x24006f=_0x537c77[_0x881f('0x25')][_0x881f('0x20')](',');_0x1b434d[_0x881f('0x22')](_0x24006f[0x0]);_0x1b434d[_0x881f('0x22')](_0x24006f[0x1]);_0x1b434d['push'](_0x24006f[0x2]);_0x1b434d['push'](_0x24006f[0x3]);_0x1b434d[_0x881f('0x22')](_0x24006f[0x4]);_0x1b434d[_0x881f('0x22')](_0x24006f[0x5]);_0x1b434d['push'](_0x24006f[0x6]);_0x1b434d[_0x881f('0x22')](_0x24006f[0x7]);_0x1b434d['push'](_0x24006f[0x8]);_0x1b434d[_0x881f('0x22')](_0x24006f[0x9]);_0x1b434d[_0x881f('0x22')](_0x24006f[0xa]);_0x1b434d[_0x881f('0x22')](_0x3d9e50[_0x881f('0x17')]['id']);_0x1b434d[_0x881f('0x22')](_0x3d9e50[_0x881f('0x16')]['id']);_0x1b434d['push'](_0x537c77[_0x881f('0x2c')]);_0x1b434d[_0x881f('0x22')](_0x3d9e50[_0x881f('0x17')]['ContactId']);_0x1b434d[_0x881f('0x22')](_0x3d9e50[_0x881f('0x2d')][_0x881f('0x2d')]);_0x1b434d['push'](_0x5da091);break;default:_0x1b434d=_[_0x881f('0xf')](_0x537c77[_0x881f('0x25')])?[]:_0x537c77[_0x881f('0x25')][_0x881f('0x20')](',');}var _0x463883={'id':util[_0x881f('0xe')](_0x881f('0x2e'),_0xf35b6e,_0x537c77['id'],_0x537c77['app']),'condition':require('./interval')[_0x881f('0x2f')](_0xf35b6e,getIntervals(_0x52c140['intervals'],_0x537c77),_0x52c140),'consequence':require(_0x881f('0x30')+_0x537c77['app'])[_0x881f('0x31')](_0xf35b6e,_0x1b434d,_0x52c140,_0x3d9e50),'p':_0x537c77[_0x881f('0x32')]||0x0};logger[_0x881f('0x33')](_0x881f('0x34'),_0x463883['id'],'on\x20interval',getIntervals(_0x52c140[_0x881f('0x35')],_0x537c77)['join']('\x20|\x20'));_0x3704fa[_0x881f('0x22')](_0x463883);}else{logger[_0x881f('0x36')]('Please\x20create\x20a\x20new\x20file\x20under',path[_0x881f('0x1d')](__dirname,_0x881f('0x1a'),_0x537c77[_0x881f('0x1e')]+_0x881f('0x37')));}}_0x52c140[_0x881f('0x14')][_0xf35b6e]=new RuleEngine(_0x3704fa);_0x52c140['rules'][_0xf35b6e]['execute'](_0x3d9e50,function(_0x4ce377){logger[_0x881f('0x33')](_0x881f('0x38'),JSON[_0x881f('0x39')](_0x4ce377[_0x881f('0x3a')]));if(_0x52c140[_0x881f('0x14')][_0xf35b6e]){_0x52c140[_0x881f('0x14')][_0xf35b6e][_0x881f('0x3b')](_0x881f('0x3c'));}});return _0x301d66({'code':0xc8,'message':_0x3d9e50});}else{if(_0x5d2955){logger['info'](util[_0x881f('0xe')](_0x881f('0x3d'),_0xf35b6e));}else{logger['info'](_0x881f('0x3e'));}return _0x301d66({'code':0xc8,'message':_0x3d9e50});}}catch(_0xf80e6c){logger['error'](_0xf80e6c['stack']);return _0x167107(_0x4b7378[_0x881f('0x36')](0x1f4,_0xf80e6c));}}return _0x167107(_0x881f('0x3f'));});},'AcceptMessage':function(_0x584cc3){var _0x1ac26b=this;return new Promise(function(_0x4b91a3,_0x5ed67e){if(_0x584cc3['agent']&&_0x584cc3[_0x881f('0x40')]['id']){if(_0x52c140['agents'][_0x584cc3[_0x881f('0x40')]['id']]){_0x52c140[_0x881f('0x41')][_0x584cc3[_0x881f('0x40')]['id']][_0x881f('0x42')]=![];_0x52c140[_0x881f('0x41')][_0x584cc3[_0x881f('0x40')]['id']][_0x881f('0x43')]=undefined;}}if(_0x584cc3[_0x881f('0x16')]&&_0x584cc3[_0x881f('0x16')]['id']){try{var _0xc79124=getId(_0x584cc3[_0x881f('0x15')],_0x584cc3[_0x881f('0x16')]?_0x584cc3[_0x881f('0x16')]['id']:0x0,_0x584cc3[_0x881f('0x17')]?_0x584cc3[_0x881f('0x17')]['id']:0x0);if(_0x52c140['rules'][_0xc79124]){_0x52c140[_0x881f('0x14')][_0xc79124][_0x881f('0x3b')]('end');if(rpc[_0x584cc3[_0x881f('0x15')]+_0x881f('0x44')]){rpc[_0x584cc3[_0x881f('0x15')]+_0x881f('0x44')][_0x881f('0x45')](_0xc79124,{'UserId':_0x584cc3[_0x881f('0x16')][_0x881f('0x46')]})[_0x881f('0x47')](function(){logger[_0x881f('0x36')](_0x881f('0x48'));});}}return _0x4b91a3({'code':0xc8,'message':_0x584cc3});}catch(_0x13a428){logger[_0x881f('0x36')](_0x13a428[_0x881f('0x49')]);return _0x5ed67e(_0x1ac26b['error'](0x1f4,_0x13a428));}}logger[_0x881f('0x36')](_0x881f('0x4a'));return _0x5ed67e(_0x1ac26b[_0x881f('0x36')](0x1f4,'message\x20is\x20empty'));});},'RejectMessage':function(_0x4999fd){var _0x52c18b=this;return new Promise(function(_0xbb2c0c,_0x183d6b){if(_0x4999fd[_0x881f('0x40')]&&_0x4999fd[_0x881f('0x40')]['id']){try{if(_0x52c140['agents'][_0x4999fd[_0x881f('0x40')]['id']]){_0x52c140[_0x881f('0x41')][_0x4999fd[_0x881f('0x40')]['id']][_0x881f('0x42')]=![];_0x52c140['agents'][_0x4999fd[_0x881f('0x40')]['id']][_0x881f('0x43')]=undefined;}return _0xbb2c0c({'code':0xc8,'message':_0x4999fd});}catch(_0x109777){logger['error'](_0x109777[_0x881f('0x49')]);return _0x183d6b(_0x52c18b['error'](0x1f4,_0x109777));}}logger[_0x881f('0x36')]('message\x20is\x20empty');return _0x183d6b(_0x52c18b[_0x881f('0x36')](0x1f4,'message\x20is\x20empty'));});},'AbandonInteraction':function(_0x2fcdc3){var _0x5f5bb7=this;return new Promise(function(_0x5a3d13,_0x26d6ef){if(_0x2fcdc3[_0x881f('0x15')]&&_0x2fcdc3[_0x881f('0x17')]&&_0x2fcdc3[_0x881f('0x17')]['id']){try{var _0x36e87f=getId(_0x2fcdc3['channel'],_0x2fcdc3['message']?_0x2fcdc3[_0x881f('0x16')]['id']:0x0,_0x2fcdc3[_0x881f('0x17')]?_0x2fcdc3['interaction']['id']:0x0);if(_0x52c140['rules'][_0x36e87f]){_0x52c140[_0x881f('0x14')][_0x36e87f][_0x881f('0x3b')](_0x881f('0x4b'));}return _0x5a3d13({'code':0xc8,'message':_0x2fcdc3});}catch(_0x1d8b43){logger[_0x881f('0x36')](_0x1d8b43['stack']);return _0x26d6ef(_0x5f5bb7[_0x881f('0x36')](0x1f4,_0x1d8b43));}}logger[_0x881f('0x36')](_0x881f('0x4a'));return _0x26d6ef(_0x5f5bb7[_0x881f('0x36')](0x1f4,_0x881f('0x4a')));});},'AgentCapacity':function(_0x12475d){var _0x52b8fe=this;return new Promise(function(_0x53bfe4,_0xb5e4f4){if(_0x52c140[_0x881f('0x41')][_0x881f('0x4c')](_0x12475d['id'])){for(var _0x52cead in _0x12475d[_0x881f('0x4d')]){if(_0x12475d[_0x881f('0x4d')][_0x881f('0x4c')](_0x52cead)){if(_0x52c140['agents'][_0x12475d['id']][_0x881f('0x4c')](_0x52cead+_0x881f('0x4e'))){_0x52c140['agents'][_0x12475d['id']][_0x52cead+'CurrentCapacity']=parseInt(_0x12475d[_0x881f('0x4d')][_0x52cead],0xa);}}}_0x52c140[_0x881f('0x41')][_0x12475d['id']]['updateRealtime']();return _0x53bfe4({'code':0xc8,'message':_0x52c140[_0x881f('0x41')][_0x12475d['id']]});}else{return _0xb5e4f4(_0x52b8fe[_0x881f('0x36')](0x1f4,_0x881f('0x4f')));}});},'Agents':function(_0x3b418f){return new Promise(function(_0x410e64){var _0x13a897=_[_0x881f('0x50')](_0x52c140[_0x881f('0x41')]);if(_0x3b418f&&_0x3b418f['id']){var _0x26c887=_[_0x881f('0x51')](_0x13a897,function(_0x2b6d76){return _0x2b6d76['id']===_0x3b418f['id'];});_0x410e64(_0x26c887);}else{_0x410e64({'count':_0x13a897[_0x881f('0x1b')],'rows':_0x13a897});}});},'ChatQueues':function(){return new Promise(function(_0x571b50){var _0x16f1a2=[];for(var _0x4128d3 in _0x52c140[_0x881f('0x52')]){if(_0x52c140['chatQueues'][_0x881f('0x4c')](_0x4128d3)){var _0x3a0232=_0x52c140[_0x881f('0x52')][_0x4128d3];var _0x1b6d39={'id':_0x3a0232['id'],'available':_0x3a0232[_0x881f('0x53')],'loggedIn':_0x3a0232[_0x881f('0x54')],'name':_0x3a0232[_0x881f('0x55')],'paused':_0x3a0232[_0x881f('0x56')],'waiting':_0x3a0232[_0x881f('0x57')]};_0x16f1a2[_0x881f('0x22')](_0x1b6d39);}}_0x571b50({'count':_0x16f1a2['length'],'rows':_0x16f1a2});});},'MailQueues':function(){return new Promise(function(_0x465bca){var _0x1d17a0=[];for(var _0x58156d in _0x52c140[_0x881f('0x58')]){if(_0x52c140[_0x881f('0x58')][_0x881f('0x4c')](_0x58156d)){var _0x351c1a=_0x52c140[_0x881f('0x58')][_0x58156d];var _0x56153f={'id':_0x351c1a['id'],'available':_0x351c1a[_0x881f('0x53')],'loggedIn':_0x351c1a[_0x881f('0x54')],'name':_0x351c1a['name'],'paused':_0x351c1a['paused'],'waiting':_0x351c1a[_0x881f('0x57')]};_0x1d17a0[_0x881f('0x22')](_0x56153f);}}_0x465bca({'count':_0x1d17a0[_0x881f('0x1b')],'rows':_0x1d17a0});});},'OpenchannelQueues':function(){return new Promise(function(_0x1edfad){var _0x2cf3a8=[];for(var _0x247a66 in _0x52c140[_0x881f('0x59')]){if(_0x52c140[_0x881f('0x59')][_0x881f('0x4c')](_0x247a66)){var _0x446c97=_0x52c140['openchannelQueues'][_0x247a66];var _0x49db85={'id':_0x446c97['id'],'available':_0x446c97[_0x881f('0x53')],'loggedIn':_0x446c97[_0x881f('0x54')],'name':_0x446c97[_0x881f('0x55')],'paused':_0x446c97[_0x881f('0x56')],'waiting':_0x446c97[_0x881f('0x57')]};_0x2cf3a8[_0x881f('0x22')](_0x49db85);}}_0x1edfad({'count':_0x2cf3a8[_0x881f('0x1b')],'rows':_0x2cf3a8});});},'SmsQueues':function(){return new Promise(function(_0x5494e8){var _0x468c1a=[];for(var _0x803868 in _0x52c140[_0x881f('0x5a')]){if(_0x52c140[_0x881f('0x5a')]['hasOwnProperty'](_0x803868)){var _0x4fec3f=_0x52c140[_0x881f('0x5a')][_0x803868];var _0x379061={'id':_0x4fec3f['id'],'available':_0x4fec3f['available'],'loggedIn':_0x4fec3f['loggedIn'],'name':_0x4fec3f['name'],'paused':_0x4fec3f[_0x881f('0x56')],'waiting':_0x4fec3f[_0x881f('0x57')]};_0x468c1a[_0x881f('0x22')](_0x379061);}}_0x5494e8({'count':_0x468c1a['length'],'rows':_0x468c1a});});},'FaxQueues':function(){return new Promise(function(_0x102b9f){var _0x3ec52e=[];for(var _0x164d27 in _0x52c140[_0x881f('0x5b')]){if(_0x52c140[_0x881f('0x5b')][_0x881f('0x4c')](_0x164d27)){var _0x5b555e=_0x52c140[_0x881f('0x5b')][_0x164d27];var _0x18c2d0={'id':_0x5b555e['id'],'available':_0x5b555e['available'],'loggedIn':_0x5b555e[_0x881f('0x54')],'name':_0x5b555e[_0x881f('0x55')],'paused':_0x5b555e[_0x881f('0x56')],'waiting':_0x5b555e[_0x881f('0x57')]};_0x3ec52e[_0x881f('0x22')](_0x18c2d0);}}_0x102b9f({'count':_0x3ec52e[_0x881f('0x1b')],'rows':_0x3ec52e});});},'WhatsappQueues':function(){return new Promise(function(_0x383f24){var _0x5af69e=[];for(var _0x293e19 in _0x52c140[_0x881f('0x5c')]){if(_0x52c140[_0x881f('0x5c')]['hasOwnProperty'](_0x293e19)){var _0xf1eb83=_0x52c140[_0x881f('0x5c')][_0x293e19];var _0x257f09={'id':_0xf1eb83['id'],'available':_0xf1eb83[_0x881f('0x53')],'loggedIn':_0xf1eb83[_0x881f('0x54')],'name':_0xf1eb83[_0x881f('0x55')],'paused':_0xf1eb83['paused'],'waiting':_0xf1eb83[_0x881f('0x57')]};_0x5af69e['push'](_0x257f09);}}_0x383f24({'count':_0x5af69e['length'],'rows':_0x5af69e});});},'ChatQueuesWaitingInteractions':function(){return new Promise(function(_0x99be36){var _0x385863=_[_0x881f('0x50')](_0x52c140[_0x881f('0x5d')]);_0x99be36({'count':_0x385863['length'],'rows':_0x385863});});},'MailQueuesWaitingInteractions':function(){return new Promise(function(_0x57e09e){var _0xa3cfce=_[_0x881f('0x50')](_0x52c140['mailQueuesWaitingInteractions']);_0x57e09e({'count':_0xa3cfce['length'],'rows':_0xa3cfce});});},'OpenchannelQueuesWaitingInteractions':function(){return new Promise(function(_0x15f4cb){var _0x3779c8=_[_0x881f('0x50')](_0x52c140[_0x881f('0x5e')]);_0x15f4cb({'count':_0x3779c8[_0x881f('0x1b')],'rows':_0x3779c8});});},'SmsQueuesWaitingInteractions':function(){return new Promise(function(_0x36258d){var _0x401765=_[_0x881f('0x50')](_0x52c140[_0x881f('0x5f')]);_0x36258d({'count':_0x401765[_0x881f('0x1b')],'rows':_0x401765});});},'FaxQueuesWaitingInteractions':function(){return new Promise(function(_0x1e8356){var _0x3afce4=_[_0x881f('0x50')](_0x52c140[_0x881f('0x60')]);_0x1e8356({'count':_0x3afce4[_0x881f('0x1b')],'rows':_0x3afce4});});},'WhatsappQueuesWaitingInteractions':function(){return new Promise(function(_0x2684e6){var _0x46a623=_[_0x881f('0x50')](_0x52c140['whatsappQueuesWaitingInteractions']);_0x2684e6({'count':_0x46a623[_0x881f('0x1b')],'rows':_0x46a623});});}};var _0x36b422=jayson['server'](_0x3d8353)[_0x881f('0x61')]();_0x36b422['on']('error',function(_0x2840ed){logger['error'](JSON[_0x881f('0x39')](_0x2840ed));return _0x58bd20(_0x2840ed);});_0x36b422[_0x881f('0x13')](0x232c,_0x881f('0x62'),function(){console[_0x881f('0x63')]('Routing\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!',0x232c);return _0x1f51aa(_0x881f('0x64')+0x232c);});});};
\ No newline at end of file