imba
Version:
26 lines • 698 kB
JavaScript
var imbac=(()=>{var bo=Object.defineProperty;var Mp=Object.getOwnPropertyDescriptor;var Pp=Object.getOwnPropertyNames;var Fp=Object.prototype.hasOwnProperty;var jp=(t,e)=>{for(var s in e)bo(t,s,{get:e[s],enumerable:!0})},Gp=(t,e,s,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Pp(e))!Fp.call(t,i)&&i!==s&&bo(t,i,{get:()=>e[i],enumerable:!(r=Mp(e,i))||r.enumerable});return t};var Bp=t=>Gp(bo({},"__esModule",{value:!0}),t);var C4={};jp(C4,{aliases:()=>zi,compile:()=>f7,deserialize:()=>c7,fonts:()=>h1,helpers:()=>l7,modifiers:()=>k1,parse:()=>d7,parser:()=>hn,program:()=>$4,resolve:()=>_7,resolveConfig:()=>h7,rewrite:()=>p7,selparser:()=>R4,tokenize:()=>u7,variants:()=>E3});var Vp=Object.defineProperty,an=(t,e)=>{for(var s in e)Vp(t,s,{get:e[s],enumerable:!0})},A2={};an(A2,{Diagnostic:()=>Gc,DiagnosticSeverity:()=>qn,InternalPrefixes:()=>N2,Position:()=>qa,Range:()=>jc,ReservedIdentifierRegex:()=>Nc,ReservedPrefixes:()=>Ac,ToImbaMap:()=>Lc,ToJSMap:()=>Ic,ansi:()=>_r,brace:()=>Zp,bracketize:()=>Pc,camelCase:()=>td,clearLocationMarkers:()=>Yo,computeLineOffsets:()=>Fc,dashToCamelCase:()=>I2,dasherize:()=>Cc,deepAssign:()=>ud,flatten:()=>Qp,fromValidIdentifier:()=>id,identifierForPath:()=>$2,indent:()=>Mc,isPlainObject:()=>cd,isSystemIdentifier:()=>nd,isValidIdentifier:()=>Oc,locationToLineColMap:()=>R2,markLineColForTokens:()=>ad,normalizeIndentation:()=>a1,parenthesize:()=>Pi,parseArgs:()=>od,pascalCase:()=>$c,printExcerpt:()=>ld,printWarning:()=>hd,quote:()=>rd,setterSym:()=>sd,singlequote:()=>on,snakeCase:()=>ed,symbolize:()=>Dc,toCustomTagIdentifier:()=>Xp,toImbaIdentifier:()=>Rc,toJSIdentifier:()=>S1,toValidIdentifier:()=>Ks,unionOfLocations:()=>L2});var Eh={32:16777619n,64:1099511628211n,128:309485009821345068724781371n,256:374144419156711147060143317175368453031918731002211n,512:35835915874844867368919076489095108449946327955754392558399825615420669938882575126094039892345713852759n,1024:5016456510113118655434598811035278955030765345404790744303017523831112055108147451509157692220295382716162651878526895249385292291816524375083746691371804094271873160484737966720260389217684476157468082573n},Hp={32:2166136261n,64:14695981039346656037n,128:144066263297769815596495629667062367629n,256:100029257958052580907070968620625704837092796014241193945225284501741471925557n,512:9659303129496669498009435400716310466090418745672637896108374329434462657994582932197716438449813051892206539805784495328239340083876191928701583869517785n,1024:14197795064947621068722070641403218320880622795441933960878474914617582723252296732303717722150864096521202355549365628174669108571814760471015076148029755969804077320157692458563003215304957150157403644460363550505412711285966361610267868082893823963790439336411086884584107735010676915n};function zp(t,{size:e=32}={}){if(!Eh[e])throw new Error("The `size` option must be one of 32, 64, 128, 256, 512, or 1024");let s=Hp[e],r=Eh[e],i=!1;for(let n=0;n<t.length;n++){let a=t.charCodeAt(n);a>127&&!i&&(t=unescape(encodeURIComponent(t)),a=t.charCodeAt(n),i=!0),s^=BigInt(a),s=BigInt.asUintN(e,s*r)}return s}function Uo(t){return t?t.toArray?t.toArray():t:[]}var Qt={},Up={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]},_r={bold:function(t){return"\x1B[1m"+t+"\x1B[22m"},red:function(t){return"\x1B[31m"+t+"\x1B[39m"},green:function(t){return"\x1B[32m"+t+"\x1B[39m"},yellow:function(t){return"\x1B[33m"+t+"\x1B[39m"},blue:function(t){return"\x1B[94m"+t+"\x1B[39m"},gray:function(t){return"\x1B[90m"+t+"\x1B[39m"},white:function(t){return"\x1B[37m"+t+"\x1B[39m"},f:function(t,e){let s=Up[t];return"\x1B["+s[0]+"m"+e+"\x1B["+s[1]+"m"}};_r.warn=_r.yellow;_r.error=_r.red;var N2={TAG:"\u03C4",FLIP:"\u03C9",VALUE:"\u03C5",CACHE:"\u03F2",KEY:"\u03BA",ANY:"\u03C6",SYM:"\u03B5",SEP:"\u03B9",PRIVATE:"\u03A8",B:"\u03B9",T:"\u03C4",C:"\u03C1",V:"\u03C5",K:"\u03BA",D:"\u0394",H:"\u03B8",EXTEND:"\u03A9"},Ac=new Set(Object.values(N2)),Nc=new RegExp("^["+Array.from(Ac).join("")+"]","u"),Ic={"-":"\u039E","?":"\u03A6","#":"\u03A8","@":"\u03B1"},Yp=/[-?#@]/gu,qp=function(t){return Ic[t]},S1=Qt.toJSIdentifier=function(t){return t.replace(Yp,qp)},Lc={\u039E:"-",\u03A6:"?",\u03A8:"#",\u03B1:"@"},Kp=new RegExp("[\u039E\u03A6\u03A8\u03B1]","gu"),Wp=function(t){return Lc[t]},Rc=Qt.toImbaIdentifier=function(t){return t.replace(Kp,Wp)},Xp=Qt.toCustomTagIdentifier=function(t){return"\u0393"+S1(t)},Jp="\u03B1\u03B2\u03B3\u03B4\u03B5\u03B6\u03B7\u03B8\u03B9\u03BA\u03BB\u03BC\u03BD\u03BE\u03BF\u03C0\u03C1\u03C3\u03C4\u03C5\u03C6\u03C7\u03C8\u03C9",Zp=Qt.brace=function(t){var e=t.match(/\n/);return e?"{"+t+`
}`:`{
`+t+`
}`},a1=Qt.normalizeIndentation=function(t){for(var e,s=/\n+([^\n\S]*)/g,r=null,i;e=s.exec(t);){var n=e[1];(r===null||0<(i=n.length)&&i<r.length)&&(r=n)}return r&&(t=t.replace(RegExp("\\n"+r,"g"),`
`)),t},Qp=Qt.flatten=function(t){var e=[];return t.forEach(function(s){return s instanceof Array?e.push.apply(e,Qt.flatten(s)):e.push(s)}),e},Yo=Qt.clearLocationMarkers=function(t){return t.replace(/\/\*\%([\w\|]*)\$\*\//g,"")},$c=Qt.pascalCase=function(t){return t.replace(/(^|[\-\_\s])(\w)/g,function(e,s,r){return r.toUpperCase()})},td=Qt.camelCase=function(t){return t=String(t),t.replace(/([\-\_\s])(\w)/g,function(e,s,r){return r.toUpperCase()})},I2=Qt.dashToCamelCase=function(t){return t=String(t),t.indexOf("-")>=0&&(t=t.replace(/([\-\s])(\w)/g,function(e,s,r){return r.toUpperCase()})),t},ed=Qt.snakeCase=function(e){var e=e.replace(/([\-\s])(\w)/g,"_");return e.replace(/()([A-Z])/g,"_$1",function(s,r,i){return i.toUpperCase()})},Cc=Qt.dasherize=function(t){return t.replace(/([a-z\d])([A-Z])/g,"$1-$2").toLowerCase()},sd=Qt.setterSym=function(t){return Qt.dashToCamelCase("set-"+t)},rd=Qt.quote=function(t){return'"'+t+'"'},on=Qt.singlequote=function(t){return"'"+t+"'"},Oc=Qt.isValidIdentifier=function(t){return!/[?-\s]/.test(t)&&t[0]!="#"},Ks=Qt.toValidIdentifier=function(t){return S1(t)},id=Qt.fromValidIdentifier=function(t){return Rc(t)},nd=Qt.isSystemIdentifier=function(t){return Jp.indexOf(t[0])>=0},Dc=Qt.symbolize=function(t,e){return t=String(t),Qt.toValidIdentifier(t);var s},Mc=Qt.indent=function(t){return String(t).replace(/^/g," ").replace(/\n/g,`
`).replace(/\n\t$/g,`
`)},Pc=Qt.bracketize=function(t,e){return e===void 0&&(e=!0),e&&(t=`
`+Qt.indent(t)+`
`),"{"+t+"}"},Pi=Qt.parenthesize=function(t){return"("+String(t)+")"},L2=Qt.unionOfLocations=function(){for(var t=arguments,e=t.length,s=new Array(e>0?e:0);e>0;)s[e-1]=t[--e];var r=1/0,i=-1/0;for(let n=0,a=Uo(s),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]},R2=Qt.locationToLineColMap=function(t){for(var e=t.split(/\n/g),s=[],r,i=0,n=0,a=0;r=t[i];)s[i]=[a,n],r==`
`?(a++,n=0):n++,i++;return s[i]=[a,n],s[i+1]=[a,n],s},ad=Qt.markLineColForTokens=function(t,e){return Qt},od=Qt.parseArgs=function(t,e){var s;e===void 0&&(e={});var r=e.alias||(e.alias={}),i=e.group||(e.group=[]),n=e.schema||{};n.main={};var a={},o={};t=t||process.argv.slice(2);for(var l=null,p=0,h;p<t.length;){var d=t[p];if(p++,h=d.match(/^\-([a-zA-Z]+)(\=\S+)?$/)){l=null;let v=h[1].split("");for(let S=0,_=Uo(v),w=_.length,m;S<w;S++){m=_[S];var y=r[m]||m;v[S]=y,a[y]=!0}v.length==1&&(l=v);continue}else if(h=d.match(/^\-\-([a-z0-9\-\_A-Z]+)(\=\S+)?$/)){var f=!0;y=h[1],y.indexOf("no-")==0&&(y=y.substr(3),f=!1),y=Qt.dashToCamelCase(y),h[2]&&(f=h[2].slice(1)),a[y]=f,l=y;continue}else{var g=n[l];l&&n[l]||(l="main"),d.match(/^\d+$/)&&(d=parseInt(d)),f=a[l],f==!0||f==!1?a[l]=d:typeof f=="string"||f instanceof String||typeof f=="number"||f instanceof Number?a[l]=[f].concat(d):f instanceof Array?f.push(d):a[l]=d,g&&g.multi||(l="main")}}for(let v=0,S=Uo(i),_=S.length;v<_;v++){let w=Qt.dashToCamelCase(S[v]);for(let m,O=0,k=Object.keys(a),R=k.length,b;O<R;O++)if(b=k[O],m=a[b],b.indexOf(w)==0){let E=b.substr(w.length).replace(/^\w/,function(I){return I.toLowerCase()});E?(a[w]||(a[w]={}),a[w][E]=m):a[w]||(a[w]={})}}return(typeof(s=a.env)=="string"||s instanceof String)&&(a["ENV_"+a.env]=!0),a},ld=Qt.printExcerpt=function(t,e,s){(!s||s.constructor!==Object)&&(s={});var r=s.hl!==void 0?s.hl:!1,i=s.gutter!==void 0?s.gutter:!0,n=s.type!==void 0?s.type:"warn",a=s.pad!==void 0?s.pad:2,o=t.split(/\n/g),l=Qt.locationToLineColMap(t),p=l[e[0]]||[0,0],h=p[0],d=p[1],y=o[h],f=Math.max(0,h-a),g=Math.min(f+a+1+a,o.length);let v=h-f;for(var S=f,_=[];S<g;)_.push(o[S++]);var w=_;return i&&(w=w.map(function(m,O){let k=""+(f+O+1),R;for(;k.length<String(g).length;)k=" "+k;return O==v?(R=" -> "+k+" | "+m,r&&(R=_r.f(r,R))):(R=" "+k+" | "+m,r&&(R=_r.f("gray",R))),R})),w.join(`
`)},hd=Qt.printWarning=function(t,e){let s=e.message,r=Qt.printExcerpt(t,e.loc,{hl:"whiteBright",type:"warn",pad:1});return s+`
`+r},$2=Qt.identifierForPath=function(t){let e=zp(t).toString(36);return e[0].match(/\d/)&&(e="z"+e),e},cd=Qt.isPlainObject=function(t){return typeof t=="object"&&Object.getPrototypeOf(t)==Object.prototype},ud=Qt.deepAssign=function(t,e){for(let s,r=0,i=Object.keys(e),n=i.length,a;r<n;r++){a=i[r],s=e[a];let o=t[a];Qt.isPlainObject(o)&&Qt.isPlainObject(s)?Qt.deepAssign(o,s):t[a]=s}return t},Fc=Qt.computeLineOffsets=function(t,e,s){s===void 0&&(s=0);for(var r=e?[s]:[],i=0;i<t.length;){var n=t.charCodeAt(i);(n===13||n===10)&&(n===13&&i+1<t.length&&t.charCodeAt(i+1)===10&&i++,r.push(s+i+1)),i++}return r},qa=class{constructor(t,e,s,r=null){this.line=t,this.character=e,this.offset=s}toString(){return this.line+":"+this.character}valueOf(){return this.offset}},jc=class{constructor(t,e){this.start=t,this.end=e}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(t){return t.slice(this.start,this.end)}equals(t){return t.offset==this.offset&&t.length==this.length}},qn={Error:1,Warning:2,Information:3,Hint:4,error:1,warning:2,warn:2,info:3,hint:4},Ah=new WeakMap,Gc=class{constructor(t,e=null){this.range=t.range,this.severity=qn[t.severity]||t.severity,this.code=t.code,this.source=t.source,this.message=t.message,Ah.set(this,e)}get sourceDocument(){return Ah.get(this)}toSnippet(){let t=this.sourceDocument,e=this.range.start,s=this.range.end,r=t.sourcePath+":"+(e.line+1)+":"+(e.character+1)+": "+this.message,i=t.doc.getLineText(e.line),n=s.line==e.line?s.character:i.length,a=Math.max(n-e.character,1),o=[r,i];return o.push(i.replace(/[^\t]/g," ").slice(0,e.character)+"^".repeat(a)),o.join(`
`).replace(/\t/g," ")+`
`}toError(){let t=this.range.start,e=this.sourceDocument.sourcePath+":"+(t.line+1)+":"+(t.character+1)+": "+this.message,s=new SyntaxError(e);return s.stack=`
`+this.toSnippet(),s}raise(){throw this.toError()}},ar={},Or={},G4=Or.TERMINATOR=1,B4=Or.IDENTIFIER=Or.IVAR=2,V4=Or.CONST=3,H4=Or.VAR=4,z4=Or.IF=5,U4=Or.ELSE=6,Y4=Or.DEF=7;function ee(t,e,s,r){return this._type=t,this._value=e,this._loc=s??-1,this._len=r??this._value.length,this._meta=null,this.generated=!1,this.newLine=!1,this.spaced=!1,this.call=!1,this}ee.prototype.type=function(){return this._type};ee.prototype.value=function(){return this._value};ee.prototype.traverse=function(){};ee.prototype.match=function(t){return this._value.match(t)};ee.prototype.c=function(){return""+this._value};ee.prototype.prepend=function(t){return this._value=t+this._value,this};ee.prototype.toString=function(){return this._value};ee.prototype.charAt=function(t){return this._value.charAt(t)};ee.prototype.slice=function(t){return this._value.slice(t)};ee.prototype.cloneSlice=function(t,e){return new ee(e||this._type,this.slice(t),this._loc+t,this._len-t)};ee.prototype.region=function(){return[this._loc,this._loc+this._len]};ee.prototype.startLoc=function(){return this._loc};ee.prototype.endLoc=function(){return this._loc+this._len};ee.prototype.loc=function(){return[this._loc,this.endLoc()]};var pd=ar.lex=function(){var t=this.tokens[this.pos++],e;return t?(e=t._type,this.yytext=t):e="",e},Cr=ar.token=function(t,e){return new ee(t,e,-1,0)},dd=ar.typ=function(t){return t._type},fd=ar.val=function(t){return t._value},q4=ar.line=function(t){return t._line},K4=ar.loc=function(t){return t._loc},Bc=ar.setTyp=function(t,e){return t._type=e},_d=ar.setVal=function(t,e){return t._value=e},W4=ar.setLine=function(t,e){return t._line=e},X4=ar.setLoc=function(t,e){return t._loc=e},md=new ee("{","{",0,0,0),gd=new ee("}","}",0,0,0),vd=new ee("(","(",0,0,0),yd=new ee(")",")",0,0,0);md.generated=!0;gd.generated=!0;vd.generated=!0;yd.generated=!0;var J4=new ee("INDENT","2",0,0,0),bd=new ee("OUTDENT","2",0,0,0),Vc={};an(Vc,{ALL_KEYWORDS:()=>wd,ASSIGNMENT_OPERATORS:()=>zc,BALANCED_PAIRS:()=>Fi,BITWISE_OPERATORS:()=>Hc,HEREGEX:()=>Yc,HEREGEX_OMIT:()=>Uc,HEX_REGEX:()=>kd,INVERSES:()=>nr,OPERATOR_ALIASES:()=>Td,SYSVAR_PREFIX:()=>Ed,TAG_GLOBAL_ATTRIBUTES:()=>qc,TAG_NAMES:()=>ji,TAG_TYPES:()=>ra,TOK:()=>Sd});function xd(t){return t?t.toArray?t.toArray():t:[]}var Fi=[["(",")"],["[","]"],["{","}"],["{{","}}"],["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"]],Hc={"|":!0,"&":!0,"!&":!0,"~":!0,"|=":!0,"&=":!0,"~=":!0,"^=":!0,"^":!0,"<<":!0,"<<=":!0,">>":!0,">>=":!0},zc={"=":!0,"=?":!0,"??=":!0,"||=":!0,"&&=":!0,"|=":!0,"|=?":!0,"&=":!0,"&=?":!0,"^=":!0,"^=?":!0,"~=":!0,"~=?":!0},nr={};for(let t=0,e=Fi.length,s;t<e;t++)s=Fi[t],Pa=s[0],Fa=s[1],nr[Fa]=Pa,nr[Pa]=Fa,Fi[Pa]=Fa;var Pa,Fa,wd=["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"],Sd={TERMINATOR:"TERMINATOR",INDENT:"INDENT",OUTDENT:"OUTDENT",DEF_BODY:"DEF_BODY",THEN:"THEN",CATCH:"CATCH"},Td={and:"&&",or:"||",is:"==",isnt:"!=",isa:"instanceof"},Uc=/\s+(?:#.*)?/g,Yc=/^\/{3}([\s\S]+?)\/{3}([a-z]{0,8})(?!\w)/,kd=/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{6}([A-Fa-f0-9]{2})?)$/,qc={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},Ed={TAG:"\u03C4",FLIP:"\u03C9",VALUE:"\u03C5",CACHE:"\u03C1",KEY:"\u03BA",ANY:"\u03C6",B:"\u0398",T:"\u03C4",C:"\u03C1",V:"\u03C5",K:"\u03BA",D:"\u0394"},ra={"":[-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}]},ji={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},qo=Object.keys(ra);for(let t=0,e=xd(qo),s=e.length,r;t<s;t++){r=e[t];let i=ra[r];i.up=ra[qo[i[0]]],i.name=r+"Element"}for(let t,e=0,s=Object.keys(ji),r=s.length,i;e<r;e++)i=s[e],t=ji[i],ji[i]=ra[qo[t]];function Kc(t,e){for(var s=0,r=t.length-1;r>=0;r--){var i=t[r];i==="."?t.splice(r,1):i===".."?(t.splice(r,1),s++):s&&(t.splice(r,1),s--)}if(e)for(;s--;s)t.unshift("..");return t}var Ad=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,C2=function(t){return Ad.exec(t).slice(1)};function o1(){for(var t="",e=!1,s=arguments.length-1;s>=-1&&!e;s--){var r=s>=0?arguments[s]:"/";if(typeof r!="string")throw new TypeError("Arguments to path.resolve must be strings");r&&(t=r+"/"+t,e=r.charAt(0)==="/")}return t=Kc(P2(t.split("/"),function(i){return!!i}),!e).join("/"),(e?"/":"")+t||"."}function Wc(t){var e=Xc(t),s=$d(t,-1)==="/";return t=Kc(P2(t.split("/"),function(r){return!!r}),!e).join("/"),!t&&!e&&(t="."),t&&s&&(t+="/"),(e?"/":"")+t}function Xc(t){return t.charAt(0)==="/"}function Nd(){var t=Array.prototype.slice.call(arguments,0);return Wc(P2(t,function(e,s){if(typeof e!="string")throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))}function O2(t,e){t=o1(t).substr(1),e=o1(e).substr(1);function s(p){for(var h=0;h<p.length&&p[h]==="";h++);for(var d=p.length-1;d>=0&&p[d]==="";d--);return h>d?[]:p.slice(h,d-h+1)}for(var r=s(t.split("/")),i=s(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 Jc="/",Id=":";function D2(t){var e=C2(t),s=e[0],r=e[1];return!s&&!r?".":(r&&(r=r.substr(0,r.length-1)),s+r)}function M2(t,e){var s=C2(t)[2];return e&&s.substr(-1*e.length)===e&&(s=s.substr(0,s.length-e.length)),s}function Ld(t){return C2(t)[3]}var Rd={extname:Ld,basename:M2,dirname:D2,sep:Jc,delimiter:Id,relative:O2,join:Nd,isAbsolute:Xc,normalize:Wc,resolve:o1};function P2(t,e){if(t.filter)return t.filter(e);for(var s=[],r=0;r<t.length;r++)e(t[r],r,t)&&s.push(t[r]);return s}var $d="ab".substr(-1)==="b"?function(t,e,s){return t.substr(e,s)}:function(t,e,s){return e<0&&(e=t.length+e),t.substr(e,s)},mr=class{static strip(t){return t.indexOf("/*%")<0?t:t.replace(/\/\*\%([\w\|]*)\$\*\//g,"")}static run(t,e={}){return t.indexOf("/*%")<0?{code:t,map:null,toString(){return this.code}}:{code:t.replace(/\/\*\%([\w\|]*)\$\*\//g,""),map:null,toString(){return this.code}}}},Nh=Symbol.for("#lineOffsets"),xo={TOKENIZE:1,REWRITE:2,PARSE:4,TRAVERSE:8,COMPILE:16},Xs=class Vn{static current;static error(e){var s,r;return(r=(s=this.current)==null?void 0:s.addDiagnostic)==null?void 0:r.call(s,"error",e)}static warn(e){var s,r;return(r=(s=this.current)==null?void 0:s.addDiagnostic)==null?void 0:r.call(s,"warning",e)}static info(e){var s,r;return(r=(s=this.current)==null?void 0:s.addDiagnostic)==null?void 0:r.call(s,"info",e)}static deserialize(e,s={}){return new Vn("",s).deserialize(e)}constructor(e,s){this.sourceCode=e,this.sourcePath=s.sourcePath,this.options=s,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 s;try{s=JSON.parse(e)}catch(r){throw console.log("failed",e,this.options),r}return this.rawResult=s,this.deserialized=s,this}serialize(){if(this.rawResult)return JSON.stringify(this.rawResult,null,2)}tokenize(){if(this.step(xo.TOKENIZE))try{Vn.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(xo.PARSE)&&!this.errored){Vn.current=this;try{this.ast=this.parser.parse(this.tokens,this)}catch{}}return this}compile(){return this.parse(),this.step(xo.COMPILE)&&(this.errored||(Vn.current=this,this.result=this.ast.compile(this.options,this)),this.options.raiseErrors&&this.raiseErrors()),this}recompile(e={}){if(this.deserialized){let s=this.deserialized.js,r={};return r.js=mr.run(s,e),r.css=mr.run(this.deserialized.css||"",e),e.styles=="import"&&r.css.code&&(r.js.code+=`
import './`+Rd.basename(this.sourcePath)+".css'"),r}return{js:this.js}}addDiagnostic(e,s){s.severity||(s.severity=e);let r=new Gc(s,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==qn.Error)}get warnings(){return this.diagnostics.filter(e=>e.severity==qn.Warning)}get info(){return this.diagnostics.filter(e=>e.severity==qn.Information)}get doc(){return this}get lineOffsets(){return this[Nh]||(this[Nh]=Fc(this.sourceCode,!0,0))}getLineText(e){let s=this.lineOffsets[e],r=this.lineOffsets[e+1];return this.sourceCode.substring(s,r).replace(/[\r\n]/g,"")}positionAt(e){if(e instanceof qa)return e;typeof e=="object"&&(e=e.offset),e=Math.max(Math.min(e,this.sourceCode.length),0);let s=this.lineOffsets,r=0,i=s.length;if(i===0)return new qa(0,e,e);for(;r<i;){let a=Math.floor((r+i)/2);s[a]>e?i=a:r=a+1}let n=r-1;return new qa(n,e-s[n],e)}offsetAt(e){if(e.offset!==void 0)return e.offset;let s=this.lineOffsets;if(e.line>=s.length)return this.sourceCode.length;if(e.line<0)return 0;let r=s[e.line],i=e.line+1<s.length?s[e.line+1]:this.sourceCode.length;return e.offset=Math.max(Math.min(r+e.character,i),r)}rangeAt(e,s){return new jc(this.positionAt(e),this.positionAt(s))}toString(){return this.js}raiseErrors(){if(this.errors.length)throw this.errors[0].toError();return this}};function Zc(t,e){for(var s in e)e.hasOwnProperty(s)&&(t[s]=e[s]);t.prototype=Object.create(e.prototype),t.__super__=t.prototype.__super__=e.prototype,t.prototype.initialize=t.prototype.constructor=t}var Qc=new WeakMap;function Ue(t,e){var s;this.error=t,this._options=e||{},this.severity=this._options.severity||"error";let r=t.message;(s=r.match(/Unexpected '([\w\-]+)'/))&&s[1]=="TERMINATOR"&&(r="Unexpected newline"),this.message=r,this.sourcePath=t.sourcePath,this.line=t.line}Zc(Ue,Error);Ue.wrap=function(t){return new this(t)};Object.defineProperty(Ue.prototype,"_options",{get:function(){return Qc.get(this)},configurable:!0});Object.defineProperty(Ue.prototype,"_options",{set:function(t){return Qc.set(this,t)},configurable:!0});Ue.prototype.set=function(t){this._options||(this._options={});for(let e,s=0,r=Object.keys(t),i=r.length,n;s<i;s++)n=r[s],e=t[n],this._options[n]=e;return this};Ue.prototype.start=function(){for(var t=this._options,e=t.pos-1,s=t.tokens&&t.tokens[e];s&&(s._loc==-1||s._loc==0||s._len==0);)s=t.tokens[--e];return s};Object.defineProperty(Ue.prototype,"token",{get:function(){if(this._token)return this._token;for(var t=this._options,e=t.pos-1,s=t.tokens&&t.tokens[e];s&&(s._loc==-1||s._loc==0||s._len==0);)s=t.tokens[--e];return this._token=s},configurable:!0});Ue.prototype.desc=function(){var t=this._options;let e=this.message;return t.token&&t.token._loc==-1?"Syntax Error":e};Ue.prototype.loc=function(){var t;return this._loc||(t=this.start())&&t.region&&t.region()};Ue.prototype.toJSON=function(){var t=this._options,e=this.start();return{warn:!0,message:this.desc(),loc:this.loc()}};Ue.prototype.toNativeError=function(){let t=new SyntaxError("hello");return t.fileName=this._sourcePath,t.message=this.message,t.stack=this.excerpt({colors:!1,details:!0}),t.lineNumber=this.lineNumber,t.columnNumber=this.columnNumber,t};Ue.prototype.excerpt=function(t){(!t||t.constructor!==Object)&&(t={});var e=t.gutter!==void 0?t.gutter:!0,s=t.colors!==void 0?t.colors:!1,r=t.details!==void 0?t.details:!0;try{var i=this._code,n=this.loc(),a=i.split(/\n/g),o=R2(i),l=o[n[0]]||[0,0],p=l[0],h=l[1],d=a[p];this.lineNumber=p+1,this.columnNumber=h;var y=Math.max(0,p-2),f=Math.min(y+5,a.length);let w=p-y;var g=y,v=function(m){return m};if(s){let m=this.severity=="warn"?"yellow":"red";(typeof s=="string"||s instanceof String)&&(m=s),v=function(O){return _r[m](_r.bold(O))}}for(var S=[];g<f;)S.push(d=a[g++]);var _=S;return e&&(_=_.map(function(m,O){let k=""+(y+O+1);for(;k.length<String(f).length;)k=" "+k;return O==w?" -> "+k+" | "+m:" "+k+" | "+m})),_[w]=v(_[w]),r&&_.unshift(v(this.message)),_.join(`
`)+`
`}catch{return""}};Ue.prototype.prettyMessage=function(){var t;return t=this.excerpt()};function ia(){return Ue.apply(this,arguments)}Zc(ia,Ue);ia.prototype.loc=function(){return this._loc};ia.prototype.excerpt=function(){var t=ia.prototype.__super__.excerpt.apply(this,arguments);return t+`
---
`+this.error.stack};function Cd(t){return t&&(t.len instanceof Function?t.len():t.length)||0}function Mr(t){return t?t.toArray?t.toArray():t:[]}function Ee(t){var e=Object.create(null);for(let s=0,r=Mr(t),i=r.length;s<i;s++)e[r[s]]=1;return e}function Od(t,e){for(var s in e)e.hasOwnProperty(s)&&(t[s]=e[s]);t.prototype=Object.create(e.prototype),t.__super__=t.prototype.__super__=e.prototype,t.prototype.initialize=t.prototype.constructor=t}var ei=ee,Dd=["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"],t3={",":1,"\n":1,")":1,"]":1,"}":1,">":1," ":1},e3=/\w|\]|\)$/,Ih={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}},Md={DEF:1,PROP:1,ATTR:1},s3=["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"],Pd=Ee(s3),Lh=Ee(s3.concat(["mixin","guard","alter","watch","css","interface","attr","prop","get","set","constructor","declare"])),Fd=Ee(["default","type","from","as","new","arguments"]),jd=["case","default","function","void","with","const","enum","native"],Z4=Dd.concat(jd),Gd=/^((\$|##|#|@@|@|\%)[\$\wA-Za-z_\-\x7f-\uffff][$\w\x7f-\uffff]*(\-[$\w\x7f-\uffff]+)*[\?]?|[$A-Za-z_][$\w\x7f-\uffff]*(\-[$\w\x7f-\uffff]+)*[\?]?)([^\n\S]*:)?/,Bd=/^import\s+(\{?[^\"\'\}]+\}?)(?=\s+from\s+)/,Vd=/^(\<)(?=[A-Za-z\#\.\%\$\[\{\@\>\(])/,r3=/^(\w[\w\d]*:)?(\w[\w\d]*)(-[\w\d]+)*/,Hd=/^#((\w[\w\d]*)(-[\w\d]+)*)/,zd=/^([%\$]{1,2})([\(])/,Ud=/^\:((([\*\@$\w\x7f-\uffff]+)+([\-\\\:][\w\x7f-\uffff]+)*)|==|\<=\>)/,Yd=/^\#[\w\-]+/,qd=/^(\-?\d*\.?\d+)([A-Za-z]+|\%)?(?![\d\w])/,Kd=/^[\w\-\$]*\w[\w\-\$]*/,Wd=/^url\(([^\)]*)\)/,Ko=function(t){return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t==95},Xd=function(t){return Ko(t)||t==45||t==36||t==64||t==46||t==33||t==35||t==94},Jd=function(t){return t>=9&&t<=13||t==32||t==160||t==5760||t==65279||t==8232||t==8233||t==8239||t==8287||t==12288||t>=8192&&t<=8202},i3=function(t,e){e===void 0&&(e=0);for(var s=e,r=t.length;s<r&&Xd(t.charCodeAt(s));)s++;if(s==e)return 0;if(t.charCodeAt(s)==58&&t.charCodeAt(s+1)!=58)return s-e;for(var i=s;i<r&&Jd(t.charCodeAt(i));)i++;return t.charCodeAt(i)==61?s-e:0},Zd=function(t,e){var s=e.charCodeAt(0);if(Ko(s)||s==94||s==37||s==42||s==38||s==36||s==62||s==47||s==46||s==91||s==64||s==33)return!0;if(s==35){let r=t.charCodeAt(1);return Ko(r)||r==45}return s==58&&t.charCodeAt(1)==58},Qd=/^0x[\da-f_]+|^0b[01_]+|^0o[\d_]+|^[\-]?(?:\d[_\d]*)\.?\d[_\d]*(?:e[+-]?\d+)?|^[\-]?\d*\.?\d+(?:e[+-]?\d+)?/i,tf=/^("""|''')([\s\S]*?)(?:\n[^\n\S]*)?\1/,ef=/^(?:[-=]=>|!&(?=[\s\n])|[&|~^]?=\?|[&|~^]=|\?\?=|===|---|->|=>|\/>|!==|\*\*=?|[-+*\/%<>&|^!?=]=|=<|>>>=?|([-+:])\1|([&|<>])\2=?|\?\.|\?\?|\.{2,3}|\*(?=[a-zA-Z\_]))/,F2=/^[^\n\S]+/,sf=/^###([^#][\s\S]*?)(?:###[^\n\S]*|(?:###)?$)/,rf=/^\/\*([\s\S]*?)\*\//,n3=/^(\s*)((#[ \t\!]|\/\/(?!\/))(.*)|#[ \t]?(?=\n|$))+/,nf=/^[-=]=>/,af=/^(?:\n[^\n\S]*)+/,of=/^'[^\\']*(?:\\.[^\\']*)*'/,a3=/^(\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)([a-z]{0,8})(?!\w)/,o3=/^\/{3}([\s\S]+?)\/{3}([a-z]{0,8})(?!\w)/,l3=/\n/g,lf=/\n+([^\n\S]*)/g,hf=/\*\//,cf=/^\s*(?:,|\??\.(?![.\d])|(?:&&|\|\||and|or)[\n\s])/,uf=/^\$\w+\$/,pf=/^\$\d$/,df=["-=","+=","/=","*=","%=","||=","&&=","?=","??=","<<=",">>=",">>>=","&=","^=","|=","~=","=<","**=","=?","~=?","|=?","&=?","^=?"],ff=Ee(df),_f=["!","~","NEW","TYPEOF","DELETE"],h3=Ee(_f),mf=["&&","||","??","and","or"],gf=Ee(mf),vf=["<<",">>",">>>"],yf=Ee(vf),bf=["===","!==","==","!=","<",">","<=",">=","===","!==","&","|","^","!&"],xf=Ee(bf),wf=["*","/","%","\u222A","\u2229","\u221A"],Sf=Ee(wf),Tf=["IN","OF","INSTANCEOF","ISA"],kf=Ee(Tf),Ef=["NUMBER","REGEX","BOOL","TRUE","FALSE","++","--","]"],Af=Ee(Ef),Nf=["NUMBER","REGEX","BOOL","TRUE","FALSE","++","--","]",")","}","THIS","SELF","IDENTIFIER","STRING"],If=Ee(Nf),Lf=["\\",".","UNARY","MATH","EXP","+","-","SHIFT","RELATION","COMPARE","THROW","EXTENDS"],Rf=Ee(Lf),$f=["IDENTIFIER","SYMBOLID","STRING","REGEX",")","]","INDEX_END","THIS","SUPER","TAG_END","IVAR","SELF","NEW","ARGVAR","SYMBOL","RETURN","INDEX_END","CALL_END","DECORATOR","@","GENERICS"],Cf=Ee($f),Of=["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"],Df=Ee(Of),Mf=["INDENT","OUTDENT","TERMINATOR"],Pf=Ee(Mf),Rh=Ee(["INDENT","TERMINATOR","DECORATOR"]),Ff=Ee(["INDENT","OUTDENT","TERMINATOR","EXPORT","DEFAULT","DECLARE","GLOBAL","LOCAL","EXTEND","ABSTRACT","STRICT","DECORATOR"]),jf=Ee(["global","declare","local","extend","abstract","strict"]),Gf=Ee(["IDENTIFIER",")","}","]","NUMBER"]),Bf=Ee(["(","[","="]),Vf=Ee([",","(","[","{","|",`
`," "]),Hf=Ee(["COMPARE",".","(","["]);function zf(t,e,s){return this.message=t,this.file=e,this.line=s,this}Od(zf,SyntaxError);var ws=function(t,e){return e===void 0&&(e=0),t[t.length-e-1]},Uf=function(t){var e=0;for(let s=0,r=t.length;s<r;s++)t.charCodeAt(s)==10&&e++;return e},Yf=function(t,e){for(var s="";e>0;)e%2==1&&(s+=t),t+=t,e>>=1;return s},or=dd,ln=fd,ir=Bc,T1=_d;function Mt(){this.reset()}Mt.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};Mt.prototype.jisonBridge=function(t){return this._bridge={lex:pd,setInput:function(e){return this.tokens=e,this.pos=0},upcomingInput:function(){return""}}};Mt.prototype.tokenize=function(t,e,s){var r;if(s===void 0&&(s=null),t.length==0)return[];if(!e.inline){if(F2.test(t)&&(t=`
`+t,t.match(/^\s*$/g)))return[];t.indexOf("\r")>=0&&(t=t.replace(/\r/g,""));let i=t.charCodeAt(t.length-1);(i==9||i==32)&&(t=t.replace(/[\t ]+$/g,""))}if(this._last=null,this._lastTyp=null,this._lastVal=null,this._script=s,this._code=t,this._opts=e,this._locOffset=e.loc||0,this._platform=e.platform||e.target,this._indentStyle=" ",(r=t.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(t),e.inline||this.closeIndentation(),this._ends.length&&this.unclosedError("end of file"),this._platform=="tsc")for(let i=0,n=Mr(this._tokens),a=n.length,o;i<a;i++)o=n[i],o._type=="SYMBOLID"&&(o._type="IDENTIFIER");return this._tokens};Mt.prototype.parse=function(t){var e=0,s=0;for(this._loc=this._locOffset+e;this._chunk=t.slice(e);){let r=this._context;r&&r.pop&&r.pop.test(this._chunk)&&this.popEnd(),s=r&&r.lexer&&r.lexer.call(this)||this._end=="TAG"&&this.tagDefContextToken()||this._inTag&&this.tagContextToken()||this._inStyle2&&this.lexStyleBody()||this.basicContext(),e+=s,this._loc=this._locOffset+e}};Mt.prototype.basicContext=function(){var t=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(t){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=t.charCodeAt(0);return(e>127||e==11||e==12||e==13)&&F2.test(this._chunk)?this.whitespaceToken()||this.commentToken()||this.literalToken()||0:e>=65&&e<=90||e>=97&&e<=122||t=="_"?this.identifierToken()||this.literalToken()||0:e>=48&&e<=57?this.numberToken()||this.literalToken()||0:this.literalToken()||0};Mt.prototype.prevChars=function(t){return t===void 0&&(t=1),t==1?this._code[this._loc-1]:this._code.slice(this._loc-t,this._loc)};Mt.prototype.moveCaret=function(t){return this._loc+=t};Mt.prototype.context=function(){return this._ends[this._ends.length-1]};Mt.prototype.inContext=function(t){var e=this._contexts[this._contexts.length-1];return e&&e[t]};Mt.prototype.pushEnd=function(t,e){let s=this._context;return this._ends.push(t),this._contexts.push(this._context=e||{}),this._end=t,this.refreshScope(),e&&(e.closeType=="STYLE_END"||e.style)&&(e.lexer=this.lexStyleBody,e.style=!0,this._inStyle++),s&&s.style&&t!="}"&&(e.lexer=this.lexStyleBody,e.style=!0),e&&e.id&&(e.start=new ei(e.id+"_START",t,this._last.region()[1],0),this._tokens.push(e.start)),this};Mt.prototype.popEnd=function(t){var e=this._ends.pop();this._end=this._ends[this._ends.length-1];var s=this._context;return s&&s.start&&(s.end=new ei(s.closeType||s.id+"_END",e,this._last.region()[1],0),s.end._start=s.start,s.start._end=s.end,this._tokens.push(s.end)),s&&(s.closeType=="STYLE_END"||s.style)&&this._inStyle--,this._contexts.pop(),this._context=this._contexts[this._contexts.length-1],this.refreshScope(),[e,s]};Mt.prototype.refreshScope=function(){var t=this._ends[this._ends.length-1],e=this._ends[this._ends.length-2];return this._inTag=t=="TAG_END"||e=="TAG_END"&&t=="OUTDENT"};Mt.prototype.queueScope=function(t){return this._scopes[this._indents.length]=t,this};Mt.prototype.popScope=function(t){return this._scopes.pop(),this};Mt.prototype.getScope=function(){return this._scopes[this._indents.length-1]};Mt.prototype.scope=function(t,e){var s=this._ends.push(this._end=t);return this._contexts.push(e||null),t};Mt.prototype.closeSelector=function(){if(this._end=="%")return this.token("SELECTOR_END","%",0),this.pair("%")};Mt.prototype.openDef=function(){return this.pushEnd("DEF")};Mt.prototype.closeDef=function(){if(this.context()=="DEF"){var t=ws(this._tokens);if(or(t)=="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")}};Mt.prototype.tagContextToken=function(){let t=this._chunk[0],e=this._chunk[1],s=/^([A-Za-z\_\-\$\%\#][\w\-\$]*(\:[A-Za-z\_\-\$]+)*)/.exec(this._chunk);if(s){let r=s[1],i="TAG_LITERAL",n=s[0].length;return r=="self"&&this._lastVal=="<"&&(i="SELF"),t=="$"&&(this._lastTyp=="TAG_TYPE"||this._lastTyp=="TAG_START")&&(i="TAG_REF"),t=="%"&&(i="CSS_MIXIN"),t=="#"&&(i="TAG_SYMBOL_ID",r.length==1)?0:(this.token(i,r,n),n)}if(t=="/"&&e==">")return this.token("TAG_END","/>",2),this.pair("TAG_END"),2;if(t=="%"||t==":"||t=="."||t=="@")return this.token("T"+t,t,1),t=="."&&(!e||t3[e])&&this._platform=="tsc"&&this.token("TAG_LITERAL","$CARET$",0,1),1;if(t==" "||t==`
`||t==" "){let r=/^[\n\s\t]+/.exec(this._chunk);return this.token("TAG_WS",r[0],r[0].length),r[0].length}else if(t=="="&&this._chunk[1]!=">")return this.token("=","=",1),this.pushEnd("TAG_ATTR",{id:"VALUE",pop:/^([\s\n\>]|\/\>)/}),1;return 0};Mt.prototype.tagDefContextToken=function(){var t;if(t=r3.exec(this._chunk))return this.token("TAG_TYPE",t[0],t[0].length),t[0].length;if(t=Hd.exec(this._chunk)){var e=t[0];return this.token("TAG_ID",e,e.length),e.length}return this._chunk[0]==`
`&&this.pair("TAG"),0};Mt.prototype.findTypeAnnotation=function(t,e){e===void 0&&(e=!1);for(var s=[],r=0,i=[],n=/[\=\n\ \t\.\,\:\+]/;r<t.length;){var a=t.charAt(r);let o=s[0],l=o=='"'||o=="'";if(a&&a==o){if(s.shift(),e&&s.length==0){r++;break}}else{if(!o&&(a==")"||a=="]"||a=="}"||a==">"))break;if(a=="(")s.unshift(")");else if(a=="[")s.unshift("]");else if(a=="{")s.unshift("}");else if(a=="<")s.unshift(">");else if(a=='"')s.unshift('"');else if(a=="'")s.unshift("'");else if(!o&&n.test(a))break}r++}return r==0?null:t.slice(0,r)};Mt.prototype.findBalancedSelector=function(t){for(var e=[],s=0,r=[];s<t.length-1;){var i=t.charAt(s);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([s,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(i3(t,s+1))break;let l=t.slice(s+1);if(n3.exec(l))break}s++}if(s==0)return null;let n=t.slice(0,s);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};Mt.prototype.lexStyleRule=function(t,e){t===void 0&&(t=0),e===void 0&&(e=!1);let s=t?this._chunk.slice(t):this._chunk,r=this.findBalancedSelector(s);if(r||e){let i=r?r.length:0;this.token("CSS_SEL",r||"",i,t);let n=this._last;return s[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};Mt.prototype.lexStyleBody=function(){if(this._end=="%")return 0;let t=this._chunk[0];var e;let s=i3(this._chunk),r=this._lastTyp;if(!s&&(r=="TERMINATOR"||r=="INDENT")&&Zd(this._chunk,t)&&this.findBalancedSelector(this._chunk))return this.lexStyleRule(0);if(s)return this.token("CSSPROP",this._chunk.slice(0,s),s),s;if(t[0]=="#"&&(e=Yd.exec(this._chunk))){let i=this._chunk[e[0].length]=="("?"COLORMIX":"COLOR";return this.token(i,e[0],e[0].length),e[0].length}if(t=="/"&&!this._last.spaced)return this.token("/",t,1),1;if(e=qd.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=Wd.exec(this._chunk)){let i=e[0].length;return this.token("CSSURL",e[0],i),e[0].length}else if(e=Kd.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==")")&&t=="%")return this.token("CSSUNIT",t,1),1;return 0};Mt.prototype.importsToken=function(){var t;return(t=Bd.exec(this._chunk))?(this.token("IMPORTS",t[1],t[1].length,7),t[0].length):0};Mt.prototype.tagToken=function(){var t,e;if(!(t=Vd.exec(this._chunk)))return 0;var e=Mr(t),s=e[0],r=e[1],i=e[2];if(r=="<"){if(e3.test(this.prevChars(1)||""))return 0;if(this.token("TAG_START","<",1),this.pushEnd(nr.TAG_START,{i:this._tokens.length-1}),t=r3.exec(this._chunk.substr(1,40))){let n=this._chunk[t[0].length+1];if(t[0]!="self"&&n!="{"&&n!="-")return this.token("TAG_TYPE",t[0],t[0].length,1),s.length+t[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",s.substr(1),0)}}return s.length};Mt.prototype.selectorToken=function(){var a,t;if(this._end=="%"){for(var e=this._chunk[0],s=this._context,r=0,i="",n=!1;e=this._chunk[r++];)if(e==")"&&s.parens==0){n=!0;break}else if(e=="(")s.parens++,i+="(";else if(e==")")s.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(!(t=zd.exec(this._chunk)))return 0;var a=Mr(t),o=a[0],l=a[1],p=a[2];return p=="("?(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};Mt.prototype.inTag=function(){var t=this._ends.length;if(t>0){var e=this._ends[t-1],s=t>1?this._ends[t-2]:e;return e=="TAG_END"||s=="TAG_END"&&e=="OUTDENT"}return!1};Mt.prototype.isKeyword=function(t,e){var s;if(e===void 0&&(e=""),t=="tag")return this.isTagDeclarationKeyword();if(t=="mi