Built motion from commit 85328c08.|2.5.50
[motion2.git] / server / services / routing / server / applications / gotoif.js
index 68794af..f2835ed 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x06db=['consequence','fromString','getMustacheRender','replace','length','map','stop','priorityTrue','priorityFalse','info','[%s][GOTOIF]\x20condition\x20%s\x20is\x20%s\x20try\x20goto\x20priority\x20%s','condition','next','findIndex','rules','[%s][GOTOIF]\x20priority\x20%s\x20found\x20at\x20index:\x20%s','[%s][GOTOIF]\x20priority\x20%s\x20not\x20found','error','[%s][GOTOIF]\x20eval\x20error:\x20%s','message','[%s][GOTOIF]\x20%s','stringify','validate','lodash','html-to-text','../../../../config/logger','routing','string','number','priority\x20false\x20is\x20a\x20number'];(function(_0x9ad57e,_0x4900ac){var _0x3e3596=function(_0x40ac78){while(--_0x40ac78){_0x9ad57e['push'](_0x9ad57e['shift']());}};_0x3e3596(++_0x4900ac);}(_0x06db,0x106));var _0xb06d=function(_0x5950c6,_0x575c86){_0x5950c6=_0x5950c6-0x0;var _0xc2bc8a=_0x06db[_0x5950c6];return _0xc2bc8a;};'use strict';var schema=require(_0xb06d('0x0'));var _=require(_0xb06d('0x1'));var htmlToText=require(_0xb06d('0x2'));var utils=require('./utils');var logger=require(_0xb06d('0x3'))(_0xb06d('0x4'));var gotoif=schema({'condition':{'type':_0xb06d('0x5'),'required':!![],'message':'condition\x20is\x20a\x20string\x20and\x20it\x20is\x20required'},'priorityTrue':{'type':_0xb06d('0x6'),'message':'priority\x20true\x20is\x20a\x20number'},'priorityFalse':{'type':_0xb06d('0x6'),'message':_0xb06d('0x7')}});exports[_0xb06d('0x8')]=function(_0x250495,_0x36f55c){return function(_0x1e5d9e){try{var _0x40fbae={'condition':htmlToText[_0xb06d('0x9')](utils[_0xb06d('0xa')](_0x36f55c[0x0],this),{'wordwrap':![]})[_0xb06d('0xb')](/<\/?[^>]+(>|$)/g,''),'priorityTrue':_0x36f55c[0x1],'priorityFalse':_0x36f55c[0x2]};var _0xe3ba0c=gotoif[_0xb06d('0x0')](_0x40fbae,{'typecast':!![]});if(_0xe3ba0c[_0xb06d('0xc')]){logger['error']('[%s][GOTOIF]\x20%s',_0x250495,_[_0xb06d('0xd')](_0xe3ba0c,'message')['join'](',\x20'));_0x1e5d9e[_0xb06d('0xe')]();}else{try{var _0x26d070=eval('('+_0x40fbae['condition']+')');var _0x26821a=_0x26d070?_0x40fbae[_0xb06d('0xf')]:_0x40fbae[_0xb06d('0x10')];logger[_0xb06d('0x11')](_0xb06d('0x12'),_0x250495,_0x40fbae[_0xb06d('0x13')],_0x26d070,_0x26821a||_0xb06d('0x14'));if(_0x26821a){var _0x26acca=_[_0xb06d('0x15')](_0x1e5d9e[_0xb06d('0x16')](),{'p':_0x26821a});if(_0x26acca>=0x0){logger[_0xb06d('0x11')](_0xb06d('0x17'),_0x250495,_0x26821a||_0xb06d('0x14'),_0x26acca);_0x1e5d9e[_0xb06d('0x14')](_0x26acca);}else{logger[_0xb06d('0x11')](_0xb06d('0x18'),_0x250495,_0x26821a||'next');_0x1e5d9e[_0xb06d('0xe')]();}}else{_0x1e5d9e[_0xb06d('0x14')]();}}catch(_0x2ad5e1){logger[_0xb06d('0x19')](_0xb06d('0x1a'),_0x250495,_0x2ad5e1[_0xb06d('0x1b')]);_0x1e5d9e[_0xb06d('0xe')]();}}}catch(_0x104ef8){logger[_0xb06d('0x19')](_0xb06d('0x1c'),_0x250495,JSON[_0xb06d('0x1d')](_0x104ef8));_0x1e5d9e['stop']();}};};
\ No newline at end of file
+var _0x5ee1=['../../../../config/logger','string','condition\x20is\x20a\x20string\x20and\x20it\x20is\x20required','number','priority\x20true\x20is\x20a\x20number','priority\x20false\x20is\x20a\x20number','consequence','fromString','replace','[%s][GOTOIF]\x20%s','map','message','condition','priorityTrue','priorityFalse','[%s][GOTOIF]\x20condition\x20%s\x20is\x20%s\x20try\x20goto\x20priority\x20%s','findIndex','rules','info','[%s][GOTOIF]\x20priority\x20%s\x20found\x20at\x20index:\x20%s','next','[%s][GOTOIF]\x20priority\x20%s\x20not\x20found','stop','error','[%s][GOTOIF]\x20eval\x20error:\x20%s','validate','lodash','html-to-text','./utils'];(function(_0x1c15d5,_0x3d52e6){var _0x1bad2c=function(_0x22bd4f){while(--_0x22bd4f){_0x1c15d5['push'](_0x1c15d5['shift']());}};_0x1bad2c(++_0x3d52e6);}(_0x5ee1,0x175));var _0x15ee=function(_0x3302bb,_0x11c44a){_0x3302bb=_0x3302bb-0x0;var _0x360c64=_0x5ee1[_0x3302bb];return _0x360c64;};'use strict';var schema=require(_0x15ee('0x0'));var _=require(_0x15ee('0x1'));var htmlToText=require(_0x15ee('0x2'));var utils=require(_0x15ee('0x3'));var logger=require(_0x15ee('0x4'))('routing');var gotoif=schema({'condition':{'type':_0x15ee('0x5'),'required':!![],'message':_0x15ee('0x6')},'priorityTrue':{'type':_0x15ee('0x7'),'message':_0x15ee('0x8')},'priorityFalse':{'type':_0x15ee('0x7'),'message':_0x15ee('0x9')}});exports[_0x15ee('0xa')]=function(_0x117d18,_0x4baa79){return function(_0x2a60c2){try{var _0x51eaa6={'condition':htmlToText[_0x15ee('0xb')](utils['getMustacheRender'](_0x4baa79[0x0],this),{'wordwrap':![]})[_0x15ee('0xc')](/<\/?[^>]+(>|$)/g,''),'priorityTrue':_0x4baa79[0x1],'priorityFalse':_0x4baa79[0x2]};var _0x430000=gotoif['validate'](_0x51eaa6,{'typecast':!![]});if(_0x430000['length']){logger['error'](_0x15ee('0xd'),_0x117d18,_[_0x15ee('0xe')](_0x430000,_0x15ee('0xf'))['join'](',\x20'));_0x2a60c2['stop']();}else{try{var _0xaac67e=eval('('+_0x51eaa6[_0x15ee('0x10')]+')');var _0x20186f=_0xaac67e?_0x51eaa6[_0x15ee('0x11')]:_0x51eaa6[_0x15ee('0x12')];logger['info'](_0x15ee('0x13'),_0x117d18,_0x51eaa6[_0x15ee('0x10')],_0xaac67e,_0x20186f||'next');if(_0x20186f){var _0x35d86a=_[_0x15ee('0x14')](_0x2a60c2[_0x15ee('0x15')](),{'p':_0x20186f});if(_0x35d86a>=0x0){logger[_0x15ee('0x16')](_0x15ee('0x17'),_0x117d18,_0x20186f||_0x15ee('0x18'),_0x35d86a);_0x2a60c2[_0x15ee('0x18')](_0x35d86a);}else{logger[_0x15ee('0x16')](_0x15ee('0x19'),_0x117d18,_0x20186f||_0x15ee('0x18'));_0x2a60c2[_0x15ee('0x1a')]();}}else{_0x2a60c2['next']();}}catch(_0xc413bc){logger[_0x15ee('0x1b')](_0x15ee('0x1c'),_0x117d18,_0xc413bc['message']);_0x2a60c2[_0x15ee('0x1a')]();}}}catch(_0x31357a){logger[_0x15ee('0x1b')](_0x15ee('0xd'),_0x117d18,JSON['stringify'](_0x31357a));_0x2a60c2['stop']();}};};
\ No newline at end of file