svelte-prune 0.0.0 → 0.10.0

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.
@@ -0,0 +1,22 @@
1
+ import{Ue,U,E,We,D,je,d,k,Z,he,m,A,C,W,g,ee,u,x,Me,de,$e,me,V,M,j,ye,Re}from"./index-45rna84h.js";import{ge,I,P,te,xe}from"./index-fhqjbrb9.js";import{ie,f,l,s,ne,re,se,z,oe,y,R,ae,be,c,B,L,o,b,ce,pe,q,Se,p,v,T,K,S}from"./index-jxng1156.js";import{readFileSync as Qx,realpathSync as Jx}from"node:fs";import Jt from"node:path";import{readFile as Dy}from"node:fs/promises";import By from"node:path";import{existsSync as bm,readFileSync as Xr,statSync as Jc}from"node:fs";import Oi from"node:path";var ma=new Set(["$state","$state.raw","$derived","$derived.by","$state.eager","$state.snapshot","$props","$props.id","$bindable","$effect","$effect.pre","$effect.tracking","$effect.root","$effect.pending","$inspect","$inspect().with","$inspect.trace","$host"]),ya=new Set(["$state","$derived","$props","$bindable","$effect","$inspect","$host"]);class va{node;parent;porous;index;declarations=new Map;constructor(O,G,H,X){this.node=O,this.parent=G,this.porous=H,this.index=X}get(O){for(let G=this;G;G=G.parent){let H=G.declarations.get(O);if(H!==void 0)return H}return null}}class ba{name;kind;node;declaration;initial;scope;references=[];rune=null;prop=null;constructor(O,G,H,X,le,we){this.name=O,this.kind=G,this.node=H,this.declaration=X,this.initial=le,this.scope=we}}class Sa{node;parent;scope;binding=null;reads;writes;mutates;store=!1;constructor(O,G,H,X,le,we){this.node=O,this.parent=G,this.scope=H,this.reads=X,this.writes=le,this.mutates=we}}var ph=Object.assign(Object.create(null),g),uh=new Set(["SvelteElement","RegularElement","SvelteFragment","Component","SvelteComponent","SvelteSelf","SlotElement"]),hh=new Map;function wa(O){return new ir(O,!1)}class ir{module;instance;instanceProgram=null;component;ast;scopes=[];scopeIn;synthetic=new Map;recorded;made=new Map;declared=new Map;references=new Map;pending=[];declarators=[];implicit=[];stores=new Map;constructor(O,G){if(this.ast=O,this.scopeIn=G?new Map:null,O.type==="Program")this.component=!1,this.module=this.scope(O,null,!1),this.instance=this.module,this.made.set(O,this.module),this.visit(O,null,this.module);else{this.component=!0;let H=O.module?.content??null,X=O.instance?.content??null;this.module=this.scope(H,null,!1),this.instance=this.scope(X,this.module,!1),this.instanceProgram=X,this.scopeIn?.set(O,this.module);for(let[le,we]of[[O.module,this.module],[O.instance,this.instance]]){if(le===void 0)continue;this.scopeIn?.set(le,we),this.made.set(le.content,we);for(let ke of le.attributes)this.visit(ke,le,we);this.visit(le.content,le,we)}this.visit(O.fragment,O,this.instance)}this.declareImplicit(),this.resolve(),this.findRunesAndProps()}scopeOf(O){let G=this.synthetic.get(O);if(G!==void 0)return G;if(this.scopeIn!==null)return this.scopeIn.get(O)??null;this.recorded??=new ir(this.ast,!0);let H=this.recorded.scopeIn?.get(O);return H===void 0?null:this.scopes[H.index]}scope(O,G,H){let X=new va(O,G,H,this.scopes.length);return this.scopes.push(X),X}bindingOf(O){return this.declared.get(O)??this.references.get(O)?.binding??null}referenceOf(O){return this.references.get(O)??null}declaredIn(O){return this.made.get(O)?.declarations??hh}child(O,G,H){let X=this.scope(G,O,H);return this.made.set(G,X),X}declare(O,G,H,X,le,we){let ke=O;if(X==="var")while(ke.porous&&ke.parent!==null)ke=ke.parent;let ve=ke.declarations.get(H);if(ve!==void 0&&ve.declaration.type!=="TSDeclareFunction"){if(G!==null)this.declared.set(G,ve);return}let Ee=new ba(H,X,G,le,we,ke);if(ke.declarations.set(H,Ee),G!==null)this.declared.set(G,Ee)}reference(O,G,H,X,le,we){this.pending.push(new Sa(O,G,H,X,le,we))}referenceName(O,G,H,X){let le=O.split(".")[0],we={type:"Identifier",name:le,start:G,end:G+le.length};this.synthetic.set(we,X),this.reference(we,H,X,!0,!1,!1)}visit(O,G,H){switch(this.scopeIn?.set(O,H),O.type){case"Identifier":if(G!==null&&A(O,G))this.reference(O,G,H,!0,!1,!1);this.visitFields(O,H);return;case"ImportDeclaration":for(let X of O.specifiers){if(this.scopeIn?.set(X,H),this.scopeIn?.set(X.local,H),X.type==="ImportSpecifier")this.scopeIn?.set(X.imported,H);this.declare(H,X.local,X.local.name,"import",X,O)}this.visit(O.source,O,H);for(let X of O.attributes??[])this.visit(X,O,H);return;case"ExportNamedDeclaration":if(O.declaration)this.visit(O.declaration,O,H);for(let X of O.specifiers)if(this.scopeIn?.set(X,H),this.scopeIn?.set(X.local,H),this.scopeIn?.set(X.exported,H),!O.source&&X.local.type==="Identifier")this.reference(X.local,X,H,!0,!1,!1);if(O.source)this.visit(O.source,O,H);for(let X of O.attributes??[])this.visit(X,O,H);return;case"VariableDeclaration":this.visitDeclaration(O,G,H);return;case"FunctionDeclaration":if(O.id)this.scopeIn?.set(O.id,H),this.declare(H,O.id,O.id.name,"function",O,O);this.visitFunction(O,this.child(H,O,!0));return;case"FunctionExpression":{let X=this.child(H,O,!0);if(O.id)this.scopeIn?.set(O.id,X),this.declare(X,O.id,O.id.name,"function",O,O);this.visitFunction(O,X);return}case"ArrowFunctionExpression":this.visitFunction(O,this.child(H,O,!0));return;case"ClassDeclaration":case"ClassExpression":{let X=H;if(O.id){if(O.type==="ClassExpression")X=this.child(H,O,!1);this.scopeIn?.set(O.id,X),this.declare(X,O.id,O.id.name,"class",O,O)}for(let le of O.decorators??[])this.visit(le,O,H);if(O.superClass)this.visit(O.superClass,O,X);this.visit(O.body,O,X);return}case"BlockStatement":this.visitFields(O,this.child(H,O,!(G!==null&&fh(G)&&G.body===O)));return;case"StaticBlock":this.visitFields(O,this.child(H,O,!1));return;case"ForStatement":case"SwitchStatement":this.visitFields(O,this.child(H,O,!0));return;case"ForInStatement":case"ForOfStatement":{let X=this.child(H,O,!0);if(O.left.type==="VariableDeclaration")this.visit(O.left,O,X);else this.visitTarget(O.left,O,X,!1);this.visit(O.right,O,X),this.visit(O.body,O,X);return}case"CatchClause":{if(!O.param)break;let X=this.child(H,O,!0);this.declarePattern(O.param,O,X,"catch",O,null),this.visit(O.body,O,X);return}case"AssignmentExpression":this.visitTarget(O.left,O,H,O.operator!=="="),this.visit(O.right,O,H);return;case"UpdateExpression":this.visitTarget(O.argument,O,H,!0);return;case"LabeledStatement":if(G===this.instanceProgram&&O.label.name==="$"){this.visitReactive(O,H);return}break;case"TSEnumDeclaration":{this.scopeIn?.set(O.id,H),this.declare(H,O.id,O.id.name,"enum",O,O);let X=this.child(H,O,!1);for(let le of O.members)if(this.scopeIn?.set(le,X),this.scopeIn?.set(le.id,X),le.id.type==="Identifier")this.declare(X,le.id,le.id.name,"enum-member",le,le.initializer??null);for(let le of O.members)if(le.initializer)this.visit(le.initializer,le,X);return}case"TSModuleDeclaration":if(this.scopeIn?.set(O.id,H),O.id.type==="Identifier"&&!O.global)this.declare(H,O.id,O.id.name,"namespace",O,O);if(O.body)this.visit(O.body,O,this.child(H,O,!1));return;case"TSImportEqualsDeclaration":{this.scopeIn?.set(O.id,H),this.declare(H,O.id,O.id.name,"import",O,O.moduleReference);let X=O.moduleReference;while(X.type==="TSQualifiedName")this.scopeIn?.set(X,H),this.scopeIn?.set(X.right,H),X=X.left;if(X.type==="Identifier")this.scopeIn?.set(X,H),this.reference(X,O,H,!0,!1,!1);else this.visit(X,O,H);return}case"TSDeclareFunction":if(O.id){if(this.scopeIn?.set(O.id,H),!H.declarations.has(O.id.name))this.declare(H,O.id,O.id.name,"function",O,O)}return;case"Fragment":this.visitFields(O,this.child(H,O,!1));return;case"RegularElement":case"SvelteElement":case"SlotElement":case"SvelteFragment":this.visitFields(O,this.child(H,O,!1));return;case"Component":case"SvelteComponent":case"SvelteSelf":this.visitComponent(O,H);return;case"LetDirective":this.visitLet(O,H);return;case"EachBlock":this.visitEach(O,H);return;case"AwaitBlock":this.visitAwait(O,H);return;case"SnippetBlock":{this.scopeIn?.set(O.expression,H);let{name:X}=O.expression;this.declare(H,O.expression,X,"snippet",O,O);let le=this.child(H,O,!1);for(let we of O.parameters??[])this.declarePattern(we,O,le,"snippet-param",O,null);this.visit(O.body,O,le);return}case"BindDirective":if(O.expression.type==="SequenceExpression")break;this.visitTarget(O.expression,O,H,!0);return;case"TransitionDirective":case"AnimateDirective":case"UseDirective":{this.referenceName(O.name,O.start+mh(O),O,H);break}case"StyleDirective":if(O.value===!0)this.referenceName(O.name,O.start+6,O,H);break}this.visitFields(O,H)}visitFields(O,G){let H=ph[O.type];if(H===void 0)throw Error(`unknown node type: ${O.type}`);let X=k(O);for(let le=0;le<H.length;le++){let we=X[H[le]];if(Array.isArray(we))for(let ke=0;ke<we.length;ke++){let ve=we[ke];if(d(ve))this.visit(ve,O,G)}else if(d(we))this.visit(we,O,G)}}visitDeclaration(O,G,H){let X=O.kind==="await using"?"using":O.kind;if(G?.type==="ConstTag")X="const-tag";for(let le of O.declarations)if(this.scopeIn?.set(le,H),this.declarePattern(le.id,le,H,X,le,le.init??null),this.declarators.push([le,H]),le.init)this.visit(le.init,le,H)}visitFunction(O,G){for(let H of O.params){if(H.type==="Identifier"&&H.name==="this"){this.scopeIn?.set(H,G);continue}this.declarePattern(H,O,G,"param",O,null)}this.visit(O.body,O,G)}declarePattern(O,G,H,X,le,we){switch(this.scopeIn?.set(O,H),O.type){case"Identifier":this.declare(H,O,O.name,X,le,we);break;case"ObjectPattern":for(let ke of O.properties){if(this.scopeIn?.set(ke,H),ke.type==="RestElement"){this.declarePattern(ke,O,H,X,le,we);continue}if(ke.computed)this.visit(ke.key,ke,H);else this.scopeIn?.set(ke.key,H);this.declarePattern(ke.value,ke,H,X,le,we)}break;case"ArrayPattern":for(let ke of O.elements)if(ke)this.declarePattern(ke,O,H,X,le,we);break;case"RestElement":this.declarePattern(O.argument,O,H,X,le,we);break;case"AssignmentPattern":this.declarePattern(O.left,O,H,X,le,we),this.visit(O.right,O,H);break;case"TSParameterProperty":this.declarePattern(O.parameter,O,H,X,le,we);break;default:this.visit(O,G,H);return}if("decorators"in O&&O.decorators)for(let ke of O.decorators)this.visit(ke,O,H)}visitTarget(O,G,H,X){switch(this.scopeIn?.set(O,H),O.type){case"Identifier":this.reference(O,G,H,X,!0,!1);return;case"MemberExpression":{let le=O,we=G;while(le.type==="MemberExpression"){if(this.scopeIn?.set(le,H),le.computed)this.visit(le.property,le,H);else this.scopeIn?.set(le.property,H);we=le,le=le.object}if(le.type==="Identifier")this.scopeIn?.set(le,H),this.reference(le,we,H,!0,!1,!0);else this.visit(le,we,H);return}case"ObjectPattern":for(let le of O.properties){if(this.scopeIn?.set(le,H),le.type==="RestElement"){this.visitTarget(le,O,H,!1);continue}if(le.computed)this.visit(le.key,le,H);else this.scopeIn?.set(le.key,H);this.visitTarget(le.value,le,H,!1)}return;case"ArrayPattern":for(let le of O.elements)if(le)this.visitTarget(le,O,H,!1);return;case"RestElement":this.visitTarget(O.argument,O,H,!1);return;case"AssignmentPattern":this.visitTarget(O.left,O,H,!1),this.visit(O.right,O,H);return}if(O.type==="TSAsExpression"||O.type==="TSSatisfiesExpression"||O.type==="TSNonNullExpression"||O.type==="TSTypeAssertion"){this.visitTarget(O.expression,O,H,X);return}this.visit(O,G,H)}visitReactive(O,G){let H=this.child(G,O,!1);this.scopeIn?.set(O.label,G);let{body:X}=O;if(X.type==="ExpressionStatement"&&X.expression.type==="AssignmentExpression"){let{left:le,right:we}=X.expression;for(let ke of m(le))if(!ke.name.startsWith("$"))this.implicit.push([ke,O,we])}this.visit(X,O,H)}visitComponent(O,G){if(O.type==="Component")this.referenceName(O.name,O.start+1,O,G);let H=ga(O)!==null,X=this.scope(O,G,!1),le=H?G:X;if(this.made.set(O,le),O.type==="SvelteComponent")this.visit(O.expression,O,G);for(let we of O.attributes)this.visit(we,O,we.type==="LetDirective"?le:G);this.scopeIn?.set(O.fragment,X);for(let we of O.fragment.nodes){let ke=ga(we);this.visit(we,O.fragment,ke===null?X:this.child(G,we,!1))}}visitLet(O,G){if(O.expression===null){this.declare(G,null,O.name,"let-directive",O,null);return}let H=(X)=>{switch(this.scopeIn?.set(X,G),X.type){case"Identifier":this.declare(G,X,X.name,"let-directive",O,null);return;case"ObjectExpression":for(let le of X.properties)if(this.scopeIn?.set(le,G),le.type==="SpreadElement")H(le.argument);else this.scopeIn?.set(le.key,G),H(le.value);return;case"ArrayExpression":for(let le of X.elements){if(le===null)continue;if(le.type==="SpreadElement")this.scopeIn?.set(le,G),H(le.argument);else H(le)}}};H(O.expression)}visitEach(O,G){if(this.visit(O.expression,O,G),O.fallback)this.visit(O.fallback,O,G);let H=this.child(G,O,!1);if(O.context)this.declarePattern(O.context,O,H,"each",O,null);if(O.index!==void 0)this.declare(H,null,O.index,"each-index",O,O);if(O.key)this.visit(O.key,O,H);this.scopeIn?.set(O.body,H);for(let X of O.body.nodes)this.visit(X,O.body,H)}visitAwait(O,G){if(this.visit(O.expression,O,G),O.pending)this.visit(O.pending,O,G);for(let[H,X,le]of[[O.then,O.value,"await-value"],[O.catch,O.error,"await-error"]]){if(H===null)continue;this.visit(H,O,G);let we=this.made.get(H);if(X!==null&&we!==void 0)this.declarePattern(X,O,we,le,O,null)}}declareImplicit(){for(let[O,G,H]of this.implicit)if(this.instance.get(O.name)===null)this.declare(this.instance,O,O.name,"reactive",G,H)}resolve(){let O=new Set;for(let G of this.pending){let{node:H}=G,X=this.declared.get(H);if(X!==void 0&&X.kind!=="reactive")continue;this.references.set(H,G);let le=G.scope.get(H.name);if(le===null&&this.component){let we=this.storeOf(H.name);if(we!==!1)G.store=!0,G.mutates||=G.writes,G.reads=!0,G.writes=!1,le=we}if(le!==null){G.binding=le;let we=le.references.at(-1);if(we!==void 0&&we.node.start>H.start)O.add(le);le.references.push(G)}}for(let G of O)G.references.sort((H,X)=>H.node.start-X.node.start)}storeOf(O){let G=this.stores.get(O);if(G!==void 0)return G;let H=!1;if(O.length>1&&O.startsWith("$")&&!O.startsWith("$$")){let X=this.instance.get(O.slice(1));if(!ya.has(O))H=X;else if(X!==null){let le=X.initial,we=xa(le,this.instance,null);if((we===null||O!=="$props"&&we==="$props")&&!(O==="$derived"&&le?.type==="ImportDeclaration"&&le.source.value==="svelte/store"))H=X}}return this.stores.set(O,H),H}findRunesAndProps(){for(let[O,G]of this.declarators){let H=xa(O.init??null,G,this.references);if(H===null)continue;for(let X of m(O.id)){let le=this.declared.get(X);if(le?.declaration===O)le.rune=H}if(H!=="$props")continue;if(O.id.type==="Identifier"){let X=this.declared.get(O.id);if(X)X.initial=null;continue}if(O.id.type!=="ObjectPattern")continue;for(let X of O.id.properties){if(X.type==="RestElement"){for(let ke of m(X)){let ve=this.declared.get(ke);if(ve)ve.initial=null}continue}let le=X.value.type==="AssignmentPattern"?X.value.left:X.value,we=le.type==="Identifier"?this.declared.get(le):void 0;if(we===void 0||X.computed)continue;we.prop=yh(X.key),we.initial=X.value.type==="AssignmentPattern"?dh(X.value.right):null}}this.findLegacyProps()}findLegacyProps(){if(this.instanceProgram===null)return;for(let O of this.instanceProgram.body){if(O.type!=="ExportNamedDeclaration")continue;let{declaration:G}=O;if(G?.type==="VariableDeclaration"){if(G.kind!=="let"&&G.kind!=="var")continue;for(let H of G.declarations)for(let X of m(H.id)){let le=this.declared.get(X);if(le)le.prop=X.name}continue}if(O.source)continue;for(let H of O.specifiers){if(H.local.type!=="Identifier")continue;let X=this.instance.declarations.get(H.local.name);if(X?.kind!=="let"&&X?.kind!=="var")continue;X.prop=H.exported.type==="Identifier"?H.exported.name:String(H.exported.value)}}}}function fh(O){return O.type==="ArrowFunctionExpression"||O.type==="FunctionExpression"||O.type==="FunctionDeclaration"}function ga(O){if(!uh.has(O.type)||!("attributes"in O))return null;for(let G of O.attributes??[])if(G.type==="Attribute"&&G.name==="slot"&&Array.isArray(G.value)&&G.value.length===1&&G.value[0].type==="Text")return G.value[0].data;return null}function xa(O,G,H){if(O?.type!=="CallExpression")return null;let X=O.callee,le="";while(X.type==="MemberExpression"){if(X.computed||X.property.type!=="Identifier")return null;le=`.${X.property.name}${le}`,X=X.object}if(X.type==="CallExpression"&&X.callee.type==="Identifier")le=`()${le}`,X=X.callee;if(X.type!=="Identifier")return null;if(H!==null){let we=H.get(X);if(we?.binding!==null||we.store)return null}else if(G.get(X.name)!==null)return null;return le=X.name+le,ma.has(le)?le:null}function dh(O){if(O.type==="CallExpression"&&O.callee.type==="Identifier"&&O.callee.name==="$bindable"){let[G]=O.arguments;return G===void 0||G.type==="SpreadElement"?null:G}return O}function mh(O){if(O.type==="UseDirective")return 4;if(O.type==="AnimateDirective")return 8;if(O.intro&&O.outro)return 11;return O.intro?3:4}function yh(O){if(O.type==="Identifier")return O.name;return O.type==="Literal"?String(O.value):null}var nr={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},sr="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",gh={5:sr,"5module":sr+" export import",6:sr+" const class extends export import super"},Na=/^in(stanceof)?$/,xh=/\p{ID_Start}/u,vh=/[\p{ID_Continue}\u200c\u200d]/u;function Yt(O,G){if(O<65)return O===36;if(O<91)return!0;if(O<97)return O===95;if(O<123)return!0;if(O>65535&&G===!1)return!1;return O>=170&&xh.test(String.fromCodePoint(O))}function ri(O,G){if(O<48)return O===36;if(O<58)return!0;if(O<65)return!1;if(O<91)return!0;if(O<97)return O===95;if(O<123)return!0;if(O>65535&&G===!1)return!1;return O>=170&&vh.test(String.fromCodePoint(O))}var ct=function(O,G){if(G===void 0)G={};this.label=O,this.keyword=G.keyword,this.beforeExpr=!!G.beforeExpr,this.startsExpr=!!G.startsExpr,this.isLoop=!!G.isLoop,this.isAssign=!!G.isAssign,this.prefix=!!G.prefix,this.postfix=!!G.postfix,this.binop=G.binop||null,this.updateContext=null};function Dt(O,G){return new ct(O,{beforeExpr:!0,binop:G})}var Bt={beforeExpr:!0},_t={startsExpr:!0},lr={};function lt(O,G){if(G===void 0)G={};return G.keyword=O,lr[O]=new ct(O,G)}var _e={num:new ct("num",_t),regexp:new ct("regexp",_t),string:new ct("string",_t),name:new ct("name",_t),privateId:new ct("privateId",_t),eof:new ct("eof"),bracketL:new ct("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new ct("]"),braceL:new ct("{",{beforeExpr:!0,startsExpr:!0}),braceR:new ct("}"),parenL:new ct("(",{beforeExpr:!0,startsExpr:!0}),parenR:new ct(")"),comma:new ct(",",Bt),semi:new ct(";",Bt),colon:new ct(":",Bt),dot:new ct("."),question:new ct("?",Bt),questionDot:new ct("?."),arrow:new ct("=>",Bt),template:new ct("template"),invalidTemplate:new ct("invalidTemplate"),ellipsis:new ct("...",Bt),backQuote:new ct("`",_t),dollarBraceL:new ct("${",{beforeExpr:!0,startsExpr:!0}),eq:new ct("=",{beforeExpr:!0,isAssign:!0}),assign:new ct("_=",{beforeExpr:!0,isAssign:!0}),incDec:new ct("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new ct("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:Dt("||",1),logicalAND:Dt("&&",2),bitwiseOR:Dt("|",3),bitwiseXOR:Dt("^",4),bitwiseAND:Dt("&",5),equality:Dt("==/!=/===/!==",6),relational:Dt("</>/<=/>=",7),bitShift:Dt("<</>>/>>>",8),plusMin:new ct("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:Dt("%",10),star:Dt("*",10),slash:Dt("/",10),starstar:new ct("**",{beforeExpr:!0}),coalesce:Dt("??",1),_break:lt("break"),_case:lt("case",Bt),_catch:lt("catch"),_continue:lt("continue"),_debugger:lt("debugger"),_default:lt("default",Bt),_do:lt("do",{isLoop:!0,beforeExpr:!0}),_else:lt("else",Bt),_finally:lt("finally"),_for:lt("for",{isLoop:!0}),_function:lt("function",_t),_if:lt("if"),_return:lt("return",Bt),_switch:lt("switch"),_throw:lt("throw",Bt),_try:lt("try"),_var:lt("var"),_const:lt("const"),_while:lt("while",{isLoop:!0}),_with:lt("with"),_new:lt("new",{beforeExpr:!0,startsExpr:!0}),_this:lt("this",_t),_super:lt("super",_t),_class:lt("class",_t),_extends:lt("extends",Bt),_export:lt("export"),_import:lt("import",_t),_null:lt("null",_t),_true:lt("true",_t),_false:lt("false",_t),_in:lt("in",{beforeExpr:!0,binop:7}),_instanceof:lt("instanceof",{beforeExpr:!0,binop:7}),_typeof:lt("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:lt("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:lt("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},Tt=/\r\n?|\n|\u2028|\u2029/,bh=new RegExp(Tt.source,"g");function _i(O){return O===10||O===13||O===8232||O===8233}function _a(O,G,H){if(H===void 0)H=O.length;for(var X=G;X<H;X++){var le=O.charCodeAt(X);if(_i(le))return X<H-1&&le===13&&O.charCodeAt(X+1)===10?X+2:X+1}return-1}var Ta=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,St=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Sh=Object.prototype,{hasOwnProperty:wh,toString:kh}=Sh,cn=Object.hasOwn||function(O,G){return wh.call(O,G)},ka=Array.isArray||function(O){return kh.call(O)==="[object Array]"},Ea=Object.create(null);function Un(O){return Ea[O]||(Ea[O]=new RegExp("^(?:"+O.replace(/ /g,"|")+")$"))}function zn(O){if(O<=65535)return String.fromCharCode(O);return O-=65536,String.fromCharCode((O>>10)+55296,(O&1023)+56320)}var Eh=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,ln=function(O,G){this.line=O,this.column=G};ln.prototype.offset=function(O){return new ln(this.line,this.column+O)};var Kn=function(O,G,H){if(this.start=G,this.end=H,O.sourceFile!==null)this.source=O.sourceFile};function Ia(O,G){for(var H=1,X=0;;){var le=_a(O,X,G);if(le<0)return new ln(H,G-X);++H,X=le}}var rr={ecmaVersion:null,sourceType:"script",strict:!1,onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,startLocation:null,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},Ca=!1;function Ch(O){var G={};for(var H in rr)G[H]=O&&cn(O,H)?O[H]:rr[H];if(G.ecmaVersion==="latest")G.ecmaVersion=1e8;else if(G.ecmaVersion==null){if(!Ca&&typeof console==="object"&&console.warn)Ca=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
2
+ Defaulting to 2020, but this will stop working in the future.`);G.ecmaVersion=11}else if(G.ecmaVersion>=2015)G.ecmaVersion-=2009;if(G.allowReserved==null)G.allowReserved=G.ecmaVersion<5;if(!O||O.allowHashBang==null)G.allowHashBang=G.ecmaVersion>=14;if(ka(G.onToken)){var X=G.onToken;G.onToken=function(le){return X.push(le)}}if(ka(G.onComment))G.onComment=Ah(G,G.onComment);if(G.sourceType==="commonjs"&&G.allowAwaitOutsideFunction)throw Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return G}function Ah(O,G){return function(H,X,le,we,ke,ve){var Ee={type:H?"Block":"Line",value:X,start:le,end:we};if(O.locations)Ee.loc=new Kn(this,ke,ve);if(O.ranges)Ee.range=[le,we];G.push(Ee)}}var wi=1,ki=2,cr=4,$a=8,pr=16,Ma=32,Gn=64,Pa=128,Ei=256,pn=512,Ra=1024,Hn=wi|ki|Ei;function ur(O,G){return ki|(O?cr:0)|(G?$a:0)}var jn=0,hr=1,oi=2,La=3,Oa=4,Va=5,bt=function(O,G,H){this.options=O=Ch(O),this.sourceFile=O.sourceFile,this.keywords=Un(gh[O.ecmaVersion>=6?6:O.sourceType==="module"?"5module":5]);var X="";if(O.allowReserved!==!0){if(X=nr[O.ecmaVersion>=6?6:O.ecmaVersion===5?5:3],O.sourceType==="module")X+=" await"}this.reservedWords=Un(X);var le=(X?X+" ":"")+nr.strict;if(this.reservedWordsStrict=Un(le),this.reservedWordsStrictBind=Un(le+" "+nr.strictBind),this.input=String(G),this.containsEsc=!1,this.pos=H||0,this.curLine=1,O.startLocation)this.lineStart=this.pos-O.startLocation.column,this.curLine=O.startLocation.line;else if(H){if(this.lineStart=this.input.lastIndexOf(`
3
+ `,H-1)+1,this.options.locations)this.curLine=this.input.slice(0,this.lineStart).split(Tt).length}else this.lineStart=0;if(this.type=_e.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=O.sourceType==="module",this.strict=this.inModule||O.strict===!0||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&O.allowHashBang&&this.input.slice(0,2)==="#!")this.skipLineComment(2);this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?ki:wi),this.regexpState=null,this.privateNameStack=[]},Ft={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};bt.prototype.parse=function(){var O=this,G=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return O.parseTopLevel(G)})};Ft.inFunction.get=function(){return(this.currentVarScope().flags&ki)>0};Ft.inGenerator.get=function(){return(this.currentVarScope().flags&$a)>0};Ft.inAsync.get=function(){return(this.currentVarScope().flags&cr)>0};Ft.canAwait.get=function(){for(var O=this.scopeStack.length-1;O>=0;O--){var G=this.scopeStack[O],H=G.flags;if(H&(Ei|pn))return!1;if(H&ki)return(H&cr)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};Ft.allowReturn.get=function(){if(this.inFunction)return!0;if(this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&wi)return!0;return!1};Ft.allowSuper.get=function(){var O=this.currentThisScope(),G=O.flags;return(G&Gn)>0||this.options.allowSuperOutsideMethod};Ft.allowDirectSuper.get=function(){return(this.currentThisScope().flags&Pa)>0};Ft.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};Ft.allowNewDotTarget.get=function(){for(var O=this.scopeStack.length-1;O>=0;O--){var G=this.scopeStack[O],H=G.flags;if(H&(Ei|pn)||H&ki&&!(H&pr))return!0}return!1};Ft.allowUsing.get=function(){var O=this.currentScope(),G=O.flags;if(G&Ra)return!1;if(!this.inModule&&G&wi)return!1;return!0};Ft.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&Ei)>0};bt.extend=function(){var O=[],G=arguments.length;while(G--)O[G]=arguments[G];var H=this;for(var X=0;X<O.length;X++)H=O[X](H);return H};bt.parse=function(O,G){return new this(G,O).parse()};bt.parseExpressionAt=function(O,G,H){var X=new this(H,O,G);return X.nextToken(),X.parseExpression()};bt.tokenizer=function(O,G){return new this(G,O)};Object.defineProperties(bt.prototype,Ft);var At=bt.prototype,Nh=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;At.strictDirective=function(O){if(this.options.ecmaVersion<5)return!1;for(;;){St.lastIndex=O,O+=St.exec(this.input)[0].length;var G=Nh.exec(this.input.slice(O));if(!G)return!1;if((G[1]||G[2])==="use strict"){St.lastIndex=O+G[0].length;var H=St.exec(this.input),X=H.index+H[0].length,le=this.input.charAt(X);return le===";"||le==="}"||Tt.test(H[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(le)||le==="!"&&this.input.charAt(X+1)==="=")}if(O+=G[0].length,St.lastIndex=O,O+=St.exec(this.input)[0].length,this.input[O]===";")O++}};At.eat=function(O){if(this.type===O)return this.next(),!0;else return!1};At.isContextual=function(O){return this.type===_e.name&&this.value===O&&!this.containsEsc};At.eatContextual=function(O){if(!this.isContextual(O))return!1;return this.next(),!0};At.catchStackOverflow=function(O){try{return O()}catch(G){if(G instanceof Error&&(/\bstack\b.*\b(exceeded|overflow)\b/i.test(G.message)||/\btoo much recursion\b/i.test(G.message)))this.raise(this.start,"Not enough stack space to parse input");else throw G}};At.expectContextual=function(O){if(!this.eatContextual(O))this.unexpected()};At.canInsertSemicolon=function(){return this.type===_e.eof||this.type===_e.braceR||Tt.test(this.input.slice(this.lastTokEnd,this.start))};At.insertSemicolon=function(){if(this.canInsertSemicolon()){if(this.options.onInsertedSemicolon)this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc);return!0}};At.semicolon=function(){if(!this.eat(_e.semi)&&!this.insertSemicolon())this.unexpected()};At.afterTrailingComma=function(O,G){if(this.type===O){if(this.options.onTrailingComma)this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc);if(!G)this.next();return!0}};At.expect=function(O){this.eat(O)||this.unexpected()};At.unexpected=function(O){this.raise(O!=null?O:this.start,"Unexpected token")};var Xn=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};At.checkPatternErrors=function(O,G){if(!O)return;if(O.trailingComma>-1)this.raiseRecoverable(O.trailingComma,"Comma is not permitted after the rest element");var H=G?O.parenthesizedAssign:O.parenthesizedBind;if(H>-1)this.raiseRecoverable(H,G?"Assigning to rvalue":"Parenthesized pattern")};At.checkExpressionErrors=function(O,G){if(!O)return!1;var{shorthandAssign:H,doubleProto:X}=O;if(!G)return H>=0||X>=0;if(H>=0)this.raise(H,"Shorthand property assignments are valid only in destructuring patterns");if(X>=0)this.raiseRecoverable(X,"Redefinition of __proto__ property")};At.checkYieldAwaitInDefaultParams=function(){if(this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos))this.raise(this.yieldPos,"Yield expression cannot be a default value");if(this.awaitPos)this.raise(this.awaitPos,"Await expression cannot be a default value")};At.isSimpleAssignTarget=function(O){if(O.type==="ParenthesizedExpression")return this.isSimpleAssignTarget(O.expression);return O.type==="Identifier"||O.type==="MemberExpression"};var Qe=bt.prototype;Qe.parseTopLevel=function(O){var G=Object.create(null);if(!O.body)O.body=[];while(this.type!==_e.eof){var H=this.parseStatement(null,!0,G);O.body.push(H)}if(this.inModule)for(var X=0,le=Object.keys(this.undefinedExports);X<le.length;X+=1){var we=le[X];this.raiseRecoverable(this.undefinedExports[we].start,"Export '"+we+"' is not defined")}return this.adaptDirectivePrologue(O.body),this.next(),O.sourceType=this.options.sourceType==="commonjs"?"script":this.options.sourceType,this.finishNode(O,"Program")};var fr={kind:"loop"},_h={kind:"switch"};Qe.isLet=function(O){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;St.lastIndex=this.pos;var G=St.exec(this.input),H=this.pos+G[0].length,X=this.fullCharCodeAt(H);if(X===91||X===92)return!0;if(O)return!1;if(X===123)return!0;if(Yt(X)){var le=H;do H+=X<=65535?1:2;while(ri(X=this.fullCharCodeAt(H)));if(X===92)return!0;var we=this.input.slice(le,H);if(!Na.test(we))return!0}return!1};Qe.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;St.lastIndex=this.pos;var O=St.exec(this.input),G=this.pos+O[0].length,H;return!Tt.test(this.input.slice(this.pos,G))&&this.input.slice(G,G+8)==="function"&&(G+8===this.input.length||!(ri(H=this.fullCharCodeAt(G+8))||H===92))};Qe.isUsingKeyword=function(O,G){if(this.options.ecmaVersion<17||!this.isContextual(O?"await":"using"))return!1;St.lastIndex=this.pos;var H=St.exec(this.input),X=this.pos+H[0].length;if(Tt.test(this.input.slice(this.pos,X)))return!1;if(O){var le=X+5,we;if(this.input.slice(X,le)!=="using"||le===this.input.length||ri(we=this.fullCharCodeAt(le))||we===92)return!1;St.lastIndex=le;var ke=St.exec(this.input);if(X=le+ke[0].length,ke&&Tt.test(this.input.slice(le,X)))return!1}var ve=this.fullCharCodeAt(X);if(!Yt(ve)&&ve!==92)return!1;var Ee=X;do X+=ve<=65535?1:2;while(ri(ve=this.fullCharCodeAt(X)));if(ve===92)return!0;var Ce=this.input.slice(Ee,X);if(Na.test(Ce))return!1;if(G&&!O&&Ce==="of"){St.lastIndex=X;var Ae=St.exec(this.input);if(X=X+Ae[0].length,this.input.charCodeAt(X)!==61||(ve=this.input.charCodeAt(X+1))===61||ve===62)return!1}return!0};Qe.isAwaitUsing=function(O){return this.isUsingKeyword(!0,O)};Qe.isUsing=function(O){return this.isUsingKeyword(!1,O)};Qe.parseStatement=function(O,G,H){var X=this.type,le=this.startNode(),we;if(this.isLet(O))X=_e._var,we="let";switch(X){case _e._break:case _e._continue:return this.parseBreakContinueStatement(le,X.keyword);case _e._debugger:return this.parseDebuggerStatement(le);case _e._do:return this.parseDoStatement(le);case _e._for:return this.parseForStatement(le);case _e._function:if(O&&(this.strict||O!=="if"&&O!=="label")&&this.options.ecmaVersion>=6)this.unexpected();return this.parseFunctionStatement(le,!1,!O);case _e._class:if(O)this.unexpected();return this.parseClass(le,!0);case _e._if:return this.parseIfStatement(le);case _e._return:return this.parseReturnStatement(le);case _e._switch:return this.parseSwitchStatement(le);case _e._throw:return this.parseThrowStatement(le);case _e._try:return this.parseTryStatement(le);case _e._const:case _e._var:if(we=we||this.value,O&&we!=="var")this.unexpected();return this.parseVarStatement(le,we);case _e._while:return this.parseWhileStatement(le);case _e._with:return this.parseWithStatement(le);case _e.braceL:return this.parseBlock(!0,le);case _e.semi:return this.parseEmptyStatement(le);case _e._export:case _e._import:if(this.options.ecmaVersion>10&&X===_e._import){St.lastIndex=this.pos;var ke=St.exec(this.input),ve=this.pos+ke[0].length,Ee=this.input.charCodeAt(ve);if(Ee===40||Ee===46)return this.parseExpressionStatement(le,this.parseExpression())}if(!this.options.allowImportExportEverywhere){if(!G)this.raise(this.start,"'import' and 'export' may only appear at the top level");if(!this.inModule)this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")}return X===_e._import?this.parseImport(le):this.parseExport(le,H);default:if(this.isAsyncFunction()){if(O)this.unexpected();return this.next(),this.parseFunctionStatement(le,!0,!O)}var Ce=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(Ce){if(!this.allowUsing)this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement");if(O)this.raise(this.start,"Using declaration is not allowed in single-statement positions");if(Ce==="await using"){if(!this.canAwait)this.raise(this.start,"Await using cannot appear outside of async function");this.next()}return this.next(),this.parseVar(le,!1,Ce),this.semicolon(),this.finishNode(le,"VariableDeclaration")}var Ae=this.value,Te=this.parseExpression();if(X===_e.name&&Te.type==="Identifier"&&this.eat(_e.colon))return this.parseLabeledStatement(le,Ae,Te,O);else return this.parseExpressionStatement(le,Te)}};Qe.parseBreakContinueStatement=function(O,G){var H=G==="break";if(this.next(),this.eat(_e.semi)||this.insertSemicolon())O.label=null;else if(this.type!==_e.name)this.unexpected();else O.label=this.parseIdent(),this.semicolon();var X=0;for(;X<this.labels.length;++X){var le=this.labels[X];if(O.label==null||le.name===O.label.name){if(le.kind!=null&&(H||le.kind==="loop"))break;if(O.label&&H)break}}if(X===this.labels.length)this.raise(O.start,"Unsyntactic "+G);return this.finishNode(O,H?"BreakStatement":"ContinueStatement")};Qe.parseDebuggerStatement=function(O){return this.next(),this.semicolon(),this.finishNode(O,"DebuggerStatement")};Qe.parseDoStatement=function(O){if(this.next(),this.labels.push(fr),O.body=this.parseStatement("do"),this.labels.pop(),this.expect(_e._while),O.test=this.parseParenExpression(),this.options.ecmaVersion>=6)this.eat(_e.semi);else this.semicolon();return this.finishNode(O,"DoWhileStatement")};Qe.parseForStatement=function(O){this.next();var G=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(fr),this.enterScope(0),this.expect(_e.parenL),this.type===_e.semi){if(G>-1)this.unexpected(G);return this.parseFor(O,null)}var H=this.isLet();if(this.type===_e._var||this.type===_e._const||H){var X=this.startNode(),le=H?"let":this.value;return this.next(),this.parseVar(X,!0,le),this.finishNode(X,"VariableDeclaration"),this.parseForAfterInit(O,X,G)}var we=this.isContextual("let"),ke=!1,ve=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(ve){var Ee=this.startNode();if(this.next(),ve==="await using"){if(!this.canAwait)this.raise(this.start,"Await using cannot appear outside of async function");this.next()}return this.parseVar(Ee,!0,ve),this.finishNode(Ee,"VariableDeclaration"),this.parseForAfterInit(O,Ee,G)}var Ce=this.containsEsc,Ae=new Xn,Te=this.start,Ne=G>-1?this.parseExprSubscripts(Ae,"await"):this.parseExpression(!0,Ae);if(this.type===_e._in||(ke=this.options.ecmaVersion>=6&&this.isContextual("of"))){if(G>-1){if(this.type===_e._in)this.unexpected(G);O.await=!0}else if(ke&&this.options.ecmaVersion>=8){if(Ne.start===Te&&!Ce&&Ne.type==="Identifier"&&Ne.name==="async")this.unexpected();else if(this.options.ecmaVersion>=9)O.await=!1}if(we&&ke)this.raise(Ne.start,"The left-hand side of a for-of loop may not start with 'let'.");return this.toAssignable(Ne,!1,Ae),this.checkLValPattern(Ne),this.parseForIn(O,Ne)}else this.checkExpressionErrors(Ae,!0);if(G>-1)this.unexpected(G);return this.parseFor(O,Ne)};Qe.parseForAfterInit=function(O,G,H){if((this.type===_e._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&G.declarations.length===1){if(this.type===_e._in){if((G.kind==="using"||G.kind==="await using")&&!G.declarations[0].init)this.raise(this.start,"Using declaration is not allowed in for-in loops");if(this.options.ecmaVersion>=9&&H>-1)this.unexpected(H)}else if(this.options.ecmaVersion>=9)O.await=H>-1;return this.parseForIn(O,G)}if(H>-1)this.unexpected(H);return this.parseFor(O,G)};Qe.parseFunctionStatement=function(O,G,H){return this.next(),this.parseFunction(O,an|(H?0:or),!1,G)};Qe.parseIfStatement=function(O){return this.next(),O.test=this.parseParenExpression(),O.consequent=this.parseStatement("if"),O.alternate=this.eat(_e._else)?this.parseStatement("if"):null,this.finishNode(O,"IfStatement")};Qe.parseReturnStatement=function(O){if(!this.allowReturn)this.raise(this.start,"'return' outside of function");if(this.next(),this.eat(_e.semi)||this.insertSemicolon())O.argument=null;else O.argument=this.parseExpression(),this.semicolon();return this.finishNode(O,"ReturnStatement")};Qe.parseSwitchStatement=function(O){this.next(),O.discriminant=this.parseParenExpression(),O.cases=[],this.expect(_e.braceL),this.labels.push(_h),this.enterScope(Ra);var G;for(var H=!1;this.type!==_e.braceR;)if(this.type===_e._case||this.type===_e._default){var X=this.type===_e._case;if(G)this.finishNode(G,"SwitchCase");if(O.cases.push(G=this.startNode()),G.consequent=[],this.next(),X)G.test=this.parseExpression();else{if(H)this.raiseRecoverable(this.lastTokStart,"Multiple default clauses");H=!0,G.test=null}this.expect(_e.colon)}else{if(!G)this.unexpected();G.consequent.push(this.parseStatement(null))}if(this.exitScope(),G)this.finishNode(G,"SwitchCase");return this.next(),this.labels.pop(),this.finishNode(O,"SwitchStatement")};Qe.parseThrowStatement=function(O){if(this.next(),Tt.test(this.input.slice(this.lastTokEnd,this.start)))this.raise(this.lastTokEnd,"Illegal newline after throw");return O.argument=this.parseExpression(),this.semicolon(),this.finishNode(O,"ThrowStatement")};var Th=[];Qe.parseCatchClauseParam=function(){var O=this.parseBindingAtom(),G=O.type==="Identifier";return this.enterScope(G?Ma:0),this.checkLValPattern(O,G?Oa:oi),this.expect(_e.parenR),O};Qe.parseTryStatement=function(O){if(this.next(),O.block=this.parseBlock(),O.handler=null,this.type===_e._catch){var G=this.startNode();if(this.next(),this.eat(_e.parenL))G.param=this.parseCatchClauseParam();else{if(this.options.ecmaVersion<10)this.unexpected();G.param=null,this.enterScope(0)}G.body=this.parseBlock(!1),this.exitScope(),O.handler=this.finishNode(G,"CatchClause")}if(O.finalizer=this.eat(_e._finally)?this.parseBlock():null,!O.handler&&!O.finalizer)this.raise(O.start,"Missing catch or finally clause");return this.finishNode(O,"TryStatement")};Qe.parseVarStatement=function(O,G,H){return this.next(),this.parseVar(O,!1,G,H),this.semicolon(),this.finishNode(O,"VariableDeclaration")};Qe.parseWhileStatement=function(O){return this.next(),O.test=this.parseParenExpression(),this.labels.push(fr),O.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(O,"WhileStatement")};Qe.parseWithStatement=function(O){if(this.strict)this.raise(this.start,"'with' in strict mode");return this.next(),O.object=this.parseParenExpression(),O.body=this.parseStatement("with"),this.finishNode(O,"WithStatement")};Qe.parseEmptyStatement=function(O){return this.next(),this.finishNode(O,"EmptyStatement")};Qe.parseLabeledStatement=function(O,G,H,X){for(var le=0,we=this.labels;le<we.length;le+=1){var ke=we[le];if(ke.name===G)this.raise(H.start,"Label '"+G+"' is already declared")}var ve=this.type.isLoop?"loop":this.type===_e._switch?"switch":null;for(var Ee=this.labels.length-1;Ee>=0;Ee--){var Ce=this.labels[Ee];if(Ce.statementStart===O.start)Ce.statementStart=this.start,Ce.kind=ve;else break}return this.labels.push({name:G,kind:ve,statementStart:this.start}),O.body=this.parseStatement(X?X.indexOf("label")===-1?X+"label":X:"label"),this.labels.pop(),O.label=H,this.finishNode(O,"LabeledStatement")};Qe.parseExpressionStatement=function(O,G){return O.expression=G,this.semicolon(),this.finishNode(O,"ExpressionStatement")};Qe.parseBlock=function(O,G,H){if(O===void 0)O=!0;if(G===void 0)G=this.startNode();if(G.body=[],this.expect(_e.braceL),O)this.enterScope(0);while(this.type!==_e.braceR){var X=this.parseStatement(null);G.body.push(X)}if(H)this.strict=!1;if(this.next(),O)this.exitScope();return this.finishNode(G,"BlockStatement")};Qe.parseFor=function(O,G){return O.init=G,this.expect(_e.semi),O.test=this.type===_e.semi?null:this.parseExpression(),this.expect(_e.semi),O.update=this.type===_e.parenR?null:this.parseExpression(),this.expect(_e.parenR),O.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(O,"ForStatement")};Qe.parseForIn=function(O,G){var H=this.type===_e._in;if(this.next(),G.type==="VariableDeclaration"&&G.declarations[0].init!=null&&(!H||this.options.ecmaVersion<8||this.strict||G.kind!=="var"||G.declarations[0].id.type!=="Identifier"))this.raise(G.start,(H?"for-in":"for-of")+" loop variable declaration may not have an initializer");return O.left=G,O.right=H?this.parseExpression():this.parseMaybeAssign(),this.expect(_e.parenR),O.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(O,H?"ForInStatement":"ForOfStatement")};Qe.parseVar=function(O,G,H,X){O.declarations=[],O.kind=H;for(;;){var le=this.startNode();if(this.parseVarId(le,H),this.eat(_e.eq))le.init=this.parseMaybeAssign(G);else if(!X&&H==="const"&&!(this.type===_e._in||this.options.ecmaVersion>=6&&this.isContextual("of")))this.unexpected();else if(!X&&(H==="using"||H==="await using")&&this.options.ecmaVersion>=17&&this.type!==_e._in&&!this.isContextual("of"))this.raise(this.lastTokEnd,"Missing initializer in "+H+" declaration");else if(!X&&le.id.type!=="Identifier"&&!(G&&(this.type===_e._in||this.isContextual("of"))))this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value");else le.init=null;if(O.declarations.push(this.finishNode(le,"VariableDeclarator")),!this.eat(_e.comma))break}return O};Qe.parseVarId=function(O,G){O.id=G==="using"||G==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(O.id,G==="var"?hr:oi,!1)};var an=1,or=2,Da=4;Qe.parseFunction=function(O,G,H,X,le){if(this.initFunction(O),this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!X){if(this.type===_e.star&&G&or)this.unexpected();O.generator=this.eat(_e.star)}if(this.options.ecmaVersion>=8)O.async=!!X;if(G&an){if(O.id=G&Da&&this.type!==_e.name?null:this.parseIdent(),O.id&&!(G&or))this.checkLValSimple(O.id,this.strict||O.generator||O.async?this.treatFunctionsAsVar?hr:oi:La)}var we=this.yieldPos,ke=this.awaitPos,ve=this.awaitIdentPos;if(this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(ur(O.async,O.generator)),!(G&an))O.id=this.type===_e.name?this.parseIdent():null;return this.parseFunctionParams(O),this.parseFunctionBody(O,H,!1,le),this.yieldPos=we,this.awaitPos=ke,this.awaitIdentPos=ve,this.finishNode(O,G&an?"FunctionDeclaration":"FunctionExpression")};Qe.parseFunctionParams=function(O){this.expect(_e.parenL),O.params=this.parseBindingList(_e.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};Qe.parseClass=function(O,G){this.next();var H=this.strict;this.strict=!0,this.parseClassId(O,G),this.parseClassSuper(O);var X=this.enterClassBody(),le=this.startNode(),we=!1;le.body=[],this.expect(_e.braceL);while(this.type!==_e.braceR){var ke=this.parseClassElement(O.superClass!==null);if(ke){if(le.body.push(ke),ke.type==="MethodDefinition"&&ke.kind==="constructor"){if(we)this.raiseRecoverable(ke.start,"Duplicate constructor in the same class");we=!0}else if(ke.key&&ke.key.type==="PrivateIdentifier"&&Ih(X,ke))this.raiseRecoverable(ke.key.start,"Identifier '#"+ke.key.name+"' has already been declared")}}return this.strict=H,this.next(),O.body=this.finishNode(le,"ClassBody"),this.exitClassBody(),this.finishNode(O,G?"ClassDeclaration":"ClassExpression")};Qe.parseClassElement=function(O){if(this.eat(_e.semi))return null;var G=this.options.ecmaVersion,H=this.startNode(),X="",le=!1,we=!1,ke="method",ve=!1;if(this.eatContextual("static")){if(G>=13&&this.eat(_e.braceL))return this.parseClassStaticBlock(H),H;if(this.isClassElementNameStart()||this.type===_e.star)ve=!0;else X="static"}if(H.static=ve,!X&&G>=8&&this.eatContextual("async"))if((this.isClassElementNameStart()||this.type===_e.star)&&!this.canInsertSemicolon())we=!0;else X="async";if(!X&&(G>=9||!we)&&this.eat(_e.star))le=!0;if(!X&&!we&&!le){var Ee=this.value;if(this.eatContextual("get")||this.eatContextual("set"))if(this.isClassElementNameStart())ke=Ee;else X=Ee}if(X)H.computed=!1,H.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),H.key.name=X,this.finishNode(H.key,"Identifier");else this.parseClassElementName(H);if(G<13||this.type===_e.parenL||ke!=="method"||le||we){var Ce=!H.static&&Wn(H,"constructor"),Ae=Ce&&O;if(Ce&&ke!=="method")this.raise(H.key.start,"Constructor can't have get/set modifier");H.kind=Ce?"constructor":ke,this.parseClassMethod(H,le,we,Ae)}else this.parseClassField(H);return H};Qe.isClassElementNameStart=function(){return this.type===_e.name||this.type===_e.privateId||this.type===_e.num||this.type===_e.string||this.type===_e.bracketL||this.type.keyword};Qe.parseClassElementName=function(O){if(this.type===_e.privateId){if(this.value==="constructor")this.raise(this.start,"Classes can't have an element named '#constructor'");O.computed=!1,O.key=this.parsePrivateIdent()}else this.parsePropertyName(O)};Qe.parseClassMethod=function(O,G,H,X){var le=O.key;if(O.kind==="constructor"){if(G)this.raise(le.start,"Constructor can't be a generator");if(H)this.raise(le.start,"Constructor can't be an async method")}else if(O.static&&Wn(O,"prototype"))this.raise(le.start,"Classes may not have a static property named prototype");var we=O.value=this.parseMethod(G,H,X);if(O.kind==="get"&&we.params.length!==0)this.raiseRecoverable(we.start,"getter should have no params");if(O.kind==="set"&&we.params.length!==1)this.raiseRecoverable(we.start,"setter should have exactly one param");if(O.kind==="set"&&we.params[0].type==="RestElement")this.raiseRecoverable(we.params[0].start,"Setter cannot use rest params");return this.finishNode(O,"MethodDefinition")};Qe.parseClassField=function(O){if(Wn(O,"constructor"))this.raise(O.key.start,"Classes can't have a field named 'constructor'");else if(O.static&&Wn(O,"prototype"))this.raise(O.key.start,"Classes can't have a static field named 'prototype'");if(this.eat(_e.eq))this.enterScope(pn|Gn),O.value=this.parseMaybeAssign(),this.exitScope();else O.value=null;return this.semicolon(),this.finishNode(O,"PropertyDefinition")};Qe.parseClassStaticBlock=function(O){O.body=[];var G=this.labels;this.labels=[],this.enterScope(Ei|Gn);while(this.type!==_e.braceR){var H=this.parseStatement(null);O.body.push(H)}return this.next(),this.exitScope(),this.labels=G,this.finishNode(O,"StaticBlock")};Qe.parseClassId=function(O,G){if(this.type===_e.name){if(O.id=this.parseIdent(),G)this.checkLValSimple(O.id,oi,!1)}else{if(G===!0)this.unexpected();O.id=null}};Qe.parseClassSuper=function(O){O.superClass=this.eat(_e._extends)?this.parseExprSubscripts(null,!1):null};Qe.enterClassBody=function(){var O={declared:Object.create(null),used:[]};return this.privateNameStack.push(O),O.declared};Qe.exitClassBody=function(){var O=this.privateNameStack.pop(),{declared:G,used:H}=O;if(!this.options.checkPrivateFields)return;var X=this.privateNameStack.length,le=X===0?null:this.privateNameStack[X-1];for(var we=0;we<H.length;++we){var ke=H[we];if(!cn(G,ke.name))if(le)le.used.push(ke);else this.raiseRecoverable(ke.start,"Private field '#"+ke.name+"' must be declared in an enclosing class")}};function Ih(O,G){var H=G.key.name,X=O[H],le="true";if(G.type==="MethodDefinition"&&(G.kind==="get"||G.kind==="set"))le=(G.static?"s":"i")+G.kind;if(X==="iget"&&le==="iset"||X==="iset"&&le==="iget"||X==="sget"&&le==="sset"||X==="sset"&&le==="sget")return O[H]="true",!1;else if(!X)return O[H]=le,!1;else return!0}function Wn(O,G){var{computed:H,key:X}=O;return!H&&(X.type==="Identifier"&&X.name===G||X.type==="Literal"&&X.value===G)}Qe.parseExportAllDeclaration=function(O,G){if(this.options.ecmaVersion>=11)if(this.eatContextual("as"))O.exported=this.parseModuleExportName(),this.checkExport(G,O.exported,this.lastTokStart);else O.exported=null;if(this.expectContextual("from"),this.type!==_e.string)this.unexpected();if(O.source=this.parseExprAtom(),this.options.ecmaVersion>=16)O.attributes=this.parseWithClause();return this.semicolon(),this.finishNode(O,"ExportAllDeclaration")};Qe.parseExport=function(O,G){if(this.next(),this.eat(_e.star))return this.parseExportAllDeclaration(O,G);if(this.eat(_e._default))return this.checkExport(G,"default",this.lastTokStart),O.declaration=this.parseExportDefaultDeclaration(),this.finishNode(O,"ExportDefaultDeclaration");if(this.shouldParseExportStatement()){if(O.declaration=this.parseExportDeclaration(O),O.declaration.type==="VariableDeclaration")this.checkVariableExport(G,O.declaration.declarations);else this.checkExport(G,O.declaration.id,O.declaration.id.start);if(O.specifiers=[],O.source=null,this.options.ecmaVersion>=16)O.attributes=[]}else{if(O.declaration=null,O.specifiers=this.parseExportSpecifiers(G),this.eatContextual("from")){if(this.type!==_e.string)this.unexpected();if(O.source=this.parseExprAtom(),this.options.ecmaVersion>=16)O.attributes=this.parseWithClause()}else{for(var H=0,X=O.specifiers;H<X.length;H+=1){var le=X[H];if(this.checkUnreserved(le.local),this.checkLocalExport(le.local),le.local.type==="Literal")this.raise(le.local.start,"A string literal cannot be used as an exported binding without `from`.")}if(O.source=null,this.options.ecmaVersion>=16)O.attributes=[]}this.semicolon()}return this.finishNode(O,"ExportNamedDeclaration")};Qe.parseExportDeclaration=function(O){return this.parseStatement(null)};Qe.parseExportDefaultDeclaration=function(){var O;if(this.type===_e._function||(O=this.isAsyncFunction())){var G=this.startNode();if(this.next(),O)this.next();return this.parseFunction(G,an|Da,!1,O)}else if(this.type===_e._class){var H=this.startNode();return this.parseClass(H,"nullableID")}else{var X=this.parseMaybeAssign();return this.semicolon(),X}};Qe.checkExport=function(O,G,H){if(!O)return;if(typeof G!=="string")G=G.type==="Identifier"?G.name:G.value;if(cn(O,G))this.raiseRecoverable(H,"Duplicate export '"+G+"'");O[G]=!0};Qe.checkPatternExport=function(O,G){var H=G.type;if(H==="Identifier")this.checkExport(O,G,G.start);else if(H==="ObjectPattern")for(var X=0,le=G.properties;X<le.length;X+=1){var we=le[X];this.checkPatternExport(O,we)}else if(H==="ArrayPattern")for(var ke=0,ve=G.elements;ke<ve.length;ke+=1){var Ee=ve[ke];if(Ee)this.checkPatternExport(O,Ee)}else if(H==="Property")this.checkPatternExport(O,G.value);else if(H==="AssignmentPattern")this.checkPatternExport(O,G.left);else if(H==="RestElement")this.checkPatternExport(O,G.argument)};Qe.checkVariableExport=function(O,G){if(!O)return;for(var H=0,X=G;H<X.length;H+=1){var le=X[H];this.checkPatternExport(O,le.id)}};Qe.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()};Qe.parseExportSpecifier=function(O){var G=this.startNode();return G.local=this.parseModuleExportName(),G.exported=this.eatContextual("as")?this.parseModuleExportName():G.local,this.checkExport(O,G.exported,G.exported.start),this.finishNode(G,"ExportSpecifier")};Qe.parseExportSpecifiers=function(O){var G=[],H=!0;this.expect(_e.braceL);while(!this.eat(_e.braceR)){if(!H){if(this.expect(_e.comma),this.afterTrailingComma(_e.braceR))break}else H=!1;G.push(this.parseExportSpecifier(O))}return G};Qe.parseImport=function(O){if(this.next(),this.type===_e.string)O.specifiers=Th,O.source=this.parseExprAtom();else O.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),O.source=this.type===_e.string?this.parseExprAtom():this.unexpected();if(this.options.ecmaVersion>=16)O.attributes=this.parseWithClause();return this.semicolon(),this.finishNode(O,"ImportDeclaration")};Qe.parseImportSpecifier=function(){var O=this.startNode();if(O.imported=this.parseModuleExportName(),this.eatContextual("as"))O.local=this.parseIdent();else this.checkUnreserved(O.imported),O.local=O.imported;return this.checkLValSimple(O.local,oi),this.finishNode(O,"ImportSpecifier")};Qe.parseImportDefaultSpecifier=function(){var O=this.startNode();return O.local=this.parseIdent(),this.checkLValSimple(O.local,oi),this.finishNode(O,"ImportDefaultSpecifier")};Qe.parseImportNamespaceSpecifier=function(){var O=this.startNode();return this.next(),this.expectContextual("as"),O.local=this.parseIdent(),this.checkLValSimple(O.local,oi),this.finishNode(O,"ImportNamespaceSpecifier")};Qe.parseImportSpecifiers=function(){var O=[],G=!0;if(this.type===_e.name){if(O.push(this.parseImportDefaultSpecifier()),!this.eat(_e.comma))return O}if(this.type===_e.star)return O.push(this.parseImportNamespaceSpecifier()),O;this.expect(_e.braceL);while(!this.eat(_e.braceR)){if(!G){if(this.expect(_e.comma),this.afterTrailingComma(_e.braceR))break}else G=!1;O.push(this.parseImportSpecifier())}return O};Qe.parseWithClause=function(){var O=[];if(!this.eat(_e._with))return O;this.expect(_e.braceL);var G={},H=!0;while(!this.eat(_e.braceR)){if(!H){if(this.expect(_e.comma),this.afterTrailingComma(_e.braceR))break}else H=!1;var X=this.parseImportAttribute(),le=X.key.type==="Identifier"?X.key.name:X.key.value;if(cn(G,le))this.raiseRecoverable(X.key.start,"Duplicate attribute key '"+le+"'");G[le]=!0,O.push(X)}return O};Qe.parseImportAttribute=function(){var O=this.startNode();if(O.key=this.type===_e.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(_e.colon),this.type!==_e.string)this.unexpected();return O.value=this.parseExprAtom(),this.finishNode(O,"ImportAttribute")};Qe.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===_e.string){var O=this.parseLiteral(this.value);if(Eh.test(O.value))this.raise(O.start,"An export name cannot include a lone surrogate.");return O}return this.parseIdent(!0)};Qe.adaptDirectivePrologue=function(O){for(var G=0;G<O.length&&this.isDirectiveCandidate(O[G]);++G)O[G].directive=O[G].expression.raw.slice(1,-1)};Qe.isDirectiveCandidate=function(O){return this.options.ecmaVersion>=5&&O.type==="ExpressionStatement"&&O.expression.type==="Literal"&&typeof O.expression.value==="string"&&(this.input[O.start]==='"'||this.input[O.start]==="'")};var Ut=bt.prototype;Ut.toAssignable=function(O,G,H){if(this.options.ecmaVersion>=6&&O)switch(O.type){case"Identifier":if(this.inAsync&&O.name==="await")this.raise(O.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":if(O.type="ObjectPattern",H)this.checkPatternErrors(H,!0);for(var X=0,le=O.properties;X<le.length;X+=1){var we=le[X];if(this.toAssignable(we,G),we.type==="RestElement"&&(we.argument.type==="ArrayPattern"||we.argument.type==="ObjectPattern"))this.raise(we.argument.start,"Unexpected token")}break;case"Property":if(O.kind!=="init")this.raise(O.key.start,"Object pattern can't contain getter or setter");this.toAssignable(O.value,G);break;case"ArrayExpression":if(O.type="ArrayPattern",H)this.checkPatternErrors(H,!0);this.toAssignableList(O.elements,G);break;case"SpreadElement":if(O.type="RestElement",this.toAssignable(O.argument,G),O.argument.type==="AssignmentPattern")this.raise(O.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":if(O.operator!=="=")this.raise(O.left.end,"Only '=' operator can be used for specifying default value.");O.type="AssignmentPattern",delete O.operator,this.toAssignable(O.left,G);break;case"ParenthesizedExpression":this.toAssignable(O.expression,G,H);break;case"ChainExpression":this.raiseRecoverable(O.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!G)break;default:this.raise(O.start,"Assigning to rvalue")}else if(H)this.checkPatternErrors(H,!0);return O};Ut.toAssignableList=function(O,G){var H=O.length;for(var X=0;X<H;X++){var le=O[X];if(le)this.toAssignable(le,G)}if(H){var we=O[H-1];if(this.options.ecmaVersion===6&&G&&we&&we.type==="RestElement"&&we.argument.type!=="Identifier")this.unexpected(we.argument.start)}return O};Ut.parseSpread=function(O){var G=this.startNode();return this.next(),G.argument=this.parseMaybeAssign(!1,O),this.finishNode(G,"SpreadElement")};Ut.parseRestBinding=function(){var O=this.startNode();if(this.next(),this.options.ecmaVersion===6&&this.type!==_e.name)this.unexpected();return O.argument=this.parseBindingAtom(),this.finishNode(O,"RestElement")};Ut.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case _e.bracketL:var O=this.startNode();return this.next(),O.elements=this.parseBindingList(_e.bracketR,!0,!0),this.finishNode(O,"ArrayPattern");case _e.braceL:return this.parseObj(!0)}return this.parseIdent()};Ut.parseBindingList=function(O,G,H,X){var le=[],we=!0;while(!this.eat(O)){if(we)we=!1;else this.expect(_e.comma);if(G&&this.type===_e.comma)le.push(null);else if(H&&this.afterTrailingComma(O))break;else if(this.type===_e.ellipsis){var ke=this.parseRestBinding();if(this.parseBindingListItem(ke),le.push(ke),this.type===_e.comma)this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");this.expect(O);break}else le.push(this.parseAssignableListItem(X))}return le};Ut.parseAssignableListItem=function(O){var G=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(G),G};Ut.parseBindingListItem=function(O){return O};Ut.parseMaybeDefault=function(O,G,H){if(H=H||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(_e.eq))return H;var X=this.startNodeAt(O,G);return X.left=H,X.right=this.parseMaybeAssign(),this.finishNode(X,"AssignmentPattern")};Ut.checkLValSimple=function(O,G,H){if(G===void 0)G=jn;var X=G!==jn;switch(O.type){case"Identifier":if(this.strict&&this.reservedWordsStrictBind.test(O.name))this.raiseRecoverable(O.start,(X?"Binding ":"Assigning to ")+O.name+" in strict mode");if(X){if(G===oi&&O.name==="let")this.raiseRecoverable(O.start,"let is disallowed as a lexically bound name");if(H){if(cn(H,O.name))this.raiseRecoverable(O.start,"Argument name clash");H[O.name]=!0}if(G!==Va)this.declareName(O.name,G,O.start)}break;case"ChainExpression":this.raiseRecoverable(O.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(X)this.raiseRecoverable(O.start,"Binding member expression");break;case"ParenthesizedExpression":if(X)this.raiseRecoverable(O.start,"Binding parenthesized expression");return this.checkLValSimple(O.expression,G,H);default:this.raise(O.start,(X?"Binding":"Assigning to")+" rvalue")}};Ut.checkLValPattern=function(O,G,H){if(G===void 0)G=jn;switch(O.type){case"ObjectPattern":for(var X=0,le=O.properties;X<le.length;X+=1){var we=le[X];this.checkLValInnerPattern(we,G,H)}break;case"ArrayPattern":for(var ke=0,ve=O.elements;ke<ve.length;ke+=1){var Ee=ve[ke];if(Ee)this.checkLValInnerPattern(Ee,G,H)}break;default:this.checkLValSimple(O,G,H)}};Ut.checkLValInnerPattern=function(O,G,H){if(G===void 0)G=jn;switch(O.type){case"Property":this.checkLValInnerPattern(O.value,G,H);break;case"AssignmentPattern":this.checkLValPattern(O.left,G,H);break;case"RestElement":this.checkLValPattern(O.argument,G,H);break;default:this.checkLValPattern(O,G,H)}};var Xt=function(O,G,H,X,le){this.token=O,this.isExpr=!!G,this.preserveSpace=!!H,this.override=X,this.generator=!!le},yt={b_stat:new Xt("{",!1),b_expr:new Xt("{",!0),b_tmpl:new Xt("${",!1),p_stat:new Xt("(",!1),p_expr:new Xt("(",!0),q_tmpl:new Xt("`",!0,!0,function(O){return O.tryReadTemplateToken()}),f_stat:new Xt("function",!1),f_expr:new Xt("function",!0),f_expr_gen:new Xt("function",!0,!1,null,!0),f_gen:new Xt("function",!1,!1,null,!0)},Ti=bt.prototype;Ti.initialContext=function(){return[yt.b_stat]};Ti.curContext=function(){return this.context[this.context.length-1]};Ti.braceIsBlock=function(O){var G=this.curContext();if(G===yt.f_expr||G===yt.f_stat)return!0;if(O===_e.colon&&(G===yt.b_stat||G===yt.b_expr))return!G.isExpr;if(O===_e._return||O===_e.name&&this.exprAllowed)return Tt.test(this.input.slice(this.lastTokEnd,this.start));if(O===_e._else||O===_e.semi||O===_e.eof||O===_e.parenR||O===_e.arrow)return!0;if(O===_e.braceL)return G===yt.b_stat;if(O===_e._var||O===_e._const||O===_e.name)return!1;return!this.exprAllowed};Ti.inGeneratorContext=function(){for(var O=this.context.length-1;O>=1;O--){var G=this.context[O];if(G.token==="function")return G.generator}return!1};Ti.updateContext=function(O){var G,H=this.type;if(H.keyword&&O===_e.dot)this.exprAllowed=!1;else if(G=H.updateContext)G.call(this,O);else this.exprAllowed=H.beforeExpr};Ti.overrideContext=function(O){if(this.curContext()!==O)this.context[this.context.length-1]=O};_e.parenR.updateContext=_e.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var O=this.context.pop();if(O===yt.b_stat&&this.curContext().token==="function")O=this.context.pop();this.exprAllowed=!O.isExpr};_e.braceL.updateContext=function(O){this.context.push(this.braceIsBlock(O)?yt.b_stat:yt.b_expr),this.exprAllowed=!0};_e.dollarBraceL.updateContext=function(){this.context.push(yt.b_tmpl),this.exprAllowed=!0};_e.parenL.updateContext=function(O){var G=O===_e._if||O===_e._for||O===_e._with||O===_e._while;this.context.push(G?yt.p_stat:yt.p_expr),this.exprAllowed=!0};_e.incDec.updateContext=function(){};_e._function.updateContext=_e._class.updateContext=function(O){if(O.beforeExpr&&O!==_e._else&&!(O===_e.semi&&this.curContext()!==yt.p_stat)&&!(O===_e._return&&Tt.test(this.input.slice(this.lastTokEnd,this.start)))&&!((O===_e.colon||O===_e.braceL)&&this.curContext()===yt.b_stat))this.context.push(yt.f_expr);else this.context.push(yt.f_stat);this.exprAllowed=!1};_e.colon.updateContext=function(){if(this.curContext().token==="function")this.context.pop();this.exprAllowed=!0};_e.backQuote.updateContext=function(){if(this.curContext()===yt.q_tmpl)this.context.pop();else this.context.push(yt.q_tmpl);this.exprAllowed=!1};_e.star.updateContext=function(O){if(O===_e._function){var G=this.context.length-1;if(this.context[G]===yt.f_expr)this.context[G]=yt.f_expr_gen;else this.context[G]=yt.f_gen}this.exprAllowed=!0};_e.name.updateContext=function(O){var G=!1;if(this.options.ecmaVersion>=6&&O!==_e.dot){if(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())G=!0}this.exprAllowed=G};var nt=bt.prototype;nt.checkPropClash=function(O,G,H){if(this.options.ecmaVersion>=9&&O.type==="SpreadElement")return;if(this.options.ecmaVersion>=6&&(O.computed||O.method||O.shorthand))return;var X=O.key,le;switch(X.type){case"Identifier":le=X.name;break;case"Literal":le=String(X.value);break;default:return}var we=O.kind;if(this.options.ecmaVersion>=6){if(le==="__proto__"&&we==="init"){if(G.proto)if(H){if(H.doubleProto<0)H.doubleProto=X.start}else this.raiseRecoverable(X.start,"Redefinition of __proto__ property");G.proto=!0}return}le="$"+le;var ke=G[le];if(ke){var ve;if(we==="init")ve=this.strict&&ke.init||ke.get||ke.set;else ve=ke.init||ke[we];if(ve)this.raiseRecoverable(X.start,"Redefinition of property")}else ke=G[le]={init:!1,get:!1,set:!1};ke[we]=!0};nt.parseExpression=function(O,G){var H=this;return this.catchStackOverflow(function(){var{start:X,startLoc:le}=H,we=H.parseMaybeAssign(O,G);if(H.type===_e.comma){var ke=H.startNodeAt(X,le);ke.expressions=[we];while(H.eat(_e.comma))ke.expressions.push(H.parseMaybeAssign(O,G));return H.finishNode(ke,"SequenceExpression")}return we})};nt.parseMaybeAssign=function(O,G,H){if(this.isContextual("yield"))if(this.inGenerator)return this.parseYield(O);else this.exprAllowed=!1;var X=!1,le=-1,we=-1,ke=-1;if(G)le=G.parenthesizedAssign,we=G.trailingComma,ke=G.doubleProto,G.parenthesizedAssign=G.trailingComma=-1;else G=new Xn,X=!0;var ve=this.start,Ee=this.startLoc;if(this.type===_e.parenL||this.type===_e.name)this.potentialArrowAt=this.start,this.potentialArrowInForAwait=O==="await";var Ce=this.parseMaybeConditional(O,G);if(H)Ce=H.call(this,Ce,ve,Ee);if(this.type.isAssign){var Ae=this.startNodeAt(ve,Ee);if(Ae.operator=this.value,this.type===_e.eq)Ce=this.toAssignable(Ce,!1,G);if(!X)G.parenthesizedAssign=G.trailingComma=G.doubleProto=-1;if(G.shorthandAssign>=Ce.start)G.shorthandAssign=-1;if(this.type===_e.eq)this.checkLValPattern(Ce);else this.checkLValSimple(Ce);if(Ae.left=Ce,this.next(),Ae.right=this.parseMaybeAssign(O),ke>-1)G.doubleProto=ke;return this.finishNode(Ae,"AssignmentExpression")}else if(X)this.checkExpressionErrors(G,!0);if(le>-1)G.parenthesizedAssign=le;if(we>-1)G.trailingComma=we;return Ce};nt.parseMaybeConditional=function(O,G){var H=this.start,X=this.startLoc,le=this.parseExprOps(O,G);if(this.checkExpressionErrors(G))return le;if(!(le.type==="ArrowFunctionExpression"&&le.start===H)&&this.eat(_e.question)){var we=this.startNodeAt(H,X);return we.test=le,we.consequent=this.parseMaybeAssign(),this.expect(_e.colon),we.alternate=this.parseMaybeAssign(O),this.finishNode(we,"ConditionalExpression")}return le};nt.parseExprOps=function(O,G){var H=this.start,X=this.startLoc,le=this.parseMaybeUnary(G,!1,!1,O);if(this.checkExpressionErrors(G))return le;return le.start===H&&le.type==="ArrowFunctionExpression"?le:this.parseExprOp(le,H,X,-1,O)};nt.parseExprOp=function(O,G,H,X,le){var we=this.type.binop;if(we!=null&&(!le||this.type!==_e._in)){if(we>X){var ke=this.type===_e.logicalOR||this.type===_e.logicalAND,ve=this.type===_e.coalesce;if(ve)we=_e.logicalAND.binop;var Ee=this.value;this.next();var Ce=this.start,Ae=this.startLoc,Te=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,le),Ce,Ae,we,le),Ne=this.buildBinary(G,H,O,Te,Ee,ke||ve);if(ke&&this.type===_e.coalesce||ve&&(this.type===_e.logicalOR||this.type===_e.logicalAND))this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses");return this.parseExprOp(Ne,G,H,X,le)}}return O};nt.buildBinary=function(O,G,H,X,le,we){if(X.type==="PrivateIdentifier")this.raise(X.start,"Private identifier can only be left side of binary expression");var ke=this.startNodeAt(O,G);return ke.left=H,ke.operator=le,ke.right=X,this.finishNode(ke,we?"LogicalExpression":"BinaryExpression")};nt.parseMaybeUnary=function(O,G,H,X){var le=this.start,we=this.startLoc,ke;if(this.isContextual("await")&&this.canAwait)ke=this.parseAwait(X),G=!0;else if(this.type.prefix){var ve=this.startNode(),Ee=this.type===_e.incDec;if(ve.operator=this.value,ve.prefix=!0,this.next(),ve.argument=this.parseMaybeUnary(null,!0,Ee,X),this.checkExpressionErrors(O,!0),Ee)this.checkLValSimple(ve.argument);else if(this.strict&&ve.operator==="delete"&&Ba(ve.argument))this.raiseRecoverable(ve.start,"Deleting local variable in strict mode");else if(ve.operator==="delete"&&ar(ve.argument))this.raiseRecoverable(ve.start,"Private fields can not be deleted");else G=!0;ke=this.finishNode(ve,Ee?"UpdateExpression":"UnaryExpression")}else if(!G&&this.type===_e.privateId){if((X||this.privateNameStack.length===0)&&this.options.checkPrivateFields)this.unexpected();if(ke=this.parsePrivateIdent(),this.type!==_e._in)this.unexpected()}else{if(ke=this.parseExprSubscripts(O,X),this.checkExpressionErrors(O))return ke;while(this.type.postfix&&!this.canInsertSemicolon()){var Ce=this.startNodeAt(le,we);Ce.operator=this.value,Ce.prefix=!1,Ce.argument=ke,this.checkLValSimple(ke),this.next(),ke=this.finishNode(Ce,"UpdateExpression")}}if(!H&&!(ke.type==="ArrowFunctionExpression"&&ke.start===le)&&this.eat(_e.starstar))if(G)this.unexpected(this.lastTokStart);else return this.buildBinary(le,we,ke,this.parseMaybeUnary(null,!1,!1,X),"**",!1);else return ke};function Ba(O){return O.type==="Identifier"||O.type==="ParenthesizedExpression"&&Ba(O.expression)}function ar(O){return O.type==="MemberExpression"&&O.property.type==="PrivateIdentifier"||O.type==="ChainExpression"&&ar(O.expression)||O.type==="ParenthesizedExpression"&&ar(O.expression)}nt.parseExprSubscripts=function(O,G){var H=this.start,X=this.startLoc,le=this.parseExprAtom(O,G);if(le.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return le;var we=this.parseSubscripts(le,H,X,!1,G);if(O&&we.type==="MemberExpression"){if(O.parenthesizedAssign>=we.start)O.parenthesizedAssign=-1;if(O.parenthesizedBind>=we.start)O.parenthesizedBind=-1;if(O.trailingComma>=we.start)O.trailingComma=-1}return we};nt.parseSubscripts=function(O,G,H,X,le){var we=this.options.ecmaVersion>=8&&O.type==="Identifier"&&O.name==="async"&&this.lastTokEnd===O.end&&!this.canInsertSemicolon()&&O.end-O.start===5&&this.potentialArrowAt===O.start,ke=!1;while(!0){var ve=this.parseSubscript(O,G,H,X,we,ke,le);if(ve.optional)ke=!0;if(ve===O||ve.type==="ArrowFunctionExpression"){if(ke){var Ee=this.startNodeAt(G,H);Ee.expression=ve,ve=this.finishNode(Ee,"ChainExpression")}return ve}O=ve}};nt.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(_e.arrow)};nt.parseSubscriptAsyncArrow=function(O,G,H,X){return this.parseArrowExpression(this.startNodeAt(O,G),H,!0,X)};nt.parseSubscript=function(O,G,H,X,le,we,ke){var ve=this.options.ecmaVersion>=11,Ee=ve&&this.eat(_e.questionDot);if(X&&Ee)this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var Ce=this.eat(_e.bracketL);if(Ce||Ee&&this.type!==_e.parenL&&this.type!==_e.backQuote||this.eat(_e.dot)){var Ae=this.startNodeAt(G,H);if(Ae.object=O,Ce)Ae.property=this.parseExpression(),this.expect(_e.bracketR);else if(this.type===_e.privateId&&O.type!=="Super")Ae.property=this.parsePrivateIdent();else Ae.property=this.parseIdent(this.options.allowReserved!=="never");if(Ae.computed=!!Ce,ve)Ae.optional=Ee;O=this.finishNode(Ae,"MemberExpression")}else if(!X&&this.eat(_e.parenL)){var Te=new Xn,Ne=this.yieldPos,Pe=this.awaitPos,Oe=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var Le=this.parseExprList(_e.parenR,this.options.ecmaVersion>=8,!1,Te);if(le&&!Ee&&this.shouldParseAsyncArrow()){if(this.checkPatternErrors(Te,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0)this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function");return this.yieldPos=Ne,this.awaitPos=Pe,this.awaitIdentPos=Oe,this.parseSubscriptAsyncArrow(G,H,Le,ke)}this.checkExpressionErrors(Te,!0),this.yieldPos=Ne||this.yieldPos,this.awaitPos=Pe||this.awaitPos,this.awaitIdentPos=Oe||this.awaitIdentPos;var qe=this.startNodeAt(G,H);if(qe.callee=O,qe.arguments=Le,ve)qe.optional=Ee;O=this.finishNode(qe,"CallExpression")}else if(this.type===_e.backQuote){if(Ee||we)this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var Ge=this.startNodeAt(G,H);Ge.tag=O,Ge.quasi=this.parseTemplate({isTagged:!0}),O=this.finishNode(Ge,"TaggedTemplateExpression")}return O};nt.parseExprAtom=function(O,G,H){if(this.type===_e.slash)this.readRegexp();var X,le=this.potentialArrowAt===this.start;switch(this.type){case _e._super:if(!this.allowSuper)this.raise(this.start,"'super' keyword outside a method");if(X=this.startNode(),this.next(),this.type===_e.parenL&&!this.allowDirectSuper)this.raise(X.start,"super() call outside constructor of a subclass");if(this.type!==_e.dot&&this.type!==_e.bracketL&&this.type!==_e.parenL)this.unexpected();return this.finishNode(X,"Super");case _e._this:return X=this.startNode(),this.next(),this.finishNode(X,"ThisExpression");case _e.name:var we=this.start,ke=this.startLoc,ve=this.containsEsc,Ee=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!ve&&Ee.name==="async"&&!this.canInsertSemicolon()&&this.eat(_e._function))return this.overrideContext(yt.f_expr),this.parseFunction(this.startNodeAt(we,ke),0,!1,!0,G);if(le&&!this.canInsertSemicolon()){if(this.eat(_e.arrow))return this.parseArrowExpression(this.startNodeAt(we,ke),[Ee],!1,G);if(this.options.ecmaVersion>=8&&Ee.name==="async"&&this.type===_e.name&&!ve&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc)){if(Ee=this.parseIdent(!1),this.canInsertSemicolon()||!this.eat(_e.arrow))this.unexpected();return this.parseArrowExpression(this.startNodeAt(we,ke),[Ee],!0,G)}}return Ee;case _e.regexp:var Ce=this.value;return X=this.parseLiteral(Ce.value),X.regex={pattern:Ce.pattern,flags:Ce.flags},X;case _e.num:case _e.string:return this.parseLiteral(this.value);case _e._null:case _e._true:case _e._false:return X=this.startNode(),X.value=this.type===_e._null?null:this.type===_e._true,X.raw=this.type.keyword,this.next(),this.finishNode(X,"Literal");case _e.parenL:var Ae=this.start,Te=this.parseParenAndDistinguishExpression(le,G);if(O){if(O.parenthesizedAssign<0&&!this.isSimpleAssignTarget(Te))O.parenthesizedAssign=Ae;if(O.parenthesizedBind<0)O.parenthesizedBind=Ae}return Te;case _e.bracketL:return X=this.startNode(),this.next(),X.elements=this.parseExprList(_e.bracketR,!0,!0,O),this.finishNode(X,"ArrayExpression");case _e.braceL:return this.overrideContext(yt.b_expr),this.parseObj(!1,O);case _e._function:return X=this.startNode(),this.next(),this.parseFunction(X,0);case _e._class:return this.parseClass(this.startNode(),!1);case _e._new:return this.parseNew();case _e.backQuote:return this.parseTemplate();case _e._import:if(this.options.ecmaVersion>=11)return this.parseExprImport(H);else return this.unexpected();default:return this.parseExprAtomDefault()}};nt.parseExprAtomDefault=function(){this.unexpected()};nt.parseExprImport=function(O){var G=this.startNode();if(this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword import");if(this.next(),this.type===_e.parenL&&!O)return this.parseDynamicImport(G);else if(this.type===_e.dot){var H=this.startNodeAt(G.start,G.loc&&G.loc.start);return H.name="import",G.meta=this.finishNode(H,"Identifier"),this.parseImportMeta(G)}else this.unexpected()};nt.parseDynamicImport=function(O){if(this.next(),O.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)if(!this.eat(_e.parenR))if(this.expect(_e.comma),!this.afterTrailingComma(_e.parenR)){if(O.options=this.parseMaybeAssign(),!this.eat(_e.parenR)){if(this.expect(_e.comma),!this.afterTrailingComma(_e.parenR))this.unexpected()}}else O.options=null;else O.options=null;else if(!this.eat(_e.parenR)){var G=this.start;if(this.eat(_e.comma)&&this.eat(_e.parenR))this.raiseRecoverable(G,"Trailing comma is not allowed in import()");else this.unexpected(G)}return this.finishNode(O,"ImportExpression")};nt.parseImportMeta=function(O){this.next();var G=this.containsEsc;if(O.property=this.parseIdent(!0),O.property.name!=="meta")this.raiseRecoverable(O.property.start,"The only valid meta property for import is 'import.meta'");if(G)this.raiseRecoverable(O.start,"'import.meta' must not contain escaped characters");if(this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere)this.raiseRecoverable(O.start,"Cannot use 'import.meta' outside a module");return this.finishNode(O,"MetaProperty")};nt.parseLiteral=function(O){var G=this.startNode();if(G.value=O,G.raw=this.input.slice(this.start,this.end),G.raw.charCodeAt(G.raw.length-1)===110)G.bigint=G.value!=null?G.value.toString():G.raw.slice(0,-1).replace(/_/g,"");return this.next(),this.finishNode(G,"Literal")};nt.parseParenExpression=function(){this.expect(_e.parenL);var O=this.parseExpression();return this.expect(_e.parenR),O};nt.shouldParseArrow=function(O){return!this.canInsertSemicolon()};nt.parseParenAndDistinguishExpression=function(O,G){var H=this.start,X=this.startLoc,le,we=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var ke=this.start,ve=this.startLoc,Ee=[],Ce=!0,Ae=!1,Te=new Xn,Ne=this.yieldPos,Pe=this.awaitPos,Oe;this.yieldPos=0,this.awaitPos=0;while(this.type!==_e.parenR)if(Ce?Ce=!1:this.expect(_e.comma),we&&this.afterTrailingComma(_e.parenR,!0)){Ae=!0;break}else if(this.type===_e.ellipsis){if(Oe=this.start,Ee.push(this.parseParenItem(this.parseRestBinding())),this.type===_e.comma)this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else Ee.push(this.parseMaybeAssign(!1,Te,this.parseParenItem));var Le=this.lastTokEnd,qe=this.lastTokEndLoc;if(this.expect(_e.parenR),O&&this.shouldParseArrow(Ee)&&this.eat(_e.arrow))return this.checkPatternErrors(Te,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=Ne,this.awaitPos=Pe,this.parseParenArrowList(H,X,Ee,G);if(!Ee.length||Ae)this.unexpected(this.lastTokStart);if(Oe)this.unexpected(Oe);if(this.checkExpressionErrors(Te,!0),this.yieldPos=Ne||this.yieldPos,this.awaitPos=Pe||this.awaitPos,Ee.length>1)le=this.startNodeAt(ke,ve),le.expressions=Ee,this.finishNodeAt(le,"SequenceExpression",Le,qe);else le=Ee[0]}else le=this.parseParenExpression();if(this.options.preserveParens){var Ge=this.startNodeAt(H,X);return Ge.expression=le,this.finishNode(Ge,"ParenthesizedExpression")}else return le};nt.parseParenItem=function(O){return O};nt.parseParenArrowList=function(O,G,H,X){return this.parseArrowExpression(this.startNodeAt(O,G),H,!1,X)};var $h=[];nt.parseNew=function(){if(this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword new");var O=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===_e.dot){var G=this.startNodeAt(O.start,O.loc&&O.loc.start);G.name="new",O.meta=this.finishNode(G,"Identifier"),this.next();var H=this.containsEsc;if(O.property=this.parseIdent(!0),O.property.name!=="target")this.raiseRecoverable(O.property.start,"The only valid meta property for new is 'new.target'");if(H)this.raiseRecoverable(O.start,"'new.target' must not contain escaped characters");if(!this.allowNewDotTarget)this.raiseRecoverable(O.start,"'new.target' can only be used in functions and class static block");return this.finishNode(O,"MetaProperty")}var X=this.start,le=this.startLoc;if(O.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),X,le,!0,!1),O.callee.type==="Super")this.raiseRecoverable(X,"Invalid use of 'super'");if(this.eat(_e.parenL))O.arguments=this.parseExprList(_e.parenR,this.options.ecmaVersion>=8,!1);else O.arguments=$h;return this.finishNode(O,"NewExpression")};nt.parseTemplateElement=function(O){var G=O.isTagged,H=this.startNode();if(this.type===_e.invalidTemplate){if(!G)this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal");H.value={raw:this.value.replace(/\r\n?/g,`
4
+ `),cooked:null}}else H.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
5
+ `),cooked:this.value};return this.next(),H.tail=this.type===_e.backQuote,this.finishNode(H,"TemplateElement")};nt.parseTemplate=function(O){if(O===void 0)O={};var G=O.isTagged;if(G===void 0)G=!1;var H=this.startNode();this.next(),H.expressions=[];var X=this.parseTemplateElement({isTagged:G});H.quasis=[X];while(!X.tail){if(this.type===_e.eof)this.raise(this.pos,"Unterminated template literal");this.expect(_e.dollarBraceL),H.expressions.push(this.parseExpression()),this.expect(_e.braceR),H.quasis.push(X=this.parseTemplateElement({isTagged:G}))}return this.next(),this.finishNode(H,"TemplateLiteral")};nt.isAsyncProp=function(O){return!O.computed&&O.key.type==="Identifier"&&O.key.name==="async"&&(this.type===_e.name||this.type===_e.num||this.type===_e.string||this.type===_e.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===_e.star)&&!Tt.test(this.input.slice(this.lastTokEnd,this.start))};nt.parseObj=function(O,G){var H=this.startNode(),X=!0,le={};H.properties=[],this.next();while(!this.eat(_e.braceR)){if(!X){if(this.expect(_e.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(_e.braceR))break}else X=!1;var we=this.parseProperty(O,G);if(!O)this.checkPropClash(we,le,G);H.properties.push(we)}return this.finishNode(H,O?"ObjectPattern":"ObjectExpression")};nt.parseProperty=function(O,G){var H=this.startNode(),X,le,we,ke;if(this.options.ecmaVersion>=9&&this.eat(_e.ellipsis)){if(O){if(H.argument=this.parseIdent(!1),this.type===_e.comma)this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");return this.finishNode(H,"RestElement")}if(H.argument=this.parseMaybeAssign(!1,G),this.type===_e.comma&&G&&G.trailingComma<0)G.trailingComma=this.start;return this.finishNode(H,"SpreadElement")}if(this.options.ecmaVersion>=6){if(H.method=!1,H.shorthand=!1,O||G)we=this.start,ke=this.startLoc;if(!O)X=this.eat(_e.star)}var ve=this.containsEsc;if(this.parsePropertyName(H),!O&&!ve&&this.options.ecmaVersion>=8&&!X&&this.isAsyncProp(H))le=!0,X=this.options.ecmaVersion>=9&&this.eat(_e.star),this.parsePropertyName(H);else le=!1;return this.parsePropertyValue(H,O,X,le,we,ke,G,ve),this.finishNode(H,"Property")};nt.parseGetterSetter=function(O){var G=O.key.name;this.parsePropertyName(O),O.value=this.parseMethod(!1),O.kind=G;var H=O.kind==="get"?0:1;if(O.value.params.length!==H){var X=O.value.start;if(O.kind==="get")this.raiseRecoverable(X,"getter should have no params");else this.raiseRecoverable(X,"setter should have exactly one param")}else if(O.kind==="set"&&O.value.params[0].type==="RestElement")this.raiseRecoverable(O.value.params[0].start,"Setter cannot use rest params")};nt.parsePropertyValue=function(O,G,H,X,le,we,ke,ve){if((H||X)&&this.type===_e.colon)this.unexpected();if(this.eat(_e.colon))O.value=G?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,ke),O.kind="init";else if(this.options.ecmaVersion>=6&&this.type===_e.parenL){if(G)this.unexpected();O.method=!0,O.value=this.parseMethod(H,X),O.kind="init"}else if(!G&&!ve&&this.options.ecmaVersion>=5&&!O.computed&&O.key.type==="Identifier"&&(O.key.name==="get"||O.key.name==="set")&&(this.type!==_e.comma&&this.type!==_e.braceR&&this.type!==_e.eq)){if(H||X)this.unexpected();this.parseGetterSetter(O)}else if(this.options.ecmaVersion>=6&&!O.computed&&O.key.type==="Identifier"){if(H||X)this.unexpected();if(this.checkUnreserved(O.key),O.key.name==="await"&&!this.awaitIdentPos)this.awaitIdentPos=le;if(G)O.value=this.parseMaybeDefault(le,we,this.copyNode(O.key));else if(this.type===_e.eq&&ke){if(ke.shorthandAssign<0)ke.shorthandAssign=this.start;O.value=this.parseMaybeDefault(le,we,this.copyNode(O.key))}else O.value=this.copyNode(O.key);O.kind="init",O.shorthand=!0}else this.unexpected()};nt.parsePropertyName=function(O){if(this.options.ecmaVersion>=6)if(this.eat(_e.bracketL))return O.computed=!0,O.key=this.parseMaybeAssign(),this.expect(_e.bracketR),O.key;else O.computed=!1;return O.key=this.type===_e.num||this.type===_e.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};nt.initFunction=function(O){if(O.id=null,this.options.ecmaVersion>=6)O.generator=O.expression=!1;if(this.options.ecmaVersion>=8)O.async=!1};nt.parseMethod=function(O,G,H){var X=this.startNode(),le=this.yieldPos,we=this.awaitPos,ke=this.awaitIdentPos;if(this.initFunction(X),this.options.ecmaVersion>=6)X.generator=O;if(this.options.ecmaVersion>=8)X.async=!!G;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(ur(G,X.generator)|Gn|(H?Pa:0)),this.expect(_e.parenL),X.params=this.parseBindingList(_e.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(X,!1,!0,!1),this.yieldPos=le,this.awaitPos=we,this.awaitIdentPos=ke,this.finishNode(X,"FunctionExpression")};nt.parseArrowExpression=function(O,G,H,X){var le=this.yieldPos,we=this.awaitPos,ke=this.awaitIdentPos;if(this.enterScope(ur(H,!1)|pr),this.initFunction(O),this.options.ecmaVersion>=8)O.async=!!H;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,O.params=this.toAssignableList(G,!0),this.parseFunctionBody(O,!0,!1,X),this.yieldPos=le,this.awaitPos=we,this.awaitIdentPos=ke,this.finishNode(O,"ArrowFunctionExpression")};nt.parseFunctionBody=function(O,G,H,X){var le=G&&this.type!==_e.braceL,we=this.strict,ke=!1;if(le)O.body=this.parseMaybeAssign(X),O.expression=!0,this.checkParams(O,!1);else{var ve=this.options.ecmaVersion>=7&&!this.isSimpleParamList(O.params);if(!we||ve){if(ke=this.strictDirective(this.end),ke&&ve)this.raiseRecoverable(O.start,"Illegal 'use strict' directive in function with non-simple parameter list")}var Ee=this.labels;if(this.labels=[],ke)this.strict=!0;if(this.checkParams(O,!we&&!ke&&!G&&!H&&this.isSimpleParamList(O.params)),this.strict&&O.id)this.checkLValSimple(O.id,Va);O.body=this.parseBlock(!1,void 0,ke&&!we),O.expression=!1,this.adaptDirectivePrologue(O.body.body),this.labels=Ee}this.exitScope()};nt.isSimpleParamList=function(O){for(var G=0,H=O;G<H.length;G+=1){var X=H[G];if(X.type!=="Identifier")return!1}return!0};nt.checkParams=function(O,G){var H=Object.create(null);for(var X=0,le=O.params;X<le.length;X+=1){var we=le[X];this.checkLValInnerPattern(we,hr,G?null:H)}};nt.parseExprList=function(O,G,H,X){var le=[],we=!0;while(!this.eat(O)){if(!we){if(this.expect(_e.comma),G&&this.afterTrailingComma(O))break}else we=!1;var ke=void 0;if(H&&this.type===_e.comma)ke=null;else if(this.type===_e.ellipsis){if(ke=this.parseSpread(X),X&&this.type===_e.comma&&X.trailingComma<0)X.trailingComma=this.start}else ke=this.parseMaybeAssign(!1,X);le.push(ke)}return le};nt.checkUnreserved=function(O){var{start:G,end:H,name:X}=O;if(this.inGenerator&&X==="yield")this.raiseRecoverable(G,"Cannot use 'yield' as identifier inside a generator");if(this.inAsync&&X==="await")this.raiseRecoverable(G,"Cannot use 'await' as identifier inside an async function");if(!(this.currentThisScope().flags&Hn)&&X==="arguments")this.raiseRecoverable(G,"Cannot use 'arguments' in class field initializer");if(this.inClassStaticBlock&&(X==="arguments"||X==="await"))this.raise(G,"Cannot use "+X+" in class static initialization block");if(this.keywords.test(X))this.raise(G,"Unexpected keyword '"+X+"'");if(this.options.ecmaVersion<6&&this.input.slice(G,H).indexOf("\\")!==-1)return;var le=this.strict?this.reservedWordsStrict:this.reservedWords;if(le.test(X)){if(!this.inAsync&&X==="await")this.raiseRecoverable(G,"Cannot use keyword 'await' outside an async function");this.raiseRecoverable(G,"The keyword '"+X+"' is reserved")}};nt.parseIdent=function(O){var G=this.parseIdentNode();if(this.next(!!O),this.finishNode(G,"Identifier"),!O){if(this.checkUnreserved(G),G.name==="await"&&!this.awaitIdentPos)this.awaitIdentPos=G.start}return G};nt.parseIdentNode=function(){var O=this.startNode();if(this.type===_e.name)O.name=this.value;else if(this.type.keyword){if(O.name=this.type.keyword,(O.name==="class"||O.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46))this.context.pop();this.type=_e.name}else this.unexpected();return O};nt.parsePrivateIdent=function(){var O=this.startNode();if(this.type===_e.privateId)O.name=this.value;else this.unexpected();if(this.next(),this.finishNode(O,"PrivateIdentifier"),this.options.checkPrivateFields)if(this.privateNameStack.length===0)this.raise(O.start,"Private field '#"+O.name+"' must be declared in an enclosing class");else this.privateNameStack[this.privateNameStack.length-1].used.push(O);return O};nt.parseYield=function(O){if(!this.yieldPos)this.yieldPos=this.start;var G=this.startNode();if(this.next(),this.type===_e.semi||this.canInsertSemicolon()||this.type!==_e.star&&!this.type.startsExpr)G.delegate=!1,G.argument=null;else G.delegate=this.eat(_e.star),G.argument=this.parseMaybeAssign(O);return this.finishNode(G,"YieldExpression")};nt.parseAwait=function(O){if(!this.awaitPos)this.awaitPos=this.start;var G=this.startNode();return this.next(),G.argument=this.parseMaybeUnary(null,!0,!1,O),this.finishNode(G,"AwaitExpression")};var qn=bt.prototype;qn.raise=function(O,G){var H=Ia(this.input,O);if(G+=" ("+H.line+":"+H.column+")",this.sourceFile)G+=" in "+this.sourceFile;var X=SyntaxError(G);throw X.pos=O,X.loc=H,X.raisedAt=this.pos,X};qn.raiseRecoverable=qn.raise;qn.curPosition=function(){if(this.options.locations)return new ln(this.curLine,this.pos-this.lineStart)};var hi=bt.prototype,Mh=function(O){this.flags=O,this.var=[],this.lexical=[],this.functions=[]};hi.enterScope=function(O){this.scopeStack.push(new Mh(O))};hi.exitScope=function(){this.scopeStack.pop()};hi.treatFunctionsAsVarInScope=function(O){return O.flags&ki||!this.inModule&&O.flags&wi};hi.declareName=function(O,G,H){var X=!1;if(G===oi){var le=this.currentScope();if(X=le.lexical.indexOf(O)>-1||le.functions.indexOf(O)>-1||le.var.indexOf(O)>-1,le.lexical.push(O),this.inModule&&le.flags&wi)delete this.undefinedExports[O]}else if(G===Oa){var we=this.currentScope();we.lexical.push(O)}else if(G===La){var ke=this.currentScope();if(this.treatFunctionsAsVar)X=ke.lexical.indexOf(O)>-1;else X=ke.lexical.indexOf(O)>-1||ke.var.indexOf(O)>-1;ke.functions.push(O)}else for(var ve=this.scopeStack.length-1;ve>=0;--ve){var Ee=this.scopeStack[ve];if(Ee.lexical.indexOf(O)>-1&&!(Ee.flags&Ma&&Ee.lexical[0]===O)||!this.treatFunctionsAsVarInScope(Ee)&&Ee.functions.indexOf(O)>-1){X=!0;break}if(Ee.var.push(O),this.inModule&&Ee.flags&wi)delete this.undefinedExports[O];if(Ee.flags&Hn)break}if(X)this.raiseRecoverable(H,"Identifier '"+O+"' has already been declared")};hi.checkLocalExport=function(O){if(this.scopeStack[0].lexical.indexOf(O.name)===-1&&this.scopeStack[0].var.indexOf(O.name)===-1)this.undefinedExports[O.name]=O};hi.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};hi.currentVarScope=function(){for(var O=this.scopeStack.length-1;;O--){var G=this.scopeStack[O];if(G.flags&(Hn|pn|Ei))return G}};hi.currentThisScope=function(){for(var O=this.scopeStack.length-1;;O--){var G=this.scopeStack[O];if(G.flags&(Hn|pn|Ei)&&!(G.flags&pr))return G}};var Yn=function(O,G,H){if(this.type="",this.start=G,this.end=0,O.options.locations)this.loc=new Kn(O,H);if(O.options.directSourceFile)this.sourceFile=O.options.directSourceFile;if(O.options.ranges)this.range=[G,0]},un=bt.prototype;un.startNode=function(){return new Yn(this,this.start,this.startLoc)};un.startNodeAt=function(O,G){return new Yn(this,O,G)};function Fa(O,G,H,X){if(O.type=G,O.end=H,this.options.locations)O.loc.end=X;if(this.options.ranges)O.range[1]=H;return O}un.finishNode=function(O,G){return Fa.call(this,O,G,this.lastTokEnd,this.lastTokEndLoc)};un.finishNodeAt=function(O,G,H,X){return Fa.call(this,O,G,H,X)};un.copyNode=function(O){var G=new Yn(this,O.start,this.startLoc);for(var H in O)G[H]=O[H];return G};var Ua=function(){};Ua.prototype.reset=function(){};bt.prototype.validateRegExpFlags=function(){};bt.prototype.validateRegExpPattern=function(){};var dr=function(O){if(this.type=O.type,this.value=O.value,this.start=O.start,this.end=O.end,O.options.locations)this.loc=new Kn(O,O.startLoc,O.endLoc);if(O.options.ranges)this.range=[O.start,O.end]},at=bt.prototype;at.next=function(O){if(!O&&this.type.keyword&&this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword);if(this.options.onToken)this.options.onToken(new dr(this));this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()};at.getToken=function(){return this.next(),new dr(this)};if(typeof Symbol<"u")at[Symbol.iterator]=function(){var O=this;return{next:function(){var G=O.getToken();return{done:G.type===_e.eof,value:G}}}};at.nextToken=function(){var O=this.curContext();if(!O||!O.preserveSpace)this.skipSpace();if(this.start=this.pos,this.options.locations)this.startLoc=this.curPosition();if(this.pos>=this.input.length)return this.finishToken(_e.eof);if(O.override)return O.override(this);else this.readToken(this.fullCharCodeAtPos())};at.readToken=function(O){if(Yt(O,this.options.ecmaVersion>=6)||O===92)return this.readWord();return this.getTokenFromCode(O)};at.fullCharCodeAt=function(O){var G=this.input.charCodeAt(O);if(G<=55295||G>=56320)return G;var H=this.input.charCodeAt(O+1);return H<=56319||H>=57344?G:(G<<10)+H-56613888};at.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)};at.skipBlockComment=function(){var O=this.options.onComment&&this.curPosition(),G=this.pos,H=this.input.indexOf("*/",this.pos+=2);if(H===-1)this.raise(this.pos-2,"Unterminated comment");if(this.pos=H+2,this.options.locations)for(var X=void 0,le=G;(X=_a(this.input,le,this.pos))>-1;)++this.curLine,le=this.lineStart=X;if(this.options.onComment)this.options.onComment(!0,this.input.slice(G+2,H),G,this.pos,O,this.curPosition())};at.skipLineComment=function(O){var G=this.pos,H=this.options.onComment&&this.curPosition(),X=this.input.charCodeAt(this.pos+=O);while(this.pos<this.input.length&&!_i(X))X=this.input.charCodeAt(++this.pos);if(this.options.onComment)this.options.onComment(!1,this.input.slice(G+O,this.pos),G,this.pos,H,this.curPosition())};at.skipSpace=function(){e:while(this.pos<this.input.length){var O=this.input.charCodeAt(this.pos);switch(O){case 32:case 160:++this.pos;break;case 13:if(this.input.charCodeAt(this.pos+1)===10)++this.pos;case 10:case 8232:case 8233:if(++this.pos,this.options.locations)++this.curLine,this.lineStart=this.pos;break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(O>8&&O<14||O>=5760&&Ta.test(String.fromCharCode(O)))++this.pos;else break e}}};at.finishToken=function(O,G){if(this.end=this.pos,this.options.locations)this.endLoc=this.curPosition();var H=this.type;this.type=O,this.value=G,this.updateContext(H)};at.readToken_dot=function(){var O=this.input.charCodeAt(this.pos+1);if(O>=48&&O<=57)return this.readNumber(!0);var G=this.input.charCodeAt(this.pos+2);if(this.options.ecmaVersion>=6&&O===46&&G===46)return this.pos+=3,this.finishToken(_e.ellipsis);else return++this.pos,this.finishToken(_e.dot)};at.readToken_slash=function(){var O=this.input.charCodeAt(this.pos+1);if(this.exprAllowed)return++this.pos,this.readRegexp();if(O===61)return this.finishOp(_e.assign,2);return this.finishOp(_e.slash,1)};at.readToken_mult_modulo_exp=function(O){var G=this.input.charCodeAt(this.pos+1),H=1,X=O===42?_e.star:_e.modulo;if(this.options.ecmaVersion>=7&&O===42&&G===42)++H,X=_e.starstar,G=this.input.charCodeAt(this.pos+2);if(G===61)return this.finishOp(_e.assign,H+1);return this.finishOp(X,H)};at.readToken_pipe_amp=function(O){var G=this.input.charCodeAt(this.pos+1);if(G===O){if(this.options.ecmaVersion>=12){var H=this.input.charCodeAt(this.pos+2);if(H===61)return this.finishOp(_e.assign,3)}return this.finishOp(O===124?_e.logicalOR:_e.logicalAND,2)}if(G===61)return this.finishOp(_e.assign,2);return this.finishOp(O===124?_e.bitwiseOR:_e.bitwiseAND,1)};at.readToken_caret=function(){var O=this.input.charCodeAt(this.pos+1);if(O===61)return this.finishOp(_e.assign,2);return this.finishOp(_e.bitwiseXOR,1)};at.readToken_plus_min=function(O){var G=this.input.charCodeAt(this.pos+1);if(G===O){if(G===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||Tt.test(this.input.slice(this.lastTokEnd,this.pos))))return this.skipLineComment(3),this.skipSpace(),this.nextToken();return this.finishOp(_e.incDec,2)}if(G===61)return this.finishOp(_e.assign,2);return this.finishOp(_e.plusMin,1)};at.readToken_lt_gt=function(O){var G=this.input.charCodeAt(this.pos+1),H=1;if(G===O){if(H=O===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+H)===61)return this.finishOp(_e.assign,H+1);return this.finishOp(_e.bitShift,H)}if(G===33&&O===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45)return this.skipLineComment(4),this.skipSpace(),this.nextToken();if(G===61)H=2;return this.finishOp(_e.relational,H)};at.readToken_eq_excl=function(O){var G=this.input.charCodeAt(this.pos+1);if(G===61)return this.finishOp(_e.equality,this.input.charCodeAt(this.pos+2)===61?3:2);if(O===61&&G===62&&this.options.ecmaVersion>=6)return this.pos+=2,this.finishToken(_e.arrow);return this.finishOp(O===61?_e.eq:_e.prefix,1)};at.readToken_question=function(){var O=this.options.ecmaVersion;if(O>=11){var G=this.input.charCodeAt(this.pos+1);if(G===46){var H=this.input.charCodeAt(this.pos+2);if(H<48||H>57)return this.finishOp(_e.questionDot,2)}if(G===63){if(O>=12){var X=this.input.charCodeAt(this.pos+2);if(X===61)return this.finishOp(_e.assign,3)}return this.finishOp(_e.coalesce,2)}}return this.finishOp(_e.question,1)};at.readToken_numberSign=function(){var O=this.options.ecmaVersion,G=35;if(O>=13){if(++this.pos,G=this.fullCharCodeAtPos(),Yt(G,!0)||G===92)return this.finishToken(_e.privateId,this.readWord1())}this.raise(this.pos,"Unexpected character '"+zn(G)+"'")};at.getTokenFromCode=function(O){switch(O){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(_e.parenL);case 41:return++this.pos,this.finishToken(_e.parenR);case 59:return++this.pos,this.finishToken(_e.semi);case 44:return++this.pos,this.finishToken(_e.comma);case 91:return++this.pos,this.finishToken(_e.bracketL);case 93:return++this.pos,this.finishToken(_e.bracketR);case 123:return++this.pos,this.finishToken(_e.braceL);case 125:return++this.pos,this.finishToken(_e.braceR);case 58:return++this.pos,this.finishToken(_e.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(_e.backQuote);case 48:var G=this.input.charCodeAt(this.pos+1);if(G===120||G===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(G===111||G===79)return this.readRadixNumber(8);if(G===98||G===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(O);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(O);case 124:case 38:return this.readToken_pipe_amp(O);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(O);case 60:case 62:return this.readToken_lt_gt(O);case 61:case 33:return this.readToken_eq_excl(O);case 63:return this.readToken_question();case 126:return this.finishOp(_e.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+zn(O)+"'")};at.finishOp=function(O,G){var H=this.input.slice(this.pos,this.pos+G);return this.pos+=G,this.finishToken(O,H)};at.readRegexp=function(){var O,G,H=this.pos;for(;;){if(this.pos>=this.input.length)this.raise(H,"Unterminated regular expression");var X=this.input.charAt(this.pos);if(Tt.test(X))this.raise(H,"Unterminated regular expression");if(!O){if(X==="[")G=!0;else if(X==="]"&&G)G=!1;else if(X==="/"&&!G)break;O=X==="\\"}else O=!1;++this.pos}var le=this.input.slice(H,this.pos);++this.pos;var we=this.pos,ke=this.readWord1();if(this.containsEsc)this.unexpected(we);var ve=this.regexpState||(this.regexpState=new Ua(this));ve.reset(H,le,ke),this.validateRegExpFlags(ve),this.validateRegExpPattern(ve);var Ee=null;try{Ee=new RegExp(le,ke)}catch(Ce){}return this.finishToken(_e.regexp,{pattern:le,flags:ke,value:Ee})};at.readInt=function(O,G,H){var X=this.options.ecmaVersion>=12&&G===void 0,le=H&&this.input.charCodeAt(this.pos)===48,we=this.pos,ke=0,ve=0;for(var Ee=0,Ce=G==null?1/0:G;Ee<Ce;++Ee,++this.pos){var Ae=this.input.charCodeAt(this.pos),Te=void 0;if(X&&Ae===95){if(le)this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals");if(ve===95)this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore");if(Ee===0)this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits");ve=Ae;continue}if(Ae>=97)Te=Ae-97+10;else if(Ae>=65)Te=Ae-65+10;else if(Ae>=48&&Ae<=57)Te=Ae-48;else Te=1/0;if(Te>=O)break;ve=Ae,ke=ke*O+Te}if(X&&ve===95)this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits");if(this.pos===we||G!=null&&this.pos-we!==G)return null;return ke};function Ph(O,G){if(G)return parseInt(O,8);return parseFloat(O.replace(/_/g,""))}function ja(O){if(typeof BigInt!=="function")return null;return BigInt(O.replace(/_/g,""))}at.readRadixNumber=function(O){var G=this.pos;this.pos+=2;var H=this.readInt(O);if(H==null)this.raise(this.start+2,"Expected number in radix "+O);if(this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110)H=ja(this.input.slice(G,this.pos)),++this.pos;else if(Yt(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");return this.finishToken(_e.num,H)};at.readNumber=function(O){var G=this.pos;if(!O&&this.readInt(10,void 0,!0)===null)this.raise(G,"Invalid number");var H=this.pos-G>=2&&this.input.charCodeAt(G)===48;if(H&&this.strict)this.raise(G,"Invalid number");var X=this.input.charCodeAt(this.pos);if(!H&&!O&&this.options.ecmaVersion>=11&&X===110){var le=ja(this.input.slice(G,this.pos));if(++this.pos,Yt(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");return this.finishToken(_e.num,le)}if(H&&/[89]/.test(this.input.slice(G,this.pos)))H=!1;if(X===46&&!H)++this.pos,this.readInt(10),X=this.input.charCodeAt(this.pos);if((X===69||X===101)&&!H){if(X=this.input.charCodeAt(++this.pos),X===43||X===45)++this.pos;if(this.readInt(10)===null)this.raise(G,"Invalid number")}if(Yt(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");var we=Ph(this.input.slice(G,this.pos),H);return this.finishToken(_e.num,we)};at.readCodePoint=function(){var O=this.input.charCodeAt(this.pos),G;if(O===123){if(this.options.ecmaVersion<6)this.unexpected();var H=++this.pos;if(G=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,G>1114111)this.invalidStringToken(H,"Code point out of bounds")}else G=this.readHexChar(4);return G};at.readString=function(O){var G="",H=++this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated string constant");var X=this.input.charCodeAt(this.pos);if(X===O)break;if(X===92)G+=this.input.slice(H,this.pos),G+=this.readEscapedChar(!1),H=this.pos;else if(X===8232||X===8233){if(this.options.ecmaVersion<10)this.raise(this.start,"Unterminated string constant");if(++this.pos,this.options.locations)this.curLine++,this.lineStart=this.pos}else{if(_i(X))this.raise(this.start,"Unterminated string constant");++this.pos}}return G+=this.input.slice(H,this.pos++),this.finishToken(_e.string,G)};var Wa={};at.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(O){if(O===Wa)this.readInvalidTemplateToken();else throw O}this.inTemplateElement=!1};at.invalidStringToken=function(O,G){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Wa;else this.raise(O,G)};at.readTmplToken=function(){var O="",G=this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated template");var H=this.input.charCodeAt(this.pos);if(H===96||H===36&&this.input.charCodeAt(this.pos+1)===123){if(this.pos===this.start&&(this.type===_e.template||this.type===_e.invalidTemplate))if(H===36)return this.pos+=2,this.finishToken(_e.dollarBraceL);else return++this.pos,this.finishToken(_e.backQuote);return O+=this.input.slice(G,this.pos),this.finishToken(_e.template,O)}if(H===92)O+=this.input.slice(G,this.pos),O+=this.readEscapedChar(!0),G=this.pos;else if(_i(H)){switch(O+=this.input.slice(G,this.pos),++this.pos,H){case 13:if(this.input.charCodeAt(this.pos)===10)++this.pos;case 10:O+=`
6
+ `;break;default:O+=String.fromCharCode(H);break}if(this.options.locations)++this.curLine,this.lineStart=this.pos;G=this.pos}else++this.pos}};at.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{")break;case"`":return this.finishToken(_e.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":if(this.input[this.pos+1]===`
7
+ `)++this.pos;case`
8
+ `:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};at.readEscapedChar=function(O){var G=this.input.charCodeAt(++this.pos);switch(++this.pos,G){case 110:return`
9
+ `;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return zn(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:if(this.input.charCodeAt(this.pos)===10)++this.pos;case 10:if(this.options.locations)this.lineStart=this.pos,++this.curLine;return"";case 56:case 57:if(this.strict)this.invalidStringToken(this.pos-1,"Invalid escape sequence");if(O){var H=this.pos-1;this.invalidStringToken(H,"Invalid escape sequence in template string")}default:if(G>=48&&G<=55){var X=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],le=parseInt(X,8);if(le>255)X=X.slice(0,-1),le=parseInt(X,8);if(this.pos+=X.length-1,G=this.input.charCodeAt(this.pos),(X!=="0"||G===56||G===57)&&(this.strict||O))this.invalidStringToken(this.pos-1-X.length,O?"Octal literal in template string":"Octal literal in strict mode");return String.fromCharCode(le)}if(_i(G)){if(this.options.locations)this.lineStart=this.pos,++this.curLine;return""}return String.fromCharCode(G)}};at.readHexChar=function(O){var G=this.pos,H=this.readInt(16,O);if(H===null)this.invalidStringToken(G,"Bad character escape sequence");return H};at.readWord1=function(){this.containsEsc=!1;var O="",G=!0,H=this.pos,X=this.options.ecmaVersion>=6;while(this.pos<this.input.length){var le=this.fullCharCodeAtPos();if(ri(le,X))this.pos+=le<=65535?1:2;else if(le===92){this.containsEsc=!0,O+=this.input.slice(H,this.pos);var we=this.pos;if(this.input.charCodeAt(++this.pos)!==117)this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX");++this.pos;var ke=this.readCodePoint();if(!(G?Yt:ri)(ke,X))this.invalidStringToken(we,"Invalid Unicode escape");O+=zn(ke),H=this.pos}else break;G=!1}return O+this.input.slice(H,this.pos)};at.readWord=function(){var O=this.readWord1(),G=_e.name;if(this.keywords.test(O))G=lr[O];return this.finishToken(G,O)};var Rh="8.18.0";bt.acorn={Parser:bt,version:Rh,defaultOptions:rr,Position:ln,SourceLocation:Kn,getLineInfo:Ia,Node:Yn,TokenType:ct,tokTypes:_e,keywordTypes:lr,TokContext:Xt,tokContexts:yt,isIdentifierChar:ri,isIdentifierStart:Yt,Token:dr,isNewLine:_i,lineBreak:Tt,lineBreakG:bh,nonASCIIwhitespace:Ta};function hn(O){return(G)=>O(G)}function Qn(...O){return bt.extend(...O)}function fn(O,G,H){for(let X=G;X<H;X++){let le=O.charCodeAt(X);if(le===10||le===13||le===8232||le===8233)return!0}return!1}var Aa=new WeakMap;function It(O,G){if(O===void 0)return!1;if(O.length<16)return O.includes(G);let H=Aa.get(O);if(H===void 0||H.length>O.length)H={names:new Set,length:0},Aa.set(O,H);while(H.length<O.length)H.names.add(O[H.length++]);return H.names.has(G)}function qa(O){return{support:"typescript",parser:O}}function za(O){return O&&"parser"in O?O.parser:void 0}function Ka(O){return O&&"names"in O?O.names:void 0}function Jn(){throw Error('sveast: parsing TypeScript needs `typescript` from "sveast/typescript": createParser({ typescript }) or createModuleParser({ typescript })')}var Lh=/^\t+/;class Ze extends Error{name="ParseError";code;reason;position;start;end;frame;constructor(O,G,H){super(`${H}
10
+ https://svelte.dev/e/${G}`);this.code=G,this.reason=H;let X=typeof O==="number"?O:O?.start,le=typeof O==="number"?O:O?.end;if(X!==void 0)this.position=[X,le??X],this.start=E(this.position[0]),this.end=E(this.position[1]),this.frame=Oh(this.start.line-1,this.end.column)}}var Ga=(O)=>O.replace(Lh,(G)=>" ".repeat(G.length));function Oh(O,G){let H=Math.max(0,O-2),X=[];for(let we=H;we<O+3;we++){let ke=je(we);if(ke===void 0)break;X.push(ke)}let le=String(H+X.length+1).length;return X.map((we,ke)=>{let ve=`${String(H+ke+1).padStart(le," ")}: ${Ga(we)}`;if(H+ke!==O)return ve;return`${ve}
11
+ ${" ".repeat(le+2+Ga(we.slice(0,G)).length)}^`}).join(`
12
+ `)}function Ya(O){throw new Ze(O,"attribute_duplicate","Attributes need to be unique")}function Qa(O){throw new Ze(O,"attribute_empty_shorthand","Attribute shorthand cannot be empty")}function Ja(O,G){throw new Ze(O,"block_duplicate_clause",`${G} cannot appear more than once within a block`)}function Za(O){throw new Ze(O,"block_invalid_continuation_placement","{:...} block is invalid at this position (did you forget to close the preceding element or block?)")}function el(O){throw new Ze(O,"block_invalid_elseif","'elseif' should be 'else if'")}function tl(O,G,H){throw new Ze(O,"block_invalid_placement",`{#${G} ...} block cannot be ${H}`)}function il(O){throw new Ze(O,"block_unclosed","Block was left open")}function nl(O){throw new Ze(O,"block_unexpected_close","Unexpected block closing tag")}function sl(O){throw new Ze(O,"const_tag_invalid_expression","{@const ...} must consist of a single variable declaration")}function rl(O){throw new Ze(O,"css_empty_declaration","Declaration cannot be empty")}function gr(O){throw new Ze(O,"css_expected_identifier","Expected a valid CSS identifier")}function ol(O){throw new Ze(O,"css_selector_invalid","Invalid selector")}function al(O){throw new Ze(O,"debug_tag_invalid_arguments","{@debug ...} arguments must be identifiers, not arbitrary expressions")}function xr(O){throw new Ze(O,"declaration_tag_invalid_type","Declaration tags must be `let` or `const` declarations")}function ll(O){throw new Ze(O,"directive_invalid_value","Directive value must be a JavaScript expression enclosed in curly braces")}function cl(O,G){throw new Ze(O,"directive_missing_name",`\`${G}\` name cannot be empty`)}function pl(O,G){throw new Ze(O,"element_invalid_closing_tag",`\`</${G}>\` attempted to close an element that was not open`)}function ul(O,G,H){throw new Ze(O,"element_invalid_closing_tag_autoclosed",`\`</${G}>\` attempted to close element that was already automatically closed by \`<${H}>\` (cannot nest \`<${H}>\` inside \`<${G}>\`)`)}function vr(O,G){throw new Ze(O,"element_unclosed",`\`<${G}>\` was left open`)}function br(O){throw new Ze(O,"expected_attribute_value","Expected attribute value")}function hl(O){throw new Ze(O,"expected_block_type","Expected 'if', 'each', 'await', 'key' or 'snippet'")}function Sr(O){throw new Ze(O,"expected_identifier","Expected an identifier")}function fl(O){throw new Ze(O,"expected_pattern","Expected identifier or destructure pattern")}function dl(O){throw new Ze(O,"expected_tag","Expected 'html', 'render', 'attach', 'const', or 'debug'")}function fi(O,G){throw new Ze(O,"expected_token",`Expected token ${G}`)}function ml(O){throw new Ze(O,"expected_whitespace","Expected whitespace")}function Vh(O,G){throw new Ze(O,"js_parse_error",`${G}`)}function yl(O){throw new Ze(O,"render_tag_invalid_expression","`{@render ...}` tags can only contain call expressions")}function gl(O){throw new Ze(O,"script_duplicate","A component can have a single top-level `<script>` element and/or a single top-level `<script module>` element")}function xl(O,G){throw new Ze(O,"script_invalid_attribute_value",`If the \`${G}\` attribute is supplied, it must be a boolean attribute`)}function vl(O){throw new Ze(O,"script_invalid_context",'If the context attribute is supplied, its value must be "module"')}function bl(O,G){throw new Ze(O,"script_reserved_attribute",`The \`${G}\` attribute is reserved and cannot be used`)}function Sl(O){throw new Ze(O,"style_duplicate","A component can have a single top-level `<style>` element")}function wl(O){throw new Ze(O,"svelte_component_invalid_this","Invalid component definition — must be an `{expression}`")}function kl(O){throw new Ze(O,"svelte_component_missing_this","`<svelte:component>` must have a 'this' attribute")}function wr(O){throw new Ze(O,"svelte_element_missing_this","`<svelte:element>` must have a 'this' attribute with a value")}function El(O,G){throw new Ze(O,"svelte_meta_duplicate",`A component can only have one \`<${G}>\` element`)}function Cl(O,G){throw new Ze(O,"svelte_meta_invalid_content",`<${G}> cannot have children`)}function Al(O,G){throw new Ze(O,"svelte_meta_invalid_placement",`\`<${G}>\` tags cannot be inside elements or blocks`)}function Nl(O,G){throw new Ze(O,"svelte_meta_invalid_tag",`Valid \`<svelte:...>\` tag names are ${G}`)}function _l(O){throw new Ze(O,"svelte_options_deprecated_tag",'"tag" option is deprecated — use "customElement" instead')}function Tl(O){throw new Ze(O,"svelte_options_invalid_attribute","`<svelte:options>` can only receive static attributes")}function es(O,G){throw new Ze(O,"svelte_options_invalid_attribute_value",`Value must be ${G}, if specified`)}function Il(O){throw new Ze(O,"svelte_options_invalid_customelement",'"customElement" must be a string literal defining a valid custom element name or an object of the form { tag?: string; shadow?: "open" | "none" | `ShadowRootInit`; props?: { [key: string]: { attribute?: string; reflect?: boolean; type: .. } } }')}function $l(O){throw new Ze(O,"svelte_options_invalid_customelement_props",'"props" must be a statically analyzable object literal of the form "{ [key: string]: { attribute?: string; reflect?: boolean; type?: "String" | "Boolean" | "Number" | "Array" | "Object" }"')}function Ml(O){throw new Ze(O,"svelte_options_invalid_customelement_shadow",'"shadow" must be either "open", "none" or `ShadowRootInit` object.')}function kr(O){throw new Ze(O,"svelte_options_invalid_tagname","Tag name must be lowercase and hyphenated")}function Pl(O){throw new Ze(O,"svelte_options_reserved_tagname","Tag name is reserved")}function Rl(O,G){throw new Ze(O,"svelte_options_unknown_attribute",`\`<svelte:options>\` unknown attribute '${G}'`)}function Ll(O){throw new Ze(O,"tag_invalid_name","Expected a valid element or component name. Components must have a valid variable name or dot notation expression")}function Ol(O,G,H){throw new Ze(O,"tag_invalid_placement",`{@${G} ...} tag cannot be ${H}`)}function jt(O){throw new Ze(O,"unexpected_eof","Unexpected end of input")}function Vl(O,G){throw new Ze(O,"unexpected_reserved_word",`'${G}' is a reserved word in JavaScript and cannot be used here`)}function Dl(O){throw new Ze(O,"unterminated_string_constant","Unterminated string constant")}function Bl(O){throw new Ze(O,"void_element_invalid_content","Void elements cannot have children or closing tags")}var Ii="",Fl=[],ts=0,wt=[],kt=0;function Dh(O,G){Ii=O,Fl=G,ts=0}function Bh(){return ts}function Fh(O,G,H,X){ts=X}function Uh(O,G,H,X,le,we){ts=X;let ke=G;if(O&&ke.includes(`
13
+ `)){let Ee=Ii.lastIndexOf(`
14
+ `,H-1)+1,Ce=Ee,Ae=Ii.charCodeAt(Ce);while(Ae===32||Ae===9)Ae=Ii.charCodeAt(++Ce);if(Ce>Ee)ke=jh(ke,Ii.slice(Ee,Ce))}let ve={type:O?"Block":"Line",value:ke,start:H,end:X};if(le&&we)ve.loc={start:le,end:we};Fl.push(ve)}function jh(O,G){let H=O.startsWith(G)?G.length:0,X="",le=O.indexOf(`
15
+ `,H);while(le!==-1){if(X+=O.slice(H,le+1),H=le+1,O.startsWith(G,H))H+=G.length;le=O.indexOf(`
16
+ `,H)}return X+O.slice(H)}function Wh(O,G,H){let X=0,le=G.length;while(X<le){let we=X+le>>>1;if(G[we].start<H)X=we+1;else le=we}if(X>=G.length)return;if(wt=G.slice(X).map(({type:we,value:ke,start:ve,end:Ee})=>({type:we,value:ke,start:ve,end:Ee})),kt=0,yr(O,void 0,!1),kt<wt.length&&(wt[kt].start>=O.end||O.type==="Program")){O.trailingComments??=[];while(kt<wt.length)O.trailingComments.push(wt[kt++])}}var qh=new Map([["BlockStatement","body"],["Program","body"],["ArrayExpression","elements"],["ObjectExpression","properties"]]);function Ha(O,G){for(let H=O;H<G;H++){let X=Ii.charCodeAt(H);if(X!==44&&X!==41&&X!==32&&X!==9)return!0}return!1}function yr(O,G,H){while(kt<wt.length&&wt[kt].start<O.start)O.leadingComments??=[],O.leadingComments.push(wt[kt++]);if(kt>=wt.length)return;let X=wt[kt].start;if(X<O.end||!Ha(O.end,X)){let le=k(O),we=qh.get(O.type),ke=we===void 0?void 0:le[we],ve=Array.isArray(ke)&&ke.length===0;for(let Ee in le){if(kt>=wt.length)return;if(Ee==="type")continue;let Ce=le[Ee];if(Array.isArray(Ce)){let Ae=Ee===we;for(let Te=0;Te<Ce.length;Te++){let Ne=Ce[Te];if(d(Ne))yr(Ne,O,Ae?Te===Ce.length-1:ve)}}else if(d(Ce))yr(Ce,O,ve)}if(kt>=wt.length)return}if(G!==void 0&&O.end===G.end)return;if(H)while(kt<wt.length){if(G&&wt[kt].start>=G.end)break;O.trailingComments??=[],O.trailingComments.push(wt[kt++])}else if(O.end<=wt[kt].start&&!Ha(O.end,wt[kt].start))O.trailingComments=[wt[kt++]]}var is=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(" ")),ns=!1,dn=1,zh=2,Kh=32,Gh=256,Hh=dn|zh|Gh,Xh=2,Yh=3,Qh=4,Jh=/\r\n?|\n|\u2028|\u2029/,Xa=new Map;function Zn(O){if(!(O instanceof RegExp))return O;let G=Xa.get(O);if(!G){let H=new Set(O.source.slice(4,-2).split("|"));G={test:(X)=>H.has(X)},Xa.set(O,G)}return G}var Er=hn((O)=>class extends O{declareName(G,H,X){let le=!1;if(H===Xh){let we=this.currentScope();if(le=It(we.lexical,G)||It(we.functions,G)||It(we.var,G),we.lexical.push(G),this.inModule&&we.flags&dn)delete this.undefinedExports[G]}else if(H===Qh)this.currentScope().lexical.push(G);else if(H===Yh){let we=this.currentScope();le=this.treatFunctionsAsVar?It(we.lexical,G):It(we.lexical,G)||It(we.var,G),we.functions.push(G)}else for(let we=this.scopeStack.length-1;we>=0;--we){let ke=this.scopeStack[we];if(It(ke.lexical,G)&&!(ke.flags&Kh&&ke.lexical[0]===G)||!this.treatFunctionsAsVarInScope(ke)&&It(ke.functions,G)){le=!0;break}if(ke.var.push(G),this.inModule&&ke.flags&dn)delete this.undefinedExports[G];if(ke.flags&Hh)break}if(le)this.raiseRecoverable(X,`Identifier '${G}' has already been declared`)}}),Cr=hn((O)=>{let{keywordTypes:G,tokTypes:H}=O.acorn,X=new Map("break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this const class extends export import super".split(" ").map((we)=>[we,G[we]])),le;return class extends O{constructor(we,ke,ve){super(we,ke,ve);this.keywords=Zn(this.keywords),this.reservedWords=Zn(this.reservedWords),this.reservedWordsStrict=Zn(this.reservedWordsStrict),this.reservedWordsStrictBind=Zn(this.reservedWordsStrictBind),le??=this.context[0]}reset(we,ke,ve){if(super.reset?.(we,ke,ve),this.input=we,this.containsEsc=!1,this.pos=ke,ve)this.lineStart=ke-ve.column,this.curLine=ve.line;else this.lineStart=we.lastIndexOf(`
17
+ `,ke-1)+1,this.curLine=this.options.locations?we.slice(0,this.lineStart).split(Jh).length:1;this.type=H.eof,this.value=null,this.start=this.end=ke,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=ke;let Ee=this.context;if(Ee.length!==1||Ee[0]!==le)this.context=this.initialContext();if(this.exprAllowed=!0,this.strict=!0,this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels.length>0)this.labels=[];for(let Te in this.undefinedExports){this.undefinedExports=Object.create(null);break}let Ce=this.scopeStack,Ae=Ce[0];if(Ce.length!==1||Ae.flags!==dn||Ae.var.length>0||Ae.lexical.length>0||Ae.functions.length>0||Ae.tsTypes!==void 0||Ae.tsExportOnly!==void 0||Ae.tsEnums!==void 0)this.scopeStack=[],this.enterScope(dn);if(this.regexpState=null,this.privateNameStack.length>0)this.privateNameStack=[];this.inTemplateElement=!1}parseParenAndDistinguishExpression(we,ke){let ve=super.parseParenAndDistinguishExpression(we,ke);if(ve.type==="ParenthesizedExpression")ns=!0;return ve}checkUnreserved(we){if(is.has(we.name))super.checkUnreserved(we)}canInsertSemicolon(){let we=this.type;return we===H.eof||we===H.braceR||fn(this.input,this.lastTokEnd,this.start)}checkLocalExport(){}skipSpace(){let we=this.input,ke=this.options.locations,ve=this.pos,Ee=we.charCodeAt(ve);for(;;)if(Ee===32||Ee===9)Ee=we.charCodeAt(++ve);else if(Ee===10){if(Ee=we.charCodeAt(++ve),ke)this.curLine++,this.lineStart=ve}else break;if(this.pos=ve,Ee===47||Ee<33||Ee>=128)super.skipSpace()}readWord1(){let we=this.input,ke=this.pos,ve=ke,Ee=we.charCodeAt(ve),Ce=0;while(Ee>=97&&Ee<=122||Ee>=65&&Ee<=90||Ee>=48&&Ee<=57||Ee===95||Ee===36)Ce=Math.imul(Ce,31)+Ee|0,Ee=we.charCodeAt(++ve);if(Ee>=128||Ee===92)return super.readWord1();return this.containsEsc=!1,this.pos=ve,Ue(we,ke,ve,Ce)}readWord(){let we=this.readWord1();return this.finishToken(X.get(we)??H.name,we)}}}),Ul=Qn(Er,Cr),Zh=/ \(\d+:\d+\)$/;function $i(O){return O}function jl(O){return O instanceof SyntaxError&&"pos"in O&&typeof O.pos==="number"}function ss(O,G,H,X,le,we=O.root.comments.length){let ke=O.root.comments;Dh(G,ke);let ve={onComment:O.comments?Uh:Fh,sourceType:"module",ecmaVersion:16,locations:O.loc,preserveParens:X};if(O.lfOnly)ve.startLocation=E(H);let Ee=O.isTypeScript?O.typescript:Ul;if(!Ee)Jn();let Ce;try{Ce=le(Ee,ve)}catch(Ae){if(!jl(Ae))throw Ae;Vh(Ae.pos,Ae.message.replace(Zh,""))}if(ke.length>we)Wh($i(Ce),ke,H);return Ce}function rs(O,G,H=0){return $i(ss(O,G,0,!1,(X,le)=>{if(H>0&&le.locations)le.startLocation=E(H);let we=new X(le,G,H).parse();return we.start=0,we},0))}function ef(O,G){if(!G)return{line:1,column:0};let{column:H}=E(O);return{line:We(O-H)+1,column:H}}var tf={count:0},mr,nf=(O)=>O.parseExpression();function sf(O,G,H,X,le){let we=mr;if(mr=void 0,we?.ParserClass===O&&we.onComment===G.onComment&&we.locations===G.locations&&we.parser.reset)we.parser.reset(H,X,G.startLocation);else we={ParserClass:O,onComment:G.onComment,locations:G.locations,parser:new O(G,H,X)};let ke=we.parser;ke.nextToken();let ve=le(ke);return ke.input="",mr=we,ve}function Wl(O,G,H,X){return tf.count+=1,ns=!1,ss(O,G,H,!0,(le,we)=>(we.startLocation??=ef(H,we.locations),sf(le,we,G,H,X)))}function Mi(O,G,H,X=!1){let le=$i(Wl(O,G,H,nf)),we=Math.max(le.end,Bh());return{node:ns&&!X?Ar(le):le,end:we}}function ql(O,G,H){let X=O.root.comments.length,le=!0,we=Wl(O,G,H,(ve)=>{let Ee={shorthandAssign:-1,trailingComma:-1,parenthesizedAssign:-1,parenthesizedBind:-1,doubleProto:-1},Ce=ve.parseMaybeConditional(void 0,Ee);if(ve.type!==Ul.acorn.tokTypes.eof)return le=!1,Ce;let Ae=ve.toAssignable(Ce,!1,Ee);return ve.checkLValPattern(Ae),Ae});if(!le){O.root.comments.length=X;return}let ke=$i(we);return ns?Ar(ke):ke}function zl(O,G,H){return $i(ss(O,G,H,!1,(X,le)=>{let we=new X(le,G,H);try{return we.nextToken(),we.parseStatement(null,!0,Object.create(null))}catch(ke){if(jl(ke)&&ke.pos===G.length)jt(G.length);throw ke}}))}function Kl(O,G,H){let X=ss(O,G,0,!1,(le,we)=>{let ke=new le(we,G,0),ve=ke.startNode(),Ee=[],Ce=Object.create(null);return H((Ae)=>{ke.pos=Ae,ke.context=ke.initialContext(),ke.exprAllowed=!0,ke.nextToken();let Te=ke.parseStatement(null,!0,Ce);return Ee.push(Te),Te.end}),ve.body=Ee,ke.finishNode(ve,"Program")});return $i(X).body}function Ar(O){let G=O;while(G.type==="ParenthesizedExpression")G=G.expression;return Z(G,Ar),G}var rf=[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],of=/[:!]/;function af(O){let G;return()=>(G??=lf(O),G)}function lf(O){let G=new Map,H=0,X="";for(let le of O.split(" ")){let we=le.search(of);X=X.slice(0,Number.parseInt(le[0],36))+le.slice(1,we);let ke=Number.parseInt(le.slice(we+1),36);if(G.set(`${X};`,ke),le[we]==="!")G.set(X,ke);H=Math.max(H,X.length+1)}return{table:G,longest:H}}var Hl=af("0amp!12 1pos:13 0gt!1q 0lt!1o 0quot!y"),Nr=(O)=>O>=48&&O<=57,cf=(O)=>Nr(O)||O>=65&&O<=70||O>=97&&O<=102,Gl=(O)=>Nr(O)||O>=65&&O<=90||O>=97&&O<=122,os=0;function pf(O,G,H,X){if(O.charCodeAt(G)===35){let ve=(O.charCodeAt(G+1)|32)===120,Ee=G+(ve?2:1),Ce=Ee;while(Ce<O.length&&(ve?cf:Nr)(O.charCodeAt(Ce)))Ce++;if(Ce===Ee)return 0;return os=O.charCodeAt(Ce)===59?Ce+1:Ce,Number.parseInt(O.slice(Ee,Ce),ve?16:10)}let{table:le,longest:we}=X(),ke=G;while(ke-G<we&&Gl(O.charCodeAt(ke)))ke++;if(O.charCodeAt(ke)===59){let ve=le.get(O.slice(G,ke+1));if(ve!==void 0)return os=ke+1,ve}for(let ve=ke;ve>G;ve--){let Ee=le.get(O.slice(G,ve));if(Ee===void 0)continue;if(H){let Ce=O.charCodeAt(ve);if(Gl(Ce)||Ce===95||Ce===61)continue}return os=ve,Ee}return 0}function uf(O,G){if(O===10&&!G)return 32;if(O<128)return O;if(O<=159)return rf[O-128];if(O>=55296&&O<=57343)return 0;if(O<=196607)return O;if(O>=917504&&O<=917631||O>=917760&&O<=917999)return O;return 0}function as(O,G,H){let X=O.indexOf("&");if(X===-1)return O;let le="",we=0;while(X!==-1){let ke=pf(O,X+1,G,H);if(ke)le+=O.slice(we,X)+String.fromCodePoint(uf(ke,G)),we=os;X=O.indexOf("&",ke?we:X+1)}return le+O.slice(we)}var hf=/\r(?!\n)|[\u2028\u2029]/,hc=/\s*}/y;function Ir(O,G){let H=O.codePointAt(G);if(H===void 0||!Yt(H,!0))return G;let X=G+(H<=65535?1:2),le=O.codePointAt(X);while(le!==void 0&&ri(le,!0))X+=le<=65535?1:2,le=O.codePointAt(X);return X}class fc{source;index=0;loc;lfOnly;isTypeScript;typescript;entityNames;css;script;comments;root;stack;fragments;metaTags=new Set;lastAutoClosedTag;nextAngle=-1;nextBrace=-1;constructor(O,G,H,X={}){if(this.source=O,this.loc=X.loc??!1,this.lfOnly=this.loc&&!hf.test(O),this.isTypeScript=ne(O),this.typescript=H.typescript,this.isTypeScript&&!this.typescript)Jn();this.entityNames=H.entityNames,this.css=X.css??!0,this.script=X.script??!0,this.comments=X.comments??!0,this.root={type:"Root",start:0,end:G,css:null,js:[],options:null,fragment:{type:"Fragment",nodes:[]},comments:[]},this.stack=[this.root],this.fragments=[this.root.fragment]}match(O){if(O.length===1)return this.source.charCodeAt(this.index)===O.charCodeAt(0);return this.source.startsWith(O,this.index)}matchRegex(O){return O.lastIndex=this.index,O.exec(this.source)?.[0]??null}eat(O,G=!1){if(this.match(O))return this.index+=O.length,!0;if(G)fi(this.index,O);return!1}read(O){let G=this.matchRegex(O);if(G)this.index+=G.length;return G}readUntil(O){if(this.index>=this.source.length)jt(this.source.length);let G=this.source.indexOf(O,this.index),H=G===-1?this.source.length:G,X=this.source.slice(this.index,H);return this.index=H,X}allowWhitespace(){this.index=s(this.source,this.index)}requireWhitespace(){if(!l(this.source.charCodeAt(this.index)))ml(this.index);this.allowWhitespace()}eatClosingBrace(){this.allowWhitespace(),this.eat("}",!0)}sourceLocation(O,G){return this.loc?{start:E(O),end:E(G)}:void 0}readIdentifierName(){let O=this.index,G=Ir(this.source,O),H=this.source.slice(O,G);if(this.index=G,is.has(H))Vl(O,H);let X={type:"Identifier",name:H,start:O,end:G};if(this.loc)X.loc=this.sourceLocation(O,G);return X}current(){return this.stack[this.stack.length-1]}append(O){this.fragments[this.fragments.length-1].nodes.push(O)}open(O,G){this.append(O),this.stack.push(O),this.fragments.push(G)}setFragment(O){this.fragments[this.fragments.length-1]=O}close(){this.stack.pop(),this.fragments.pop()}}var ff={"||":1,"??":1,"&&":2,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"+":9,"-":9,"*":10,"/":10,"%":10};function $r(O,G,H,X){return{type:"Literal",start:G,end:H,value:X,raw:O.slice(G,H)}}function Xl(O,G){let H=O.charCodeAt(G);if(H===34||H===39){for(let le=G+1;le<O.length;le++){let we=O.charCodeAt(le);if(we===H)return $r(O,G,le+1,O.slice(G+1,le));if(we===92||we===10||we===13)return null}return null}let X=G;for(;X<O.length;X++){let le=O.charCodeAt(X);if(le<48||le>57)break}if(X===G||H===48&&X-G>1)return null;return $r(O,G,X,Number(O.slice(G,X)))}function df(O,G,H){let X=Ir(O,G);if(X===G)return Xl(O,G);let le=O.slice(G,X);if(le==="true"||le==="false"||le==="null")return $r(O,G,X,le==="null"?null:le==="true");if(is.has(le))return null;let we={type:"Identifier",start:G,end:X,name:le};for(let ke=X;;){let ve=O.charCodeAt(ke);if(ve===40){let Ae=mf(O,ke+1,H);if(!Ae)return null;we={type:"CallExpression",start:G,end:Ae.end,callee:we,arguments:Ae.arguments,optional:!1},ke=Ae.end;continue}let Ee,Ce;if(ve===46){if(Ce=Ir(O,ke+1),Ce===ke+1)return null;Ee={type:"Identifier",start:ke+1,end:Ce,name:O.slice(ke+1,Ce)}}else if(ve===91){if(Ee=Xl(O,ke+1),!Ee||O.charCodeAt(Ee.end)!==93)return null;Ce=Ee.end+1}else return we;we={type:"MemberExpression",start:G,end:Ce,object:we,property:Ee,computed:ve===91,optional:!1},ke=Ce}}function mf(O,G,H){let X=[],le=s(O,G);if(O.charCodeAt(le)===41)return{arguments:X,end:le+1};for(;;){let we=cs(O,le,H);if(!we)return null;X.push(we),le=s(O,we.end);let ke=O.charCodeAt(le);if(ke===41)return{arguments:X,end:le+1};if(ke!==44)return null;if(le=s(O,le+1),O.charCodeAt(le)===41)return null}}function Or(O,G,H){let X=O.charCodeAt(G),le=O.charCodeAt(G+1);if(!(X===33&&le!==61)&&!(X===45&&le!==45&&le!==61))return df(O,G,H);let we=Or(O,s(O,G+1),H);if(!we)return null;return{type:"UnaryExpression",start:G,end:we.end,operator:X===33?"!":"-",prefix:!0,argument:we}}function Yl(O,G,H){let X=O.charCodeAt(G),le=O.charCodeAt(G+1);switch(X){case 124:return le===124&&O.charCodeAt(G+2)!==61?"||":null;case 38:return le===38&&O.charCodeAt(G+2)!==61?"&&":null;case 63:return le===63&&O.charCodeAt(G+2)!==61?"??":null;case 61:if(le!==61)return null;return O.charCodeAt(G+2)===61?"===":"==";case 33:if(le!==61)return null;return O.charCodeAt(G+2)===61?"!==":"!=";case 60:case 62:if(H||le===X)return null;if(le===61)return X===60?"<=":">=";return X===60?"<":">";case 43:return le===43||le===61?null:"+";case 45:return le===45||le===61?null:"-";case 42:return le===42||le===61?null:"*";case 47:return le===47||le===42||le===61?null:"/";case 37:return le===61?null:"%";default:return null}}function Mr(O,G,H,X){if(dc(O.charCodeAt(G.end)))return G;let le=s(O,G.end),we=Yl(O,le,X);if(we===null)return G;let ke=ff[we];if(ke<=H)return G;let ve=Or(O,s(O,le+we.length),X);if(!ve)return null;let Ee=Mr(O,ve,we==="??"?2:ke,X);if(!Ee)return null;let Ce;if(we==="||"||we==="&&"||we==="??"){let Ae=Yl(O,s(O,Ee.end),X);if(we==="??"?Ae==="||"||Ae==="&&":Ae==="??")return null;Ce={type:"LogicalExpression",start:G.start,end:Ee.end,left:G,operator:we,right:Ee}}else Ce={type:"BinaryExpression",start:G.start,end:Ee.end,left:G,operator:we,right:Ee};return Mr(O,Ce,H,X)}function cs(O,G,H){let X=Or(O,G,H);if(!X)return null;let le=Mr(O,X,-1,H);if(!le||dc(O.charCodeAt(le.end)))return le;let we=s(O,le.end);if(O.charCodeAt(we)!==63)return le;let ke=O.charCodeAt(we+1);if(ke===46||ke===63)return null;let ve=cs(O,s(O,we+1),H);if(!ve)return null;let Ee=s(O,ve.end);if(O.charCodeAt(Ee)!==58)return null;let Ce=cs(O,s(O,Ee+1),H);if(!Ce)return null;return{type:"ConditionalExpression",start:le.start,end:Ce.end,test:le,consequent:ve,alternate:Ce}}function dc(O){return O===125||O===41||O===44||O===58}function yf(O,G){let H=O.charCodeAt(s(O,G));return H===125||H===41}function gf(O,G,H){let X=cs(O,G,H);return X&&yf(O,X.end)?X:null}function Qt(O){switch(O.loc={start:D(O.start),end:D(O.end)},O.type){case"MemberExpression":Qt(O.object),Qt(O.property);break;case"CallExpression":Qt(O.callee);for(let G of O.arguments)Qt(G);break;case"UnaryExpression":Qt(O.argument);break;case"BinaryExpression":case"LogicalExpression":Qt(O.left),Qt(O.right);break;case"ConditionalExpression":Qt(O.test),Qt(O.consequent),Qt(O.alternate);break}}function $t(O){let G=!O.loc||O.lfOnly?gf(O.source,O.index,O.isTypeScript):null;if(G){if(O.index=G.end,O.loc)Qt(G);return G}let{node:H,end:X}=Mi(O,O.source,O.index);return O.index=X,H}var xf=new Set(["server","client","worker","test","default"]);function vf(O,G,H){let{source:X,index:le}=O;if(le>=X.length)jt(X.length);let we=re(X,le);if(we===-1)vr(X.length,"script");O.index=se(X,we);let ke=O.script?rs(O,X.slice(0,we),le):{type:"Program",start:le,end:we,body:[],sourceType:"module"};if(ke.start=le,ke.loc)Object.assign(ke.loc.start,D(G)),Object.assign(ke.loc.end,D(O.index));else if(O.loc)ke.loc={start:D(G),end:D(O.index)};let ve="default";for(let Ee of H){if(xf.has(Ee.name))bl(Ee,Ee.name);if(Ee.name==="module"){if(Ee.value!==!0)xl(Ee,Ee.name);ve="module"}if(Ee.name==="context"){let Ce=Ee.value;if(!Array.isArray(Ce)||Ce.length!==1||Ce[0].type!=="Text"||Ce[0].data!=="module")vl(Ee);ve="module"}}return{type:"Script",start:G,end:O.index,context:ve,content:ke,attributes:H}}var bf=/(even|odd|\+?(\d+|\d*n(\s*[+-]\s*\d+)?)|-\d*n(\s*\+\s*\d+))((?=\s*[,)])|\s+of(\s+|(?=[.#[*:&])))/y,Sf=/\d+(\.\d+)?%/y,wf=/\\[0-9a-fA-F]{1,6}(\r\n|\s)?/y,kf=/\s*>/y,di=-1,mc=34,Ef=35,Cf=36,Af=38,yc=39,Nf=40,_f=41,hs=42,Tf=43,If=45,$f=46,gc=47,Pr=58,Mf=59,Pf=60,Ql=61,Rf=62,Lf=91,Vr=92,Of=93,Vf=94,xc=123,Rr=124,Df=125,vc=126,ps=[];function Bf(O,G,H){let X=O.index;ps=[];let le=O.css?Uf(O):Ff(O),we=O.index;return O.eat("</style",!0),O.read(kf),{type:"StyleSheet",start:G,end:O.index,attributes:H,children:le,comments:ps,content:{start:X,end:we,styles:O.source.slice(X,we),comment:null}}}function Ff(O){return O.index=oe(O.source,O.index),[]}function Uf(O){let G=[];for(;;){if(Pi(O,!0),O.match("</style")||O.index>=O.source.length)break;G.push(O.match("@")?bc(O):Sc(O))}return G}function bc(O){let G=O.index;O.eat("@",!0);let H=Ci(O),X=Dr(O,!0),le=null;if(O.match("{"))le=Ec(O);else O.eat(";",!0);return{type:"Atrule",start:G,end:O.index,name:H,prelude:X,block:le}}function Sc(O){let G=O.index;return{type:"Rule",prelude:wc(O,!1),block:Ec(O),start:G,end:O.index}}function wc(O,G){let H=[];Pi(O,!0);let X=O.index;while(O.index<O.source.length){H.push(jf(O,G));let le=O.index;if(Pi(O,!0),O.match(G?")":"{"))return{type:"SelectorList",start:X,end:le,children:H};O.eat(",",!0),Pi(O,!0)}return jt(O.source.length)}function Jl(O,G){return{type:"RelativeSelector",combinator:O,selectors:[],start:G,end:-1}}function jf(O,G){let{source:H,index:X}=O,le=[],we=Jl(null,O.index);while(O.index<H.length){let ke=O.index,ve=H.charCodeAt(ke),Ee=we.selectors;if(ve===Af)O.index++,Ee.push({type:"NestingSelector",name:"&",start:ke,end:O.index});else if(ve===hs)O.index++,Ee.push(Zl(O,ke,"*"));else if(ve===Ef)O.index++,Ee.push({type:"IdSelector",name:Ci(O),start:ke,end:O.index});else if(ve===$f)O.index++,Ee.push({type:"ClassSelector",name:Ci(O),start:ke,end:O.index});else if(ve===Pr){let Ne=H.charCodeAt(ke+1)===Pr;O.index+=Ne?2:1;let Pe=Ci(O),Oe=null;if(O.eat("("))Oe=wc(O,!0),O.eat(")",!0);if(Ne)Ee.push({type:"PseudoElementSelector",name:Pe,start:ke,end:O.index,...Oe&&{args:Oe}});else Ee.push({type:"PseudoClassSelector",name:Pe,args:Oe,start:ke,end:O.index})}else if(ve===Lf)O.index++,Ee.push(Wf(O,ke));else{let Ne=G?O.read(bf):null,Pe=!Ne&&f(ve)?O.read(Sf):null;if(Ne)Ee.push({type:"Nth",value:Ne,start:ke,end:O.index});else if(Pe)Ee.push({type:"Percentage",value:Pe,start:ke,end:O.index});else if(kc(H,ke)===0){let Oe=Ci(O);Ee.push(Zl(O,ke,Oe))}}let Ce=O.index;Pi(O,!1);let Ae=O.match(",")||O.match(G?")":"{");if(O.index=Ce,Ae)return we.end=Ce,le.push(we),{type:"ComplexSelector",start:X,end:Ce,children:le};let Te=qf(O);if(Te){if(we.selectors.length>0)we.end=Ce,le.push(we);if(we=Jl(Te,Te.start),O.allowWhitespace(),O.match(",")||O.match(G?")":"{"))ol(O.index)}}return jt(H.length)}function Zl(O,G,H){let X=H,le;if(O.eat("|"))le=X,X=O.eat("*")?"*":Ci(O);return{type:"TypeSelector",name:X,...le!==void 0&&{namespace:le},start:G,end:O.index}}function Wf(O,G){let H=O.source;O.allowWhitespace();let X=Ci(O);O.allowWhitespace();let le=null,we=null,ke=H.charCodeAt(O.index);if(ke===Ql)we="=";else if((ke===vc||ke===Vf||ke===Cf||ke===hs||ke===Rr)&&H.charCodeAt(O.index+1)===Ql)we=H.slice(O.index,O.index+2);if(we)O.index+=we.length,O.allowWhitespace(),le=Hf(O);O.allowWhitespace();let ve=O.index;while(Ac(H.charCodeAt(O.index)))O.index++;let Ee=O.index>ve?H.slice(ve,O.index):null;return O.allowWhitespace(),O.eat("]",!0),{type:"AttributeSelector",start:G,end:O.index,name:X,matcher:we,value:le,flags:Ee}}function kc(O,G){let H=O.charCodeAt(G);if(H===Tf||H===vc||H===Rf)return 1;if(H===Rr&&O.charCodeAt(G+1)===Rr)return 2;return 0}function qf(O){let G=O.index;O.allowWhitespace();let H=O.index,X=kc(O.source,H);if(X>0){O.index+=X;let le=O.index;return O.allowWhitespace(),{type:"Combinator",name:O.source.slice(H,le),start:H,end:le}}if(O.index!==G)return{type:"Combinator",name:" ",start:G,end:O.index};return null}function Ec(O){let G=O.index;O.eat("{",!0);let H=[];while(O.index<O.source.length){if(Pi(O,!0),O.match("}"))break;H.push(zf(O))}return O.eat("}",!0),{type:"Block",start:G,end:O.index,children:H}}function zf(O){if(O.match("@"))return bc(O);let G=O.index;Dr(O,!1);let H=O.source.charCodeAt(O.index);return O.index=G,H===xc?Sc(O):Kf(O)}function Kf(O){let{source:G,index:H}=O;if(H>=G.length)jt(G.length);let X=H;while(X<G.length){let Ee=G.charCodeAt(X);if(Ee===Pr||l(Ee))break;X++}let le=G.slice(H,X);O.index=X,O.allowWhitespace(),O.eat(":");let we=O.index;O.allowWhitespace();let ke=Dr(O,!0);if(!ke&&!le.startsWith("--"))rl({start:H,end:we});let ve=O.index;if(!O.match("}"))O.eat(";",!0);return{type:"Declaration",start:H,end:ve,property:le,value:ke}}function Dr(O,G){let H=O.source,X=H.length,le="",we=O.index,ke=null,ve=!1,Ee=!1,Ce=di,Ae=O.index;while(Ae<X){let Te=H.charCodeAt(Ae);if(ve){ve=!1,Ae++;continue}if(Te===Vr){ve=!0,Ae++;continue}if(Te===Ce)Ce=di;else if(Te===_f)Ee=!1;else if(Ce===di&&(Te===mc||Te===yc))Ce=Te;else if(Te===Nf){if(Gf(H,le,we,Ae))Ee=!0}else if((Te===Mf||Te===xc||Te===Df)&&!Ee&&Ce===di){if(O.index=Ae,!G)return"";if(le+=H.slice(we,Ae),ke){let Ne=le.length-le.trimStart().length;for(let Pe of ke)Pe.position=Math.max(0,(Pe.position??0)-Ne)}return le.trim()}else if(Te===gc&&!Ee&&Ce===di&&H.charCodeAt(Ae+1)===hs){le+=H.slice(we,Ae),O.index=Ae;let Ne=Cc(O);if(G)Ne.position=le.length,ps.push(Ne),ke??=[],ke.push(Ne);Ae=O.index,we=Ae;continue}Ae++}return O.index=X,jt(X)}function Gf(O,G,H,X){if(X-H>=3)return O.charCodeAt(X-3)===117&&O.charCodeAt(X-2)===114&&O.charCodeAt(X-1)===108;return(G+O.slice(H,X)).endsWith("url")}function Hf(O){let G=O.source,H=di;if(O.eat('"'))H=mc;else if(O.eat("'"))H=yc;let X=O.index,le=!1,we=X;while(we<G.length){let ke=G.charCodeAt(we);if(le)le=!1;else if(ke===Vr)le=!0;else if(H===di?ke===Of||l(ke):ke===H)return O.index=H===di?we:we+1,G.slice(X,we).trim();we++}return O.index=we,jt(G.length)}function Ci(O){let{source:G,index:H}=O,X=G.charCodeAt(H);if(f(X)||X===If&&f(G.charCodeAt(H+1)))gr(H);let le="",we=H,ke=H;while(ke<G.length){let ve=G.charCodeAt(ke);if(ve===Vr){le+=G.slice(we,ke),O.index=ke;let Ee=O.matchRegex(wf);if(Ee){let Ce=String.fromCodePoint(Number.parseInt(Ee.slice(1),16));le+=Ce==="\\"?"\\\\":Ce,ke+=Ee.length}else le+=`\\${G[ke+1]}`,ke+=2;we=ke}else if(ve>=160||Xf(ve))ke++;else break}if(le+=G.slice(we,ke),O.index=ke,le==="")gr(H);return le}function Pi(O,G){let H=O.source;O.allowWhitespace();for(;;){let X=H.charCodeAt(O.index);if(X===gc&&H.charCodeAt(O.index+1)===hs){let le=Cc(O);if(G)ps.push(le)}else if(X===Pf&&O.eat("<!--"))O.readUntil("-->"),O.eat("-->",!0);else break;O.allowWhitespace()}}function Cc(O){let G=O.index;O.eat("/*",!0);let H=O.readUntil("*/");return O.eat("*/",!0),{type:"CSSComment",value:H,start:G,end:O.index}}function Ac(O){return O>=65&&O<=90||O>=97&&O<=122}function Xf(O){return Ac(O)||f(O)||O===95||O===45}var _r=/<\/textarea(\s[^>]*)?>/iy,Yf=/^![a-zA-Z]+$/,Qf=/^[a-zA-Z][a-zA-Z0-9]*:[a-zA-Z][a-zA-Z0-9-]*[a-zA-Z0-9]$/,Jf=/^[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,Tr="\\u200C\\u200D",Zf=new RegExp(`^(?:\\p{Lu}[$${Tr}\\p{ID_Continue}.]*|\\p{ID_Start}[$${Tr}\\p{ID_Continue}]*(?:\\.[$${Tr}\\p{ID_Continue}]+)+)$`,"u"),ed=new Map([["use","UseDirective"],["animate","AnimateDirective"],["bind","BindDirective"],["class","ClassDirective"],["style","StyleDirective"],["on","OnDirective"],["let","LetDirective"],["in","TransitionDirective"],["out","TransitionDirective"],["transition","TransitionDirective"]]),Br=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]]]),ec=[...Br.keys()],td=`${ec.slice(0,-1).join(", ")} or ${ec.at(-1)}`,id=62,tc=123;function fs(O,G){let H=O.index;if(H>=O.source.length)jt(O.source.length);let X=R(O.source,H,G);return O.index=X,{name:O.source.slice(H,X),start:H,end:X,loc:O.sourceLocation(H,X)}}var mn=(O,G,H,X=H)=>({start:O,end:G,type:"Text",raw:H,data:X});function nd(O){let G=O.charCodeAt(0);if(G>=97&&G<=122&&!O.includes("."))return!1;return Zf.test(O)}function sd(O){let G=!0;for(let H=0;H<O.length&&G;H++){let X=O.charCodeAt(H);G=X>=97&&X<=122||H>0&&X>=48&&X<=57}return G&&O.length>0||Yf.test(O)||Qf.test(O)||Jf.test(O)}function ic(O,G){for(let H=O.length-1;H>=0;H--){let X=G(O[H]);if(X!==void 0)return X}return!1}function rd(O,G,H){let X=Br.get(G);if(X)return X[0];if(H)return"Component";if(G==="title"){if(ic(O.stack,({type:le})=>{if(le==="SvelteHead")return!0;return le==="RegularElement"||le==="Component"?!1:void 0}))return"TitleElement"}if(G==="slot"){if(!ic(O.stack,(le)=>le.type==="RegularElement"&&le.attributes.some((we)=>we.type==="Attribute"&&we.name==="shadowrootmode")?!0:void 0))return"SlotElement"}return"RegularElement"}function od(O){let G=O.index++;if(O.eat("!--")){let H=O.readUntil("-->");O.eat("-->",!0),O.append({type:"Comment",start:G,end:O.index,data:H})}else if(O.eat("/"))ad(O,G);else cd(O,G)}function ad(O,G){let{name:H}=fs(O,!1);if(O.allowWhitespace(),O.eat(">",!0),z(H))Bl(G);let X=O.current();while(!("name"in X)||X.name!==H){if(X.type!=="RegularElement"){let le=O.lastAutoClosedTag;if(le?.tag===H)ul(G,H,le.reason);pl(G,H)}X.end=G,O.close(),X=O.current()}if(X.end=O.index,O.close(),O.stack.length<(O.lastAutoClosedTag?.depth??0))O.lastAutoClosedTag=void 0}function ld(O,G,H){return{type:O,start:G,end:-1,name:H}}function cd(O,G){let H=fs(O,!1),{name:X}=H,le=Br.get(X);if(!le&&X.startsWith("svelte:"))Nl(H,td);let we=nd(X);if(!we&&!sd(X))Ll(H);if(le?.[1]){if(O.metaTags.has(X))El(G,X);if(O.current().type!=="Root")Al(G,X);O.metaTags.add(X)}let ke=ld(rd(O,X,we),G,X);if(O.loc)ke.name_loc=H.loc;ke.attributes=[],ke.fragment={type:"Fragment",nodes:[]},O.allowWhitespace();let ve=O.current();if(ve.type==="RegularElement"&&ge(ve.name,X))ve.end=G,O.close(),O.lastAutoClosedTag={tag:ve.name,reason:X,depth:O.stack.length};if((X==="script"||X==="style")&&O.current().type==="Root"){let Ee=[];ke.attributes=Ee,oc(O,Ee,md),ud(O,ke,G,Ee);return}if(oc(O,ke.attributes,gd),ke.type==="SvelteComponent"){let Ee=nc(ke);if(!Ee)kl(G);if(!sc(Ee.value))wl(Ee.start);ke.expression=rc(Ee.value)}else if(ke.type==="SvelteElement"){let Ee=nc(ke);if(!Ee)wr(G);if(Ee.value===!0)wr(Ee);ke.tag=sc(Ee.value)?rc(Ee.value):dd(Ee.value[0])}if(!O.eat("/")&&!z(X))if(O.eat(">",!0),X==="textarea")ke.fragment.nodes=_c(O,(Ee,Ce)=>(_r.lastIndex=Ce,_r.test(Ee)),"inside <textarea>"),O.read(_r);else if(X==="script"||X==="style")ke.fragment.nodes.push(pd(O,`</${X}>`));else{O.open(ke,ke.fragment);return}else O.eat(">",!0);ke.end=O.index,O.append(ke)}function pd(O,G){let H=O.index,X=O.source.indexOf(G,H);O.index=X===-1?O.source.length:X;let le=mn(H,O.index,O.source.slice(H,O.index));return O.eat(G,!0),le}function ud(O,G,H,X){O.eat(">",!0);let le=hd(O.root.fragment.nodes,H);if(G.name==="style"){let ve=Bf(O,H,X);if(ve.content.comment=le,O.root.css)Sl(H);O.root.css=ve;return}let we=vf(O,H,X);if(le&&O.comments)we.content.leadingComments=[{type:"Line",value:le.data}];let ke=we.context==="module"?"module":"instance";if(O.root[ke])gl(H);O.root[ke]=we}function hd(O,G){let H=O.length-1;if(H<0||O[H].end!==G)return null;for(let X=H;X>=0;X--){let le=O[X];if(le.type==="Comment")return le;if(le.type!=="Text"||le.data.trim())return null}return null}var fd=(O)=>O.type==="Attribute"&&O.name==="this";function nc(O){let G=O.attributes.find(fd);if(G)O.attributes.splice(O.attributes.indexOf(G),1);return G}function sc(O){if(O===!0)return!1;if(!Array.isArray(O))return!0;return O.length===1&&O[0].type==="ExpressionTag"}function rc(O){return(Array.isArray(O)?O[0]:O).expression}function dd(O){if(O.type!=="Text")return O.expression;return{type:"Literal",value:O.data,raw:`'${O.raw}'`,start:O.start,end:O.end}}function oc(O,G,H){let X=new Set;for(;;){let le=H(O);if(!le)return;let{type:we}=le;if(we==="Attribute"||we==="BindDirective"||we==="StyleDirective"||we==="ClassDirective"){let ke=`${we==="BindDirective"?"Attribute":we}${le.name}`;if(X.has(ke))Ya(le);if(le.name!=="this")X.add(ke)}G.push(le),O.allowWhitespace()}}function Fr(O,G,H,X,le){return O.loc?{type:"Attribute",start:H,end:X,name:G.name,name_loc:G.loc,value:le}:{type:"Attribute",start:H,end:X,name:G.name,value:le}}function Nc(O){if(y(O.source.charCodeAt(O.index)))fi(O.index,"=")}function md(O){let G=O.index,H=fs(O,!0);if(!H.name)return null;let X=!0;if(O.eat("=")){O.allowWhitespace();let{source:le}=O,we=O.index,ke=y(le.charCodeAt(we)),ve=-1;if(ke){let Ae=le.indexOf(le[we],we+1);if(Ae!==-1)ve=Ae+1}if(ve===-1){ve=we;while(ve<le.length&&le.charCodeAt(ve)!==id&&!l(le.charCodeAt(ve)))ve++;if(ve===we)br(we)}O.index=ve;let Ee=ke?1:0,Ce=le.slice(we+Ee,ve-Ee);X=[mn(ve-Ce.length-Ee,ve-Ee,Ce,as(Ce,!0,O.entityNames))]}return Nc(O),Fr(O,H,G,O.index,X)}function yd(O){let G=O.index,H=O.match("/*");if(!H&&!O.match("//"))return!1;O.index+=2;let X=O.readUntil(H?"*/":`
18
+ `);if(H)O.eat("*/");let le={type:H?"Block":"Line",start:G,end:O.index,value:X},we=O.sourceLocation(G,O.index);if(we)le.loc=we;if(O.comments)O.root.comments.push(le);return!0}function gd(O){while(yd(O))O.allowWhitespace();let G=O.index;if(O.eat("{"))return xd(O,G);let H=fs(O,!0);if(!H.name)return null;let X=O.index;O.allowWhitespace();let le=!0;if(O.eat("=")){if(O.allowWhitespace(),O.match("/>"))le=[mn(O.index,O.index+1,"/")],O.index++;else le=Sd(O);X=O.index}else Nc(O);let we=H.name.indexOf(":"),ke=we>0?ed.get(H.name.slice(0,we)):void 0;return ke?bd(O,ke,H,we,G,X,le):Fr(O,H,G,X,le)}function xd(O,G){if(O.allowWhitespace(),O.eat("@attach")){O.requireWhitespace();let le=$t(O);return O.eatClosingBrace(),{type:"AttachTag",start:G,end:O.index,expression:le}}if(O.eat("...")){let le=$t(O);return O.eatClosingBrace(),{type:"SpreadAttribute",start:G,end:O.index,expression:le}}let H=O.readIdentifierName();if(H.name==="")Qa(G);O.eatClosingBrace();let X={type:"ExpressionTag",start:H.start,end:H.end,expression:H};return Fr(O,H,G,O.index,X)}function vd(O){if(O===!0)return;return Array.isArray(O)?O[0]:O}function bd(O,G,H,X,le,we,ke){let[ve,...Ee]=H.name.slice(X+1).split("|");if(ve==="")cl({start:le,end:le+X+1},H.name);let Ce={start:le,end:we,type:G,name:ve};if(O.loc)Ce.name_loc=H.loc;if(G==="StyleDirective")return Ce.modifiers=Ee,Ce.value=ke,Ce;let Ae=vd(ke);if(Ae&&(Array.isArray(ke)&&ke.length>1||Ae.type==="Text"))ll(Ae.start);if(Ce.expression=Ae?.expression??null,Ce.modifiers=Ee,G==="TransitionDirective"){let Te=H.name.slice(0,X);Ce.intro=Te!=="out",Ce.outro=Te!=="in"}if((G==="BindDirective"||G==="ClassDirective")&&!Ce.expression)Ce.expression={start:le+X+1,end:we,type:"Identifier",name:ve};return Ce}function Sd(O){let G=O.source.charCodeAt(O.index),H=y(G);if(H){if(O.index++,O.source.charCodeAt(O.index)===G)return O.index++,[mn(O.index-1,O.index-1,"")]}let X;try{X=_c(O,H?(le,we)=>le.charCodeAt(we)===G:ae,"in attribute value",H?G:void 0)}catch(le){let we=le instanceof Ze&&le.code==="js_parse_error"?le.position?.[0]:void 0;if(we!==void 0&&O.source.startsWith("/>",we-1))O.index=we,fi(we,H?String.fromCharCode(G):"}");throw le}if(H)O.index++;else if(X.length===0)br(O.index);return H||X.length>1||X[0].type==="Text"?X:X[0]}function _c(O,G,H,X){let{source:le}=O,we=[],ke=O.index,ve=(Ee)=>{if(Ee<=ke)return;let Ce=le.slice(ke,Ee);we.push(mn(ke,Ee,Ce,as(Ce,!0,O.entityNames)))};while(O.index<le.length){let Ee=O.index;if(G(le,Ee))return ve(Ee),we;if(le.charCodeAt(Ee)!==tc){if(O.index++,X!==void 0)while(O.index<le.length&&le.charCodeAt(O.index)!==tc&&le.charCodeAt(O.index)!==X)O.index++;continue}O.index++;let Ce=le.charCodeAt(O.index);if(Ce===35||Ce===64){O.index++;let Te=O.index;while(O.index<le.length&&le.charCodeAt(O.index)>=97&&le.charCodeAt(O.index)<=122)O.index++;let Ne=le.slice(Te,O.index);(Ce===35?tl:Ol)(Ee,Ne,H)}ve(Ee),O.allowWhitespace();let Ae=$t(O);O.eatClosingBrace(),we.push({type:"ExpressionTag",start:Ee,end:O.index,expression:Ae}),ke=O.index}jt(le.length)}var wd=new Map([["html","html"],["svg","svg"],["mathml","mathml"],["http://www.w3.org/2000/svg","svg"],["http://www.w3.org/1998/Math/MathML","mathml"]]),kd=new Map([["type",(O,G)=>{if(G!=="String"&&G!=="Number"&&G!=="Boolean"&&G!=="Array"&&G!=="Object")return!1;return O.type=G,!0}],["reflect",(O,G)=>{if(typeof G!=="boolean")return!1;return O.reflect=G,!0}],["attribute",(O,G)=>{if(typeof G!=="string")return!1;return O.attribute=G,!0}]]),ac="[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}-]",Ed=new RegExp(`^[a-z]${ac}*-${ac}*$`,"u"),Cd=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" ")),ls=(O)=>(G,H)=>{let X=us(H);if(typeof X!=="boolean")es(H,"true or false");G[O]=X},Ad=new Map([["runes",ls("runes")],["immutable",ls("immutable")],["preserveWhitespace",ls("preserveWhitespace")],["accessors",ls("accessors")],["namespace",(O,G)=>{let H=wd.get(us(G));if(!H)es(G,'"html", "mathml" or "svg"');O.namespace=H}],["css",(O,G)=>{if(us(G)!=="injected")es(G,'"injected"');O.css="injected"}],["tag",(O,G)=>_l(G)],["customElement",(O,G)=>{let H=Td(G);if(H)O.customElement=H}]]);function Nd(O){let G=[],H={start:O.start,end:O.end,attributes:G};for(let X of O.attributes){if(X.type!=="Attribute")Tl(X);G.push(X);let le=Ad.get(X.name);if(!le)Rl(X,X.name);le(H,X)}return H}function us({value:O}){if(O===!0)return!0;let G=Array.isArray(O)?O:[O];if(G.length===0)return!0;if(G.length>1)return null;let[H]=G;if(H.type==="Text")return H.data;return H.expression.type==="Literal"?H.expression.value:null}function lc(O,G){if(typeof G!=="string")kr(O);if(!G)return;if(!Ed.test(G))kr(O);if(Cd.has(G))Pl(O)}function Lr(O){return O.type==="Property"&&!O.computed&&O.key.type==="Identifier"}function _d(O,G){let H=new Map;for(let X of O.properties){if(!Lr(X))G();if(!H.has(X.key.name))H.set(X.key.name,X.value)}return H}function Td(O){let G=()=>Il(O);if(O.value===!0)G();let H=Array.isArray(O.value)?O.value[0]:O.value;if(H.type==="Text"){let Ae=us(O);return lc(O,Ae),{tag:Ae}}let{expression:X}=H;if(X.type!=="ObjectExpression"){if(X.type==="Literal"&&X.value===null)return;G()}let le=_d(X,G),we={},ke=le.get("tag");if(ke){let Ae=ke.type==="Literal"?ke.value:void 0;lc(null,Ae),we.tag=Ae}let ve=le.get("props");if(ve){let Ae=()=>$l(O);if(ve.type!=="ObjectExpression")Ae();we.props={};for(let Te of ve.properties){if(!Lr(Te)||Te.value.type!=="ObjectExpression")Ae();let Ne={};we.props[Te.key.name]=Ne;for(let Pe of Te.value.properties){if(!Lr(Pe)||Pe.value.type!=="Literal")Ae();if(!kd.get(Pe.key.name)?.(Ne,Pe.value.value))Ae()}}}let Ee=le.get("shadow");if(Ee)if(Ee.type==="ObjectExpression")we.shadow=Ee;else if(Ee.type==="Literal"&&(Ee.value==="open"||Ee.value==="none"))we.shadow=Ee.value;else Ml(O);let Ce=le.get("extend");if(Ce)we.extend=Ce;return we}var Id={"{":"}","(":")","[":"]"};function Ur(O,G,H=Id){let X=Object.values(H),le=[],we=G;while(we<O.length){let ke=O[we++];if(ke==="'"||ke==='"'||ke==="`")we=$d(O,we,ke);else if(Object.hasOwn(H,ke))le.push(ke);else if(X.includes(ke)){let ve=H[le.pop()??""];if(ke!==ve)fi(we-1,ve);if(le.length===0)return we}}jt(O.length)}function $d(O,G,H){let X=G;while(X<O.length){let le=O[X++];if(le===H)return X;if(le==="\\")X++;else if(H==="`"&&le==="$"&&O[X]==="{")X=Ur(O,X)}Dl(G)}var Md=/\?\s*:/g;function ds(O){let G=O.index,H=O.readIdentifierName();if(H.name!=="")return{...H,typeAnnotation:cc(O)};let X=O.source[O.index];if(X!=="{"&&X!=="[")fl(O.index);O.index=Ur(O.source,G);let le=ql(O,O.source.slice(0,O.index),G)??Pd(O,G);he(le,"ObjectPattern","ArrayPattern");let we=cc(O);if(le.typeAnnotation=we,we)le.end=we.end;return le}function Pd(O,G){let{node:H}=Mi(O,`${O.source.slice(0,O.index)} = 1`,G);return he(H,"AssignmentExpression"),H.left}function cc(O){let G=O.index;if(O.allowWhitespace(),!O.eat(":")){O.index=G;return}let H="_ as ",X=O.index-H.length,le=O.source.slice(0,X)+H+O.source.slice(O.index).replace(Md,":"),we=Mi(O,le,X).node;if(we.type==="AssignmentExpression"){let ke=we.right.start;while(le[ke]!=="=")ke-=1;we=Mi(O,le.slice(0,ke),X).node}if(we.type==="SequenceExpression")we=we.expressions[0];return he(we,"TSAsExpression"),O.index=we.end,{type:"TSTypeAnnotation",start:G,end:O.index,typeAnnotation:we.typeAnnotation}}var Rd={IfBlock:"if",EachBlock:"each",KeyBlock:"key",AwaitBlock:"await",SnippetBlock:"snippet"},ai=()=>({type:"Fragment",nodes:[]});function Ld(O,G){if(O.eat("if")){O.requireWhitespace();let H=$t(O);O.eatClosingBrace();let X=ai();O.open({type:"IfBlock",elseif:!1,start:G,end:-1,test:H,consequent:X,alternate:null},X)}else if(O.eat("each"))Vd(O,G);else if(O.eat("await")){O.requireWhitespace();let H=$t(O);O.allowWhitespace();let X={type:"AwaitBlock",start:G,end:-1,expression:H,value:null,error:null,pending:null,then:null,catch:null},le=ai();if(O.eat("then"))X.value=pc(O),X.then=le;else if(O.eat("catch"))X.error=pc(O),X.catch=le;else X.pending=le;O.eat("}",!0),O.open(X,le)}else if(O.eat("key")){O.requireWhitespace();let H=$t(O);O.eatClosingBrace();let X=ai();O.open({type:"KeyBlock",start:G,end:-1,expression:H,fragment:X},X)}else if(O.eat("snippet"))Dd(O,G);else hl(O.index)}function pc(O){if(O.matchRegex(hc))return O.allowWhitespace(),null;O.requireWhitespace();let G=ds(O);return O.allowWhitespace(),G}function Od(O){let G={assertion:null},H=O.end,X=(we)=>{if(we.type==="TSAsExpression"&&we.end===O.end)return G.assertion=we,H=we.expression.end,we.expression;return Z(we,X),we},le=O;if(O.type==="TSAsExpression")G.assertion=O,le=O.expression,H=le.end;else Z(O,X);return le.end=H,{expression:le,assertion:G.assertion}}function Vd(O,G){O.requireWhitespace();let H=O.source,X;while(!X)try{X=$t(O)}catch(Ee){let Ce=((Ee instanceof Ze?Ee.position:void 0)?.[0]??G)-2;while(Ce>G&&O.source.slice(Ce,Ce+2)!=="as")Ce-=1;if(Ce<=G)throw O.source=H,Ee;O.source=H.slice(0,Ce)}if(O.source=H,O.allowWhitespace(),!O.match("as")){if(X.type==="SequenceExpression")X=X.expressions[0];let Ee=Od(X);if(X=Ee.expression,Ee.assertion){let Ce=Ee.assertion.typeAnnotation.start-2;while(O.source.slice(Ce,Ce+2)!=="as")Ce-=1;O.index=Ce}}let le=null,we,ke;if(O.eat("as"))O.requireWhitespace(),le=ds(O);else O.index=X.end;if(O.allowWhitespace(),O.eat(",")){if(O.allowWhitespace(),we=O.readIdentifierName().name,!we)Sr(O.index);O.allowWhitespace()}if(O.eat("("))O.allowWhitespace(),ke=$t(O),O.allowWhitespace(),O.eat(")",!0),O.allowWhitespace();O.eat("}",!0);let ve=ai();O.open({type:"EachBlock",start:G,end:-1,expression:X,body:ve,context:le,index:we,key:ke},ve)}function Dd(O,G){O.requireWhitespace();let H=O.readIdentifierName();if(H.name==="")Sr(O.index);O.allowWhitespace();let X=O.index,le;if(O.isTypeScript&&O.match("<")){let Ee=Ur(O.source,X,{"<":">"});le=O.source.slice(X+1,Ee-1),O.index=Ee}O.allowWhitespace(),O.eat("(",!0);let we=1;while(O.index<O.source.length&&(!O.match(")")||we!==1)){if(O.match("("))we++;if(O.match(")"))we--;O.index+=1}O.eat(")",!0);let{node:ke}=Mi(O,`${O.source.slice(0,O.index)} => {}`,X,!0);O.eatClosingBrace();let ve=ai();O.open({type:"SnippetBlock",start:G,end:-1,expression:H,typeParams:le,parameters:ke.type==="ArrowFunctionExpression"?ke.params:void 0,body:ve},ve)}function Bd(O,G){let H=O.index-1,X=O.current();if(X.type==="IfBlock"){if(!O.eat("else"))fi(H,"{:else} or {:else if}");if(O.eat("if"))el(H);if(O.allowWhitespace(),X.alternate=ai(),O.setFragment(X.alternate),O.eat("if")){O.requireWhitespace();let le=$t(O);O.eatClosingBrace();let we=ai();O.open({start:G,end:-1,type:"IfBlock",elseif:!0,test:le,consequent:we,alternate:null},we)}else O.eatClosingBrace()}else if(X.type==="EachBlock"){if(!O.eat("else"))fi(H,"{:else}");O.eatClosingBrace(),X.fallback=ai(),O.setFragment(X.fallback)}else if(X.type==="AwaitBlock"){let le;if(O.eat("then"))le="then";else if(O.eat("catch"))le="catch";else fi(H,"{:then ...} or {:catch ...}");if(X[le])Ja(H,`{:${le}}`);if(!O.eat("}")){O.requireWhitespace();let ke=ds(O);if(le==="then")X.value=ke;else X.error=ke;O.eatClosingBrace()}let we=ai();X[le]=we,O.setFragment(we)}else Za(H)}function Fd(O){let G=O.current(),H=Rd[G.type];if(!H)nl(O.index-1);O.eat(H,!0),O.eatClosingBrace();while(G.type==="IfBlock"&&G.elseif)G.end=O.index,O.close(),G=O.current();G.end=O.index,O.close()}function Ud(O){return O.type==="CallExpression"||O.type==="ChainExpression"&&O.expression.type==="CallExpression"}function jd(O,G){if(O.eat("html")){O.requireWhitespace();let H=$t(O);O.eatClosingBrace(),O.append({type:"HtmlTag",start:G,end:O.index,expression:H})}else if(O.eat("debug")){let H=[];if(!O.read(hc)){let X=$t(O),le=X.type==="SequenceExpression"?X.expressions:[X];for(let we of le){if(we.type!=="Identifier")al(we.start);H.push(we)}O.eatClosingBrace()}O.append({type:"DebugTag",start:G,end:O.index,identifiers:H})}else if(O.eat("const")){O.requireWhitespace();let H=ds(O);O.allowWhitespace(),O.eat("=",!0),O.allowWhitespace();let X=O.index,le=$t(O),we=O.index;if(le.type==="SequenceExpression"&&!O.source.slice(X,le.start).includes("("))sl(le);O.eatClosingBrace();let ke={type:"VariableDeclarator",id:H,init:le,start:H.start,end:we};O.append({type:"ConstTag",start:G,end:O.index,declaration:{type:"VariableDeclaration",kind:"const",declarations:[ke],start:G+2,end:O.index-1}})}else if(O.eat("render")){O.requireWhitespace();let H=$t(O);if(!Ud(H))yl(H);O.eatClosingBrace(),O.append({type:"RenderTag",start:G,end:O.index,expression:H})}else dl(O.index)}var Wd=/(?:var|interface|enum)\b/y,qd=/(?:let|const|type)\b/y;function zd(O){let G=O.index;if(O.index+=1,O.allowWhitespace(),O.eat("#"))Ld(O,G);else if(O.eat(":"))Bd(O,G);else if(O.eat("@"))jd(O,G);else if(O.match("/")&&!O.match("/*")&&!O.match("//"))O.index+=1,Fd(O);else if(!Kd(O,G)){let H=$t(O);O.eatClosingBrace(),O.append({type:"ExpressionTag",start:G,end:O.index,expression:H})}}function Kd(O,G){let H=O.index,X=O.matchRegex(Wd);if(X)xr({start:H,end:H+X.length});if(!O.matchRegex(qd))return!1;let le=O.root.comments.length,we=zl(O,O.source,H);if(we.type==="ExpressionStatement")return O.root.comments.length=le,!1;if(we.type!=="VariableDeclaration"||we.kind!=="let"&&we.kind!=="const")xr(we);return O.index=we.end,O.eatClosingBrace(),O.append({type:"DeclarationTag",start:G,end:O.index,declaration:we}),!0}function Gd(O){let{source:G,index:H}=O;if(O.nextAngle<H)O.nextAngle=uc(G,"<",H);if(O.nextBrace<H)O.nextBrace=uc(G,"{",H);let X=Math.min(O.nextAngle,O.nextBrace);O.index=X;let le=G.slice(H,X);O.append({type:"Text",start:H,end:X,raw:le,data:as(le,!1,O.entityNames)})}function uc(O,G,H){let X=O.indexOf(G,H);return X===-1?O.length:X}function Tc(O,G,H){let X=Hd(O,G,H);while(X.index<X.source.length)Yd(X);return Xd(X)}function Hd(O,G,H){let X=ie(O);return U(X),new fc(X.trimEnd(),X.length,H,G)}function Xd(O){if(O.stack.length>1){let le=O.current();if(le.end=le.start+1,le.type==="RegularElement")vr(le,le.name);il(le)}let{nodes:G}=O.root.fragment,H=G.findIndex((le)=>le.type==="SvelteOptions"),X=G[H];if(X?.type==="SvelteOptions"){G.splice(H,1),O.root.options=Nd(X);let{nodes:le}=X.fragment;if(le.length>0)Cl({start:le[0].start,end:le[le.length-1].end},X.name)}return O.root}function Yd(O){if(O.match("<"))od(O);else if(O.match("{"))zd(O);else Gd(O)}function Ic(O,G,H){return U(O),rs({isTypeScript:G.typescript??!1,typescript:H,loc:G.loc??!1,comments:G.comments??!0,root:{comments:[]}},O)}function $c(O,G,H){U(O);let X={isTypeScript:G.typescript??!1,typescript:H,loc:!1,comments:!1,root:{comments:[]}};return Kl(X,O,(le)=>be(O,G.localExports??!0,le))}function Mc(O={}){let G=za(O.typescript),H={typescript:G,entityNames:Ka(O.entities)??Hl};return{parse:(X,le)=>Tc(X,le,H),parseModule:(X,le={})=>Ic(X,le,G),parseImportsExports:(X,le={})=>$c(X,le,G)}}var jr=/(?:\s|\/\/.*|\/\*[\s\S]*?\*\/)*/g,Qd=new Map([["any","TSAnyKeyword"],["bigint","TSBigIntKeyword"],["boolean","TSBooleanKeyword"],["never","TSNeverKeyword"],["null","TSNullKeyword"],["number","TSNumberKeyword"],["object","TSObjectKeyword"],["string","TSStringKeyword"],["symbol","TSSymbolKeyword"],["undefined","TSUndefinedKeyword"],["unknown","TSUnknownKeyword"],["void","TSVoidKeyword"]]),Jd=new Set("public private protected readonly declare abstract override static accessor".split(" ")),Zd=new Set("public private protected readonly override".split(" ")),em=new Set("var let const function class abstract enum interface type namespace module global".split(" ")),tm=new Set("var let const function class interface enum".split(" ")),Pc=new Set(["TSAsExpression","TSSatisfiesExpression","TSNonNullExpression","TSTypeAssertion"]),Rc=1,im=32,nm=256,sm=0,rm=1,yn=2,om=3,am=4,Wr=6,Lc=7,Uc=256,Gr=1024,lm=8|Gr,cm=yn|Uc,Oc=1,pm=2,Vc=40,um=41,hm=44,Dc=46,Bc=58,ms=61,Fc=60,ys=123,fm=91,qr=42,dm=35,zr=34,Kr=39,mm=SyntaxError("speculative parse failed"),jc=hn((O)=>{let{tokTypes:G,keywordTypes:H,isIdentifierChar:X,isIdentifierStart:le}=O.acorn,we=new O.acorn.TokenType("@");class ke extends O{inType=!1;$4=!1;$5=!1;$7=null;$k=null;$l=!1;$m=!1;$f=null;$9=[[]];$n=0;$t=0;$o=-1;constructor(ve,Ee,Ce){super(ve,Ee,Ce);let Ae=this.options.onComment;if(typeof Ae==="function")this.options.onComment=(Te,Ne,Pe,Oe,Le,qe)=>{if(Pe<this.$t)return;this.$t=Oe,Ae.call(this,Te,Ne,Pe,Oe,Le,qe)}}reset(){this.inType=!1,this.$4=!1,this.$5=!1,this.$7=null,this.$k=null,this.$l=!1,this.$m=!1,this.$f=null,this.$9=[[]],this.$n=0,this.$t=0,this.$o=-1}getTokenFromCode(ve){if(ve===64)return++this.pos,this.finishToken(we);return super.getTokenFromCode(ve)}readToken_lt_gt(ve){if(this.inType)return this.finishOp(G.relational,1);return super.readToken_lt_gt(ve)}$a(ve){let Ee=this.inType;this.inType=!0;let Ce=ve();if(this.inType=Ee,!Ee&&this.type===G.relational)this.pos=this.start,this.nextToken();return Ce}$1(){return this.type===G.relational&&this.value==="<"}$p(){if(this.type===G.bitShift&&this.value==="<<")this.pos=this.start+1,this.finishToken(G.relational,"<");return this.$1()}$c(){return this.type===G.relational&&this.value===">"}$u(){return this.type===G.prefix&&this.value==="!"}hasPrecedingLineBreak(){return fn(this.input,this.lastTokEnd,this.start)}$d(ve=this.pos){return jr.lastIndex=ve,jr.exec(this.input),jr.lastIndex}$2(){return this.input.charCodeAt(this.$d())}$3(){let ve=this.$d(),Ee=ve;while(Ee<this.input.length&&X(this.input.charCodeAt(Ee)))Ee++;return this.input.slice(ve,Ee)}$b(){return!fn(this.input,this.pos,this.$d())}$14(){return this.$b()&&le(this.$2())&&!Object.hasOwn(H,this.$3())}$15(){return{pos:this.pos,type:this.type,value:this.value,start:this.start,end:this.end,startLoc:this.startLoc,endLoc:this.endLoc,lastTokStart:this.lastTokStart,lastTokEnd:this.lastTokEnd,lastTokStartLoc:this.lastTokStartLoc,lastTokEndLoc:this.lastTokEndLoc,curLine:this.curLine,lineStart:this.lineStart,context:this.context.slice(),exprAllowed:this.exprAllowed,containsEsc:this.containsEsc,inType:this.inType,$4:this.$4,$5:this.$5,$7:this.$7,scopes:this.scopeStack.length,privateNames:this.privateNameStack.length,labels:this.labels,labelCount:this.labels.length,strict:this.strict,yieldPos:this.yieldPos,awaitPos:this.awaitPos,awaitIdentPos:this.awaitIdentPos,potentialArrowAt:this.potentialArrowAt,potentialArrowInForAwait:this.potentialArrowInForAwait}}$16(ve){this.pos=ve.pos,this.type=ve.type,this.value=ve.value,this.start=ve.start,this.end=ve.end,this.startLoc=ve.startLoc,this.endLoc=ve.endLoc,this.lastTokStart=ve.lastTokStart,this.lastTokEnd=ve.lastTokEnd,this.lastTokStartLoc=ve.lastTokStartLoc,this.lastTokEndLoc=ve.lastTokEndLoc,this.curLine=ve.curLine,this.lineStart=ve.lineStart,this.context=ve.context,this.exprAllowed=ve.exprAllowed,this.containsEsc=ve.containsEsc,this.inType=ve.inType,this.$4=ve.$4,this.$5=ve.$5,this.$7=ve.$7,this.scopeStack.length=ve.scopes,this.privateNameStack.length=ve.privateNames,this.labels=ve.labels,this.labels.length=ve.labelCount,this.strict=ve.strict,this.yieldPos=ve.yieldPos,this.awaitPos=ve.awaitPos,this.awaitIdentPos=ve.awaitIdentPos,this.potentialArrowAt=ve.potentialArrowAt,this.potentialArrowInForAwait=ve.potentialArrowInForAwait}raise(ve,Ee){if(this.$n>0)throw mm;return super.raise(ve,Ee)}$1y(ve,Ee){try{super.raise(ve,Ee)}catch(Ce){if(Ce instanceof SyntaxError)Ce.$1z=!0;throw Ce}throw Error("unreachable")}$g(ve,Ee=!1){let Ce=this.$15();this.$n++;try{let Ae=ve();if(Ee||Ae===void 0)this.$16(Ce);return Ae}catch(Ae){if(!(Ae instanceof SyntaxError)||!Ee&&Ae.$1z)throw Ae;this.$16(Ce);return}finally{this.$n--}}$v(ve){return this.$g(ve,!0)===!0}$17(ve){if(ve.end=this.lastTokEnd,this.options.locations)ve.loc.end=this.lastTokEndLoc}$q(ve,Ee){if(ve.start=Ee.start,this.options.locations)ve.loc.start=Ee.loc.start}$6(ve=!1){let Ee=this.startNode();return Ee.typeAnnotation=this.$a(()=>(this.next(),ve?this.$20():this.$0())),this.finishNode(Ee,"TSTypeAnnotation")}$h(ve,Ee){if(Ee&&this.eat(G.question))ve.optional=!0,this.$17(ve);if(this.type===G.colon)ve.typeAnnotation=this.$6(),this.$17(ve);return ve}$20(){if(this.type!==G.name&&this.type!==G._this)return this.$0();if(this.isContextual("asserts")&&this.$b()&&le(this.$2())){let ve=this.startNode();if(this.next(),ve.parameterName=this.type===G._this?this.$w():this.parseIdent(),this.isContextual("is")&&!this.hasPrecedingLineBreak())return this.$x(ve,!0);return ve.asserts=!0,ve.typeAnnotation=null,this.finishNode(ve,"TSTypePredicate")}if(this.$3()==="is"&&this.$b()){let ve=this.startNode();return ve.parameterName=this.type===G._this?this.$w():this.parseIdent(!0),this.$x(ve,!1)}return this.$0()}$x(ve,Ee){this.next();let Ce=this.startNode();return Ce.typeAnnotation=this.$0(),ve.typeAnnotation=this.finishNode(Ce,"TSTypeAnnotation"),ve.asserts=Ee,this.finishNode(ve,"TSTypePredicate")}$w(){let ve=this.startNode();return this.next(),this.finishNode(ve,"TSThisType")}parseWholeType(){this.inType=!0,this.nextToken();let ve=this.$0();if(this.type!==G.eof)this.unexpected();return ve}$0(){let ve=this.$18();if(this.$4||this.type!==G._extends||this.hasPrecedingLineBreak())return ve;let Ee=this.startNodeAt(ve.start,ve.loc?.start);return this.next(),Ee.checkType=ve,Ee.extendsType=this.$i(!0,()=>this.$18()),this.expect(G.question),Ee.trueType=this.$i(!1,()=>this.$0()),this.expect(G.colon),Ee.falseType=this.$i(!1,()=>this.$0()),this.finishNode(Ee,"TSConditionalType")}$i(ve,Ee){let Ce=this.$4;this.$4=ve;let Ae=Ee();return this.$4=Ce,Ae}$18(){if(this.$21())return this.$19("TSFunctionType");if(this.type===G._new||this.isContextual("abstract")&&this.$3()==="new")return this.$19("TSConstructorType");return this.$1a("TSUnionType",G.bitwiseOR,()=>this.$1a("TSIntersectionType",G.bitwiseAND,()=>this.$1b()))}$19(ve){let Ee=this.startNode();if(ve==="TSConstructorType"){if(Ee.abstract=this.isContextual("abstract"),Ee.abstract)this.next();this.next()}return this.$i(!1,()=>this.$r(Ee,G.arrow)),this.finishNode(Ee,ve)}$r(ve,Ee){if(this.$1())ve.typeParameters=this.$8();if(this.expect(G.parenL),ve.parameters=this.parseBindingList(G.parenR,!1,!0),this.type===Ee)ve.typeAnnotation=this.$6(!0);else if(Ee===G.arrow)this.unexpected()}$21(){if(this.$1())return!0;if(this.type!==G.parenL)return!1;return this.$v(()=>{if(this.next(),this.type===G.parenR||this.type===G.ellipsis)return!0;if(this.type===G.name||this.type===G._this)this.next();else if(this.type===G.braceL||this.type===G.bracketL)this.parseBindingAtom();else return!1;let ve=this.type;if(ve===G.colon||ve===G.comma||ve===G.question||ve===G.eq)return!0;if(ve!==G.parenR)return!1;return this.next(),this.type===G.arrow})}$1a(ve,Ee,Ce){let Ae=this.startNode(),Te=this.eat(Ee),Ne=[];do Ne.push(Ce());while(this.eat(Ee));if(Ne.length===1&&!Te)return Ne[0];return Ae.types=Ne,this.finishNode(Ae,ve)}$1b(){if(this.type===G.name&&!this.containsEsc){let ve=this.value;if(ve==="keyof"||ve==="unique"||ve==="readonly"){let Ee=this.startNode();return this.next(),Ee.operator=ve,Ee.typeAnnotation=this.$1b(),this.finishNode(Ee,"TSTypeOperator")}if(ve==="infer"){let Ee=this.startNode();this.next();let Ce=this.startNode();Ce.name=this.$y();let Ae=this.$g(()=>this.$22());if(Ae)Ce.constraint=Ae;return Ee.typeParameter=this.finishNode(Ce,"TSTypeParameter"),this.finishNode(Ee,"TSInferType")}}return this.$i(!1,()=>this.$23())}$22(){if(!this.eat(G._extends))return;let ve=this.$i(!0,()=>this.$0());return this.$4||this.type!==G.question?ve:void 0}$y(){if(this.type!==G.name&&!this.type.keyword)this.unexpected();let ve=this.type===G.name?this.value:this.type.keyword;return this.next(),ve}$23(){let ve=this.$24();while(!this.hasPrecedingLineBreak()&&this.eat(G.bracketL)){let Ee=this.startNodeAt(ve.start,ve.loc?.start);if(this.eat(G.bracketR))Ee.elementType=ve,ve=this.finishNode(Ee,"TSArrayType");else Ee.objectType=ve,Ee.indexType=this.$0(),this.expect(G.bracketR),ve=this.finishNode(Ee,"TSIndexedAccessType")}return ve}$24(){switch(this.type){case G.name:case G._void:case G._null:{let ve=Qd.get(this.value);if(ve&&(this.type!==G.name||!this.containsEsc&&this.$2()!==Dc)){let Ee=this.startNode();return this.next(),this.finishNode(Ee,ve)}return this.$1c()}case G.string:case G.num:case G._true:case G._false:{let ve=this.startNode();return ve.literal=this.parseExprAtom(),this.finishNode(ve,"TSLiteralType")}case G.plusMin:{if(this.value!=="-")break;let ve=this.startNode(),Ee=this.startNode();if(this.next(),this.type!==G.num)this.unexpected();return Ee.operator="-",Ee.prefix=!0,Ee.argument=this.parseExprAtom(),ve.literal=this.finishNode(Ee,"UnaryExpression"),this.finishNode(ve,"TSLiteralType")}case G.backQuote:return this.$25();case G._this:{let ve=this.$w();if(this.isContextual("is")&&!this.hasPrecedingLineBreak()){let Ee=this.startNodeAt(ve.start,ve.loc?.start);return Ee.parameterName=ve,this.$x(Ee,!1)}return ve}case G._typeof:return this.$26();case G._import:return this.$1d();case G.braceL:return this.$27()?this.$28():this.$29();case G.bracketL:return this.$2a();case G.parenL:{let ve=this.startNode();return this.next(),ve.typeAnnotation=this.$0(),this.expect(G.parenR),this.finishNode(ve,"TSParenthesizedType")}default:if(this.type.keyword)return this.$1c()}return this.unexpected()}$1c(){let ve=this.startNode();if(ve.typeName=this.$j(),!this.hasPrecedingLineBreak()&&this.$1())ve.typeArguments=this.$e();return this.finishNode(ve,"TSTypeReference")}$j(){let ve=this.parseIdent(!0);while(this.eat(G.dot)){let Ee=this.startNodeAt(ve.start,ve.loc?.start);Ee.left=ve,Ee.right=this.parseIdent(!0),ve=this.finishNode(Ee,"TSQualifiedName")}return ve}$26(){let ve=this.startNode();if(this.next(),ve.exprName=this.type===G._import?this.$1d():this.$j(),!this.hasPrecedingLineBreak()&&this.$1())ve.typeArguments=this.$e();return this.finishNode(ve,"TSTypeQuery")}$1d(){let ve=this.startNode();if(this.next(),ve.argument=this.$1e(),this.eat(G.dot))ve.qualifier=this.$j();if(this.$1())ve.typeArguments=this.$e();return this.finishNode(ve,"TSImportType")}$z(){if(this.type!==G.string)this.unexpected();return this.parseExprAtom()}$1e(){this.expect(G.parenL);let ve=this.$z();return this.expect(G.parenR),ve}$25(){let ve=this.startNode(),Ee=this.startNode();this.next(),Ee.expressions=[];let Ce=this.parseTemplateElement({isTagged:!1});Ee.quasis=[Ce];while(!Ce.tail){if(this.type===G.eof)this.raise(this.pos,"Unterminated template literal");this.expect(G.dollarBraceL),Ee.expressions.push(this.$0()),this.expect(G.braceR),Ce=this.parseTemplateElement({isTagged:!1}),Ee.quasis.push(Ce)}return this.next(),ve.literal=this.finishNode(Ee,"TemplateLiteral"),this.finishNode(ve,"TSLiteralType")}$27(){return this.$v(()=>{if(this.next(),this.type===G.plusMin)return this.next(),this.isContextual("readonly");if(this.isContextual("readonly"))this.next();if(this.type!==G.bracketL)return!1;if(this.next(),this.type!==G.name)return!1;return this.next(),this.type===G._in})}$28(){let ve=this.startNode();if(this.expect(G.braceL),this.type===G.plusMin)ve.readonly=this.value,this.next(),this.expectContextual("readonly");else if(this.eatContextual("readonly"))ve.readonly=!0;this.expect(G.bracketL);let Ee=this.startNode();if(Ee.name=this.$y(),this.expect(G._in),Ee.constraint=this.$0(),ve.typeParameter=this.finishNode(Ee,"TSTypeParameter"),ve.nameType=this.eatContextual("as")?this.$0():null,this.expect(G.bracketR),this.type===G.plusMin)ve.optional=this.value,this.next(),this.expect(G.question);else if(this.eat(G.question))ve.optional=!0;if(this.eat(G.colon))ve.typeAnnotation=this.$0();return this.semicolon(),this.expect(G.braceR),this.finishNode(ve,"TSMappedType")}$29(){let ve=this.startNode();return ve.members=this.$1f(),this.finishNode(ve,"TSTypeLiteral")}$1f(){this.expect(G.braceL);let ve=[];while(!this.eat(G.braceR))ve.push(this.$2b());return ve}$2b(){let ve=this.startNode(),Ee="TSPropertySignature",Ce=this.type===G._new?this.$2():-1;if(this.type===G.parenL||this.$1())Ee="TSCallSignatureDeclaration",this.$r(ve,G.colon);else if(Ce===Vc||Ce===Fc)Ee="TSConstructSignatureDeclaration",this.next(),this.$r(ve,G.colon);else{let Ae=this.type===G._new?this.parseIdent(!0):null;if(this.isContextual("readonly")&&this.$s(!0))this.next(),ve.readonly=!0;if(this.type===G.bracketL&&this.$1g())return this.$1h(ve);let Te="method";if(Ae)ve.key=Ae;else{if((this.isContextual("get")||this.isContextual("set"))&&this.$s(!1))Te=this.value,this.next();this.parsePropertyName(ve)}if(this.eat(G.question))ve.optional=!0;if(this.type===G.parenL||this.$1()){if(Ee="TSMethodSignature",Te!=="method")ve.kind=Te;this.$r(ve,G.colon),ve.kind=Te}else if(this.type===G.colon)ve.typeAnnotation=this.$6()}return this.$1i(),this.finishNode(ve,Ee)}$1i(){if(!this.eat(G.comma))this.semicolon()}$1g(){return this.$v(()=>{if(this.next(),this.type!==G.name)return!1;return this.next(),this.type===G.colon})}$1h(ve){if(this.expect(G.bracketL),ve.parameters=[this.$h(this.parseIdent(),!1)],this.expect(G.bracketR),this.type===G.colon)ve.typeAnnotation=this.$6();return this.$1i(),this.finishNode(ve,"TSIndexSignature")}$2a(){let ve=this.startNode();this.expect(G.bracketL),ve.elementTypes=[];while(!this.eat(G.bracketR))if(ve.elementTypes.push(this.$2c()),this.type!==G.bracketR)this.expect(G.comma);return this.finishNode(ve,"TSTupleType")}$2c(){let ve=this.start,Ee=this.startLoc,Ce=this.eat(G.ellipsis),Ae;if((this.type===G.name||this.type.keyword)&&this.$2d()){let Te=this.startNode();Te.label=this.parseIdent(!0),Te.optional=this.eat(G.question),this.expect(G.colon),Te.elementType=this.$0(),Ae=this.finishNode(Te,"TSNamedTupleMember")}else if(Ae=this.$0(),this.eat(G.question)){let Te=this.startNodeAt(Ae.start,Ae.loc?.start);Te.typeAnnotation=Ae,Ae=this.finishNode(Te,"TSOptionalType")}if(Ce){let Te=this.startNodeAt(ve,Ee);Te.typeAnnotation=Ae,Ae=this.finishNode(Te,"TSRestType")}return Ae}$2d(){let ve=this.$d();if(this.input.charCodeAt(ve)===63)ve=this.$d(ve+1);return this.input.charCodeAt(ve)===Bc}$8(){return this.$a(()=>{let ve=this.startNode();this.next(),ve.params=[];while(!this.$c()){let Ee=this.startNode();while((this.type===G._const||this.type===G._in||this.isContextual("out"))&&le(this.$2()))Ee[this.value]=!0,this.next();if(Ee.name=this.$y(),this.eat(G._extends))Ee.constraint=this.$0();if(this.eat(G.eq))Ee.default=this.$0();if(ve.params.push(this.finishNode(Ee,"TSTypeParameter")),!this.$c()){if(this.expect(G.comma),this.$c())ve.extra={trailingComma:this.lastTokStart}}}if(this.next(),ve.params.length===0)this.$1y(this.start,"Type parameter list cannot be empty.");return this.finishNode(ve,"TSTypeParameterDeclaration")})}$e(){return this.$a(()=>{let ve=this.startNode();this.next(),ve.params=[];while(!this.$c())if(ve.params.push(this.$0()),!this.$c())this.expect(G.comma);if(ve.params.length===0)this.unexpected();return this.next(),this.finishNode(ve,"TSTypeParameterInstantiation")})}$1j(){let ve=[];do{let Ee=this.startNode();if(Ee.expression=this.$j(),this.$1())Ee.typeParameters=this.$e();ve.push(this.finishNode(Ee,"TSExpressionWithTypeArguments"))}while(this.eat(G.comma));return ve}$1k(ve=!1){if(this.type!==G.name||this.containsEsc){if(this.type===G._const&&this.$3()==="enum")return this.$10(this.startNode());return}if(!this.$2e(this.value))return;if(this.value==="declare")return this.$2f(ve);return this.$1l(this.startNode(),this.value)}$2e(ve){switch(ve){case"interface":case"type":case"namespace":return this.$14();case"enum":return le(this.$2());case"abstract":return this.$b()&&this.$3()==="class";case"module":{let Ee=this.$2();return this.$b()&&(Ee===zr||Ee===Kr||le(Ee))}case"declare":return this.$b()&&em.has(this.$3());case"global":return this.$b()&&this.$2()===ys}return!1}$1l(ve,Ee){switch(Ee){case"interface":return this.$1m(ve);case"type":return this.$2g(ve);case"enum":return this.$10(ve);case"abstract":return this.$1n(ve,!0);case"global":return ve.global=!0,ve.id=this.parseIdent(),ve.body=this.$11(),this.finishNode(ve,"TSModuleDeclaration")}return this.$2h(ve)}$2f(ve){let Ee=this.$5;this.$5=!0;let Ce=this.startNode();this.next();let Ae=this.value;if(Ae==="const"&&this.$3()==="enum")Ce.const=!0;if(!ve&&tm.has(Ae))Ce.declare=!0;let Te;if(Ce.const)Te=this.$10(Ce);else if(Ae==="var"||Ae==="let"||Ae==="const")Te=this.parseVarStatement(Ce,Ae,!0);else if(Ae==="function")this.next(),Te=this.parseFunction(Ce,Oc,!1,!1);else if(Ae==="class")Te=this.parseClass(Ce,!0);else Te=this.$1l(Ce,Ae);return Te.declare=!0,this.$5=Ee,Te}$1n(ve,Ee){return this.next(),ve.abstract=!0,this.parseClass(ve,Ee)}$1m(ve){if(this.next(),ve.id=this.parseIdent(),this.checkLValSimple(ve.id,Lc),this.$1())ve.typeParameters=this.$8();return this.$a(()=>{if(this.eat(G._extends))ve.extends=this.$1j();let Ee=this.startNode();Ee.body=this.$1f(),ve.body=this.finishNode(Ee,"TSInterfaceBody")}),this.finishNode(ve,"TSInterfaceDeclaration")}$2g(ve){if(this.next(),ve.id=this.parseIdent(),this.checkLValSimple(ve.id,Wr),this.$1())ve.typeParameters=this.$8();return ve.typeAnnotation=this.$a(()=>(this.expect(G.eq),this.$0())),this.semicolon(),this.finishNode(ve,"TSTypeAliasDeclaration")}$10(ve){if(this.type===G._const)ve.const=!0,this.next();this.next(),ve.id=this.parseIdent(),this.checkLValSimple(ve.id,cm),this.expect(G.braceL),ve.members=[];while(!this.eat(G.braceR)){let Ee=this.startNode();if(Ee.id=this.type===G.string?this.parseExprAtom():this.parseIdent(!0),this.eat(G.eq))Ee.initializer=this.parseMaybeAssign();if(ve.members.push(this.finishNode(Ee,"TSEnumMember")),this.type!==G.braceR)this.expect(G.comma)}return this.finishNode(ve,"TSEnumDeclaration")}$2h(ve){if(this.next(),this.type===G.string){if(ve.id=this.parseExprAtom(),this.type===G.braceL)ve.body=this.$11();else this.semicolon();return this.finishNode(ve,"TSModuleDeclaration")}return ve.id=this.parseIdent(),this.checkLValSimple(ve.id,lm),this.$1o(ve)}$1o(ve){if(this.eat(G.dot)){let Ee=this.startNode();Ee.id=this.parseIdent(),ve.body=this.$1o(Ee)}else ve.body=this.$11();return this.finishNode(ve,"TSModuleDeclaration")}$11(){this.enterScope(nm);let ve=this.startNode();this.enterScope(0),this.expect(G.braceL),ve.body=[];while(!this.eat(G.braceR))ve.body.push(this.parseStatement(null,!0));return this.exitScope(),this.exitScope(),this.finishNode(ve,"TSModuleBlock")}$1p(ve,Ee){if(ve.isExport=Ee,ve.id=this.parseIdent(),this.checkLValSimple(ve.id,yn),this.expect(G.eq),this.isContextual("require")&&this.$2()===Vc){let Ce=this.startNode();this.next(),Ce.expression=this.$1e(),ve.moduleReference=this.finishNode(Ce,"TSExternalModuleReference")}else ve.moduleReference=this.$j();return this.semicolon(),this.finishNode(ve,"TSImportEqualsDeclaration")}$2i(){let ve=this.$d();if(this.input.charCodeAt(ve)!==ms)return!1;let Ee=this.input.charCodeAt(ve+1);return Ee!==ms&&Ee!==62}parseStatement(ve,Ee,Ce){if(this.type===we)this.$1q(!0);let Ae=this.$1k();if(Ae)return Ae;return super.parseStatement(ve,Ee,Ce)}parseVarStatement(ve,Ee,Ce){return super.parseVarStatement(ve,Ee,Ce||this.$5)}parseVarId(ve,Ee){if(super.parseVarId(ve,Ee),ve.id.type==="Identifier"&&this.$u()&&!this.hasPrecedingLineBreak())this.next(),ve.definite=!0;this.$h(ve.id,!1)}parseCatchClauseParam(){let ve=this.$h(this.parseBindingAtom(),!1),Ee=ve.type==="Identifier";return this.enterScope(Ee?im:0),this.checkLValPattern(ve,Ee?am:yn),this.expect(G.parenR),ve}parseImport(ve){if(this.next(),ve.importKind="value",this.type===G.string)ve.specifiers=[],ve.source=this.parseExprAtom();else{if(this.isContextual("type")){let Ee=this.$2();if(Ee===ys||Ee===qr||le(Ee)&&this.$3()!=="from")ve.importKind="type",this.next()}if(this.type===G.name&&this.$2i())return this.$1p(ve,!1);ve.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),ve.source=this.$z()}return this.$1r(ve),this.semicolon(),this.finishNode(ve,"ImportDeclaration")}parseWithClause(){if(this.isContextual("assert")&&!this.hasPrecedingLineBreak())this.type=G._with;return this.type===G._with?super.parseWithClause():void 0}$1r(ve){let Ee=this.parseWithClause();if(Ee)ve.attributes=Ee}parseImportSpecifier(){return this.$1s("importKind",()=>super.parseImportSpecifier())}parseExportSpecifier(ve){return this.$1s("exportKind",()=>super.parseExportSpecifier(ve))}$1s(ve,Ee){let Ce=this.isContextual("type")?this.$2():-1;if(Ce===zr||Ce===Kr||le(Ce)&&this.$3()!=="as"){let Te=this.startNode();this.next();let Ne=Ee();return this.$q(Ne,Te),Ne[ve]="type",Ne}let Ae=Ee();return Ae[ve]="value",Ae}parseExport(ve,Ee){if(this.next(),this.eat(G._import)){if(ve.importKind="value",this.isContextual("type")&&le(this.$2())&&this.$3()!=="from")ve.importKind="type",this.next();return this.$1p(ve,!0)}if(this.eat(G.eq))return ve.expression=this.parseExpression(),this.semicolon(),this.finishNode(ve,"TSExportAssignment");if(this.eatContextual("as"))return this.expectContextual("namespace"),ve.id=this.parseIdent(),this.semicolon(),this.finishNode(ve,"TSNamespaceExportDeclaration");if(ve.exportKind="value",this.isContextual("type")){let Te=this.$2();if(Te===ys||Te===qr)ve.exportKind="type",this.next()}if(this.eat(G.star))return this.parseExportAllDeclaration(ve,Ee);if(this.eat(G._default)){if(this.isContextual("interface")&&this.$14())ve.declaration=this.$1m(this.startNode());else if(this.isContextual("abstract")&&this.$3()==="class")ve.declaration=this.$1n(this.startNode(),"nullableID");else ve.declaration=this.parseExportDefaultDeclaration();return this.finishNode(ve,"ExportDefaultDeclaration")}let Ce=this.isContextual("declare"),Ae=this.$1k(!0);if(Ae||this.shouldParseExportStatement()){if(ve.declaration=Ae??this.parseStatement(null),Ce||ve.declaration.type==="TSInterfaceDeclaration"||ve.declaration.type==="TSTypeAliasDeclaration")ve.exportKind="type";return ve.specifiers=[],ve.source=null,this.finishNode(ve,"ExportNamedDeclaration")}if(ve.declaration=null,ve.specifiers=this.parseExportSpecifiers(Ee),this.eatContextual("from"))ve.source=this.$z(),this.$1r(ve);else{for(let Te of ve.specifiers)if(this.checkUnreserved(Te.local),this.checkLocalExport(Te.local),Te.local.type==="Literal")this.raise(Te.local.start,"A string literal cannot be used as an exported binding without `from`.");ve.source=null}return this.semicolon(),this.finishNode(ve,"ExportNamedDeclaration")}parseFunction(ve,Ee,Ce,Ae,Te){let Ne=Ee&Oc;if(Ne)this.$f=ve,this.$o=ve.start;super.parseFunction(ve,Ee,Ce,Ae,Te),this.$f=null;let Pe=!ve.body;if(Pe)ve.type="TSDeclareFunction";if(Ne&&ve.id){if(Pe){if(this.$5&&this.currentScope().flags&Rc)this.declareName(ve.id.name,Gr,ve.id.start);this.checkLValSimple(ve.id,sm)}else if(!(Ee&pm)){let Oe=om;if(this.strict||ve.generator||ve.async)Oe=this.treatFunctionsAsVar?rm:yn;this.checkLValSimple(ve.id,Oe)}}return ve}parseFunctionParams(ve){if(this.$1())ve.typeParameters=this.$8();if(super.parseFunctionParams(ve),this.type===G.colon)ve.returnType=this.$6(!0)}parseFunctionBody(ve,Ee,Ce,Ae){if(Ce&&this.type===G.colon)ve.returnType=this.$6(!0);if(Ee||this.type===G.braceL||ve.start!==this.$o){super.parseFunctionBody(ve,Ee,Ce,Ae);return}this.semicolon(),this.exitScope()}parseMethod(ve,Ee,Ce){let Ae=this.$k;this.$k=null;let Te=super.parseMethod(ve,Ee,Ce);if(!Te.body)Te.type="TSDeclareMethod";if(Ae)Te.typeParameters=Ae;return Te}parseBindingList(ve,Ee,Ce,Ae){let Te=Ae===!0||this.$l;return this.$l=!1,super.parseBindingList(ve,Ee,Ce,Te)}$s(ve){if(!ve&&!this.$b())return!1;let Ee=this.$2();return Ee===fm||Ee===ys||Ee===qr||Ee===Dc||Ee===dm||Ee===zr||Ee===Kr||Ee>=48&&Ee<=57||le(Ee)}parseAssignableListItem(ve){let Ee=this.$12(),Ce=this.start,Ae=this.startLoc,Te,Ne=!1,Pe=!1;if(ve)while(this.type===G.name&&Zd.has(this.value)&&!this.containsEsc&&this.$s(!1)){if(this.value==="readonly")Ne=!0;else if(this.value==="override")Pe=!0;else Te=this.value;this.next()}let Oe;if(this.type===G._this)Oe=this.startNode(),Oe.name="this",this.next(),this.finishNode(Oe,"Identifier");else Oe=this.parseBindingAtom();let Le=this.type===G.eq?this.parseMaybeDefault(Ce,Ae,Oe):this.parseMaybeDefault(Oe.start,Oe.loc?.start,this.$h(Oe,!0));if(Ee.length>0)Le.decorators=Ee;if(!Te&&!Ne&&!Pe)return Le;let qe=this.startNodeAt(Ce,Ae);if(Te)qe.accessibility=Te;if(Ne)qe.readonly=!0;if(Pe)qe.override=!0;return qe.parameter=Le,this.finishNode(qe,"TSParameterProperty")}parseBindingListItem(ve){if(ve.type==="RestElement")this.$h(ve,!0);return ve}checkLValSimple(ve,Ee,Ce){if(this.$f&&ve===this.$f.id){this.$f=null;return}if(!Ee&&Pc.has(ve.type)){this.checkLValSimple(ve.expression,Ee,Ce);return}switch(ve.type){case"TSParameterProperty":this.checkLValInnerPattern(ve.parameter,Ee,Ce);return;case"Identifier":if(ve.name==="this")return}super.checkLValSimple(ve,Ee,Ce)}toAssignable(ve,Ee,Ce){if(ve&&!Ee&&Pc.has(ve.type))return ve;return super.toAssignable(ve,Ee,Ce)}declareName(ve,Ee,Ce){let Ae=this.currentScope();if(Ee&Gr){this.$1t(Ae,ve),Ae.$1u??=[],Ae.$1u.push(ve);return}if(Ee===Wr||Ee===Lc){if(Ae.$13??=[],Ee===Wr&&It(Ae.$13,ve))this.raise(Ce,`type '${ve}' has already been declared.`);Ae.$13.push(ve),this.$1t(Ae,ve);return}if(Ee&Uc){if(Ae.$1v??=[],It(Ae.$1v,ve))return;super.declareName(ve,yn,Ce),Ae.$1v.push(ve);return}super.declareName(ve,Ee,Ce)}$1t(ve,Ee){if(this.inModule&&ve.flags&Rc)delete this.undefinedExports[Ee]}checkLocalExport(ve){for(let Ee=this.scopeStack.length-1;Ee>=0;Ee--){let Ce=this.scopeStack[Ee];if(It(Ce.$13,ve.name)||It(Ce.$1u,ve.name))return}super.checkLocalExport(ve)}checkExport(){}raiseRecoverable(ve,Ee){if(Ee==="Duplicate constructor in the same class")return;super.raiseRecoverable(ve,Ee)}$12(){let ve=[];while(this.type===we)ve.push(this.$1w());return ve}$1q(ve){let Ee=this.$9[this.$9.length-1];while(this.type===we)Ee.push(this.$1w());if(this.type===G._export){if(!ve)this.unexpected()}else if(this.type!==G._class&&!((this.isContextual("abstract")||this.isContextual("declare"))&&this.$3()==="class"))this.raise(this.start,"Leading decorators must be attached to a class declaration.")}$1w(){let ve=this.startNode();this.next(),this.$9.push([]);let Ee=this.start,Ce=this.startLoc,Ae;if(this.type===G.parenL){if(this.next(),Ae=this.parseExpression(),this.expect(G.parenR),this.options.preserveParens){let Ne=this.startNodeAt(Ee,Ce);Ne.expression=Ae,Ae=this.finishNode(Ne,"ParenthesizedExpression")}}else{Ae=this.parseIdent(!1);while(this.eat(G.dot)){let Ne=this.startNodeAt(Ee,Ce);Ne.object=Ae,Ne.property=this.parseIdent(!0),Ne.computed=!1,Ae=this.finishNode(Ne,"MemberExpression")}}let Te=this.$p()?this.$e():void 0;if(this.eat(G.parenL)){let Ne=this.startNodeAt(Ae.start,Ae.loc?.start);if(Ne.callee=Ae,Ne.arguments=this.parseExprList(G.parenR,!1,!1),Te)Ne.typeArguments=Te;Ae=this.finishNode(Ne,"CallExpression")}else if(Te){let Ne=this.startNodeAt(Ae.start,Ae.loc?.start);Ne.expression=Ae,Ne.typeArguments=Te,Ae=this.finishNode(Ne,"TSInstantiationExpression")}return ve.expression=Ae,this.$9.pop(),this.finishNode(ve,"Decorator")}shouldParseExportStatement(){return this.type===we||super.shouldParseExportStatement()}parseExprAtom(ve,Ee,Ce){if(this.type===we)this.$1q(!1);return super.parseExprAtom(ve,Ee,Ce)}parseProperty(ve,Ee){if(ve||this.type!==we)return super.parseProperty(ve,Ee);let Ce=this.$12(),Ae=super.parseProperty(ve,Ee);if(Ae.type==="SpreadElement")this.raise(Ae.start,"Decorators can't be used with SpreadElement");return Ae.decorators=Ce,Ae}parseClassId(ve,Ee){let Ce=this.$9.length-1,Ae=this.$9[Ce];if(Ae.length>0)ve.decorators=Ae,this.$q(ve,Ae[0]),this.$9[Ce]=[];if(!this.isContextual("implements")||Ee===!0)super.parseClassId(ve,Ee);if(this.$1())ve.typeParameters=this.$8()}parseClassSuper(ve){if(super.parseClassSuper(ve),ve.superClass&&this.$1())ve.superTypeParameters=this.$e();if(this.eatContextual("implements"))ve.implements=this.$a(()=>this.$1j())}parseClassElement(ve){if(this.type===we){let Pe=this.$12();if(this.type===G.braceR)this.raise(this.start,"Decorators must be attached to a class element.");let Oe=this.parseClassElement(ve);return Oe.decorators=Pe,this.$q(Oe,Pe[0]),Oe}if(this.eat(G.semi))return null;let Ee=this.startNode();while(this.type===G.name&&Jd.has(this.value)&&!this.containsEsc&&this.$s(this.value==="static")){let Pe=this.value;if(this.next(),Pe==="static"&&this.type===G.braceL)return this.next(),this.parseClassStaticBlock(Ee),Ee;if(Pe==="public"||Pe==="private"||Pe==="protected")Ee.accessibility=Pe;else Ee[Pe]=!0}if(this.type===G.bracketL&&this.$1g())return this.$1h(Ee);Ee.static??=!1;let Ce="",Ae=!1,Te=!1,Ne="method";if(this.eatContextual("async"))if((this.isClassElementNameStart()||this.type===G.star)&&!this.canInsertSemicolon())Te=!0;else Ce="async";if(!Ce&&this.eat(G.star))Ae=!0;if(!Ce&&!Te&&!Ae){let Pe=this.value;if(this.eatContextual("get")||this.eatContextual("set"))if(this.isClassElementNameStart())Ne=Pe;else Ce=Pe}if(Ce)Ee.computed=!1,Ee.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),Ee.key.name=Ce,this.finishNode(Ee.key,"Identifier");else this.parseClassElementName(Ee);if(this.eat(G.question))Ee.optional=!0;if(this.type===G.parenL||this.$1()||Ne!=="method"||Ae||Te){let Pe=Ee.key,Oe=!Ee.static&&!Ee.computed&&(Pe.type==="Identifier"&&Pe.name==="constructor"||Pe.type==="Literal"&&Pe.value==="constructor");if(Ee.kind=Oe?"constructor":Ne,this.$1())Ee.typeParameters=this.$8();this.$l=Oe,this.$o=this.start,this.parseClassMethod(Ee,Ae,Te,Oe&&ve)}else{if(!Ee.optional&&this.$u())this.next(),Ee.definite=!0;if(this.type===G.colon)Ee.typeAnnotation=this.$6();this.parseClassField(Ee)}return Ee}parseMaybeAssign(ve,Ee,Ce){if(this.$p()){let Ae=this.$g(()=>{let Te=this.$8(),Ne=super.parseMaybeAssign(ve,Ee,Ce);if(Ne.type!=="ArrowFunctionExpression")return;return Ne.typeParameters=Te,this.$q(Ne,Te),Ne});if(Ae)return Ae}return super.parseMaybeAssign(ve,Ee,Ce)}parseMaybeUnary(ve,Ee,Ce,Ae){if(this.$p()){let Te=this.startNode();return Te.typeAnnotation=this.$a(()=>{this.next();let Ne=this.$0();if(!this.$c())this.unexpected();return this.next(),Ne}),Te.expression=this.parseMaybeUnary(null,!1,!1,Ae),this.finishNode(Te,"TSTypeAssertion")}return super.parseMaybeUnary(ve,Ee,Ce,Ae)}parseMaybeConditional(ve,Ee){let Ce=this.start,Ae=this.startLoc,Te=this.parseExprOps(ve,Ee);if(this.checkExpressionErrors(Ee))return Te;if(this.type===G.question&&!(Te.type==="ArrowFunctionExpression"&&Te.start===Ce)&&!this.$2j()){this.next();let Ne=this.startNodeAt(Ce,Ae);return Ne.test=Te,Ne.consequent=this.parseMaybeAssign(),this.expect(G.colon),Ne.alternate=this.parseMaybeAssign(ve),this.finishNode(Ne,"ConditionalExpression")}return Te}$2j(){let ve=this.$d(),Ee=this.input.charCodeAt(ve);if(Ee===Bc||Ee===hm||Ee===um)return!0;return Ee===ms&&this.input.charCodeAt(ve+1)!==ms}parseParenItem(ve){return this.$h(ve,!0)}$1x(){if(this.type!==G.colon)return!0;let ve=this.$g(()=>{let Ee=this.$6(!0);return this.type===G.arrow&&!this.canInsertSemicolon()?Ee:void 0});if(!ve)return!1;return this.$7=ve,!0}shouldParseArrow(ve){return this.$1x()&&super.shouldParseArrow(ve)}shouldParseAsyncArrow(){return this.$1x()&&super.shouldParseAsyncArrow()}parseArrowExpression(ve,Ee,Ce,Ae){if(this.$7)ve.returnType=this.$7,this.$7=null;return super.parseArrowExpression(ve,Ee,Ce,Ae)}parseExprList(ve,Ee,Ce,Ae){if(!this.$m)return super.parseExprList(ve,Ee,Ce,Ae);this.$m=!1;let Te=[],Ne=!0;while(!this.eat(ve)){if(Ne)Ne=!1;else if(this.expect(G.comma),Ee&&this.afterTrailingComma(ve))break;if(this.type===G.ellipsis){let Pe=this.parseSpread(Ae);if(this.eat(G.question))Pe.optional=!0;if(this.type===G.colon)Pe.typeAnnotation=this.$6();Te.push(Pe)}else Te.push(this.parseMaybeAssign(!1,Ae,this.parseParenItem))}return Te}parseSubscript(ve,Ee,Ce,Ae,Te,Ne,Pe){if(this.$u()&&!this.hasPrecedingLineBreak()){let Le=this.startNodeAt(Ee,Ce);return this.exprAllowed=!1,this.next(),Le.expression=ve,this.finishNode(Le,"TSNonNullExpression")}if(Te&&this.$1()){let Le=this.$g(()=>this.$2k(Ee,Ce,Pe));if(Le)return Le}let Oe=this.type===G.questionDot&&this.$2()===Fc;if(this.$1()||Oe||this.type===G.bitShift&&this.value==="<<"){let Le=this.$g(()=>{if(Oe)this.next();this.$p();let qe=this.$e();if(this.type===G.parenL&&!Ae)return qe;if(this.type===G.backQuote)return Oe?void 0:qe;if(Oe)return;if(this.$c()||this.type===G.bitShift||this.type.startsExpr&&this.type!==G.parenL&&!this.hasPrecedingLineBreak())return;return qe});if(Le){let qe=this.startNodeAt(Ee,Ce);if(this.type===G.parenL&&!Ae){if(this.next(),qe.callee=ve,qe.arguments=this.parseExprList(G.parenR,!0,!1),qe.typeArguments=Le,Oe)ve.optional=!0;if(Oe||Ne)qe.optional=Oe;return this.finishNode(qe,"CallExpression")}if(this.type===G.backQuote)return qe.tag=ve,qe.quasi=this.parseTemplate({isTagged:!0}),qe.typeArguments=Le,this.finishNode(qe,"TaggedTemplateExpression");return qe.expression=ve,qe.typeArguments=Le,this.finishNode(qe,"TSInstantiationExpression")}}if(Te&&this.type===G.parenL)this.$m=!0;return super.parseSubscript(ve,Ee,Ce,Ae,Te,Ne,Pe)}$2k(ve,Ee,Ce){let Ae=this.startNodeAt(ve,Ee);if(Ae.typeParameters=this.$8(),this.expect(G.parenL),Ae.params=this.parseBindingList(G.parenR,!1,!0),this.type===G.colon)Ae.returnType=this.$6(!0);if(this.type!==G.arrow||this.canInsertSemicolon())return;return this.next(),this.parseArrowExpression(Ae,Ae.params,!0,Ce)}parseDynamicImport(ve){if(this.next(),ve.source=this.parseMaybeAssign(),this.eat(G.comma)&&this.type!==G.parenR)ve.arguments=[this.parseExpression()];return this.expect(G.parenR),this.finishNode(ve,"ImportExpression")}parseNew(){let ve=super.parseNew();if(ve.callee?.type!=="TSInstantiationExpression")return ve;let Ee=this.startNodeAt(ve.start,ve.loc?.start);return Ee.callee=ve.callee.expression,Ee.typeArguments=ve.callee.typeArguments,Ee.arguments=ve.arguments,this.finishNodeAt(Ee,"NewExpression",ve.end,ve.loc?.end)}parseExprOp(ve,Ee,Ce,Ae,Te){if(G._in.binop>Ae&&this.type===G.name&&(this.value==="as"||this.value==="satisfies")&&!this.containsEsc&&!this.hasPrecedingLineBreak()){let Ne=this.value==="satisfies",Pe=this.startNodeAt(Ee,Ce);return Pe.expression=ve,Pe.typeAnnotation=this.$a(()=>{if(this.next(),!Ne&&this.type===G._const){let Oe=this.startNode();return Oe.typeName=this.parseIdent(!0),this.finishNode(Oe,"TSTypeReference")}return this.$0()}),this.finishNode(Pe,Ne?"TSSatisfiesExpression":"TSAsExpression"),this.parseExprOp(Pe,Ee,Ce,Ae,Te)}return super.parseExprOp(ve,Ee,Ce,Ae,Te)}parseGetterSetter(ve){ve.kind=ve.key.name,super.parseGetterSetter(ve)}parsePropertyValue(ve,Ee,Ce,Ae,Te,Ne,Pe,Oe){if(!Ee&&this.$1()){if(this.$k=this.$8(),this.type!==G.parenL)this.unexpected();ve.kind="init"}return super.parsePropertyValue(ve,Ee,Ce,Ae,Te,Ne,Pe,Oe)}}return ke});var Wc=Qn(Er,jc,Cr);var qc=qa(Wc);var{parse:N,parseModule:gs}=Mc({typescript:qc});function Zt(O,G){if(!O)return;let H=(X)=>{G(X),x(X,H)};H(O)}import{readFileSync as ym}from"node:fs";import zc from"node:path";var Wt={kind:"value"},Nt={kind:"unknown"};function Ri(O,G){let H=O;for(let X of G){if(H.kind!=="members")return H.kind==="value"?Wt:Nt;H=H.member(X)}if(H.kind==="members")return H.self?{kind:"component",key:H.self}:Wt;return H}function F(O){let G=new Map,H=new Map,X=new Map;function le(Ne){if(G.has(Ne))return G.get(Ne)??null;let Pe;try{let Oe=ym(zc.join(O,Ne),"utf8");if(Ne.endsWith(".svelte")){let{module:Le,typescript:qe}=I(Oe);Pe=Kc(Le?Oe.slice(Le.content.start,Le.content.end):"",qe)}else Pe=Kc(Oe,Ne.endsWith(".ts"))}catch{Pe=null}return G.set(Ne,Pe),Pe}function we(Ne,Pe){let Oe=de(zc.join(O,Ne),Pe);if(!Oe)return;let Le=$e(O,Oe);return Le.startsWith("..")?void 0:Le}function ke(Ne){let Pe=X.get(Ne);if(Pe===void 0)Pe=ve(Ne),X.set(Ne,Pe);return Pe}function ve(Ne){let Pe=new Set,Oe=[Ne];for(let Le=Oe.pop();Le!==void 0;Le=Oe.pop()){if(Pe.has(Le))continue;if(Pe.add(Le),Le.endsWith(".svelte"))return!0;let qe=le(Le);if(!qe||qe.unread)return!0;let Ge=[...Array.from(qe.imports.values(),({source:Je})=>Je),...Array.from(qe.reExports.values(),({source:Je})=>Je),...qe.namespaces.values(),...qe.stars];for(let Je of Ge){if(!Je.startsWith("."))continue;let Xe=we(Le,Je);if(Xe===void 0)return!0;Oe.push(Xe)}}return!1}function Ee(Ne,Pe,Oe){if(!Pe.startsWith("."))return Wt;let Le=we(Ne,Pe);if(Le===void 0)return Nt;if(Oe==="*")return{kind:"members",member:(qe)=>Ce(Le,qe)??Wt};return Ce(Le,Oe)??Wt}function Ce(Ne,Pe){let Oe=`${Ne}\x00${Pe}`;if(H.has(Oe))return H.get(Oe)??null;H.set(Oe,Nt);let Le=Ae(Ne,Pe);return H.set(Oe,Le),Le}function Ae(Ne,Pe){if(Ne.endsWith(".svelte")&&Pe==="default")return{kind:"component",key:Ne};let Oe=le(Ne);if(!Oe||Oe.unread)return Nt;let Le=Oe.reExports.get(Pe);if(Le)return Ee(Ne,Le.source,Le.local);let qe=Oe.namespaces.get(Pe);if(qe!==void 0)return Ee(Ne,qe,"*");let Ge=Te(Ne,Oe,Pe);if(Ge!==null)return Ge;if(Pe==="default")return null;let Je=new Set;for(let Ke of Oe.stars)if(Ke.startsWith("."))Je.add(we(Ne,Ke));let Xe=null;for(let Ke of Je){let et=Ke===void 0?Nt:Ce(Ke,Pe);if(et===null)continue;if(Xe!==null&&!vm(Xe,et))return Nt;Xe=et}return Xe}function Te(Ne,Pe,Oe){if(!Pe.code.includes("export"))return null;if(!ke(Ne))return new RegExp(`\\b${Oe.replace(gm,"\\$&")}\\b`).test(Pe.code)?Wt:null;let Le=Pe.exportLists.get(Oe),qe=Le===void 0?void 0:Pe.imports.get(Le);if(qe)return Ee(Ne,qe.source,qe.imported);let Ge=Pe.body();if(!Ge)return Nt;let Je=new Set,Xe=(rt)=>{if(!rt)return Nt;let ut=!1;return Zt(rt,(pt)=>{if(ut||pt.type!=="Identifier")return;if(et(pt.name).kind!=="value")ut=!0}),ut?Nt:Wt},Ke=(rt,ut)=>{if(rt?.type==="VariableDeclaration"){for(let pt of rt.declarations)if(pt.id.type==="Identifier"){if(pt.id.name===ut)return pt.init?gt(pt.init):Wt}else if(m(pt.id).some((ht)=>ht.name===ut))return Xe(pt.init)}else if((rt?.type==="FunctionDeclaration"||rt?.type==="ClassDeclaration")&&rt.id?.name===ut)return Xe(rt);return},et=(rt)=>{if(Je.has(rt))return Wt;Je.add(rt);try{let ut=Pe.imports.get(rt);if(ut)return Ee(Ne,ut.source,ut.imported);for(let pt of Ge){let ht=Ke(pt.type==="ExportNamedDeclaration"||pt.type==="ExportDefaultDeclaration"?pt.declaration:pt,rt);if(ht)return ht}return Wt}finally{Je.delete(rt)}},gt=(rt)=>{switch(rt.type){case"Identifier":return et(rt.name);case"ObjectExpression":return Ht(rt,void 0);case"CallExpression":{let{callee:ut,arguments:pt}=rt;if(ut.type==="MemberExpression"&&!ut.computed&&ut.object.type==="Identifier"&&ut.object.name==="Object"&&ut.property.type==="Identifier"&&ut.property.name==="assign"&&pt.length===2&&pt[1].type==="ObjectExpression"){let ht=gt(pt[0]);if(ht.kind==="unknown"||ht.kind==="members")return Nt;return Ht(pt[1],ht.kind==="component"?ht.key:void 0)}return Xe(rt)}default:return Xe(rt)}},Ht=(rt,ut)=>{let pt=new Map;for(let ht of rt.properties){if(ht.type!=="Property"||ht.computed||ht.kind!=="init")return Nt;let pi=ht.key.type==="Identifier"?ht.key.name:ht.key.type==="Literal"?String(ht.key.value):void 0;if(pi===void 0)return Nt;pt.set(pi,ht.value)}return{kind:"members",self:ut,member:(ht)=>{let pi=pt.get(ht);return pi?gt(pi):Wt}}};for(let rt of Ge){if(rt.type==="ExportDefaultDeclaration"){if(Oe==="default")return gt(rt.declaration);continue}if(rt.type!=="ExportNamedDeclaration"||rt.source)continue;let ut=Ke(rt.declaration,Oe);if(ut)return ut;for(let pt of rt.specifiers){if((pt.exported.type==="Identifier"?pt.exported.name:String(pt.exported.value))!==Oe)continue;return pt.local.type==="Identifier"?et(pt.local.name):Nt}}return null}return{exportOf:(Ne,Pe)=>Ce(Ne,Pe)??Wt,importOf:Ee}}var gm=/[.*+?^${}()|[\]\\]/g,xm=/^export\s*\{\s*\}\s*;?$/;function vm(O,G){if(O.kind==="value"||G.kind==="value")return O.kind===G.kind;return O.kind==="component"&&G.kind==="component"&&O.key===G.key}function Kc(O,G){let H=null,X={reExports:new Map,namespaces:new Map,stars:[],imports:new Map,exportLists:new Map,unread:!1,code:O,body:()=>{if(H===null)try{H=gs(O,{typescript:G,comments:!1}).body}catch{H=void 0}return H}};for(let le of c(O,{exportLists:!0})){if(!le.source){if(le.kind==="export"&&le.specifiers.length>0){for(let{typeOnly:ke,local:ve,exported:Ee}of le.specifiers)if(!ke&&Ee)X.exportLists.set(Ee,ve)}else if(le.kind==="import"||!xm.test(O.slice(le.start,le.end)))X.unread=!0;continue}if(le.typeOnly)continue;let we=le.source.value;if(le.kind==="import"){for(let ke of le.specifiers){if(ke.typeOnly)continue;X.imports.set(ke.local,{source:we,imported:ke.kind==="namespace"?"*":ke.imported})}continue}for(let ke of le.specifiers){if(ke.typeOnly)continue;if(ke.kind==="all")X.stars.push(we);else if(ke.kind==="namespace"&&ke.exported)X.namespaces.set(ke.exported,we);else if(ke.exported)X.reExports.set(ke.exported,{source:we,local:ke.local})}}return X}function mi(O,G,H){for(let{name:X}of m(G))Hr(O,X,H)}function Hr(O,G,H){if(O.unknownNames.add(G),!O.unknownReasons.has(G))O.unknownReasons.set(G,H)}var Bi="function";class xn extends Error{}var Sm=new Set(["$state","$state.raw","$derived"]);function wm(O,G){let[H]=m(G.id),X=H&&O.scopes.bindingOf(H)?.rune,{init:le}=G;if(!X||le?.type!=="CallExpression")return;let[we]=le.arguments;return{rune:X,argument:we&&we.type!=="SpreadElement"?we:null}}var Gc=new Map;function ue(O,G){let H=Oi.join(O,G),{mtimeMs:X}=Jc(H),le=Gc.get(H);if(le?.mtimeMs===X)return le.model;let we=Fi(Xr(H,"utf8"),G,ep(O));return Gc.set(H,{mtimeMs:X,model:we}),we}var Vi=0;function Zc(){Vi++}var Hc=new Map;function km(O){let G=Hc.get(O);if(G?.checked!==Vi)G={checked:Vi,resolver:F(O)},Hc.set(O,G);return G.resolver}function ep(O){return(G,H,X)=>{let le=km(O).importOf(G,H,X);if(le.kind==="component")return{component:le.key};if(le.kind==="members")return{members:le};if(X==="*")return;let we=Em(O,G,H);if(!we)return;let ke=Am(O,we,X);return ke!==void 0?{string:ke}:{helper:()=>Cm(O,we,X)}}}function Em(O,G,H){let X=Oi.posix.join(Oi.posix.dirname(G),H);return[X,`${X}.js`].find((le)=>le.endsWith(".js")&&bm(Oi.join(O,le)))}var Xc=new Map;function _(O,G){let H=Oi.join(O,G),X=Xc.get(H);if(X?.checked===Vi)return X.model;let{mtimeMs:le}=Jc(H);if(X?.mtimeMs===le)return X.checked=Vi,X.model;let we;try{we=Yr(Xr(H,"utf8"),G,ep(O));for(let ke of we.ast.module?.content.body??[]){if(ke.type!=="ExportNamedDeclaration")continue;let ve=ke.declaration?ke.declaration.type==="VariableDeclaration"?ke.declaration.declarations.flatMap((Ee)=>m(Ee.id)):[]:ke.specifiers.flatMap((Ee)=>Ee.local.type==="Identifier"?[Ee.local]:[]);for(let{name:Ee}of ve)we.escapes.set(Ee,{full:!0,paths:[]})}}catch{we=void 0}return Xc.set(H,{mtimeMs:le,checked:Vi,model:we}),we}function Cm(O,G,H){let X=_(O,G);if(!X||X.unknownNames.has(H))return;for(let le of X.ast.module?.content.body??[]){if(le.type!=="ExportNamedDeclaration")continue;let{declaration:we}=le;if(we?.type==="FunctionDeclaration"){if(we.id?.name===H)return{model:X,fn:we}}else if(we?.type==="VariableDeclaration"&&we.kind==="const"){for(let{id:ke,init:ve}of we.declarations)if(ke.type==="Identifier"&&ke.name===H&&(ve?.type==="ArrowFunctionExpression"||ve?.type==="FunctionExpression"))return{model:X,fn:ve}}}return}function Am(O,G,H){let X=Xr(Oi.join(O,G),"utf8"),le=new RegExp(`^export const ${H.replaceAll("$","\\$")} = (["'])([^"'\\\\\\n]*)\\1;?[ \\t]*$`,"gm"),we=[...X.matchAll(le)];return we.length===1?we[0][2]:void 0}function Yr(O,G,H,X=!1){let le=gs(O,{typescript:X,comments:!1}),we={type:"Root",start:0,end:O.length,options:null,fragment:{type:"Fragment",nodes:[]},css:null,module:{type:"Script",start:0,end:O.length,context:"module",content:le,attributes:[]},comments:[],js:[]};return Fi(O,G,H,we)}function Fi(O,G,H=()=>{return},X){let le=X??N(O,{comments:!1,css:!1}),we={key:G,code:O,ast:le,scopes:wa(le),props:new Map,propNames:new Map,customElement:le.options?.attributes.some((Ne)=>Ne.name==="customElement")??!1,declarations:new Map,functions:new Map,reactiveDeclarations:new WeakSet,unknownNames:new Set,unknownReasons:new Map,guardedWrites:new Map,componentImports:new Map,otherImports:new Set,packageImports:new Map,memberImports:new Map,importedStrings:new Map,importedHelpers:new Map,storeImports:new Map,providedContexts:new Set,providesUnknownContext:!1,contextObjects:new Map,contextLeaks:new Map,readsUnknownContext:!1,escapes:jm(le)},ke=new Set;for(let Ne of[le.module,le.instance]){if(!Ne)continue;let Pe=Ne===le.instance;for(let Oe of Ne.content.body)Om(we,Oe,Pe,H,Pe?ke:void 0)}for(let Ne of le.instance?.content.body??[]){if(Ne.type!=="ExportNamedDeclaration"||Ne.declaration||Ne.source)continue;for(let{local:Pe,exported:Oe}of Ne.specifiers){if(Pe.type!=="Identifier")continue;if(!we.props.has(Pe.name)){if(!ke.has(Pe.name))continue;let Le=we.declarations.get(Pe.name);we.declarations.delete(Pe.name),we.props.set(Pe.name,Le===Bi?null:Le??null)}we.propNames.set(Pe.name,Oe.type==="Identifier"?Oe.name:String(Oe.value))}}let ve=new Map;for(let Ne of qm(we.scopes)){if(Ne.kind==="reactive"&&Ne.node)ve.set(Ne.node,Ne.name);for(let Pe of Ne.references)if(Pe.writes||Pe.mutates)ve.set(Pe.node,Pe.store?`$${Ne.name}`:Ne.name)}let Ee=new Set,Ce=(Ne,Pe)=>Zt(Ne,(Oe)=>{let Le=Oe.type==="Identifier"&&ve.get(Oe);if(!Le)return;ve.delete(Oe),Hr(we,Le,Pe),Ee.add(Le)}),Ae=(Ne)=>C(O,Ne).line,Te=Lm(le);Zt(le,(Ne)=>{switch(Ne.type){case"AssignmentExpression":{let Pe=Te.get(Ne);if(we.reactiveDeclarations.has(Ne))Zt(Ne.left,(Oe)=>{if(Oe.type==="Identifier")ve.delete(Oe)});else if(Pe?.length&&Ne.operator==="="&&Ne.left.type==="Identifier"&&!Ne.left.name.startsWith("$")&&ve.get(Ne.left)===Ne.left.name){let{name:Oe}=Ne.left;ve.delete(Ne.left);let Le=we.guardedWrites.get(Oe)??[];Le.push({guards:Pe,value:Ne.right,line:Ae(Ne.start)}),we.guardedWrites.set(Oe,Le)}else Ce(Ne.left,`is assigned at line ${Ae(Ne.start)}`);break}case"UpdateExpression":Ce(Ne.argument,`is updated at line ${Ae(Ne.start)}`);break;case"BindDirective":Ce(Ne.expression,`is bound with \`bind:\` at line ${Ae(Ne.start)}`);break;case"CallExpression":if(Ne.callee.type==="Identifier"&&Ne.callee.name==="setContext"){let Pe=Di(Ne.arguments[0],we);if(Pe===void 0)we.providesUnknownContext=!0;else we.providedContexts.add(Pe)}break}});for(let[Ne,Pe]of ve)Hr(we,Pe,`is assigned at line ${Ae(Ne.start)}`),Ee.add(Pe);if(we.restPropsName&&Ee.has(we.restPropsName))we.restPropsName=void 0;return _m(we,Te),we}var Nm=/\b(?:get|set)Context\b|\bgetAllContexts\b/;function _m(O,G){let{ast:H,code:X}=O;if(!Nm.test(X))return;let le=new Map;u(H,{enter(ke,ve){le.set(ke,ve)}});let we=(ke,ve)=>{let Ee=O.contextLeaks.get(ke)??new Set;Ee.add(ve),O.contextLeaks.set(ke,Ee)};Zt(H,(ke)=>{if(ke.type!=="CallExpression"||ke.callee.type!=="Identifier")return;let[ve,Ee]=ke.arguments;if(ke.callee.name==="getAllContexts")O.readsUnknownContext=!0;else if(ke.callee.name==="getContext"){let Ce=Di(ve,O);if(Ce===void 0)O.readsUnknownContext=!0;else Rm(O,ke,Ce,le,we)}else if(ke.callee.name==="setContext"){let Ce=Di(ve,O);if(Ce===void 0)return;let Ae=O.contextObjects.get(Ce)??[];Ae.push(Tm(O,Ee,le,G)),O.contextObjects.set(Ce,Ae)}})}function Tm(O,G,H,X){let le=G,we=[];if(G?.type==="Identifier"){let Ce=Qr(O,G);if(!Ce)return null;for(let Ae of Ce.binding.references){if(Ae.node===G)continue;let Te=Im(O,Ae.parent,Ae.node);if(Te===void 0)return null;we.push(Te)}le=Ce.declarator.init}if(le?.type!=="ObjectExpression")return null;let ke=new Map,ve=[];for(let Ce of le.properties){if(Ce.type!=="Property"||Ce.kind!=="init")return null;let Ae=w(Ce);if(Ae===void 0)return null;ve.push({name:Ae,property:Ce,store:$m(O,Ce.value)})}let Ee=new Set(ve.flatMap(({property:Ce,store:Ae})=>Ae?[Ae.wrapped?Ce.value:Ce]:[]));for(let{name:Ce,store:Ae}of ve){let Te=Ae&&Pm(O,Ae.id,Ee,H,X);if(!Ae||!Te){ke.set(Ce,null);continue}let Ne=ve.filter((Pe)=>Pe.name!==Ce&&Pe.store?.id.name===Ae.id.name).map((Pe)=>Pe.name);ke.set(Ce,{...Te,readOnly:Ae.wrapped,aliases:Ne})}return{properties:ke,unlessProvided:we}}function Im(O,G,H){if(G.type!=="CallExpression"||!G.arguments.includes(H)||G.callee.type!=="MemberExpression"||!G.callee.optional||G.callee.object.type!=="CallExpression")return;let X=G.callee.object;return X.callee.type==="Identifier"&&X.callee.name==="getContext"?Di(X.arguments[0],O):void 0}function $m(O,G){if(G.type==="Identifier")return{id:G,wrapped:!1};return G.type==="CallExpression"&&G.callee.type==="Identifier"&&O.storeImports.get(G.callee.name)==="readonly"&&G.arguments.length===1&&G.arguments[0].type==="Identifier"?{id:G.arguments[0],wrapped:!0}:void 0}function Qr(O,G){let H=O.scopes.bindingOf(G),X=H?.declaration;return H&&Ui(H,O)&&H.kind==="const"&&X?.type==="VariableDeclarator"?{binding:H,declarator:X}:void 0}function w(O){if(!O.computed&&O.key.type==="Identifier")return O.key.name;return O.key.type==="Literal"?String(O.key.value):void 0}function Mm(O,G,H){let X=G,le=H.get(G);if(le?.type==="ArrayExpression")X=le,le=H.get(le);return le?.type==="CallExpression"&&le.arguments[0]===X&&le.callee.type==="Identifier"&&O.storeImports.get(le.callee.name)==="derived"}function Pm(O,G,H,X,le){let we=Qr(O,G);if(!we)return null;let{binding:ke,declarator:ve}=we;if(ve.init?.type!=="CallExpression"||ve.init.callee.type!=="Identifier"||O.storeImports.get(ve.init.callee.name)!=="writable"||ve.init.arguments.length>1||ve.init.arguments[0]?.type==="SpreadElement")return null;let Ee=[];for(let Ae of ke.references){let{parent:Te}=Ae;if(H.has(Te)||Mm(O,Ae.node,X))continue;if(Ae.store&&!Ae.writes&&!Ae.mutates)continue;if(Ae.store&&Te.type==="AssignmentExpression"&&Te.operator==="="&&Te.left===Ae.node&&le.has(Te))Ee.push(Te.right);else if(!Ae.store&&Te.type==="MemberExpression"&&Te.object===Ae.node&&!Te.computed&&Te.property.type==="Identifier"&&Te.property.name==="set"){let Ne=X.get(Te),[Pe]=Ne?.type==="CallExpression"?Ne.arguments:[];if(Ne?.type!=="CallExpression"||Ne.callee!==Te||Ne.arguments.length!==1||Pe.type==="SpreadElement"||!le.has(Ne))return null;Ee.push(Pe)}else return null}let[Ce]=ve.init.arguments;return{initial:Ce??null,writes:Ee}}function Rm(O,G,H,X,le){let we=G,ke=X.get(G);if(ke?.type==="MemberExpression"&&ke.object===G&&!ke.computed&&ke.property.type==="Identifier"){le(H,ke.property.name);return}if(ke?.type==="LogicalExpression"&&ke.left===we)we=ke,ke=X.get(ke);let ve=Yc(O,ke,we);if(!ve){le(H,"*");return}if(ve.id.type==="ObjectPattern"){for(let Ce of ve.id.properties){let Ae=Ce.type==="Property"?w(Ce):void 0;if(Ce.type!=="Property"||Ae===void 0){le(H,"*");return}let Te=Ce.value.type==="AssignmentPattern"?Ce.value.left:Ce.value;if(Te.type!=="Identifier"||!Qc(O,Te))le(H,Ae)}return}if(ve.id.type!=="Identifier"){le(H,"*");return}let Ee=O.scopes.bindingOf(ve.id);for(let Ce of Ee?.references??[]){let{parent:Ae}=Ce;if(Ce.writes||Ce.mutates){le(H,"*");return}if(Ae.type==="MemberExpression"&&Ae.object===Ce.node&&!Ae.computed&&Ae.property.type==="Identifier"){let Te=Ae.property.name,Ne=Ae,Pe=X.get(Ne);if(Pe?.type==="ChainExpression")Ne=Pe,Pe=X.get(Pe);if(Pe?.type==="LogicalExpression"&&Pe.left===Ne)Ne=Pe,Pe=X.get(Pe);let Oe=Yc(O,Pe,Ne);if(Oe?.id.type!=="Identifier"||!Qc(O,Oe.id))le(H,Te)}else if(!(Ae.type==="IfStatement"&&Ae.test===Ce.node)&&!(Ae.type==="ConditionalExpression"&&Ae.test===Ce.node)&&!(Ae.type==="UnaryExpression"&&Ae.operator==="!")){le(H,"*");return}}}function Yc(O,G,H){if(G?.type!=="VariableDeclarator"||G.init!==H)return;return O.ast.instance?.content.body.find((le)=>le.type==="VariableDeclaration"&&le.kind==="const"&&le.declarations.includes(G))?G:void 0}function Qc(O,G){return O.scopes.bindingOf(G)?.references.every((X)=>X.store&&!X.writes&&!X.mutates)??!1}function Lm(O){let G=new Map,H=(X,le)=>{switch(X.type){case"BlockStatement":for(let we of X.body)H(we,le);return;case"IfStatement":if(H(X.consequent,[...le,{test:X.test,holds:!0}]),X.alternate)H(X.alternate,[...le,{test:X.test,holds:!1}]);return;case"ExpressionStatement":G.set(X.expression,le);return}};for(let X of O.instance?.content.body??[])if(X.type==="LabeledStatement"&&X.label.name==="$")H(X.body,[]);return G}var Jr=new WeakSet;function gn(O,G,H,X){let le={start:G.start,end:G.end},we=(ke,ve)=>{let Ee={type:"MemberExpression",object:H,property:ke,computed:ve,optional:!1,...le};return Jr.add(Ee),Ee};switch(G.type){case"Identifier":O.declarations.set(G.name,H),X?.add(G.name);return;case"ObjectPattern":for(let ke of G.properties){let ve=ke.type!=="Property"?void 0:!ke.computed&&ke.key.type==="Identifier"?ke.key.name:ke.key.type==="Literal"&&typeof ke.key.value==="string"?ke.key.value:void 0;if(ke.type!=="Property"||ve===void 0){mi(O,ke.type==="RestElement"?ke.argument:ke.value,"is declared by destructuring");continue}gn(O,ke.value,we({type:"Identifier",name:ve},!1),X)}return;case"ArrayPattern":for(let[ke,ve]of G.elements.entries()){if(!ve)continue;if(ve.type==="RestElement"){mi(O,ve.argument,"is declared by destructuring");continue}gn(O,ve,we({type:"Literal",value:ke},!0),X)}return;case"AssignmentPattern":gn(O,G.left,{type:"ConditionalExpression",test:{type:"BinaryExpression",operator:"===",left:H,right:{type:"Identifier",name:"undefined"}},consequent:G.right,alternate:H,...le},X);return;default:mi(O,G,"is declared by destructuring")}}function Om(O,G,H,X,le){if(G.type==="ImportDeclaration"){let Ee=String(G.source.value),Ce=Ee.startsWith(".");for(let Ae of G.specifiers){let Te=Ae.local.name;if(!Ce)O.packageImports.set(Te,Ee);let Ne=Ae.type==="ImportDefaultSpecifier"?"default":Ae.type==="ImportNamespaceSpecifier"?"*":Ae.imported.type==="Identifier"?Ae.imported.name:void 0,Pe=Ce&&Ne?X(O.key,Ee,Ne):void 0;if(Pe&&"component"in Pe)O.componentImports.set(Te,Pe.component);else if(O.otherImports.add(Te),Pe&&"members"in Pe)O.memberImports.set(Te,Pe.members);else if(Pe&&"string"in Pe)O.importedStrings.set(Te,Pe.string);else if(Pe)O.importedHelpers.set(Te,Pe.helper);if(Ee==="svelte/store"&&Ne)O.storeImports.set(Te,Ne)}return}let we=G.type==="ExportNamedDeclaration",ke=we?G.declaration:G;if(!ke)return;if(ke.type==="VariableDeclaration"){for(let Ee of ke.declarations){let Ce=wm(O,Ee);if(Ce?.rune==="$props"&&H){Wm(O,Ee.id);continue}if(Ee.id.type!=="Identifier"){if(we||Ce||!Ee.init)mi(O,Ee.id,"is declared by destructuring");else gn(O,Ee.id,Ee.init,ke.kind==="let"?le:void 0);continue}let Ae=Ce&&Sm.has(Ce.rune)?Ce.argument:Ee.init??null,{name:Te}=Ee.id;if(we&&H&&ke.kind!=="const")O.props.set(Te,Ae),O.propNames.set(Te,Te);else if(O.declarations.set(Te,Ae),ke.kind==="let")le?.add(Te)}return}if(ke.type==="FunctionDeclaration"&&ke.id){O.declarations.set(ke.id.name,Bi),O.functions.set(ke.id.name,ke);return}let ve=G.type==="LabeledStatement"&&G.label.name==="$"&&G.body.type==="ExpressionStatement"&&G.body.expression.type==="AssignmentExpression"&&G.body.expression.operator==="="?G.body.expression:void 0;if(ve?.left.type==="ObjectPattern"){if(m(ve.left).map(({name:Ce})=>Ce).some((Ce)=>Ce.startsWith("$")||O.declarations.has(Ce)||O.props.has(Ce)))return;gn(O,ve.left,ve.right,void 0),O.reactiveDeclarations.add(ve)}else if(ve?.left.type==="Identifier"){let{name:Ee}=ve.left;if(Ee.startsWith("$")&&!Ee.startsWith("$$")||O.declarations.has(Ee)||O.props.has(Ee))return;O.declarations.set(Ee,ve.right),O.reactiveDeclarations.add(ve)}}function Vm(O,G,H){switch(O?.type){case"ExpressionTag":{let X=H.at(-1),le=H.at(-2);return!(X?.type==="Attribute"&&(le?.type==="Component"||le?.type==="SvelteComponent"||le?.type==="SvelteSelf"||le?.type==="SlotElement"))}case"IfStatement":case"IfBlock":case"ConditionalExpression":return O.test===G;case"UnaryExpression":return O.operator==="!"||O.operator==="typeof";case"BinaryExpression":return["===","!==","==","!="].includes(O.operator);case"ClassDirective":return!0;default:return!1}}function Dm(O,G){switch(O?.type){case"AssignmentExpression":return O.left===G;case"UpdateExpression":case"BindDirective":return!0;case"UnaryExpression":return O.operator==="delete";case"CallExpression":case"NewExpression":return O.callee===G;default:return!1}}function Bm(O){let G=O[O.length-1];for(let H=O.length-2;H>=0;H--){let X=O[H];switch(X.type){case"VariableDeclarator":return X.id===G&&G!==O[O.length-1];case"Property":if(X.value!==G||O[H-1]?.type!=="ObjectPattern")return!1;break;case"AssignmentPattern":if(X.left!==G)return!1;break;case"RestElement":case"ObjectPattern":case"ArrayPattern":break;default:return!1}G=X}return!1}var vs=new Set(["includes","some","every"]);function Fm(O,G){if(O?.type!=="CallExpression"||O.callee!==G||G.type!=="MemberExpression"||G.computed||G.property.type!=="Identifier"||!vs.has(G.property.name)||O.arguments.length!==1)return;let{name:H}=G.property;return H==="includes"||Zr(O.arguments[0])?H:void 0}function Zr(O){if(O.type!=="ArrowFunctionExpression"&&O.type!=="FunctionExpression"||O.async||O.generator||O.params.length>1)return!1;let G=!0;return Zt(O.body,(H)=>{switch(H.type){case"AssignmentExpression":case"UpdateExpression":case"CallExpression":case"NewExpression":case"AwaitExpression":case"YieldExpression":case"TaggedTemplateExpression":case"ThisExpression":G=!1;break;case"UnaryExpression":if(H.operator==="delete")G=!1;break}}),G&&eo(O)!==void 0}function eo(O){if(O.body.type!=="BlockStatement")return O.body;let[G]=O.body.body;return O.body.body.length===1&&G.type==="ReturnStatement"?G.argument??void 0:void 0}function Um(O,G){return O?.type==="AssignmentExpression"&&O.left===G||O?.type==="UpdateExpression"||O?.type==="BindDirective"}function jm(O){let G=new Map,H=(ve)=>{let Ee=G.get(ve);if(!Ee)Ee={full:!1,paths:[]},G.set(ve,Ee);return Ee},X=[],le=new Set,we=new Set,ke=[];u(O,{enter(ve,Ee,Ce){if(ke.push(ve),ve.type==="EachBlock"&&ve.expression.type==="Identifier"&&ve.context){let Le=ve.expression.name;for(let[qe,Ge]of Li(ve.context,[]))X.push([Le,qe,Ge])}if(ve.type!=="Identifier"||!A(ve,Ee))return;if(ve.name==="$$props"){let Le=xs(Ee);H(Le===void 0?"*":`$$props.${Le}`).full=!0;return}if(Ee?.type==="VariableDeclarator"&&Ce==="id"||Bm(ke)||Ee?.type==="ExportSpecifier"||Ee?.type==="EachBlock"&&(Ce==="expression"||Ce==="context"))return;let Ae=[],Te=ve,Ne=ke.length-1;for(;;){let Le=ke[Ne-1];if(Le?.type!=="MemberExpression"||Le.object!==Te)break;Ae.push(xs(Le)??"*"),Te=Le,Ne--}let Pe=ke[Ne-1],Oe=Te!==ve?Fm(Pe,Te):void 0;if(Pe?.type==="AssignmentExpression"&&Pe.left===ve)le.add(ve.name),we.add(ve.name);else if(Oe)H(ve.name).paths.push([...Ae.slice(0,-1),`()${Oe}`]);else if(Dm(Pe,Te)){if(H(ve.name).full=!0,Te===ve&&Um(Pe,ve))le.add(ve.name)}else if(Ae.length>0)H(ve.name).paths.push(Ae);else if(!Vm(Pe,Te,ke.slice(0,Math.max(0,Ne-1))))H(ve.name).full=!0},leave(){ke.pop()}});for(let[,ve]of X)if(we.has(ve))H(ve).full=!0;for(let[ve,Ee,Ce]of X.reverse()){let Ae=G.get(Ee);if(!Ae)continue;let Te=H(ve);if(!Ce){Te.paths.push(["[]"]);continue}if(le.has(Ee))Te.paths.push(["[]",...Ce].slice(0,-1));if(Ae.full)Te.paths.push(["[]",...Ce]);for(let Ne of Ae.paths)Te.paths.push(["[]",...Ce,...Ne])}return G}function Li(O,G){switch(O.type){case"Identifier":return[[O.name,G]];case"AssignmentPattern":return Li(O.left,G);case"RestElement":return Li(O.argument,null);case"ObjectPattern":return O.properties.flatMap((H)=>{if(H.type!=="Property")return Li(H,null);let X=w(H);return Li(H.value,G&&X!==void 0?[...G,X]:null)});case"ArrayPattern":return O.elements.flatMap((H,X)=>H?Li(H,G&&[...G,String(X)]):[]);default:return m(O).map(({name:H})=>[H,null])}}function xs(O){if(O?.type!=="MemberExpression")return;let{property:G,computed:H}=O;if(!H&&G.type==="Identifier")return G.name;return H&&G.type==="Literal"&&typeof G.value==="string"?G.value:void 0}function Wm(O,G){if(G.type!=="ObjectPattern"){mi(O,G,"holds every prop (`$props()`)");return}for(let H of G.properties){if(H.type==="RestElement"){if(mi(O,H.argument,"is the rest of `$props()`"),H.argument.type==="Identifier")O.restPropsName=H.argument.name;continue}if(H.computed){mi(O,H.value,"has a computed `$props()` key");continue}let X=w(H),{value:le}=H,[we,ke]=le.type==="AssignmentPattern"?[le.left,le.right]:[le,null];if(X===void 0||we.type!=="Identifier"){mi(O,le,"is a nested `$props()` pattern");continue}let ve=O.scopes.bindingOf(we);O.props.set(we.name,ve?ve.initial:ke),O.propNames.set(we.name,X)}}function qm(O){let G=[...O.instance.declarations.values()];if(O.module!==O.instance)G.push(...O.module.declarations.values());return G}function Di(O,G){if(O?.type==="Literal")return typeof O.value==="string"?O.value:void 0;if(O?.type!=="Identifier")return;let H=G.scopes.bindingOf(O);if(!H||!Ui(H,G))return;let X=G.importedStrings.get(O.name);if(X!==void 0)return X;let le=Qr(G,O)?.declarator.init;return le?.type==="Literal"&&typeof le.value==="string"?le.value:void 0}function Ui(O,G){return O.scope===G.scopes.instance||O.scope===G.scopes.module}var dt=Symbol("object"),Mt=Symbol("empty array"),e=Symbol("unknown");var zm=new Map([!0,!1,null,void 0,"",dt,Mt].map((O)=>[O,new Set([O])]));function t(...O){return O.length===1&&zm.get(O[0])||new Set(O)}var n=t(void 0),ji=t(!0,!1),tp=t();function r(O,G){if(O===e||G===e)return e;if(G.size===0)return O;if(O.size===0)return G;let H=new Set([...O,...G]);return H.size>32?e:H}function vt(O,G){if(O===e)return e;if(O.size===1){let[X]=O;return G(X)}let H=new Set;for(let X of O){let le=G(X);if(le===e)return e;for(let we of le)H.add(we);if(H.size>32)return e}return H}function to(O,G){if(O===e||O.size===0)return!1;for(let H of O)if(!G(H))return!1;return!0}function h(O){return typeof O==="object"&&O!==null&&O.kind!=="store"}function Wi(O){return typeof O==="object"&&O!==null&&O.kind==="store"}function a(O){return O===dt||O===Mt||h(O)||Wi(O)}function vn(O){return O===Mt||h(O)}var io=32,Km=1e4,Gm=new Map,Hm=new Map,sp=new WeakMap,Xm=0;function rp(O,G,H){let X=O.get(G);if(!X){if(O.size>=Km)O.clear();X=H(),O.set(G,X)}return X}function yi(O){if(O===e)return"?";return[...O].map((G)=>{if(h(G))return`#${sp.get(G)}`;if(Wi(G))return`$(${yi(G.value)})`;if(G===dt)return"o";if(G===Mt)return"[]";return typeof G==="string"?JSON.stringify(G):String(G)}).sort().join("|")}function op(O,G){return O===G||yi(O)===yi(G)}function bn(O){let G=O.kind==="object"?`{${[...O.props].map(([H,X])=>`${JSON.stringify(H)}:${yi(X)}`).sort().join(",")}}`:`[${O.elements.map(yi).join(",")}]`;return rp(Gm,G,()=>(sp.set(O,Xm++),O))}function bs(O){let G=O!==e&&[...O].some(a)?e:O;return t(rp(Hm,yi(G),()=>({kind:"store",value:G})))}var ip=/^(?:0|[1-9]\d*)$/,Ym=new Set(Object.getOwnPropertyNames(Object.prototype));function qi(O,G){if(typeof O==="string"&&G==="length")return t(O.length);if(O===Mt){if(G==="length")return t(0);return ip.test(G)?n:e}if(!h(O))return e;if(O.kind==="array"){if(G==="length")return t(O.elements.length);if(!ip.test(G))return e;return O.elements[Number(G)]??n}let H=O.props.get(G);if(H)return H;return Ym.has(G)?e:n}function Ss(O){return vt(O,(G)=>{if(G===Mt)return tp;if(h(G)&&G.kind==="array")return G.elements.reduce(r,tp);return e})}function zi(O){return to(O,(G)=>G===Mt)}function ws(O){return a(O)||Boolean(O)}function Et(O){return O===null||O===void 0}function Ct(O){if(O===e||O.size===0)return"either";let G=0;for(let H of O)if(ws(H))G++;if(G===O.size)return"truthy";return G===0?"falsy":"either"}function Sn(O){return to(O,(G)=>!Et(G))}function no(O){return to(O,Et)}var np=new Map([["===",(O,G)=>O===G],["!==",(O,G)=>O!==G],["==",(O,G)=>O==G],["!=",(O,G)=>O!=G]]),Qm=new Map([["<",(O,G)=>O<G],[">",(O,G)=>O>G],["<=",(O,G)=>O<=G],[">=",(O,G)=>O>=G]]);function Ki(O,G,H){if(G===e||H===e)return e;return vt(G,(X)=>vt(H,(le)=>{if(a(X)||a(le)){let ve=a(X)?le:X;if(!np.has(O)||a(ve)||O.length===2&&!Et(ve))return e;return t(O.startsWith("!"))}let we=Qm.get(O);if(we){if(!(typeof X==="number"&&typeof le==="number")&&!(typeof X==="string"&&typeof le==="string"))return e;return t(we(X,le))}let ke=np.get(O);if(ke)return t(ke(X,le));if(O==="+"&&(typeof X==="string"||typeof le==="string"))return t(String(X)+String(le));return e}))}function ap(O){return vt(O,(G)=>{if(G===dt)return t("object","function");return t(a(G)||G===null?"object":typeof G)})}function Gi(O){return vt(O,(G)=>a(G)?e:t(String(G)))}function lp(O){if(O===e)return"dynamic";return[...O].map((G)=>{if(G===dt)return"object";if(G===Mt)return"[]";if(h(G)||Wi(G))return G.kind;return G===void 0?"undefined":JSON.stringify(G)}).sort().join(", ")}function Ai(O,G){return O.open||O.eventsUnknown||O.events.has(G)}function ei(O=!1){return{open:O,props:new Map,omitted:new Set,slots:new Map,slotsUnknown:!1,siteCount:0,appSites:[],unknownBecause:new Map,events:new Set,eventsUnknown:!1}}function cp(O,G){if(O===G)return!0;if(O===void 0||G===void 0||O===e||G===e)return!1;if(O.size!==G.size)return!1;for(let H of O)if(!G.has(H))return!1;return!0}function ks(O,G){if(O.open)return O;if(G.customElement)return{...O,open:!0,reason:"is a custom element"};let{instance:H}=O;if(H===void 0)return O;let X=new Set(G.propNames.values());if(H===null||[...H].some((le)=>X.has(le)||le==="$on"))return{...O,open:!0,reason:"is bound with `bind:this`, and its instance may set its props"};return O}function Jm(O,G){if(!O.children||G!==void 0&&G<5)return O.props;let H=new Map(O.props);return H.set("children",G===void 0?r(O.props.get("children")??n,t(dt)):t(dt)),H}function wn(O,G,H,X){let le=O.siteCount===0,we=Jm(G,X);if(G.location)O.appSites.push(G);if(G.open&&!O.open)O.open=!0,O.openReason=G.reason,le=!0;for(let[ve,Ee]of G.why??[]){if(O.unknownBecause.has(ve))continue;let Ce=typeof Ee==="string"?Ee:Ee();if(Ce)O.unknownBecause.set(ve,Ce)}for(let[ve,Ee]of we){let Ce=O.props.get(ve);if(O.siteCount>0&&Ce===void 0&&!O.omitted.has(ve))O.omitted.add(ve),le=!0;let Ae=Ce===void 0?Ee:r(Ce,Ee);if(!cp(Ce,Ae))O.props.set(ve,Ae),le=!0}let ke=(ve)=>{if(!(we.has(ve)||O.omitted.has(ve)))O.omitted.add(ve),le=!0};for(let ve of H)ke(ve);for(let ve of O.props.keys())ke(ve);if(!G.events){if(!O.eventsUnknown)le=!0;O.eventsUnknown=!0}else for(let ve of G.events){if(O.events.has(ve))continue;O.events.add(ve),le=!0}if(G.slots===null){if(!O.slotsUnknown)le=!0;O.slotsUnknown=!0}else{let ve=new Set([...O.slots.keys(),...G.slots]);for(let Ee of ve){let Ce=O.slots.get(Ee),Ae=Ce??(O.siteCount>0?t(void 0):t()),Te=r(Ae,t(G.slots.has(Ee)?!0:void 0));if(!cp(Ce,Te))O.slots.set(Ee,Te),le=!0}}return O.siteCount++,le}var Zm=new Map,ey=new Map;function ti(O,G,H,X={}){return{model:O,usage:G,context:H,memo:new Map,pending:new Set,locals:Zm,imported:X.imported??ey,svelteMajor:X.svelteMajor}}function Cs(O,G){let H=G.model.scopes.bindingOf(O);return H&&!Ui(H,G.model)?H:void 0}function As(O,G){return G.propNames.get(O)??O}function ty(O,G){let H=Cs(O,G);if(!H)return ao(O.name,G);if(H.name!==O.name)return e;return G.locals.get(H)??sy(H,G)}function iy(O,G){let{declaration:H}=O;switch(H.type){case"VariableDeclarator":{let{init:X}=H;return O.kind==="const-tag"&&X?{pattern:H.id,value:(le)=>i(X,le)}:void 0}case"EachBlock":{let{context:X,expression:le}=H;return O.kind==="each"&&X?{pattern:X,value:(we)=>Ss(i(le,we))}:void 0}case"SnippetBlock":{if(O.kind!=="snippet-param"||!O.node)return;let{node:X}=O,le=H.parameters.findIndex((ke)=>ke.start<=X.start&&X.end<=ke.end),we=ny(H,G);if(le<0||!we)return;return{pattern:H.parameters[le],value:(ke)=>{let ve=t();for(let Ee of we){let Ce=Ee.arguments[le];if(Ce?.type==="SpreadElement")return e;if(ve=r(ve,Ce?i(Ce,ke):n),ve===e)return e}return ve}}}default:return}}var pp=new WeakMap;function ny(O,G){let H=pp.get(O);if(H!==void 0)return H;let X=G.scopes.bindingOf(O.expression),le=X?.scope.node?.type,we=[];if(!X||le===void 0||le==="Component"||le.startsWith("Svelte"))we=null;else for(let{node:ke,parent:ve}of X.references){if(ve.type!=="CallExpression"||ve.callee!==ke){we=null;break}we.push(ve)}return pp.set(O,we),we}function sy(O,G){let H=iy(O,G.model),X=`#nested:${O.node?.start}`;if(!H||G.pending.has(X))return e;G.pending.add(X);try{let le=H.value(G);if(H.pattern!==O.node){let we=new Map;gi(H.pattern,le,we,G),le=we.get(O)??e}return O.kind==="each"?le:yp(le,O.name,G.model)}finally{G.pending.delete(X)}}function ao(O,G){if(O==="undefined")return n;let{model:H}=G;if(H.unknownNames.has(O))return e;let X=G.memo.get(O);if(X!==void 0)return X;if(G.pending.has(O))return e;G.pending.add(O);let le;try{le=yp(ry(ly(O,G),O,G),O,H)}finally{G.pending.delete(O)}return G.memo.set(O,le),le}function ry(O,G,H){let X=H.model.guardedWrites.get(G);if(!X||O===e)return O;for(let le of mp(X,H)){let we=i(le.value,H);if(we===e||[...we].some(a))return e;O=r(O,we)}return O}function mp(O,G){return O.filter(({guards:H})=>H.every(({test:X,holds:le})=>{let we=Ct(i(X,G));return we==="either"||we==="truthy"===le}))}function yp(O,G,H){if(O===e||![...O].some(vn))return O;let X=H.escapes.get(G);return!H.escapes.get("*")?.full&&!H.escapes.get(`$$props.${As(G,H)}`)?.full&&!X?.full&&!(X?.paths??[]).some((we)=>oy(O,we))?O:gp(O)}function gp(O){return vt(O,(G)=>t(vn(G)?dt:G))}function oy(O,G){let H=O;for(let X of G)if(H=X==="[]"?Ss(H):X==="*"?vt(H,ay):X.startsWith("()")?vt(H,(le)=>co(le)||typeof le==="string"?t():e):vt(H,(le)=>Et(le)?n:qi(le,X)),H===e)return!0;return H===e||[...H].some((X)=>a(X)&&!Wi(X))}function ay(O){if(Et(O))return n;if(!h(O))return e;let G=n;for(let H of O.kind==="object"?O.props.values():O.elements)G=r(G,H);return G}function Hi(O,G){let H=Ss(i(O.expression,G)),X=G.locals,le=new Map(X);return gi(O.context,H,le,G),G.locals=le,()=>{G.locals=X}}function gi(O,G,H,X){switch(O?.type){case"Identifier":{let le=X.model.scopes.bindingOf(O);if(le)H.set(le,G);return}case"AssignmentPattern":gi(O.left,xp(G,O.right,X),H,X);return;case"RestElement":gi(O.argument,e,H,X);return;case"ObjectPattern":for(let le of O.properties){if(le.type!=="Property"){gi(le,e,H,X);continue}let we=w(le),ke=we===void 0?e:vt(G,(ve)=>Et(ve)?t():qi(ve,we));gi(le.value,ke,H,X)}return;case"ArrayPattern":for(let[le,we]of O.elements.entries()){if(!we)continue;let ke=vt(G,(ve)=>Et(ve)?t():ve===Mt||h(ve)&&ve.kind==="array"?qi(ve,String(le)):e);gi(we,ke,H,X)}return}}function xp(O,G,H){if(O===e||!O.has(void 0))return O;let X=new Set(O);return X.delete(void 0),r(X,i(G,H))}function ly(O,G){let{model:H,usage:X}=G;if(H.props.has(O)){if(X.open)return e;let ke=H.props.get(O),ve=ke?i(ke,G):n,Ee=As(O,H),Ce=X.props.get(Ee);if(Ce===void 0)return ve;let Ae=Ce===e||Ce.has(void 0);return X.omitted.has(Ee)||Ae?r(Ce,ve):Ce}let le=H.declarations.get(O);if(le===Bi)return t(dt);if(le!==void 0)return le?i(le,G):n;if(H.componentImports.has(O))return t(dt);let we=G.imported.get(O);if(we&&H.otherImports.has(O))return we;if(O.startsWith("$")&&!O.startsWith("$$")&&O.length>1)return vt(ao(O.slice(1),G),(ke)=>Et(ke)?n:Wi(ke)?ke.value:e);return e}function kn(O,G){let{name:H}=O;return(H==="$$props"||H==="$$restProps"||H===G.model.restPropsName)&&!Cs(O,G)}function vp(O,G){let{model:H,usage:X}=O;if(X.open)return;let we=new Set(G!=="$$props"?H.propNames.values():[]),ke=G!==H.restPropsName,ve=new Map;for(let[Ee,Ce]of X.props){if(we.has(Ee))continue;let Ae=X.omitted.has(Ee);if(ke&&Ee==="children"){let{svelteMajor:Te}=O;if(Te===void 0)Ae=!0;else if(Te>=5)continue}ve.set(Ee,{value:Ce,maybeAbsent:Ae,why:X.unknownBecause.get(Ee)})}return ve}function Xi(O,G){if(O.type==="Identifier"&&kn(O,G))return vp(G,O.name);return cy(i(O,G))}function cy(O){if(O===e||O.size===0)return;let G=[];for(let X of O)if(Et(X))G.push(new Map);else if(h(X)&&X.kind==="object")G.push(X.props);else return;let H=new Map;for(let X of G)for(let[le,we]of X){let ke=H.get(le);H.set(le,{value:ke?r(ke.value,we):we,maybeAbsent:!1})}for(let[X,le]of H)le.maybeAbsent=G.some((we)=>!we.has(X));return H}var py=8,uy=/[\\/]/,up=40;function so(O,G){let{start:H,end:X}=O,le=G.model.code.slice(H,X).replace(/\s+/g," ");return le.length>up?`${le.slice(0,up-1)}…`:le}function lo(O,G,H=0){if(H>py||i(O,G)!==e)return;let X=(le)=>le?lo(le,G,H+1):void 0;switch(O.type){case"Identifier":{let le=Cs(O,G);if(!le)return fy(O.name,G,H);let we=le.name===O.name&&le.kind==="const-tag"&&le.declaration.type==="VariableDeclarator"&&le.declaration.init,ke=we&&X(we);return ke?`\`${O.name}\`: ${ke}`:`\`${O.name}\` ${hy[le.kind]??"is declared in a nested scope"}`}case"CallExpression":{let{callee:le}=O,we=_s(O,G)?O.arguments:le.type==="MemberExpression"&&!le.computed&&le.property.type==="Identifier"&&vs.has(le.property.name)?[le.object]:[];for(let ke of we){let ve=X(ke);if(ve)return ve}return`calls \`${so(O.callee,G)}()\``}case"MemberExpression":return`reads \`${so(O,G)}\``;case"TemplateLiteral":for(let le of O.expressions){let we=X(le);if(we)return we}break;case"BinaryExpression":case"LogicalExpression":return X(O.left)??X(O.right);case"ConditionalExpression":return X(O.test)??X(O.consequent)??X(O.alternate);case"UnaryExpression":return X(O.argument);case"ChainExpression":return X(O.expression)}return`\`${so(O,G)}\` isn't read by the analysis`}function Ns(O,G){let H=G.locals;return()=>{let X=G.locals;G.locals=H;try{return lo(O,G)}finally{G.locals=X}}}var hy={param:"is a parameter","snippet-param":"is a snippet parameter",each:"is an `{#each}` item the analysis can't read","each-index":"is an `{#each}` index","let-directive":"comes from a slot (`let:`)","const-tag":"is declared by `{@const}`","await-value":"is what an `{#await}` resolves to","await-error":"is what an `{#await}` rejects with"};function fy(O,G,H){let{model:X,usage:le}=G,we=X.key.split(uy).pop()??X.key,ke=X.unknownReasons.get(O);if(ke)return`\`${O}\` ${ke}`;let ve=X.guardedWrites.get(O),Ee=ve&&mp(ve,G)[0];if(Ee&&ao(O,G)===e)return`\`${O}\` is assigned at line ${Ee.line}`;if(X.props.has(O)){if(le.open)return`\`${O}\` is a prop of ${we}, which is rendered with any props${le.openReason?` (${le.openReason})`:""}`;let Ae=le.unknownBecause.get(As(O,X));return Ae?`\`${O}\` comes from ${Ae}`:`\`${O}\` is passed a value the analysis can't read`}let Ce=X.declarations.get(O);if(Ce&&Ce!==Bi){let Ae=lo(Ce,G,H+1);if(Ae)return`\`${O}\`: ${Ae}`}if(X.otherImports.has(O))return`\`${O}\` is imported`;if(O.startsWith("$")&&!O.startsWith("$$"))return`\`${O}\` reads a store`;return`\`${O}\` isn't declared in ${we}`}function bp(O,G){let H=Ct(O);return H==="either"?ji:t(H==="truthy"!==G)}function i(O,G){let H=W(O);if(H!==O)return i(H,G);switch(O.type){case"Literal":return"regex"in O&&O.regex?t(dt):typeof O.value==="bigint"?e:t(O.value);case"Identifier":return ty(O,G);case"TemplateLiteral":{let X=t(O.quasis[0].value.cooked??"");for(let[le,we]of O.expressions.entries())X=Ki("+",Ki("+",X,Gi(i(we,G))),t(O.quasis[le+1].value.cooked??""));return X}case"LogicalExpression":{let X=()=>i(O.right,G);return vt(i(O.left,G),(le)=>{if(O.operator==="&&")return ws(le)?X():t(le);if(O.operator==="||")return ws(le)?t(le):X();return Et(le)?X():t(le)})}case"ConditionalExpression":{let X=Ct(i(O.test,G));if(X==="truthy")return i(O.consequent,G);if(X==="falsy")return i(O.alternate,G);return r(i(O.consequent,G),i(O.alternate,G))}case"UnaryExpression":switch(O.operator){case"void":return n;case"typeof":return ap(i(O.argument,G));case"!":return bp(i(O.argument,G),!0);default:return e}case"BinaryExpression":return Ki(O.operator,i(O.left,G),i(O.right,G));case"SequenceExpression":return i(O.expressions[O.expressions.length-1],G);case"CallExpression":return dy(O,G);case"MemberExpression":return Cy(O,G);case"ChainExpression":return i(O.expression,G);case"ArrayExpression":if(O.elements.length===0)return t(Mt);if(O.elements.length>io||O.elements.some((X)=>X?.type==="SpreadElement"))return t(dt);return t(bn({kind:"array",elements:O.elements.map((X)=>X?i(X,G):n)}));case"ObjectExpression":return Ny(O,G);case"ArrowFunctionExpression":case"FunctionExpression":case"ClassExpression":case"NewExpression":return t(dt);default:return e}}function dy(O,G){let{callee:H,arguments:X}=O,le=_s(O,G);if(le)return my(O,le,G);if(H.type!=="Identifier"||G.model.unknownNames.has(H.name)||Cs(H,G))return e;let[we]=X,ke=()=>we&&we.type!=="SpreadElement"?i(we,G):e;switch(H.name){case"Boolean":return bp(ke(),!1);case"String":return Gi(ke());case"getContext":{let Ce=Di(we,G.model);return Ce===void 0?e:G.context(Ce)}}if(G.model.storeImports.get(H.name)==="readable"&&X.length<=1)return bs(we?ke():n);let ve=wy(H.name,G);if(ve)return fp(ve,X,G,G);let Ee=G.model.importedHelpers.get(H.name)?.();if(!Ee)return e;return fp(Ee.fn,X,G,ti(Ee.model,ei(),()=>e))}var Sp=new Map([["abs",Math.abs],["ceil",Math.ceil],["floor",Math.floor],["max",Math.max],["min",Math.min],["round",Math.round],["sign",Math.sign],["trunc",Math.trunc]]),co=(O)=>O===Mt||h(O)&&O.kind==="array";function _s(O,G){let{callee:H}=O;if(H.type!=="MemberExpression"||H.computed||H.optional||H.property.type!=="Identifier"||O.arguments.some((ke)=>ke.type==="SpreadElement"))return;let X=H.property.name,{object:le}=H;if(le.type==="Identifier"){let ke=!G.model.scopes.bindingOf(le);if(ke&&le.name==="Array"&&X==="isArray")return{kind:"isArray",name:X};if(ke&&le.name==="Math"&&Sp.has(X))return{kind:"math",name:X}}if(!vs.has(X))return;if(le.type==="Super"||O.arguments.length!==1)return;if(X!=="includes"&&!Zr(O.arguments[0]))return;let we=i(le,G);if(we===e||![...we].every((ke)=>co(ke)||X==="includes"&&typeof ke==="string"))return;return{kind:X,arrays:[...we]}}function my(O,G,H){let X=O.arguments;switch(G.kind){case"isArray":{let le=X[0]?i(X[0],H):n;return vt(le,(we)=>co(we)?t(!0):we===dt?ji:t(!1))}case"math":return xy(Sp.get(G.name),X.map((le)=>i(le,H)));case"includes":{let le=i(X[0],H);if(le===e)return e;let we=t();for(let ke of G.arrays)we=r(we,typeof ke==="string"?vy(ke,le):by(hp(ke),le));return we}case"some":case"every":{let le=X[0],we=eo(le),[ke]=le.params,ve=G.kind==="some"?"truthy":"falsy",Ee=t();for(let Ce of G.arrays){let Ae=!1,Te=!1;for(let Ne of hp(Ce)){let Pe=yy(H,ke,Ne,()=>Ct(i(we,H)));if(Pe===ve)Ae=!0;else if(Pe==="either")Te=!0}Ee=r(Ee,Ae?t(G.kind==="some"):Te?ji:t(G.kind==="every"))}return Ee}}}function hp(O){return h(O)&&O.kind==="array"?O.elements:[]}function yy(O,G,H,X){let le=O.locals,we=new Map(le);if(G)gi(G,H,we,O);O.locals=we;try{return X()}finally{O.locals=le}}var gy=32;function xy(O,G){let H=[[]];for(let X of G){if(X===e)return e;let le=[];for(let we of X){if(typeof we!=="number")return e;for(let ke of H)le.push([...ke,we])}if(le.length>gy)return e;H=le}return t(...H.map((X)=>O(...X)))}function vy(O,G){return vt(G,(H)=>typeof H==="string"?t(O.includes(H)):e)}function by(O,G){return vt(G,(H)=>{if(a(H))return ji;let X=!1;for(let le of O){if(le===e){X=!0;continue}let we=[...le].filter((ke)=>!a(ke)&&Sy(ke,H));if(we.length===le.size)return t(!0);if(we.length>0)X=!0}return X?ji:t(!1)})}function Sy(O,G){return O===G||Number.isNaN(O)&&Number.isNaN(G)}function wy(O,G){let{model:H,usage:X}=G,le;if(H.props.has(O)){if(X.open||X.props.has(As(O,H)))return;le=H.props.get(O)}else{let we=H.declarations.get(O);le=we===Bi?H.functions.get(O):we}if((le?.type==="ArrowFunctionExpression"||le?.type==="FunctionExpression"||le?.type==="FunctionDeclaration")&&!le.async&&!le.generator)return le;return}var ky=8,oo=0;function fp(O,G,H,X){if(G.some((Ce)=>Ce.type==="SpreadElement"))return e;let le=`call:${X.model.key}:${O.start}`;if(X.pending.has(le)||oo>=ky)return e;let we=G.map((Ce)=>i(Ce,H)),ke=`${le}(${we.map(yi).join(",")})`,ve=H.memo.get(ke);if(ve!==void 0)return ve;let Ee=Ey(O,we,X,le);return H.memo.set(ke,Ee),Ee}function Ey(O,G,H,X){let le=H.locals,we=new Map(le);H.locals=we,H.pending.add(X),oo++;try{for(let[ve,Ee]of O.params.entries()){let Ce=G[ve]??n;if(!Es(Ee,Ce,we,H))return e}if(O.body.type!=="BlockStatement")return i(O.body,H);let ke=t();for(let ve of O.body.body)switch(ve.type){case"ReturnStatement":return r(ke,ro(ve,H));case"VariableDeclaration":{if(ve.kind!=="const")return e;for(let Ee of ve.declarations)if(!Ee.init||!Es(Ee.id,i(Ee.init,H),we,H))return e;break}case"IfStatement":{let Ee=dp(ve.consequent),Ce=ve.alternate?dp(ve.alternate):null;if(!Ee||Ce===void 0)return e;let Ae=Ct(i(ve.test,H));if(Ae!=="falsy"){if(ke=r(ke,ro(Ee,H)),Ae==="truthy")return ke}if(Ce)return r(ke,ro(Ce,H));break}default:return e}return r(ke,n)}finally{oo--,H.pending.delete(X),H.locals=le}}function dp(O){if(O.type==="ReturnStatement")return O;if(O.type==="BlockStatement"&&O.body.length===1){let[G]=O.body;if(G.type==="ReturnStatement")return G}return}function ro(O,G){return O.argument?i(O.argument,G):n}function Es(O,G,H,X){switch(O.type){case"Identifier":{let le=X.model.scopes.bindingOf(O);if(!le)return!1;return H.set(le,gp(G)),!0}case"AssignmentPattern":return Es(O.left,xp(G,O.right,X),H,X);case"ObjectPattern":for(let le of O.properties){if(le.type!=="Property"||le.computed||le.key.type!=="Identifier")return!1;let we=le.key.name,ke=vt(G,(ve)=>Et(ve)?t():qi(ve,we));if(!Es(le.value,ke,H,X))return!1}return!0;default:return!1}}function Cy(O,G){let{object:H,property:X,computed:le,optional:we}=O;if(H.type==="Identifier"){if(H.name==="$$slots"&&!le&&X.type==="Identifier"){let{usage:Ce}=G;if(Ce.open||Ce.slotsUnknown)return e;return Ce.slots.get(X.name)??n}if(kn(H,G)){let Ce=xs(O);if(Ce===void 0)return e;let Ae=vp(G,H.name);if(!Ae)return e;let Te=Ae.get(Ce);if(!Te)return n;return Te.maybeAbsent?r(Te.value,n):Te.value}}if(H.type==="Super")return e;let ke=i(H,G);if(we&&ke!==e&&ke.size===1&&ke.has(void 0))return n;let ve=le?Ay(i(X,G)):X.type==="Identifier"?[X.name]:void 0;if(ve===void 0)return e;let Ee=Jr.has(O);return vt(ke,(Ce)=>{if(we&&Et(Ce))return n;if(Ee&&Et(Ce))return t();let Ae=t();for(let Te of ve)Ae=r(Ae,qi(Ce,Te));return Ae})}function Ay(O){if(O===e)return;let G=[];for(let H of O){if(a(H))return;G.push(String(H))}return G.length>0?G:void 0}function Ny(O,G){if(O.properties.length>io)return t(dt);let H=new Map;for(let X of O.properties){if(X.type!=="Property"||X.kind!=="init")return t(dt);let le=w(X);if(le===void 0||le==="__proto__")return t(dt);H.set(le,i(X.value,G))}return t(bn({kind:"object",props:H}))}var wp=new WeakMap;function Ts(O){let G=wp.get(O);if(!G)G=_y(O),wp.set(O,G);return G}function Is(O,G){let H=new Set;for(let X of O.reads){let{property:le}=X;if(!X.computed){if(le.type!=="Identifier")return null;H.add(le.name);continue}let we=i(le,G);if(we===e)return null;for(let ke of we){if(typeof ke==="symbol"||typeof ke==="object"&&ke!==null)return null;H.add(String(ke))}}return H}function _y(O){let G=new Map,{ast:H,scopes:X}=O,we=[...H.module?.content.body??[],...H.instance?.content.body??[]].flatMap((ve)=>ve.type==="VariableDeclaration"&&ve.kind==="const"?ve.declarations:[]);if(we.length===0)return G;let ke=new Set;if(u(H.fragment,{enter(ve){if(ve.type==="SvelteComponent")ke.add(ve.expression)}}),ke.size===0)return G;for(let{id:ve,init:Ee}of we){if(ve.type!=="Identifier"||Ee?.type!=="ObjectExpression")continue;let Ce=new Map,Ae=new Map,Ne=Ee.properties.every((Le)=>{if(Le.type!=="Property"||Le.kind!=="init"||Le.computed||Le.method||Le.value.type!=="Identifier")return!1;let{key:qe,value:Ge}=Le,Je=qe.type==="Identifier"?qe.name:qe.type==="Literal"&&(typeof qe.value==="string"||typeof qe.value==="number")?String(qe.value):void 0,Xe=O.componentImports.get(Ge.name);if(Je===void 0||Je==="__proto__"||Ce.has(Je)||Xe===void 0||X.bindingOf(Ge)?.kind!=="import")return!1;return Ce.set(Je,Xe),Ae.set(Je,Le),!0})?X.bindingOf(ve):null;if(!Ne||Ne.references.length===0)continue;let Pe=[];if(Ne.references.every(({parent:Le,node:qe})=>{if(Le.type!=="MemberExpression"||Le.object!==qe||!ke.has(Le))return!1;return Pe.push(Le),!0}))G.set(Ee,{entries:Ce,properties:Ae,reads:Pe})}return G}function Ty(O){return vt(O,(G)=>Et(G)?t(""):a(G)?e:t(String(G)))}function Yi(O,G){let{tokens:H}=G;if(!H||!O.includes(H.marker))return;for(let X of H.text(O))if(X.endsWith("-"))G.prefixes.add(X);else G.classes.add(X)}function Y(O,G,H){let X={classes:new Set,prefixes:new Set,childSites:[],tokens:q(G.spec),library:G,calls:H},{ast:le}=O.model;for(let we of[le.module,le.instance,le.fragment])if(we)Ot(we,O,X);return X}function kp(O,G,H){for(let X of O)Ot(X,G,H)}function Ot(O,G,H){switch(O.type){case"ImportDeclaration":return;case"Literal":if(typeof O.value==="string")Yi(O.value,H);return;case"TemplateLiteral":{let X=H.tokens?.marker;if(X!==void 0&&O.quasis.some((le)=>le.value.raw.includes(X))){let le=i(O,G);if(le!==e){for(let we of le)if(typeof we==="string")Yi(we,H);kp(O.expressions,G,H);return}}break}case"Attribute":{let X=H.tokens?.marker,le=Array.isArray(O.value)?O.value:[];if(X===void 0||!le.some((ke)=>ke.type==="ExpressionTag")||!le.some((ke)=>ke.type==="Text"&&ke.data.includes(X)))break;let we=t("");for(let ke of le)we=Ki("+",we,ke.type==="Text"?t(ke.data):Ty(i(ke.expression,G)));if(we===e)break;for(let ke of we)if(typeof ke==="string")Yi(ke,H);for(let ke of le)if(ke.type==="ExpressionTag")Ot(ke,G,H);return}case"TemplateElement":Yi(O.value.raw,H);return;case"Text":Yi(O.data,H);return;case"Identifier":{let X=G.model.componentImports.get(O.name);if(X)H.childSites.push(po(X));if(G.model.memberImports.has(O.name))throw new xn(`${G.model.key} uses \`${O.name}\`, an object of components, as a value`);return}case"ObjectExpression":{let X=Ts(G.model).get(O);if(!X)break;let le=Is(X,G);for(let[we,ke]of X.entries)if(!le||le.has(we))H.childSites.push(po(ke));return}case"MemberExpression":{let{object:X,property:le}=O;if(X.type!=="Identifier")break;let we=G.model.memberImports.get(X.name);if(!we||O.computed||le.type!=="Identifier")break;let ke=Ri(we,[le.name]);if(ke.kind==="component")H.childSites.push(po(ke.key));else if(ke.kind!=="value")throw new xn(`${G.model.key} uses \`${X.name}.${le.name}\`, which couldn't be resolved, as a value`);return}case"LogicalExpression":{Ot(O.left,G,H);let X=i(O.left,G),le=Ct(X);if(!(O.operator==="&&"&&le==="falsy"||O.operator==="||"&&le==="truthy"||O.operator==="??"&&Sn(X)))Ot(O.right,G,H);return}case"ConditionalExpression":case"IfStatement":case"IfBlock":{Ot(O.test,G,H);let X=Ct(i(O.test,G));if(X!=="falsy")Ot(O.consequent,G,H);if(X!=="truthy"&&O.alternate)Ot(O.alternate,G,H);return}case"EachBlock":{if(Ot(O.expression,G,H),!zi(i(O.expression,G))){let X=Hi(O,G);try{if(O.key)Ot(O.key,G,H);Ot(O.body,G,H)}finally{X()}}if(O.fallback)Ot(O.fallback,G,H);return}case"ClassDirective":{if(Ot(O.expression,G,H),Ct(i(O.expression,G))!=="falsy")Yi(O.name,H);return}case"Component":{let X=Iy(O.name,G,H.library);if(!X)break;let le=Ep(O,X,G);if(le.open&&le.reason)le.reason=`${Cp(O,G)} ${le.reason}`;H.childSites.push(le);break}case"SvelteSelf":H.childSites.push(Ep(O,G.model.key,G));break;case"CallExpression":if(H.calls?.watched.has(O))H.calls.call(O);break}kp(Me(O),G,H)}function po(O){return{component:O,open:!0,props:new Map,slots:null}}function Ep(O,G,H){return fo(O,G,{value:(X)=>i(X,H),spread:(X)=>Xi(X,H),explain:$y(O,H),instance:(X)=>ho(X,H.model.scopes),forwards:(X)=>Ai(H.usage,X)})}function Iy(O,G,H){let{model:X}=G,[le,...we]=O.split("."),ke=X.memberImports.get(le);if(ke){let Ee=Ri(ke,we);if(Ee.kind==="component")return Ee.key;if(Ee.kind==="value")return}else{let Ee=we.length===0?X.componentImports.get(O):void 0;if(Ee)return Ee;if(!X.otherImports.has(le))return}let ve=X.packageImports.get(le);if(ve!==void 0&&!H.isSpecifier(ve))return;throw new xn(`${X.key} renders <${O}>, which couldn't be resolved`)}function Cp(O,G){return`${G.model.key.split("/").pop()}:${C(G.model.code,O.start).line}`}function $y(O,G){return(H)=>{let X=Ns(H,G);return()=>{let le=X();return le&&`${Cp(O,G)} ${le}`}}}var My=32;function Py(O,G){let{value:H}=O;if(H===!0)return t(!0);if(!Array.isArray(H))return G(H.expression);if(H.length===1&&H[0].type==="ExpressionTag"){let le=G(H[0].expression);return r(le,Gi(le))}let X=new Set([""]);for(let le of H){let we=le.type==="Text"?t(le.data):Gi(G(le.expression));if(we===e)return e;let ke=new Set;for(let ve of X)for(let Ee of we)ke.add(ve+String(Ee));if(ke.size>My)return e;X=ke}return X}var Ry=/^\s*$/;function Ly(O){let G=new Set,H=[],X=!1;for(let le of O.nodes){if(le.type==="Comment")continue;if(le.type==="Text"&&Ry.test(le.data))continue;if(le.type==="SnippetBlock"){let{name:ve}=le.expression;H.push(ve),G?.add(ve==="children"?"default":ve);continue}let we="attributes"in le?le.attributes.find((ve)=>ve.type==="Attribute"&&ve.name==="slot"):void 0;if(!we){X=!0,G?.add("default");continue}let ke=Array.isArray(we.value)?we.value:null;if(ke?.length===1&&ke[0].type==="Text")G?.add(ke[0].data);else G=null}return{slots:G,snippets:H,children:X}}function uo(O){return O.why??=new Map,O.why}function Oy(O,G){let{value:H}=O,le=(H===!0?[]:Array.isArray(H)?H:[H]).flatMap((we)=>we.type==="Text"?[]:[G(we.expression)]);return()=>{for(let we of le){let ke=we();if(ke)return ke}return}}var Vy=new Set(["$destroy","$on"]);function ho(O,G){if(O.type!=="Identifier")return null;let H=G.bindingOf(O);if(!H)return null;let X=new Set;for(let{node:le,parent:we,mutates:ke}of H.references){if(ke)return null;switch(we.type){case"BindDirective":if(we.name==="this"&&we.expression===le)continue;return null;case"MemberExpression":{let{property:ve}=we;if(we.object!==le||we.computed||ve.type!=="Identifier"||ve.name.startsWith("$")&&!Vy.has(ve.name))return null;X.add(ve.name);continue}case"AssignmentExpression":if(we.left===le&&we.operator==="=")continue;return null;case"LogicalExpression":if(we.left===le&&we.operator==="&&")continue;return null;case"IfStatement":case"IfBlock":case"ConditionalExpression":if(we.test===le)continue;return null;case"UnaryExpression":case"BinaryExpression":continue;default:return null}}return X}function fo(O,G,{value:H,spread:X,explain:le,instance:we,forwards:ke}){let{slots:ve,snippets:Ee,children:Ce}=Ly(O.fragment),Ae=new Set,Te={component:G,open:!1,props:new Map,slots:ve,...Ce&&{children:Ce},events:Ae};for(let Ne of O.attributes)switch(Ne.type){case"OnDirective":if(Ne.expression||ke(Ne.name))Ae.add(Ne.name);break;case"SpreadAttribute":{let Pe=X(Ne.expression);if(!Pe){Te.open=!0,Te.reason="spreads props";break}for(let[Oe,{value:Le,maybeAbsent:qe,why:Ge}]of Pe){if(Oe==="slot"||Oe.startsWith("--"))continue;let Je=Te.props.get(Oe);if(Te.props.set(Oe,qe?r(Je??n,Le):Le),Le===e&&Ge)uo(Te).set(Oe,Ge)}break}case"Attribute":{if(Ne.name==="slot"||Ne.name.startsWith("--"))break;let Pe=Py(Ne,H);if(Te.props.set(Ne.name,Pe),Pe===e)uo(Te).set(Ne.name,Oy(Ne,le));break}case"BindDirective":{if(Ne.name==="this"){Te.instance=we(Ne.expression);break}Te.props.set(Ne.name,e);let Pe=le(Ne.expression);uo(Te).set(Ne.name,()=>Pe()??"is bound with `bind:`");break}}for(let Ne of Ee)Te.props.set(Ne,t(dt));return Te}var Fy=/setContext\(\s*["']([^"']+)["']/g,Uy=/\bget(?:All)?Contexts?\(/,jy=/setContext\(\s*(?!["'][^"']*["']\s*[,)])/,Ap=new Map;async function Wy(O){let G=await S(O.root,O.spec.srcDir),H=Ap.get(O.src);if(H?.signature===G)return H.sources;let X=await qy(O);return Ap.set(O.src,{signature:G,sources:X}),X}async function qy(O){let{src:G}=O,H={scriptTokens:new Set,componentContexts:new Set,scriptContexts:new Set,unknownScriptContext:!1,scriptReadsContext:!1,scriptContextReads:new Set},X=await v(G),le=await Promise.all(X.map((we)=>Dy(By.join(G,we),"utf8")));for(let[we,ke]of X.entries()){let ve=le[we],Ee=ke.endsWith(".js");if(Ee){if(q(O.spec)?.script(ve,H.scriptTokens),Uy.test(ve)){let Ae=_(G,ke);if(!Ae||Ae.readsUnknownContext)H.scriptReadsContext=!0;else for(let Te of Ae.contextLeaks.keys())H.scriptContextReads.add(Te)}}for(let Ae of ve.matchAll(Fy))(Ee?H.scriptContexts:H.componentContexts).add(Ae[1]);if(!jy.test(ve))continue;let Ce=Ee?_(G,ke):ue(G,ke);if(Ee&&(!Ce||Ce.providesUnknownContext))H.unknownScriptContext=!0;for(let Ae of Ce?.providedContexts??[])(Ee?H.scriptContexts:H.componentContexts).add(Ae)}return H}var zy=16;function Ky(O,G,H,X,le){let we=new Map,ke=new Map;for(let Ee of le)ke.set(Ee,new Set(["*"]));for(let Ee of G.keys()){let Ce=O(Ee);if(Ce.readsUnknownContext)return we;for(let[Ae,Te]of Ce.contextLeaks){let Ne=ke.get(Ae)??new Set;for(let Pe of Te)Ne.add(Pe);ke.set(Ae,Ne)}}let ve=new Set;for(let[Ee,Ce]of G){let Ae=O(Ee);if(Ae.contextObjects.size===0)continue;let Te=ti(Ae,Ce,H,{svelteMajor:X});for(let[Ne,Pe]of Ae.contextObjects){let Oe=ke.get(Ne);if(!Pe.every((qe)=>qe!==null)){ve.add(Ne);continue}if(Pe.some((qe)=>qe?.unlessProvided.some((Ge)=>{let Je=H(Ge);return Je===e||![...Je].every(Et)}))){ve.add(Ne);continue}let Le=we.get(Ne)??n;for(let qe of Pe){let Ge=new Map;for(let[Je,Xe]of qe.properties){let Ke=Xe&&(Xe.readOnly&&Xe.aliases.length===0||![Je,...Xe.aliases].some((et)=>Oe?.has("*")||Oe?.has(et)));Ge.set(Je,Ke?Gy(Xe,Te):e)}Le=r(Le,t(bn({kind:"object",props:Ge})))}we.set(Ne,Le)}}for(let Ee of ve)we.delete(Ee);return we}function Gy(O,G){let H=O.initial?i(O.initial,G):n;for(let X of O.writes)H=r(H,i(X,G));return bs(H)}function Hy(O,G){if(O.size!==G.size)return!1;for(let[H,X]of O){let le=G.get(H);if(!le||!op(X,le))return!1}return!0}function Xy(O,G,H){let{svelteMajor:X}=H,le=new Set,we=new Set,ke=(ve)=>{for(let Ee of ve.classes)le.add(Ee);for(let Ee of ve.prefixes)we.add(Ee)};for(let[ve,Ee]of O.sites){let Ce=O.live.get(ve);if(Ee.length===1&&Ce){ke(Ce);continue}let Ae=G(ve);for(let Te of Ee){let Ne=ei();wn(Ne,Te,Ae.propNames.values(),X),ke(Y(ti(Ae,Ne,O.resolver,{svelteMajor:X}),H))}}return{classes:le,prefixes:we}}function Yy(O,G,H,X,le,we,ke){let{svelteMajor:ve}=ke,Ee={keys:new Set,unknown:!1,values:new Map};for(let Ce=0;;Ce++){let Ae=new Map,Te=new Map,Ne=new Map,Pe=new Set,Oe=H(Ee),Le=(Ge)=>{let Je=O(Ge.component),Xe=Ae.get(Ge.component);if(!Xe)Xe=ei(),Ae.set(Ge.component,Xe);if(X.has(Ge.component)&&!Ge.open)Ge={...Ge,open:!0,reason:"excluded"};Ge=ks(Ge,Je);let Ke=Ne.get(Ge.component);if(!Ke)Ke=[],Ne.set(Ge.component,Ke);if(Ke.push(Ge),wn(Xe,Ge,Je.propNames.values(),ve))Pe.add(Ge.component)};for(let Ge of G)Le(Ge);for(let Ge of Pe){Pe.delete(Ge);let Je=O(Ge),Xe=Ae.get(Ge);if(!Xe)continue;let Ke=Y(ti(Je,Xe,Oe,{svelteMajor:ve}),ke);Te.set(Ge,Ke);for(let et of Ke.childSites)Le(et)}let qe={keys:new Set(Ee.keys),unknown:Ee.unknown,values:le&&Ce<zy?Ky(O,Ae,Oe,ve,we):new Map};for(let Ge of Ae.keys()){let Je=O(Ge);for(let Xe of Je.providedContexts)qe.keys.add(Xe);qe.unknown||=Je.providesUnknownContext}if(qe.keys.size===Ee.keys.size&&qe.unknown===Ee.unknown&&Hy(Ee.values,qe.values))return{usages:Ae,resolver:Oe,live:Te,sites:Ne};Ee=qe}}function Np(O,G){for(let H of G)if(O.startsWith(H))return!0;return!1}async function mo(O){let{library:G}=O;Zc();let H=await Wy(G),X=O.options??{},le=new Map,we=(Xe)=>{let Ke=le.get(Xe);if(!Ke)Ke=ue(G.src,Xe),le.set(Xe,Ke);return Ke},ke=new Set((X.exclude??[]).flatMap((Xe)=>{let Ke=G.components.get(Xe);return Ke?[Ke]:[]})),ve=new Map;for(let[Xe,Ke]of Object.entries(X.assume??{})){let et=G.components.get(Xe);if(!et)continue;ve.set(et,new Map(Object.entries(Ke).map(([gt,Ht])=>[gt,t(...Ht)])))}let Ee=[],Ce=new Set,Ae=!1,Te=!1,Ne=!1;for(let Xe of O.modules){Ne||=Xe.openAll;for(let Ke of Xe.providedContexts)Ce.add(Ke);Ae||=Xe.providesUnknownContext===!0,Te||=Xe.readsLibraryContext===!0;for(let Ke of Xe.sites){let et=ve.get(Ke.component);if(et&&!Ke.open){let gt=new Map(Ke.props);for(let[Ht,rt]of et)if(gt.get(Ht)===e)gt.set(Ht,rt);Ee.push({...Ke,props:gt})}else Ee.push(Ke)}}if(Ne)for(let Xe of O.bundled)Ee.push({component:Xe,open:!0,props:new Map,slots:null});let Pe=Ae||H.unknownScriptContext,Oe=Yy(we,Ee,(Xe)=>(Ke)=>{if(Xe.unknown||Pe||Ce.has(Ke)||H.scriptContexts.has(Ke)||!H.componentContexts.has(Ke))return e;if(!Xe.keys.has(Ke))return n;return Xe.values.get(Ke)??e},ke,!H.scriptReadsContext&&!Te,H.scriptContextReads,G),Le=[...H.scriptTokens].filter((Xe)=>Xe.endsWith("-")),qe=new Map,Ge,Je=(Xe)=>{let Ke=qe.get(Xe);if(Ke===void 0)Ge??=Xy(Oe,we,G),Ke=!Ge.classes.has(Xe)&&!Np(Xe,Ge.prefixes)&&!H.scriptTokens.has(Xe)&&!Np(Xe,Le),qe.set(Xe,Ke);return Ke};return{liveComponents:new Set(Oe.usages.keys()),usages:Oe.usages,isPruned:Je,scopeFor(Xe){let Ke=Oe.usages.get(Xe);return Ke?ti(we(Xe),Ke,Oe.resolver,{svelteMajor:G.svelteMajor}):void 0}}}import Vt from"node:path";function yo(O,G,H){if(G?.openAll)return!0;let X=G?.libraryImports;if(!X)return!1;return H===O.barrelKey?X.barrel:X.components.has(H)}function Tp(O,G){let H=new Map,X=new Set;for(let le of O){X.add(le);let we=Vt.basename(le),ke=H.get(we);if(ke)ke.push(le);else H.set(we,[le])}return{files:X,byName:H,resolved:G}}function En(O){return Vt.isAbsolute(O)}function go(O,{from:G,apps:H},X){if(X.startsWith(O.srcPrefix))return;let le=X.startsWith("."),we=Vt.posix.basename(X);if(X.endsWith(".svelte")){if(le){let Ce=Vt.resolve(Vt.dirname(G),X);return H.files.has(Ce)?{keys:[Ce],exact:!0}:void 0}let ve=H.resolved?.get(pe(G,X));if(ve&&H.files.has(ve))return{keys:[ve],exact:!0};let Ee=H.byName.get(we);return Ee?{keys:Ee,exact:!1}:void 0}let ke;if(le){let ve=Vt.resolve(Vt.dirname(G),X);ke=[`${ve}.svelte`,Vt.join(ve,"index.svelte")].filter((Ee)=>H.files.has(Ee))}else ke=[...H.byName.get(`${we}.svelte`)??[],...(H.byName.get("index.svelte")??[]).filter((ve)=>Vt.basename(Vt.dirname(ve))===we)];return ke.length>0?{keys:ke,exact:!1}:void 0}function xo(O,G,H,X,le){for(let{kind:we,source:ke,start:ve,end:Ee}of O){if(we==="glob"){X.openApps=!0;continue}if(ke===null){if(X.openApps=!0,H.patterns.argument.test(G.slice(ve,Ee)))X.openAll=!0;continue}if(ke===H.name)X.openAll=!0,X.libraryImports.barrel=!0;let Ce=H.patterns.directComponentPath.exec(ke)?.[1];if(Ce)X.dynamic.push(Ce),X.libraryImports.components.add(Ce);else if(ke!==H.name&&H.isSpecifier(ke))X.anyValue=!0;let Ae=le&&go(H,le,ke);if(Ae)X.openAppComponents.push(...Ae.keys)}}var Qy=/\.[cm]?[jt]sx?$/,_p=/\s+as\s+/,Jy=/(["'])([^"'\n]+\.svelte)\1/g;function $s(O,G){let H=O.spec.contextKeyPrefix,X=G.includes(H)?[...G.matchAll(O.patterns.contextKey)].map((we)=>we[2]):[],le=()=>O.patterns.scriptSpecifier.test(G);return{providedContexts:new Set(X),providesUnknownContext:G.includes("setContext")&&(le()||G.split(H).length-1>X.length),readsLibraryContext:G.includes("getAllContexts")||G.includes("getContext")&&(G.includes(H)||le())}}function vo(){return{components:new Map,appComponents:new Set,exports:new Map,objects:new Set,reExported:[],dynamic:[],openAll:!1,openAppComponents:[],openApps:!1,libraryImports:{components:new Set,barrel:!1},values:new Set,anyValue:!1}}function Ip(O){return O.anyValue?"any":O.values}function $p(O,G,H,X){if(!O.includes(G.name)&&!(X&&(O.includes("import")||O.includes("export"))))return;for(let le of c(O)){let we=le.source?.value;if(!we||le.typeOnly)continue;let ke=we===G.name,ve=G.patterns.directComponentPath.exec(we)?.[1],Ee=X&&go(G,X,we);if(ke)H.libraryImports.barrel=!0;if(ve)H.libraryImports.components.add(ve);if(!ke&&!ve&&G.isSpecifier(we)&&!B.test(we))H.anyValue=!0;if(le.kind==="export"){for(let Ae of le.specifiers){if(Ae.typeOnly)continue;if(ke&&Ae.kind!=="named")H.openAll=!0;let Te=ke?G.exportOf(Ae.local):null;if(Te&&Te.kind!=="component"){if(Te.kind!=="value")H.openAll=!0;else H.values.add(Ae.local);continue}let Ne=Te?Te.key:ve;if(Ne)H.reExported.push(Ne),H.libraryImports.components.add(Ne)}if(Ee)H.openAppComponents.push(...Ee.keys);continue}let Ce=G.patterns.componentSource.test(we);for(let Ae of le.specifiers){if(Ae.typeOnly)continue;if(Ce)H.objects.add(Ae.local);if(Ee)if(Ee.exact&&Ae.kind==="default")H.components.set(Ae.local,Ee.keys[0]),H.appComponents.add(Ae.local);else H.openAppComponents.push(...Ee.keys);else if(ke){if(Ae.kind==="namespace")H.anyValue=!0;let Te=Ae.kind==="namespace"?{kind:"members",member:(Ne)=>G.exportOf(Ne)}:G.exportOf(Ae.imported);if(Te.kind==="component")H.components.set(Ae.local,Te.key),H.libraryImports.components.add(Te.key);else if(Te.kind!=="value")H.exports.set(Ae.local,Te);else H.values.add(Ae.imported)}else if(ve&&Ae.kind==="default")H.components.set(Ae.local,ve)}}}function qt(O,G,H,X=1){return{component:O,open:!0,props:new Map,slots:null,location:{file:G,line:X},reason:H}}function Zy(O,G,H,X){let le=vo(),we=X&&{from:G,apps:X};return $p(O,H,le,we),xo(P(O),O,H,le,we),{sites:[...le.components.values(),...le.reExported,...le.dynamic,...le.openAppComponents].map((ke)=>qt(ke,G,"used from a script module")),openAll:le.exports.size>0||le.openAll,openApps:le.openApps,...$s(H,O),file:G,libraryImports:le.libraryImports,libraryValues:Ip(le)}}function Mp(O,G,H,X,le){let we=vo(),ke=le&&{from:G,apps:le};xo(xe(O),O,H,we,ke);let ve=new Set,Ee={sites:we.dynamic.map((Ae)=>qt(Ae,G,X)),openAll:we.openAll,...$s(H,O),file:G,libraryImports:we.libraryImports,libraryValues:ve};if(ke){Ee.openApps=we.openApps;for(let Ae of O.matchAll(Jy))for(let Te of go(H,ke,Ae[2])?.keys??[])Ee.sites.push(qt(Te,G,X,C(O,Ae.index).line));for(let Ae of we.openAppComponents)Ee.sites.push(qt(Ae,G,X))}if(!O.includes(H.name))return Ee;let Ce=new Set;for(let Ae of O.matchAll(H.patterns.barrelImport)){if(Ce.add(Ae.index+Ae[0].length-H.name.length-2),Ae[1])continue;for(let Te of Ae[2].split(",")){let Ne=Te.trim();if(Ne===""||Ne.startsWith("type "))continue;let Pe=H.exportOf(Ne.split(_p)[0]);if(Pe.kind==="component")Ee.sites.push(qt(Pe.key,G,X,C(O,Ae.index).line)),we.libraryImports.components.add(Pe.key);else if(Pe.kind!=="value")Ee.openAll=!0;else ve.add(Ne.split(_p)[0])}}if(H.patterns.valueSubpath.test(O))Ee.libraryValues="any";for(let Ae of O.matchAll(H.patterns.barrelSpecifier))if(we.libraryImports.barrel=!0,!Ce.has(Ae.index))Ee.openAll=!0;for(let Ae of O.matchAll(H.patterns.directComponentSpecifier))Ee.sites.push(qt(Ae[1],G,X,C(O,Ae.index).line)),we.libraryImports.components.add(Ae[1]);return Ee}function Pp(O,G,H,X){if(G.endsWith(".svelte"))return So(O,G,H,{apps:X});if(Qy.test(G))return Zy(O,G,H,X);return Mp(O,G,H,"not a Svelte or script file",X)}function eg(O,G,H,X,le,we){let ke;try{let ve=we.model??Fi(O,H,void 0,G),Ee=we.usage??ei(!0);ke=bo(ve,H,Ee,we.constants,le)}catch{}return{value:(ve)=>{if(ve.type==="Identifier"&&X.has(ve.name))return t(dt);return ke?i(ve,ke):ng(ve,X)},spread:(ve)=>ke?Xi(ve,ke):void 0,explain:(ve)=>ke?Ns(ve,ke):()=>"isn't a literal",bindEach:(ve)=>ke?Hi(ve,ke):()=>{},instance:(ve)=>ke?ho(ve,ke.model.scopes):null,forwards:(ve)=>!ke||Ai(ke.usage,ve)}}function bo(O,G,H,X,le){return ti(O,H,()=>e,{imported:ig(O,G,X),svelteMajor:le.svelteMajor})}var tg=["",".ts",".js",".mts",".mjs","/index.ts","/index.js"];function ig(O,G,H){let X=new Map;if(!H)return X;for(let le of[O.ast.module,O.ast.instance])for(let we of le?.content.body??[]){if(we.type!=="ImportDeclaration")continue;let ke=String(we.source.value);if(!ke.startsWith("."))continue;let ve=Vt.resolve(Vt.dirname(G),ke),Ee=tg.map((Ce)=>H(ve+Ce)).find(Boolean);if(!Ee)continue;for(let Ce of we.specifiers){if(Ce.type!=="ImportSpecifier"||Ce.imported.type!=="Identifier")continue;let Ae=Ee.get(Ce.imported.name);if(Ae)X.set(Ce.local.name,Ae)}}return X}function ng(O,G){switch(O.type){case"Literal":if("regex"in O&&O.regex)return t(dt);return typeof O.value==="bigint"?e:t(O.value);case"TemplateLiteral":return O.expressions.length===0?t(O.quasis[0].value.cooked??""):e;case"Identifier":if(O.name==="undefined")return n;return G.has(O.name)?t(dt):e;case"ArrayExpression":return t(O.elements.length===0?Mt:dt);case"ObjectExpression":case"ArrowFunctionExpression":case"FunctionExpression":return t(dt);default:return e}}function sg(O,G){let H=G.replaceAll("$","\\$");return(O.match(new RegExp(`(?<![\\w$])${H}(?![\\w$])`,"g"))?.length??0)>1}function So(O,G,H,X={}){let{apps:le}=X;if(!le&&!O.includes(H.name))return{sites:[],openAll:!1,...$s(H,O),file:G};let we;try{we=X.model?.ast??N(O,{comments:!1,css:!1})}catch{return Mp(O,G,H,"could not be parsed",le)}let ke=vo(),ve=le&&{from:G,apps:le};for(let Le of[we.module,we.instance])if(Le)$p(O.slice(Le.content.start,Le.content.end),H,ke,ve);xo(te(O,[we.module,we.instance].flatMap((Le)=>Le?[Le.content]:[])),O,H,ke,ve);let Ee={sites:[...ke.reExported.map((Le)=>qt(Le,G,"re-exported")),...ke.dynamic.map((Le)=>qt(Le,G,"imported dynamically")),...ke.openAppComponents.map((Le)=>qt(Le,G,"imported dynamically or through an alias"))],openAll:ke.openAll,openApps:ke.openApps,...$s(H,O),file:G,libraryImports:ke.libraryImports,libraryValues:Ip(ke)},Ce=new Set,Ae=(Le)=>C(O,Le.start).line,Te=eg(O,we,G,ke.objects,H,X),Ne=(Le,qe)=>{let Ge=fo(Le,qe,{...Te,explain:(Je)=>{let Xe=Te.explain(Je);return()=>{let Ke=Xe();return Ke&&`${Vt.basename(G)}:${Ae(Le)} ${Ke}`}}});Ge.location={file:G,line:Ae(Le)},Ee.sites.push(Ge)},Pe=(Le)=>{Zt(Le,(qe)=>{if(qe.type==="Component")Ce.add(qe.name.split(".")[0]);if(qe.type==="Identifier"&&(ke.components.has(qe.name)||ke.exports.has(qe.name)))Ce.add(qe.name)})},Oe=(Le,qe)=>{switch(Le.type){case"ImportDeclaration":return;case"IfBlock":{Oe(Le.test,Le);let Ge=Ct(Te.value(Le.test));if(Ge==="falsy")Pe(Le.consequent);else Oe(Le.consequent,Le);if(Le.alternate)if(Ge==="truthy")Pe(Le.alternate);else Oe(Le.alternate,Le);return}case"EachBlock":{if(Oe(Le.expression,Le),zi(Te.value(Le.expression)))Pe(Le.body);else{let Ge=Te.bindEach(Le);try{if(Le.key)Oe(Le.key,Le);Oe(Le.body,Le)}finally{Ge()}}if(Le.fallback)Oe(Le.fallback,Le);return}case"Component":{let[Ge,...Je]=Le.name.split("."),Xe=ke.exports.get(Ge),Ke;if(Xe){Ce.add(Ge);let et=Ri(Xe,Je);if(et.kind==="unknown")Ee.openAll=!0;else if(et.kind==="component")Ke=et.key}else if(Je.length===0)Ke=ke.components.get(Le.name);if(Ke)Ce.add(Ge),Ne(Le,Ke);break}case"SvelteSelf":if(le)Ne(Le,G);break;case"Identifier":{let Ge=ke.components.get(Le.name);if(Ge){Ce.add(Le.name),Ee.sites.push(qt(Ge,G,"used as a value",Ae(Le)));return}let Je=ke.exports.get(Le.name);if(!Je)return;Ce.add(Le.name);let Xe=qe?.type==="MemberExpression"&&qe.object===Le&&!qe.computed&&qe.property.type==="Identifier"?Ri(Je,[qe.property.name]):Nt;if(Xe.kind==="component")Ee.sites.push(qt(Xe.key,G,"used as a value",Ae(Le)));else if(Xe.kind!=="value")Ee.openAll=!0;return}}x(Le,(Ge)=>Oe(Ge,Le))};for(let Le of[we.module,we.instance,we.fragment])if(Le)Oe(Le,null);for(let Le of ke.exports.keys())if(!Ce.has(Le))Ee.openAll=!0;for(let[Le,qe]of ke.components)if(!Ce.has(Le)&&(ke.appComponents.has(Le)||sg(O,Le)))Ee.sites.push(qt(qe,G,`${Le} is imported but not rendered as a tag`));return Ee}var rg=/\.[cm]?[jt]s$/,og=/\.[cm]?ts$/;function ag(O){let G=new Map;for(let{file:X,code:le}of O)if(rg.test(X)&&le.includes("export"))G.set(X,le);let H=new Map;return(X)=>{if(!H.has(X)){let le=G.get(X);H.set(X,le===void 0?void 0:lg(X,le))}return H.get(X)}}function lg(O,G){let H;try{H=Yr(G,O,void 0,og.test(O))}catch{return}let X=ei(!0),le=ti(H,X,()=>e),we=new Map;for(let[ke,ve]of cg(H)){let Ee=i({type:"Identifier",name:ve},le);if(Ee===e||[...Ee].some(a))continue;we.set(ke,Ee)}return we.size>0?we:void 0}function cg(O){let G=[];for(let H of O.ast.module?.content.body??[]){if(H.type!=="ExportNamedDeclaration"||H.source)continue;let{declaration:X}=H;if(X?.type==="VariableDeclaration"){for(let le of X.declarations)if(le.id.type==="Identifier")G.push([le.id.name,le.id.name])}for(let le of H.specifiers)if(le.local.type==="Identifier"&&le.exported.type==="Identifier")G.push([le.exported.name,le.local.name])}return G}function Q(O,G,H){let X=new Map,le=[];for(let Ke of O)if(Ke.file.endsWith(".svelte"))X.set(Ke.file,Ke.code);else le.push(Ke);let we=Tp(X.keys(),H),ke=new Map,ve=(Ke)=>{if(!ke.has(Ke)){let et;try{et=Fi(X.get(Ke)??"",Ke)}catch{}ke.set(Ke,et)}return ke.get(Ke)},Ee=ag(le),Ce=(Ke,et)=>So(X.get(Ke)??"",Ke,G,{apps:we,usage:et,model:ve(Ke),constants:Ee}),Ae=le.map(({file:Ke,code:et})=>Pp(et,Ke,G,we)),Te=new Set,Ne=new Map,Pe=!1;for(let Ke of[...Ae,...[...X.keys()].map((et)=>Ce(et))]){if(Ke.file)Ne.set(Ke.file,Ke);Pe||=Ke.openApps===!0;for(let et of Ke.sites)if(En(et.component))Te.add(et.component)}let Oe=new Map,Le=new Map,qe=new Set,Ge=(Ke)=>{if(!X.has(Ke.component))return;let et=Oe.get(Ke.component);if(!et)et=ei(),Oe.set(Ke.component,et);let gt=ve(Ke.component),Ht=Pe?{...Ke,open:!0}:gt?ks(Ke,gt):Ke,rt=gt?.propNames.values()??[];if(wn(et,Ht,rt,G.svelteMajor))qe.add(Ke.component)};for(let Ke of X.keys())if(Pe||!Te.has(Ke))Ge({component:Ke,open:!0,props:new Map,slots:null});for(let Ke of Ae)for(let et of Ke.sites)if(En(et.component))Ge(et);for(let Ke of qe){qe.delete(Ke);let et=Ce(Ke,Oe.get(Ke));Le.set(Ke,et);for(let gt of et.sites)if(En(gt.component))Ge(gt)}let Je=(Ke)=>({...Ke,sites:Ke.sites.filter((et)=>!En(et.component))}),Xe=new Set([...Oe].filter(([,Ke])=>!Ke.open).map(([Ke])=>Ke));return{modules:[...Ae,...Le.values()].map(Je),read:Ne,closed:Xe,scopeFor(Ke){let et=Oe.get(Ke),gt=ve(Ke);return Xe.has(Ke)&&et&&gt?bo(gt,Ke,et,Ee,G):void 0}}}import{statSync as pg}from"node:fs";import Lp from"node:path";class Op extends Se{root;components;constructor(O,G,H){super(O);this.root=G,this.components=H}get src(){return Lp.join(this.root,this.spec.srcDir)}exports;exportOf(O){return this.exports??=F(this.src),this.exports.exportOf(this.spec.barrel,O)}svelte;get svelteMajor(){return this.svelte??={major:K("svelte",this.root)},this.svelte.major}}var Rp=new Map;function De(O,G){let H=Lp.join(G,O.srcDir,O.barrel),{mtimeMs:X}=pg(H),le=`${O.name}\x00${G}`,we=Rp.get(le);if(we?.mtimeMs!==X){let ke=new Map,ve=p(O).srcPrefix;for(let[Ee,Ce]of me(G,O))if(Ce.name==="default"&&Ce.path.endsWith(".svelte"))ke.set(Ee,Ce.path.slice(ve.length));we={mtimeMs:X,components:ke},Rp.set(le,we)}return new Op(O,G,we.components)}function Cn(O,G){return De(O,T(O.name,G))}var wo=new Set("altGlyph altGlyphDef altGlyphItem animate animateColor animateMotion animateTransform circle clipPath color-profile cursor defs desc discard ellipse feBlend feColorMatrix feComponentTransfer feComposite feConvolveMatrix feDiffuseLighting feDisplacementMap feDistantLight feDropShadow feFlood feFuncA feFuncB feFuncG feFuncR feGaussianBlur feImage feMerge feMergeNode feMorphology feOffset fePointLight feSpecularLighting feSpotLight feTile feTurbulence filter font font-face font-face-format font-face-name font-face-src font-face-uri foreignObject g glyph glyphRef hatch hatchpath hkern image line linearGradient marker mask mesh meshgradient meshpatch meshrow metadata missing-glyph mpath path pattern polygon polyline radialGradient rect set solidcolor stop svg switch symbol text textPath tref tspan unknown use view vkern".split(" ")),Dp=new Set("annotation annotation-xml maction math merror mfrac mi mmultiscripts mn mo mover mpadded mphantom mprescripts mroot mrow ms mspace msqrt mstyle msub msubsup msup mtable mtd mtext mtr munder munderover semantics".split(" ")),ug=/[.*+?^${}()|[\]\\]/g,Bp=new RegExp(`<(?:svelte:element|${[...wo,...Dp].map((O)=>O.replace(ug,"\\$&")).join("|")})[\\s/>]`),hg=new Set(["Fragment","Root","Component","SvelteComponent","SvelteFragment","SnippetBlock","SlotElement"]),fg=new Set(["EachBlock","IfBlock","AwaitBlock","Fragment","KeyBlock"]);function Fp(O,G){if(wo.has(O.name))return!0;if(O.name!=="a"&&O.name!=="title")return!1;if(G!==void 0)return G;return O.name==="a"&&O.fragment.nodes.some((H)=>H.type==="RegularElement"&&H.name!=="svg"&&wo.has(H.name))}function ko(O,G){if(O.type!=="RegularElement")return"html";if(Fp(O,G))return"svg";return Dp.has(O.name)?"mathml":"html"}function dg(O,G){let H="keep",X=(le)=>{if(le.type==="RegularElement"||le.type==="SvelteElement"){let ke=ko(le,G);if(ke==="html")return H="html",!1;if(H==="keep")H=ke;return!0}if(le.type==="Text"){if(le.data.trim()!=="")H="maybe_html";return!0}if(!fg.has(le.type))return!0;let we=!0;return x(le,(ke)=>{if(we)we=X(ke)}),we};for(let le of O)if(!X(le))return"html";return H}function mg(O,G,H,X){if(G?.type==="RegularElement"||G?.type==="SvelteElement"){if(G.type==="RegularElement"&&G.name==="foreignObject")return"html";return ko(G,X)}if(G===null||hg.has(G.type)){let we=dg(H,X);if(we!=="keep"&&we!=="maybe_html")return we}let le=null;for(let we of H){if(we.type!=="RegularElement")continue;let ke=ko(we,X);if(ke==="html")return"html";le=le===null||le===ke?ke:"html"}return le??O}function Vp(O){let G=[],H=(X,le,we,ke)=>{if(X.type==="Fragment"){let Ee=mg(we,le,X.nodes,ke);for(let Ce of X.nodes){if(Ce.type==="Text"||Ce.type==="RegularElement")G.push({start:Ce.start,end:Ce.end,text:Ce.type==="Text",ns:Ee});H(Ce,X,Ee,ke)}return}let ve=X.type==="RegularElement"?Fp(X,ke):ke;x(X,(Ee)=>{if(Ee.type==="Fragment")H(Ee,X,we,ve);else H(Ee,le,we,ke)})};return H(O.fragment,null,"html",void 0),G}function yg(O,G){let H=0,X=O.runs.length-1;while(H<=X){let le=H+X>>1,[we,ke,ve]=O.runs[le];if(G<we)X=le-1;else if(G>=we+ve)H=le+1;else return ke+G-we}return}function Up(O,G,H){let X=Vp(O),le=new Map,we=[];for(let ve of X)if(ve.text)we.push(ve);else le.set(ve.start,ve.ns);let ke=(ve)=>{let Ee=0,Ce=we.length-1;while(Ee<=Ce){let Ae=Ee+Ce>>1;if(ve<we[Ae].start)Ce=Ae-1;else if(ve>=we[Ae].end)Ee=Ae+1;else return we[Ae]}return};for(let ve of Vp(G)){let Ee=yg(H,ve.start);if(Ee===void 0)continue;let Ce=ve.text?ke(Ee)?.ns:le.get(Ee);if(Ce!==void 0&&Ce!==ve.ns)return!0}return!1}var gg=new Set(["Identifier","MemberExpression","ChainExpression","LogicalExpression","ConditionalExpression","UnaryExpression","BinaryExpression","TemplateLiteral","CallExpression"]);function xg(O,G){if(!O)return!1;switch(O.type){case"AssignmentExpression":case"ForInStatement":case"ForOfStatement":return G==="left";case"UpdateExpression":return G==="argument";case"VariableDeclarator":return G==="id";case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":return G==="params"||G==="id";case"CatchClause":return G==="param";case"ObjectPattern":case"ArrayPattern":case"RestElement":case"AssignmentPattern":case"ImportSpecifier":case"ExportSpecifier":return!0;case"UnaryExpression":return O.operator==="delete";case"CallExpression":case"NewExpression":return G==="callee";case"MemberExpression":return G==="object";case"TaggedTemplateExpression":return G==="tag"||G==="quasi";case"SnippetBlock":case"EachBlock":case"AwaitBlock":return G!=="expression";case"LabeledStatement":return G==="label";default:return!1}}function Eo(O){if(O===e||O.size!==1)return null;let[G]=O;if(a(G))return null;if(G===void 0)return"void 0";if(typeof G==="number"){if(!Number.isFinite(G)||Object.is(G,-0)||Math.abs(G)>Number.MAX_SAFE_INTEGER)return null;return G<0?`(${G})`:String(G)}return JSON.stringify(G)}function vg(O,G){let H=i(O.left,G),X=Ct(H);return O.operator==="&&"?X==="falsy":O.operator==="||"?X==="truthy":Sn(H)}function mt(O,G){switch(O.type){case"Literal":case"Identifier":case"ArrowFunctionExpression":case"FunctionExpression":return!0;case"TemplateLiteral":return O.expressions.every((X)=>mt(X,G));case"UnaryExpression":return O.operator!=="delete"&&mt(O.argument,G);case"BinaryExpression":return mt(O.left,G)&&mt(O.right,G);case"LogicalExpression":return mt(O.left,G)&&(G!==void 0&&vg(O,G)||mt(O.right,G));case"ConditionalExpression":return mt(O.test,G)&&mt(O.consequent,G)&&mt(O.alternate,G);case"ArrayExpression":return O.elements.every((X)=>!X||X.type!=="SpreadElement"&&mt(X,G));case"ObjectExpression":return O.properties.every((X)=>X.type==="Property"&&!X.computed&&X.kind==="init"&&mt(X.value,G))}let H=W(O);if(H!==O)return mt(H,G);if(!G)return!1;switch(O.type){case"ThisExpression":return!0;case"ChainExpression":return mt(O.expression,G);case"MemberExpression":{if(O.object.type==="Identifier"&&O.object.name==="$$slots")return!O.computed;let X=!O.computed||O.property.type==="Literal";if(O.object.type==="Identifier"&&kn(O.object,G)&&X)return!0;let le=i(O.object,G);if(le===e||le.size===0)return!1;let we=!O.computed&&O.property.type==="Identifier"&&O.property.name==="length";return(X&&[...le].every((ke)=>vn(ke)||typeof ke==="string"&&we)||O.optional===!0&&no(le))&&mt(O.object,G)}case"CallExpression":{let X=O.arguments.every((we)=>we.type!=="SpreadElement"&&mt(we,G)),{callee:le}=O;if(le.type==="MemberExpression")return X&&_s(O,G)!==void 0&&mt(le.object,G);return le.type==="Identifier"&&["Boolean","String","getContext"].includes(le.name)&&!G.model.unknownNames.has(le.name)&&X}default:return!1}}function bg(O){let G=new Set,H=O.instance?.content.body??[],X=new Set;for(let le of H)if(le.type==="ImportDeclaration"&&le.source.value==="svelte"){for(let we of le.specifiers)if(we.type==="ImportSpecifier"&&we.imported.type==="Identifier"&&we.imported.name==="createEventDispatcher")X.add(we.local.name)}if(X.size===0)return G;for(let le of H){if(le.type!=="VariableDeclaration"||le.kind!=="const")continue;for(let{id:we,init:ke}of le.declarations)if(we.type==="Identifier"&&ke?.type==="CallExpression"&&ke.callee.type==="Identifier"&&X.has(ke.callee.name))G.add(we.name)}return G}function Gp(O){return O?.type==="RegularElement"||O?.type==="SvelteElement"}function Sg(O){return O===e||[...O].some((G)=>G==null)}function wg(O){let G=new Set;return u(O.fragment,{enter(H,X){if(H.type!=="Attribute"||H.name!=="value"||!Gp(X)||H.value===!0)return;return u(H,{enter(le,we){if(le.type==="Identifier"&&A(le,we))G.add(le.name)}}),ee}}),G}function jp(O){return O?.type==="Component"||O?.type==="SvelteSelf"||O?.type==="SvelteComponent"}function Co(O){return O}var Wp=/^[ \t\r\n]+|[ \t\r\n]+$/g,kg=/^(?:<!--[\s\S]*?-->[ \t\r\n]*)+/,Eg=/(?:[ \t\r\n]*<!--[\s\S]*?-->)+$/,Cg=/(?<=-->)[ \t\r\n]+/g,Ag=/[ \t\r\n]+(?=<!--)/g,Ng=/[ \t\r\n]$/,_g=/^[ \t\r\n]/,qp=/^[ \t\r\n]*$/,Tg=new Set(["pre","textarea"]),Ig=new Set(["select","tr","table","tbody","thead","tfoot","colgroup","datalist"]);function J(O,G){let{code:H,ast:X}=O.model,le=G?.emptyBlock??"{#if false}<!---->{/if}",we=G?.unwrap??!1,ke=[],ve=0,Ee=[],Ce=()=>{let ze=Ee.at(-1);return ze?.type==="RegularElement"&&Ig.has(ze.name)},Ae=(ze,it)=>{let{start:ot,end:Ye}=Co(ze);ke.push({start:ot,end:Ye,print:()=>it})},Te=(ze,it)=>{ke.push({start:ze.start,end:ze.end,print:(ot)=>M("(",ot(it.start,it.end),")")})},Ne=(ze)=>i(ze,O);function Pe(ze,it,ot){if(!gg.has(W(ze).type)||xg(it,ot))return!1;if(ze.type==="Identifier"&&(ze.name==="undefined"||!A(ze,it)))return!1;let Ye=Eo(Ne(ze));if(Ye===null||!mt(ze,O))return!1;return Ae(ze,Ye),!0}function Oe(ze){return ze.type==="Identifier"&&(ze.name==="$$restProps"||ze.name===O.model.restPropsName)&&kn(ze,O)&&Xi(ze,O)?.size===0}let Le=bg(O.model.ast);function qe(ze){if(Le.size===0||ze.type!=="CallExpression"||ze.optional||ze.callee.type!=="Identifier"||!Le.has(ze.callee.name)||ze.arguments.length===0||ze.arguments.some((Ye)=>Ye.type==="SpreadElement"))return;let it=O.model.scopes.bindingOf(ze.callee);if(!it||!Ui(it,O.model))return;let ot=Ne(ze.arguments[0]);if(ot===e||ot.size===0||[...ot].some((Ye)=>typeof Ye!=="string"||Ai(O.usage,Ye)))return;return ze}function Ge(ze,it){let ot=it.arguments;if(ot.every((st)=>mt(st,O))){Ae(ze,";");return}let Ye=ot[0],tt=ot[ot.length-1];ke.push({start:it.start,end:it.end,print:(st)=>M("void (",st(Co(Ye).start,Co(tt).end),")")});for(let st of ot)Ke(st,it,"arguments")}function Je(ze){return mt(ze,O)?Ct(Ne(ze)):"either"}function Xe(ze){x(ze,(it,ot)=>Ke(it,ze,ot),g)}function Ke(ze,it,ot){switch(ze.type){case"ImportDeclaration":case"BindDirective":case"LetDirective":case"ObjectPattern":case"ArrayPattern":case"RestElement":case"AssignmentPattern":return;case"ExpressionStatement":{let Ye=qe(ze.expression);if(Ye)Ge(ze,Ye);else Xe(ze.expression);return}case"LabeledStatement":{let{body:Ye}=ze,tt=ze.label.name==="$"&&it?.type==="Program"&&Ye.type==="ExpressionStatement"?qe(Ye.expression):void 0;if(tt&&tt.arguments.every((st)=>mt(st,O))){Ae(ze,"");return}break}case"LogicalExpression":{if(Pe(ze,it,ot))return;let{left:Ye,right:tt,operator:st}=ze,ft=Ne(Ye),Lt=Ct(ft);if(st==="&&"&&Lt==="falsy"||st==="||"&&Lt==="truthy"||st==="??"&&Sn(ft))Ae(tt,"void 0"),Ke(Ye,ze,"left");else if(mt(Ye,O)&&(st==="&&"&&Lt==="truthy"||st==="||"&&Lt==="falsy"||st==="??"&&no(ft)))Te(ze,tt),Ke(tt,ze,"right");else Xe(ze);return}case"ConditionalExpression":{if(Pe(ze,it,ot))return;let Ye=Ct(Ne(ze.test));if(Ye==="either")break;let[tt,st]=Ye==="truthy"?["consequent","alternate"]:["alternate","consequent"],ft=ze[tt];if(mt(ze.test,O))Te(ze,ft);else Ae(ze[st],"void 0"),Ke(ze.test,ze,"test");Ke(ft,ze,tt);return}case"IfStatement":{let Ye=Je(ze.test);if(Ye==="either")break;let tt=Ye==="truthy"?"consequent":"alternate",st=ze[tt];if(ke.push({start:ze.start,end:ze.end,print:(ft)=>st?ft(st.start,st.end):";"}),st)Ke(st,ze,tt);return}case"IfBlock":Ht(ze,it);return;case"SpreadAttribute":if(jp(it)&&Oe(ze.expression)){Ae(ze,"");return}break;case"SpreadElement":{if(it?.type!=="ObjectExpression"||!Oe(ze.argument))break;let{properties:Ye}=it,tt=Ye.indexOf(ze),st=Ye[tt+1],ft=Ye[tt-1],Lt=st?ze.start:ft?.end??ze.start,xt=st?st.start:ze.end;ke.push({start:Lt,end:xt,print:()=>""});return}case"OnDirective":if(ze.expression===null&&!Ai(O.usage,ze.name)&&(ze.modifiers.length===0||jp(it)))Ae(ze,"");return;case"ObjectExpression":{let Ye=Ts(O.model).get(ze),tt=Ye&&Is(Ye,O);if(!(Ye&&tt)||[...Ye.entries.keys()].every((ft)=>tt.has(ft)))break;let st=[...Ye.properties].filter(([ft])=>tt.has(ft)).map(([,ft])=>ft);ke.push({start:ze.start,end:ze.end,print:(ft)=>st.length===0?"{}":M("{ ",...st.flatMap((Lt,xt)=>[...xt>0?[", "]:[],ft(Lt.start,Lt.end)])," }")});return}case"EachBlock":{if(mt(ze.expression,O)&&zi(Ne(ze.expression))){let tt=gt(ze,it),{fallback:st}=ze;if(st)Ke(st,ze,"fallback");ke.push({start:ze.start,end:ze.end,print:(ft)=>tt(ft,st)});return}Ke(ze.expression,ze,"expression");let Ye=Hi(ze,O);try{if(ze.key)Ke(ze.key,ze,"key");Ke(ze.body,ze,"body")}finally{Ye()}if(ze.fallback)Ke(ze.fallback,ze,"fallback");return}case"ClassDirective":{let Ye=Je(ze.expression);if(Ye==="falsy"){Ae(ze,"");return}if(Ye==="truthy"&&ze.expression.type!=="Literal"){Ae(ze,`class:${ze.name}={true}`);return}break}case"Attribute":{let{value:Ye}=ze;if(ze.name==="value"&&Gp(it)&&Ye!==!0&&!Array.isArray(Ye)&&Sg(Ne(Ye.expression)))return;if(Ye!==!0&&!Array.isArray(Ye)&&H[ze.start]==="{"&&Ye.expression.type==="Identifier"){let tt=Eo(Ne(Ye.expression));if(tt!==null)Ae(ze,`${ze.name}={${tt}}`);return}break}case"Property":{if(it?.type==="ObjectExpression"&&ze.shorthand&&ze.value.type==="Identifier"){let Ye=Eo(Ne(ze.value));if(Ye!==null){Ae(ze,`${ze.value.name}: ${Ye}`);return}}break}case"Fragment":Ee.push(it),Xe(ze),Ee.pop();return;case"RegularElement":if(Tg.has(ze.name)){ve++,Xe(ze),ve--;return}break;default:if(Pe(ze,it,ot))return}Xe(ze)}function et(ze,it){let ot=it?.nodes??[];return ot.length>0?ze(ot[0].start,ot[ot.length-1].end):M()}function gt(ze,it){let ot=it?.type==="Fragment"?it.nodes:[],Ye=ot.indexOf(ze),tt=ot[Ye-1],st=ot[Ye+1],ft=Ye===0||tt?.type==="Text"&&Ng.test(tt.data)||Ye===1&&tt?.type==="Text"&&qp.test(tt.data),Lt=Ye===ot.length-1||st?.type==="Text"&&_g.test(st.data),xt=ve>0||ft&&Lt?le:"",ui=ve===0,tr=Ce();return(Dn,Bn)=>{let Fn=et(Dn,Bn);if(Fn.text.replace(Wp,"")==="")return xt;if(!we||tr||Bn?.nodes.some((da)=>da.type==="ConstTag"||da.type==="SnippetBlock"))return M("{#if true}",Fn,"{/if}");if(!ui)return Fn;let Si=ye(Fn,Wp),ha=kg.exec(Si.text);if(ha)Si=ye(Si,Cg,0,ha[0].length);let fa=Eg.exec(Si.text);if(fa)Si=ye(Si,Ag,fa.index);return Si}}function Ht(ze,it){let ot=[],Ye=ze;for(;;){ot.push({test:Ye.test,body:Ye.consequent});let xt=Ye.alternate?.nodes.length===1?Ye.alternate.nodes[0]:void 0;if(xt?.type!=="IfBlock"||!xt.elseif)break;Ye=xt}let tt=Ye.alternate,st=[],ft=!1;for(let xt of ot){let ui=Je(xt.test);if(ui==="falsy"){ft=!0;continue}if(ui==="truthy"){ft=ft||xt!==ot.at(-1)||tt!==null,tt=xt.body;break}st.push(xt)}for(let xt of st)Ke(xt.test,ze,"test"),Ke(xt.body,ze,"consequent");if(tt)Ke(tt,ze,"alternate");if(!ft&&st.length>0)return;let Lt=gt(ze,it);ke.push({start:ze.start,end:ze.end,print:(xt)=>{if(st.length===0)return Lt(xt,tt);let ui=[];for(let[tr,{test:Dn,body:Bn}]of st.entries())ui.push(`{${tr===0?"#if":":else if"} `,xt(Dn.start,Dn.end),"}",et(xt,Bn));if(tt&&tt.nodes.length>0)ui.push("{:else}",et(xt,tt));return M(...ui,"{/if}")}})}if(X.module)Ke(X.module,null,"module");if(X.instance)Ke(X.instance,null,"instance");Ke(X.fragment,null,"fragment");let{css:rt}=X,ut=X.fragment.nodes.filter((ze)=>!(ze.type==="Text"&&qp.test(ze.data))).at(-1);if(rt&&ut&&ut.end<=rt.start&&ke.length>0)ke.push({start:ut.end,end:ut.end,print:()=>Lg,silences:!0});let pt=[...ke].sort((ze,it)=>ze.start-it.start||it.end-ze.end).filter((ze,it)=>G?.editFilter?.(it,ze)??!0),ht=0,pi=(ze,it)=>{let ot=[],Ye=ze;for(let tt of pt){if(tt.start<Ye||tt.end>it||tt.start>=it)continue;if(ot.push(V(H,Ye,tt.start),tt.print(pi)),Ye=tt.end,!tt.silences)ht++}return ot.push(V(H,Ye,it)),M(...ot)},Vn=pi(0,H.length),Zs=Vn.text===H?X:void 0;if(ht>0&&Bp.test(H)){if(Zs=N(Vn.text,{comments:!1,css:!1}),Up(X,Zs,Vn))return we?J(O,{...G,unwrap:!1}):$g(H)}let{mapped:er,dropped:ch}=Wg(Vn,G?.dropUnused!==!1,ht>0,Zs,Dg(O)),ua;return{code:er.text,mapped:er,edits:ht,dropped:ch,unrendered:()=>(ua??=ht>0?Mg(er.text):[],ua)}}function $g(O){return{code:O,mapped:V(O,0,O.length),edits:0,dropped:0,unrendered:()=>[]}}function Mg(O){let G=N(O,{comments:!1,css:!1}),H=new Map;for(let le of[G.module,G.instance])for(let we of le?.content.body??[])if(we.type==="ImportDeclaration"&&typeof we.source.value==="string"&&we.source.value.endsWith(".svelte"))H.set(we.source.value,we.specifiers.map((ke)=>ke.local.name));if(H.size===0)return[];let X=new Set;return u(G,{enter(le,we){if(le.type==="ImportDeclaration")return ee;if(le.type==="Component")X.add(le.name.split(".")[0]);if(le.type==="Identifier"&&A(le,we))X.add(le.name)}}),[...H].filter(([,le])=>!le.some((we)=>X.has(we))).map(([le])=>le)}var Pg=8;function Ms(O,G){O.set(G,(O.get(G)??0)+1)}function zp(O,G,H){let X=new Map,le=(we,ke)=>{if(Ms(we,ke),ke.startsWith("$")&&!ke.startsWith("$$"))Ms(we,ke.slice(1))};return u(O,{enter(we,ke,ve){if(we.type==="Identifier"&&!Rg(ke,ve)&&A(we,ke)){if(!G.has(we))le(X,we.name);if(H&&ke?.type!=="ExportSpecifier")le(H,we.name)}if(we.type==="ClassDirective"||we.type==="BindDirective"||we.type==="LetDirective"||we.type==="StyleDirective"||we.type==="UseDirective"||we.type==="TransitionDirective"||we.type==="AnimateDirective"){let Ee=we.name.split(".")[0];if(Ms(X,Ee),H)Ms(H,Ee)}}}),X}function Rg(O,G){switch(O?.type){case"VariableDeclarator":case"FunctionDeclaration":case"FunctionExpression":case"ClassDeclaration":case"ClassExpression":return G==="id";default:return!1}}var Lg="<!-- svelte-ignore css-unused-selector css_unused_selector -->",Og=`// svelte-ignore unused-export-let export_let_unused
19
+ `;function Vg(O,G){let H=new Map;for(let le of O){if(le.type!=="VariableDeclaration")continue;for(let we of le.declarations)if(we.id.type==="Identifier")H.set(we.id.name,le.start)}let X=new Set;for(let le of O){if(le.type!=="ExportNamedDeclaration"||le.source)continue;let{declaration:we}=le,ke=!we?le.specifiers.map((ve)=>ve.local):we.type==="VariableDeclaration"&&we.kind==="let"?we.declarations.map((ve)=>ve.id):[];for(let ve of ke){if(ve.type!=="Identifier"||G.has(ve.name))continue;X.add(le.start);let Ee=H.get(ve.name);if(Ee!==void 0)X.add(Ee)}}return[...X]}function Dg(O){let{model:G,usage:H}=O;if(H.open||G.customElement)return Hp;let X=(ke)=>H.props.has(G.propNames.get(ke)??ke),le=wg(G.ast),we=(ke)=>!X(ke)&&!le.has(ke);if(!Fg.test(G.code))return{removable:()=>!0,local:we};return{removable:we,local:we}}var Hp={removable:()=>!1,local:()=>!1};function Bg(O,G){if(O.type!=="ExportNamedDeclaration"||O.declaration?.type!=="VariableDeclaration"||O.declaration.kind!=="let"||!O.declaration.declarations.every(({id:H})=>H.type==="Identifier"&&G(H.name)))return;return{start:O.start,end:O.declaration.start}}var Fg=/\$\$(?:restProps|props)\b/;function Ug(O,G){if(O.type!=="ExportNamedDeclaration"||O.declaration?.type!=="VariableDeclaration"||O.declaration.kind!=="let"||O.declaration.declarations.length!==1)return;let[{id:H,init:X}]=O.declaration.declarations;if(H.type!=="Identifier"||!G(H.name))return;if(X&&!mt(X))return;return{name:H.name,statement:O,own:[H]}}function jg(O,G){let H=new Set;for(let ke of O){if(ke.type!=="ExportNamedDeclaration")continue;if(ke.declaration?.type==="VariableDeclaration"){for(let ve of ke.declaration.declarations)if(ve.id.type==="Identifier")H.add(ve.id.name)}for(let ve of ke.specifiers)if(ve.local.type==="Identifier")H.add(ve.local.name)}let X=(ke)=>!H.has(ke)&&!(ke.startsWith("$")&&!ke.startsWith("$$")),le=new Set;for(let ke of O){let ve=ke;if(ve.type==="TSDeclareFunction"&&ve.id?.type==="Identifier")le.add(ve.id.name)}let we=[];for(let ke of O){let ve=Ug(ke,G);if(ve)we.push(ve);else if(ke.type==="LabeledStatement"&&ke.label.name==="$"&&ke.body.type==="ExpressionStatement"){let{expression:Ee}=ke.body;if(Ee.type==="AssignmentExpression"&&Ee.operator==="="&&Ee.left.type==="Identifier"&&X(Ee.left.name)&&mt(Ee.right))we.push({name:Ee.left.name,statement:ke,own:[Ee.left,ke.label]})}else if(ke.type==="VariableDeclaration"&&ke.declarations.length===1){let[{id:Ee,init:Ce}]=ke.declarations;if(Ee.type==="Identifier"&&X(Ee.name)&&(!Ce||mt(Ce)))we.push({name:Ee.name,statement:ke,own:[Ee]})}else if(ke.type==="FunctionDeclaration"&&ke.id&&X(ke.id.name)&&!le.has(ke.id.name))we.push({name:ke.id.name,statement:ke,own:[ke.id]})}return we}function Kp(O,G){for(let[H,X]of G){let le=(O.get(H)??0)-X;if(le>0)O.set(H,le);else O.delete(H)}}function Wg(O,G,H,X,le=Hp){if(!G&&!H)return{mapped:O,dropped:0};let we=X??N(O.text,{comments:!1,css:!1}),ke=we.instance?.content.body??[],ve=G?jg(ke,le.removable):[],Ee=new Set(ve.flatMap((Le)=>Le.own)),Ce=H?new Map:void 0,Ae=zp(we,Ee,Ce),Te=[],Ne=ve;for(let Le=0;Le<Pg;Le++){let qe=Ne.filter((Ge)=>!Ae.has(Ge.name));if(qe.length===0)break;for(let Ge of qe){Te.push(Ge);let Je=Ce&&new Map;if(Kp(Ae,zp(Ge.statement,Ee,Je)),Ce&&Je)Kp(Ce,Je)}Ne=Ne.filter((Ge)=>!qe.includes(Ge))}let Pe=Te.map(({statement:Le})=>({start:Le.start,end:Le.end})),Oe=new Set(Te.map(({statement:Le})=>Le.start));if(G)for(let Le of ke){if(Oe.has(Le.start))continue;let qe=Bg(Le,le.local);if(qe)Pe.push(qe),Oe.add(Le.start)}for(let Le of Ce?Vg(ke,Ce):[])if(!Oe.has(Le))Pe.push({start:Le,end:Le,text:Og});return Pe.sort((Le,qe)=>Le.start-qe.start),{mapped:j(O,Pe),dropped:Te.length}}import{globSync as Rx,readdirSync as Lx,readFileSync as pa}from"node:fs";import Js from"node:path";var Ko=9,li=10,sn=12,bi=13,Vs=32,qg=33,Ds=34,Bs=39,Go=40,Tn=41,In=42,zg=43,Pn=44,$n=45,pu=46,en=47,Ro=58,Lo=59,Kg=62,Gg=64,uu=91,ci=92,hu=93,Hg=95,Xg=108,Yg=114,Qg=117,fu=123,du=125,Jg=126,Zg=8232,ex=8233,tx=65279,ix=65534,Oo=0,Mn=1,Ho=2,Xo=3,mu=4,yu=Symbol("bail");function zt(){throw yu}var Xp=1,Yp=2,Ao=4,Qp=8,Jp=16,Zp=32;class An{type;flags;parent;nodes;before;start;end;textStart;textEnd;name;text;constructor(O,G,H){this.type=O,this.flags=G!==null?G.flags&Ao:0,this.parent=G,this.nodes=O===0||O===1||O===2?[]:null,this.before=H,this.start=H,this.end=H,this.textStart=0,this.textEnd=0,this.name="",this.text=null}set(O,G){this.flags=G?this.flags|O:this.flags&~O}get semi(){return(this.flags&Xp)!==0}set semi(O){this.set(Xp,O)}get semicolon(){return(this.flags&Yp)!==0}set semicolon(O){this.set(Yp,O)}get readDecls(){return(this.flags&Ao)!==0}set readDecls(O){this.set(Ao,O)}get removed(){return(this.flags&Qp)!==0}set removed(O){this.set(Qp,O)}get dirty(){return(this.flags&Jp)!==0}set dirty(O){this.set(Jp,O)}get rewritten(){return(this.flags&Zp)!==0}set rewritten(O){this.set(Zp,O)}read(O){return this.text??O.slice(this.textStart,this.textEnd)}}var Vo=1,gu=2,Ni=4,Fs=8;function ii(O){let G=new O.constructor(O.length*2);return G.set(O),G}class xu{start;propEnd;valueStart;valueEnd;end;flags;text=new Map;count=0;before=null;removed=0;constructor(O){this.start=new Int32Array(O),this.propEnd=new Int32Array(O),this.valueStart=new Int32Array(O),this.valueEnd=new Int32Array(O),this.end=new Int32Array(O),this.flags=new Uint8Array(O)}push(O,G,H,X,le,we){let ke=this.count;if(ke===this.start.length)this.start=ii(this.start),this.propEnd=ii(this.propEnd),this.valueStart=ii(this.valueStart),this.valueEnd=ii(this.valueEnd),this.end=ii(this.end),this.flags=ii(this.flags);return this.start[ke]=O,this.propEnd[ke]=G,this.valueStart[ke]=H,this.valueEnd[ke]=X,this.end[ke]=le,this.flags[ke]=we,this.count=ke+1,ke}setBefore(O,G){let H=this.before;if(H===null)H=new Int32Array(this.start.length);else if(O===H.length)H=ii(H);H[O]=G,this.before=H}}class vu{css;decls;map;out=[];cursor=0;constructor(O,G,H){this.css=O,this.decls=G,this.map=H}copy(O,G){this.out.push(this.css.slice(O,G)),this.map?.copy(this.css,O,G)}insert(O,G){this.out.push(O),this.map?.insert(O,G)}flush(O){if(O>this.cursor)this.copy(this.cursor,O);this.cursor=O}emit(O){return this.body(O),this.flush(this.css.length),this.out.join("")}body(O){let G=O.nodes,H=this.decls,X=H.removed>0,le=0,we=-1;for(let Ce=0;Ce<G.length;Ce++){let Ae=G[Ce];if(typeof Ae==="number"){if(X&&(H.flags[Ae]&Ni)!==0){if((H.flags[Ae]&Fs)!==0)le++;continue}we=le}else{if(Ae.removed)continue;if(Ae.type!==mu)we=le}le++}let ke=-1,ve=-1;if(O.type===Oo&&G.length>1){let Ce=G[0];if(typeof Ce!=="number"){if(Ce.removed)ke=Ce.before,ve=Ce.start}else if(X&&(H.flags[Ce]&Ni)!==0)ke=H.before[Ce],ve=H.start[Ce]}let Ee=0;for(let Ce=0;Ce<G.length;Ce++){let Ae=G[Ce];if(typeof Ae==="number"){if(X&&(H.flags[Ae]&Ni)!==0){if(Ee!==0||O.type!==Oo)this.skipDecl(Ae,-1,-1);else if(Ce===0){let Pe=H.before;this.skipDecl(Ae,Pe[Ae],H.start[Ae])}else this.skipDecl(Ae,ke,ve);continue}}else if(Ae.removed){this.flush(Ae.before),this.cursor=Ae.semi&&Ae.type!==Mn?Ae.end+1:Ae.end;continue}if(ke!==-1&&Ee===0)this.copy(ke,ve),this.cursor=typeof Ae==="number"?H.start[Ae]:Ae.start;let Te=Ee!==we||O.semicolon,Ne=Ee<le-1;if(typeof Ae==="number"){let Pe=H.flags[Ae],Oe=(Pe&gu)!==0;this.semicolon(H.end[Ae],(Pe&Vo)!==0,Te||Oe&&Ne)}else if(Ae.type===Mn){if(Ae.rewritten)this.flush(Ae.textStart),this.insert(Ae.text,Ae.textStart),this.cursor=Ae.textEnd;this.body(Ae)}else if(Ae.type===Ho)this.body(Ae);else if(Ae.type===Xo)this.semicolon(Ae.end,Ae.semi,Te||Ne);Ee++}}skipDecl(O,G,H){let X=this.decls,le=X.flags[O];if(this.flush(X.before[O]),G!==-1&&(le&Fs)!==0)this.copy(G,H),this.cursor=nx(this.css,X.end[O]);else this.cursor=X.end[O]+((le&Vo)!==0?1:0)}semicolon(O,G,H){if(G===H)return;if(this.flush(O),H)this.insert(";",O);else this.cursor=O+1}}function nx(O,G){let H=G;for(;H<O.length;H++){let X=O.charCodeAt(H);if(X!==Vs&&X!==Ko&&X!==li&&X!==bi&&X!==sn)break}return H}var Us="\x00",eu=String.raw`\\(?:[\da-fA-F]{1,6}(?:\r\n|[ \t\n\r\f])?|[^\n\r\f])`,No=new RegExp(String.raw`(?:--|-?(?:[A-Za-z_\u0080-\uffff]|${eu}))(?:[\w\-\u0080-\uffff]|${eu})*`,"y"),sx=/\\(?:([\da-fA-F]{1,6})(?:\r\n|[ \t\n\r\f])?|([\s\S]))/g,rx=new Set(["initial","inherit","unset","revert","revert-layer"]);function ox(O){if(!O.includes("\\"))return O;return O.replace(sx,(G,H,X)=>{if(H===void 0)return X;let le=Number.parseInt(H,16);return le===0||le>=55296&&le<=57343||le>1114111?"�":String.fromCodePoint(le)})}function ax(O){return O===Vs||O===Ko||O===li||O===sn||O===bi}function Ps(O,G,H){for(;;)if(H&&ax(O.charCodeAt(G)))G++;else if(O.startsWith("/*",G)){let X=O.indexOf("*/",G+2);G=X===-1?O.length:X+2}else return G}function tu(O){let G=O.includes("\x00")?O.replaceAll("\x00","�"):O,H=[],X=0;for(;;){X=Ps(G,X,!0);let le="";for(;;){No.lastIndex=X;let we=No.exec(G);if(we===null)return;let ke=ox(we[0]);if(rx.has(ke.toLowerCase()))return;if(le+=(le&&Us)+ke,X=Ps(G,No.lastIndex,!1),G.charCodeAt(X)!==pu)break;X=Ps(G,X+1,!1)}if(H.push(le),X=Ps(G,X,!0),X===G.length)return H;if(G.charCodeAt(X)!==Pn)return;X++}}var tn=0,vi=1,Zi=2,_n=3,iu=4,bu=5,lx=6,Do=7,Bo=8,Su=9,wu=10,Qi=11,Ji=12,Fo=13,Nn=14;function _o(O){return O===vi||O===Zi}var Os=1,Yo=2,Qo=4,Uo=8,ku=16,Eu=new Uint8Array(128),Rn=(O,G)=>{for(let H of O)Eu[H.charCodeAt(0)]|=G};Rn(`
20
+ \r\f`,Os|Yo|Qo);Rn(`!"#'():;@[\\]{}/`,Yo);Rn(`"#'()/;[\\]{}`,Qo);Rn("0123456789abcdefABCDEF",Uo);Rn(`\r
21
+ "'(/\\`,ku);function xi(O,G){return O<128&&(Eu[O]&G)!==0}function cx(O,G){let H=G-1;while(O.charCodeAt(H)===ci)H--;return(G-1-H)%2===1}function To(O,G,H){let X=H;do if(X=O.indexOf(G,X+1),X===-1)zt();while(cx(O,X));return X+1}class Cu{css;length;pos;kind=tn;from;to;words=0;urlDepths=[];unsafeEnd=-1;constructor(O,G){this.css=O,this.length=O.length,this.pos=G,this.from=G,this.to=G}next(){let O=this.css,G=this.length,H=this.pos;if(this.from=H,H>=G)return this.to=H,this.kind=tn,tn;let X=H+1,le,we=O.charCodeAt(H);switch(we){case Vs:case li:case Ko:case bi:case sn:while(X<G&&xi(O.charCodeAt(X),Os))X++;le=vi;break;case fu:le=Qi;break;case du:le=Ji;break;case Ro:le=Fo;break;case Lo:le=Nn;break;case uu:le=Su;break;case hu:le=wu;break;case Tn:le=Bo;break;case Go:X=this.paren(H),le=X===H+1?Do:lx;break;case Ds:X=To(O,'"',H),le=iu;break;case Bs:X=To(O,"'",H),le=iu;break;case Gg:while(X<G&&!xi(O.charCodeAt(X),Qo))X++;le=bu;break;case ci:X=this.escapeEnd(H),le=_n;break;default:if(we===en&&O.charCodeAt(X)===In){let ke=O.indexOf("*/",H+2);if(ke===-1)zt();X=ke+2,le=Zi;break}X=this.wordEnd(X),this.pushWord(H,X),le=_n}return this.pos=X,this.to=X,this.kind=le,le}wordEnd(O){let G=this.css,H=this.length;while(O<H){let X=G.charCodeAt(O);if(xi(X,Yo)){if(X!==en||G.charCodeAt(O+1)===In)break}O++}return O}escapeEnd(O){let G=this.css,H=O+1;while(G.charCodeAt(H)===ci)H++;if((H-O)%2===0||H>=this.length)return H;let X=G.charCodeAt(H);if(X===en||xi(X,Os))return H;if(H++,xi(X,Uo)){while(xi(G.charCodeAt(H),Uo))H++;if(G.charCodeAt(H)===Vs)H++}return H}paren(O){let G=this.css,H=G.charCodeAt(O+1);if(this.popWord()&&H!==Ds&&H!==Bs&&!xi(H,Os))return To(G,")",O);if(O<=this.unsafeEnd)return O+1;let X=G.indexOf(")",O+1);if(X===-1)return this.unsafeEnd=this.length,O+1;for(let le=O+1;le<X;le++)if(xi(G.charCodeAt(le),ku)){let we=G.charCodeAt(le-1);if(we!==li&&we!==bi&&we!==Zg&&we!==ex)return this.unsafeEnd=X,O+1}return X+1}pushWord(O,G){let H=++this.words,X=this.css;if(G-O===3&&X.charCodeAt(O)===Qg&&X.charCodeAt(O+1)===Yg&&X.charCodeAt(O+2)===Xg)this.urlDepths.push(H)}popWord(){let O=this.words;if(O===0)return!1;this.words=O-1;let G=this.urlDepths;if(G.length>0&&G[G.length-1]===O)return G.pop(),!0;return!1}}var px=1000;class Au{css;decls;scanner;readDeclsIn;readValues;container;trivia;semicolon=!1;depth=0;kinds=new Uint8Array(256);starts=new Int32Array(256);ends=new Int32Array(256);count=0;closers=[];constructor(O,G,H=!1){this.css=O,this.decls=new xu(Math.max(64,O.length>>5)),this.readDeclsIn=G,this.readValues=H;let X=O.charCodeAt(0),le=X===tx||X===ix?1:0;this.scanner=new Cu(O,le),this.container=new An(Oo,null,le),this.trivia=le}parse(){let O=this.scanner,G=this.container;for(;;)switch(O.next()){case vi:break;case Zi:this.comment();break;case bu:this.atRule();break;case Nn:this.straySemicolon();break;case Ji:this.close(O.to);break;case Qi:this.count=0,this.rule();break;case tn:if(this.container!==G)zt();return this.seal(G,this.css.length),G;default:this.declarationOrRule()}}add(O){this.container.nodes.push(O)}open(O){if(++this.depth>px)zt();this.add(O),this.container=O,this.trivia=this.scanner.to,this.semicolon=!1}close(O){let G=this.container,H=G.parent;if(H===null)zt();this.seal(G,O),this.semicolon=!1,this.depth--,this.container=H,this.trivia=O}seal(O,G){if(O.nodes.length>0)O.semicolon=this.semicolon;O.end=G}comment(){let O=this.scanner,G=new An(mu,this.container,this.trivia);G.start=O.from,G.end=O.to,this.add(G),this.trivia=O.to}straySemicolon(){let O=this.container.nodes,G=O[O.length-1];if(typeof G==="object"&&G.type===Mn&&!G.semi)G.semi=!0,G.end=this.scanner.to,this.trivia=this.scanner.to}push(O,G,H){let X=this.count;if(X===this.kinds.length)this.kinds=ii(this.kinds),this.starts=ii(this.starts),this.ends=ii(this.ends);this.kinds[X]=O,this.starts[X]=G,this.ends[X]=H,this.count=X+1}skipTrivia(O,G){while(O<G&&_o(this.kinds[O]))O++;return O}trimTrivia(O,G){while(G>O&&_o(this.kinds[G-1]))G--;return G}nest(O,G,H){let X=this.closers;if(G>0&&O===X[G-1])return G-1;if(O===Do)X[G]=Bo;else if(O===Su)X[G]=wu;else if(O===Qi&&H)X[G]=Ji;else return G;return G+1}atRule(){let O=this.scanner,{from:G,to:H}=O;if(H===G+1)zt();let X=0;this.count=0;let le;for(;;){if(le=O.next(),X=this.nest(le,X,X>0),X===0&&(le===Nn||le===Qi||le===Ji))break;if(le===tn)break;this.push(le,O.from,O.to)}let we=le===Qi,ke=new An(we?Ho:Xo,this.container,this.trivia);if(ke.start=G,ke.name=this.css.slice(G+1,H),this.readDeclsIn?.has(ke.name.toLowerCase()))ke.readDecls=!0;let ve=this.skipTrivia(0,this.count),Ee=this.trimTrivia(ve,this.count);if(ve<Ee)ke.textStart=this.starts[ve],ke.textEnd=this.ends[Ee-1],ke.text=this.cleanText(ve,Ee);if(this.semicolon=!1,we){this.open(ke);return}if(this.add(ke),le===Nn)ke.semi=!0,ke.end=O.from,this.semicolon=!0,this.trivia=O.to;else if(le===Ji)ke.end=O.from,O.pos=O.from;else ke.end=ve<Ee?ke.textEnd:O.from,this.trivia=ke.end}declarationOrRule(){let O=this.scanner,G=this.css,H=O.from,X=O.kind===_n&&G.charCodeAt(H)===$n&&G.charCodeAt(H+1)===$n,le=-1,we=0,ke=O.kind;this.count=0;for(;;){let ve=this.nest(ke,we,X&&le!==-1);if(ve!==we)we=ve;else if(we===0){if(ke===Fo){if(le===-1)le=this.count}else if(ke===Nn){if(le===-1)zt();this.declaration(le,X,!0);return}else if(ke===Qi){this.rule();return}else if(ke===Ji){O.pos=O.from;break}}if(ke===tn){if(we>0)zt();break}this.push(ke,O.from,O.to),ke=O.next()}if(le===-1)zt();this.declaration(le,X,!1)}rule(){let O=new An(Mn,this.container,this.trivia),G=this.trimTrivia(0,this.count);if(G===0)O.start=O.textStart=O.textEnd=this.scanner.from;else O.start=O.textStart=this.starts[0],O.textEnd=this.ends[G-1],O.text=this.cleanText(0,G);this.open(O)}declaration(O,G,H){let X=this.css,le=this.kinds,we=this.starts,ke=this.ends;if(le[0]!==_n)zt();for(let qe=1;qe<O;qe++)if(!_o(le[qe]))zt();let ve=we[0],Ee=X.charCodeAt(ve);if(Ee===In||Ee===Hg)ve++;if(!G){let qe=0;for(let Ge=O+1;Ge<this.count;Ge++){let Je=le[Ge];if(Je===Do)qe++;else if(Je===Bo)qe--;else if(Je===Fo&&qe===0&&!(le[Ge-1]===_n&&ke[Ge-1]-we[Ge-1]===6&&X.startsWith("progid",we[Ge-1])))zt()}}let Ce=H||G?this.count:this.trimTrivia(O+1,this.count),Ae=ke[Ce-1],Te=ke[O],Ne=Ae,Pe=null;if(this.readValues||this.container.readDecls)[Te,Ne,Pe]=this.value(O+1,Ce,G);let Oe=(H?Vo:0)|(G?gu:0);if(this.readValues){for(let qe=Ce;qe<this.count;qe++)if(le[qe]===Zi)Oe|=Fs}let Le=this.decls.push(ve,ke[0],Te,Ne,Ae,Oe);if(Pe!==null)this.decls.text.set(Le,Pe);if(this.readValues)this.decls.setBefore(Le,this.trivia);this.add(Le),this.semicolon=H,this.trivia=H?this.scanner.to:Ae}value(O,G,H){let X=this.kinds,le=this.starts,we=this.ends,ke=this.skipTrivia(O,G),ve=G,Ee=this.trimTrivia(ke,G)-1;if(Ee>=ke){let Ce=this.css.slice(le[Ee],we[Ee]).toLowerCase();if(Ce==="!important"){ve=Ee;while(ve>ke&&X[ve-1]===vi)ve--}else if(Ce==="important")ve=this.barewordImportant(ke,G,Ee-ke)}if(ve===ke)ke=O;if(!H&&ve>ke&&X[ve-1]===vi)ve--;if(ve===ke)return[we[O-1],we[O-1],null];return[le[ke],we[ve-1],this.cleanText(ke,ve)]}barewordImportant(O,G,H){let X=this.css,le="",we=G;for(let ke=H;ke>=1;ke--){if(nu(le)&&this.kinds[O+ke]!==vi)break;we--,le=X.slice(this.starts[we],this.ends[we])+le}return nu(le)?we:G}cleanText(O,G){let H=this.kinds,X=O;while(X<G&&H[X]!==Zi)X++;if(X===G)return null;let le=this.css,we=this.starts,ke=this.ends,ve=le.slice(we[O],we[X]),Ee=ve.charCodeAt(ve.length-1);for(;X<G;X++){if(H[X]===Zi&&(X===O||X===G-1||H[X-1]===vi||H[X+1]===vi||Ee===Pn))continue;let Ce=we[X],Ae=ke[X];if(Ae>Ce)ve+=le.slice(Ce,Ae),Ee=le.charCodeAt(Ae-1)}return ve}}function nu(O){return O.trim().charCodeAt(0)===qg}var su=Object.freeze([]),ux=32,qs=1,zs=3,Nu=4,ni=new Uint8Array(128);for(let O=48;O<=57;O++)ni[O]=qs;for(let O=65;O<=90;O++)ni[O]=zs;for(let O=97;O<=122;O++)ni[O]=zs;ni[95]=zs;ni[$n]=qs;for(let O of[32,9,10,13,12])ni[O]=Nu;function Kt(O,G){return G<O.length?O.charCodeAt(G):-1}function hx(O){return O<128?O>=0&&(ni[O]&qs)!==0:!0}function ru(O){return O<128?O>=0&&ni[O]===zs:!0}function js(O){return O>=0&&O<128&&ni[O]===Nu}function fx(O){return O>=48&&O<=57||O>=97&&O<=102||O>=65&&O<=70}function nn(O,G){if(Kt(O,G)!==ci||G+1>=O.length)return!1;let H=O.charCodeAt(G+1);return H!==li&&H!==bi&&H!==sn}function dx(O,G){let H=Kt(O,G);if(ru(H)||nn(O,G))return!0;if(H!==$n)return!1;let X=Kt(O,G+1);return ru(X)||X===$n||nn(O,G+1)}var Pt=0;function _u(O,G){let H=G+1,X=H;while(X<O.length&&X-H<6&&fx(O.charCodeAt(X)))X++;if(X===H){let we=O.codePointAt(H);return Pt=H+(we>65535?2:1),String.fromCodePoint(we)}let le=Number.parseInt(O.slice(H,X),16);if(le===0||le>=55296&&le<=57343||le>1114111)le=65533;if(Kt(O,X)===bi&&Kt(O,X+1)===li)X+=2;else if(js(Kt(O,X)))X++;return Pt=X,String.fromCodePoint(le)}function Ws(O,G){let H=O.length;while(G<H){let X=O.charCodeAt(G);if(X<128&&(ni[X]&qs)===0)break;G++}return G}function Tu(O,G){let H=G;if(G=Ws(O,G),!nn(O,G))return Pt=G,O.slice(H,G);let X="";do X+=O.slice(H,G)+_u(O,G),H=Pt,G=Ws(O,Pt);while(nn(O,G));return Pt=G,X+O.slice(H,G)}function Io(O,G){G=Ws(O,G);while(nn(O,G))_u(O,G),G=Ws(O,Pt);return G}function jo(O,G,H){if(H===en){if(Kt(O,G+1)!==In)return G;let X=O.indexOf("*/",G+2);return X===-1?O.length:X+2}if(H===Ds||H===Bs){for(G++;G<O.length;G++){let X=O.charCodeAt(G);if(X===H)break;if(X===ci)G++;else if(X===li||X===bi||X===sn)break}return G<O.length?G+1:O.length}if(H!==ci)return G;return Math.min(G+2,O.length)}function ou(O,G,H){let X=1;while(G<O.length){let le=O.charCodeAt(G);if(le===H){if(G++,--X===0)return G}else if(le===Go&&H===Tn)G++,X++;else if(le===en||le===Ds||le===Bs||le===ci){let we=jo(O,G,le);G=we===G?G+1:we}else G++}return G}function Rs(O,G){return{classes:O??su,negated:G??su}}function $o(O,G){if(O===null){let H=[];return H.push(G),H}for(let H=0;H<O.length;H++){let X=O[H];if(X.length===G.length&&X===G)return O}return O.push(G),O}var Wo=0,qo=1,zo=2,Mo=["is","where","matches","-webkit-any","-moz-any"];function au(O,G,H,X){if(H-G!==X.length)return!1;for(let le=0;le<X.length;le++){let we=O.charCodeAt(G+le);if((we>=65&&we<=90?we+32:we)!==X.charCodeAt(le))return!1}return!0}function mx(O,G,H){for(let X=G;X<H;X++)if(O.charCodeAt(X)===ci){let le=Tu(O,G).toLowerCase();return le==="not"?qo:Mo.includes(le)?zo:Wo}if(au(O,G,H,"not"))return qo;for(let X=0;X<Mo.length;X++)if(au(O,G,H,Mo[X]))return zo;return Wo}var Iu=[];function $u(O,G,H){let X=[],le=[],we=null,ke=null,ve=!1,Ee=" ";while(G<O.length){let Ce=O.charCodeAt(G);if(Ce===Pn||Ce===Tn&&H>0)break;if(js(Ce)){if(G++,ve)X.push(Rs(we,ke)),we=null,ke=null,ve=!1,Ee=" ";continue}if(Ce===en&&Kt(O,G+1)===In){G=jo(O,G,Ce);continue}if(Ce===Kg||Ce===zg||Ce===Jg){if(G++,ve)X.push(Rs(we,ke)),we=null,ke=null,ve=!1;else if(X.length===0)X.push(Rs(null,null));Ee=O[G-1];continue}if(!ve){if(X.length>0)le.push(Ee);ve=!0}if(hx(Ce))G=Io(O,G+1);else if(Ce===pu&&dx(O,G+1))we=$o(we,Tu(O,G+1)),G=Pt;else if(Ce===Ro){G++;let Ae=Kt(O,G)===Ro;if(Ae)G++;let Te=G;if(G=Io(O,G),Kt(O,G)!==Go)continue;let Ne=Ae||H>=ux?Wo:mx(O,Te,G);if(G++,Ne===qo){let Pe=lu(O,G,H+1);G=Pt;for(let Oe=0;Oe<Pe.length;Oe++){let Le=Pe[Oe].classes;for(let qe=0;qe<Le.length;qe++)ke=$o(ke,Le[qe])}}else if(Ne===zo){let Pe=lu(O,G,H+1);G=Pt;let Oe=Pe[0].classes;for(let Le=0;Le<Oe.length;Le++){let qe=!0;for(let Ge=1;Ge<Pe.length&&qe;Ge++)qe=Pe[Ge].classes.includes(Oe[Le]);if(qe)we=$o(we,Oe[Le])}}else G=ou(O,G,Tn)}else if(Ce===uu)G=ou(O,G+1,hu);else if(nn(O,G))G=Io(O,G);else{let Ae=jo(O,G,Ce);G=Ae===G?G+1:Ae}}if(ve||X.length===le.length)X.push(Rs(we,ke));return Pt=G,Iu=le,X}function lu(O,G,H){let X=[];for(;;){let le=$u(O,G,H);if(G=Pt,X.push(le[le.length-1]),Kt(O,G)!==Pn)break;G++}return Pt=Kt(O,G)===Tn?G+1:G,X}function yx(O,G,H){while(G<H&&js(O.charCodeAt(G)))G++;while(H>G&&js(O.charCodeAt(H-1))){let X=0;while(H-2-X>=G&&O.charCodeAt(H-2-X)===ci)X++;if(X%2===1)break;H--}return O.slice(G,H)}function gx(O,G){return{text:O,compounds:G,combinators:Iu,subject:G[G.length-1]}}function xx(O){let G=[];for(let H=0;;){let X=$u(O,H,0),le=Pt,we=yx(O,H,le);if(we!=="")G.push(gx(we,X));if(le>=O.length)return G;H=le+1}}var vx=new TextEncoder().encode("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/");function Ls(O,G){let H=O.charCodeAt(G);if(H===li||H===sn)return!0;return H===bi&&O.charCodeAt(G+1)!==li}class Mu{lineStarts;bytes=new Uint8Array(1024);length=0;lineEmpty=!0;genColumn=0;prevGenColumn=0;prevSrcLine=0;prevSrcColumn=0;srcLineHint=0;constructor(O){let G=[0];for(let H=0;H<O.length;H++)if(Ls(O,H))G.push(H+1);this.lineStarts=G}reserve(O){if(this.length+O<=this.bytes.length)return;let G=new Uint8Array(Math.max(this.bytes.length*2,this.length+O));G.set(this.bytes.subarray(0,this.length)),this.bytes=G}vlq(O){let G=O<0?-O<<1|1:O<<1,H=this.bytes;do{let X=G&31;if(G>>>=5,G>0)X|=32;H[this.length++]=vx[X]}while(G>0)}segment(O){let G=this.lineStarts,H=this.srcLineHint;if(G[H]<=O)while(H+1<G.length&&G[H+1]<=O)H++;else{H=0;let we=G.length-1;while(H<we){let ke=H+we+1>>1;if(G[ke]<=O)H=ke;else we=ke-1}}this.srcLineHint=H;let X=H,le=O-G[H];if(this.reserve(29),!this.lineEmpty)this.bytes[this.length++]=Pn;this.lineEmpty=!1,this.vlq(this.genColumn-this.prevGenColumn),this.vlq(0),this.vlq(X-this.prevSrcLine),this.vlq(le-this.prevSrcColumn),this.prevGenColumn=this.genColumn,this.prevSrcLine=X,this.prevSrcColumn=le}newline(){this.reserve(1),this.bytes[this.length++]=Lo,this.lineEmpty=!0,this.genColumn=0,this.prevGenColumn=0}copy(O,G,H){if(G>=H)return;this.segment(G);for(let X=G;X<H;X++){if(Ls(O,X)){if(this.newline(),X+1<H)this.segment(X+1);continue}this.genColumn++;let le=O.charCodeAt(X);if((le===fu||le===du||le===Lo)&&X+1<H&&!Ls(O,X+1))this.segment(X+1)}}insert(O,G){if(O==="")return;this.segment(G);for(let H=0;H<O.length;H++)if(Ls(O,H))this.newline();else this.genColumn++}mappings(){return new TextDecoder().decode(this.bytes.subarray(0,this.length))}}class Pu{selector;list=null;constructor(O){this.selector=O}get parsed(){return this.list??=xx(this.selector),this.list}}class Ru{removed=0;css;decls;options;constructor(O,G,H){this.css=O,this.decls=G,this.options=H}run(O){let{rule:G,atRule:H,decl:X}=this.options;if(G||H||X)this.visit(O,!0);while(O.dirty)O.dirty=!1,this.visit(O,!1);if(this.options.discardEmpty!==!1)new Lu(this.css,this.decls).children(O,"")}visit(O,G){if(O.type===Mn)this.visitRule(O);else if(O.type===Ho||O.type===Xo)this.visitAtRule(O);let H=O.nodes;if(O.removed||H===null)return;let X=G?this.options.decl:void 0;for(let le=0;le<H.length;le++){let we=H[le];if(typeof we==="number"){if(X)this.visitDecl(O,we,X);continue}if(we.removed)continue;if(G||we.dirty)we.dirty=!1,this.visit(we,G)}}visitRule(O){let G=this.options.rule;if(!G)return;let H=O.read(this.css),X=G(new Pu(H));if(X===!1)this.remove(O);else if(typeof X==="string"&&X!==H)O.text=X,O.rewritten=!0,Po(O)}visitAtRule(O){let G=this.options.atRule;if(!G)return;if(G({name:O.name,params:O.read(this.css),walkDecls:(H)=>{if(!O.readDecls)throw Error(`walkDecls: add "${O.name}" to readDecls`);if(O.nodes!==null)this.walkDecls(O.nodes,H)}})===!1)this.remove(O)}visitDecl(O,G,H){let{css:X,decls:le}=this;if(H({prop:X.slice(le.start[G],le.propEnd[G]),value:le.text.get(G)??X.slice(le.valueStart[G],le.valueEnd[G])})===!1)le.flags[G]|=Ni,le.removed++,this.removed++,Po(O)}walkDecls(O,G){let{css:H,decls:X}=this;for(let le=0;le<O.length;le++){let we=O[le];if(typeof we==="number"){if(X.removed>0&&(X.flags[we]&Ni)!==0)continue;G(H.slice(X.start[we],X.propEnd[we]),X.text.get(we)??H.slice(X.valueStart[we],X.valueEnd[we]))}else if(!we.removed&&we.nodes!==null)this.walkDecls(we.nodes,G)}}remove(O){O.removed=!0,this.removed++,Po(O.parent)}}function Po(O){for(let G=O;G!==null&&!G.dirty;G=G.parent)G.dirty=!0}function bx(O){return O.name.length===5&&O.name.toLowerCase()==="layer"}class Lu{css;decls;scopes=[null];anonymous=0;constructor(O,G){this.css=O,this.decls=G}children(O,G){let H=O.nodes,X=this.decls.removed>0,le=0;for(let we=0;we<H.length;we++){let ke=H[we];if(typeof ke==="number"){if(X&&(this.decls.flags[ke]&(Ni|Fs))===Ni)continue}else{if(ke.removed)continue;if(this.visit(ke,G),ke.removed)continue}le++}return le}visit(O,G){if(O.rewritten&&O.text===""){O.removed=!0;return}let H=bx(O);if(O.nodes===null){let ke=H?tu(O.read(this.css)):void 0;if(ke)for(let ve of ke)this.declare(G,ve);return}let X,le=G;if(H){let ke=tu(O.read(this.css));if(ke?.length===1)X=ke[0];le=cu(G,X??Us+this.anonymous++)}else this.scopes.push(null);let we=this.children(O,le);if(!H)this.scopes.pop();if(we===0&&(!H||O.read(this.css).trim()===""||X!==void 0&&this.declared(le)))O.removed=!0;else if(X!==void 0)this.declare(G,X)}declared(O){return this.scopes.some((G)=>G?.has(O)===!0)}declare(O,G){let H=this.scopes,X=H[H.length-1];if(X===null)X=new Set,H[H.length-1]=X;let le=O;for(let we of G.split(Us))le=cu(le,we),X.add(le)}}function cu(O,G){return O===""?G:O+Us+G}function Ln(O,G={}){let H=new Au(O,G.readDecls&&new Set(G.readDecls.map((Ee)=>Ee.toLowerCase())),G.decl!==void 0),X;try{X=H.parse()}catch(Ee){if(Ee!==yu)throw Ee;return{css:O,skipped:!0,removed:0}}let le=new Ru(O,H.decls,G);le.run(X);let{map:we}=G,ke=we?new Mu(O):null,ve={css:new vu(O,H.decls,ke).emit(X),skipped:!1,removed:le.removed};if(ke){let{source:Ee="input.css",includeContent:Ce=!0}=typeof we==="object"?we:{};ve.map={version:3,sources:[Ee],...Ce&&{sourcesContent:[O]},names:[],mappings:ke.mappings()}}return ve}var oa=10,ju=12,aa=13;var Wu=34,qu=39,zu=40,Gs=41,Ku=42,Sx=43,Gu=44,ta=45,wx=46,la=47,Ou=58;var kx=62;var Ex=91,rn=92,Cx=93;var Ax=126;var Vu=Object.freeze([]),Nx=32,Ys=1,Qs=3,Hu=4,si=new Uint8Array(128);for(let O=48;O<=57;O++)si[O]=Ys;for(let O=65;O<=90;O++)si[O]=Qs;for(let O=97;O<=122;O++)si[O]=Qs;si[95]=Qs;si[ta]=Ys;for(let O of[32,9,10,13,12])si[O]=Hu;function Gt(O,G){return G<O.length?O.charCodeAt(G):-1}function _x(O){return O<128?O>=0&&(si[O]&Ys)!==0:!0}function Du(O){return O<128?O>=0&&si[O]===Qs:!0}function Hs(O){return O>=0&&O<128&&si[O]===Hu}function Tx(O){return O>=48&&O<=57||O>=97&&O<=102||O>=65&&O<=70}function on(O,G){if(Gt(O,G)!==rn||G+1>=O.length)return!1;let H=O.charCodeAt(G+1);return H!==oa&&H!==aa&&H!==ju}function Ix(O,G){let H=Gt(O,G);if(Du(H)||on(O,G))return!0;if(H!==ta)return!1;let X=Gt(O,G+1);return Du(X)||X===ta||on(O,G+1)}var Rt=0;function Xu(O,G){let H=G+1,X=H;while(X<O.length&&X-H<6&&Tx(O.charCodeAt(X)))X++;if(X===H){let we=O.codePointAt(H);return Rt=H+(we>65535?2:1),String.fromCodePoint(we)}let le=Number.parseInt(O.slice(H,X),16);if(le===0||le>=55296&&le<=57343||le>1114111)le=65533;if(Gt(O,X)===aa&&Gt(O,X+1)===oa)X+=2;else if(Hs(Gt(O,X)))X++;return Rt=X,String.fromCodePoint(le)}function Xs(O,G){let H=O.length;while(G<H){let X=O.charCodeAt(G);if(X<128&&(si[X]&Ys)===0)break;G++}return G}function Yu(O,G){let H=G;if(G=Xs(O,G),!on(O,G))return Rt=G,O.slice(H,G);let X="";do X+=O.slice(H,G)+Xu(O,G),H=Rt,G=Xs(O,Rt);while(on(O,G));return Rt=G,X+O.slice(H,G)}function Jo(O,G){G=Xs(O,G);while(on(O,G))Xu(O,G),G=Xs(O,Rt);return G}function ia(O,G,H){if(H===la){if(Gt(O,G+1)!==Ku)return G;let X=O.indexOf("*/",G+2);return X===-1?O.length:X+2}if(H===Wu||H===qu){for(G++;G<O.length;G++){let X=O.charCodeAt(G);if(X===H)break;if(X===rn)G++;else if(X===oa||X===aa||X===ju)break}return G<O.length?G+1:O.length}if(H!==rn)return G;return Math.min(G+2,O.length)}function Bu(O,G,H){let X=1;while(G<O.length){let le=O.charCodeAt(G);if(le===H){if(G++,--X===0)return G}else if(le===zu&&H===Gs)G++,X++;else if(le===la||le===Wu||le===qu||le===rn){let we=ia(O,G,le);G=we===G?G+1:we}else G++}return G}function Ks(O,G){return{classes:O??Vu,negated:G??Vu}}function Zo(O,G){if(O===null){let H=[];return H.push(G),H}for(let H=0;H<O.length;H++){let X=O[H];if(X.length===G.length&&X===G)return O}return O.push(G),O}var na=0,sa=1,ra=2,ea=["is","where","matches","-webkit-any","-moz-any"];function Fu(O,G,H,X){if(H-G!==X.length)return!1;for(let le=0;le<X.length;le++){let we=O.charCodeAt(G+le);if((we>=65&&we<=90?we+32:we)!==X.charCodeAt(le))return!1}return!0}function $x(O,G,H){for(let X=G;X<H;X++)if(O.charCodeAt(X)===rn){let le=Yu(O,G).toLowerCase();return le==="not"?sa:ea.includes(le)?ra:na}if(Fu(O,G,H,"not"))return sa;for(let X=0;X<ea.length;X++)if(Fu(O,G,H,ea[X]))return ra;return na}var Qu=[];function Ju(O,G,H){let X=[],le=[],we=null,ke=null,ve=!1,Ee=" ";while(G<O.length){let Ce=O.charCodeAt(G);if(Ce===Gu||Ce===Gs&&H>0)break;if(Hs(Ce)){if(G++,ve)X.push(Ks(we,ke)),we=null,ke=null,ve=!1,Ee=" ";continue}if(Ce===la&&Gt(O,G+1)===Ku){G=ia(O,G,Ce);continue}if(Ce===kx||Ce===Sx||Ce===Ax){if(G++,ve)X.push(Ks(we,ke)),we=null,ke=null,ve=!1;else if(X.length===0)X.push(Ks(null,null));Ee=O[G-1];continue}if(!ve){if(X.length>0)le.push(Ee);ve=!0}if(_x(Ce))G=Jo(O,G+1);else if(Ce===wx&&Ix(O,G+1))we=Zo(we,Yu(O,G+1)),G=Rt;else if(Ce===Ou){G++;let Ae=Gt(O,G)===Ou;if(Ae)G++;let Te=G;if(G=Jo(O,G),Gt(O,G)!==zu)continue;let Ne=Ae||H>=Nx?na:$x(O,Te,G);if(G++,Ne===sa){let Pe=Uu(O,G,H+1);G=Rt;for(let Oe=0;Oe<Pe.length;Oe++){let Le=Pe[Oe].classes;for(let qe=0;qe<Le.length;qe++)ke=Zo(ke,Le[qe])}}else if(Ne===ra){let Pe=Uu(O,G,H+1);G=Rt;let Oe=Pe[0].classes;for(let Le=0;Le<Oe.length;Le++){let qe=!0;for(let Ge=1;Ge<Pe.length&&qe;Ge++)qe=Pe[Ge].classes.includes(Oe[Le]);if(qe)we=Zo(we,Oe[Le])}}else G=Bu(O,G,Gs)}else if(Ce===Ex)G=Bu(O,G+1,Cx);else if(on(O,G))G=Jo(O,G);else{let Ae=ia(O,G,Ce);G=Ae===G?G+1:Ae}}if(ve||X.length===le.length)X.push(Ks(we,ke));return Rt=G,Qu=le,X}function Uu(O,G,H){let X=[];for(;;){let le=Ju(O,G,H);if(G=Rt,X.push(le[le.length-1]),Gt(O,G)!==Gu)break;G++}return Rt=Gt(O,G)===Gs?G+1:G,X}function Mx(O,G,H){while(G<H&&Hs(O.charCodeAt(G)))G++;while(H>G&&Hs(O.charCodeAt(H-1))){let X=0;while(H-2-X>=G&&O.charCodeAt(H-2-X)===rn)X++;if(X%2===1)break;H--}return O.slice(G,H)}function Px(O,G){return{text:O,compounds:G,combinators:Qu,subject:G[G.length-1]}}function Zu(O){let G=[];for(let H=0;;){let X=Ju(O,H,0),le=Rt,we=Mx(O,H,le);if(we!=="")G.push(Px(we,X));if(le>=O.length)return G;H=le+1}}function Ox(O,G){let H=new Set;for(let X of O){let le=X.split("/"),we=X.startsWith("@")?2:1,ke=le.slice(0,we).join("/"),ve=le.slice(we).join("/");if(!ve)throw Error(`\`styles.stylesheets\` names "${X}", not a file in a package.`);let Ee=T(ke,G),Ce=ve.includes("*")?Rx(ve,{cwd:Ee}):[ve].filter((Ae)=>{try{return pa(Js.join(Ee,Ae)),!0}catch{return!1}});if(Ce.length===0)throw Error(`\`styles.stylesheets\` names "${X}", which matches no file.`);for(let Ae of Ce)H.add(Js.join(Ee,Ae))}return[...H]}function Vx(){return{classes:new Set,properties:new Set,keyframes:new Set}}var ca=/^(?:-[a-z]+-)?keyframes$/i;function Dx(O,G){Ln(O,{discardEmpty:!1,rule:({parsed:H})=>{for(let X of H)for(let{classes:le,negated:we}of X.compounds){for(let ke of le)G.classes.add(ke);for(let ke of we)G.classes.add(ke)}},atRule:({name:H,params:X})=>{if(ca.test(H))G.keyframes.add(th(X.trim()))},decl:({prop:H})=>{if(H.startsWith("--"))G.properties.add(H)}})}var Bx=/^(["']).*\1$/;function th(O){return Bx.test(O)?O.slice(1,-1):O}var ih=/[\w-]+/g,Fx=/(--[\w-]*)(?:\$\{|["'`]\s*\+)/g;function eh(O,G){for(let[H]of O.matchAll(ih))G.words.add(H);for(let[,H]of O.matchAll(Fx))G.propertyPrefixes.push(H)}var Ux=/var\(\s*(--[\w-]+)/g,jx=8;function Wx(O,G,H){let X=(ke)=>H.words.has(ke)||H.propertyPrefixes.some((ve)=>ke.startsWith(ve)),le=0,we=0;for(let ke=0;ke<jx;ke++){let ve=new Set,Ee=new Set,Ce=(Ne)=>{for(let[,Pe]of Ne.matchAll(Ux))ve.add(Pe);for(let[Pe]of Ne.matchAll(ih))Ee.add(Pe)};Ln(O,{discardEmpty:!1,atRule:({name:Ne,params:Pe})=>{if(!ca.test(Ne))Ce(Pe)},decl:({value:Ne})=>{Ce(Ne)}});let Ae=0;if(O=Ln(O,{atRule:({name:Ne,params:Pe})=>{if(!ca.test(Ne))return;let Oe=th(Pe.trim());if(!G.keyframes.has(Oe)||Ee.has(Oe)||H.words.has(Oe))return;return le++,Ae++,!1},decl:({prop:Ne})=>{if(!Ne.startsWith("--")||!G.properties.has(Ne)||ve.has(Ne)||X(Ne))return;return we++,Ae++,!1}}).css,Ae===0)break}return{css:O,rules:le,declarations:we}}function qx(O){let G=O.startsWith(":is(")?3:O.startsWith(":where(")?6:-1;if(G===-1||!O.endsWith(")"))return;let H=0,X="";for(let le=G;le<O.length;le++){let we=O[le];if(X){if(we==="\\")le++;else if(we===X)X=""}else if(we==='"'||we==="'")X=we;else if(we==="(")H++;else if(we===")"&&--H===0)return le===O.length-1?O.slice(G+1,O.length-1):void 0}return}function zx(O,G=()=>!1){let H=new Map,X=(we)=>{let ke=H.get(we);if(ke===void 0)ke=O(we),H.set(we,ke);return ke},le=(we)=>{if(G(we.text))return!0;let ke=qx(we.text);if(ke!==void 0)return Zu(ke).some(le);return we.compounds.every(({classes:ve})=>!ve.some(X))};return(we)=>{let ke=0,ve=0;return{css:Ln(we,{rule:({selector:Ce,parsed:Ae})=>{if(!Ce.includes("."))return;let Te=Ae.filter(le);if(Te.length===Ae.length)return;if(Te.length===0)return ke++,!1;return ve+=Ae.length-Te.length,Te.map(({text:Ne})=>Ne).join(", ")}}).css,rules:ke,selectors:ve,declarations:0}}}var Kx=/[\w-]/;function Gx(O,G){let H=`.${G.replace(/[^\w-]/g,"\\$&")}`;for(let X=O.indexOf(H);X!==-1;X=O.indexOf(H,X+1)){let le=O[X+H.length];if(le===void 0||!Kx.test(le))return!0}return!1}function Hx(O,G){return G.some((H)=>{if(typeof H==="string")return Gx(O,H.startsWith(".")?H.slice(1):H);return H.lastIndex=0,H.test(O)})}function Ie(O){let{spec:G,projectRoot:H,isPruned:X}=O,le=q(G);if(!G.styles||!le)return;let we=Vx();for(let Ne of Ox(G.styles.stylesheets,H))Dx(pa(Ne,"utf8"),we);let ke=we.classes,ve={words:new Set,propertyPrefixes:[]};for(let{code:Ne}of O.files)eh(Ne,ve);for(let Ne of Yx(G,H))eh(Ne,ve);let Ee=new Set(G.styles.keep??[]);for(let{code:Ne}of O.files){if(!Ne.includes(le.marker))continue;for(let Pe of le.text(Ne))Ee.add(Pe.startsWith(".")?Pe.slice(1):Pe)}let Ce=(Ne)=>Ne.includes(le.marker)&&le.text(Ne).includes(`.${Ne}`),Ae=O.safelist??[],Te=zx((Ne)=>ke.has(Ne)&&!Ee.has(Ne)&&Ce(Ne)&&X(`.${Ne}`),Ae.length>0?(Ne)=>Hx(Ne,Ae):void 0);return(Ne)=>{let Pe=Te(Ne),Oe=Wx(Pe.css,we,ve);return{css:Oe.css,rules:Pe.rules+Oe.rules,selectors:Pe.selectors,declarations:Oe.declarations}}}var Xx=/\.(?:svelte|[cm]?[jt]s)$/;function Yx(O,G){let H=Js.join(T(O.name,G),O.srcDir);return Lx(H,{recursive:!0,encoding:"utf8"}).filter((X)=>Xx.test(X)&&!X.includes("node_modules")).map((X)=>pa(Js.join(H,X),"utf8"))}function On(O,G,{feature:H,fallback:X}){return`${p(O).logPrefix} ${H} could not analyze this build (${ce(G)}); ${X}.`}var Zx=/[\\/]node_modules[\\/]/;function ev(O,G,H){let X=o(G);if(!L(X)){if(Zx.test(X)&&!H.includes(O.name))return;return{file:X,code:H}}if(X!==G)return;try{return{file:X,code:Qx(X,"utf8")}}catch{return{file:`${X}.js`,code:H}}}function Ve(O,G,H){let X=Cn(O,G),le=new Map;return{add(we,ke){let ve=ev(O,we,ke);if(ve)le.set(we,ve);else le.delete(we)},retain(we){for(let ke of le.keys())if(!we.has(ke))le.delete(ke)},async analyze(we,ke,ve){try{let Ee=new Set;for(let Te of we){let Ne=X.moduleKey(Te);if(Ne)Ee.add(Ne)}let Ce=Q(le.values(),X),Ae=iv(X,Ce,ve);return rh(await mo({library:X,bundled:Ee,modules:Ae?[...Ce.modules,Ae]:Ce.modules,options:ke}),X)}catch(Ee){return{warning:On(O,Ee,H)}}}}}var tv="imported in a way the analysis can't read (an alias?)";function nh(O,G,H){return{component:O,open:!0,props:new Map,slots:null,...H!==void 0&&{location:{file:H,line:1}},reason:G}}function sh(){return{sites:[],openAll:!1,providedContexts:new Set}}function iv(O,G,H){let X=sh();for(let{id:le,importer:we,specifier:ke}of H){let ve=O.importKey(le),Ee=o(we);if(!ve||O.moduleKey(Ee))continue;if((ke===void 0||O.isSpecifier(ke))&&yo(O,G.read.get(Ee),ve))continue;if(ve===O.barrelKey)X.openAll=!0;else X.sites.push(nh(ve,tv,Ee))}return X.openAll||X.sites.length>0?X:void 0}function rh(O,G){return{analysis:O,library:G,liveComponents:new Set([...O.liveComponents].map((H)=>Jt.posix.parse(H).name)),isPruned:O.isPruned}}async function Be(O){try{let G=Cn(O.library,O.projectRoot),H=[];for(let X of O.components){let le=G.moduleKey(X)??G.components.get(X);if(le)H.push(le)}return await oh(G,(O.appUsage??Q(O.files,G)).modules,H,O.options)}catch(G){return{warning:On(O.library,G,O.failure)}}}async function oh(O,G,H,X){let le=new Set(G.flatMap((ve)=>ve.sites.map((Ee)=>Ee.component))),we=new Set(H),ke=sh();for(let ve of we)if(!le.has(ve))ke.sites.push(nh(ve,"not found in `content`"));return rh(await mo({library:O,bundled:we,modules:[...G,ke],options:X}),O)}function Fe(O,G,H){return[" Prop-aware:",...lh(O,H),` Classes pruned by props: ${G.size}`]}function ah(O,G){for(let[H,X]of O.library.components)if(X===G)return H;return Jt.posix.parse(G).name}function lh(O,G){let H=[],X=(we)=>Jt.isAbsolute(we)?Jt.relative(G,we):we,le=[...O.analysis.usages].filter(([,we])=>we.appSites.length>0).sort(([we],[ke])=>we.localeCompare(ke));for(let[we,ke]of le){let ve=ah(O,we),Ee=ke.appSites.length;H.push(` ${ve} (${Ee} call site${Ee===1?"":"s"})`);let Ce=ke.appSites.find((Ne)=>Ne.open);if(Ce){let Ne=Ce.location?` at ${X(Ce.location.file)}:${Ce.location.line}`:"";H.push(` every variant kept: ${Ce.reason??"open"}${Ne}`);continue}if(ke.open){H.push(` every variant kept: ${ke.openReason??"open"}`);continue}let Ae=new Set(ke.appSites.flatMap((Ne)=>[...Ne.props.keys()])),Te=(Ne)=>{let Pe=ke.unknownBecause.get(Ne);return Pe?`: ${Pe}`:""};for(let Ne of[...Ae].sort()){let Pe=ke.props.get(Ne);if(Pe===void 0)continue;let Oe=ke.omitted.has(Ne)?" (+ default)":"",Le=Pe===e?Te(Ne):"";H.push(` ${Ne.padEnd(16)} ${lp(Pe)}${Oe}${Le}`)}for(let[Ne,Pe]of[...ke.props].sort(([Oe],[Le])=>Oe.localeCompare(Le))){if(Ae.has(Ne)||Pe!==e)continue;if(!ke.unknownBecause.has(Ne))continue;H.push(` ${Ne.padEnd(16)} dynamic${Te(Ne)}`)}}return H}async function fe(O){let G,H,X;try{H=Cn(O.library,O.projectRoot),G=Q(O.files,H,O.resolvedImports);let Pe=G.modules.some((Oe)=>Oe.openAll)?(await v(H.src)).filter(L):G.modules.flatMap((Oe)=>Oe.sites.map((Le)=>Le.component));X=await oh(H,G.modules,Pe,{})}catch(Pe){return{warning:On(O.library,Pe,O.failure)}}let le=Jx(H.src),we=new Map,ke=0,ve=[],Ee=[],Ce,Ae=(Pe,Oe,Le)=>{ke+=Le.edits,we.set(Pe,{code:Le.code,map:Re(Le.mapped,Oe.model.code,Jt.basename(Pe))})};try{for(let Pe of X.analysis.liveComponents){let Oe=X.analysis.scopeFor(Pe);if(!Oe)continue;let Le=J(Oe,O.options);Ae(Jt.join(le,Pe),Oe,Le),ve.push({key:Pe,edits:Le.edits,dropped:Le.dropped,unrendered:()=>Le.unrendered().map((qe)=>Jt.posix.join(Jt.posix.dirname(Pe),qe))})}for(let Pe of G.closed){let Oe=G.scopeFor(Pe);if(!Oe)continue;let Le=J(Oe,O.options);if(Ee.push({file:Pe,edits:Le.edits}),Le.edits>0)Ae(b(Pe)??Pe,Oe,Le)}Ce=O.library.tailwind===!0?await(await import("./variant-tables-zha5f3x0.js")).specializeTables(H,[...G.read.values()],(Pe)=>X.analysis.scopeFor(Pe)):{modules:new Map,pruned:0,emptied:0,keys:0,compounds:0,kept:new Map};for(let[Pe,{mapped:Oe,source:Le}]of Ce.modules){let qe=Jt.join(le,Pe);we.set(qe,{code:Oe.text,map:Re(Oe,Le,Jt.basename(qe))})}}catch(Pe){return{warning:On(O.library,Pe,O.failure)}}let Te=new Map([...G.read].map(([Pe,Oe])=>[b(Pe)??Pe,Oe])),Ne;try{Ne=Ie({spec:O.library,projectRoot:O.projectRoot,isPruned:X.isPruned,files:O.files,safelist:O.safelist})}catch(Pe){return{warning:On(O.library,Pe,O.failure)}}return{...Ne&&{pruneStyles:Ne},sources:we,edits:ke,closed:G.closed,readImport:(Pe,Oe)=>{let Le=H.importKey(Oe);return!Le||yo(H,Te.get(Pe),Le)},apps:Ee.filter((Pe)=>Pe.edits>0).length,renderable:X.analysis.liveComponents,tables:{...Ce,modules:Ce.modules.size},report:()=>nv(X,ve,Ee,Ce,O.projectRoot,O.failure.feature)}}function nv(O,G,H,X,le,we){let ke=(Le)=>ah(O,Le),{spec:ve}=O.library,Ee=G.filter((Le)=>Le.edits>0).sort((Le,qe)=>qe.edits-Le.edits||Le.key.localeCompare(qe.key)),Ce=Ee.reduce((Le,qe)=>Le+qe.edits,0),Ae=Ee.reduce((Le,qe)=>Le+qe.dropped,0),Te=Math.max(0,...Ee.map(({key:Le})=>ke(Le).length)),Ne=new Set(Ee.flatMap(({unrendered:Le})=>Le().filter((qe)=>!O.analysis.liveComponents.has(qe)))),Pe=["",`${ve.tool===we?we:`${ve.tool} ${we}`} report`,` Rewrote ${Ee.length} of ${G.length} ${ve.label} components (${Ce} edits, ${Ae} declarations dropped):`];for(let Le of Ee){let qe=Le.unrendered().length>0?` no longer renders ${Le.unrendered().map(ke).join(", ")}`:"";Pe.push(` ${ke(Le.key).padEnd(Te)} ${String(Le.edits).padStart(4)} edit${Le.edits===1?" ":"s"}${qe}`)}let Oe=H.filter((Le)=>Le.edits>0).map((Le)=>({...Le,name:Jt.relative(le,Le.file)})).sort((Le,qe)=>qe.edits-Le.edits||Le.name.localeCompare(qe.name));if(H.length>0){Pe.push(` Rewrote ${Oe.length} of ${H.length} app components whose every call site is known:`);let Le=Math.max(0,...Oe.map(({name:qe})=>qe.length));for(let qe of Oe)Pe.push(` ${qe.name.padEnd(Le)} ${String(qe.edits).padStart(4)} edit${qe.edits===1?"":"s"}`)}if(X.modules.size>0)Pe.push(` Rewrote ${X.pruned+X.emptied} tailwind-variants tables in ${X.modules.size} modules: ${X.pruned} pruned (${X.keys} variant keys, ${X.compounds} compound variants), ${X.emptied} nothing calls emptied`);for(let[Le,qe]of[...X.kept].sort())Pe.push(` every class kept: ${Le} (${qe})`);return Pe.push(` No longer bundled (${Ne.size}): ${[...Ne].map(ke).sort().join(", ")||"none"}`," Call sites:",...lh(O,le)),Pe}async function He(O,G,H,X){try{let{writeTailwindSources:le}=await import("./tailwind-sources-8wvzbxes.js");await le(Cn(O,G),G,H&&{sources:H.sources,liveComponents:H.renderable});return}catch(le){return`${p(O).logPrefix} ${X.feature} could not write ${O.label} for Tailwind (${ce(le)}); its \`@source\` may be out of date.`}}
22
+ export{N,F,ue,_,w,e,t,n,r,h,a,i,Y,Q,De,J,Ie,Ve,Be,Fe,fe,He};