mirror of
https://github.com/exogen/t2-mapper.git
synced 2026-03-12 08:51:45 +00:00
17 lines
No EOL
106 KiB
JavaScript
17 lines
No EOL
106 KiB
JavaScript
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,92552,(e,t,r)=>{"use strict";let n,s;function i(e,t){return t.reduce((e,[t,r])=>({type:"BinaryExpression",operator:t,left:e,right:r}),e)}function o(e,t){return{type:"UnaryExpression",operator:e,argument:t}}class a extends SyntaxError{constructor(e,t,r,n){super(e),this.expected=t,this.found=r,this.location=n,this.name="SyntaxError"}format(e){let t="Error: "+this.message;if(this.location){let r=null,n=e.find(e=>e.source===this.location.source);n&&(r=n.text.split(/\r\n|\n|\r/g));let s=this.location.start,i=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(s):s,o=this.location.source+":"+i.line+":"+i.column;if(r){let e=this.location.end,n="".padEnd(i.line.toString().length," "),a=r[s.line-1],l=(s.line===e.line?e.column:a.length+1)-s.column||1;t+="\n --> "+o+"\n"+n+" |\n"+i.line+" | "+a+"\n"+n+" | "+"".padEnd(s.column-1," ")+"".padEnd(l,"^")}else t+="\n at "+o}return t}static buildMessage(e,t){function r(e){return e.codePointAt(0).toString(16).toUpperCase()}let n=Object.prototype.hasOwnProperty.call(RegExp.prototype,"unicode")?RegExp("[\\p{C}\\p{Mn}\\p{Mc}]","gu"):null;function s(e){return n?e.replace(n,e=>"\\u{"+r(e)+"}"):e}function i(e){return s(e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,e=>"\\x0"+r(e)).replace(/[\x10-\x1F\x7F-\x9F]/g,e=>"\\x"+r(e)))}function o(e){return s(e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,e=>"\\x0"+r(e)).replace(/[\x10-\x1F\x7F-\x9F]/g,e=>"\\x"+r(e)))}let a={literal:e=>'"'+i(e.text)+'"',class(e){let t=e.parts.map(e=>Array.isArray(e)?o(e[0])+"-"+o(e[1]):o(e));return"["+(e.inverted?"^":"")+t.join("")+"]"+(e.unicode?"u":"")},any:()=>"any character",end:()=>"end of input",other:e=>e.description};function l(e){return a[e.type](e)}return"Expected "+function(e){let t=e.map(l);if(t.sort(),t.length>0){let e=1;for(let r=1;r<t.length;r++)t[r-1]!==t[r]&&(t[e]=t[r],e++);t.length=e}switch(t.length){case 1:return t[0];case 2:return t[0]+" or "+t[1];default:return t.slice(0,-1).join(", ")+", or "+t[t.length-1]}}(e)+" but "+(t?'"'+i(t)+'"':"end of input")+" found."}}t.exports={StartRules:["Program"],SyntaxError:a,parse:function(e,t){let r,l={},u=(t=void 0!==t?t:{}).grammarSource,c={Program:tN},p=tN,f="package",h="function",d="datablock",g="else",m="while",b="switch$",$="switch",y="case",x="default",A="return",C="break",S="continue",v="parent",w="true",E="false",_=/^[<>]/,k=/^[+\-]/,R=/^[%*\/]/,L=/^[!\-~]/,N=/^[a-zA-Z_]/,O=/^[a-zA-Z0-9_]/,I=/^[ \t]/,j=/^[^"\\\n\r]/,T=/^[^'\\\n\r]/,M=/^[0-9a-fA-F]/,B=/^[0-9]/,P=/^[xX]/,H=/^[^\n\r]/,D=/^[\n\r]/,F=/^[ \t\n\r]/,G=tE(";",!1),U=tE("package",!1),q=tE("{",!1),J=tE("}",!1),K=tE("function",!1),W=tE("(",!1),z=tE(")",!1),V=tE("::",!1),Z=tE(",",!1),Q=tE("datablock",!1),X=tE(":",!1),Y=tE("new",!1),ee=tE("[",!1),et=tE("]",!1),er=tE("=",!1),en=tE(".",!1),es=tE("if",!1),ei=tE("else",!1),eo=tE("for",!1),ea=tE("while",!1),el=tE("do",!1),eu=tE("switch$",!1),ec=tE("switch",!1),ep=tE("case",!1),ef=tE("default",!1),eh=tE("or",!1),ed=tE("return",!1),eg=tE("break",!1),em=tE("continue",!1),eb=tE("+=",!1),e$=tE("-=",!1),ey=tE("*=",!1),ex=tE("/=",!1),eA=tE("%=",!1),eC=tE("<<=",!1),eS=tE(">>=",!1),ev=tE("&=",!1),ew=tE("|=",!1),eE=tE("^=",!1),e_=tE("?",!1),ek=tE("||",!1),eR=tE("&&",!1),eL=tE("|",!1),eN=tE("^",!1),eO=tE("&",!1),eI=tE("==",!1),ej=tE("!=",!1),eT=tE("<=",!1),eM=tE(">=",!1),eB=t_(["<",">"],!1,!1,!1),eP=tE("$=",!1),eH=tE("!$=",!1),eD=tE("@",!1),eF=tE("NL",!1),eG=tE("TAB",!1),eU=tE("SPC",!1),eq=tE("<<",!1),eJ=tE(">>",!1),eK=t_(["+","-"],!1,!1,!1),eW=t_(["%","*","/"],!1,!1,!1),ez=t_(["!","-","~"],!1,!1,!1),eV=tE("++",!1),eZ=tE("--",!1),eQ=tE("*",!1),eX=tE("%",!1),eY=t_([["a","z"],["A","Z"],"_"],!1,!1,!1),e0=t_([["a","z"],["A","Z"],["0","9"],"_"],!1,!1,!1),e1=tE("$",!1),e2=tE("parent",!1),e4=t_([" "," "],!1,!1,!1),e3=tE('"',!1),e9=tE("'",!1),e5=tE("\\",!1),e6=t_(['"',"\\","\n","\r"],!0,!1,!1),e8=t_(["'","\\","\n","\r"],!0,!1,!1),e7=tE("n",!1),te=tE("r",!1),tt=tE("t",!1),tr=tE("x",!1),tn=t_([["0","9"],["a","f"],["A","F"]],!1,!1,!1),ts=tE("cr",!1),ti=tE("cp",!1),to=tE("co",!1),ta=tE("c",!1),tl=t_([["0","9"]],!1,!1,!1),tu={type:"any"},tc=tE("0",!1),tp=t_(["x","X"],!1,!1,!1),tf=tE("-",!1),th=tE("true",!1),td=tE("false",!1),tg=tE("//",!1),tm=t_(["\n","\r"],!0,!1,!1),tb=t_(["\n","\r"],!1,!1,!1),t$=tE("/*",!1),ty=tE("*/",!1),tx=t_([" "," ","\n","\r"],!1,!1,!1),tA=0|t.peg$currPos,tC=[{line:1,column:1}],tS=tA,tv=t.peg$maxFailExpected||[],tw=0|t.peg$silentFails;if(t.startRule){if(!(t.startRule in c))throw Error("Can't start parsing from rule \""+t.startRule+'".');p=c[t.startRule]}function tE(e,t){return{type:"literal",text:e,ignoreCase:t}}function t_(e,t,r,n){return{type:"class",parts:e,inverted:t,ignoreCase:r,unicode:n}}function tk(t){let r,n=tC[t];if(n)return n;if(t>=tC.length)r=tC.length-1;else for(r=t;!tC[--r];);for(n={line:(n=tC[r]).line,column:n.column};r<t;)10===e.charCodeAt(r)?(n.line++,n.column=1):n.column++,r++;return tC[t]=n,n}function tR(e,t,r){let n=tk(e),s=tk(t),i={source:u,start:{offset:e,line:n.line,column:n.column},end:{offset:t,line:s.line,column:s.column}};return r&&u&&"function"==typeof u.offset&&(i.start=u.offset(i.start),i.end=u.offset(i.end)),i}function tL(e){tA<tS||(tA>tS&&(tS=tA,tv=[]),tv.push(e))}function tN(){let e,t,r;for(rp(),e=[],t=tA,(r=rl())===l&&(r=tO()),r!==l?t=r=[r,rp()]:(tA=t,t=l);t!==l;)e.push(t),t=tA,(r=rl())===l&&(r=tO()),r!==l?t=r=[r,rp()]:(tA=t,t=l);return{type:"Program",body:e.map(([e])=>e).filter(Boolean),execScriptPaths:Array.from(n),hasDynamicExec:s}}function tO(){let t,r,n,s,i,o,a,u,c,p,d,y,x,v,w,E,_;return(t=function(){let t,r,n,s,i,o,a,u;if(t=tA,e.substr(tA,7)===f?(r=f,tA+=7):(r=l,0===tw&&tL(U)),r!==l)if(rc()!==l)if((n=rn())!==l)if(ru(),123===e.charCodeAt(tA)?(s="{",tA++):(s=l,0===tw&&tL(q)),s!==l){for(rp(),i=[],o=tA,(a=rl())===l&&(a=tO()),a!==l?o=a=[a,u=rp()]:(tA=o,o=l);o!==l;)i.push(o),o=tA,(a=rl())===l&&(a=tO()),a!==l?o=a=[a,u=rp()]:(tA=o,o=l);(125===e.charCodeAt(tA)?(o="}",tA++):(o=l,0===tw&&tL(J)),o!==l)?(a=ru(),59===e.charCodeAt(tA)?(u=";",tA++):(u=l,0===tw&&tL(G)),u===l&&(u=null),t={type:"PackageDeclaration",name:n,body:i.map(([e])=>e).filter(Boolean)}):(tA=t,t=l)}else tA=t,t=l;else tA=t,t=l;else tA=t,t=l;else tA=t,t=l;return t}())===l&&(t=function(){let t,r,n,s,i,o,a;if(t=tA,e.substr(tA,8)===h?(r=h,tA+=8):(r=l,0===tw&&tL(K)),r!==l)if(rc()!==l)if((n=function(){let t,r,n,s;if(t=tA,(r=rn())!==l)if("::"===e.substr(tA,2)?(n="::",tA+=2):(n=l,0===tw&&tL(V)),n!==l)if((s=rn())!==l)t={type:"MethodName",namespace:r,method:s};else tA=t,t=l;else tA=t,t=l;else tA=t,t=l;return t===l&&(t=rn()),t}())!==l)if(ru(),40===e.charCodeAt(tA)?(s="(",tA++):(s=l,0===tw&&tL(W)),s!==l)if(ru(),(i=function(){let t,r,n,s,i,o,a,u;if(t=tA,(r=rn())!==l){for(n=[],s=tA,i=ru(),44===e.charCodeAt(tA)?(o=",",tA++):(o=l,0===tw&&tL(Z)),o!==l?(a=ru(),(u=rn())!==l?s=i=[i,o,a,u]:(tA=s,s=l)):(tA=s,s=l);s!==l;)n.push(s),s=tA,i=ru(),44===e.charCodeAt(tA)?(o=",",tA++):(o=l,0===tw&&tL(Z)),o!==l?(a=ru(),(u=rn())!==l?s=i=[i,o,a,u]:(tA=s,s=l)):(tA=s,s=l);t=[r,...n.map(([,,,e])=>e)]}else tA=t,t=l;return t}())===l&&(i=null),ru(),41===e.charCodeAt(tA)?(o=")",tA++):(o=l,0===tw&&tL(z)),o!==l)if(ru(),(a=tF())!==l)t={type:"FunctionDeclaration",name:n,params:i||[],body:a};else tA=t,t=l;else tA=t,t=l;else tA=t,t=l;else tA=t,t=l;else tA=t,t=l;else tA=t,t=l;return t}())===l&&((n=tA,(s=tI())!==l)?(ru(),59===e.charCodeAt(tA)?(i=";",tA++):(i=l,0===tw&&tL(G)),i===l&&(i=null),ru(),n=s):(tA=n,n=l),(t=n)===l&&((o=tA,(a=tj())!==l)?(ru(),59===e.charCodeAt(tA)?(u=";",tA++):(u=l,0===tw&&tL(G)),u===l&&(u=null),ru(),o=a):(tA=o,o=l),(t=o)===l&&(t=function(){let t,r,n,s,i,o,a,u,c,p,f;if(t=tA,"if"===e.substr(tA,2)?(r="if",tA+=2):(r=l,0===tw&&tL(es)),r!==l)if(ru(),40===e.charCodeAt(tA)?(n="(",tA++):(n=l,0===tw&&tL(W)),n!==l)if(ru(),(s=tG())!==l)if(ru(),41===e.charCodeAt(tA)?(i=")",tA++):(i=l,0===tw&&tL(z)),i!==l)if(ru(),(o=tO())!==l){var h;a=tA,u=ru(),e.substr(tA,4)===g?(c=g,tA+=4):(c=l,0===tw&&tL(ei)),c!==l?(p=ru(),(f=tO())!==l?a=u=[u,c,p,f]:(tA=a,a=l)):(tA=a,a=l),a===l&&(a=null),t={type:"IfStatement",test:s,consequent:o,alternate:(h=a)?h[3]:null}}else tA=t,t=l;else tA=t,t=l;else tA=t,t=l;else tA=t,t=l;else tA=t,t=l;return t}())===l&&(t=function(){let t,r,n,s,i,o,a,u,c,p;if(t=tA,"for"===e.substr(tA,3)?(r="for",tA+=3):(r=l,0===tw&&tL(eo)),r!==l)if(ru(),40===e.charCodeAt(tA)?(n="(",tA++):(n=l,0===tw&&tL(W)),n!==l)if(ru(),(s=tG())===l&&(s=null),ru(),59===e.charCodeAt(tA)?(i=";",tA++):(i=l,0===tw&&tL(G)),i!==l)if(ru(),(o=tG())===l&&(o=null),ru(),59===e.charCodeAt(tA)?(a=";",tA++):(a=l,0===tw&&tL(G)),a!==l)if(ru(),(u=tG())===l&&(u=null),ru(),41===e.charCodeAt(tA)?(c=")",tA++):(c=l,0===tw&&tL(z)),c!==l)if(ru(),(p=tO())!==l){var f,h;f=s,h=o,t={type:"ForStatement",init:f,test:h,update:u,body:p}}else tA=t,t=l;else tA=t,t=l;else tA=t,t=l;else tA=t,t=l;else tA=t,t=l;else tA=t,t=l;return t}())===l&&(t=function(){let t,r,n,s,i,o,a,u;if(t=tA,"do"===e.substr(tA,2)?(r="do",tA+=2):(r=l,0===tw&&tL(el)),r!==l)if(ru(),(n=tO())!==l)if(ru(),e.substr(tA,5)===m?(s=m,tA+=5):(s=l,0===tw&&tL(ea)),s!==l)if(ru(),40===e.charCodeAt(tA)?(i="(",tA++):(i=l,0===tw&&tL(W)),i!==l)if(ru(),(o=tG())!==l)if(ru(),41===e.charCodeAt(tA)?(a=")",tA++):(a=l,0===tw&&tL(z)),a!==l)ru(),59===e.charCodeAt(tA)?(u=";",tA++):(u=l,0===tw&&tL(G)),u===l&&(u=null),t={type:"DoWhileStatement",test:o,body:n};else tA=t,t=l;else tA=t,t=l;else tA=t,t=l;else tA=t,t=l;else tA=t,t=l;else tA=t,t=l;return t}())===l&&(t=function(){let t,r,n,s,i,o;if(t=tA,e.substr(tA,5)===m?(r=m,tA+=5):(r=l,0===tw&&tL(ea)),r!==l)if(ru(),40===e.charCodeAt(tA)?(n="(",tA++):(n=l,0===tw&&tL(W)),n!==l)if(ru(),(s=tG())!==l)if(ru(),41===e.charCodeAt(tA)?(i=")",tA++):(i=l,0===tw&&tL(z)),i!==l)if(ru(),(o=tO())!==l)t={type:"WhileStatement",test:s,body:o};else tA=t,t=l;else tA=t,t=l;else tA=t,t=l;else tA=t,t=l;else tA=t,t=l;return t}())===l&&(t=function(){let t,r,n,s,i,o,a,u,c,p;if(t=tA,e.substr(tA,7)===b?(r=b,tA+=7):(r=l,0===tw&&tL(eu)),r!==l)if(ru(),40===e.charCodeAt(tA)?(n="(",tA++):(n=l,0===tw&&tL(W)),n!==l)if(ru(),(s=tG())!==l)if(ru(),41===e.charCodeAt(tA)?(i=")",tA++):(i=l,0===tw&&tL(z)),i!==l)if(ru(),123===e.charCodeAt(tA)?(o="{",tA++):(o=l,0===tw&&tL(q)),o!==l){for(rp(),a=[],u=tA,(c=rl())===l&&(c=tD()),c!==l?u=c=[c,p=rp()]:(tA=u,u=l);u!==l;)a.push(u),u=tA,(c=rl())===l&&(c=tD()),c!==l?u=c=[c,p=rp()]:(tA=u,u=l);(125===e.charCodeAt(tA)?(u="}",tA++):(u=l,0===tw&&tL(J)),u!==l)?t={type:"SwitchStatement",stringMode:!0,discriminant:s,cases:a.map(([e])=>e).filter(e=>e&&"SwitchCase"===e.type)}:(tA=t,t=l)}else tA=t,t=l;else tA=t,t=l;else tA=t,t=l;else tA=t,t=l;else tA=t,t=l;if(t===l)if(t=tA,e.substr(tA,6)===$?(r=$,tA+=6):(r=l,0===tw&&tL(ec)),r!==l)if(ru(),40===e.charCodeAt(tA)?(n="(",tA++):(n=l,0===tw&&tL(W)),n!==l)if(ru(),(s=tG())!==l)if(ru(),41===e.charCodeAt(tA)?(i=")",tA++):(i=l,0===tw&&tL(z)),i!==l)if(ru(),123===e.charCodeAt(tA)?(o="{",tA++):(o=l,0===tw&&tL(q)),o!==l){for(rp(),a=[],u=tA,(c=rl())===l&&(c=tD()),c!==l?u=c=[c,p=rp()]:(tA=u,u=l);u!==l;)a.push(u),u=tA,(c=rl())===l&&(c=tD()),c!==l?u=c=[c,p=rp()]:(tA=u,u=l);(125===e.charCodeAt(tA)?(u="}",tA++):(u=l,0===tw&&tL(J)),u!==l)?t={type:"SwitchStatement",stringMode:!1,discriminant:s,cases:a.map(([e])=>e).filter(e=>e&&"SwitchCase"===e.type)}:(tA=t,t=l)}else tA=t,t=l;else tA=t,t=l;else tA=t,t=l;else tA=t,t=l;else tA=t,t=l;return t}())===l&&(t=function(){let t,r,n,s,i;if(t=tA,e.substr(tA,6)===A?(r=A,tA+=6):(r=l,0===tw&&tL(ed)),r!==l)if(n=tA,(s=rc())!==l&&(i=tG())!==l?n=s=[s,i]:(tA=n,n=l),n===l&&(n=null),s=ru(),59===e.charCodeAt(tA)?(i=";",tA++):(i=l,0===tw&&tL(G)),i!==l){var o;t={type:"ReturnStatement",value:(o=n)?o[1]:null}}else tA=t,t=l;else tA=t,t=l;return t}())===l&&(c=tA,e.substr(tA,5)===C?(p=C,tA+=5):(p=l,0===tw&&tL(eg)),p!==l?(ru(),59===e.charCodeAt(tA)?(d=";",tA++):(d=l,0===tw&&tL(G)),d!==l?c={type:"BreakStatement"}:(tA=c,c=l)):(tA=c,c=l),(t=c)===l&&(y=tA,e.substr(tA,8)===S?(x=S,tA+=8):(x=l,0===tw&&tL(em)),x!==l?(ru(),59===e.charCodeAt(tA)?(v=";",tA++):(v=l,0===tw&&tL(G)),v!==l?y={type:"ContinueStatement"}:(tA=y,y=l)):(tA=y,y=l),(t=y)===l&&((w=tA,(E=tG())!==l&&(ru(),59===e.charCodeAt(tA)?(_=";",tA++):(_=l,0===tw&&tL(G)),_!==l))?w={type:"ExpressionStatement",expression:E}:(tA=w,w=l),(t=w)===l&&(t=tF())===l&&(t=rl())===l)))))&&(t=tA,ru(),59===e.charCodeAt(tA)?(r=";",tA++):(r=l,0===tw&&tL(G)),r!==l?(ru(),t=null):(tA=t,t=l)),t}function tI(){let t,r,n,s,i,o,a,u,c,p,f,h,g,m;if(t=tA,e.substr(tA,9)===d?(r=d,tA+=9):(r=l,0===tw&&tL(Q)),r!==l)if(rc()!==l)if((n=rn())!==l)if(ru(),40===e.charCodeAt(tA)?(s="(",tA++):(s=l,0===tw&&tL(W)),s!==l)if(ru(),(i=tM())===l&&(i=null),ru(),41===e.charCodeAt(tA)?(o=")",tA++):(o=l,0===tw&&tL(z)),o!==l){var b,$,y;if(ru(),a=tA,58===e.charCodeAt(tA)?(u=":",tA++):(u=l,0===tw&&tL(X)),u!==l?(c=ru(),(p=rn())!==l?a=u=[u,c,p]:(tA=a,a=l)):(tA=a,a=l),a===l&&(a=null),u=ru(),c=tA,123===e.charCodeAt(tA)?(p="{",tA++):(p=l,0===tw&&tL(q)),p!==l){for(f=ru(),h=[],g=tT();g!==l;)h.push(g),g=tT();g=ru(),125===e.charCodeAt(tA)?(m="}",tA++):(m=l,0===tw&&tL(J)),m!==l?c=p=[p,f,h,g,m,ru()]:(tA=c,c=l)}else tA=c,c=l;c===l&&(c=null),b=i,$=a,y=c,t={type:"DatablockDeclaration",className:n,instanceName:b,parent:$?$[2]:null,body:y?y[2].filter(Boolean):[]}}else tA=t,t=l;else tA=t,t=l;else tA=t,t=l;else tA=t,t=l;else tA=t,t=l;return t}function tj(){let t,r,n,s,i,o,a,u,c,p,f,h;if(t=tA,"new"===e.substr(tA,3)?(r="new",tA+=3):(r=l,0===tw&&tL(Y)),r!==l)if(rc()!==l)if((n=function(){let t,r,n,s,i,o,a,u,c,p;if((t=tA,40===e.charCodeAt(tA)?(r="(",tA++):(r=l,0===tw&&tL(W)),r!==l&&(n=ru(),(s=tG())!==l&&(i=ru(),41===e.charCodeAt(tA)?(o=")",tA++):(o=l,0===tw&&tL(z)),o!==l)))?t=s:(tA=t,t=l),t===l)if(t=tA,(r=rn())!==l){var f;for(n=[],s=tA,i=ru(),91===e.charCodeAt(tA)?(o="[",tA++):(o=l,0===tw&&tL(ee)),o!==l?(a=ru(),(u=tH())!==l?(c=ru(),93===e.charCodeAt(tA)?(p="]",tA++):(p=l,0===tw&&tL(et)),p!==l?s=i=[i,o,a,u,c,p]:(tA=s,s=l)):(tA=s,s=l)):(tA=s,s=l);s!==l;)n.push(s),s=tA,i=ru(),91===e.charCodeAt(tA)?(o="[",tA++):(o=l,0===tw&&tL(ee)),o!==l?(a=ru(),(u=tH())!==l?(c=ru(),93===e.charCodeAt(tA)?(p="]",tA++):(p=l,0===tw&&tL(et)),p!==l?s=i=[i,o,a,u,c,p]:(tA=s,s=l)):(tA=s,s=l)):(tA=s,s=l);f=r,t=n.reduce((e,[,,,t])=>({type:"IndexExpression",object:e,index:t}),f)}else tA=t,t=l;return t}())!==l)if(ru(),40===e.charCodeAt(tA)?(s="(",tA++):(s=l,0===tw&&tL(W)),s!==l)if(ru(),(i=tM())===l&&(i=null),ru(),41===e.charCodeAt(tA)?(o=")",tA++):(o=l,0===tw&&tL(z)),o!==l){var d;if(ru(),a=tA,123===e.charCodeAt(tA)?(u="{",tA++):(u=l,0===tw&&tL(q)),u!==l){for(c=ru(),p=[],f=tT();f!==l;)p.push(f),f=tT();f=ru(),125===e.charCodeAt(tA)?(h="}",tA++):(h=l,0===tw&&tL(J)),h!==l?a=u=[u,c,p,f,h,ru()]:(tA=a,a=l)}else tA=a,a=l;a===l&&(a=null),t={type:"ObjectDeclaration",className:n,instanceName:i,body:(d=a)?d[2].filter(Boolean):[]}}else tA=t,t=l;else tA=t,t=l;else tA=t,t=l;else tA=t,t=l;else tA=t,t=l;return t}function tT(){let t,r,n;return(t=tA,(r=tj())!==l)?(ru(),59===e.charCodeAt(tA)?(n=";",tA++):(n=l,0===tw&&tL(G)),n===l&&(n=null),ru(),t=r):(tA=t,t=l),t===l&&((t=tA,(r=tI())!==l)?(ru(),59===e.charCodeAt(tA)?(n=";",tA++):(n=l,0===tw&&tL(G)),n===l&&(n=null),ru(),t=r):(tA=t,t=l),t===l&&(t=function(){let t,r,n,s,i;if(t=tA,ru(),(r=tB())!==l)if(ru(),61===e.charCodeAt(tA)?(n="=",tA++):(n=l,0===tw&&tL(er)),n!==l)if(ru(),(s=tG())!==l)ru(),59===e.charCodeAt(tA)?(i=";",tA++):(i=l,0===tw&&tL(G)),i===l&&(i=null),ru(),t={type:"Assignment",target:r,value:s};else tA=t,t=l;else tA=t,t=l;else tA=t,t=l;return t}())===l&&(t=rl())===l&&(t=function(){let t,r;if(t=[],r=e.charAt(tA),F.test(r)?tA++:(r=l,0===tw&&tL(tx)),r!==l)for(;r!==l;)t.push(r),r=e.charAt(tA),F.test(r)?tA++:(r=l,0===tw&&tL(tx));else t=l;return t!==l&&(t=null),t}())),t}function tM(){let e;return(e=tY())===l&&(e=rn())===l&&(e=ra()),e}function tB(){let e,t,r,n;if(e=tA,(t=t8())!==l){for(r=[],n=tP();n!==l;)r.push(n),n=tP();e=r.reduce((e,t)=>"property"===t.type?{type:"MemberExpression",object:e,property:t.value}:{type:"IndexExpression",object:e,index:t.value},t)}else tA=e,e=l;return e}function tP(){let t,r,n,s;return(t=tA,46===e.charCodeAt(tA)?(r=".",tA++):(r=l,0===tw&&tL(en)),r!==l&&(ru(),(n=rn())!==l))?t={type:"property",value:n}:(tA=t,t=l),t===l&&((t=tA,91===e.charCodeAt(tA)?(r="[",tA++):(r=l,0===tw&&tL(ee)),r!==l&&(ru(),(n=tH())!==l&&(ru(),93===e.charCodeAt(tA)?(s="]",tA++):(s=l,0===tw&&tL(et)),s!==l)))?t={type:"index",value:n}:(tA=t,t=l)),t}function tH(){let t,r,n,s,i,o,a,u;if(t=tA,(r=tG())!==l){for(n=[],s=tA,i=ru(),44===e.charCodeAt(tA)?(o=",",tA++):(o=l,0===tw&&tL(Z)),o!==l?(a=ru(),(u=tG())!==l?s=i=[i,o,a,u]:(tA=s,s=l)):(tA=s,s=l);s!==l;)n.push(s),s=tA,i=ru(),44===e.charCodeAt(tA)?(o=",",tA++):(o=l,0===tw&&tL(Z)),o!==l?(a=ru(),(u=tG())!==l?s=i=[i,o,a,u]:(tA=s,s=l)):(tA=s,s=l);t=n.length>0?[r,...n.map(([,,,e])=>e)]:r}else tA=t,t=l;return t}function tD(){let t,r,n,s,i,o,a,u,c;if(t=tA,e.substr(tA,4)===y?(r=y,tA+=4):(r=l,0===tw&&tL(ep)),r!==l)if(rc()!==l)if((n=function(){let t,r,n,s,i,o,a,u;if(t=tA,(r=t3())!==l){for(n=[],s=tA,i=ru(),"or"===e.substr(tA,2)?(o="or",tA+=2):(o=l,0===tw&&tL(eh)),o!==l&&(a=rc())!==l&&(u=t3())!==l?s=i=[i,o,a,u]:(tA=s,s=l);s!==l;)n.push(s),s=tA,i=ru(),"or"===e.substr(tA,2)?(o="or",tA+=2):(o=l,0===tw&&tL(eh)),o!==l&&(a=rc())!==l&&(u=t3())!==l?s=i=[i,o,a,u]:(tA=s,s=l);t=n.length>0?[r,...n.map(([,,,e])=>e)]:r}else tA=t,t=l;return t}())!==l)if(ru(),58===e.charCodeAt(tA)?(s=":",tA++):(s=l,0===tw&&tL(X)),s!==l){for(i=rp(),o=[],a=tA,(u=rl())===l&&(u=tO()),u!==l?a=u=[u,c=rp()]:(tA=a,a=l);a!==l;)o.push(a),a=tA,(u=rl())===l&&(u=tO()),u!==l?a=u=[u,c=rp()]:(tA=a,a=l);t={type:"SwitchCase",test:n,consequent:o.map(([e])=>e).filter(Boolean)}}else tA=t,t=l;else tA=t,t=l;else tA=t,t=l;else tA=t,t=l;if(t===l)if(t=tA,e.substr(tA,7)===x?(r=x,tA+=7):(r=l,0===tw&&tL(ef)),r!==l)if(ru(),58===e.charCodeAt(tA)?(n=":",tA++):(n=l,0===tw&&tL(X)),n!==l){for(rp(),s=[],i=tA,(o=rl())===l&&(o=tO()),o!==l?i=o=[o,a=rp()]:(tA=i,i=l);i!==l;)s.push(i),i=tA,(o=rl())===l&&(o=tO()),o!==l?i=o=[o,a=rp()]:(tA=i,i=l);t={type:"SwitchCase",test:null,consequent:s.map(([e])=>e).filter(Boolean)}}else tA=t,t=l;else tA=t,t=l;return t}function tF(){let t,r,n,s,i,o;if(t=tA,123===e.charCodeAt(tA)?(r="{",tA++):(r=l,0===tw&&tL(q)),r!==l){for(rp(),n=[],s=tA,(i=rl())===l&&(i=tO()),i!==l?s=i=[i,o=rp()]:(tA=s,s=l);s!==l;)n.push(s),s=tA,(i=rl())===l&&(i=tO()),i!==l?s=i=[i,o=rp()]:(tA=s,s=l);(125===e.charCodeAt(tA)?(s="}",tA++):(s=l,0===tw&&tL(J)),s!==l)?t={type:"BlockStatement",body:n.map(([e])=>e).filter(Boolean)}:(tA=t,t=l)}else tA=t,t=l;return t}function tG(){let t,r,n,s;if(t=tA,(r=tB())!==l)if(ru(),(n=tU())!==l)if(ru(),(s=tG())!==l)t={type:"AssignmentExpression",operator:n,target:r,value:s};else tA=t,t=l;else tA=t,t=l;else tA=t,t=l;return t===l&&(t=function(){let t,r,n,s,i,o;if(t=tA,(r=tq())!==l)if(ru(),63===e.charCodeAt(tA)?(n="?",tA++):(n=l,0===tw&&tL(e_)),n!==l)if(ru(),(s=tG())!==l)if(ru(),58===e.charCodeAt(tA)?(i=":",tA++):(i=l,0===tw&&tL(X)),i!==l)if(ru(),(o=tG())!==l)t={type:"ConditionalExpression",test:r,consequent:s,alternate:o};else tA=t,t=l;else tA=t,t=l;else tA=t,t=l;else tA=t,t=l;else tA=t,t=l;return t===l&&(t=tq()),t}()),t}function tU(){let t;return 61===e.charCodeAt(tA)?(t="=",tA++):(t=l,0===tw&&tL(er)),t===l&&("+="===e.substr(tA,2)?(t="+=",tA+=2):(t=l,0===tw&&tL(eb)),t===l&&("-="===e.substr(tA,2)?(t="-=",tA+=2):(t=l,0===tw&&tL(e$)),t===l&&("*="===e.substr(tA,2)?(t="*=",tA+=2):(t=l,0===tw&&tL(ey)),t===l&&("/="===e.substr(tA,2)?(t="/=",tA+=2):(t=l,0===tw&&tL(ex)),t===l&&("%="===e.substr(tA,2)?(t="%=",tA+=2):(t=l,0===tw&&tL(eA)),t===l&&("<<="===e.substr(tA,3)?(t="<<=",tA+=3):(t=l,0===tw&&tL(eC)),t===l&&(">>="===e.substr(tA,3)?(t=">>=",tA+=3):(t=l,0===tw&&tL(eS)),t===l&&("&="===e.substr(tA,2)?(t="&=",tA+=2):(t=l,0===tw&&tL(ev)),t===l&&("|="===e.substr(tA,2)?(t="|=",tA+=2):(t=l,0===tw&&tL(ew)),t===l&&("^="===e.substr(tA,2)?(t="^=",tA+=2):(t=l,0===tw&&tL(eE)))))))))))),t}function tq(){let t,r,n,s,o,a,u,c;if(t=tA,(r=tJ())!==l){for(n=[],s=tA,o=ru(),"||"===e.substr(tA,2)?(a="||",tA+=2):(a=l,0===tw&&tL(ek)),a!==l?(u=ru(),(c=tJ())!==l?s=o=[o,a,u,c]:(tA=s,s=l)):(tA=s,s=l);s!==l;)n.push(s),s=tA,o=ru(),"||"===e.substr(tA,2)?(a="||",tA+=2):(a=l,0===tw&&tL(ek)),a!==l?(u=ru(),(c=tJ())!==l?s=o=[o,a,u,c]:(tA=s,s=l)):(tA=s,s=l);t=i(r,n.map(([,e,,t])=>[e,t]))}else tA=t,t=l;return t}function tJ(){let t,r,n,s,o,a,u,c;if(t=tA,(r=tK())!==l){for(n=[],s=tA,o=ru(),"&&"===e.substr(tA,2)?(a="&&",tA+=2):(a=l,0===tw&&tL(eR)),a!==l?(u=ru(),(c=tK())!==l?s=o=[o,a,u,c]:(tA=s,s=l)):(tA=s,s=l);s!==l;)n.push(s),s=tA,o=ru(),"&&"===e.substr(tA,2)?(a="&&",tA+=2):(a=l,0===tw&&tL(eR)),a!==l?(u=ru(),(c=tK())!==l?s=o=[o,a,u,c]:(tA=s,s=l)):(tA=s,s=l);t=i(r,n.map(([,e,,t])=>[e,t]))}else tA=t,t=l;return t}function tK(){let t,r,n,s,o,a,u,c,p;if(t=tA,(r=tW())!==l){for(n=[],s=tA,o=ru(),124===e.charCodeAt(tA)?(a="|",tA++):(a=l,0===tw&&tL(eL)),a!==l?(u=tA,tw++,124===e.charCodeAt(tA)?(c="|",tA++):(c=l,0===tw&&tL(eL)),tw--,c===l?u=void 0:(tA=u,u=l),u!==l?(c=ru(),(p=tW())!==l?s=o=[o,a,u,c,p]:(tA=s,s=l)):(tA=s,s=l)):(tA=s,s=l);s!==l;)n.push(s),s=tA,o=ru(),124===e.charCodeAt(tA)?(a="|",tA++):(a=l,0===tw&&tL(eL)),a!==l?(u=tA,tw++,124===e.charCodeAt(tA)?(c="|",tA++):(c=l,0===tw&&tL(eL)),tw--,c===l?u=void 0:(tA=u,u=l),u!==l?(c=ru(),(p=tW())!==l?s=o=[o,a,u,c,p]:(tA=s,s=l)):(tA=s,s=l)):(tA=s,s=l);t=i(r,n.map(([,e,,,t])=>[e,t]))}else tA=t,t=l;return t}function tW(){let t,r,n,s,o,a,u,c;if(t=tA,(r=tz())!==l){for(n=[],s=tA,o=ru(),94===e.charCodeAt(tA)?(a="^",tA++):(a=l,0===tw&&tL(eN)),a!==l?(u=ru(),(c=tz())!==l?s=o=[o,a,u,c]:(tA=s,s=l)):(tA=s,s=l);s!==l;)n.push(s),s=tA,o=ru(),94===e.charCodeAt(tA)?(a="^",tA++):(a=l,0===tw&&tL(eN)),a!==l?(u=ru(),(c=tz())!==l?s=o=[o,a,u,c]:(tA=s,s=l)):(tA=s,s=l);t=i(r,n.map(([,e,,t])=>[e,t]))}else tA=t,t=l;return t}function tz(){let t,r,n,s,o,a,u,c,p;if(t=tA,(r=tV())!==l){for(n=[],s=tA,o=ru(),38===e.charCodeAt(tA)?(a="&",tA++):(a=l,0===tw&&tL(eO)),a!==l?(u=tA,tw++,38===e.charCodeAt(tA)?(c="&",tA++):(c=l,0===tw&&tL(eO)),tw--,c===l?u=void 0:(tA=u,u=l),u!==l?(c=ru(),(p=tV())!==l?s=o=[o,a,u,c,p]:(tA=s,s=l)):(tA=s,s=l)):(tA=s,s=l);s!==l;)n.push(s),s=tA,o=ru(),38===e.charCodeAt(tA)?(a="&",tA++):(a=l,0===tw&&tL(eO)),a!==l?(u=tA,tw++,38===e.charCodeAt(tA)?(c="&",tA++):(c=l,0===tw&&tL(eO)),tw--,c===l?u=void 0:(tA=u,u=l),u!==l?(c=ru(),(p=tV())!==l?s=o=[o,a,u,c,p]:(tA=s,s=l)):(tA=s,s=l)):(tA=s,s=l);t=i(r,n.map(([,e,,,t])=>[e,t]))}else tA=t,t=l;return t}function tV(){let e,t,r,n,s,o,a,u;if(e=tA,(t=tQ())!==l){for(r=[],n=tA,s=ru(),(o=tZ())!==l?(a=ru(),(u=tQ())!==l?n=s=[s,o,a,u]:(tA=n,n=l)):(tA=n,n=l);n!==l;)r.push(n),n=tA,s=ru(),(o=tZ())!==l?(a=ru(),(u=tQ())!==l?n=s=[s,o,a,u]:(tA=n,n=l)):(tA=n,n=l);e=i(t,r.map(([,e,,t])=>[e,t]))}else tA=e,e=l;return e}function tZ(){let t;return"=="===e.substr(tA,2)?(t="==",tA+=2):(t=l,0===tw&&tL(eI)),t===l&&("!="===e.substr(tA,2)?(t="!=",tA+=2):(t=l,0===tw&&tL(ej))),t}function tQ(){let e,t,r,n,s,o,a,u;if(e=tA,(t=tY())!==l){for(r=[],n=tA,s=ru(),(o=tX())!==l?(a=ru(),(u=tY())!==l?n=s=[s,o,a,u]:(tA=n,n=l)):(tA=n,n=l);n!==l;)r.push(n),n=tA,s=ru(),(o=tX())!==l?(a=ru(),(u=tY())!==l?n=s=[s,o,a,u]:(tA=n,n=l)):(tA=n,n=l);e=i(t,r.map(([,e,,t])=>[e,t]))}else tA=e,e=l;return e}function tX(){let t;return"<="===e.substr(tA,2)?(t="<=",tA+=2):(t=l,0===tw&&tL(eT)),t===l&&(">="===e.substr(tA,2)?(t=">=",tA+=2):(t=l,0===tw&&tL(eM)),t===l&&(t=e.charAt(tA),_.test(t)?tA++:(t=l,0===tw&&tL(eB)))),t}function tY(){let e,t,r,n,s,o,a,u;if(e=tA,(t=t2())!==l){for(r=[],n=tA,s=ru(),(o=t1())!==l?(a=ru(),(u=t0())!==l?n=s=[s,o,a,u]:(tA=n,n=l)):(tA=n,n=l);n!==l;)r.push(n),n=tA,s=ru(),(o=t1())!==l?(a=ru(),(u=t0())!==l?n=s=[s,o,a,u]:(tA=n,n=l)):(tA=n,n=l);e=i(t,r.map(([,e,,t])=>[e,t]))}else tA=e,e=l;return e}function t0(){let e,t,r,n;if(e=tA,(t=tB())!==l)if(ru(),(r=tU())!==l)if(ru(),(n=tG())!==l)e={type:"AssignmentExpression",operator:r,target:t,value:n};else tA=e,e=l;else tA=e,e=l;else tA=e,e=l;return e===l&&(e=t2()),e}function t1(){let t;return"$="===e.substr(tA,2)?(t="$=",tA+=2):(t=l,0===tw&&tL(eP)),t===l&&("!$="===e.substr(tA,3)?(t="!$=",tA+=3):(t=l,0===tw&&tL(eH)),t===l&&(64===e.charCodeAt(tA)?(t="@",tA++):(t=l,0===tw&&tL(eD)),t===l&&("NL"===e.substr(tA,2)?(t="NL",tA+=2):(t=l,0===tw&&tL(eF)),t===l&&("TAB"===e.substr(tA,3)?(t="TAB",tA+=3):(t=l,0===tw&&tL(eG)),t===l&&("SPC"===e.substr(tA,3)?(t="SPC",tA+=3):(t=l,0===tw&&tL(eU))))))),t}function t2(){let e,t,r,n,s,o,a,u;if(e=tA,(t=t3())!==l){for(r=[],n=tA,s=ru(),(o=t4())!==l?(a=ru(),(u=t3())!==l?n=s=[s,o,a,u]:(tA=n,n=l)):(tA=n,n=l);n!==l;)r.push(n),n=tA,s=ru(),(o=t4())!==l?(a=ru(),(u=t3())!==l?n=s=[s,o,a,u]:(tA=n,n=l)):(tA=n,n=l);e=i(t,r.map(([,e,,t])=>[e,t]))}else tA=e,e=l;return e}function t4(){let t;return"<<"===e.substr(tA,2)?(t="<<",tA+=2):(t=l,0===tw&&tL(eq)),t===l&&(">>"===e.substr(tA,2)?(t=">>",tA+=2):(t=l,0===tw&&tL(eJ))),t}function t3(){let t,r,n,s,o,a,u,c;if(t=tA,(r=t9())!==l){for(n=[],s=tA,o=ru(),a=e.charAt(tA),k.test(a)?tA++:(a=l,0===tw&&tL(eK)),a!==l?(u=ru(),(c=t9())!==l?s=o=[o,a,u,c]:(tA=s,s=l)):(tA=s,s=l);s!==l;)n.push(s),s=tA,o=ru(),a=e.charAt(tA),k.test(a)?tA++:(a=l,0===tw&&tL(eK)),a!==l?(u=ru(),(c=t9())!==l?s=o=[o,a,u,c]:(tA=s,s=l)):(tA=s,s=l);t=i(r,n.map(([,e,,t])=>[e,t]))}else tA=t,t=l;return t}function t9(){let t,r,n,s,o,a,u,c;if(t=tA,(r=t5())!==l){for(n=[],s=tA,o=ru(),a=e.charAt(tA),R.test(a)?tA++:(a=l,0===tw&&tL(eW)),a!==l?(u=ru(),(c=t5())!==l?s=o=[o,a,u,c]:(tA=s,s=l)):(tA=s,s=l);s!==l;)n.push(s),s=tA,o=ru(),a=e.charAt(tA),R.test(a)?tA++:(a=l,0===tw&&tL(eW)),a!==l?(u=ru(),(c=t5())!==l?s=o=[o,a,u,c]:(tA=s,s=l)):(tA=s,s=l);t=i(r,n.map(([,e,,t])=>[e,t]))}else tA=t,t=l;return t}function t5(){let t,r,n;return(t=tA,r=e.charAt(tA),L.test(r)?tA++:(r=l,0===tw&&tL(ez)),r!==l&&(ru(),(n=t6())!==l))?t=o(r,n):(tA=t,t=l),t===l&&((t=tA,"++"===e.substr(tA,2)?(r="++",tA+=2):(r=l,0===tw&&tL(eV)),r===l&&("--"===e.substr(tA,2)?(r="--",tA+=2):(r=l,0===tw&&tL(eZ))),r!==l&&(ru(),(n=t6())!==l))?t=o(r,n):(tA=t,t=l),t===l&&((t=tA,42===e.charCodeAt(tA)?(r="*",tA++):(r=l,0===tw&&tL(eQ)),r!==l&&(ru(),(n=t6())!==l))?t={type:"TagDereferenceExpression",argument:n}:(tA=t,t=l),t===l&&(t=function(){let t,r,n;if(t=tA,(r=t8())!==l)if(ru(),"++"===e.substr(tA,2)?(n="++",tA+=2):(n=l,0===tw&&tL(eV)),n===l&&("--"===e.substr(tA,2)?(n="--",tA+=2):(n=l,0===tw&&tL(eZ))),n!==l)t={type:"PostfixExpression",operator:n,argument:r};else tA=t,t=l;else tA=t,t=l;return t===l&&(t=t8()),t}()))),t}function t6(){let e,t,r,n;if(e=tA,(t=tB())!==l)if(ru(),(r=tU())!==l)if(ru(),(n=tG())!==l)e={type:"AssignmentExpression",operator:r,target:t,value:n};else tA=e,e=l;else tA=e,e=l;else tA=e,e=l;return e===l&&(e=t5()),e}function t8(){let t,r,i,o,a,u,c,p,f,h;if(t=tA,(r=function(){let t,r,n,s,i,o,a,u,c,p,f,h,d,g,m,b;if(t=tA,(a=tj())===l&&(a=tI())===l&&(a=function(){let t,r,n,s;if(t=tA,34===e.charCodeAt(tA)?(r='"',tA++):(r=l,0===tw&&tL(e3)),r!==l){for(n=[],s=rs();s!==l;)n.push(s),s=rs();(34===e.charCodeAt(tA)?(s='"',tA++):(s=l,0===tw&&tL(e3)),s!==l)?t={type:"StringLiteral",value:n.join("")}:(tA=t,t=l)}else tA=t,t=l;if(t===l)if(t=tA,39===e.charCodeAt(tA)?(r="'",tA++):(r=l,0===tw&&tL(e9)),r!==l){for(n=[],s=ri();s!==l;)n.push(s),s=ri();(39===e.charCodeAt(tA)?(s="'",tA++):(s=l,0===tw&&tL(e9)),s!==l)?t={type:"StringLiteral",value:n.join(""),tagged:!0}:(tA=t,t=l)}else tA=t,t=l;return t}())===l&&(a=ra())===l&&((u=tA,e.substr(tA,4)===w?(c=w,tA+=4):(c=l,0===tw&&tL(th)),c===l&&(e.substr(tA,5)===E?(c=E,tA+=5):(c=l,0===tw&&tL(td))),c!==l&&(p=tA,tw++,f=rh(),tw--,f===l?p=void 0:(tA=p,p=l),p!==l))?u={type:"BooleanLiteral",value:"true"===c}:(tA=u,u=l),(a=u)===l&&((h=re())===l&&(h=rt())===l&&(h=rr()),(a=h)===l))&&((d=tA,40===e.charCodeAt(tA)?(g="(",tA++):(g=l,0===tw&&tL(W)),g!==l&&(ru(),(m=tG())!==l&&(ru(),41===e.charCodeAt(tA)?(b=")",tA++):(b=l,0===tw&&tL(z)),b!==l)))?d=m:(tA=d,d=l),a=d),(r=a)!==l){for(n=[],s=tA,i=ru(),(o=tP())!==l?s=i=[i,o]:(tA=s,s=l);s!==l;)n.push(s),s=tA,i=ru(),(o=tP())!==l?s=i=[i,o]:(tA=s,s=l);t=n.reduce((e,[,t])=>"property"===t.type?{type:"MemberExpression",object:e,property:t.value}:{type:"IndexExpression",object:e,index:t.value},r)}else tA=t,t=l;return t}())!==l){for(i=[],o=tA,a=ru(),40===e.charCodeAt(tA)?(u="(",tA++):(u=l,0===tw&&tL(W)),u!==l?(c=ru(),(p=t7())===l&&(p=null),f=ru(),41===e.charCodeAt(tA)?(h=")",tA++):(h=l,0===tw&&tL(z)),h!==l?o=a=[a,u,c,p,f,h]:(tA=o,o=l)):(tA=o,o=l),o===l&&(o=tA,a=ru(),(u=tP())!==l?o=a=[a,u]:(tA=o,o=l));o!==l;)i.push(o),o=tA,a=ru(),40===e.charCodeAt(tA)?(u="(",tA++):(u=l,0===tw&&tL(W)),u!==l?(c=ru(),(p=t7())===l&&(p=null),f=ru(),41===e.charCodeAt(tA)?(h=")",tA++):(h=l,0===tw&&tL(z)),h!==l?o=a=[a,u,c,p,f,h]:(tA=o,o=l)):(tA=o,o=l),o===l&&(o=tA,a=ru(),(u=tP())!==l?o=a=[a,u]:(tA=o,o=l));t=i.reduce((e,t)=>{if("("===t[1]){var r;let[,,,i]=t;return r=i||[],"Identifier"===e.type&&"exec"===e.name.toLowerCase()&&(r.length>0&&"StringLiteral"===r[0].type?n.add(r[0].value):s=!0),{type:"CallExpression",callee:e,arguments:r}}let i=t[1];return"property"===i.type?{type:"MemberExpression",object:e,property:i.value}:{type:"IndexExpression",object:e,index:i.value}},r)}else tA=t,t=l;return t}function t7(){let t,r,n,s,i,o,a,u;if(t=tA,(r=tG())!==l){for(n=[],s=tA,i=ru(),44===e.charCodeAt(tA)?(o=",",tA++):(o=l,0===tw&&tL(Z)),o!==l?(a=ru(),(u=tG())!==l?s=i=[i,o,a,u]:(tA=s,s=l)):(tA=s,s=l);s!==l;)n.push(s),s=tA,i=ru(),44===e.charCodeAt(tA)?(o=",",tA++):(o=l,0===tw&&tL(Z)),o!==l?(a=ru(),(u=tG())!==l?s=i=[i,o,a,u]:(tA=s,s=l)):(tA=s,s=l);t=[r,...n.map(([,,,e])=>e)]}else tA=t,t=l;return t}function re(){let t,r,n,s,i,o,a;if(t=tA,37===e.charCodeAt(tA)?(r="%",tA++):(r=l,0===tw&&tL(eX)),r!==l){if(n=tA,s=tA,i=e.charAt(tA),N.test(i)?tA++:(i=l,0===tw&&tL(eY)),i!==l){for(o=[],a=e.charAt(tA),O.test(a)?tA++:(a=l,0===tw&&tL(e0));a!==l;)o.push(a),a=e.charAt(tA),O.test(a)?tA++:(a=l,0===tw&&tL(e0));s=i=[i,o]}else tA=s,s=l;(n=s!==l?e.substring(n,tA):s)!==l?t={type:"Variable",scope:"local",name:n}:(tA=t,t=l)}else tA=t,t=l;return t}function rt(){let t,r,n,s,i,o,a,u,c,p,f,h,d;if(t=tA,36===e.charCodeAt(tA)?(r="$",tA++):(r=l,0===tw&&tL(e1)),r!==l){if(n=tA,s=tA,"::"===e.substr(tA,2)?(i="::",tA+=2):(i=l,0===tw&&tL(V)),i===l&&(i=null),o=e.charAt(tA),N.test(o)?tA++:(o=l,0===tw&&tL(eY)),o!==l){for(a=[],u=e.charAt(tA),O.test(u)?tA++:(u=l,0===tw&&tL(e0));u!==l;)a.push(u),u=e.charAt(tA),O.test(u)?tA++:(u=l,0===tw&&tL(e0));if(u=[],c=tA,"::"===e.substr(tA,2)?(p="::",tA+=2):(p=l,0===tw&&tL(V)),p!==l)if(f=e.charAt(tA),N.test(f)?tA++:(f=l,0===tw&&tL(eY)),f!==l){for(h=[],d=e.charAt(tA),O.test(d)?tA++:(d=l,0===tw&&tL(e0));d!==l;)h.push(d),d=e.charAt(tA),O.test(d)?tA++:(d=l,0===tw&&tL(e0));c=p=[p,f,h]}else tA=c,c=l;else tA=c,c=l;for(;c!==l;)if(u.push(c),c=tA,"::"===e.substr(tA,2)?(p="::",tA+=2):(p=l,0===tw&&tL(V)),p!==l)if(f=e.charAt(tA),N.test(f)?tA++:(f=l,0===tw&&tL(eY)),f!==l){for(h=[],d=e.charAt(tA),O.test(d)?tA++:(d=l,0===tw&&tL(e0));d!==l;)h.push(d),d=e.charAt(tA),O.test(d)?tA++:(d=l,0===tw&&tL(e0));c=p=[p,f,h]}else tA=c,c=l;else tA=c,c=l;s=i=[i,o,a,u]}else tA=s,s=l;(n=s!==l?e.substring(n,tA):s)!==l?t={type:"Variable",scope:"global",name:n}:(tA=t,t=l)}else tA=t,t=l;return t}function rr(){let t,r,n,s,i,o,a,u,c,p,f;if(t=tA,r=tA,n=tA,e.substr(tA,6)===v?(s=v,tA+=6):(s=l,0===tw&&tL(e2)),s!==l){for(i=[],o=e.charAt(tA),I.test(o)?tA++:(o=l,0===tw&&tL(e4));o!==l;)i.push(o),o=e.charAt(tA),I.test(o)?tA++:(o=l,0===tw&&tL(e4));if("::"===e.substr(tA,2)?(o="::",tA+=2):(o=l,0===tw&&tL(V)),o!==l){for(a=[],u=e.charAt(tA),I.test(u)?tA++:(u=l,0===tw&&tL(e4));u!==l;)a.push(u),u=e.charAt(tA),I.test(u)?tA++:(u=l,0===tw&&tL(e4));if(u=e.charAt(tA),N.test(u)?tA++:(u=l,0===tw&&tL(eY)),u!==l){for(c=[],p=e.charAt(tA),O.test(p)?tA++:(p=l,0===tw&&tL(e0));p!==l;)c.push(p),p=e.charAt(tA),O.test(p)?tA++:(p=l,0===tw&&tL(e0));n=s=[s,i,o,a,u,c]}else tA=n,n=l}else tA=n,n=l}else tA=n,n=l;if((r=n!==l?e.substring(r,tA):n)!==l&&(r={type:"Identifier",name:r.replace(/\s+/g,"")}),(t=r)===l){if(t=tA,r=tA,n=tA,e.substr(tA,6)===v?(s=v,tA+=6):(s=l,0===tw&&tL(e2)),s!==l){if(i=[],o=tA,"::"===e.substr(tA,2)?(a="::",tA+=2):(a=l,0===tw&&tL(V)),a!==l)if(u=e.charAt(tA),N.test(u)?tA++:(u=l,0===tw&&tL(eY)),u!==l){for(c=[],p=e.charAt(tA),O.test(p)?tA++:(p=l,0===tw&&tL(e0));p!==l;)c.push(p),p=e.charAt(tA),O.test(p)?tA++:(p=l,0===tw&&tL(e0));o=a=[a,u,c]}else tA=o,o=l;else tA=o,o=l;if(o!==l)for(;o!==l;)if(i.push(o),o=tA,"::"===e.substr(tA,2)?(a="::",tA+=2):(a=l,0===tw&&tL(V)),a!==l)if(u=e.charAt(tA),N.test(u)?tA++:(u=l,0===tw&&tL(eY)),u!==l){for(c=[],p=e.charAt(tA),O.test(p)?tA++:(p=l,0===tw&&tL(e0));p!==l;)c.push(p),p=e.charAt(tA),O.test(p)?tA++:(p=l,0===tw&&tL(e0));o=a=[a,u,c]}else tA=o,o=l;else tA=o,o=l;else i=l;i!==l?n=s=[s,i]:(tA=n,n=l)}else tA=n,n=l;if((r=n!==l?e.substring(r,tA):n)!==l&&(r={type:"Identifier",name:r}),(t=r)===l){if(t=tA,r=tA,n=tA,s=e.charAt(tA),N.test(s)?tA++:(s=l,0===tw&&tL(eY)),s!==l){for(i=[],o=e.charAt(tA),O.test(o)?tA++:(o=l,0===tw&&tL(e0));o!==l;)i.push(o),o=e.charAt(tA),O.test(o)?tA++:(o=l,0===tw&&tL(e0));if(o=[],a=tA,"::"===e.substr(tA,2)?(u="::",tA+=2):(u=l,0===tw&&tL(V)),u!==l)if(c=e.charAt(tA),N.test(c)?tA++:(c=l,0===tw&&tL(eY)),c!==l){for(p=[],f=e.charAt(tA),O.test(f)?tA++:(f=l,0===tw&&tL(e0));f!==l;)p.push(f),f=e.charAt(tA),O.test(f)?tA++:(f=l,0===tw&&tL(e0));a=u=[u,c,p]}else tA=a,a=l;else tA=a,a=l;for(;a!==l;)if(o.push(a),a=tA,"::"===e.substr(tA,2)?(u="::",tA+=2):(u=l,0===tw&&tL(V)),u!==l)if(c=e.charAt(tA),N.test(c)?tA++:(c=l,0===tw&&tL(eY)),c!==l){for(p=[],f=e.charAt(tA),O.test(f)?tA++:(f=l,0===tw&&tL(e0));f!==l;)p.push(f),f=e.charAt(tA),O.test(f)?tA++:(f=l,0===tw&&tL(e0));a=u=[u,c,p]}else tA=a,a=l;else tA=a,a=l;n=s=[s,i,o]}else tA=n,n=l;(r=n!==l?e.substring(r,tA):n)!==l&&(r={type:"Identifier",name:r}),t=r}}return t}function rn(){let e;return(e=re())===l&&(e=rt())===l&&(e=rr()),e}function rs(){let t,r,n;return(t=tA,92===e.charCodeAt(tA)?(r="\\",tA++):(r=l,0===tw&&tL(e5)),r!==l&&(n=ro())!==l)?t=n:(tA=t,t=l),t===l&&(t=e.charAt(tA),j.test(t)?tA++:(t=l,0===tw&&tL(e6))),t}function ri(){let t,r,n;return(t=tA,92===e.charCodeAt(tA)?(r="\\",tA++):(r=l,0===tw&&tL(e5)),r!==l&&(n=ro())!==l)?t=n:(tA=t,t=l),t===l&&(t=e.charAt(tA),T.test(t)?tA++:(t=l,0===tw&&tL(e8))),t}function ro(){let t,r,n,s,i,o;return t=tA,110===e.charCodeAt(tA)?(r="n",tA++):(r=l,0===tw&&tL(e7)),r!==l&&(r="\n"),(t=r)===l&&(t=tA,114===e.charCodeAt(tA)?(r="r",tA++):(r=l,0===tw&&tL(te)),r!==l&&(r="\r"),(t=r)===l)&&(t=tA,116===e.charCodeAt(tA)?(r="t",tA++):(r=l,0===tw&&tL(tt)),r!==l&&(r=" "),(t=r)===l)&&((t=tA,120===e.charCodeAt(tA)?(r="x",tA++):(r=l,0===tw&&tL(tr)),r!==l&&(n=tA,s=tA,i=e.charAt(tA),M.test(i)?tA++:(i=l,0===tw&&tL(tn)),i!==l?(o=e.charAt(tA),M.test(o)?tA++:(o=l,0===tw&&tL(tn)),o!==l?s=i=[i,o]:(tA=s,s=l)):(tA=s,s=l),(n=s!==l?e.substring(n,tA):s)!==l))?t=String.fromCharCode(parseInt(n,16)):(tA=t,t=l),t===l&&(t=tA,"cr"===e.substr(tA,2)?(r="cr",tA+=2):(r=l,0===tw&&tL(ts)),r!==l&&(r="\x0f"),(t=r)===l&&(t=tA,"cp"===e.substr(tA,2)?(r="cp",tA+=2):(r=l,0===tw&&tL(ti)),r!==l&&(r="\x10"),(t=r)===l))&&(t=tA,"co"===e.substr(tA,2)?(r="co",tA+=2):(r=l,0===tw&&tL(to)),r!==l&&(r="\x11"),(t=r)===l)&&((t=tA,99===e.charCodeAt(tA)?(r="c",tA++):(r=l,0===tw&&tL(ta)),r!==l&&(n=e.charAt(tA),B.test(n)?tA++:(n=l,0===tw&&tL(tl)),n!==l))?t=String.fromCharCode([2,3,4,5,6,7,8,11,12,14][parseInt(n,10)]):(tA=t,t=l),t===l&&(t=tA,e.length>tA?(r=e.charAt(tA),tA++):(r=l,0===tw&&tL(tu)),t=r))),t}function ra(){let t,r,n,s,i,o,a,u,c;if(t=tA,r=tA,n=tA,48===e.charCodeAt(tA)?(s="0",tA++):(s=l,0===tw&&tL(tc)),s!==l)if(i=e.charAt(tA),P.test(i)?tA++:(i=l,0===tw&&tL(tp)),i!==l){if(o=[],a=e.charAt(tA),M.test(a)?tA++:(a=l,0===tw&&tL(tn)),a!==l)for(;a!==l;)o.push(a),a=e.charAt(tA),M.test(a)?tA++:(a=l,0===tw&&tL(tn));else o=l;o!==l?n=s=[s,i,o]:(tA=n,n=l)}else tA=n,n=l;else tA=n,n=l;if((r=n!==l?e.substring(r,tA):n)!==l&&(n=tA,tw++,s=rh(),tw--,s===l?n=void 0:(tA=n,n=l),n!==l)?t={type:"NumberLiteral",value:parseInt(r,16)}:(tA=t,t=l),t===l){if(t=tA,r=tA,n=tA,45===e.charCodeAt(tA)?(s="-",tA++):(s=l,0===tw&&tL(tf)),s===l&&(s=null),i=[],o=e.charAt(tA),B.test(o)?tA++:(o=l,0===tw&&tL(tl)),o!==l)for(;o!==l;)i.push(o),o=e.charAt(tA),B.test(o)?tA++:(o=l,0===tw&&tL(tl));else i=l;if(i!==l){if(o=tA,46===e.charCodeAt(tA)?(a=".",tA++):(a=l,0===tw&&tL(en)),a!==l){if(u=[],c=e.charAt(tA),B.test(c)?tA++:(c=l,0===tw&&tL(tl)),c!==l)for(;c!==l;)u.push(c),c=e.charAt(tA),B.test(c)?tA++:(c=l,0===tw&&tL(tl));else u=l;u!==l?o=a=[a,u]:(tA=o,o=l)}else tA=o,o=l;o===l&&(o=null),n=s=[s,i,o]}else tA=n,n=l;if(n===l)if(n=tA,45===e.charCodeAt(tA)?(s="-",tA++):(s=l,0===tw&&tL(tf)),s===l&&(s=null),46===e.charCodeAt(tA)?(i=".",tA++):(i=l,0===tw&&tL(en)),i!==l){if(o=[],a=e.charAt(tA),B.test(a)?tA++:(a=l,0===tw&&tL(tl)),a!==l)for(;a!==l;)o.push(a),a=e.charAt(tA),B.test(a)?tA++:(a=l,0===tw&&tL(tl));else o=l;o!==l?n=s=[s,i,o]:(tA=n,n=l)}else tA=n,n=l;(r=n!==l?e.substring(r,tA):n)!==l&&(n=tA,tw++,s=rh(),tw--,s===l?n=void 0:(tA=n,n=l),n!==l)?t={type:"NumberLiteral",value:parseFloat(r)}:(tA=t,t=l)}return t}function rl(){let t;return(t=function(){let t,r,n,s,i;if(t=tA,"//"===e.substr(tA,2)?(r="//",tA+=2):(r=l,0===tw&&tL(tg)),r!==l){for(n=tA,s=[],i=e.charAt(tA),H.test(i)?tA++:(i=l,0===tw&&tL(tm));i!==l;)s.push(i),i=e.charAt(tA),H.test(i)?tA++:(i=l,0===tw&&tL(tm));n=e.substring(n,tA),s=e.charAt(tA),D.test(s)?tA++:(s=l,0===tw&&tL(tb)),s===l&&(s=null),t={type:"Comment",value:n}}else tA=t,t=l;return t}())===l&&(t=function(){let t,r,n,s,i,o,a;if(t=tA,"/*"===e.substr(tA,2)?(r="/*",tA+=2):(r=l,0===tw&&tL(t$)),r!==l){for(n=tA,s=[],i=tA,o=tA,tw++,"*/"===e.substr(tA,2)?(a="*/",tA+=2):(a=l,0===tw&&tL(ty)),tw--,a===l?o=void 0:(tA=o,o=l),o!==l?(e.length>tA?(a=e.charAt(tA),tA++):(a=l,0===tw&&tL(tu)),a!==l?i=o=[o,a]:(tA=i,i=l)):(tA=i,i=l);i!==l;)s.push(i),i=tA,o=tA,tw++,"*/"===e.substr(tA,2)?(a="*/",tA+=2):(a=l,0===tw&&tL(ty)),tw--,a===l?o=void 0:(tA=o,o=l),o!==l?(e.length>tA?(a=e.charAt(tA),tA++):(a=l,0===tw&&tL(tu)),a!==l?i=o=[o,a]:(tA=i,i=l)):(tA=i,i=l);(n=e.substring(n,tA),"*/"===e.substr(tA,2)?(s="*/",tA+=2):(s=l,0===tw&&tL(ty)),s!==l)?t={type:"Comment",value:n}:(tA=t,t=l)}else tA=t,t=l;return t}()),t}function ru(){let t,r;for(t=[],r=e.charAt(tA),F.test(r)?tA++:(r=l,0===tw&&tL(tx)),r===l&&(r=rf());r!==l;)t.push(r),r=e.charAt(tA),F.test(r)?tA++:(r=l,0===tw&&tL(tx)),r===l&&(r=rf());return t}function rc(){let t,r,n,s;if(t=tA,r=[],n=e.charAt(tA),F.test(n)?tA++:(n=l,0===tw&&tL(tx)),n!==l)for(;n!==l;)r.push(n),n=e.charAt(tA),F.test(n)?tA++:(n=l,0===tw&&tL(tx));else r=l;if(r!==l){for(n=[],s=e.charAt(tA),F.test(s)?tA++:(s=l,0===tw&&tL(tx)),s===l&&(s=rf());s!==l;)n.push(s),s=e.charAt(tA),F.test(s)?tA++:(s=l,0===tw&&tL(tx)),s===l&&(s=rf());t=r=[r,n]}else tA=t,t=l;return t}function rp(){let t,r;for(t=[],r=e.charAt(tA),F.test(r)?tA++:(r=l,0===tw&&tL(tx));r!==l;)t.push(r),r=e.charAt(tA),F.test(r)?tA++:(r=l,0===tw&&tL(tx));return t}function rf(){let t,r,n,s,i,o;if(t=tA,"//"===e.substr(tA,2)?(r="//",tA+=2):(r=l,0===tw&&tL(tg)),r!==l){for(n=[],s=e.charAt(tA),H.test(s)?tA++:(s=l,0===tw&&tL(tm));s!==l;)n.push(s),s=e.charAt(tA),H.test(s)?tA++:(s=l,0===tw&&tL(tm));s=e.charAt(tA),D.test(s)?tA++:(s=l,0===tw&&tL(tb)),s===l&&(s=null),t=r=[r,n,s]}else tA=t,t=l;if(t===l)if(t=tA,"/*"===e.substr(tA,2)?(r="/*",tA+=2):(r=l,0===tw&&tL(t$)),r!==l){for(n=[],s=tA,i=tA,tw++,"*/"===e.substr(tA,2)?(o="*/",tA+=2):(o=l,0===tw&&tL(ty)),tw--,o===l?i=void 0:(tA=i,i=l),i!==l?(e.length>tA?(o=e.charAt(tA),tA++):(o=l,0===tw&&tL(tu)),o!==l?s=i=[i,o]:(tA=s,s=l)):(tA=s,s=l);s!==l;)n.push(s),s=tA,i=tA,tw++,"*/"===e.substr(tA,2)?(o="*/",tA+=2):(o=l,0===tw&&tL(ty)),tw--,o===l?i=void 0:(tA=i,i=l),i!==l?(e.length>tA?(o=e.charAt(tA),tA++):(o=l,0===tw&&tL(tu)),o!==l?s=i=[i,o]:(tA=s,s=l)):(tA=s,s=l);"*/"===e.substr(tA,2)?(s="*/",tA+=2):(s=l,0===tw&&tL(ty)),s!==l?t=r=[r,n,s]:(tA=t,t=l)}else tA=t,t=l;return t}function rh(){let t;return t=e.charAt(tA),O.test(t)?tA++:(t=l,0===tw&&tL(e0)),t}n=new Set,s=!1;let rd=(r=p())!==l&&tA===e.length;function rg(){var t,n,s;throw r!==l&&tA<e.length&&tL({type:"end"}),t=tv,n=tS<e.length?function(t=tA){let r=e.codePointAt(t);return void 0===r?"":String.fromCodePoint(r)}(tS):null,s=tS<e.length?tR(tS,tS+1):tR(tS,tS),new a(a.buildMessage(t,n),t,n,s)}return t.peg$library?{peg$result:r,peg$currPos:tA,peg$FAILED:l,peg$maxFailExpected:tv,peg$maxFailPos:tS,peg$success:rd,peg$throw:rd?void 0:rg}:rd?r:void rg()}}},53487,(e,t,r)=>{"use strict";let n="[^\\\\/]",s="[^/]",i="(?:\\/|$)",o="(?:^|\\/)",a=`\\.{1,2}${i}`,l=`(?!${o}${a})`,u=`(?!\\.{0,1}${i})`,c=`(?!${a})`,p=`${s}*?`,f={DOT_LITERAL:"\\.",PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:"\\/",ONE_CHAR:"(?=.)",QMARK:s,END_ANCHOR:i,DOTS_SLASH:a,NO_DOT:"(?!\\.)",NO_DOTS:l,NO_DOT_SLASH:u,NO_DOTS_SLASH:c,QMARK_NO_DOT:"[^.\\/]",STAR:p,START_ANCHOR:o,SEP:"/"},h={...f,SLASH_LITERAL:"[\\\\/]",QMARK:n,STAR:`${n}*?`,DOTS_SLASH:"\\.{1,2}(?:[\\\\/]|$)",NO_DOT:"(?!\\.)",NO_DOTS:"(?!(?:^|[\\\\/])\\.{1,2}(?:[\\\\/]|$))",NO_DOT_SLASH:"(?!\\.{0,1}(?:[\\\\/]|$))",NO_DOTS_SLASH:"(?!\\.{1,2}(?:[\\\\/]|$))",QMARK_NO_DOT:"[^.\\\\/]",START_ANCHOR:"(?:^|[\\\\/])",END_ANCHOR:"(?:[\\\\/]|$)",SEP:"\\"};t.exports={MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"},REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars:e=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:e=>!0===e?h:f}},19241,(e,t,r)=>{"use strict";var n=e.i(47167);let{REGEX_BACKSLASH:s,REGEX_REMOVE_BACKSLASH:i,REGEX_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_GLOBAL:a}=e.r(53487);r.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),r.hasRegexChars=e=>o.test(e),r.isRegexChar=e=>1===e.length&&r.hasRegexChars(e),r.escapeRegex=e=>e.replace(a,"\\$1"),r.toPosixSlashes=e=>e.replace(s,"/"),r.isWindows=()=>{if("u">typeof navigator&&navigator.platform){let e=navigator.platform.toLowerCase();return"win32"===e||"windows"===e}return void 0!==n.default&&!!n.default.platform&&"win32"===n.default.platform},r.removeBackslashes=e=>e.replace(i,e=>"\\"===e?"":e),r.escapeLast=(e,t,n)=>{let s=e.lastIndexOf(t,n);return -1===s?e:"\\"===e[s-1]?r.escapeLast(e,t,s-1):`${e.slice(0,s)}\\${e.slice(s)}`},r.removePrefix=(e,t={})=>{let r=e;return r.startsWith("./")&&(r=r.slice(2),t.prefix="./"),r},r.wrapOutput=(e,t={},r={})=>{let n=r.contains?"":"^",s=r.contains?"":"$",i=`${n}(?:${e})${s}`;return!0===t.negated&&(i=`(?:^(?!${i}).*$)`),i},r.basename=(e,{windows:t}={})=>{let r=e.split(t?/[\\/]/:"/"),n=r[r.length-1];return""===n?r[r.length-2]:n}},26094,(e,t,r)=>{"use strict";let n=e.r(19241),{CHAR_ASTERISK:s,CHAR_AT:i,CHAR_BACKWARD_SLASH:o,CHAR_COMMA:a,CHAR_DOT:l,CHAR_EXCLAMATION_MARK:u,CHAR_FORWARD_SLASH:c,CHAR_LEFT_CURLY_BRACE:p,CHAR_LEFT_PARENTHESES:f,CHAR_LEFT_SQUARE_BRACKET:h,CHAR_PLUS:d,CHAR_QUESTION_MARK:g,CHAR_RIGHT_CURLY_BRACE:m,CHAR_RIGHT_PARENTHESES:b,CHAR_RIGHT_SQUARE_BRACKET:$}=e.r(53487),y=e=>e===c||e===o,x=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};t.exports=(e,t)=>{let r,A,C=t||{},S=e.length-1,v=!0===C.parts||!0===C.scanToEnd,w=[],E=[],_=[],k=e,R=-1,L=0,N=0,O=!1,I=!1,j=!1,T=!1,M=!1,B=!1,P=!1,H=!1,D=!1,F=!1,G=0,U={value:"",depth:0,isGlob:!1},q=()=>R>=S,J=()=>k.charCodeAt(R+1),K=()=>(r=A,k.charCodeAt(++R));for(;R<S;){let e;if((A=K())===o){P=U.backslashes=!0,(A=K())===p&&(B=!0);continue}if(!0===B||A===p){for(G++;!0!==q()&&(A=K());){if(A===o){P=U.backslashes=!0,K();continue}if(A===p){G++;continue}if(!0!==B&&A===l&&(A=K())===l||!0!==B&&A===a){if(O=U.isBrace=!0,j=U.isGlob=!0,F=!0,!0===v)continue;break}if(A===m&&0==--G){B=!1,O=U.isBrace=!0,F=!0;break}}if(!0===v)continue;break}if(A===c){if(w.push(R),E.push(U),U={value:"",depth:0,isGlob:!1},!0===F)continue;if(r===l&&R===L+1){L+=2;continue}N=R+1;continue}if(!0!==C.noext&&!0==(A===d||A===i||A===s||A===g||A===u)&&J()===f){if(j=U.isGlob=!0,T=U.isExtglob=!0,F=!0,A===u&&R===L&&(D=!0),!0===v){for(;!0!==q()&&(A=K());){if(A===o){P=U.backslashes=!0,A=K();continue}if(A===b){j=U.isGlob=!0,F=!0;break}}continue}break}if(A===s){if(r===s&&(M=U.isGlobstar=!0),j=U.isGlob=!0,F=!0,!0===v)continue;break}if(A===g){if(j=U.isGlob=!0,F=!0,!0===v)continue;break}if(A===h){for(;!0!==q()&&(e=K());){if(e===o){P=U.backslashes=!0,K();continue}if(e===$){I=U.isBracket=!0,j=U.isGlob=!0,F=!0;break}}if(!0===v)continue;break}if(!0!==C.nonegate&&A===u&&R===L){H=U.negated=!0,L++;continue}if(!0!==C.noparen&&A===f){if(j=U.isGlob=!0,!0===v){for(;!0!==q()&&(A=K());){if(A===f){P=U.backslashes=!0,A=K();continue}if(A===b){F=!0;break}}continue}break}if(!0===j){if(F=!0,!0===v)continue;break}}!0===C.noext&&(T=!1,j=!1);let W=k,z="",V="";L>0&&(z=k.slice(0,L),k=k.slice(L),N-=L),W&&!0===j&&N>0?(W=k.slice(0,N),V=k.slice(N)):!0===j?(W="",V=k):W=k,W&&""!==W&&"/"!==W&&W!==k&&y(W.charCodeAt(W.length-1))&&(W=W.slice(0,-1)),!0===C.unescape&&(V&&(V=n.removeBackslashes(V)),W&&!0===P&&(W=n.removeBackslashes(W)));let Z={prefix:z,input:e,start:L,base:W,glob:V,isBrace:O,isBracket:I,isGlob:j,isExtglob:T,isGlobstar:M,negated:H,negatedExtglob:D};if(!0===C.tokens&&(Z.maxDepth=0,y(A)||E.push(U),Z.tokens=E),!0===C.parts||!0===C.tokens){let t;for(let r=0;r<w.length;r++){let n=t?t+1:L,s=w[r],i=e.slice(n,s);C.tokens&&(0===r&&0!==L?(E[r].isPrefix=!0,E[r].value=z):E[r].value=i,x(E[r]),Z.maxDepth+=E[r].depth),(0!==r||""!==i)&&_.push(i),t=s}if(t&&t+1<e.length){let r=e.slice(t+1);_.push(r),C.tokens&&(E[E.length-1].value=r,x(E[E.length-1]),Z.maxDepth+=E[E.length-1].depth)}Z.slashes=w,Z.parts=_}return Z}},17932,(e,t,r)=>{"use strict";let n=e.r(53487),s=e.r(19241),{MAX_LENGTH:i,POSIX_REGEX_SOURCE:o,REGEX_NON_SPECIAL_CHARS:a,REGEX_SPECIAL_CHARS_BACKREF:l,REPLACEMENTS:u}=n,c=(e,t)=>{if("function"==typeof t.expandRange)return t.expandRange(...e,t);e.sort();let r=`[${e.join("-")}]`;try{new RegExp(r)}catch(t){return e.map(e=>s.escapeRegex(e)).join("..")}return r},p=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,f=(e,t)=>{let r;if("string"!=typeof e)throw TypeError("Expected a string");e=u[e]||e;let h={...t},d="number"==typeof h.maxLength?Math.min(i,h.maxLength):i,g=e.length;if(g>d)throw SyntaxError(`Input length: ${g}, exceeds maximum allowed length: ${d}`);let m={type:"bos",value:"",output:h.prepend||""},b=[m],$=h.capture?"":"?:",y=n.globChars(h.windows),x=n.extglobChars(y),{DOT_LITERAL:A,PLUS_LITERAL:C,SLASH_LITERAL:S,ONE_CHAR:v,DOTS_SLASH:w,NO_DOT:E,NO_DOT_SLASH:_,NO_DOTS_SLASH:k,QMARK:R,QMARK_NO_DOT:L,STAR:N,START_ANCHOR:O}=y,I=e=>`(${$}(?:(?!${O}${e.dot?w:A}).)*?)`,j=h.dot?"":E,T=h.dot?R:L,M=!0===h.bash?I(h):N;h.capture&&(M=`(${M})`),"boolean"==typeof h.noext&&(h.noextglob=h.noext);let B={input:e,index:-1,start:0,dot:!0===h.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:b};g=(e=s.removePrefix(e,B)).length;let P=[],H=[],D=[],F=m,G=()=>B.index===g-1,U=B.peek=(t=1)=>e[B.index+t],q=B.advance=()=>e[++B.index]||"",J=()=>e.slice(B.index+1),K=(e="",t=0)=>{B.consumed+=e,B.index+=t},W=e=>{B.output+=null!=e.output?e.output:e.value,K(e.value)},z=()=>{let e=1;for(;"!"===U()&&("("!==U(2)||"?"===U(3));)q(),B.start++,e++;return e%2!=0&&(B.negated=!0,B.start++,!0)},V=e=>{B[e]++,D.push(e)},Z=e=>{B[e]--,D.pop()},Q=e=>{if("globstar"===F.type){let t=B.braces>0&&("comma"===e.type||"brace"===e.type),r=!0===e.extglob||P.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||r||(B.output=B.output.slice(0,-F.output.length),F.type="star",F.value="*",F.output=M,B.output+=F.output)}if(P.length&&"paren"!==e.type&&(P[P.length-1].inner+=e.value),(e.value||e.output)&&W(e),F&&"text"===F.type&&"text"===e.type){F.output=(F.output||F.value)+e.value,F.value+=e.value;return}e.prev=F,b.push(e),F=e},X=(e,t)=>{let r={...x[t],conditions:1,inner:""};r.prev=F,r.parens=B.parens,r.output=B.output;let n=(h.capture?"(":"")+r.open;V("parens"),Q({type:e,value:t,output:B.output?"":v}),Q({type:"paren",extglob:!0,value:q(),output:n}),P.push(r)},Y=e=>{let n,s=e.close+(h.capture?")":"");if("negate"===e.type){let r=M;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(r=I(h)),(r!==M||G()||/^\)+$/.test(J()))&&(s=e.close=`)$))${r}`),e.inner.includes("*")&&(n=J())&&/^\.[^\\/.]+$/.test(n)){let i=f(n,{...t,fastpaths:!1}).output;s=e.close=`)${i})${r})`}"bos"===e.prev.type&&(B.negatedExtglob=!0)}Q({type:"paren",extglob:!0,value:r,output:s}),Z("parens")};if(!1!==h.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(e)){let r=!1,n=e.replace(l,(e,t,n,s,i,o)=>"\\"===s?(r=!0,e):"?"===s?t?t+s+(i?R.repeat(i.length):""):0===o?T+(i?R.repeat(i.length):""):R.repeat(n.length):"."===s?A.repeat(n.length):"*"===s?t?t+s+(i?M:""):M:t?e:`\\${e}`);return(!0===r&&(n=!0===h.unescape?n.replace(/\\/g,""):n.replace(/\\+/g,e=>e.length%2==0?"\\\\":e?"\\":"")),n===e&&!0===h.contains)?B.output=e:B.output=s.wrapOutput(n,B,t),B}for(;!G();){if("\0"===(r=q()))continue;if("\\"===r){let e=U();if("/"===e&&!0!==h.bash||"."===e||";"===e)continue;if(!e){Q({type:"text",value:r+="\\"});continue}let t=/^\\+/.exec(J()),n=0;if(t&&t[0].length>2&&(n=t[0].length,B.index+=n,n%2!=0&&(r+="\\")),!0===h.unescape?r=q():r+=q(),0===B.brackets){Q({type:"text",value:r});continue}}if(B.brackets>0&&("]"!==r||"["===F.value||"[^"===F.value)){if(!1!==h.posix&&":"===r){let e=F.value.slice(1);if(e.includes("[")&&(F.posix=!0,e.includes(":"))){let e=F.value.lastIndexOf("["),t=F.value.slice(0,e),r=o[F.value.slice(e+2)];if(r){F.value=t+r,B.backtrack=!0,q(),m.output||1!==b.indexOf(F)||(m.output=v);continue}}}("["===r&&":"!==U()||"-"===r&&"]"===U())&&(r=`\\${r}`),"]"===r&&("["===F.value||"[^"===F.value)&&(r=`\\${r}`),!0===h.posix&&"!"===r&&"["===F.value&&(r="^"),F.value+=r,W({value:r});continue}if(1===B.quotes&&'"'!==r){r=s.escapeRegex(r),F.value+=r,W({value:r});continue}if('"'===r){B.quotes=+(1!==B.quotes),!0===h.keepQuotes&&Q({type:"text",value:r});continue}if("("===r){V("parens"),Q({type:"paren",value:r});continue}if(")"===r){if(0===B.parens&&!0===h.strictBrackets)throw SyntaxError(p("opening","("));let e=P[P.length-1];if(e&&B.parens===e.parens+1){Y(P.pop());continue}Q({type:"paren",value:r,output:B.parens?")":"\\)"}),Z("parens");continue}if("["===r){if(!0!==h.nobracket&&J().includes("]"))V("brackets");else{if(!0!==h.nobracket&&!0===h.strictBrackets)throw SyntaxError(p("closing","]"));r=`\\${r}`}Q({type:"bracket",value:r});continue}if("]"===r){if(!0===h.nobracket||F&&"bracket"===F.type&&1===F.value.length){Q({type:"text",value:r,output:`\\${r}`});continue}if(0===B.brackets){if(!0===h.strictBrackets)throw SyntaxError(p("opening","["));Q({type:"text",value:r,output:`\\${r}`});continue}Z("brackets");let e=F.value.slice(1);if(!0===F.posix||"^"!==e[0]||e.includes("/")||(r=`/${r}`),F.value+=r,W({value:r}),!1===h.literalBrackets||s.hasRegexChars(e))continue;let t=s.escapeRegex(F.value);if(B.output=B.output.slice(0,-F.value.length),!0===h.literalBrackets){B.output+=t,F.value=t;continue}F.value=`(${$}${t}|${F.value})`,B.output+=F.value;continue}if("{"===r&&!0!==h.nobrace){V("braces");let e={type:"brace",value:r,output:"(",outputIndex:B.output.length,tokensIndex:B.tokens.length};H.push(e),Q(e);continue}if("}"===r){let e=H[H.length-1];if(!0===h.nobrace||!e){Q({type:"text",value:r,output:r});continue}let t=")";if(!0===e.dots){let e=b.slice(),r=[];for(let t=e.length-1;t>=0&&(b.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&r.unshift(e[t].value);t=c(r,h),B.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){let n=B.output.slice(0,e.outputIndex),s=B.tokens.slice(e.tokensIndex);for(let i of(e.value=e.output="\\{",r=t="\\}",B.output=n,s))B.output+=i.output||i.value}Q({type:"brace",value:r,output:t}),Z("braces"),H.pop();continue}if("|"===r){P.length>0&&P[P.length-1].conditions++,Q({type:"text",value:r});continue}if(","===r){let e=r,t=H[H.length-1];t&&"braces"===D[D.length-1]&&(t.comma=!0,e="|"),Q({type:"comma",value:r,output:e});continue}if("/"===r){if("dot"===F.type&&B.index===B.start+1){B.start=B.index+1,B.consumed="",B.output="",b.pop(),F=m;continue}Q({type:"slash",value:r,output:S});continue}if("."===r){if(B.braces>0&&"dot"===F.type){"."===F.value&&(F.output=A);let e=H[H.length-1];F.type="dots",F.output+=r,F.value+=r,e.dots=!0;continue}if(B.braces+B.parens===0&&"bos"!==F.type&&"slash"!==F.type){Q({type:"text",value:r,output:A});continue}Q({type:"dot",value:r,output:A});continue}if("?"===r){if(!(F&&"("===F.value)&&!0!==h.noextglob&&"("===U()&&"?"!==U(2)){X("qmark",r);continue}if(F&&"paren"===F.type){let e=U(),t=r;("("!==F.value||/[!=<:]/.test(e))&&("<"!==e||/<([!=]|\w+>)/.test(J()))||(t=`\\${r}`),Q({type:"text",value:r,output:t});continue}if(!0!==h.dot&&("slash"===F.type||"bos"===F.type)){Q({type:"qmark",value:r,output:L});continue}Q({type:"qmark",value:r,output:R});continue}if("!"===r){if(!0!==h.noextglob&&"("===U()&&("?"!==U(2)||!/[!=<:]/.test(U(3)))){X("negate",r);continue}if(!0!==h.nonegate&&0===B.index){z();continue}}if("+"===r){if(!0!==h.noextglob&&"("===U()&&"?"!==U(2)){X("plus",r);continue}if(F&&"("===F.value||!1===h.regex){Q({type:"plus",value:r,output:C});continue}if(F&&("bracket"===F.type||"paren"===F.type||"brace"===F.type)||B.parens>0){Q({type:"plus",value:r});continue}Q({type:"plus",value:C});continue}if("@"===r){if(!0!==h.noextglob&&"("===U()&&"?"!==U(2)){Q({type:"at",extglob:!0,value:r,output:""});continue}Q({type:"text",value:r});continue}if("*"!==r){("$"===r||"^"===r)&&(r=`\\${r}`);let e=a.exec(J());e&&(r+=e[0],B.index+=e[0].length),Q({type:"text",value:r});continue}if(F&&("globstar"===F.type||!0===F.star)){F.type="star",F.star=!0,F.value+=r,F.output=M,B.backtrack=!0,B.globstar=!0,K(r);continue}let t=J();if(!0!==h.noextglob&&/^\([^?]/.test(t)){X("star",r);continue}if("star"===F.type){if(!0===h.noglobstar){K(r);continue}let n=F.prev,s=n.prev,i="slash"===n.type||"bos"===n.type,o=s&&("star"===s.type||"globstar"===s.type);if(!0===h.bash&&(!i||t[0]&&"/"!==t[0])){Q({type:"star",value:r,output:""});continue}let a=B.braces>0&&("comma"===n.type||"brace"===n.type),l=P.length&&("pipe"===n.type||"paren"===n.type);if(!i&&"paren"!==n.type&&!a&&!l){Q({type:"star",value:r,output:""});continue}for(;"/**"===t.slice(0,3);){let r=e[B.index+4];if(r&&"/"!==r)break;t=t.slice(3),K("/**",3)}if("bos"===n.type&&G()){F.type="globstar",F.value+=r,F.output=I(h),B.output=F.output,B.globstar=!0,K(r);continue}if("slash"===n.type&&"bos"!==n.prev.type&&!o&&G()){B.output=B.output.slice(0,-(n.output+F.output).length),n.output=`(?:${n.output}`,F.type="globstar",F.output=I(h)+(h.strictSlashes?")":"|$)"),F.value+=r,B.globstar=!0,B.output+=n.output+F.output,K(r);continue}if("slash"===n.type&&"bos"!==n.prev.type&&"/"===t[0]){let e=void 0!==t[1]?"|$":"";B.output=B.output.slice(0,-(n.output+F.output).length),n.output=`(?:${n.output}`,F.type="globstar",F.output=`${I(h)}${S}|${S}${e})`,F.value+=r,B.output+=n.output+F.output,B.globstar=!0,K(r+q()),Q({type:"slash",value:"/",output:""});continue}if("bos"===n.type&&"/"===t[0]){F.type="globstar",F.value+=r,F.output=`(?:^|${S}|${I(h)}${S})`,B.output=F.output,B.globstar=!0,K(r+q()),Q({type:"slash",value:"/",output:""});continue}B.output=B.output.slice(0,-F.output.length),F.type="globstar",F.output=I(h),F.value+=r,B.output+=F.output,B.globstar=!0,K(r);continue}let n={type:"star",value:r,output:M};if(!0===h.bash){n.output=".*?",("bos"===F.type||"slash"===F.type)&&(n.output=j+n.output),Q(n);continue}if(F&&("bracket"===F.type||"paren"===F.type)&&!0===h.regex){n.output=r,Q(n);continue}(B.index===B.start||"slash"===F.type||"dot"===F.type)&&("dot"===F.type?(B.output+=_,F.output+=_):!0===h.dot?(B.output+=k,F.output+=k):(B.output+=j,F.output+=j),"*"!==U()&&(B.output+=v,F.output+=v)),Q(n)}for(;B.brackets>0;){if(!0===h.strictBrackets)throw SyntaxError(p("closing","]"));B.output=s.escapeLast(B.output,"["),Z("brackets")}for(;B.parens>0;){if(!0===h.strictBrackets)throw SyntaxError(p("closing",")"));B.output=s.escapeLast(B.output,"("),Z("parens")}for(;B.braces>0;){if(!0===h.strictBrackets)throw SyntaxError(p("closing","}"));B.output=s.escapeLast(B.output,"{"),Z("braces")}if(!0!==h.strictSlashes&&("star"===F.type||"bracket"===F.type)&&Q({type:"maybe_slash",value:"",output:`${S}?`}),!0===B.backtrack)for(let e of(B.output="",B.tokens))B.output+=null!=e.output?e.output:e.value,e.suffix&&(B.output+=e.suffix);return B};f.fastpaths=(e,t)=>{let r={...t},o="number"==typeof r.maxLength?Math.min(i,r.maxLength):i,a=e.length;if(a>o)throw SyntaxError(`Input length: ${a}, exceeds maximum allowed length: ${o}`);e=u[e]||e;let{DOT_LITERAL:l,SLASH_LITERAL:c,ONE_CHAR:p,DOTS_SLASH:f,NO_DOT:h,NO_DOTS:d,NO_DOTS_SLASH:g,STAR:m,START_ANCHOR:b}=n.globChars(r.windows),$=r.dot?d:h,y=r.dot?g:h,x=r.capture?"":"?:",A=!0===r.bash?".*?":m;r.capture&&(A=`(${A})`);let C=e=>!0===e.noglobstar?A:`(${x}(?:(?!${b}${e.dot?f:l}).)*?)`,S=e=>{switch(e){case"*":return`${$}${p}${A}`;case".*":return`${l}${p}${A}`;case"*.*":return`${$}${A}${l}${p}${A}`;case"*/*":return`${$}${A}${c}${p}${y}${A}`;case"**":return $+C(r);case"**/*":return`(?:${$}${C(r)}${c})?${y}${p}${A}`;case"**/*.*":return`(?:${$}${C(r)}${c})?${y}${A}${l}${p}${A}`;case"**/.*":return`(?:${$}${C(r)}${c})?${l}${p}${A}`;default:{let t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;let r=S(t[1]);if(!r)return;return r+l+t[2]}}},v=S(s.removePrefix(e,{negated:!1,prefix:""}));return v&&!0!==r.strictSlashes&&(v+=`${c}?`),v},t.exports=f},53174,(e,t,r)=>{"use strict";let n=e.r(26094),s=e.r(17932),i=e.r(19241),o=e.r(53487),a=(e,t,r=!1)=>{if(Array.isArray(e)){let n=e.map(e=>a(e,t,r));return e=>{for(let t of n){let r=t(e);if(r)return r}return!1}}let n=e&&"object"==typeof e&&!Array.isArray(e)&&e.tokens&&e.input;if(""===e||"string"!=typeof e&&!n)throw TypeError("Expected pattern to be a non-empty string");let s=t||{},i=s.windows,o=n?a.compileRe(e,t):a.makeRe(e,t,!1,!0),l=o.state;delete o.state;let u=()=>!1;if(s.ignore){let e={...t,ignore:null,onMatch:null,onResult:null};u=a(s.ignore,e,r)}let c=(r,n=!1)=>{let{isMatch:c,match:p,output:f}=a.test(r,o,t,{glob:e,posix:i}),h={glob:e,state:l,regex:o,posix:i,input:r,output:f,match:p,isMatch:c};return("function"==typeof s.onResult&&s.onResult(h),!1===c)?(h.isMatch=!1,!!n&&h):u(r)?("function"==typeof s.onIgnore&&s.onIgnore(h),h.isMatch=!1,!!n&&h):("function"==typeof s.onMatch&&s.onMatch(h),!n||h)};return r&&(c.state=l),c};a.test=(e,t,r,{glob:n,posix:s}={})=>{if("string"!=typeof e)throw TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};let o=r||{},l=o.format||(s?i.toPosixSlashes:null),u=e===n,c=u&&l?l(e):e;return!1===u&&(u=(c=l?l(e):e)===n),(!1===u||!0===o.capture)&&(u=!0===o.matchBase||!0===o.basename?a.matchBase(e,t,r,s):t.exec(c)),{isMatch:!!u,match:u,output:c}},a.matchBase=(e,t,r)=>(t instanceof RegExp?t:a.makeRe(t,r)).test(i.basename(e)),a.isMatch=(e,t,r)=>a(t,r)(e),a.parse=(e,t)=>Array.isArray(e)?e.map(e=>a.parse(e,t)):s(e,{...t,fastpaths:!1}),a.scan=(e,t)=>n(e,t),a.compileRe=(e,t,r=!1,n=!1)=>{if(!0===r)return e.output;let s=t||{},i=s.contains?"":"^",o=s.contains?"":"$",l=`${i}(?:${e.output})${o}`;e&&!0===e.negated&&(l=`^(?!${l}).*$`);let u=a.toRegex(l,t);return!0===n&&(u.state=e),u},a.makeRe=(e,t={},r=!1,n=!1)=>{if(!e||"string"!=typeof e)throw TypeError("Expected a non-empty string");let i={negated:!1,fastpaths:!0};return!1!==t.fastpaths&&("."===e[0]||"*"===e[0])&&(i.output=s.fastpaths(e,t)),i.output||(i=s(e,t)),a.compileRe(i,t,r,n)},a.toRegex=(e,t)=>{try{let r=t||{};return new RegExp(e,r.flags||(r.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},a.constants=o,t.exports=a},54970,(e,t,r)=>{"use strict";let n=e.r(53174),s=e.r(19241);function i(e,t,r=!1){return t&&(null===t.windows||void 0===t.windows)&&(t={...t,windows:s.isWindows()}),n(e,t,r)}Object.assign(i,n),t.exports=i},12979,91996,33870,38433,86608,62395,e=>{"use strict";function t(e){return e.replace(/\\/g,"/").replace(/\/+/g,"/")}let r=e.i(87447).default;function n(e){return t(e).toLowerCase()}function s(){return r.resources}function i(e){let[t,...n]=r.resources[e],[s,i]=n[n.length-1];return[s,i??t]}function o(e){let t=n(e);if(r.resources[t])return t;let s=t.replace(/\d+(\.(png))$/i,"$1");if(r.resources[s])return s;throw Error(`Resource not found in manifest: ${e}`)}function a(){return Object.keys(r.resources)}let l=["",".jpg",".png",".gif",".bmp"];function u(e){let t=n(e);for(let e of l){let n=`${t}${e}`;if(r.resources[n])return n}return t}function c(e){let t=r.missions[e];if(!t)throw Error(`Mission not found: ${e}`);return t}function p(){return Object.keys(r.missions)}e.s(["getActualResourceKey",()=>o,"getMissionInfo",()=>c,"getMissionList",()=>p,"getResourceKey",()=>n,"getResourceList",()=>a,"getResourceMap",()=>s,"getSourceAndPath",()=>i,"getStandardTextureResourceKey",()=>u],91996),e.s(["parse",()=>q,"runServer",()=>W],86608);var f=e.i(92552);function h(e){let t=e.indexOf("::");return -1===t?null:{namespace:e.slice(0,t),method:e.slice(t+2)}}let d={"+":"$.add","-":"$.sub","*":"$.mul","/":"$.div","<":"$.lt","<=":"$.le",">":"$.gt",">=":"$.ge","==":"$.eq","!=":"$.ne","%":"$.mod","&":"$.bitand","|":"$.bitor","^":"$.bitxor","<<":"$.shl",">>":"$.shr"};class g{indent;runtime;functions;globals;locals;indentLevel=0;currentClass=null;currentFunction=null;constructor(e={}){this.indent=e.indent??" ",this.runtime=e.runtime??"$",this.functions=e.functions??"$f",this.globals=e.globals??"$g",this.locals=e.locals??"$l"}getAccessInfo(e){if("Variable"===e.type){let t=JSON.stringify(e.name),r="global"===e.scope?this.globals:this.locals;return{getter:`${r}.get(${t})`,setter:e=>`${r}.set(${t}, ${e})`,postIncHelper:`${r}.postInc(${t})`,postDecHelper:`${r}.postDec(${t})`}}if("MemberExpression"===e.type){let t=this.expression(e.object),r="Identifier"===e.property.type?JSON.stringify(e.property.name):this.expression(e.property);return{getter:`${this.runtime}.prop(${t}, ${r})`,setter:e=>`${this.runtime}.setProp(${t}, ${r}, ${e})`,postIncHelper:`${this.runtime}.propPostInc(${t}, ${r})`,postDecHelper:`${this.runtime}.propPostDec(${t}, ${r})`}}if("IndexExpression"===e.type){let t=Array.isArray(e.index)?e.index.map(e=>this.expression(e)):[this.expression(e.index)];if("Variable"===e.object.type){let r=JSON.stringify(e.object.name),n="global"===e.object.scope?this.globals:this.locals,s=t.join(", ");return{getter:`${n}.get(${r}, ${s})`,setter:e=>`${n}.set(${r}, ${s}, ${e})`,postIncHelper:`${n}.postInc(${r}, ${s})`,postDecHelper:`${n}.postDec(${r}, ${s})`}}if("MemberExpression"===e.object.type){let r=e.object,n=this.expression(r.object),s="Identifier"===r.property.type?JSON.stringify(r.property.name):this.expression(r.property),i=`${this.runtime}.key(${s}, ${t.join(", ")})`;return{getter:`${this.runtime}.prop(${n}, ${i})`,setter:e=>`${this.runtime}.setProp(${n}, ${i}, ${e})`,postIncHelper:`${this.runtime}.propPostInc(${n}, ${i})`,postDecHelper:`${this.runtime}.propPostDec(${n}, ${i})`}}let r=this.expression(e.object),n=1===t.length?t[0]:`${this.runtime}.key(${t.join(", ")})`;return{getter:`${this.runtime}.getIndex(${r}, ${n})`,setter:e=>`${this.runtime}.setIndex(${r}, ${n}, ${e})`,postIncHelper:`${this.runtime}.indexPostInc(${r}, ${n})`,postDecHelper:`${this.runtime}.indexPostDec(${r}, ${n})`}}return null}generate(e){let t=[];for(let r of e.body){let e=this.statement(r);e&&t.push(e)}return t.join("\n\n")}statement(e){switch(e.type){case"Comment":return"";case"ExpressionStatement":return this.line(`${this.expression(e.expression)};`);case"FunctionDeclaration":return this.functionDeclaration(e);case"PackageDeclaration":return this.packageDeclaration(e);case"DatablockDeclaration":return this.datablockDeclaration(e);case"ObjectDeclaration":return this.line(`${this.objectDeclaration(e)};`);case"IfStatement":return this.ifStatement(e);case"ForStatement":return this.forStatement(e);case"WhileStatement":return this.whileStatement(e);case"DoWhileStatement":return this.doWhileStatement(e);case"SwitchStatement":return this.switchStatement(e);case"ReturnStatement":return this.returnStatement(e);case"BreakStatement":return this.line("break;");case"ContinueStatement":return this.line("continue;");case"BlockStatement":return this.blockStatement(e);default:throw Error(`Unknown statement type: ${e.type}`)}}functionDeclaration(e){let t=h(e.name.name);if(t){let r=t.namespace,n=t.method;this.currentClass=r.toLowerCase(),this.currentFunction=n.toLowerCase();let s=this.functionBody(e.body,e.params);return this.currentClass=null,this.currentFunction=null,`${this.line(`${this.runtime}.registerMethod(${JSON.stringify(r)}, ${JSON.stringify(n)}, function() {`)}
|
||
${s}
|
||
${this.line("});")}`}{let t=e.name.name;this.currentFunction=t.toLowerCase();let r=this.functionBody(e.body,e.params);return this.currentFunction=null,`${this.line(`${this.runtime}.registerFunction(${JSON.stringify(t)}, function() {`)}
|
||
${r}
|
||
${this.line("});")}`}}functionBody(e,t){this.indentLevel++;let r=[];r.push(this.line(`const ${this.locals} = ${this.runtime}.locals();`));for(let e=0;e<t.length;e++)r.push(this.line(`${this.locals}.set(${JSON.stringify(t[e].name)}, arguments[${e}]);`));for(let t of e.body)r.push(this.statement(t));return this.indentLevel--,r.join("\n")}packageDeclaration(e){let t=JSON.stringify(e.name.name);this.indentLevel++;let r=e.body.map(e=>this.statement(e)).join("\n\n");return this.indentLevel--,`${this.line(`${this.runtime}.package(${t}, function() {`)}
|
||
${r}
|
||
${this.line("});")}`}datablockDeclaration(e){let t=JSON.stringify(e.className.name),r=e.instanceName?JSON.stringify(e.instanceName.name):"null",n=e.parent?JSON.stringify(e.parent.name):"null",s=this.objectBody(e.body);return this.line(`${this.runtime}.datablock(${t}, ${r}, ${n}, ${s});`)}objectDeclaration(e){let t="Identifier"===e.className.type?JSON.stringify(e.className.name):this.expression(e.className),r=null===e.instanceName?"null":"Identifier"===e.instanceName.type?JSON.stringify(e.instanceName.name):this.expression(e.instanceName),n=[],s=[];for(let t of e.body)"Assignment"===t.type?n.push(t):s.push(t);let i=this.objectBody(n);if(s.length>0){let e=s.map(e=>this.objectDeclaration(e)).join(",\n");return`${this.runtime}.create(${t}, ${r}, ${i}, [
|
||
${e}
|
||
])`}return`${this.runtime}.create(${t}, ${r}, ${i})`}objectBody(e){if(0===e.length)return"{}";let t=[];for(let r of e)if("Assignment"===r.type){let e=this.expression(r.value);if("Identifier"===r.target.type){let n=r.target.name;/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(n)?t.push(`${n}: ${e}`):t.push(`[${JSON.stringify(n)}]: ${e}`)}else if("IndexExpression"===r.target.type){let n=this.objectPropertyKey(r.target);t.push(`[${n}]: ${e}`)}else{let n=this.expression(r.target);t.push(`[${n}]: ${e}`)}}if(t.length<=1)return`{ ${t.join(", ")} }`;let r=this.indent.repeat(this.indentLevel+1),n=this.indent.repeat(this.indentLevel);return`{
|
||
${r}${t.join(",\n"+r)}
|
||
${n}}`}objectPropertyKey(e){let t="Identifier"===e.object.type?JSON.stringify(e.object.name):this.expression(e.object),r=Array.isArray(e.index)?e.index.map(e=>this.expression(e)).join(", "):this.expression(e.index);return`${this.runtime}.key(${t}, ${r})`}ifStatement(e){let t=this.expression(e.test),r=this.statementAsBlock(e.consequent);if(e.alternate)if("IfStatement"===e.alternate.type){let n=this.ifStatement(e.alternate).replace(/^\s*/,"");return this.line(`if (${t}) ${r} else ${n}`)}else{let n=this.statementAsBlock(e.alternate);return this.line(`if (${t}) ${r} else ${n}`)}return this.line(`if (${t}) ${r}`)}forStatement(e){let t=e.init?this.expression(e.init):"",r=e.test?this.expression(e.test):"",n=e.update?this.expression(e.update):"",s=this.statementAsBlock(e.body);return this.line(`for (${t}; ${r}; ${n}) ${s}`)}whileStatement(e){let t=this.expression(e.test),r=this.statementAsBlock(e.body);return this.line(`while (${t}) ${r}`)}doWhileStatement(e){let t=this.statementAsBlock(e.body),r=this.expression(e.test);return this.line(`do ${t} while (${r});`)}switchStatement(e){if(e.stringMode)return this.switchStringStatement(e);let t=this.expression(e.discriminant);this.indentLevel++;let r=[];for(let t of e.cases)r.push(this.switchCase(t));return this.indentLevel--,`${this.line(`switch (${t}) {`)}
|
||
${r.join("\n")}
|
||
${this.line("}")}`}switchCase(e){let t=[];if(null===e.test)t.push(this.line("default:"));else if(Array.isArray(e.test))for(let r of e.test)t.push(this.line(`case ${this.expression(r)}:`));else t.push(this.line(`case ${this.expression(e.test)}:`));for(let r of(this.indentLevel++,e.consequent))t.push(this.statement(r));return t.push(this.line("break;")),this.indentLevel--,t.join("\n")}switchStringStatement(e){let t=this.expression(e.discriminant),r=[];for(let t of e.cases)if(null===t.test)r.push(`default: () => { ${this.blockContent(t.consequent)} }`);else if(Array.isArray(t.test))for(let e of t.test)r.push(`${this.expression(e)}: () => { ${this.blockContent(t.consequent)} }`);else r.push(`${this.expression(t.test)}: () => { ${this.blockContent(t.consequent)} }`);return this.line(`${this.runtime}.switchStr(${t}, { ${r.join(", ")} });`)}returnStatement(e){return e.value?this.line(`return ${this.expression(e.value)};`):this.line("return;")}blockStatement(e){this.indentLevel++;let t=e.body.map(e=>this.statement(e)).join("\n");return this.indentLevel--,`{
|
||
${t}
|
||
${this.line("}")}`}statementAsBlock(e){if("BlockStatement"===e.type)return this.blockStatement(e);this.indentLevel++;let t=this.statement(e);return this.indentLevel--,`{
|
||
${t}
|
||
${this.line("}")}`}blockContent(e){return e.map(e=>this.statement(e).trim()).join(" ")}expression(e){switch(e.type){case"Identifier":return this.identifier(e);case"Variable":return this.variable(e);case"NumberLiteral":case"BooleanLiteral":return String(e.value);case"StringLiteral":return JSON.stringify(e.value);case"BinaryExpression":return this.binaryExpression(e);case"UnaryExpression":return this.unaryExpression(e);case"PostfixExpression":return this.postfixExpression(e);case"AssignmentExpression":return this.assignmentExpression(e);case"ConditionalExpression":return`(${this.expression(e.test)} ? ${this.expression(e.consequent)} : ${this.expression(e.alternate)})`;case"CallExpression":return this.callExpression(e);case"MemberExpression":return this.memberExpression(e);case"IndexExpression":return this.indexExpression(e);case"TagDereferenceExpression":return`${this.runtime}.deref(${this.expression(e.argument)})`;case"ObjectDeclaration":return this.objectDeclaration(e);case"DatablockDeclaration":return`${this.runtime}.datablock(${JSON.stringify(e.className.name)}, ${e.instanceName?JSON.stringify(e.instanceName.name):"null"}, ${e.parent?JSON.stringify(e.parent.name):"null"}, ${this.objectBody(e.body)})`;default:throw Error(`Unknown expression type: ${e.type}`)}}identifier(e){let t=h(e.name);return t&&"parent"===t.namespace.toLowerCase()?e.name:t?`${this.runtime}.nsRef(${JSON.stringify(t.namespace)}, ${JSON.stringify(t.method)})`:JSON.stringify(e.name)}variable(e){return"global"===e.scope?`${this.globals}.get(${JSON.stringify(e.name)})`:`${this.locals}.get(${JSON.stringify(e.name)})`}binaryExpression(e){let t=this.expression(e.left),r=this.expression(e.right),n=e.operator,s=this.concatExpression(t,n,r);if(s)return s;if("$="===n)return`${this.runtime}.streq(${t}, ${r})`;if("!$="===n)return`!${this.runtime}.streq(${t}, ${r})`;if("&&"===n||"||"===n)return`(${t} ${n} ${r})`;let i=d[n];return i?`${i}(${t}, ${r})`:`(${t} ${n} ${r})`}unaryExpression(e){if("++"===e.operator||"--"===e.operator){let t=this.getAccessInfo(e.argument);if(t){let r="++"===e.operator?1:-1;return t.setter(`${this.runtime}.add(${t.getter}, ${r})`)}}let t=this.expression(e.argument);return"~"===e.operator?`${this.runtime}.bitnot(${t})`:"-"===e.operator?`${this.runtime}.neg(${t})`:`${e.operator}${t}`}postfixExpression(e){let t=this.getAccessInfo(e.argument);if(t){let r="++"===e.operator?t.postIncHelper:t.postDecHelper;if(r)return r}return`${this.expression(e.argument)}${e.operator}`}assignmentExpression(e){let t=this.expression(e.value),r=e.operator,n=this.getAccessInfo(e.target);if(!n)throw Error(`Unhandled assignment target type: ${e.target.type}`);if("="===r)return n.setter(t);{let e=r.slice(0,-1),s=this.compoundAssignmentValue(n.getter,e,t);return n.setter(s)}}callExpression(e){let t=e.arguments.map(e=>this.expression(e)).join(", ");if("Identifier"===e.callee.type){let r=e.callee.name,n=h(r);if(n&&"parent"===n.namespace.toLowerCase())if(this.currentClass)return`${this.runtime}.parent(${JSON.stringify(this.currentClass)}, ${JSON.stringify(n.method)}, arguments[0]${t?", "+t:""})`;else if(this.currentFunction)return`${this.runtime}.parentFunc(${JSON.stringify(this.currentFunction)}${t?", "+t:""})`;else throw Error("Parent:: call outside of function context");return n?`${this.runtime}.nsCall(${JSON.stringify(n.namespace)}, ${JSON.stringify(n.method)}${t?", "+t:""})`:`${this.functions}.call(${JSON.stringify(r)}${t?", "+t:""})`}if("MemberExpression"===e.callee.type){let r=this.expression(e.callee.object),n="Identifier"===e.callee.property.type?JSON.stringify(e.callee.property.name):this.expression(e.callee.property);return`${this.runtime}.call(${r}, ${n}${t?", "+t:""})`}let r=this.expression(e.callee);return`${r}(${t})`}memberExpression(e){let t=this.expression(e.object);return e.computed||"Identifier"!==e.property.type?`${this.runtime}.prop(${t}, ${this.expression(e.property)})`:`${this.runtime}.prop(${t}, ${JSON.stringify(e.property.name)})`}indexExpression(e){let t=Array.isArray(e.index)?e.index.map(e=>this.expression(e)):[this.expression(e.index)];if("Variable"===e.object.type){let r=JSON.stringify(e.object.name),n="global"===e.object.scope?this.globals:this.locals;return`${n}.get(${r}, ${t.join(", ")})`}if("MemberExpression"===e.object.type){let r=e.object,n=this.expression(r.object),s="Identifier"===r.property.type?JSON.stringify(r.property.name):this.expression(r.property),i=`${this.runtime}.key(${s}, ${t.join(", ")})`;return`${this.runtime}.prop(${n}, ${i})`}let r=this.expression(e.object);return 1===t.length?`${this.runtime}.getIndex(${r}, ${t[0]})`:`${this.runtime}.getIndex(${r}, ${this.runtime}.key(${t.join(", ")}))`}line(e){return this.indent.repeat(this.indentLevel)+e}concatExpression(e,t,r){switch(t){case"@":return`${this.runtime}.concat(${e}, ${r})`;case"SPC":return`${this.runtime}.concat(${e}, " ", ${r})`;case"TAB":return`${this.runtime}.concat(${e}, "\\t", ${r})`;case"NL":return`${this.runtime}.concat(${e}, "\\n", ${r})`;default:return null}}compoundAssignmentValue(e,t,r){let n=this.concatExpression(e,t,r);if(n)return n;let s=d[t];return s?`${s}(${e}, ${r})`:`(${e} ${t} ${r})`}}e.s(["createRuntime",()=>G,"createScriptCache",()=>P],33870);var m=e.i(54970);class b{map=new Map;keyLookup=new Map;constructor(e){if(e)for(const[t,r]of e)this.set(t,r)}get size(){return this.map.size}get(e){let t=this.keyLookup.get(e.toLowerCase());return void 0!==t?this.map.get(t):void 0}set(e,t){let r=e.toLowerCase(),n=this.keyLookup.get(r);return void 0!==n?this.map.set(n,t):(this.keyLookup.set(r,e),this.map.set(e,t)),this}has(e){return this.keyLookup.has(e.toLowerCase())}delete(e){let t=e.toLowerCase(),r=this.keyLookup.get(t);return void 0!==r&&(this.keyLookup.delete(t),this.map.delete(r))}clear(){this.map.clear(),this.keyLookup.clear()}keys(){return this.map.keys()}values(){return this.map.values()}entries(){return this.map.entries()}[Symbol.iterator](){return this.map[Symbol.iterator]()}forEach(e){for(let[t,r]of this.map)e(r,t,this)}get[Symbol.toStringTag](){return"CaseInsensitiveMap"}getOriginalKey(e){return this.keyLookup.get(e.toLowerCase())}}class ${set=new Set;constructor(e){if(e)for(const t of e)this.add(t)}get size(){return this.set.size}add(e){return this.set.add(e.toLowerCase()),this}has(e){return this.set.has(e.toLowerCase())}delete(e){return this.set.delete(e.toLowerCase())}clear(){this.set.clear()}[Symbol.iterator](){return this.set[Symbol.iterator]()}get[Symbol.toStringTag](){return"CaseInsensitiveSet"}}function y(e){return e.replace(/\\/g,"/").toLowerCase()}function x(e){return String(e??"")}function A(e){return Number(e)||0}function C(e){let t=x(e||"0 0 0").split(" ").map(Number);return[t[0]||0,t[1]||0,t[2]||0]}function S(e,t,r){let n=0;for(;t+n<e.length&&!r.includes(e[t+n]);)n++;return n}function v(e,t,r){let n=0;for(;t>0;){if(n>=e.length)return"";let s=S(e,n,r);if(n+s>=e.length)return"";n+=s+1,t--}let s=S(e,n,r);return 0===s?"":e.substring(n,n+s)}function w(e,t,r,n){let s=0,i=t;for(;i>0;){if(s>=e.length)return"";let t=S(e,s,n);if(s+t>=e.length)return"";s+=t+1,i--}let o=s,a=r-t+1;for(;a>0;){let t=S(e,s,n);if((s+=t)>=e.length)break;s++,a--}let l=s;return l>o&&n.includes(e[l-1])&&l--,e.substring(o,l)}function E(e,t){if(""===e)return 0;let r=0;for(let n=0;n<e.length;n++)t.includes(e[n])&&r++;return r+1}function _(e,t,r,n,s){let i=[],o=0,a=0;for(;o<e.length||a<=t;){if(o<e.length){let s=S(e,o,n);a===t?i.push(r):i.push(e.substring(o,o+s)),(o+=s)<e.length&&o++}else a===t?i.push(r):i.push("");if(++a>t&&o>=e.length)break}return i.join(s)}function k(e,t,r,n){let s=[],i=0,o=0;for(;i<e.length;){let n=S(e,i,r);o!==t&&s.push(e.substring(i,i+n)),(i+=n)<e.length&&i++,o++}return s.join(n)}function R(e){let{runtime:t,fileSystem:r}=e,n=[],s=0,i="";return{echo(...e){console.log(...e.map(x))},warn(...e){console.warn(...e.map(x))},error(...e){console.error(...e.map(x))},call:(e,...r)=>t().$f.call(x(e),...r),eval(e){throw Error("eval() not implemented: requires runtime parsing and execution")},collapseescape:e=>x(e).replace(/\\([ntr\\])/g,(e,t)=>"n"===t?"\n":"t"===t?" ":"r"===t?"\r":"\\"),expandescape:e=>x(e).replace(/\\/g,"\\\\").replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r"),export(e,t,r){console.warn(`export(${e}): not implemented`)},quit(){console.warn("quit(): not implemented in browser")},trace(e){},isobject:e=>t().$.isObject(e),nametoid:e=>t().$.nameToId(e),strlen:e=>x(e).length,strchr(e,t){let r=x(e),n=x(t)[0]??"",s=r.indexOf(n);return s>=0?r.substring(s):""},strpos:(e,t,r)=>x(e).indexOf(x(t),A(r)),strcmp(e,t){let r=x(e),n=x(t);return r<n?-1:+(r>n)},stricmp(e,t){let r=x(e).toLowerCase(),n=x(t).toLowerCase();return r<n?-1:+(r>n)},strstr:(e,t)=>x(e).indexOf(x(t)),getsubstr(e,t,r){let n=x(e),s=A(t);return void 0===r?n.substring(s):n.substring(s,s+A(r))},getword:(e,t)=>v(x(e),A(t)," \n"),getwordcount:e=>E(x(e)," \n"),getfield:(e,t)=>v(x(e),A(t)," \n"),getfieldcount:e=>E(x(e)," \n"),setword:(e,t,r)=>_(x(e),A(t),x(r)," \n"," "),setfield:(e,t,r)=>_(x(e),A(t),x(r)," \n"," "),firstword:e=>v(x(e),0," \n"),restwords:e=>w(x(e),1,1e6," \n"),trim:e=>x(e).trim(),ltrim:e=>x(e).replace(/^\s+/,""),rtrim:e=>x(e).replace(/\s+$/,""),strupr:e=>x(e).toUpperCase(),strlwr:e=>x(e).toLowerCase(),strreplace:(e,t,r)=>x(e).split(x(t)).join(x(r)),filterstring:(e,t)=>x(e),stripchars(e,t){let r=x(e),n=new Set(x(t).split(""));return r.split("").filter(e=>!n.has(e)).join("")},getfields(e,t,r){let n=void 0!==r?Number(r):1e6;return w(x(e),A(t),n," \n")},getwords(e,t,r){let n=void 0!==r?Number(r):1e6;return w(x(e),A(t),n," \n")},removeword:(e,t)=>k(x(e),A(t)," \n"," "),removefield:(e,t)=>k(x(e),A(t)," \n"," "),getrecord:(e,t)=>v(x(e),A(t),"\n"),getrecordcount:e=>E(x(e),"\n"),setrecord:(e,t,r)=>_(x(e),A(t),x(r),"\n","\n"),removerecord:(e,t)=>k(x(e),A(t),"\n","\n"),nexttoken(e,t,r){throw Error("nextToken() is not implemented: it requires variable mutation")},strtoplayername:e=>x(e).replace(/[^\w\s-]/g,"").trim(),mabs:e=>Math.abs(A(e)),mfloor:e=>Math.floor(A(e)),mceil:e=>Math.ceil(A(e)),msqrt:e=>Math.sqrt(A(e)),mpow:(e,t)=>Math.pow(A(e),A(t)),msin:e=>Math.sin(A(e)),mcos:e=>Math.cos(A(e)),mtan:e=>Math.tan(A(e)),masin:e=>Math.asin(A(e)),macos:e=>Math.acos(A(e)),matan:(e,t)=>Math.atan2(A(e),A(t)),mlog:e=>Math.log(A(e)),getrandom(e,t){if(void 0===e)return Math.random();if(void 0===t)return Math.floor(Math.random()*(A(e)+1));let r=A(e);return Math.floor(Math.random()*(A(t)-r+1))+r},mdegtorad:e=>A(e)*(Math.PI/180),mradtodeg:e=>A(e)*(180/Math.PI),mfloatlength:(e,t)=>A(e).toFixed(A(t)),getboxcenter(e){let t=x(e).split(" ").map(Number),r=t[0]||0,n=t[1]||0,s=t[2]||0,i=t[3]||0,o=t[4]||0,a=t[5]||0;return`${(r+i)/2} ${(n+o)/2} ${(s+a)/2}`},vectoradd(e,t){let[r,n,s]=C(e),[i,o,a]=C(t);return`${r+i} ${n+o} ${s+a}`},vectorsub(e,t){let[r,n,s]=C(e),[i,o,a]=C(t);return`${r-i} ${n-o} ${s-a}`},vectorscale(e,t){let[r,n,s]=C(e),i=A(t);return`${r*i} ${n*i} ${s*i}`},vectordot(e,t){let[r,n,s]=C(e),[i,o,a]=C(t);return r*i+n*o+s*a},vectorcross(e,t){let[r,n,s]=C(e),[i,o,a]=C(t);return`${n*a-s*o} ${s*i-r*a} ${r*o-n*i}`},vectorlen(e){let[t,r,n]=C(e);return Math.sqrt(t*t+r*r+n*n)},vectornormalize(e){let[t,r,n]=C(e),s=Math.sqrt(t*t+r*r+n*n);return 0===s?"0 0 0":`${t/s} ${r/s} ${n/s}`},vectordist(e,t){let[r,n,s]=C(e),[i,o,a]=C(t),l=r-i,u=n-o,c=s-a;return Math.sqrt(l*l+u*u+c*c)},matrixcreate(e,t){throw Error("MatrixCreate() not implemented: requires axis-angle rotation math")},matrixcreatefromeuler(e){throw Error("MatrixCreateFromEuler() not implemented: requires Euler→Quaternion→AxisAngle conversion")},matrixmultiply(e,t){throw Error("MatrixMultiply() not implemented: requires full 4x4 matrix multiplication")},matrixmulpoint(e,t){throw Error("MatrixMulPoint() not implemented: requires full transform application")},matrixmulvector(e,t){throw Error("MatrixMulVector() not implemented: requires rotation matrix application")},getsimtime:()=>Date.now()-t().state.startTime,getrealtime:()=>Date.now(),schedule(e,r,n,...s){let i=Number(e)||0,o=t(),a=setTimeout(()=>{o.state.pendingTimeouts.delete(a);try{o.$f.call(String(n),...s)}catch(e){throw console.error(`schedule: error calling ${n}:`,e),e}},i);return o.state.pendingTimeouts.add(a),a},cancel(e){clearTimeout(e),t().state.pendingTimeouts.delete(e)},iseventpending:e=>t().state.pendingTimeouts.has(e),exec(e){let r=String(e??"");if(console.debug(`exec(${JSON.stringify(r)}): preparing to execute…`),!r.includes("."))return console.error(`exec: invalid script file name ${JSON.stringify(r)}.`),!1;let n=y(r),s=t(),{executedScripts:i,scripts:o}=s.state;if(i.has(n))return console.debug(`exec(${JSON.stringify(r)}): skipping (already executed)`),!0;let a=o.get(n);return null==a?(console.warn(`exec(${JSON.stringify(r)}): script not found`),!1):(i.add(n),console.debug(`exec(${JSON.stringify(r)}): executing!`),s.executeAST(a),!0)},compile(e){throw Error("compile() not implemented: requires DSO bytecode compiler")},isdemo:()=>!1,isfile:e=>r?r.isFile(x(e)):(console.warn("isFile(): no fileSystem handler configured"),!1),fileext(e){let t=x(e),r=t.lastIndexOf(".");return r>=0?t.substring(r):""},filebase(e){let t=x(e),r=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\")),n=t.lastIndexOf("."),s=r>=0?r+1:0,i=n>s?n:t.length;return t.substring(s,i)},filepath(e){let t=x(e),r=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\"));return r>=0?t.substring(0,r):""},expandfilename(e){throw Error("expandFilename() not implemented: requires filesystem path expansion")},findfirstfile:e=>r?(i=x(e),n=r.findFiles(i),s=0,n[s++]??""):(console.warn("findFirstFile(): no fileSystem handler configured"),""),findnextfile(e){let t=x(e);if(t!==i){if(!r)return"";i=t,n=r.findFiles(t)}return n[s++]??""},getfilecrc:e=>x(e),iswriteablefilename:e=>!1,activatepackage(e){t().$.activatePackage(x(e))},deactivatepackage(e){t().$.deactivatePackage(x(e))},ispackage:e=>t().$.isPackage(x(e)),isactivepackage:e=>t().$.isActivePackage(x(e)),getpackagelist:()=>t().$.getPackageList(),addmessagecallback(e,t){},alxcreatesource:(...e)=>0,alxgetwavelen:e=>0,alxlistenerf(e,t){},alxplay:(...e)=>0,alxsetchannelvolume(e,t){},alxsourcef(e,t,r){},alxstop(e){},alxstopall(){},activatedirectinput(){},activatekeyboard(){},deactivatedirectinput(){},deactivatekeyboard(){},disablejoystick(){},enablejoystick(){},enablewinconsole(e){},isjoystickdetected:()=>!1,lockmouse(e){},addmaterialmapping(e,t){},flushtexturecache(){},getdesktopresolution:()=>"1920 1080 32",getdisplaydevicelist:()=>"OpenGL",getresolutionlist:e=>"640 480 800 600 1024 768 1280 720 1920 1080",getvideodriverinfo:()=>"WebGL",isdevicefullscreenonly:e=>!1,isfullscreen:()=>!1,screenshot(e){},setdisplaydevice:e=>!0,setfov(e){},setinteriorrendermode(e){},setopenglanisotropy(e){},setopenglmipreduction(e){},setopenglskymipreduction(e){},setopengltexturecompressionhint(e){},setscreenmode(e,t,r,n){},setverticalsync(e){},setzoomspeed(e){},togglefullscreen(){},videosetgammacorrection(e){},snaptoggle(){},addtaggedstring:e=>0,buildtaggedstring:(e,...t)=>"",detag:e=>x(e),gettag:e=>0,gettaggedstring:e=>"",removetaggedstring(e){},commandtoclient(e,t){},commandtoserver(e){},cancelserverquery(){},querymasterserver(){},querysingleserver(){},setnetport:e=>!0,allowconnections(e){},startheartbeat(){},stopheartbeat(){},gotowebpage(e){},deletedatablocks(){},preloaddatablock:e=>!0,containerboxempty:(...e)=>!0,containerraycast:(...e)=>"",containersearchcurrdist:()=>0,containersearchnext:()=>0,initcontainerradiussearch(){},calcexplosioncoverage:(...e)=>1,getcontrolobjectaltitude:()=>0,getcontrolobjectspeed:()=>0,getterrainheight:e=>0,lightscene(){},pathonmissionloaddone(){}}}function L(e){return e.toLowerCase()}function N(e){let t=e.trim();return L(t.startsWith("$")?t.slice(1):t)}function O(e,t){let r=e.get(t);return r||(r=new Set,e.set(t,r)),r}function I(e,t){for(let r of t)e.add(L(r))}function j(e,t,r){if(e.anyClassValues.has("*")||e.anyClassValues.has(r))return!0;for(let n of t){let t=e.valuesByClass.get(L(n));if(t&&(t.has("*")||t.has(r)))return!0}return!1}let T=[{classNames:["SceneObject","GameBase","ShapeBase","Item","Player"],fields:["position","rotation","scale","transform","hidden","renderingdistance","datablock","shapename","shapefile","initialbarrel","skin","team","health","energy","energylevel","damagelevel","damageflash","damagepercent","damagestate","mountobject","mountedimage","targetposition","targetrotation","targetscale","missiontypeslist","renderenabled","vis","velocity","name"]},{classNames:["*"],fields:["position","rotation","scale","hidden","shapefile","datablock"]}],M=[{classNames:["SceneObject","GameBase","ShapeBase","SimObject"],methods:["settransform","setposition","setrotation","setscale","sethidden","setdatablock","setshapename","mountimage","unmountimage","mountobject","unmountobject","setdamagelevel","setenergylevel","schedule","delete","deleteallobjects","add","remove","playthread","stopthread","setthreaddir","pausethread"]},{classNames:["*"],methods:["settransform","setscale","delete","add","remove"]}],B=["missionrunning","loadingmission"];function P(){return{scripts:new Map,generatedCode:new WeakMap}}function H(e){return e.toLowerCase()}function D(e){return Number(e)>>>0}function F(e){if(null==e)return null;if("string"==typeof e)return e||null;if("number"==typeof e)return String(e);throw Error(`Invalid instance name type: ${typeof e}`)}function G(e={}){let t,r,n,s=e.reactiveFieldRules??T,i=e.reactiveMethodRules??M,o=e.reactiveGlobalNames??B,a=(t=function(e){let t=new Set,r=new Map;for(let n of e)for(let e of n.classNames){let s=L(e);if("*"===s){I(t,n.fields);continue}I(O(r,s),n.fields)}return{anyClassValues:t,valuesByClass:r}}(s),(e,r)=>j(t,e,L(r))),l=(r=function(e){let t=new Set,r=new Map;for(let n of e)for(let e of n.classNames){let s=L(e);if("*"===s){I(t,n.methods);continue}I(O(r,s),n.methods)}return{anyClassValues:t,valuesByClass:r}}(i),(e,t)=>j(r,e,L(t))),u=(n=function(e){let t=new Set;for(let r of e)t.add(N(r));return t}(o),e=>{let t=N(e);return n.has("*")||n.has(t)}),c=new b,p=new b,f=new b,h=[],d=new $,x=3,A=1027,C=new Map,S=new b,v=new b,w=new b,E=new b,_=new b,k=new Set,U=[],J=!1,K=0;if(e.globals)for(let[t,r]of Object.entries(e.globals)){if(!t.startsWith("$"))throw Error(`Global variable "${t}" must start with $, e.g. "$${t}"`);w.set(t.slice(1),r)}let W=new Set,z=new Set,V=e.ignoreScripts&&e.ignoreScripts.length>0?(0,m.default)(e.ignoreScripts,{nocase:!0}):null,Z=e.cache??P(),Q=Z.scripts,X=Z.generatedCode,Y=new Map;function ee(e){let t=Y.get(e);return t&&t.length>0?t[t.length-1]:void 0}function et(e,t,r){let n;(n=Y.get(e))||(n=[],Y.set(e,n)),n.push(t);try{return r()}finally{let t;(t=Y.get(e))&&t.pop()}}function er(e,t){return`${e.toLowerCase()}::${t.toLowerCase()}`}function en(e,t){return c.get(e)?.get(t)??null}function es(e){if(!e)return[];let t=[],r=new Set,n=e.class||e._className||e._class,s=n?H(String(n)):"";for(;s&&!r.has(s);)t.push(s),r.add(s),s=_.get(s)??"";return e._superClass&&!r.has(e._superClass)&&t.push(e._superClass),t}function ei(){if(J=!1,0===U.length)return;let e=U.splice(0,U.length);for(let t of(K+=1,k))t({type:"batch.flushed",tick:K,events:e})}function eo(e){for(let t of(U.push(e),k))t(e);J||(J=!0,queueMicrotask(ei))}function ea(e){eo({type:"object.created",objectId:e._id,object:e})}function el(e,t,r,n){let s=H(t);Object.is(r,n)||a(es(e),s)&&eo({type:"field.changed",objectId:e._id,field:s,value:r,previousValue:n,object:e})}let eu=new Set,ec=null,ep=null,ef=(e.builtins??R)({runtime:()=>ep,fileSystem:e.fileSystem??null});function eh(e){let t=f.get(e);if(!t)return void d.add(e);if(!t.active){for(let[e,r]of(t.active=!0,h.push(t.name),t.methods)){c.has(e)||c.set(e,new b);let t=c.get(e);for(let[e,n]of r)t.has(e)||t.set(e,[]),t.get(e).push(n)}for(let[e,r]of t.functions)p.has(e)||p.set(e,[]),p.get(e).push(r)}}function ed(e){return null==e||""===e?null:"object"==typeof e&&null!=e._id?e:"string"==typeof e?S.get(e)??null:"number"==typeof e?C.get(e)??null:null}function eg(e,t,r){let n=ed(e);if(null==n)return 0;let s=ey(n[t]);return n[t]=s+r,el(n,t,n[t],s),s}function em(e,t){let r=en(e,t);return r&&r.length>0?r[r.length-1]:null}function eb(e,t,r,n){let s=en(e,t);return s&&0!==s.length?{found:!0,result:et(er(e,t),s.length-1,()=>s[s.length-1](r,...n))}:{found:!1}}function e$(e,t,r,n){let s;l((s=es(r)).length?s:[e],t)&&eo({type:"method.called",className:H(e),methodName:H(t),objectId:r._id,args:[...n]});let i=E.get(e);if(i){let e=i.get(t);if(e)for(let t of e)t(r,...n)}}function ey(e){if(null==e||""===e)return 0;let t=Number(e);return isNaN(t)?0:t}function ex(e){if(!e||""===e)return null;e.startsWith("/")&&(e=e.slice(1));let t=e.split("/"),r=null;for(let e=0;e<t.length;e++){let n=t[e];if(n){if(0===e)r=/^\d+$/.test(n)?C.get(parseInt(n,10))??null:S.get(n)??null;else{if(!r||!r._children)return null;let e=n.toLowerCase();r=r._children.find(t=>t._name?.toLowerCase()===e)??null}if(!r)return null}}return r}function eA(e){return null==e||""===e?null:ex(String(e))}function eC(e,t){function r(e,t){return e+t.join("_")}return{get:(t,...n)=>e.get(r(t,n))??"",set(n,...s){if(0===s.length)throw Error("set() requires at least a value argument");if(1===s.length){let r=e.get(n);return e.set(n,s[0]),t?.onSet?.(n,s[0],r),s[0]}let i=s[s.length-1],o=r(n,s.slice(0,-1)),a=e.get(o);return e.set(o,i),t?.onSet?.(o,i,a),i},postInc(n,...s){let i=r(n,s),o=ey(e.get(i)),a=o+1;return e.set(i,a),t?.onSet?.(i,a,o),o},postDec(n,...s){let i=r(n,s),o=ey(e.get(i)),a=o-1;return e.set(i,a),t?.onSet?.(i,a,o),o}}}function eS(){return eC(new b)}let ev={registerMethod:function(e,t,r){if(ec)ec.methods.has(e)||ec.methods.set(e,new b),ec.methods.get(e).set(t,r);else{c.has(e)||c.set(e,new b);let n=c.get(e);n.has(t)||n.set(t,[]),n.get(t).push(r)}},registerFunction:function(e,t){ec?ec.functions.set(e,t):(p.has(e)||p.set(e,[]),p.get(e).push(t))},package:function(e,t){let r=f.get(e);r||(r={name:e,active:!1,methods:new b,functions:new b},f.set(e,r));let n=ec;ec=r,t(),ec=n,d.has(e)&&(d.delete(e),eh(e))},activatePackage:eh,deactivatePackage:function(e){let t=f.get(e);if(!t||!t.active)return;t.active=!1;let r=h.findIndex(t=>t.toLowerCase()===e.toLowerCase());for(let[e,n]of(-1!==r&&h.splice(r,1),t.methods)){let t=c.get(e);if(t)for(let[e,r]of n){let n=t.get(e);if(n){let e=n.indexOf(r);-1!==e&&n.splice(e,1)}}}for(let[e,r]of t.functions){let t=p.get(e);if(t){let e=t.indexOf(r);-1!==e&&t.splice(e,1)}}},create:function(e,t,r,n){let s=H(e),i=function(){for(;C.has(A);)A+=1;let e=A;return A+=1,e}(),o={_class:s,_className:e,_id:i};for(let[e,t]of Object.entries(r))o[H(e)]=t;o.superclass&&(o._superClass=H(String(o.superclass)),o.class&&_.set(H(String(o.class)),o._superClass)),C.set(i,o);let a=F(t);if(a&&(o._name=a,S.set(a,o)),n){for(let e of n)e._parent=o;o._children=n}let l=em(e,"onAdd");return l&&l(o),ea(o),o},datablock:function(e,t,r,n){let s=H(e),i=function(){for(;C.has(x);)x+=1;let e=x;return x+=1,e}(),o={_class:s,_className:e,_id:i,_isDatablock:!0},a=F(r);if(a){let e=v.get(a);if(e){for(let[t,r]of Object.entries(e))t.startsWith("_")||(o[t]=r);o._parent=e}}for(let[e,t]of Object.entries(n))o[H(e)]=t;C.set(i,o);let l=F(t);return l&&(o._name=l,S.set(l,o),v.set(l,o)),ea(o),o},deleteObject:function e(t){var r;let n;if(null==t||("number"==typeof t?n=C.get(t):"string"==typeof t?n=S.get(t):"object"==typeof t&&t._id&&(n=t),!n))return!1;let s=em(n._className,"onRemove");if(s&&s(n),C.delete(n._id),n._name&&S.delete(n._name),n._isDatablock&&n._name&&v.delete(n._name),n._parent&&n._parent._children){let e=n._parent._children.indexOf(n);-1!==e&&n._parent._children.splice(e,1)}if(n._children)for(let t of[...n._children])e(t);return eo({type:"object.deleted",objectId:(r=n)._id,object:r}),!0},prop:function(e,t){let r=ed(e);return null==r?"":r[H(t)]??""},setProp:function(e,t,r){let n=ed(e);if(null==n)return r;let s=H(t),i=n[s];return n[s]=r,el(n,s,r,i),r},getIndex:function(e,t){let r=ed(e);return null==r?"":r[String(t)]??""},setIndex:function(e,t,r){let n=ed(e);if(null==n)return r;let s=String(t),i=n[s];return n[s]=r,el(n,s,r,i),r},propPostInc:function(e,t){return eg(e,H(t),1)},propPostDec:function(e,t){return eg(e,H(t),-1)},indexPostInc:function(e,t){return eg(e,String(t),1)},indexPostDec:function(e,t){return eg(e,String(t),-1)},key:function(e,...t){return e+t.join("_")},call:function(e,t,...r){if(null==e||("string"==typeof e||"number"==typeof e)&&null==(e=eA(e)))return"";let n=e.class||e._className||e._class;if(n){let s=eb(n,t,e,r);if(s.found)return e$(n,t,e,r),s.result}let s=e._superClass||_.get(n);for(;s;){let n=eb(s,t,e,r);if(n.found)return e$(s,t,e,r),n.result;s=_.get(s)}return""},nsCall:function(e,t,...r){let n=en(e,t);if(!n||0===n.length)return"";let s=er(e,t),i=n[n.length-1],o=et(s,n.length-1,()=>i(...r)),a=r[0];return a&&"object"==typeof a&&e$(e,t,a,r.slice(1)),o},nsRef:function(e,t){let r=en(e,t);if(!r||0===r.length)return null;let n=er(e,t),s=r[r.length-1];return(...e)=>et(n,r.length-1,()=>s(...e))},parent:function(e,t,r,...n){let s=en(e,t),i=er(e,t),o=ee(i);if(s&&void 0!==o&&o>=1){let a=o-1,l=et(i,a,()=>s[a](r,...n));return r&&"object"==typeof r&&e$(e,t,r,n),l}let a=_.get(e);for(;a;){let e=en(a,t);if(e&&e.length>0){let s=et(er(a,t),e.length-1,()=>e[e.length-1](r,...n));return r&&"object"==typeof r&&e$(a,t,r,n),s}a=_.get(a)}return""},parentFunc:function(e,...t){let r=p.get(e);if(!r)return"";let n=e.toLowerCase(),s=ee(n);if(void 0===s||s<1)return"";let i=s-1;return et(n,i,()=>r[i](...t))},add:function(e,t){return ey(e)+ey(t)},sub:function(e,t){return ey(e)-ey(t)},mul:function(e,t){return ey(e)*ey(t)},div:function(e,t){return ey(e)/ey(t)},neg:function(e){return-ey(e)},lt:function(e,t){return ey(e)<ey(t)},le:function(e,t){return ey(e)<=ey(t)},gt:function(e,t){return ey(e)>ey(t)},ge:function(e,t){return ey(e)>=ey(t)},eq:function(e,t){return ey(e)===ey(t)},ne:function(e,t){return ey(e)!==ey(t)},mod:function(e,t){let r=0|Number(t);return 0===r?0:(0|Number(e))%r},bitand:function(e,t){return D(e)&D(t)},bitor:function(e,t){return D(e)|D(t)},bitxor:function(e,t){return D(e)^D(t)},shl:function(e,t){return D(D(e)<<(31&D(t)))},shr:function(e,t){return D(e)>>>(31&D(t))},bitnot:function(e){return~D(e)>>>0},concat:function(...e){return e.map(e=>String(e??"")).join("")},streq:function(e,t){return String(e??"").toLowerCase()===String(t??"").toLowerCase()},switchStr:function(e,t){let r=String(e??"").toLowerCase();for(let[e,n]of Object.entries(t))if("default"!==e&&H(e)===r)return void n();t.default&&t.default()},deref:eA,nameToId:function(e){let t=ex(e);return t?t._id:-1},isObject:function(e){return null!=e&&("object"==typeof e&&!!e._id||("number"==typeof e?C.has(e):"string"==typeof e&&S.has(e)))},isFunction:function(e){return p.has(e)||e.toLowerCase()in ef},isPackage:function(e){return f.has(e)},isActivePackage:function(e){let t=f.get(e);return t?.active??!1},getPackageList:function(){return h.join(" ")},locals:eS,onMethodCalled(e,t,r){let n=E.get(e);n||(n=new b,E.set(e,n));let s=n.get(t);return s||(s=[],n.set(t,s)),s.push(r),()=>{let e=s.indexOf(r);-1!==e&&s.splice(e,1)}}},ew={call(e,...t){let r=p.get(e);if(r&&r.length>0)return et(e.toLowerCase(),r.length-1,()=>r[r.length-1](...t));let n=ef[e.toLowerCase()];return n?n(...t):(console.warn(`Unknown function: ${e}(${t.map(e=>JSON.stringify(e)).join(", ")})`),"")}},eE=eC(w,{onSet:function(e,t,r){let n=H(e.startsWith("$")?e.slice(1):e);Object.is(t,r)||u(n)&&eo({type:"global.changed",name:n,value:t,previousValue:r})}}),e_={methods:c,functions:p,packages:f,activePackages:h,objectsById:C,objectsByName:S,datablocks:v,globals:w,executedScripts:W,failedScripts:z,scripts:Q,generatedCode:X,pendingTimeouts:eu,startTime:Date.now()};function ek(e){let t=function(e){let t=X.get(e);null==t&&(t=new g(void 0).generate(e),X.set(e,t));return t}(e),r=eS();Function("$","$f","$g","$l",t)(ev,ew,eE,r)}function eR(e,t){return{execute(){if(t){let e=y(t);e_.executedScripts.add(e)}ek(e)}}}async function eL(t,r,n){let s=e.loadScript;if(!s){t.length>0&&console.warn("Script has exec() calls but no loadScript provided:",t);return}async function i(t){e.signal?.throwIfAborted();let i=y(t);if(e_.scripts.has(i)||e_.failedScripts.has(i))return;if(V&&V(i)){console.warn(`Ignoring script: ${t}`),e_.failedScripts.add(i);return}if(n.has(i))return;let o=r.get(i);if(o)return void await o;e.progress?.addItem(t);let a=(async()=>{let o,a=await s(t);if(null==a){console.warn(`Script not found: ${t}`),e_.failedScripts.add(i),e.progress?.completeItem();return}try{o=q(a,{filename:t})}catch(r){console.warn(`Failed to parse script: ${t}`,r),e_.failedScripts.add(i),e.progress?.completeItem();return}let l=new Set(n);l.add(i),await eL(o.execScriptPaths,r,l),e_.scripts.set(i,o),e.progress?.completeItem()})();r.set(i,a),await a}await Promise.all(t.map(i))}async function eN(t){let r=e.loadScript;if(!r)throw Error("loadFromPath requires loadScript option to be set");let n=y(t);if(e_.scripts.has(n))return eR(e_.scripts.get(n),t);e.progress?.addItem(t);let s=await r(t);if(null==s)throw e.progress?.completeItem(),Error(`Script not found: ${t}`);let i=await eO(s,{path:t});return e.progress?.completeItem(),i}async function eO(e,t){if(t?.path){let e=y(t.path);if(e_.scripts.has(e))return eR(e_.scripts.get(e),t.path)}return eI(q(e,{filename:t?.path}),t)}async function eI(t,r){let n=new Map,s=new Set;if(r?.path){let e=y(r.path);e_.scripts.set(e,t),s.add(e)}let i=[...t.execScriptPaths,...e.preloadScripts??[]];return await eL(i,n,s),eR(t,r?.path)}return ep={$:ev,$f:ew,$g:eE,state:e_,destroy:function(){for(let e of(U.length>0&&ei(),e_.pendingTimeouts))clearTimeout(e);e_.pendingTimeouts.clear(),k.clear()},executeAST:ek,loadFromPath:eN,loadFromSource:eO,loadFromAST:eI,call:(e,...t)=>ew.call(e,...t),getObjectByName:e=>S.get(e),subscribeRuntimeEvents:e=>(k.add(e),()=>{k.delete(e)})}}function U(){let e=new Set,t=0,r=0,n=null;function s(){for(let t of e)t()}return{get total(){return t},get loaded(){return r},get current(){return n},get progress(){return 0===t?0:r/t},on(t,r){e.add(r)},off(t,r){e.delete(r)},addItem(e){t++,n=e,s()},completeItem(){r++,n=null,s()},setCurrent(e){n=e,s()}}}function q(e,t){try{return f.default.parse(e)}catch(e){if(t?.filename&&e.location)throw Error(`${t.filename}:${e.location.start.line}:${e.location.start.column}: ${e.message}`,{cause:e});throw e}}function J(e){if("boolean"==typeof e)return e;if("number"==typeof e)return 0!==e;if("string"==typeof e){let t=e.trim().toLowerCase();return""!==t&&"0"!==t&&"false"!==t}return!!e}function K(){let e=Error("Operation aborted");return e.name="AbortError",e}function W(e){let t,{missionName:r,missionType:n,runtimeOptions:s,onMissionLoadDone:i}=e,{signal:o,fileSystem:a,globals:l={},preloadScripts:u=[],reactiveGlobalNames:c}=s??{},p=a?.findFiles("scripts/*Game.cs")??[],f=c?Array.from(new Set([...c,"missionRunning"])):void 0,h=G({...s,reactiveGlobalNames:f,globals:{...l,"$Host::Map":r,"$Host::MissionType":n},preloadScripts:[...u,...p]});(t=h.$.registerMethod.bind(h.$))("ShapeBase","playThread",(e,t,r)=>{e._threads||(e._threads={}),e._threads[Number(t)]={sequence:String(r),playing:!0,direction:!0}}),t("ShapeBase","stopThread",(e,t)=>{e._threads&&delete e._threads[Number(t)]}),t("ShapeBase","setThreadDir",(e,t,r)=>{e._threads||(e._threads={});let n=Number(t);e._threads[n]?e._threads[n].direction=!!Number(r):e._threads[n]={sequence:"",playing:!1,direction:!!Number(r)}}),t("ShapeBase","pauseThread",(e,t)=>{e._threads?.[Number(t)]&&(e._threads[Number(t)].playing=!1)}),t("ShapeBase","playAudio",()=>{}),t("ShapeBase","stopAudio",()=>{}),t("SimObject","getDatablock",e=>{let t=e.datablock;return t?h.getObjectByName(String(t))??"":""}),t("SimObject","getGroup",e=>e._parent??""),t("SimObject","getName",e=>e._name??""),t("SimObject","getType",()=>16384),t("SimGroup","getCount",e=>e._children?e._children.length:0),t("SimGroup","getObject",(e,t)=>{let r=e._children;return r?r[Number(t)]??"":""}),t("GameBase","isEnabled",()=>!0),t("GameBase","isDisabled",()=>!1),t("GameBase","setPoweredState",()=>{}),t("GameBase","setRechargeRate",()=>{}),t("GameBase","getRechargeRate",()=>0),t("GameBase","setEnergyLevel",()=>{}),t("GameBase","getEnergyLevel",()=>0),t("ShapeBase","getDamageLevel",()=>0),t("ShapeBase","setDamageLevel",()=>{}),t("ShapeBase","getRepairRate",()=>0),t("ShapeBase","setRepairRate",()=>{}),t("ShapeBase","getDamagePercent",()=>0),t("GameBase","getControllingClient",()=>0),t("SimObject","schedule",(e,t,r,...n)=>{let s=setTimeout(()=>{h.state.pendingTimeouts.delete(s);try{h.$.call(e,String(r),...n)}catch(t){console.error(`schedule: error calling ${r} on ${e._id}:`,t)}},Number(t)||0);return h.state.pendingTimeouts.add(s),s});let d=async function(){try{let e=await h.loadFromPath("scripts/server.cs");o?.throwIfAborted(),await h.loadFromPath(`missions/${r}.mis`),o?.throwIfAborted(),e.execute();let t=function(e,t){let{signal:r,onMissionLoadDone:n}=t;return new Promise((t,s)=>{let i=!1,o=!1,a=()=>J(e.$g.get("missionRunning")),l=()=>{i||(i=!0,h(),t())},u=e=>{i||(i=!0,h(),s(e))},c=t=>{if(!n||o)return;let r=t??e.getObjectByName("Game");r&&(o=!0,n(r))},p=()=>u(K()),f=e.subscribeRuntimeEvents(e=>{if("global.changed"===e.type&&"missionrunning"===e.name){J(e.value)&&(c(),l());return}"batch.flushed"===e.type&&a()&&(c(),l())});function h(){f(),r?.removeEventListener("abort",p)}if(r){if(r.aborted)return void u(K());r.addEventListener("abort",p,{once:!0})}a()&&(c(),l())})}(h,{signal:o,onMissionLoadDone:i}),n=await h.loadFromSource("CreateServer($Host::Map, $Host::MissionType);");o?.throwIfAborted(),n.execute(),await t}catch(e){if(e instanceof Error&&"AbortError"===e.name)return;throw e}}();return{runtime:h,ready:d}}e.s(["createProgressTracker",()=>U],38433);let z=/^[ \t]*(DisplayName|MissionTypes|BriefingWAV|Bitmap|PlanetName)[ \t]*=[ \t]*(.+)$/i,V=/^[ \t]*-+[ \t]*([A-Z ]+)[ \t]+BEGIN[ \t]*-+$/i,Z=/^[ \t]*-+[ \t]*([A-Z ]+)[ \t]+END[ \t]*-+$/i,Q={arena:"Arena",bounty:"Bounty",cnh:"CnH",ctf:"CTF",dm:"DM",dnd:"DnD",hunters:"Hunters",lakrabbit:"LakRabbit",lakzm:"LakZM",lctf:"LCTF",none:"None",rabbit:"Rabbit",sctf:"SCtF",siege:"Siege",singleplayer:"SinglePlayer",tdm:"TDM",teamhunters:"TeamHunters",teamlak:"TeamLak",tr2:"TR2"};function X(e){let t=q(e),{pragma:r,sections:n}=function(e){let t={},r=[],n={name:null,comments:[]};for(let s of e.body)if("Comment"===s.type){let e=function(e){let t;return(t=e.match(V))?{type:"sectionBegin",name:t[1]}:(t=e.match(Z))?{type:"sectionEnd",name:t[1]}:(t=e.match(z))?{type:"definition",identifier:t[1],value:t[2]}:null}(s.value);if(e)switch(e.type){case"definition":null===n.name?t[e.identifier.toLowerCase()]=e.value:n.comments.push(s.value);break;case"sectionBegin":(null!==n.name||n.comments.length>0)&&r.push(n),n={name:e.name.toUpperCase(),comments:[]};break;case"sectionEnd":null!==n.name&&r.push(n),n={name:null,comments:[]}}else n.comments.push(s.value)}return(null!==n.name||n.comments.length>0)&&r.push(n),{pragma:t,sections:r}}(t);function s(e){return n.find(t=>t.name===e)?.comments.map(e=>e.trimStart()).join("\n")??null}return{displayName:r.displayname??null,missionTypes:r.missiontypes?.split(/\s+/).filter(Boolean).map(e=>Q[e.toLowerCase()]??e)??[],missionBriefing:s("MISSION BRIEFING"),briefingWav:r.briefingwav??null,bitmap:r.bitmap??null,planetName:r.planetname??null,missionBlurb:s("MISSION BLURB"),missionQuote:s("MISSION QUOTE"),missionString:s("MISSION STRING"),execScriptPaths:t.execScriptPaths,hasDynamicExec:t.hasDynamicExec,ast:t}}function Y(e,t){if(e)return e[t.toLowerCase()]}function ee(e){let[t,r,n]=(e.position??"0 0 0").split(" ").map(e=>parseFloat(e));return[r||0,n||0,t||0]}function et(e){let[t,r,n]=(e.scale??"1 1 1").split(" ").map(e=>parseFloat(e));return[r||0,n||0,t||0]}e.s(["getPosition",()=>ee,"getProperty",()=>Y,"getScale",()=>et,"parseMissionScript",()=>X],62395);let er="/t2-mapper",en=`${er}/base/`,es=`${er}/magenta.png`;function ei(e,t){let r;try{r=o(e)}catch(r){if(t)return console.warn(`Resource "${e}" not found - rendering fallback.`),t;throw r}let[n,s]=i(r);return n?`${en}@vl2/${n}/${s}`:`${en}${s}`}function eo(e){return ei(`interiors/${e}`).replace(/\.dif$/i,".glb")}function ea(e){return ei(`shapes/${e}`).replace(/\.dts$/i,".glb")}function el(e){return e=e.replace(/^terrain\./,""),ei(u(`textures/terrain/${e}`),es)}function eu(e,r){let n=t(r).split("/"),s=n.length>1?n.slice(0,-1).join("/")+"/":"";return ei(u(`${s}${e}`),es)}function ec(e){return ei(u(`textures/${e}`),es)}function ep(e){return ei(`audio/${e}`).replace(/\.wav$/i,".ogg")}async function ef(e){let t=ei(`textures/${e}`),r=await fetch(t);return(await r.text()).split(/(?:\r\n|\r|\n)/).map(e=>{if(!(e=e.trim()).startsWith(";"))return e}).filter(Boolean)}async function eh(e){let t,r=c(e),n=await fetch(ei(r.resourcePath)),s=await n.arrayBuffer();try{t=new TextDecoder("utf-8",{fatal:!0}).decode(s)}catch{t=new TextDecoder("windows-1252").decode(s)}return X(t=t.replaceAll("<22>","'"))}async function ed(e){let t=await fetch(ei(`terrains/${e}`));return function(e){let t=new DataView(e),r=0,n=t.getUint8(r++),s=new Uint16Array(65536),i=[],o=e=>{let n="";for(let s=0;s<e;s++){let e=t.getUint8(r+s);if(0===e)break;n+=String.fromCharCode(e)}return r+=e,n};for(let e=0;e<65536;e++){let n=t.getUint16(r,!0);r+=2,s[e]=n}r+=65536;for(let e=0;e<8;e++){let n=t.getUint8(r++),s=o(n);e<6&&n>0&&i.push(s)}let a=[];for(let e of i){let e=new Uint8Array(65536);for(let n=0;n<65536;n++){let s=t.getUint8(r++);e[n]=s}a.push(e)}return{version:n,textureNames:i,heightMap:s,alphaMaps:a}}(await t.arrayBuffer())}async function eg(e){let t=ei(e),r=await fetch(t);return(await r.text()).split(/(?:\r\n|\r|\n)/g).map(e=>e.trim()).filter(Boolean).filter(e=>!e.startsWith(";")).map(e=>{let t=e.match(/^(.+)\s(\d+)$/);if(!t)return{name:e,frameCount:1};{let e=parseInt(t[2],10);return{name:t[1],frameCount:e}}})}e.s(["FALLBACK_TEXTURE_URL",0,es,"RESOURCE_ROOT_URL",0,en,"audioToUrl",()=>ep,"getUrlForPath",()=>ei,"iflTextureToUrl",()=>eu,"interiorToUrl",()=>eo,"loadDetailMapList",()=>ef,"loadImageFrameList",()=>eg,"loadMission",()=>eh,"loadTerrain",()=>ed,"shapeToUrl",()=>ea,"terrainTextureToUrl",()=>el,"textureToUrl",()=>ec],12979)}]); |