Built motion from commit 9d0783e6.|2.6.13
[motion2.git] / server / services / routing / server / applications / gotoif.js
index 3ee21d0..3832932 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x21c8=['priorityTrue','priorityFalse','info','next','findIndex','rules','[%s][GOTOIF]\x20priority\x20%s\x20found\x20at\x20index:\x20%s','[%s][GOTOIF]\x20eval\x20error:\x20%s','stringify','validate','lodash','html-to-text','./utils','../../../../config/logger','routing','condition\x20is\x20a\x20string\x20and\x20it\x20is\x20required','number','priority\x20false\x20is\x20a\x20number','consequence','getMustacheRender','replace','length','error','[%s][GOTOIF]\x20%s','map','message','join','stop','condition'];(function(_0x2c714a,_0x18a92f){var _0x227672=function(_0xa34bf9){while(--_0xa34bf9){_0x2c714a['push'](_0x2c714a['shift']());}};_0x227672(++_0x18a92f);}(_0x21c8,0x165));var _0x821c=function(_0x21e6f1,_0x4d5eb5){_0x21e6f1=_0x21e6f1-0x0;var _0x44a394=_0x21c8[_0x21e6f1];return _0x44a394;};'use strict';var schema=require(_0x821c('0x0'));var _=require(_0x821c('0x1'));var htmlToText=require(_0x821c('0x2'));var utils=require(_0x821c('0x3'));var logger=require(_0x821c('0x4'))(_0x821c('0x5'));var gotoif=schema({'condition':{'type':'string','required':!![],'message':_0x821c('0x6')},'priorityTrue':{'type':_0x821c('0x7'),'message':'priority\x20true\x20is\x20a\x20number'},'priorityFalse':{'type':'number','message':_0x821c('0x8')}});exports[_0x821c('0x9')]=function(_0x2a3265,_0x579397){return function(_0x5289c9){try{var _0xbeb5fc={'condition':htmlToText['fromString'](utils[_0x821c('0xa')](_0x579397[0x0],this),{'wordwrap':![]})[_0x821c('0xb')](/<\/?[^>]+(>|$)/g,''),'priorityTrue':_0x579397[0x1],'priorityFalse':_0x579397[0x2]};var _0x82cc09=gotoif['validate'](_0xbeb5fc,{'typecast':!![]});if(_0x82cc09[_0x821c('0xc')]){logger[_0x821c('0xd')](_0x821c('0xe'),_0x2a3265,_[_0x821c('0xf')](_0x82cc09,_0x821c('0x10'))[_0x821c('0x11')](',\x20'));_0x5289c9[_0x821c('0x12')]();}else{try{var _0x3e350b=eval('('+_0xbeb5fc[_0x821c('0x13')]+')');var _0x30abe5=_0x3e350b?_0xbeb5fc[_0x821c('0x14')]:_0xbeb5fc[_0x821c('0x15')];logger[_0x821c('0x16')]('[%s][GOTOIF]\x20condition\x20%s\x20is\x20%s\x20try\x20goto\x20priority\x20%s',_0x2a3265,_0xbeb5fc[_0x821c('0x13')],_0x3e350b,_0x30abe5||_0x821c('0x17'));if(_0x30abe5){var _0x29958a=_[_0x821c('0x18')](_0x5289c9[_0x821c('0x19')](),{'p':_0x30abe5});if(_0x29958a>=0x0){logger['info'](_0x821c('0x1a'),_0x2a3265,_0x30abe5||_0x821c('0x17'),_0x29958a);_0x5289c9[_0x821c('0x17')](_0x29958a);}else{logger['info']('[%s][GOTOIF]\x20priority\x20%s\x20not\x20found',_0x2a3265,_0x30abe5||_0x821c('0x17'));_0x5289c9[_0x821c('0x12')]();}}else{_0x5289c9[_0x821c('0x17')]();}}catch(_0xb6543b){logger[_0x821c('0xd')](_0x821c('0x1b'),_0x2a3265,_0xb6543b[_0x821c('0x10')]);_0x5289c9[_0x821c('0x12')]();}}}catch(_0x5e3ce2){logger[_0x821c('0xd')](_0x821c('0xe'),_0x2a3265,JSON[_0x821c('0x1c')](_0x5e3ce2));_0x5289c9[_0x821c('0x12')]();}};};
\ No newline at end of file
+var _0x92a0=['string','condition\x20is\x20a\x20string\x20and\x20it\x20is\x20required','number','priority\x20true\x20is\x20a\x20number','priority\x20false\x20is\x20a\x20number','consequence','fromString','error','[%s][GOTOIF]\x20%s','join','condition','priorityTrue','priorityFalse','[%s][GOTOIF]\x20condition\x20%s\x20is\x20%s\x20try\x20goto\x20priority\x20%s','next','rules','info','[%s][GOTOIF]\x20priority\x20%s\x20found\x20at\x20index:\x20%s','[%s][GOTOIF]\x20priority\x20%s\x20not\x20found','message','stop','stringify','validate','html-to-text','./utils','../../../../config/logger','routing'];(function(_0x35bf58,_0x320ba4){var _0x27e848=function(_0x1e07c1){while(--_0x1e07c1){_0x35bf58['push'](_0x35bf58['shift']());}};_0x27e848(++_0x320ba4);}(_0x92a0,0x13f));var _0x092a=function(_0x548483,_0x5e53ab){_0x548483=_0x548483-0x0;var _0x53afbd=_0x92a0[_0x548483];return _0x53afbd;};'use strict';var schema=require(_0x092a('0x0'));var _=require('lodash');var htmlToText=require(_0x092a('0x1'));var utils=require(_0x092a('0x2'));var logger=require(_0x092a('0x3'))(_0x092a('0x4'));var gotoif=schema({'condition':{'type':_0x092a('0x5'),'required':!![],'message':_0x092a('0x6')},'priorityTrue':{'type':_0x092a('0x7'),'message':_0x092a('0x8')},'priorityFalse':{'type':'number','message':_0x092a('0x9')}});exports[_0x092a('0xa')]=function(_0x446ff5,_0x29182f){return function(_0x4f36b2){try{var _0x2a0c6c={'condition':htmlToText[_0x092a('0xb')](utils['getMustacheRender'](_0x29182f[0x0],this),{'wordwrap':![]})['replace'](/<\/?[^>]+(>|$)/g,''),'priorityTrue':_0x29182f[0x1],'priorityFalse':_0x29182f[0x2]};var _0x2ead2b=gotoif['validate'](_0x2a0c6c,{'typecast':!![]});if(_0x2ead2b['length']){logger[_0x092a('0xc')](_0x092a('0xd'),_0x446ff5,_['map'](_0x2ead2b,'message')[_0x092a('0xe')](',\x20'));_0x4f36b2['stop']();}else{try{var _0x398d8a=eval('('+_0x2a0c6c[_0x092a('0xf')]+')');var _0x46b557=_0x398d8a?_0x2a0c6c[_0x092a('0x10')]:_0x2a0c6c[_0x092a('0x11')];logger['info'](_0x092a('0x12'),_0x446ff5,_0x2a0c6c[_0x092a('0xf')],_0x398d8a,_0x46b557||_0x092a('0x13'));if(_0x46b557){var _0x1ee3aa=_['findIndex'](_0x4f36b2[_0x092a('0x14')](),{'p':_0x46b557});if(_0x1ee3aa>=0x0){logger[_0x092a('0x15')](_0x092a('0x16'),_0x446ff5,_0x46b557||_0x092a('0x13'),_0x1ee3aa);_0x4f36b2[_0x092a('0x13')](_0x1ee3aa);}else{logger[_0x092a('0x15')](_0x092a('0x17'),_0x446ff5,_0x46b557||_0x092a('0x13'));_0x4f36b2['stop']();}}else{_0x4f36b2[_0x092a('0x13')]();}}catch(_0x1c1713){logger[_0x092a('0xc')]('[%s][GOTOIF]\x20eval\x20error:\x20%s',_0x446ff5,_0x1c1713[_0x092a('0x18')]);_0x4f36b2[_0x092a('0x19')]();}}}catch(_0x28efd8){logger['error'](_0x092a('0xd'),_0x446ff5,JSON[_0x092a('0x1a')](_0x28efd8));_0x4f36b2['stop']();}};};
\ No newline at end of file