Built motion from commit 3c2ce842.|2.6.31
[motion2.git] / server / services / routing / server / index.js
index 533fa73..68dae45 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2cfc=['update','UserId','catch','message\x20is\x20empty','hasOwnProperty','capacity','CurrentCapacity','agent\x20not\x20found','chatQueues','available','loggedIn','paused','waiting','mailQueues','openchannelQueues','name','smsQueues','faxQueues','whatsappQueues','values','chatQueuesWaitingInteractions','mailQueuesWaitingInteractions','smsQueuesWaitingInteractions','faxQueuesWaitingInteractions','whatsappQueuesWaitingInteractions','http','127.0.0.1','log','RPC\x20listening\x20on\x20port:','lodash','util','path','jayson/promise','bluebird','../../../config/environment','../../../config/logger','routing','../rpc/openchannelQueueReport','../rpc/mailQueueReport','../rpc/chatQueueReport','../rpc/smsQueueReport','../rpc/faxQueueReport','../rpc/whatsappQueueReport','../lib/rule-engine','format','%s.%s.%s','isNil','IntervalId','Intervals','map','interval','listen','rules','message','interaction','applications','isArray','length','join','app','toLowerCase','autoreply','appdata','split','slice','dialogflow','push','dialogflowv2','tag','TagId','%s:%s:%s','intervals','./applications/','priority','on\x20interval','error','Please\x20create\x20a\x20new\x20file\x20under','execute','info','Applications\x20executed','stringify','matchPath','emit','complete','No\x20applications\x20to\x20execute','stack','routing\x20is\x20empty','agent','agents','busy','channel','end','QueueReport'];(function(_0x47a7d0,_0x4e182d){var _0xb9bd08=function(_0x588ee2){while(--_0x588ee2){_0x47a7d0['push'](_0x47a7d0['shift']());}};_0xb9bd08(++_0x4e182d);}(_0x2cfc,0x7a));var _0xc2cf=function(_0x432682,_0x253044){_0x432682=_0x432682-0x0;var _0x463d05=_0x2cfc[_0x432682];return _0x463d05;};'use strict';var _=require(_0xc2cf('0x0'));var util=require(_0xc2cf('0x1'));var path=require(_0xc2cf('0x2'));var fs=require('fs');var jayson=require(_0xc2cf('0x3'));var BPromise=require(_0xc2cf('0x4'));var uuid=require('uuid');var config=require(_0xc2cf('0x5'));var logger=require(_0xc2cf('0x6'))(_0xc2cf('0x7'));var rpc={'openchannelQueueReport':require(_0xc2cf('0x8')),'mailQueueReport':require(_0xc2cf('0x9')),'chatQueueReport':require(_0xc2cf('0xa')),'smsQueueReport':require(_0xc2cf('0xb')),'faxQueueReport':require(_0xc2cf('0xc')),'whatsappQueueReport':require(_0xc2cf('0xd'))};var RuleEngine=require(_0xc2cf('0xe'));function getId(_0x2f3fcb,_0x366f1a,_0x529c22){return util[_0xc2cf('0xf')](_0xc2cf('0x10'),_0x2f3fcb,_0x366f1a||0x0,_0x529c22||0x0);}function getIntervals(_0x2deaf1,_0x5b1954){var _0x56929e=[];if(!_[_0xc2cf('0x11')](_0x5b1954[_0xc2cf('0x12')])&&!_['isNil'](_0x2deaf1[_0x5b1954[_0xc2cf('0x12')]])&&!_[_0xc2cf('0x11')](_0x2deaf1[_0x5b1954['IntervalId']][_0xc2cf('0x13')])){_0x56929e=_[_0xc2cf('0x14')](_0x2deaf1[_0x5b1954[_0xc2cf('0x12')]][_0xc2cf('0x13')],_0xc2cf('0x15'));}else if(!_[_0xc2cf('0x11')](_0x5b1954[_0xc2cf('0x15')])){_0x56929e=[_0x5b1954[_0xc2cf('0x15')]];}return _0x56929e;}exports[_0xc2cf('0x16')]=function(_0x45f7e4){_0x45f7e4[_0xc2cf('0x17')]={};return new BPromise(function(_0x49e734,_0x12cb34){var _0x9aaa32={'Start':function(_0x335d28){var _0x19fd4a=this;return new Promise(function(_0x40aa7c,_0x179546){if(_0x335d28){try{var _0x1e92f5=[];var _0x200286=getId(_0x335d28['channel'],_0x335d28[_0xc2cf('0x18')]?_0x335d28['message']['id']:0x0,_0x335d28['interaction']?_0x335d28[_0xc2cf('0x19')]['id']:0x0);if(_0x335d28[_0xc2cf('0x1a')]&&_[_0xc2cf('0x1b')](_0x335d28[_0xc2cf('0x1a')])&&_0x335d28['applications'][_0xc2cf('0x1c')]){for(var _0x503dd1=0x0;_0x503dd1<_0x335d28[_0xc2cf('0x1a')][_0xc2cf('0x1c')];_0x503dd1+=0x1){var _0x3f7a83=_0x335d28['applications'][_0x503dd1];if(fs['existsSync'](path[_0xc2cf('0x1d')](__dirname,'applications',_0x3f7a83[_0xc2cf('0x1e')]+'.js'))){var _0x2e5989=[];switch(_0x3f7a83[_0xc2cf('0x1e')][_0xc2cf('0x1f')]()){case _0xc2cf('0x20'):var _0x1185c5=_0x3f7a83[_0xc2cf('0x21')][_0xc2cf('0x22')](',');_0x2e5989['push'](_0x1185c5[0x0]);_0x2e5989['push'](_0x1185c5[_0xc2cf('0x23')](0x1,_0x1185c5[_0xc2cf('0x1c')])[_0xc2cf('0x1d')](','));break;case _0xc2cf('0x24'):var _0x336af0=_0x3f7a83[_0xc2cf('0x21')][_0xc2cf('0x22')](',');_0x2e5989[_0xc2cf('0x25')](_0x336af0[0x0]);_0x2e5989[_0xc2cf('0x25')](_0x336af0[0x1]);_0x2e5989[_0xc2cf('0x25')](_0x336af0[_0xc2cf('0x23')](0x2,_0x336af0[_0xc2cf('0x1c')])[_0xc2cf('0x1d')](','));break;case _0xc2cf('0x26'):var _0xc1c6f0=_0x3f7a83[_0xc2cf('0x21')][_0xc2cf('0x22')](',');_0x2e5989[_0xc2cf('0x25')](_0xc1c6f0[0x0]);_0x2e5989[_0xc2cf('0x25')](_0xc1c6f0[0x1]);_0x2e5989['push'](_0xc1c6f0[0x2]);_0x2e5989[_0xc2cf('0x25')](_0xc1c6f0[0x3]);_0x2e5989['push'](_0xc1c6f0['slice'](0x4,_0xc1c6f0[_0xc2cf('0x1c')])[_0xc2cf('0x1d')](','));break;case'amazonlex':var _0x48527e=_0x3f7a83[_0xc2cf('0x21')]['split'](',');_0x2e5989['push'](_0x48527e[0x0]);_0x2e5989[_0xc2cf('0x25')](_0x48527e[0x1]);_0x2e5989[_0xc2cf('0x25')](_0x48527e[0x2]);_0x2e5989[_0xc2cf('0x25')](_0x48527e[0x3]);_0x2e5989[_0xc2cf('0x25')](_0x48527e[_0xc2cf('0x23')](0x4,_0x48527e['length'])[_0xc2cf('0x1d')](','));break;case'message':_0x2e5989[_0xc2cf('0x25')](_0x3f7a83['appdata']);break;case _0xc2cf('0x27'):_0x2e5989[_0xc2cf('0x25')](_0x3f7a83[_0xc2cf('0x28')]);_0x2e5989[_0xc2cf('0x25')](_0x3f7a83[_0xc2cf('0x21')]);break;default:_0x2e5989=_['isNil'](_0x3f7a83[_0xc2cf('0x21')])?[]:_0x3f7a83['appdata'][_0xc2cf('0x22')](',');}var _0x185767={'id':util[_0xc2cf('0xf')](_0xc2cf('0x29'),_0x200286,_0x3f7a83['id'],_0x3f7a83[_0xc2cf('0x1e')]),'condition':require('./interval')['condition'](_0x200286,getIntervals(_0x45f7e4[_0xc2cf('0x2a')],_0x3f7a83),_0x45f7e4),'consequence':require(_0xc2cf('0x2b')+_0x3f7a83[_0xc2cf('0x1e')])['consequence'](_0x200286,_0x2e5989,_0x45f7e4,_0x335d28),'p':_0x3f7a83[_0xc2cf('0x2c')]||0x0};logger['info']('Push\x20new\x20rule',_0x185767['id'],_0xc2cf('0x2d'),getIntervals(_0x45f7e4['intervals'],_0x3f7a83)[_0xc2cf('0x1d')]('\x20|\x20'));_0x1e92f5[_0xc2cf('0x25')](_0x185767);}else{logger[_0xc2cf('0x2e')](_0xc2cf('0x2f'),path[_0xc2cf('0x1d')](__dirname,'applications',_0x3f7a83['app']+'.js'));}}_0x45f7e4[_0xc2cf('0x17')][_0x200286]=new RuleEngine(_0x1e92f5);_0x45f7e4[_0xc2cf('0x17')][_0x200286][_0xc2cf('0x30')](_0x335d28,function(_0xdf012b){logger[_0xc2cf('0x31')](_0xc2cf('0x32'),JSON[_0xc2cf('0x33')](_0xdf012b[_0xc2cf('0x34')]));if(_0x45f7e4[_0xc2cf('0x17')][_0x200286]){_0x45f7e4['rules'][_0x200286][_0xc2cf('0x35')](_0xc2cf('0x36'));}});return _0x40aa7c({'code':0xc8,'message':_0x335d28});}else{logger[_0xc2cf('0x31')](_0xc2cf('0x37'));return _0x40aa7c({'code':0xc8,'message':_0x335d28});}}catch(_0x595d62){logger[_0xc2cf('0x2e')](_0x595d62[_0xc2cf('0x38')]);return _0x179546(_0x19fd4a['error'](0x1f4,_0x595d62));}}return _0x179546(_0xc2cf('0x39'));});},'AcceptMessage':function(_0x3467e){var _0x1bf5a6=this;return new Promise(function(_0x1e891a,_0x4215a6){if(_0x3467e[_0xc2cf('0x3a')]&&_0x3467e['agent']['id']){if(_0x45f7e4[_0xc2cf('0x3b')][_0x3467e[_0xc2cf('0x3a')]['id']]){_0x45f7e4[_0xc2cf('0x3b')][_0x3467e[_0xc2cf('0x3a')]['id']][_0xc2cf('0x3c')]=![];_0x45f7e4[_0xc2cf('0x3b')][_0x3467e['agent']['id']]['busyQueue']=undefined;}}if(_0x3467e[_0xc2cf('0x18')]&&_0x3467e[_0xc2cf('0x18')]['id']){try{var _0x2e225a=getId(_0x3467e[_0xc2cf('0x3d')],_0x3467e[_0xc2cf('0x18')]?_0x3467e[_0xc2cf('0x18')]['id']:0x0,_0x3467e[_0xc2cf('0x19')]?_0x3467e[_0xc2cf('0x19')]['id']:0x0);if(_0x45f7e4[_0xc2cf('0x17')][_0x2e225a]){_0x45f7e4[_0xc2cf('0x17')][_0x2e225a]['emit'](_0xc2cf('0x3e'));if(rpc[_0x3467e[_0xc2cf('0x3d')]+_0xc2cf('0x3f')]){rpc[_0x3467e[_0xc2cf('0x3d')]+_0xc2cf('0x3f')][_0xc2cf('0x40')](_0x2e225a,{'UserId':_0x3467e[_0xc2cf('0x18')][_0xc2cf('0x41')]})[_0xc2cf('0x42')](function(_0x1b9b52){logger[_0xc2cf('0x2e')]('error\x20update\x20queue\x20report');});}}return _0x1e891a({'code':0xc8,'message':_0x3467e});}catch(_0xcb3781){logger[_0xc2cf('0x2e')](_0xcb3781[_0xc2cf('0x38')]);return _0x4215a6(_0x1bf5a6[_0xc2cf('0x2e')](0x1f4,_0xcb3781));}}logger['error']('message\x20is\x20empty');return _0x4215a6(_0x1bf5a6[_0xc2cf('0x2e')](0x1f4,_0xc2cf('0x43')));});},'RejectMessage':function(_0x34847e){var _0x14856c=this;return new Promise(function(_0x39ae87,_0x23da3e){if(_0x34847e[_0xc2cf('0x3a')]&&_0x34847e['agent']['id']){try{if(_0x45f7e4[_0xc2cf('0x3b')][_0x34847e[_0xc2cf('0x3a')]['id']]){_0x45f7e4[_0xc2cf('0x3b')][_0x34847e[_0xc2cf('0x3a')]['id']][_0xc2cf('0x3c')]=![];_0x45f7e4[_0xc2cf('0x3b')][_0x34847e[_0xc2cf('0x3a')]['id']]['busyQueue']=undefined;}return _0x39ae87({'code':0xc8,'message':_0x34847e});}catch(_0x7273fc){logger['error'](_0x7273fc[_0xc2cf('0x38')]);return _0x23da3e(_0x14856c[_0xc2cf('0x2e')](0x1f4,_0x7273fc));}}logger[_0xc2cf('0x2e')](_0xc2cf('0x43'));return _0x23da3e(_0x14856c[_0xc2cf('0x2e')](0x1f4,_0xc2cf('0x43')));});},'AbandonInteraction':function(_0x3a0641){var _0xcd352f=this;return new Promise(function(_0xa8c513,_0x3f8859){if(_0x3a0641[_0xc2cf('0x3d')]&&_0x3a0641[_0xc2cf('0x19')]&&_0x3a0641[_0xc2cf('0x19')]['id']){try{var _0x4d90dc=getId(_0x3a0641['channel'],_0x3a0641[_0xc2cf('0x18')]?_0x3a0641[_0xc2cf('0x18')]['id']:0x0,_0x3a0641['interaction']?_0x3a0641[_0xc2cf('0x19')]['id']:0x0);if(_0x45f7e4[_0xc2cf('0x17')][_0x4d90dc]){_0x45f7e4[_0xc2cf('0x17')][_0x4d90dc]['emit'](_0xc2cf('0x3e'));}return _0xa8c513({'code':0xc8,'message':_0x3a0641});}catch(_0x41cad6){logger[_0xc2cf('0x2e')](_0x41cad6['stack']);return _0x3f8859(_0xcd352f[_0xc2cf('0x2e')](0x1f4,_0x41cad6));}}logger[_0xc2cf('0x2e')](_0xc2cf('0x43'));return _0x3f8859(_0xcd352f[_0xc2cf('0x2e')](0x1f4,'message\x20is\x20empty'));});},'AgentCapacity':function(_0x2ea766){var _0x4bfaae=this;return new Promise(function(_0x340973,_0x23c188){if(_0x45f7e4[_0xc2cf('0x3b')][_0xc2cf('0x44')](_0x2ea766['id'])){for(var _0x38e9c8 in _0x2ea766[_0xc2cf('0x45')]){if(_0x2ea766[_0xc2cf('0x45')][_0xc2cf('0x44')](_0x38e9c8)){if(_0x45f7e4[_0xc2cf('0x3b')][_0x2ea766['id']]['hasOwnProperty'](_0x38e9c8+_0xc2cf('0x46'))){_0x45f7e4[_0xc2cf('0x3b')][_0x2ea766['id']][_0x38e9c8+_0xc2cf('0x46')]=parseInt(_0x2ea766['capacity'][_0x38e9c8],0xa);}}}_0x45f7e4['agents'][_0x2ea766['id']]['updateRealtime']();return _0x340973({'code':0xc8,'message':_0x45f7e4[_0xc2cf('0x3b')][_0x2ea766['id']]});}else{return _0x23c188(_0x4bfaae['error'](0x1f4,_0xc2cf('0x47')));}});},'Agents':function(_0x1254db){return new Promise(function(_0x3f658c,_0x22fc19){var _0x353bf9=_['values'](_0x45f7e4['agents']);_0x3f658c({'count':_0x353bf9[_0xc2cf('0x1c')],'rows':_0x353bf9});});},'ChatQueues':function(_0x154bb6){return new Promise(function(_0x1f67a7,_0x594ad0){var _0x3c09e8=[];for(var _0x2a6e24 in _0x45f7e4[_0xc2cf('0x48')]){if(_0x45f7e4['chatQueues'][_0xc2cf('0x44')](_0x2a6e24)){var _0xc52a3e=_0x45f7e4[_0xc2cf('0x48')][_0x2a6e24];var _0x169d50={'id':_0xc52a3e['id'],'available':_0xc52a3e[_0xc2cf('0x49')],'loggedIn':_0xc52a3e[_0xc2cf('0x4a')],'name':_0xc52a3e['name'],'paused':_0xc52a3e[_0xc2cf('0x4b')],'waiting':_0xc52a3e[_0xc2cf('0x4c')]};_0x3c09e8[_0xc2cf('0x25')](_0x169d50);}}_0x1f67a7({'count':_0x3c09e8[_0xc2cf('0x1c')],'rows':_0x3c09e8});});},'MailQueues':function(_0x3844b4){return new Promise(function(_0x349345,_0x491c68){var _0x3d3619=[];for(var _0x4d0c17 in _0x45f7e4[_0xc2cf('0x4d')]){if(_0x45f7e4['mailQueues']['hasOwnProperty'](_0x4d0c17)){var _0x38566e=_0x45f7e4[_0xc2cf('0x4d')][_0x4d0c17];var _0x10e699={'id':_0x38566e['id'],'available':_0x38566e[_0xc2cf('0x49')],'loggedIn':_0x38566e[_0xc2cf('0x4a')],'name':_0x38566e['name'],'paused':_0x38566e[_0xc2cf('0x4b')],'waiting':_0x38566e[_0xc2cf('0x4c')]};_0x3d3619[_0xc2cf('0x25')](_0x10e699);}}_0x349345({'count':_0x3d3619[_0xc2cf('0x1c')],'rows':_0x3d3619});});},'OpenchannelQueues':function(_0x662e75){return new Promise(function(_0x3080ea,_0x320e80){var _0x5e204e=[];for(var _0x82a2f1 in _0x45f7e4[_0xc2cf('0x4e')]){if(_0x45f7e4[_0xc2cf('0x4e')][_0xc2cf('0x44')](_0x82a2f1)){var _0x45ea7b=_0x45f7e4[_0xc2cf('0x4e')][_0x82a2f1];var _0x47b6f9={'id':_0x45ea7b['id'],'available':_0x45ea7b[_0xc2cf('0x49')],'loggedIn':_0x45ea7b[_0xc2cf('0x4a')],'name':_0x45ea7b[_0xc2cf('0x4f')],'paused':_0x45ea7b[_0xc2cf('0x4b')],'waiting':_0x45ea7b['waiting']};_0x5e204e[_0xc2cf('0x25')](_0x47b6f9);}}_0x3080ea({'count':_0x5e204e[_0xc2cf('0x1c')],'rows':_0x5e204e});});},'SmsQueues':function(_0x15d259){return new Promise(function(_0x5b0c37,_0x290d7c){var _0x22c109=[];for(var _0x43c8 in _0x45f7e4[_0xc2cf('0x50')]){if(_0x45f7e4[_0xc2cf('0x50')]['hasOwnProperty'](_0x43c8)){var _0x33f6b3=_0x45f7e4[_0xc2cf('0x50')][_0x43c8];var _0x24824a={'id':_0x33f6b3['id'],'available':_0x33f6b3[_0xc2cf('0x49')],'loggedIn':_0x33f6b3[_0xc2cf('0x4a')],'name':_0x33f6b3[_0xc2cf('0x4f')],'paused':_0x33f6b3[_0xc2cf('0x4b')],'waiting':_0x33f6b3[_0xc2cf('0x4c')]};_0x22c109[_0xc2cf('0x25')](_0x24824a);}}_0x5b0c37({'count':_0x22c109[_0xc2cf('0x1c')],'rows':_0x22c109});});},'FaxQueues':function(_0x176d4e){return new Promise(function(_0x2071e9,_0x295d5a){var _0x12cbce=[];for(var _0x182cfe in _0x45f7e4[_0xc2cf('0x51')]){if(_0x45f7e4['faxQueues'][_0xc2cf('0x44')](_0x182cfe)){var _0x3748a1=_0x45f7e4['faxQueues'][_0x182cfe];var _0x1d0649={'id':_0x3748a1['id'],'available':_0x3748a1[_0xc2cf('0x49')],'loggedIn':_0x3748a1[_0xc2cf('0x4a')],'name':_0x3748a1[_0xc2cf('0x4f')],'paused':_0x3748a1[_0xc2cf('0x4b')],'waiting':_0x3748a1[_0xc2cf('0x4c')]};_0x12cbce[_0xc2cf('0x25')](_0x1d0649);}}_0x2071e9({'count':_0x12cbce[_0xc2cf('0x1c')],'rows':_0x12cbce});});},'WhatsappQueues':function(_0x153fc8){return new Promise(function(_0x7a5c4,_0x733970){var _0x3a4074=[];for(var _0x4439ff in _0x45f7e4[_0xc2cf('0x52')]){if(_0x45f7e4[_0xc2cf('0x52')]['hasOwnProperty'](_0x4439ff)){var _0x3ede44=_0x45f7e4[_0xc2cf('0x52')][_0x4439ff];var _0x4c357c={'id':_0x3ede44['id'],'available':_0x3ede44[_0xc2cf('0x49')],'loggedIn':_0x3ede44[_0xc2cf('0x4a')],'name':_0x3ede44[_0xc2cf('0x4f')],'paused':_0x3ede44[_0xc2cf('0x4b')],'waiting':_0x3ede44[_0xc2cf('0x4c')]};_0x3a4074['push'](_0x4c357c);}}_0x7a5c4({'count':_0x3a4074[_0xc2cf('0x1c')],'rows':_0x3a4074});});},'ChatQueuesWaitingInteractions':function(_0x36618d){return new Promise(function(_0x233362,_0x3b213d){var _0x1d2f5d=_[_0xc2cf('0x53')](_0x45f7e4[_0xc2cf('0x54')]);_0x233362({'count':_0x1d2f5d[_0xc2cf('0x1c')],'rows':_0x1d2f5d});});},'MailQueuesWaitingInteractions':function(_0x1708f9){return new Promise(function(_0x458383,_0x2a9502){var _0x3bd167=_[_0xc2cf('0x53')](_0x45f7e4[_0xc2cf('0x55')]);_0x458383({'count':_0x3bd167[_0xc2cf('0x1c')],'rows':_0x3bd167});});},'OpenchannelQueuesWaitingInteractions':function(_0x560d52){return new Promise(function(_0x338b7f,_0x1e4101){var _0x436c4a=_[_0xc2cf('0x53')](_0x45f7e4['openchannelQueuesWaitingInteractions']);_0x338b7f({'count':_0x436c4a[_0xc2cf('0x1c')],'rows':_0x436c4a});});},'SmsQueuesWaitingInteractions':function(_0x11e393){return new Promise(function(_0xf8ba60,_0x5eba77){var _0x30d148=_['values'](_0x45f7e4[_0xc2cf('0x56')]);_0xf8ba60({'count':_0x30d148[_0xc2cf('0x1c')],'rows':_0x30d148});});},'FaxQueuesWaitingInteractions':function(_0x2ca0ad){return new Promise(function(_0x4e04b3,_0x58fb04){var _0x1bb19a=_[_0xc2cf('0x53')](_0x45f7e4[_0xc2cf('0x57')]);_0x4e04b3({'count':_0x1bb19a[_0xc2cf('0x1c')],'rows':_0x1bb19a});});},'WhatsappQueuesWaitingInteractions':function(_0x1ef457){return new Promise(function(_0x19d071,_0xf9a925){var _0x6d3308=_[_0xc2cf('0x53')](_0x45f7e4[_0xc2cf('0x58')]);_0x19d071({'count':_0x6d3308[_0xc2cf('0x1c')],'rows':_0x6d3308});});}};var _0x4cdeab=jayson['server'](_0x9aaa32)[_0xc2cf('0x59')]();_0x4cdeab['on']('error',function(_0x57d56d){logger[_0xc2cf('0x2e')](JSON[_0xc2cf('0x33')](_0x57d56d));return _0x12cb34(_0x57d56d);});_0x4cdeab[_0xc2cf('0x16')](0x232c,_0xc2cf('0x5a'),function(){console[_0xc2cf('0x5b')]('Routing\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!',0x232c);return _0x49e734(_0xc2cf('0x5c')+0x232c);});});};
\ No newline at end of file
+var _0x8d62=['rules','execute','stringify','matchPath','complete','format','Skipped\x20routing\x20for\x20%s','stack','routing\x20is\x20empty','agent','agents','busyQueue','emit','end','QueueReport','update','catch','error\x20update\x20queue\x20report','message\x20is\x20empty','busy','hasOwnProperty','capacity','CurrentCapacity','updateRealtime','agent\x20not\x20found','values','chatQueues','available','name','mailQueues','loggedIn','paused','waiting','openchannelQueues','smsQueues','faxQueues','whatsappQueues','chatQueuesWaitingInteractions','mailQueuesWaitingInteractions','openchannelQueuesWaitingInteractions','faxQueuesWaitingInteractions','http','127.0.0.1','Routing\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!','util','path','jayson/promise','bluebird','./applications/utils','./applications/strategy/util','../../../config/logger','routing','../rpc/openchannelQueueReport','../rpc/mailQueueReport','../rpc/chatQueueReport','../rpc/smsQueueReport','../rpc/faxQueueReport','../rpc/whatsappQueueReport','%s.%s.%s','isNil','IntervalId','Intervals','map','interval','listen','channel','message','interaction','checkWaitingNotifications','transfer','applications','isArray','length','existsSync','join','app','toLowerCase','autoreply','appdata','split','push','slice','dialogflow','amazonlex','TagId','tvox','getMustacheRender','notificationTemplate','ChatWebsiteId','ContactId','body','%s:%s:%s','condition','intervals','./applications/','consequence','priority','info','Push\x20new\x20rule','error','Please\x20create\x20a\x20new\x20file\x20under','.js'];(function(_0x27d446,_0x17135c){var _0x16935f=function(_0x119593){while(--_0x119593){_0x27d446['push'](_0x27d446['shift']());}};_0x16935f(++_0x17135c);}(_0x8d62,0xf8));var _0x28d6=function(_0x1e1762,_0x185229){_0x1e1762=_0x1e1762-0x0;var _0x3f58d0=_0x8d62[_0x1e1762];return _0x3f58d0;};'use strict';var _=require('lodash');var util=require(_0x28d6('0x0'));var path=require(_0x28d6('0x1'));var fs=require('fs');var jayson=require(_0x28d6('0x2'));var BPromise=require(_0x28d6('0x3'));var utils=require(_0x28d6('0x4'));var sUtils=require(_0x28d6('0x5'));var logger=require(_0x28d6('0x6'))(_0x28d6('0x7'));var rpc={'openchannelQueueReport':require(_0x28d6('0x8')),'mailQueueReport':require(_0x28d6('0x9')),'chatQueueReport':require(_0x28d6('0xa')),'smsQueueReport':require(_0x28d6('0xb')),'faxQueueReport':require(_0x28d6('0xc')),'whatsappQueueReport':require(_0x28d6('0xd'))};var RuleEngine=require('../lib/rule-engine');function getId(_0x1d5399,_0xb9dccb,_0x3f3235){return util['format'](_0x28d6('0xe'),_0x1d5399,_0xb9dccb||0x0,_0x3f3235||0x0);}function getIntervals(_0x4b564f,_0x13eeb6){var _0x7726e1=[];if(!_[_0x28d6('0xf')](_0x13eeb6[_0x28d6('0x10')])&&!_[_0x28d6('0xf')](_0x4b564f[_0x13eeb6['IntervalId']])&&!_[_0x28d6('0xf')](_0x4b564f[_0x13eeb6[_0x28d6('0x10')]][_0x28d6('0x11')])){_0x7726e1=_[_0x28d6('0x12')](_0x4b564f[_0x13eeb6[_0x28d6('0x10')]][_0x28d6('0x11')],_0x28d6('0x13'));}else if(!_[_0x28d6('0xf')](_0x13eeb6['interval'])){_0x7726e1=[_0x13eeb6[_0x28d6('0x13')]];}return _0x7726e1;}exports[_0x28d6('0x14')]=function(_0x33ba38){_0x33ba38['rules']={};return new BPromise(function(_0x1621ee,_0x53f101){var _0x19c21d={'Start':function(_0x425ffb){var _0x4b82e2=this;return new Promise(function(_0x1881a8,_0x159d2a){if(_0x425ffb){try{var _0x2d5eee=[];var _0x17a822=getId(_0x425ffb[_0x28d6('0x15')],_0x425ffb['message']?_0x425ffb[_0x28d6('0x16')]['id']:0x0,_0x425ffb['interaction']?_0x425ffb[_0x28d6('0x17')]['id']:0x0);var _0x155151=sUtils[_0x28d6('0x18')](_0x33ba38,_0x425ffb);if(_0x425ffb[_0x28d6('0x19')]||!_0x155151&&_0x425ffb[_0x28d6('0x1a')]&&_[_0x28d6('0x1b')](_0x425ffb[_0x28d6('0x1a')])&&_0x425ffb['applications'][_0x28d6('0x1c')]){for(var _0x20f2fd=0x0;_0x20f2fd<_0x425ffb['applications'][_0x28d6('0x1c')];_0x20f2fd+=0x1){var _0x24f764=_0x425ffb[_0x28d6('0x1a')][_0x20f2fd];if(fs[_0x28d6('0x1d')](path[_0x28d6('0x1e')](__dirname,_0x28d6('0x1a'),_0x24f764[_0x28d6('0x1f')]+'.js'))){var _0xcf8fa0=[];switch(_0x24f764['app'][_0x28d6('0x20')]()){case _0x28d6('0x21'):var _0x455dd6=_0x24f764[_0x28d6('0x22')][_0x28d6('0x23')](',');if(_0x425ffb[_0x28d6('0x15')]==='mail'){_0xcf8fa0['push'](_0x455dd6[0x0]);_0xcf8fa0[_0x28d6('0x24')](_0x455dd6[0x1]);_0xcf8fa0[_0x28d6('0x24')](_0x455dd6[_0x28d6('0x25')](0x2,_0x455dd6[_0x28d6('0x1c')])['join'](','));}else{_0xcf8fa0[_0x28d6('0x24')](_0x455dd6[0x0]);_0xcf8fa0[_0x28d6('0x24')](_0x455dd6[_0x28d6('0x25')](0x1,_0x455dd6[_0x28d6('0x1c')])[_0x28d6('0x1e')](','));}break;case _0x28d6('0x26'):var _0x60ded0=_0x24f764[_0x28d6('0x22')][_0x28d6('0x23')](',');_0xcf8fa0[_0x28d6('0x24')](_0x60ded0[0x0]);_0xcf8fa0[_0x28d6('0x24')](_0x60ded0[0x1]);_0xcf8fa0[_0x28d6('0x24')](_0x60ded0[_0x28d6('0x25')](0x2,_0x60ded0[_0x28d6('0x1c')])['join'](','));break;case'dialogflowv2':var _0x1de585=_0x24f764[_0x28d6('0x22')][_0x28d6('0x23')](',');_0xcf8fa0[_0x28d6('0x24')](_0x1de585[0x0]);_0xcf8fa0[_0x28d6('0x24')](_0x1de585[0x1]);_0xcf8fa0[_0x28d6('0x24')](_0x1de585[0x2]);_0xcf8fa0['push'](_0x1de585[0x3]);_0xcf8fa0[_0x28d6('0x24')](_0x1de585['slice'](0x4,_0x1de585[_0x28d6('0x1c')])['join'](','));break;case _0x28d6('0x27'):var _0x2594cb=_0x24f764[_0x28d6('0x22')][_0x28d6('0x23')](',');_0xcf8fa0[_0x28d6('0x24')](_0x2594cb[0x0]);_0xcf8fa0['push'](_0x2594cb[0x1]);_0xcf8fa0['push'](_0x2594cb[0x2]);_0xcf8fa0[_0x28d6('0x24')](_0x2594cb[0x3]);_0xcf8fa0[_0x28d6('0x24')](_0x2594cb['slice'](0x4,_0x2594cb[_0x28d6('0x1c')])['join'](','));break;case _0x28d6('0x16'):_0xcf8fa0['push'](_0x24f764[_0x28d6('0x22')]);break;case'tag':_0xcf8fa0[_0x28d6('0x24')](_0x24f764[_0x28d6('0x28')]);_0xcf8fa0[_0x28d6('0x24')](_0x24f764[_0x28d6('0x22')]);break;case _0x28d6('0x29'):var _0x10b374=utils[_0x28d6('0x2a')](_0x425ffb['account'][_0x28d6('0x2b')],_0x425ffb);var _0x23a04b=_0x24f764[_0x28d6('0x22')][_0x28d6('0x23')](',');_0xcf8fa0['push'](_0x23a04b[0x0]);_0xcf8fa0[_0x28d6('0x24')](_0x23a04b[0x1]);_0xcf8fa0[_0x28d6('0x24')](_0x23a04b[0x2]);_0xcf8fa0[_0x28d6('0x24')](_0x23a04b[0x3]);_0xcf8fa0[_0x28d6('0x24')](_0x23a04b[0x4]);_0xcf8fa0['push'](_0x23a04b[0x5]);_0xcf8fa0[_0x28d6('0x24')](_0x23a04b[0x6]);_0xcf8fa0[_0x28d6('0x24')](_0x23a04b[0x7]);_0xcf8fa0[_0x28d6('0x24')](_0x23a04b[0x8]);_0xcf8fa0[_0x28d6('0x24')](_0x23a04b[0x9]);_0xcf8fa0[_0x28d6('0x24')](_0x23a04b[0xa]);_0xcf8fa0[_0x28d6('0x24')](_0x425ffb[_0x28d6('0x17')]['id']);_0xcf8fa0[_0x28d6('0x24')](_0x425ffb[_0x28d6('0x16')]['id']);_0xcf8fa0[_0x28d6('0x24')](_0x24f764[_0x28d6('0x2c')]);_0xcf8fa0[_0x28d6('0x24')](_0x425ffb[_0x28d6('0x17')][_0x28d6('0x2d')]);_0xcf8fa0[_0x28d6('0x24')](_0x425ffb[_0x28d6('0x2e')]['body']);_0xcf8fa0['push'](_0x10b374);break;default:_0xcf8fa0=_['isNil'](_0x24f764[_0x28d6('0x22')])?[]:_0x24f764['appdata']['split'](',');}var _0x293320={'id':util['format'](_0x28d6('0x2f'),_0x17a822,_0x24f764['id'],_0x24f764[_0x28d6('0x1f')]),'condition':require('./interval')[_0x28d6('0x30')](_0x17a822,getIntervals(_0x33ba38[_0x28d6('0x31')],_0x24f764),_0x33ba38),'consequence':require(_0x28d6('0x32')+_0x24f764[_0x28d6('0x1f')])[_0x28d6('0x33')](_0x17a822,_0xcf8fa0,_0x33ba38,_0x425ffb),'p':_0x24f764[_0x28d6('0x34')]||0x0};logger[_0x28d6('0x35')](_0x28d6('0x36'),_0x293320['id'],'on\x20interval',getIntervals(_0x33ba38[_0x28d6('0x31')],_0x24f764)[_0x28d6('0x1e')]('\x20|\x20'));_0x2d5eee[_0x28d6('0x24')](_0x293320);}else{logger[_0x28d6('0x37')](_0x28d6('0x38'),path['join'](__dirname,_0x28d6('0x1a'),_0x24f764[_0x28d6('0x1f')]+_0x28d6('0x39')));}}_0x33ba38[_0x28d6('0x3a')][_0x17a822]=new RuleEngine(_0x2d5eee);_0x33ba38['rules'][_0x17a822][_0x28d6('0x3b')](_0x425ffb,function(_0x3559ab){logger[_0x28d6('0x35')]('Applications\x20executed',JSON[_0x28d6('0x3c')](_0x3559ab[_0x28d6('0x3d')]));if(_0x33ba38[_0x28d6('0x3a')][_0x17a822]){_0x33ba38[_0x28d6('0x3a')][_0x17a822]['emit'](_0x28d6('0x3e'));}});return _0x1881a8({'code':0xc8,'message':_0x425ffb});}else{if(_0x155151){logger[_0x28d6('0x35')](util[_0x28d6('0x3f')](_0x28d6('0x40'),_0x17a822));}else{logger[_0x28d6('0x35')]('No\x20applications\x20to\x20execute');}return _0x1881a8({'code':0xc8,'message':_0x425ffb});}}catch(_0x159580){logger[_0x28d6('0x37')](_0x159580[_0x28d6('0x41')]);return _0x159d2a(_0x4b82e2[_0x28d6('0x37')](0x1f4,_0x159580));}}return _0x159d2a(_0x28d6('0x42'));});},'AcceptMessage':function(_0x182d70){var _0x10a52=this;return new Promise(function(_0x6876a5,_0x293c76){if(_0x182d70[_0x28d6('0x43')]&&_0x182d70['agent']['id']){if(_0x33ba38['agents'][_0x182d70[_0x28d6('0x43')]['id']]){_0x33ba38['agents'][_0x182d70['agent']['id']]['busy']=![];_0x33ba38[_0x28d6('0x44')][_0x182d70['agent']['id']][_0x28d6('0x45')]=undefined;}}if(_0x182d70['message']&&_0x182d70[_0x28d6('0x16')]['id']){try{var _0x3b7f2e=getId(_0x182d70[_0x28d6('0x15')],_0x182d70['message']?_0x182d70['message']['id']:0x0,_0x182d70['interaction']?_0x182d70[_0x28d6('0x17')]['id']:0x0);if(_0x33ba38[_0x28d6('0x3a')][_0x3b7f2e]){_0x33ba38['rules'][_0x3b7f2e][_0x28d6('0x46')](_0x28d6('0x47'));if(rpc[_0x182d70[_0x28d6('0x15')]+_0x28d6('0x48')]){rpc[_0x182d70[_0x28d6('0x15')]+_0x28d6('0x48')][_0x28d6('0x49')](_0x3b7f2e,{'UserId':_0x182d70[_0x28d6('0x16')]['UserId']})[_0x28d6('0x4a')](function(){logger[_0x28d6('0x37')](_0x28d6('0x4b'));});}}return _0x6876a5({'code':0xc8,'message':_0x182d70});}catch(_0x2b0b72){logger[_0x28d6('0x37')](_0x2b0b72[_0x28d6('0x41')]);return _0x293c76(_0x10a52[_0x28d6('0x37')](0x1f4,_0x2b0b72));}}logger['error'](_0x28d6('0x4c'));return _0x293c76(_0x10a52['error'](0x1f4,_0x28d6('0x4c')));});},'RejectMessage':function(_0x2f8f42){var _0x6ee4d9=this;return new Promise(function(_0x15edd6,_0x69aa04){if(_0x2f8f42[_0x28d6('0x43')]&&_0x2f8f42['agent']['id']){try{if(_0x33ba38[_0x28d6('0x44')][_0x2f8f42['agent']['id']]){_0x33ba38[_0x28d6('0x44')][_0x2f8f42['agent']['id']][_0x28d6('0x4d')]=![];_0x33ba38[_0x28d6('0x44')][_0x2f8f42[_0x28d6('0x43')]['id']][_0x28d6('0x45')]=undefined;}return _0x15edd6({'code':0xc8,'message':_0x2f8f42});}catch(_0x49a01a){logger[_0x28d6('0x37')](_0x49a01a[_0x28d6('0x41')]);return _0x69aa04(_0x6ee4d9[_0x28d6('0x37')](0x1f4,_0x49a01a));}}logger[_0x28d6('0x37')](_0x28d6('0x4c'));return _0x69aa04(_0x6ee4d9[_0x28d6('0x37')](0x1f4,_0x28d6('0x4c')));});},'AbandonInteraction':function(_0x1ed92e){var _0x164f53=this;return new Promise(function(_0xe55cde,_0x267661){if(_0x1ed92e['channel']&&_0x1ed92e[_0x28d6('0x17')]&&_0x1ed92e[_0x28d6('0x17')]['id']){try{var _0x45a288=getId(_0x1ed92e[_0x28d6('0x15')],_0x1ed92e[_0x28d6('0x16')]?_0x1ed92e['message']['id']:0x0,_0x1ed92e[_0x28d6('0x17')]?_0x1ed92e[_0x28d6('0x17')]['id']:0x0);if(_0x33ba38[_0x28d6('0x3a')][_0x45a288]){_0x33ba38[_0x28d6('0x3a')][_0x45a288][_0x28d6('0x46')]('end');}return _0xe55cde({'code':0xc8,'message':_0x1ed92e});}catch(_0x3bf12f){logger[_0x28d6('0x37')](_0x3bf12f[_0x28d6('0x41')]);return _0x267661(_0x164f53[_0x28d6('0x37')](0x1f4,_0x3bf12f));}}logger['error'](_0x28d6('0x4c'));return _0x267661(_0x164f53['error'](0x1f4,_0x28d6('0x4c')));});},'AgentCapacity':function(_0x1b8ed6){var _0x351f8d=this;return new Promise(function(_0x4c5c36,_0x21fd25){if(_0x33ba38[_0x28d6('0x44')][_0x28d6('0x4e')](_0x1b8ed6['id'])){for(var _0x16ced4 in _0x1b8ed6[_0x28d6('0x4f')]){if(_0x1b8ed6[_0x28d6('0x4f')][_0x28d6('0x4e')](_0x16ced4)){if(_0x33ba38['agents'][_0x1b8ed6['id']][_0x28d6('0x4e')](_0x16ced4+_0x28d6('0x50'))){_0x33ba38[_0x28d6('0x44')][_0x1b8ed6['id']][_0x16ced4+_0x28d6('0x50')]=parseInt(_0x1b8ed6[_0x28d6('0x4f')][_0x16ced4],0xa);}}}_0x33ba38[_0x28d6('0x44')][_0x1b8ed6['id']][_0x28d6('0x51')]();return _0x4c5c36({'code':0xc8,'message':_0x33ba38[_0x28d6('0x44')][_0x1b8ed6['id']]});}else{return _0x21fd25(_0x351f8d[_0x28d6('0x37')](0x1f4,_0x28d6('0x52')));}});},'Agents':function(_0x5d1441){return new Promise(function(_0x3a87c8){var _0xbe3e6=_[_0x28d6('0x53')](_0x33ba38[_0x28d6('0x44')]);if(_0x5d1441&&_0x5d1441['id']){var _0xbd4b4b=_['find'](_0xbe3e6,function(_0x2322c6){return _0x2322c6['id']===_0x5d1441['id'];});_0x3a87c8(_0xbd4b4b);}else{_0x3a87c8({'count':_0xbe3e6[_0x28d6('0x1c')],'rows':_0xbe3e6});}});},'ChatQueues':function(){return new Promise(function(_0xd6b590){var _0x3676b3=[];for(var _0x221dec in _0x33ba38[_0x28d6('0x54')]){if(_0x33ba38[_0x28d6('0x54')]['hasOwnProperty'](_0x221dec)){var _0x543770=_0x33ba38[_0x28d6('0x54')][_0x221dec];var _0x245872={'id':_0x543770['id'],'available':_0x543770[_0x28d6('0x55')],'loggedIn':_0x543770['loggedIn'],'name':_0x543770[_0x28d6('0x56')],'paused':_0x543770['paused'],'waiting':_0x543770['waiting']};_0x3676b3[_0x28d6('0x24')](_0x245872);}}_0xd6b590({'count':_0x3676b3[_0x28d6('0x1c')],'rows':_0x3676b3});});},'MailQueues':function(){return new Promise(function(_0x2613fb){var _0x2f0580=[];for(var _0x45245a in _0x33ba38[_0x28d6('0x57')]){if(_0x33ba38[_0x28d6('0x57')]['hasOwnProperty'](_0x45245a)){var _0x5956de=_0x33ba38['mailQueues'][_0x45245a];var _0x2fae42={'id':_0x5956de['id'],'available':_0x5956de[_0x28d6('0x55')],'loggedIn':_0x5956de[_0x28d6('0x58')],'name':_0x5956de[_0x28d6('0x56')],'paused':_0x5956de[_0x28d6('0x59')],'waiting':_0x5956de[_0x28d6('0x5a')]};_0x2f0580[_0x28d6('0x24')](_0x2fae42);}}_0x2613fb({'count':_0x2f0580[_0x28d6('0x1c')],'rows':_0x2f0580});});},'OpenchannelQueues':function(){return new Promise(function(_0x26a2f7){var _0x1ed7e3=[];for(var _0x5e1ba4 in _0x33ba38[_0x28d6('0x5b')]){if(_0x33ba38[_0x28d6('0x5b')][_0x28d6('0x4e')](_0x5e1ba4)){var _0xb9a647=_0x33ba38[_0x28d6('0x5b')][_0x5e1ba4];var _0x278401={'id':_0xb9a647['id'],'available':_0xb9a647[_0x28d6('0x55')],'loggedIn':_0xb9a647[_0x28d6('0x58')],'name':_0xb9a647[_0x28d6('0x56')],'paused':_0xb9a647['paused'],'waiting':_0xb9a647['waiting']};_0x1ed7e3[_0x28d6('0x24')](_0x278401);}}_0x26a2f7({'count':_0x1ed7e3[_0x28d6('0x1c')],'rows':_0x1ed7e3});});},'SmsQueues':function(){return new Promise(function(_0x6bdf9f){var _0x5418ba=[];for(var _0x376a7d in _0x33ba38[_0x28d6('0x5c')]){if(_0x33ba38[_0x28d6('0x5c')][_0x28d6('0x4e')](_0x376a7d)){var _0x228f44=_0x33ba38[_0x28d6('0x5c')][_0x376a7d];var _0x2dbdf6={'id':_0x228f44['id'],'available':_0x228f44[_0x28d6('0x55')],'loggedIn':_0x228f44[_0x28d6('0x58')],'name':_0x228f44[_0x28d6('0x56')],'paused':_0x228f44[_0x28d6('0x59')],'waiting':_0x228f44[_0x28d6('0x5a')]};_0x5418ba[_0x28d6('0x24')](_0x2dbdf6);}}_0x6bdf9f({'count':_0x5418ba[_0x28d6('0x1c')],'rows':_0x5418ba});});},'FaxQueues':function(){return new Promise(function(_0x22d73b){var _0x51adbb=[];for(var _0x12cac4 in _0x33ba38[_0x28d6('0x5d')]){if(_0x33ba38[_0x28d6('0x5d')][_0x28d6('0x4e')](_0x12cac4)){var _0x4bf2cd=_0x33ba38[_0x28d6('0x5d')][_0x12cac4];var _0x51c690={'id':_0x4bf2cd['id'],'available':_0x4bf2cd[_0x28d6('0x55')],'loggedIn':_0x4bf2cd[_0x28d6('0x58')],'name':_0x4bf2cd['name'],'paused':_0x4bf2cd[_0x28d6('0x59')],'waiting':_0x4bf2cd['waiting']};_0x51adbb[_0x28d6('0x24')](_0x51c690);}}_0x22d73b({'count':_0x51adbb[_0x28d6('0x1c')],'rows':_0x51adbb});});},'WhatsappQueues':function(){return new Promise(function(_0x4a6903){var _0x3fede2=[];for(var _0x18c0aa in _0x33ba38[_0x28d6('0x5e')]){if(_0x33ba38['whatsappQueues'][_0x28d6('0x4e')](_0x18c0aa)){var _0x359fe2=_0x33ba38[_0x28d6('0x5e')][_0x18c0aa];var _0x1a8def={'id':_0x359fe2['id'],'available':_0x359fe2[_0x28d6('0x55')],'loggedIn':_0x359fe2[_0x28d6('0x58')],'name':_0x359fe2[_0x28d6('0x56')],'paused':_0x359fe2[_0x28d6('0x59')],'waiting':_0x359fe2['waiting']};_0x3fede2[_0x28d6('0x24')](_0x1a8def);}}_0x4a6903({'count':_0x3fede2[_0x28d6('0x1c')],'rows':_0x3fede2});});},'ChatQueuesWaitingInteractions':function(){return new Promise(function(_0x801f2f){var _0x4f2ac4=_[_0x28d6('0x53')](_0x33ba38[_0x28d6('0x5f')]);_0x801f2f({'count':_0x4f2ac4[_0x28d6('0x1c')],'rows':_0x4f2ac4});});},'MailQueuesWaitingInteractions':function(){return new Promise(function(_0x26aab9){var _0x5632ba=_['values'](_0x33ba38[_0x28d6('0x60')]);_0x26aab9({'count':_0x5632ba[_0x28d6('0x1c')],'rows':_0x5632ba});});},'OpenchannelQueuesWaitingInteractions':function(){return new Promise(function(_0x4da055){var _0x15b53a=_['values'](_0x33ba38[_0x28d6('0x61')]);_0x4da055({'count':_0x15b53a[_0x28d6('0x1c')],'rows':_0x15b53a});});},'SmsQueuesWaitingInteractions':function(){return new Promise(function(_0x3f0eff){var _0xca226b=_['values'](_0x33ba38['smsQueuesWaitingInteractions']);_0x3f0eff({'count':_0xca226b[_0x28d6('0x1c')],'rows':_0xca226b});});},'FaxQueuesWaitingInteractions':function(){return new Promise(function(_0x5e1ce0){var _0x261cfb=_['values'](_0x33ba38[_0x28d6('0x62')]);_0x5e1ce0({'count':_0x261cfb[_0x28d6('0x1c')],'rows':_0x261cfb});});},'WhatsappQueuesWaitingInteractions':function(){return new Promise(function(_0x3b6e84){var _0x5383c8=_[_0x28d6('0x53')](_0x33ba38['whatsappQueuesWaitingInteractions']);_0x3b6e84({'count':_0x5383c8[_0x28d6('0x1c')],'rows':_0x5383c8});});}};var _0x2788b7=jayson['server'](_0x19c21d)[_0x28d6('0x63')]();_0x2788b7['on'](_0x28d6('0x37'),function(_0x420931){logger['error'](JSON[_0x28d6('0x3c')](_0x420931));return _0x53f101(_0x420931);});_0x2788b7['listen'](0x232c,_0x28d6('0x64'),function(){console['log'](_0x28d6('0x65'),0x232c);return _0x1621ee('RPC\x20listening\x20on\x20port:'+0x232c);});});};
\ No newline at end of file