You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
148 KiB
22 lines
148 KiB
1 month ago
|
(function(f){function e(){var i=f();return i.default||i}if(typeof exports=="object"&&typeof module=="object")module.exports=e();else if(typeof define=="function"&&define.amd)define(e);else{var t=typeof globalThis<"u"?globalThis:typeof global<"u"?global:typeof self<"u"?self:this||{};t.prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.html=e()}})(function(){"use strict";var lr=Object.defineProperty;var ni=Object.getOwnPropertyDescriptor;var si=Object.getOwnPropertyNames;var ii=Object.prototype.hasOwnProperty;var Xr=t=>{throw TypeError(t)};var Jr=(t,e)=>{for(var r in e)lr(t,r,{get:e[r],enumerable:!0})},ai=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of si(e))!ii.call(t,s)&&s!==r&&lr(t,s,{get:()=>e[s],enumerable:!(n=ni(e,s))||n.enumerable});return t};var oi=t=>ai(lr({},"__esModule",{value:!0}),t);var Zr=(t,e,r)=>e.has(t)||Xr("Cannot "+r);var Q=(t,e,r)=>(Zr(t,e,"read from private field"),r?r.call(t):e.get(t)),en=(t,e,r)=>e.has(t)?Xr("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),tn=(t,e,r,n)=>(Zr(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);var Vo={};Jr(Vo,{languages:()=>Ds,options:()=>ys,parsers:()=>Yr,printers:()=>Ho});var ui=(t,e,r,n)=>{if(!(t&&e==null))return e.replaceAll?e.replaceAll(r,n):r.global?e.replace(r,n):e.split(r).join(n)},w=ui;var ke="string",Be="array",Le="cursor",ce="indent",pe="align",Fe="trim",te="group",he="fill",me="if-break",fe="indent-if-break",Ne="line-suffix",Pe="line-suffix-boundary",Y="line",Ie="label",de="break-parent",St=new Set([Le,ce,pe,Fe,te,he,me,fe,Ne,Pe,Y,Ie,de]);function li(t){if(typeof t=="string")return ke;if(Array.isArray(t))return Be;if(!t)return;let{type:e}=t;if(St.has(e))return e}var Re=li;var ci=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function pi(t){let e=t===null?"null":typeof t;if(e!=="string"&&e!=="object")return`Unexpected doc '${e}',
|
||
|
Expected it to be 'string' or 'object'.`;if(Re(t))throw new Error("doc is valid.");let r=Object.prototype.toString.call(t);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=ci([...St].map(s=>`'${s}'`));return`Unexpected doc.type '${t.type}'.
|
||
|
Expected it to be ${n}.`}var cr=class extends Error{name="InvalidDocError";constructor(e){super(pi(e)),this.doc=e}},_t=cr;var rn=()=>{},re=rn,Et=rn;function k(t){return re(t),{type:ce,contents:t}}function nn(t,e){return re(e),{type:pe,contents:e,n:t}}function _(t,e={}){return re(t),Et(e.expandedStates,!0),{type:te,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function sn(t){return nn(Number.NEGATIVE_INFINITY,t)}function an(t){return nn({type:"root"},t)}function At(t){return Et(t),{type:he,parts:t}}function ge(t,e="",r={}){return re(t),e!==""&&re(e),{type:me,breakContents:t,flatContents:e,groupId:r.groupId}}function on(t,e){return re(t),{type:fe,contents:t,groupId:e.groupId,negate:e.negate}}var ne={type:de};var hi={type:Y,hard:!0},mi={type:Y,hard:!0,literal:!0},E={type:Y},v={type:Y,soft:!0},S=[hi,ne],un=[mi,ne];function q(t,e){re(t),Et(e);let r=[];for(let n=0;n<e.length;n++)n!==0&&r.push(t),r.push(e[n]);return r}var fi=(t,e,r)=>{if(!(t&&e==null))return Array.isArray(e)||typeof e=="string"?e[r<0?e.length+r:r]:e.at(r)},X=fi;function Dt(t,e){if(typeof t=="string")return e(t);let r=new Map;return n(t);function n(i){if(r.has(i))return r.get(i);let a=s(i);return r.set(i,a),a}function s(i){switch(Re(i)){case Be:return e(i.map(n));case he:return e({...i,parts:i.parts.map(n)});case me:return e({...i,breakContents:n(i.breakContents),flatContents:n(i.flatContents)});case te:{let{expandedStates:a,contents:o}=i;return a?(a=a.map(n),o=a[0]):o=n(o),e({...i,contents:o,expandedStates:a})}case pe:case ce:case fe:case Ie:case Ne:return e({...i,contents:n(i.contents)});case ke:case Le:case Fe:case Pe:case Y:case de:return e(i);default:throw new _t(i)}}}function di(t){switch(Re(t)){case he:if(t.parts.every(e=>e===""))return"";break;case te:if(!t.contents&&!t.id&&!t.break&&!t.expandedStates)return"";if(t.contents.type===te&&t.contents.id===t.id&&t.contents.break===t.break&&t.contents.expandedStates===t.expandedStates)return t.contents;break;case pe:case ce:case fe:case Ne:if(!t.contents)return"";break;case me:if(!t.flatContents&&!t.breakContents)return"";break;case Be:{let e=[];for(let r of t){if(!r)continue;let[n,...s]=Array.isArray(r)?r:[r];typeof n=="string"&&typeof X(!1,e,-1)=="string"?e[e.length-1]+=n:e.push(n),e.push(...s)}return e.length===0?"":e.length===1?e[0]:e}case ke:case Le:case Fe:case Pe:case Y:case Ie:case de:break;default:throw new _t(t)}return t}function ln(t){return Dt(t,e=>di(e))}function B(t,e=un){return Dt(t,r=>typeof r=="string"?q(e,r.split(`
|
||
|
`)):r)}var vt="'",cn='"';function gi(t,e){let r=e===!0||e===vt?vt:cn,n=r===vt?cn:vt,s=0,i=0;for(let a of t)a===r?s++:a===n&&i++;return s>i?n:r}var pn=gi;function pr(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var H,hr=class{constructor(e){en(this,H);tn(this,H,new Set(e))}getLeadingWhitespaceCount(e){let r=Q(this,H),n=0;for(let s=0;s<e.length&&r.has(e.charAt(s));s++)n++;return n}getTrailingWhitespaceCount(e){let r=Q(this,H),n=0;for(let s=e.length-1;s>=0&&r.has(e.charAt(s));s--)n++;return n}getLeadingWhitespace(e){let r=this.getLeadingWhitespaceCount(e);return e.slice(0,r)}getTrailingWhitespace(e){let r=this.getTrailingWhitespaceCount(e);return e.slice(e.length-r)}hasLeadingWhitespace(e){return Q(this,H).has(e.charAt(0))}hasTrailingWhitespace(e){return Q(this,H).has(X(!1,e,-1))}trimStart(e){let r=this.getLeadingWhitespaceCount(e);return e.slice(r)}trimEnd(e){let r=this.getTrailingWhitespaceCount(e);return e.slice(0,e.length-r)}trim(e){return this.trimEnd(this.trimStart(e))}split(e,r=!1){let n=`[${pr([...Q(this,H)].join(""))}]+`,s=new RegExp(r?`(${n})`:n,"u");return e.split(s)}hasWhitespaceCharacter(e){let r=Q(this,H);return Array.prototype.some.call(e,n=>r.has(n))}hasNonWhitespaceCharacter(e){let r=Q(this,H);return Array.prototype.some.call(e,n=>!r.has(n))}isWhitespaceOnly(e){let r=Q(this,H);return Array.prototype.every.call(e,n=>r.has(n))}};H=new WeakMap;var hn=hr;var Ci=[" ",`
|
||
|
`,"\f","\r"," "],Si=new hn(Ci),N=Si;var mr=class extends Error{name="UnexpectedNodeError";constructor(e,r,n="type"){super(`Unexpected ${r} node ${n}: ${JSON.stringify(e[n])}.`),this.node=e}},mn=mr;function _i(t){return(t==null?void 0:t.type)==="front-matter"}var $e=_i;var Ei=new Set(["sourceSpan","startSourceSpan","endSourceSpan","nameSpan","valueSpan","keySpan","tagDefinition","tokens","valueTokens","switchValueSourceSpan","expSourceSpan","valueSourceSpan"]),Ai=new Set(["if","else if","for","switch","case"]);function fn(t,e){var r;if(t.type==="text"||t.type==="comment"||$e(t)||t.type==="yaml"||t.type==="toml")return null;if(t.type==="attribute"&&delete e.value,t.type==="docType"&&delete e.value,t.type==="angularControlFlowBlock"&&((r=t.parameters)!=null&&r.children))for(let n of e.parameters.children)Ai.has(t.name)?delete n.expression:n.expression=n.expression.trim();t.type==="angularIcuExpression"&&(e.switchValue=t.switchValue.trim()),t.type==="angularLetDeclarationInitializer"&&delete e.value}fn.ignoredProperties=Ei;var dn=fn;async function Di(t,e){if(t.language==="yaml"){let r=t.value.trim(),n=r?await e(r,{parser:"yaml"}):"";return an([t.startDelimiter,t.explicitLanguage,S,n,n?S:"",t.endDelimiter])}}var gn=Di;function Ce(t,e=!0){return[k([v,t]),e?v:""]}function j(t,e){let r=t.type==="NGRoot"?t.node.type==="NGMicrosyntax"&&t.node.body.length===1&&t.node.body[0].type==="NGMicrosyntaxExpression"?t.node.body[0].expression:t.node:t.type==="JsExpressionRoot"?t.node:t;return r&&(r.type==="ObjectExpression"||r.type==="ArrayExpression"||(e.parser==="__vue_expression"||e.parser==="__vue_ts_expression")&&(r.type==="TemplateLiteral"||r.type==="StringLiteral"))}async function T(t,e,r,n){r={__isInHtmlAttribute:!0,__embeddedInHtml:!0,...r};let s=!0;n&&(r.__onHtmlBindingRoot=(a,o)=>{s=n(a,o)});let i=await e(t,r,e);return s?_(i):Ce(i)}function vi(t,e,r,n){let{node:s}=r,i=n.originalText.slice(s.sourceSpan.start.offset,s.sourceSpan.end.offset);return/^\s*$/u.test(i)?"":T(i,t,{parser:"__ng_directive",__isInHtmlAttribute:!1},j)}var Cn=vi;var yi=t=>String(t).split(/[/\\]/u).pop();function Sn(t,e){if(!e)return;let r=yi(e).toLowerCase();return t.find(({filenames:n})=>n==null?void 0:n.some(s=>s.toLowerCase()===r))??t.find(({extensions:n})=>n==null?void 0:n.some(s=>r.endsWith(s)))}function wi(t,e){if(e)return t.find(({name:r})=>r.toLowerCase()===e)??t.find(({aliases:r})=>r==null?void 0:r.includes(e))??t.find(({extensions:r})=>r==null?void 0:r.includes(`.${e}`))}function bi(t,e){let r=t.plugins.flatMap(s=>s.languages??[]),n=wi(r,e.language)??Sn(r,e.physicalFile)??Sn(r,e.file)??(e.physicalFile,void 0);return n==null?void 0:n.parsers[0]}var Oe=bi;var _n="inline",En={area:"none",base:"none",basefont:"none",datalist:"none",head:"none",link:"none",meta:"none",noembed:"none",noframes:"none",param:"block",rp:"none",script:"block",style:"none",template:"inline",title:"none",html:"block",body:"block",address:"block",blockquote:"block",center:"block",dialog:"block",div:"block",figure:"block",figcaption:"block",footer:"block",form:"block",header:"block",hr:"block",legend:"block",listing:"block",main:"block",p:"block",plaintext:"block",pre:"block",search:"block",xmp:"block",slot:"contents",ruby:"ruby",rt:"ruby-text",article:"block",aside:"block",h1:"block",h2:"block",h3:"block",h4:"block",h5:"block",h6:"block",hgroup:"block",nav:"block",section:"block",dir:"block",dd:"block",dl:"block",dt:"block",menu:"block",ol:"block",ul:"block",li:"list-item",table:"table",caption:"table-caption",colgroup:"table-column-group",col:"table-column",thead:"table-header-group",tbody:"table-row-group",tfoot:"table-footer-group",tr:"table-row",td:"table-cell",th:"table-cell",input:"inline-block",button:"inline-block",fieldset:"block",marquee:"inline-block",source:"block",track:"block",details:"block",summary:"block",meter:"inline-block",progress:"inline-block",object:"inline-block",video:"inline-block",audio:"inline-block",select:"inline-block",option:"block",optgroup:"block"},An="normal",Dn={listing:"pre",plaintext:"pre",pre:"pre",xmp:"pre",nobr:"nowrap",table:"initial",text
|
||
|
`)){if(r.length===0)continue;let n=N.getLeadingWhitespaceCount(r);if(n===0)return 0;r.length!==n&&n<e&&(e=n)}return e===Number.POSITIVE_INFINITY?0:e}function Sr(t,e=Hi(t)){return e===0?t:t.split(`
|
||
|
`).map(r=>r.slice(e)).join(`
|
||
|
`)}function _r(t){return w(!1,w(!1,t,"'","'"),""",'"')}function P(t){return _r(t.value)}var Vi=new Set(["template","style","script"]);function Je(t,e){return Ae(t,e)&&!Vi.has(t.fullName)}function Ae(t,e){return e.parser==="vue"&&t.type==="element"&&t.parent.type==="root"&&t.fullName.toLowerCase()!=="html"}function Tt(t,e){return Ae(t,e)&&(Je(t,e)||t.attrMap.lang&&t.attrMap.lang!=="html")}function $n(t){let e=t.fullName;return e.charAt(0)==="#"||e==="slot-scope"||e==="v-slot"||e.startsWith("v-slot:")}function On(t,e){let r=t.parent;if(!Ae(r,e))return!1;let n=r.fullName,s=t.fullName;return n==="script"&&s==="setup"||n==="style"&&s==="vars"}function xt(t,e=t.value){return t.parent.isWhitespaceSensitive?t.parent.isIndentationSensitive?B(e):B(Sr(fr(e)),S):q(E,N.split(e))}function kt(t,e){return Ae(t,e)&&t.name==="script"}var Er=/\{\{(.+?)\}\}/su;async function Mn(t,e){let r=[];for(let[n,s]of t.split(Er).entries())if(n%2===0)r.push(B(s));else try{r.push(_(["{{",k([E,await T(s,e,{parser:"__ng_interpolation",__isInHtmlInterpolation:!0})]),E,"}}"]))}catch{r.push("{{",B(s),"}}")}return r}function Ar({parser:t}){return(e,r,n)=>T(P(n.node),e,{parser:t},j)}var Ui=Ar({parser:"__ng_action"}),Wi=Ar({parser:"__ng_binding"}),zi=Ar({parser:"__ng_directive"});function Gi(t,e){if(e.parser!=="angular")return;let{node:r}=t,n=r.fullName;if(n.startsWith("(")&&n.endsWith(")")||n.startsWith("on-"))return Ui;if(n.startsWith("[")&&n.endsWith("]")||/^bind(?:on)?-/u.test(n)||/^ng-(?:if|show|hide|class|style)$/u.test(n))return Wi;if(n.startsWith("*"))return zi;let s=P(r);if(/^i18n(?:-.+)?$/u.test(n))return()=>Ce(At(xt(r,s.trim())),!s.includes("@@"));if(Er.test(s))return i=>Mn(s,i)}var qn=Gi;function Yi(t,e){let{node:r}=t,n=P(r);if(r.fullName==="class"&&!e.parentParser&&!n.includes("{{"))return()=>n.trim().split(/\s+/u).join(" ")}var Hn=Yi;function Vn(t){return t===" "||t===`
|
||
|
`||t==="\f"||t==="\r"||t===" "}var ji=/^[ \t\n\r\u000c]+/,Ki=/^[, \t\n\r\u000c]+/,Qi=/^[^ \t\n\r\u000c]+/,Xi=/[,]+$/,Un=/^\d+$/,Ji=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/;function Zi(t){let e=t.length,r,n,s,i,a,o=0,u;function p(C){let A,D=C.exec(t.substring(o));if(D)return[A]=D,o+=A.length,A}let l=[];for(;;){if(p(Ki),o>=e){if(l.length===0)throw new Error("Must contain one or more image candidate strings.");return l}u=o,r=p(Qi),n=[],r.slice(-1)===","?(r=r.replace(Xi,""),d()):f()}function f(){for(p(ji),s="",i="in descriptor";;){if(a=t.charAt(o),i==="in descriptor")if(Vn(a))s&&(n.push(s),s="",i="after descriptor");else if(a===","){o+=1,s&&n.push(s),d();return}else if(a==="(")s+=a,i="in parens";else if(a===""){s&&n.push(s),d();return}else s+=a;else if(i==="in parens")if(a===")")s+=a,i="in descriptor";else if(a===""){n.push(s),d();return}else s+=a;else if(i==="after descriptor"&&!Vn(a))if(a===""){d();return}else i="in descriptor",o-=1;o+=1}}function d(){let C=!1,A,D,R,F,c={},g,y,M,x,V;for(F=0;F<n.length;F++)g=n[F],y=g[g.length-1],M=g.substring(0,g.length-1),x=parseInt(M,10),V=parseFloat(M),Un.test(M)&&y==="w"?((A||D)&&(C=!0),x===0?C=!0:A=x):Ji.test(M)&&y==="x"?((A||D||R)&&(C=!0),V<0?C=!0:D=V):Un.test(M)&&y==="h"?((R||D)&&(C=!0),x===0?C=!0:R=x):C=!0;if(!C)c.source={value:r,startOffset:u},A&&(c.width={value:A}),D&&(c.density={value:D}),R&&(c.height={value:R}),l.push(c);else throw new Error(`Invalid srcset descriptor found in "${t}" at "${g}".`)}}var Wn=Zi;function ea(t){if(t.node.fullName==="srcset"&&(t.parent.fullName==="img"||t.parent.fullName==="source"))return()=>ra(P(t.node))}var zn={width:"w",height:"h",density:"x"},ta=Object.keys(zn);function ra(t){let e=Wn(t),r=ta.filter(l=>e.some(f=>Object.prototype.hasOwnProperty.call(f,l)));if(r.length>1)throw new Error("Mixed descriptor in srcset is not supported");let[n]=r,s=zn[n],i=e.map(l=>l.source.value),a=Math.max(...i.map(l=>l.length)),o=e.map(l=>l[n]?String(l[n].value):""),u=o.map(l=>{let f=l.indexOf(".");return f===-1?l.length:f}),p=Math.max(...u);return Ce(q([",",E],i.map((l,f)=>{let d=[l],C=o[f];if(C){let A=a-l.length+1,D=p-u[f],R=" ".repeat(A+D);d.push(ge(R," "),C+s)}return d})))}var Gn=ea;function Yn(t,e){let{node:r}=t,n=P(t.node).trim();if(r.fullName==="style"&&!e.parentParser&&!n.includes("{{"))return async s=>Ce(await s(n,{parser:"css",__isHTMLStyleAttribute:!0}))}var Dr=new WeakMap;function na(t,e){let{root:r}=t;return Dr.has(r)||Dr.set(r,r.children.some(n=>kt(n,e)&&["ts","typescript"].includes(n.attrMap.lang))),Dr.get(r)}var Me=na;function jn(t,e,r){let{node:n}=r,s=P(n);return T(`type T<${s}> = any`,t,{parser:"babel-ts",__isEmbeddedTypescriptGenericParameters:!0},j)}function Kn(t,e,{parseWithTs:r}){return T(`function _(${t}) {}`,e,{parser:r?"babel-ts":"babel",__isVueBindings:!0})}function Qn(t){let e=/^(?:[\w$]+|\([^)]*\))\s*=>|^function\s*\(/u,r=/^[$_a-z][\w$]*(?:\.[$_a-z][\w$]*|\['[^']*'\]|\["[^"]*"\]|\[\d+\]|\[[$_a-z][\w$]*\])*$/iu,n=t.trim();return e.test(n)||r.test(n)}async function Xn(t,e,r,n){let s=P(r.node),{left:i,operator:a,right:o}=sa(s),u=Me(r,n);return[_(await T(`function _(${i}) {}`,t,{parser:u?"babel-ts":"babel",__isVueForBindingLeft:!0}))," ",a," ",await T(o,t,{parser:u?"__ts_expression":"__js_expression"})]}function sa(t){let e=/(.*?)\s+(in|of)\s+(.*)/su,r=/,([^,\]}]*)(?:,([^,\]}]*))?$/u,n=/^\(|\)$/gu,s=t.match(e);if(!s)return;let i={};if(i.for=s[3].trim(),!i.for)return;let a=w(!1,s[1].trim(),n,""),o=a.match(r);o?(i.alias=a.replace(r,""),i.iterator1=o[1].trim(),o[2]&&(i.iterator2=o[2].trim())):i.alias=a;let u=[i.alias,i.iterator1,i.iterator2];if(!u.some((p,l)=>!p&&(l===0||u.slice(l+1).some(Boolean))))return{left:u.filter(Boolean).join(","),operator:s[2],right:i.for}}function ia(t,e){if(e.parser!=="vue")return;let{node:r}=t,n=r.fullName;if(n==="v-for")return Xn;if(n==="generic"&&kt(r.parent,e))return jn;let s=P(r),i=Me(t,e);if($n(r)||On(r,e))return a=>Kn(s,a,{parseWithTs:i});if(n.startsWith("@")||n.startsWith("v-on:"))return a=>aa(s,a,{parseWithTs:i});if(n.startsWith(":")||n.startsWith("v-bind:"))return a=>oa(s,a,{parseWithTs:i});if(n.st
|
||
|
|
||
|
`+t}var ls=new Map([["if",new Set(["else if","else"])],["else if",new Set(["else if","else"])],["for",new Set(["empty"])],["defer",new Set(["placeholder","error","loading"])],["placeholder",new Set(["placeholder","error","loading"])],["error",new Set(["placeholder","error","loading"])],["loading",new Set(["placeholder","error","loading"])]]);function cs(t){let e=ie(t);return t.type==="element"&&!t.endSourceSpan&&qe(t.children)?Math.max(e,cs(X(!1,t.children,-1))):e}function it(t,e,r){let n=t.node;if(Ee(n)){let s=cs(n);return[z(n,e),B(N.trimEnd(e.originalText.slice(se(n)+(n.prev&&et(n.prev)?Lt(n).length:0),s-(n.next&&K(n.next)?ve(n,e).length:0)))),W(n,e)]}return r()}function Pt(t,e){return $(t)&&$(e)?t.isTrailingSpaceSensitive?t.hasTrailingSpaces?wt(e)?S:E:"":wt(e)?S:v:et(t)&&(Ee(e)||e.firstChild||e.isSelfClosing||e.type==="element"&&e.attrs.length>0)||t.type==="element"&&t.isSelfClosing&&K(e)?"":!e.isLeadingSpaceSensitive||wt(e)||K(e)&&t.lastChild&&we(t.lastChild)&&t.lastChild.lastChild&&we(t.lastChild.lastChild)?S:e.hasLeadingSpaces?E:v}function He(t,e,r){let{node:n}=t;if(gr(n))return[ne,...t.map(i=>{let a=i.node,o=a.prev?Pt(a.prev,a):"";return[o?[o,Qe(a.prev)?S:""]:"",it(i,e,r)]},"children")];let s=n.children.map(()=>Symbol(""));return t.map((i,a)=>{let o=i.node;if($(o)){if(o.prev&&$(o.prev)){let A=Pt(o.prev,o);if(A)return Qe(o.prev)?[S,S,it(i,e,r)]:[A,it(i,e,r)]}return it(i,e,r)}let u=[],p=[],l=[],f=[],d=o.prev?Pt(o.prev,o):"",C=o.next?Pt(o,o.next):"";return d&&(Qe(o.prev)?u.push(S,S):d===S?u.push(S):$(o.prev)?p.push(d):p.push(ge("",v,{groupId:s[a-1]}))),C&&(Qe(o)?$(o.next)&&f.push(S,S):C===S?$(o.next)&&f.push(S):l.push(C)),[...u,_([...p,_([it(i,e,r),...l],{id:s[a]})]),...f]},"children")}function ps(t,e,r){let{node:n}=t,s=[];va(t)&&s.push("} "),s.push("@",n.name),n.parameters&&s.push(" (",_(r("parameters")),")"),s.push(" {");let i=hs(n);return n.children.length>0?(n.firstChild.hasLeadingSpaces=!0,n.lastChild.hasTrailingSpaces=!0,s.push(k([S,He(t,e,r)])),i&&s.push(S,"}")):i&&s.push("}"),_(s,{shouldBreak:!0})}function hs(t){var e,r;return!(((e=t.next)==null?void 0:e.type)==="angularControlFlowBlock"&&((r=ls.get(t.name))!=null&&r.has(t.next.name)))}function va(t){let{previous:e}=t;return(e==null?void 0:e.type)==="angularControlFlowBlock"&&!Ee(e)&&!hs(e)}function ms(t,e,r){return[k([v,q([";",E],t.map(r,"children"))]),v]}function fs(t,e,r){let{node:n}=t;return[be(n,e),_([n.switchValue.trim(),", ",n.clause,n.cases.length>0?[",",k([E,q(E,t.map(r,"cases"))])]:"",v]),De(n,e)]}function ds(t,e,r){let{node:n}=t;return[n.value," {",_([k([v,t.map(({node:s})=>s.type==="text"&&!N.trim(s.value)?"":r(),"expression")]),v]),"}"]}function gs(t,e,r){let{node:n}=t;if(yt(n,e))return[z(n,e),_(rt(t,e,r)),B(Nt(n,e)),...Ze(n,e),W(n,e)];let s=n.children.length===1&&(n.firstChild.type==="interpolation"||n.firstChild.type==="angularIcuExpression")&&n.firstChild.isLeadingSpaceSensitive&&!n.firstChild.hasLeadingSpaces&&n.lastChild.isTrailingSpaceSensitive&&!n.lastChild.hasTrailingSpaces,i=Symbol("element-attr-group-id"),a=l=>_([_(rt(t,e,r),{id:i}),l,Ze(n,e)]),o=l=>s?on(l,{groupId:i}):(U(n)||Je(n,e))&&n.parent.type==="root"&&e.parser==="vue"&&!e.vueIndentScriptAndStyle?l:k(l),u=()=>s?ge(v,"",{groupId:i}):n.firstChild.hasLeadingSpaces&&n.firstChild.isLeadingSpaceSensitive?E:n.firstChild.type==="text"&&n.isWhitespaceSensitive&&n.isIndentationSensitive?sn(v):v,p=()=>(n.next?K(n.next):ye(n.parent))?n.lastChild.hasTrailingSpaces&&n.lastChild.isTrailingSpaceSensitive?" ":"":s?ge(v,"",{groupId:i}):n.lastChild.hasTrailingSpaces&&n.lastChild.isTrailingSpaceSensitive?E:(n.lastChild.type==="comment"||n.lastChild.type==="text"&&n.isWhitespaceSensitive&&n.isIndentationSensitive)&&new RegExp(`\\n[\\t ]{${e.tabWidth*(t.ancestors.length-1)}}$`,"u").test(n.lastChild.value)?"":v;return n.children.length===0?a(n.hasDanglingSpaces&&n.isDanglingSpaceSensitive?E:""):a([kn(n)?ne:"",o([u(),He(t,e,r)]),p()])}function at(t){return t>=9&&t<=32||t==160}function It(t){return 48<=t&&t<=57}function ot(t){return t>=97&&t<=122||t>=65&&t<=90}function Cs(t){return t>=97&&t<=102||t>=65&
|
||
|
`&&++o==r)););for(a=0,o=0;a<e&&i<n.length-1&&(i++,a++,!(n[i]==`
|
||
|
`&&++o==r)););return{before:n.substring(s,this.offset),after:n.substring(this.offset,i+1)}}return null}},Te=class{constructor(e,r){this.content=e,this.url=r}},h=class{constructor(e,r,n=e,s=null){this.start=e,this.end=r,this.fullStart=n,this.details=s}toString(){return this.start.file.content.substring(this.start.offset,this.end.offset)}},Ot;(function(t){t[t.WARNING=0]="WARNING",t[t.ERROR=1]="ERROR"})(Ot||(Ot={}));var Ue=class{constructor(e,r,n=Ot.ERROR){this.span=e,this.msg=r,this.level=n}contextualMessage(){let e=this.span.start.getContext(100,3);return e?`${this.msg} ("${e.before}[${Ot[this.level]} ->]${e.after}")`:this.msg}toString(){let e=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${e}`}};var wa=[Ta,xa,Ba,Fa,Na,Ra,Pa,Ia,$a,La];function ba(t,e){for(let r of wa)r(t,e);return t}function Ta(t){t.walk(e=>{if(e.type==="element"&&e.tagDefinition.ignoreFirstLf&&e.children.length>0&&e.children[0].type==="text"&&e.children[0].value[0]===`
|
||
|
`){let r=e.children[0];r.value.length===1?e.removeChild(r):r.value=r.value.slice(1)}})}function xa(t){let e=r=>{var n,s;return r.type==="element"&&((n=r.prev)==null?void 0:n.type)==="ieConditionalStartComment"&&r.prev.sourceSpan.end.offset===r.startSourceSpan.start.offset&&((s=r.firstChild)==null?void 0:s.type)==="ieConditionalEndComment"&&r.firstChild.sourceSpan.start.offset===r.startSourceSpan.end.offset};t.walk(r=>{if(r.children)for(let n=0;n<r.children.length;n++){let s=r.children[n];if(!e(s))continue;let i=s.prev,a=s.firstChild;r.removeChild(i),n--;let o=new h(i.sourceSpan.start,a.sourceSpan.end),u=new h(o.start,s.sourceSpan.end);s.condition=i.condition,s.sourceSpan=u,s.startSourceSpan=o,s.removeChild(a)}})}function ka(t,e,r){t.walk(n=>{if(n.children)for(let s=0;s<n.children.length;s++){let i=n.children[s];if(i.type!=="text"&&!e(i))continue;i.type!=="text"&&(i.type="text",i.value=r(i));let a=i.prev;!a||a.type!=="text"||(a.value+=i.value,a.sourceSpan=new h(a.sourceSpan.start,i.sourceSpan.end),n.removeChild(i),s--)}})}function Ba(t){return ka(t,e=>e.type==="cdata",e=>`<![CDATA[${e.value}]]>`)}function La(t){let e=r=>{var n,s;return r.type==="element"&&r.attrs.length===0&&r.children.length===1&&r.firstChild.type==="text"&&!N.hasWhitespaceCharacter(r.children[0].value)&&!r.firstChild.hasLeadingSpaces&&!r.firstChild.hasTrailingSpaces&&r.isLeadingSpaceSensitive&&!r.hasLeadingSpaces&&r.isTrailingSpaceSensitive&&!r.hasTrailingSpaces&&((n=r.prev)==null?void 0:n.type)==="text"&&((s=r.next)==null?void 0:s.type)==="text"};t.walk(r=>{if(r.children)for(let n=0;n<r.children.length;n++){let s=r.children[n];if(!e(s))continue;let i=s.prev,a=s.next;i.value+=`<${s.rawName}>`+s.firstChild.value+`</${s.rawName}>`+a.value,i.sourceSpan=new h(i.sourceSpan.start,a.sourceSpan.end),i.isTrailingSpaceSensitive=a.isTrailingSpaceSensitive,i.hasTrailingSpaces=a.hasTrailingSpaces,r.removeChild(s),n--,r.removeChild(a)}})}function Fa(t,e){if(e.parser==="html")return;let r=/\{\{(.+?)\}\}/su;t.walk(n=>{if(yn(n))for(let s of n.children){if(s.type!=="text")continue;let i=s.sourceSpan.start,a=null,o=s.value.split(r);for(let u=0;u<o.length;u++,i=a){let p=o[u];if(u%2===0){a=i.moveBy(p.length),p.length>0&&n.insertChildBefore(s,{type:"text",value:p,sourceSpan:new h(i,a)});continue}a=i.moveBy(p.length+4),n.insertChildBefore(s,{type:"interpolation",sourceSpan:new h(i,a),children:p.length===0?[]:[{type:"text",value:p,sourceSpan:new h(i.moveBy(2),a.moveBy(-2))}]})}n.removeChild(s)}})}function Na(t){t.walk(e=>{if(!e.children)return;if(e.children.length===0||e.children.length===1&&e.children[0].type==="text"&&N.trim(e.children[0].value).length===0){e.hasDanglingSpaces=e.children.length>0,e.children=[];return}let r=wn(e),n=dr(e);if(!r)for(let s=0;s<e.children.length;s++){let i=e.children[s];if(i.type!=="text")continue;let{leadingWhitespace:a,text:o,trailingWhitespace:u}=vn(i.value),p=i.prev,l=i.next;o?(i.value=o,i.sourceSpan=new h(i.sourceSpan.start.moveBy(a.length),i.sourceSpan.end.moveBy(-u.length)),a&&(p&&(p.hasTrailingSpaces=!0),i.hasLeadingSpaces=!0),u&&(i.hasTrailingSpaces=!0,l&&(l.hasLeadingSpaces=!0))):(e.removeChild(i),s--,(a||u)&&(p&&(p.hasTrailingSpaces=!0),l&&(l.hasLeadingSpaces=!0)))}e.isWhitespaceSensitive=r,e.isIndentationSensitive=n})}function Pa(t){t.walk(e=>{e.isSelfClosing=!e.children||e.type==="element"&&(e.tagDefinition.isVoid||e.endSourceSpan&&e.startSourceSpan.start===e.endSourceSpan.start&&e.startSourceSpan.end===e.endSourceSpan.end)})}function Ia(t,e){t.walk(r=>{r.type==="element"&&(r.hasHtmComponentClosingTag=r.endSourceSpan&&/^<\s*\/\s*\/\s*>$/u.test(e.originalText.slice(r.endSourceSpan.start.offset,r.endSourceSpan.end.offset)))})}function Ra(t,e){t.walk(r=>{r.cssDisplay=In(r,e)})}function $a(t,e){t.walk(r=>{let{children:n}=r;if(n){if(n.length===0){r.isDanglingSpaceSensitive=xn(r);return}for(let s of n)s.isLeadingSpaceSensitive=bn(s,e),s.isTrailingSpaceSensitive=Tn(s,e);for(let s=0;s<n.length;s++){let i=n[s];i.isLeadingSpaceSensitive=(s===0||i.prev.isTrailingSpaceSensitive)&&i.isLeadingSpaceSensitive,i.isTrailingSpaceSensitive=(s===n.lengt
|
||
|
If '${e}' is a directive input, make sure the directive is imported by the current module.`}:{error:!1}}validateAttribute(e){return e.toLowerCase().startsWith("on")?{error:!0,msg:`Binding to event attribute '${e}' is disallowed for security reasons, please use (${e.slice(2)})=...`}:{error:!1}}allKnownElementNames(){return Array.from(this._schema.keys())}allKnownAttributesOfElement(e){let r=this._schema.get(e.toLowerCase())||this._schema.get("unknown");return Array.from(r.keys()).map(n=>Ga.get(n)??n)}allKnownEventsOfElement(e){return Array.from(this._eventSchema.get(e.toLowerCase())??[])}normalizeAnimationStyleProperty(e){return _s(e)}normalizeAnimationStyleValue(e,r,n){let s="",i=n.toString().trim(),a=null;if(Ya(e)&&n!==0&&n!=="0")if(typeof n=="number")s="px";else{let o=n.match(/^[+-]?[\d\.]+([a-z]*)$/);o&&o[1].length==0&&(a=`Please provide a CSS unit value for ${r}:${n}`)}return{error:a,value:i+s}}};function Ya(t){switch(t){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}var m=class{constructor({closedByChildren:e,implicitNamespacePrefix:r,contentType:n=I.PARSABLE_DATA,closedByParent:s=!1,isVoid:i=!1,ignoreFirstLf:a=!1,preventNamespaceInheritance:o=!1,canSelfClose:u=!1}={}){this.closedByChildren={},this.closedByParent=!1,e&&e.length>0&&e.forEach(p=>this.closedByChildren[p]=!0),this.isVoid=i,this.closedByParent=s||i,this.implicitNamespacePrefix=r||null,this.contentType=n,this.ignoreFirstLf=a,this.preventNamespaceInheritance=o,this.canSelfClose=u??i}isClosedByChild(e){return this.isVoid||e.toLowerCase()in this.closedByChildren}getContentType(e){return typeof this.contentType=="object"?(e===void 0?void 0:this.contentType[e])??this.contentType.default:this.contentType}},Bs,lt;function Ge(t){return lt||(Bs=new m({canSelfClose:!0}),lt=Object.assign(Object.create(null),{base:new m({isVoid:!0}),meta:new m({isVoid:!0}),area:new m({isVoid:!0}),embed:new m({isVoid:!0}),link:new m({isVoid:!0}),img:new m({isVoid:!0}),input:new m({isVoid:!0}),param:new m({isVoid:!0}),hr:new m({isVoid:!0}),br:new m({isVoid:!0}),source:new m({isVoid:!0}),track:new m({isVoid:!0}),wbr:new m({isVoid:!0}),p:new m({closedByChildren:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","ol","p","pre","section","table","ul"],closedByParent:!0}),thead:new m({closedByChildren:["tbody","tfoot"]}),tbody:new m({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new m({closedByChildren:["tbody"],closedByParent:!0}),tr:new m({closedByChildren:["tr"],closedByParent:!0}),td:new m({closedByChildren:["td","th"],closedByParent:!0}),th:new m({closedByChildren:["td","th"],closedByParent:!0}),col:new m({isVoid:!0}),svg:new m({implicitNamespacePrefix:"svg"}),foreignObject:new m({implicitNamespacePrefix:"svg",preventNamespaceInheritance:!0}),math:new m({implicitNamespacePrefix:"math"}),li:new m({closedByChildren:["li"],closedByParent:!0}),dt:new m({closedByChildren:["dt","dd"]}),dd:new m({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new m({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new m({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new m({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new m({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new m({closedByChildren:["optgroup"],closedByParent:!0}),option:new m({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new m({ignoreFirstLf:!0}),listing:new m({ignoreFirstLf:!0}),style:new m({contentType:I.RAW_TEXT}),script:new m({contentType:I.RAW_TEXT}),title:new m({contentType:{default:I.ESCAPABLE_RA
|
||
|
`,Nfr:"\u{1D511}",NoBreak:"\u2060",NonBreakingSpace:"\xA0",nbsp:"\xA0",Nopf:"\u2115",naturals:"\u2115",Not:"\u2AEC",NotCongruent:"\u2262",nequiv:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",npar:"\u2226",nparallel:"\u2226",nshortparallel:"\u2226",nspar:"\u2226",NotElement:"\u2209",notin:"\u2209",notinva:"\u2209",NotEqual:"\u2260",ne:"\u2260",NotEqualTilde:"\u2242\u0338",nesim:"\u2242\u0338",NotExists:"\u2204",nexist:"\u2204",nexists:"\u2204",NotGreater:"\u226F",ngt:"\u226F",ngtr:"\u226F",NotGreaterEqual:"\u2271",nge:"\u2271",ngeq:"\u2271",NotGreaterFullEqual:"\u2267\u0338",ngE:"\u2267\u0338",ngeqq:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",nGtv:"\u226B\u0338",NotGreaterLess:"\u2279",ntgl:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",NotGreaterTilde:"\u2275",ngsim:"\u2275",NotHumpDownHump:"\u224E\u0338",nbump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",nbumpe:"\u224F\u0338",NotLeftTriangle:"\u22EA",nltri:"\u22EA",ntriangleleft:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",nltrie:"\u22EC",ntrianglelefteq:"\u22EC",NotLess:"\u226E",nless:"\u226E",nlt:"\u226E",NotLessEqual:"\u2270",nle:"\u2270",nleq:"\u2270",NotLessGreater:"\u2278",ntlg:"\u2278",NotLessLess:"\u226A\u0338",nLtv:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",NotLessTilde:"\u2274",nlsim:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",NotPrecedes:"\u2280",npr:"\u2280",nprec:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",npre:"\u2AAF\u0338",npreceq:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",nprcue:"\u22E0",NotReverseElement:"\u220C",notni:"\u220C",notniva:"\u220C",NotRightTriangle:"\u22EB",nrtri:"\u22EB",ntriangleright:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",nrtrie:"\u22ED",ntrianglerighteq:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",nsqsube:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",nsqsupe:"\u22E3",NotSubset:"\u2282\u20D2",nsubset:"\u2282\u20D2",vnsub:"\u2282\u20D2",NotSubsetEqual:"\u2288",nsube:"\u2288",nsubseteq:"\u2288",NotSucceeds:"\u2281",nsc:"\u2281",nsucc:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",nsce:"\u2AB0\u0338",nsucceq:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",nsccue:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",nsupset:"\u2283\u20D2",vnsup:"\u2283\u20D2",NotSupersetEqual:"\u2289",nsupe:"\u2289",nsupseteq:"\u2289",NotTilde:"\u2241",nsim:"\u2241",NotTildeEqual:"\u2244",nsime:"\u2244",nsimeq:"\u2244",NotTildeFullEqual:"\u2247",ncong:"\u2247",NotTildeTilde:"\u2249",nap:"\u2249",napprox:"\u2249",NotVerticalBar:"\u2224",nmid:"\u2224",nshortmid:"\u2224",nsmid:"\u2224",Nscr:"\u{1D4A9}",Ntilde:"\xD1",Nu:"\u039D",OElig:"\u0152",Oacute:"\xD3",Ocirc:"\xD4",Ocy:"\u041E",Odblac:"\u0150",Ofr:"\u{1D512}",Ograve:"\xD2",Omacr:"\u014C",Omega:"\u03A9",ohm:"\u03A9",Omicron:"\u039F",Oopf:"\u{1D546}",OpenCurlyDoubleQuote:"\u201C",ldquo:"\u201C",OpenCurlyQuote:"\u2018",lsquo:"\u2018",Or:"\u2A54",Oscr:"\u{1D4AA}",Oslash:"\xD8",Otilde:"\xD5",Otimes:"\u2A37",Ouml:"\xD6",OverBar:"\u203E",oline:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",tbrk:"\u23B4",OverParenthesis:"\u23DC",PartialD:"\u2202",part:"\u2202",Pcy:"\u041F",Pfr:"\u{1D513}",Phi:"\u03A6",Pi:"\u03A0",PlusMinus:"\xB1",plusmn:"\xB1",pm:"\xB1",Popf:"\u2119",primes:"\u2119",Pr:"\u2ABB",Precedes:"\u227A",pr:"\u227A",prec:"\u227A",PrecedesEqual:"\u2AAF",pre:"\u2AAF",preceq:"\u2AAF",PrecedesSlantEqual:"\u227C",prcue:"\u227C",preccurlyeq:"\u227C",PrecedesTilde:"\u227E",precsim:"\u227E",prsim:"\u227E",Prime:"\u2033",Product:"\u220F",prod:"\u220F",Proportional:"\u221D",prop:"\u221D",propto:"\u221D",varpropto:"\u221D",vprop:"\u221D",Pscr:"\u{1D4AB}",Psi:"\u03A8",QUOT:'"',quot:'"',Qfr:"\u{1D514}",Qopf:"\u211A",rationals:"\u211A",Qscr:"\u{1D4AC}",RBarr:"\u2910",drbkarow:"\u2910",REG:"\xAE",circledR:"\xAE",reg:"\xAE",Racute:"\u0154",Rang:"\u27EB",Rarr:"\u21A0",twoheadrightarrow:"\u21A0",Rarrtl:"\u2916",Rcaron:"\u0158",Rcedil:"\u0156",Rcy:"\u0420",Re:
|
||
|
`)}tokenize(){for(;this._cursor.peek()!==0;){let e=this._cursor.clone();try{if(this._attemptCharCode(60))if(this._attemptCharCode(33))this._attemptStr("[CDATA[")?this._consumeCdata(e):this._attemptStr("--")?this._consumeComment(e):this._attemptStrCaseInsensitive("doctype")?this._consumeDocType(e):this._consumeBogusComment(e);else if(this._attemptCharCode(47))this._consumeTagClose(e);else{let r=this._cursor.clone();this._attemptCharCode(63)?(this._cursor=r,this._consumeBogusComment(e)):this._consumeTagOpen(e)}else this._tokenizeLet&&this._cursor.peek()===64&&!this._inInterpolation&&this._attemptStr("@let")?this._consumeLetDeclaration(e):this._tokenizeBlocks&&this._attemptCharCode(64)?this._consumeBlockStart(e):this._tokenizeBlocks&&!this._inInterpolation&&!this._isInExpansionCase()&&!this._isInExpansionForm()&&this._attemptCharCode(125)?this._consumeBlockEnd(e):this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeWithInterpolation(5,8,()=>this._isTextEnd(),()=>this._isTagStart())}catch(r){this.handleError(r)}}this._beginToken(34),this._endToken([])}_getBlockName(){let e=!1,r=this._cursor.clone();return this._attemptCharCodeUntilFn(n=>at(n)?!e:Ms(n)?(e=!0,!1):!0),this._cursor.getChars(r).trim()}_consumeBlockStart(e){this._beginToken(25,e);let r=this._endToken([this._getBlockName()]);if(this._cursor.peek()===40)if(this._cursor.advance(),this._consumeBlockParameters(),this._attemptCharCodeUntilFn(b),this._attemptCharCode(41))this._attemptCharCodeUntilFn(b);else{r.type=29;return}this._attemptCharCode(123)?(this._beginToken(26),this._endToken([])):r.type=29}_consumeBlockEnd(e){this._beginToken(27,e),this._endToken([])}_consumeBlockParameters(){for(this._attemptCharCodeUntilFn(qs);this._cursor.peek()!==41&&this._cursor.peek()!==0;){this._beginToken(28);let e=this._cursor.clone(),r=null,n=0;for(;this._cursor.peek()!==59&&this._cursor.peek()!==0||r!==null;){let s=this._cursor.peek();if(s===92)this._cursor.advance();else if(s===r)r=null;else if(r===null&&$t(s))r=s;else if(s===40&&r===null)n++;else if(s===41&&r===null){if(n===0)break;n>0&&n--}this._cursor.advance()}this._endToken([this._cursor.getChars(e)]),this._attemptCharCodeUntilFn(qs)}}_consumeLetDeclaration(e){if(this._beginToken(30,e),at(this._cursor.peek()))this._attemptCharCodeUntilFn(b);else{let s=this._endToken([this._cursor.getChars(e)]);s.type=33;return}let r=this._endToken([this._getLetDeclarationName()]);if(this._attemptCharCodeUntilFn(b),!this._attemptCharCode(61)){r.type=33;return}this._attemptCharCodeUntilFn(s=>b(s)&&!Rt(s)),this._consumeLetDeclarationValue(),this._cursor.peek()===59?(this._beginToken(32),this._endToken([]),this._cursor.advance()):(r.type=33,r.sourceSpan=this._cursor.getSpan(e))}_getLetDeclarationName(){let e=this._cursor.clone(),r=!1;return this._attemptCharCodeUntilFn(n=>ot(n)||n==36||n===95||r&&It(n)?(r=!0,!1):!0),this._cursor.getChars(e).trim()}_consumeLetDeclarationValue(){let e=this._cursor.clone();for(this._beginToken(31,e);this._cursor.peek()!==0;){let r=this._cursor.peek();if(r===59)break;$t(r)&&(this._cursor.advance(),this._attemptCharCodeUntilFn(n=>n===92?(this._cursor.advance(),!1):n===r)),this._cursor.advance()}this._endToken([this._cursor.getChars(e)])}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(Ao(this._cursor.peek())&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;if(this._cursor.peek()===125){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}_beginToken(e,r=this._cursor.clone()){this._currentTokenStart=r,this._currentTokenType=e}_endToken(e,r){if(this._currentTokenStart===null)throw new ft("Programming error - attempted to end a token when there was no start to the token",this._currentTokenType,this._cursor.getSpan(r));if(this._currentTokenType===null)throw new ft("Programming error - attempted to end a token which has no token type",null,this._cursor.getSpan(this._currentTokenStart));let n={type:this._currentTokenType,parts:e,sourceSpan:(r
|
||
|
`){let n=this._getClosestParentElement();n!=null&&n.children.length==0&&this.getTagDefinition(n.name).ignoreFirstLf&&(r=r.substring(1))}return r}_consumeText(e){let r=[e],n=e.sourceSpan,s=e.parts[0];if(s.length>0&&s[0]===`
|
||
|
`){let i=this._getContainer();i!=null&&i.children.length===0&&this.getTagDefinition(i.name).ignoreFirstLf&&(s=s.substring(1),r[0]={type:e.type,sourceSpan:e.sourceSpan,parts:[s]})}for(;this._peek.type===8||this._peek.type===5||this._peek.type===9;)e=this._advance(),r.push(e),e.type===8?s+=e.parts.join("").replace(/&([^;]+);/g,Gs):e.type===9?s+=e.parts[0]:s+=e.parts.join("");if(s.length>0){let i=e.sourceSpan;this._addToParent(new Ut(s,new h(n.start,i.end,n.fullStart,n.details),r))}}_closeVoidElement(){let e=this._getContainer();e instanceof G&&this.getTagDefinition(e.name).isVoid&&this._containerStack.pop()}_consumeStartTag(e){let[r,n]=e.parts,s=[];for(;this._peek.type===14;)s.push(this._consumeAttr(this._advance()));let i=this._getElementFullName(r,n,this._getClosestParentElement()),a=!1;if(this._peek.type===2){this._advance(),a=!0;let C=this.getTagDefinition(i);this.canSelfClose||C.canSelfClose||We(i)!==null||C.isVoid||this.errors.push(L.create(i,e.sourceSpan,`Only void, custom and foreign elements can be self closed "${e.parts[1]}"`))}else this._peek.type===1&&(this._advance(),a=!1);let o=this._peek.sourceSpan.fullStart,u=new h(e.sourceSpan.start,o,e.sourceSpan.fullStart),p=new h(e.sourceSpan.start,o,e.sourceSpan.fullStart),l=new h(e.sourceSpan.start.moveBy(1),e.sourceSpan.end),f=new G(i,s,[],u,p,void 0,l),d=this._getContainer();this._pushContainer(f,d instanceof G&&this.getTagDefinition(d.name).isClosedByChild(f.name)),a?this._popContainer(i,G,u):e.type===4&&(this._popContainer(i,G,null),this.errors.push(L.create(i,u,`Opening tag "${i}" not terminated.`)))}_pushContainer(e,r){r&&this._containerStack.pop(),this._addToParent(e),this._containerStack.push(e)}_consumeEndTag(e){let r=this.allowHtmComponentClosingTags&&e.parts.length===0?null:this._getElementFullName(e.parts[0],e.parts[1],this._getClosestParentElement());if(r&&this.getTagDefinition(r).isVoid)this.errors.push(L.create(r,e.sourceSpan,`Void elements do not have end tags "${e.parts[1]}"`));else if(!this._popContainer(r,G,e.sourceSpan)){let n=`Unexpected closing tag "${r}". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`;this.errors.push(L.create(r,e.sourceSpan,n))}}_popContainer(e,r,n){let s=!1;for(let i=this._containerStack.length-1;i>=0;i--){let a=this._containerStack[i];if(We(a.name)?a.name===e:(e==null||a.name.toLowerCase()===e.toLowerCase())&&a instanceof r)return a.endSourceSpan=n,a.sourceSpan.end=n!==null?n.end:a.sourceSpan.end,this._containerStack.splice(i,this._containerStack.length-i),!s;(a instanceof Z||a instanceof G&&!this.getTagDefinition(a.name).closedByParent)&&(s=!0)}return!1}_consumeAttr(e){let r=ze(e.parts[0],e.parts[1]),n=e.sourceSpan.end,s;this._peek.type===15&&(s=this._advance());let i="",a=[],o,u;if(this._peek.type===16)for(o=this._peek.sourceSpan,u=this._peek.sourceSpan.end;this._peek.type===16||this._peek.type===17||this._peek.type===9;){let f=this._advance();a.push(f),f.type===17?i+=f.parts.join("").replace(/&([^;]+);/g,Gs):f.type===9?i+=f.parts[0]:i+=f.parts.join(""),u=n=f.sourceSpan.end}this._peek.type===15&&(u=n=this._advance().sourceSpan.end);let l=o&&u&&new h((s==null?void 0:s.sourceSpan.start)??o.start,u,(s==null?void 0:s.sourceSpan.fullStart)??o.fullStart);return new Yt(r,i,new h(e.sourceSpan.start,n,e.sourceSpan.fullStart),e.sourceSpan,l,a.length>0?a:void 0,void 0)}_consumeBlockOpen(e){let r=[];for(;this._peek.type===28;){let o=this._advance();r.push(new ct(o.parts[0],o.sourceSpan))}this._peek.type===26&&this._advance();let n=this._peek.sourceSpan.fullStart,s=new h(e.sourceSpan.start,n,e.sourceSpan.fullStart),i=new h(e.sourceSpan.start,n,e.sourceSpan.fullStart),a=new Z(e.parts[0],r,[],s,e.sourceSpan,i);this._pushContainer(a,!1)}_consumeBlockClose(e){this._popContainer(null,Z,e.sourceSpan)||this.errors.push(L.create(null,e.sourceSpan,'Unexpected closing block. The block may have been closed earlier. If you meant to write the } character, you should use the "}" HTML entity instead.'))}_consumeIncompleteBlo
|
||
|
`,Ct);if(r===-1)return;let n=t.slice(Ct,r).trim(),s=t.indexOf(`
|
||
|
${e}`,r),i=n;if(i||(i=e==="+++"?"toml":"yaml"),s===-1&&e==="---"&&i==="yaml"&&(s=t.indexOf(`
|
||
|
...`,r)),s===-1)return;let a=s+1+Ct,o=t.charAt(a+1);if(!/\s?/u.test(o))return;let u=t.slice(0,a);return{type:"front-matter",language:i,explicitLanguage:n,value:t.slice(r+1,s),startDelimiter:e,endDelimiter:u.slice(-Ct),raw:u}}function To(t){let e=bo(t);if(!e)return{content:t};let{raw:r}=e;return{frontMatter:e,content:w(!1,r,/[^\n]/gu," ")+t.slice(r.length)}}var js=To;var ir={attrs:!0,children:!0,cases:!0,expression:!0},Ks=new Set(["parent"]),ar=class t{constructor(e={}){for(let r of new Set([...Ks,...Object.keys(e)]))this.setProperty(r,e[r])}setProperty(e,r){if(this[e]!==r){if(e in ir&&(r=r.map(n=>this.createChild(n))),!Ks.has(e)){this[e]=r;return}Object.defineProperty(this,e,{value:r,enumerable:!1,configurable:!0})}}map(e){let r;for(let n in ir){let s=this[n];if(s){let i=xo(s,a=>a.map(e));r!==s&&(r||(r=new t({parent:this.parent})),r.setProperty(n,i))}}if(r)for(let n in this)n in ir||(r[n]=this[n]);return e(r||this)}walk(e){for(let r in ir){let n=this[r];if(n)for(let s=0;s<n.length;s++)n[s].walk(e)}e(this)}createChild(e){let r=e instanceof t?e.clone():new t(e);return r.setProperty("parent",this),r}insertChildBefore(e,r){this.children.splice(this.children.indexOf(e),0,this.createChild(r))}removeChild(e){this.children.splice(this.children.indexOf(e),1)}replaceChild(e,r){this.children[this.children.indexOf(e)]=this.createChild(r)}clone(){return new t(this)}get firstChild(){var e;return(e=this.children)==null?void 0:e[0]}get lastChild(){var e;return(e=this.children)==null?void 0:e[this.children.length-1]}get prev(){var e,r;return(r=(e=this.parent)==null?void 0:e.children)==null?void 0:r[this.parent.children.indexOf(this)-1]}get next(){var e,r;return(r=(e=this.parent)==null?void 0:e.children)==null?void 0:r[this.parent.children.indexOf(this)+1]}get rawName(){return this.hasExplicitNamespace?this.fullName:this.name}get fullName(){return this.namespace?this.namespace+":"+this.name:this.name}get attrMap(){return Object.fromEntries(this.attrs.map(e=>[e.fullName,e.value]))}};function xo(t,e){let r=t.map(e);return r.some((n,s)=>n!==t[s])?r:t}var ko=[{regex:/^(\[if([^\]]*)\]>)(.*?)<!\s*\[endif\]$/su,parse:Bo},{regex:/^\[if([^\]]*)\]><!$/u,parse:Lo},{regex:/^<!\s*\[endif\]$/u,parse:Fo}];function Qs(t,e){if(t.value)for(let{regex:r,parse:n}of ko){let s=t.value.match(r);if(s)return n(t,e,s)}return null}function Bo(t,e,r){let[,n,s,i]=r,a=4+n.length,o=t.sourceSpan.start.moveBy(a),u=o.moveBy(i.length),[p,l]=(()=>{try{return[!0,e(i,o).children]}catch{return[!1,[{type:"text",value:i,sourceSpan:new h(o,u)}]]}})();return{type:"ieConditionalComment",complete:p,children:l,condition:w(!1,s.trim(),/\s+/gu," "),sourceSpan:t.sourceSpan,startSourceSpan:new h(t.sourceSpan.start,o),endSourceSpan:new h(u,t.sourceSpan.end)}}function Lo(t,e,r){let[,n]=r;return{type:"ieConditionalStartComment",condition:w(!1,n.trim(),/\s+/gu," "),sourceSpan:t.sourceSpan}}function Fo(t){return{type:"ieConditionalEndComment",sourceSpan:t.sourceSpan}}var or=new Map([["*",new Set(["accesskey","autocapitalize","autofocus","class","contenteditable","dir","draggable","enterkeyhint","hidden","id","inert","inputmode","is","itemid","itemprop","itemref","itemscope","itemtype","lang","nonce","popover","slot","spellcheck","style","tabindex","title","translate","writingsuggestions"])],["a",new Set(["charset","coords","download","href","hreflang","name","ping","referrerpolicy","rel","rev","shape","target","type"])],["applet",new Set(["align","alt","archive","code","codebase","height","hspace","name","object","vspace","width"])],["area",new Set(["alt","coords","download","href","hreflang","nohref","ping","referrerpolicy","rel","shape","target","type"])],["audio",new Set(["autoplay","controls","crossorigin","loop","muted","preload","src"])],["base",new Set(["href","target"])],["basefont",new Set(["color","face","size"])],["blockquote",new Set(["cite"])],["body",new Set(["alink","background","bgcolor","link","text","vlink"])],["br",new Set(["clear"])],["button",new Set(["disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","popovertarget","popovertar
|