Built motion from commit 497d3d92.|2.5.43
[motion2.git] / server / services / routing / server / applications / gotoif.js
index 03ed2fd..9eac506 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x74c4=['priority\x20false\x20is\x20a\x20number','consequence','fromString','getMustacheRender','replace','length','error','[%s][GOTOIF]\x20%s','join','stop','priorityFalse','info','rules','[%s][GOTOIF]\x20priority\x20%s\x20found\x20at\x20index:\x20%s','next','[%s][GOTOIF]\x20priority\x20%s\x20not\x20found','[%s][GOTOIF]\x20eval\x20error:\x20%s','message','stringify','lodash','html-to-text','./utils','routing','string','condition\x20is\x20a\x20string\x20and\x20it\x20is\x20required','number','priority\x20true\x20is\x20a\x20number'];(function(_0x41f324,_0x3b0b2b){var _0x45f719=function(_0x54425e){while(--_0x54425e){_0x41f324['push'](_0x41f324['shift']());}};_0x45f719(++_0x3b0b2b);}(_0x74c4,0x106));var _0x474c=function(_0x572357,_0x3f70ae){_0x572357=_0x572357-0x0;var _0xa9fcfe=_0x74c4[_0x572357];return _0xa9fcfe;};'use strict';var schema=require('validate');var _=require(_0x474c('0x0'));var htmlToText=require(_0x474c('0x1'));var utils=require(_0x474c('0x2'));var logger=require('../../../../config/logger')(_0x474c('0x3'));var gotoif=schema({'condition':{'type':_0x474c('0x4'),'required':!![],'message':_0x474c('0x5')},'priorityTrue':{'type':_0x474c('0x6'),'message':_0x474c('0x7')},'priorityFalse':{'type':_0x474c('0x6'),'message':_0x474c('0x8')}});exports[_0x474c('0x9')]=function(_0x1001cb,_0x225d34){return function(_0x4c7a4a){try{var _0x27fa96={'condition':htmlToText[_0x474c('0xa')](utils[_0x474c('0xb')](_0x225d34[0x0],this),{'wordwrap':![]})[_0x474c('0xc')](/<\/?[^>]+(>|$)/g,''),'priorityTrue':_0x225d34[0x1],'priorityFalse':_0x225d34[0x2]};var _0x4d1b13=gotoif['validate'](_0x27fa96,{'typecast':!![]});if(_0x4d1b13[_0x474c('0xd')]){logger[_0x474c('0xe')](_0x474c('0xf'),_0x1001cb,_['map'](_0x4d1b13,'message')[_0x474c('0x10')](',\x20'));_0x4c7a4a[_0x474c('0x11')]();}else{try{var _0x47ec2d=eval('('+_0x27fa96['condition']+')');var _0x25667c=_0x47ec2d?_0x27fa96['priorityTrue']:_0x27fa96[_0x474c('0x12')];logger[_0x474c('0x13')]('[%s][GOTOIF]\x20condition\x20%s\x20is\x20%s\x20try\x20goto\x20priority\x20%s',_0x1001cb,_0x27fa96['condition'],_0x47ec2d,_0x25667c||'next');if(_0x25667c){var _0x5d348=_['findIndex'](_0x4c7a4a[_0x474c('0x14')](),{'p':_0x25667c});if(_0x5d348>=0x0){logger[_0x474c('0x13')](_0x474c('0x15'),_0x1001cb,_0x25667c||_0x474c('0x16'),_0x5d348);_0x4c7a4a[_0x474c('0x16')](_0x5d348);}else{logger[_0x474c('0x13')](_0x474c('0x17'),_0x1001cb,_0x25667c||'next');_0x4c7a4a[_0x474c('0x11')]();}}else{_0x4c7a4a[_0x474c('0x16')]();}}catch(_0x560965){logger[_0x474c('0xe')](_0x474c('0x18'),_0x1001cb,_0x560965[_0x474c('0x19')]);_0x4c7a4a[_0x474c('0x11')]();}}}catch(_0x3329d9){logger[_0x474c('0xe')]('[%s][GOTOIF]\x20%s',_0x1001cb,JSON[_0x474c('0x1a')](_0x3329d9));_0x4c7a4a['stop']();}};};
\ No newline at end of file
+var _0xf045=['stop','[%s][GOTOIF]\x20eval\x20error:\x20%s','stringify','validate','lodash','./utils','string','condition\x20is\x20a\x20string\x20and\x20it\x20is\x20required','number','priority\x20false\x20is\x20a\x20number','consequence','fromString','length','error','[%s][GOTOIF]\x20%s','map','message','join','condition','priorityTrue','priorityFalse','info','[%s][GOTOIF]\x20condition\x20%s\x20is\x20%s\x20try\x20goto\x20priority\x20%s','next','findIndex','rules','[%s][GOTOIF]\x20priority\x20%s\x20found\x20at\x20index:\x20%s','[%s][GOTOIF]\x20priority\x20%s\x20not\x20found'];(function(_0x114b7c,_0xc4b93b){var _0x47185f=function(_0x5b4cfa){while(--_0x5b4cfa){_0x114b7c['push'](_0x114b7c['shift']());}};_0x47185f(++_0xc4b93b);}(_0xf045,0x153));var _0x5f04=function(_0x3eb57e,_0x3103ec){_0x3eb57e=_0x3eb57e-0x0;var _0x494a30=_0xf045[_0x3eb57e];return _0x494a30;};'use strict';var schema=require(_0x5f04('0x0'));var _=require(_0x5f04('0x1'));var htmlToText=require('html-to-text');var utils=require(_0x5f04('0x2'));var logger=require('../../../../config/logger')('routing');var gotoif=schema({'condition':{'type':_0x5f04('0x3'),'required':!![],'message':_0x5f04('0x4')},'priorityTrue':{'type':_0x5f04('0x5'),'message':'priority\x20true\x20is\x20a\x20number'},'priorityFalse':{'type':_0x5f04('0x5'),'message':_0x5f04('0x6')}});exports[_0x5f04('0x7')]=function(_0x599e7f,_0x41ddc0){return function(_0x3756f3){try{var _0x3472f0={'condition':htmlToText[_0x5f04('0x8')](utils['getMustacheRender'](_0x41ddc0[0x0],this),{'wordwrap':![]})['replace'](/<\/?[^>]+(>|$)/g,''),'priorityTrue':_0x41ddc0[0x1],'priorityFalse':_0x41ddc0[0x2]};var _0x3d3916=gotoif[_0x5f04('0x0')](_0x3472f0,{'typecast':!![]});if(_0x3d3916[_0x5f04('0x9')]){logger[_0x5f04('0xa')](_0x5f04('0xb'),_0x599e7f,_[_0x5f04('0xc')](_0x3d3916,_0x5f04('0xd'))[_0x5f04('0xe')](',\x20'));_0x3756f3['stop']();}else{try{var _0x42ccba=eval('('+_0x3472f0[_0x5f04('0xf')]+')');var _0xf38893=_0x42ccba?_0x3472f0[_0x5f04('0x10')]:_0x3472f0[_0x5f04('0x11')];logger[_0x5f04('0x12')](_0x5f04('0x13'),_0x599e7f,_0x3472f0[_0x5f04('0xf')],_0x42ccba,_0xf38893||_0x5f04('0x14'));if(_0xf38893){var _0x1ffc6a=_[_0x5f04('0x15')](_0x3756f3[_0x5f04('0x16')](),{'p':_0xf38893});if(_0x1ffc6a>=0x0){logger[_0x5f04('0x12')](_0x5f04('0x17'),_0x599e7f,_0xf38893||'next',_0x1ffc6a);_0x3756f3[_0x5f04('0x14')](_0x1ffc6a);}else{logger[_0x5f04('0x12')](_0x5f04('0x18'),_0x599e7f,_0xf38893||'next');_0x3756f3[_0x5f04('0x19')]();}}else{_0x3756f3['next']();}}catch(_0xf964f){logger[_0x5f04('0xa')](_0x5f04('0x1a'),_0x599e7f,_0xf964f['message']);_0x3756f3[_0x5f04('0x19')]();}}}catch(_0x102967){logger[_0x5f04('0xa')](_0x5f04('0xb'),_0x599e7f,JSON[_0x5f04('0x1b')](_0x102967));_0x3756f3[_0x5f04('0x19')]();}};};
\ No newline at end of file