UNPKG

fa-toolkit

Version:

a devtool for fast app

1 lines 4.32 kB
"use strict";var _0x3309df=_0x5b11;!function(){for(var e=_0x5b11,r=_0x8b2d();;)try{if(797249==-parseInt(e(408))+parseInt(e(416))/2+-parseInt(e(392))/3*(parseInt(e(420))/4)+-parseInt(e(393))/5*(parseInt(e(403))/6)+-parseInt(e(395))/7+-parseInt(e(401))/8*(parseInt(e(410))/9)+parseInt(e(421))/10)break;r.push(r.shift())}catch(e){r.push(r.shift())}}();var allowedKeywords="Infinity,undefined,NaN,null,isFinite,isNaN,true,false,"+_0x3309df(407)+_0x3309df(415),allowedKeywordsRE=allowedKeywords[_0x3309df(427)](","),prohibitedKeywordRE=new RegExp("\\b"[_0x3309df(411)]((_0x3309df(405)+_0x3309df(417)+_0x3309df(425)).split(",")[_0x3309df(394)](_0x3309df(429)),"\\b")),stripStringRE=/'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g,innerParenthesesRe=/{{([^}][^}])*({{.*)+/,_require=require(_0x3309df(423)),hashSum=_require[_0x3309df(397)],STRINGIFY_OBJECT=JSON[_0x3309df(402)]({}),OBEJECT_PLACEHOLDER=hashSum(STRINGIFY_OBJECT),REPLACE_RE=new RegExp(OBEJECT_PLACEHOLDER,"g"),BINDING_CONTENT_RE=/{{([\s\S]*)}}/,OBJECT_RE=/{\s*}/g;function replace(e){var r=_0x3309df;return 1<arguments[r(396)]&&void 0!==arguments[1]&&arguments[1]?e[r(391)](REPLACE_RE,STRINGIFY_OBJECT)[r(391)](/\s+$/gm,""):e[r(391)](REPLACE_RE,STRINGIFY_OBJECT).trim()}function isIdentifierNotAllow(e){return allowedKeywordsRE[_0x3309df(431)](e)}function parseText(e,r){var t=_0x3309df,n=2<arguments[t(396)]&&void 0!==arguments[2]&&arguments[2],i=3<arguments[t(396)]&&void 0!==arguments[3]&&arguments[3],a=e;if(n){if(!textExpRE.test(a))return null}else if(a=a[t(391)](/\n/g,""),!expRE[t(399)](a))return null;var x=[];if(innerParenthesesRe[t(399)](a))return r[t(398)][t(426)]({reason:t(409)[t(411)](a,t(428))}),x;var E=0;tagRE[t(414)]=E,OBJECT_RE[t(399)](a)&&(a=a.replace(OBJECT_RE,OBEJECT_PLACEHOLDER));for(var s=null;s=textTagRE[t(404)](a);){var p=s[t(424)];E<p&&x[t(426)]({value:a[t(406)](E,p)});p=htmlRE[t(399)](s[0]);p&&(s[1]=a.slice(E,textTagRE[t(414)]+1)[t(412)](BINDING_CONTENT_RE)[1]),x[t(426)]({tag:!0,value:replace(s[1]||s[2],i),html:p}),E=textTagRE[t(414)]}return E<a.length&&x[t(426)]({value:replace(a[t(406)](E),i)}),x}function isExpr(e){return expRE[_0x3309df(399)](e)}function singleExpr(e){var r=_0x3309df;return sexpRE[r(399)](e[r(418)]())}function _0x8b2d(){var e=["stringify","67602kPIBeP","exec","break,case,class,catch,const,continue,debugger,default,delete,do,else,export,extends,finally,","slice","parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,","1446724CdLtmW",'ERROR: Unexpected inner parentheses, with attr value : "',"647739YKNwxg","concat","match","exports","lastIndex","Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,require","3065324sTXhKk","for,function,if,import,in,instanceof,let,return,super,switch,throw,try,var,while,","trim","^{{{(.+?)}}}$|^{{(.+?)}}$","12TARyZy","47981020HQTtIV","{{{(.+?)}}}|{{(.+?)}}","./hash-sum","index","with,yield,enum,await,implements,package,protected,static,interface,private,public","push","split",'", please change it.',"\\b|\\b","{{{([\\s\\S]*?)}}}|{{([\\s\\S]*?)}}","includes","replace","570111emDltA","575llyPmX","join","8997464Hoyxwi","length","hashSum","buildLog","test","^{{{.*}}}$","104XjqFAt"];return(_0x8b2d=function(){return e})()}function removeExprffix(e){var r=_0x3309df,e=e;return e=(e=singleExpr(e)?e[r(391)](/^\s*{{/,"")[r(391)](/}}\s*$/,""):e)[r(418)]()}function addExprffix(e){return e=!singleExpr(e)?"{{".concat(e,"}}"):e}function containExpr(e){var r=_0x3309df;return!!e&&tagRE[r(399)](e[r(391)](/(\n)|(\r)/g,""))}function removeAllExprFix(e){var r=_0x3309df,e=e;return e=containExpr(e)?e[r(391)](/\{\{\{?|\}\}\}?/g,""):e}function _0x5b11(e,r){var t=_0x8b2d();return(_0x5b11=function(e,r){return t[e-=391]})(e,r)}var tagSource=_0x3309df(422),tagRE=new RegExp(tagSource,"g"),expRE=new RegExp(tagSource),textTagRE=new RegExp("{{{([\\s\\S]*?)}}}|{{([\\s\\S]*?)}}","g"),textExpRE=new RegExp(_0x3309df(430)),htmlRE=new RegExp(_0x3309df(400)),sexpRE=new RegExp(_0x3309df(419));module[_0x3309df(413)]={parseText:parseText,isExpr:isExpr,singleExpr:singleExpr,addExprffix:addExprffix,removeExprffix:removeExprffix,containExpr:containExpr,removeAllExprFix:removeAllExprFix,prohibitedKeywordRE:prohibitedKeywordRE,stripStringRE:stripStringRE,isIdentifierNotAllow:isIdentifierNotAllow};