sveld 0.37.9 → 0.38.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +175 -4337
- package/{lib/browser.d.ts → browser.d.ts} +109 -479
- package/browser.js +265 -0
- package/chunk-wpqsw5ca.js +13 -0
- package/chunk-x0hkebcs.js +29 -0
- package/chunk-y5gqpp8d.js +5 -0
- package/chunk-ymq8jc0f.js +254 -0
- package/chunk-ynrmtc58.js +1 -0
- package/cli-entry.js +38 -0
- package/cli.js +1 -1
- package/{lib/index.d.ts → index.d.ts} +207 -601
- package/index.js +1 -0
- package/package.json +9 -14
- package/lib/browser.js +0 -272
- package/lib/chunk-81w3m3mq.js +0 -8
- package/lib/chunk-f8nq2w4s.js +0 -325
- package/lib/chunk-fk1w3bnw.js +0 -29
- package/lib/chunk-fz6nj0w3.js +0 -4
- package/lib/chunk-r92p6t72.js +0 -1
- package/lib/chunk-wd6xaaes.js +0 -13
- package/lib/chunk-yp6p39jn.js +0 -6
- package/lib/cli-entry.js +0 -1
- package/lib/index.js +0 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import{h,_e,w,n,A,p,d,m,Ne,ge,x,o,i,Q,_,Y,J,s,F,V,T,g,E,a,c,N,U,te,ye,ne,Ie,xe,Te,R,f,y,r,re,ie,b,G,e,Le,Oe,Me,$e,je,qe,Be,Je,Fe,Ve,Ee,Ue,Ge,be,We,He,ze,Xe,ke,Se,Qe,we,Ye,Ze,k,Ke,et,tt,nt,rt,it,st,ot,at,ve,ct,pt,ut,lt,ft,dt,se,mt,ht,gt,De,yt,xt,Tt,Et,u,bt,kt,St,oe,W,ae,I,wt,pe,v}from"./chunk-ymq8jc0f.js";var Rs=/\s/;function er(t,l,S){let C=l;while(C<S){let D=t[C];if(D==="/"&&t[C+1]==="/"){let P=t.indexOf(`
|
|
2
|
+
`,C+2);if(P===-1||P>=S)return!0;C=P+1}else if(D==="/"&&t[C+1]==="*"&&t[C+2]!=="*"){let P=t.indexOf("*/",C+2);if(P===-1||P+2>S)return!1;C=P+2}else if(D===" "||D===`
|
|
3
|
+
`||D==="\t"||D==="\r"||Rs.test(D))C++;else return!1}return!0}var Is=/^-\s*/;function xn(t){let l=[],S,C=!1;for(let D of t){let P=V(D);if(S!==void 0){if(P)l.push(D.trim()),S=void 0;else l.push(D.slice(Math.min(S,F(D))).trimEnd());continue}let L=D.trim();if(L===""){C=l.length>0;continue}if(C)l.push("");if(C=!1,l.push(L),P)S=F(D)}return l.join(`
|
|
4
|
+
`).trimEnd()}function Ot(t){if(t===void 0)return;let l=t.replace(Is,"").trim();return l===""?"":l}function ri(t){let l=t.name?`${t.name} ${t.description}`:t.description;return Ot(xn(l.split(`
|
|
5
|
+
`)))}function tr(t){let l=0;while(t[l+1]?.continuesType)l++;return l}var En=new Set(["since","example","see"]),nr=new Set(["bindable","default","required"]);function ii(t){return t.length>0?t.map((l)=>({name:l.tag,body:l.text})):void 0}function kn(t){let l=t.trim();return l===""?!0:l}function rr(t){let l=t;if(!l.startsWith("/*"))l=`/*${l}`;if(!l.endsWith("*/"))l+="*/";return l}function Bt(t){if(t==="*")return"any";return t.trim()}function It(t){let l=T(rr(t)),{returns:S}=B(l);return S?Bt(S.type):void 0}function Lt(t){let l=T(rr(t)),{deprecated:S,passthrough:C,internal:D}=B(l);return{deprecated:S,tags:ii(C),internal:D}}var js=new Set(["type","param","returns","return","extends","extendProps","restProps","slot","snippet","event","typedef","callback","bindable","deprecated","ignore","internal","csspart","cssprop","cssproperty"]);function ir(t,l){let S=t.parsedJsDocByText.get(l);if(S===void 0)S=T(l),t.parsedJsDocByText.set(l,S);return S}function B(t){let l=t[0]?.tags??[],S,C=[],D,P,L,q=!1,M=[],j=[],O=[];for(let H of l)if(H.tag==="type")S=H;else if(H.tag==="param")C.push(H);else if(H.tag==="returns"||H.tag==="return")D=H;else if(H.tag==="deprecated")L??=kn(H.text);else if(H.tag==="ignore"||H.tag==="internal")q=!0;else if(H.tag==="sveld-ignore")O.push(H.name);else if(En.has(H.tag))j.push(H);else if(H.tag==="bindable"){if(H.type)continue;let z=`${H.name}${H.description?` ${H.description}`:""}`.trim();if(z==="readonly"||z==="writable")P??=z}else if(!js.has(H.tag))M.push(H);return{type:S,param:C,returns:D,binding:P,deprecated:L,internal:q,additional:M,passthrough:j,ignore:O,description:t[0]?.description}}function Fs(t,l){if(typeof l.start!=="number"||typeof l.end!=="number")return;let S=t.jsDocBlocksByStart.get(l.start);if(S===void 0||S.end!==l.end)return;return[S]}function Bs(t){if(!t||t.length===0)return;let l=t[t.length-1];return l&&typeof l==="object"&&"value"in l?l:void 0}function oi(t,l,S){if(!l||l.length===0||S===void 0||!t.source)return;for(let C=l.length-1;C>=0;C--){let D=l[C];if(!D||typeof D!=="object"||!("value"in D)||!("end"in D))continue;if(typeof D.end!=="number"||!("start"in D)||typeof D.start!=="number")continue;if("type"in D&&D.type==="Line"||!String(D.value).startsWith("*"))continue;if(er(t.source,D.end,S))return D}return}function si(t){let l=new Set,S=(D)=>{let{leadingComments:P,start:L}=D,q=oi(t,P,L);if(q)l.add(q.start)};for(let D of t.funcDecls.values())S(D);let C=[{root:t.parsed?.module,isModule:!0},{root:t.parsed?.instance,isModule:!1}];for(let{root:D,isModule:P}of C)for(let L of D?.content.body??[]){let q=L.type==="ExportNamedDeclaration",M=L.type==="ExportNamedDeclaration"?L.declaration:L;if(M?.type==="FunctionDeclaration"){if(q)S(L)}else if(M?.type==="ClassDeclaration"&&P){S(q?L:M);for(let j of M.body.body)if(j.type==="MethodDefinition")S(j)}else if(M?.type==="VariableDeclaration"&&(P||!q||M.kind==="const")&&M.declarations.length===1&&_s.has(M.declarations[0].init?.type??""))S(L)}return l}var _s=new Set(["ArrowFunctionExpression","FunctionExpression"]);function Re(t,l){if(!l?.leadingComments)return;let S=oi(t,l.leadingComments,l.start);if(!S)return;return Vs(t,[S])}function or(t,l){if(!l?.leadingComments)return;return Re(t,l)}function Os(t,l,S){let C=t;if(l)C=`${t} extends ${l}`;if(S)C+=` = ${S}`;return C}var $s=/^[^\s,]+/,ni=/^\s*,\s*([^\s,]+)/;function sr(t,l){let S=t.optional?t.name:$s.exec(t.name)?.[0];if(!S)return[];let C=[{name:S,constraint:Os(S,l,t.default)}],D=`${t.optional?"":t.name.slice(S.length)} ${t.description}`;for(let P=ni.exec(D);P;P=ni.exec(D))C.push({name:P[1],constraint:P[1]}),D=D.slice(P[0].length);return C}function Vs(t,l){if(!l)return;let S=Bs(l);if(!S)return;let C=Fs(t,S)??ir(t,rr(S.value)),{type:D,param:P,returns:L,binding:q,deprecated:M,internal:j,additional:O,passthrough:H,ignore:z,description:K}=B(C),ee,Z,fe,me;if(D)ee=Bt(D.type);if(P.length>0)Z=P.filter((Dt)=>!Dt.name.includes(".")).map((Dt)=>({name:Dt.name,type:Bt(Dt.type),description:Ot(xn(Dt.description.split(`
|
|
6
|
+
`))),optional:Dt.optional||!1}));if(L)fe=Bt(L.type);let Ce,vt=O;if(typeof S.start==="number"&&t.functionDocCommentStarts.has(S.start)){let Dt=O.filter((Pt)=>Pt.tag==="template"&&Pt.name);if(Dt.length>0)Ce=Dt.flatMap((Pt)=>sr(Pt,Bt(Pt.type))).map(({constraint:Pt})=>Pt).join(", "),vt=O.filter((Pt)=>Pt.tag!=="template")}let Ct=a(K?.trim());if(Ct||vt.length>0){let Dt=[];if(Ct)Dt.push(Ct);for(let Pt of vt)Dt.push(`@${Pt.tag}${Pt.text?` ${Pt.text}`:""}`);me=Dt.join(`
|
|
7
|
+
`)}return{type:ee,params:Z,returnType:fe,description:me,binding:q,deprecated:M,tags:ii(H),sveldIgnore:z.length>0?z:void 0,internal:j,typeParameters:Ce}}function ce(t,l,S,C,D){t.diagnosticRecords.push(ar(t,l,S,C,D))}function ar(t,l,S,C,D){return s({component:t.componentFilePath,kind:l,name:S,message:C,...D?{source:D}:{},...lr(t,l,S)?{ignored:!0}:{}})}function ai(t,l){return`${t}:${l}`}function Ft(t,l,S,C){if(!C||C.length===0)return;let D=ai(l,S),P=t.sveldIgnoreDirectives.get(D)??new Set;for(let L of C)P.add(L);t.sveldIgnoreDirectives.set(D,P)}function lr(t,l,S){let C=t.sveldIgnoreDirectives.get(ai(l,S));if(!C)return!1;return C.has("")||C.has(J[l])}var Hs=/^\{([\s\S]*)\}$/,zs=/^[A-Za-z_$][\w$]*$/;function $t(t){let l=t.trim(),S=Hs.exec(l);if(!S)return null;let C=S[1].trim();if(C==="")return[];let D=[];for(let P of i(C,";,")){let L=P.trim();if(!L)continue;let q=Q(L,":");if(q===-1)return null;let M=L.slice(0,q).trim(),j=L.slice(q+1).trim();if(!j)return null;let O=!1;if(M.endsWith("?"))O=!0,M=M.slice(0,-1).trim();if(!zs.test(M))return null;D.push({name:M,type:j,optional:O})}return D}function cr(){return{syntaxMode:"legacy",scriptLanguage:void 0,source:void 0,parsed:void 0,runesOptionOverride:void 0,sourceLineStartOffsetsCache:void 0,sourceLineHint:void 0,parsedJsDocByText:new Map,jsDocBlocksByStart:new Map,functionDocCommentStarts:new Set,rest_props:void 0,extends:void 0,customElementTag:void 0,customElement:void 0,componentComment:void 0,componentCommentSource:void 0,generics:null,scriptGenericsAttribute:void 0,diagnosticRecords:[],componentFilePath:"",props:new Map,moduleExports:new Map,propLocalToPublicName:new Map,reactive_vars:new Set,funcDecls:new Map,vars:new Set,valueImportBindingsByLocalName:new Map,pendingCallDefaultCandidates:[],pendingConstDefaultCandidates:[],pendingContextKeyCandidates:[],pendingDispatchEscapeCandidates:[],deferredEventNoSourceDiagnostics:[],runesPropsDeclarationMetadataByDeclaratorStart:new Map,typedRunesPropsDeclarations:[],explicitPropTypesByName:new Map,explicitVariableTypesByName:new Map,explicitVariableTypeNodesByName:new Map,typeImportBindingsByLocalName:new Map,localTypeDeclarationsByName:new Map,additionalTypeDependencyNodes:[],wholePropsLocals:new Set,restPropLocals:new Set,componentScope:new Map,scopeDeclarations:new Map,activeScopes:[],slots:new Map,snippetPropLocals:new Set,cssParts:[],cssProperties:[],deferredSlotBlockGenerics:[],events:new Map,eventDescriptions:new Map,forwardedEvents:new Map,jsDocEventNames:new Set,untypedJsDocEventNames:new Set,jsDocEventSources:new Map,bindings:new Map,contexts:new Map,typedefs:new Map,typedefMembersByName:new Map,variableInfoCache:new Map,variableInfoCacheBuilt:!1,sveldIgnoreDirectives:new Map}}function pr(t,l){return t.propLocalToPublicName.get(l)??l}function Cn(t,l,S=l){t.propLocalToPublicName.set(S,l)}function ur(t,l){return t.props.get(pr(t,l))}function an(t,l){return ur(t,l)?.type}var Dn=/[\r\n]+/g;function Gs(t){if(t.sourceLineStartOffsetsCache)return t.sourceLineStartOffsetsCache;let l=[0];if(t.source){let S=t.source.indexOf(`
|
|
8
|
+
`);while(S!==-1)l.push(S+1),S=t.source.indexOf(`
|
|
9
|
+
`,S+1)}return t.sourceLineStartOffsetsCache=l,l}function li(t,l){if(!t.source||l<0||l>t.source.length)return;let S=Gs(t),C=t.sourceLineHint;if(C!==void 0)for(let L=C;L<=C+1&&L<S.length;L++){let q=S[L],M=S[L+1]??Number.POSITIVE_INFINITY;if(l>=q&&l<M)return t.sourceLineHint=L,{line:L+1,column:l-q}}let D=0,P=S.length-1;while(D<=P){let L=D+P>>>1,q=S[L],M=S[L+1]??Number.POSITIVE_INFINITY;if(l<q)P=L-1;else if(l>=M)D=L+1;else return t.sourceLineHint=L,{line:L+1,column:l-q}}return}function wn(t,l,S){if(l===void 0||S===void 0||S<l)return;let C=li(t,l),D=li(t,S);if(!C||!D)return;return{start:C,end:D}}function le(t,l){if(!l||typeof l!=="object")return;let S="start"in l&&typeof l.start==="number"?l.start:void 0,C="end"in l&&typeof l.end==="number"?l.end:void 0;return wn(t,S,C)}function qt(t,l){if(!l||l.length===0)return;let S=[...l];while(S.length>1){let M=S[S.length-1];if(M.tag!==void 0||!M.raw.trim().endsWith("*/"))break;S.pop()}let C=S[0],D=C.raw.indexOf(`@${C.tag??""}`),P=C.start+Math.max(D,0),L=S[S.length-1],q=L.start+L.raw.length;return wn(t,P,q)}function ue(t,l,S){return t.source?.slice(l,S)}function Mt(t,l){if(!l||typeof l!=="object")return;let S="start"in l&&typeof l.start==="number"?l.start:void 0,C="end"in l&&typeof l.end==="number"?l.end:void 0;if(S===void 0||C===void 0)return;return ue(t,S,C)?.replace(Dn," ")}function Pn(t,l){if(l===void 0)return;return t.runesPropsDeclarationMetadataByDeclaratorStart.get(l)}function ui(t,l,S){return Pn(t,l)?.props.get(S)}function di(t){if(!t||typeof t!=="object"||!("type"in t))return;if(t.type==="Identifier"&&"name"in t&&typeof t.name==="string")return t.name;if(t.type==="TSQualifiedName"&&"right"in t&&t.right&&typeof t.right==="object"&&"name"in t.right&&typeof t.right.name==="string")return t.right.name;return}function fi(t){if(!t||typeof t!=="object"||!("type"in t))return;if(t.type==="Identifier"&&"name"in t&&typeof t.name==="string")return t.name;if(t.type==="TSQualifiedName"&&"left"in t&&t.left&&typeof t.left==="object")return fi(t.left);return}function Vt(t,l){let S=l?.start,C=l?.end;if(S===void 0||C===void 0)return;return ue(t,S+1,C)?.trim()}function Kt(t,l){let S=l?.start,C=l?.end;if(S===void 0||C===void 0)return;return ue(t,S,C)?.trim()}function Rt(t,l,S,C,D=new Set){if(!l?.type)return;switch(l.type){case"TSInterfaceDeclaration":for(let P of l.extends??[])ci(t,P.expression,P.typeParameters?.params,S,C,D);pi(t,l.body.body,S,C,D);return;case"TSTypeAliasDeclaration":case"TSParenthesizedType":case"TSTypeAnnotation":Rt(t,l.typeAnnotation,S,C,D);return;case"TSIntersectionType":case"TSUnionType":for(let P of l.types??[])Rt(t,P,S,C,D);return;case"TSTypeLiteral":pi(t,l.members,S,C,D);return;case"TSTypeReference":ci(t,l.typeName,l.typeArguments?.params,S,C,D);return;case"TSArrayType":case"TSRestType":case"TSOptionalType":case"TSIndexedAccessType":case"TSTypeOperator":case"TSExpressionWithTypeArguments":case"TSTupleType":case"TSConditionalType":case"TSInferType":case"TSMappedType":case"TSFunctionType":case"TSConstructorType":case"TSTypeQuery":case"TSImportType":case"TSLiteralType":case"TSTypePredicate":case"TSNamedTupleMember":break;default:break}for(let P in l){let L=l[P];if(!L||typeof L!=="object")continue;if(Array.isArray(L)){for(let q of L){if(!q||typeof q!=="object"||!("type"in q))continue;Rt(t,q,S,C,D)}continue}if("type"in L)Rt(t,L,S,C,D)}}function Ws(t,l){let S=new Map;for(let C of Array.from(l).sort()){let D=t.typeImportBindingsByLocalName.get(C),P=D?void 0:t.valueImportBindingsByLocalName.get(C),L=D??(P?{importedName:P.importedName,localName:P.localName,source:P.source,specifierType:"named"}:void 0);if(!L)continue;let q=S.get(L.source)??{default:[],named:[],namespace:[]};if(L.specifierType==="default")q.default.push(L.localName);else if(L.specifierType==="namespace")q.namespace.push(L.localName);else q.named.push({imported:L.importedName,local:L.localName});S.set(L.source,q)}return Array.from(S.entries()).sort(([C],[D])=>c(C,D)).map(([C,D])=>{if(D.namespace.length>0)return D.namespace.map((M)=>`import type * as ${M} from "${C}";`).join(`
|
|
10
|
+
`);let P=D.named.map(({imported:M,local:j})=>{if(!M||M===j)return j;return`${M} as ${j}`}),L=D.default[0],q=P.length>0?`{ ${P.join(", ")} }`:"";if(L&&q)return`import type ${L}, ${q} from "${C}";`;if(L)return`import type ${L} from "${C}";`;return`import type ${q} from "${C}";`})}function ci(t,l,S,C,D,P){let L=fi(l);if(L){if(t.typeImportBindingsByLocalName.has(L)||t.valueImportBindingsByLocalName.has(L))C.add(L);let q=t.localTypeDeclarationsByName.get(L);if(q&&!P.has(L))D.add(L),P.add(L),Rt(t,q.node,C,D,P),P.delete(L)}for(let q of S??[])Rt(t,q,C,D,P)}function pi(t,l,S,C,D){for(let P of l){if(P.type!=="TSPropertySignature")continue;Rt(t,P.typeAnnotation?.typeAnnotation,S,C,D)}}function Pe(t,l){if(l)t.additionalTypeDependencyNodes.push(l)}function Us(t){if(!t.const)return;let l=t.id.name,S=[];for(let C of t.members){let D=C.initializer;if(D?.type!=="Literal")return;let P=D.value;if(typeof P==="string")S.push(JSON.stringify(P));else if(typeof P==="number")S.push(String(P));else return}if(S.length===0)return;return`type ${l} = ${S.join(" | ")};`}function mi(t,l){let S=Us(l);if(S)return S;let C=ue(t,l.start,l.end)?.trim();return C?`declare ${C}`:void 0}function dr(t,l){let S=[];for(let C of l.params){let D=C.type==="TSParameterProperty"?C.parameter:C;if(D.type==="RestElement"){Pe(t,D.typeAnnotation?.typeAnnotation),S.push({name:D.argument.type==="Identifier"?D.argument.name:"rest",type:Vt(t,D.typeAnnotation),optional:!1,rest:!0});continue}let P=D.type==="AssignmentPattern",L=P?D.left:D,q="typeAnnotation"in L?L.typeAnnotation:void 0;Pe(t,q?.typeAnnotation),S.push({name:L.type==="Identifier"?L.name:"arg",type:Vt(t,q),optional:P||"optional"in D&&D.optional===!0,rest:!1})}Pe(t,l.returnType?.typeAnnotation);for(let C of l.typeParameters?.params??[])Pe(t,C.constraint),Pe(t,C.default);return{params:S,returnType:Vt(t,l.returnType),typeParameters:Kt(t,l.typeParameters)||void 0}}function gi(t,l){let{params:S,returnType:C,typeParameters:D}=dr(t,l),P=S.map(({name:q,type:M,optional:j,rest:O})=>O?`...${q}: ${M??"any[]"}`:`${q}${j?"?":""}: ${M??"any"}`),L=C!==void 0||D!==void 0||S.some((q)=>q.type!==void 0);return{signature:`${D??""}(${P.join(", ")}) => ${C??"any"}`,hasAnnotations:L}}function yi(t){let l=t.pendingCallDefaultCandidates.length>0?t.pendingCallDefaultCandidates.slice():void 0,S=t.pendingConstDefaultCandidates.length>0?t.pendingConstDefaultCandidates.slice():void 0,C=t.pendingContextKeyCandidates.length>0?t.pendingContextKeyCandidates.slice():void 0,D=t.pendingDispatchEscapeCandidates.length>0?t.pendingDispatchEscapeCandidates.slice():void 0;if(!l&&!S&&!C&&!D)return;let P=t.deferredEventNoSourceDiagnostics.length>0?t.deferredEventNoSourceDiagnostics.slice():void 0,L=D&&t.untypedJsDocEventNames.size>0?Array.from(t.untypedJsDocEventNames):void 0;return{...l?{pendingCallDefaultCandidates:l}:{},...S?{pendingConstDefaultCandidates:S}:{},...C?{pendingContextKeyCandidates:C}:{},...D?{pendingDispatchEscapeCandidates:D}:{},...P?{deferredEventNoSourceDiagnostics:P}:{},...L?{untypedJsDocEventNames:L}:{}}}function hi(t){let l=new Set,S=new Set;for(let M of t.additionalTypeDependencyNodes)Rt(t,M,l,S);let C=Array.from(t.localTypeDeclarationsByName.values()).filter((M)=>M.exported).sort((M,j)=>M.start-j.start);for(let M of C)Rt(t,M.node,l,S);let D=C.map((M)=>`export ${M.code}`),P=t.typedRunesPropsDeclarations.length===1?t.typedRunesPropsDeclarations[0]:void 0,L=P?.canonicalType;if(P&&L){for(let M of P.referencedImportedTypes)l.add(M);for(let M of P.referencedLocalTypes)S.add(M)}if(!L&&l.size===0&&S.size===0&&D.length===0)return;let q=Array.from(S).map((M)=>t.localTypeDeclarationsByName.get(M)).filter((M)=>M!==void 0&&!M.exported).sort((M,j)=>M.start-j.start).map((M)=>M.code);return{...L?{canonicalPropsType:L}:{},canonicalPropNames:P&&L?Array.from(P.props.keys()).sort():[],localTypeDeclarations:q,...D.length>0?{moduleTypeDeclarations:D}:{},typeImportStatements:Ws(t,l)}}function Js(t,l,S,C,D){for(let P of t){if(P.type!=="Block"||P.start<S||P.end>C)continue;D.push({start:P.start,end:P.end,isJsDoc:P.end-P.start>4&&l.startsWith("/**",P.start)})}}function bi(t,l,S){if(!t||typeof t!=="object"||!("type"in t))return;let C=t;if(C.type==="FunctionDeclaration"){if(C.id?.type==="Identifier"&&C.id.name)S.push({name:C.id.name,start:l});return}if(C.type==="VariableDeclaration"){for(let D of C.declarations??[])if(D?.id?.type==="Identifier"&&D.id.name)S.push({name:D.id.name,start:l})}}function Ks(t){let l=[];for(let S of t){if(!S||typeof S!=="object"||!("type"in S))continue;let C=S;if(C.start===void 0)continue;if(C.type==="ExportNamedDeclaration"&&C.declaration)bi(C.declaration,C.start,l);else bi(C,C.start,l)}return l}function Xs(t,l,S){let C=0,D=t.length;while(C<D){let P=C+D>>>1;if(t[P].end<=l)C=P+1;else D=P}for(let P=C-1;P>=0;P--){let L=t[P];if(!L.isJsDoc)continue;return er(S,L.end,l)?L:void 0}return}function Ys(t){let l=new Map;if(!t.source)return l;let S=[t.parsed?.module,t.parsed?.instance],C=[],D=[],P=t.parsed?.comments??[];for(let L of S){let q=L?.content;if(!q)continue;Js(P,t.source,q.start,q.end,C),D.push(...Ks(q.body))}C.sort((L,q)=>L.end-q.end);for(let L of D){let q=Xs(C,L.start,t.source);if(!q)continue;let M=ir(t,t.source.slice(q.start,q.end)),{type:j,description:O,ignore:H,internal:z}=B(M);if(H.length>0)Ft(t,"context-any-type",L.name,H);if(!j&&!O&&!z)continue;l.set(L.name,{type:j?Bt(j.type):void 0,description:O||j&&ri(j),internal:z||void 0})}return l}function vi(t,l){if(!t.variableInfoCacheBuilt)t.variableInfoCache=Ys(t),t.variableInfoCacheBuilt=!0;return t.variableInfoCache.get(l)}function Gt(t,l){let S=ur(t,l);if(S?.type)return{type:S.type,description:S.description,internal:S.internal};let C=vi(t,l),D=t.explicitVariableTypesByName.get(l);if(D)return{type:D,description:C?.description,internal:C?.internal};if(!C?.type)return null;return{type:C.type,description:C.description,internal:C.internal}}function Ti(t,l){let S=vi(t,l);return{...S?.description?{description:S.description}:{},...S?.internal?{internal:!0}:{}}}function Wt(t,l){for(let C of t.vars)if(C.declarations.some((P)=>P.id&&typeof P.id==="object"&&("type"in P.id)&&P.id.type==="Identifier"&&("name"in P.id)&&P.id.name===l))return Re(t,C);let S=t.funcDecls.get(l);if(S)return Re(t,S);return}function Zt(t,l,S){if(a(l)===void 0)return;if(Cn(t,l),t.props.has(l)){let C=t.props.get(l);t.props.set(l,{...C,...S})}else t.props.set(l,S)}function An(t,l,S,C){if(l.pendingCallDefault)t.pendingCallDefaultCandidates.push({propName:S,location:C,...l.pendingCallDefault});if(l.pendingConstDefault)t.pendingConstDefaultCandidates.push({propName:S,location:C,...l.pendingConstDefault})}var Zs=/[^\S\r\n]*[\r\n]\s*/g;function Ht(t,l,S=0){let C,D,P=!1;if(!l||typeof l!=="object"||!("type"in l))return{value:C,type:D,isFunction:P};let L=Ei(t,l);if(l.type==="ObjectExpression"||l.type==="BinaryExpression"||l.type==="ArrayExpression"||l.type==="ArrowFunctionExpression"||l.type==="FunctionExpression"){let q=l;if("start"in q&&"end"in q&&typeof q.start==="number"&&typeof q.end==="number")C=ue(t,q.start,q.end)?.replace(Dn," ");if(P=l.type==="ArrowFunctionExpression"||l.type==="FunctionExpression",l.type==="BinaryExpression")D=jt(t,l,S);else if(l.type==="ObjectExpression"||l.type==="ArrayExpression"){let{start:M,end:j}=q;D=fr(l)?ta(t,M,j,C):void 0}if(l.type==="ArrowFunctionExpression"||l.type==="FunctionExpression")D=Ci(l),C=xi(t,l)}else if(l.type==="UnaryExpression"){let q=l;if("start"in q&&"end"in q&&typeof q.start==="number"&&typeof q.end==="number")C=ue(t,q.start,q.end);D=jt(t,q,S)}else if(l.type==="LogicalExpression"||l.type==="ConditionalExpression"||l.type==="SequenceExpression"){let{start:q,end:M}=l,j=q===void 0||M===void 0?void 0:ue(t,q,M)?.replace(Zs," ");C=j!==void 0&&l.type==="SequenceExpression"?`(${j})`:j,D=jt(t,l,S)}else if(l.type==="NewExpression"){let q=l;if("start"in q&&"end"in q&&typeof q.start==="number"&&typeof q.end==="number")C=ue(t,q.start,q.end);if(q.callee&&typeof q.callee==="object"&&"type"in q.callee&&q.callee.type==="Identifier"){let M=q.callee.name;if(M==="Date")D="Date";else if(M==="Map")D="Map<any, any>";else if(M==="Set")D="Set<any>";else if(M==="WeakMap")D="WeakMap<object, any>";else if(M==="WeakSet")D="WeakSet<object>";else if(M==="Array")D="any[]";else if(M==="RegExp"||M==="Regexp")D="RegExp";else if(M==="Error")D="Error";else D=M}}else if(l.type==="CallExpression"){let q=l;if("start"in q&&"end"in q&&typeof q.start==="number"&&typeof q.end==="number")C=ue(t,q.start,q.end);let M=q.callee,j=M&&typeof M==="object"&&"type"in M&&M.type==="Identifier"?M.name:void 0;if((j==="$derived"||j==="$state")&&q.arguments.length===1&&S<5)return{...Ht(t,q.arguments[0],S+1),value:C,defaultValue:L};if(j){let O=ra(t,j);if(O)return{value:C,type:void 0,isFunction:!1,defaultValue:L,resolvedType:O};if(t.funcDecls.has(j)||ia(t,j))return{value:C,type:void 0,isFunction:!1,defaultValue:L,pendingCallDefault:{calleeName:j}};let H=t.valueImportBindingsByLocalName.get(j);if(H)return{value:C,type:void 0,isFunction:!1,defaultValue:L,pendingCallDefault:{calleeName:j,importSource:H.source,importedName:H.importedName}}}return{value:C,type:void 0,isFunction:!1,defaultValue:L,pendingCallDefault:{calleeName:j??na(t,M)}}}else if(l.type==="Identifier"){let q=l;if(S<5){let j=Ln(t,q.name);if(j){let O=Ht(t,j,S+1),H=Wt(t,q.name);return{...O,resolvedType:H?.type??O.resolvedType,resolvedDescription:H?.description??O.resolvedDescription,resolvedParams:H?.params??O.resolvedParams,resolvedReturnType:H?.returnType??O.resolvedReturnType}}if(t.funcDecls.has(q.name)){let O=Wt(t,q.name),H=t.funcDecls.get(q.name);return{value:H?xi(t,H):void 0,type:void 0,isFunction:!0,defaultValue:H?Ei(t,H):void 0,resolvedType:O?.type??aa(O,H),resolvedDescription:O?.description,resolvedParams:O?.params,resolvedReturnType:O?.returnType}}}if("start"in q&&"end"in q&&typeof q.start==="number"&&typeof q.end==="number")C=ue(t,q.start,q.end);let M=t.valueImportBindingsByLocalName.get(q.name);if(M)return{value:C,type:D,isFunction:P,defaultValue:L,pendingConstDefault:{importSource:M.source,importedName:M.importedName}}}else if(l.type==="MemberExpression"){let q=l;if("start"in q&&"end"in q&&typeof q.start==="number"&&typeof q.end==="number")C=ue(t,q.start,q.end);if(ma(l))D="number";let M=ne(t,l);if(M)return{value:C,type:D,isFunction:P,defaultValue:L,pendingConstDefault:{importSource:M.source,importedName:M.importedName,...M.members?{members:M.members}:{}}}}else if(l.type==="TemplateLiteral"){let q=l;if("start"in q&&"end"in q&&typeof q.start==="number"&&typeof q.end==="number")C=ue(t,q.start,q.end);D="string"}else if("raw"in l&&typeof l.raw==="string")C=l.raw,D=ln(l);return{value:C,type:D,isFunction:P,defaultValue:L}}function ln(t){if("regex"in t&&t.regex)return"RegExp";if("bigint"in t&&t.bigint)return"bigint";return t.value==null?void 0:typeof t.value}var Qs=new Set(["-","*","/","%","**","<<",">>",">>>","&","|","^"]),ea=new Set(["==","!=","===","!==","<","<=",">",">=","in","instanceof"]);function jt(t,l,S){if(!l||typeof l!=="object"||!("type"in l))return;switch(l.type){case"UnaryExpression":{let C=l;if(C.operator==="!"||C.operator==="delete")return"boolean";if(C.operator==="typeof")return"string";if(C.operator==="void")return;if(C.operator==="+")return"number";return jt(t,C.argument,S)==="bigint"?"bigint":"number"}case"BinaryExpression":{let C=l;if(ea.has(C.operator))return"boolean";let D=jt(t,C.left,S),P=jt(t,C.right,S);if(D==="bigint"&&P==="bigint")return"bigint";if(Qs.has(C.operator))return"number";if(C.operator!=="+")return;if(D==="string"||P==="string")return"string";if(D==="number"&&P==="number")return"number";return}case"LogicalExpression":{let C=l;return Si([jt(t,C.left,S),jt(t,C.right,S)])}case"ConditionalExpression":{let C=l;return Si([jt(t,C.consequent,S),jt(t,C.alternate,S)])}case"SequenceExpression":{let C=l.expressions;return jt(t,C[C.length-1],S)}case"Identifier":{let C=l.name;if(C==="NaN"||C==="Infinity")return"number";if(C==="undefined")return;let D=Gt(t,C)?.type;if(D)return D;if(S>=5)return;return jt(t,Ln(t,C),S+1)}default:{if(S>=5)return;let C=Ht(t,l,S+1);return C.type??C.resolvedType}}}function Si(t){let l=new Set;for(let S of t){if(S===void 0)return;l.add(S.includes("=>")?`(${S})`:S)}return l.size===1?t[0]:[...l].join(" | ")}function ta(t,l,S,C){if(C===void 0||l===void 0||S===void 0)return C;let D=t.parsed?.comments??[],P="",L=l;for(let q of D){if(q.start<l||q.end>S)continue;P+=ue(t,L,q.start)??"",L=q.end}if(L===l)return C;return P+=ue(t,L,S)??"",P.replace(Dn," ")}function fr(t){if(!t||typeof t!=="object"||!("type"in t))return!1;switch(t.type){case"Literal":return!(("regex"in t)&&t.regex);case"TemplateLiteral":return t.expressions.length===0;case"Identifier":return t.name==="undefined";case"UnaryExpression":{let l=t,S=l.argument;return l.operator==="-"&&S?.type==="Literal"&&(typeof S.value==="number"||typeof S.value==="bigint")}case"ArrayExpression":return t.elements.every((l)=>l!==null&&fr(l));case"ObjectExpression":return t.properties.every((l)=>l.type==="Property"&&l.kind==="init"&&!l.computed&&!l.method&&!l.shorthand&&(l.key.type==="Identifier"||l.key.type==="Literal")&&fr(l.value));default:return!1}}function Nn(t,l){let S=Ln(t,l);if(!S||typeof S!=="object"||!("type"in S))return;if(S.type==="CallExpression"){let C=S,D=Mt(t,C.callee);if(D==="$state"||D==="$state.raw"||D==="$derived"){let P=C.typeArguments?.params[0];if(P)return Pe(t,P),Mt(t,P);if(D==="$state.raw")return Ht(t,C.arguments[0],1).type}}return Ht(t,S).type}function Ln(t,l){for(let S of t.vars)for(let C of S.declarations)if(C.id&&typeof C.id==="object"&&"type"in C.id&&C.id.type==="Identifier"&&"name"in C.id&&C.id.name===l&&C.init)return C.init;return}function Qt(t,l){for(let S of t.vars){if(S.kind!=="const")continue;for(let C of S.declarations)if(C.id&&typeof C.id==="object"&&"type"in C.id&&C.id.type==="Identifier"&&"name"in C.id&&C.id.name===l&&C.init)return C.init}return}function na(t,l){if(l&&typeof l==="object"&&"start"in l&&"end"in l&&typeof l.start==="number"&&typeof l.end==="number")return ue(t,l.start,l.end)??"call";return"call"}function ra(t,l){let S=Wt(t,l);if(S?.returnType)return S.returnType;let C=t.funcDecls.get(l)??ki(t,l);if(!C)return;let D=sa(t,C);if(D)return D;let P=oa(t,l);if(P)return P;let L=Di(C);return L==="any"?void 0:L}function ia(t,l){return ki(t,l)!==void 0}function ki(t,l){let S=Ln(t,l);if(!S||typeof S!=="object"||!("type"in S))return;if(S.type==="ArrowFunctionExpression"||S.type==="FunctionExpression")return S;return}function oa(t,l){for(let S of t.vars)for(let C of S.declarations){let D=C.id;if(!D||typeof D!=="object"||!("type"in D)||D.type!=="Identifier"||!("name"in D)||D.name!==l)continue;let P=D.typeAnnotation?.typeAnnotation;if(!P)return;return Y(ue(t,P.start,P.end))}return}function sa(t,l){let S=l.returnType?.typeAnnotation;if(!S)return;return ue(t,S.start,S.end)}function aa(t,l){let S=t?.returnType??"any",C=t?.params;if(C&&C.length>0)return`(${E(C)}) => ${S}`;if(t?.returnType)return`() => ${S}`;if(l)return Ci(l);return"(...args: any[]) => any"}function Ci(t){return`(${la(t)}) => ${Di(t)}`}function la(t){let l=t.params;if(!Array.isArray(l)||l.length===0)return"...args: any[]";let S=[];for(let C of l)if(C&&typeof C==="object"&&"type"in C&&C.type==="Identifier"&&"name"in C&&typeof C.name==="string")S.push(`${C.name}: any`);else return"...args: any[]";return S.join(", ")}function Di(t){if(t.async||t.generator)return"any";let l=t.body,S;if(l&&typeof l==="object"&&"type"in l&&l.type==="BlockStatement"){if(S=ca(l),S.length===0)return"any"}else S=[l];let C=null;for(let D of S){let P=pa(D);if(!P)return"any";if(C===null)C=P;else if(C!==P)return"any"}return C??"any"}function ca(t){let l=[];return mr(t,l),l}function mr(t,l){if(!t||typeof t!=="object")return;let S=t;if(typeof S.type!=="string")return;if(S.type==="FunctionDeclaration"||S.type==="FunctionExpression"||S.type==="ArrowFunctionExpression")return;if(S.type==="ReturnStatement")l.push(S.argument??null);for(let C in S){if(C==="leadingComments")continue;let D=S[C];if(!D||typeof D!=="object")continue;if(Array.isArray(D))for(let P=0;P<D.length;P++)mr(D[P],l);else mr(D,l)}}function pa(t){if(!t||typeof t!=="object"||!("type"in t))return null;switch(t.type){case"Literal":{let l=t.value;if(typeof l==="string")return"string";if(typeof l==="number")return"number";if(typeof l==="boolean")return"boolean";return null}case"TemplateLiteral":return"string";case"CallExpression":{let l=t.callee;if(l&&typeof l==="object"&&"type"in l&&l.type==="Identifier"){let S=l.name;if(S==="String")return"string";if(S==="Number")return"number";if(S==="Boolean")return"boolean"}return null}default:return null}}function wi(t){if(d(t,"$bindable"))return{init:t.arguments[0],bindable:!0};return{init:t,bindable:!1}}function ua(t,l){let S=l.params;if(!Array.isArray(S)||S.length===0)return"";let C=S[0],D=S[S.length-1];if(typeof C.start!=="number"||typeof D.end!=="number")return"";return ue(t,C.start,D.end)??""}function xi(t,l){if(l.generator)return;let S=l.body;if(!S||typeof S!=="object"||!("type"in S))return;let C=ua(t,l),D=l.async?"async ":"",P=(q,M)=>q&&typeof q==="object"&&("type"in q)&&q.type==="ObjectExpression"?`(${M})`:M;if(S.type!=="BlockStatement"){let q=Mt(t,S);return q===void 0?void 0:`${D}(${C}) => ${P(S,q)}`}let L=S.body;if(L.length===0)return`${D}(${C}) => {}`;if(L.length===1){let q=L[0];if(q&&typeof q==="object"&&"type"in q&&q.type==="ReturnStatement"){let M=q.argument;if(M){let j=Mt(t,M);if(j!==void 0)return`${D}(${C}) => ${P(M,j)}`}}}return}function Ei(t,l){let S=Mt(t,l);if(!S||!l||typeof l!=="object"||!("type"in l))return;let C="expression";if(l.type==="Literal"||l.type==="UnaryExpression")C="literal";else if(l.type==="TemplateLiteral")C=l.expressions.length===0?"literal":"expression";else if(l.type==="ArrayExpression")C="array";else if(l.type==="ObjectExpression")C="object";else if(l.type==="ArrowFunctionExpression"||l.type==="FunctionExpression"||l.type==="FunctionDeclaration")C="function";let D={raw:S,kind:C};if(C==="literal"||C==="array"||C==="object"){let P=gr(l);if(P.ok)D.value=P.value}return D}function gr(t){if(!t||typeof t!=="object"||!("type"in t))return{ok:!1};if(t.type==="Literal"){let l=t.value;return typeof l==="bigint"||"regex"in t?{ok:!1}:{ok:!0,value:l}}if(t.type==="UnaryExpression"){let l=t,S=l.argument;if(!S||typeof S!=="object"||!("type"in S)||S.type!=="Literal")return{ok:!1};let C=S.value;if(typeof C==="number"){if(l.operator==="-")return{ok:!0,value:-C};if(l.operator==="+")return{ok:!0,value:C}}if(typeof C==="boolean"&&l.operator==="!")return{ok:!0,value:!C};return{ok:!1}}if(t.type==="TemplateLiteral"){let l=t;if(l.expressions.length>0||l.quasis.length!==1)return{ok:!1};return{ok:!0,value:l.quasis[0].value.cooked??l.quasis[0].value.raw}}if(t.type==="ArrayExpression"){let l=t,S=[];for(let C of l.elements){if(!C)return{ok:!1};let D=gr(C);if(!D.ok)return{ok:!1};S.push(D.value)}return{ok:!0,value:S}}if(t.type==="ObjectExpression"){let l=t,S={};for(let C of l.properties){if(C.type!=="Property"||C.computed)return{ok:!1};let D=o(C.key);if(!D)return{ok:!1};let P=gr(C.value);if(!P.ok)return{ok:!1};S[D]=P.value}return{ok:!0,value:S}}return{ok:!1}}var da=new Set(["POSITIVE_INFINITY","NEGATIVE_INFINITY","MAX_VALUE","MIN_VALUE","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","EPSILON","NaN"]),fa=new Set(["PI","E","LN2","LN10","LOG2E","LOG10E","SQRT2","SQRT1_2"]);function ma(t){if(!t||typeof t!=="object"||!("type"in t))return!1;if(t.type!=="MemberExpression")return!1;let l=t,S=l.object&&"name"in l.object?l.object.name:void 0,C=l.property&&"name"in l.property?l.property.name:void 0;if(!S||!C)return!1;if(S==="Number")return da.has(C);if(S==="Math")return fa.has(C);return!1}function At(t,l,S){if(!l||t.has(l))return;t.set(l,S)}function cn(t,l){for(let S=t.activeScopes.length-1;S>=0;S-=1){let C=t.activeScopes[S]?.get(l);if(!C)continue;return C.kind==="prop"?C.publicPropName:void 0}return}function pn(t,l){for(let S=t.activeScopes.length-1;S>=0;S-=1){let C=t.activeScopes[S];if(C===t.componentScope)return!1;if(C?.has(l))return!0}return!1}function qn(t,l){let S=l;while(A(S))S=S.object;return n(S)&&pn(t,S.name)}function de(t,l=new Set){if(!t||typeof t!=="object"||!("type"in t))return l;switch(t.type){case"Identifier":l.add(t.name);break;case"AssignmentPattern":de(t.left,l);break;case"ArrayPattern":for(let S of t.elements)de(S??void 0,l);break;case"ObjectPattern":for(let S of t.properties)if(S.type==="Property")de(S.value,l);else if(S.type==="RestElement")de(S.argument,l);break;case"RestElement":de(t.argument,l);break}return l}function hr(t,l){if(!l||typeof l!=="object"||!("type"in l))return;if(l.type==="Identifier"){let C=cn(t,l.name);if(C)t.reactive_vars.add(C);return}let S=de(l);for(let C of S){let D=cn(t,C);if(D)t.reactive_vars.add(D)}}function un(t){if(!t||typeof t!=="object"||!("type"in t))return!1;switch(String(t.type)){case"BlockStatement":case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"CatchClause":case"EachBlock":case"AwaitBlock":return!0;default:return!1}}function Pi(t){if(!t||typeof t!=="object"||!("type"in t))return!1;let l=String(t.type);return l==="FunctionDeclaration"||l==="FunctionExpression"||l==="ArrowFunctionExpression"}function ga(t,l){let S=t.scopeDeclarations.get(l);if(!S)S=new Map,t.scopeDeclarations.set(l,S);return S}function ya(t){let l=[];if(t.id.type==="Identifier")return l.push({kind:"local",name:t.id.name}),l;if(t.id.type!=="ObjectPattern")return l;for(let S of t.id.properties){if(S.type==="RestElement"){if(S.argument.type==="Identifier")l.push({kind:"local",name:S.argument.name});continue}if(S.computed)continue;let C=o(S.key);if(!C)continue;let D;if(S.value.type==="Identifier")D=S.value.name;else if(S.value.type==="AssignmentPattern"&&S.value.left.type==="Identifier")D=S.value.left.name;if(!D)continue;l.push({kind:"prop",name:D,publicPropName:C})}return l}function yr(t,l,S,C){if(!_e(t))return;let D=C?.allowRunesProps??!1,P=C?.forceProp??!1,L=t;for(let q of L.declarations){if(D&&d(m(q.init),"$props")){for(let O of ya(q))At(O.kind==="prop"?l:S,O.name,O.kind==="prop"?{kind:"prop",publicPropName:O.publicPropName}:{kind:"local"});continue}let M=L.kind==="var"?S:l,j=P?"prop":"local";for(let O of de(q.id))At(M,O,j==="prop"?{kind:"prop",publicPropName:O}:{kind:"local"})}}function ha(t,l){if("id"in t&&t.id&&typeof t.id==="object"&&"name"in t.id&&typeof t.id.name==="string")At(l,t.id.name,{kind:"local"});for(let S of t.params){let C=S.type==="TSParameterProperty"?S.parameter:S;for(let D of de(C))At(l,D,{kind:"local"})}}function ba(t,l,S){if(!Array.isArray(t))return;for(let C of t){if(!C||typeof C!=="object"||!("type"in C))continue;switch(C.type){case"VariableDeclaration":yr(C,l,S);break;case"FunctionDeclaration":if(C.id?.name)At(l,C.id.name,{kind:"local"});break;case"ClassDeclaration":if(C.id?.name)At(l,C.id.name,{kind:"local"});break}}}function va(t,l){for(let{local:S,exported:C}of l){if(S.type!=="Identifier")continue;let D=C.type==="Identifier"?C.name:String(C.value);if(t.componentScope.get(S.name)?.kind==="prop")continue;t.componentScope.set(S.name,{kind:"prop",publicPropName:D})}}function Ta(t,l){for(let S of l?.content.body??[])switch(S.type){case"ImportDeclaration":for(let C of S.specifiers)if(C.local.name)At(t.componentScope,C.local.name,{kind:"local"});break;case"VariableDeclaration":yr(S,t.componentScope,t.componentScope,{allowRunesProps:!0});break;case"FunctionDeclaration":if(S.id?.name)At(t.componentScope,S.id.name,{kind:"local"});break;case"ClassDeclaration":if(S.id?.name)At(t.componentScope,S.id.name,{kind:"local"});break;case"ExportNamedDeclaration":if(!S.declaration){if(S.source==null)va(t,S.specifiers);break}if(S.declaration.type==="VariableDeclaration")yr(S.declaration,t.componentScope,t.componentScope,{forceProp:!0});else if(S.declaration.type==="FunctionDeclaration"&&S.declaration.id?.name)At(t.componentScope,S.declaration.id.name,{kind:"prop",publicPropName:S.declaration.id.name});break}}function Ai(t){t.componentScope.clear(),t.scopeDeclarations=new Map,t.activeScopes.length=0,Ta(t,t.parsed?.instance)}function Ni(t){return{varScopeStack:[t.componentScope]}}function Li(t,l,S){if(!un(S))return;let C=ga(t,S),D=l.varScopeStack[l.varScopeStack.length-1]??t.componentScope;switch(S.type){case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":ha(S,C);break;case"BlockStatement":ba(S.body,C,D);break;case"CatchClause":for(let P of de(S.param))At(C,P,{kind:"local"});break;case"EachBlock":for(let P of de(S.context))At(C,P,{kind:"local"});if(typeof S.index==="string")At(C,S.index,{kind:"local"});break;case"AwaitBlock":for(let P of de(S.value))At(C,P,{kind:"local"});for(let P of de(S.error))At(C,P,{kind:"local"});break}if(Pi(S))l.varScopeStack.push(C);return C}function qi(t,l){if(Pi(l))t.varScopeStack.pop()}function br(t,l){let S=Gt(t,l);if(S&&S.type===t.explicitVariableTypesByName.get(l))Pe(t,t.explicitVariableTypeNodesByName.get(l));return S}function Mn(t,l,S=!0){let C=br(t,l);if(C||!S)return C;let D=Nn(t,l);return D?{type:D,...Ti(t,l)}:null}function Sa(t,l,S){if(!n(l))return null;let C=Qt(t,l.name);if(p(C))return _i(t,C,S).properties;let D=Mn(t,l.name);return D?$t(D.type):null}function xa(t,l){return t.properties.some((S)=>S.type==="Property"&&S.kind==="get"&&o(S.key)===l)}function Mi(t,l,S){if(!l||typeof l!=="object"||!(S in l))return;let C=l[S];if(!C||typeof C!=="object"||!("typeAnnotation"in C))return;return Mt(t,C.typeAnnotation)}function Ea(t){let l=t?.body.body;if(l?.length!==1||l[0].type!=="ReturnStatement")return;return l[0].argument??void 0}function ka(t,l,S,C,D){if(n(D)){let P=Mn(t,D.name);if(P)return P;return ce(t,"context-any-type",S,`Context "${l}" property "${S}" has no type annotation; defaulted to "any".`,le(t,C)),{type:"any"}}if(D?.type==="ArrowFunctionExpression"||D?.type==="FunctionExpression")return{type:`(${D.params.map((L)=>`${n(L)?L.name||"arg":"arg"}: any`).join(", ")}) => any`};if(w(D))return{type:ln(D)??"null"};return{type:"any"}}function _i(t,l,S){let C=[],D=!1;for(let P of l.properties){if(P.type==="SpreadElement"){let O=Sa(t,P.argument,S);if(O)C.push(...O);else D=!0,ce(t,"spread-unresolved",S,`Context "${S}" spreads a value sveld can't resolve; its shape is widened to "Record<string, any>".`,le(t,P));continue}if(P.type!=="Property")continue;let L=o(P.key);if(!L)continue;if(P.kind==="set"&&xa(l,L))continue;let q=P.kind==="get"||P.kind==="set"?P.value:void 0,M=q?P.kind==="get"?Mi(t,q,"returnType"):Mi(t,q.params[0],"typeAnnotation"):void 0,j=M?{type:M}:ka(t,S,L,P,P.kind==="get"?Ea(q):P.kind==="set"?void 0:P.value);C.push({name:L,type:j.type,description:j.description,optional:!1,...j.internal?{internal:!0}:{}})}return{properties:C,hasUnresolvedSpread:D}}function Ri(t,l,S){let{properties:C,hasUnresolvedSpread:D}=_i(t,l,S);return{key:S,typeName:N(S),properties:C,description:void 0,...D?{hasUnresolvedSpread:D}:{}}}function Ii(t,l,S){if(p(l))return Ri(t,l,S);else if(n(l)){let C=l.name,D=Mn(t,C,!1),P=D?void 0:Qt(t,C);if(p(P))return Ri(t,P,S);let L=D??Mn(t,C);if(L){let q=$t(L.type);return{key:S,typeName:N(S),...q?{}:{type:L.type},properties:q??[],description:L.description,...L.internal?{internal:!0}:{}}}return ce(t,"context-any-type",C,`Context "${S}" variable "${C}" has no type annotation; defaulted to "any".`,le(t,l)),{key:S,typeName:N(S),type:"any",properties:[]}}return null}function ji(t){let l=t.callee;if(!l||typeof l!=="object"||!("type"in l))return null;let S=l.type==="Identifier"&&l.name==="Symbol",C=l.type==="MemberExpression"&&!l.computed&&l.object.type==="Identifier"&&l.object.name==="Symbol"&&l.property.type==="Identifier"&&l.property.name==="for";if(!S&&!C)return null;let D=t.arguments[0];if(!D||typeof D!=="object"||!("type"in D))return"";if(D.type==="Literal"&&typeof D.value==="string")return D.value;if(D.type==="TemplateLiteral"&&D.quasis?.length===1)return D.quasis[0].value.cooked??"";return""}function Fi(t){return{kind:"pending",importSource:t.source,importedName:t.importedName,...t.members?{members:t.members}:{}}}function Oi(t,l,S=0){if(!l||typeof l!=="object"||!("type"in l))return{kind:"unresolved"};let C=l;if(C.type==="Literal"||C.type==="TemplateLiteral"){let D=x(C);return D==null?{kind:"unresolved"}:{kind:"resolved",key:D}}if(C.type==="CallExpression"||C.type==="NewExpression"){let D=ji(C);return D==null?{kind:"unresolved"}:{kind:"resolved",key:D}}if(C.type==="Identifier"){if(S>=5)return{kind:"unresolved"};let D=Qt(t,C.name);if(D&&typeof D==="object"&&"type"in D){let L=D;if((L.type==="CallExpression"||L.type==="NewExpression")&&ji(L)==="")return{kind:"resolved",key:C.name};return Oi(t,L,S+1)}let P=S===0&&pn(t,C.name)?void 0:t.valueImportBindingsByLocalName.get(C.name);return P?Fi(P):{kind:"unresolved"}}if(C.type==="MemberExpression"){let D=S===0&&qn(t,C)?void 0:ne(t,C);if(D)return Fi(D)}return{kind:"unresolved"}}function Bi(t,l,S,C,D){let P=Mt(t,C)??"";ce(t,"context-value-unresolved",l,`setContext(${S}, ${P}): the value isn't an object literal or a variable, so sveld can't describe its shape; the context is skipped.`,D)}function $i(t,l){if(!l||typeof l!=="object"||!("type"in l)||l.type!=="CallExpression")return;let S=l,C=S.arguments[0];if(!C)return;let D=Oi(t,C);if(D.kind==="unresolved"||D.kind==="resolved"&&!D.key){let j=Mt(t,C)??"";ce(t,"context-key-unresolved",j,`setContext key \`${j}\` isn't a string literal, const-bound string, Symbol(), or imported \`export const\` string; the context is skipped.`,le(t,l));return}let P=S.arguments[1];if(!P)return;let L=le(t,l);if(D.kind==="pending"){let j=te(D),O=Ii(t,P,j);if(O)t.pendingContextKeyCandidates.push({importSource:D.importSource,importedName:D.importedName,...D.members?{members:D.members}:{},...O.type===void 0?{}:{type:O.type},properties:O.properties,description:O.description,...O.hasUnresolvedSpread?{hasUnresolvedSpread:!0}:{},...O.internal?{internal:!0}:{},source:L});else Bi(t,j,j,P,L);return}let q=D.key,M=Ii(t,P,q);if(!M){Bi(t,q,JSON.stringify(q),P,L);return}if(t.contexts.has(q)){ce(t,"context-duplicate-key",q,`setContext("${q}", ...) was called more than once; only the first call's shape is used.`,L);return}t.contexts.set(q,{...M,source:L})}var Ca=/\n/g,Da=/^[A-Za-z_$][\w$]*$/;function vr(t,l){return{variableType:(S)=>{if(l?.has(S))return;return br(t,S)?.type??Nn(t,S)}}}function dn(t,l,S){if(!l||typeof l!=="object"||!("type"in l))return S;if(n(l)){if(!pn(t,l.name))return S;let D=S??new Set;return D.add(l.name),D}let C=S;if(p(l)){for(let D of l.properties)if(D.type==="Property")C=dn(t,D.value,C)}else if(l.type==="ArrayExpression")for(let D of l.elements)C=dn(t,D,C);return C}function Tr(t,l){if(n(l))return t.variableType(l.name);return _t(t,l)}function _t(t,l){if(!l||typeof l!=="object"||!("type"in l))return;if(p(l))return Hi(t,l);if(l.type==="ArrayExpression")return zi(t,l);return}function Vi(t,l){if(!l||typeof l!=="object"||!("type"in l))return"any";if(n(l))return t.variableType(l.name)??"any";if(w(l))return ln(l)??"null";if(p(l))return Hi(t,l);if(l.type==="ArrayExpression")return zi(t,l);return"any"}function Hi(t,l){if(l.properties.length===0)return"Record<string, never>";let S=[],C=!1;for(let D of l.properties){let P=D.type==="Property"&&!D.computed?o(D.key):void 0;if(D.type!=="Property"||!P){C=!0;continue}S.push({name:P,type:Vi(t,D.value)})}if(!C)return fn(S);if(S.length===0)return"Record<string, any>";return fn([...S,{name:"[key: string]",type:"any"}])}function zi(t,l){let S=new Set(l.elements.filter((C)=>C!=null).map((C)=>Vi(t,C)));if(S.size===0)return"any[]";if(S.size===1)return`${[...S][0]}[]`;return`(${[...S].join(" | ")})[]`}function Gi(t,l){for(let[S,C]of t.arguments.entries()){if(n(C)&&C.name===l)return{argumentIndex:S};if(!p(C))continue;for(let D of C.properties){if(D.type!=="Property"||!n(D.value))continue;if(D.value.name!==l)continue;let P=!D.computed&&n(D.key)?D.key.name:void 0;return{argumentIndex:S,property:P??""}}}return}function he(t){return typeof t==="string"?JSON.stringify(t):String(t)}function Ut(t,{name:l,detail:S,has_argument:C,description:D,deprecated:P,tags:L,internal:q,source:M}){if(l===void 0)return;let j=!C&&!S?"null":a(S),O=D,H=t.events.get(l);if(H?.type==="forwarded")t.events.set(l,{type:"dispatched",name:l,detail:j,description:O||H.description,deprecated:P??H.deprecated,tags:L??H.tags,...q||H.internal?{internal:!0}:{},source:M||H.source});else if(H){let z=H.tags??L,K=t.untypedJsDocEventNames.delete(l);t.events.set(l,{...H,detail:H.detail===void 0||K?j:H.detail,description:H.description||O,deprecated:H.deprecated??P,tags:z,...H.internal||q?{internal:!0}:{},source:M||H.source})}else t.events.set(l,{type:"dispatched",name:l,detail:j,description:O,deprecated:P,tags:L,...q?{internal:!0}:{},source:M})}function Wi(t,l){let S=l.arguments[0],C=ge(S,"CustomEvent");if(!C&&!ge(S,"Event"))return;let D=S.arguments[0],P=w(D)?D.value:void 0;if(P==null)return;let L=C?S.arguments[1]:void 0,q=!1,M;if(p(L)){let j=L.properties.find((O)=>O.type==="Property"&&n(O.key)&&O.key.name==="detail");if(j?.type==="Property")q=!0,M=j.value}return{name:String(P),detail:M,hasArgument:q,nestedBoundNames:dn(t,M),source:le(t,l)}}function Ui(t,l){let S=Tr(vr(t,l.nestedBoundNames),l.detail),C=S===void 0&&w(l.detail)?l.detail.value:void 0;Ut(t,{name:l.name,detail:S??(C==null?"":he(C)),has_argument:l.hasArgument,source:l.source})}function fn(t,l,S=!1){if(t.length===0)return"null";let C=t.map(({name:D,type:P,description:L,optional:q,default:M})=>{let j=q?"?":"",O=Da.test(D)||D.startsWith("[")?D:JSON.stringify(D),H=L||"";if(M&&H)H=`${H} @default ${M}`;else if(M)H=`@default ${M}`;if(H=g(H),H){if(S)return`${H.includes(`
|
|
11
|
+
`)?`/**
|
|
12
|
+
${H.split(`
|
|
13
|
+
`).map((K)=>K?` * ${K}`:" *").join(`
|
|
14
|
+
`)}
|
|
15
|
+
*/`:`/** ${H} */`}
|
|
16
|
+
${O}${j}: ${P};`;return`/** ${H.replace(Ca," ")} */ ${O}${j}: ${P};`}return`${O}${j}: ${P};`}).join(S?`
|
|
17
|
+
`:" ");return S?`{
|
|
18
|
+
${C}
|
|
19
|
+
}`:`{ ${C} }`}var Sr=new Set("abstract accessor arguments as asserts async await break case catch class const continue debugger declare default delete do else enum eval export extends false finally for function get global if implements import in infer instanceof interface intrinsic is keyof let module namespace new null of out override package private protected public readonly return satisfies set static super switch this throw true try type typeof unique var void while with yield".split(" ")),wa=new Set("any bigint boolean false never null number object string symbol true undefined unknown void".split(" ")),Pa=new Set("get set new readonly static public private protected".split(" "));function Ki(t){return t>=97&&t<=122||t>=65&&t<=90||t===95||t===36}function Rn(t){return t>=48&&t<=57}function Ji(t){return Ki(t)||Rn(t)}class Xi{text;pos=0;constructor(t){this.text=t}readAll(){if(!this.type())return!1;return this.peek(),this.pos===this.text.length}peek(){let t=this.text,l=this.pos,S=t.charCodeAt(l);while(S===32||S===9)S=t.charCodeAt(++l);return this.pos=l,S}eat(t){if(this.peek()!==t.charCodeAt(0))return!1;return this.pos++,!0}word(){if(!Ki(this.peek()))return;let t=this.pos,l=t+1;while(Ji(this.text.charCodeAt(l)))l++;return this.pos=l,this.text.slice(t,l)}name(){let t=this.word();return t!==void 0&&!Sr.has(t)}string(){let t=this.peek();if(t!==34&&t!==39)return!1;let l=this.text;for(let S=this.pos+1;S<l.length;S++){let C=l.charCodeAt(S);if(C===t)return this.pos=S+1,!0;if(C===92||C===10||C===13||C===8232||C===8233)return!1}return!1}number(){let t=this.text,l=this.pos;if(t.charCodeAt(l)===45)l++;let S=l;while(Rn(t.charCodeAt(l)))l++;if(l===S||l-S>1&&t.charCodeAt(S)===48)return!1;if(t.charCodeAt(l)===46){let D=++l;while(Rn(t.charCodeAt(l)))l++;if(l===D)return!1}let C=t.charCodeAt(l);if(Ji(C)||C===46)return!1;return this.pos=l,!0}type(){if(this.peek()===40){let t=this.pos;if(this.functionType())return!0;this.pos=t}do do if(!this.operatorType())return!1;while(this.eat("&"));while(this.eat("|"));return!0}operatorType(){let t=this.pos;if(this.word()==="keyof")return this.operatorType();if(this.pos=t,!this.primaryType())return!1;while(this.eat("[")){if(this.eat("]"))continue;if(!this.type()||!this.eat("]"))return!1}return!0}primaryType(){let t=this.peek();if(t===40)return this.pos++,this.type()&&this.eat(")");if(t===123)return this.objectType();if(t===91)return this.tupleType();if(t===34||t===39)return this.string();if(t===45||Rn(t))return this.number();let l=this.word();if(l===void 0)return!1;if(l==="typeof")return this.typeQuery();if(l==="import")return this.importType(!0);if(wa.has(l)){let S=this.peek();return S!==46&&S!==60}if(Sr.has(l))return!1;while(this.eat("."))if(this.word()===void 0)return!1;return!this.eat("<")||this.typeArguments()}typeArguments(){do if(!this.type())return!1;while(this.eat(","));return this.eat(">")}typeQuery(){let t=this.pos;if(this.word()==="import")return this.importType(!1);this.pos=t;do if(!this.name())return!1;while(this.eat("."));return!0}importType(t){if(!this.eat("(")||!this.string()||!this.eat(")"))return!1;while(this.eat("."))if(!this.name())return!1;return!t||!this.eat("<")||this.typeArguments()}objectType(){this.pos++;while(!this.eat("}")){if(!this.typeMember())return!1;if(!this.eat(";")&&!this.eat(",")&&this.peek()!==125)return!1}return!0}typeMember(){let t=this.peek();if(this.eat("[")){let l=this.peek();if(l===34||l===39){if(!this.string()||!this.eat("]"))return!1}else return this.name()&&this.eat(":")&&this.type()&&this.eat("]")&&this.eat(":")&&this.type()}else if(t===34||t===39){if(!this.string())return!1}else{let l=this.word();if(l===void 0||Pa.has(l))return!1}return this.eat("?"),this.eat(":")&&this.type()}tupleType(){if(this.pos++,this.eat("]"))return!0;do if(!this.type())return!1;while(this.eat(","));return this.eat("]")}functionType(){if(this.pos++,!this.eat(")")){let t=new Set;for(;;){this.peek();let l=this.text.startsWith("...",this.pos);if(l)this.pos+=3;let S=this.word();if(S===void 0||Sr.has(S)||t.has(S))return!1;if(t.add(S),!l)this.eat("?");if(!this.eat(":")||!this.type())return!1;if(l||!this.eat(","))break}if(!this.eat(")"))return!1}if(this.peek(),!this.text.startsWith("=>",this.pos))return!1;return this.pos+=2,this.type()}}function Aa(t){return new Xi(t).readAll()}var Na=r.extend(re);function In(t,l={}){return Aa(t)||La(t,l.inline??!1)}function La(t,l){let S=!1,C=new Na(l?{ecmaVersion:16,sourceType:"module",onComment:(D,P,L,q)=>{if(!D&&q===t.length)S=!0}}:{ecmaVersion:16,sourceType:"module"},t);try{return C.parseWholeType(),!S}catch(D){if(D instanceof SyntaxError)return!1;throw D}}var Yi={li:["li"],dt:["dt","dd"],dd:["dt","dd"],p:"address article aside blockquote div dl fieldset footer form h1 h2 h3 h4 h5 h6 header hgroup hr main menu nav ol p pre section table ul".split(" "),rt:["rt","rp"],rp:["rt","rp"],optgroup:["optgroup"],option:["option","optgroup"],thead:["tbody","tfoot"],tbody:["tbody","tfoot"],tfoot:["tbody"],tr:["tr","tbody"],td:["td","th","tr"],th:["td","th","tr"]};function qa(t,l){return Object.hasOwn(Yi,t)&&Yi[t].includes(l)}var bo=new Set("arguments await break case catch class const continue debugger default delete do else enum eval export extends false finally for function if implements import in instanceof interface let new null package private protected public return static super switch this throw true try typeof var void while with yield".split(" ")),xr=/<!--[\s\S]*?-->|<script\s+(?:[^>]*|(?:[^=>'"/]+=(?:"[^"]*"|'[^']*'|[^>\s]+)\s+)*)lang=(["'])?([^"' >]+)\1[^>]*>/y,Ma=/\r(?!\n)|[\u2028\u2029]/;function Yt(t){if(t===32||t<=13&&t>=9)return!0;if(t<160)return!1;return t===160||t===5760||t>=8192&&t<=8202||t===8232||t===8233||t===8239||t===8287||t===12288||t===65279}function gn(t,l){let S=l;while(S<t.length&&Yt(t.charCodeAt(S)))S++;return S}function Cr(t,l){let S=t.codePointAt(l);if(S===void 0||!f(S,!0))return l;let C=l+(S<=65535?1:2),D=t.codePointAt(C);while(D!==void 0&&y(D,!0))C+=D<=65535?1:2,D=t.codePointAt(C);return C}function Ra(t){let l=t.indexOf("<");while(l!==-1){let S=t.charCodeAt(l+1);if(S===33||S===115){xr.lastIndex=l;let C=xr.exec(t);if(C){if(S===115)return C[2]==="ts";l=t.indexOf("<",xr.lastIndex);continue}}l=t.indexOf("<",l+1)}return!1}class vo{source;index=0;loc;lfOnly;isTypeScript;css;root;stack;fragments;metaTags=new Set;lastAutoClosedTag;nextAngle=-1;nextBrace=-1;constructor(t,l,S={}){this.source=t,this.loc=S.loc??!1,this.lfOnly=this.loc&&!Ma.test(t),this.isTypeScript=Ra(t),this.css=S.css??!0,this.root={type:"Root",start:0,end:l,css:null,js:[],options:null,fragment:{type:"Fragment",nodes:[]},comments:[]},this.stack=[this.root],this.fragments=[this.root.fragment]}match(t){if(t.length===1)return this.source.charCodeAt(this.index)===t.charCodeAt(0);return this.source.startsWith(t,this.index)}matchRegex(t){return t.lastIndex=this.index,t.exec(this.source)?.[0]??null}eat(t,l=!1){if(this.match(t))return this.index+=t.length,!0;if(l)k(this.index,t);return!1}read(t){let l=this.matchRegex(t);if(l)this.index+=l.length;return l}readUntil(t){if(this.index>=this.source.length)u(this.source.length);let l=this.source.indexOf(t,this.index),S=l===-1?this.source.length:l,C=this.source.slice(this.index,S);return this.index=S,C}allowWhitespace(){this.index=gn(this.source,this.index)}requireWhitespace(){if(!Yt(this.source.charCodeAt(this.index)))Ke(this.index);this.allowWhitespace()}eatClosingBrace(){this.allowWhitespace(),this.eat("}",!0)}sourceLocation(t,l){return this.loc?{start:b(t),end:b(l)}:void 0}readIdentifierName(){let t=this.index,l=Cr(this.source,t),S=this.source.slice(t,l);if(this.index=l,bo.has(S))bt(t,S);let C={type:"Identifier",name:S,start:t,end:l};if(this.loc)C.loc=this.sourceLocation(t,l);return C}current(){return this.stack[this.stack.length-1]}append(t){this.fragments[this.fragments.length-1].nodes.push(t)}open(t,l){this.append(t),this.stack.push(t),this.fragments.push(l)}setFragment(t){this.fragments[this.fragments.length-1]=t}close(){this.stack.pop(),this.fragments.pop()}}var Ia=["===","!==","==","!=","&&","||","??"];function Dr(t,l,S,C){return{type:"Literal",start:l,end:S,value:C,raw:t.slice(l,S)}}function Zi(t,l){let S=t.charCodeAt(l);if(S===34||S===39){for(let D=l+1;D<t.length;D++){let P=t.charCodeAt(D);if(P===S)return Dr(t,l,D+1,t.slice(l+1,D));if(P===92||P===10||P===13)return null}return null}let C=l;for(;C<t.length;C++){let D=t.charCodeAt(C);if(D<48||D>57)break}if(C===l||S===48&&C-l>1)return null;return Dr(t,l,C,Number(t.slice(l,C)))}function ja(t,l){let S=Cr(t,l);if(S===l)return Zi(t,l);let C=t.slice(l,S);if(C==="true"||C==="false"||C==="null")return Dr(t,l,S,C==="null"?null:C==="true");if(bo.has(C))return null;let D={type:"Identifier",start:l,end:S,name:C};for(let P=S;;){let L=t.charCodeAt(P),q,M;if(L===46){if(M=Cr(t,P+1),M===P+1)return null;q={type:"Identifier",start:P+1,end:M,name:t.slice(P+1,M)}}else if(L===91){if(q=Zi(t,P+1),!q||t.charCodeAt(q.end)!==93)return null;M=q.end+1}else return D;D={type:"MemberExpression",start:l,end:M,object:D,property:q,computed:L===91,optional:!1},P=M}}function wr(t,l){if(t.charCodeAt(l)!==33||t.charCodeAt(l+1)===61)return ja(t,l);let S=wr(t,gn(t,l+1));if(!S)return null;return{type:"UnaryExpression",start:l,end:S.end,operator:"!",prefix:!0,argument:S}}function Qi(t,l){let S=gn(t,l);if(S>=t.length)return!1;let C=t.charCodeAt(S);return C===125||C===41}function Fa(t,l){let S=wr(t,l);if(!S||Qi(t,S.end))return S;let C=gn(t,S.end),D=Ia.find((q)=>t.startsWith(q,C));if(!D)return null;let P=wr(t,gn(t,C+D.length));if(!P||!Qi(t,P.end))return null;let{end:L}=P;if(D==="&&"||D==="||"||D==="??")return{type:"LogicalExpression",start:S.start,end:L,left:S,operator:D,right:P};return{type:"BinaryExpression",start:S.start,end:L,left:S,operator:D,right:P}}function en(t){if(t.loc={start:G(t.start),end:G(t.end)},t.type==="MemberExpression")en(t.object),en(t.property);else if(t.type==="UnaryExpression")en(t.argument);else if(t.type==="BinaryExpression"||t.type==="LogicalExpression")en(t.left),en(t.right)}function Nt(t){let l=!t.loc||t.lfOnly?Fa(t.source,t.index):null;if(l){if(t.index=l.end,t.loc)en(l);return l}let{node:S,end:C}=I(t,t.source,t.index);return t.index=C,S}var Ba="AElig:5i AElig;:5i AMP:12 AMP;:12 Aacute:5d Aacute;:5d Abreve;:76 Acirc:5e Acirc;:5e Acy;:sw Afr;:2kn8 Agrave:5c Agrave;:5c Alpha;:pd Amacr;:74 And;:8cz Aogon;:78 Aopf;:2koo ApplyFunction;:6e9 Aring:5h Aring;:5h Ascr;:2kkc Assign;:6s4 Atilde:5f Atilde;:5f Auml:5g Auml;:5g Backslash;:6qe Barv;:8h3 Barwed;:6x2 Bcy;:sx Because;:6r9 Bernoullis;:6jw Beta;:pe Bfr;:2kn9 Bopf;:2kop Breve;:k8 Bscr;:6jw Bumpeq;:6ry CHcy;:tj COPY:4p COPY;:4p Cacute;:7a Cap;:6vm CapitalDifferentialD;:6kl Cayleys;:6jx Ccaron;:7g Ccedil:5j Ccedil;:5j Ccirc;:7c Cconint;:6r4 Cdot;:7e Cedilla;:54 CenterDot;:53 Cfr;:6jx Chi;:pz CircleDot;:6u1 CircleMinus;:6ty CirclePlus;:6tx CircleTimes;:6tz ClockwiseContourIntegral;:6r6 CloseCurlyDoubleQuote;:6cd CloseCurlyQuote;:6c9 Colon;:6rb Colone;:8dw Congruent;:6sh Conint;:6r3 ContourIntegral;:6r2 Copf;:6iq Coproduct;:6q8 CounterClockwiseContourIntegral;:6r7 Cross;:8bz Cscr;:2kke Cup;:6vn CupCap;:6rx DD;:6kl DDotrahd;:841 DJcy;:si DScy;:sl DZcy;:sv Dagger;:6ch Darr;:6n5 Dashv;:8h0 Dcaron;:7i Dcy;:t0 Del;:6pz Delta;:pg Dfr;:2knb DiacriticalAcute;:50 DiacriticalDot;:k9 DiacriticalDoubleAcute;:kd DiacriticalGrave;:2o DiacriticalTilde;:kc Diamond;:6v8 DifferentialD;:6km Dopf;:2kor Dot;:4o DotDot;:6ho DotEqual;:6s0 DoubleContourIntegral;:6r3 DoubleDot;:4o DoubleDownArrow;:6oj DoubleLeftArrow;:6og DoubleLeftRightArrow;:6ok DoubleLeftTee;:8h0 DoubleLongLeftArrow;:7w8 DoubleLongLeftRightArrow;:7wa DoubleLongRightArrow;:7w9 DoubleRightArrow;:6oi DoubleRightTee;:6ug DoubleUpArrow;:6oh DoubleUpDownArrow;:6ol DoubleVerticalBar;:6qt DownArrow;:6mr DownArrowBar;:843 DownArrowUpArrow;:6ph DownBreve;:lt DownLeftRightVector;:85s DownLeftTeeVector;:866 DownLeftVector;:6nx DownLeftVectorBar;:85y DownRightTeeVector;:867 DownRightVector;:6o1 DownRightVectorBar;:85z DownTee;:6uc DownTeeArrow;:6nb Downarrow;:6oj Dscr;:2kkf Dstrok;:7k ENG;:96 ETH:5s ETH;:5s Eacute:5l Eacute;:5l Ecaron;:7u Ecirc:5m Ecirc;:5m Ecy;:tp Edot;:7q Efr;:2knc Egrave:5k Egrave;:5k Element;:6q0 Emacr;:7m EmptySmallSquare;:7i3 EmptyVerySmallSquare;:7fv Eogon;:7s Eopf;:2kos Epsilon;:ph Equal;:8dx EqualTilde;:6rm Equilibrium;:6oc Escr;:6k0 Esim;:8dv Eta;:pj Euml:5n Euml;:5n Exists;:6pv ExponentialE;:6kn Fcy;:tg Ffr;:2knd FilledSmallSquare;:7i4 FilledVerySmallSquare;:7fu Fopf;:2kot ForAll;:6ps Fouriertrf;:6k1 Fscr;:6k1 GJcy;:sj GT:1q GT;:1q Gamma;:pf Gammad;:rg Gbreve;:7y Gcedil;:82 Gcirc;:7w Gcy;:sz Gdot;:80 Gfr;:2kne Gg;:6vt Gopf;:2kou GreaterEqual;:6sl GreaterEqualLess;:6vv GreaterFullEqual;:6sn GreaterGreater;:8f6 GreaterLess;:6t3 GreaterSlantEqual;:8e6 GreaterTilde;:6sz Gscr;:2kki Gt;:6sr HARDcy;:tm Hacek;:jr Hat;:2m Hcirc;:84 Hfr;:6j0 HilbertSpace;:6iz Hopf;:6j1 HorizontalLine;:7b4 Hscr;:6iz Hstrok;:86 HumpDownHump;:6ry HumpEqual;:6rz IEcy;:t1 IJlig;:8i IOcy;:sh Iacute:5p Iacute;:5p Icirc:5q Icirc;:5q Icy;:t4 Idot;:8g Ifr;:6j5 Igrave:5o Igrave;:5o Im;:6j5 Imacr;:8a ImaginaryI;:6ko Implies;:6oi Int;:6r0 Integral;:6qz Intersection;:6v6 InvisibleComma;:6eb InvisibleTimes;:6ea Iogon;:8e Iopf;:2kow Iota;:pl Iscr;:6j4 Itilde;:88 Iukcy;:sm Iuml:5r Iuml;:5r Jcirc;:8k Jcy;:t5 Jfr;:2knh Jopf;:2kox Jscr;:2kkl Jsercy;:so Jukcy;:sk KHcy;:th KJcy;:ss Kappa;:pm Kcedil;:8m Kcy;:t6 Kfr;:2kni Kopf;:2koy Kscr;:2kkm LJcy;:sp LT:1o LT;:1o Lacute;:8p Lambda;:pn Lang;:7vu Laplacetrf;:6j6 Larr;:6n2 Lcaron;:8t Lcedil;:8r Lcy;:t7 LeftAngleBracket;:7vs LeftArrow;:6mo LeftArrowBar;:6p0 LeftArrowRightArrow;:6o6 LeftCeiling;:6x4 LeftDoubleBracket;:7vq LeftDownTeeVector;:869 LeftDownVector;:6o3 LeftDownVectorBar;:861 LeftFloor;:6x6 LeftRightArrow;:6ms LeftRightVector;:85q LeftTee;:6ub LeftTeeArrow;:6n8 LeftTeeVector;:862 LeftTriangle;:6uq LeftTriangleBar;:89b LeftTriangleEqual;:6us LeftUpDownVector;:85t LeftUpTeeVector;:868 LeftUpVector;:6nz LeftUpVectorBar;:860 LeftVector;:6nw LeftVectorBar;:85u Leftarrow;:6og Leftrightarrow;:6ok LessEqualGreater;:6vu LessFullEqual;:6sm LessGreater;:6t2 LessLess;:8f5 LessSlantEqual;:8e5 LessTilde;:6sy Lfr;:2knj Ll;:6vs Lleftarrow;:6oq Lmidot;:8v LongLeftArrow;:7w5 LongLeftRightArrow;:7w7 LongRightArrow;:7w6 Longleftarrow;:7w8 Longleftrightarrow;:7wa Longrightarrow;:7w9 Lopf;:2koz LowerLeftArrow;:6mx LowerRightArrow;:6mw Lscr;:6j6 Lsh;:6nk Lstrok;:8x Lt;:6sq Map;:83p Mcy;:t8 MediumSpace;:6e7 Mellintrf;:6k3 Mfr;:2knk MinusPlus;:6qb Mopf;:2kp0 Mscr;:6k3 Mu;:po NJcy;:sq Nacute;:8z Ncaron;:93 Ncedil;:91 Ncy;:t9 NegativeMediumSpace;:6bv NegativeThickSpace;:6bv NegativeThinSpace;:6bv NegativeVeryThinSpace;:6bv NestedGreaterGreater;:6sr NestedLessLess;:6sq NewLine;:a Nfr;:2knl NoBreak;:6e8 NonBreakingSpace;:4g Nopf;:6j9 Not;:8h8 NotCongruent;:6si NotCupCap;:6st NotDoubleVerticalBar;:6qu NotElement;:6q1 NotEqual;:6sg NotEqualTilde;:6rm NotExists;:6pw NotGreater;:6sv NotGreaterEqual;:6sx NotGreaterFullEqual;:6sn NotGreaterGreater;:6sr NotGreaterLess;:6t5 NotGreaterSlantEqual;:8e6 NotGreaterTilde;:6t1 NotHumpDownHump;:6ry NotHumpEqual;:6rz NotLeftTriangle;:6wa NotLeftTriangleBar;:89b NotLeftTriangleEqual;:6wc NotLess;:6su NotLessEqual;:6sw NotLessGreater;:6t4 NotLessLess;:6sq NotLessSlantEqual;:8e5 NotLessTilde;:6t0 NotNestedGreaterGreater;:8f6 NotNestedLessLess;:8f5 NotPrecedes;:6tc NotPrecedesEqual;:8fj NotPrecedesSlantEqual;:6w0 NotReverseElement;:6q4 NotRightTriangle;:6wb NotRightTriangleBar;:89c NotRightTriangleEqual;:6wd NotSquareSubset;:6tr NotSquareSubsetEqual;:6w2 NotSquareSuperset;:6ts NotSquareSupersetEqual;:6w3 NotSubset;:6te NotSubsetEqual;:6tk NotSucceeds;:6td NotSucceedsEqual;:8fk NotSucceedsSlantEqual;:6w1 NotSucceedsTilde;:6tb NotSuperset;:6tf NotSupersetEqual;:6tl NotTilde;:6rl NotTildeEqual;:6ro NotTildeFullEqual;:6rr NotTildeTilde;:6rt NotVerticalBar;:6qs Nscr;:2kkp Ntilde:5t Ntilde;:5t Nu;:pp OElig;:9e Oacute:5v Oacute;:5v Ocirc:5w Ocirc;:5w Ocy;:ta Odblac;:9c Ofr;:2knm Ograve:5u Ograve;:5u Omacr;:98 Omega;:q1 Omicron;:pr Oopf;:2kp2 OpenCurlyDoubleQuote;:6cc OpenCurlyQuote;:6c8 Or;:8d0 Oscr;:2kkq Oslash:60 Oslash;:60 Otilde:5x Otilde;:5x Otimes;:8c7 Ouml:5y Ouml;:5y OverBar;:6da OverBrace;:732 OverBracket;:71w OverParenthesis;:730 PartialD;:6pu Pcy;:tb Pfr;:2knn Phi;:py Pi;:ps PlusMinus;:4x Poincareplane;:6j0 Popf;:6jd Pr;:8fv Precedes;:6t6 PrecedesEqual;:8fj PrecedesSlantEqual;:6t8 PrecedesTilde;:6ta Prime;:6cz Product;:6q7 Proportion;:6rb Proportional;:6ql Pscr;:2kkr Psi;:q0 QUOT:y QUOT;:y Qfr;:2kno Qopf;:6je Qscr;:2kks RBarr;:840 REG:4u REG;:4u Racute;:9g Rang;:7vv Rarr;:6n4 Rarrtl;:846 Rcaron;:9k Rcedil;:9i Rcy;:tc Re;:6jg ReverseElement;:6q3 ReverseEquilibrium;:6ob ReverseUpEquilibrium;:86n Rfr;:6jg Rho;:pt RightAngleBracket;:7vt RightArrow;:6mq RightArrowBar;:6p1 RightArrowLeftArrow;:6o4 RightCeiling;:6x5 RightDoubleBracket;:7vr RightDownTeeVector;:865 RightDownVector;:6o2 RightDownVectorBar;:85x RightFloor;:6x7 RightTee;:6ua RightTeeArrow;:6na RightTeeVector;:863 RightTriangle;:6ur RightTriangleBar;:89c RightTriangleEqual;:6ut RightUpDownVector;:85r RightUpTeeVector;:864 RightUpVector;:6ny RightUpVectorBar;:85w RightVector;:6o0 RightVectorBar;:85v Rightarrow;:6oi Ropf;:6jh RoundImplies;:86o Rrightarrow;:6or Rscr;:6jf Rsh;:6nl RuleDelayed;:8ac SHCHcy;:tl SHcy;:tk SOFTcy;:to Sacute;:9m Sc;:8fw Scaron;:9s Scedil;:9q Scirc;:9o Scy;:td Sfr;:2knq ShortDownArrow;:6mr ShortLeftArrow;:6mo ShortRightArrow;:6mq ShortUpArrow;:6mp Sigma;:pv SmallCircle;:6qg Sopf;:2kp6 Sqrt;:6qi Square;:7fl SquareIntersection;:6tv SquareSubset;:6tr SquareSubsetEqual;:6tt SquareSuperset;:6ts SquareSupersetEqual;:6tu SquareUnion;:6tw Sscr;:2kku Star;:6va Sub;:6vk Subset;:6vk SubsetEqual;:6ti Succeeds;:6t7 SucceedsEqual;:8fk SucceedsSlantEqual;:6t9 SucceedsTilde;:6tb SuchThat;:6q3 Sum;:6q9 Sup;:6vl Superset;:6tf SupersetEqual;:6tj Supset;:6vl THORN:66 THORN;:66 TRADE;:6jm TSHcy;:sr TScy;:ti Tab;:9 Tau;:pw Tcaron;:9w Tcedil;:9u Tcy;:te Tfr;:2knr Therefore;:6r8 Theta;:pk ThickSpace;:6e7 ThinSpace;:6bt Tilde;:6rg TildeEqual;:6rn TildeFullEqual;:6rp TildeTilde;:6rs Topf;:2kp7 TripleDot;:6hn Tscr;:2kkv Tstrok;:9y Uacute:62 Uacute;:62 Uarr;:6n3 Uarrocir;:85l Ubrcy;:su Ubreve;:a4 Ucirc:63 Ucirc;:63 Ucy;:tf Udblac;:a8 Ufr;:2kns Ugrave:61 Ugrave;:61 Umacr;:a2 UnderBar;:2n UnderBrace;:733 UnderBracket;:71x UnderParenthesis;:731 Union;:6v7 UnionPlus;:6tq Uogon;:aa Uopf;:2kp8 UpArrow;:6mp UpArrowBar;:842 UpArrowDownArrow;:6o5 UpDownArrow;:6mt UpEquilibrium;:86m UpTee;:6ud UpTeeArrow;:6n9 Uparrow;:6oh Updownarrow;:6ol UpperLeftArrow;:6mu UpperRightArrow;:6mv Upsi;:r6 Upsilon;:px Uring;:a6 Uscr;:2kkw Utilde;:a0 Uuml:64 Uuml;:64 VDash;:6uj Vbar;:8h7 Vcy;:sy Vdash;:6uh Vdashl;:8h2 Vee;:6v5 Verbar;:6c6 Vert;:6c6 VerticalBar;:6qr VerticalLine;:3g VerticalSeparator;:7rs VerticalTilde;:6rk VeryThinSpace;:6bu Vfr;:2knt Vopf;:2kp9 Vscr;:2kkx Vvdash;:6ui Wcirc;:ac Wedge;:6v4 Wfr;:2knu Wopf;:2kpa Wscr;:2kky Xfr;:2knv Xi;:pq Xopf;:2kpb Xscr;:2kkz YAcy;:tr YIcy;:sn YUcy;:tq Yacute:65 Yacute;:65 Ycirc;:ae Ycy;:tn Yfr;:2knw Yopf;:2kpc Yscr;:2kl0 Yuml;:ag ZHcy;:t2 Zacute;:ah Zcaron;:al Zcy;:t3 Zdot;:aj ZeroWidthSpace;:6bv Zeta;:pi Zfr;:6js Zopf;:6jo Zscr;:2kl1 aacute:69 aacute;:69 abreve;:77 ac;:6ri acE;:6ri acd;:6rj acirc:6a acirc;:6a acute:50 acute;:50 acy;:ts aelig:6e aelig;:6e af;:6e9 afr;:2kny agrave:68 agrave;:68 alefsym;:6k5 aleph;:6k5 alpha;:q9 amacr;:75 amalg;:8cf amp:12 amp;:12 and;:6qv andand;:8d1 andd;:8d8 andslope;:8d4 andv;:8d6 ang;:6qo ange;:884 angle;:6qo angmsd;:6qp angmsdaa;:888 angmsdab;:889 angmsdac;:88a angmsdad;:88b angmsdae;:88c angmsdaf;:88d angmsdag;:88e angmsdah;:88f angrt;:6qn angrtvb;:6v2 angrtvbd;:87x angsph;:6qq angst;:5h angzarr;:70c aogon;:79 aopf;:2kpe ap;:6rs apE;:8ds apacir;:8dr ape;:6ru apid;:6rv apos;:13 approx;:6rs approxeq;:6ru aring:6d aring;:6d ascr;:2kl2 ast;:16 asymp;:6rs asympeq;:6rx atilde:6b atilde;:6b auml:6c auml;:6c awconint;:6r7 awint;:8b5 bNot;:8h9 backcong;:6rw backepsilon;:s6 backprime;:6d1 backsim;:6rh backsimeq;:6vh barvee;:6v1 barwed;:6x1 barwedge;:6x1 bbrk;:71x bbrktbrk;:71y bcong;:6rw bcy;:tt bdquo;:6ce becaus;:6r9 because;:6r9 bemptyv;:88g bepsi;:s6 bernou;:6jw beta;:qa beth;:6k6 between;:6ss bfr;:2knz bigcap;:6v6 bigcirc;:7hr bigcup;:6v7 bigodot;:8ao bigoplus;:8ap bigotimes;:8aq bigsqcup;:8au bigstar;:7id bigtriangledown;:7gd bigtriangleup;:7g3 biguplus;:8as bigvee;:6v5 bigwedge;:6v4 bkarow;:83x blacklozenge;:8a3 blacksquare;:7fu blacktriangle;:7g4 blacktriangledown;:7ge blacktriangleleft;:7gi blacktriangleright;:7g8 blank;:74z blk12;:7f6 blk14;:7f5 blk34;:7f7 block;:7ew bne;:1p bnequiv;:6sh bnot;:6xc bopf;:2kpf bot;:6ud bottom;:6ud bowtie;:6vc boxDL;:7dj boxDR;:7dg boxDl;:7di boxDr;:7df boxH;:7dc boxHD;:7dy boxHU;:7e1 boxHd;:7dw boxHu;:7dz boxUL;:7dp boxUR;:7dm boxUl;:7do boxUr;:7dl boxV;:7dd boxVH;:7e4 boxVL;:7dv boxVR;:7ds boxVh;:7e3 boxVl;:7du boxVr;:7dr boxbox;:895 boxdL;:7dh boxdR;:7de boxdl;:7bk boxdr;:7bg boxh;:7b4 boxhD;:7dx boxhU;:7e0 boxhd;:7cc boxhu;:7ck boxminus;:6u7 boxplus;:6u6 boxtimes;:6u8 boxuL;:7dn boxuR;:7dk boxul;:7bs boxur;:7bo boxv;:7b6 boxvH;:7e2 boxvL;:7dt boxvR;:7dq boxvh;:7cs boxvl;:7c4 boxvr;:7bw bprime;:6d1 breve;:k8 brvbar:4m brvbar;:4m bscr;:2kl3 bsemi;:6dr bsim;:6rh bsime;:6vh bsol;:2k bsolb;:891 bsolhsub;:7uw bull;:6ci bullet;:6ci bump;:6ry bumpE;:8fi bumpe;:6rz bumpeq;:6rz cacute;:7b cap;:6qx capand;:8ck capbrcup;:8cp capcap;:8cr capcup;:8cn capdot;:8cg caps;:6qx caret;:6dd caron;:jr ccaps;:8ct ccaron;:7h ccedil:6f ccedil;:6f ccirc;:7d ccups;:8cs ccupssm;:8cw cdot;:7f cedil:54 cedil;:54 cemptyv;:88i cent:4i cent;:4i centerdot;:53 cfr;:2ko0 chcy;:uf check;:7pv checkmark;:7pv chi;:qv cir;:7gr cirE;:88z circ;:jq circeq;:6s7 circlearrowleft;:6nu circlearrowright;:6nv circledR;:4u circledS;:79k circledast;:6u3 circledcirc;:6u2 circleddash;:6u5 cire;:6s7 cirfnint;:8b4 cirmid;:8hb cirscir;:88y clubs;:7kz clubsuit;:7kz colon;:1m colone;:6s4 coloneq;:6s4 comma;:18 commat;:1s comp;:6pt compfn;:6qg complement;:6pt complexes;:6iq cong;:6rp congdot;:8dp conint;:6r2 copf;:2kpg coprod;:6q8 copy:4p copy;:4p copysr;:6jb crarr;:6np cross;:7pz cscr;:2kl4 csub;:8gf csube;:8gh csup;:8gg csupe;:8gi ctdot;:6wf cudarrl;:854 cudarrr;:851 cuepr;:6vy cuesc;:6vz cularr;:6nq cularrp;:859 cup;:6qy cupbrcap;:8co cupcap;:8cm cupcup;:8cq cupdot;:6tp cupor;:8cl cups;:6qy curarr;:6nr curarrm;:858 curlyeqprec;:6vy curlyeqsucc;:6vz curlyvee;:6vi curlywedge;:6vj curren:4k curren;:4k curvearrowleft;:6nq curvearrowright;:6nr cuvee;:6vi cuwed;:6vj cwconint;:6r6 cwint;:6r5 cylcty;:6y5 dArr;:6oj dHar;:86d dagger;:6cg daleth;:6k8 darr;:6mr dash;:6c0 dashv;:6ub dbkarow;:83z dblac;:kd dcaron;:7j dcy;:tw dd;:6km ddagger;:6ch ddarr;:6oa ddotseq;:8dz deg:4w deg;:4w delta;:qc demptyv;:88h dfisht;:873 dfr;:2ko1 dharl;:6o3 dharr;:6o2 diam;:6v8 diamond;:6v8 diamondsuit;:7l2 diams;:7l2 die;:4o digamma;:rh disin;:6wi div;:6v divide:6v divide;:6v divideontimes;:6vb divonx;:6vb djcy;:uq dlcorn;:6xq dlcrop;:6x9 dollar;:10 dopf;:2kph dot;:k9 doteq;:6s0 doteqdot;:6s1 dotminus;:6rc dotplus;:6qc dotsquare;:6u9 doublebarwedge;:6x2 downarrow;:6mr downdownarrows;:6oa downharpoonleft;:6o3 downharpoonright;:6o2 drbkarow;:840 drcorn;:6xr drcrop;:6x8 dscr;:2kl5 dscy;:ut dsol;:8ae dstrok;:7l dtdot;:6wh dtri;:7gf dtrif;:7ge duarr;:6ph duhar;:86n dwangle;:886 dzcy;:v3 dzigrarr;:7wf eDDot;:8dz eDot;:6s1 eacute:6h eacute;:6h easter;:8dq ecaron;:7v ecir;:6s6 ecirc:6i ecirc;:6i ecolon;:6s5 ecy;:ul edot;:7r ee;:6kn efDot;:6s2 efr;:2ko2 eg;:8ey egrave:6g egrave;:6g egs;:8eu egsdot;:8ew el;:8ex elinters;:73b ell;:6j7 els;:8et elsdot;:8ev emacr;:7n empty;:6px emptyset;:6px emptyv;:6px emsp13;:6bo emsp14;:6bp emsp;:6bn eng;:97 ensp;:6bm eogon;:7t eopf;:2kpi epar;:6vp eparsl;:89v eplus;:8dt epsi;:qd epsilon;:qd epsiv;:s5 eqcirc;:6s6 eqcolon;:6s5 eqsim;:6rm eqslantgtr;:8eu eqslantless;:8et equals;:1p equest;:6sf equiv;:6sh equivDD;:8e0 eqvparsl;:89x erDot;:6s3 erarr;:86p escr;:6jz esdot;:6s0 esim;:6rm eta;:qf eth:6o eth;:6o euml:6j euml;:6j euro;:6gc excl;:x exist;:6pv expectation;:6k0 exponentiale;:6kn fallingdotseq;:6s2 fcy;:uc female;:7k0 ffilig;:1dkz fflig;:1dkw ffllig;:1dl0 ffr;:2ko3 filig;:1dkx fjlig;:2u flat;:7l9 fllig;:1dky fltns;:7g1 fnof;:b6 fopf;:2kpj forall;:6ps fork;:6vo forkv;:8gp fpartint;:8b1 frac12:59 frac12;:59 frac13;:6kz frac14:58 frac14;:58 frac15;:6l1 frac16;:6l5 frac18;:6l7 frac23;:6l0 frac25;:6l2 frac34:5a frac34;:5a frac35;:6l3 frac38;:6l8 frac45;:6l4 frac56;:6l6 frac58;:6l9 frac78;:6la frasl;:6dg frown;:6xu fscr;:2kl7 gE;:6sn gEl;:8ek gacute;:dx gamma;:qb gammad;:rh gap;:8ee gbreve;:7z gcirc;:7x gcy;:tv gdot;:81 ge;:6sl gel;:6vv geq;:6sl geqq;:6sn geqslant;:8e6 ges;:8e6 gescc;:8fd gesdot;:8e8 gesdoto;:8ea gesdotol;:8ec gesl;:6vv gesles;:8es gfr;:2ko4 gg;:6sr ggg;:6vt gimel;:6k7 gjcy;:ur gl;:6t3 glE;:8eq gla;:8f9 glj;:8f8 gnE;:6sp gnap;:8ei gnapprox;:8ei gne;:8eg gneq;:8eg gneqq;:6sp gnsim;:6w7 gopf;:2kpk grave;:2o gscr;:6iy gsim;:6sz gsime;:8em gsiml;:8eo gt:1q gt;:1q gtcc;:8fb gtcir;:8e2 gtdot;:6vr gtlPar;:87p gtquest;:8e4 gtrapprox;:8ee gtrarr;:86w gtrdot;:6vr gtreqless;:6vv gtreqqless;:8ek gtrless;:6t3 gtrsim;:6sz gvertneqq;:6sp gvnE;:6sp hArr;:6ok hairsp;:6bu half;:59 hamilt;:6iz hardcy;:ui harr;:6ms harrcir;:85k harrw;:6nh hbar;:6j3 hcirc;:85 hearts;:7l1 heartsuit;:7l1 hellip;:6cm hercon;:6ux hfr;:2ko5 hksearow;:84l hkswarow;:84m hoarr;:6pr homtht;:6rf hookleftarrow;:6nd hookrightarrow;:6ne hopf;:2kpl horbar;:6c5 hscr;:2kl9 hslash;:6j3 hstrok;:87 hybull;:6df hyphen;:6c0 iacute:6l iacute;:6l ic;:6eb icirc:6m icirc;:6m icy;:u0 iecy;:tx iexcl:4h iexcl;:4h iff;:6ok ifr;:2ko6 igrave:6k igrave;:6k ii;:6ko iiiint;:8b0 iiint;:6r1 iinfin;:89o iiota;:6jt ijlig;:8j imacr;:8b image;:6j5 imagline;:6j4 imagpart;:6j5 imath;:8h imof;:6uv imped;:c5 in;:6q0 incare;:6it infin;:6qm infintie;:89p inodot;:8h int;:6qz intcal;:6uy integers;:6jo intercal;:6uy intlarhk;:8bb intprod;:8cc iocy;:up iogon;:8f iopf;:2kpm iota;:qh iprod;:8cc iquest:5b iquest;:5b iscr;:2kla isin;:6q0 isinE;:6wp isindot;:6wl isins;:6wk isinsv;:6wj isinv;:6q0 it;:6ea itilde;:89 iukcy;:uu iuml:6n iuml;:6n jcirc;:8l jcy;:u1 jfr;:2ko7 jmath;:fr jopf;:2kpn jscr;:2klb jsercy;:uw jukcy;:us kappa;:qi kappav;:s0 kcedil;:8n kcy;:u2 kfr;:2ko8 kgreen;:8o khcy;:ud kjcy;:v0 kopf;:2kpo kscr;:2klc lAarr;:6oq lArr;:6og lAtail;:84b lBarr;:83y lE;:6sm lEg;:8ej lHar;:86a lacute;:8q laemptyv;:88k lagran;:6j6 lambda;:qj lang;:7vs langd;:87l langle;:7vs lap;:8ed laquo:4r laquo;:4r larr;:6mo larrb;:6p0 larrbfs;:84f larrfs;:84d larrhk;:6nd larrlp;:6nf larrpl;:855 larrsim;:86r larrtl;:6n6 lat;:8ff latail;:849 late;:8fh lates;:8fh lbarr;:83w lbbrk;:7si lbrace;:3f lbrack;:2j lbrke;:87f lbrksld;:87j lbrkslu;:87h lcaron;:8u lcedil;:8s lceil;:6x4 lcub;:3f lcy;:u3 ldca;:852 ldquo;:6cc ldquor;:6ce ldrdhar;:86f ldrushar;:85n ldsh;:6nm le;:6sk leftarrow;:6mo leftarrowtail;:6n6 leftharpoondown;:6nx leftharpoonup;:6nw leftleftarrows;:6o7 leftrightarrow;:6ms leftrightarrows;:6o6 leftrightharpoons;:6ob leftrightsquigarrow;:6nh leftthreetimes;:6vf leg;:6vu leq;:6sk leqq;:6sm leqslant;:8e5 les;:8e5 lescc;:8fc lesdot;:8e7 lesdoto;:8e9 lesdotor;:8eb lesg;:6vu lesges;:8er lessapprox;:8ed lessdot;:6vq lesseqgtr;:6vu lesseqqgtr;:8ej lessgtr;:6t2 lesssim;:6sy lfisht;:870 lfloor;:6x6 lfr;:2ko9 lg;:6t2 lgE;:8ep lhard;:6nx lharu;:6nw lharul;:86i lhblk;:7es ljcy;:ux ll;:6sq llarr;:6o7 llcorner;:6xq llhard;:86j lltri;:7i2 lmidot;:8w lmoust;:71s lmoustache;:71s lnE;:6so lnap;:8eh lnapprox;:8eh lne;:8ef lneq;:8ef lneqq;:6so lnsim;:6w6 loang;:7vw loarr;:6pp lobrk;:7vq longleftarrow;:7w5 longleftrightarrow;:7w7 longmapsto;:7wc longrightarrow;:7w6 looparrowleft;:6nf looparrowright;:6ng lopar;:879 lopf;:2kpp loplus;:8bx lotimes;:8c4 lowast;:6qf lowbar;:2n loz;:7gq lozenge;:7gq lozf;:8a3 lpar;:14 lparlt;:87n lrarr;:6o6 lrcorner;:6xr lrhar;:6ob lrhard;:86l lrm;:6by lrtri;:6v3 lsaquo;:6d5 lscr;:2kld lsh;:6nk lsim;:6sy lsime;:8el lsimg;:8en lsqb;:2j lsquo;:6c8 lsquor;:6ca lstrok;:8y lt:1o lt;:1o ltcc;:8fa ltcir;:8e1 ltdot;:6vq lthree;:6vf ltimes;:6vd ltlarr;:86u ltquest;:8e3 ltrPar;:87q ltri;:7gj ltrie;:6us ltrif;:7gi lurdshar;:85m luruhar;:86e lvertneqq;:6so lvnE;:6so mDDot;:6re macr:4v macr;:4v male;:7k2 malt;:7q8 maltese;:7q8 map;:6na mapsto;:6na mapstodown;:6nb mapstoleft;:6n8 mapstoup;:6n9 marker;:7fy mcomma;:8bt mcy;:u4 mdash;:6c4 measuredangle;:6qp mfr;:2koa mho;:6jr micro:51 micro;:51 mid;:6qr midast;:16 midcir;:8hc middot:53 middot;:53 minus;:6qa minusb;:6u7 minusd;:6rc minusdu;:8bu mlcp;:8gr mldr;:6cm mnplus;:6qb models;:6uf mopf;:2kpq mp;:6qb mscr;:2kle mstpos;:6ri mu;:qk multimap;:6uw mumap;:6uw nGg;:6vt nGt;:6sr nGtv;:6sr nLeftarrow;:6od nLeftrightarrow;:6oe nLl;:6vs nLt;:6sq nLtv;:6sq nRightarrow;:6of nVDash;:6un nVdash;:6um nabla;:6pz nacute;:90 nang;:6qo nap;:6rt napE;:8ds napid;:6rv napos;:95 napprox;:6rt natur;:7la natural;:7la naturals;:6j9 nbsp:4g nbsp;:4g nbump;:6ry nbumpe;:6rz ncap;:8cj ncaron;:94 ncedil;:92 ncong;:6rr ncongdot;:8dp ncup;:8ci ncy;:u5 ndash;:6c3 ne;:6sg neArr;:6on nearhk;:84k nearr;:6mv nearrow;:6mv nedot;:6s0 nequiv;:6si nesear;:84o nesim;:6rm nexist;:6pw nexists;:6pw nfr;:2kob ngE;:6sn nge;:6sx ngeq;:6sx ngeqq;:6sn ngeqslant;:8e6 nges;:8e6 ngsim;:6t1 ngt;:6sv ngtr;:6sv nhArr;:6oe nharr;:6ni nhpar;:8he ni;:6q3 nis;:6ws nisd;:6wq niv;:6q3 njcy;:uy nlArr;:6od nlE;:6sm nlarr;:6my nldr;:6cl nle;:6sw nleftarrow;:6my nleftrightarrow;:6ni nleq;:6sw nleqq;:6sm nleqslant;:8e5 nles;:8e5 nless;:6su nlsim;:6t0 nlt;:6su nltri;:6wa nltrie;:6wc nmid;:6qs nopf;:2kpr not:4s not;:4s notin;:6q1 notinE;:6wp notindot;:6wl notinva;:6q1 notinvb;:6wn notinvc;:6wm notni;:6q4 notniva;:6q4 notnivb;:6wu notnivc;:6wt npar;:6qu nparallel;:6qu nparsl;:8hp npart;:6pu npolint;:8b8 npr;:6tc nprcue;:6w0 npre;:8fj nprec;:6tc npreceq;:8fj nrArr;:6of nrarr;:6mz nrarrc;:84z nrarrw;:6n1 nrightarrow;:6mz nrtri;:6wb nrtrie;:6wd nsc;:6td nsccue;:6w1 nsce;:8fk nscr;:2klf nshortmid;:6qs nshortparallel;:6qu nsim;:6rl nsime;:6ro nsimeq;:6ro nsmid;:6qs nspar;:6qu nsqsube;:6w2 nsqsupe;:6w3 nsub;:6tg nsubE;:8g5 nsube;:6tk nsubset;:6te nsubseteq;:6tk nsubseteqq;:8g5 nsucc;:6td nsucceq;:8fk nsup;:6th nsupE;:8g6 nsupe;:6tl nsupset;:6tf nsupseteq;:6tl nsupseteqq;:8g6 ntgl;:6t5 ntilde:6p ntilde;:6p ntlg;:6t4 ntriangleleft;:6wa ntrianglelefteq;:6wc ntriangleright;:6wb ntrianglerighteq;:6wd nu;:ql num;:z numero;:6ja numsp;:6br nvDash;:6ul nvHarr;:83o nvap;:6rx nvdash;:6uk nvge;:6sl nvgt;:1q nvinfin;:89q nvlArr;:83m nvle;:6sk nvlt;:1o nvltrie;:6us nvrArr;:83n nvrtrie;:6ut nvsim;:6rg nwArr;:6om nwarhk;:84j nwarr;:6mu nwarrow;:6mu nwnear;:84n oS;:79k oacute:6r oacute;:6r oast;:6u3 ocir;:6u2 ocirc:6s ocirc;:6s ocy;:u6 odash;:6u5 odblac;:9d odiv;:8c8 odot;:6u1 odsold;:88s oelig;:9f ofcir;:88v ofr;:2koc ogon;:kb ograve:6q ograve;:6q ogt;:88x ohbar;:88l ohm;:q1 oint;:6r2 olarr;:6nu olcir;:88u olcross;:88r oline;:6da olt;:88w omacr;:99 omega;:qx omicron;:qn omid;:88m ominus;:6ty oopf;:2kps opar;:88n operp;:88p oplus;:6tx or;:6qw orarr;:6nv ord;:8d9 order;:6k4 orderof;:6k4 ordf:4q ordf;:4q ordm:56 ordm;:56 origof;:6uu oror;:8d2 orslope;:8d3 orv;:8d7 oscr;:6k4 oslash:6w oslash;:6w osol;:6u0 otilde:6t otilde;:6t otimes;:6tz otimesas;:8c6 ouml:6u ouml;:6u ovbar;:6yl par;:6qt para:52 para;:52 parallel;:6qt parsim;:8hf parsl;:8hp part;:6pu pcy;:u7 percnt;:11 period;:1a permil;:6cw perp;:6ud pertenk;:6cx pfr;:2kod phi;:qu phiv;:r9 phmmat;:6k3 phone;:7im pi;:qo pitchfork;:6vo piv;:ra planck;:6j3 planckh;:6j2 plankv;:6j3 plus;:17 plusacir;:8bn plusb;:6u6 pluscir;:8bm plusdo;:6qc plusdu;:8bp pluse;:8du plusmn:4x plusmn;:4x plussim;:8bq plustwo;:8br pm;:4x pointint;:8b9 popf;:2kpt pound:4j pound;:4j pr;:6t6 prE;:8fn prap;:8fr prcue;:6t8 pre;:8fj prec;:6t6 precapprox;:8fr preccurlyeq;:6t8 preceq;:8fj precnapprox;:8ft precneqq;:8fp precnsim;:6w8 precsim;:6ta prime;:6cy primes;:6jd prnE;:8fp prnap;:8ft prnsim;:6w8 prod;:6q7 profalar;:6y6 profline;:6xe profsurf;:6xf prop;:6ql propto;:6ql prsim;:6ta prurel;:6uo pscr;:2klh psi;:qw puncsp;:6bs qfr;:2koe qint;:8b0 qopf;:2kpu qprime;:6dz qscr;:2kli quaternions;:6j1 quatint;:8ba quest;:1r questeq;:6sf quot:y quot;:y rAarr;:6or rArr;:6oi rAtail;:84c rBarr;:83z rHar;:86c race;:6rh racute;:9h radic;:6qi raemptyv;:88j rang;:7vt rangd;:87m range;:885 rangle;:7vt raquo:57 raquo;:57 rarr;:6mq rarrap;:86t rarrb;:6p1 rarrbfs;:84g rarrc;:84z rarrfs;:84e rarrhk;:6ne rarrlp;:6ng rarrpl;:85h rarrsim;:86s rarrtl;:6n7 rarrw;:6n1 ratail;:84a ratio;:6ra rationals;:6je rbarr;:83x rbbrk;:7sj rbrace;:3h rbrack;:2l rbrke;:87g rbrksld;:87i rbrkslu;:87k rcaron;:9l rcedil;:9j rceil;:6x5 rcub;:3h rcy;:u8 rdca;:853 rdldhar;:86h rdquo;:6cd rdquor;:6cd rdsh;:6nn real;:6jg realine;:6jf realpart;:6jg reals;:6jh rect;:7fx reg:4u reg;:4u rfisht;:871 rfloor;:6x7 rfr;:2kof rhard;:6o1 rharu;:6o0 rharul;:86k rho;:qp rhov;:s1 rightarrow;:6mq rightarrowtail;:6n7 rightharpoondown;:6o1 rightharpoonup;:6o0 rightleftarrows;:6o4 rightleftharpoons;:6oc rightrightarrows;:6o9 rightsquigarrow;:6n1 rightthreetimes;:6vg ring;:ka risingdotseq;:6s3 rlarr;:6o4 rlhar;:6oc rlm;:6bz rmoust;:71t rmoustache;:71t rnmid;:8ha roang;:7vx roarr;:6pq robrk;:7vr ropar;:87a ropf;:2kpv roplus;:8by rotimes;:8c5 rpar;:15 rpargt;:87o rppolint;:8b6 rrarr;:6o9 rsaquo;:6d6 rscr;:2klj rsh;:6nl rsqb;:2l rsquo;:6c9 rsquor;:6c9 rthree;:6vg rtimes;:6ve rtri;:7g9 rtrie;:6ut rtrif;:7g8 rtriltri;:89a ruluhar;:86g rx;:6ji sacute;:9n sbquo;:6ca sc;:6t7 scE;:8fo scap;:8fs scaron;:9t sccue;:6t9 sce;:8fk scedil;:9r scirc;:9p scnE;:8fq scnap;:8fu scnsim;:6w9 scpolint;:8b7 scsim;:6tb scy;:u9 sdot;:6v9 sdotb;:6u9 sdote;:8di seArr;:6oo searhk;:84l searr;:6mw searrow;:6mw sect:4n sect;:4n semi;:1n seswar;:84p setminus;:6qe setmn;:6qe sext;:7qu sfr;:2kog sfrown;:6xu sharp;:7lb shchcy;:uh shcy;:ug shortmid;:6qr shortparallel;:6qt shy:4t shy;:4t sigma;:qr sigmaf;:qq sigmav;:qq sim;:6rg simdot;:8dm sime;:6rn simeq;:6rn simg;:8f2 simgE;:8f4 siml;:8f1 simlE;:8f3 simne;:6rq simplus;:8bo simrarr;:86q slarr;:6mo smallsetminus;:6qe smashp;:8c3 smeparsl;:89w smid;:6qr smile;:6xv smt;:8fe smte;:8fg smtes;:8fg softcy;:uk sol;:1b solb;:890 solbar;:6yn sopf;:2kpw spades;:7kw spadesuit;:7kw spar;:6qt sqcap;:6tv sqcaps;:6tv sqcup;:6tw sqcups;:6tw sqsub;:6tr sqsube;:6tt sqsubset;:6tr sqsubseteq;:6tt sqsup;:6ts sqsupe;:6tu sqsupset;:6ts sqsupseteq;:6tu squ;:7fl square;:7fl squarf;:7fu squf;:7fu srarr;:6mq sscr;:2klk ssetmn;:6qe ssmile;:6xv sstarf;:6va star;:7ie starf;:7id straightepsilon;:s5 straightphi;:r9 strns;:4v sub;:6te subE;:8g5 subdot;:8fx sube;:6ti subedot;:8g3 submult;:8g1 subnE;:8gb subne;:6tm subplus;:8fz subrarr;:86x subset;:6te subseteq;:6ti subseteqq;:8g5 subsetneq;:6tm subsetneqq;:8gb subsim;:8g7 subsub;:8gl subsup;:8gj succ;:6t7 succapprox;:8fs succcurlyeq;:6t9 succeq;:8fk succnapprox;:8fu succneqq;:8fq succnsim;:6w9 succsim;:6tb sum;:6q9 sung;:7l6 sup1:55 sup1;:55 sup2:4y sup2;:4y sup3:4z sup3;:4z sup;:6tf supE;:8g6 supdot;:8fy supdsub;:8go supe;:6tj supedot;:8g4 suphsol;:7ux suphsub;:8gn suplarr;:86z supmult;:8g2 supnE;:8gc supne;:6tn supplus;:8g0 supset;:6tf supseteq;:6tj supseteqq;:8g6 supsetneq;:6tn supsetneqq;:8gc supsim;:8g8 supsub;:8gk supsup;:8gm swArr;:6op swarhk;:84m swarr;:6mx swarrow;:6mx swnwar;:84q szlig:67 szlig;:67 target;:6xi tau;:qs tbrk;:71w tcaron;:9x tcedil;:9v tcy;:ua tdot;:6hn telrec;:6xh tfr;:2koh there4;:6r8 therefore;:6r8 theta;:qg thetasym;:r5 thetav;:r5 thickapprox;:6rs thicksim;:6rg thinsp;:6bt thkap;:6rs thksim;:6rg thorn:72 thorn;:72 tilde;:kc times:5z times;:5z timesb;:6u8 timesbar;:8c1 timesd;:8c0 tint;:6r1 toea;:84o top;:6uc topbot;:6ye topcir;:8hd topf;:2kpx topfork;:8gq tosa;:84p tprime;:6d0 trade;:6jm triangle;:7g5 triangledown;:7gf triangleleft;:7gj trianglelefteq;:6us triangleq;:6sc triangleright;:7g9 trianglerighteq;:6ut tridot;:7ho trie;:6sc triminus;:8ca triplus;:8c9 trisb;:899 tritime;:8cb trpezium;:736 tscr;:2kll tscy;:ue tshcy;:uz tstrok;:9z twixt;:6ss twoheadleftarrow;:6n2 twoheadrightarrow;:6n4 uArr;:6oh uHar;:86b uacute:6y uacute;:6y uarr;:6mp ubrcy;:v2 ubreve;:a5 ucirc:6z ucirc;:6z ucy;:ub udarr;:6o5 udblac;:a9 udhar;:86m ufisht;:872 ufr;:2koi ugrave:6x ugrave;:6x uharl;:6nz uharr;:6ny uhblk;:7eo ulcorn;:6xo ulcorner;:6xo ulcrop;:6xb ultri;:7i0 umacr;:a3 uml:4o uml;:4o uogon;:ab uopf;:2kpy uparrow;:6mp updownarrow;:6mt upharpoonleft;:6nz upharpoonright;:6ny uplus;:6tq upsi;:qt upsih;:r6 upsilon;:qt upuparrows;:6o8 urcorn;:6xp urcorner;:6xp urcrop;:6xa uring;:a7 urtri;:7i1 uscr;:2klm utdot;:6wg utilde;:a1 utri;:7g5 utrif;:7g4 uuarr;:6o8 uuml:70 uuml;:70 uwangle;:887 vArr;:6ol vBar;:8h4 vBarv;:8h5 vDash;:6ug vangrt;:87w varepsilon;:s5 varkappa;:s0 varnothing;:6px varphi;:r9 varpi;:ra varpropto;:6ql varr;:6mt varrho;:s1 varsigma;:qq varsubsetneq;:6tm varsubsetneqq;:8gb varsupsetneq;:6tn varsupsetneqq;:8gc vartheta;:r5 vartriangleleft;:6uq vartriangleright;:6ur vcy;:tu vdash;:6ua vee;:6qw veebar;:6uz veeeq;:6sa vellip;:6we verbar;:3g vert;:3g vfr;:2koj vltri;:6uq vnsub;:6te vnsup;:6tf vopf;:2kpz vprop;:6ql vrtri;:6ur vscr;:2kln vsubnE;:8gb vsubne;:6tm vsupnE;:8gc vsupne;:6tn vzigzag;:87u wcirc;:ad wedbar;:8db wedge;:6qv wedgeq;:6s9 weierp;:6jc wfr;:2kok wopf;:2kq0 wp;:6jc wr;:6rk wreath;:6rk wscr;:2klo xcap;:6v6 xcirc;:7hr xcup;:6v7 xdtri;:7gd xfr;:2kol xhArr;:7wa xharr;:7w7 xi;:qm xlArr;:7w8 xlarr;:7w5 xmap;:7wc xnis;:6wr xodot;:8ao xopf;:2kq1 xoplus;:8ap xotime;:8aq xrArr;:7w9 xrarr;:7w6 xscr;:2klp xsqcup;:8au xuplus;:8as xutri;:7g3 xvee;:6v5 xwedge;:6v4 yacute:71 yacute;:71 yacy;:un ycirc;:af ycy;:uj yen:4l yen;:4l yfr;:2kom yicy;:uv yopf;:2kq2 yscr;:2klq yucy;:um yuml:73 yuml;:73 zacute;:ai zcaron;:am zcy;:tz zdot;:ak zeetrf;:6js zeta;:qe zfr;:2kon zhcy;:ty zigrarr;:6ot zopf;:2kq3 zscr;:2klr zwj;:6bx zwnj;:6bw",_a=[8364,129,8218,402,8222,8230,8224,8225,710,8240,352,8249,338,141,381,143,144,8216,8217,8220,8221,8226,8211,8212,732,8482,353,8250,339,157,382,376],mn,Pr=0;function Oa(){if(mn)return mn;mn=new Map;for(let t of Ba.split(" ")){let l=t.indexOf(":");mn.set(t.slice(0,l),Number.parseInt(t.slice(l+1),36)),Pr=Math.max(Pr,l)}return mn}var Lr=(t)=>t>=48&&t<=57,$a=(t)=>Lr(t)||t>=65&&t<=70||t>=97&&t<=102,eo=(t)=>Lr(t)||t>=65&&t<=90||t>=97&&t<=122,Fn=0;function Va(t,l,S){if(t.charCodeAt(l)===35){let P=(t.charCodeAt(l+1)|32)===120,L=l+(P?2:1),q=L;while(q<t.length&&(P?$a:Lr)(t.charCodeAt(q)))q++;if(q===L)return 0;return Fn=t.charCodeAt(q)===59?q+1:q,Number.parseInt(t.slice(L,q),P?16:10)}let C=Oa(),D=l;while(D-l<Pr&&eo(t.charCodeAt(D)))D++;if(t.charCodeAt(D)===59){let P=C.get(t.slice(l,D+1));if(P!==void 0)return Fn=D+1,P}for(let P=D;P>l;P--){let L=C.get(t.slice(l,P));if(L===void 0)continue;if(S){let q=t.charCodeAt(P);if(eo(q)||q===95||q===61)continue}return Fn=P,L}return 0}function Ha(t,l){if(t===10&&!l)return 32;if(t<128)return t;if(t<=159)return _a[t-128];if(t>=55296&&t<=57343)return 0;if(t<=196607)return t;if(t>=917504&&t<=917631||t>=917760&&t<=917999)return t;return 0}function qr(t,l){let S=t.indexOf("&");if(S===-1)return t;let C="",D=0;while(S!==-1){let P=Va(t,S+1,l);if(P)C+=t.slice(D,S)+String.fromCodePoint(Ha(P,l)),D=Fn;S=t.indexOf("&",P?D:S+1)}return C+t.slice(D)}var to=/<\/script\s*>/g,za=new Set(["server","client","worker","test","default"]);function Ga(t,l,S){let{source:C,index:D}=t;if(D>=C.length)u(C.length);to.lastIndex=D;let P=to.exec(C);if(!P)ke(C.length,"script");t.index=P.index+P[0].length;let L=ae(t,C.slice(0,P.index),D);if(L.start=D,L.loc)Object.assign(L.loc.start,G(l)),Object.assign(L.loc.end,G(t.index));let q="default";for(let M of S){if(za.has(M.name))it(M,M.name);if(M.name==="module"){if(M.value!==!0)nt(M,M.name);q="module"}if(M.name==="context"){let j=M.value;if(j===!0||!Array.isArray(j)||j.length!==1||j[0].type!=="Text"||j[0].data!=="module")rt(M);q="module"}}return{type:"Script",start:l,end:t.index,context:q,content:L,attributes:S}}var Wa=/(even|odd|\+?(\d+|\d*n(\s*[+-]\s*\d+)?)|-\d*n(\s*\+\s*\d+))((?=\s*[,)])|\s+of(\s+|(?=[.#[*:&])))/y,Ua=/\d+(\.\d+)?%/y,Ja=/\\[0-9a-fA-F]{1,6}(\r\n|\s)?/y,Ka=/\s*>/y,Jt=-1,Mr=34,Xa=35,Ya=36,Za=38,Rr=39,Qa=40,el=41,yn=42,tl=43,nl=45,rl=46,Ir=47,Ar=58,il=59,To=60,no=61,ol=62,sl=91,Vn=92,al=93,ll=94,So=123,Nr=124,cl=125,xo=126,Bn=[];function pl(t,l,S){let C=t.index;Bn=[];let D=t.css?dl(t):ul(t),P=t.index;return t.eat("</style",!0),t.read(Ka),{type:"StyleSheet",start:l,end:t.index,attributes:S,children:D,comments:Bn,content:{start:C,end:P,styles:t.source.slice(C,P),comment:null}}}function ul(t){let{source:l,index:S}=t;while(S<l.length){let C=l.charCodeAt(S);if(C===Ir&&l.charCodeAt(S+1)===yn){let D=l.indexOf("*/",S+2);S=D===-1?l.length:D+2}else if(C===Mr||C===Rr){S++;while(S<l.length){let D=l.charCodeAt(S);if(D===C||D===10)break;S+=D===Vn?2:1}S++}else if(C===To&&l.startsWith("</style",S))break;else S++}return t.index=Math.min(S,l.length),[]}function dl(t){let l=[];for(;;){if(tn(t,!0),t.match("</style")||t.index>=t.source.length)break;l.push(t.match("@")?Eo(t):ko(t))}return l}function Eo(t){let l=t.index;t.eat("@",!0);let S=Xt(t),C=jr(t,!0),D=null;if(t.match("{"))D=wo(t);else t.eat(";",!0);return{type:"Atrule",start:l,end:t.index,name:S,prelude:C,block:D}}function ko(t){let l=t.index;return{type:"Rule",prelude:Co(t,!1),block:wo(t),start:l,end:t.index}}function Co(t,l){let S=[];tn(t,!0);let C=t.index;while(t.index<t.source.length){S.push(fl(t,l));let D=t.index;if(tn(t,!0),t.match(l?")":"{"))return{type:"SelectorList",start:C,end:D,children:S};t.eat(",",!0),tn(t,!0)}return u(t.source.length)}function ro(t,l){return{type:"RelativeSelector",combinator:t,selectors:[],start:l,end:-1}}function fl(t,l){let{source:S,index:C}=t,D=[],P=ro(null,t.index);while(t.index<S.length){let L=t.index,q=S.charCodeAt(L),M=P.selectors;if(q===Za)t.index++,M.push({type:"NestingSelector",name:"&",start:L,end:t.index});else if(q===yn)t.index++,M.push(io(t,L,"*"));else if(q===Xa)t.index++,M.push({type:"IdSelector",name:Xt(t),start:L,end:t.index});else if(q===rl)t.index++,M.push({type:"ClassSelector",name:Xt(t),start:L,end:t.index});else if(q===Ar){let z=S.charCodeAt(L+1)===Ar;t.index+=z?2:1;let K=Xt(t),ee=null;if(t.eat("("))ee=Co(t,!0),t.eat(")",!0);if(z)M.push({type:"PseudoElementSelector",name:K,start:L,end:t.index,...ee&&{args:ee}});else M.push({type:"PseudoClassSelector",name:K,args:ee,start:L,end:t.index})}else if(q===sl)t.index++,M.push(ml(t,L));else{let z=l?t.read(Wa):null,K=!z&&_n(q)?t.read(Ua):null;if(z)M.push({type:"Nth",value:z,start:L,end:t.index});else if(K)M.push({type:"Percentage",value:K,start:L,end:t.index});else if(Do(S,L)===0){let ee=Xt(t);M.push(io(t,L,ee))}}let j=t.index;tn(t,!1);let O=t.match(",")||t.match(l?")":"{");if(t.index=j,O)return P.end=j,D.push(P),{type:"ComplexSelector",start:C,end:j,children:D};let H=gl(t);if(H){if(P.selectors.length>0)P.end=j,D.push(P);if(P=ro(H,H.start),t.allowWhitespace(),t.match(",")||t.match(l?")":"{"))Ue(t.index)}}return u(S.length)}function io(t,l,S){let C=S,D;if(t.eat("|"))D=C,C=t.eat("*")?"*":Xt(t);return{type:"TypeSelector",name:C,...D!==void 0&&{namespace:D},start:l,end:t.index}}function ml(t,l){let S=t.source;t.allowWhitespace();let C=Xt(t);t.allowWhitespace();let D=null,P=null,L=S.charCodeAt(t.index);if(L===no)P="=";else if((L===xo||L===ll||L===Ya||L===yn||L===Nr)&&S.charCodeAt(t.index+1)===no)P=S.slice(t.index,t.index+2);if(P)t.index+=P.length,t.allowWhitespace(),D=vl(t);t.allowWhitespace();let q=t.index;while(Ao(S.charCodeAt(t.index)))t.index++;let M=t.index>q?S.slice(q,t.index):null;return t.allowWhitespace(),t.eat("]",!0),{type:"AttributeSelector",start:l,end:t.index,name:C,matcher:P,value:D,flags:M}}function Do(t,l){let S=t.charCodeAt(l);if(S===tl||S===xo||S===ol)return 1;if(S===Nr&&t.charCodeAt(l+1)===Nr)return 2;return 0}function gl(t){let l=t.index;t.allowWhitespace();let S=t.index,C=Do(t.source,S);if(C>0){t.index+=C;let D=t.index;return t.allowWhitespace(),{type:"Combinator",name:t.source.slice(S,D),start:S,end:D}}if(t.index!==l)return{type:"Combinator",name:" ",start:l,end:t.index};return null}function wo(t){let l=t.index;t.eat("{",!0);let S=[];while(t.index<t.source.length){if(tn(t,!0),t.match("}"))break;S.push(yl(t))}return t.eat("}",!0),{type:"Block",start:l,end:t.index,children:S}}function yl(t){if(t.match("@"))return Eo(t);let l=t.index;jr(t,!1);let S=t.source.charCodeAt(t.index);return t.index=l,S===So?ko(t):hl(t)}function hl(t){let{source:l,index:S}=t;if(S>=l.length)u(l.length);let C=S;while(C<l.length){let M=l.charCodeAt(C);if(M===Ar||Yt(M))break;C++}let D=l.slice(S,C);t.index=C,t.allowWhitespace(),t.eat(":");let P=t.index;t.allowWhitespace();let L=jr(t,!0);if(!L&&!D.startsWith("--"))Ve({start:S,end:P});let q=t.index;if(!t.match("}"))t.eat(";",!0);return{type:"Declaration",start:S,end:q,property:D,value:L}}function jr(t,l){let S=t.source,C=S.length,D="",P=t.index,L=null,q=!1,M=!1,j=Jt,O=t.index;while(O<C){let H=S.charCodeAt(O);if(q){q=!1,O++;continue}if(H===Vn){q=!0,O++;continue}if(H===j)j=Jt;else if(H===el)M=!1;else if(j===Jt&&(H===Mr||H===Rr))j=H;else if(H===Qa){if(bl(S,D,P,O))M=!0}else if((H===il||H===So||H===cl)&&!M&&j===Jt){if(t.index=O,!l)return"";if(D+=S.slice(P,O),L){let z=D.length-D.trimStart().length;for(let K of L)K.position=Math.max(0,(K.position??0)-z)}return D.trim()}else if(H===Ir&&!M&&j===Jt&&S.charCodeAt(O+1)===yn){D+=S.slice(P,O),t.index=O;let z=Po(t);if(l)z.position=D.length,Bn.push(z),L??=[],L.push(z);O=t.index,P=O;continue}O++}return t.index=C,u(C)}function bl(t,l,S,C){if(C-S>=3)return t.charCodeAt(C-3)===117&&t.charCodeAt(C-2)===114&&t.charCodeAt(C-1)===108;return(l+t.slice(S,C)).endsWith("url")}function vl(t){let l=t.source,S=Jt;if(t.eat('"'))S=Mr;else if(t.eat("'"))S=Rr;let C=t.index,D=!1,P=C;while(P<l.length){let L=l.charCodeAt(P);if(D)D=!1;else if(L===Vn)D=!0;else if(S===Jt?L===al||Yt(L):L===S)return t.index=S===Jt?P:P+1,l.slice(C,P).trim();P++}return t.index=P,u(l.length)}function Xt(t){let{source:l,index:S}=t,C=l.charCodeAt(S);if(_n(C)||C===nl&&_n(l.charCodeAt(S+1)))Ee(S);let D="",P=S,L=S;while(L<l.length){let q=l.charCodeAt(L);if(q===Vn){D+=l.slice(P,L),t.index=L;let M=t.matchRegex(Ja);if(M){let j=String.fromCodePoint(Number.parseInt(M.slice(1),16));D+=j==="\\"?"\\\\":j,L+=M.length}else D+=`\\${l[L+1]}`,L+=2;P=L}else if(q>=160||Tl(q))L++;else break}if(D+=l.slice(P,L),t.index=L,D==="")Ee(S);return D}function tn(t,l){let S=t.source;t.allowWhitespace();for(;;){let C=S.charCodeAt(t.index);if(C===Ir&&S.charCodeAt(t.index+1)===yn){let D=Po(t);if(l)Bn.push(D)}else if(C===To&&t.eat("<!--"))t.readUntil("-->"),t.eat("-->",!0);else break;t.allowWhitespace()}}function Po(t){let l=t.index;t.eat("/*",!0);let S=t.readUntil("*/");return t.eat("*/",!0),{type:"CSSComment",value:S,start:l,end:t.index}}function _n(t){return t>=48&&t<=57}function Ao(t){return t>=65&&t<=90||t>=97&&t<=122}function Tl(t){return Ao(t)||_n(t)||t===95||t===45}var Er=/<\/textarea(\s[^>]*)?>/iy,Sl=/^![a-zA-Z]+$/,xl=/^[a-zA-Z][a-zA-Z0-9]*:[a-zA-Z][a-zA-Z0-9-]*[a-zA-Z0-9]$/,El=/^[a-zA-Z][a-zA-Z0-9]*(-[a-zA-Z0-9.\-_\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u{10000}-\u{EFFFF}]*)?$/u,kr="\\u200C\\u200D",kl=new RegExp(`^(?:\\p{Lu}[$${kr}\\p{ID_Continue}.]*|\\p{ID_Start}[$${kr}\\p{ID_Continue}]*(?:\\.[$${kr}\\p{ID_Continue}]+)+)$`,"u"),Cl=new Set("area base br col command embed hr img input keygen link meta param source track wbr".split(" ")),Dl=new Map([["use","UseDirective"],["animate","AnimateDirective"],["bind","BindDirective"],["class","ClassDirective"],["style","StyleDirective"],["on","OnDirective"],["let","LetDirective"],["in","TransitionDirective"],["out","TransitionDirective"],["transition","TransitionDirective"]]),Fr=new Map([["svelte:head",["SvelteHead",!0]],["svelte:options",["SvelteOptions",!0]],["svelte:window",["SvelteWindow",!0]],["svelte:document",["SvelteDocument",!0]],["svelte:body",["SvelteBody",!0]],["svelte:element",["SvelteElement",!1]],["svelte:component",["SvelteComponent",!1]],["svelte:self",["SvelteSelf",!1]],["svelte:fragment",["SvelteFragment",!1]],["svelte:boundary",["SvelteBoundary",!1]]]),oo=[...Fr.keys()],wl=`${oo.slice(0,-1).join(", ")} or ${oo.at(-1)}`,No=47,On=62,Lo=61,Pl=34,Al=39,so=123,nn=(t)=>t===Pl||t===Al;function Nl(t,l,S){let C=l;for(;C<t.length;C++){let D=t.charCodeAt(C);if(Yt(D)||D===No||D===On)break;if(S&&(nn(D)||D===Lo))break}return C}function Hn(t,l){let S=t.index;if(S>=t.source.length)u(t.source.length);let C=Nl(t.source,S,l);return t.index=C,{name:t.source.slice(S,C),start:S,end:C,loc:t.sourceLocation(S,C)}}var hn=(t,l,S,C=S)=>({start:t,end:l,type:"Text",raw:S,data:C});function qo(t){return Cl.has(t)||t.charCodeAt(0)===33&&t.toLowerCase()==="!doctype"}function Ll(t){let l=t.charCodeAt(0);if(l>=97&&l<=122&&!t.includes("."))return!1;return kl.test(t)}function ql(t){let l=!0;for(let S=0;S<t.length&&l;S++){let C=t.charCodeAt(S);l=C>=97&&C<=122||S>0&&C>=48&&C<=57}return l&&t.length>0||Sl.test(t)||xl.test(t)||El.test(t)}function ao(t,l){for(let S=t.length-1;S>=0;S--){let C=l(t[S]);if(C!==void 0)return C}return!1}function Ml(t,l,S){let C=Fr.get(l);if(C)return C[0];if(S)return"Component";if(l==="title"){if(ao(t.stack,({type:D})=>{if(D==="SvelteHead")return!0;return D==="RegularElement"||D==="Component"?!1:void 0}))return"TitleElement"}if(l==="slot"){if(!ao(t.stack,(D)=>D.type==="RegularElement"&&D.attributes.some((P)=>P.type==="Attribute"&&P.name==="shadowrootmode")?!0:void 0))return"SlotElement"}return"RegularElement"}function Rl(t){let l=t.index++;if(t.eat("!--")){let S=t.readUntil("-->");t.eat("-->",!0),t.append({type:"Comment",start:l,end:t.index,data:S})}else if(t.eat("/"))Il(t,l);else Fl(t,l)}function Il(t,l){let{name:S}=Hn(t,!1);if(t.allowWhitespace(),t.eat(">",!0),qo(S))St(l);let C=t.current();while(!("name"in C)||C.name!==S){if(C.type!=="RegularElement"){let D=t.lastAutoClosedTag;if(D?.tag===S)Xe(l,S,D.reason);ze(l,S)}C.end=l,t.close(),C=t.current()}if(C.end=t.index,t.close(),t.stack.length<(t.lastAutoClosedTag?.depth??0))t.lastAutoClosedTag=void 0}function jl(t,l,S){return{type:t,start:l,end:-1,name:S}}function Fl(t,l){let S=Hn(t,!1),{name:C}=S,D=Fr.get(C);if(!D&&C.startsWith("svelte:"))lt(S,wl);let P=Ll(C);if(!P&&!ql(C))Tt(S);if(D?.[1]){if(t.metaTags.has(C))ct(l,C);if(t.current().type!=="Root")ut(l,C);t.metaTags.add(C)}let L=jl(Ml(t,C,P),l,C);if(t.loc)L.name_loc=S.loc;L.attributes=[],L.fragment={type:"Fragment",nodes:[]},t.allowWhitespace();let q=t.current();if(q.type==="RegularElement"&&qa(q.name,C))q.end=l,t.close(),t.lastAutoClosedTag={tag:q.name,reason:C,depth:t.stack.length};if((C==="script"||C==="style")&&t.current().type==="Root"){let M=[];L.attributes=M,uo(t,M,Hl),_l(t,L,l,M);return}if(uo(t,L.attributes,Gl),L.type==="SvelteComponent"){let M=lo(L);if(!M)at(l);if(!co(M.value))ot(M.start);L.expression=po(M.value)}else if(L.type==="SvelteElement"){let M=lo(L);if(!M)ve(l);if(M.value===!0)ve(M);L.tag=co(M.value)?po(M.value):Vl(M.value[0])}if(!t.eat("/")&&!qo(C))if(t.eat(">",!0),C==="textarea")L.fragment.nodes=Ro(t,(M,j)=>(Er.lastIndex=j,Er.test(M)),"inside <textarea>"),t.read(Er);else if(C==="script"||C==="style")L.fragment.nodes.push(Bl(t,`</${C}>`));else{t.open(L,L.fragment);return}else t.eat(">",!0);L.end=t.index,t.append(L)}function Bl(t,l){let S=t.index,C=t.source.indexOf(l,S);t.index=C===-1?t.source.length:C;let D=hn(S,t.index,t.source.slice(S,t.index));return t.eat(l,!0),D}function _l(t,l,S,C){t.eat(">",!0);let D=Ol(t.root.fragment.nodes,S);if(l.name==="style"){let q=pl(t,S,C);if(q.content.comment=D,t.root.css)st(S);t.root.css=q;return}let P=Ga(t,S,C);if(D)P.content.leadingComments=[{type:"Line",value:D.data}];let L=P.context==="module"?"module":"instance";if(t.root[L])tt(S);t.root[L]=P}function Ol(t,l){let S=t.length-1;if(S<0||t[S].end!==l)return null;for(let C=S;C>=0;C--){let D=t[C];if(D.type==="Comment")return D;if(D.type!=="Text"||D.data.trim())return null}return null}var $l=(t)=>t.type==="Attribute"&&t.name==="this";function lo(t){let l=t.attributes.find($l);if(l)t.attributes.splice(t.attributes.indexOf(l),1);return l}function co(t){if(t===!0)return!1;if(!Array.isArray(t))return!0;return t.length===1&&t[0].type==="ExpressionTag"}function po(t){return(Array.isArray(t)?t[0]:t).expression}function Vl(t){if(t.type!=="Text")return t.expression;return{type:"Literal",value:t.data,raw:`'${t.raw}'`,start:t.start,end:t.end}}function uo(t,l,S){let C=new Set;for(;;){let D=S(t);if(!D)return;let{type:P}=D;if(P==="Attribute"||P==="BindDirective"||P==="StyleDirective"||P==="ClassDirective"){let L=`${P==="BindDirective"?"Attribute":P}${D.name}`;if(C.has(L))Le(D);if(D.name!=="this")C.add(L)}l.push(D),t.allowWhitespace()}}function Br(t,l,S,C,D){return t.loc?{type:"Attribute",start:S,end:C,name:l.name,name_loc:l.loc,value:D}:{type:"Attribute",start:S,end:C,name:l.name,value:D}}function Mo(t){if(nn(t.source.charCodeAt(t.index)))k(t.index,"=")}function Hl(t){let l=t.index,S=Hn(t,!0);if(!S.name)return null;let C=!0;if(t.eat("=")){t.allowWhitespace();let{source:D}=t,P=t.index,L=-1;if(nn(D.charCodeAt(P))){let j=D.indexOf(D[P],P+1);if(j!==-1)L=j+1}if(L===-1){L=P;while(L<D.length&&D.charCodeAt(L)!==On&&!Yt(D.charCodeAt(L)))L++;if(L===P)Se(P)}t.index=L;let q=nn(D.charCodeAt(P))?1:0,M=D.slice(P+q,L-q);C=[hn(L-M.length-q,L-q,M,qr(M,!0))]}return Mo(t),Br(t,S,l,t.index,C)}function zl(t){let l=t.index,S=t.match("/*");if(!S&&!t.match("//"))return!1;t.index+=2;let C=t.readUntil(S?"*/":`
|
|
20
|
+
`);if(S)t.eat("*/");let D={type:S?"Block":"Line",start:l,end:t.index,value:C},P=t.sourceLocation(l,t.index);if(P)D.loc=P;return t.root.comments.push(D),!0}function Gl(t){while(zl(t))t.allowWhitespace();let l=t.index;if(t.eat("{"))return Wl(t,l);let S=Hn(t,!0);if(!S.name)return null;let C=t.index;t.allowWhitespace();let D=!0;if(t.eat("=")){if(t.allowWhitespace(),t.match("/>"))D=[hn(t.index,t.index+1,"/")],t.index++;else D=Kl(t);C=t.index}else Mo(t);let P=S.name.indexOf(":"),L=P>0?Dl.get(S.name.slice(0,P)):void 0;return L?Jl(t,L,S,P,l,C,D):Br(t,S,l,C,D)}function Wl(t,l){if(t.allowWhitespace(),t.eat("@attach")){t.requireWhitespace();let D=Nt(t);return t.eatClosingBrace(),{type:"AttachTag",start:l,end:t.index,expression:D}}if(t.eat("...")){let D=Nt(t);return t.eatClosingBrace(),{type:"SpreadAttribute",start:l,end:t.index,expression:D}}let S=t.readIdentifierName();if(S.name==="")Oe(l);t.eatClosingBrace();let C={type:"ExpressionTag",start:S.start,end:S.end,expression:S};return Br(t,S,l,t.index,C)}function Ul(t){if(t===!0)return;return Array.isArray(t)?t[0]:t}function Jl(t,l,S,C,D,P,L){let[q,...M]=S.name.slice(C+1).split("|");if(q==="")He({start:D,end:D+C+1},S.name);let j={start:D,end:P,type:l,name:q};if(t.loc)j.name_loc=S.loc;if(l==="StyleDirective")return j.modifiers=M,j.value=L,j;let O=Ul(L);if(O&&(Array.isArray(L)&&L.length>1||O.type==="Text"))We(O.start);if(j.expression=O?.expression??null,j.modifiers=M,l==="TransitionDirective"){let H=S.name.slice(0,C);j.intro=H!=="out",j.outro=H!=="in"}if((l==="BindDirective"||l==="ClassDirective")&&!j.expression)j.expression={start:D+C+1,end:P,type:"Identifier",name:q};return j}function Kl(t){let l=t.source.charCodeAt(t.index),S=nn(l);if(S){if(t.index++,t.source.charCodeAt(t.index)===l)return t.index++,[hn(t.index-1,t.index-1,"")]}let C;try{C=Ro(t,S?(D,P)=>D.charCodeAt(P)===l:Xl,"in attribute value",S?l:void 0)}catch(D){let P=D instanceof e?D.position?.[0]:void 0;if(D instanceof e&&D.code==="js_parse_error"&&P!==void 0&&t.source.startsWith("/>",P-1))t.index=P,k(P,S?String.fromCharCode(l):"}");throw D}if(S)t.index++;else if(C.length===0)Se(t.index);return S||C.length>1||C[0].type==="Text"?C:C[0]}function Xl(t,l){let S=t.charCodeAt(l);return Yt(S)||nn(S)||S===Lo||S===60||S===On||S===96||S===No&&t.charCodeAt(l+1)===On}function Ro(t,l,S,C){let{source:D}=t,P=[],L=t.index,q=(M)=>{if(M<=L)return;let j=D.slice(L,M);P.push(hn(L,M,j,qr(j,!0)))};while(t.index<D.length){let M=t.index;if(l(D,M))return q(M),P;if(D.charCodeAt(M)!==so){if(t.index++,C!==void 0)while(t.index<D.length&&D.charCodeAt(t.index)!==so&&D.charCodeAt(t.index)!==C)t.index++;continue}t.index++;let j=D.charCodeAt(t.index);if(j===35||j===64){t.index++;let H=t.index;while(t.index<D.length&&D.charCodeAt(t.index)>=97&&D.charCodeAt(t.index)<=122)t.index++;let z=D.slice(H,t.index);(j===35?qe:Et)(M,z,S)}q(M),t.allowWhitespace();let O=Nt(t);t.eatClosingBrace(),P.push({type:"ExpressionTag",start:M,end:t.index,expression:O}),L=t.index}u(D.length)}var Yl=new Map([["html","html"],["svg","svg"],["mathml","mathml"],["http://www.w3.org/2000/svg","svg"],["http://www.w3.org/1998/Math/MathML","mathml"]]),Zl=new Map([["type",(t,l)=>{if(l!=="String"&&l!=="Number"&&l!=="Boolean"&&l!=="Array"&&l!=="Object")return!1;return t.type=l,!0}],["reflect",(t,l)=>{if(typeof l!=="boolean")return!1;return t.reflect=l,!0}],["attribute",(t,l)=>{if(typeof l!=="string")return!1;return t.attribute=l,!0}]]),fo="[a-z0-9_.\\xB7\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u203F-\\u2040\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\u{10000}-\\u{EFFFF}-]",Ql=new RegExp(`^[a-z]${fo}*-${fo}*$`,"u"),ec=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" ")),jn=(t)=>(l,S)=>{let C=$n(S);if(typeof C!=="boolean")se(S,"true or false");l[t]=C},tc=new Map([["runes",jn("runes")],["immutable",jn("immutable")],["preserveWhitespace",jn("preserveWhitespace")],["accessors",jn("accessors")],["namespace",(t,l)=>{let S=Yl.get($n(l));if(!S)se(l,'"html", "mathml" or "svg"');t.namespace=S}],["css",(t,l)=>{if($n(l)!=="injected")se(l,'"injected"');t.css="injected"}],["tag",(t,l)=>ft(l)],["customElement",(t,l)=>{let S=ic(l);if(S)t.customElement=S}]]);function nc(t){let l=[],S={start:t.start,end:t.end,attributes:l};for(let C of t.attributes){if(C.type!=="Attribute")dt(C);l.push(C);let D=tc.get(C.name);if(!D)xt(C,C.name);D(S,C)}return S}function $n({value:t}){if(t===!0)return!0;let l=Array.isArray(t)?t:[t];if(l.length===0)return!0;if(l.length>1)return null;let[S]=l;if(S.type==="Text")return S.data;return S.expression.type==="Literal"?S.expression.value:null}function mo(t,l){if(typeof l!=="string")De(t);if(!l)return;if(!Ql.test(l))De(t);if(ec.has(l))yt(t)}function rc(t,l){let S=new Map;for(let C of t.properties){if(C.type!=="Property"||C.computed||C.key.type!=="Identifier")l();if(!S.has(C.key.name))S.set(C.key.name,C.value)}return S}function ic(t){let l=()=>mt(t);if(t.value===!0)l();let S=Array.isArray(t.value)?t.value[0]:t.value;if(S.type==="Text"){let O=$n(t);return mo(t,O),{tag:O}}let{expression:C}=S;if(C.type!=="ObjectExpression"){if(C.type==="Literal"&&C.value===null)return;l()}let D=rc(C,l),P={},L=D.get("tag");if(L){let O=L.type==="Literal"?L.value:void 0;mo(null,O),P.tag=O}let q=D.get("props");if(q){let O=()=>ht(t);if(q.type!=="ObjectExpression")O();P.props={};for(let H of q.properties){if(H.type!=="Property"||H.computed||H.key.type!=="Identifier"||H.value.type!=="ObjectExpression")O();let z={};P.props[H.key.name]=z;for(let K of H.value.properties){if(K.type!=="Property"||K.computed||K.key.type!=="Identifier"||K.value.type!=="Literal")O();if(!Zl.get(K.key.name)?.(z,K.value.value))O()}}}let M=D.get("shadow");if(M)if(M.type==="ObjectExpression")P.shadow=M;else if(M.type==="Literal"&&(M.value==="open"||M.value==="none"))P.shadow=M.value;else gt(t);let j=D.get("extend");if(j)P.extend=j;return P}var oc={"{":"}","(":")","[":"]"};function _r(t,l,S=oc){let C=Object.values(S),D=[],P=l;while(P<t.length){let L=t[P++];if(L==="'"||L==='"'||L==="`")P=sc(t,P,L);else if(Object.hasOwn(S,L))D.push(L);else if(C.includes(L)){let q=S[D.pop()??""];if(L!==q)k(P-1,q);if(D.length===0)return P}}u(t.length)}function sc(t,l,S){let C=l;while(C<t.length){let D=t[C++];if(D===S)return C;if(D==="\\")C++;else if(S==="`"&&D==="$"&&t[C]==="{")C=_r(t,C)}kt(l)}var ac=/\?\s*:/g;function zn(t){let l=t.index,S=t.readIdentifierName();if(S.name!==""){let q=go(t);return{...S,typeAnnotation:q}}let C=t.source[t.index];if(C!=="{"&&C!=="[")Ye(t.index);t.index=_r(t.source,l);let{node:D}=I(t,`${t.source.slice(0,t.index)} = 1`,l);W(D,"AssignmentExpression");let P=D.left;W(P,"ObjectPattern","ArrayPattern");let L=go(t);if(P.typeAnnotation=L,L)P.end=L.end;return P}function go(t){let l=t.index;if(t.allowWhitespace(),!t.eat(":")){t.index=l;return}let S="_ as ",C=t.index-S.length,D=t.source.slice(0,C)+S+t.source.slice(t.index).replace(ac,":"),P=I(t,D,C).node;if(P.type==="AssignmentExpression"){let L=P.right.start;while(D[L]!=="=")L-=1;P=I(t,D.slice(0,L),C).node}if(P.type==="SequenceExpression")P=P.expressions[0];return W(P,"TSAsExpression"),t.index=P.end,{type:"TSTypeAnnotation",start:l,end:t.index,typeAnnotation:P.typeAnnotation}}var lc=/\s*}/y,cc={IfBlock:"if",EachBlock:"each",KeyBlock:"key",AwaitBlock:"await",SnippetBlock:"snippet"},zt=()=>({type:"Fragment",nodes:[]});function pc(t,l){if(t.eat("if")){t.requireWhitespace();let S=Nt(t);t.eatClosingBrace();let C=zt();t.open({type:"IfBlock",elseif:!1,start:l,end:-1,test:S,consequent:C,alternate:null},C)}else if(t.eat("each"))dc(t,l);else if(t.eat("await")){t.requireWhitespace();let S=Nt(t);t.allowWhitespace();let C={type:"AwaitBlock",start:l,end:-1,expression:S,value:null,error:null,pending:null,then:null,catch:null},D=zt();if(t.eat("then"))C.value=yo(t),C.then=D;else if(t.eat("catch"))C.error=yo(t),C.catch=D;else C.pending=D;t.eat("}",!0),t.open(C,D)}else if(t.eat("key")){t.requireWhitespace();let S=Nt(t);t.eatClosingBrace();let C=zt();t.open({type:"KeyBlock",start:l,end:-1,expression:S,fragment:C},C)}else if(t.eat("snippet"))fc(t,l);else Qe(t.index)}function yo(t){if(t.matchRegex(lc))return t.allowWhitespace(),null;t.requireWhitespace();let l=zn(t);return t.allowWhitespace(),l}function uc(t){let l={assertion:null},S=t.end,C=(P)=>{if(P.type==="TSAsExpression"&&P.end===t.end)return l.assertion=P,S=P.expression.end,P.expression;return oe(P,C),P},D=t;if(t.type==="TSAsExpression")l.assertion=t,D=t.expression,S=D.end;else oe(t,C);return D.end=S,{expression:D,assertion:l.assertion}}function dc(t,l){t.requireWhitespace();let S=t.source,C;while(!C)try{C=Nt(t)}catch(M){let j=((M instanceof e?M.position:void 0)?.[0]??l)-2;while(j>l&&t.source.slice(j,j+2)!=="as")j-=1;if(j<=l)throw t.source=S,M;t.source=S.slice(0,j)}if(t.source=S,t.allowWhitespace(),!t.match("as")){if(C.type==="SequenceExpression")C=C.expressions[0];let M=uc(C);if(C=M.expression,M.assertion){let j=M.assertion.typeAnnotation.start-2;while(t.source.slice(j,j+2)!=="as")j-=1;t.index=j}}let D=null,P,L;if(t.eat("as"))t.requireWhitespace(),D=zn(t);else t.index=C.end;if(t.allowWhitespace(),t.eat(",")){if(t.allowWhitespace(),P=t.readIdentifierName().name,!P)we(t.index);t.allowWhitespace()}if(t.eat("("))t.allowWhitespace(),L=Nt(t),t.allowWhitespace(),t.eat(")",!0),t.allowWhitespace();t.eat("}",!0);let q=zt();t.open({type:"EachBlock",start:l,end:-1,expression:C,body:q,context:D,index:P,key:L},q)}function fc(t,l){t.requireWhitespace();let S=t.readIdentifierName();if(S.name==="")we(t.index);t.allowWhitespace();let C=t.index,D;if(t.isTypeScript&&t.match("<")){let M=_r(t.source,C,{"<":">"});D=t.source.slice(C+1,M-1),t.index=M}t.allowWhitespace(),t.eat("(",!0);let P=1;while(t.index<t.source.length&&(!t.match(")")||P!==1)){if(t.match("("))P++;if(t.match(")"))P--;t.index+=1}t.eat(")",!0);let{node:L}=I(t,`${t.source.slice(0,t.index)} => {}`,C,!0);W(L,"ArrowFunctionExpression"),t.eatClosingBrace();let q=zt();t.open({type:"SnippetBlock",start:l,end:-1,expression:S,typeParams:D,parameters:L.params,body:q},q)}function mc(t,l){let S=t.index-1,C=t.current();if(C.type==="IfBlock"){if(!t.eat("else"))k(S,"{:else} or {:else if}");if(t.eat("if"))je(S);if(t.allowWhitespace(),C.alternate=zt(),t.setFragment(C.alternate),t.eat("if")){t.requireWhitespace();let D=Nt(t);t.eatClosingBrace();let P=zt();t.open({start:l,end:-1,type:"IfBlock",elseif:!0,test:D,consequent:P,alternate:null},P)}else t.eatClosingBrace()}else if(C.type==="EachBlock"){if(!t.eat("else"))k(S,"{:else}");t.eatClosingBrace(),C.fallback=zt(),t.setFragment(C.fallback)}else if(C.type==="AwaitBlock"){let D;if(t.eat("then"))D="then";else if(t.eat("catch"))D="catch";else k(S,"{:then ...} or {:catch ...}");if(C[D])Me(S,`{:${D}}`);if(!t.eat("}")){t.requireWhitespace();let L=zn(t);if(D==="then")C.value=L;else C.error=L;t.eatClosingBrace()}let P=zt();C[D]=P,t.setFragment(P)}else $e(S)}function gc(t){let l=t.current(),S=cc[l.type];if(!S)Je(t.index-1);t.eat(S,!0),t.eatClosingBrace();while(l.type==="IfBlock"&&l.elseif)l.end=t.index,t.close(),l=t.current();l.end=t.index,t.close()}var yc=/\s*}/y;function hc(t){return t.type==="CallExpression"||t.type==="ChainExpression"&&t.expression.type==="CallExpression"}function bc(t,l){if(t.eat("html")){t.requireWhitespace();let S=Nt(t);t.eatClosingBrace(),t.append({type:"HtmlTag",start:l,end:t.index,expression:S})}else if(t.eat("debug")){let S=[];if(!t.read(yc)){let C=Nt(t),D=C.type==="SequenceExpression"?C.expressions:[C];for(let P of D){if(P.type!=="Identifier")Ge(P.start);S.push(P)}t.eatClosingBrace()}t.append({type:"DebugTag",start:l,end:t.index,identifiers:S})}else if(t.eat("const")){t.requireWhitespace();let S=zn(t);t.allowWhitespace(),t.eat("=",!0),t.allowWhitespace();let C=t.index,D=Nt(t),P=t.index;if(D.type==="SequenceExpression"&&!t.source.slice(C,D.start).includes("("))Fe(D);t.eatClosingBrace();let L={type:"VariableDeclarator",id:S,init:D,start:S.start,end:P};t.append({type:"ConstTag",start:l,end:t.index,declaration:{type:"VariableDeclaration",kind:"const",declarations:[L],start:l+2,end:t.index-1}})}else if(t.eat("render")){t.requireWhitespace();let S=Nt(t);if(!hc(S))et(S);t.eatClosingBrace(),t.append({type:"RenderTag",start:l,end:t.index,expression:S})}else Ze(t.index)}var vc=/(?:var|interface|enum)\b/y,Tc=/(?:let|const|type)\b/y;function Sc(t){let l=t.index;if(t.index+=1,t.allowWhitespace(),t.eat("#"))pc(t,l);else if(t.eat(":"))mc(t,l);else if(t.eat("@"))bc(t,l);else if(t.match("/")&&!t.match("/*")&&!t.match("//"))t.index+=1,gc(t);else if(!xc(t,l)){let S=Nt(t);t.eatClosingBrace(),t.append({type:"ExpressionTag",start:l,end:t.index,expression:S})}}function xc(t,l){let S=t.index,C=t.matchRegex(vc);if(C)be({start:S,end:S+C.length});if(!t.matchRegex(Tc))return!1;let D=t.root.comments.length,P=wt(t,t.source,S);if(P.type==="ExpressionStatement")return t.root.comments.length=D,!1;if(P.type!=="VariableDeclaration"||P.kind!=="let"&&P.kind!=="const")be(P);return t.index=P.end,t.eatClosingBrace(),t.append({type:"DeclarationTag",start:l,end:t.index,declaration:P}),!0}function Ec(t){let{source:l,index:S}=t;if(t.nextAngle<S)t.nextAngle=ho(l,"<",S);if(t.nextBrace<S)t.nextBrace=ho(l,"{",S);let C=Math.min(t.nextAngle,t.nextBrace);t.index=C;let D=l.slice(S,C);t.append({type:"Text",start:S,end:C,raw:D,data:qr(D,!1)})}function ho(t,l,S){let C=t.indexOf(l,S);return C===-1?t.length:C}function Io(t,l){let S=t.charCodeAt(0)===65279?t.slice(1):t;ie(S);let C=new vo(S.trimEnd(),S.length,l);while(C.index<C.source.length)if(C.match("<"))Rl(C);else if(C.match("{"))Sc(C);else Ec(C);if(C.stack.length>1){let q=C.current();if(q.end=q.start+1,q.type==="RegularElement")ke(q,q.name);Be(q)}let{nodes:D}=C.root.fragment,P=D.findIndex((q)=>q.type==="SvelteOptions"),L=D[P];if(L?.type==="SvelteOptions"){D.splice(P,1),C.root.options=nc(L);let{nodes:q}=L.fragment;if(q.length>0)pt({start:q[0].start,end:q[q.length-1].end},L.name)}return C.root}function Ae(t){return Io(t,{css:!1})}var kc=/\w/;function Cc(t,l){let S=t.trim();if(!S.startsWith("{")||!S.endsWith("}"))return;let C=i(S.slice(1,-1),";,").map((D)=>D.trim());for(let D of C){if(!D.startsWith(l))continue;let P=D.slice(l.length);if(P.length>0&&kc.test(P[0]))continue;let L=P.trimStart();if(L.startsWith("?"))L=L.slice(1).trimStart();if(L.startsWith(":"))return L.slice(1).trim()}return}function Gn(t,l){let S=l;if(S.computed||S.object?.type!=="Identifier"||S.property?.type!=="Identifier")return;let C=S.object.name,D=S.property.name;if(!C||!D)return;if(t.wholePropsLocals.has(C))return an(t,D);let P=an(t,C)??Gt(t,C)?.type;if(!P)return;return Cc(P,D)}var Dc=new Set(["Component","SvelteComponent","SvelteSelf"]),wc=new Set(["RegularElement","SvelteElement"]);function bn(t){return Dc.has(t)}function vn(t){return wc.has(t)}function Pc({hasTypeScriptType:t,hasJSDocType:l,inferredType:S,finalType:C}){if(t)return"typescript";if(l)return"jsdoc";if(S!==void 0)return"default";if(C!==void 0)return"inferred";return"unknown"}function Wn(t){let l=t.explicitType??t.jsdocType??t.resolvedType??t.typeSeed,S=t.jsdocParams??t.resolvedParams,C=t.jsdocReturnType??t.resolvedReturnType;if((t.isFunctionDeclaration?l==="() => any":t.initializerIsFunction&&l===t.typeSeed)&&C){let j=t.jsdocTypeParameters?`<${t.jsdocTypeParameters}>`:"";l=S&&S.length>0?`${j}(${E(S)}) => ${C}`:`${j}() => ${C}`}let P=t.jsdocDescription??t.resolvedDescription;if(P===void 0&&l!==void 0)P=t.typedefs?.get(l)?.description;let L=Pc({hasTypeScriptType:t.explicitType!==void 0,hasJSDocType:t.jsdocType!==void 0||t.jsdocParams!==void 0||t.jsdocReturnType!==void 0||t.resolvedType!==void 0,inferredType:t.inferredTypeForSource,finalType:l}),q=t.initializerIsFunction||t.isFunctionDeclaration||t.inferIsFunctionFromTypeSignature===!0&&(!!t.jsdocParams?.length||t.jsdocReturnType!==void 0||!!t.jsdocType?.includes("=>")||!!t.resolvedType?.includes("=>")||!!t.explicitType?.includes("=>")),M=q?t.jsdocTypeParameters:void 0;return{type:l,typeSource:L,description:P,params:S,returnType:C,isFunction:q,typeParameters:M}}function Un(t){if(t?.type==="Identifier")return t.name;return typeof t?.value==="string"?t.value:void 0}function jo(t,l){for(let S of t?.body??[]){let C=S.type==="ExportNamedDeclaration"&&S.declaration?S.declaration:S;if(C.type==="VariableDeclaration"){let D=C.declarations.find((P)=>P.id.type==="Identifier"?P.id.name===l:de(P.id).has(l));if(D)return{declaration:C,declarator:D,statement:S}}else if((C.type==="FunctionDeclaration"||C.type==="ClassDeclaration")&&C.id?.name===l)return{declaration:C,statement:S}}return}function Ac(t,l){for(let S of t?.body??[]){if(S.type!=="LabeledStatement"||S.label.name!=="$")continue;if(S.body.type!=="ExpressionStatement")continue;let C=S.body.expression;if(C.type!=="AssignmentExpression"||C.operator!=="=")continue;if(C.left.type.startsWith("TS"))continue;if(!de(C.left).has(l))continue;let D={type:"VariableDeclarator",id:C.left,init:C.right,start:C.start,end:C.end};return{declaration:{type:"VariableDeclaration",kind:"let",declarations:[D],start:S.start,end:S.end},declarator:D,statement:S}}return}function Nc(t){if(t==="var")return"let";if(t==="using"||t==="await using")return"const";return t}function Or(t,l,S,C,D){let P=Un(S.local),L=Un(S.exported);if(!P||!L)return;if(l.source!=null)return{localName:P,exportedName:L};let q=jo(C,P);if(!q&&D==="instance")q=jo(t.parsed?.module?.content,P)??Ac(C,P);return{localName:P,exportedName:L,...q}}function $r(t,l,S,C){let D=l.source?.value,P=typeof D==="string"?`it re-exports from "${D}"`:t.valueImportBindingsByLocalName.has(S)?"it re-exports an imported binding":"no matching local declaration was found";ce(t,"export-unresolved",C,`export "${C}" was skipped because ${P}; sveld only resolves exports of a local declaration.`,le(t,l))}function Jn(t,l,S){if(!S)return Re(t,l);let C=l.specifiers.length===1?Re(t,l):void 0,D=Re(t,S.statement);if(!C||!D)return C??D;let P=Object.fromEntries(Object.entries(C).filter(([,L])=>L!==void 0));return{...D,...P,internal:C.internal||D.internal}}function Vr(t,l,S,C){let D=[];if(l.type==="FunctionDeclaration"){let M=l;if(!M.id)return D;let j=t.scriptLanguage==="ts"?gi(t,M):void 0;return D.push({prop_name:S?.exportedName??M.id.name,kind:"function",isFunctionDeclaration:!0,value:void 0,typeSeed:j?.hasAnnotations?void 0:"() => any",explicitType:j?.hasAnnotations?j.signature:void 0,initializerIsFunction:!0,isRequired:!1,localName:M.id.name,defaultValue:void 0,inferredTypeForSource:void 0,resolvedJSDoc:void 0}),D}if(l.type!=="VariableDeclaration")return D;let P=l,L=Nc(P.kind),q=S?.declarator?[S.declarator]:P.declarations;for(let M of q){if(!M||typeof M!=="object"||!("id"in M))continue;let{id:j,init:O}=M;if(!j||typeof j!=="object")continue;if(j.type!=="Identifier"){for(let Ce of de(j)){if(S&&S.localName!==Ce)continue;D.push({prop_name:S?.exportedName??Ce,kind:L,isFunctionDeclaration:!1,value:void 0,typeSeed:void 0,explicitType:void 0,initializerIsFunction:!1,isRequired:!1,localName:Ce,defaultValue:void 0,inferredTypeForSource:void 0,resolvedJSDoc:void 0})}continue}let H=j.name,z=S?.exportedName??H,K=O==null?{isFunction:!1}:Ht(t,O),{value:ee,type:Z,isFunction:fe,defaultValue:me}=K;An(t,K,z,C),D.push({prop_name:z,kind:L,isFunctionDeclaration:!1,value:ee,typeSeed:Z,explicitType:t.explicitPropTypesByName.get(H),initializerIsFunction:fe,isRequired:L==="let"&&O==null,localName:H,defaultValue:me,inferredTypeForSource:Z,resolvedJSDoc:K})}return D}function Hr(t,l,S){let{resolvedJSDoc:C}=l;return Wn({explicitType:l.explicitType,typeSeed:l.typeSeed,inferredTypeForSource:l.inferredTypeForSource,jsdocType:S?.type,jsdocDescription:S?.description,jsdocParams:S?.params,jsdocReturnType:S?.returnType,jsdocTypeParameters:S?.typeParameters,resolvedType:C?.resolvedType,resolvedDescription:C?.resolvedDescription,resolvedParams:C?.resolvedParams,resolvedReturnType:C?.resolvedReturnType,initializerIsFunction:l.initializerIsFunction,isFunctionDeclaration:l.isFunctionDeclaration,typedefs:t.typedefs})}function Lc(t,l,S){ce(t,"export-unresolved",S,`export "${S}" was skipped because a class can't be a prop; export it from the module script instead.`,le(t,l))}function Fo(t,l,S,C){if(S.type==="ClassDeclaration"){if(S.id)Lc(t,l,C?.exportedName??S.id.name);return}let D=Vr(t,S,C,"props");if(D.length===0)return;let P=Jn(t,l,C);for(let L of D){let{prop_name:q,kind:M,localName:j}=L,{type:O,typeSource:H,description:z,params:K,returnType:ee,isFunction:Z,typeParameters:fe}=Hr(t,L,P);Ft(t,"prop-unknown-type",q,P?.sveldIgnore),Zt(t,q,{name:q,...j!==void 0&&j!==q?{localName:j}:{},kind:M,description:z,binding:P?.binding,deprecated:P?.deprecated,tags:P?.tags,...P?.internal?{internal:!0}:{},type:O,typeSource:H,value:L.value,defaultValue:L.defaultValue,params:K,returnType:ee,typeParameters:fe,isFunction:Z,isFunctionDeclaration:L.isFunctionDeclaration,isRequired:L.isRequired,constant:M==="const",reactive:t.reactive_vars.has(q),source:le(t,l)})}}function Bo(t,l,S){if(l.declaration!=null){Fo(t,l,l.declaration);return}for(let C of l.specifiers){let D=Or(t,l,C,S,"instance");if(!D)continue;if(D.declaration)Fo(t,l,D.declaration,D);else $r(t,l,D.localName,D.exportedName)}}function qc(t){if(!t||typeof t!=="object"||!("type"in t))return;let l=String(t.type),S=bn(l);if(!S&&!vn(l))return;let C="name"in t&&typeof t.name==="string"?t.name:void 0;if(!C)return;let D=S?{type:"InlineComponent",name:C}:{type:"Element",name:C};if(C==="svelte:element"&&"tag"in t&&t.tag&&typeof t.tag==="object"){let P=t.tag;if(P.type==="Literal"&&typeof P.value==="string")D.thisValue=P.value}return D}function _o(t,l){let S=qc(l);if(!S)return;if(t.rest_props===void 0){t.rest_props=S;return}if(t.rest_props.type==="InlineComponent"&&S.type==="Element")t.rest_props=S}var Mc=/^[A-Za-z_$][\w$]*/,Rc=/[A-Za-z_$][\w$]*/g,Oo=/^(?:const|in|out)\s+/;function $o(t){let l=i(t,",").map((C)=>C.trim()).filter((C)=>C.length>0);if(l.length===0)return null;return[l.map((C)=>{let D=C;while(Oo.test(D))D=D.replace(Oo,"");return D.match(Mc)?.[0]??C}).join(", "),l.join(", ")]}function Vo(t,l,S){let C=t.scriptGenericsAttribute?.value;if(!C)return;for(let[D]of C.matchAll(Rc)){if(t.typeImportBindingsByLocalName.has(D))l.add(D);if(S.has(D))continue;let P=t.localTypeDeclarationsByName.get(D);if(!P)continue;S.add(D),Rt(t,P.node,l,S)}}function Kn(t,l,S){if(t.generics)t.generics=[`${t.generics[0]}, ${l}`,`${t.generics[1]}, ${S}`];else t.generics=[l,S]}function zr(t){if(!Array.isArray(t.value))return;return t.value.map((l)=>l.type==="Text"?l.data:"").join("").trim()}function Ho(t){let l=[t.instance,t.module].filter((C)=>C!==void 0),S=!1;for(let C of l){let D=C.attributes.find((L)=>L.name==="lang");if(!D){S=!0;continue}if(zr(D)?.toLowerCase()==="ts")return"ts"}return S?"js":void 0}function zo(t,l){let S=l.instance?.attributes.find((q)=>q.name==="generics");if(!S)return;let C=le(t,S),D=l.instance?.attributes.find((q)=>q.name==="lang");if((D?zr(D)?.toLowerCase():void 0)!=="ts"){ce(t,"syntax-skipped","generics",'<script generics="..."> requires lang="ts"; the generics attribute was ignored because the script is not TypeScript.',C);return}let L=zr(S);if(!L)return;return{value:L,source:C}}var Ic=/[A-Za-z_$][\w$]*/g;function jc(t,l,S){let C=new Map,D=l.type==="TSInterfaceDeclaration"||l.type==="TSTypeAliasDeclaration"?l.typeParameters?.params:void 0,P=S.typeArguments?.params;if(!D?.length||!P?.length)return C;for(let L=0;L<D.length;L++){let q=D[L]?.name,M=P[L];if(!q||M?.start===void 0||M?.end===void 0)continue;let j=ue(t,M.start,M.end)?.trim();if(j)C.set(q,j)}return C}function Fc(t,l){if(l.size===0)return t;return t.replace(Ic,(S)=>l.get(S)??S)}function rn(t,l,S,C=new Set){let D=new Map;if(!l?.type)return D;let P=(L)=>{for(let q of L){if(q?.type!=="TSPropertySignature"||q.computed)continue;if(!q.key)continue;let M=o(q.key);if(!M)continue;let j=q.typeAnnotation?.start,O=q.typeAnnotation?.end;if(j===void 0||O===void 0)continue;let H=ue(t,j+1,O)?.trim();if(!H)continue;Pe(t,q.typeAnnotation?.typeAnnotation);let z=or(t,q);D.set(M,{type:H,optional:q.optional===!0,source:le(t,q),...z?{jsdoc:z}:{}})}};switch(l.type){case"TSTypeLiteral":P(l.members??[]);break;case"TSInterfaceDeclaration":P(l.body?.body??[]);break;case"TSTypeAliasDeclaration":{let L=rn(t,l.typeAnnotation,S,C);for(let[q,M]of L)D.set(q,M);break}case"TSTypeReference":{let L=di(l.typeName);if(!L||C.has(L))break;let q=S.get(L);if(!q)break;C.add(L);let M=rn(t,q,S,C);C.delete(L);let j=jc(t,q,l);for(let[O,H]of M)D.set(O,j.size===0?H:{...H,type:Fc(H.type,j)});break}case"TSIntersectionType":for(let L of l.types??[]){let q=rn(t,L,S,C);for(let[M,j]of q)D.set(M,j)}break;case"TSParenthesizedType":{let L=rn(t,l.typeAnnotation,S,C);for(let[q,M]of L)D.set(q,M);break}}return D}function Go(t){return t?.content.body??[]}function Bc(t){let l={};for(let[S,C]of Object.entries(t))l[S]={...C.attribute===void 0?{}:{attribute:C.attribute},...C.reflect===void 0?{}:{reflect:C.reflect},...C.type===void 0?{}:{type:C.type}};return l}function Gr(t,l,S){if(l.type==="ImportDeclaration"&&l.source?.value)for(let C of l.specifiers??[]){let D=C.local?.name;if(!D)continue;if(!(l.importKind==="type"||C.type==="ImportSpecifier"&&C.importKind==="type"))continue;let L,q;if(C.type==="ImportSpecifier")L="named",q=C.imported?.type==="Identifier"?C.imported.name:typeof C.imported?.value==="string"?C.imported.value:void 0;else if(C.type==="ImportDefaultSpecifier")L="default";else if(C.type==="ImportNamespaceSpecifier")L="namespace";if(!L)continue;t.typeImportBindingsByLocalName.set(D,{importedName:q,localName:D,source:String(l.source.value),specifierType:L})}if(l.type==="TSEnumDeclaration"||l.type==="TSInterfaceDeclaration"||l.type==="TSTypeAliasDeclaration"){let C=l.type==="TSEnumDeclaration"?mi(t,l):ue(t,l.start,l.end)?.trim();t.localTypeDeclarationsByName.set(l.id.name,{code:C??"",node:l,start:l.start,...S?{exported:S}:{}})}}function Uo(t,l){if(t.runesPropsDeclarationMetadataByDeclaratorStart.clear(),t.explicitPropTypesByName.clear(),t.explicitVariableTypesByName.clear(),t.explicitVariableTypeNodesByName.clear(),t.typeImportBindingsByLocalName.clear(),t.localTypeDeclarationsByName.clear(),t.additionalTypeDependencyNodes.length=0,t.typedRunesPropsDeclarations.length=0,!t.source)return;t.scriptLanguage=Ho(l);let S=l.options?.customElement;t.customElementTag=S?.tag,t.customElement=S?{...S.tag===void 0?{}:{tag:S.tag},...S.shadow==="open"||S.shadow==="none"?{shadow:S.shadow}:{},...S.props?{props:Bc(S.props)}:{},...S.extend===void 0?{}:{extend:!0}}:void 0,t.runesOptionOverride=l.options?.runes,t.scriptGenericsAttribute=zo(t,l);let C=Go(l.module),D=new Set;for(let L of C){if(!L?.type)continue;if(L.type==="ExportNamedDeclaration"&&L.declaration)Gr(t,L.declaration,!0);else if(L.type==="ExportNamedDeclaration"&&!L.source)for(let q of L.specifiers){if(q.local.type!=="Identifier"||q.exported.type!=="Identifier")continue;if(q.local.name===q.exported.name)D.add(q.local.name)}else Gr(t,L,!1)}for(let L of D){let q=t.localTypeDeclarationsByName.get(L);if(q)q.exported=!0}let P=Go(l.instance);for(let L of P){if(!L?.type)continue;if(Gr(t,L,!1),L.type==="ExportNamedDeclaration"&&L.declaration?.type==="VariableDeclaration")for(let q of L.declaration.declarations??[]){if(q.id?.type!=="Identifier"||!q.id.name)continue;let M=Vt(t,q.id.typeAnnotation);if(M)t.explicitPropTypesByName.set(q.id.name,M),Pe(t,q.id.typeAnnotation?.typeAnnotation)}else if(L.type==="VariableDeclaration")for(let q of L.declarations??[]){if(q.id?.type!=="Identifier"||!q.id.name)continue;let M=Vt(t,q.id.typeAnnotation);if(M){t.explicitVariableTypesByName.set(q.id.name,M);let j=q.id.typeAnnotation?.typeAnnotation;if(j)t.explicitVariableTypeNodesByName.set(q.id.name,j)}}}for(let L of P){if(!L||typeof L!=="object"||!("declarations"in L))continue;for(let q of L.declarations??[]){if(!d(m(q.init),"$props"))continue;let M="typeAnnotation"in q.id?q.id.typeAnnotation:void 0,j=M?void 0:Ne(q.init),O=M?.typeAnnotation??j,H=M?Vt(t,M):Kt(t,j),z=rn(t,O,new Map(Array.from(t.localTypeDeclarationsByName.entries(),([Z,fe])=>[Z,fe.node]))),K=new Set,ee=new Set;if(Rt(t,O,K,ee),Vo(t,K,ee),q.start!==void 0){let Z={canonicalType:H,props:z,referencedImportedTypes:K,referencedLocalTypes:ee};if(t.runesPropsDeclarationMetadataByDeclaratorStart.set(q.start,Z),H)t.typedRunesPropsDeclarations.push(Z)}}}}function Wo(t,l){let S=l?.trim();if(!S)return;let C=t.typedefMembersByName.get(S)??$t(S);return C?new Map(C.map((D)=>[D.name,D])):void 0}function Jo(t,l){for(let S of l.declarations){if(!d(m(S.init),"$props"))continue;if(S.id.type==="Identifier"){t.wholePropsLocals.add(S.id.name),t.restPropLocals.add(S.id.name);let L=Pn(t,S.start),q=L?.props.size?void 0:Wo(t,Re(t,l)?.type);for(let M of q?.values()??[])Zt(t,M.name,{name:M.name,kind:"let",description:M.description,type:M.type,typeSource:"jsdoc",isFunction:M.type.includes("=>"),isFunctionDeclaration:!1,isRequired:!M.optional,constant:!1,reactive:!1});if(L)for(let[M,j]of L.props)Zt(t,M,{name:M,kind:"let",description:j.jsdoc?.description,deprecated:j.jsdoc?.deprecated,tags:j.jsdoc?.tags,type:j.type,typeSource:"typescript",isFunction:!1,isFunctionDeclaration:!1,isRequired:!j.optional,constant:!1,reactive:!1,source:j.source});continue}if(S.id.type!=="ObjectPattern")continue;let C=Re(t,l),D=Pn(t,S.start)?.props.size?void 0:Wo(t,C?.type),P=S.id.properties.filter((L)=>{if(L.type!=="Property"||L.computed)return!1;if(!o(L.key))return!1;if(L.value.type==="Identifier")return!0;return L.value.type==="AssignmentPattern"&&L.value.left.type==="Identifier"}).length;for(let L of S.id.properties){if(L.type==="RestElement"){if(L.argument.type==="Identifier")t.restPropLocals.add(L.argument.name);continue}let q=o(L.key);if(!q)continue;let M,j;if(L.value.type==="Identifier")M=L.value.name;else{let ti=L.value;M=ti.left.name,j=ti.right}if(!M)continue;if(Cn(t,q,M),q==="children")t.snippetPropLocals.add(M);let O=D?.get(q),H=ui(t,S.start,q),z=or(t,L)??H?.jsdoc??(P===1&&!D?C:void 0),{init:K,bindable:ee}=wi(j),Z=K==null?{isFunction:!1}:Ht(t,K),{value:fe,type:me,isFunction:Ce,defaultValue:vt}=Z,Ct=H?.type===void 0&&z?.type===void 0?Z.resolvedType:void 0;An(t,Z,q,"props");let{type:Dt,typeSource:Pt,description:Ns,params:Ls,returnType:qs,isFunction:Ms}=Wn({explicitType:H?.type,typeSeed:me,inferredTypeForSource:me,jsdocType:z?.type??O?.type,jsdocDescription:z?.description??O?.description,jsdocParams:z?.params,jsdocReturnType:z?.returnType,resolvedType:Ct,resolvedDescription:Z.resolvedDescription,resolvedParams:Z.resolvedParams,resolvedReturnType:Z.resolvedReturnType,initializerIsFunction:Ce,isFunctionDeclaration:!1,inferIsFunctionFromTypeSignature:!0});if(ee)t.reactive_vars.add(q);Ft(t,"prop-unknown-type",q,z?.sveldIgnore),Zt(t,q,{name:q,...M===q?{}:{localName:M},kind:"let",description:Ns,binding:z?.binding,deprecated:z?.deprecated,tags:z?.tags,...z?.internal?{internal:!0}:{},...ee?{bindable:!0}:{},type:Dt,typeSource:Pt,value:fe,defaultValue:vt,params:Ls,returnType:qs,isFunction:Ms,isFunctionDeclaration:!1,isRequired:!ee&&K==null&&H?.optional!==!0&&O?.optional!==!0,constant:!1,reactive:ee,source:le(t,L)})}}}function _c(t){let S=t.indexOf("EventDispatcher");if(S===-1)return;let C=S+15;while(t[C]===" ")C++;if(t[C]!=="<")return;let D=_(t,C);return D===-1?void 0:t.slice(C+1,D)}var Oc=/^["']|["']$/g,$c=/\?$/,Vc=/^\{/,Hc=/\}$/;function zc(t){let l=Q(t,":");if(l===-1)return;let S=t.slice(0,l).trim().replace($c,"").replace(Oc,""),C=t.slice(l+1).trim();if(!S||!C)return;return{name:S,type:C}}function Ko(t,l,S,C){if(l){let q=new Map(Array.from(t.localTypeDeclarationsByName.entries(),([j,O])=>[j,O.node])),M=rn(t,l,q);for(let[j,O]of M)Ut(t,{name:j,detail:O.type,has_argument:!0,source:O.source});return}let D=Wt(t,S)?.type,P=D?_c(D):void 0;if(!P)return;let L=P.trim().replace(Vc,"").replace(Hc,"");for(let q of i(L,";,")){let M=zc(q.trim());if(!M)continue;Ut(t,{name:M.name,detail:M.type,has_argument:!0,source:C})}}function Xo(t,l){if(t.syntaxMode!=="runes")return;for(let[S,C]of Array.from(t.events.entries())){if(C.type!=="dispatched")continue;if(l.has(S)||t.forwardedEvents.has(S))continue;let D=`on${S}`,P=t.props.get(D);if(!P)continue;let L=P.type!==void 0||P.params!==void 0||P.returnType!==void 0,q=C.detail===void 0||C.detail==="undefined"||C.detail==="null"?"() => void":`(detail: ${C.detail}) => void`;t.props.set(D,{...P,description:P.description??C.description,type:L?P.type:q,typeSource:L?P.typeSource:"inferred",isFunction:!0}),t.events.delete(S)}}var Tn=null;function Gc(t,l){let S={value:void 0,replace:!1};if(!l||typeof l!=="object"||!("type"in l))return S;if(l.type==="Identifier")S.value=l.name,S.replace=!0;else if(l.type==="Literal")S.value=String(l.value);else if(l.type==="MemberExpression")S.value=Gn(t,l);else if((l.type==="ObjectExpression"||l.type==="TemplateLiteral")&&"start"in l&&"end"in l&&typeof l.start==="number"&&typeof l.end==="number")S.value=ue(t,l.start,l.end);return S}function Wc(t,l){if(!n(l))return null;let S=Qt(t,l.name);if(p(S))return Wr(t,S).slot_props;let C=Gt(t,l.name);if(!C)return null;let D=$t(C.type);if(!D)return null;let P={};for(let L of D)P[L.name]={value:L.type,replace:!1};return P}function Wr(t,l){let S={},C=!1;for(let D of l.properties){if(D.type==="SpreadElement"){let L=Wc(t,D.argument);if(L)Object.assign(S,L);else C=!0,ce(t,"spread-unresolved","slot_props",`Slot props spread a value sveld can't resolve; its shape is widened to "Record<string, any>".`,le(t,D));continue}if(D.type!=="Property"||D.computed)continue;let P=o(D.key);if(!P)continue;S[P]=Gc(t,D.value)}return{slot_props:S,hasUnresolvedSpread:C}}function Uc(t,l){if(!l||typeof l!=="object"||!("type"in l))return null;if(l.type==="Identifier"){let P=l,L=t.propLocalToPublicName.get(P.name);if(!L)return null;return{publicName:L,trackingName:P.name}}if(l.type!=="MemberExpression")return null;let S=l,C=S.object&&typeof S.object==="object"&&"type"in S.object&&S.object.type==="Identifier"?S.object.name:void 0;if(!C||!t.wholePropsLocals.has(C))return null;let D;if(!S.computed&&S.property&&typeof S.property==="object"&&"type"in S.property){if(S.property.type==="Identifier")D=S.property.name;else if(S.property.type==="Literal"&&S.property.value!=null)D=String(S.property.value)}else if(S.computed&&S.property&&typeof S.property==="object"&&"type"in S.property&&S.property.type==="Literal"&&"value"in S.property&&S.property.value!=null)D=String(S.property.value);if(!D)return null;return{publicName:D,trackingName:D}}function Yo(t,l){let S=l;if(S&&typeof S==="object"&&"type"in S&&S.type==="ChainExpression")S=S.expression;if(!S||typeof S!=="object"||!("type"in S)||S.type!=="CallExpression")return null;let C=S;if(!C.callee||typeof C.callee!=="object"||!("type"in C.callee))return null;let D=Uc(t,C.callee);if(!D)return null;return{...D,arguments:C.arguments}}function Sn(t,{slot_name:l,slot_props:S,slot_props_unresolved_spread:C,slot_fallback:D,slot_description:P,slot_deprecated:L,slot_tags:q,slot_internal:M,source:j}){let O=l===void 0||l==="",H=O?Tn:l??"",z=a(D),K=S===void 0||S===""?void 0:S,ee=P?.trim()||void 0;if(t.slots.has(H)){let Z=t.slots.get(H);if(Z)t.slots.set(H,{...Z,default:Z.default??O,fallback:z,slot_props:Z.slot_props===void 0?K:Z.slot_props,slot_props_unresolved_spread:Z.slot_props_unresolved_spread||C,description:Z.description||ee,deprecated:Z.deprecated??L,tags:Z.tags||q,...Z.internal||M?{internal:!0}:{},source:j||Z.source})}else t.slots.set(H,{name:H,default:O,fallback:z,slot_props:K,slot_props_unresolved_spread:C,description:ee,deprecated:L,tags:q,...M?{internal:!0}:{},source:j})}var Zo=/^@component/,Jc=/\r/g,Kc=new Set(["AssignmentExpression","UpdateExpression","CallExpression","SpreadAttribute","FunctionDeclaration","ImportDeclaration","VariableDeclaration","ExportNamedDeclaration","Comment","SlotElement","RenderTag","OnDirective","BindDirective"]);function Qo(t){return t&&"id"in t&&t.id&&"name"in t.id?t.id.name:void 0}function Xc(t,l,S,C){let D=S.callee.type==="Identifier"?S.callee.name:void 0;if(D==="createEventDispatcher"){let P=Qo(C);if(P!==void 0)l.dispatcherName=P,l.dispatcherDeclaratorNode=C;l.dispatcherTypeArgument=S.typeArguments?.params?.[0]}if(D==="$host"){let P=Qo(C);if(P!==void 0)l.hostLocalNames.add(P)}if(D==="setContext")$i(t,S);if(S.arguments.length>0){if(l.callsWithArguments.push(S),qn(t,S.callee))l.locallyBoundCalls.add(S)}if(D)l.callees.push({name:D,arguments:S.arguments,node:S,nestedBoundDetailNames:dn(t,S.arguments[1])});if(A(S.callee)&&n(S.callee.property)&&S.callee.property.name==="dispatchEvent"&&(d(S.callee.object,"$host")||n(S.callee.object)&&l.hostLocalNames.has(S.callee.object.name))){let P=Wi(t,S);if(P)l.hostDispatchedEventNames.add(P.name),l.hostDispatches.push(P)}}function Yc(t,l){let S=l,C=S.attributes?.find((q)=>q.name==="name")?.value,D=(Array.isArray(C)?C[0]:void 0)?.data,P=(S.attributes||[]).filter((q)=>q.name!=="name").reduce((q,M)=>{let j={value:void 0,replace:!1},O=M.value;if(O===void 0||O===!0)return q;let H=Array.isArray(O)?O[0]:O;if(H){let{type:z,expression:K,raw:ee,start:Z,end:fe}=H;if(z==="Text"&&ee!==void 0)j.value=JSON.stringify(ee);else if(!Array.isArray(O)&&z==="ExpressionTag"&&K&&typeof K==="object"&&"type"in K&&K.type==="Identifier"&&"name"in K&&K.name===M.name)j.value=K.name,j.replace=!0;if(K&&typeof K==="object"&&"type"in K){if(K.type==="Literal"&&"value"in K){let me=K.value;j.value=typeof me==="string"?JSON.stringify(me):String(me)}else if(K.type==="MemberExpression")j.value=Gn(t,K);else if(K.type!=="Identifier"){if(Z!==void 0&&fe!==void 0){if(K.type==="ObjectExpression"||K.type==="TemplateLiteral")j.value=ue(t,Z+1,fe-1)}}}}if(M.name)q[M.name]=j;return q},{}),L=l.fragment.nodes.map(({start:q,end:M})=>ue(t,q,M)??"").join("").trim();Sn(t,{slot_name:D,slot_props:P,slot_fallback:L,source:le(t,l)})}function Zc(t,l){let S=Yo(t,l.expression);if(!S)return;let C,D=!1;if(S.arguments.length===0)C={};else if(S.arguments.length===1&&typeof S.arguments[0]==="object"&&S.arguments[0]&&"type"in S.arguments[0]&&S.arguments[0].type==="ObjectExpression"){let q=Wr(t,S.arguments[0]);C=q.slot_props,D=q.hasUnresolvedSpread}let P=S.publicName==="children"?void 0:S.publicName,L=P===void 0?Tn:P;if(C!==void 0)Sn(t,{slot_name:P,slot_props:C,slot_props_unresolved_spread:D||void 0,source:le(t,l)});if(C!==void 0||t.slots.has(L))t.snippetPropLocals.add(S.trackingName)}function Qc(t,l,S){let C=l.name;if(l.expression!=null||!C)return;if(S==null||!("name"in S))return;let D=typeof S.name==="string"?S.name:void 0,P=S.type;if(!D||!P)return;let L=bn(P)?{type:"InlineComponent",name:D}:{type:"Element",name:D};t.forwardedEvents.set(C,L);let q=t.events.get(C),M=t.eventDescriptions.get(C),j=q?.deprecated,O=q?.internal;if(!q)t.events.set(C,{type:"forwarded",name:C,element:L,description:M,deprecated:j,...O?{internal:!0}:{},source:le(t,l)});else if(q.type==="forwarded"&&M&&!q.description)t.events.set(C,{...q,description:M,deprecated:q.deprecated??j,...q.internal||O?{internal:!0}:{},source:q.source||le(t,l)})}function ep(t,l,S){if(!(S&&(vn(S.type)||bn(S.type))))return;let C=l.expression.type==="Identifier"?l.expression.name:void 0;if(C){let D=cn(t,C);if(D)t.reactive_vars.add(D)}if(vn(S.type)&&l.name==="this"&&C&&"name"in S&&typeof S.name==="string"){let D=cn(t,C);if(!D)return;let P=S.name;if(t.bindings.has(D)){let L=t.bindings.get(D);if(L&&!L.elements.includes(P))t.bindings.set(D,{...L,elements:[...L.elements,P]})}else t.bindings.set(D,{elements:[P]})}}function es(t){let l={dispatcherName:void 0,dispatcherDeclaratorNode:void 0,dispatcherTypeArgument:void 0,hostLocalNames:new Set,hostDispatchedEventNames:new Set,hostDispatches:[],callees:[],callsWithArguments:[],locallyBoundCalls:new Set},S={type:"ComponentRoot",instance:t.parsed?.instance,fragment:t.parsed?.fragment};Ai(t),t.activeScopes.push(t.componentScope);let C=Ni(t);return R(S,(D,P)=>{let L=Li(t,C,D);if(L)t.activeScopes.push(L);if(!Kc.has(D.type))return;switch(D.type){case"AssignmentExpression":hr(t,D.left);break;case"UpdateExpression":hr(t,D.argument);break;case"CallExpression":Xc(t,l,D,P);break;case"SpreadAttribute":{let q=D.expression.type==="Identifier"?D.expression.name:void 0;if(q==="$$restProps"||t.restPropLocals.has(q??""))_o(t,P);break}case"FunctionDeclaration":if(D.id?.name)t.funcDecls.set(D.id.name,D);break;case"ImportDeclaration":U(t,D);break;case"VariableDeclaration":if(t.vars.add(D),P?.type==="Program"&&D.declarations.some((q)=>d(m(q.init),"$props")))Jo(t,D);break;case"ExportNamedDeclaration":Bo(t,D,P?.type==="Program"?P:null);break;case"Comment":{let q=D.data.trim();if(Zo.test(q))t.componentComment=q.replace(Zo,"").replace(Jc,""),t.componentCommentSource=le(t,D);break}case"SlotElement":Yc(t,D);break;case"RenderTag":Zc(t,D);break;case"OnDirective":Qc(t,D,P);break;case"BindDirective":ep(t,D,P);break}},(D)=>{if(un(D))t.activeScopes.pop(),qi(C,D)},{skipTypeOnlySubtrees:!0}),l}var ts={a:"HTMLAnchorElement",abbr:"HTMLElement",address:"HTMLElement",applet:"HTMLUnknownElement",area:"HTMLAreaElement",article:"HTMLElement",aside:"HTMLElement",audio:"HTMLAudioElement",b:"HTMLElement",base:"HTMLBaseElement",basefont:"HTMLElement",bdi:"HTMLElement",bdo:"HTMLElement",blockquote:"HTMLQuoteElement",body:"HTMLBodyElement",br:"HTMLBRElement",button:"HTMLButtonElement",canvas:"HTMLCanvasElement",caption:"HTMLTableCaptionElement",cite:"HTMLElement",code:"HTMLElement",col:"HTMLTableColElement",colgroup:"HTMLTableColElement",data:"HTMLDataElement",datalist:"HTMLDataListElement",dd:"HTMLElement",del:"HTMLModElement",details:"HTMLDetailsElement",dfn:"HTMLElement",dialog:"HTMLDialogElement",dir:"HTMLDirectoryElement",div:"HTMLDivElement",dl:"HTMLDListElement",dt:"HTMLElement",em:"HTMLElement",embed:"HTMLEmbedElement",fieldset:"HTMLFieldSetElement",figcaption:"HTMLElement",figure:"HTMLElement",font:"HTMLFontElement",footer:"HTMLElement",form:"HTMLFormElement",frame:"HTMLFrameElement",frameset:"HTMLFrameSetElement",h1:"HTMLHeadingElement",h2:"HTMLHeadingElement",h3:"HTMLHeadingElement",h4:"HTMLHeadingElement",h5:"HTMLHeadingElement",h6:"HTMLHeadingElement",head:"HTMLHeadElement",header:"HTMLElement",hgroup:"HTMLElement",hr:"HTMLHRElement",html:"HTMLHtmlElement",i:"HTMLElement",iframe:"HTMLIFrameElement",img:"HTMLImageElement",input:"HTMLInputElement",ins:"HTMLModElement",kbd:"HTMLElement",label:"HTMLLabelElement",legend:"HTMLLegendElement",li:"HTMLLIElement",link:"HTMLLinkElement",main:"HTMLElement",map:"HTMLMapElement",mark:"HTMLElement",marquee:"HTMLMarqueeElement",menu:"HTMLMenuElement",meta:"HTMLMetaElement",meter:"HTMLMeterElement",nav:"HTMLElement",noscript:"HTMLElement",object:"HTMLObjectElement",ol:"HTMLOListElement",optgroup:"HTMLOptGroupElement",option:"HTMLOptionElement",output:"HTMLOutputElement",p:"HTMLParagraphElement",param:"HTMLParamElement",picture:"HTMLPictureElement",pre:"HTMLPreElement",progress:"HTMLProgressElement",q:"HTMLQuoteElement",rp:"HTMLElement",rt:"HTMLElement",ruby:"HTMLElement",s:"HTMLElement",samp:"HTMLElement",script:"HTMLScriptElement",search:"HTMLElement",section:"HTMLElement",select:"HTMLSelectElement",slot:"HTMLSlotElement",small:"HTMLElement",source:"HTMLSourceElement",span:"HTMLSpanElement",strong:"HTMLElement",style:"HTMLStyleElement",sub:"HTMLElement",summary:"HTMLElement",sup:"HTMLElement",table:"HTMLTableElement",tbody:"HTMLTableSectionElement",td:"HTMLTableCellElement",template:"HTMLTemplateElement",textarea:"HTMLTextAreaElement",tfoot:"HTMLTableSectionElement",th:"HTMLTableCellElement",thead:"HTMLTableSectionElement",time:"HTMLTimeElement",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"HTMLTrackElement",u:"HTMLElement",ul:"HTMLUListElement",var:"HTMLElement",video:"HTMLVideoElement",wbr:"HTMLElement"};function tp(t){return t in ts}function ns(t){if(tp(t))return ts[t];return"HTMLElement"}var rs=new Map;function is(t){let l=rs.get(t);if(l!==void 0)return l;let S=In(t,{inline:!0});return rs.set(t,S),S}var np=/^\{\s*\}$/;function on(t){return Array.from(t,([l,S])=>S)}function rp(t,l){let{dispatcherName:S,callees:C}=l;for(let P of l.hostDispatches)Ui(t,P);if(S!==void 0){Ko(t,l.dispatcherTypeArgument,S,le(t,l.dispatcherDeclaratorNode));for(let P of C)if(P.name===S){let L=P.arguments[0],q=L&&typeof L==="object"&&"value"in L?L.value:void 0,M=P.arguments[1],j=Tr(vr(t,P.nestedBoundDetailNames),M),O=j===void 0&&M&&typeof M==="object"&&"value"in M?M.value:void 0,H=O===null&&M.raw==="null";if(q!=null)Ut(t,{name:String(q),detail:j??(H?"null":O==null?"":he(O)),has_argument:Boolean(M),source:le(t,P.node)})}}let D=new Set(l.hostDispatchedEventNames);if(S!==void 0){for(let P of C)if(P.name===S){let L=P.arguments[0],q=L&&typeof L==="object"&&"value"in L?L.value:void 0;if(q!=null)D.add(String(q))}}return t.forwardedEvents.forEach((P,L)=>{let q=t.events.get(L);if(q&&q.type==="dispatched"&&!D.has(L)){let M=t.eventDescriptions.get(L),j={type:"forwarded",name:L,element:P,description:M,deprecated:q.deprecated,tags:q.tags,source:q.source};if(q.internal)j.internal=!0;if(q.detail!==void 0&&q.detail!=="undefined")j.detail=q.detail;t.events.set(L,j)}}),D}function ip(t){let l=t.syntaxMode==="runes"?new Set(Array.from(t.snippetPropLocals,(S)=>pr(t,S))):new Set;return on(t.props).filter((S)=>!(l.has(S.name)&&t.slots.has(S.name==="children"?Tn:S.name))).map((S)=>{if(t.bindings.has(S.name)){let C=t.bindings.get(S.name)?.elements.sort().map((D)=>ns(D)).join(" | ");return{...S,type:`null | ${C}`,typeSource:"inferred",reactive:S.reactive||t.reactive_vars.has(S.name)}}return{...S,reactive:S.reactive||t.reactive_vars.has(S.name)}})}function op(t){return on(t.slots).map((l)=>{let{slot_props_unresolved_spread:S,...C}=l;if(!l.slot_props)return C;if(typeof l.slot_props==="string")return np.test(l.slot_props)?{...C,slot_props:"Record<string, never>"}:C;let D=l.slot_props,P=[];for(let M of Object.keys(D)){if(D[M].replace&&D[M].value!==void 0)D[M].value=an(t,D[M].value);if(D[M].value===void 0)D[M].value="any";P.push(`${M}: ${D[M].value}`)}let L=S?" & Record<string, any>":"",q=P.length===0?S?"Record<string, any>":"Record<string, never>":P.length===1?`{ ${P[0]} }${L}`:`{
|
|
21
|
+
${P.join(`;
|
|
22
|
+
`)};
|
|
23
|
+
}${L}`;return{...C,slot_props:q}}).sort((l,S)=>{let C=l.name??"",D=S.name??"";if(C<D)return-1;if(C>D)return 1;return 0})}function sp(t,l,S){if(t.deferredSlotBlockGenerics.length>0){let C=[...l.map((D)=>D.type??""),...S.map((D)=>D.slot_props??"")].join(`
|
|
24
|
+
`);for(let{name:D,constraint:P}of t.deferredSlotBlockGenerics){let L=D.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(!new RegExp(`\\b${L}\\b`).test(C))continue;Kn(t,D,P)}}if(t.scriptGenericsAttribute){if(t.generics)ce(t,"syntax-skipped","generics",'Both the "generics" script attribute and @generics/@template JSDoc tags declare component generics; the script attribute takes precedence and the JSDoc declaration was ignored.',t.scriptGenericsAttribute.source);t.generics=$o(t.scriptGenericsAttribute.value)}}function ap(t){return on(t.events).map((l)=>{switch(l.type){case"forwarded":return{...l,element:l.element.name};case"dispatched":return l;default:return l}}).sort(pe)}function lp(t,l,S){let C={props:new Map(t.pendingCallDefaultCandidates.filter((D)=>D.location==="props").map((D)=>[D.propName,D])),moduleExports:new Map(t.pendingCallDefaultCandidates.filter((D)=>D.location==="moduleExports").map((D)=>[D.propName,D]))};for(let D of l)if(D.typeSource==="unknown"){let P=C.props.get(D.name);if(P)D.type="any";let L=P?P.importSource?`Prop "${D.name}" default calls "${P.calleeName}()" imported from "${P.importSource}"; falling back to "any" pending cross-file resolution.`:`Prop "${D.name}" default calls "${P.calleeName}()", but its return type could not be inferred; falling back to "any".`:`Prop "${D.name}" type could not be inferred; falling back to "${D.type??"any"}".`;ce(t,"prop-unknown-type",D.name,L,D.source)}for(let D of S)if(D.typeSource==="unknown"&&C.moduleExports.has(D.name))D.type="any"}function Xn(t,l,S,C){if(l===void 0||is(l))return!0;let D=In(l)?"has a `//` comment, which would comment out the code after it in the .d.ts":"is not valid TypeScript";return ce(t,"type-syntax-error",S,`Type \`${l}\` of "${S}" ${D}; falling back to "any".`,C),!1}function cp(t,l,S,C,D){for(let P of l)if(P.typeSource==="jsdoc"&&!Xn(t,P.type,P.name,P.source))P.type="any";for(let P of S)if(P.type==="dispatched"&&!Xn(t,P.detail,P.name,P.source))P.detail="any";for(let P of C)if(!Xn(t,P.slot_props,P.name??"default",P.source))P.slot_props="any";for(let P of D)if(!Xn(t,P.type,P.name,P.source))P.type="any",P.ts=`type ${P.name} = any;`}function pp(t,l){let{dispatcherName:S}=l,C=[];if(S===void 0)return C;let D=[];for(let L of l.callsWithArguments){let q=Gi(L,S);if(q)D.push({call:L,...q})}if(D.length>0)Ft(t,"dispatch-escapes",S,Wt(t,S)?.sveldIgnore);let P=lr(t,"dispatch-escapes",S);for(let{call:L,argumentIndex:q,property:M}of D){let j=l.locallyBoundCalls.has(L)?void 0:ye(t,L.callee);if(!j){C.push(L);continue}let O=le(t,L);t.pendingDispatchEscapeCandidates.push({importSource:j.source,importedName:j.importedName,...j.members?{members:j.members}:{},calleeText:Mt(t,L.callee)??j.importedName,dispatcherName:S,argumentIndex:q,...M===void 0?{}:{property:M},...O?{source:O}:{},...P?{ignored:P}:{}})}return C}function up(t,l,S){for(let C of t.jsDocEventNames){if(l.has(C))continue;if(t.forwardedEvents.has(C))continue;if(t.props.has(`on${C}`))continue;if(S.length>0)continue;let D=ar(t,"event-no-source",C,`@event "${C}" has no matching dispatch or callback prop.`,t.jsDocEventSources.get(C));if(t.pendingDispatchEscapeCandidates.length>0)t.deferredEventNoSourceDiagnostics.push(D);else t.diagnosticRecords.push(D)}}function dp(t,l){let S=l.typedefs.filter((P)=>P.internal).map((P)=>P.name.split("<")[0]);if(S.length===0)return;let C=S.map((P)=>({name:P,regex:new RegExp(`\\b${P}\\b`)})),D=(P,L,q)=>{if(!L)return;for(let{name:M,regex:j}of C){if(!j.test(L))continue;ce(t,"internal-typedef-referenced",P,`"${P}" references "${M}", which is @internal and excluded from output; the generated .d.ts will contain a dangling reference to it.`,q)}};for(let P of l.props){if(P.internal)continue;D(P.name,P.type,P.source)}for(let P of l.moduleExports){if(P.internal)continue;D(P.name,P.type,P.source)}for(let P of l.typedefs){if(P.internal)continue;D(P.name,P.ts)}for(let P of l.events){if(P.internal||P.type!=="dispatched")continue;D(P.name,P.detail,P.source)}for(let P of l.slots){if(P.internal)continue;D(P.name??"default",P.slot_props,P.source)}for(let P of l.contexts){if(P.internal)continue;if(P.type!==void 0)D(P.typeName,P.type,P.source);for(let L of P.properties)D(L.name,L.type)}}function os(t,l){let S=rp(t,l);Xo(t,S);let C=ip(t);t.activeScopes.length=0;let D=op(t);sp(t,C,D);let P=on(t.moduleExports),L=ap(t),q=on(t.typedefs),M=on(t.contexts);lp(t,C,P),cp(t,C,L,D,q);let j=pp(t,l);up(t,S,j);let{dispatcherName:O}=l;for(let ee of j){let Z=Mt(t,ee.callee)??"";ce(t,"dispatch-escapes",O??"",`\`${O}\` is passed to \`${Z}\`, which sveld can't follow: it only reads a function imported from another module, by name, as its default export, or through a namespace import. Document the events dispatched there with @event tags.`,le(t,ee))}if(t.rest_props?.type==="InlineComponent")ce(t,"rest-props-unresolved","$$restProps",`$$restProps is only spread onto component "${t.rest_props.name}"; sveld cannot infer its rest-prop type. Spread onto a plain element or add an @restProps tag.`);dp(t,{props:C,moduleExports:P,typedefs:q,events:L,slots:D,contexts:M});let H={source:wn(t,0,t.source?.length),syntaxMode:t.syntaxMode,...t.scriptLanguage?{scriptLanguage:t.scriptLanguage}:{},props:C,moduleExports:P,slots:D,events:L,typedefs:q,generics:t.generics,rest_props:t.rest_props,extends:t.extends,componentComment:t.componentComment,componentCommentSource:t.componentCommentSource,contexts:M,customElementTag:t.customElementTag,customElement:t.customElement,...t.cssParts.length>0?{cssParts:t.cssParts.slice()}:{},...t.cssProperties.length>0?{cssProperties:t.cssProperties.slice()}:{},diagnostics:t.diagnosticRecords.slice()},z=hi(t);if(z)H[h]=z;let K=yi(t);return K?{component:H,pending:K}:{component:H}}function fp(t){if(t.computed)return;if(t.key.type==="Identifier")return t.key.name;if(t.key.type==="Literal"&&(typeof t.key.value==="string"||typeof t.key.value==="number"))return String(t.key.value);return}function ss(t){return t==="private"||t==="protected"}function sn(t){return{...t?.description?{description:t.description}:{},...t?.deprecated===void 0?{}:{deprecated:t.deprecated},...t?.tags?{tags:t.tags}:{}}}function ls(t){return t?.slice(1,-1).trim()||void 0}function Ur(t,l,S){let C=dr(t,l),D=new Map((S?.params??[]).map((M)=>[M.name,M])),P=C.params.map(({name:M,type:j,optional:O,rest:H})=>{let z=D.get(M);return{name:H?`...${M}`:M,type:j??z?.type??(H?"any[]":"any"),...z?.description?{description:z.description}:{},...!H&&(O||z?.optional)?{optional:!0}:{}}}),L=C.returnType??S?.returnType??(l.async?"Promise<any>":void 0),q=ls(C.typeParameters)??S?.typeParameters;return{...P.length>0?{params:P}:{},...L?{returnType:L}:{},...q?{typeParameters:q}:{}}}function cs(t,l){let S=[],C=new Map,D=new Set,P=new Set,L,q=-1;for(let O of l.body.body){if(O.type!=="MethodDefinition"&&O.type!=="PropertyDefinition")continue;if(ss(O.accessibility))continue;let H=fp(O);if(H===void 0)continue;let z=Re(t,O);if(z?.internal)continue;let K=`${O.static?"static ":""}${H}`,ee={...O.static?{static:!0}:{},...O.optional?{optional:!0}:{},...O.abstract?{abstract:!0}:{}};if(O.type!=="MethodDefinition"){if(Pe(t,O.typeAnnotation?.typeAnnotation),!O.static)P.add(H);S.push({kind:"property",name:H,type:Vt(t,O.typeAnnotation)??z?.type??"any",...ee,...O.readonly?{readonly:!0}:{},...sn(z)});continue}let Z=O.value,fe=O.typeParameters?{...Z,typeParameters:O.typeParameters}:Z;if(O.kind==="constructor"){let me=Ur(t,fe,z);S.push({kind:"constructor",name:"constructor",params:me.params,...sn(z)}),q=S.length,L=fe.type==="FunctionExpression"?fe.body.body:void 0,fe.params.forEach((Ce,vt)=>{if(Ce.type!=="TSParameterProperty"||ss(Ce.accessibility))return;let Ct=me.params?.[vt];if(!Ct)return;P.add(Ct.name),S.push({kind:"property",name:Ct.name,type:Ct.type,...Ce.readonly?{readonly:!0}:{},...Ct.description?{description:Ct.description}:{}})});continue}if(O.kind==="get"||O.kind==="set"){let me=Ur(t,fe,z),Ce=O.kind==="get"?me.returnType??z?.type:me.params?.[0]?.type??z?.type,vt=C.get(K);if(vt){if(O.kind==="set")vt.readonly=void 0;if(Ce&&Ce!=="any"&&(vt.type==="any"||O.kind==="get"))vt.type=Ce;if(!vt.description&&!vt.deprecated)Object.assign(vt,sn(z));continue}let Ct={kind:"property",name:H,type:Ce??"any",...ee,...O.kind==="get"?{readonly:!0}:{},...sn(z)};C.set(K,Ct),S.push(Ct);continue}if(fe.type==="TSDeclareMethod"&&!O.abstract)D.add(K);else if(fe.type!=="TSDeclareMethod"&&D.has(K))continue;S.push({kind:"method",name:H,...ee,...Ur(t,fe,z),...sn(z)})}if(t.scriptLanguage!=="ts"&&L)S.splice(q,0,...gp(t,L,P));for(let O of l.typeParameters?.params??[])Pe(t,O.constraint),Pe(t,O.default);let M=ls(Kt(t,l.typeParameters)),j=mp(t,l);return{members:S,...M?{typeParameters:M}:{},...j}}function mp(t,l){let S={},C=l.superClass;if(C){if(S.extends=Kt(t,{start:C.start,end:l.superTypeParameters?.end??C.end}),C.type==="Identifier")as(t,C,l.superTypeParameters)}let D=(l.implements??[]).map((P)=>(as(t,P.expression,P.typeParameters),Kt(t,P))).filter((P)=>Boolean(P));if(D.length>0)S.implements=D;return S}function as(t,l,S){Pe(t,{type:"TSTypeReference",typeName:l,start:l.start,end:S?.end??l.end,...S?{typeArguments:S}:{}})}function gp(t,l,S){let C=[];for(let D of l){let P=D.type==="ExpressionStatement"?D.expression:void 0;if(P?.type!=="AssignmentExpression"||P.operator!=="=")continue;let L=P.left;if(L.type!=="MemberExpression"||L.computed||L.object.type!=="ThisExpression")continue;let q=L.property.type==="Identifier"?L.property.name:void 0;if(!q||S.has(q))continue;S.add(q);let M=Re(t,D);if(M?.internal)continue;C.push({kind:"property",name:q,type:M?.type??"any",...sn(M)})}return C}var yp=/^[A-Za-z_$][\w$]*(?=\s*(?:<|$))/;function Jr(t,l,S){if(a(l)===void 0)return;if(t.moduleExports.has(l)){let C=t.moduleExports.get(l);t.moduleExports.set(l,{...C,...S})}else t.moduleExports.set(l,S)}function ps(t,l,S,C){let D=Re(t,l);Jr(t,S==="*"?`* from ${C.from}`:S,{name:S,kind:"re-export",description:D?.description,deprecated:D?.deprecated,tags:D?.tags,...D?.internal?{internal:!0}:{},isFunction:!1,isFunctionDeclaration:!1,isRequired:!1,constant:!1,reactive:!1,reExport:C,source:le(t,l)})}function us(t,l){ce(t,"module-export-conflict","default",`export "default" was skipped because it collides with the component's own default export.`,le(t,l))}function hp(t,l,S,C){let D=S.id?.name;if(!D)return;let P=C?.exportedName??D,L=Jn(t,l,C),{members:q,typeParameters:M,extends:j,implements:O}=cs(t,S),H=M??L?.typeParameters;Jr(t,P,{name:P,...D===P?{}:{localName:D},kind:"class",description:L?.description,deprecated:L?.deprecated,tags:L?.tags,...L?.internal?{internal:!0}:{},type:`typeof ${D}`,...H?{typeParameters:H}:{},members:q,...S.abstract?{abstract:!0}:{},...j?{extends:j}:{},...O?{implements:O}:{},isFunction:!1,isFunctionDeclaration:!1,isRequired:!1,constant:!1,reactive:!1,source:le(t,l)})}function ds(t,l,S,C){if(S.type==="ClassDeclaration"){hp(t,l,S,C);return}let D=Vr(t,S,C,"moduleExports");if(D.length===0)return;let P=Jn(t,l,C);for(let L of D){let{prop_name:q,kind:M}=L,{type:j,typeSource:O,description:H,params:z,returnType:K,isFunction:ee,typeParameters:Z}=Hr(t,L,P);Jr(t,q,{name:q,kind:M,description:H,deprecated:P?.deprecated,tags:P?.tags,...P?.internal?{internal:!0}:{},type:j,typeSource:O,value:L.value,defaultValue:L.defaultValue,params:z,returnType:K,typeParameters:Z,isFunction:ee,isFunctionDeclaration:L.isFunctionDeclaration,isRequired:!1,constant:M==="const",reactive:!1,source:le(t,l)})}}function bp(t){let l=Array.from(t.moduleExports.values()).filter((C)=>C.kind==="class"),S=new Set(l.map((C)=>C.localName??C.name));for(let C of l){if(!C.extends)continue;let D=yp.exec(C.extends)?.[0];if(D&&(S.has(D)||t.valueImportBindingsByLocalName.has(D)||t.typeImportBindingsByLocalName.has(D)))continue;ce(t,"export-unresolved",C.name,`class "${C.name}" extends \`${C.extends}\`, which isn't imported or an exported class, so the .d.ts declares it without \`extends\` and its inherited members are missing. Export the base class from the module script.`,C.source),C.extends=void 0}}function fs(t){let l=t.parsed?.module;if(!l)return;let S=Ie(l);R(l,(C,D)=>{if(C.type==="ImportDeclaration")U(t,C);if(C.type==="FunctionDeclaration"&&C.id?.name)t.funcDecls.set(C.id.name,C);if(C.type==="VariableDeclaration")t.vars.add(C);if(C.type==="ExportNamedDeclaration"){if(C.declaration!=null){ds(t,C,C.declaration);return}let P=C.source?.value,L=D?.type==="Program"?D:null;for(let q of C.specifiers){let M=Or(t,C,q,L,"module");if(!M)continue;if(M.exportedName==="default"){us(t,C);continue}let j=typeof P==="string"?{from:P,imported:M.localName}:S.get(M.localName);if(M.declaration)ds(t,C,M.declaration,M);else if(j)ps(t,C,M.exportedName,j);else if(!t.localTypeDeclarationsByName.get(M.localName)?.exported)$r(t,C,M.localName,M.exportedName)}}if(C.type==="ExportAllDeclaration"&&typeof C.source.value==="string"){let P=(C.exported&&Un(C.exported))??"*";if(P==="default"){us(t,C);return}ps(t,C,P,{from:C.source.value,imported:"*"})}}),bp(t)}var vp=/\s*=\s*/;function Tp(t){let l=t.indexOf("<");if(l===-1||!t.endsWith(">"))return t;let S=t.slice(0,l),C=t.slice(l+1,-1),D=i(C,",").map((P)=>P.trim().replace(vp," = ")).join(", ");return`${S}<${D}>`}var Sp=new Set(["restProps","slot","snippet","event","typedef","callback"]),Kr=new Set(["property","type"]),xp=new Set(["slot","snippet","typedef","callback"]);function Yn(t){if(!t||t.length===0)return;return t[tr(t)].content}function ms(t){return!t||!t.tag&&!t.continuesType&&t.content.trim()===""}function Ep(t){return t.text.split(`
|
|
25
|
+
`).length===t.lines.length}function Xr(t,l){if(l<=0)return t;return t.split(`
|
|
26
|
+
`).slice(0,-l).join(`
|
|
27
|
+
`).trimEnd()}var kp=new Set(["abstract","access","alias","alpha","arg","argument","async","augments","author","beta","borrows","const","constructs","copyright","defaultValue","description","emits","experimental","exports","external","fires","function","global","import","inner","instance","kind","lends","license","link","listens","member","name","override","package","private","prop","protected","public","readonly","remarks","requires","satisfies","sealed","static","summary","throws","todo","tutorial","typeParam","version","virtual","yields"]),Cp=[...En,...nr,"type","param","returns","typedef","property","callback","template","generics","slot","snippet","event","restProps","extends","extendProps","deprecated","ignore","internal","sveld-ignore","csspart","cssprop"],Dp=/;$/;function wp(t){let l=t.trim().replace(Dp,"").trimEnd();if(!l.startsWith("{")||!l.endsWith("}"))return!1;return _(l,0)===l.length-1}var Pp=/[\w$]+/g,Ap=new Set(["property","param","returns","return"]);function Np(t,l,S){let C=[t[l].type];for(let P=l+1;Ap.has(t[P]?.tag);P++)C.push(t[P].type);let D=new Set(C.join(" ").match(Pp));return S.some(({name:P})=>D.has(P))}function Lp(t){let l=t?.trim();return!l||l==="object"||l==="Object"}function gs(t,l){if(l.usedGenericsTag&&l.usedTemplateTag&&!l.warnedMixedGenericsTags){l.warnedMixedGenericsTags=!0;let S=t.componentFilePath?` in ${t.componentFilePath}`:"";console.warn(`Warning: Both @generics and @template tags are used to declare component generics${S}; their declarations are combined in the order encountered.`)}}function ys(t,l,S,C){if(l.seenGenericNames.has(S))ce(t,"generics-conflict",S,`Duplicate generic name "${S}".`,C);else l.seenGenericNames.add(S)}function hs(t,l,S){if(t.generics){let D=i(t.generics[0],",").map((P)=>P.trim()).indexOf(l.trim());if(D!==-1){let P=i(t.generics[1],",").map((L)=>L.trim());P[D]=S,t.generics=[t.generics[0],P.join(", ")];return}}Kn(t,l,S)}function bs(t,l,S){if(t.typedefs.has(l))ce(t,"typedef-duplicate",l,`Duplicate typedef/callback name "${l}"; the later declaration overwrites the earlier one.`,S)}function vs(t,l,S,C,D){let P=l.findIndex((L)=>L.name===S.name);if(P===-1)l.push(S);else{let L=C?` of "${C}"`:"";ce(t,"property-duplicate",S.name,`Duplicate property "${S.name}"${L}; the later declaration overwrites the earlier one.`,D),l[P]=S}}class Ts{tags;lines;commentDescription;commentDescriptionUsed=!1;isFirstTag=!0;eventName;eventType;eventDescription;eventDeprecated;eventInternal=!1;eventSource;eventTagLine;eventTags=[];eventIgnores=[];eventProperties=[];typedefName;typedefType;typedefDescription;typedefSource;typedefTags=[];typedefInternal=!1;typedefProperties=[];callbackName;callbackDescription;callbackSource;callbackTags=[];callbackInternal=!1;callbackParams=[];callbackReturnType;attachTrailingTag;pendingTags=[];pendingDeprecated;pendingInternal=!1;pendingTypeParameters=[];lineDescriptions=new Map;tagLineNumbers=new Set;consumedDescriptionLines=new Set;indentedContinuationLines=new Set;trimBodyAbove;trimThisBody;hasSlotOrSnippetTag;hasExtendsTag;ctx;generics;documentsFunction;constructor(t,l,S,C){this.ctx=t,this.generics=l,this.documentsFunction=C;let{tags:D,lines:P}=S;this.tags=D,this.lines=P,this.commentDescription=S.description,this.hasSlotOrSnippetTag=D.some((M)=>M.tag==="slot"||M.tag==="snippet"),this.hasExtendsTag=D.some((M)=>M.tag==="extends"||M.tag==="extendProps");for(let M of D)if(M.lines.length>0)this.tagLineNumbers.add(M.lines[0].number);for(let M of P)if(M.continuesType)this.tagLineNumbers.add(M.number);let L=!1,q=!1;for(let M of P){if(!M.tag&&!M.continuesType&&M.content&&(q||M.content.trim()!=="}"))this.lineDescriptions.set(M.number,M.content);if(M.tag!==void 0||M.continuesType)L=!0;else if(!M.content.trim());else if(L&&(M.indent||q))this.indentedContinuationLines.add(M.number);else L=!1;if(V(M.content))q=!q}}orCommentDescription(t){if(t||!this.isFirstTag||this.commentDescriptionUsed||!this.commentDescription)return t;return this.commentDescriptionUsed=!0,this.commentDescription}typeDeclarationName(t){if(this.pendingTypeParameters.length===0)return Tp(t);let l=`${t}<${this.pendingTypeParameters.join(", ")}>`;return this.pendingTypeParameters.length=0,l}joinBlockLines(t,l){let S=l?l.text.split(`
|
|
28
|
+
`):[],C=l?.line;for(let D of t){if(C!==void 0&&D-C>1){let L=C+1;while(L<D&&ms(this.lines[L]))L++;if(L===D)for(let q=C+1;q<D;q++)S.push("")}let P=this.lines[D];S.push(P.indent+P.content),C=D}return xn(S)}getPrecedingDescription(t){if(t.length===0)return;let l=t[0].number,S=[],C=!1;for(let D=l-1;D>=0;D--){if(this.tagLineNumbers.has(D)||this.indentedContinuationLines.has(D)||this.consumedDescriptionLines.has(D))break;if(this.lineDescriptions.has(D))S.unshift(D),C=!0;else if(C&&!ms(this.lines[D]))break}if(S.length===0)return;for(let D of S)this.consumedDescriptionLines.add(D);return this.trimBodyAbove?.(S[0]),this.joinBlockLines(S)}claimBodyLines(t,l){if(!Ep(t)){for(let C=1;C<t.lines.length;C++)this.consumedDescriptionLines.add(t.lines[C].number);return}let S=t.lines[t.lines.length-1].number;this.trimThisBody=(C)=>l(S-C+1)}getTagDescription(t,l,S=!1){let C=Ot(Yn(t)),D=l!==void 0&&Sp.has(l.tag)&&!Ot(Yn(l.lines)),P=S&&(l===void 0||!Kr.has(l.tag)),L=[];for(let q=1;q<t.length;q++){let M=t[q];if((D||P)&&!this.indentedContinuationLines.has(M.number))continue;if(!this.lineDescriptions.get(M.number)?.trim()||this.consumedDescriptionLines.has(M.number))continue;L.push(M.number),this.consumedDescriptionLines.add(M.number)}if(L.length===0)return C;return this.joinBlockLines(L,{text:C??"",line:t[tr(t)].number})}flagDescriptionAfterEvent(t,l,S,C){if(this.eventName===void 0||this.eventDescription)return;if(this.eventTagLine!==void 0&&this.indentedContinuationLines.has(this.eventTagLine+1))return;if(C?.tag!=="event"&&!Kr.has(C?.tag??""))return;if(Ot(Yn(S)))return;let D=l?`@${t} "${l}"`:`@${t}`;ce(this.ctx,"event-description-ambiguous",this.eventName,`Text after @event "${this.eventName}" was used as the description of ${D}. Move it above the tag it describes, indent it as a continuation line, or give each event its own comment block.`,qt(this.ctx,S))}takePrecedingDescription(t){let{tag:l,name:S,lines:C}=this.tags[t],D=this.getPrecedingDescription(C);if(D)this.flagDescriptionAfterEvent(l,S,C,this.tags[t-1]);return D}finalizeEvent(){if(this.eventName===void 0)return;let{ctx:t}=this,l=this.eventType&&this.eventType!=="object"&&this.eventType!=="Object"?this.eventType:void 0,S;if(l)S=l;else if(this.eventProperties.length>0)S=fn(this.eventProperties,this.eventName,!0);else S=this.eventType||"";if(this.eventTagLine!==void 0){let D;for(let q of this.tags){let M=q.lines[0]?.number;if(typeof M!=="number")continue;if(M<=this.eventTagLine)continue;if(Kr.has(q.tag))continue;D=M;break}let P=[],L=Array.from(this.lineDescriptions.keys()).sort((q,M)=>q-M);for(let q of L){if(q<=this.eventTagLine)continue;if(D!==void 0&&q>=D)continue;if(this.consumedDescriptionLines.has(q))continue;if(this.lineDescriptions.get(q)?.trim())P.push(q),this.consumedDescriptionLines.add(q)}if(P.length>0)this.eventDescription=this.joinBlockLines(P,this.eventDescription?{text:this.eventDescription,line:this.eventTagLine}:void 0)}let C=S===""&&(!t.events.has(this.eventName)||t.untypedJsDocEventNames.has(this.eventName));if(Ut(t,{name:this.eventName,detail:S,has_argument:!1,description:this.eventDescription,deprecated:this.eventDeprecated,tags:this.eventTags.length>0?this.eventTags:void 0,internal:this.eventInternal||void 0,source:this.eventSource}),C)t.untypedJsDocEventNames.add(this.eventName);t.eventDescriptions.set(this.eventName,this.eventDescription),t.jsDocEventNames.add(this.eventName),t.jsDocEventSources.set(this.eventName,this.eventSource),Ft(t,"event-no-source",this.eventName,this.eventIgnores),this.eventProperties.length=0,this.eventName=void 0,this.eventType=void 0,this.eventDescription=void 0,this.eventDeprecated=void 0,this.eventInternal=!1,this.eventSource=void 0,this.eventTagLine=void 0,this.eventTags=[],this.eventIgnores=[]}finalizeTypedef(){if(this.typedefName===void 0)return;let{ctx:t}=this,l,S;if(this.typedefProperties.length>0)l=fn(this.typedefProperties,void 0,!0),S=`type ${this.typedefName} = ${l};`;else if(this.typedefType)l=this.typedefType,S=wp(l)?`interface ${this.typedefName} ${l}`:`type ${this.typedefName} = ${l};`;else l="{}",S=`type ${this.typedefName} = ${l};`;let C=this.typedefProperties.length>0?this.typedefProperties.filter(({name:D})=>!D.includes(".")&&!D.startsWith("[")).map(({name:D,type:P,optional:L,description:q})=>({name:D,type:P,optional:L===!0,...q?{description:q}:{}})):$t(l);if(C)t.typedefMembersByName.set(this.typedefName,C);bs(t,this.typedefName,this.typedefSource),t.typedefs.set(this.typedefName,{type:l,name:this.typedefName,description:a(this.typedefDescription),ts:S,tags:this.typedefTags.length>0?this.typedefTags:void 0,...this.typedefInternal?{internal:!0}:{},source:this.typedefSource}),this.typedefProperties.length=0,this.typedefName=void 0,this.typedefType=void 0,this.typedefDescription=void 0,this.typedefSource=void 0,this.typedefTags=[],this.typedefInternal=!1}finalizeCallback(){if(this.callbackName===void 0)return;let t=this.callbackParams.map(({name:D,type:P,optional:L})=>`${D}${L?"?":""}: ${P}`).join(", "),l=this.callbackReturnType||"void",S=`(${t}) => ${l}`,C=`type ${this.callbackName} = ${S};`;bs(this.ctx,this.callbackName,this.callbackSource),this.ctx.typedefs.set(this.callbackName,{type:S,name:this.callbackName,description:a(this.callbackDescription),ts:C,tags:this.callbackTags.length>0?this.callbackTags:void 0,...this.callbackInternal?{internal:!0}:{},source:this.callbackSource}),this.callbackParams.length=0,this.callbackReturnType=void 0,this.callbackName=void 0,this.callbackDescription=void 0,this.callbackSource=void 0,this.callbackTags=[],this.callbackInternal=!1}readExtends(t,l){let{name:S,lines:C}=this.tags[t];if(this.ctx.extends!==void 0)ce(this.ctx,"extend-props-duplicate",S,`A second @extends/@extendProps tag ("${S}") overwrote the first ("${this.ctx.extends.interface}"); only one is used.`,qt(this.ctx,C));this.ctx.extends={interface:S,import:l},this.isFirstTag=!1}readRestProps(t,l){let{name:S,description:C}=this.tags[t],D=S?C?`${S} ${C}`:S:C,P=Ot(D),L=this.orCommentDescription(P||this.takePrecedingDescription(t)),q={type:"Element",name:l,description:L||void 0};if(this.ctx.rest_props=q,P)this.claimBodyLines(this.tags[t],(M)=>{q.description=Ot(Xr(D,M))||void 0});this.isFirstTag=!1}readSlot(t,l){let{tag:S,name:C,lines:D}=this.tags[t],P=this.orCommentDescription(this.getTagDescription(D,this.tags[t+1]));if(!P&&this.pendingTags.length===0)P=this.takePrecedingDescription(t);this.isFirstTag=!1;let L=l;if(!L)L="Record<string, never>",ce(this.ctx,"slot-missing-type",C||"default",`@${S}${C?` "${C}"`:""} is missing a required {Type} annotation; falling back to "${L}".`,qt(this.ctx,D));Sn(this.ctx,{slot_name:C,slot_props:L,slot_description:P||void 0,slot_deprecated:this.pendingDeprecated,slot_tags:this.pendingTags.length>0?[...this.pendingTags]:void 0,slot_internal:this.pendingInternal||void 0,source:qt(this.ctx,D)}),this.pendingTags.length=0,this.pendingDeprecated=void 0,this.pendingInternal=!1;let q=C===void 0||C===""?null:C;this.attachTrailingTag=(M)=>{let j=this.ctx.slots.get(q);if(j)j.tags=[...j.tags??[],M]}}readEvent(t,l){let{name:S,lines:C}=this.tags[t],D=Ot(Yn(C))||this.takePrecedingDescription(t);if(this.finalizeEvent(),this.eventName=S,this.eventType=l,this.eventTagLine=C.length>0?C[0].number:void 0,this.eventDescription=this.orCommentDescription(D),this.eventSource=qt(this.ctx,C),this.pendingTags.length>0)this.eventTags.push(...this.pendingTags),this.pendingTags.length=0;this.attachTrailingTag=(P)=>this.eventTags.push(P),this.isFirstTag=!1}readProperty(t,l){let{name:S,optional:C,default:D,lines:P}=this.tags[t],L={name:S,type:l,description:this.getTagDescription(P,this.tags[t+1],this.eventName!==void 0),optional:C||!1,default:D};if(this.eventName!==void 0)vs(this.ctx,this.eventProperties,L,this.eventName,qt(this.ctx,P));else if(this.typedefName!==void 0&&Lp(this.typedefType))vs(this.ctx,this.typedefProperties,L,this.typedefName,qt(this.ctx,P))}readTypedef(t,l){let{name:S,lines:C}=this.tags[t];if(this.finalizeTypedef(),this.typedefName=this.typeDeclarationName(S),this.typedefType=l,this.typedefSource=qt(this.ctx,C),this.typedefDescription=this.orCommentDescription(this.getTagDescription(C,this.tags[t+1])||this.takePrecedingDescription(t)),this.pendingTags.length>0)this.typedefTags.push(...this.pendingTags),this.pendingTags.length=0;this.typedefInternal=this.pendingInternal,this.pendingInternal=!1,this.attachTrailingTag=(D)=>this.typedefTags.push(D),this.isFirstTag=!1}readCallback(t){let{name:l,lines:S}=this.tags[t];if(this.finalizeCallback(),this.callbackName=this.typeDeclarationName(l),this.callbackSource=qt(this.ctx,S),this.callbackDescription=this.orCommentDescription(this.getTagDescription(S,this.tags[t+1])||this.takePrecedingDescription(t)),this.pendingTags.length>0)this.callbackTags.push(...this.pendingTags),this.pendingTags.length=0;this.callbackInternal=this.pendingInternal,this.pendingInternal=!1,this.attachTrailingTag=(C)=>this.callbackTags.push(C),this.isFirstTag=!1}readGenerics(t,l){let{name:S,lines:C}=this.tags[t],D=l||S;for(let P of i(S,","))ys(this.ctx,this.generics,P.trim(),qt(this.ctx,C));this.generics.usedGenericsTag=!0,gs(this.ctx,this.generics),hs(this.ctx,S,D),this.isFirstTag=!1}readTemplate(t,l){let{tags:S}=this,C=sr(S[t],l),D=t+1;while(S[D]?.tag==="template")D++;let P=S[D];if((P?.tag==="typedef"||P?.tag==="callback")&&!P.name.includes("<")&&Np(S,D,C)){this.pendingTypeParameters.push(...C.map(({constraint:L})=>L));return}if(this.hasSlotOrSnippetTag&&!this.hasExtendsTag){this.ctx.deferredSlotBlockGenerics.push(...C);return}if(this.documentsFunction)return;for(let L of C)ys(this.ctx,this.generics,L.name,qt(this.ctx,S[t].lines)),hs(this.ctx,L.name,L.constraint);this.generics.usedTemplateTag=!0,gs(this.ctx,this.generics),this.isFirstTag=!1}readDeprecated(t){let{text:l}=this.tags[t],S=this.eventName!==void 0;if(S?this.eventDeprecated!==void 0:this.pendingDeprecated!==void 0)return;let C=(D)=>{if(S)this.eventDeprecated=D;else this.pendingDeprecated=D};C(kn(l)),this.claimBodyLines(this.tags[t],(D)=>{C(kn(Xr(l,D)))})}readPassthrough(t){let{tag:l,text:S,lines:C}=this.tags[t],D={name:l,body:S};if(this.claimBodyLines(this.tags[t],(P)=>{D.body=Xr(S,P)}),!En.has(l)&&!nr.has(l)){let P=kp.has(l)?void 0:v(l,Cp,l.length<=4?1:2);ce(this.ctx,"jsdoc-unknown-tag",l,P?`Unknown JSDoc tag "@${l}"; did you mean "@${P}"? Passed through unchanged.`:`Unknown JSDoc tag "@${l}"; passed through unchanged. If this is a typo, fix the tag name.`,qt(this.ctx,C))}if(this.attachTrailingTag)this.attachTrailingTag(D);else this.pendingTags.push(D)}read(){let{tags:t}=this;for(let S=0;S<t.length;S++){let{tag:C,type:D,name:P,optional:L}=t[S],q=Bt(D);switch(this.trimBodyAbove=this.trimThisBody,this.trimThisBody=void 0,C){case"extends":case"extendProps":this.readExtends(S,q);break;case"restProps":this.readRestProps(S,q);break;case"slot":case"snippet":this.readSlot(S,q);break;case"csspart":{let M=this.getTagDescription(t[S].lines,t[S+1]);this.ctx.cssParts.push({name:P,...M?{description:M}:{}});break}case"cssprop":case"cssproperty":{let M=this.getTagDescription(t[S].lines,t[S+1]),j=t[S].default;this.ctx.cssProperties.push({name:P,...q?{type:q}:{},...j===void 0?{}:{default:j},...M?{description:M}:{}});break}case"event":this.readEvent(S,q);break;case"type":if(this.eventName!==void 0)this.eventType=q;break;case"param":if(this.callbackName!==void 0)this.callbackParams.push({name:P,type:q,optional:L||!1});break;case"returns":case"return":if(this.callbackName!==void 0)this.callbackReturnType=q;break;case"property":this.readProperty(S,q);break;case"typedef":this.readTypedef(S,q);break;case"callback":this.readCallback(S);break;case"generics":this.readGenerics(S,q);break;case"template":this.readTemplate(S,q);break;case"deprecated":this.readDeprecated(S);break;case"ignore":case"internal":if(this.eventName===void 0)this.pendingInternal=!0;else this.eventInternal=!0;break;case"sveld-ignore":if(this.eventName!==void 0)this.eventIgnores.push(P);break;case"enum":case"class":case"implements":case"this":case"namespace":case"memberof":case"module":case"file":case"overview":break;default:this.readPassthrough(S);break}if(xp.has(C))this.finalizeEvent()}if(this.finalizeEvent(),this.finalizeTypedef(),this.finalizeCallback(),t.some((S)=>S.tag==="slot"||S.tag==="snippet"||S.tag==="event"||S.tag==="typedef"||S.tag==="callback")&&this.pendingTags.length>0){for(let S of this.pendingTags)ce(this.ctx,"jsdoc-tag-dropped",S.name,`@${S.name} could not attach to a @slot/@snippet/@event/@typedef/@callback tag in the same comment block and was dropped.`);this.pendingTags.length=0}}}function Ss(t,l=t.source){if(!l)return;let S={usedGenericsTag:!1,usedTemplateTag:!1,warnedMixedGenericsTags:!1,seenGenericNames:new Set},C=l.includes("@template")?si(t):new Set;t.functionDocCommentStarts=C;let D=T(l);for(let P of D)t.jsDocBlocksByStart.set(P.start,P);for(let P of D)new Ts(t,S,P,C.has(P.start)).read()}var Es=new Set(["$state","$derived","$effect","$props","$bindable","$inspect","$host"]);function qp(t,l){switch(l?.type){case"MemberExpression":return l.computed||t===l.object;case"MethodDefinition":return!!l.computed;case"MetaProperty":return t===l.meta;case"PropertyDefinition":return l.computed||t===l.value;case"Property":return l.computed||t===l.value;case"ExportSpecifier":case"ImportSpecifier":return t===l.local;case"LabeledStatement":case"BreakStatement":case"ContinueStatement":return!1;default:return!0}}var Mp=Array.from(Es);function xs(t){return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95||t===36}function Rp(t){if(t.includes("\\u"))return!0;for(let l of Mp){let S=t.indexOf(l);while(S!==-1){if(!xs(t.charCodeAt(S-1))&&!xs(t.charCodeAt(S+l.length)))return!0;S=t.indexOf(l,S+1)}}return!1}function Ip(t,l){for(let S=l.length-1;S>=0;S-=1)if(l[S]?.has(t))return!0;return!1}function jp(t){let l=new Set;if(!t||typeof t!=="object"||!("type"in t))return l;switch(String(t.type)){case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":{let S=t;if(S.id?.name)l.add(S.id.name);for(let C of S.params??[])de(C,l);break}case"BlockStatement":Zn(t.body,l);break;case"CatchClause":de(t.param,l);break;case"EachBlock":{let S=t;if(de(S.context,l),typeof S.index==="string")l.add(S.index);else if(S.index?.name)l.add(S.index.name);break}case"AwaitBlock":{let S=t;de(S.value,l),de(S.error,l);break}}return l}function Zn(t,l){if(!Array.isArray(t))return;for(let S of t){if(!S||typeof S!=="object"||!("type"in S))continue;switch(String(S.type)){case"ImportDeclaration":for(let C of S.specifiers??[])if(C.local?.name)l.add(C.local.name);break;case"VariableDeclaration":for(let C of S.declarations??[])de(C.id,l);break;case"FunctionDeclaration":case"ClassDeclaration":{let C=S.id?.name;if(C)l.add(C);break}case"ExportNamedDeclaration":{let C=S.declaration;if(C&&typeof C==="object"&&"type"in C)Zn([C],l);break}}}}function Yr(t,l){if(!t||typeof t!=="object")return!1;return Zr(t,void 0,[...l])}function Zr(t,l,S){if(Te(t.type))return!1;let C=un(t);if(C)S.push(jp(t));let D=!1;if(l&&t.type==="Identifier"&&t.name!==void 0&&Es.has(t.name)&&!l.type.startsWith("TS")&&qp(t,l)&&!Ip(t.name,S))D=!0;else for(let P in t){if(P==="leadingComments")continue;let L=t[P];if(!L||typeof L!=="object")continue;if(Array.isArray(L)){for(let q=0;q<L.length;q++){let M=L[q];if(M&&typeof M==="object"&&typeof M.type==="string"){if(Zr(M,t,S)){D=!0;break}}}if(D)break}else if(typeof L.type==="string"){if(Zr(L,t,S)){D=!0;break}}}if(C)S.pop();return D}function ks(t){if(t.runesOptionOverride!==void 0)return t.runesOptionOverride?"runes":"legacy";let l=t.parsed;if(!l)return"legacy";if(t.source!==void 0&&!Rp(t.source))return"legacy";let S=new Set;Zn(l.module?.content.body,S);let C=new Set;return Zn(l.instance?.content.body,C),Yr(l.module,[S])||Yr(l.instance,[S,C])||Yr(l.fragment,[S,C])?"runes":"legacy"}var Cs=new Set(["TSAsExpression","TSSatisfiesExpression","TSNonNullExpression","TSTypeAssertion","TSInstantiationExpression"]);function Qr(t){return t!==null&&typeof t==="object"&&typeof t.type==="string"}function Ds(t){if(!Cs.has(t.type))return t;let l=t.expression;while(l&&Cs.has(l.type))l=l.expression;return l??t}function Qn(t){if(!Qr(t))return;ei(t)}function ei(t){for(let l in t){if(l==="leadingComments")continue;let S=t[l];if(!S||typeof S!=="object")continue;if(Array.isArray(S))for(let C=0;C<S.length;C++){let D=S[C];if(!Qr(D))continue;let P=Ds(D);if(P!==D)S[C]=P;ei(P)}else if(Qr(S)){let C=Ds(S);if(C!==S)t[l]=C;ei(C)}}}var ws=/(<script[^>]*>)([\s\S]*?)(<\/script>)/gi,Ps=/\/\/(?<!^[ \t]*\*.*\/\/)\s*@ts-[^\n\r]*/gm;function Fp(t){if(!t.includes("@ts-"))return t;return ws.lastIndex=0,t.replace(ws,(l,S,C,D)=>{Ps.lastIndex=0;let P=C.replace(Ps,"");return S+P+D})}function As(t,l,S){t.componentFilePath=S;let C=Fp(l);t.source=C;let D=Ae(C);if(Uo(t,D),t.parsed=D,t.scriptLanguage==="ts")Qn(D.module),Qn(D.instance),Qn(D.fragment);t.syntaxMode=ks(t);let P=D.css,L=P?C.slice(0,P.start)+" ".repeat(P.end-P.start)+C.slice(P.end):C;xe(t,D.module),xe(t,D.instance),Ss(t,L)}class X{ctx=cr();cleanup(){this.ctx=cr()}parseSvelteComponent(t,l){let{component:S,pending:C}=this.parse(t,l);if(C)S[h]={...S[h]??{canonicalPropNames:[],localTypeDeclarations:[],typeImportStatements:[]},...C};return S}parse(t,l){this.cleanup();let S=this.ctx;As(S,t,l.filePath),fs(S);let C=es(S);return os(S,C)}}
|
|
29
|
+
export{It,Lt,B,_t,he,Ae,X};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{t}from"./chunk-ymq8jc0f.js";import{existsSync as x,readdirSync as R,readFileSync as _,statSync as k}from"node:fs";import{createRequire as P}from"node:module";import l from"node:path";var C=/[^A-Za-z0-9_-]/g,w=/[^A-Za-z0-9_$]/g,F=/^[0-9]/,I=2,d=7,m=`TypeScript ${d} or later, which provides \`typescript/unstable/async\``;function N(n){if(!n)return!1;let e=Number.parseInt(n,10);return Number.isFinite(e)&&e>=d}async function b(n){let e;try{let r=P(l.join(n,"package.json")).resolve("typescript/package.json");e=JSON.parse(_(r,"utf8")).version}catch{return{installed:!1}}if(!N(e))return{installed:!0,version:e};try{let s=await import("./chunk-wpqsw5ca.js");return{installed:!0,version:e,module:s}}catch{return{installed:!0,version:e}}}class h{api;tsconfigPath;overlay=new Map;constructor(n,e){this.api=n,this.tsconfigPath=e}static async create(n=process.cwd(),{importTs:e=b}={}){let s=await e(n);if(!s.installed)return{ok:!1,reason:"not-installed",message:`requires the \`typescript\` package to be installed (${m}); none was found`};if(!s.module)return{ok:!1,reason:"unsupported-version",message:`requires ${m}; found \`typescript@${s.version??"unknown"}\` installed, which does not expose that module`};let r=M(n);if(!r)return{ok:!1,reason:"no-tsconfig",message:`could not locate a tsconfig.json starting from "${n}"`};let o=s.module,i=new h(null,r),a=new o.API({cwd:n,fs:i.createFileSystem()});return i.api=a,{ok:!0,resolver:i}}async checkExamples(n){let e=new Map;if(n.length===0)return e;let s=[];for(let o of n)for(let i of o.sources){let a=this.exampleFileName(o.filePath,o.moduleName,i.id);this.overlay.set(a,j(i)),s.push({filePath:o.filePath,source:i,file:a})}if(s.length===0)return e;let r=await this.api.updateSnapshot({openProject:this.tsconfigPath,fileChanges:{created:s.map((o)=>o.file)}});try{let[o]=s,i=await r.getDefaultProjectForFile(o.file);if(!i)return e;await Promise.all(s.map(async({filePath:a,source:u,file:p})=>{let[y,v]=await Promise.all([i.program.getSyntacticDiagnostics(p),i.program.getSemanticDiagnostics(p)]),f=[...y,...v];if(f.length===0)return;let T=this.overlay.get(p)??"",E=f.map((c)=>A(c,T)).sort((c,S)=>c.line-S.line).map((c)=>`Line ${c.line}: ${c.text}`).join(`
|
|
2
|
+
`),g=e.get(a)??[];g.push({id:u.id,name:u.name,message:E}),e.set(a,g)}))}finally{await r.dispose?.()}return e}async dispose(){this.overlay.clear(),await this.api?.close?.()}createFileSystem(){return{readFile:(n)=>this.overlay.get(t(n)),fileExists:(n)=>this.overlay.has(t(n))?!0:void 0,getAccessibleEntries:(n)=>{let e=t(n),s=Array.from(this.overlay.keys()).filter((i)=>t(l.dirname(i))===e);if(s.length===0)return;let r=[],o=[];try{for(let i of R(n)){let a=l.join(n,i);try{(k(a).isDirectory()?o:r).push(i)}catch{}}}catch{}for(let i of s){let a=l.basename(i);if(!r.includes(a))r.push(a)}return{files:r,directories:o}}}}exampleFileName(n,e,s){let r=l.dirname(l.resolve(n)),o=s.replace(C,"_");return t(l.join(r,`__sveld_example_${e}_${o}.ts`))}}function D(n){let e=n.replace(w,"_");if(e===""||F.test(e))return`_${e}`;return e}function j(n){return`const ${D(n.name)} = null as unknown as (${n.type});
|
|
3
|
+
${n.code}
|
|
4
|
+
`}function A(n,e){let s=n.pos??0,r=e.slice(0,s).split(`
|
|
5
|
+
`).length;return{line:Math.max(1,r-I+1),text:String(n.text??"").trim()}}function M(n){let e=l.resolve(n);while(!0){let s=l.join(e,"tsconfig.json");if(x(s))return s;let r=l.dirname(e);if(r===e)return null;e=r}}export{h as TypeResolver};
|