Built motion from commit dc14b02d.|2.6.27
[motion2.git] / server / services / routing / server / index.js
index 3d723fb..99e3a59 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd943=['agent','agents','busy','busyQueue','emit','end','QueueReport','update','UserId','error\x20update\x20queue\x20report','message\x20is\x20empty','hasOwnProperty','capacity','CurrentCapacity','updateRealtime','agent\x20not\x20found','values','find','chatQueues','available','loggedIn','paused','waiting','mailQueues','openchannelQueues','smsQueues','name','faxQueues','whatsappQueues','openchannelQueuesWaitingInteractions','smsQueuesWaitingInteractions','faxQueuesWaitingInteractions','whatsappQueuesWaitingInteractions','server','http','listen','127.0.0.1','log','Routing\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!','RPC\x20listening\x20on\x20port:','lodash','util','path','jayson/promise','./applications/utils','./applications/strategy/util','../../../config/logger','routing','../rpc/openchannelQueueReport','../rpc/smsQueueReport','%s.%s.%s','isNil','IntervalId','Intervals','map','interval','rules','channel','message','interaction','checkWaitingNotifications','transfer','applications','length','join','app','toLowerCase','autoreply','appdata','split','mail','push','slice','dialogflow','dialogflowv2','amazonlex','TagId','tvox','getMustacheRender','account','notificationTemplate','ChatWebsiteId','ContactId','body','./interval','condition','intervals','./applications/','consequence','Push\x20new\x20rule','on\x20interval','error','Please\x20create\x20a\x20new\x20file\x20under','.js','stringify','matchPath','complete','format','Skipped\x20routing\x20for\x20%s','info','No\x20applications\x20to\x20execute','stack','routing\x20is\x20empty'];(function(_0x3b380d,_0x4bf247){var _0x54502b=function(_0x35d207){while(--_0x35d207){_0x3b380d['push'](_0x3b380d['shift']());}};_0x54502b(++_0x4bf247);}(_0xd943,0x15d));var _0x3d94=function(_0x58ed0c,_0x5b5b0a){_0x58ed0c=_0x58ed0c-0x0;var _0x25915a=_0xd943[_0x58ed0c];return _0x25915a;};'use strict';var _=require(_0x3d94('0x0'));var util=require(_0x3d94('0x1'));var path=require(_0x3d94('0x2'));var fs=require('fs');var jayson=require(_0x3d94('0x3'));var BPromise=require('bluebird');var utils=require(_0x3d94('0x4'));var sUtils=require(_0x3d94('0x5'));var logger=require(_0x3d94('0x6'))(_0x3d94('0x7'));var rpc={'openchannelQueueReport':require(_0x3d94('0x8')),'mailQueueReport':require('../rpc/mailQueueReport'),'chatQueueReport':require('../rpc/chatQueueReport'),'smsQueueReport':require(_0x3d94('0x9')),'faxQueueReport':require('../rpc/faxQueueReport'),'whatsappQueueReport':require('../rpc/whatsappQueueReport')};var RuleEngine=require('../lib/rule-engine');function getId(_0x20f4d1,_0x35d36a,_0x5244c3){return util['format'](_0x3d94('0xa'),_0x20f4d1,_0x35d36a||0x0,_0x5244c3||0x0);}function getIntervals(_0x27e381,_0x1cc58c){var _0x5908a7=[];if(!_[_0x3d94('0xb')](_0x1cc58c['IntervalId'])&&!_[_0x3d94('0xb')](_0x27e381[_0x1cc58c[_0x3d94('0xc')]])&&!_['isNil'](_0x27e381[_0x1cc58c[_0x3d94('0xc')]][_0x3d94('0xd')])){_0x5908a7=_[_0x3d94('0xe')](_0x27e381[_0x1cc58c[_0x3d94('0xc')]][_0x3d94('0xd')],'interval');}else if(!_[_0x3d94('0xb')](_0x1cc58c[_0x3d94('0xf')])){_0x5908a7=[_0x1cc58c[_0x3d94('0xf')]];}return _0x5908a7;}exports['listen']=function(_0x24e8b9){_0x24e8b9[_0x3d94('0x10')]={};return new BPromise(function(_0x7d6969,_0x5d9366){var _0x14ea5f={'Start':function(_0x340818){var _0x292419=this;return new Promise(function(_0x34098e,_0xaf939a){if(_0x340818){try{var _0xd8efaa=[];var _0x31c6e8=getId(_0x340818[_0x3d94('0x11')],_0x340818['message']?_0x340818[_0x3d94('0x12')]['id']:0x0,_0x340818[_0x3d94('0x13')]?_0x340818[_0x3d94('0x13')]['id']:0x0);var _0x1c35a8=sUtils[_0x3d94('0x14')](_0x24e8b9,_0x340818);if(_0x340818[_0x3d94('0x15')]||!_0x1c35a8&&_0x340818[_0x3d94('0x16')]&&_['isArray'](_0x340818[_0x3d94('0x16')])&&_0x340818['applications'][_0x3d94('0x17')]){for(var _0x193934=0x0;_0x193934<_0x340818[_0x3d94('0x16')][_0x3d94('0x17')];_0x193934+=0x1){var _0x35a3cc=_0x340818['applications'][_0x193934];if(fs['existsSync'](path[_0x3d94('0x18')](__dirname,_0x3d94('0x16'),_0x35a3cc[_0x3d94('0x19')]+'.js'))){var _0x30af25=[];switch(_0x35a3cc[_0x3d94('0x19')][_0x3d94('0x1a')]()){case _0x3d94('0x1b'):var _0x395133=_0x35a3cc[_0x3d94('0x1c')][_0x3d94('0x1d')](',');if(_0x340818[_0x3d94('0x11')]===_0x3d94('0x1e')){_0x30af25[_0x3d94('0x1f')](_0x395133[0x0]);_0x30af25[_0x3d94('0x1f')](_0x395133[0x1]);_0x30af25[_0x3d94('0x1f')](_0x395133[_0x3d94('0x20')](0x2,_0x395133[_0x3d94('0x17')])[_0x3d94('0x18')](','));}else{_0x30af25['push'](_0x395133[0x0]);_0x30af25[_0x3d94('0x1f')](_0x395133['slice'](0x1,_0x395133[_0x3d94('0x17')])[_0x3d94('0x18')](','));}break;case _0x3d94('0x21'):var _0x439173=_0x35a3cc[_0x3d94('0x1c')][_0x3d94('0x1d')](',');_0x30af25[_0x3d94('0x1f')](_0x439173[0x0]);_0x30af25['push'](_0x439173[0x1]);_0x30af25['push'](_0x439173[_0x3d94('0x20')](0x2,_0x439173['length'])['join'](','));break;case _0x3d94('0x22'):var _0x58c0d0=_0x35a3cc[_0x3d94('0x1c')][_0x3d94('0x1d')](',');_0x30af25[_0x3d94('0x1f')](_0x58c0d0[0x0]);_0x30af25['push'](_0x58c0d0[0x1]);_0x30af25[_0x3d94('0x1f')](_0x58c0d0[0x2]);_0x30af25['push'](_0x58c0d0[0x3]);_0x30af25[_0x3d94('0x1f')](_0x58c0d0['slice'](0x4,_0x58c0d0[_0x3d94('0x17')])[_0x3d94('0x18')](','));break;case _0x3d94('0x23'):var _0x246f88=_0x35a3cc['appdata'][_0x3d94('0x1d')](',');_0x30af25['push'](_0x246f88[0x0]);_0x30af25[_0x3d94('0x1f')](_0x246f88[0x1]);_0x30af25[_0x3d94('0x1f')](_0x246f88[0x2]);_0x30af25['push'](_0x246f88[0x3]);_0x30af25['push'](_0x246f88[_0x3d94('0x20')](0x4,_0x246f88[_0x3d94('0x17')])[_0x3d94('0x18')](','));break;case'message':_0x30af25[_0x3d94('0x1f')](_0x35a3cc[_0x3d94('0x1c')]);break;case'tag':_0x30af25[_0x3d94('0x1f')](_0x35a3cc[_0x3d94('0x24')]);_0x30af25[_0x3d94('0x1f')](_0x35a3cc[_0x3d94('0x1c')]);break;case _0x3d94('0x25'):var _0x4d55ff=utils[_0x3d94('0x26')](_0x340818[_0x3d94('0x27')][_0x3d94('0x28')],_0x340818);var _0x52bdb9=_0x35a3cc[_0x3d94('0x1c')][_0x3d94('0x1d')](',');_0x30af25['push'](_0x52bdb9[0x0]);_0x30af25['push'](_0x52bdb9[0x1]);_0x30af25[_0x3d94('0x1f')](_0x52bdb9[0x2]);_0x30af25[_0x3d94('0x1f')](_0x52bdb9[0x3]);_0x30af25[_0x3d94('0x1f')](_0x52bdb9[0x4]);_0x30af25[_0x3d94('0x1f')](_0x52bdb9[0x5]);_0x30af25[_0x3d94('0x1f')](_0x52bdb9[0x6]);_0x30af25[_0x3d94('0x1f')](_0x52bdb9[0x7]);_0x30af25[_0x3d94('0x1f')](_0x52bdb9[0x8]);_0x30af25[_0x3d94('0x1f')](_0x52bdb9[0x9]);_0x30af25[_0x3d94('0x1f')](_0x52bdb9[0xa]);_0x30af25[_0x3d94('0x1f')](_0x340818['interaction']['id']);_0x30af25[_0x3d94('0x1f')](_0x340818[_0x3d94('0x12')]['id']);_0x30af25[_0x3d94('0x1f')](_0x35a3cc[_0x3d94('0x29')]);_0x30af25['push'](_0x340818[_0x3d94('0x13')][_0x3d94('0x2a')]);_0x30af25[_0x3d94('0x1f')](_0x340818[_0x3d94('0x2b')][_0x3d94('0x2b')]);_0x30af25['push'](_0x4d55ff);break;default:_0x30af25=_[_0x3d94('0xb')](_0x35a3cc[_0x3d94('0x1c')])?[]:_0x35a3cc[_0x3d94('0x1c')]['split'](',');}var _0x4eee4d={'id':util['format']('%s:%s:%s',_0x31c6e8,_0x35a3cc['id'],_0x35a3cc[_0x3d94('0x19')]),'condition':require(_0x3d94('0x2c'))[_0x3d94('0x2d')](_0x31c6e8,getIntervals(_0x24e8b9[_0x3d94('0x2e')],_0x35a3cc),_0x24e8b9),'consequence':require(_0x3d94('0x2f')+_0x35a3cc[_0x3d94('0x19')])[_0x3d94('0x30')](_0x31c6e8,_0x30af25,_0x24e8b9,_0x340818),'p':_0x35a3cc['priority']||0x0};logger['info'](_0x3d94('0x31'),_0x4eee4d['id'],_0x3d94('0x32'),getIntervals(_0x24e8b9['intervals'],_0x35a3cc)[_0x3d94('0x18')]('\x20|\x20'));_0xd8efaa[_0x3d94('0x1f')](_0x4eee4d);}else{logger[_0x3d94('0x33')](_0x3d94('0x34'),path[_0x3d94('0x18')](__dirname,_0x3d94('0x16'),_0x35a3cc['app']+_0x3d94('0x35')));}}_0x24e8b9[_0x3d94('0x10')][_0x31c6e8]=new RuleEngine(_0xd8efaa);_0x24e8b9[_0x3d94('0x10')][_0x31c6e8]['execute'](_0x340818,function(_0x2910ea){logger['info']('Applications\x20executed',JSON[_0x3d94('0x36')](_0x2910ea[_0x3d94('0x37')]));if(_0x24e8b9[_0x3d94('0x10')][_0x31c6e8]){_0x24e8b9[_0x3d94('0x10')][_0x31c6e8]['emit'](_0x3d94('0x38'));}});return _0x34098e({'code':0xc8,'message':_0x340818});}else{if(_0x1c35a8){logger['info'](util[_0x3d94('0x39')](_0x3d94('0x3a'),_0x31c6e8));}else{logger[_0x3d94('0x3b')](_0x3d94('0x3c'));}return _0x34098e({'code':0xc8,'message':_0x340818});}}catch(_0x20e6d4){logger[_0x3d94('0x33')](_0x20e6d4[_0x3d94('0x3d')]);return _0xaf939a(_0x292419['error'](0x1f4,_0x20e6d4));}}return _0xaf939a(_0x3d94('0x3e'));});},'AcceptMessage':function(_0x19dabb){var _0x52c82b=this;return new Promise(function(_0x53e611,_0xf8632d){if(_0x19dabb[_0x3d94('0x3f')]&&_0x19dabb['agent']['id']){if(_0x24e8b9[_0x3d94('0x40')][_0x19dabb[_0x3d94('0x3f')]['id']]){_0x24e8b9[_0x3d94('0x40')][_0x19dabb[_0x3d94('0x3f')]['id']][_0x3d94('0x41')]=![];_0x24e8b9[_0x3d94('0x40')][_0x19dabb[_0x3d94('0x3f')]['id']][_0x3d94('0x42')]=undefined;}}if(_0x19dabb[_0x3d94('0x12')]&&_0x19dabb[_0x3d94('0x12')]['id']){try{var _0x4075ef=getId(_0x19dabb[_0x3d94('0x11')],_0x19dabb[_0x3d94('0x12')]?_0x19dabb[_0x3d94('0x12')]['id']:0x0,_0x19dabb[_0x3d94('0x13')]?_0x19dabb['interaction']['id']:0x0);if(_0x24e8b9[_0x3d94('0x10')][_0x4075ef]){_0x24e8b9[_0x3d94('0x10')][_0x4075ef][_0x3d94('0x43')](_0x3d94('0x44'));if(rpc[_0x19dabb[_0x3d94('0x11')]+_0x3d94('0x45')]){rpc[_0x19dabb[_0x3d94('0x11')]+_0x3d94('0x45')][_0x3d94('0x46')](_0x4075ef,{'UserId':_0x19dabb['message'][_0x3d94('0x47')]})['catch'](function(){logger[_0x3d94('0x33')](_0x3d94('0x48'));});}}return _0x53e611({'code':0xc8,'message':_0x19dabb});}catch(_0x4af4c2){logger[_0x3d94('0x33')](_0x4af4c2['stack']);return _0xf8632d(_0x52c82b['error'](0x1f4,_0x4af4c2));}}logger[_0x3d94('0x33')]('message\x20is\x20empty');return _0xf8632d(_0x52c82b[_0x3d94('0x33')](0x1f4,_0x3d94('0x49')));});},'RejectMessage':function(_0x5b6061){var _0x426ccb=this;return new Promise(function(_0x590f77,_0x598c6a){if(_0x5b6061[_0x3d94('0x3f')]&&_0x5b6061[_0x3d94('0x3f')]['id']){try{if(_0x24e8b9[_0x3d94('0x40')][_0x5b6061[_0x3d94('0x3f')]['id']]){_0x24e8b9[_0x3d94('0x40')][_0x5b6061[_0x3d94('0x3f')]['id']][_0x3d94('0x41')]=![];_0x24e8b9[_0x3d94('0x40')][_0x5b6061[_0x3d94('0x3f')]['id']]['busyQueue']=undefined;}return _0x590f77({'code':0xc8,'message':_0x5b6061});}catch(_0x28cfbb){logger[_0x3d94('0x33')](_0x28cfbb[_0x3d94('0x3d')]);return _0x598c6a(_0x426ccb[_0x3d94('0x33')](0x1f4,_0x28cfbb));}}logger[_0x3d94('0x33')](_0x3d94('0x49'));return _0x598c6a(_0x426ccb[_0x3d94('0x33')](0x1f4,_0x3d94('0x49')));});},'AbandonInteraction':function(_0x1210b5){var _0x469122=this;return new Promise(function(_0x1fd806,_0x5eba38){if(_0x1210b5[_0x3d94('0x11')]&&_0x1210b5['interaction']&&_0x1210b5[_0x3d94('0x13')]['id']){try{var _0x3a30f7=getId(_0x1210b5[_0x3d94('0x11')],_0x1210b5[_0x3d94('0x12')]?_0x1210b5[_0x3d94('0x12')]['id']:0x0,_0x1210b5[_0x3d94('0x13')]?_0x1210b5[_0x3d94('0x13')]['id']:0x0);if(_0x24e8b9[_0x3d94('0x10')][_0x3a30f7]){_0x24e8b9[_0x3d94('0x10')][_0x3a30f7]['emit']('end');}return _0x1fd806({'code':0xc8,'message':_0x1210b5});}catch(_0x46bff3){logger['error'](_0x46bff3[_0x3d94('0x3d')]);return _0x5eba38(_0x469122[_0x3d94('0x33')](0x1f4,_0x46bff3));}}logger['error'](_0x3d94('0x49'));return _0x5eba38(_0x469122[_0x3d94('0x33')](0x1f4,_0x3d94('0x49')));});},'AgentCapacity':function(_0x467648){var _0xcefff5=this;return new Promise(function(_0x42eb81,_0xd3bb){if(_0x24e8b9['agents'][_0x3d94('0x4a')](_0x467648['id'])){for(var _0x351ea6 in _0x467648[_0x3d94('0x4b')]){if(_0x467648['capacity'][_0x3d94('0x4a')](_0x351ea6)){if(_0x24e8b9[_0x3d94('0x40')][_0x467648['id']][_0x3d94('0x4a')](_0x351ea6+_0x3d94('0x4c'))){_0x24e8b9['agents'][_0x467648['id']][_0x351ea6+'CurrentCapacity']=parseInt(_0x467648[_0x3d94('0x4b')][_0x351ea6],0xa);}}}_0x24e8b9[_0x3d94('0x40')][_0x467648['id']][_0x3d94('0x4d')]();return _0x42eb81({'code':0xc8,'message':_0x24e8b9[_0x3d94('0x40')][_0x467648['id']]});}else{return _0xd3bb(_0xcefff5['error'](0x1f4,_0x3d94('0x4e')));}});},'Agents':function(_0x1c99d1){return new Promise(function(_0x49bfb0){var _0x5ba865=_[_0x3d94('0x4f')](_0x24e8b9[_0x3d94('0x40')]);if(_0x1c99d1&&_0x1c99d1['id']){var _0x4eee2b=_[_0x3d94('0x50')](_0x5ba865,function(_0x227372){return _0x227372['id']===_0x1c99d1['id'];});_0x49bfb0(_0x4eee2b);}else{_0x49bfb0({'count':_0x5ba865[_0x3d94('0x17')],'rows':_0x5ba865});}});},'ChatQueues':function(){return new Promise(function(_0x5747a8){var _0x11eeaa=[];for(var _0x68c033 in _0x24e8b9['chatQueues']){if(_0x24e8b9['chatQueues']['hasOwnProperty'](_0x68c033)){var _0x3ac9ea=_0x24e8b9[_0x3d94('0x51')][_0x68c033];var _0x13544a={'id':_0x3ac9ea['id'],'available':_0x3ac9ea[_0x3d94('0x52')],'loggedIn':_0x3ac9ea[_0x3d94('0x53')],'name':_0x3ac9ea['name'],'paused':_0x3ac9ea[_0x3d94('0x54')],'waiting':_0x3ac9ea[_0x3d94('0x55')]};_0x11eeaa[_0x3d94('0x1f')](_0x13544a);}}_0x5747a8({'count':_0x11eeaa[_0x3d94('0x17')],'rows':_0x11eeaa});});},'MailQueues':function(){return new Promise(function(_0x28d548){var _0x13f475=[];for(var _0x59abcc in _0x24e8b9[_0x3d94('0x56')]){if(_0x24e8b9['mailQueues'][_0x3d94('0x4a')](_0x59abcc)){var _0x41d561=_0x24e8b9[_0x3d94('0x56')][_0x59abcc];var _0x393ac9={'id':_0x41d561['id'],'available':_0x41d561[_0x3d94('0x52')],'loggedIn':_0x41d561[_0x3d94('0x53')],'name':_0x41d561['name'],'paused':_0x41d561['paused'],'waiting':_0x41d561[_0x3d94('0x55')]};_0x13f475['push'](_0x393ac9);}}_0x28d548({'count':_0x13f475['length'],'rows':_0x13f475});});},'OpenchannelQueues':function(){return new Promise(function(_0x5c5fb2){var _0x3c7dc4=[];for(var _0x262a6a in _0x24e8b9[_0x3d94('0x57')]){if(_0x24e8b9[_0x3d94('0x57')][_0x3d94('0x4a')](_0x262a6a)){var _0x2e2fb0=_0x24e8b9[_0x3d94('0x57')][_0x262a6a];var _0x34ecc4={'id':_0x2e2fb0['id'],'available':_0x2e2fb0['available'],'loggedIn':_0x2e2fb0[_0x3d94('0x53')],'name':_0x2e2fb0['name'],'paused':_0x2e2fb0[_0x3d94('0x54')],'waiting':_0x2e2fb0[_0x3d94('0x55')]};_0x3c7dc4[_0x3d94('0x1f')](_0x34ecc4);}}_0x5c5fb2({'count':_0x3c7dc4['length'],'rows':_0x3c7dc4});});},'SmsQueues':function(){return new Promise(function(_0x55084e){var _0x4f0f84=[];for(var _0x426ef5 in _0x24e8b9[_0x3d94('0x58')]){if(_0x24e8b9[_0x3d94('0x58')][_0x3d94('0x4a')](_0x426ef5)){var _0x2382df=_0x24e8b9['smsQueues'][_0x426ef5];var _0x5b7316={'id':_0x2382df['id'],'available':_0x2382df[_0x3d94('0x52')],'loggedIn':_0x2382df[_0x3d94('0x53')],'name':_0x2382df[_0x3d94('0x59')],'paused':_0x2382df['paused'],'waiting':_0x2382df[_0x3d94('0x55')]};_0x4f0f84['push'](_0x5b7316);}}_0x55084e({'count':_0x4f0f84[_0x3d94('0x17')],'rows':_0x4f0f84});});},'FaxQueues':function(){return new Promise(function(_0x5789df){var _0x15adf7=[];for(var _0x12c535 in _0x24e8b9[_0x3d94('0x5a')]){if(_0x24e8b9[_0x3d94('0x5a')][_0x3d94('0x4a')](_0x12c535)){var _0x19476d=_0x24e8b9[_0x3d94('0x5a')][_0x12c535];var _0xf0d4eb={'id':_0x19476d['id'],'available':_0x19476d[_0x3d94('0x52')],'loggedIn':_0x19476d[_0x3d94('0x53')],'name':_0x19476d[_0x3d94('0x59')],'paused':_0x19476d['paused'],'waiting':_0x19476d[_0x3d94('0x55')]};_0x15adf7[_0x3d94('0x1f')](_0xf0d4eb);}}_0x5789df({'count':_0x15adf7[_0x3d94('0x17')],'rows':_0x15adf7});});},'WhatsappQueues':function(){return new Promise(function(_0x14e64b){var _0x501d6f=[];for(var _0x9b282a in _0x24e8b9['whatsappQueues']){if(_0x24e8b9['whatsappQueues'][_0x3d94('0x4a')](_0x9b282a)){var _0x55fed9=_0x24e8b9[_0x3d94('0x5b')][_0x9b282a];var _0x45daa1={'id':_0x55fed9['id'],'available':_0x55fed9['available'],'loggedIn':_0x55fed9[_0x3d94('0x53')],'name':_0x55fed9['name'],'paused':_0x55fed9[_0x3d94('0x54')],'waiting':_0x55fed9[_0x3d94('0x55')]};_0x501d6f['push'](_0x45daa1);}}_0x14e64b({'count':_0x501d6f['length'],'rows':_0x501d6f});});},'ChatQueuesWaitingInteractions':function(){return new Promise(function(_0x4ceff3){var _0x833d96=_['values'](_0x24e8b9['chatQueuesWaitingInteractions']);_0x4ceff3({'count':_0x833d96[_0x3d94('0x17')],'rows':_0x833d96});});},'MailQueuesWaitingInteractions':function(){return new Promise(function(_0x39ea2a){var _0x184c4b=_[_0x3d94('0x4f')](_0x24e8b9['mailQueuesWaitingInteractions']);_0x39ea2a({'count':_0x184c4b[_0x3d94('0x17')],'rows':_0x184c4b});});},'OpenchannelQueuesWaitingInteractions':function(){return new Promise(function(_0x3fc0e7){var _0xa0a84c=_[_0x3d94('0x4f')](_0x24e8b9[_0x3d94('0x5c')]);_0x3fc0e7({'count':_0xa0a84c[_0x3d94('0x17')],'rows':_0xa0a84c});});},'SmsQueuesWaitingInteractions':function(){return new Promise(function(_0x53c0f0){var _0x467ccb=_[_0x3d94('0x4f')](_0x24e8b9[_0x3d94('0x5d')]);_0x53c0f0({'count':_0x467ccb[_0x3d94('0x17')],'rows':_0x467ccb});});},'FaxQueuesWaitingInteractions':function(){return new Promise(function(_0x35fee2){var _0x32f5df=_[_0x3d94('0x4f')](_0x24e8b9[_0x3d94('0x5e')]);_0x35fee2({'count':_0x32f5df['length'],'rows':_0x32f5df});});},'WhatsappQueuesWaitingInteractions':function(){return new Promise(function(_0x535d01){var _0x2977ac=_[_0x3d94('0x4f')](_0x24e8b9[_0x3d94('0x5f')]);_0x535d01({'count':_0x2977ac['length'],'rows':_0x2977ac});});}};var _0x43a00e=jayson[_0x3d94('0x60')](_0x14ea5f)[_0x3d94('0x61')]();_0x43a00e['on'](_0x3d94('0x33'),function(_0x860ee5){logger['error'](JSON['stringify'](_0x860ee5));return _0x5d9366(_0x860ee5);});_0x43a00e[_0x3d94('0x62')](0x232c,_0x3d94('0x63'),function(){console[_0x3d94('0x64')](_0x3d94('0x65'),0x232c);return _0x7d6969(_0x3d94('0x66')+0x232c);});});};
\ No newline at end of file
+var _0x349f=['push','slice','dialogflow','appdata','split','TagId','tvox','getMustacheRender','notificationTemplate','ChatWebsiteId','ContactId','body','%s:%s:%s','condition','./applications/','consequence','priority','Push\x20new\x20rule','on\x20interval','intervals','\x20|\x20','error','rules','info','stringify','matchPath','emit','Skipped\x20routing\x20for\x20%s','No\x20applications\x20to\x20execute','routing\x20is\x20empty','agent','agents','busyQueue','end','QueueReport','update','catch','error\x20update\x20queue\x20report','stack','message\x20is\x20empty','hasOwnProperty','capacity','CurrentCapacity','updateRealtime','agent\x20not\x20found','values','find','chatQueues','available','name','paused','waiting','mailQueues','loggedIn','openchannelQueues','smsQueues','faxQueues','whatsappQueues','mailQueuesWaitingInteractions','openchannelQueuesWaitingInteractions','smsQueuesWaitingInteractions','whatsappQueuesWaitingInteractions','server','http','127.0.0.1','log','lodash','util','path','bluebird','./applications/utils','./applications/strategy/util','../../../config/logger','routing','../rpc/openchannelQueueReport','../rpc/mailQueueReport','../rpc/chatQueueReport','../rpc/smsQueueReport','../rpc/faxQueueReport','../lib/rule-engine','format','%s.%s.%s','isNil','IntervalId','Intervals','interval','listen','channel','message','interaction','checkWaitingNotifications','transfer','applications','isArray','length','existsSync','join','app','.js','toLowerCase','autoreply','mail'];(function(_0x46e523,_0xe6fccb){var _0x5da0ee=function(_0x396682){while(--_0x396682){_0x46e523['push'](_0x46e523['shift']());}};_0x5da0ee(++_0xe6fccb);}(_0x349f,0xa8));var _0xf349=function(_0x4dfbf2,_0x499fa5){_0x4dfbf2=_0x4dfbf2-0x0;var _0x56dd91=_0x349f[_0x4dfbf2];return _0x56dd91;};'use strict';var _=require(_0xf349('0x0'));var util=require(_0xf349('0x1'));var path=require(_0xf349('0x2'));var fs=require('fs');var jayson=require('jayson/promise');var BPromise=require(_0xf349('0x3'));var utils=require(_0xf349('0x4'));var sUtils=require(_0xf349('0x5'));var logger=require(_0xf349('0x6'))(_0xf349('0x7'));var rpc={'openchannelQueueReport':require(_0xf349('0x8')),'mailQueueReport':require(_0xf349('0x9')),'chatQueueReport':require(_0xf349('0xa')),'smsQueueReport':require(_0xf349('0xb')),'faxQueueReport':require(_0xf349('0xc')),'whatsappQueueReport':require('../rpc/whatsappQueueReport')};var RuleEngine=require(_0xf349('0xd'));function getId(_0x23fb4b,_0x6c6cd2,_0x21a480){return util[_0xf349('0xe')](_0xf349('0xf'),_0x23fb4b,_0x6c6cd2||0x0,_0x21a480||0x0);}function getIntervals(_0x3e2147,_0x5e30ef){var _0x50652e=[];if(!_[_0xf349('0x10')](_0x5e30ef[_0xf349('0x11')])&&!_[_0xf349('0x10')](_0x3e2147[_0x5e30ef[_0xf349('0x11')]])&&!_[_0xf349('0x10')](_0x3e2147[_0x5e30ef['IntervalId']]['Intervals'])){_0x50652e=_['map'](_0x3e2147[_0x5e30ef[_0xf349('0x11')]][_0xf349('0x12')],_0xf349('0x13'));}else if(!_[_0xf349('0x10')](_0x5e30ef[_0xf349('0x13')])){_0x50652e=[_0x5e30ef['interval']];}return _0x50652e;}exports[_0xf349('0x14')]=function(_0x35d833){_0x35d833['rules']={};return new BPromise(function(_0x43b1ff,_0x3de88f){var _0x590f02={'Start':function(_0x358412){var _0x55479f=this;return new Promise(function(_0x401ada,_0x3bc4e4){if(_0x358412){try{var _0x26b561=[];var _0x1e2dcd=getId(_0x358412[_0xf349('0x15')],_0x358412[_0xf349('0x16')]?_0x358412[_0xf349('0x16')]['id']:0x0,_0x358412['interaction']?_0x358412[_0xf349('0x17')]['id']:0x0);var _0x5aec49=sUtils[_0xf349('0x18')](_0x35d833,_0x358412);if(_0x358412[_0xf349('0x19')]||!_0x5aec49&&_0x358412[_0xf349('0x1a')]&&_[_0xf349('0x1b')](_0x358412[_0xf349('0x1a')])&&_0x358412[_0xf349('0x1a')][_0xf349('0x1c')]){for(var _0x104f9b=0x0;_0x104f9b<_0x358412['applications'][_0xf349('0x1c')];_0x104f9b+=0x1){var _0x5eefe2=_0x358412[_0xf349('0x1a')][_0x104f9b];if(fs[_0xf349('0x1d')](path[_0xf349('0x1e')](__dirname,'applications',_0x5eefe2[_0xf349('0x1f')]+_0xf349('0x20')))){var _0x236970=[];switch(_0x5eefe2['app'][_0xf349('0x21')]()){case _0xf349('0x22'):var _0x4d574a=_0x5eefe2['appdata']['split'](',');if(_0x358412[_0xf349('0x15')]===_0xf349('0x23')){_0x236970[_0xf349('0x24')](_0x4d574a[0x0]);_0x236970['push'](_0x4d574a[0x1]);_0x236970[_0xf349('0x24')](_0x4d574a[_0xf349('0x25')](0x2,_0x4d574a[_0xf349('0x1c')])[_0xf349('0x1e')](','));}else{_0x236970[_0xf349('0x24')](_0x4d574a[0x0]);_0x236970[_0xf349('0x24')](_0x4d574a[_0xf349('0x25')](0x1,_0x4d574a[_0xf349('0x1c')])[_0xf349('0x1e')](','));}break;case _0xf349('0x26'):var _0x403816=_0x5eefe2[_0xf349('0x27')][_0xf349('0x28')](',');_0x236970[_0xf349('0x24')](_0x403816[0x0]);_0x236970['push'](_0x403816[0x1]);_0x236970['push'](_0x403816['slice'](0x2,_0x403816['length'])[_0xf349('0x1e')](','));break;case'dialogflowv2':var _0x1bd380=_0x5eefe2['appdata']['split'](',');_0x236970['push'](_0x1bd380[0x0]);_0x236970['push'](_0x1bd380[0x1]);_0x236970[_0xf349('0x24')](_0x1bd380[0x2]);_0x236970[_0xf349('0x24')](_0x1bd380[0x3]);_0x236970[_0xf349('0x24')](_0x1bd380[_0xf349('0x25')](0x4,_0x1bd380[_0xf349('0x1c')])['join'](','));break;case'amazonlex':var _0x2c0f9c=_0x5eefe2[_0xf349('0x27')][_0xf349('0x28')](',');_0x236970[_0xf349('0x24')](_0x2c0f9c[0x0]);_0x236970[_0xf349('0x24')](_0x2c0f9c[0x1]);_0x236970['push'](_0x2c0f9c[0x2]);_0x236970[_0xf349('0x24')](_0x2c0f9c[0x3]);_0x236970[_0xf349('0x24')](_0x2c0f9c['slice'](0x4,_0x2c0f9c['length'])['join'](','));break;case _0xf349('0x16'):_0x236970[_0xf349('0x24')](_0x5eefe2[_0xf349('0x27')]);break;case'tag':_0x236970[_0xf349('0x24')](_0x5eefe2[_0xf349('0x29')]);_0x236970[_0xf349('0x24')](_0x5eefe2[_0xf349('0x27')]);break;case _0xf349('0x2a'):var _0x5eae93=utils[_0xf349('0x2b')](_0x358412['account'][_0xf349('0x2c')],_0x358412);var _0x3b44bc=_0x5eefe2[_0xf349('0x27')][_0xf349('0x28')](',');_0x236970[_0xf349('0x24')](_0x3b44bc[0x0]);_0x236970[_0xf349('0x24')](_0x3b44bc[0x1]);_0x236970[_0xf349('0x24')](_0x3b44bc[0x2]);_0x236970['push'](_0x3b44bc[0x3]);_0x236970['push'](_0x3b44bc[0x4]);_0x236970['push'](_0x3b44bc[0x5]);_0x236970[_0xf349('0x24')](_0x3b44bc[0x6]);_0x236970[_0xf349('0x24')](_0x3b44bc[0x7]);_0x236970['push'](_0x3b44bc[0x8]);_0x236970[_0xf349('0x24')](_0x3b44bc[0x9]);_0x236970[_0xf349('0x24')](_0x3b44bc[0xa]);_0x236970['push'](_0x358412[_0xf349('0x17')]['id']);_0x236970[_0xf349('0x24')](_0x358412[_0xf349('0x16')]['id']);_0x236970[_0xf349('0x24')](_0x5eefe2[_0xf349('0x2d')]);_0x236970[_0xf349('0x24')](_0x358412['interaction'][_0xf349('0x2e')]);_0x236970['push'](_0x358412['body'][_0xf349('0x2f')]);_0x236970[_0xf349('0x24')](_0x5eae93);break;default:_0x236970=_[_0xf349('0x10')](_0x5eefe2[_0xf349('0x27')])?[]:_0x5eefe2['appdata'][_0xf349('0x28')](',');}var _0x25af45={'id':util['format'](_0xf349('0x30'),_0x1e2dcd,_0x5eefe2['id'],_0x5eefe2['app']),'condition':require('./interval')[_0xf349('0x31')](_0x1e2dcd,getIntervals(_0x35d833['intervals'],_0x5eefe2),_0x35d833),'consequence':require(_0xf349('0x32')+_0x5eefe2['app'])[_0xf349('0x33')](_0x1e2dcd,_0x236970,_0x35d833,_0x358412),'p':_0x5eefe2[_0xf349('0x34')]||0x0};logger['info'](_0xf349('0x35'),_0x25af45['id'],_0xf349('0x36'),getIntervals(_0x35d833[_0xf349('0x37')],_0x5eefe2)['join'](_0xf349('0x38')));_0x26b561[_0xf349('0x24')](_0x25af45);}else{logger[_0xf349('0x39')]('Please\x20create\x20a\x20new\x20file\x20under',path[_0xf349('0x1e')](__dirname,_0xf349('0x1a'),_0x5eefe2[_0xf349('0x1f')]+_0xf349('0x20')));}}_0x35d833[_0xf349('0x3a')][_0x1e2dcd]=new RuleEngine(_0x26b561);_0x35d833[_0xf349('0x3a')][_0x1e2dcd]['execute'](_0x358412,function(_0x4351d7){logger[_0xf349('0x3b')]('Applications\x20executed',JSON[_0xf349('0x3c')](_0x4351d7[_0xf349('0x3d')]));if(_0x35d833[_0xf349('0x3a')][_0x1e2dcd]){_0x35d833[_0xf349('0x3a')][_0x1e2dcd][_0xf349('0x3e')]('complete');}});return _0x401ada({'code':0xc8,'message':_0x358412});}else{if(_0x5aec49){logger[_0xf349('0x3b')](util[_0xf349('0xe')](_0xf349('0x3f'),_0x1e2dcd));}else{logger[_0xf349('0x3b')](_0xf349('0x40'));}return _0x401ada({'code':0xc8,'message':_0x358412});}}catch(_0x4a3cd9){logger['error'](_0x4a3cd9['stack']);return _0x3bc4e4(_0x55479f['error'](0x1f4,_0x4a3cd9));}}return _0x3bc4e4(_0xf349('0x41'));});},'AcceptMessage':function(_0x1c6cfe){var _0x423657=this;return new Promise(function(_0x3417a6,_0x18e3fe){if(_0x1c6cfe[_0xf349('0x42')]&&_0x1c6cfe[_0xf349('0x42')]['id']){if(_0x35d833[_0xf349('0x43')][_0x1c6cfe[_0xf349('0x42')]['id']]){_0x35d833[_0xf349('0x43')][_0x1c6cfe['agent']['id']]['busy']=![];_0x35d833[_0xf349('0x43')][_0x1c6cfe['agent']['id']][_0xf349('0x44')]=undefined;}}if(_0x1c6cfe[_0xf349('0x16')]&&_0x1c6cfe[_0xf349('0x16')]['id']){try{var _0x465ca7=getId(_0x1c6cfe['channel'],_0x1c6cfe[_0xf349('0x16')]?_0x1c6cfe[_0xf349('0x16')]['id']:0x0,_0x1c6cfe[_0xf349('0x17')]?_0x1c6cfe[_0xf349('0x17')]['id']:0x0);if(_0x35d833[_0xf349('0x3a')][_0x465ca7]){_0x35d833[_0xf349('0x3a')][_0x465ca7][_0xf349('0x3e')](_0xf349('0x45'));if(rpc[_0x1c6cfe['channel']+_0xf349('0x46')]){rpc[_0x1c6cfe[_0xf349('0x15')]+_0xf349('0x46')][_0xf349('0x47')](_0x465ca7,{'UserId':_0x1c6cfe[_0xf349('0x16')]['UserId']})[_0xf349('0x48')](function(){logger[_0xf349('0x39')](_0xf349('0x49'));});}}return _0x3417a6({'code':0xc8,'message':_0x1c6cfe});}catch(_0x220241){logger[_0xf349('0x39')](_0x220241[_0xf349('0x4a')]);return _0x18e3fe(_0x423657[_0xf349('0x39')](0x1f4,_0x220241));}}logger[_0xf349('0x39')]('message\x20is\x20empty');return _0x18e3fe(_0x423657['error'](0x1f4,_0xf349('0x4b')));});},'RejectMessage':function(_0x4d9fa8){var _0x37d6be=this;return new Promise(function(_0x3e497d,_0x40e760){if(_0x4d9fa8[_0xf349('0x42')]&&_0x4d9fa8[_0xf349('0x42')]['id']){try{if(_0x35d833[_0xf349('0x43')][_0x4d9fa8[_0xf349('0x42')]['id']]){_0x35d833['agents'][_0x4d9fa8['agent']['id']]['busy']=![];_0x35d833[_0xf349('0x43')][_0x4d9fa8[_0xf349('0x42')]['id']]['busyQueue']=undefined;}return _0x3e497d({'code':0xc8,'message':_0x4d9fa8});}catch(_0x53e7dc){logger[_0xf349('0x39')](_0x53e7dc[_0xf349('0x4a')]);return _0x40e760(_0x37d6be['error'](0x1f4,_0x53e7dc));}}logger[_0xf349('0x39')](_0xf349('0x4b'));return _0x40e760(_0x37d6be[_0xf349('0x39')](0x1f4,_0xf349('0x4b')));});},'AbandonInteraction':function(_0x1f5e01){var _0x1140df=this;return new Promise(function(_0xece401,_0x3d6b95){if(_0x1f5e01[_0xf349('0x15')]&&_0x1f5e01['interaction']&&_0x1f5e01['interaction']['id']){try{var _0x682854=getId(_0x1f5e01['channel'],_0x1f5e01['message']?_0x1f5e01[_0xf349('0x16')]['id']:0x0,_0x1f5e01[_0xf349('0x17')]?_0x1f5e01[_0xf349('0x17')]['id']:0x0);if(_0x35d833[_0xf349('0x3a')][_0x682854]){_0x35d833['rules'][_0x682854]['emit'](_0xf349('0x45'));}return _0xece401({'code':0xc8,'message':_0x1f5e01});}catch(_0x5752a9){logger[_0xf349('0x39')](_0x5752a9['stack']);return _0x3d6b95(_0x1140df[_0xf349('0x39')](0x1f4,_0x5752a9));}}logger[_0xf349('0x39')](_0xf349('0x4b'));return _0x3d6b95(_0x1140df[_0xf349('0x39')](0x1f4,_0xf349('0x4b')));});},'AgentCapacity':function(_0x2df135){var _0x1fdcbe=this;return new Promise(function(_0x125d26,_0x3a1ed0){if(_0x35d833[_0xf349('0x43')][_0xf349('0x4c')](_0x2df135['id'])){for(var _0x59d6e5 in _0x2df135['capacity']){if(_0x2df135[_0xf349('0x4d')][_0xf349('0x4c')](_0x59d6e5)){if(_0x35d833['agents'][_0x2df135['id']][_0xf349('0x4c')](_0x59d6e5+_0xf349('0x4e'))){_0x35d833[_0xf349('0x43')][_0x2df135['id']][_0x59d6e5+'CurrentCapacity']=parseInt(_0x2df135['capacity'][_0x59d6e5],0xa);}}}_0x35d833[_0xf349('0x43')][_0x2df135['id']][_0xf349('0x4f')]();return _0x125d26({'code':0xc8,'message':_0x35d833[_0xf349('0x43')][_0x2df135['id']]});}else{return _0x3a1ed0(_0x1fdcbe[_0xf349('0x39')](0x1f4,_0xf349('0x50')));}});},'Agents':function(_0x3ab664){return new Promise(function(_0x1a1336){var _0x3586f8=_[_0xf349('0x51')](_0x35d833[_0xf349('0x43')]);if(_0x3ab664&&_0x3ab664['id']){var _0x1809a4=_[_0xf349('0x52')](_0x3586f8,function(_0x209a0e){return _0x209a0e['id']===_0x3ab664['id'];});_0x1a1336(_0x1809a4);}else{_0x1a1336({'count':_0x3586f8[_0xf349('0x1c')],'rows':_0x3586f8});}});},'ChatQueues':function(){return new Promise(function(_0x53b904){var _0x1e695d=[];for(var _0x2e09a9 in _0x35d833[_0xf349('0x53')]){if(_0x35d833[_0xf349('0x53')][_0xf349('0x4c')](_0x2e09a9)){var _0x349261=_0x35d833[_0xf349('0x53')][_0x2e09a9];var _0x3e8bc4={'id':_0x349261['id'],'available':_0x349261[_0xf349('0x54')],'loggedIn':_0x349261['loggedIn'],'name':_0x349261[_0xf349('0x55')],'paused':_0x349261[_0xf349('0x56')],'waiting':_0x349261[_0xf349('0x57')]};_0x1e695d['push'](_0x3e8bc4);}}_0x53b904({'count':_0x1e695d['length'],'rows':_0x1e695d});});},'MailQueues':function(){return new Promise(function(_0x5bd91e){var _0x4e39be=[];for(var _0x167609 in _0x35d833[_0xf349('0x58')]){if(_0x35d833['mailQueues'][_0xf349('0x4c')](_0x167609)){var _0x1f126b=_0x35d833['mailQueues'][_0x167609];var _0x32669c={'id':_0x1f126b['id'],'available':_0x1f126b[_0xf349('0x54')],'loggedIn':_0x1f126b[_0xf349('0x59')],'name':_0x1f126b[_0xf349('0x55')],'paused':_0x1f126b[_0xf349('0x56')],'waiting':_0x1f126b[_0xf349('0x57')]};_0x4e39be[_0xf349('0x24')](_0x32669c);}}_0x5bd91e({'count':_0x4e39be[_0xf349('0x1c')],'rows':_0x4e39be});});},'OpenchannelQueues':function(){return new Promise(function(_0x4cc303){var _0x2da03f=[];for(var _0x1ec710 in _0x35d833['openchannelQueues']){if(_0x35d833[_0xf349('0x5a')][_0xf349('0x4c')](_0x1ec710)){var _0x49255f=_0x35d833[_0xf349('0x5a')][_0x1ec710];var _0x3c0efc={'id':_0x49255f['id'],'available':_0x49255f[_0xf349('0x54')],'loggedIn':_0x49255f[_0xf349('0x59')],'name':_0x49255f[_0xf349('0x55')],'paused':_0x49255f[_0xf349('0x56')],'waiting':_0x49255f[_0xf349('0x57')]};_0x2da03f[_0xf349('0x24')](_0x3c0efc);}}_0x4cc303({'count':_0x2da03f['length'],'rows':_0x2da03f});});},'SmsQueues':function(){return new Promise(function(_0x2838a4){var _0xff3eeb=[];for(var _0x247af4 in _0x35d833[_0xf349('0x5b')]){if(_0x35d833[_0xf349('0x5b')][_0xf349('0x4c')](_0x247af4)){var _0x62f4be=_0x35d833[_0xf349('0x5b')][_0x247af4];var _0x52c735={'id':_0x62f4be['id'],'available':_0x62f4be[_0xf349('0x54')],'loggedIn':_0x62f4be['loggedIn'],'name':_0x62f4be[_0xf349('0x55')],'paused':_0x62f4be[_0xf349('0x56')],'waiting':_0x62f4be[_0xf349('0x57')]};_0xff3eeb[_0xf349('0x24')](_0x52c735);}}_0x2838a4({'count':_0xff3eeb[_0xf349('0x1c')],'rows':_0xff3eeb});});},'FaxQueues':function(){return new Promise(function(_0x4f1493){var _0x4c06fc=[];for(var _0x3401e4 in _0x35d833[_0xf349('0x5c')]){if(_0x35d833['faxQueues'][_0xf349('0x4c')](_0x3401e4)){var _0x567a16=_0x35d833['faxQueues'][_0x3401e4];var _0x2b09a3={'id':_0x567a16['id'],'available':_0x567a16['available'],'loggedIn':_0x567a16[_0xf349('0x59')],'name':_0x567a16[_0xf349('0x55')],'paused':_0x567a16[_0xf349('0x56')],'waiting':_0x567a16[_0xf349('0x57')]};_0x4c06fc['push'](_0x2b09a3);}}_0x4f1493({'count':_0x4c06fc[_0xf349('0x1c')],'rows':_0x4c06fc});});},'WhatsappQueues':function(){return new Promise(function(_0x2dc232){var _0x2df60e=[];for(var _0x1d062b in _0x35d833[_0xf349('0x5d')]){if(_0x35d833[_0xf349('0x5d')][_0xf349('0x4c')](_0x1d062b)){var _0x5e792b=_0x35d833['whatsappQueues'][_0x1d062b];var _0x2e23a3={'id':_0x5e792b['id'],'available':_0x5e792b['available'],'loggedIn':_0x5e792b[_0xf349('0x59')],'name':_0x5e792b['name'],'paused':_0x5e792b['paused'],'waiting':_0x5e792b['waiting']};_0x2df60e[_0xf349('0x24')](_0x2e23a3);}}_0x2dc232({'count':_0x2df60e[_0xf349('0x1c')],'rows':_0x2df60e});});},'ChatQueuesWaitingInteractions':function(){return new Promise(function(_0x4ef4bf){var _0x4155e3=_[_0xf349('0x51')](_0x35d833['chatQueuesWaitingInteractions']);_0x4ef4bf({'count':_0x4155e3['length'],'rows':_0x4155e3});});},'MailQueuesWaitingInteractions':function(){return new Promise(function(_0x3df826){var _0x169134=_[_0xf349('0x51')](_0x35d833[_0xf349('0x5e')]);_0x3df826({'count':_0x169134[_0xf349('0x1c')],'rows':_0x169134});});},'OpenchannelQueuesWaitingInteractions':function(){return new Promise(function(_0x79b5df){var _0x291362=_['values'](_0x35d833[_0xf349('0x5f')]);_0x79b5df({'count':_0x291362['length'],'rows':_0x291362});});},'SmsQueuesWaitingInteractions':function(){return new Promise(function(_0x228627){var _0x3608ce=_['values'](_0x35d833[_0xf349('0x60')]);_0x228627({'count':_0x3608ce[_0xf349('0x1c')],'rows':_0x3608ce});});},'FaxQueuesWaitingInteractions':function(){return new Promise(function(_0x2875e8){var _0x1b12b5=_[_0xf349('0x51')](_0x35d833['faxQueuesWaitingInteractions']);_0x2875e8({'count':_0x1b12b5['length'],'rows':_0x1b12b5});});},'WhatsappQueuesWaitingInteractions':function(){return new Promise(function(_0x5db289){var _0xaef933=_[_0xf349('0x51')](_0x35d833[_0xf349('0x61')]);_0x5db289({'count':_0xaef933[_0xf349('0x1c')],'rows':_0xaef933});});}};var _0x53f144=jayson[_0xf349('0x62')](_0x590f02)[_0xf349('0x63')]();_0x53f144['on'](_0xf349('0x39'),function(_0x2f2328){logger[_0xf349('0x39')](JSON['stringify'](_0x2f2328));return _0x3de88f(_0x2f2328);});_0x53f144['listen'](0x232c,_0xf349('0x64'),function(){console[_0xf349('0x65')]('Routing\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!',0x232c);return _0x43b1ff('RPC\x20listening\x20on\x20port:'+0x232c);});});};
\ No newline at end of file