Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

remixml

Package Overview
Dependencies
Maintainers
1
Versions
346
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remixml - npm Package Compare versions

Comparing version 7.0.1 to 7.0.2

2

package.json
{
"name": "remixml",
"version": "7.0.1",
"version": "7.0.2",
"description": "XML/HTML-like macro language/template compiler engine",

@@ -5,0 +5,0 @@ "main": "remixml.min.js",

@@ -137,5 +137,3 @@ /** @license

$ = C(H, $, args ? args.split(splc).reduce(marko, {}) : {}, scope);
var tt = await tpl($);
console.log("await", name, tt, $);
W.push(tt);
W.push(await tpl($));
};

@@ -376,2 +374,3 @@ }

= $["_"]["_tag"][/** @type {Object} */(H)[""]];
console.log("exe", /** @type {Object} */(H)[""]);
if (fn)

@@ -378,0 +377,0 @@ return fn(J, H, $);

@@ -145,5 +145,3 @@ /** @license

$ = C(H, $, args ? args.split(splc).reduce(marko, {}) : {}, scope);
var tt = await tpl($);
console.log("await", name, tt, $);
W.push(tt);
W.push(await tpl($));
};

@@ -384,2 +382,3 @@ }

= $["_"]["_tag"][/** @type {Object} */(H)[""]];
console.log("exe", /** @type {Object} */(H)[""]);
if (fn)

@@ -386,0 +385,0 @@ return fn(J, H, $);

