Built motion from commit 3c2ce842.|2.6.31
[motion2.git] / server / services / routing / server / index.js
index a2889f1..68dae45 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x81f8=['format','isNil','IntervalId','Intervals','interval','listen','rules','channel','message','interaction','checkWaitingNotifications','transfer','applications','length','existsSync','join','app','toLowerCase','split','mail','push','slice','dialogflow','appdata','amazonlex','tag','TagId','tvox','getMustacheRender','account','ChatWebsiteId','body','%s:%s:%s','condition','./applications/','consequence','priority','info','Push\x20new\x20rule','intervals','error','.js','Applications\x20executed','stringify','matchPath','emit','complete','Skipped\x20routing\x20for\x20%s','No\x20applications\x20to\x20execute','routing\x20is\x20empty','agent','agents','busy','busyQueue','QueueReport','update','UserId','catch','error\x20update\x20queue\x20report','stack','message\x20is\x20empty','end','hasOwnProperty','capacity','CurrentCapacity','agent\x20not\x20found','values','find','chatQueues','available','loggedIn','name','paused','waiting','mailQueues','openchannelQueues','smsQueues','faxQueues','whatsappQueues','chatQueuesWaitingInteractions','openchannelQueuesWaitingInteractions','smsQueuesWaitingInteractions','faxQueuesWaitingInteractions','http','127.0.0.1','log','RPC\x20listening\x20on\x20port:','lodash','util','jayson/promise','bluebird','./applications/utils','./applications/strategy/util','../../../config/logger','../rpc/openchannelQueueReport','../rpc/mailQueueReport','../rpc/chatQueueReport','../rpc/smsQueueReport','../rpc/faxQueueReport','../rpc/whatsappQueueReport','../lib/rule-engine'];(function(_0x61c264,_0x1237f0){var _0x20797b=function(_0x1c3554){while(--_0x1c3554){_0x61c264['push'](_0x61c264['shift']());}};_0x20797b(++_0x1237f0);}(_0x81f8,0x186));var _0x881f=function(_0x5accb2,_0x490563){_0x5accb2=_0x5accb2-0x0;var _0x2e200c=_0x81f8[_0x5accb2];return _0x2e200c;};'use strict';var _=require(_0x881f('0x0'));var util=require(_0x881f('0x1'));var path=require('path');var fs=require('fs');var jayson=require(_0x881f('0x2'));var BPromise=require(_0x881f('0x3'));var utils=require(_0x881f('0x4'));var sUtils=require(_0x881f('0x5'));var logger=require(_0x881f('0x6'))('routing');var rpc={'openchannelQueueReport':require(_0x881f('0x7')),'mailQueueReport':require(_0x881f('0x8')),'chatQueueReport':require(_0x881f('0x9')),'smsQueueReport':require(_0x881f('0xa')),'faxQueueReport':require(_0x881f('0xb')),'whatsappQueueReport':require(_0x881f('0xc'))};var RuleEngine=require(_0x881f('0xd'));function getId(_0x521af3,_0x5b1564,_0x8ae33d){return util[_0x881f('0xe')]('%s.%s.%s',_0x521af3,_0x5b1564||0x0,_0x8ae33d||0x0);}function getIntervals(_0x8d94d7,_0x213a06){var _0x44b3e2=[];if(!_[_0x881f('0xf')](_0x213a06['IntervalId'])&&!_['isNil'](_0x8d94d7[_0x213a06[_0x881f('0x10')]])&&!_[_0x881f('0xf')](_0x8d94d7[_0x213a06[_0x881f('0x10')]]['Intervals'])){_0x44b3e2=_['map'](_0x8d94d7[_0x213a06[_0x881f('0x10')]][_0x881f('0x11')],'interval');}else if(!_['isNil'](_0x213a06[_0x881f('0x12')])){_0x44b3e2=[_0x213a06[_0x881f('0x12')]];}return _0x44b3e2;}exports[_0x881f('0x13')]=function(_0x52c140){_0x52c140[_0x881f('0x14')]={};return new BPromise(function(_0x1f51aa,_0x58bd20){var _0x3d8353={'Start':function(_0x3d9e50){var _0x4b7378=this;return new Promise(function(_0x301d66,_0x167107){if(_0x3d9e50){try{var _0x3704fa=[];var _0xf35b6e=getId(_0x3d9e50[_0x881f('0x15')],_0x3d9e50[_0x881f('0x16')]?_0x3d9e50['message']['id']:0x0,_0x3d9e50[_0x881f('0x17')]?_0x3d9e50['interaction']['id']:0x0);var _0x5d2955=sUtils[_0x881f('0x18')](_0x52c140,_0x3d9e50);if(_0x3d9e50[_0x881f('0x19')]||!_0x5d2955&&_0x3d9e50[_0x881f('0x1a')]&&_['isArray'](_0x3d9e50[_0x881f('0x1a')])&&_0x3d9e50[_0x881f('0x1a')]['length']){for(var _0x954062=0x0;_0x954062<_0x3d9e50[_0x881f('0x1a')][_0x881f('0x1b')];_0x954062+=0x1){var _0x537c77=_0x3d9e50['applications'][_0x954062];if(fs[_0x881f('0x1c')](path[_0x881f('0x1d')](__dirname,_0x881f('0x1a'),_0x537c77[_0x881f('0x1e')]+'.js'))){var _0x1b434d=[];switch(_0x537c77[_0x881f('0x1e')][_0x881f('0x1f')]()){case'autoreply':var _0x16392b=_0x537c77['appdata'][_0x881f('0x20')](',');if(_0x3d9e50['channel']===_0x881f('0x21')){_0x1b434d[_0x881f('0x22')](_0x16392b[0x0]);_0x1b434d[_0x881f('0x22')](_0x16392b[0x1]);_0x1b434d[_0x881f('0x22')](_0x16392b['slice'](0x2,_0x16392b[_0x881f('0x1b')])[_0x881f('0x1d')](','));}else{_0x1b434d[_0x881f('0x22')](_0x16392b[0x0]);_0x1b434d[_0x881f('0x22')](_0x16392b[_0x881f('0x23')](0x1,_0x16392b[_0x881f('0x1b')])['join'](','));}break;case _0x881f('0x24'):var _0x269741=_0x537c77[_0x881f('0x25')][_0x881f('0x20')](',');_0x1b434d[_0x881f('0x22')](_0x269741[0x0]);_0x1b434d['push'](_0x269741[0x1]);_0x1b434d['push'](_0x269741[_0x881f('0x23')](0x2,_0x269741[_0x881f('0x1b')])[_0x881f('0x1d')](','));break;case'dialogflowv2':var _0x213d9d=_0x537c77[_0x881f('0x25')][_0x881f('0x20')](',');_0x1b434d[_0x881f('0x22')](_0x213d9d[0x0]);_0x1b434d[_0x881f('0x22')](_0x213d9d[0x1]);_0x1b434d[_0x881f('0x22')](_0x213d9d[0x2]);_0x1b434d[_0x881f('0x22')](_0x213d9d[0x3]);_0x1b434d[_0x881f('0x22')](_0x213d9d[_0x881f('0x23')](0x4,_0x213d9d[_0x881f('0x1b')])[_0x881f('0x1d')](','));break;case _0x881f('0x26'):var _0x33e2a9=_0x537c77['appdata'][_0x881f('0x20')](',');_0x1b434d[_0x881f('0x22')](_0x33e2a9[0x0]);_0x1b434d[_0x881f('0x22')](_0x33e2a9[0x1]);_0x1b434d['push'](_0x33e2a9[0x2]);_0x1b434d[_0x881f('0x22')](_0x33e2a9[0x3]);_0x1b434d[_0x881f('0x22')](_0x33e2a9['slice'](0x4,_0x33e2a9[_0x881f('0x1b')])[_0x881f('0x1d')](','));break;case _0x881f('0x16'):_0x1b434d[_0x881f('0x22')](_0x537c77[_0x881f('0x25')]);break;case _0x881f('0x27'):_0x1b434d[_0x881f('0x22')](_0x537c77[_0x881f('0x28')]);_0x1b434d[_0x881f('0x22')](_0x537c77[_0x881f('0x25')]);break;case _0x881f('0x29'):var _0x5da091=utils[_0x881f('0x2a')](_0x3d9e50[_0x881f('0x2b')]['notificationTemplate'],_0x3d9e50);var _0x24006f=_0x537c77[_0x881f('0x25')][_0x881f('0x20')](',');_0x1b434d[_0x881f('0x22')](_0x24006f[0x0]);_0x1b434d[_0x881f('0x22')](_0x24006f[0x1]);_0x1b434d['push'](_0x24006f[0x2]);_0x1b434d['push'](_0x24006f[0x3]);_0x1b434d[_0x881f('0x22')](_0x24006f[0x4]);_0x1b434d[_0x881f('0x22')](_0x24006f[0x5]);_0x1b434d['push'](_0x24006f[0x6]);_0x1b434d[_0x881f('0x22')](_0x24006f[0x7]);_0x1b434d['push'](_0x24006f[0x8]);_0x1b434d[_0x881f('0x22')](_0x24006f[0x9]);_0x1b434d[_0x881f('0x22')](_0x24006f[0xa]);_0x1b434d[_0x881f('0x22')](_0x3d9e50[_0x881f('0x17')]['id']);_0x1b434d[_0x881f('0x22')](_0x3d9e50[_0x881f('0x16')]['id']);_0x1b434d['push'](_0x537c77[_0x881f('0x2c')]);_0x1b434d[_0x881f('0x22')](_0x3d9e50[_0x881f('0x17')]['ContactId']);_0x1b434d[_0x881f('0x22')](_0x3d9e50[_0x881f('0x2d')][_0x881f('0x2d')]);_0x1b434d['push'](_0x5da091);break;default:_0x1b434d=_[_0x881f('0xf')](_0x537c77[_0x881f('0x25')])?[]:_0x537c77[_0x881f('0x25')][_0x881f('0x20')](',');}var _0x463883={'id':util[_0x881f('0xe')](_0x881f('0x2e'),_0xf35b6e,_0x537c77['id'],_0x537c77['app']),'condition':require('./interval')[_0x881f('0x2f')](_0xf35b6e,getIntervals(_0x52c140['intervals'],_0x537c77),_0x52c140),'consequence':require(_0x881f('0x30')+_0x537c77['app'])[_0x881f('0x31')](_0xf35b6e,_0x1b434d,_0x52c140,_0x3d9e50),'p':_0x537c77[_0x881f('0x32')]||0x0};logger[_0x881f('0x33')](_0x881f('0x34'),_0x463883['id'],'on\x20interval',getIntervals(_0x52c140[_0x881f('0x35')],_0x537c77)['join']('\x20|\x20'));_0x3704fa[_0x881f('0x22')](_0x463883);}else{logger[_0x881f('0x36')]('Please\x20create\x20a\x20new\x20file\x20under',path[_0x881f('0x1d')](__dirname,_0x881f('0x1a'),_0x537c77[_0x881f('0x1e')]+_0x881f('0x37')));}}_0x52c140[_0x881f('0x14')][_0xf35b6e]=new RuleEngine(_0x3704fa);_0x52c140['rules'][_0xf35b6e]['execute'](_0x3d9e50,function(_0x4ce377){logger[_0x881f('0x33')](_0x881f('0x38'),JSON[_0x881f('0x39')](_0x4ce377[_0x881f('0x3a')]));if(_0x52c140[_0x881f('0x14')][_0xf35b6e]){_0x52c140[_0x881f('0x14')][_0xf35b6e][_0x881f('0x3b')](_0x881f('0x3c'));}});return _0x301d66({'code':0xc8,'message':_0x3d9e50});}else{if(_0x5d2955){logger['info'](util[_0x881f('0xe')](_0x881f('0x3d'),_0xf35b6e));}else{logger['info'](_0x881f('0x3e'));}return _0x301d66({'code':0xc8,'message':_0x3d9e50});}}catch(_0xf80e6c){logger['error'](_0xf80e6c['stack']);return _0x167107(_0x4b7378[_0x881f('0x36')](0x1f4,_0xf80e6c));}}return _0x167107(_0x881f('0x3f'));});},'AcceptMessage':function(_0x584cc3){var _0x1ac26b=this;return new Promise(function(_0x4b91a3,_0x5ed67e){if(_0x584cc3['agent']&&_0x584cc3[_0x881f('0x40')]['id']){if(_0x52c140['agents'][_0x584cc3[_0x881f('0x40')]['id']]){_0x52c140[_0x881f('0x41')][_0x584cc3[_0x881f('0x40')]['id']][_0x881f('0x42')]=![];_0x52c140[_0x881f('0x41')][_0x584cc3[_0x881f('0x40')]['id']][_0x881f('0x43')]=undefined;}}if(_0x584cc3[_0x881f('0x16')]&&_0x584cc3[_0x881f('0x16')]['id']){try{var _0xc79124=getId(_0x584cc3[_0x881f('0x15')],_0x584cc3[_0x881f('0x16')]?_0x584cc3[_0x881f('0x16')]['id']:0x0,_0x584cc3[_0x881f('0x17')]?_0x584cc3[_0x881f('0x17')]['id']:0x0);if(_0x52c140['rules'][_0xc79124]){_0x52c140[_0x881f('0x14')][_0xc79124][_0x881f('0x3b')]('end');if(rpc[_0x584cc3[_0x881f('0x15')]+_0x881f('0x44')]){rpc[_0x584cc3[_0x881f('0x15')]+_0x881f('0x44')][_0x881f('0x45')](_0xc79124,{'UserId':_0x584cc3[_0x881f('0x16')][_0x881f('0x46')]})[_0x881f('0x47')](function(){logger[_0x881f('0x36')](_0x881f('0x48'));});}}return _0x4b91a3({'code':0xc8,'message':_0x584cc3});}catch(_0x13a428){logger[_0x881f('0x36')](_0x13a428[_0x881f('0x49')]);return _0x5ed67e(_0x1ac26b['error'](0x1f4,_0x13a428));}}logger[_0x881f('0x36')](_0x881f('0x4a'));return _0x5ed67e(_0x1ac26b[_0x881f('0x36')](0x1f4,'message\x20is\x20empty'));});},'RejectMessage':function(_0x4999fd){var _0x52c18b=this;return new Promise(function(_0xbb2c0c,_0x183d6b){if(_0x4999fd[_0x881f('0x40')]&&_0x4999fd[_0x881f('0x40')]['id']){try{if(_0x52c140['agents'][_0x4999fd[_0x881f('0x40')]['id']]){_0x52c140[_0x881f('0x41')][_0x4999fd[_0x881f('0x40')]['id']][_0x881f('0x42')]=![];_0x52c140['agents'][_0x4999fd[_0x881f('0x40')]['id']][_0x881f('0x43')]=undefined;}return _0xbb2c0c({'code':0xc8,'message':_0x4999fd});}catch(_0x109777){logger['error'](_0x109777[_0x881f('0x49')]);return _0x183d6b(_0x52c18b['error'](0x1f4,_0x109777));}}logger[_0x881f('0x36')]('message\x20is\x20empty');return _0x183d6b(_0x52c18b[_0x881f('0x36')](0x1f4,'message\x20is\x20empty'));});},'AbandonInteraction':function(_0x2fcdc3){var _0x5f5bb7=this;return new Promise(function(_0x5a3d13,_0x26d6ef){if(_0x2fcdc3[_0x881f('0x15')]&&_0x2fcdc3[_0x881f('0x17')]&&_0x2fcdc3[_0x881f('0x17')]['id']){try{var _0x36e87f=getId(_0x2fcdc3['channel'],_0x2fcdc3['message']?_0x2fcdc3[_0x881f('0x16')]['id']:0x0,_0x2fcdc3[_0x881f('0x17')]?_0x2fcdc3['interaction']['id']:0x0);if(_0x52c140['rules'][_0x36e87f]){_0x52c140[_0x881f('0x14')][_0x36e87f][_0x881f('0x3b')](_0x881f('0x4b'));}return _0x5a3d13({'code':0xc8,'message':_0x2fcdc3});}catch(_0x1d8b43){logger[_0x881f('0x36')](_0x1d8b43['stack']);return _0x26d6ef(_0x5f5bb7[_0x881f('0x36')](0x1f4,_0x1d8b43));}}logger[_0x881f('0x36')](_0x881f('0x4a'));return _0x26d6ef(_0x5f5bb7[_0x881f('0x36')](0x1f4,_0x881f('0x4a')));});},'AgentCapacity':function(_0x12475d){var _0x52b8fe=this;return new Promise(function(_0x53bfe4,_0xb5e4f4){if(_0x52c140[_0x881f('0x41')][_0x881f('0x4c')](_0x12475d['id'])){for(var _0x52cead in _0x12475d[_0x881f('0x4d')]){if(_0x12475d[_0x881f('0x4d')][_0x881f('0x4c')](_0x52cead)){if(_0x52c140['agents'][_0x12475d['id']][_0x881f('0x4c')](_0x52cead+_0x881f('0x4e'))){_0x52c140['agents'][_0x12475d['id']][_0x52cead+'CurrentCapacity']=parseInt(_0x12475d[_0x881f('0x4d')][_0x52cead],0xa);}}}_0x52c140[_0x881f('0x41')][_0x12475d['id']]['updateRealtime']();return _0x53bfe4({'code':0xc8,'message':_0x52c140[_0x881f('0x41')][_0x12475d['id']]});}else{return _0xb5e4f4(_0x52b8fe[_0x881f('0x36')](0x1f4,_0x881f('0x4f')));}});},'Agents':function(_0x3b418f){return new Promise(function(_0x410e64){var _0x13a897=_[_0x881f('0x50')](_0x52c140[_0x881f('0x41')]);if(_0x3b418f&&_0x3b418f['id']){var _0x26c887=_[_0x881f('0x51')](_0x13a897,function(_0x2b6d76){return _0x2b6d76['id']===_0x3b418f['id'];});_0x410e64(_0x26c887);}else{_0x410e64({'count':_0x13a897[_0x881f('0x1b')],'rows':_0x13a897});}});},'ChatQueues':function(){return new Promise(function(_0x571b50){var _0x16f1a2=[];for(var _0x4128d3 in _0x52c140[_0x881f('0x52')]){if(_0x52c140['chatQueues'][_0x881f('0x4c')](_0x4128d3)){var _0x3a0232=_0x52c140[_0x881f('0x52')][_0x4128d3];var _0x1b6d39={'id':_0x3a0232['id'],'available':_0x3a0232[_0x881f('0x53')],'loggedIn':_0x3a0232[_0x881f('0x54')],'name':_0x3a0232[_0x881f('0x55')],'paused':_0x3a0232[_0x881f('0x56')],'waiting':_0x3a0232[_0x881f('0x57')]};_0x16f1a2[_0x881f('0x22')](_0x1b6d39);}}_0x571b50({'count':_0x16f1a2['length'],'rows':_0x16f1a2});});},'MailQueues':function(){return new Promise(function(_0x465bca){var _0x1d17a0=[];for(var _0x58156d in _0x52c140[_0x881f('0x58')]){if(_0x52c140[_0x881f('0x58')][_0x881f('0x4c')](_0x58156d)){var _0x351c1a=_0x52c140[_0x881f('0x58')][_0x58156d];var _0x56153f={'id':_0x351c1a['id'],'available':_0x351c1a[_0x881f('0x53')],'loggedIn':_0x351c1a[_0x881f('0x54')],'name':_0x351c1a['name'],'paused':_0x351c1a['paused'],'waiting':_0x351c1a[_0x881f('0x57')]};_0x1d17a0[_0x881f('0x22')](_0x56153f);}}_0x465bca({'count':_0x1d17a0[_0x881f('0x1b')],'rows':_0x1d17a0});});},'OpenchannelQueues':function(){return new Promise(function(_0x1edfad){var _0x2cf3a8=[];for(var _0x247a66 in _0x52c140[_0x881f('0x59')]){if(_0x52c140[_0x881f('0x59')][_0x881f('0x4c')](_0x247a66)){var _0x446c97=_0x52c140['openchannelQueues'][_0x247a66];var _0x49db85={'id':_0x446c97['id'],'available':_0x446c97[_0x881f('0x53')],'loggedIn':_0x446c97[_0x881f('0x54')],'name':_0x446c97[_0x881f('0x55')],'paused':_0x446c97[_0x881f('0x56')],'waiting':_0x446c97[_0x881f('0x57')]};_0x2cf3a8[_0x881f('0x22')](_0x49db85);}}_0x1edfad({'count':_0x2cf3a8[_0x881f('0x1b')],'rows':_0x2cf3a8});});},'SmsQueues':function(){return new Promise(function(_0x5494e8){var _0x468c1a=[];for(var _0x803868 in _0x52c140[_0x881f('0x5a')]){if(_0x52c140[_0x881f('0x5a')]['hasOwnProperty'](_0x803868)){var _0x4fec3f=_0x52c140[_0x881f('0x5a')][_0x803868];var _0x379061={'id':_0x4fec3f['id'],'available':_0x4fec3f['available'],'loggedIn':_0x4fec3f['loggedIn'],'name':_0x4fec3f['name'],'paused':_0x4fec3f[_0x881f('0x56')],'waiting':_0x4fec3f[_0x881f('0x57')]};_0x468c1a[_0x881f('0x22')](_0x379061);}}_0x5494e8({'count':_0x468c1a['length'],'rows':_0x468c1a});});},'FaxQueues':function(){return new Promise(function(_0x102b9f){var _0x3ec52e=[];for(var _0x164d27 in _0x52c140[_0x881f('0x5b')]){if(_0x52c140[_0x881f('0x5b')][_0x881f('0x4c')](_0x164d27)){var _0x5b555e=_0x52c140[_0x881f('0x5b')][_0x164d27];var _0x18c2d0={'id':_0x5b555e['id'],'available':_0x5b555e['available'],'loggedIn':_0x5b555e[_0x881f('0x54')],'name':_0x5b555e[_0x881f('0x55')],'paused':_0x5b555e[_0x881f('0x56')],'waiting':_0x5b555e[_0x881f('0x57')]};_0x3ec52e[_0x881f('0x22')](_0x18c2d0);}}_0x102b9f({'count':_0x3ec52e[_0x881f('0x1b')],'rows':_0x3ec52e});});},'WhatsappQueues':function(){return new Promise(function(_0x383f24){var _0x5af69e=[];for(var _0x293e19 in _0x52c140[_0x881f('0x5c')]){if(_0x52c140[_0x881f('0x5c')]['hasOwnProperty'](_0x293e19)){var _0xf1eb83=_0x52c140[_0x881f('0x5c')][_0x293e19];var _0x257f09={'id':_0xf1eb83['id'],'available':_0xf1eb83[_0x881f('0x53')],'loggedIn':_0xf1eb83[_0x881f('0x54')],'name':_0xf1eb83[_0x881f('0x55')],'paused':_0xf1eb83['paused'],'waiting':_0xf1eb83[_0x881f('0x57')]};_0x5af69e['push'](_0x257f09);}}_0x383f24({'count':_0x5af69e['length'],'rows':_0x5af69e});});},'ChatQueuesWaitingInteractions':function(){return new Promise(function(_0x99be36){var _0x385863=_[_0x881f('0x50')](_0x52c140[_0x881f('0x5d')]);_0x99be36({'count':_0x385863['length'],'rows':_0x385863});});},'MailQueuesWaitingInteractions':function(){return new Promise(function(_0x57e09e){var _0xa3cfce=_[_0x881f('0x50')](_0x52c140['mailQueuesWaitingInteractions']);_0x57e09e({'count':_0xa3cfce['length'],'rows':_0xa3cfce});});},'OpenchannelQueuesWaitingInteractions':function(){return new Promise(function(_0x15f4cb){var _0x3779c8=_[_0x881f('0x50')](_0x52c140[_0x881f('0x5e')]);_0x15f4cb({'count':_0x3779c8[_0x881f('0x1b')],'rows':_0x3779c8});});},'SmsQueuesWaitingInteractions':function(){return new Promise(function(_0x36258d){var _0x401765=_[_0x881f('0x50')](_0x52c140[_0x881f('0x5f')]);_0x36258d({'count':_0x401765[_0x881f('0x1b')],'rows':_0x401765});});},'FaxQueuesWaitingInteractions':function(){return new Promise(function(_0x1e8356){var _0x3afce4=_[_0x881f('0x50')](_0x52c140[_0x881f('0x60')]);_0x1e8356({'count':_0x3afce4[_0x881f('0x1b')],'rows':_0x3afce4});});},'WhatsappQueuesWaitingInteractions':function(){return new Promise(function(_0x2684e6){var _0x46a623=_[_0x881f('0x50')](_0x52c140['whatsappQueuesWaitingInteractions']);_0x2684e6({'count':_0x46a623[_0x881f('0x1b')],'rows':_0x46a623});});}};var _0x36b422=jayson['server'](_0x3d8353)[_0x881f('0x61')]();_0x36b422['on']('error',function(_0x2840ed){logger['error'](JSON[_0x881f('0x39')](_0x2840ed));return _0x58bd20(_0x2840ed);});_0x36b422[_0x881f('0x13')](0x232c,_0x881f('0x62'),function(){console[_0x881f('0x63')]('Routing\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!',0x232c);return _0x1f51aa(_0x881f('0x64')+0x232c);});});};
\ No newline at end of file
+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