Built motion from commit da24aabd.|2.6.20
[motion2.git] / server / services / routing / server / index.js
index 04b2f54..2ef4fee 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb469=['update','UserId','catch','error\x20update\x20queue\x20report','message\x20is\x20empty','hasOwnProperty','capacity','CurrentCapacity','values','find','chatQueues','name','paused','mailQueues','loggedIn','waiting','openchannelQueues','available','smsQueues','faxQueues','whatsappQueues','chatQueuesWaitingInteractions','mailQueuesWaitingInteractions','whatsappQueuesWaitingInteractions','server','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','./applications/utils','../../../config/logger','../rpc/openchannelQueueReport','../rpc/mailQueueReport','../rpc/smsQueueReport','../rpc/faxQueueReport','../lib/rule-engine','%s.%s.%s','isNil','Intervals','map','interval','listen','rules','message','interaction','applications','app','.js','toLowerCase','appdata','channel','push','slice','length','join','dialogflow','split','dialogflowv2','amazonlex','TagId','tvox','account','notificationTemplate','ChatWebsiteId','ContactId','body','%s:%s:%s','./interval','condition','intervals','consequence','\x20|\x20','error','Please\x20create\x20a\x20new\x20file\x20under','execute','info','Applications\x20executed','stringify','matchPath','emit','complete','No\x20applications\x20to\x20execute','stack','agents','agent','busy','busyQueue','end','QueueReport'];(function(_0x48f210,_0xe6508c){var _0xe4a6af=function(_0x21e61b){while(--_0x21e61b){_0x48f210['push'](_0x48f210['shift']());}};_0xe4a6af(++_0xe6508c);}(_0xb469,0x13b));var _0x9b46=function(_0x334c68,_0x388a86){_0x334c68=_0x334c68-0x0;var _0x3ee650=_0xb469[_0x334c68];return _0x3ee650;};'use strict';var _=require(_0x9b46('0x0'));var util=require(_0x9b46('0x1'));var path=require(_0x9b46('0x2'));var fs=require('fs');var jayson=require(_0x9b46('0x3'));var BPromise=require(_0x9b46('0x4'));var utils=require(_0x9b46('0x5'));var logger=require(_0x9b46('0x6'))('routing');var rpc={'openchannelQueueReport':require(_0x9b46('0x7')),'mailQueueReport':require(_0x9b46('0x8')),'chatQueueReport':require('../rpc/chatQueueReport'),'smsQueueReport':require(_0x9b46('0x9')),'faxQueueReport':require(_0x9b46('0xa')),'whatsappQueueReport':require('../rpc/whatsappQueueReport')};var RuleEngine=require(_0x9b46('0xb'));function getId(_0x5bd834,_0x4c1ed9,_0x34c0de){return util['format'](_0x9b46('0xc'),_0x5bd834,_0x4c1ed9||0x0,_0x34c0de||0x0);}function getIntervals(_0xb9d1b5,_0x43a112){var _0x47adeb=[];if(!_[_0x9b46('0xd')](_0x43a112['IntervalId'])&&!_[_0x9b46('0xd')](_0xb9d1b5[_0x43a112['IntervalId']])&&!_[_0x9b46('0xd')](_0xb9d1b5[_0x43a112['IntervalId']][_0x9b46('0xe')])){_0x47adeb=_[_0x9b46('0xf')](_0xb9d1b5[_0x43a112['IntervalId']][_0x9b46('0xe')],_0x9b46('0x10'));}else if(!_['isNil'](_0x43a112[_0x9b46('0x10')])){_0x47adeb=[_0x43a112[_0x9b46('0x10')]];}return _0x47adeb;}exports[_0x9b46('0x11')]=function(_0x467086){_0x467086[_0x9b46('0x12')]={};return new BPromise(function(_0x35c5c1,_0x2136bc){var _0x2e70c3={'Start':function(_0x3f2b28){var _0x178293=this;return new Promise(function(_0xbc1ba6,_0x135cc2){if(_0x3f2b28){try{var _0x1e6911=[];var _0x559bdf=getId(_0x3f2b28['channel'],_0x3f2b28['message']?_0x3f2b28[_0x9b46('0x13')]['id']:0x0,_0x3f2b28[_0x9b46('0x14')]?_0x3f2b28[_0x9b46('0x14')]['id']:0x0);if(_0x3f2b28['applications']&&_['isArray'](_0x3f2b28[_0x9b46('0x15')])&&_0x3f2b28['applications']['length']){for(var _0xfeb1b9=0x0;_0xfeb1b9<_0x3f2b28[_0x9b46('0x15')]['length'];_0xfeb1b9+=0x1){var _0x2fd8f9=_0x3f2b28[_0x9b46('0x15')][_0xfeb1b9];if(fs['existsSync'](path['join'](__dirname,_0x9b46('0x15'),_0x2fd8f9[_0x9b46('0x16')]+_0x9b46('0x17')))){var _0x4e4c7d=[];switch(_0x2fd8f9['app'][_0x9b46('0x18')]()){case'autoreply':var _0x21dacb=_0x2fd8f9[_0x9b46('0x19')]['split'](',');if(_0x3f2b28[_0x9b46('0x1a')]==='mail'){_0x4e4c7d[_0x9b46('0x1b')](_0x21dacb[0x0]);_0x4e4c7d[_0x9b46('0x1b')](_0x21dacb[0x1]);_0x4e4c7d['push'](_0x21dacb[_0x9b46('0x1c')](0x2,_0x21dacb[_0x9b46('0x1d')])[_0x9b46('0x1e')](','));}else{_0x4e4c7d[_0x9b46('0x1b')](_0x21dacb[0x0]);_0x4e4c7d[_0x9b46('0x1b')](_0x21dacb[_0x9b46('0x1c')](0x1,_0x21dacb[_0x9b46('0x1d')])['join'](','));}break;case _0x9b46('0x1f'):var _0x3ac37e=_0x2fd8f9[_0x9b46('0x19')][_0x9b46('0x20')](',');_0x4e4c7d[_0x9b46('0x1b')](_0x3ac37e[0x0]);_0x4e4c7d[_0x9b46('0x1b')](_0x3ac37e[0x1]);_0x4e4c7d[_0x9b46('0x1b')](_0x3ac37e['slice'](0x2,_0x3ac37e[_0x9b46('0x1d')])[_0x9b46('0x1e')](','));break;case _0x9b46('0x21'):var _0x376ccc=_0x2fd8f9[_0x9b46('0x19')][_0x9b46('0x20')](',');_0x4e4c7d[_0x9b46('0x1b')](_0x376ccc[0x0]);_0x4e4c7d[_0x9b46('0x1b')](_0x376ccc[0x1]);_0x4e4c7d[_0x9b46('0x1b')](_0x376ccc[0x2]);_0x4e4c7d[_0x9b46('0x1b')](_0x376ccc[0x3]);_0x4e4c7d[_0x9b46('0x1b')](_0x376ccc['slice'](0x4,_0x376ccc[_0x9b46('0x1d')])[_0x9b46('0x1e')](','));break;case _0x9b46('0x22'):var _0x1ce069=_0x2fd8f9[_0x9b46('0x19')][_0x9b46('0x20')](',');_0x4e4c7d[_0x9b46('0x1b')](_0x1ce069[0x0]);_0x4e4c7d[_0x9b46('0x1b')](_0x1ce069[0x1]);_0x4e4c7d[_0x9b46('0x1b')](_0x1ce069[0x2]);_0x4e4c7d[_0x9b46('0x1b')](_0x1ce069[0x3]);_0x4e4c7d[_0x9b46('0x1b')](_0x1ce069['slice'](0x4,_0x1ce069[_0x9b46('0x1d')])['join'](','));break;case _0x9b46('0x13'):_0x4e4c7d[_0x9b46('0x1b')](_0x2fd8f9[_0x9b46('0x19')]);break;case'tag':_0x4e4c7d[_0x9b46('0x1b')](_0x2fd8f9[_0x9b46('0x23')]);_0x4e4c7d[_0x9b46('0x1b')](_0x2fd8f9[_0x9b46('0x19')]);break;case _0x9b46('0x24'):var _0x5cb73f=utils['getMustacheRender'](_0x3f2b28[_0x9b46('0x25')][_0x9b46('0x26')],_0x3f2b28);var _0x47367a=_0x2fd8f9[_0x9b46('0x19')]['split'](',');_0x4e4c7d[_0x9b46('0x1b')](_0x47367a[0x0]);_0x4e4c7d['push'](_0x47367a[0x1]);_0x4e4c7d[_0x9b46('0x1b')](_0x47367a[0x2]);_0x4e4c7d[_0x9b46('0x1b')](_0x47367a[0x3]);_0x4e4c7d[_0x9b46('0x1b')](_0x47367a[0x4]);_0x4e4c7d[_0x9b46('0x1b')](_0x47367a[0x5]);_0x4e4c7d['push'](_0x47367a[0x6]);_0x4e4c7d[_0x9b46('0x1b')](_0x47367a[0x7]);_0x4e4c7d['push'](_0x47367a[0x8]);_0x4e4c7d[_0x9b46('0x1b')](_0x47367a[0x9]);_0x4e4c7d[_0x9b46('0x1b')](_0x47367a[0xa]);_0x4e4c7d[_0x9b46('0x1b')](_0x3f2b28[_0x9b46('0x14')]['id']);_0x4e4c7d[_0x9b46('0x1b')](_0x3f2b28[_0x9b46('0x13')]['id']);_0x4e4c7d[_0x9b46('0x1b')](_0x2fd8f9[_0x9b46('0x27')]);_0x4e4c7d[_0x9b46('0x1b')](_0x3f2b28[_0x9b46('0x14')][_0x9b46('0x28')]);_0x4e4c7d['push'](_0x3f2b28[_0x9b46('0x29')]['body']);_0x4e4c7d[_0x9b46('0x1b')](_0x5cb73f);break;default:_0x4e4c7d=_[_0x9b46('0xd')](_0x2fd8f9['appdata'])?[]:_0x2fd8f9[_0x9b46('0x19')]['split'](',');}var _0x416538={'id':util['format'](_0x9b46('0x2a'),_0x559bdf,_0x2fd8f9['id'],_0x2fd8f9[_0x9b46('0x16')]),'condition':require(_0x9b46('0x2b'))[_0x9b46('0x2c')](_0x559bdf,getIntervals(_0x467086[_0x9b46('0x2d')],_0x2fd8f9),_0x467086),'consequence':require('./applications/'+_0x2fd8f9['app'])[_0x9b46('0x2e')](_0x559bdf,_0x4e4c7d,_0x467086,_0x3f2b28),'p':_0x2fd8f9['priority']||0x0};logger['info']('Push\x20new\x20rule',_0x416538['id'],'on\x20interval',getIntervals(_0x467086[_0x9b46('0x2d')],_0x2fd8f9)['join'](_0x9b46('0x2f')));_0x1e6911['push'](_0x416538);}else{logger[_0x9b46('0x30')](_0x9b46('0x31'),path[_0x9b46('0x1e')](__dirname,_0x9b46('0x15'),_0x2fd8f9[_0x9b46('0x16')]+_0x9b46('0x17')));}}_0x467086[_0x9b46('0x12')][_0x559bdf]=new RuleEngine(_0x1e6911);_0x467086[_0x9b46('0x12')][_0x559bdf][_0x9b46('0x32')](_0x3f2b28,function(_0x5602a9){logger[_0x9b46('0x33')](_0x9b46('0x34'),JSON[_0x9b46('0x35')](_0x5602a9[_0x9b46('0x36')]));if(_0x467086[_0x9b46('0x12')][_0x559bdf]){_0x467086[_0x9b46('0x12')][_0x559bdf][_0x9b46('0x37')](_0x9b46('0x38'));}});return _0xbc1ba6({'code':0xc8,'message':_0x3f2b28});}else{logger[_0x9b46('0x33')](_0x9b46('0x39'));return _0xbc1ba6({'code':0xc8,'message':_0x3f2b28});}}catch(_0x1f3b2b){logger[_0x9b46('0x30')](_0x1f3b2b[_0x9b46('0x3a')]);return _0x135cc2(_0x178293[_0x9b46('0x30')](0x1f4,_0x1f3b2b));}}return _0x135cc2('routing\x20is\x20empty');});},'AcceptMessage':function(_0x4a62c6){var _0xf81543=this;return new Promise(function(_0x23df60,_0x309a4f){if(_0x4a62c6['agent']&&_0x4a62c6['agent']['id']){if(_0x467086[_0x9b46('0x3b')][_0x4a62c6[_0x9b46('0x3c')]['id']]){_0x467086[_0x9b46('0x3b')][_0x4a62c6[_0x9b46('0x3c')]['id']][_0x9b46('0x3d')]=![];_0x467086[_0x9b46('0x3b')][_0x4a62c6['agent']['id']][_0x9b46('0x3e')]=undefined;}}if(_0x4a62c6[_0x9b46('0x13')]&&_0x4a62c6[_0x9b46('0x13')]['id']){try{var _0x47a938=getId(_0x4a62c6[_0x9b46('0x1a')],_0x4a62c6['message']?_0x4a62c6[_0x9b46('0x13')]['id']:0x0,_0x4a62c6[_0x9b46('0x14')]?_0x4a62c6[_0x9b46('0x14')]['id']:0x0);if(_0x467086['rules'][_0x47a938]){_0x467086[_0x9b46('0x12')][_0x47a938][_0x9b46('0x37')](_0x9b46('0x3f'));if(rpc[_0x4a62c6[_0x9b46('0x1a')]+_0x9b46('0x40')]){rpc[_0x4a62c6[_0x9b46('0x1a')]+'QueueReport'][_0x9b46('0x41')](_0x47a938,{'UserId':_0x4a62c6[_0x9b46('0x13')][_0x9b46('0x42')]})[_0x9b46('0x43')](function(){logger[_0x9b46('0x30')](_0x9b46('0x44'));});}}return _0x23df60({'code':0xc8,'message':_0x4a62c6});}catch(_0x4a1df0){logger[_0x9b46('0x30')](_0x4a1df0['stack']);return _0x309a4f(_0xf81543[_0x9b46('0x30')](0x1f4,_0x4a1df0));}}logger[_0x9b46('0x30')](_0x9b46('0x45'));return _0x309a4f(_0xf81543[_0x9b46('0x30')](0x1f4,_0x9b46('0x45')));});},'RejectMessage':function(_0x5f5ce9){var _0x15dbb0=this;return new Promise(function(_0x1c7e5d,_0x3d65ad){if(_0x5f5ce9[_0x9b46('0x3c')]&&_0x5f5ce9[_0x9b46('0x3c')]['id']){try{if(_0x467086[_0x9b46('0x3b')][_0x5f5ce9[_0x9b46('0x3c')]['id']]){_0x467086[_0x9b46('0x3b')][_0x5f5ce9[_0x9b46('0x3c')]['id']][_0x9b46('0x3d')]=![];_0x467086[_0x9b46('0x3b')][_0x5f5ce9['agent']['id']]['busyQueue']=undefined;}return _0x1c7e5d({'code':0xc8,'message':_0x5f5ce9});}catch(_0x496006){logger[_0x9b46('0x30')](_0x496006['stack']);return _0x3d65ad(_0x15dbb0[_0x9b46('0x30')](0x1f4,_0x496006));}}logger['error'](_0x9b46('0x45'));return _0x3d65ad(_0x15dbb0['error'](0x1f4,_0x9b46('0x45')));});},'AbandonInteraction':function(_0x443ccd){var _0x15e3d6=this;return new Promise(function(_0x52463b,_0x35f71d){if(_0x443ccd['channel']&&_0x443ccd[_0x9b46('0x14')]&&_0x443ccd[_0x9b46('0x14')]['id']){try{var _0x2c77d2=getId(_0x443ccd[_0x9b46('0x1a')],_0x443ccd[_0x9b46('0x13')]?_0x443ccd['message']['id']:0x0,_0x443ccd['interaction']?_0x443ccd[_0x9b46('0x14')]['id']:0x0);if(_0x467086[_0x9b46('0x12')][_0x2c77d2]){_0x467086[_0x9b46('0x12')][_0x2c77d2][_0x9b46('0x37')](_0x9b46('0x3f'));}return _0x52463b({'code':0xc8,'message':_0x443ccd});}catch(_0x164167){logger[_0x9b46('0x30')](_0x164167[_0x9b46('0x3a')]);return _0x35f71d(_0x15e3d6['error'](0x1f4,_0x164167));}}logger[_0x9b46('0x30')](_0x9b46('0x45'));return _0x35f71d(_0x15e3d6[_0x9b46('0x30')](0x1f4,'message\x20is\x20empty'));});},'AgentCapacity':function(_0x46dffa){var _0x145200=this;return new Promise(function(_0x1aa8c6,_0x12d825){if(_0x467086[_0x9b46('0x3b')][_0x9b46('0x46')](_0x46dffa['id'])){for(var _0x4b79a4 in _0x46dffa[_0x9b46('0x47')]){if(_0x46dffa[_0x9b46('0x47')][_0x9b46('0x46')](_0x4b79a4)){if(_0x467086[_0x9b46('0x3b')][_0x46dffa['id']][_0x9b46('0x46')](_0x4b79a4+_0x9b46('0x48'))){_0x467086['agents'][_0x46dffa['id']][_0x4b79a4+_0x9b46('0x48')]=parseInt(_0x46dffa['capacity'][_0x4b79a4],0xa);}}}_0x467086[_0x9b46('0x3b')][_0x46dffa['id']]['updateRealtime']();return _0x1aa8c6({'code':0xc8,'message':_0x467086[_0x9b46('0x3b')][_0x46dffa['id']]});}else{return _0x12d825(_0x145200[_0x9b46('0x30')](0x1f4,'agent\x20not\x20found'));}});},'Agents':function(_0x171ad2){return new Promise(function(_0x1cc2f3){var _0x3abe23=_[_0x9b46('0x49')](_0x467086[_0x9b46('0x3b')]);if(_0x171ad2&&_0x171ad2['id']){var _0x5b9ec2=_[_0x9b46('0x4a')](_0x3abe23,function(_0x343a1e){return _0x343a1e['id']===_0x171ad2['id'];});_0x1cc2f3(_0x5b9ec2);}else{_0x1cc2f3({'count':_0x3abe23['length'],'rows':_0x3abe23});}});},'ChatQueues':function(){return new Promise(function(_0x4cf4ba){var _0x3aca4b=[];for(var _0x2801bb in _0x467086[_0x9b46('0x4b')]){if(_0x467086[_0x9b46('0x4b')][_0x9b46('0x46')](_0x2801bb)){var _0x1a6516=_0x467086[_0x9b46('0x4b')][_0x2801bb];var _0x19aa34={'id':_0x1a6516['id'],'available':_0x1a6516['available'],'loggedIn':_0x1a6516['loggedIn'],'name':_0x1a6516[_0x9b46('0x4c')],'paused':_0x1a6516[_0x9b46('0x4d')],'waiting':_0x1a6516['waiting']};_0x3aca4b[_0x9b46('0x1b')](_0x19aa34);}}_0x4cf4ba({'count':_0x3aca4b['length'],'rows':_0x3aca4b});});},'MailQueues':function(){return new Promise(function(_0x33d1ab){var _0x501544=[];for(var _0xf6f92 in _0x467086[_0x9b46('0x4e')]){if(_0x467086[_0x9b46('0x4e')]['hasOwnProperty'](_0xf6f92)){var _0x271ae8=_0x467086[_0x9b46('0x4e')][_0xf6f92];var _0xad2666={'id':_0x271ae8['id'],'available':_0x271ae8['available'],'loggedIn':_0x271ae8[_0x9b46('0x4f')],'name':_0x271ae8[_0x9b46('0x4c')],'paused':_0x271ae8[_0x9b46('0x4d')],'waiting':_0x271ae8[_0x9b46('0x50')]};_0x501544[_0x9b46('0x1b')](_0xad2666);}}_0x33d1ab({'count':_0x501544['length'],'rows':_0x501544});});},'OpenchannelQueues':function(){return new Promise(function(_0x5321c1){var _0x5386ef=[];for(var _0x533a4f in _0x467086['openchannelQueues']){if(_0x467086[_0x9b46('0x51')][_0x9b46('0x46')](_0x533a4f)){var _0x11243a=_0x467086[_0x9b46('0x51')][_0x533a4f];var _0x368cd2={'id':_0x11243a['id'],'available':_0x11243a[_0x9b46('0x52')],'loggedIn':_0x11243a[_0x9b46('0x4f')],'name':_0x11243a[_0x9b46('0x4c')],'paused':_0x11243a['paused'],'waiting':_0x11243a[_0x9b46('0x50')]};_0x5386ef[_0x9b46('0x1b')](_0x368cd2);}}_0x5321c1({'count':_0x5386ef['length'],'rows':_0x5386ef});});},'SmsQueues':function(){return new Promise(function(_0xb3e39e){var _0x4ea405=[];for(var _0x1f3e9e in _0x467086[_0x9b46('0x53')]){if(_0x467086[_0x9b46('0x53')][_0x9b46('0x46')](_0x1f3e9e)){var _0x453a53=_0x467086['smsQueues'][_0x1f3e9e];var _0x4e1175={'id':_0x453a53['id'],'available':_0x453a53[_0x9b46('0x52')],'loggedIn':_0x453a53['loggedIn'],'name':_0x453a53[_0x9b46('0x4c')],'paused':_0x453a53[_0x9b46('0x4d')],'waiting':_0x453a53['waiting']};_0x4ea405['push'](_0x4e1175);}}_0xb3e39e({'count':_0x4ea405['length'],'rows':_0x4ea405});});},'FaxQueues':function(){return new Promise(function(_0x2978aa){var _0x4a4e9a=[];for(var _0x56b870 in _0x467086[_0x9b46('0x54')]){if(_0x467086[_0x9b46('0x54')][_0x9b46('0x46')](_0x56b870)){var _0x1fa19d=_0x467086['faxQueues'][_0x56b870];var _0x46a294={'id':_0x1fa19d['id'],'available':_0x1fa19d[_0x9b46('0x52')],'loggedIn':_0x1fa19d[_0x9b46('0x4f')],'name':_0x1fa19d['name'],'paused':_0x1fa19d['paused'],'waiting':_0x1fa19d[_0x9b46('0x50')]};_0x4a4e9a[_0x9b46('0x1b')](_0x46a294);}}_0x2978aa({'count':_0x4a4e9a[_0x9b46('0x1d')],'rows':_0x4a4e9a});});},'WhatsappQueues':function(){return new Promise(function(_0x4fa1ad){var _0x2f60a3=[];for(var _0x3a1e1e in _0x467086['whatsappQueues']){if(_0x467086[_0x9b46('0x55')][_0x9b46('0x46')](_0x3a1e1e)){var _0x346a6c=_0x467086[_0x9b46('0x55')][_0x3a1e1e];var _0x4de02d={'id':_0x346a6c['id'],'available':_0x346a6c['available'],'loggedIn':_0x346a6c[_0x9b46('0x4f')],'name':_0x346a6c['name'],'paused':_0x346a6c[_0x9b46('0x4d')],'waiting':_0x346a6c[_0x9b46('0x50')]};_0x2f60a3['push'](_0x4de02d);}}_0x4fa1ad({'count':_0x2f60a3['length'],'rows':_0x2f60a3});});},'ChatQueuesWaitingInteractions':function(){return new Promise(function(_0x536083){var _0x8bf222=_['values'](_0x467086[_0x9b46('0x56')]);_0x536083({'count':_0x8bf222[_0x9b46('0x1d')],'rows':_0x8bf222});});},'MailQueuesWaitingInteractions':function(){return new Promise(function(_0x1f52c5){var _0x18006a=_['values'](_0x467086[_0x9b46('0x57')]);_0x1f52c5({'count':_0x18006a[_0x9b46('0x1d')],'rows':_0x18006a});});},'OpenchannelQueuesWaitingInteractions':function(){return new Promise(function(_0xf1bc8d){var _0x195cf0=_[_0x9b46('0x49')](_0x467086['openchannelQueuesWaitingInteractions']);_0xf1bc8d({'count':_0x195cf0[_0x9b46('0x1d')],'rows':_0x195cf0});});},'SmsQueuesWaitingInteractions':function(){return new Promise(function(_0x591820){var _0x254c71=_[_0x9b46('0x49')](_0x467086['smsQueuesWaitingInteractions']);_0x591820({'count':_0x254c71[_0x9b46('0x1d')],'rows':_0x254c71});});},'FaxQueuesWaitingInteractions':function(){return new Promise(function(_0x4ffaee){var _0x3c0b46=_[_0x9b46('0x49')](_0x467086['faxQueuesWaitingInteractions']);_0x4ffaee({'count':_0x3c0b46[_0x9b46('0x1d')],'rows':_0x3c0b46});});},'WhatsappQueuesWaitingInteractions':function(){return new Promise(function(_0x526e70){var _0x2cbca2=_[_0x9b46('0x49')](_0x467086[_0x9b46('0x58')]);_0x526e70({'count':_0x2cbca2['length'],'rows':_0x2cbca2});});}};var _0xe27fd6=jayson[_0x9b46('0x59')](_0x2e70c3)[_0x9b46('0x5a')]();_0xe27fd6['on'](_0x9b46('0x30'),function(_0x48f236){logger[_0x9b46('0x30')](JSON['stringify'](_0x48f236));return _0x2136bc(_0x48f236);});_0xe27fd6[_0x9b46('0x11')](0x232c,_0x9b46('0x5b'),function(){console[_0x9b46('0x5c')](_0x9b46('0x5d'),0x232c);return _0x35c5c1(_0x9b46('0x5e')+0x232c);});});};
\ No newline at end of file
+var _0x804d=['checkWaitingNotifications','applications','isArray','length','existsSync','join','app','appdata','split','push','slice','dialogflowv2','amazonlex','tag','TagId','account','notificationTemplate','ContactId','body','./interval','condition','./applications/','consequence','priority','Push\x20new\x20rule','on\x20interval','intervals','\x20|\x20','.js','execute','info','Applications\x20executed','stringify','emit','complete','error','stack','routing\x20is\x20empty','agent','agents','busy','busyQueue','end','update','UserId','catch','error\x20update\x20queue\x20report','message\x20is\x20empty','capacity','hasOwnProperty','CurrentCapacity','updateRealtime','agent\x20not\x20found','values','find','chatQueues','loggedIn','paused','waiting','mailQueues','available','name','openchannelQueues','smsQueues','faxQueues','whatsappQueues','chatQueuesWaitingInteractions','openchannelQueuesWaitingInteractions','faxQueuesWaitingInteractions','whatsappQueuesWaitingInteractions','server','http','listen','127.0.0.1','log','Routing\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!','lodash','util','path','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','format','%s.%s.%s','isNil','IntervalId','map','interval','rules','channel','message','interaction'];(function(_0x1289f9,_0x57b011){var _0x6edf7b=function(_0x172cfa){while(--_0x172cfa){_0x1289f9['push'](_0x1289f9['shift']());}};_0x6edf7b(++_0x57b011);}(_0x804d,0x116));var _0xd804=function(_0x291b77,_0x36b1c2){_0x291b77=_0x291b77-0x0;var _0x138495=_0x804d[_0x291b77];return _0x138495;};'use strict';var _=require(_0xd804('0x0'));var util=require(_0xd804('0x1'));var path=require(_0xd804('0x2'));var fs=require('fs');var jayson=require(_0xd804('0x3'));var BPromise=require(_0xd804('0x4'));var utils=require(_0xd804('0x5'));var sUtils=require(_0xd804('0x6'));var logger=require(_0xd804('0x7'))('routing');var rpc={'openchannelQueueReport':require(_0xd804('0x8')),'mailQueueReport':require(_0xd804('0x9')),'chatQueueReport':require(_0xd804('0xa')),'smsQueueReport':require(_0xd804('0xb')),'faxQueueReport':require(_0xd804('0xc')),'whatsappQueueReport':require(_0xd804('0xd'))};var RuleEngine=require(_0xd804('0xe'));function getId(_0x391e2b,_0x2c3ae6,_0x2ff6a4){return util[_0xd804('0xf')](_0xd804('0x10'),_0x391e2b,_0x2c3ae6||0x0,_0x2ff6a4||0x0);}function getIntervals(_0x4d12bd,_0x321d86){var _0x2d2434=[];if(!_[_0xd804('0x11')](_0x321d86[_0xd804('0x12')])&&!_['isNil'](_0x4d12bd[_0x321d86['IntervalId']])&&!_[_0xd804('0x11')](_0x4d12bd[_0x321d86[_0xd804('0x12')]]['Intervals'])){_0x2d2434=_[_0xd804('0x13')](_0x4d12bd[_0x321d86[_0xd804('0x12')]]['Intervals'],_0xd804('0x14'));}else if(!_[_0xd804('0x11')](_0x321d86[_0xd804('0x14')])){_0x2d2434=[_0x321d86['interval']];}return _0x2d2434;}exports['listen']=function(_0x31b189){_0x31b189[_0xd804('0x15')]={};return new BPromise(function(_0xcec83,_0x1f8142){var _0x12359a={'Start':function(_0x5ee270){var _0x18c4a0=this;return new Promise(function(_0x30be96,_0x597be3){if(_0x5ee270){try{var _0x13116e=[];var _0x1a10c7=getId(_0x5ee270[_0xd804('0x16')],_0x5ee270['message']?_0x5ee270[_0xd804('0x17')]['id']:0x0,_0x5ee270['interaction']?_0x5ee270[_0xd804('0x18')]['id']:0x0);var _0x2a5170=sUtils[_0xd804('0x19')](_0x31b189,_0x5ee270);if(_0x5ee270['transfer']||!_0x2a5170&&_0x5ee270[_0xd804('0x1a')]&&_[_0xd804('0x1b')](_0x5ee270[_0xd804('0x1a')])&&_0x5ee270[_0xd804('0x1a')][_0xd804('0x1c')]){for(var _0x5d29d1=0x0;_0x5d29d1<_0x5ee270['applications'][_0xd804('0x1c')];_0x5d29d1+=0x1){var _0x5425f0=_0x5ee270[_0xd804('0x1a')][_0x5d29d1];if(fs[_0xd804('0x1d')](path[_0xd804('0x1e')](__dirname,'applications',_0x5425f0[_0xd804('0x1f')]+'.js'))){var _0x18d28c=[];switch(_0x5425f0['app']['toLowerCase']()){case'autoreply':var _0x51b191=_0x5425f0[_0xd804('0x20')][_0xd804('0x21')](',');if(_0x5ee270[_0xd804('0x16')]==='mail'){_0x18d28c[_0xd804('0x22')](_0x51b191[0x0]);_0x18d28c[_0xd804('0x22')](_0x51b191[0x1]);_0x18d28c[_0xd804('0x22')](_0x51b191[_0xd804('0x23')](0x2,_0x51b191['length'])[_0xd804('0x1e')](','));}else{_0x18d28c[_0xd804('0x22')](_0x51b191[0x0]);_0x18d28c['push'](_0x51b191[_0xd804('0x23')](0x1,_0x51b191[_0xd804('0x1c')])['join'](','));}break;case'dialogflow':var _0x4b040a=_0x5425f0[_0xd804('0x20')][_0xd804('0x21')](',');_0x18d28c[_0xd804('0x22')](_0x4b040a[0x0]);_0x18d28c['push'](_0x4b040a[0x1]);_0x18d28c[_0xd804('0x22')](_0x4b040a[_0xd804('0x23')](0x2,_0x4b040a[_0xd804('0x1c')])[_0xd804('0x1e')](','));break;case _0xd804('0x24'):var _0x26ffc8=_0x5425f0[_0xd804('0x20')][_0xd804('0x21')](',');_0x18d28c['push'](_0x26ffc8[0x0]);_0x18d28c[_0xd804('0x22')](_0x26ffc8[0x1]);_0x18d28c[_0xd804('0x22')](_0x26ffc8[0x2]);_0x18d28c[_0xd804('0x22')](_0x26ffc8[0x3]);_0x18d28c[_0xd804('0x22')](_0x26ffc8[_0xd804('0x23')](0x4,_0x26ffc8[_0xd804('0x1c')])[_0xd804('0x1e')](','));break;case _0xd804('0x25'):var _0x26a7f1=_0x5425f0[_0xd804('0x20')]['split'](',');_0x18d28c['push'](_0x26a7f1[0x0]);_0x18d28c[_0xd804('0x22')](_0x26a7f1[0x1]);_0x18d28c[_0xd804('0x22')](_0x26a7f1[0x2]);_0x18d28c['push'](_0x26a7f1[0x3]);_0x18d28c['push'](_0x26a7f1[_0xd804('0x23')](0x4,_0x26a7f1['length'])['join'](','));break;case _0xd804('0x17'):_0x18d28c[_0xd804('0x22')](_0x5425f0[_0xd804('0x20')]);break;case _0xd804('0x26'):_0x18d28c[_0xd804('0x22')](_0x5425f0[_0xd804('0x27')]);_0x18d28c[_0xd804('0x22')](_0x5425f0[_0xd804('0x20')]);break;case'tvox':var _0x329cab=utils['getMustacheRender'](_0x5ee270[_0xd804('0x28')][_0xd804('0x29')],_0x5ee270);var _0x22a785=_0x5425f0[_0xd804('0x20')][_0xd804('0x21')](',');_0x18d28c['push'](_0x22a785[0x0]);_0x18d28c['push'](_0x22a785[0x1]);_0x18d28c['push'](_0x22a785[0x2]);_0x18d28c[_0xd804('0x22')](_0x22a785[0x3]);_0x18d28c['push'](_0x22a785[0x4]);_0x18d28c[_0xd804('0x22')](_0x22a785[0x5]);_0x18d28c[_0xd804('0x22')](_0x22a785[0x6]);_0x18d28c[_0xd804('0x22')](_0x22a785[0x7]);_0x18d28c[_0xd804('0x22')](_0x22a785[0x8]);_0x18d28c[_0xd804('0x22')](_0x22a785[0x9]);_0x18d28c['push'](_0x22a785[0xa]);_0x18d28c['push'](_0x5ee270[_0xd804('0x18')]['id']);_0x18d28c[_0xd804('0x22')](_0x5ee270[_0xd804('0x17')]['id']);_0x18d28c[_0xd804('0x22')](_0x5425f0['ChatWebsiteId']);_0x18d28c['push'](_0x5ee270[_0xd804('0x18')][_0xd804('0x2a')]);_0x18d28c[_0xd804('0x22')](_0x5ee270[_0xd804('0x2b')]['body']);_0x18d28c['push'](_0x329cab);break;default:_0x18d28c=_['isNil'](_0x5425f0[_0xd804('0x20')])?[]:_0x5425f0[_0xd804('0x20')][_0xd804('0x21')](',');}var _0x518beb={'id':util[_0xd804('0xf')]('%s:%s:%s',_0x1a10c7,_0x5425f0['id'],_0x5425f0[_0xd804('0x1f')]),'condition':require(_0xd804('0x2c'))[_0xd804('0x2d')](_0x1a10c7,getIntervals(_0x31b189['intervals'],_0x5425f0),_0x31b189),'consequence':require(_0xd804('0x2e')+_0x5425f0[_0xd804('0x1f')])[_0xd804('0x2f')](_0x1a10c7,_0x18d28c,_0x31b189,_0x5ee270),'p':_0x5425f0[_0xd804('0x30')]||0x0};logger['info'](_0xd804('0x31'),_0x518beb['id'],_0xd804('0x32'),getIntervals(_0x31b189[_0xd804('0x33')],_0x5425f0)[_0xd804('0x1e')](_0xd804('0x34')));_0x13116e[_0xd804('0x22')](_0x518beb);}else{logger['error']('Please\x20create\x20a\x20new\x20file\x20under',path[_0xd804('0x1e')](__dirname,'applications',_0x5425f0[_0xd804('0x1f')]+_0xd804('0x35')));}}_0x31b189[_0xd804('0x15')][_0x1a10c7]=new RuleEngine(_0x13116e);_0x31b189[_0xd804('0x15')][_0x1a10c7][_0xd804('0x36')](_0x5ee270,function(_0x1f4da7){logger[_0xd804('0x37')](_0xd804('0x38'),JSON[_0xd804('0x39')](_0x1f4da7['matchPath']));if(_0x31b189['rules'][_0x1a10c7]){_0x31b189[_0xd804('0x15')][_0x1a10c7][_0xd804('0x3a')](_0xd804('0x3b'));}});return _0x30be96({'code':0xc8,'message':_0x5ee270});}else{if(_0x2a5170){logger[_0xd804('0x37')](util['format']('Skipped\x20routing\x20for\x20%s',_0x1a10c7));}else{logger[_0xd804('0x37')]('No\x20applications\x20to\x20execute');}return _0x30be96({'code':0xc8,'message':_0x5ee270});}}catch(_0x1ff4cc){logger[_0xd804('0x3c')](_0x1ff4cc[_0xd804('0x3d')]);return _0x597be3(_0x18c4a0[_0xd804('0x3c')](0x1f4,_0x1ff4cc));}}return _0x597be3(_0xd804('0x3e'));});},'AcceptMessage':function(_0x1d334d){var _0x38a454=this;return new Promise(function(_0x2bf040,_0x4cf155){if(_0x1d334d[_0xd804('0x3f')]&&_0x1d334d[_0xd804('0x3f')]['id']){if(_0x31b189['agents'][_0x1d334d[_0xd804('0x3f')]['id']]){_0x31b189[_0xd804('0x40')][_0x1d334d['agent']['id']][_0xd804('0x41')]=![];_0x31b189['agents'][_0x1d334d[_0xd804('0x3f')]['id']][_0xd804('0x42')]=undefined;}}if(_0x1d334d['message']&&_0x1d334d[_0xd804('0x17')]['id']){try{var _0x140b84=getId(_0x1d334d['channel'],_0x1d334d[_0xd804('0x17')]?_0x1d334d[_0xd804('0x17')]['id']:0x0,_0x1d334d[_0xd804('0x18')]?_0x1d334d[_0xd804('0x18')]['id']:0x0);if(_0x31b189[_0xd804('0x15')][_0x140b84]){_0x31b189[_0xd804('0x15')][_0x140b84][_0xd804('0x3a')](_0xd804('0x43'));if(rpc[_0x1d334d[_0xd804('0x16')]+'QueueReport']){rpc[_0x1d334d[_0xd804('0x16')]+'QueueReport'][_0xd804('0x44')](_0x140b84,{'UserId':_0x1d334d[_0xd804('0x17')][_0xd804('0x45')]})[_0xd804('0x46')](function(){logger[_0xd804('0x3c')](_0xd804('0x47'));});}}return _0x2bf040({'code':0xc8,'message':_0x1d334d});}catch(_0x4399fc){logger[_0xd804('0x3c')](_0x4399fc[_0xd804('0x3d')]);return _0x4cf155(_0x38a454['error'](0x1f4,_0x4399fc));}}logger[_0xd804('0x3c')](_0xd804('0x48'));return _0x4cf155(_0x38a454['error'](0x1f4,_0xd804('0x48')));});},'RejectMessage':function(_0x39fb9a){var _0x4584ea=this;return new Promise(function(_0x5139ee,_0x3d1e48){if(_0x39fb9a[_0xd804('0x3f')]&&_0x39fb9a[_0xd804('0x3f')]['id']){try{if(_0x31b189[_0xd804('0x40')][_0x39fb9a['agent']['id']]){_0x31b189['agents'][_0x39fb9a[_0xd804('0x3f')]['id']][_0xd804('0x41')]=![];_0x31b189[_0xd804('0x40')][_0x39fb9a[_0xd804('0x3f')]['id']][_0xd804('0x42')]=undefined;}return _0x5139ee({'code':0xc8,'message':_0x39fb9a});}catch(_0x212b6c){logger[_0xd804('0x3c')](_0x212b6c[_0xd804('0x3d')]);return _0x3d1e48(_0x4584ea[_0xd804('0x3c')](0x1f4,_0x212b6c));}}logger['error'](_0xd804('0x48'));return _0x3d1e48(_0x4584ea['error'](0x1f4,_0xd804('0x48')));});},'AbandonInteraction':function(_0x36514b){var _0x39b3f4=this;return new Promise(function(_0x9203e5,_0x4f710d){if(_0x36514b[_0xd804('0x16')]&&_0x36514b[_0xd804('0x18')]&&_0x36514b[_0xd804('0x18')]['id']){try{var _0x3c3405=getId(_0x36514b[_0xd804('0x16')],_0x36514b['message']?_0x36514b[_0xd804('0x17')]['id']:0x0,_0x36514b[_0xd804('0x18')]?_0x36514b[_0xd804('0x18')]['id']:0x0);if(_0x31b189[_0xd804('0x15')][_0x3c3405]){_0x31b189[_0xd804('0x15')][_0x3c3405][_0xd804('0x3a')](_0xd804('0x43'));}return _0x9203e5({'code':0xc8,'message':_0x36514b});}catch(_0x55eee9){logger['error'](_0x55eee9[_0xd804('0x3d')]);return _0x4f710d(_0x39b3f4[_0xd804('0x3c')](0x1f4,_0x55eee9));}}logger[_0xd804('0x3c')]('message\x20is\x20empty');return _0x4f710d(_0x39b3f4[_0xd804('0x3c')](0x1f4,_0xd804('0x48')));});},'AgentCapacity':function(_0x2ce7c8){var _0x29777c=this;return new Promise(function(_0x34d09f,_0x4786aa){if(_0x31b189[_0xd804('0x40')]['hasOwnProperty'](_0x2ce7c8['id'])){for(var _0xc8dc44 in _0x2ce7c8[_0xd804('0x49')]){if(_0x2ce7c8[_0xd804('0x49')]['hasOwnProperty'](_0xc8dc44)){if(_0x31b189[_0xd804('0x40')][_0x2ce7c8['id']][_0xd804('0x4a')](_0xc8dc44+_0xd804('0x4b'))){_0x31b189[_0xd804('0x40')][_0x2ce7c8['id']][_0xc8dc44+_0xd804('0x4b')]=parseInt(_0x2ce7c8['capacity'][_0xc8dc44],0xa);}}}_0x31b189[_0xd804('0x40')][_0x2ce7c8['id']][_0xd804('0x4c')]();return _0x34d09f({'code':0xc8,'message':_0x31b189[_0xd804('0x40')][_0x2ce7c8['id']]});}else{return _0x4786aa(_0x29777c['error'](0x1f4,_0xd804('0x4d')));}});},'Agents':function(_0x442c61){return new Promise(function(_0x5e004d){var _0x5eefc8=_[_0xd804('0x4e')](_0x31b189[_0xd804('0x40')]);if(_0x442c61&&_0x442c61['id']){var _0xa8b18=_[_0xd804('0x4f')](_0x5eefc8,function(_0xdbb0d5){return _0xdbb0d5['id']===_0x442c61['id'];});_0x5e004d(_0xa8b18);}else{_0x5e004d({'count':_0x5eefc8[_0xd804('0x1c')],'rows':_0x5eefc8});}});},'ChatQueues':function(){return new Promise(function(_0x37aa4d){var _0x1f5e02=[];for(var _0xa6e3d2 in _0x31b189['chatQueues']){if(_0x31b189[_0xd804('0x50')][_0xd804('0x4a')](_0xa6e3d2)){var _0x2d5013=_0x31b189[_0xd804('0x50')][_0xa6e3d2];var _0x31e9eb={'id':_0x2d5013['id'],'available':_0x2d5013['available'],'loggedIn':_0x2d5013[_0xd804('0x51')],'name':_0x2d5013['name'],'paused':_0x2d5013[_0xd804('0x52')],'waiting':_0x2d5013[_0xd804('0x53')]};_0x1f5e02[_0xd804('0x22')](_0x31e9eb);}}_0x37aa4d({'count':_0x1f5e02[_0xd804('0x1c')],'rows':_0x1f5e02});});},'MailQueues':function(){return new Promise(function(_0x57627a){var _0x3a413d=[];for(var _0x27e25d in _0x31b189[_0xd804('0x54')]){if(_0x31b189[_0xd804('0x54')][_0xd804('0x4a')](_0x27e25d)){var _0x821f3f=_0x31b189[_0xd804('0x54')][_0x27e25d];var _0x2fffee={'id':_0x821f3f['id'],'available':_0x821f3f[_0xd804('0x55')],'loggedIn':_0x821f3f[_0xd804('0x51')],'name':_0x821f3f[_0xd804('0x56')],'paused':_0x821f3f[_0xd804('0x52')],'waiting':_0x821f3f[_0xd804('0x53')]};_0x3a413d[_0xd804('0x22')](_0x2fffee);}}_0x57627a({'count':_0x3a413d[_0xd804('0x1c')],'rows':_0x3a413d});});},'OpenchannelQueues':function(){return new Promise(function(_0x3fce66){var _0x439e5e=[];for(var _0xf99bed in _0x31b189[_0xd804('0x57')]){if(_0x31b189[_0xd804('0x57')]['hasOwnProperty'](_0xf99bed)){var _0x5293a3=_0x31b189[_0xd804('0x57')][_0xf99bed];var _0x1c9b7c={'id':_0x5293a3['id'],'available':_0x5293a3[_0xd804('0x55')],'loggedIn':_0x5293a3[_0xd804('0x51')],'name':_0x5293a3[_0xd804('0x56')],'paused':_0x5293a3[_0xd804('0x52')],'waiting':_0x5293a3[_0xd804('0x53')]};_0x439e5e['push'](_0x1c9b7c);}}_0x3fce66({'count':_0x439e5e[_0xd804('0x1c')],'rows':_0x439e5e});});},'SmsQueues':function(){return new Promise(function(_0x1056f3){var _0x4e8e0c=[];for(var _0x192dc8 in _0x31b189['smsQueues']){if(_0x31b189['smsQueues']['hasOwnProperty'](_0x192dc8)){var _0x2a80e2=_0x31b189[_0xd804('0x58')][_0x192dc8];var _0x134973={'id':_0x2a80e2['id'],'available':_0x2a80e2['available'],'loggedIn':_0x2a80e2[_0xd804('0x51')],'name':_0x2a80e2[_0xd804('0x56')],'paused':_0x2a80e2[_0xd804('0x52')],'waiting':_0x2a80e2['waiting']};_0x4e8e0c[_0xd804('0x22')](_0x134973);}}_0x1056f3({'count':_0x4e8e0c['length'],'rows':_0x4e8e0c});});},'FaxQueues':function(){return new Promise(function(_0x412c5b){var _0x1507aa=[];for(var _0x1b641a in _0x31b189[_0xd804('0x59')]){if(_0x31b189[_0xd804('0x59')]['hasOwnProperty'](_0x1b641a)){var _0x5bf18c=_0x31b189[_0xd804('0x59')][_0x1b641a];var _0x561f3f={'id':_0x5bf18c['id'],'available':_0x5bf18c['available'],'loggedIn':_0x5bf18c[_0xd804('0x51')],'name':_0x5bf18c[_0xd804('0x56')],'paused':_0x5bf18c['paused'],'waiting':_0x5bf18c[_0xd804('0x53')]};_0x1507aa[_0xd804('0x22')](_0x561f3f);}}_0x412c5b({'count':_0x1507aa['length'],'rows':_0x1507aa});});},'WhatsappQueues':function(){return new Promise(function(_0xca392b){var _0x45da24=[];for(var _0x3a8e12 in _0x31b189['whatsappQueues']){if(_0x31b189[_0xd804('0x5a')]['hasOwnProperty'](_0x3a8e12)){var _0x502b72=_0x31b189[_0xd804('0x5a')][_0x3a8e12];var _0x357b6e={'id':_0x502b72['id'],'available':_0x502b72[_0xd804('0x55')],'loggedIn':_0x502b72[_0xd804('0x51')],'name':_0x502b72[_0xd804('0x56')],'paused':_0x502b72[_0xd804('0x52')],'waiting':_0x502b72[_0xd804('0x53')]};_0x45da24[_0xd804('0x22')](_0x357b6e);}}_0xca392b({'count':_0x45da24[_0xd804('0x1c')],'rows':_0x45da24});});},'ChatQueuesWaitingInteractions':function(){return new Promise(function(_0x15225c){var _0x624aad=_[_0xd804('0x4e')](_0x31b189[_0xd804('0x5b')]);_0x15225c({'count':_0x624aad[_0xd804('0x1c')],'rows':_0x624aad});});},'MailQueuesWaitingInteractions':function(){return new Promise(function(_0xaf528f){var _0x464cf3=_['values'](_0x31b189['mailQueuesWaitingInteractions']);_0xaf528f({'count':_0x464cf3[_0xd804('0x1c')],'rows':_0x464cf3});});},'OpenchannelQueuesWaitingInteractions':function(){return new Promise(function(_0x21af3d){var _0x5a4a59=_['values'](_0x31b189[_0xd804('0x5c')]);_0x21af3d({'count':_0x5a4a59[_0xd804('0x1c')],'rows':_0x5a4a59});});},'SmsQueuesWaitingInteractions':function(){return new Promise(function(_0x4f6794){var _0xf7770e=_[_0xd804('0x4e')](_0x31b189['smsQueuesWaitingInteractions']);_0x4f6794({'count':_0xf7770e['length'],'rows':_0xf7770e});});},'FaxQueuesWaitingInteractions':function(){return new Promise(function(_0x583b08){var _0x45d779=_['values'](_0x31b189[_0xd804('0x5d')]);_0x583b08({'count':_0x45d779[_0xd804('0x1c')],'rows':_0x45d779});});},'WhatsappQueuesWaitingInteractions':function(){return new Promise(function(_0x5d28d6){var _0x105a37=_['values'](_0x31b189[_0xd804('0x5e')]);_0x5d28d6({'count':_0x105a37[_0xd804('0x1c')],'rows':_0x105a37});});}};var _0x1a1a2d=jayson[_0xd804('0x5f')](_0x12359a)[_0xd804('0x60')]();_0x1a1a2d['on'](_0xd804('0x3c'),function(_0xffde80){logger[_0xd804('0x3c')](JSON[_0xd804('0x39')](_0xffde80));return _0x1f8142(_0xffde80);});_0x1a1a2d[_0xd804('0x61')](0x232c,_0xd804('0x62'),function(){console[_0xd804('0x63')](_0xd804('0x64'),0x232c);return _0xcec83('RPC\x20listening\x20on\x20port:'+0x232c);});});};
\ No newline at end of file