@@ -14,30 +14,30 @@ (function(){"use strict";

*/
'use strict';(()=>{function ma(a){return"string"===typeof a}function Ta(a){return Ua[a]}function Va(a){return Wa[a]}function na(a){return a.slice(1,-1).split(Xa)}function Ya(a,b){a[b]=1;return a}function Za(a,b,c,e,f){b._._tag[c]=async function(h,r,m){delete r[""];m=C(r,m,f?f.split(Da).reduce(Ya,{}):{},e);r=await a(m);console.log("await",c,r,m);h.push(r)}}function ka(a,b){var c=a.match($a);return c?(a=T(c[1]),b?[a]:"["+a+"]"):a}function Ea(a,b){return ra(sa(a,b))}function Fa(a){return a.replace(ab,
" ")}function Ga(a,b,c){y.defineProperty(a,b,{get:c,configurable:!0})}function Ha(a){return a.match(bb)?"."+a:'["'+a+'"]'}function Ia(a,b){var c;if(b)for(c in b.length=0,b)delete b[c];else b=[];Array.isArray(a)||(a.length=0);return y.assign(b,a)}function la(a,b){return"(()=>{try{return "+a+"}catch(x){"+(b?"":"D(x)")+'}return ""})()'}function Ja(a){var b="",c="",e;for(Ka.lastIndex=0;e=ba(Ka,a);)b=e[1]?b+(c+la(La(e),1)):b+(c+JSON.stringify(e[0])),c="+";return b}function ta(a,b,c){a="Z($,"+ka(a);b&&
(a+=","+b);c&&(b||(a+=",0"),a+=","+c);return a+")"}function La(a){var b=a[2],c=a[3];return ta(JSON.stringify(a[1]),ma(b)&&JSON.stringify(b),c&&JSON.stringify(c))}function ea(a){a&&(a.includes("(")?(a='"'===a.slice(-1)?'"'===a[0]?a.slice(1,-1):'"+'+a.slice(0,-1):('"'===a[0]?a.slice(1):'"+'+a)+'+"',a.includes("{")&&(a="("+a+")"),a=la('eval("'+a+'")'),a=a.includes("_")?"(_=$._,"+a+")":a):((a=JSON.parse(a)).includes("_")&&(a="(_=$._,"+a+")"),a=la(a)));return a}function sa(a,b){function c(p,W){var v=D,
fa=a.slice(0,w),ca=(fa.match(cb)||"").length+1;fa=fa.match(db)[0].length+1;v(W+" at "+(ca+":"+fa),a.substr(w-64,128+(p?p.length:0)))}function e(){2===(q[2]&6)&&(q[2]|=4,d+="H._c=(H,$)=>{")}function f(p,W){I||(d+='H.push(W=L("'+p[0][0]+'"));W[0]='+JSON.stringify(p[W])+";")}var h=b&4;const r=h?"async ":"";var m=h?"await ":"";const oa=h?"await OA":"O";h=h?'"\u0002"+':"";var d="("+r+'$=>{"use strict";var I,W,c,_,H=N($);',aa=0,I=0;const ua="w,v="+r+"()=>{"+m+"w();",Ma=")};w=("+r+"W=>{",Na="});"+m+"v()}",
eb=m+"X(J,H,$)";m="do{if((k=Y(H))===m)break;H="+m+"E(m=k,$"+(b?","+b:"")+")}while(--n);J.push.apply(J,H)}";for(var z,q=[0,{},4,""],da=[q],w=0;;){var t,g="";if(w>=a.length){var u=q[0];if(u){c(u,"Missing </"+u+">");a+="</"+u+">";continue}break}a:switch(a[w]){case "<":var x=function(){return l("var")||l("variable")};u=function(){t=ba(pa,a);t[1]?c(0,'Skipping malformed parameter "'+t[1]+'"'):t||c(0,"Parse error");return H=t[2]};var ha=function(v,fa){var ca=l("mkmapping");if(ca){let Oa=na(ca);for(d+=v;ca=
Oa.pop();)d+=fa+Ha(ca)+"=k["+Oa.length+"];"}else if(""===ca)return 1},l=function(v){return(v=p[v])&&Ja(v)};va.lastIndex=++w;if(t=ba(va,a)){w=va.lastIndex;I||(t[1]?f(t,1):t[2]?(t[0]="<",f(t,2)):(wa.lastIndex=0,ba(wa,g=t[3])?"n"===g[0]&&(d+="H.push("+JSON.stringify(g.slice(wa.lastIndex))+");"):f(t,3)));break}let p={};var H;pa.lastIndex=w;if("/"===u())p[H]=1,u();else if(!H){t&&(w=pa.lastIndex);break a}for(p[""]=H;;){if(!u()){t&&(w=pa.lastIndex);break}p[H]=t[3]?t[3].slice(1,-1):H}let W=p["/"];delete p["/"];
u=p[""];if(1!==W){do{da.push(q=[u,p,0,d]);d="";p["-"]&&(delete p["-"],q[2]=1);switch(u){case "noparse":if(!aa++)continue;break;case "comment":aa||I++}if(!I){delete p[""];d+="W=H;";if(!aa)switch(u){case "set":d+="{let H=L(),";var k=x();z=0;if(k){var n=l("expr");d+=ua;q[2]|=16;z=d.length;if(g=l("selector"))d+="B($,w=L(),H,"+g+");H=w;";else{void 0!==p.json&&(d+="H=JSON.parse(Y(H));");if(g=l("split"))d+="H=Y(H).split("+(ea(n)||g)+");",n=void 0;void 0!==n&&(d+="H="+(ea(n)||"(_=$._,"+la("eval(Y(H))")+")")+
";");if(g=l("join"))d+="H=H.join("+g+");";ha("let k=H[0];H={};","H")}d.length!==z&&(z=0);k=ka(k,1);Array.isArray(k)?d+=k[0]+"=A("+(void 0!==p.clone?(z=0,"O(H,"+k[0]+")"):"H"):(z=0,d+="A(H,$,"+k);d+=Ma}else if(g=l("tag")){e();d+="v=0;Q("+g+",$,"+r+"(H,a,$,W)=>{$=C(a,$,{";(g=l("args"))&&(g=g.replace(fb,""))&&(d+='"'+g.replace(Da,'":1,"')+'":1');d+="}";if(g=l("scope"))d+=","+g;d+=");"}continue;case "insert":if(n=x()){k=function(){v&&(d+="let x="+v+";",v=0)};let v=ta(n,l("quote"),l("format"));d+="try{";
if(g=l("join"))k(),d+="x=x.join?x.join("+g+"):x;";n=l("limit");if((g=l("offset"))||void 0!==n)k(),d+="x=F(x,"+g+(void 0!==n?","+n:"")+");";d+="I=K($,H,"+(v||"x")+")}catch(x){I=0}"}else if(void 0!==(n=l("expr")))d+="{let H=L(),"+ua+("H="+(ea(n)||"(_=$._,"+la("eval(Y(H))")+")")+";W.push(A(H)")+Ma,q[2]|=8;else switch(l("variables")){case "dump":d+="log((W="+l("scope")+")?$[W]:$);"}continue;case "replace":k=l("flags");void 0===k&&(k="g");d+="{let H=L(),J=W,v=P("+(l("regexp")||l("from").replace(gb,"\\$1"))+
","+JSON.stringify(k)+","+(ea(l("expr"))||l("to"))+");";continue;case "washtags":k=l("keep");n=l("strip");d+="{let H=L(),J=W,v=PW("+(k?JSON.stringify(na(k)):0)+(n?","+JSON.stringify(na(n)):"")+");";continue;case "trim":d+="{let H=L(),J=W;";continue;case "maketag":d+="{let H=L("+l("name")+"),J=W;";continue;case "cache":d+="{let v,J=W,H,c="+(l("ttl")||0)+";";k="v=["+h+(l("shared")||++hb);var ia=l("key");n="";if(!ia&&(ia=x())){ia=na(ia);k="_=$._;try{"+k;n="}catch(e){v=0}";let v;for(v of ia)k+=","+ta(v,
'"json"')}else k+=","+(ia||0),n=";";d+=k+"]"+n+"H=CG(v);if(!H){H=L();";continue;case "nocache":d+="W.push("+r+"(H,$,W)=>{var c;";continue;case "attrib":d+="{let H=L(),v="+l("name")+",J=W;";continue;case "for":d+="{I=0;let g,i,k,m,J=W,n=0;";d=(k=l("in"))?d+("g=G($,"+ka(k)+((g=l("orderby"))?",(m=$._,_=>{let _index=_[0];$._=_=_[1];return["+ea(g)+"]}));$._=m":")")+";while(!(m=g.next()).done){k=(m=m.value)[1];i=m[0];W=S({_value:k,"):d+("for(i=+"+(l("from")||0)+",m="+((k=l("step"))?"+("+k+"||1)":1)+",k=+"+
(l("to")||0)+";m<0?i>=k:i<=k;i+=m){W=S({");d+="_recno:++n,_index:i});let o=$;$=C(W,$,{}";if(g=l("scope"))d+=","+g;d+=");";1===ha("k=(m=$._)._value;","m")&&(d+="M($._,$._._value);");continue;case "eval":d+="{let H=L(),n="+(void 0===(g=l("recurse"))?1:0<g?+g:0)+",J=W,k,m=0;";continue;case "unset":if(g=l("tag"))k=function(v){v="._._tag"+v;d+="$"+v+"=$._._&&$._"+v+";"},e(),n=ka(g,1),Array.isArray(n)?k(n[0].slice(1)):(d+="{let v="+n+";",k("[v]"),d+="}");else if(g=x())k=ka(g,1),d+=Array.isArray(k)?"delete "+
k[0]+";":'eval("delete $."+'+k+");";continue;case "delimiter":d+="if($._._recno>1){";continue;case "elif":g="(!I&&";case "if":d+="if"+g+"(I="+(ea(l("expr"))||0)+")"+(g?")":"")+"{";continue;case "then":d+="if(I){";continue;case "else":d+="if(!I){";continue}d+="{let J=W,H=S({";(k=p["::"])&&(p["::"]=k.slice(0,-1)+":;");k="";for(H in p)if(g=l(H))d+=k+(ib.test(H)?H:'"'+H+'"')+":"+g,k=",";d+='},"'+u+'")'}if(!W&&(k="script"===u?jb:"style"===u?kb:0)){k.lastIndex=w;x=ba(k,a)?k.lastIndex:a.length+3+u.length;
d+=";";!I&&(g=a.slice(w,x-3-u.length))&&(d+="H[0]="+JSON.stringify(g)+";");w=x;W=1;break}I||(d+=";",q[2]|=2)}while(0)}if(W)for(;;){q=da.pop();x=q[0];ha=0;if(u!==x){c(u,(x?"Expected </"+x+"> got </":"Missing <")+u+">");for(g=da.length;g;)if(da[--g][0]===u){ha=1;break}if(!ha){da.push(q);break}}b:do{switch(x){case "noparse":if(!--aa)break b;break;case "comment":if(!aa){I--;break b}break;case 0:break b}if(!I)if(aa)d+="J.push(H)}";else{c:do switch(x){case "set":if("{"!==d.slice(-1)&&z){g=d.slice(z).match(lb);
d=d.slice(0,z-11-ua.length)+g[1]+g[2]+";";break c}d+=q[2]&16?Na:"})}";break;case "insert":q[2]&8&&(d+=Na);break;case "replace":d+="J.push.apply(J,R(H,v))}";break;case "washtags":d+="J.push.apply(J,WT(H,v))}";break;case "trim":d+="J.push.apply(J,U(R(H)))}";break;case "maketag":d+="J.push(H)}";break;case "cache":d+="H=CS(v,H,c)}H="+oa+"(H,0,$);J.push(H)}";break;case "nocache":d+="});c+1||W.pop()(H,$);";break;case "attrib":d+="V(H,v,J)}";case "unset":break c;case "for":d+="$=o;I=1}}";break;case "if":case "then":case "elif":case "else":d+=
"I=1}";break c;case "eval":d+=m;break;case "nooutput":d+="J=[];";default:q[2]&4&&(d+="};");case "script":case "style":d+=eb;case "delimiter":d+="}"}while(0);z=0}}while(0);d=q[3]+d;if(!ha){q=da[da.length-1];break}}break;case "&":xa.lastIndex=++w;if(!aa&&(t=ba(xa,a))){w=xa.lastIndex;I||(d+="try{I=K($,H,"+(La(t)+")}catch(x){I=0}"),z=0);break}g="&";default:ya.lastIndex=w,(t=ba(ya,a))?(g+=t[0],w=ya.lastIndex):(c(0,"Parse error"),g+=a.substr(w),w=a.length),I||(!aa&&b&1&&(g=Fa(g)),!g||q[2]&1&&"0}"!==d.slice(-2)&&
g.match(mb)||(d+="H.push("+JSON.stringify(g)+");"))}}return d+="return H})"}function ra(a){try{var b=eval(a)}catch(c){D(c,a),nb(a),b=()=>""}return b}function ba(a,b){return a.exec(b)}const ob=("object"==typeof document?document:null)&&window,y=Object,Ua={" ":"+","\t":"%09","\n":"%0A","\r":"%0D",'"':"%22","#":"%23","%":"%25","&":"%26","'":"%27","+":"%2B","<":"%3C","?":"%3F"},pb=/[ \t\n\r#%&'"+<?]/g,Wa={"&":"&amp;","<":"&lt;",">":"&gt;"},qb=/[&<>]/g,Da=/\s*,\s*/g,Xa=/\s*,\s*/,Ka=RegExp("(?:[^&]+|(?:&(?:\\w*;|[\\w$:.[\\]]+(?=[^%;\\w$:.[\\]])|(?=[^\\w$:.[\\]]))[^&]*))+|&([\\w$]+(?:[.[][\\w$]+]?)*\\.[\\w$]+)(?::([\\w$]*))?(?:%([^;]*))?;",
'use strict';(()=>{function ma(a){return"string"===typeof a}function Ta(a){return Ua[a]}function Va(a){return Wa[a]}function na(a){return a.slice(1,-1).split(Xa)}function Ya(a,b){a[b]=1;return a}function Za(a,b,c,e,f){b._._tag[c]=async function(h,v,m){delete v[""];m=C(v,m,f?f.split(Da).reduce(Ya,{}):{},e);h.push(await a(m))}}function ka(a,b){var c=a.match($a);return c?(a=T(c[1]),b?[a]:"["+a+"]"):a}function Ea(a,b){return ra(sa(a,b))}function Fa(a){return a.replace(ab," ")}function Ga(a,b,c){y.defineProperty(a,
b,{get:c,configurable:!0})}function Ha(a){return a.match(bb)?"."+a:'["'+a+'"]'}function Ia(a,b){var c;if(b)for(c in b.length=0,b)delete b[c];else b=[];Array.isArray(a)||(a.length=0);return y.assign(b,a)}function la(a,b){return"(()=>{try{return "+a+"}catch(x){"+(b?"":"D(x)")+'}return ""})()'}function Ja(a){var b="",c="",e;for(Ka.lastIndex=0;e=ba(Ka,a);)b=e[1]?b+(c+la(La(e),1)):b+(c+JSON.stringify(e[0])),c="+";return b}function ta(a,b,c){a="Z($,"+ka(a);b&&(a+=","+b);c&&(b||(a+=",0"),a+=","+c);return a+
")"}function La(a){var b=a[2],c=a[3];return ta(JSON.stringify(a[1]),ma(b)&&JSON.stringify(b),c&&JSON.stringify(c))}function ea(a){a&&(a.includes("(")?(a='"'===a.slice(-1)?'"'===a[0]?a.slice(1,-1):'"+'+a.slice(0,-1):('"'===a[0]?a.slice(1):'"+'+a)+'+"',a.includes("{")&&(a="("+a+")"),a=la('eval("'+a+'")'),a=a.includes("_")?"(_=$._,"+a+")":a):((a=JSON.parse(a)).includes("_")&&(a="(_=$._,"+a+")"),a=la(a)));return a}function sa(a,b){function c(p,W){var u=D,fa=a.slice(0,w),ca=(fa.match(cb)||"").length+1;
fa=fa.match(db)[0].length+1;u(W+" at "+(ca+":"+fa),a.substr(w-64,128+(p?p.length:0)))}function e(){2===(q[2]&6)&&(q[2]|=4,d+="H._c=(H,$)=>{")}function f(p,W){I||(d+='H.push(W=L("'+p[0][0]+'"));W[0]='+JSON.stringify(p[W])+";")}var h=b&4;const v=h?"async ":"";var m=h?"await ":"";const oa=h?"await OA":"O";h=h?'"\u0002"+':"";var d="("+v+'$=>{"use strict";var I,W,c,_,H=N($);',aa=0,I=0;const ua="w,v="+v+"()=>{"+m+"w();",Ma=")};w=("+v+"W=>{",Na="});"+m+"v()}",eb=m+"X(J,H,$)";m="do{if((k=Y(H))===m)break;H="+
m+"E(m=k,$"+(b?","+b:"")+")}while(--n);J.push.apply(J,H)}";for(var z,q=[0,{},4,""],da=[q],w=0;;){var r,g="";if(w>=a.length){var t=q[0];if(t){c(t,"Missing </"+t+">");a+="</"+t+">";continue}break}a:switch(a[w]){case "<":var x=function(){return l("var")||l("variable")};t=function(){r=ba(pa,a);r[1]?c(0,'Skipping malformed parameter "'+r[1]+'"'):r||c(0,"Parse error");return H=r[2]};var ha=function(u,fa){var ca=l("mkmapping");if(ca){let Oa=na(ca);for(d+=u;ca=Oa.pop();)d+=fa+Ha(ca)+"=k["+Oa.length+"];"}else if(""===
ca)return 1},l=function(u){return(u=p[u])&&Ja(u)};va.lastIndex=++w;if(r=ba(va,a)){w=va.lastIndex;I||(r[1]?f(r,1):r[2]?(r[0]="<",f(r,2)):(wa.lastIndex=0,ba(wa,g=r[3])?"n"===g[0]&&(d+="H.push("+JSON.stringify(g.slice(wa.lastIndex))+");"):f(r,3)));break}let p={};var H;pa.lastIndex=w;if("/"===t())p[H]=1,t();else if(!H){r&&(w=pa.lastIndex);break a}for(p[""]=H;;){if(!t()){r&&(w=pa.lastIndex);break}p[H]=r[3]?r[3].slice(1,-1):H}let W=p["/"];delete p["/"];t=p[""];if(1!==W){do{da.push(q=[t,p,0,d]);d="";p["-"]&&
(delete p["-"],q[2]=1);switch(t){case "noparse":if(!aa++)continue;break;case "comment":aa||I++}if(!I){delete p[""];d+="W=H;";if(!aa)switch(t){case "set":d+="{let H=L(),";var k=x();z=0;if(k){var n=l("expr");d+=ua;q[2]|=16;z=d.length;if(g=l("selector"))d+="B($,w=L(),H,"+g+");H=w;";else{void 0!==p.json&&(d+="H=JSON.parse(Y(H));");if(g=l("split"))d+="H=Y(H).split("+(ea(n)||g)+");",n=void 0;void 0!==n&&(d+="H="+(ea(n)||"(_=$._,"+la("eval(Y(H))")+")")+";");if(g=l("join"))d+="H=H.join("+g+");";ha("let k=H[0];H={};",
"H")}d.length!==z&&(z=0);k=ka(k,1);Array.isArray(k)?d+=k[0]+"=A("+(void 0!==p.clone?(z=0,"O(H,"+k[0]+")"):"H"):(z=0,d+="A(H,$,"+k);d+=Ma}else if(g=l("tag")){e();d+="v=0;Q("+g+",$,"+v+"(H,a,$,W)=>{$=C(a,$,{";(g=l("args"))&&(g=g.replace(fb,""))&&(d+='"'+g.replace(Da,'":1,"')+'":1');d+="}";if(g=l("scope"))d+=","+g;d+=");"}continue;case "insert":if(n=x()){k=function(){u&&(d+="let x="+u+";",u=0)};let u=ta(n,l("quote"),l("format"));d+="try{";if(g=l("join"))k(),d+="x=x.join?x.join("+g+"):x;";n=l("limit");
if((g=l("offset"))||void 0!==n)k(),d+="x=F(x,"+g+(void 0!==n?","+n:"")+");";d+="I=K($,H,"+(u||"x")+")}catch(x){I=0}"}else if(void 0!==(n=l("expr")))d+="{let H=L(),"+ua+("H="+(ea(n)||"(_=$._,"+la("eval(Y(H))")+")")+";W.push(A(H)")+Ma,q[2]|=8;else switch(l("variables")){case "dump":d+="log((W="+l("scope")+")?$[W]:$);"}continue;case "replace":k=l("flags");void 0===k&&(k="g");d+="{let H=L(),J=W,v=P("+(l("regexp")||l("from").replace(gb,"\\$1"))+","+JSON.stringify(k)+","+(ea(l("expr"))||l("to"))+");";continue;
case "washtags":k=l("keep");n=l("strip");d+="{let H=L(),J=W,v=PW("+(k?JSON.stringify(na(k)):0)+(n?","+JSON.stringify(na(n)):"")+");";continue;case "trim":d+="{let H=L(),J=W;";continue;case "maketag":d+="{let H=L("+l("name")+"),J=W;";continue;case "cache":d+="{let v,J=W,H,c="+(l("ttl")||0)+";";k="v=["+h+(l("shared")||++hb);var ia=l("key");n="";if(!ia&&(ia=x())){ia=na(ia);k="_=$._;try{"+k;n="}catch(e){v=0}";let u;for(u of ia)k+=","+ta(u,'"json"')}else k+=","+(ia||0),n=";";d+=k+"]"+n+"H=CG(v);if(!H){H=L();";
continue;case "nocache":d+="W.push("+v+"(H,$,W)=>{var c;";continue;case "attrib":d+="{let H=L(),v="+l("name")+",J=W;";continue;case "for":d+="{I=0;let g,i,k,m,J=W,n=0;";d=(k=l("in"))?d+("g=G($,"+ka(k)+((g=l("orderby"))?",(m=$._,_=>{let _index=_[0];$._=_=_[1];return["+ea(g)+"]}));$._=m":")")+";while(!(m=g.next()).done){k=(m=m.value)[1];i=m[0];W=S({_value:k,"):d+("for(i=+"+(l("from")||0)+",m="+((k=l("step"))?"+("+k+"||1)":1)+",k=+"+(l("to")||0)+";m<0?i>=k:i<=k;i+=m){W=S({");d+="_recno:++n,_index:i});let o=$;$=C(W,$,{}";
if(g=l("scope"))d+=","+g;d+=");";1===ha("k=(m=$._)._value;","m")&&(d+="M($._,$._._value);");continue;case "eval":d+="{let H=L(),n="+(void 0===(g=l("recurse"))?1:0<g?+g:0)+",J=W,k,m=0;";continue;case "unset":if(g=l("tag"))k=function(u){u="._._tag"+u;d+="$"+u+"=$._._&&$._"+u+";"},e(),n=ka(g,1),Array.isArray(n)?k(n[0].slice(1)):(d+="{let v="+n+";",k("[v]"),d+="}");else if(g=x())k=ka(g,1),d+=Array.isArray(k)?"delete "+k[0]+";":'eval("delete $."+'+k+");";continue;case "delimiter":d+="if($._._recno>1){";
continue;case "elif":g="(!I&&";case "if":d+="if"+g+"(I="+(ea(l("expr"))||0)+")"+(g?")":"")+"{";continue;case "then":d+="if(I){";continue;case "else":d+="if(!I){";continue}d+="{let J=W,H=S({";(k=p["::"])&&(p["::"]=k.slice(0,-1)+":;");k="";for(H in p)if(g=l(H))d+=k+(ib.test(H)?H:'"'+H+'"')+":"+g,k=",";d+='},"'+t+'")'}if(!W&&(k="script"===t?jb:"style"===t?kb:0)){k.lastIndex=w;x=ba(k,a)?k.lastIndex:a.length+3+t.length;d+=";";!I&&(g=a.slice(w,x-3-t.length))&&(d+="H[0]="+JSON.stringify(g)+";");w=x;W=1;
break}I||(d+=";",q[2]|=2)}while(0)}if(W)for(;;){q=da.pop();x=q[0];ha=0;if(t!==x){c(t,(x?"Expected </"+x+"> got </":"Missing <")+t+">");for(g=da.length;g;)if(da[--g][0]===t){ha=1;break}if(!ha){da.push(q);break}}b:do{switch(x){case "noparse":if(!--aa)break b;break;case "comment":if(!aa){I--;break b}break;case 0:break b}if(!I)if(aa)d+="J.push(H)}";else{c:do switch(x){case "set":if("{"!==d.slice(-1)&&z){g=d.slice(z).match(lb);d=d.slice(0,z-11-ua.length)+g[1]+g[2]+";";break c}d+=q[2]&16?Na:"})}";break;
case "insert":q[2]&8&&(d+=Na);break;case "replace":d+="J.push.apply(J,R(H,v))}";break;case "washtags":d+="J.push.apply(J,WT(H,v))}";break;case "trim":d+="J.push.apply(J,U(R(H)))}";break;case "maketag":d+="J.push(H)}";break;case "cache":d+="H=CS(v,H,c)}H="+oa+"(H,0,$);J.push(H)}";break;case "nocache":d+="});c+1||W.pop()(H,$);";break;case "attrib":d+="V(H,v,J)}";case "unset":break c;case "for":d+="$=o;I=1}}";break;case "if":case "then":case "elif":case "else":d+="I=1}";break c;case "eval":d+=m;break;
case "nooutput":d+="J=[];";default:q[2]&4&&(d+="};");case "script":case "style":d+=eb;case "delimiter":d+="}"}while(0);z=0}}while(0);d=q[3]+d;if(!ha){q=da[da.length-1];break}}break;case "&":xa.lastIndex=++w;if(!aa&&(r=ba(xa,a))){w=xa.lastIndex;I||(d+="try{I=K($,H,"+(La(r)+")}catch(x){I=0}"),z=0);break}g="&";default:ya.lastIndex=w,(r=ba(ya,a))?(g+=r[0],w=ya.lastIndex):(c(0,"Parse error"),g+=a.substr(w),w=a.length),I||(!aa&&b&1&&(g=Fa(g)),!g||q[2]&1&&"0}"!==d.slice(-2)&&g.match(mb)||(d+="H.push("+JSON.stringify(g)+
");"))}}return d+="return H})"}function ra(a){try{var b=eval(a)}catch(c){D(c,a),nb(a),b=()=>""}return b}function ba(a,b){return a.exec(b)}const ob=("object"==typeof document?document:null)&&window,y=Object,Ua={" ":"+","\t":"%09","\n":"%0A","\r":"%0D",'"':"%22","#":"%23","%":"%25","&":"%26","'":"%27","+":"%2B","<":"%3C","?":"%3F"},pb=/[ \t\n\r#%&'"+<?]/g,Wa={"&":"&amp;","<":"&lt;",">":"&gt;"},qb=/[&<>]/g,Da=/\s*,\s*/g,Xa=/\s*,\s*/,Ka=RegExp("(?:[^&]+|(?:&(?:\\w*;|[\\w$:.[\\]]+(?=[^%;\\w$:.[\\]])|(?=[^\\w$:.[\\]]))[^&]*))+|&([\\w$]+(?:[.[][\\w$]+]?)*\\.[\\w$]+)(?::([\\w$]*))?(?:%([^;]*))?;",
"y"),xa=/([\w$]+\.[\w$]+(?:[.[][\w$]+]?)*)(?::([\w$]*))?(?:%([^;]*))?;/y,va=/!(?:--(.*?)(?:--|$)|([^-].*?))(?:>|$)|\?(.*?)(?:\?>|$)/ys,wa=/(?:noparse|comment)\s/y,ya=RegExp("[^&<]+(?:&(?:\\w*;|[\\w$:.[\\]]+(?=[^%;\\w$:.[\\]])|(?=[^\\w$:.[\\]]))[^&<]*)*","y"),pa=/\s*((?:[^-:_a-zA-Z<&>\s\/]\s*)*)(?:([-:_a-zA-Z][-:\w]*|\/)\s*(?:=\s*("[^"]*"|'[^']*'))?|[<&>])/y,ib=/^[_a-zA-Z]\w*$/,jb=/<\/script>/g,kb=/<\/style>/g,$a=/^"([^(+]+)"$/,bb=/^[A-Za-z_][\w]*$/,cb=/\n/g,db=/[^\n]*$/,lb=/([^=]+=).+(".*")/,mb=/^\s+$/,
ab=/\s\s+/g,rb=/</g,fb=/[^-:\w,]+/g,gb=/([\\^$*+?.|()[{])/g,sb=/"/g,tb=/[.[\]]+/,Pa={},J=new Map;var hb=0,za,nb=console.debug,Qa=console.error,Aa=32768,ja=1024,Ba=256,Ca=32,Ra,Sa;M=(a,b)=>{try{y.assign(a,b)}catch(c){}};D=(a,b)=>Qa("Remixml expression: "+(b?JSON.stringify(b):"")+"\n",a);E=(a,b,c)=>Ea(a,c)(b);P=(a,b,c)=>e=>(Array.isArray(e)?e.join(", "):e).replace(RegExp(a,b),c);PW=(a,b)=>{let c=a&&new Set(a),e=b&&new Set(b);return f=>(c?!c.has(f):e&&e.has(f))+0||f};CG=a=>{if(a){a=a.join("\u0001");
var b=J.get(a);if(b){let c=Date.now();J.delete(a);if(b[1]>c)return J.set(a,b),b[0]}}};CS=(a,b,c)=>{if(a){var e=Date.now(),f=J.size;if(Sa--||Ra<e||f>ja){Ra=e+Ba;Sa=Ca;let r=Array.from(J.keys()),m=0;for(f>=ja&&(f=ja-1);m<f;){var h=m+f>>1;J.get(r[h])[1]>e?f=h:m=h}for(f=J.size;m<f;)h=r[m++],(m>=ja||J.get(h)[1]>e)&&J.delete(h)}J.set(a.join("\u0001"),[b,e+(c||Aa)])}return b};U=a=>{var b;ma(b=a[0])&&" "===b[0]&&!(a[0]=b.substr(1))&&a.splice(0,1);var c=a.length-1;ma(b=a[c])&&" "===b.slice(-1)&&!(a[c]=b.slice(0,
var b=J.get(a);if(b){let c=Date.now();J.delete(a);if(b[1]>c)return J.set(a,b),b[0]}}};CS=(a,b,c)=>{if(a){var e=Date.now(),f=J.size;if(Sa--||Ra<e||f>ja){Ra=e+Ba;Sa=Ca;let v=Array.from(J.keys()),m=0;for(f>=ja&&(f=ja-1);m<f;){var h=m+f>>1;J.get(v[h])[1]>e?f=h:m=h}for(f=J.size;m<f;)h=v[m++],(m>=ja||J.get(h)[1]>e)&&J.delete(h)}J.set(a.join("\u0001"),[b,e+(c||Aa)])}return b};U=a=>{var b;ma(b=a[0])&&" "===b[0]&&!(a[0]=b.substr(1))&&a.splice(0,1);var c=a.length-1;ma(b=a[c])&&" "===b.slice(-1)&&!(a[c]=b.slice(0,
-1))&&a.splice(c,1);return a};F=(a,b,c)=>(b=+(b||0),c=+c,0>c?a.slice(b,c):0<c?a.slice(b,b+c):0==c?a.slice(b):"");R=(a,b)=>{for(var c,e=a.length,f=b||Fa;e--;){switch((c=a[e])[""]){case "!":case "<":case "?":if(!b)break;default:R(c,b);continue;case void 0:if(a[e]=f(c))continue}a.splice(e,1)}return a};WT=(a,b)=>{for(var c,e,f=a.length;f--;)void 0!==(e=(c=a[f])[""])&&(WT(c,b),a[f][""]=b(e));return a};S=(a,b)=>{b=L(b);y.assign(b,a);delete b["::"];(a=a["::"])&&y.assign(b,a);return b};L=a=>{var b=[];b[""]=
a||1;return b};N=a=>{var b=a._;b||(a._=b={});b._tag||(b._tag={});!a["var"]&&a.__&&(a["var"]=a.__);return L()};C=(a,b,c,e)=>{if(1!==a[""])if(Ga(a,"_contents",()=>{let h=a._c;h?h(a.slice(),b):a[""]=1;return a}),c)Ga(a,"_restargs",function(){var h,r={};for(h in this)switch(h[0]){default:0<=h||c[h]||(r[h]=this[h]);case "_":case void 0:}return r});else return a;var f;(f=y.assign({},b))._=y.assign(a,{_:b._,_tag:y.assign({},b._._tag)});e&&(f[e]=a);return f};V=(a,b,c)=>{void 0===c[b]&&(c[b]=1!==a.length||
a[0][""]?a.length?a:"":a[0])};X=(a,b,c)=>{var e=c._._tag[b[""]];if(e)return e(a,b,c);if(e=b._c)delete b._c,e(b,c);a.push(b)};Q=(a,b,c)=>b._._tag[a]=c;G=(a,b,c)=>{if((b=(b=Array.isArray(b)?b[0]:VE(a,b))||0)&&0<=b.size)a=b.entries();else if(a=y.entries(b),0<=b.length&&a.splice(b.length),c)try{a=a.sort((e,f)=>{var h,r;e=c(e);f=c(f);var m=0;for(h=e.length;m<h;m++){var oa=0;Array.isArray(e[m])&&(oa=1,e[m]=e[m][0],f[m]=f[m][0]);if(r=e[m]>f[m]||-(e[m]!==f[m]))break}return oa?-r:r})}catch(e){D(e,c)}return a[Symbol.iterator]()};
B=(a,b,c,e)=>{for(var f=0;f<c.length;){let h=c[f++];switch(h[""]){default:B(a,b,h,e);return;case e:b.push(C(h,a));case void 0:}}};T=a=>{var b=a.split(tb),c;a="$";for(c of b)a+=Ha(c);return a};Z=(a,b,c,e)=>{b=Array.isArray(b)?b[0]:VE(a,b);null==b&&(b="");"function"===typeof b&&(b=b(a._,a));if(b[""])switch(c){case "r":case "recurse":case "":case "none":if(!e)break;default:b=Y(b)}else- -b==b&&(b+="");e&&!b[""]&&za&&(b=za(e,b,a));switch(c){case "json":b=JSON.stringify(b).replace(rb,"\\\\u003c");break;
case "uric":b=b.replace(pb,Ta);break;default:b[""]||(b=Array.isArray(b)?b.join(", "):b,b=(e=Pa[c])?e(b):b.replace(qb,Va));case "":case "none":case "r":case "recurse":}switch(b.length){case 0:b="";break;case 1:1===b[""]&&(b=b[0])}if("r"===c)for(c="";b!==c&&b.includes("&");)c=b,b=VE(a,["("+Ja(b)+")"]);return b};O=(a,b,c)=>{b=Ia(a,b);for(a=b.length;a--;){let e=b[a];if(e[""])b[a]=O(e,0,c);else if("function"===typeof e){let f=[a,1];e(f,c);Array.prototype.splice.apply(b,f)}}return b};OA=async(a,b,c)=>{b=
Ia(a,b);for(a=b.length;a--;){let e=b[a];if(e[""])b[a]=await OA(e,0,c);else if("function"===typeof e){let f=[a,1];await e(f,c);Array.prototype.splice.apply(b,f)}}return b};K=(a,b,c)=>{c[""]?(1===c[""]?b.push.apply(b,O(c)):b.push(c),c=1):c||void 0!==c&&c?(b.push(c),c=1):c=0;return c};sizeof=a=>Number(a)===a?1:a?a.length||1!==a[""]||y.keys(a).length:0;desc=a=>- -a===a?-a:[a,1];abstract2dom=(a,b)=>qa.abstract2dom(a,b);abstract2txt=Y=(a,b)=>{for(;;){switch(a[""]){case void 0:if(!Array.isArray(a))return a;
a||1;return b};N=a=>{var b=a._;b||(a._=b={});b._tag||(b._tag={});!a["var"]&&a.__&&(a["var"]=a.__);return L()};C=(a,b,c,e)=>{if(1!==a[""])if(Ga(a,"_contents",()=>{let h=a._c;h?h(a.slice(),b):a[""]=1;return a}),c)Ga(a,"_restargs",function(){var h,v={};for(h in this)switch(h[0]){default:0<=h||c[h]||(v[h]=this[h]);case "_":case void 0:}return v});else return a;var f;(f=y.assign({},b))._=y.assign(a,{_:b._,_tag:y.assign({},b._._tag)});e&&(f[e]=a);return f};V=(a,b,c)=>{void 0===c[b]&&(c[b]=1!==a.length||
a[0][""]?a.length?a:"":a[0])};X=(a,b,c)=>{var e=c._._tag[b[""]];console.log("exe",b[""]);if(e)return e(a,b,c);if(e=b._c)delete b._c,e(b,c);a.push(b)};Q=(a,b,c)=>b._._tag[a]=c;G=(a,b,c)=>{if((b=(b=Array.isArray(b)?b[0]:VE(a,b))||0)&&0<=b.size)a=b.entries();else if(a=y.entries(b),0<=b.length&&a.splice(b.length),c)try{a=a.sort((e,f)=>{var h,v;e=c(e);f=c(f);var m=0;for(h=e.length;m<h;m++){var oa=0;Array.isArray(e[m])&&(oa=1,e[m]=e[m][0],f[m]=f[m][0]);if(v=e[m]>f[m]||-(e[m]!==f[m]))break}return oa?-v:
v})}catch(e){D(e,c)}return a[Symbol.iterator]()};B=(a,b,c,e)=>{for(var f=0;f<c.length;){let h=c[f++];switch(h[""]){default:B(a,b,h,e);return;case e:b.push(C(h,a));case void 0:}}};T=a=>{var b=a.split(tb),c;a="$";for(c of b)a+=Ha(c);return a};Z=(a,b,c,e)=>{b=Array.isArray(b)?b[0]:VE(a,b);null==b&&(b="");"function"===typeof b&&(b=b(a._,a));if(b[""])switch(c){case "r":case "recurse":case "":case "none":if(!e)break;default:b=Y(b)}else- -b==b&&(b+="");e&&!b[""]&&za&&(b=za(e,b,a));switch(c){case "json":b=
JSON.stringify(b).replace(rb,"\\\\u003c");break;case "uric":b=b.replace(pb,Ta);break;default:b[""]||(b=Array.isArray(b)?b.join(", "):b,b=(e=Pa[c])?e(b):b.replace(qb,Va));case "":case "none":case "r":case "recurse":}switch(b.length){case 0:b="";break;case 1:1===b[""]&&(b=b[0])}if("r"===c)for(c="";b!==c&&b.includes("&");)c=b,b=VE(a,["("+Ja(b)+")"]);return b};O=(a,b,c)=>{b=Ia(a,b);for(a=b.length;a--;){let e=b[a];if(e[""])b[a]=O(e,0,c);else if("function"===typeof e){let f=[a,1];e(f,c);Array.prototype.splice.apply(b,
f)}}return b};OA=async(a,b,c)=>{b=Ia(a,b);for(a=b.length;a--;){let e=b[a];if(e[""])b[a]=await OA(e,0,c);else if("function"===typeof e){let f=[a,1];await e(f,c);Array.prototype.splice.apply(b,f)}}return b};K=(a,b,c)=>{c[""]?(1===c[""]?b.push.apply(b,O(c)):b.push(c),c=1):c||void 0!==c&&c?(b.push(c),c=1):c=0;return c};sizeof=a=>Number(a)===a?1:a?a.length||1!==a[""]||y.keys(a).length:0;desc=a=>- -a===a?-a:[a,1];abstract2dom=(a,b)=>qa.abstract2dom(a,b);abstract2txt=Y=(a,b)=>{for(;;){switch(a[""]){case void 0:if(!Array.isArray(a))return a;
case 1:switch(a.length){case 0:return"";case 1:a=a[0];continue}}break}var c,e=a[""];switch(e){case "!":return"\x3c!--"+a[0]+"--\x3e";case "<":return"<!"+a[0]+">";case "?":return"<?"+a[0]+"?>";case 1:e=c="";break;default:c="<"+e;for(var f of y.keys(a).splice(a.length))switch(f[0]){default:var h=a[f];null!=h&&(h[""]&&(h=h.join("")),c+=" "+f,f!==h&&(c+='="'+(h.replace?h.replace(sb,"&dquot;"):h)+'"'));case "_":case void 0:}if(!a.length)return c+(b&&"br"!==e?"></"+e+">":"/>");c+=">"}for(h=0;void 0!==(f=
a[h++]);)c+=f[""]?Y(f,b):f;e&&(c+="</"+e+">");return c};const qa={remixml2js:sa,js2obj:ra,compile:Ea,parse2txt:(a,b,c)=>{ma(a)&&(a=ra(sa(a,c)));return Y(a(b))},abstract2txt:Y,add_filter:(a,b)=>Pa[a]=b,set_proc_fmt:a=>za=a,set_tag:(a,b,c,e,f)=>(N(b),Za(a,b,c,e,f)),set_log_callback:a=>Qa=a,set_cache_options:(a,b,c,e)=>{Aa=a||Aa;ja=b||ja;Ba=c||Ba;Ca=e||Ca}};"function"==typeof define&&define.amd?define("remixml",[],qa):"object"==typeof exports?y.assign(exports,qa):ob.Remixml=qa}).call(this);
}).call(this);

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc