Built motion from commit (unavailable).|2.5.31
[motion2.git] / server / services / routing / server / applications / queue.js
index 5704500..dd4565c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9c44=['[%s][END:QUEUE][NAME:%s]','toLowerCase','consequence','validate','length','[%s][QUEUE]\x20%s','join','stop','find','Queues','atimeout','rules','end','close','complete','next','strategy','rrmemory','beepall','log','stack','util','seq-queue','moment','ioredis','../../../../config/environment','../../../../config/logger','redis','localhost','socket.io-emitter','queue_id','queue','from','joinAt','emit','clone','account','format','%sQueuesWaitingInteractions','pick','%s:queue:%s','%s_queue_waiting_interaction:%s','save','remove','../../rpc/openchannelQueueReport','../../rpc/chatQueueReport','../../rpc/smsQueueReport','string','name\x20is\x20a\x20string\x20and\x20it\x20is\x20required','number','waiting','body','YYYY-MM-DD\x20HH:mm:ss','list','QueueId','upperFirst','channel','InteractionId','message','AccountId','info','name','QueueReport','create','create\x20queue\x20report','[%s][STOP:QUEUE][NAME:%s]','update','catch','error','update\x20queue\x20report','timeout'];(function(_0x644ecd,_0x397f36){var _0x1c66ce=function(_0x4cf42b){while(--_0x4cf42b){_0x644ecd['push'](_0x644ecd['shift']());}};_0x1c66ce(++_0x397f36);}(_0x9c44,0x178));var _0x49c4=function(_0x1d1779,_0x284147){_0x1d1779=_0x1d1779-0x0;var _0x2377e9=_0x9c44[_0x1d1779];return _0x2377e9;};'use strict';var schema=require('validate');var _=require('lodash');var util=require(_0x49c4('0x0'));var seqqueue=require(_0x49c4('0x1'));var moment=require(_0x49c4('0x2'));var Redis=require(_0x49c4('0x3'));var config=require(_0x49c4('0x4'));var logger=require(_0x49c4('0x5'))('routing');var strategy=require('./strategy');config[_0x49c4('0x6')]=_['defaults'](config[_0x49c4('0x6')],{'host':_0x49c4('0x7'),'port':0x18eb});var io=require(_0x49c4('0x8'))(new Redis(config[_0x49c4('0x6')]));var attributes=['id',_0x49c4('0x9'),'account',_0x49c4('0xa'),_0x49c4('0xb'),_0x49c4('0xc')];function emit(_0x4487ca,_0x4c7d3a,_0x5ab4a3){io['to'](_0x4487ca)[_0x49c4('0xd')](_0x4c7d3a,_0x5ab4a3);}function emitChannelQueueInteraction(_0x313e73,_0x58cad7,_0xb611a1,_0x459d09,_0x4adb3c,_0x536d42,_0x1d19bf,_0x6d1b08){var _0x5487cd=_[_0x49c4('0xe')](_0xb611a1);_0x5487cd[_0x49c4('0x9')]=_0x6d1b08;_0x5487cd['queue']=_0x58cad7;_0x5487cd[_0x49c4('0xf')]=_0x459d09;_0x5487cd['id']=_0x4adb3c;if(_0x536d42){_0x1d19bf[util[_0x49c4('0x10')](_0x49c4('0x11'),_0x313e73)][_0x4adb3c]=_[_0x49c4('0x12')](_0x5487cd,attributes);}else{delete _0x1d19bf[util[_0x49c4('0x10')](_0x49c4('0x11'),_0x313e73)][_0x4adb3c];}emit(util[_0x49c4('0x10')](_0x49c4('0x13'),_0x313e73,_0x58cad7),util['format'](_0x49c4('0x14'),_0x313e73,_0x536d42?_0x49c4('0x15'):_0x49c4('0x16')),_[_0x49c4('0x12')](_0x5487cd,attributes));}var rpc={'openchannelQueueReport':require(_0x49c4('0x17')),'mailQueueReport':require('../../rpc/mailQueueReport'),'chatQueueReport':require(_0x49c4('0x18')),'smsQueueReport':require(_0x49c4('0x19')),'faxQueueReport':require('../../rpc/faxQueueReport'),'whatsappQueueReport':require('../../rpc/whatsappQueueReport')};var queue=schema({'name':{'type':_0x49c4('0x1a'),'required':!![],'message':_0x49c4('0x1b')},'timeout':{'type':_0x49c4('0x1c'),'message':'timeout\x20is\x20a\x20number'}});function startRouting(_0x24856d,_0x50b151,_0x2cbd50,_0x1806c2){if(_0x24856d&&_0x50b151&&_0x2cbd50){_0x50b151[_0x49c4('0x1d')]+=0x1;var _0x291526={'uniqueid':_0x24856d,'from':_0x2cbd50[_0x49c4('0x1e')]?_0x2cbd50[_0x49c4('0x1e')][_0x49c4('0xb')]:'','joinAt':moment()[_0x49c4('0x10')](_0x49c4('0x1f')),'ContactId':_0x2cbd50['contact']?_0x2cbd50['contact']['id']:null,'ListId':_0x2cbd50['list']?_0x2cbd50[_0x49c4('0x20')]['id']:null};_0x291526[_['upperFirst'](_0x2cbd50['channel'])+_0x49c4('0x21')]=_0x50b151['id']||null;_0x291526[_[_0x49c4('0x22')](_0x2cbd50[_0x49c4('0x23')])+_0x49c4('0x24')]=_0x2cbd50['interaction']?_0x2cbd50['interaction']['id']:null;_0x291526[_[_0x49c4('0x22')](_0x2cbd50[_0x49c4('0x23')])+'MessageId']=_0x2cbd50[_0x49c4('0x25')]?_0x2cbd50[_0x49c4('0x25')]['id']:null;_0x291526[_[_0x49c4('0x22')](_0x2cbd50[_0x49c4('0x23')])+(_0x2cbd50['channel']!=='chat'?_0x49c4('0x26'):'WebsiteId')]=_0x2cbd50[_0x49c4('0xf')]?_0x2cbd50[_0x49c4('0xf')]['id']:null;logger[_0x49c4('0x27')](util[_0x49c4('0x10')]('[%s][START:QUEUE][NAME:%s]',_0x24856d,_0x50b151[_0x49c4('0x28')]));emitChannelQueueInteraction(_0x2cbd50[_0x49c4('0x23')],_0x50b151[_0x49c4('0x28')],_0x291526,_0x2cbd50[_0x49c4('0xf')][_0x49c4('0x28')],_0x2cbd50[_0x49c4('0x25')]['id'],!![],_0x1806c2,_0x50b151['id']);if(rpc[_0x2cbd50[_0x49c4('0x23')]+_0x49c4('0x29')]){return rpc[_0x2cbd50[_0x49c4('0x23')]+_0x49c4('0x29')][_0x49c4('0x2a')](_0x291526)['catch'](function(_0x4f4495){logger['error'](_0x49c4('0x2b'));});}}}function stopRouting(_0x7ee704,_0x1eb035,_0x27e467,_0x28eb47){if(_0x7ee704&&_0x1eb035){_0x1eb035['waiting']-=0x1;var _0x38ad77={'leaveAt':moment()[_0x49c4('0x10')](_0x49c4('0x1f')),'acceptAt':moment()[_0x49c4('0x10')]('YYYY-MM-DD\x20HH:mm:ss'),'reason':'accepted'};logger[_0x49c4('0x27')](util[_0x49c4('0x10')](_0x49c4('0x2c'),_0x7ee704,_0x1eb035[_0x49c4('0x28')]));emitChannelQueueInteraction(_0x27e467[_0x49c4('0x23')],_0x1eb035['name'],_0x27e467[_0x49c4('0x1e')],_0x27e467[_0x49c4('0xf')][_0x49c4('0x28')],_0x27e467['message']['id'],![],_0x28eb47,_0x1eb035['id']);if(rpc[_0x27e467['channel']+_0x49c4('0x29')]){return rpc[_0x27e467[_0x49c4('0x23')]+_0x49c4('0x29')][_0x49c4('0x2d')](_0x7ee704,_0x38ad77)[_0x49c4('0x2e')](function(_0x2cf897){logger[_0x49c4('0x2f')](_0x49c4('0x30'));});}}}function endRouting(_0x3209cd,_0x4e0209,_0x2d34ca,_0x5b96df){if(_0x3209cd&&_0x4e0209){_0x4e0209[_0x49c4('0x1d')]-=0x1;var _0x349791={'leaveAt':moment()[_0x49c4('0x10')](_0x49c4('0x1f')),'exitAt':moment()['format'](_0x49c4('0x1f')),'reason':_0x49c4('0x31')};logger[_0x49c4('0x27')](util['format'](_0x49c4('0x32'),_0x3209cd,_0x4e0209[_0x49c4('0x28')]));emitChannelQueueInteraction(_0x2d34ca[_0x49c4('0x23')],_0x4e0209[_0x49c4('0x28')],_0x2d34ca[_0x49c4('0x1e')],_0x2d34ca[_0x49c4('0xf')][_0x49c4('0x28')],_0x2d34ca[_0x49c4('0x25')]['id'],![],_0x5b96df);if(rpc[_0x2d34ca[_0x49c4('0x23')]+_0x49c4('0x29')]){return rpc[_0x2d34ca[_0x49c4('0x23')]+'QueueReport'][_0x49c4('0x2d')](_0x3209cd,_0x349791)[_0x49c4('0x2e')](function(_0x32b172){logger[_0x49c4('0x2f')](_0x49c4('0x30'));});}}}function handleFindQueue(_0x29dd5d){return function(_0x1be62d){return _0x1be62d[_0x49c4('0x28')][_0x49c4('0x33')]()===_0x29dd5d[_0x49c4('0x33')]();};}exports[_0x49c4('0x34')]=function(_0xa3d59e,_0x326142,_0x4e38bc,_0x212366){return function(_0x49829e){try{var _0x104efb={'name':_0x326142[0x0],'timeout':_0x326142[0x1]};var _0x4915bc=queue[_0x49c4('0x35')](_0x104efb,{'typecast':!![]});if(_0x4915bc[_0x49c4('0x36')]){logger[_0x49c4('0x2f')](_0x49c4('0x37'),_0xa3d59e,_['map'](_0x4915bc,'message')[_0x49c4('0x38')](',\x20'));_0x49829e[_0x49c4('0x39')]();}else{var _0x38349b=_[_0x49c4('0x3a')](_0x4e38bc[_0x212366['channel']+_0x49c4('0x3b')],handleFindQueue(_0x104efb[_0x49c4('0x28')]));if(_0x38349b){startRouting(_0xa3d59e,_0x38349b,_0x212366,_0x4e38bc);var _0x2ccd47=(_0x38349b[_0x49c4('0x31')]||0xa)*0x3e8;var _0x81a674=(_0x104efb[_0x49c4('0x31')]||0x14)*0x3e8;var _0x1a9593,_0x3351c1;if(_0x2ccd47>_0x81a674){_0x81a674=_0x2ccd47;}var _0x3c4a1d=seqqueue['createQueue'](_0x2ccd47);_0x3c4a1d['id']=_0xa3d59e;_0x3c4a1d[_0x49c4('0x3c')]=_0x2ccd47;_0x3c4a1d['qtimeout']=_0x81a674;_0x3c4a1d[_0x49c4('0x23')]=_0x212366[_0x49c4('0x23')];_0x4e38bc[_0x49c4('0x3d')][_0xa3d59e]['on'](_0x49c4('0x3e'),function(){logger[_0x49c4('0x27')]('[%s][QUEUE]\x20ROUTING\x20STOPPED',_0xa3d59e);stopRouting(_0xa3d59e,_0x38349b,_0x212366,_0x4e38bc);clearTimeout(_0x1a9593);_0x1a9593=undefined;_0x3c4a1d[_0x49c4('0x3f')](!![]);if(_0x4e38bc[_0x49c4('0x3d')][_0xa3d59e]){delete _0x4e38bc[_0x49c4('0x3d')][_0xa3d59e];}_0x49829e[_0x49c4('0x39')]();});_0x4e38bc[_0x49c4('0x3d')][_0xa3d59e]['on'](_0x49c4('0x40'),function(){if(_0x4e38bc[_0x49c4('0x3d')][_0xa3d59e]){delete _0x4e38bc['rules'][_0xa3d59e];}});_0x1a9593=setTimeout(function(){logger[_0x49c4('0x27')]('[%s][QUEUE]\x20APPLICATION\x20END',_0xa3d59e);endRouting(_0xa3d59e,_0x38349b,_0x212366,_0x4e38bc);clearTimeout(_0x1a9593);_0x3c4a1d[_0x49c4('0x3f')](!![]);_0x49829e[_0x49c4('0x41')]();},_0x81a674);switch(_0x38349b[_0x49c4('0x42')]){case _0x49c4('0x43'):strategy[_0x49c4('0x43')](_0x3c4a1d,_0x38349b,_0x4e38bc,_0x212366);break;default:strategy[_0x49c4('0x44')](_0x3c4a1d,_0x38349b,_0x4e38bc,_0x212366);}}else{logger[_0x49c4('0x2f')]('[%s][QUEUE]\x20queue\x20not\x20found\x20%s',_0xa3d59e,_0x104efb[_0x49c4('0x28')]);_0x49829e[_0x49c4('0x39')]();}}}catch(_0x4a5c34){console[_0x49c4('0x45')](_0x4a5c34);logger[_0x49c4('0x2f')](_0x49c4('0x37'),_0xa3d59e,_0x4a5c34[_0x49c4('0x46')]);_0x49829e['stop']();}};};
\ No newline at end of file
+var _0x34e8=['../../rpc/faxQueueReport','../../rpc/whatsappQueueReport','string','name\x20is\x20a\x20string\x20and\x20it\x20is\x20required','number','timeout\x20is\x20a\x20number','waiting','body','YYYY-MM-DD\x20HH:mm:ss','contact','list','upperFirst','QueueId','InteractionId','interaction','channel','MessageId','chat','AccountId','WebsiteId','name','message','QueueReport','create','catch','error','accepted','info','[%s][STOP:QUEUE][NAME:%s]','update','timeout','[%s][END:QUEUE][NAME:%s]','toLowerCase','consequence','length','map','join','Queues','createQueue','atimeout','qtimeout','rules','[%s][QUEUE]\x20ROUTING\x20STOPPED','close','stop','[%s][QUEUE]\x20APPLICATION\x20END','next','strategy','rrmemory','beepall','[%s][QUEUE]\x20queue\x20not\x20found\x20%s','log','[%s][QUEUE]\x20%s','stack','validate','lodash','util','seq-queue','ioredis','../../../../config/environment','../../../../config/logger','routing','./strategy','redis','defaults','localhost','queue_id','account','queue','from','joinAt','emit','clone','format','%sQueuesWaitingInteractions','%s:queue:%s','%s_queue_waiting_interaction:%s','save','pick','../../rpc/openchannelQueueReport','../../rpc/mailQueueReport','../../rpc/smsQueueReport'];(function(_0xfa10aa,_0x496886){var _0x58dbc4=function(_0x354184){while(--_0x354184){_0xfa10aa['push'](_0xfa10aa['shift']());}};_0x58dbc4(++_0x496886);}(_0x34e8,0x12c));var _0x834e=function(_0x12b274,_0x198266){_0x12b274=_0x12b274-0x0;var _0x398a68=_0x34e8[_0x12b274];return _0x398a68;};'use strict';var schema=require(_0x834e('0x0'));var _=require(_0x834e('0x1'));var util=require(_0x834e('0x2'));var seqqueue=require(_0x834e('0x3'));var moment=require('moment');var Redis=require(_0x834e('0x4'));var config=require(_0x834e('0x5'));var logger=require(_0x834e('0x6'))(_0x834e('0x7'));var strategy=require(_0x834e('0x8'));config[_0x834e('0x9')]=_[_0x834e('0xa')](config['redis'],{'host':_0x834e('0xb'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x834e('0x9')]));var attributes=['id',_0x834e('0xc'),_0x834e('0xd'),_0x834e('0xe'),_0x834e('0xf'),_0x834e('0x10')];function emit(_0x363786,_0x1af45a,_0x3bdda9){io['to'](_0x363786)[_0x834e('0x11')](_0x1af45a,_0x3bdda9);}function emitChannelQueueInteraction(_0x1e41fe,_0x36e124,_0x14038b,_0x2e1a37,_0x293514,_0x1e00de,_0x2fd95c,_0x538bb3){var _0x5e5b6d=_[_0x834e('0x12')](_0x14038b);_0x5e5b6d['queue_id']=_0x538bb3;_0x5e5b6d[_0x834e('0xe')]=_0x36e124;_0x5e5b6d[_0x834e('0xd')]=_0x2e1a37;_0x5e5b6d['id']=_0x293514;if(_0x1e00de){_0x2fd95c[util[_0x834e('0x13')](_0x834e('0x14'),_0x1e41fe)][_0x293514]=_['pick'](_0x5e5b6d,attributes);}else{delete _0x2fd95c[util[_0x834e('0x13')](_0x834e('0x14'),_0x1e41fe)][_0x293514];}emit(util['format'](_0x834e('0x15'),_0x1e41fe,_0x36e124),util['format'](_0x834e('0x16'),_0x1e41fe,_0x1e00de?_0x834e('0x17'):'remove'),_[_0x834e('0x18')](_0x5e5b6d,attributes));}var rpc={'openchannelQueueReport':require(_0x834e('0x19')),'mailQueueReport':require(_0x834e('0x1a')),'chatQueueReport':require('../../rpc/chatQueueReport'),'smsQueueReport':require(_0x834e('0x1b')),'faxQueueReport':require(_0x834e('0x1c')),'whatsappQueueReport':require(_0x834e('0x1d'))};var queue=schema({'name':{'type':_0x834e('0x1e'),'required':!![],'message':_0x834e('0x1f')},'timeout':{'type':_0x834e('0x20'),'message':_0x834e('0x21')}});function startRouting(_0x595515,_0x2545b4,_0x1fd2c6,_0x113ff4){if(_0x595515&&_0x2545b4&&_0x1fd2c6){_0x2545b4[_0x834e('0x22')]+=0x1;var _0x4ab05d={'uniqueid':_0x595515,'from':_0x1fd2c6[_0x834e('0x23')]?_0x1fd2c6[_0x834e('0x23')]['from']:'','joinAt':moment()[_0x834e('0x13')](_0x834e('0x24')),'ContactId':_0x1fd2c6[_0x834e('0x25')]?_0x1fd2c6['contact']['id']:null,'ListId':_0x1fd2c6['list']?_0x1fd2c6[_0x834e('0x26')]['id']:null};_0x4ab05d[_[_0x834e('0x27')](_0x1fd2c6['channel'])+_0x834e('0x28')]=_0x2545b4['id']||null;_0x4ab05d[_[_0x834e('0x27')](_0x1fd2c6['channel'])+_0x834e('0x29')]=_0x1fd2c6[_0x834e('0x2a')]?_0x1fd2c6[_0x834e('0x2a')]['id']:null;_0x4ab05d[_['upperFirst'](_0x1fd2c6[_0x834e('0x2b')])+_0x834e('0x2c')]=_0x1fd2c6['message']?_0x1fd2c6['message']['id']:null;_0x4ab05d[_[_0x834e('0x27')](_0x1fd2c6['channel'])+(_0x1fd2c6[_0x834e('0x2b')]!==_0x834e('0x2d')?_0x834e('0x2e'):_0x834e('0x2f'))]=_0x1fd2c6[_0x834e('0xd')]?_0x1fd2c6[_0x834e('0xd')]['id']:null;logger['info'](util['format']('[%s][START:QUEUE][NAME:%s]',_0x595515,_0x2545b4['name']));emitChannelQueueInteraction(_0x1fd2c6[_0x834e('0x2b')],_0x2545b4[_0x834e('0x30')],_0x4ab05d,_0x1fd2c6[_0x834e('0xd')]['name'],_0x1fd2c6[_0x834e('0x31')]['id'],!![],_0x113ff4,_0x2545b4['id']);if(rpc[_0x1fd2c6[_0x834e('0x2b')]+_0x834e('0x32')]){return rpc[_0x1fd2c6[_0x834e('0x2b')]+_0x834e('0x32')][_0x834e('0x33')](_0x4ab05d)[_0x834e('0x34')](function(_0xfaf716){logger[_0x834e('0x35')]('create\x20queue\x20report');});}}}function stopRouting(_0xef9ec2,_0x5cad11,_0x2c75c2,_0x3787b0){if(_0xef9ec2&&_0x5cad11){_0x5cad11[_0x834e('0x22')]-=0x1;var _0x2b3418={'leaveAt':moment()[_0x834e('0x13')](_0x834e('0x24')),'acceptAt':moment()[_0x834e('0x13')](_0x834e('0x24')),'reason':_0x834e('0x36')};logger[_0x834e('0x37')](util['format'](_0x834e('0x38'),_0xef9ec2,_0x5cad11[_0x834e('0x30')]));emitChannelQueueInteraction(_0x2c75c2[_0x834e('0x2b')],_0x5cad11[_0x834e('0x30')],_0x2c75c2['body'],_0x2c75c2[_0x834e('0xd')][_0x834e('0x30')],_0x2c75c2['message']['id'],![],_0x3787b0,_0x5cad11['id']);if(rpc[_0x2c75c2['channel']+'QueueReport']){return rpc[_0x2c75c2[_0x834e('0x2b')]+_0x834e('0x32')][_0x834e('0x39')](_0xef9ec2,_0x2b3418)[_0x834e('0x34')](function(_0x339e28){logger[_0x834e('0x35')]('update\x20queue\x20report');});}}}function endRouting(_0x2c2d94,_0x513f36,_0xe103fe,_0x6a3ac){if(_0x2c2d94&&_0x513f36){_0x513f36['waiting']-=0x1;var _0x18ac3b={'leaveAt':moment()[_0x834e('0x13')]('YYYY-MM-DD\x20HH:mm:ss'),'exitAt':moment()['format'](_0x834e('0x24')),'reason':_0x834e('0x3a')};logger[_0x834e('0x37')](util[_0x834e('0x13')](_0x834e('0x3b'),_0x2c2d94,_0x513f36['name']));emitChannelQueueInteraction(_0xe103fe[_0x834e('0x2b')],_0x513f36['name'],_0xe103fe['body'],_0xe103fe[_0x834e('0xd')]['name'],_0xe103fe[_0x834e('0x31')]['id'],![],_0x6a3ac);if(rpc[_0xe103fe[_0x834e('0x2b')]+_0x834e('0x32')]){return rpc[_0xe103fe[_0x834e('0x2b')]+_0x834e('0x32')]['update'](_0x2c2d94,_0x18ac3b)[_0x834e('0x34')](function(_0x26b847){logger[_0x834e('0x35')]('update\x20queue\x20report');});}}}function handleFindQueue(_0x35380e){return function(_0x16ac45){return _0x16ac45['name'][_0x834e('0x3c')]()===_0x35380e['toLowerCase']();};}exports[_0x834e('0x3d')]=function(_0x585335,_0x4a18bb,_0x4a6942,_0x22ea21){return function(_0x16969b){try{var _0x3bcbf4={'name':_0x4a18bb[0x0],'timeout':_0x4a18bb[0x1]};var _0xbc1571=queue[_0x834e('0x0')](_0x3bcbf4,{'typecast':!![]});if(_0xbc1571[_0x834e('0x3e')]){logger[_0x834e('0x35')]('[%s][QUEUE]\x20%s',_0x585335,_[_0x834e('0x3f')](_0xbc1571,'message')[_0x834e('0x40')](',\x20'));_0x16969b['stop']();}else{var _0x1df5b0=_['find'](_0x4a6942[_0x22ea21[_0x834e('0x2b')]+_0x834e('0x41')],handleFindQueue(_0x3bcbf4['name']));if(_0x1df5b0){startRouting(_0x585335,_0x1df5b0,_0x22ea21,_0x4a6942);var _0x39e7b9=(_0x1df5b0[_0x834e('0x3a')]||0xa)*0x3e8;var _0xa880cb=(_0x3bcbf4[_0x834e('0x3a')]||0x14)*0x3e8;var _0x252ea0,_0x1a7149;if(_0x39e7b9>_0xa880cb){_0xa880cb=_0x39e7b9;}var _0xfa28da=seqqueue[_0x834e('0x42')](_0x39e7b9);_0xfa28da['id']=_0x585335;_0xfa28da[_0x834e('0x43')]=_0x39e7b9;_0xfa28da[_0x834e('0x44')]=_0xa880cb;_0xfa28da['channel']=_0x22ea21[_0x834e('0x2b')];_0x4a6942[_0x834e('0x45')][_0x585335]['on']('end',function(){logger[_0x834e('0x37')](_0x834e('0x46'),_0x585335);stopRouting(_0x585335,_0x1df5b0,_0x22ea21,_0x4a6942);clearTimeout(_0x252ea0);_0x252ea0=undefined;_0xfa28da[_0x834e('0x47')](!![]);if(_0x4a6942[_0x834e('0x45')][_0x585335]){delete _0x4a6942[_0x834e('0x45')][_0x585335];}_0x16969b[_0x834e('0x48')]();});_0x4a6942['rules'][_0x585335]['on']('complete',function(){if(_0x4a6942[_0x834e('0x45')][_0x585335]){delete _0x4a6942[_0x834e('0x45')][_0x585335];}});_0x252ea0=setTimeout(function(){logger[_0x834e('0x37')](_0x834e('0x49'),_0x585335);endRouting(_0x585335,_0x1df5b0,_0x22ea21,_0x4a6942);clearTimeout(_0x252ea0);_0xfa28da[_0x834e('0x47')](!![]);_0x16969b[_0x834e('0x4a')]();},_0xa880cb);switch(_0x1df5b0[_0x834e('0x4b')]){case _0x834e('0x4c'):strategy[_0x834e('0x4c')](_0xfa28da,_0x1df5b0,_0x4a6942,_0x22ea21);break;default:strategy[_0x834e('0x4d')](_0xfa28da,_0x1df5b0,_0x4a6942,_0x22ea21);}}else{logger[_0x834e('0x35')](_0x834e('0x4e'),_0x585335,_0x3bcbf4[_0x834e('0x30')]);_0x16969b[_0x834e('0x48')]();}}}catch(_0x2aa072){console[_0x834e('0x4f')](_0x2aa072);logger[_0x834e('0x35')](_0x834e('0x50'),_0x585335,_0x2aa072[_0x834e('0x51')]);_0x16969b[_0x834e('0x48')]();}};};
\ No newline at end of file