UNPKG

prettier

Version:

Prettier is an opinionated code formatter

14 lines (13 loc) 153 kB
var on=Object.defineProperty;var un=t=>{throw TypeError(t)};var Ai=(t,e,r)=>e in t?on(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var ln=(t,e)=>{for(var r in e)on(t,r,{get:e[r],enumerable:!0})};var lr=(t,e,r)=>Ai(t,typeof e!="symbol"?e+"":e,r),cn=(t,e,r)=>e.has(t)||un("Cannot "+r);var R=(t,e,r)=>(cn(t,e,"read from private field"),r?r.call(t):e.get(t)),At=(t,e,r)=>e.has(t)?un("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),pn=(t,e,r,n)=>(cn(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);var rn={};ln(rn,{languages:()=>Hs,options:()=>Us,parsers:()=>tn,printers:()=>uu});var Di=(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=Di;var we="string",ze="array",Ye="cursor",be="indent",Te="align",je="trim",xe="group",ke="fill",ce="if-break",Be="indent-if-break",Ke="line-suffix",Xe="line-suffix-boundary",j="line",Qe="label",Le="break-parent",Dt=new Set([Ye,be,Te,je,xe,ke,ce,Be,Ke,Xe,j,Qe,Le]);var vi=(t,e,r)=>{if(!(t&&e==null))return Array.isArray(e)||typeof e=="string"?e[r<0?e.length+r:r]:e.at(r)},K=vi;function yi(t){if(typeof t=="string")return we;if(Array.isArray(t))return ze;if(!t)return;let{type:e}=t;if(Dt.has(e))return e}var Fe=yi;var wi=t=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(t);function bi(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(Fe(t))throw new Error("doc is valid.");let r=Object.prototype.toString.call(t);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=wi([...Dt].map(s=>`'${s}'`));return`Unexpected doc.type '${t.type}'. Expected it to be ${n}.`}var cr=class extends Error{name="InvalidDocError";constructor(e){super(bi(e)),this.doc=e}},pr=cr;function hr(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(Fe(i)){case ze:return e(i.map(n));case ke:return e({...i,parts:i.parts.map(n)});case ce:return e({...i,breakContents:n(i.breakContents),flatContents:n(i.flatContents)});case xe:{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 Te:case be:case Be:case Qe:case Ke:return e({...i,contents:n(i.contents)});case we:case Ye:case je:case Xe:case j:case Le:return e(i);default:throw new pr(i)}}}function B(t,e=hn){return hr(t,r=>typeof r=="string"?H(e,r.split(` `)):r)}var mr=()=>{},re=mr,fr=mr,mn=mr;function k(t){return re(t),{type:be,contents:t}}function fn(t,e){return re(e),{type:Te,contents:e,n:t}}function E(t,e={}){return re(t),fr(e.expandedStates,!0),{type:xe,id:e.id,contents:t,break:!!e.shouldBreak,expandedStates:e.expandedStates}}function dn(t){return fn(Number.NEGATIVE_INFINITY,t)}function gn(t){return fn({type:"root"},t)}function vt(t){return mn(t),{type:ke,parts:t}}function pe(t,e="",r={}){return re(t),e!==""&&re(e),{type:ce,breakContents:t,flatContents:e,groupId:r.groupId}}function Cn(t,e){return re(t),{type:Be,contents:t,groupId:e.groupId,negate:e.negate}}var ne={type:Le};var xi={type:j,hard:!0},ki={type:j,hard:!0,literal:!0},_={type:j},v={type:j,soft:!0},S=[xi,ne],hn=[ki,ne];function H(t,e){re(t),fr(e);let r=[];for(let n=0;n<e.length;n++)n!==0&&r.push(t),r.push(e[n]);return r}var yt="'",Sn='"';function Bi(t,e){let r=e===!0||e===yt?yt:Sn,n=r===yt?Sn:yt,s=0,i=0;for(let a of t)a===r?s++:a===n&&i++;return s>i?n:r}var _n=Bi;function dr(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}var V,gr=class{constructor(e){At(this,V);pn(this,V,new Set(e))}getLeadingWhitespaceCount(e){let r=R(this,V),n=0;for(let s=0;s<e.length&&r.has(e.charAt(s));s++)n++;return n}getTrailingWhitespaceCount(e){let r=R(this,V),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 R(this,V).has(e.charAt(0))}hasTrailingWhitespace(e){return R(this,V).has(K(!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=`[${dr([...R(this,V)].join(""))}]+`,s=new RegExp(r?`(${n})`:n,"u");return e.split(s)}hasWhitespaceCharacter(e){let r=R(this,V);return Array.prototype.some.call(e,n=>r.has(n))}hasNonWhitespaceCharacter(e){let r=R(this,V);return Array.prototype.some.call(e,n=>!r.has(n))}isWhitespaceOnly(e){let r=R(this,V);return Array.prototype.every.call(e,n=>r.has(n))}};V=new WeakMap;var En=gr;var Li=[" ",` `,"\f","\r"," "],Fi=new En(Li),O=Fi;var Cr=class extends Error{name="UnexpectedNodeError";constructor(e,r,n="type"){super(`Unexpected ${r} node ${n}: ${JSON.stringify(e[n])}.`),this.node=e}},An=Cr;function Pi(t){return(t==null?void 0:t.type)==="front-matter"}var Pe=Pi;var Ni=new Set(["sourceSpan","startSourceSpan","endSourceSpan","nameSpan","valueSpan","keySpan","tagDefinition","tokens","valueTokens","switchValueSourceSpan","expSourceSpan","valueSourceSpan"]),Ii=new Set(["if","else if","for","switch","case"]);function Dn(t,e){var r;if(t.type==="text"||t.type==="comment"||Pe(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)Ii.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}Dn.ignoredProperties=Ni;var vn=Dn;async function Ri(t,e){if(t.language==="yaml"){let r=t.value.trim(),n=r?await e(r,{parser:"yaml"}):"";return gn([t.startDelimiter,t.explicitLanguage,S,n,n?S:"",t.endDelimiter])}}var yn=Ri;function he(t,e=!0){return[k([v,t]),e?v:""]}function X(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?E(i):he(i)}function $i(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},X)}var wn=$i;var Oi=(t,e)=>{if(!(t&&e==null))return e.toReversed||!Array.isArray(e)?e.toReversed():[...e].reverse()},bn=Oi;function Mi(t){return Array.isArray(t)&&t.length>0}var me=Mi;var Tn,xn,kn,Bn,Ln,qi=((Tn=globalThis.Deno)==null?void 0:Tn.build.os)==="windows"||((kn=(xn=globalThis.navigator)==null?void 0:xn.platform)==null?void 0:kn.startsWith("Win"))||((Ln=(Bn=globalThis.process)==null?void 0:Bn.platform)==null?void 0:Ln.startsWith("win"))||!1;function Fn(t){if(t=t instanceof URL?t:new URL(t),t.protocol!=="file:")throw new TypeError(`URL must be a file URL: received "${t.protocol}"`);return t}function Hi(t){return t=Fn(t),decodeURIComponent(t.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}function Vi(t){t=Fn(t);let e=decodeURIComponent(t.pathname.replace(/\//g,"\\").replace(/%(?![0-9A-Fa-f]{2})/g,"%25")).replace(/^\\*([A-Za-z]:)(\\|$)/,"$1\\");return t.hostname!==""&&(e=`\\\\${t.hostname}${e}`),e}function Pn(t){return qi?Vi(t):Hi(t)}var Nn=Pn;var Ui=t=>String(t).split(/[/\\]/u).pop();function In(t,e){if(!e)return;let r=Ui(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 Rn(t,e){if(e){if(String(e).startsWith("file:"))try{e=Nn(e)}catch{return}if(typeof e=="string")return t.find(({isSupported:r})=>r==null?void 0:r({filepath:e}))}}function Gi(t,e){let r=bn(!1,t.plugins).flatMap(s=>s.languages??[]),n=Wi(r,e.language)??In(r,e.physicalFile)??In(r,e.file)??Rn(r,e.physicalFile)??Rn(r,e.file)??(e.physicalFile,void 0);return n==null?void 0:n.parsers[0]}var Ne=Gi;var $n="inline",Sr={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",details:"block",summary:"block",marquee:"inline-block",source:"block",track:"block",meter:"inline-block",progress:"inline-block",object:"inline-block",video:"inline-block",audio:"inline-block",select:"inline-block",option:"block",optgroup:"block"},On="normal",_r={listing:"pre",plaintext:"pre",pre:"pre",xmp:"pre",nobr:"nowrap",table:"initial",textarea:"pre-wrap"};function zi(t){return t.type==="element"&&!t.hasExplicitNamespace&&!["html","svg"].includes(t.namespace)}var fe=zi;var Yi=t=>w(!1,t,/^[\t\f\r ]*\n/gu,""),Er=t=>Yi(O.trimEnd(t)),Mn=t=>{let e=t,r=O.getLeadingWhitespace(e);r&&(e=e.slice(r.length));let n=O.getTrailingWhitespace(e);return n&&(e=e.slice(0,-n.length)),{leadingWhitespace:r,trailingWhitespace:n,text:e}};function wt(t,e){return!!(t.type==="ieConditionalComment"&&t.lastChild&&!t.lastChild.isSelfClosing&&!t.lastChild.endSourceSpan||t.type==="ieConditionalComment"&&!t.complete||de(t)&&t.children.some(r=>r.type!=="text"&&r.type!=="interpolation")||xt(t,e)&&!W(t,e)&&t.type!=="interpolation")}function ge(t){return t.type==="attribute"||!t.parent||!t.prev?!1:ji(t.prev)}function ji(t){return t.type==="comment"&&t.value.trim()==="prettier-ignore"}function $(t){return t.type==="text"||t.type==="comment"}function W(t,e){return t.type==="element"&&(t.fullName==="script"||t.fullName==="style"||t.fullName==="svg:style"||t.fullName==="svg:script"||t.fullName==="mj-style"&&e.parser==="mjml"||fe(t)&&(t.name==="script"||t.name==="style"))}function qn(t,e){return t.children&&!W(t,e)}function Hn(t,e){return W(t,e)||t.type==="interpolation"||Ar(t)}function Ar(t){return Jn(t).startsWith("pre")}function Vn(t,e){var s,i;let r=n();if(r&&!t.prev&&((i=(s=t.parent)==null?void 0:s.tagDefinition)!=null&&i.ignoreFirstLf))return t.type==="interpolation";return r;function n(){return Pe(t)||t.type==="angularControlFlowBlock"?!1:(t.type==="text"||t.type==="interpolation")&&t.prev&&(t.prev.type==="text"||t.prev.type==="interpolation")?!0:!t.parent||t.parent.cssDisplay==="none"?!1:de(t.parent)?!0:!(!t.prev&&(t.parent.type==="root"||de(t)&&t.parent||W(t.parent,e)||et(t.parent,e)||!ea(t.parent.cssDisplay))||t.prev&&!na(t.prev.cssDisplay))}}function Un(t,e){return Pe(t)||t.type==="angularControlFlowBlock"?!1:(t.type==="text"||t.type==="interpolation")&&t.next&&(t.next.type==="text"||t.next.type==="interpolation")?!0:!t.parent||t.parent.cssDisplay==="none"?!1:de(t.parent)?!0:!(!t.next&&(t.parent.type==="root"||de(t)&&t.parent||W(t.parent,e)||et(t.parent,e)||!ta(t.parent.cssDisplay))||t.next&&!ra(t.next.cssDisplay))}function Wn(t,e){return sa(t.cssDisplay)&&!W(t,e)}function Je(t){return Pe(t)||t.next&&t.sourceSpan.end&&t.sourceSpan.end.line+1<t.next.sourceSpan.start.line}function Gn(t){return Dr(t)||t.type==="element"&&t.children.length>0&&(["body","script","style"].includes(t.name)||t.children.some(e=>Xi(e)))||t.firstChild&&t.firstChild===t.lastChild&&t.firstChild.type!=="text"&&Yn(t.firstChild)&&(!t.lastChild.isTrailingSpaceSensitive||jn(t.lastChild))}function Dr(t){return t.type==="element"&&t.children.length>0&&(["html","head","ul","ol","select"].includes(t.name)||t.cssDisplay.startsWith("table")&&t.cssDisplay!=="table-cell")}function bt(t){return Kn(t)||t.prev&&Ki(t.prev)||zn(t)}function Ki(t){return Kn(t)||t.type==="element"&&t.fullName==="br"||zn(t)}function zn(t){return Yn(t)&&jn(t)}function Yn(t){return t.hasLeadingSpaces&&(t.prev?t.prev.sourceSpan.end.line<t.sourceSpan.start.line:t.parent.type==="root"||t.parent.startSourceSpan.end.line<t.sourceSpan.start.line)}function jn(t){return t.hasTrailingSpaces&&(t.next?t.next.sourceSpan.start.line>t.sourceSpan.end.line:t.parent.type==="root"||t.parent.endSourceSpan&&t.parent.endSourceSpan.start.line>t.sourceSpan.end.line)}function Kn(t){switch(t.type){case"ieConditionalComment":case"comment":case"directive":return!0;case"element":return["script","select"].includes(t.name)}return!1}function Tt(t){return t.lastChild?Tt(t.lastChild):t}function Xi(t){var e;return(e=t.children)==null?void 0:e.some(r=>r.type!=="text")}function Xn(t){if(t)switch(t){case"module":case"text/javascript":case"text/babel":case"text/jsx":case"application/javascript":return"babel";case"application/x-typescript":return"typescript";case"text/markdown":return"markdown";case"text/html":return"html";case"text/x-handlebars-template":return"glimmer";default:if(t.endsWith("json")||t.endsWith("importmap")||t==="speculationrules")return"json"}}function Qi(t,e){let{name:r,attrMap:n}=t;if(r!=="script"||Object.prototype.hasOwnProperty.call(n,"src"))return;let{type:s,lang:i}=t.attrMap;return!i&&!s?"babel":Ne(e,{language:i})??Xn(s)}function Ji(t,e){if(!xt(t,e))return;let{attrMap:r}=t;if(Object.prototype.hasOwnProperty.call(r,"src"))return;let{type:n,lang:s}=r;return Ne(e,{language:s})??Xn(n)}function Zi(t,e){if(t.name==="style"){let{lang:r}=t.attrMap;return r?Ne(e,{language:r}):"css"}if(t.name==="mj-style"&&e.parser==="mjml")return"css"}function vr(t,e){return Qi(t,e)??Zi(t,e)??Ji(t,e)}function Ze(t){return t==="block"||t==="list-item"||t.startsWith("table")}function ea(t){return!Ze(t)&&t!=="inline-block"}function ta(t){return!Ze(t)&&t!=="inline-block"}function ra(t){return!Ze(t)}function na(t){return!Ze(t)}function sa(t){return!Ze(t)&&t!=="inline-block"}function de(t){return Jn(t).startsWith("pre")}function ia(t,e){let r=t;for(;r;){if(e(r))return!0;r=r.parent}return!1}function Qn(t,e){var n;if(Ce(t,e))return"block";if(((n=t.prev)==null?void 0:n.type)==="comment"){let s=t.prev.value.match(/^\s*display:\s*([a-z]+)\s*$/u);if(s)return s[1]}let r=!1;if(t.type==="element"&&t.namespace==="svg")if(ia(t,s=>s.fullName==="svg:foreignObject"))r=!0;else return t.name==="svg"?"inline-block":"block";switch(e.htmlWhitespaceSensitivity){case"strict":return"inline";case"ignore":return"block";default:if(t.type==="element"&&(!t.namespace||r||fe(t))&&Object.prototype.hasOwnProperty.call(Sr,t.name))return Sr[t.name]}return $n}function Jn(t){return t.type==="element"&&(!t.namespace||fe(t))&&Object.prototype.hasOwnProperty.call(_r,t.name)?_r[t.name]:On}function aa(t){let e=Number.POSITIVE_INFINITY;for(let r of t.split(` `)){if(r.length===0)continue;let n=O.getLeadingWhitespaceCount(r);if(n===0)return 0;r.length!==n&&n<e&&(e=n)}return e===Number.POSITIVE_INFINITY?0:e}function yr(t,e=aa(t)){return e===0?t:t.split(` `).map(r=>r.slice(e)).join(` `)}function wr(t){return w(!1,w(!1,t,"&apos;","'"),"&quot;",'"')}function P(t){return wr(t.value)}var oa=new Set(["template","style","script"]);function et(t,e){return Ce(t,e)&&!oa.has(t.fullName)}function Ce(t,e){return e.parser==="vue"&&t.type==="element"&&t.parent.type==="root"&&t.fullName.toLowerCase()!=="html"}function xt(t,e){return Ce(t,e)&&(et(t,e)||t.attrMap.lang&&t.attrMap.lang!=="html")}function Zn(t){let e=t.fullName;return e.charAt(0)==="#"||e==="slot-scope"||e==="v-slot"||e.startsWith("v-slot:")}function es(t,e){let r=t.parent;if(!Ce(r,e))return!1;let n=r.fullName,s=t.fullName;return n==="script"&&s==="setup"||n==="style"&&s==="vars"}function kt(t,e=t.value){return t.parent.isWhitespaceSensitive?t.parent.isIndentationSensitive?B(e):B(yr(Er(e)),S):H(_,O.split(e))}function Bt(t,e){return Ce(t,e)&&t.name==="script"}var br=/\{\{(.+?)\}\}/su;async function ts(t,e){let r=[];for(let[n,s]of t.split(br).entries())if(n%2===0)r.push(B(s));else try{r.push(E(["{{",k([_,await T(s,e,{parser:"__ng_interpolation",__isInHtmlInterpolation:!0})]),_,"}}"]))}catch{r.push("{{",B(s),"}}")}return r}function Tr({parser:t}){return(e,r,n)=>T(P(n.node),e,{parser:t},X)}var ua=Tr({parser:"__ng_action"}),la=Tr({parser:"__ng_binding"}),ca=Tr({parser:"__ng_directive"});function pa(t,e){if(e.parser!=="angular")return;let{node:r}=t,n=r.fullName;if(n.startsWith("(")&&n.endsWith(")")||n.startsWith("on-"))return ua;if(n.startsWith("[")&&n.endsWith("]")||/^bind(?:on)?-/u.test(n)||/^ng-(?:if|show|hide|class|style)$/u.test(n))return la;if(n.startsWith("*"))return ca;let s=P(r);if(/^i18n(?:-.+)?$/u.test(n))return()=>he(vt(kt(r,s.trim())),!s.includes("@@"));if(br.test(s))return i=>ts(s,i)}var rs=pa;function ha(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 ns=ha;function ss(t){return t===" "||t===` `||t==="\f"||t==="\r"||t===" "}var ma=/^[ \t\n\r\u000c]+/,fa=/^[, \t\n\r\u000c]+/,da=/^[^ \t\n\r\u000c]+/,ga=/[,]+$/,is=/^\d+$/,Ca=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/;function Sa(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(fa),o>=e){if(l.length===0)throw new Error("Must contain one or more image candidate strings.");return l}u=o,r=p(da),n=[],r.slice(-1)===","?(r=r.replace(ga,""),f()):m()}function m(){for(p(ma),s="",i="in descriptor";;){if(a=t.charAt(o),i==="in descriptor")if(ss(a))s&&(n.push(s),s="",i="after descriptor");else if(a===","){o+=1,s&&n.push(s),f();return}else if(a==="(")s+=a,i="in parens";else if(a===""){s&&n.push(s),f();return}else s+=a;else if(i==="in parens")if(a===")")s+=a,i="in descriptor";else if(a===""){n.push(s),f();return}else s+=a;else if(i==="after descriptor"&&!ss(a))if(a===""){f();return}else i="in descriptor",o-=1;o+=1}}function f(){let C=!1,A,D,I,F,c={},g,y,q,x,U;for(F=0;F<n.length;F++)g=n[F],y=g[g.length-1],q=g.substring(0,g.length-1),x=parseInt(q,10),U=parseFloat(q),is.test(q)&&y==="w"?((A||D)&&(C=!0),x===0?C=!0:A=x):Ca.test(q)&&y==="x"?((A||D||I)&&(C=!0),U<0?C=!0:D=U):is.test(q)&&y==="h"?((I||D)&&(C=!0),x===0?C=!0:I=x):C=!0;if(!C)c.source={value:r,startOffset:u},A&&(c.width={value:A}),D&&(c.density={value:D}),I&&(c.height={value:I}),l.push(c);else throw new Error(`Invalid srcset descriptor found in "${t}" at "${g}".`)}}var as=Sa;function _a(t){if(t.node.fullName==="srcset"&&(t.parent.fullName==="img"||t.parent.fullName==="source"))return()=>Aa(P(t.node))}var os={width:"w",height:"h",density:"x"},Ea=Object.keys(os);function Aa(t){let e=as(t),r=Ea.filter(l=>e.some(m=>Object.prototype.hasOwnProperty.call(m,l)));if(r.length>1)throw new Error("Mixed descriptor in srcset is not supported");let[n]=r,s=os[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 m=l.indexOf(".");return m===-1?l.length:m}),p=Math.max(...u);return he(H([",",_],i.map((l,m)=>{let f=[l],C=o[m];if(C){let A=a-l.length+1,D=p-u[m],I=" ".repeat(A+D);f.push(pe(I," "),C+s)}return f})))}var us=_a;function ls(t,e){let{node:r}=t,n=P(t.node).trim();if(r.fullName==="style"&&!e.parentParser&&!n.includes("{{"))return async s=>he(await s(n,{parser:"css",__isHTMLStyleAttribute:!0}))}var xr=new WeakMap;function Da(t,e){let{root:r}=t;return xr.has(r)||xr.set(r,r.children.some(n=>Bt(n,e)&&["ts","typescript"].includes(n.attrMap.lang))),xr.get(r)}var Ie=Da;function cs(t,e,r){let{node:n}=r,s=P(n);return T(`type T<${s}> = any`,t,{parser:"babel-ts",__isEmbeddedTypescriptGenericParameters:!0},X)}function ps(t,e,{parseWithTs:r}){return T(`function _(${t}) {}`,e,{parser:r?"babel-ts":"babel",__isVueBindings:!0})}async function hs(t,e,r,n){let s=P(r.node),{left:i,operator:a,right:o}=va(s),u=Ie(r,n);return[E(await T(`function _(${i}) {}`,t,{parser:u?"babel-ts":"babel",__isVueForBindingLeft:!0}))," ",a," ",await T(o,t,{parser:u?"__ts_expression":"__js_expression"})]}function va(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 ya(t,e){if(e.parser!=="vue")return;let{node:r}=t,n=r.fullName;if(n==="v-for")return hs;if(n==="generic"&&Bt(r.parent,e))return cs;let s=P(r),i=Ie(t,e);if(Zn(r)||es(r,e))return a=>ps(s,a,{parseWithTs:i});if(n.startsWith("@")||n.startsWith("v-on:"))return a=>wa(s,a,{parseWithTs:i});if(n.startsWith(":")||n.startsWith(".")||n.startsWith("v-bind:"))return a=>ba(s,a,{parseWithTs:i});if(n.startsWith("v-"))return a=>ms(s,a,{parseWithTs:i})}async function wa(t,e,{parseWithTs:r}){var n;try{return await ms(t,e,{parseWithTs:r})}catch(s){if(((n=s.cause)==null?void 0:n.code)!=="BABEL_PARSER_SYNTAX_ERROR")throw s}return T(t,e,{parser:r?"__vue_ts_event_binding":"__vue_event_binding"},X)}function ba(t,e,{parseWithTs:r}){return T(t,e,{parser:r?"__vue_ts_expression":"__vue_expression"},X)}function ms(t,e,{parseWithTs:r}){return T(t,e,{parser:r?"__ts_expression":"__js_expression"},X)}var fs=ya;function Ta(t,e){let{node:r}=t;if(r.value){if(/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/u.test(e.originalText.slice(r.valueSpan.start.offset,r.valueSpan.end.offset))||e.parser==="lwc"&&r.value.startsWith("{")&&r.value.endsWith("}"))return[r.rawName,"=",r.value];for(let n of[us,ls,ns,fs,rs]){let s=n(t,e);if(s)return xa(s)}}}function xa(t){return async(e,r,n,s)=>{let i=await t(e,r,n,s);if(i)return i=hr(i,a=>typeof a=="string"?w(!1,a,'"',"&quot;"):a),[n.node.rawName,'="',E(i),'"']}}var ds=Ta;var ka=new Proxy(()=>{},{get:()=>ka});function J(t){return t.sourceSpan.start.offset}function se(t){return t.sourceSpan.end.offset}function tt(t,e){return[t.isSelfClosing?"":Ba(t,e),Se(t,e)]}function Ba(t,e){return t.lastChild&&Ae(t.lastChild)?"":[La(t,e),Lt(t,e)]}function Se(t,e){return(t.next?Q(t.next):Ee(t.parent))?"":[_e(t,e),G(t,e)]}function La(t,e){return Ee(t)?_e(t.lastChild,e):""}function G(t,e){return Ae(t)?Lt(t.parent,e):rt(t)?Ft(t.next,e):""}function Lt(t,e){if(Cs(t,e))return"";switch(t.type){case"ieConditionalComment":return"<!";case"element":if(t.hasHtmComponentClosingTag)return"<//";default:return`</${t.rawName}`}}function _e(t,e){if(Cs(t,e))return"";switch(t.type){case"ieConditionalComment":case"ieConditionalEndComment":return"[endif]-->";case"ieConditionalStartComment":return"]><!-->";case"interpolation":return"}}";case"angularIcuExpression":return"}";case"element":if(t.isSelfClosing)return"/>";default:return">"}}function Cs(t,e){return!t.isSelfClosing&&!t.endSourceSpan&&(ge(t)||wt(t.parent,e))}function Q(t){return t.prev&&t.prev.type!=="docType"&&t.type!=="angularControlFlowBlock"&&!$(t.prev)&&t.isLeadingSpaceSensitive&&!t.hasLeadingSpaces}function Ee(t){var e;return((e=t.lastChild)==null?void 0:e.isTrailingSpaceSensitive)&&!t.lastChild.hasTrailingSpaces&&!$(Tt(t.lastChild))&&!de(t)}function Ae(t){return!t.next&&!t.hasTrailingSpaces&&t.isTrailingSpaceSensitive&&$(Tt(t))}function rt(t){return t.next&&!$(t.next)&&$(t)&&t.isTrailingSpaceSensitive&&!t.hasTrailingSpaces}function Fa(t){let e=t.trim().match(/^prettier-ignore-attribute(?:\s+(.+))?$/su);return e?e[1]?e[1].split(/\s+/u):!0:!1}function nt(t){return!t.prev&&t.isLeadingSpaceSensitive&&!t.hasLeadingSpaces}function Pa(t,e,r){var m;let{node:n}=t;if(!me(n.attrs))return n.isSelfClosing?" ":"";let s=((m=n.prev)==null?void 0:m.type)==="comment"&&Fa(n.prev.value),i=typeof s=="boolean"?()=>s:Array.isArray(s)?f=>s.includes(f.rawName):()=>!1,a=t.map(({node:f})=>i(f)?B(e.originalText.slice(J(f),se(f))):r(),"attrs"),o=n.type==="element"&&n.fullName==="script"&&n.attrs.length===1&&n.attrs[0].fullName==="src"&&n.children.length===0,p=e.singleAttributePerLine&&n.attrs.length>1&&!Ce(n,e)?S:_,l=[k([o?" ":_,H(p,a)])];return n.firstChild&&nt(n.firstChild)||n.isSelfClosing&&Ee(n.parent)||o?l.push(n.isSelfClosing?" ":""):l.push(e.bracketSameLine?n.isSelfClosing?" ":"":n.isSelfClosing?_:v),l}function Na(t){return t.firstChild&&nt(t.firstChild)?"":Pt(t)}function st(t,e,r){let{node:n}=t;return[De(n,e),Pa(t,e,r),n.isSelfClosing?"":Na(n)]}function De(t,e){return t.prev&&rt(t.prev)?"":[z(t,e),Ft(t,e)]}function z(t,e){return nt(t)?Pt(t.parent):Q(t)?_e(t.prev,e):""}var gs="<!doctype";function Ft(t,e){switch(t.type){case"ieConditionalComment":case"ieConditionalStartComment":return`<!--[if ${t.condition}`;case"ieConditionalEndComment":return"<!--<!";case"interpolation":return"{{";case"docType":{if(t.value==="html"){let{filepath:n}=e;if(n&&/\.html?$/u.test(n))return gs}let r=J(t);return e.originalText.slice(r,r+gs.length)}case"angularIcuExpression":return"{";case"element":if(t.condition)return`<!--[if ${t.condition}]><!--><${t.rawName}`;default:return`<${t.rawName}`}}function Pt(t){switch(t.type){case"ieConditionalComment":return"]>";case"element":if(t.condition)return"><!--<![endif]-->";default:return">"}}function Ia(t,e){if(!t.endSourceSpan)return"";let r=t.startSourceSpan.end.offset;t.firstChild&&nt(t.firstChild)&&(r-=Pt(t).length);let n=t.endSourceSpan.start.offset;return t.lastChild&&Ae(t.lastChild)?n+=Lt(t,e).length:Ee(t)&&(n-=_e(t.lastChild,e).length),e.originalText.slice(r,n)}var Nt=Ia;var Ra=new Set(["if","else if","for","switch","case"]);function $a(t,e){let{node:r}=t;switch(r.type){case"element":if(W(r,e)||r.type==="interpolation")return;if(!r.isSelfClosing&&xt(r,e)){let n=vr(r,e);return n?async(s,i)=>{let a=Nt(r,e),o=/^\s*$/u.test(a),u="";return o||(u=await s(Er(a),{parser:n,__embeddedInHtml:!0}),o=u===""),[z(r,e),E(st(t,e,i)),o?"":S,u,o?"":S,tt(r,e),G(r,e)]}:void 0}break;case"text":if(W(r.parent,e)){let n=vr(r.parent,e);if(n)return async s=>{let i=n==="markdown"?yr(r.value.replace(/^[^\S\n]*\n/u,"")):r.value,a={parser:n,__embeddedInHtml:!0};if(e.parser==="html"&&n==="babel"){let o="script",{attrMap:u}=r.parent;u&&(u.type==="module"||(u.type==="text/babel"||u.type==="text/jsx")&&u["data-type"]==="module")&&(o="module"),a.__babelSourceType=o}return[ne,z(r,e),await s(i,a),G(r,e)]}}else if(r.parent.type==="interpolation")return async n=>{let s={__isInHtmlInterpolation:!0,__embeddedInHtml:!0};return e.parser==="angular"?s.parser="__ng_interpolation":e.parser==="vue"?s.parser=Ie(t,e)?"__vue_ts_expression":"__vue_expression":s.parser="__js_expression",[k([_,await n(r.value,s)]),r.parent.next&&Q(r.parent.next)?" ":_]};break;case"attribute":return ds(t,e);case"front-matter":return n=>yn(r,n);case"angularControlFlowBlockParameters":return Ra.has(t.parent.name)?wn:void 0;case"angularLetDeclarationInitializer":return n=>T(r.value,n,{parser:"__ng_binding",__isInHtmlAttribute:!1})}}var Ss=$a;var it=null;function at(t){if(it!==null&&typeof it.property){let e=it;return it=at.prototype=null,e}return it=at.prototype=t??Object.create(null),new at}var Oa=10;for(let t=0;t<=Oa;t++)at();function kr(t){return at(t)}function Ma(t,e="type"){kr(t);function r(n){let s=n[e],i=t[s];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${s}'.`),{node:n});return i}return r}var _s=Ma;var qa={"front-matter":[],root:["children"],element:["attrs","children"],ieConditionalComment:["children"],ieConditionalStartComment:[],ieConditionalEndComment:[],interpolation:["children"],text:["children"],docType:[],comment:[],attribute:[],cdata:[],angularControlFlowBlock:["children","parameters"],angularControlFlowBlockParameters:["children"],angularControlFlowBlockParameter:[],angularLetDeclaration:["init"],angularLetDeclarationInitializer:[],angularIcuExpression:["cases"],angularIcuCase:["expression"]},Es=qa;var Ha=_s(Es),As=Ha;var Ds="format";var vs=/^\s*<!--\s*@(?:noformat|noprettier)\s*-->/u,ys=/^\s*<!--\s*@(?:format|prettier)\s*-->/u;function ws(t){return ys.test(t)}function bs(t){return vs.test(t)}function Ts(t){return`<!-- @${Ds} --> ${t}`}var xs=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 ks(t){let e=se(t);return t.type==="element"&&!t.endSourceSpan&&me(t.children)?Math.max(e,ks(K(!1,t.children,-1))):e}function ot(t,e,r){let n=t.node;if(ge(n)){let s=ks(n);return[z(n,e),B(O.trimEnd(e.originalText.slice(J(n)+(n.prev&&rt(n.prev)?Ft(n).length:0),s-(n.next&&Q(n.next)?_e(n,e).length:0)))),G(n,e)]}return r()}function It(t,e){return $(t)&&$(e)?t.isTrailingSpaceSensitive?t.hasTrailingSpaces?bt(e)?S:_:"":bt(e)?S:v:rt(t)&&(ge(e)||e.firstChild||e.isSelfClosing||e.type==="element"&&e.attrs.length>0)||t.type==="element"&&t.isSelfClosing&&Q(e)?"":!e.isLeadingSpaceSensitive||bt(e)||Q(e)&&t.lastChild&&Ae(t.lastChild)&&t.lastChild.lastChild&&Ae(t.lastChild.lastChild)?S:e.hasLeadingSpaces?_:v}function Re(t,e,r){let{node:n}=t;if(Dr(n))return[ne,...t.map(i=>{let a=i.node,o=a.prev?It(a.prev,a):"";return[o?[o,Je(a.prev)?S:""]:"",ot(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=It(o.prev,o);if(A)return Je(o.prev)?[S,S,ot(i,e,r)]:[A,ot(i,e,r)]}return ot(i,e,r)}let u=[],p=[],l=[],m=[],f=o.prev?It(o.prev,o):"",C=o.next?It(o,o.next):"";return f&&(Je(o.prev)?u.push(S,S):f===S?u.push(S):$(o.prev)?p.push(f):p.push(pe("",v,{groupId:s[a-1]}))),C&&(Je(o)?$(o.next)&&m.push(S,S):C===S?$(o.next)&&m.push(S):l.push(C)),[...u,E([...p,E([ot(i,e,r),...l],{id:s[a]})]),...m]},"children")}function Bs(t,e,r){let{node:n}=t,s=[];Va(t)&&s.push("} "),s.push("@",n.name),n.parameters&&s.push(" (",E(r("parameters")),")"),s.push(" {");let i=Ls(n);return n.children.length>0?(n.firstChild.hasLeadingSpaces=!0,n.lastChild.hasTrailingSpaces=!0,s.push(k([S,Re(t,e,r)])),i&&s.push(S,"}")):i&&s.push("}"),E(s,{shouldBreak:!0})}function Ls(t){var e,r;return!(((e=t.next)==null?void 0:e.type)==="angularControlFlowBlock"&&((r=xs.get(t.name))!=null&&r.has(t.next.name)))}function Va(t){let{previous:e}=t;return(e==null?void 0:e.type)==="angularControlFlowBlock"&&!ge(e)&&!Ls(e)}function Fs(t,e,r){return[k([v,H([";",_],t.map(r,"children"))]),v]}function Ps(t,e,r){let{node:n}=t;return[De(n,e),E([n.switchValue.trim(),", ",n.clause,n.cases.length>0?[",",k([_,H(_,t.map(r,"cases"))])]:"",v]),Se(n,e)]}function Ns(t,e,r){let{node:n}=t;return[n.value," {",E([k([v,t.map(({node:s,isLast:i})=>{let a=[r()];return s.type==="text"&&(s.hasLeadingSpaces&&a.unshift(_),s.hasTrailingSpaces&&!i&&a.push(_)),a},"expression")]),v]),"}"]}function Is(t,e,r){let{node:n}=t;if(wt(n,e))return[z(n,e),E(st(t,e,r)),B(Nt(n,e)),...tt(n,e),G(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=>E([E(st(t,e,r),{id:i}),l,tt(n,e)]),o=l=>s?Cn(l,{groupId:i}):(W(n,e)||et(n,e))&&n.parent.type==="root"&&e.parser==="vue"&&!e.vueIndentScriptAndStyle?l:k(l),u=()=>s?pe(v,"",{groupId:i}):n.firstChild.hasLeadingSpaces&&n.firstChild.isLeadingSpaceSensitive?_:n.firstChild.type==="text"&&n.isWhitespaceSensitive&&n.isIndentationSensitive?dn(v):v,p=()=>(n.next?Q(n.next):Ee(n.parent))?n.lastChild.hasTrailingSpaces&&n.lastChild.isTrailingSpaceSensitive?" ":"":s?pe(v,"",{groupId:i}):n.lastChild.hasTrailingSpaces&&n.lastChild.isTrailingSpaceSensitive?_:(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?_:""):a([Gn(n)?ne:"",o([u(),Re(t,e,r)]),p()])}function ut(t){return t>=9&&t<=32||t==160}function Rt(t){return 48<=t&&t<=57}function lt(t){return t>=97&&t<=122||t>=65&&t<=90}function Rs(t){return t>=97&&t<=102||t>=65&&t<=70||Rt(t)}function $t(t){return t===10||t===13}function Br(t){return 48<=t&&t<=55}function Ot(t){return t===39||t===34||t===96}var Ua=/-+([a-z0-9])/g;function Os(t){return t.replace(Ua,(...e)=>e[1].toUpperCase())}var ie=class t{constructor(e,r,n,s){this.file=e,this.offset=r,this.line=n,this.col=s}toString(){return this.offset!=null?`${this.file.url}@${this.line}:${this.col}`:this.file.url}moveBy(e){let r=this.file.content,n=r.length,s=this.offset,i=this.line,a=this.col;for(;s>0&&e<0;)if(s--,e++,r.charCodeAt(s)==10){i--;let u=r.substring(0,s-1).lastIndexOf(String.fromCharCode(10));a=u>0?s-u:s}else a--;for(;s<n&&e>0;){let o=r.charCodeAt(s);s++,e--,o==10?(i++,a=0):a++}return new t(this.file,s,i,a)}getContext(e,r){let n=this.file.content,s=this.offset;if(s!=null){s>n.length-1&&(s=n.length-1);let i=s,a=0,o=0;for(;a<e&&s>0&&(s--,a++,!(n[s]==` `&&++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}},ve=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)}},Mt;(function(t){t[t.WARNING=0]="WARNING",t[t.ERROR=1]="ERROR"})(Mt||(Mt={}));var Oe=class{constructor(e,r,n=Mt.ERROR,s){this.span=e,this.msg=r,this.level=n,this.relatedError=s}contextualMessage(){let e=this.span.start.getContext(100,3);return e?`${this.msg} ("${e.before}[${Mt[this.level]} ->]${e.after}")`:this.msg}toString(){let e=this.span.details?`, ${this.span.details}`:"";return`${this.contextualMessage()}: ${this.span.start}${e}`}};var Wa=[za,Ya,Ka,Qa,Ja,to,Za,eo,ro,Xa];function Ga(t,e){for(let r of Wa)r(t,e);return t}function za(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 Ya(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 ja(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 Ka(t){return ja(t,e=>e.type==="cdata",e=>`<![CDATA[${e.value}]]>`)}function Xa(t){let e=r=>{var n,s;return r.type==="element"&&r.attrs.length===0&&r.children.length===1&&r.firstChild.type==="text"&&!O.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 Qa(t,e){if(e.parser==="html")return;let r=/\{\{(.+?)\}\}/su;t.walk(n=>{if(qn(n,e))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 Ja(t,e){t.walk(r=>{let n=r.$children;if(!n)return;if(n.length===0||n.length===1&&n[0].type==="text"&&O.trim(n[0].value).length===0){r.hasDanglingSpaces=n.length>0,r.$children=[];return}let s=Hn(r,e),i=Ar(r);if(!s)for(let a=0;a<n.length;a++){let o=n[a];if(o.type!=="text")continue;let{leadingWhitespace:u,text:p,trailingWhitespace:l}=Mn(o.value),m=o.prev,f=o.next;p?(o.value=p,o.sourceSpan=new h(o.sourceSpan.start.moveBy(u.length),o.sourceSpan.end.moveBy(-l.length)),u&&(m&&(m.hasTrailingSpaces=!0),o.hasLeadingSpaces=!0),l&&(o.hasTrailingSpaces=!0,f&&(f.hasLeadingSpaces=!0))):(r.removeChild(o),a--,(u||l)&&(m&&(m.hasTrailingSpaces=!0),f&&(f.hasLeadingSpaces=!0)))}r.isWhitespaceSensitive=s,r.isIndentationSensitive=i})}function Za(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 eo(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 to(t,e){t.walk(r=>{r.cssDisplay=Qn(r,e)})}function ro(t,e){t.walk(r=>{let{children:n}=r;if(n){if(n.length===0){r.isDanglingSpaceSensitive=Wn(r,e);return}for(let s of n)s.isLeadingSpaceSensitive=Vn(s,e),s.isTrailingSpaceSensitive=Un(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.length-1||i.next.isLeadingSpaceSensitive)&&i.isTrailingSpaceSensitive}}})}var Ms=Ga;function no(t,e,r){let{node:n}=t;switch(n.type){case"front-matter":return B(n.raw);case"root":return e.__onHtmlRoot&&e.__onHtmlRoot(n),[E(Re(t,e,r)),S];case"element":case"ieConditionalComment":return Is(t,e,r);case"angularControlFlowBlock":return Bs(t,e,r);case"angularControlFlowBlockParameters":return Fs(t,e,r);case"angularControlFlowBlockParameter":return O.trim(n.expression);case"angularLetDeclaration":return E(["@let ",E([n.id," =",E(k([_,r("init")]))]),";"]);case"angularLetDeclarationInitializer":return n.value;case"angularIcuExpression":return Ps(t,e,r);case"angularIcuCase":return Ns(t,e,r);case"ieConditionalStartComment":case"ieConditionalEndComment":return[De(n),Se(n)];case"interpolation":return[De(n,e),...t.map(r,"children"),Se(n,e)];case"text":{if(n.parent.type==="interpolation"){let o=/\n[^\S\n]*$/u,u=o.test(n.value),p=u?n.value.replace(o,""):n.value;return[B(p),u?S:""]}let s=z(n,e),i=kt(n),a=G(n,e);return i[0]=[s,i[0]],i.push([i.pop(),a]),vt(i)}case"docType":return[E([De(n,e)," ",w(!1,n.value.replace(/^html\b/iu,"html"),/\s+/gu," ")]),Se(n,e)];case"comment":return[z(n,e),B(e.originalText.slice(J(n),se(n))),G(n,e)];case"attribute":{if(n.value===null)return n.rawName;let s=wr(n.value),i=_n(s,'"');return[n.rawName,"=",i,B(i==='"'?w(!1,s,'"',"&quot;"):w(!1,s,"'","&apos;")),i]}case"cdata":default:throw new An(n,"HTML")}}var so={preprocess:Ms,print:no,insertPragma:Ts,massageAstNode:vn,embed:Ss,getVisitorKeys:As},qs=so;var Hs=[{name:"Angular",type:"markup",extensions:[".component.html"],tmScope:"text.html.basic",aceMode:"html",aliases:["xhtml"],codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",parsers:["angular"],vscodeLanguageIds:["html"],filenames:[],linguistLanguageId:146},{name:"HTML",type:"markup",extensions:[".html",".hta",".htm",".html.hl",".inc",".xht",".xhtml"],tmScope:"text.html.basic",aceMode:"html",aliases:["xhtml"],codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",parsers:["html"],vscodeLanguageIds:["html"],linguistLanguageId:146},{name:"Lightning Web Components",type:"markup",extensions:[],tmScope:"text.html.basic",aceMode:"html",aliases:["xhtml"],codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",parsers:["lwc"],vscodeLanguageIds:["html"],filenames:[],linguistLanguageId:146},{name:"MJML",type:"markup",extensions:[".mjml"],tmScope:"text.mjml.basic",aceMode:"html",aliases:["MJML","mjml"],codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",parsers:["mjml"],filenames:[],vscodeLanguageIds:["mjml"],linguistLanguageId:146},{name:"Vue",type:"markup",extensions:[".vue"],tmScope:"source.vue",aceMode:"html",parsers:["vue"],vscodeLanguageIds:["vue"],linguistLanguageId:391}];var Lr={bracketSpacing:{category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},objectWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap object literals.",choices:[{value:"preserve",description:"Keep as multi-line, if there is a newline between the opening brace and first property."},{value:"collapse",description:"Fit to a single line when possible."}]},singleQuote:{category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{category:"Common",type:"choice",default:"preserve",description:"How to wrap prose.",choices:[{value:"always",description:"Wrap prose if it exceeds the print width."},{value:"never",description:"Do not wrap prose."},{value:"preserve",description:"Wrap prose as-is."}]},bracketSameLine:{category:"Common",type:"boolean",default:!1,description:"Put > of opening tags on the last line instead of on a new line."},singleAttributePerLine:{category:"Common",type:"boolean",default:!1,description:"Enforce single attribute per line in HTML, Vue and JSX."}};var Vs="HTML",io={bracketSameLine:Lr.bracketSameLine,htmlWhitespaceSensitivity:{category:Vs,type:"choice",default:"css",description:"How to handle whitespaces in HTML.",choices:[{value:"css",description:"Respect the default value of CSS display property."},{value:"strict",description:"Whitespaces are considered sensitive."},{value:"ignore",description:"Whitespaces are considered insensitive."}]},singleAttributePerLine:Lr.singleAttributePerLine,vueIndentScriptAndStyle:{category:Vs,type:"boolean",default:!1,description:"Indent script and style tags in Vue files."}},Us=io;var tn={};ln(tn,{angular:()=>iu,html:()=>ru,lwc:()=>ou,mjml:()=>su,vue:()=>au});var ah=new RegExp(`(\\:not\\()|(([\\.\\#]?)[-\\w]+)|(?:\\[([-.\\w*\\\\$]+)(?:=(["']?)([^\\]"']*)\\5)?\\])|(\\))|(\\s*,\\s*)`,"g");var Ws;(function(t){t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom"})(Ws||(Ws={}));var Gs;(function(t){t[t.OnPush=0]="OnPush",t[t.Default=1]="Default"})(Gs||(Gs={}));var zs;(function(t){t[t.None=0]="None",t[t.SignalBased=1]="SignalBased",t[t.HasDecoratorInputTransform=2]="HasDecoratorInputTransform"})(zs||(zs={}));var Fr={name:"custom-elements"},Pr={name:"no-errors-schema"};var Z;(function(t){t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL"})(Z||(Z={}));var Ys;(function(t){t[t.Error=0]="Error",t[t.Warning=1]="Warning",t[t.Ignore=2]="Ignore"})(Ys||(Ys={}));var N;(function(t){t[t.RAW_TEXT=0]="RAW_TEXT",t[t.ESCAPABLE_RAW_TEXT=1]="ESCAPABLE_RAW_TEXT",t[t.PARSABLE_DATA=2]="PARSABLE_DATA"})(N||(N={}));function ct(t,e=!0){if(t[0]!=":")return[null,t];let r=t.indexOf(":",1);if(r===-1){if(e)throw new Error(`Unsupported format "${t}" expecting ":namespace:name"`);return[null,t]}return[t.slice(1,r),t.slice(r+1)]}function Nr(t){return ct(t)[1]==="ng-container"}function Ir(t){return ct(t)[1]==="ng-content"}function Me(t){return t===null?null:ct(t)[0]}function qe(t,e){return t?`:${t}:${e}`:e}var Ht;function Rr(){return Ht||(Ht={},qt(Z.HTML,["iframe|srcdoc","*|innerHTML","*|outerHTML"]),qt(Z.STYLE,["*|style"]),qt(Z.URL,["*|formAction","area|href","area|ping","audio|src","a|href","a|ping","blockquote|cite","body|background","del|cite","form|action","img|src","input|src","ins|cite","q|cite","source|src","track|src","video|poster","video|src"]),qt(Z.RESOURCE_URL,["applet|code","applet|codebase","base|href","embed|src","frame|src","head|profile","html|manifest","iframe|src","link|href","media|src","object|codebase","object|data","script|src"])),Ht}function qt(t,e){for(let r of e)Ht[r.toLowerCase()]=t}var Vt=class{};var ao="boolean",oo="number",uo="string",lo="object",co=["[Element]|textContent,%ariaAtomic,%ariaAutoComplete,%ariaBusy,%ariaChecked,%ariaColCount,%ariaColIndex,%ariaColSpan,%ariaCurrent,%ariaDescription,%ariaDisabled,%ariaExpanded,%ariaHasPopup,%ariaHidden,%ariaKeyShortcuts,%ariaLabel,%ariaLevel,%ariaLive,%ariaModal,%ariaMultiLine,%ariaMultiSelectable,%ariaOrientation,%ariaPlaceholder,%ariaPosInSet,%ariaPressed,%ariaReadOnly,%ariaRelevant,%ariaRequired,%ariaRoleDescription,%ariaRowCount,%ariaRowIndex,%ariaRowSpan,%ariaSelected,%ariaSetSize,%ariaSort,%ariaValueMax,%ariaValueMin,%ariaValueNow,%ariaValueText,%classList,className,elementTiming,id,innerHTML,*beforecopy,*beforecut,*beforepaste,*fullscreenchange,*fullscreenerror,*search,*webkitfullscreenchange,*webkitfullscreenerror,outerHTML,%part,#scrollLeft,#scrollTop,slot,*message,*mozfullscreenchange,*mozfullscreenerror,*mozpointerlockchange,*mozpointerlockerror,*webglcontextcreationerror,*webglcontextlost,*webglcontextrestored","[HTMLElement]^[Element]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,!inert,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy","abbr,address,article,aside,b,bdi,bdo,cite,content,code,dd,dfn,dt,em,figcaption,figure,footer,header,hgroup,i,kbd,main,mark,nav,noscript,rb,rp,rt,rtc,ruby,s,samp,section,small,strong,sub,sup,u,var,wbr^[HTMLElement]|accessKey,autocapitalize,!autofocus,contentEditable,dir,!draggable,enterKeyHint,!hidden,innerText,inputMode,lang,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop,*durationchange,*emptied,*ended,*error,*focus,*formdata,*gotpointercapture,*input,*invalid,*keydown,*keypress,*keyup,*load,*loadeddata,*loadedmetadata,*loadstart,*lostpointercapture,*mousedown,*mouseenter,*mouseleave,*mousemove,*mouseout,*mouseover,*mouseup,*mousewheel,*paste,*pause,*play,*playing,*pointercancel,*pointerdown,*pointerenter,*pointerleave,*pointermove,*pointerout,*pointerover,*pointerrawupdate,*pointerup,*progress,*ratechange,*reset,*resize,*scroll,*securitypolicyviolation,*seeked,*seeking,*select,*selectionchange,*selectstart,*slotchange,*stalled,*submit,*suspend,*timeupdate,*toggle,*transitioncancel,*transitionend,*transitionrun,*transitionstart,*volumechange,*waiting,*webkitanimationend,*webkitanimationiteration,*webkitanimationstart,*webkittransitionend,*wheel,outerText,!spellcheck,%style,#tabIndex,title,!translate,virtualKeyboardPolicy","media^[HTMLElement]|!autoplay,!controls,%controlsList,%crossOrigin,#currentTime,!defaultMuted,#defaultPlaybackRate,!disableRemotePlayback,!loop,!muted,*encrypted,*waitingforkey,#playbackRate,preload,!preservesPitch,src,%srcObject,#volume",":svg:^[HTMLElement]|!autofocus,nonce,*abort,*animationend,*animationiteration,*animationstart,*auxclick,*beforexrselect,*blur,*cancel,*canplay,*canplaythrough,*change,*click,*close,*contextmenu,*copy,*cuechange,*cut,*dblclick,*drag,*dragend,*dragenter,*dragleave,*dragover,*dragstart,*drop