imba
Version:
26 lines • 697 kB
JavaScript
var qd=Object.defineProperty;var vn=(s,e)=>{for(var t in e)qd(s,t,{get:e[t],enumerable:!0})};var Zr={};vn(Zr,{Diagnostic:()=>Va,DiagnosticSeverity:()=>yn,InternalPrefixes:()=>lo,Position:()=>Si,Range:()=>Pa,ReservedIdentifierRegex:()=>U2,ReservedPrefixes:()=>rp,ToImbaMap:()=>np,ToJSMap:()=>ip,ansi:()=>dr,brace:()=>s_,bracketize:()=>W2,camelCase:()=>i_,clearLocationMarkers:()=>ho,computeLineOffsets:()=>J2,dashToCamelCase:()=>ja,dasherize:()=>Y2,deepAssign:()=>__,flatten:()=>r_,fromValidIdentifier:()=>l_,identifierForPath:()=>fo,indent:()=>X2,isPlainObject:()=>d_,isSystemIdentifier:()=>h_,isValidIdentifier:()=>K2,locationToLineColMap:()=>Ba,markLineColForTokens:()=>c_,normalizeIndentation:()=>Ga,parenthesize:()=>Ai,parseArgs:()=>u_,pascalCase:()=>co,printExcerpt:()=>f_,printWarning:()=>p_,quote:()=>o_,setterSym:()=>a_,singlequote:()=>Ei,snakeCase:()=>n_,symbolize:()=>q2,toCustomTagIdentifier:()=>op,toImbaIdentifier:()=>ap,toJSIdentifier:()=>Fa,toValidIdentifier:()=>Js,unionOfLocations:()=>uo});var ep={32:16777619n,64:1099511628211n,128:309485009821345068724781371n,256:374144419156711147060143317175368453031918731002211n,512:35835915874844867368919076489095108449946327955754392558399825615420669938882575126094039892345713852759n,1024:5016456510113118655434598811035278955030765345404790744303017523831112055108147451509157692220295382716162651878526895249385292291816524375083746691371804094271873160484737966720260389217684476157468082573n},Xd={32:2166136261n,64:14695981039346656037n,128:144066263297769815596495629667062367629n,256:100029257958052580907070968620625704837092796014241193945225284501741471925557n,512:9659303129496669498009435400716310466090418745672637896108374329434462657994582932197716438449813051892206539805784495328239340083876191928701583869517785n,1024:14197795064947621068722070641403218320880622795441933960878474914617582723252296732303717722150864096521202355549365628174669108571814760471015076148029755969804077320157692458563003215304957150157403644460363550505412711285966361610267868082893823963790439336411086884584107735010676915n};function tp(s,{size:e=32}={}){if(!ep[e])throw new Error("The `size` option must be one of 32, 64, 128, 256, 512, or 1024");let t=Xd[e],r=ep[e],i=!1;for(let n=0;n<s.length;n++){let a=s.charCodeAt(n);a>127&&!i&&(s=unescape(encodeURIComponent(s)),a=s.charCodeAt(n),i=!0),t^=BigInt(a),t=BigInt.asUintN(e,t*r)}return t}function $2(s){return s?s.toArray?s.toArray():s:[]}var Qe={},Wd={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},dr={bold:function(s){return"\x1B[1m"+s+"\x1B[22m"},red:function(s){return"\x1B[31m"+s+"\x1B[39m"},green:function(s){return"\x1B[32m"+s+"\x1B[39m"},yellow:function(s){return"\x1B[33m"+s+"\x1B[39m"},blue:function(s){return"\x1B[94m"+s+"\x1B[39m"},gray:function(s){return"\x1B[90m"+s+"\x1B[39m"},white:function(s){return"\x1B[37m"+s+"\x1B[39m"},f:function(s,e){let t=Wd[s];return"\x1B["+t[0]+"m"+e+"\x1B["+t[1]+"m"}};dr.warn=dr.yellow;dr.error=dr.red;var lo={TAG:"τ",FLIP:"ω",VALUE:"υ",CACHE:"ϲ",KEY:"κ",ANY:"φ",SYM:"ε",SEP:"ι",PRIVATE:"Ψ",B:"ι",T:"τ",C:"ρ",V:"υ",K:"κ",D:"Δ",H:"θ",EXTEND:"Ω"},rp=new Set(Object.values(lo)),U2=new RegExp("^["+Array.from(rp).join("")+"]","u"),ip={"-":"Ξ","?":"Φ","#":"Ψ","@":"α"},Jd=/[-?#@]/gu,Zd=function(s){return ip[s]},Fa=Qe.toJSIdentifier=function(s){return s.replace(Jd,Zd)},np={Ξ:"-",Φ:"?",Ψ:"#",α:"@"},Qd=new RegExp("[ΞΦΨα]","gu"),e_=function(s){return np[s]},ap=Qe.toImbaIdentifier=function(s){return s.replace(Qd,e_)},op=Qe.toCustomTagIdentifier=function(s){return"Γ"+Fa(s)},t_="αβγδεζηθικλμνξοπρστυφχψω",s_=Qe.brace=function(s){var e=s.match(/\n/);return e?"{"+s+`
}`:`{
`+s+`
}`},Ga=Qe.normalizeIndentation=function(s){for(var e,t=/\n+([^\n\S]*)/g,r=null,i;e=t.exec(s);){var n=e[1];(r===null||0<(i=n.length)&&i<r.length)&&(r=n)}return r&&(s=s.replace(RegExp("\\n"+r,"g"),`
`)),s},r_=Qe.flatten=function(s){var e=[];return s.forEach(function(t){return t instanceof Array?e.push.apply(e,Qe.flatten(t)):e.push(t)}),e},ho=Qe.clearLocationMarkers=function(s){return s.replace(/\/\*\%([\w\|]*)\$\*\//g,"")},co=Qe.pascalCase=function(s){return s.replace(/(^|[\-\_\s])(\w)/g,function(e,t,r){return r.toUpperCase()})},i_=Qe.camelCase=function(s){return s=String(s),s.replace(/([\-\_\s])(\w)/g,function(e,t,r){return r.toUpperCase()})},ja=Qe.dashToCamelCase=function(s){return s=String(s),s.indexOf("-")>=0&&(s=s.replace(/([\-\s])(\w)/g,function(e,t,r){return r.toUpperCase()})),s},n_=Qe.snakeCase=function(e){var e=e.replace(/([\-\s])(\w)/g,"_");return e.replace(/()([A-Z])/g,"_$1",function(t,r,i){return i.toUpperCase()})},Y2=Qe.dasherize=function(s){return s.replace(/([a-z\d])([A-Z])/g,"$1-$2").toLowerCase()},a_=Qe.setterSym=function(s){return Qe.dashToCamelCase("set-"+s)},o_=Qe.quote=function(s){return'"'+s+'"'},Ei=Qe.singlequote=function(s){return"'"+s+"'"},K2=Qe.isValidIdentifier=function(s){return!/[?-\s]/.test(s)&&s[0]!="#"},Js=Qe.toValidIdentifier=function(s){return Fa(s)},l_=Qe.fromValidIdentifier=function(s){return ap(s)},h_=Qe.isSystemIdentifier=function(s){return t_.indexOf(s[0])>=0},q2=Qe.symbolize=function(s,e){return s=String(s),Qe.toValidIdentifier(s);return e&&e.tsc(),s;var t=s.charAt(s.length-1);return t=="?"&&(s="is"+s[0].toUpperCase()+s.slice(1,-1)),s.indexOf("-")>=0&&(s=s.replace(/([\-\s])(\w)/g,function(r,i,n){return n.toUpperCase()})),s},X2=Qe.indent=function(s){return String(s).replace(/^/g," ").replace(/\n/g,`
`).replace(/\n\t$/g,`
`)},W2=Qe.bracketize=function(s,e){return e===void 0&&(e=!0),e&&(s=`
`+Qe.indent(s)+`
`),"{"+s+"}"},Ai=Qe.parenthesize=function(s){return"("+String(s)+")"},uo=Qe.unionOfLocations=function(){for(var s=arguments,e=s.length,t=new Array(e>0?e:0);e>0;)t[e-1]=s[--e];var r=1/0,i=-1/0;for(let n=0,a=$2(t),o=a.length,l;n<o;n++)l=a[n],l&&l._loc!=null&&(l=l._loc),l&&l.loc instanceof Function&&(l=l.loc()),l instanceof Array?(r>l[0]&&(r=l[0]),i<l[0]&&(i=l[1])):(typeof l=="number"||l instanceof Number)&&(r>l&&(r=l),i<l&&(i=l));return[r,i]},Ba=Qe.locationToLineColMap=function(s){for(var e=s.split(/\n/g),t=[],r,i=0,n=0,a=0;r=s[i];)t[i]=[a,n],r==`
`?(a++,n=0):n++,i++;return t[i]=[a,n],t[i+1]=[a,n],t},c_=Qe.markLineColForTokens=function(s,e){return Qe},u_=Qe.parseArgs=function(s,e){var t;e===void 0&&(e={});var r=e.alias||(e.alias={}),i=e.group||(e.group=[]),n=e.schema||{};n.main={};var a={},o={};s=s||process.argv.slice(2);for(var l=null,f=0,h;f<s.length;){var p=s[f];if(f++,h=p.match(/^\-([a-zA-Z]+)(\=\S+)?$/)){l=null;let g=h[1].split("");for(let x=0,m=$2(g),y=m.length,w;x<y;x++){w=m[x];var _=r[w]||w;g[x]=_,a[_]=!0}g.length==1&&(l=g);continue}else if(h=p.match(/^\-\-([a-z0-9\-\_A-Z]+)(\=\S+)?$/)){var d=!0;_=h[1],_.indexOf("no-")==0&&(_=_.substr(3),d=!1),_=Qe.dashToCamelCase(_),h[2]&&(d=h[2].slice(1)),a[_]=d,l=_;continue}else{var b=n[l];l&&n[l]||(l="main"),p.match(/^\d+$/)&&(p=parseInt(p)),d=a[l],d==!0||d==!1?a[l]=p:typeof d=="string"||d instanceof String||typeof d=="number"||d instanceof Number?a[l]=[d].concat(p):d instanceof Array?d.push(p):a[l]=p,b&&b.multi||(l="main")}}for(let g=0,x=$2(i),m=x.length;g<m;g++){let y=Qe.dashToCamelCase(x[g]);for(let w,C=0,A=Object.keys(a),I=A.length,S;C<I;C++)if(S=A[C],w=a[S],S.indexOf(y)==0){let T=S.substr(y.length).replace(/^\w/,function(L){return L.toLowerCase()});T?(a[y]||(a[y]={}),a[y][T]=w):a[y]||(a[y]={})}}return(typeof(t=a.env)=="string"||t instanceof String)&&(a["ENV_"+a.env]=!0),a},f_=Qe.printExcerpt=function(s,e,t){(!t||t.constructor!==Object)&&(t={});var r=t.hl!==void 0?t.hl:!1,i=t.gutter!==void 0?t.gutter:!0,n=t.type!==void 0?t.type:"warn",a=t.pad!==void 0?t.pad:2,o=s.split(/\n/g),l=Qe.locationToLineColMap(s),f=l[e[0]]||[0,0],h=f[0],p=f[1],_=o[h],d=Math.max(0,h-a),b=Math.min(d+a+1+a,o.length);let g=h-d;for(var x=d,m=[];x<b;)m.push(o[x++]);var y=m;return i&&(y=y.map(function(C,A){let I=""+(d+A+1),S;for(;I.length<String(b).length;)I=" "+I;return A==g?(S=" -> "+I+" | "+C,r&&(S=dr.f(r,S))):(S=" "+I+" | "+C,r&&(S=dr.f("gray",S))),S})),y.join(`
`)},p_=Qe.printWarning=function(s,e){let t=e.message,r=Qe.printExcerpt(s,e.loc,{hl:"whiteBright",type:"warn",pad:1});return t+`
`+r},fo=Qe.identifierForPath=function(s){let e=tp(s).toString(36);return e[0].match(/\d/)&&(e="z"+e),e},d_=Qe.isPlainObject=function(s){return typeof s=="object"&&Object.getPrototypeOf(s)==Object.prototype},__=Qe.deepAssign=function(s,e){for(let t,r=0,i=Object.keys(e),n=i.length,a;r<n;r++){a=i[r],t=e[a];let o=s[a];Qe.isPlainObject(o)&&Qe.isPlainObject(t)?Qe.deepAssign(o,t):s[a]=t}return s},J2=Qe.computeLineOffsets=function(s,e,t){t===void 0&&(t=0);for(var r=e?[t]:[],i=0;i<s.length;){var n=s.charCodeAt(i);(n===13||n===10)&&(n===13&&i+1<s.length&&s.charCodeAt(i+1)===10&&i++,r.push(t+i+1)),i++}return r},Si=class{constructor(e,t,r,i=null){this.line=e,this.character=t,this.offset=r}toString(){return this.line+":"+this.character}valueOf(){return this.offset}},Pa=class{constructor(e,t){this.start=e,this.end=t}get offset(){return this.start.offset}get length(){return this.end.offset-this.start.offset}get 0(){return this.start.offset}get 1(){return this.end.offset}getText(e){return e.slice(this.start,this.end)}equals(e){return e.offset==this.offset&&e.length==this.length}},yn={Error:1,Warning:2,Information:3,Hint:4,error:1,warning:2,warn:2,info:3,hint:4},sp=new WeakMap,Va=class{constructor(e,t=null){this.range=e.range,this.severity=yn[e.severity]||e.severity,this.code=e.code,this.source=e.source,this.message=e.message,sp.set(this,t)}get sourceDocument(){return sp.get(this)}toSnippet(){let e=this.sourceDocument,t=this.range.start,r=this.range.end,i=e.sourcePath+":"+(t.line+1)+":"+(t.character+1)+": "+this.message,n=e.doc.getLineText(t.line),a=r.line==t.line?r.character:n.length,o=Math.max(a-t.character,1),l=[i,n];return l.push(n.replace(/[^\t]/g," ").slice(0,t.character)+"^".repeat(o)),l.join(`
`).replace(/\t/g," ")+`
`}toError(){let e=this.range.start,t=this.sourceDocument.sourcePath+":"+(e.line+1)+":"+(e.character+1)+": "+this.message,r=new SyntaxError(t);return r.stack=`
`+this.toSnippet(),r}raise(){throw this.toError()}};var _r={},Qr={},k8=Qr.TERMINATOR=1,T8=Qr.IDENTIFIER=Qr.IVAR=2,S8=Qr.CONST=3,E8=Qr.VAR=4,A8=Qr.IF=5,I8=Qr.ELSE=6,N8=Qr.DEF=7;function et(s,e,t,r){return this._type=s,this._value=e,this._loc=t!=null?t:-1,this._len=r!=null?r:this._value.length,this._meta=null,this.generated=!1,this.newLine=!1,this.spaced=!1,this.call=!1,this}et.prototype.type=function(){return this._type};et.prototype.value=function(){return this._value};et.prototype.traverse=function(){};et.prototype.match=function(s){return this._value.match(s)};et.prototype.c=function(){return""+this._value};et.prototype.prepend=function(s){return this._value=s+this._value,this};et.prototype.toString=function(){return this._value};et.prototype.charAt=function(s){return this._value.charAt(s)};et.prototype.slice=function(s){return this._value.slice(s)};et.prototype.cloneSlice=function(s,e){return new et(e||this._type,this.slice(s),this._loc+s,this._len-s)};et.prototype.region=function(){return[this._loc,this._loc+this._len]};et.prototype.startLoc=function(){return this._loc};et.prototype.endLoc=function(){return this._loc+this._len};et.prototype.loc=function(){return[this._loc,this.endLoc()]};var lp=_r.lex=function(){var s=this.tokens[this.pos++],e;return s?(e=s._type,this.yytext=s):e="",e},Er=_r.token=function(s,e){return new et(s,e,-1,0)},hp=_r.typ=function(s){return s._type},cp=_r.val=function(s){return s._value},R8=_r.line=function(s){return s._line},O8=_r.loc=function(s){return s._loc},po=_r.setTyp=function(s,e){return s._type=e},up=_r.setVal=function(s,e){return s._value=e},L8=_r.setLine=function(s,e){return s._line=e},C8=_r.setLoc=function(s,e){return s._loc=e},m_=new et("{","{",0,0,0),g_=new et("}","}",0,0,0),v_=new et("(","(",0,0,0),y_=new et(")",")",0,0,0);m_.generated=!0;g_.generated=!0;v_.generated=!0;y_.generated=!0;var M8=new et("INDENT","2",0,0,0),fp=new et("OUTDENT","2",0,0,0);var ih={};vn(ih,{ALL_KEYWORDS:()=>x_,ASSIGNMENT_OPERATORS:()=>eh,BALANCED_PAIRS:()=>Ii,BITWISE_OPERATORS:()=>Q2,HEREGEX:()=>sh,HEREGEX_OMIT:()=>th,HEX_REGEX:()=>T_,INVERSES:()=>Zs,OPERATOR_ALIASES:()=>k_,SYSVAR_PREFIX:()=>S_,TAG_GLOBAL_ATTRIBUTES:()=>rh,TAG_NAMES:()=>ei,TAG_TYPES:()=>za,TOK:()=>w_});function b_(s){return s?s.toArray?s.toArray():s:[]}var Ii=[["(",")"],["[","]"],["{","}"],["{{","}}"],["INDENT","OUTDENT"],["CALL_START","CALL_END"],["PARAM_START","PARAM_END"],["INDEX_START","INDEX_END"],["TAG_START","TAG_END"],["STYLE_START","STYLE_END"],["BLOCK_PARAM_START","BLOCK_PARAM_END"]],Q2={"|":!0,"&":!0,"!&":!0,"~":!0,"|=":!0,"&=":!0,"~=":!0,"^=":!0,"^":!0,"<<":!0,"<<=":!0,">>":!0,">>=":!0},eh={"=":!0,"=?":!0,"??=":!0,"||=":!0,"&&=":!0,"|=":!0,"|=?":!0,"&=":!0,"&=?":!0,"^=":!0,"^=?":!0,"~=":!0,"~=?":!0},Zs={};for(let s=0,e=Ii.length,t;s<e;s++)t=Ii[s],_o=t[0],mo=t[1],Zs[mo]=_o,Zs[_o]=mo,Ii[_o]=mo;var _o,mo,x_=["true","false","null","this","delete","typeof","in","instanceof","throw","break","continue","debugger","if","else","switch","for","while","do","try","catch","finally","class","extends","super","return","undefined","then","unless","until","loop","of","by","when","def","tag","do","elif","begin","var","let","self","await","import","and","or","is","isnt","not","yes","no","isa","case","nil","require"],w_={TERMINATOR:"TERMINATOR",INDENT:"INDENT",OUTDENT:"OUTDENT",DEF_BODY:"DEF_BODY",THEN:"THEN",CATCH:"CATCH"},k_={and:"&&",or:"||",is:"==",isnt:"!=",isa:"instanceof"},th=/\s+(?:#.*)?/g,sh=/^\/{3}([\s\S]+?)\/{3}([a-z]{0,8})(?!\w)/,T_=/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6}([A-Fa-f0-9]{2})?)$/,rh={itemid:1,itemprop:1,itemref:1,itemscope:1,itemtype:1,enterkeyhint:1,autofocus:1,autocapitalize:1,autocomplete:1,accesskey:1,inputmode:1,spellcheck:1,translate:1,is:1},S_={TAG:"τ",FLIP:"ω",VALUE:"υ",CACHE:"ρ",KEY:"κ",ANY:"φ",B:"Θ",T:"τ",C:"ρ",V:"υ",K:"κ",D:"Δ"},za={"":[-1,{id:1,className:"class",slot:1,part:1,elementTiming:"elementtiming"}],HTML:[-1,{title:1,lang:1,translate:1,dir:1,accessKey:"accesskey",draggable:1,spellcheck:1,autocapitalize:1,inputMode:"inputmode",style:1,tabIndex:"tabindex",enterKeyHint:"enterkeyhint"}],HTMLAnchor:[1,{target:1,download:1,ping:1,rel:1,relList:"rel",hreflang:1,type:1,referrerPolicy:"referrerpolicy",coords:1,charset:1,name:1,rev:1,shape:1,href:1}],HTMLArea:[1,{alt:1,coords:1,download:1,shape:1,target:1,ping:1,rel:1,relList:"rel",referrerPolicy:"referrerpolicy",href:1}],HTMLMedia:[1,{src:1,crossOrigin:"crossorigin",preload:1,controlsList:"controlslist"}],HTMLAudio:[4,{}],HTMLBase:[1,{href:1,target:1}],HTMLQuote:[1,{cite:1}],HTMLBody:[1,{text:1,link:1,vLink:"vlink",aLink:"alink",bgColor:"bgcolor",background:1}],HTMLBR:[1,{clear:1}],HTMLButton:[1,{formAction:"formaction",formEnctype:"formenctype",formMethod:"formmethod",formTarget:"formtarget",name:1,type:1,value:1}],HTMLCanvas:[1,{width:1,height:1}],HTMLTableCaption:[1,{align:1}],HTMLTableCol:[1,{span:1,align:1,ch:"char",chOff:"charoff",vAlign:"valign",width:1}],HTMLData:[1,{value:1}],HTMLDataList:[1,{}],HTMLMod:[1,{cite:1,dateTime:"datetime"}],HTMLDetails:[1,{}],HTMLDialog:[1,{}],HTMLDiv:[1,{align:1}],HTMLDList:[1,{}],HTMLEmbed:[1,{src:1,type:1,width:1,height:1,align:1,name:1}],HTMLFieldSet:[1,{name:1}],HTMLForm:[1,{acceptCharset:"accept-charset",action:1,autocomplete:1,enctype:1,encoding:"enctype",method:1,name:1,target:1}],HTMLHeading:[1,{align:1}],HTMLHead:[1,{}],HTMLHR:[1,{align:1,color:1,size:1,width:1}],HTMLHtml:[1,{version:1}],HTMLIFrame:[1,{src:1,srcdoc:1,name:1,sandbox:1,width:1,height:1,referrerPolicy:"referrerpolicy",csp:1,allow:1,align:1,scrolling:1,frameBorder:"frameborder",longDesc:"longdesc",marginHeight:"marginheight",marginWidth:"marginwidth",loading:1}],HTMLImage:[1,{alt:1,src:1,srcset:1,sizes:1,crossOrigin:"crossorigin",useMap:"usemap",width:1,height:1,referrerPolicy:"referrerpolicy",decoding:1,name:1,lowsrc:1,align:1,hspace:1,vspace:1,longDesc:"longdesc",border:1,loading:1}],HTMLInput:[1,{accept:1,alt:1,autocomplete:1,dirName:"dirname",formAction:"formaction",formEnctype:"formenctype",formMethod:"formmethod",formTarget:"formtarget",height:1,max:1,maxLength:"maxlength",min:1,minLength:"minlength",name:1,pattern:1,placeholder:1,src:1,step:1,type:1,defaultValue:"value",width:1,align:1,useMap:"usemap"}],HTMLLabel:[1,{htmlFor:"for"}],HTMLLegend:[1,{align:1}],HTMLLI:[1,{value:1,type:1}],HTMLLink:[1,{href:1,crossOrigin:"crossorigin",rel:1,relList:"rel",media:1,hreflang:1,type:1,as:1,referrerPolicy:"referrerpolicy",sizes:1,imageSrcset:"imagesrcset",imageSizes:"imagesizes",charset:1,rev:1,target:1,integrity:1}],HTMLMap:[1,{name:1}],HTMLMenu:[1,{}],HTMLMeta:[1,{name:1,httpEquiv:"http-equiv",content:1,scheme:1}],HTMLMeter:[1,{value:1,min:1,max:1,low:1,high:1,optimum:1}],HTMLObject:[1,{data:1,type:1,name:1,useMap:"usemap",width:1,height:1,align:1,archive:1,code:1,hspace:1,standby:1,vspace:1,codeBase:"codebase",codeType:"codetype",border:1}],HTMLOList:[1,{start:1,type:1}],HTMLOptGroup:[1,{label:1}],HTMLOption:[1,{label:1,value:1}],HTMLOutput:[1,{htmlFor:"for",name:1}],HTMLParagraph:[1,{align:1}],HTMLParam:[1,{name:1,value:1,type:1,valueType:"valuetype"}],HTMLPicture:[1,{}],HTMLPre:[1,{width:1}],HTMLProgress:[1,{value:1,max:1}],HTMLScript:[1,{src:1,type:1,charset:1,crossOrigin:"crossorigin",referrerPolicy:"referrerpolicy",event:1,htmlFor:"for",integrity:1}],HTMLSelect:[1,{autocomplete:1,name:1,size:1}],HTMLSlot:[1,{name:1}],HTMLSource:[1,{src:1,type:1,srcset:1,sizes:1,media:1}],HTMLSpan:[1,{}],HTMLStyle:[1,{media:1,type:1}],HTMLTable:[1,{align:1,border:1,frame:1,rules:1,summary:1,width:1,bgColor:"bgcolor",cellPadding:"cellpadding",cellSpacing:"cellspacing"}],HTMLTableSection:[1,{align:1,ch:"char",chOff:"charoff",vAlign:"valign"}],HTMLTableCell:[1,{colSpan:"colspan",rowSpan:"rowspan",headers:1,align:1,axis:1,height:1,width:1,ch:"char",chOff:"charoff",vAlign:"valign",bgColor:"bgcolor",abbr:1,scope:1}],HTMLTemplate:[1,{}],HTMLTextArea:[1,{autocomplete:1,cols:1,dirName:"dirname",maxLength:"maxlength",minLength:"minlength",name:1,placeholder:1,rows:1,wrap:1}],HTMLTime:[1,{dateTime:"datetime"}],HTMLTitle:[1,{}],HTMLTableRow:[1,{align:1,ch:"char",chOff:"charoff",vAlign:"valign",bgColor:"bgcolor"}],HTMLTrack:[1,{kind:1,src:1,srclang:1,label:1}],HTMLUList:[1,{type:1}],HTMLVideo:[4,{width:1,height:1,poster:1}],SVG:[-1,{}],SVGGraphics:[66,{transform:1}],SVGA:[67,{}],SVGAnimation:[66,{}],SVGAnimate:[69,{}],SVGAnimateMotion:[69,{}],SVGAnimateTransform:[69,{}],SVGGeometry:[67,{}],SVGCircle:[73,{cx:1,cy:1,r:1}],SVGClipPath:[67,{clipPathUnits:1}],SVGDefs:[67,{}],SVGDesc:[66,{}],SVGDiscard:[66,{}],SVGEllipse:[73,{cx:1,cy:1,rx:1,ry:1}],SVGFEBlend:[66,{mode:1,x:1,y:1,width:1,height:1}],SVGFEColorMatrix:[66,{type:1,values:1,x:1,y:1,width:1,height:1}],SVGFEComponentTransfer:[66,{x:1,y:1,width:1,height:1}],SVGFEComposite:[66,{operator:1,x:1,y:1,width:1,height:1}],SVGFEConvolveMatrix:[66,{orderX:1,orderY:1,kernelMatrix:1,divisor:1,edgeMode:1,x:1,y:1,width:1,height:1}],SVGFEDiffuseLighting:[66,{surfaceScale:1,diffuseConstant:1,x:1,y:1,width:1,height:1}],SVGFEDisplacementMap:[66,{xChannelSelector:1,yChannelSelector:1,x:1,y:1,width:1,height:1}],SVGFEDistantLight:[66,{}],SVGFEDropShadow:[66,{dx:1,dy:1,stdDeviationX:1,stdDeviationY:1,x:1,y:1,width:1,height:1}],SVGFEFlood:[66,{x:1,y:1,width:1,height:1}],SVGComponentTransferFunction:[66,{type:1,tableValues:1,slope:1,amplitude:1,exponent:1}],SVGFEFuncA:[90,{}],SVGFEFuncB:[90,{}],SVGFEFuncG:[90,{}],SVGFEFuncR:[90,{}],SVGFEGaussianBlur:[66,{x:1,y:1,width:1,height:1}],SVGFEImage:[66,{preserveAspectRatio:1,x:1,y:1,width:1,height:1}],SVGFEMerge:[66,{x:1,y:1,width:1,height:1}],SVGFEMergeNode:[66,{}],SVGFEMorphology:[66,{operator:1,x:1,y:1,width:1,height:1}],SVGFEOffset:[66,{x:1,y:1,width:1,height:1}],SVGFEPointLight:[66,{}],SVGFESpecularLighting:[66,{surfaceScale:1,specularConstant:1,specularExponent:1,x:1,y:1,width:1,height:1}],SVGFESpotLight:[66,{specularExponent:1}],SVGFETile:[66,{x:1,y:1,width:1,height:1}],SVGFETurbulence:[66,{numOctaves:1,stitchTiles:1,type:1,x:1,y:1,width:1,height:1}],SVGFilter:[66,{filterUnits:1,primitiveUnits:1,x:1,y:1,width:1,height:1}],SVGForeignObject:[67,{x:1,y:1,width:1,height:1}],SVGG:[67,{}],SVGImage:[67,{x:1,y:1,width:1,height:1,preserveAspectRatio:1}],SVGLine:[73,{x1:1,y1:1,x2:1,y2:1}],SVGGradient:[66,{gradientUnits:1,gradientTransform:1,spreadMethod:1}],SVGLinearGradient:[111,{x1:1,y1:1,x2:1,y2:1}],SVGMarker:[66,{refX:1,refY:1,markerUnits:1,markerWidth:1,markerHeight:1,orientType:1,orientAngle:1,viewBox:1,preserveAspectRatio:1}],SVGMask:[66,{maskUnits:1,maskContentUnits:1,x:1,y:1,width:1,height:1}],SVGMetadata:[66,{}],SVGMPath:[66,{}],SVGPath:[73,{}],SVGPattern:[66,{patternUnits:1,patternContentUnits:1,patternTransform:1,x:1,y:1,width:1,height:1,viewBox:1,preserveAspectRatio:1}],SVGPolygon:[73,{}],SVGPolyline:[73,{}],SVGRadialGradient:[111,{cx:1,cy:1,r:1,fx:1,fy:1,fr:1}],SVGRect:[73,{x:1,y:1,width:1,height:1,rx:1,ry:1}],SVGScript:[66,{}],SVGSet:[69,{}],SVGStop:[66,{}],SVGStyle:[66,{}],SVGSVG:[67,{x:1,y:1,width:1,height:1,viewBox:1,preserveAspectRatio:1}],SVGSwitch:[67,{}],SVGSymbol:[66,{viewBox:1,preserveAspectRatio:1}],SVGTextContent:[67,{textLength:1,lengthAdjust:1}],SVGTextPositioning:[130,{x:1,y:1,dx:1,dy:1,rotate:1}],SVGText:[131,{}],SVGTextPath:[130,{startOffset:1,method:1,spacing:1}],SVGTitle:[66,{}],SVGTSpan:[131,{}],SVGUse:[67,{x:1,y:1,width:1,height:1}],SVGView:[66,{viewBox:1,preserveAspectRatio:1}]},ei={a:2,abbr:1,address:1,area:3,article:1,aside:1,audio:5,b:1,base:6,bdi:1,bdo:1,blockquote:7,body:8,br:9,button:10,canvas:11,caption:12,cite:1,code:1,col:13,colgroup:13,data:14,datalist:15,dd:1,del:16,details:17,dfn:1,dialog:18,div:19,dl:20,dt:1,em:1,embed:21,fieldset:22,figcaption:1,figure:1,footer:1,form:23,h1:24,h2:24,h3:24,h4:24,h5:24,h6:24,head:25,header:1,hgroup:1,hr:26,html:27,i:1,iframe:28,img:29,input:30,ins:16,kbd:1,label:31,legend:32,li:33,link:34,main:1,map:35,mark:1,menu:36,meta:37,meter:38,nav:1,noscript:1,object:39,ol:40,optgroup:41,option:42,output:43,p:44,param:45,picture:46,pre:47,progress:48,q:7,rp:1,rt:1,ruby:1,s:1,samp:1,script:49,section:1,select:50,slot:51,small:1,source:52,span:53,strike:1,strong:1,style:54,sub:1,summary:1,sup:1,table:55,tbody:56,td:57,template:58,textarea:59,tfoot:56,th:57,thead:56,time:60,title:61,tr:62,track:63,u:1,ul:64,var:1,video:65,wbr:1,svg_a:68,svg_animate:70,svg_animateMotion:71,svg_animateTransform:72,svg_audio:66,svg_canvas:66,svg_circle:74,svg_clipPath:75,svg_defs:76,svg_desc:77,svg_discard:78,svg_ellipse:79,svg_feBlend:80,svg_feColorMatrix:81,svg_feComponentTransfer:82,svg_feComposite:83,svg_feConvolveMatrix:84,svg_feDiffuseLighting:85,svg_feDisplacementMap:86,svg_feDistantLight:87,svg_feDropShadow:88,svg_feFlood:89,svg_feFuncA:91,svg_feFuncB:92,svg_feFuncG:93,svg_feFuncR:94,svg_feGaussianBlur:95,svg_feImage:96,svg_feMerge:97,svg_feMergeNode:98,svg_feMorphology:99,svg_feOffset:100,svg_fePointLight:101,svg_feSpecularLighting:102,svg_feSpotLight:103,svg_feTile:104,svg_feTurbulence:105,svg_filter:106,svg_foreignObject:107,svg_g:108,svg_iframe:66,svg_image:109,svg_line:110,svg_linearGradient:112,svg_marker:113,svg_mask:114,svg_metadata:115,svg_mpath:116,svg_path:117,svg_pattern:118,svg_polygon:119,svg_polyline:120,svg_radialGradient:121,svg_rect:122,svg_script:123,svg_set:124,svg_stop:125,svg_style:126,svg_svg:127,svg_switch:128,svg_symbol:129,svg_text:132,svg_textPath:133,svg_title:134,svg_tspan:135,svg_unknown:66,svg_use:136,svg_video:66,svg_view:137},Z2=Object.keys(za);for(let s=0,e=b_(Z2),t=e.length,r;s<t;s++){r=e[s];let i=za[r];i.up=za[Z2[i[0]]],i.name=r+"Element"}for(let s,e=0,t=Object.keys(ei),r=t.length,i;e<r;e++)i=t[e],s=ei[i],ei[i]=za[Z2[s]];function dp(s,e){for(var t=0,r=s.length-1;r>=0;r--){var i=s[r];i==="."?s.splice(r,1):i===".."?(s.splice(r,1),t++):t&&(s.splice(r,1),t--)}if(e)for(;t--;t)s.unshift("..");return s}var E_=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,nh=function(s){return E_.exec(s).slice(1)};function Ha(){for(var s="",e=!1,t=arguments.length-1;t>=-1&&!e;t--){var r=t>=0?arguments[t]:"/";if(typeof r!="string")throw new TypeError("Arguments to path.resolve must be strings");if(!r)continue;s=r+"/"+s,e=r.charAt(0)==="/"}return s=dp(oh(s.split("/"),function(i){return!!i}),!e).join("/"),(e?"/":"")+s||"."}function _p(s){var e=mp(s),t=R_(s,-1)==="/";return s=dp(oh(s.split("/"),function(r){return!!r}),!e).join("/"),!s&&!e&&(s="."),s&&t&&(s+="/"),(e?"/":"")+s}function mp(s){return s.charAt(0)==="/"}function A_(){var s=Array.prototype.slice.call(arguments,0);return _p(oh(s,function(e,t){if(typeof e!="string")throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))}function $a(s,e){s=Ha(s).substr(1),e=Ha(e).substr(1);function t(f){for(var h=0;h<f.length&&f[h]==="";h++);for(var p=f.length-1;p>=0&&f[p]==="";p--);return h>p?[]:f.slice(h,p-h+1)}for(var r=t(s.split("/")),i=t(e.split("/")),n=Math.min(r.length,i.length),a=n,o=0;o<n;o++)if(r[o]!==i[o]){a=o;break}for(var l=[],o=a;o<r.length;o++)l.push("..");return l=l.concat(i.slice(a)),l.join("/")}var ah="/",I_=":";function Ua(s){var e=nh(s),t=e[0],r=e[1];return!t&&!r?".":(r&&(r=r.substr(0,r.length-1)),t+r)}function go(s,e){var t=nh(s)[2];return e&&t.substr(-1*e.length)===e&&(t=t.substr(0,t.length-e.length)),t}function N_(s){return nh(s)[3]}var gp={extname:N_,basename:go,dirname:Ua,sep:ah,delimiter:I_,relative:$a,join:A_,isAbsolute:mp,normalize:_p,resolve:Ha};function oh(s,e){if(s.filter)return s.filter(e);for(var t=[],r=0;r<s.length;r++)e(s[r],r,s)&&t.push(s[r]);return t}var R_="ab".substr(-1)==="b"?function(s,e,t){return s.substr(e,t)}:function(s,e,t){return e<0&&(e=s.length+e),s.substr(e,t)};var Ds=class{static strip(e){return e.indexOf("/*%")<0?e:e.replace(/\/\*\%([\w\|]*)\$\*\//g,"")}static run(e,t={}){return e.indexOf("/*%")<0?{code:e,map:null,toString(){return this.code}}:{code:e.replace(/\/\*\%([\w\|]*)\$\*\//g,""),map:null,toString(){return this.code}}}};var lh=Symbol.for("#lineOffsets"),hh={TOKENIZE:1,REWRITE:2,PARSE:4,TRAVERSE:8,COMPILE:16};var bs=class s{static current;static error(e){var t,r;return(r=(t=this.current)==null?void 0:t.addDiagnostic)==null?void 0:r.call(t,"error",e)}static warn(e){var t,r;return(r=(t=this.current)==null?void 0:t.addDiagnostic)==null?void 0:r.call(t,"warning",e)}static info(e){var t,r;return(r=(t=this.current)==null?void 0:t.addDiagnostic)==null?void 0:r.call(t,"info",e)}static deserialize(e,t={}){return new s("",t).deserialize(e)}constructor(e,t){this.sourceCode=e,this.sourcePath=t.sourcePath,this.options=t,this.flags=0,this.js="",this.css="",this.result={},this.diagnostics=[],this.tokens=null,this.ast=null}step(e){return(this.flags&e)==e?!1:(this.flags|=e,!0)}deserialize(e){let t;try{t=JSON.parse(e)}catch(r){throw console.log("failed",e,this.options),r}return this.rawResult=t,this.deserialized=t,this}serialize(){if(this.rawResult)return JSON.stringify(this.rawResult,null,2)}tokenize(){if(this.step(hh.TOKENIZE))try{s.current=this,this.lexer.reset(),this.tokens=this.lexer.tokenize(this.sourceCode,this.options,this),this.tokens=this.rewriter.rewrite(this.tokens,this.options,this)}catch{}return this.tokens}parse(){if(this.tokenize(),this.step(hh.PARSE)&&!this.errored){s.current=this;try{this.ast=this.parser.parse(this.tokens,this)}catch{}}return this}compile(){return this.parse(),this.step(hh.COMPILE)&&(this.errored||(s.current=this,this.result=this.ast.compile(this.options,this)),this.options.raiseErrors&&this.raiseErrors()),this}recompile(e={}){if(this.deserialized){let t=this.deserialized.js,r={};return r.js=Ds.run(t,e),r.css=Ds.run(this.deserialized.css||"",e),e.styles=="import"&&r.css.code&&(r.js.code+=`
import './`+gp.basename(this.sourcePath)+".css'"),r}return{js:this.js}}addDiagnostic(e,t){t.severity||(t.severity=e);let r=new Va(t,this);return this.diagnostics.push(r),r}get tsc(){return this.options.tsc||this.options.platform==="tsc"}get errored(){return this.errors.length>0}get errors(){return this.diagnostics.filter(e=>e.severity==yn.Error)}get warnings(){return this.diagnostics.filter(e=>e.severity==yn.Warning)}get info(){return this.diagnostics.filter(e=>e.severity==yn.Information)}get doc(){return this}get lineOffsets(){return this[lh]||(this[lh]=J2(this.sourceCode,!0,0))}getLineText(e){let t=this.lineOffsets[e],r=this.lineOffsets[e+1];return this.sourceCode.substring(t,r).replace(/[\r\n]/g,"")}positionAt(e){if(e instanceof Si)return e;typeof e=="object"&&(e=e.offset),e=Math.max(Math.min(e,this.sourceCode.length),0);let t=this.lineOffsets,r=0,i=t.length;if(i===0)return new Si(0,e,e);for(;r<i;){let a=Math.floor((r+i)/2);t[a]>e?i=a:r=a+1}let n=r-1;return new Si(n,e-t[n],e)}offsetAt(e){if(e.offset!==void 0)return e.offset;let t=this.lineOffsets;if(e.line>=t.length)return this.sourceCode.length;if(e.line<0)return 0;let r=t[e.line],i=e.line+1<t.length?t[e.line+1]:this.sourceCode.length;return e.offset=Math.max(Math.min(r+e.character,i),r)}rangeAt(e,t){return new Pa(this.positionAt(e),this.positionAt(t))}toString(){return this.js}raiseErrors(){if(this.errors.length)throw this.errors[0].toError();return this}};function yp(s,e){for(var t in e)e.hasOwnProperty(t)&&(s[t]=e[t]);s.prototype=Object.create(e.prototype),s.__super__=s.prototype.__super__=e.prototype,s.prototype.initialize=s.prototype.constructor=s}var bp=new WeakMap;function zt(s,e){var t;this.error=s,this._options=e||{},this.severity=this._options.severity||"error";let r=s.message;(t=r.match(/Unexpected '([\w\-]+)'/))&&t[1]=="TERMINATOR"&&(r="Unexpected newline"),this.message=r,this.sourcePath=s.sourcePath,this.line=s.line}yp(zt,Error);zt.wrap=function(s){return new this(s)};Object.defineProperty(zt.prototype,"_options",{get:function(){return bp.get(this)},configurable:!0});Object.defineProperty(zt.prototype,"_options",{set:function(s){return bp.set(this,s)},configurable:!0});zt.prototype.set=function(s){this._options||(this._options={});for(let e,t=0,r=Object.keys(s),i=r.length,n;t<i;t++)n=r[t],e=s[n],this._options[n]=e;return this};zt.prototype.start=function(){for(var s=this._options,e=s.pos-1,t=s.tokens&&s.tokens[e];t&&(t._loc==-1||t._loc==0||t._len==0);)t=s.tokens[--e];return t};Object.defineProperty(zt.prototype,"token",{get:function(){if(this._token)return this._token;for(var s=this._options,e=s.pos-1,t=s.tokens&&s.tokens[e];t&&(t._loc==-1||t._loc==0||t._len==0);)t=s.tokens[--e];return this._token=t},configurable:!0});zt.prototype.desc=function(){var s=this._options;let e=this.message;return s.token&&s.token._loc==-1?"Syntax Error":e};zt.prototype.loc=function(){var s;return this._loc||(s=this.start())&&s.region&&s.region()};zt.prototype.toJSON=function(){var s=this._options,e=this.start();return{warn:!0,message:this.desc(),loc:this.loc()}};zt.prototype.toNativeError=function(){let s=new SyntaxError("hello");return s.fileName=this._sourcePath,s.message=this.message,s.stack=this.excerpt({colors:!1,details:!0}),s.lineNumber=this.lineNumber,s.columnNumber=this.columnNumber,s};zt.prototype.excerpt=function(s){(!s||s.constructor!==Object)&&(s={});var e=s.gutter!==void 0?s.gutter:!0,t=s.colors!==void 0?s.colors:!1,r=s.details!==void 0?s.details:!0;try{var i=this._code,n=this.loc(),a=i.split(/\n/g),o=Ba(i),l=o[n[0]]||[0,0],f=l[0],h=l[1],p=a[f];this.lineNumber=f+1,this.columnNumber=h;var _=Math.max(0,f-2),d=Math.min(_+5,a.length);let y=f-_;var b=_,g=function(w){return w};if(t){let w=this.severity=="warn"?"yellow":"red";(typeof t=="string"||t instanceof String)&&(w=t),g=function(C){return dr[w](dr.bold(C))}}for(var x=[];b<d;)x.push(p=a[b++]);var m=x;return e&&(m=m.map(function(w,C){let A=""+(_+C+1);for(;A.length<String(d).length;)A=" "+A;return C==y?" -> "+A+" | "+w:" "+A+" | "+w})),m[y]=g(m[y]),r&&m.unshift(g(this.message)),m.join(`
`)+`
`}catch{return""}};zt.prototype.prettyMessage=function(){var s;return s=this.excerpt()};function bn(){return zt.apply(this,arguments)}yp(bn,zt);bn.prototype.loc=function(){return this._loc};bn.prototype.excerpt=function(){var s=bn.prototype.__super__.excerpt.apply(this,arguments);return s+`
---
`+this.error.stack};function O_(s){return s&&(s.len instanceof Function?s.len():s.length)||0}function ti(s){return s?s.toArray?s.toArray():s:[]}function At(s){var e=Object.create(null);for(let t=0,r=ti(s),i=r.length;t<i;t++)e[r[t]]=1;return e}function L_(s,e){for(var t in e)e.hasOwnProperty(t)&&(s[t]=e[t]);s.prototype=Object.create(e.prototype),s.__super__=s.prototype.__super__=e.prototype,s.prototype.initialize=s.prototype.constructor=s}var Ni=et;var C_=["true","false","null","this","delete","typeof","in","instanceof","throw","break","continue","debugger","if","else","switch","for","while","do","try","catch","finally","class","extends","super","return","yield"],Tp={",":1,"\n":1,")":1,"]":1,"}":1,">":1," ":1},Sp=/\w|\]|\)$/;var xp={LET:{global:1,declare:1,static:1},CONST:{global:1,declare:1,static:1},VAR:{global:1,declare:1,static:1},CLASS:{global:1,declare:1,static:1,extend:1,strict:1,abstract:1,mixin:1},MIXIN:{global:1,declare:1,extend:1,strict:1,abstract:1},INTERFACE:{global:1,declare:1,extend:1,strict:1,mixin:1},TAG:{global:1,declare:1,local:1,extend:1,strict:1,abstract:1},DEF:{global:1,declare:1,protected:1},PROP:{static:1},ATTR:{static:1},CSS:{global:1,export:1}},M_={DEF:1,PROP:1,ATTR:1},Ep=["true","false","null","this","self","delete","typeof","in","instanceof","throw","break","continue","debugger","if","else","switch","for","while","do","try","catch","finally","class","extends","super","return","undefined","then","unless","until","loop","of","by","when","def","tag","do","elif","begin","var","let","const","await","import","and","or","is","isnt","not","yes","no","isa","case","nil","module","export","static","extend","yield"],D_=At(Ep),wp=At(Ep.concat(["mixin","guard","alter","watch","css","interface","attr","prop","get","set","constructor","declare"])),P_=At(["default","type","from","as","new","arguments"]),V_=["case","default","function","void","with","const","enum","native"];var U8=C_.concat(V_);var F_=/^((\$|##|#|@@|@|\%)[\$\wA-Za-z_\-\x7f-\uffff][$\w\x7f-\uffff]*(\-[$\w\x7f-\uffff]+)*[\?]?|[$A-Za-z_][$\w\x7f-\uffff]*(\-[$\w\x7f-\uffff]+)*[\?]?)([^\n\S]*:)?/,G_=/^import\s+(\{?[^\"\'\}]+\}?)(?=\s+from\s+)/;var j_=/^(\<)(?=[A-Za-z\#\.\%\$\[\{\@\>\(])/,Ap=/^(\w[\w\d]*:)?(\w[\w\d]*)(-[\w\d]+)*/,B_=/^#((\w[\w\d]*)(-[\w\d]+)*)/;var z_=/^([%\$]{1,2})([\(])/;var H_=/^\:((([\*\@$\w\x7f-\uffff]+)+([\-\\\:][\w\x7f-\uffff]+)*)|==|\<=\>)/,$_=/^\#[\w\-]+/,U_=/^(\-?\d*\.?\d+)([A-Za-z]+|\%)?(?![\d\w])/,Y_=/^[\w\-\$]*\w[\w\-\$]*/,K_=/^url\(([^\)]*)\)/;var ch=function(s){return s>=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122||s==95},q_=function(s){return ch(s)||s==45||s==36||s==64||s==46||s==33||s==35||s==94},X_=function(s){return s>=9&&s<=13||s==32||s==160||s==5760||s==65279||s==8232||s==8233||s==8239||s==8287||s==12288||s>=8192&&s<=8202},Ip=function(s,e){e===void 0&&(e=0);for(var t=e,r=s.length;t<r&&q_(s.charCodeAt(t));)t++;if(t==e)return 0;if(s.charCodeAt(t)==58&&s.charCodeAt(t+1)!=58)return t-e;for(var i=t;i<r&&X_(s.charCodeAt(i));)i++;return s.charCodeAt(i)==61?t-e:0},W_=function(s,e){var t=e.charCodeAt(0);if(ch(t)||t==94||t==37||t==42||t==38||t==36||t==62||t==47||t==46||t==91||t==64||t==33)return!0;if(t==35){let r=s.charCodeAt(1);return ch(r)||r==45}return t==58&&s.charCodeAt(1)==58},J_=/^0x[\da-f_]+|^0b[01_]+|^0o[\d_]+|^[\-]?(?:\d[_\d]*)\.?\d[_\d]*(?:e[+-]?\d+)?|^[\-]?\d*\.?\d+(?:e[+-]?\d+)?/i,Z_=/^("""|''')([\s\S]*?)(?:\n[^\n\S]*)?\1/,Q_=/^(?:[-=]=>|!&(?=[\s\n])|[&|~^]?=\?|[&|~^]=|\?\?=|===|---|->|=>|\/>|!==|\*\*=?|[-+*\/%<>&|^!?=]=|=<|>>>=?|([-+:])\1|([&|<>])\2=?|\?\.|\?\?|\.{2,3}|\*(?=[a-zA-Z\_]))/,fh=/^[^\n\S]+/,e5=/^###([^#][\s\S]*?)(?:###[^\n\S]*|(?:###)?$)/,t5=/^\/\*([\s\S]*?)\*\//,Np=/^(\s*)((#[ \t\!]|\/\/(?!\/))(.*)|#[ \t]?(?=\n|$))+/,s5=/^[-=]=>/,r5=/^(?:\n[^\n\S]*)+/,i5=/^'[^\\']*(?:\\.[^\\']*)*'/;var Rp=/^(\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)([a-z]{0,8})(?!\w)/,Op=/^\/{3}([\s\S]+?)\/{3}([a-z]{0,8})(?!\w)/;var Lp=/\n/g,n5=/\n+([^\n\S]*)/g,a5=/\*\//,o5=/^\s*(?:,|\??\.(?![.\d])|(?:&&|\|\||and|or)[\n\s])/;var l5=/^\$\w+\$/,h5=/^\$\d$/,c5=["-=","+=","/=","*=","%=","||=","&&=","?=","??=","<<=",">>=",">>>=","&=","^=","|=","~=","=<","**=","=?","~=?","|=?","&=?","^=?"],u5=At(c5),f5=["!","~","NEW","TYPEOF","DELETE"],Cp=At(f5),p5=["&&","||","??","and","or"],d5=At(p5),_5=["<<",">>",">>>"],m5=At(_5),g5=["===","!==","==","!=","<",">","<=",">=","===","!==","&","|","^","!&"],v5=At(g5),y5=["*","/","%","∪","∩","√"],b5=At(y5),x5=["IN","OF","INSTANCEOF","ISA"],w5=At(x5);var k5=["NUMBER","REGEX","BOOL","TRUE","FALSE","++","--","]"],T5=At(k5),S5=["NUMBER","REGEX","BOOL","TRUE","FALSE","++","--","]",")","}","THIS","SELF","IDENTIFIER","STRING"],E5=At(S5),A5=["\\",".","UNARY","MATH","EXP","+","-","SHIFT","RELATION","COMPARE","THROW","EXTENDS"],I5=At(A5),N5=["IDENTIFIER","SYMBOLID","STRING","REGEX",")","]","INDEX_END","THIS","SUPER","TAG_END","IVAR","SELF","NEW","ARGVAR","SYMBOL","RETURN","INDEX_END","CALL_END","DECORATOR","@","GENERICS"],R5=At(N5),O5=["IDENTIFIER","SYMBOLID","STRING","REGEX",")","]","THIS","SUPER","TAG_END","IVAR","SELF","NEW","ARGVAR","SYMBOL","RETURN","BANG","NUMBER","BOOL","TAG_SELECTOR","ARGUMENTS","}","TAG_TYPE","TAG_REF","INDEX_END","CALL_END","DO_VALUE"],L5=At(O5);var C5=["INDENT","OUTDENT","TERMINATOR"],M5=At(C5),kp=At(["INDENT","TERMINATOR","DECORATOR"]),D5=At(["INDENT","OUTDENT","TERMINATOR","EXPORT","DEFAULT","DECLARE","GLOBAL","LOCAL","EXTEND","ABSTRACT","STRICT","DECORATOR"]),P5=At(["global","declare","local","extend","abstract","strict"]),V5=At(["IDENTIFIER",")","}","]","NUMBER"]),F5=At(["(","[","="]),G5=At([",","(","[","{","|",`
`," "]),j5=At(["COMPARE",".","(","["]);function B5(s,e,t){return this.message=s,this.file=e,this.line=t,this}L_(B5,SyntaxError);var Is=function(s,e){return e===void 0&&(e=0),s[s.length-e-1]},z5=function(s){var e=0;for(let t=0,r=s.length;t<r;t++)s.charCodeAt(t)==10&&e++;return e},H5=function(s,e){for(var t="";e>0;)e%2==1&&(t+=s),s+=s,e>>=1;return t},mr=hp,xn=cp,rr=po,vo=up;function Pe(){this.reset()}Pe.prototype.reset=function(){return this._code=null,this._chunk=null,this._opts=null,this._state={},this._indent=0,this._indebt=0,this._outdebt=0,this._indents=[],this._ends=[],this._contexts=[],this._scopes=[],this._nextScope=null,this._context=null,this._indentStyle=" ",this._inTag=!1,this._inStyle=0,this._tokens=[],this._seenFor=!1,this._loc=0,this._locOffset=0,this._end=null,this._char=null,this._bridge=null,this._last=null,this._lastTyp="",this._lastVal=null,this._script=null,this};Pe.prototype.jisonBridge=function(s){return this._bridge={lex:lp,setInput:function(e){return this.tokens=e,this.pos=0},upcomingInput:function(){return""}}};Pe.prototype.tokenize=function(s,e,t){var r;if(t===void 0&&(t=null),s.length==0)return[];if(!e.inline){if(fh.test(s)&&(s=`
`+s,s.match(/^\s*$/g)))return[];s.indexOf("\r")>=0&&(s=s.replace(/\r/g,""));let i=s.charCodeAt(s.length-1);(i==9||i==32)&&(s=s.replace(/[\t ]+$/g,""))}if(this._last=null,this._lastTyp=null,this._lastVal=null,this._script=t,this._code=s,this._opts=e,this._locOffset=e.loc||0,this._platform=e.platform||e.target,this._indentStyle=" ",(r=s.match(/^([\ \t]*)[^\n\s\t]/))&&(this._state.gutter=r[1]),e.gutter!==void 0&&(this._state.gutter=e.gutter),this._script&&!e.inline&&(this._script.tokens=this._tokens),this.parse(s),e.inline||this.closeIndentation(),this._ends.length&&this.unclosedError("end of file"),this._platform=="tsc")for(let i=0,n=ti(this._tokens),a=n.length,o;i<a;i++)o=n[i],o._type=="SYMBOLID"&&(o._type="IDENTIFIER");return this._tokens};Pe.prototype.parse=function(s){var e=0,t=0;for(this._loc=this._locOffset+e;this._chunk=s.slice(e);){let r=this._context;r&&r.pop&&r.pop.test(this._chunk)&&this.popEnd(),t=r&&r.lexer&&r.lexer.call(this)||this._end=="TAG"&&this.tagDefContextToken()||this._inTag&&this.tagContextToken()||this._inStyle2&&this.lexStyleBody()||this.basicContext(),e+=t,this._loc=this._locOffset+e}};Pe.prototype.basicContext=function(){var s=this._chunk.charAt(0);if(this._end=="%")return this.selectorToken()||this.symbolToken()||this.identifierToken()||this.whitespaceToken()||this.lineToken()||this.commentToken()||this.heredocToken()||this.tagToken()||this.stringToken()||this.numberToken()||this.regexToken()||this.literalToken()||0;switch(s){case" ":case" ":return this.whitespaceToken()||this.commentToken()||this.literalToken()||0;case`
`:return this.whitespaceToken()||this.lineToken()||this.commentToken()||this.literalToken()||0;case"$":case"%":return this.selectorToken()||this.identifierToken()||this.literalToken()||0;case"#":return this.identifierToken()||this.commentToken()||this.literalToken()||0;case"@":return this.identifierToken()||this.literalToken()||0;case":":return this.symbolToken()||this.literalToken()||0;case'"':case"'":return this.heredocToken()||this.stringToken()||this.literalToken()||0;case"`":return this.stringToken()||this.literalToken()||0;case"/":return this.commentToken()||this.regexToken()||this.literalToken()||0;case"<":return this.tagToken()||this.literalToken()||0;case".":case"-":return this.numberToken()||this.literalToken()||0}var e=s.charCodeAt(0);return(e>127||e==11||e==12||e==13)&&fh.test(this._chunk)?this.whitespaceToken()||this.commentToken()||this.literalToken()||0:e>=65&&e<=90||e>=97&&e<=122||s=="_"?this.identifierToken()||this.literalToken()||0:e>=48&&e<=57?this.numberToken()||this.literalToken()||0:this.literalToken()||0};Pe.prototype.prevChars=function(s){return s===void 0&&(s=1),s==1?this._code[this._loc-1]:this._code.slice(this._loc-s,this._loc)};Pe.prototype.moveCaret=function(s){return this._loc+=s};Pe.prototype.context=function(){return this._ends[this._ends.length-1]};Pe.prototype.inContext=function(s){var e=this._contexts[this._contexts.length-1];return e&&e[s]};Pe.prototype.pushEnd=function(s,e){let t=this._context;return this._ends.push(s),this._contexts.push(this._context=e||{}),this._end=s,this.refreshScope(),e&&(e.closeType=="STYLE_END"||e.style)&&(e.lexer=this.lexStyleBody,e.style=!0,this._inStyle++),t&&t.style&&s!="}"&&(e.lexer=this.lexStyleBody,e.style=!0),e&&e.id&&(e.start=new Ni(e.id+"_START",s,this._last.region()[1],0),this._tokens.push(e.start)),this};Pe.prototype.popEnd=function(s){var e=this._ends.pop();this._end=this._ends[this._ends.length-1];var t=this._context;return t&&t.start&&(t.end=new Ni(t.closeType||t.id+"_END",e,this._last.region()[1],0),t.end._start=t.start,t.start._end=t.end,this._tokens.push(t.end)),t&&(t.closeType=="STYLE_END"||t.style)&&this._inStyle--,this._contexts.pop(),this._context=this._contexts[this._contexts.length-1],this.refreshScope(),[e,t]};Pe.prototype.refreshScope=function(){var s=this._ends[this._ends.length-1],e=this._ends[this._ends.length-2];return this._inTag=s=="TAG_END"||e=="TAG_END"&&s=="OUTDENT"};Pe.prototype.queueScope=function(s){return this._scopes[this._indents.length]=s,this};Pe.prototype.popScope=function(s){return this._scopes.pop(),this};Pe.prototype.getScope=function(){return this._scopes[this._indents.length-1]};Pe.prototype.scope=function(s,e){var t=this._ends.push(this._end=s);return this._contexts.push(e||null),s};Pe.prototype.closeSelector=function(){if(this._end=="%")return this.token("SELECTOR_END","%",0),this.pair("%")};Pe.prototype.openDef=function(){return this.pushEnd("DEF")};Pe.prototype.closeDef=function(){if(this.context()=="DEF"){var s=Is(this._tokens);if(mr(s)=="TERMINATOR"){let e=this._tokens.pop();this.token("DEF_BODY","DEF_BODY",0),this._tokens.push(e)}else this.token("DEF_BODY","DEF_BODY",0);this.pair("DEF")}};Pe.prototype.tagContextToken=function(){let s=this._chunk[0],e=this._chunk[1],t=/^([A-Za-z\_\-\$\%\#][\w\-\$]*(\:[A-Za-z\_\-\$]+)*)/.exec(this._chunk);if(t){let r=t[1],i="TAG_LITERAL",n=t[0].length;return r=="self"&&this._lastVal=="<"&&(i="SELF"),s=="$"&&(this._lastTyp=="TAG_TYPE"||this._lastTyp=="TAG_START")&&(i="TAG_REF"),s=="%"&&(i="CSS_MIXIN"),s=="#"&&(i="TAG_SYMBOL_ID",r.length==1)?0:(this.token(i,r,n),n)}if(s=="/"&&e==">")return this.token("TAG_END","/>",2),this.pair("TAG_END"),2;if(s=="%"||s==":"||s=="."||s=="@")return this.token("T"+s,s,1),s=="."&&(!e||Tp[e])&&this._platform=="tsc"&&this.token("TAG_LITERAL","$CARET$",0,1),1;if(s==" "||s==`
`||s==" "){let r=/^[\n\s\t]+/.exec(this._chunk);return this.token("TAG_WS",r[0],r[0].length),r[0].length}else if(s=="="&&this._chunk[1]!=">")return this.token("=","=",1),this.pushEnd("TAG_ATTR",{id:"VALUE",pop:/^([\s\n\>]|\/\>)/}),1;return 0};Pe.prototype.tagDefContextToken=function(){var s;if(s=Ap.exec(this._chunk))return this.token("TAG_TYPE",s[0],s[0].length),s[0].length;if(s=B_.exec(this._chunk)){var e=s[0];return this.token("TAG_ID",e,e.length),e.length}return this._chunk[0]==`
`&&this.pair("TAG"),0};Pe.prototype.findTypeAnnotation=function(s,e){e===void 0&&(e=!1);for(var t=[],r=0,i=[],n=/[\=\n\ \t\.\,\:\+]/;r<s.length;){var a=s.charAt(r);let o=t[0],l=o=='"'||o=="'";if(a&&a==o){if(t.shift(),e&&t.length==0){r++;break}}else{if(!o&&(a==")"||a=="]"||a=="}"||a==">"))break;if(a=="(")t.unshift(")");else if(a=="[")t.unshift("]");else if(a=="{")t.unshift("}");else if(a=="<")t.unshift(">");else if(a=='"')t.unshift('"');else if(a=="'")t.unshift("'");else if(!o&&n.test(a))break}r++}return r==0?null:s.slice(0,r)};Pe.prototype.findBalancedSelector=function(s){for(var e=[],t=0,r=[];t<s.length-1;){var i=s.charAt(t);let a=e[0],o=a=='"'||a=="'";if(i&&i==a)e.shift();else if(!o&&(i==")"||i=="]"||i=="}")){console.log("out of balance!!");break}else i=="/"?r.unshift([t,1,":"]):i=="("&&!o?e.unshift(")"):i=="["&&!o?e.unshift("]"):i=='"'?e.unshift('"'):i=="'"&&e.unshift("'");if(!a&&(i=="="||i==`
`||i=="{"))break;if(!a&&i==" "){if(Ip(s,t+1))break;let l=s.slice(t+1);if(Np.exec(l))break}t++}if(t==0)return null;let n=s.slice(0,t);if(r.length){n=n.split("");for(let a=0,o=r.length;a<o;a++)n.splice.apply(n,r[a]);n=n.join("")}return n};Pe.prototype.lexStyleRule=function(s,e){s===void 0&&(s=0),e===void 0&&(e=!1);let t=s?this._chunk.slice(s):this._chunk,r=this.findBalancedSelector(t);if(r||e){let i=r?r.length:0;this.token("CSS_SEL",r||"",i,s);let n=this._last;return t[i]=="="&&i++,this._indents.push(1),this._outdebt=this._indebt=0,this.token("INDENT","1",0,1),this.pushEnd("OUTDENT",{lexer:this.lexStyleBody,opener:n,style:!0}),this._indent++,i}return 0};Pe.prototype.lexStyleBody=function(){if(this._end=="%")return 0;let s=this._chunk[0];var e;let t=Ip(this._chunk),r=this._lastTyp;if(!t&&(r=="TERMINATOR"||r=="INDENT")&&W_(this._chunk,s)&&this.findBalancedSelector(this._chunk))return this.lexStyleRule(0);if(t)return this.token("CSSPROP",this._chunk.slice(0,t),t),t;if(s[0]=="#"&&(e=$_.exec(this._chunk))){let n=this._chunk[e[0].length]=="("?"COLORMIX":"COLOR";return this.token(n,e[0],e[0].length),e[0].length}if(s=="/"&&!this._last.spaced)return this.token("/",s,1),1;if(e=U_.exec(this._chunk)){let i=e[0].length,n="NUMBER";return e[2]=="%"?n="PERCENTAGE":e[2]&&(n="DIMENSION"),this._lastTyp=="COMPARE"&&this._last.spaced,this.token(n,e[0],i),i}else if(e=K_.exec(this._chunk)){let i=e[0].length;return this.token("CSSURL",e[0],i),e[0].length}else if(e=Y_.exec(this._chunk)){let i="CSSIDENTIFIER",n=e[0],a=n.length;return n[0]=="-"&&n[1]=="-"?i="CSSVAR":this._last&&!this._last.spaced&&(r=="}"||r==")")&&(i="CSSUNIT"),this._chunk[a]=="("&&(i="CSSFUNCTION"),this.token(i,n,a),a}else if(this._last&&!this._last.spaced&&(r=="}"||r==")")&&s=="%")return this.token("CSSUNIT",s,1),1;return 0};Pe.prototype.importsToken=function(){var s;return(s=G_.exec(this._chunk))?(this.token("IMPORTS",s[1],s[1].length,7),s[0].length):0};Pe.prototype.tagToken=function(){var s,e;if(!(s=j_.exec(this._chunk)))return 0;var e=ti(s),t=e[0],r=e[1],i=e[2];if(r=="<"){if(Sp.test(this.prevChars(1)||""))return 0;if(this.token("TAG_START","<",1),this.pushEnd(Zs.TAG_START,{i:this._tokens.length-1}),s=Ap.exec(this._chunk.substr(1,40))){let n=this._chunk[s[0].length+1];if(s[0]!="self"&&n!="{"&&n!="-")return this.token("TAG_TYPE",s[0],s[0].length,1),t.length+s[0].length}else this._chunk[1]==">"&&this.token("TAG_TYPE","fragment",0,0);if(i){if(i.substr(0,1)=="{")return r.length;this.token("TAG_NAME",t.substr(1),0)}}return t.length};Pe.prototype.selectorToken=function(){var a,s;if(this._end=="%"){for(var e=this._chunk[0],t=this._context,r=0,i="",n=!1;e=this._chunk[r++];)if(e==")"&&t.parens==0){n=!0;break}else if(e=="(")t.parens++,i+="(";else if(e==")")t.parens--,i+=")";else{if(e=="{")break;i+=e}return i&&this.token("SELECTOR_PART",i,r-1),n?(this.token("SELECTOR_END",")",1,r-1),this.pair("%"),r):r-1}if(!(s=z_.exec(this._chunk)))return 0;var a=ti(s),o=a[0],l=a[1],f=a[2];return f=="("?(this.token("SELECTOR_START",l,l.length+1),this.pushEnd("%",{parens:0}),l.length+1):l=="%"?this.context()=="%"?1:(this.token("SELECTOR_START",l,l.length),this.pushEnd("%",{open:!0}),l.length):0};Pe.prototype.inTag=function(){var s=this._ends.length;if(s>0){var e=this._ends[s-1],t=s>1?this._ends[s-2]:e;return e=="TAG_END"||t=="TAG_END"&&e=="OUTDENT"}return!1};Pe.prototype.isKeyword=function(s,e){var t;if(e===void 0&&(e=""),s=="tag")return this.isTagDeclarationKeyword();if(s=="mixin"&&(!e||e==" "))return!M_[this._lastTyp];if(this._lastTyp=="ATTR"||this._lastTyp=="PROP"||this._lastTyp=="DEF"||s=="when"&&this._lastTyp=="CONST")return!1;if((s=="get"||s=="set")&&(t=this._chunk.match(/^[gs]et ([\$\w\-]+|\[)/))){let n=this._contexts[this._contexts.length-1]||{},a=n.opener&&this._tokens[this._tokens.indexOf(n.opener)-1];if((this._lastTyp=="TERMINATOR"||this._lastTyp=="INDENT")&&a&&(a._type=="="||a._type=="{"))return!0}if((s=="guard"||s=="alter"||s=="watch")&&this.getScope()=="PROP"||s=="css"||s=="interface"&&(this._lastVal=="global"||this._lastVal=="export"||this._lastVal=="default"||this._lastVal=="declare"))return!0;if(s=="attr"||s=="prop"||s=="get"||s=="set"||s=="css"||s=="constructor"||s=="declare"){var r=this.getScope()