e223d18069f7d60daf4abd30f05eb6b507f18bb7
[motion-next.git] / server / services / routing / server / applications / gotop.js
1 const a1205_0x763b=['map','error','number','[%s][GOTOP]\x20%s','[%s][GOTOP]\x20priority\x20%s','[%s][GOTOP]\x20priority\x20%s\x20found\x20at\x20index:\x20%s','priority\x20is\x20a\x20number\x20and\x20it\x20is\x20required','lodash','consequence','priority','stringify','next','../../../../config/logger','validate','message','routing','length','findIndex','stop','rules','info'];(function(_0x590cce,_0x763bde){const _0x42bdbd=function(_0x2ea6ce){while(--_0x2ea6ce){_0x590cce['push'](_0x590cce['shift']());}};_0x42bdbd(++_0x763bde);}(a1205_0x763b,0x1e3));const a1205_0x42bd=function(_0x590cce,_0x763bde){_0x590cce=_0x590cce-0x0;let _0x42bdbd=a1205_0x763b[_0x590cce];return _0x42bdbd;};const _0x1df272=a1205_0x42bd;'use strict';const schema=require(_0x1df272('0xd')),_=require(_0x1df272('0x7')),logger=require(_0x1df272('0xc'))(_0x1df272('0xf')),gotop=schema({'priority':{'type':_0x1df272('0x2'),'required':!![],'message':_0x1df272('0x6')}});exports[_0x1df272('0x8')]=function(_0x2ea6ce,_0x5b1afe){return function(_0x749b3c){const _0x5a5a7d=a1205_0x42bd;try{const _0x10e5b4={'priority':_0x5b1afe[0x0]},_0x3fc4c9=gotop[_0x5a5a7d('0xd')](_0x10e5b4,{'typecast':!![]});if(_0x3fc4c9[_0x5a5a7d('0x10')])logger[_0x5a5a7d('0x1')](_0x5a5a7d('0x3'),_0x2ea6ce,_[_0x5a5a7d('0x0')](_0x3fc4c9,_0x5a5a7d('0xe'))['join'](',\x20')),_0x749b3c[_0x5a5a7d('0x12')]();else{logger[_0x5a5a7d('0x14')](_0x5a5a7d('0x4'),_0x2ea6ce,_0x10e5b4[_0x5a5a7d('0x9')]);if(_0x10e5b4[_0x5a5a7d('0x9')]){const _0x1151f5=_[_0x5a5a7d('0x11')](_0x749b3c[_0x5a5a7d('0x13')](),{'p':_0x10e5b4[_0x5a5a7d('0x9')]});_0x1151f5>=0x0?(logger['info'](_0x5a5a7d('0x5'),_0x2ea6ce,_0x10e5b4['priority']||_0x5a5a7d('0xb'),_0x1151f5),_0x749b3c[_0x5a5a7d('0xb')](_0x1151f5)):(logger[_0x5a5a7d('0x14')]('[%s][GOTOP]\x20priority\x20%s\x20not\x20found',_0x2ea6ce,_0x10e5b4[_0x5a5a7d('0x9')]||_0x5a5a7d('0xb')),_0x749b3c['stop']());}else _0x749b3c[_0x5a5a7d('0xb')]();}}catch(_0x25376c){logger[_0x5a5a7d('0x1')](_0x5a5a7d('0x3'),_0x2ea6ce,JSON[_0x5a5a7d('0xa')](_0x25376c)),_0x749b3c[_0x5a5a7d('0x12')]();}};};