sveld 0.36.10 → 0.36.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +402 -4
- package/lib/browser.js +113 -116
- package/lib/chunk-04eb8yj0.js +245 -0
- package/lib/chunk-3a9n8agv.js +13 -0
- package/lib/chunk-5b7hj275.js +7 -0
- package/lib/chunk-e1e89j27.js +1 -0
- package/lib/chunk-ncw3wbrj.js +6 -0
- package/lib/chunk-qnj6xmb6.js +7 -0
- package/lib/chunk-wq8f3w8t.js +1 -0
- package/lib/cli-entry.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
- package/lib/chunk-0204rbr9.js +0 -7
- package/lib/chunk-26w7fg2w.js +0 -13
- package/lib/chunk-2nrjrvnn.js +0 -1
- package/lib/chunk-bbeezhqq.js +0 -6
- package/lib/chunk-c83445g5.js +0 -225
- package/lib/chunk-d802cqsd.js +0 -7
- package/lib/chunk-n9w94djt.js +0 -1
- package/lib/chunk-nrz6c5ew.js +0 -10
- package/lib/chunk-ptdfswsv.js +0 -2
- package/lib/chunk-py1s51tb.js +0 -16
- package/lib/chunk-syz2wqmb.js +0 -3
package/lib/browser.js
CHANGED
|
@@ -1,149 +1,146 @@
|
|
|
1
|
-
var
|
|
1
|
+
var eo=Object.defineProperty;var to=(e)=>e;function ro(e,t){this[e]=to.bind(null,t)}var no=(e,t)=>{for(var r in t)eo(e,r,{get:t[r],enumerable:!0,configurable:!0,set:ro.bind(t,r)})};function io(e){return e}class jt{constructor(){this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:()=>this.should_skip=!0,remove:()=>this.should_remove=!0,replace:(e)=>this.replacement=e}}replace(e,t,r,n){if(e&&t)if(r!=null)e[t][r]=n;else e[t]=n}remove(e,t,r){if(e&&t)if(r!==null&&r!==void 0)e[t].splice(r,1);else delete e[t]}}class vr extends jt{constructor(e,t){super();this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.context={skip:()=>this.should_skip=!0,remove:()=>this.should_remove=!0,replace:(r)=>this.replacement=r},this.enter=e,this.leave=t}visit(e,t,r,n){if(e){if(this.enter){let o=this.should_skip,a=this.should_remove,p=this.replacement;if(this.should_skip=!1,this.should_remove=!1,this.replacement=null,this.enter.call(this.context,e,t,r,n),this.replacement)e=this.replacement,this.replace(t,r,n,e);if(this.should_remove)this.remove(t,r,n);let l=this.should_skip,m=this.should_remove;if(this.should_skip=o,this.should_remove=a,this.replacement=p,l)return e;if(m)return null}let i;for(i in e){let o=e[i];if(o&&typeof o==="object"){if(Array.isArray(o)){let a=o;for(let p=0;p<a.length;p+=1){let l=a[p];if(Mn(l)){if(!this.visit(l,e,i,p))p--}}}else if(Mn(o))this.visit(o,e,i,null)}}if(this.leave){let o=this.replacement,a=this.should_remove;if(this.replacement=null,this.should_remove=!1,this.leave.call(this.context,e,t,r,n),this.replacement)e=this.replacement,this.replace(t,r,n,e);if(this.should_remove)this.remove(t,r,n);let p=this.should_remove;if(this.replacement=o,this.should_remove=a,p)return null}}return e}}function Mn(e){return e!==null&&typeof e==="object"&&"type"in e&&typeof e.type==="string"}function _e(e,{enter:t,leave:r}){return new vr(t,r).visit(e,null)}function xe(e){return typeof e==="object"&&e!==null}function On(e){return xe(e)&&e.type==="VariableDeclaration"&&Array.isArray(e.declarations)}function Je(e){return xe(e)&&e.type==="Literal"}function Le(e){return xe(e)&&e.type==="Identifier"&&typeof e.name==="string"}function Bn(e){return xe(e)&&e.type==="MemberExpression"}function $t(e){return xe(e)&&e.type==="ObjectExpression"&&Array.isArray(e.properties)}function so(e){return xe(e)&&e.type==="CallExpression"}function De(e,t){if(!so(e))return!1;return!!e.callee&&xe(e.callee)&&e.callee.type==="Identifier"&&e.callee.name===t}function je(e){if(xe(e)&&(e.type==="TSAsExpression"||e.type==="TSSatisfiesExpression")&&"expression"in e)return je(e.expression);return e}function Fn(e){if(xe(e)&&(e.type==="TSAsExpression"||e.type==="TSSatisfiesExpression")&&"typeAnnotation"in e)return e.typeAnnotation;return}function ao(e){return xe(e)&&e.type==="NewExpression"}function Cr(e,t){if(!ao(e))return!1;return!!e.callee&&xe(e.callee)&&e.callee.type==="Identifier"&&e.callee.name===t}function Vn(e){if(!xe(e)||typeof e.type!=="string")return null;if(e.type==="Literal"){let t=e.value;if(typeof t==="string")return t;return t==null?null:String(t)}if(e.type==="TemplateLiteral"){let t=e.quasis;if(t?.length===1){let r=t[0]?.value?.cooked;return r==null?null:r}}return null}var jn={a:"HTMLAnchorElement",abbr:"HTMLElement",address:"HTMLElement",applet:"HTMLUnknownElement",area:"HTMLAreaElement",article:"HTMLElement",aside:"HTMLElement",audio:"HTMLAudioElement",b:"HTMLElement",base:"HTMLBaseElement",basefont:"HTMLElement",bdi:"HTMLElement",bdo:"HTMLElement",blockquote:"HTMLQuoteElement",body:"HTMLBodyElement",br:"HTMLBRElement",button:"HTMLButtonElement",canvas:"HTMLCanvasElement",caption:"HTMLTableCaptionElement",cite:"HTMLElement",code:"HTMLElement",col:"HTMLTableColElement",colgroup:"HTMLTableColElement",data:"HTMLDataElement",datalist:"HTMLDataListElement",dd:"HTMLElement",del:"HTMLModElement",details:"HTMLDetailsElement",dfn:"HTMLElement",dialog:"HTMLDialogElement",dir:"HTMLDirectoryElement",div:"HTMLDivElement",dl:"HTMLDListElement",dt:"HTMLElement",em:"HTMLElement",embed:"HTMLEmbedElement",fieldset:"HTMLFieldSetElement",figcaption:"HTMLElement",figure:"HTMLElement",font:"HTMLFontElement",footer:"HTMLElement",form:"HTMLFormElement",frame:"HTMLFrameElement",frameset:"HTMLFrameSetElement",h1:"HTMLHeadingElement",h2:"HTMLHeadingElement",h3:"HTMLHeadingElement",h4:"HTMLHeadingElement",h5:"HTMLHeadingElement",h6:"HTMLHeadingElement",head:"HTMLHeadElement",header:"HTMLElement",hgroup:"HTMLElement",hr:"HTMLHRElement",html:"HTMLHtmlElement",i:"HTMLElement",iframe:"HTMLIFrameElement",img:"HTMLImageElement",input:"HTMLInputElement",ins:"HTMLModElement",kbd:"HTMLElement",label:"HTMLLabelElement",legend:"HTMLLegendElement",li:"HTMLLIElement",link:"HTMLLinkElement",main:"HTMLElement",map:"HTMLMapElement",mark:"HTMLElement",marquee:"HTMLMarqueeElement",menu:"HTMLMenuElement",meta:"HTMLMetaElement",meter:"HTMLMeterElement",nav:"HTMLElement",noscript:"HTMLElement",object:"HTMLObjectElement",ol:"HTMLOListElement",optgroup:"HTMLOptGroupElement",option:"HTMLOptionElement",output:"HTMLOutputElement",p:"HTMLParagraphElement",param:"HTMLParamElement",picture:"HTMLPictureElement",pre:"HTMLPreElement",progress:"HTMLProgressElement",q:"HTMLQuoteElement",rp:"HTMLElement",rt:"HTMLElement",ruby:"HTMLElement",s:"HTMLElement",samp:"HTMLElement",script:"HTMLScriptElement",search:"HTMLElement",section:"HTMLElement",select:"HTMLSelectElement",slot:"HTMLSlotElement",small:"HTMLElement",source:"HTMLSourceElement",span:"HTMLSpanElement",strong:"HTMLElement",style:"HTMLStyleElement",sub:"HTMLElement",summary:"HTMLElement",sup:"HTMLElement",table:"HTMLTableElement",tbody:"HTMLTableSectionElement",td:"HTMLTableCellElement",template:"HTMLTemplateElement",textarea:"HTMLTextAreaElement",tfoot:"HTMLTableSectionElement",th:"HTMLTableCellElement",thead:"HTMLTableSectionElement",time:"HTMLTimeElement",title:"HTMLTitleElement",tr:"HTMLTableRowElement",track:"HTMLTrackElement",u:"HTMLElement",ul:"HTMLUListElement",var:"HTMLElement",video:"HTMLVideoElement",wbr:"HTMLElement"};function oo(e){return e in jn}function $n(e){if(oo(e))return jn[e];return"HTMLElement"}var Ht=Symbol("sveld.parsedComponentTypeScriptMetadata");function Ar(e){return e[Ht]}var co=/\w/;function po(e,t){let r=e.trim();if(!r.startsWith("{")||!r.endsWith("}"))return;let n=r.slice(1,-1),i=[],o=0,a="";for(let p of n)if(p==="{"||p==="<"||p==="("||p==="[")o++,a+=p;else if(p==="}"||p===">"||p===")"||p==="]")o--,a+=p;else if((p===";"||p===",")&&o===0)i.push(a.trim()),a="";else a+=p;if(a.trim())i.push(a.trim());for(let p of i){if(!p.startsWith(t))continue;let l=p.slice(t.length);if(l.length>0&&co.test(l[0]))continue;let m=l.trimStart();if(m.startsWith("?"))m=m.slice(1).trimStart();if(m.startsWith(":"))return m.slice(1).trim()}return}function qt(e,t,r){let n=r;if(n.computed||n.object?.type!=="Identifier"||n.property?.type!=="Identifier")return;let i=n.object.name,o=n.property.name;if(!i||!o)return;if(e.wholePropsLocals.has(i))return t.getPropTypeByLocalOrPublic(o);let a=t.getPropTypeByLocalOrPublic(i)??t.findVariableTypeAndDescription(i)?.type;if(!a)return;return po(a,o)}function Pr(){return{syntaxMode:"legacy",scriptLanguage:void 0,source:void 0,parsed:void 0,runesOptionOverride:void 0,sourceLineStartOffsetsCache:void 0,rest_props:void 0,extends:void 0,customElementTag:void 0,componentComment:void 0,componentCommentSource:void 0,generics:null,scriptGenericsAttribute:void 0,diagnosticRecords:[],componentFilePath:"",props:new Map,moduleExports:new Map,propLocalToPublicName:new Map,reactive_vars:new Set,funcDecls:new Map,vars:new Set,valueImportBindingsByLocalName:new Map,pendingCallDefaultCandidates:[],pendingContextKeyCandidates:[],runesPropsDeclarationMetadataByDeclaratorStart:new Map,typedRunesPropsDeclarations:[],explicitPropTypesByName:new Map,explicitVariableTypesByName:new Map,typeImportBindingsByLocalName:new Map,localTypeDeclarationsByName:new Map,wholePropsLocals:new Set,restPropLocals:new Set,componentScope:new Map,scopeDeclarations:new WeakMap,activeScopes:[],slots:new Map,snippetPropLocals:new Set,deferredSlotBlockGenerics:[],events:new Map,eventDescriptions:new Map,forwardedEvents:new Map,jsDocEventNames:new Set,jsDocEventSources:new Map,bindings:new Map,contexts:new Map,typedefs:new Map,variableInfoCache:new Map,variableInfoCacheBuilt:!1}}function Oe(e,t,r,n,i){e.diagnosticRecords.push({component:e.componentFilePath,kind:t,name:r,message:n,...i?{source:i}:{}})}var kr=/[\r\n]+/g;function lo(e){if(e.sourceLineStartOffsetsCache)return e.sourceLineStartOffsetsCache;let t=[0];if(e.source){let r=e.source.indexOf(`
|
|
2
2
|
`);while(r!==-1)t.push(r+1),r=e.source.indexOf(`
|
|
3
|
-
`,r+1)}return e.sourceLineStartOffsetsCache=t,t}function Vn(e,t){if(!e.source||t<0||t>e.source.length)return;let r=io(e),n=0,i=r.length-1;while(n<=i){let o=Math.floor((n+i)/2),a=r[o],p=r[o+1]??Number.POSITIVE_INFINITY;if(t<a)i=o-1;else if(t>=p)n=o+1;else return{line:o+1,column:t-a}}return}function qt(e,t,r){if(t===void 0||r===void 0||r<t)return;let n=Vn(e,t),i=Vn(e,r);if(!n||!i)return;return{start:n,end:i}}function se(e,t){if(!t||typeof t!=="object")return;let r="start"in t&&typeof t.start==="number"?t.start:void 0,n="end"in t&&typeof t.end==="number"?t.end:void 0;return qt(e,r,n)}function wr(e,t){if(!t||t.length===0)return;let r=[...t];while(r.length>1){let u=r[r.length-1];if(u.tag!==void 0||!u.raw.trim().endsWith("*/"))break;r.pop()}let n=r[0],i=n.raw.indexOf(`@${n.tag??""}`),o=n.start+Math.max(i,0),a=r[r.length-1],p=a.start+a.raw.length;return qt(e,o,p)}function te(e,t,r){return e.source?.slice(t,r)}function Ht(e,t){if(!t||typeof t!=="object")return;let r="start"in t&&typeof t.start==="number"?t.start:void 0,n="end"in t&&typeof t.end==="number"?t.end:void 0;if(r===void 0||n===void 0)return;return te(e,r,n)?.replace(kr," ")}function be(e){return e===void 0||e===""?void 0:e}function dt(e,t,r,n){if(be(r)===void 0)return;if(e.trackPropLocalName(r),t.props.has(r)){let i=t.props.get(r);t.props.set(r,{...i,...n})}else t.props.set(r,n)}function $e(e,t,r,n=0){let i,o,a=!1;if(!r||typeof r!=="object"||!("type"in r))return{value:i,type:o,isFunction:a};let p=$n(e,t,r);if(r.type==="ObjectExpression"||r.type==="BinaryExpression"||r.type==="ArrayExpression"||r.type==="ArrowFunctionExpression"||r.type==="FunctionExpression"){let u=r;if("start"in u&&"end"in u&&typeof u.start==="number"&&typeof u.end==="number")i=te(t,u.start,u.end)?.replace(kr," ");if(o=i,a=r.type==="ArrowFunctionExpression"||r.type==="FunctionExpression",r.type==="BinaryExpression"){let m=r;if(m.left&&typeof m.left==="object"&&"type"in m.left&&m.left.type==="Literal"&&"value"in m.left&&typeof m.left.value==="string")o="string"}if(r.type==="ArrowFunctionExpression"||r.type==="FunctionExpression")o=Gn(r),i=jn(t,r)}else if(r.type==="UnaryExpression"){let u=r;if("start"in u&&"end"in u&&typeof u.start==="number"&&typeof u.end==="number")i=te(t,u.start,u.end);if(u.argument){if(typeof u.argument==="object"&&"type"in u.argument&&u.argument.type==="UnaryExpression")o=$e(e,t,u.argument).type;else if(typeof u.argument==="object"&&"value"in u.argument)o=typeof u.argument.value}}else if(r.type==="NewExpression"){let u=r;if("start"in u&&"end"in u&&typeof u.start==="number"&&typeof u.end==="number")i=te(t,u.start,u.end);if(u.callee&&typeof u.callee==="object"&&"type"in u.callee&&u.callee.type==="Identifier"){let m=u.callee.name;if(m==="Date")o="Date";else if(m==="Map")o="Map<any, any>";else if(m==="Set")o="Set<any>";else if(m==="WeakMap")o="WeakMap<object, any>";else if(m==="WeakSet")o="WeakSet<object>";else if(m==="Array")o="any[]";else if(m==="RegExp"||m==="Regexp")o="RegExp";else if(m==="Error")o="Error";else o=m}}else if(r.type==="CallExpression"){let u=r;if("start"in u&&"end"in u&&typeof u.start==="number"&&typeof u.end==="number")i=te(t,u.start,u.end);let m=u.callee,f=m&&typeof m==="object"&&"type"in m&&m.type==="Identifier"?m.name:void 0;if((f==="$derived"||f==="$state")&&u.arguments.length===1&&n<5)return{...$e(e,t,u.arguments[0],n+1),value:i,defaultValue:p};if(f){let b=ao(e,t,f);if(b)return{value:i,type:void 0,isFunction:!1,defaultValue:p,resolvedType:b};if(t.funcDecls.has(f)||oo(t,f))return{value:i,type:void 0,isFunction:!1,defaultValue:p,pendingCallDefault:{calleeName:f}};let E=t.valueImportBindingsByLocalName.get(f);if(E)return{value:i,type:void 0,isFunction:!1,defaultValue:p,pendingCallDefault:{calleeName:f,importSource:E.source,importedName:E.importedName}}}return{value:i,type:void 0,isFunction:!1,defaultValue:p,pendingCallDefault:{calleeName:f??so(t,m)}}}else if(r.type==="Identifier"){let u=r;if(n<5){let m=qn(t,u.name);if(m){let f=$e(e,t,m,n+1),b=e.resolveLocalVarJSDoc(u.name);return{...f,resolvedType:b?.type??f.resolvedType,resolvedDescription:b?.description??f.resolvedDescription,resolvedParams:b?.params??f.resolvedParams,resolvedReturnType:b?.returnType??f.resolvedReturnType}}if(t.funcDecls.has(u.name)){let f=e.resolveLocalVarJSDoc(u.name),b=t.funcDecls.get(u.name);return{value:b?jn(t,b):void 0,type:void 0,isFunction:!0,defaultValue:b?$n(e,t,b):void 0,resolvedType:f?.type??uo(f,b),resolvedDescription:f?.description,resolvedParams:f?.params,resolvedReturnType:f?.returnType}}}if("start"in u&&"end"in u&&typeof u.start==="number"&&typeof u.end==="number")i=te(t,u.start,u.end)}else if(r.type==="MemberExpression"){let u=r;if("start"in u&&"end"in u&&typeof u.start==="number"&&typeof u.end==="number")i=te(t,u.start,u.end);if(e.isNumericConstant(r))o="number"}else if(r.type==="TemplateLiteral"){let u=r;if("start"in u&&"end"in u&&typeof u.start==="number"&&typeof u.end==="number")i=te(t,u.start,u.end);o="string"}else if("raw"in r&&typeof r.raw==="string"){if(i=r.raw,"value"in r)o=r.value==null?void 0:typeof r.value}return{value:i,type:o,isFunction:a,defaultValue:p}}function qn(e,t){for(let r of e.vars)for(let n of r.declarations)if(n.id&&typeof n.id==="object"&&"type"in n.id&&n.id.type==="Identifier"&&"name"in n.id&&n.id.name===t&&n.init)return n.init;return}function Hn(e,t){for(let r of e.vars){if(r.kind!=="const")continue;for(let n of r.declarations)if(n.id&&typeof n.id==="object"&&"type"in n.id&&n.id.type==="Identifier"&&"name"in n.id&&n.id.name===t&&n.init)return n.init}return}function so(e,t){if(t&&typeof t==="object"&&"start"in t&&"end"in t&&typeof t.start==="number"&&typeof t.end==="number")return te(e,t.start,t.end)??"call";return"call"}function ao(e,t,r){let n=e.resolveLocalVarJSDoc(r);if(n?.returnType)return n.returnType;let i=t.funcDecls.get(r)??Un(t,r);if(!i)return;let o=lo(t,i);if(o)return o;let a=co(t,r);if(a)return a;let p=Wn(i);return p==="any"?void 0:p}function oo(e,t){return Un(e,t)!==void 0}function Un(e,t){let r=qn(e,t);if(!r||typeof r!=="object"||!("type"in r))return;if(r.type==="ArrowFunctionExpression"||r.type==="FunctionExpression")return r;return}function co(e,t){for(let r of e.vars)for(let n of r.declarations){let i=n.id;if(!i||typeof i!=="object"||!("type"in i)||i.type!=="Identifier"||!("name"in i)||i.name!==t)continue;let o=i.typeAnnotation;if(o?.type!=="TSTypeAnnotation")return;let a=o.typeAnnotation;if(!a||typeof a.start!=="number"||typeof a.end!=="number")return;return po(te(e,a.start,a.end))}return}function po(e){if(!e)return;let t=e.lastIndexOf("=>");if(t===-1)return;return e.slice(t+2).trim()||void 0}function lo(e,t){let r=t.returnType;if(r?.type!=="TSTypeAnnotation")return;let n=r.typeAnnotation;if(!n||typeof n.start!=="number"||typeof n.end!=="number")return;return te(e,n.start,n.end)}function uo(e,t){let r=e?.returnType??"any",n=e?.params;if(n&&n.length>0)return`(${n.map((o)=>`${o.name}${o.optional?"?":""}: ${o.type}`).join(", ")}) => ${r}`;if(e?.returnType)return`() => ${r}`;if(t)return Gn(t);return"(...args: any[]) => any"}function Gn(e){return`(${ho(e)}) => ${Wn(e)}`}function ho(e){let t=e.params;if(!Array.isArray(t)||t.length===0)return"...args: any[]";let r=[];for(let n of t)if(n&&typeof n==="object"&&"type"in n&&n.type==="Identifier"&&"name"in n&&typeof n.name==="string")r.push(`${n.name}: any`);else return"...args: any[]";return r.join(", ")}function Wn(e){if(e.async||e.generator)return"any";let t=e.body,r;if(t&&typeof t==="object"&&"type"in t&&t.type==="BlockStatement"){if(r=fo(t),r.length===0)return"any"}else r=[t];let n=null;for(let i of r){let o=mo(i);if(!o)return"any";if(n===null)n=o;else if(n!==o)return"any"}return n??"any"}function fo(e){let t=[];return Ne(e,{enter(r){if(r.type==="FunctionDeclaration"||r.type==="FunctionExpression"||r.type==="ArrowFunctionExpression"){this.skip();return}if(r.type==="ReturnStatement")t.push(r.argument??null)}}),t}function mo(e){if(!e||typeof e!=="object"||!("type"in e))return null;switch(e.type){case"Literal":{let t=e.value;if(typeof t==="string")return"string";if(typeof t==="number")return"number";if(typeof t==="boolean")return"boolean";return null}case"TemplateLiteral":return"string";case"CallExpression":{let t=e.callee;if(t&&typeof t==="object"&&"type"in t&&t.type==="Identifier"){let r=t.name;if(r==="String")return"string";if(r==="Number")return"number";if(r==="Boolean")return"boolean"}return null}default:return null}}function Kn(e){if(Le(e,"$bindable"))return{init:e.arguments[0],bindable:!0};return{init:e,bindable:!1}}function yo(e,t){let r=t.params;if(!Array.isArray(r)||r.length===0)return"";let n=r[0],i=r[r.length-1];if(typeof n.start!=="number"||typeof i.end!=="number")return"";return te(e,n.start,i.end)??""}function jn(e,t){if(t.generator)return;let r=t.body;if(!r||typeof r!=="object"||!("type"in r))return;let n=yo(e,t),i=t.async?"async ":"",o=(p,u)=>p&&typeof p==="object"&&("type"in p)&&p.type==="ObjectExpression"?`(${u})`:u;if(r.type!=="BlockStatement"){let p=Ht(e,r);return p===void 0?void 0:`${i}(${n}) => ${o(r,p)}`}let a=r.body;if(a.length===0)return`${i}(${n}) => {}`;if(a.length===1){let p=a[0];if(p&&typeof p==="object"&&"type"in p&&p.type==="ReturnStatement"){let u=p.argument;if(u){let m=Ht(e,u);if(m!==void 0)return`${i}(${n}) => ${o(u,m)}`}}}return}function $n(e,t,r){let n=Ht(t,r);if(!n||!r||typeof r!=="object"||!("type"in r))return;let i="expression";if(r.type==="Literal"||r.type==="UnaryExpression")i="literal";else if(r.type==="TemplateLiteral")i=r.expressions.length===0?"literal":"expression";else if(r.type==="ArrayExpression")i="array";else if(r.type==="ObjectExpression")i="object";else if(r.type==="ArrowFunctionExpression"||r.type==="FunctionExpression"||r.type==="FunctionDeclaration")i="function";let o={raw:n,kind:i};if(i==="literal"||i==="array"||i==="object"){let a=Nr(e,r);if(a.ok)o.value=a.value}return o}function Nr(e,t){if(!t||typeof t!=="object"||!("type"in t))return{ok:!1};if(t.type==="Literal"){let r=t.value;return typeof r==="bigint"?{ok:!1}:{ok:!0,value:r}}if(t.type==="UnaryExpression"){let r=t,n=r.argument;if(!n||typeof n!=="object"||!("type"in n)||n.type!=="Literal")return{ok:!1};let i=n.value;if(typeof i==="number"){if(r.operator==="-")return{ok:!0,value:-i};if(r.operator==="+")return{ok:!0,value:i}}if(typeof i==="boolean"&&r.operator==="!")return{ok:!0,value:!i};return{ok:!1}}if(t.type==="TemplateLiteral"){let r=t;if(r.expressions.length>0||r.quasis.length!==1)return{ok:!1};return{ok:!0,value:r.quasis[0].value.cooked??r.quasis[0].value.raw}}if(t.type==="ArrayExpression"){let r=t,n=[];for(let i of r.elements){if(!i)return{ok:!1};let o=Nr(e,i);if(!o.ok)return{ok:!1};n.push(o.value)}return{ok:!0,value:n}}if(t.type==="ObjectExpression"){let r=t,n={};for(let i of r.properties){if(i.type!=="Property"||i.computed)return{ok:!1};let o=e.getPropertyName(i.key);if(!o)return{ok:!1};let a=Nr(e,i.value);if(!a.ok)return{ok:!1};n[o]=a.value}return{ok:!0,value:n}}return{ok:!1}}var go=/[-_.:/\s]+/;function _r(e){return`${e.split(go).map((n)=>n.charAt(0).toUpperCase()+n.slice(1)).join("")}Context`}function zn(e,t,r,n){if(!r||typeof r!=="object"||!("type"in r))return null;if(r.type==="ObjectExpression"){let i=[];if(!Vt(r))return null;let o=r;for(let a of o.properties){if(a.type!=="Property")continue;let p=t.getPropertyName(a.key);if(!p)continue;let u="any",m;if(De(a.value)){let f=a.value.name,b=t.findVariableTypeAndDescription(f);if(b)u=b.type,m=b.description;else Oe(e,"context-any-type",p,`Context "${n}" property "${p}" has no type annotation; defaulted to "any".`,se(e,a))}else if(a.value&&typeof a.value==="object"&&"type"in a.value&&(a.value.type==="ArrowFunctionExpression"||a.value.type==="FunctionExpression"))u=`(${a.value.params?.map((E)=>{if(De(E))return`${E.name||"arg"}: any`;return"arg: any"}).join(", ")||""}) => any`;else if(Xe(a.value))u=a.value.value==null?"null":typeof a.value.value;i.push({name:p,type:u,description:m,optional:!1})}return{key:n,typeName:_r(n),properties:i,description:void 0}}else if(De(r)){let i=r.name,o=t.findVariableTypeAndDescription(i);if(o)return{key:n,typeName:_r(n),properties:[{name:i,type:o.type,description:o.description,optional:!1}]};return Oe(e,"context-any-type",i,`Context "${n}" variable "${i}" has no type annotation; defaulted to "any".`,se(e,r)),{key:n,typeName:_r(n),properties:[{name:i,type:"any",description:void 0,optional:!1}]}}return null}function Xn(e){let t=e.callee;if(!t||typeof t!=="object"||!("type"in t))return null;let r=t.type==="Identifier"&&t.name==="Symbol",n=t.type==="MemberExpression"&&!t.computed&&t.object.type==="Identifier"&&t.object.name==="Symbol"&&t.property.type==="Identifier"&&t.property.name==="for";if(!r&&!n)return null;let i=e.arguments[0];if(!i||typeof i!=="object"||!("type"in i))return"";if(i.type==="Literal"&&typeof i.value==="string")return i.value;if(i.type==="TemplateLiteral"&&i.quasis?.length===1)return i.quasis[0].value.cooked??"";return""}function Jn(e,t,r=0){if(!t||typeof t!=="object"||!("type"in t))return{kind:"unresolved"};let n=t;if(n.type==="Literal"||n.type==="TemplateLiteral"){let i=On(n);return i==null?{kind:"unresolved"}:{kind:"resolved",key:i}}if(n.type==="CallExpression"||n.type==="NewExpression"){let i=Xn(n);return i==null?{kind:"unresolved"}:{kind:"resolved",key:i}}if(n.type==="Identifier"){if(r>=5)return{kind:"unresolved"};let i=Hn(e,n.name);if(i&&typeof i==="object"&&"type"in i){let a=i;if((a.type==="CallExpression"||a.type==="NewExpression")&&Xn(a)==="")return{kind:"resolved",key:n.name};return Jn(e,a,r+1)}let o=e.valueImportBindingsByLocalName.get(n.name);if(o)return{kind:"pending",importSource:o.source,importedName:o.importedName};return{kind:"unresolved"}}return{kind:"unresolved"}}function Yn(e,t,r,n){if(!r||typeof r!=="object"||!("type"in r)||r.type!=="CallExpression")return;let i=r,o=i.arguments[0];if(!o)return;let a=Jn(e,o);if(a.kind==="unresolved"||a.kind==="resolved"&&!a.key){let f=e.componentFilePath?` in ${e.componentFilePath}`:"";console.warn(`Warning: Could not resolve setContext key${f}. Use a string literal, const-bound string, or Symbol(). Skipping context type generation.`);return}let p=i.arguments[1];if(!p)return;if(a.kind==="pending"){let f=zn(e,t,p,"");if(f)e.pendingContextKeyCandidates.push({importSource:a.importSource,importedName:a.importedName,properties:f.properties,description:f.description});return}let u=a.key,m=zn(e,t,p,u);if(m&&!e.contexts.has(u))e.contexts.set(u,m)}var xo=new Set(["Component","SvelteComponent","SvelteSelf"]),bo=new Set(["RegularElement","SvelteElement"]);function ft(e){return xo.has(e)}function mt(e){return bo.has(e)}function Ir(e){return typeof e==="string"?JSON.stringify(e):String(e)}function yt(e,{name:t,detail:r,has_argument:n,description:i,deprecated:o,tags:a,source:p}){if(t===void 0)return;let u=!n&&!r?"null":be(r),m=i,f=e.events.get(t);if(f?.type==="forwarded")e.events.set(t,{type:"dispatched",name:t,detail:u,description:m||f.description,deprecated:o??f.deprecated,tags:a??f.tags,source:p||f.source});else if(f){let b=f.tags??a;e.events.set(t,{...f,detail:f.detail===void 0?u:f.detail,description:f.description||m,deprecated:f.deprecated??o,tags:b,source:p||f.source})}else e.events.set(t,{type:"dispatched",name:t,detail:u,description:m,deprecated:o,tags:a,source:p})}function Qn(e,t){let r=t.arguments[0],n=Cr(r,"CustomEvent");if(!n&&!Cr(r,"Event"))return;let i=r.arguments[0],o=Xe(i)?i.value:void 0;if(o==null)return;let a=n?r.arguments[1]:void 0,p=!1,u;if(Vt(a)){let m=a.properties.find((f)=>f.type==="Property"&&De(f.key)&&f.key.name==="detail");if(m?.type==="Property")p=!0,u=Xe(m.value)?m.value.value:void 0}return yt(e,{name:String(o),detail:u==null?"":Ir(u),has_argument:p,source:se(e,t)}),String(o)}function Dr(e,t,r=!1){if(e.length===0)return"null";let n=e.map(({name:i,type:o,description:a,optional:p,default:u})=>{let m=p?"?":"",f=a||"";if(u&&f)f=`${f} @default ${u}`;else if(u)f=`@default ${u}`;if(f){if(r)return`/** ${f} */
|
|
4
|
-
${i}${m}: ${o};`;return`/** ${
|
|
3
|
+
`,r+1)}return e.sourceLineStartOffsetsCache=t,t}function Hn(e,t){if(!e.source||t<0||t>e.source.length)return;let r=lo(e),n=0,i=r.length-1;while(n<=i){let o=Math.floor((n+i)/2),a=r[o],p=r[o+1]??Number.POSITIVE_INFINITY;if(t<a)i=o-1;else if(t>=p)n=o+1;else return{line:o+1,column:t-a}}return}function Ut(e,t,r){if(t===void 0||r===void 0||r<t)return;let n=Hn(e,t),i=Hn(e,r);if(!n||!i)return;return{start:n,end:i}}function se(e,t){if(!t||typeof t!=="object")return;let r="start"in t&&typeof t.start==="number"?t.start:void 0,n="end"in t&&typeof t.end==="number"?t.end:void 0;return Ut(e,r,n)}function wr(e,t){if(!t||t.length===0)return;let r=[...t];while(r.length>1){let l=r[r.length-1];if(l.tag!==void 0||!l.raw.trim().endsWith("*/"))break;r.pop()}let n=r[0],i=n.raw.indexOf(`@${n.tag??""}`),o=n.start+Math.max(i,0),a=r[r.length-1],p=a.start+a.raw.length;return Ut(e,o,p)}function ee(e,t,r){return e.source?.slice(t,r)}function Gt(e,t){if(!t||typeof t!=="object")return;let r="start"in t&&typeof t.start==="number"?t.start:void 0,n="end"in t&&typeof t.end==="number"?t.end:void 0;if(r===void 0||n===void 0)return;return ee(e,r,n)?.replace(kr," ")}function be(e){return e===void 0||e===""?void 0:e}function ft(e,t,r,n){if(be(r)===void 0)return;if(e.trackPropLocalName(r),t.props.has(r)){let i=t.props.get(r);t.props.set(r,{...i,...n})}else t.props.set(r,n)}function $e(e,t,r,n=0){let i,o,a=!1;if(!r||typeof r!=="object"||!("type"in r))return{value:i,type:o,isFunction:a};let p=Un(e,t,r);if(r.type==="ObjectExpression"||r.type==="BinaryExpression"||r.type==="ArrayExpression"||r.type==="ArrowFunctionExpression"||r.type==="FunctionExpression"){let l=r;if("start"in l&&"end"in l&&typeof l.start==="number"&&typeof l.end==="number")i=ee(t,l.start,l.end)?.replace(kr," ");if(o=i,a=r.type==="ArrowFunctionExpression"||r.type==="FunctionExpression",r.type==="BinaryExpression"){let m=r;if(m.left&&typeof m.left==="object"&&"type"in m.left&&m.left.type==="Literal"&&"value"in m.left&&typeof m.left.value==="string")o="string"}if(r.type==="ArrowFunctionExpression"||r.type==="FunctionExpression")o=zn(r),i=qn(t,r)}else if(r.type==="UnaryExpression"){let l=r;if("start"in l&&"end"in l&&typeof l.start==="number"&&typeof l.end==="number")i=ee(t,l.start,l.end);if(l.argument){if(typeof l.argument==="object"&&"type"in l.argument&&l.argument.type==="UnaryExpression")o=$e(e,t,l.argument).type;else if(typeof l.argument==="object"&&"value"in l.argument)o=typeof l.argument.value}}else if(r.type==="NewExpression"){let l=r;if("start"in l&&"end"in l&&typeof l.start==="number"&&typeof l.end==="number")i=ee(t,l.start,l.end);if(l.callee&&typeof l.callee==="object"&&"type"in l.callee&&l.callee.type==="Identifier"){let m=l.callee.name;if(m==="Date")o="Date";else if(m==="Map")o="Map<any, any>";else if(m==="Set")o="Set<any>";else if(m==="WeakMap")o="WeakMap<object, any>";else if(m==="WeakSet")o="WeakSet<object>";else if(m==="Array")o="any[]";else if(m==="RegExp"||m==="Regexp")o="RegExp";else if(m==="Error")o="Error";else o=m}}else if(r.type==="CallExpression"){let l=r;if("start"in l&&"end"in l&&typeof l.start==="number"&&typeof l.end==="number")i=ee(t,l.start,l.end);let m=l.callee,d=m&&typeof m==="object"&&"type"in m&&m.type==="Identifier"?m.name:void 0;if((d==="$derived"||d==="$state")&&l.arguments.length===1&&n<5)return{...$e(e,t,l.arguments[0],n+1),value:i,defaultValue:p};if(d){let b=ho(e,t,d);if(b)return{value:i,type:void 0,isFunction:!1,defaultValue:p,resolvedType:b};if(t.funcDecls.has(d)||fo(t,d))return{value:i,type:void 0,isFunction:!1,defaultValue:p,pendingCallDefault:{calleeName:d}};let T=t.valueImportBindingsByLocalName.get(d);if(T)return{value:i,type:void 0,isFunction:!1,defaultValue:p,pendingCallDefault:{calleeName:d,importSource:T.source,importedName:T.importedName}}}return{value:i,type:void 0,isFunction:!1,defaultValue:p,pendingCallDefault:{calleeName:d??uo(t,m)}}}else if(r.type==="Identifier"){let l=r;if(n<5){let m=Gn(t,l.name);if(m){let d=$e(e,t,m,n+1),b=e.resolveLocalVarJSDoc(l.name);return{...d,resolvedType:b?.type??d.resolvedType,resolvedDescription:b?.description??d.resolvedDescription,resolvedParams:b?.params??d.resolvedParams,resolvedReturnType:b?.returnType??d.resolvedReturnType}}if(t.funcDecls.has(l.name)){let d=e.resolveLocalVarJSDoc(l.name),b=t.funcDecls.get(l.name);return{value:b?qn(t,b):void 0,type:void 0,isFunction:!0,defaultValue:b?Un(e,t,b):void 0,resolvedType:d?.type??xo(d,b),resolvedDescription:d?.description,resolvedParams:d?.params,resolvedReturnType:d?.returnType}}}if("start"in l&&"end"in l&&typeof l.start==="number"&&typeof l.end==="number")i=ee(t,l.start,l.end)}else if(r.type==="MemberExpression"){let l=r;if("start"in l&&"end"in l&&typeof l.start==="number"&&typeof l.end==="number")i=ee(t,l.start,l.end);if(e.isNumericConstant(r))o="number"}else if(r.type==="TemplateLiteral"){let l=r;if("start"in l&&"end"in l&&typeof l.start==="number"&&typeof l.end==="number")i=ee(t,l.start,l.end);o="string"}else if("raw"in r&&typeof r.raw==="string"){if(i=r.raw,"value"in r)o=r.value==null?void 0:typeof r.value}return{value:i,type:o,isFunction:a,defaultValue:p}}function Gn(e,t){for(let r of e.vars)for(let n of r.declarations)if(n.id&&typeof n.id==="object"&&"type"in n.id&&n.id.type==="Identifier"&&"name"in n.id&&n.id.name===t&&n.init)return n.init;return}function Wn(e,t){for(let r of e.vars){if(r.kind!=="const")continue;for(let n of r.declarations)if(n.id&&typeof n.id==="object"&&"type"in n.id&&n.id.type==="Identifier"&&"name"in n.id&&n.id.name===t&&n.init)return n.init}return}function uo(e,t){if(t&&typeof t==="object"&&"start"in t&&"end"in t&&typeof t.start==="number"&&typeof t.end==="number")return ee(e,t.start,t.end)??"call";return"call"}function ho(e,t,r){let n=e.resolveLocalVarJSDoc(r);if(n?.returnType)return n.returnType;let i=t.funcDecls.get(r)??Kn(t,r);if(!i)return;let o=go(t,i);if(o)return o;let a=mo(t,r);if(a)return a;let p=Xn(i);return p==="any"?void 0:p}function fo(e,t){return Kn(e,t)!==void 0}function Kn(e,t){let r=Gn(e,t);if(!r||typeof r!=="object"||!("type"in r))return;if(r.type==="ArrowFunctionExpression"||r.type==="FunctionExpression")return r;return}function mo(e,t){for(let r of e.vars)for(let n of r.declarations){let i=n.id;if(!i||typeof i!=="object"||!("type"in i)||i.type!=="Identifier"||!("name"in i)||i.name!==t)continue;let o=i.typeAnnotation;if(o?.type!=="TSTypeAnnotation")return;let a=o.typeAnnotation;if(!a||typeof a.start!=="number"||typeof a.end!=="number")return;return yo(ee(e,a.start,a.end))}return}function yo(e){if(!e)return;let t=e.lastIndexOf("=>");if(t===-1)return;return e.slice(t+2).trim()||void 0}function go(e,t){let r=t.returnType;if(r?.type!=="TSTypeAnnotation")return;let n=r.typeAnnotation;if(!n||typeof n.start!=="number"||typeof n.end!=="number")return;return ee(e,n.start,n.end)}function xo(e,t){let r=e?.returnType??"any",n=e?.params;if(n&&n.length>0)return`(${n.map((o)=>`${o.name}${o.optional?"?":""}: ${o.type}`).join(", ")}) => ${r}`;if(e?.returnType)return`() => ${r}`;if(t)return zn(t);return"(...args: any[]) => any"}function zn(e){return`(${bo(e)}) => ${Xn(e)}`}function bo(e){let t=e.params;if(!Array.isArray(t)||t.length===0)return"...args: any[]";let r=[];for(let n of t)if(n&&typeof n==="object"&&"type"in n&&n.type==="Identifier"&&"name"in n&&typeof n.name==="string")r.push(`${n.name}: any`);else return"...args: any[]";return r.join(", ")}function Xn(e){if(e.async||e.generator)return"any";let t=e.body,r;if(t&&typeof t==="object"&&"type"in t&&t.type==="BlockStatement"){if(r=To(t),r.length===0)return"any"}else r=[t];let n=null;for(let i of r){let o=Eo(i);if(!o)return"any";if(n===null)n=o;else if(n!==o)return"any"}return n??"any"}function To(e){let t=[];return _e(e,{enter(r){if(r.type==="FunctionDeclaration"||r.type==="FunctionExpression"||r.type==="ArrowFunctionExpression"){this.skip();return}if(r.type==="ReturnStatement")t.push(r.argument??null)}}),t}function Eo(e){if(!e||typeof e!=="object"||!("type"in e))return null;switch(e.type){case"Literal":{let t=e.value;if(typeof t==="string")return"string";if(typeof t==="number")return"number";if(typeof t==="boolean")return"boolean";return null}case"TemplateLiteral":return"string";case"CallExpression":{let t=e.callee;if(t&&typeof t==="object"&&"type"in t&&t.type==="Identifier"){let r=t.name;if(r==="String")return"string";if(r==="Number")return"number";if(r==="Boolean")return"boolean"}return null}default:return null}}function Jn(e){if(De(e,"$bindable"))return{init:e.arguments[0],bindable:!0};return{init:e,bindable:!1}}function So(e,t){let r=t.params;if(!Array.isArray(r)||r.length===0)return"";let n=r[0],i=r[r.length-1];if(typeof n.start!=="number"||typeof i.end!=="number")return"";return ee(e,n.start,i.end)??""}function qn(e,t){if(t.generator)return;let r=t.body;if(!r||typeof r!=="object"||!("type"in r))return;let n=So(e,t),i=t.async?"async ":"",o=(p,l)=>p&&typeof p==="object"&&("type"in p)&&p.type==="ObjectExpression"?`(${l})`:l;if(r.type!=="BlockStatement"){let p=Gt(e,r);return p===void 0?void 0:`${i}(${n}) => ${o(r,p)}`}let a=r.body;if(a.length===0)return`${i}(${n}) => {}`;if(a.length===1){let p=a[0];if(p&&typeof p==="object"&&"type"in p&&p.type==="ReturnStatement"){let l=p.argument;if(l){let m=Gt(e,l);if(m!==void 0)return`${i}(${n}) => ${o(l,m)}`}}}return}function Un(e,t,r){let n=Gt(t,r);if(!n||!r||typeof r!=="object"||!("type"in r))return;let i="expression";if(r.type==="Literal"||r.type==="UnaryExpression")i="literal";else if(r.type==="TemplateLiteral")i=r.expressions.length===0?"literal":"expression";else if(r.type==="ArrayExpression")i="array";else if(r.type==="ObjectExpression")i="object";else if(r.type==="ArrowFunctionExpression"||r.type==="FunctionExpression"||r.type==="FunctionDeclaration")i="function";let o={raw:n,kind:i};if(i==="literal"||i==="array"||i==="object"){let a=_r(e,r);if(a.ok)o.value=a.value}return o}function _r(e,t){if(!t||typeof t!=="object"||!("type"in t))return{ok:!1};if(t.type==="Literal"){let r=t.value;return typeof r==="bigint"?{ok:!1}:{ok:!0,value:r}}if(t.type==="UnaryExpression"){let r=t,n=r.argument;if(!n||typeof n!=="object"||!("type"in n)||n.type!=="Literal")return{ok:!1};let i=n.value;if(typeof i==="number"){if(r.operator==="-")return{ok:!0,value:-i};if(r.operator==="+")return{ok:!0,value:i}}if(typeof i==="boolean"&&r.operator==="!")return{ok:!0,value:!i};return{ok:!1}}if(t.type==="TemplateLiteral"){let r=t;if(r.expressions.length>0||r.quasis.length!==1)return{ok:!1};return{ok:!0,value:r.quasis[0].value.cooked??r.quasis[0].value.raw}}if(t.type==="ArrayExpression"){let r=t,n=[];for(let i of r.elements){if(!i)return{ok:!1};let o=_r(e,i);if(!o.ok)return{ok:!1};n.push(o.value)}return{ok:!0,value:n}}if(t.type==="ObjectExpression"){let r=t,n={};for(let i of r.properties){if(i.type!=="Property"||i.computed)return{ok:!1};let o=e.getPropertyName(i.key);if(!o)return{ok:!1};let a=_r(e,i.value);if(!a.ok)return{ok:!1};n[o]=a.value}return{ok:!0,value:n}}return{ok:!1}}var vo=/[-_.:/\s]+/;function Nr(e){return`${e.split(vo).map((n)=>n.charAt(0).toUpperCase()+n.slice(1)).join("")}Context`}function Yn(e,t,r,n){if(!r||typeof r!=="object"||!("type"in r))return null;if(r.type==="ObjectExpression"){let i=[];if(!$t(r))return null;let o=r;for(let a of o.properties){if(a.type!=="Property")continue;let p=t.getPropertyName(a.key);if(!p)continue;let l="any",m;if(Le(a.value)){let d=a.value.name,b=t.findVariableTypeAndDescription(d);if(b)l=b.type,m=b.description;else Oe(e,"context-any-type",p,`Context "${n}" property "${p}" has no type annotation; defaulted to "any".`,se(e,a))}else if(a.value&&typeof a.value==="object"&&"type"in a.value&&(a.value.type==="ArrowFunctionExpression"||a.value.type==="FunctionExpression"))l=`(${a.value.params?.map((T)=>{if(Le(T))return`${T.name||"arg"}: any`;return"arg: any"}).join(", ")||""}) => any`;else if(Je(a.value))l=a.value.value==null?"null":typeof a.value.value;i.push({name:p,type:l,description:m,optional:!1})}return{key:n,typeName:Nr(n),properties:i,description:void 0}}else if(Le(r)){let i=r.name,o=t.findVariableTypeAndDescription(i);if(o)return{key:n,typeName:Nr(n),properties:[{name:i,type:o.type,description:o.description,optional:!1}]};return Oe(e,"context-any-type",i,`Context "${n}" variable "${i}" has no type annotation; defaulted to "any".`,se(e,r)),{key:n,typeName:Nr(n),properties:[{name:i,type:"any",description:void 0,optional:!1}]}}return null}function Qn(e){let t=e.callee;if(!t||typeof t!=="object"||!("type"in t))return null;let r=t.type==="Identifier"&&t.name==="Symbol",n=t.type==="MemberExpression"&&!t.computed&&t.object.type==="Identifier"&&t.object.name==="Symbol"&&t.property.type==="Identifier"&&t.property.name==="for";if(!r&&!n)return null;let i=e.arguments[0];if(!i||typeof i!=="object"||!("type"in i))return"";if(i.type==="Literal"&&typeof i.value==="string")return i.value;if(i.type==="TemplateLiteral"&&i.quasis?.length===1)return i.quasis[0].value.cooked??"";return""}function Zn(e,t,r=0){if(!t||typeof t!=="object"||!("type"in t))return{kind:"unresolved"};let n=t;if(n.type==="Literal"||n.type==="TemplateLiteral"){let i=Vn(n);return i==null?{kind:"unresolved"}:{kind:"resolved",key:i}}if(n.type==="CallExpression"||n.type==="NewExpression"){let i=Qn(n);return i==null?{kind:"unresolved"}:{kind:"resolved",key:i}}if(n.type==="Identifier"){if(r>=5)return{kind:"unresolved"};let i=Wn(e,n.name);if(i&&typeof i==="object"&&"type"in i){let a=i;if((a.type==="CallExpression"||a.type==="NewExpression")&&Qn(a)==="")return{kind:"resolved",key:n.name};return Zn(e,a,r+1)}let o=e.valueImportBindingsByLocalName.get(n.name);if(o)return{kind:"pending",importSource:o.source,importedName:o.importedName};return{kind:"unresolved"}}return{kind:"unresolved"}}function ei(e,t,r,n){if(!r||typeof r!=="object"||!("type"in r)||r.type!=="CallExpression")return;let i=r,o=i.arguments[0];if(!o)return;let a=Zn(e,o);if(a.kind==="unresolved"||a.kind==="resolved"&&!a.key){let d=e.componentFilePath?` in ${e.componentFilePath}`:"";console.warn(`Warning: Could not resolve setContext key${d}. Use a string literal, const-bound string, or Symbol(). Skipping context type generation.`);return}let p=i.arguments[1];if(!p)return;if(a.kind==="pending"){let d=Yn(e,t,p,"");if(d)e.pendingContextKeyCandidates.push({importSource:a.importSource,importedName:a.importedName,properties:d.properties,description:d.description});return}let l=a.key,m=Yn(e,t,p,l);if(m&&!e.contexts.has(l))e.contexts.set(l,m)}var Co=new Set(["Component","SvelteComponent","SvelteSelf"]),Ao=new Set(["RegularElement","SvelteElement"]);function mt(e){return Co.has(e)}function yt(e){return Ao.has(e)}function Ir(e){return typeof e==="string"?JSON.stringify(e):String(e)}function gt(e,{name:t,detail:r,has_argument:n,description:i,deprecated:o,tags:a,source:p}){if(t===void 0)return;let l=!n&&!r?"null":be(r),m=i,d=e.events.get(t);if(d?.type==="forwarded")e.events.set(t,{type:"dispatched",name:t,detail:l,description:m||d.description,deprecated:o??d.deprecated,tags:a??d.tags,source:p||d.source});else if(d){let b=d.tags??a;e.events.set(t,{...d,detail:d.detail===void 0?l:d.detail,description:d.description||m,deprecated:d.deprecated??o,tags:b,source:p||d.source})}else e.events.set(t,{type:"dispatched",name:t,detail:l,description:m,deprecated:o,tags:a,source:p})}function ti(e,t){let r=t.arguments[0],n=Cr(r,"CustomEvent");if(!n&&!Cr(r,"Event"))return;let i=r.arguments[0],o=Je(i)?i.value:void 0;if(o==null)return;let a=n?r.arguments[1]:void 0,p=!1,l;if($t(a)){let m=a.properties.find((d)=>d.type==="Property"&&Le(d.key)&&d.key.name==="detail");if(m?.type==="Property")p=!0,l=Je(m.value)?m.value.value:void 0}return gt(e,{name:String(o),detail:l==null?"":Ir(l),has_argument:p,source:se(e,t)}),String(o)}function Lr(e,t,r=!1){if(e.length===0)return"null";let n=e.map(({name:i,type:o,description:a,optional:p,default:l})=>{let m=p?"?":"",d=a||"";if(l&&d)d=`${d} @default ${l}`;else if(l)d=`@default ${l}`;if(d){if(r)return`/** ${d} */
|
|
4
|
+
${i}${m}: ${o};`;return`/** ${d} */ ${i}${m}: ${o};`}return`${i}${m}: ${o};`}).join(r?`
|
|
5
5
|
`:" ");return r?`{
|
|
6
6
|
${n}
|
|
7
|
-
}`:`{ ${n} }`}var
|
|
8
|
-
`);let o=i.named.map(({imported:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
`)
|
|
12
|
-
`)
|
|
13
|
-
`).trim()},
|
|
14
|
-
`);u=u
|
|
15
|
-
${H}`:H}}yt(e,{name:a,detail:R,has_argument:!1,description:u,deprecated:m,tags:E.length>0?E:void 0,source:f}),e.eventDescriptions.set(a,u),e.jsDocEventNames.add(a),e.jsDocEventSources.set(a,f),T.length=0,a=void 0,p=void 0,u=void 0,m=void 0,f=void 0,b=void 0,E=[]}},A=()=>{if(w!==void 0){let k,R;if(F.length>0)k=Dr(F,void 0,!0),R=`type ${w} = ${k};`;else if(B)k=B,R=Wo(k)?`interface ${w} ${k}`:`type ${w} = ${k};`;else k="{}",R=`type ${w} = ${k};`;e.typedefs.set(w,{type:k,name:w,description:be(C),ts:R}),F.length=0,w=void 0,B=void 0,C=void 0}},P=()=>{if(V!==void 0){let j=`(${X.map(({name:J,type:H,optional:G})=>`${J}${G?"?":""}: ${H}`).join(", ")}) => ${O||"void"}`,M=`type ${V} = ${j};`;e.typedefs.set(V,{type:j,name:V,description:be(L),ts:M}),X.length=0,O=void 0,V=void 0,L=void 0}},S=n.some((k)=>k.tag==="slot"||k.tag==="snippet"),_=n.some((k)=>k.tag==="extends"||k.tag==="extendProps");for(let{tag:k,type:R,name:j,description:M,optional:J,default:H,raw:G,lines:U}of n){let ie=t.aliasType(R),Ie=x(U);switch(k){case"extends":case"extendProps":if(e.extends={interface:j,import:ie},g)g=!1;break;case"restProps":{let Z=j?M?`${j} ${M}`:j:M,we=Je(Z)||Ie;if(!we&&g&&!Q&&i)we=i,Q=!0;if(e.rest_props={type:"Element",name:ie,description:we||void 0},g)g=!1;break}case"slot":case"snippet":{let ee=Je(Tt(U));if(!ee&&g&&!Q&&i)ee=i,Q=!0;if(!ee&&s.length===0)ee=Ie;if(g)g=!1;bt(e,{slot_name:j,slot_props:ie,slot_description:ee||void 0,slot_deprecated:c,slot_tags:s.length>0?[...s]:void 0,source:wr(e,U)}),s.length=0,c=void 0;break}case"event":{if(v(),a=j,p=ie,b=U.length>0?U[0].number:void 0,u=Je(Tt(U))||Ie,!u&&g&&!Q&&i)u=i,Q=!0;if(f=wr(e,U),g)g=!1;break}case"type":if(a!==void 0)p=ie;break;case"param":if(V!==void 0)X.push({name:j,type:ie,optional:J||!1});break;case"returns":case"return":if(V!==void 0)O=ie;break;case"property":{let Z={name:j,type:ie,description:Je(Tt(U)),optional:J||!1,default:H};if(a!==void 0)T.push(Z);else if(w!==void 0)F.push(Z);break}case"typedef":{if(A(),w=li(j),B=ie,C=Je(Tt(U))||Ie,!C&&g&&!Q&&i)C=i,Q=!0;if(g)g=!1;break}case"callback":{if(P(),V=li(j),L=Je(Tt(U))||Ie,!L&&g&&!Q&&i)L=i,Q=!0;if(g)g=!1;break}case"generics":if(e.generics=[j,ie],g)g=!1;break;case"template":{let Z=j;if(ie)Z=`${j} extends ${ie}`;if(H)Z+=` = ${H}`;if(S&&!_){e.deferredSlotBlockGenerics.push({name:j,constraint:Z});break}if(t.accumulateGeneric(j,Z),g)g=!1;break}case"deprecated":{let Z=hi(j,M);if(a===void 0)c??=Z;else m??=Z;break}case"enum":case"class":case"implements":case"this":case"namespace":case"memberof":case"module":case"file":case"overview":break;default:{let Z={name:k,body:G};if(a!==void 0&&ui.has(k))E.push(Z);else s.push(Z)}break}}v(),A(),P()}}function Yo({hasTypeScriptType:e,hasJSDocType:t,inferredType:r,finalType:n}){if(e)return"typescript";if(t)return"jsdoc";if(r!==void 0)return"default";if(n!==void 0)return"inferred";return"unknown"}function vt(e){let t=e.explicitType??e.jsdocType??e.resolvedType??e.typeSeed,r=e.jsdocParams??e.resolvedParams,n=e.jsdocReturnType??e.resolvedReturnType;if(e.isFunctionDeclaration&&t==="() => any"&&n)t=r&&r.length>0?`(${r.map((p)=>`${p.name}${p.optional?"?":""}: ${p.type}`).join(", ")}) => ${n}`:`() => ${n}`;let i=e.jsdocDescription??e.resolvedDescription;if(i===void 0&&t!==void 0)i=e.typedefs?.get(t)?.description;let o=Yo({hasTypeScriptType:e.explicitType!==void 0,hasJSDocType:e.jsdocType!==void 0||e.jsdocParams!==void 0||e.jsdocReturnType!==void 0||e.resolvedType!==void 0,inferredType:e.inferredTypeForSource,finalType:t}),a=e.initializerIsFunction||e.isFunctionDeclaration||e.inferIsFunctionFromTypeSignature===!0&&(!!e.jsdocParams?.length||e.jsdocReturnType!==void 0||!!e.jsdocType?.includes("=>")||!!e.resolvedType?.includes("=>")||!!e.explicitType?.includes("=>"));return{type:t,typeSource:o,description:i,params:r,returnType:n,isFunction:a}}function Qo(e){if(!e||typeof e!=="object"||!("type"in e))return;let t=String(e.type),r=ft(t);if(!r&&!mt(t))return;let n="name"in e&&typeof e.name==="string"?e.name:void 0;if(!n)return;let i=r?{type:"InlineComponent",name:n}:{type:"Element",name:n};if(n==="svelte:element"&&"tag"in e&&e.tag&&typeof e.tag==="object"){let o=e.tag;if(o.type==="Literal"&&typeof o.value==="string")i.thisValue=o.value}return i}function mi(e,t){if(e.rest_props!==void 0)return;let r=Qo(t);if(r)e.rest_props=r}function le(e,t,r){if(!t||e.has(t))return;e.set(t,r)}function Gt(e,t){for(let r=e.activeScopes.length-1;r>=0;r-=1){let n=e.activeScopes[r]?.get(t);if(!n)continue;return n.kind==="prop"?n.publicPropName:void 0}return}function ae(e,t=new Set){if(!e||typeof e!=="object"||!("type"in e))return t;switch(e.type){case"Identifier":t.add(e.name);break;case"AssignmentPattern":ae(e.left,t);break;case"ArrayPattern":for(let r of e.elements)ae(r??void 0,t);break;case"ObjectPattern":for(let r of e.properties)if(r.type==="Property")ae(r.value,t);else if(r.type==="RestElement")ae(r.argument,t);break;case"RestElement":ae(e.argument,t);break}return t}function Br(e,t){let r=ae(t);if(!r)return;for(let n of r){let i=Gt(e,n);if(i)e.reactive_vars.add(i)}}function Wt(e){if(!e||typeof e!=="object"||!("type"in e))return!1;switch(String(e.type)){case"BlockStatement":case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"CatchClause":case"EachBlock":case"AwaitBlock":return!0;default:return!1}}function yi(e){if(!e||typeof e!=="object"||!("type"in e))return!1;let t=String(e.type);return t==="FunctionDeclaration"||t==="FunctionExpression"||t==="ArrowFunctionExpression"}function Zo(e,t){let r=e.scopeDeclarations.get(t);if(!r)r=new Map,e.scopeDeclarations.set(t,r);return r}function ec(e,t,r){let n=[];if(r.id.type==="Identifier")return n.push({kind:"local",name:r.id.name}),n;if(r.id.type!=="ObjectPattern")return n;for(let i of r.id.properties){if(i.type==="RestElement"){if(i.argument.type==="Identifier")n.push({kind:"local",name:i.argument.name});continue}if(i.computed)continue;let o=e.getPropertyName(i.key);if(!o)continue;let a;if(i.value.type==="Identifier")a=i.value.name;else if(i.value.type==="AssignmentPattern"&&i.value.left.type==="Identifier")a=i.value.left.name;if(!a)continue;n.push({kind:"prop",name:a,publicPropName:o})}return n}function Or(e,t,r,n,i){if(!Ln(t))return;let o=i?.allowRunesProps??!1,a=i?.forceProp??!1,p=t;for(let u of p.declarations){if(o&&Le(je(u.init),"$props")){for(let b of ec(e,p,u))le(b.kind==="prop"?r:n,b.name,b.kind==="prop"?{kind:"prop",publicPropName:b.publicPropName}:{kind:"local"});continue}let m=p.kind==="var"?n:r,f=a?"prop":"local";for(let b of ae(u.id))le(m,b,f==="prop"?{kind:"prop",publicPropName:b}:{kind:"local"})}}function tc(e,t){if("id"in e&&e.id&&typeof e.id==="object"&&"name"in e.id&&typeof e.id.name==="string")le(t,e.id.name,{kind:"local"});for(let r of e.params)for(let n of ae(r))le(t,n,{kind:"local"})}function rc(e,t,r,n){if(!Array.isArray(t))return;for(let i of t){if(!i||typeof i!=="object"||!("type"in i))continue;switch(i.type){case"VariableDeclaration":Or(e,i,r,n);break;case"FunctionDeclaration":if(i.id?.name)le(r,i.id.name,{kind:"local"});break;case"ClassDeclaration":if(i.id?.name)le(r,i.id.name,{kind:"local"});break}}}function nc(e,t,r){if(!r||typeof r!=="object")return;let n="content"in r&&r.content&&typeof r.content==="object"&&"body"in r.content&&Array.isArray(r.content.body)?r.content:("body"in r)&&Array.isArray(r.body)?r:void 0;if(!n||!("body"in n)||!Array.isArray(n.body))return;for(let i of n.body){if(!i||typeof i!=="object"||!("type"in i))continue;switch(i.type){case"ImportDeclaration":for(let o of i.specifiers??[])if(o.local?.name)le(t.componentScope,o.local.name,{kind:"local"});break;case"VariableDeclaration":Or(e,i,t.componentScope,t.componentScope,{allowRunesProps:!0});break;case"FunctionDeclaration":if(i.id?.name)le(t.componentScope,i.id.name,{kind:"local"});break;case"ClassDeclaration":if(i.id?.name)le(t.componentScope,i.id.name,{kind:"local"});break;case"ExportNamedDeclaration":if(!i.declaration||typeof i.declaration!=="object"||!("type"in i.declaration))break;if(i.declaration.type==="VariableDeclaration")Or(e,i.declaration,t.componentScope,t.componentScope,{forceProp:!0});else if(i.declaration.type==="FunctionDeclaration"&&i.declaration.id?.name)le(t.componentScope,i.declaration.id.name,{kind:"prop",publicPropName:i.declaration.id.name});break}}}function gi(e,t){t.componentScope.clear(),t.scopeDeclarations=new WeakMap,t.activeScopes.length=0,nc(e,t,t.parsed?.instance)}function xi(e){return{varScopeStack:[e.componentScope]}}function bi(e,t,r,n){if(!Wt(n))return;let i=Zo(t,n),o=r.varScopeStack[r.varScopeStack.length-1]??t.componentScope;switch(String(n.type)){case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":tc(n,i);break;case"BlockStatement":rc(e,n.body,i,o);break;case"CatchClause":if("param"in n)for(let p of ae(n.param))le(i,p,{kind:"local"});break;case"EachBlock":{let p=n;for(let u of ae(p.context))le(i,u,{kind:"local"});if(typeof p.index==="string")le(i,p.index,{kind:"local"});else if(p.index&&"name"in p.index)le(i,p.index.name,{kind:"local"});break}case"AwaitBlock":{let p=n;for(let u of ae(p.value))le(i,u,{kind:"local"});for(let u of ae(p.error))le(i,u,{kind:"local"});break}}if(yi(n))r.varScopeStack.push(i)}function Ti(e,t){if(yi(t))e.varScopeStack.pop()}var ic=new Set(["$state","$derived","$effect","$props","$bindable","$inspect","$host"]);function sc(e,t){switch(t?.type){case"MemberExpression":return t.computed||e===t.object;case"MethodDefinition":return!!t.computed;case"MetaProperty":return e===t.meta;case"PropertyDefinition":return t.computed||e===t.value;case"Property":return t.computed||e===t.value;case"ExportSpecifier":case"ImportSpecifier":return e===t.local;case"LabeledStatement":case"BreakStatement":case"ContinueStatement":return!1;default:return!0}}function ac(e,t){for(let r=t.length-1;r>=0;r-=1)if(t[r]?.has(e))return!0;return!1}function oc(e){let t=new Set;if(!e||typeof e!=="object"||!("type"in e))return t;switch(String(e.type)){case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":{let r=e;if(r.id?.name)t.add(r.id.name);for(let n of r.params??[])ae(n,t);break}case"BlockStatement":Kt(e.body,t);break;case"CatchClause":ae(e.param,t);break;case"EachBlock":{let r=e;if(ae(r.context,t),typeof r.index==="string")t.add(r.index);else if(r.index?.name)t.add(r.index.name);break}case"AwaitBlock":{let r=e;ae(r.value,t),ae(r.error,t);break}}return t}function Kt(e,t){if(!Array.isArray(e))return;for(let r of e){if(!r||typeof r!=="object"||!("type"in r))continue;switch(String(r.type)){case"ImportDeclaration":for(let n of r.specifiers??[])if(n.local?.name)t.add(n.local.name);break;case"VariableDeclaration":for(let n of r.declarations??[])ae(n.id,t);break;case"FunctionDeclaration":case"ClassDeclaration":{let n=r.id?.name;if(n)t.add(n);break}case"ExportNamedDeclaration":{let n=r.declaration;if(n&&typeof n==="object"&&"type"in n)Kt([n],t);break}}}}function Fr(e,t){if(!e||typeof e!=="object")return!1;let r=[...t],n=!1;return Ne(e,{enter(i,o){if(n){this.skip();return}if(Wt(i))r.push(oc(i));if(o&&i.type==="Identifier"&&ic.has(i.name)&&!o.type.startsWith("TS")&&sc(i,o)&&!ac(i.name,r))n=!0,this.skip()},leave(i){if(Wt(i))r.pop()}}),n}function vi(e){if(!e||typeof e!=="object")return;if("content"in e){let t=e.content,r=t&&typeof t==="object"&&"body"in t?t.body:void 0;if(Array.isArray(r))return r}if("body"in e&&Array.isArray(e.body))return e.body;return}function Ei(e){if(e.runesOptionOverride!==void 0)return e.runesOptionOverride?"runes":"legacy";let t=e.parsed;if(!t)return"legacy";let r=new Set;Kt(vi(t.module),r);let n=new Set;return Kt(vi(t.instance),n),Fr(t.module,[r])||Fr(t.instance,[r,n])||Fr(t.fragment,[r,n])?"runes":"legacy"}var cc=/[A-Za-z_$][\w$]*/g;function pc(e,t,r){let n=new Map,i=t.typeParameters?.params,o=r.typeArguments?.params;if(!i?.length||!o?.length)return n;for(let a=0;a<i.length;a++){let p=i[a]?.name,u=o[a];if(!p||u?.start===void 0||u?.end===void 0)continue;let m=te(e,u.start,u.end)?.trim();if(m)n.set(p,m)}return n}function lc(e,t){if(t.size===0)return e;return e.replace(cc,(r)=>t.get(r)??r)}function Et(e,t,r,n,i=new Set){let o=new Map;if(!r?.type)return o;let a=(p)=>{for(let u of p){if(u?.type!=="TSPropertySignature"||u.computed)continue;if(!u.key)continue;let m=e.getPropertyName(u.key);if(!m)continue;let f=u.typeAnnotation?.start,b=u.typeAnnotation?.end;if(f===void 0||b===void 0)continue;let E=te(t,f+1,b)?.trim();if(!E)continue;o.set(m,{type:E,optional:u.optional===!0,source:se(t,u)})}};switch(r.type){case"TSTypeLiteral":a(r.members??[]);break;case"TSInterfaceDeclaration":a(r.body?.body??[]);break;case"TSTypeAliasDeclaration":{let p=Et(e,t,r.typeAnnotation,n,i);for(let[u,m]of p)o.set(u,m);break}case"TSTypeReference":{let p=ei(r.typeName);if(!p||i.has(p))break;let u=n.get(p);if(!u)break;i.add(p);let m=Et(e,t,u,n,i);i.delete(p);let f=pc(t,u,r);for(let[b,E]of m)o.set(b,f.size===0?E:{...E,type:lc(E.type,f)});break}case"TSIntersectionType":for(let p of r.types??[]){let u=Et(e,t,p,n,i);for(let[m,f]of u)o.set(m,f)}break;case"TSParenthesizedType":{let p=Et(e,t,r.typeAnnotation,n,i);for(let[u,m]of p)o.set(u,m);break}}return o}function Si(e,t,r){if(t.runesPropsDeclarationMetadataByDeclaratorStart.clear(),t.explicitPropTypesByName.clear(),t.explicitVariableTypesByName.clear(),t.typeImportBindingsByLocalName.clear(),t.localTypeDeclarationsByName.clear(),t.typedRunesPropsDeclarations.length=0,!t.source)return;let n=r;t.scriptLanguage=e.resolveScriptLanguage(n),t.customElementTag=n.options?.customElement?.tag,t.runesOptionOverride=n.options?.runes,t.scriptGenericsAttribute=e.resolveScriptGenericsAttribute(n);let i=n.instance?.content?.body??[];for(let o of i){if(!o?.type)continue;if(o.type==="ImportDeclaration"&&o.source?.value)for(let a of o.specifiers??[]){let p=a.local?.name;if(!p)continue;if(!(o.importKind==="type"||a.importKind==="type"))continue;let m,f;if(a.type==="ImportSpecifier")m="named",f=a.imported?.type==="Identifier"?a.imported.name:typeof a.imported?.value==="string"?a.imported.value:void 0;else if(a.type==="ImportDefaultSpecifier")m="default";else if(a.type==="ImportNamespaceSpecifier")m="namespace";if(!m)continue;t.typeImportBindingsByLocalName.set(p,{importedName:f,localName:p,source:String(o.source.value),specifierType:m})}if((o.type==="TSInterfaceDeclaration"||o.type==="TSTypeAliasDeclaration")&&o.id?.name&&o.start!==void 0&&o.end!==void 0)t.localTypeDeclarationsByName.set(o.id.name,{code:te(t,o.start,o.end)?.trim()??"",node:o,start:o.start});if(o.type==="ExportNamedDeclaration"&&o.declaration?.type==="VariableDeclaration")for(let a of o.declaration.declarations??[]){if(a.id?.type!=="Identifier"||!a.id.name)continue;let p=Ut(t,a.id.typeAnnotation);if(p)t.explicitPropTypesByName.set(a.id.name,p)}else if(o.type==="VariableDeclaration")for(let a of o.declarations??[]){if(a.id?.type!=="Identifier"||!a.id.name)continue;let p=Ut(t,a.id.typeAnnotation);if(p)t.explicitVariableTypesByName.set(a.id.name,p)}}for(let o of i){if(!o||typeof o!=="object"||!("declarations"in o))continue;for(let a of o.declarations??[]){if(!Le(je(a.init),"$props"))continue;let p=a.id?.typeAnnotation?void 0:Mn(a.init),u=a.id?.typeAnnotation?.typeAnnotation??p,m=a.id?.typeAnnotation?Ut(t,a.id.typeAnnotation):ri(t,p),f=Et(e,t,u,new Map(Array.from(t.localTypeDeclarationsByName.entries(),([T,w])=>[T,w.node]))),b=new Set,E=new Set;if(Te(t,u,b,E),ai(t,b,E),a.start!==void 0){let T={canonicalType:m,props:f,referencedImportedTypes:b,referencedLocalTypes:E};if(t.runesPropsDeclarationMetadataByDeclaratorStart.set(a.start,T),m)t.typedRunesPropsDeclarations.push(T)}}}}function Ci(e,t,r){for(let n of r.declarations){if(!Le(je(n.init),"$props"))continue;if(n.id.type==="Identifier"){t.wholePropsLocals.add(n.id.name),t.restPropLocals.add(n.id.name);let a=Lr(t,n.start);if(a)for(let[p,u]of a.props)dt(e,t,p,{name:p,kind:"let",type:u.type,typeSource:"typescript",isFunction:!1,isFunctionDeclaration:!1,isRequired:!u.optional,constant:!1,reactive:!1,source:u.source});continue}if(n.id.type!=="ObjectPattern")continue;let i=qe(t,e,r),o=n.id.properties.filter((a)=>{if(a.type!=="Property"||a.computed)return!1;if(!e.getPropertyName(a.key))return!1;if(a.value.type==="Identifier")return!0;return a.value.type==="AssignmentPattern"&&a.value.left.type==="Identifier"}).length;for(let a of n.id.properties){if(a.type==="RestElement"){if(a.argument.type==="Identifier")t.restPropLocals.add(a.argument.name);continue}let p=e.getPropertyName(a.key);if(!p)continue;let u,m;if(a.value.type==="Identifier")u=a.value.name;else{let l=a.value;u=l.left.name,m=l.right}if(!u)continue;if(e.trackPropLocalName(p,u),p==="children")t.snippetPropLocals.add(u);let f=di(t,e,a)??(o===1?i:void 0),b=Zn(t,n.start,p),{init:E,bindable:T}=Kn(m),w=E==null?{isFunction:!1}:$e(e,t,E),{value:B,type:C,isFunction:F,defaultValue:V}=w,L=b?.type===void 0&&f?.type===void 0?w.resolvedType:void 0;if(w.pendingCallDefault)t.pendingCallDefaultCandidates.push({propName:p,location:"props",...w.pendingCallDefault});let{type:X,typeSource:O,description:Q,params:g,returnType:s,isFunction:c}=vt({explicitType:b?.type,typeSeed:C,inferredTypeForSource:C,jsdocType:f?.type,jsdocDescription:f?.description,jsdocParams:f?.params,jsdocReturnType:f?.returnType,resolvedType:L,resolvedDescription:w.resolvedDescription,resolvedParams:w.resolvedParams,resolvedReturnType:w.resolvedReturnType,initializerIsFunction:F,isFunctionDeclaration:!1,inferIsFunctionFromTypeSignature:!0});if(T)t.reactive_vars.add(p);dt(e,t,p,{name:p,...u===p?{}:{localName:u},kind:"let",description:Q,binding:f?.binding,deprecated:f?.deprecated,tags:f?.tags,...T?{bindable:!0}:{},type:X,typeSource:O,value:B,defaultValue:V,params:g,returnType:s,isFunction:c,isFunctionDeclaration:!1,isRequired:E==null&&b?.optional!==!0,constant:!1,reactive:T,source:se(t,a)})}}}function Pi(e,t){if(e.syntaxMode!=="runes")return;for(let[r,n]of Array.from(e.events.entries())){if(n.type!=="dispatched")continue;if(t.has(r)||e.forwardedEvents.has(r))continue;let i=`on${r}`,o=e.props.get(i);if(!o)continue;let a=o.type!==void 0||o.params!==void 0||o.returnType!==void 0,p=n.detail===void 0||n.detail==="undefined"||n.detail==="null"?"() => void":`(detail: ${n.detail}) => void`;e.props.set(i,{...o,description:o.description??n.description,type:a?o.type:p,typeSource:a?o.typeSource:"inferred",isFunction:!0}),e.events.delete(r)}}var Ai=new Set(["TSAsExpression","TSSatisfiesExpression","TSNonNullExpression","TSTypeAssertion","TSInstantiationExpression"]);function zt(e){if(!e||typeof e!=="object")return;Ne(e,{enter(t){if(!Ai.has(t.type))return;let r=t.expression;while(r&&Ai.has(r.type))r=r.expression;if(r)this.replace(r)}})}function Xt(e,t){let r=t.source?.value;if(typeof r!=="string"||t.importKind==="type")return;for(let n of t.specifiers??[]){if(n.type!=="ImportSpecifier"||n.importKind==="type")continue;let i=n.local?.name;if(!i)continue;let o=n.imported?.name??(typeof n.imported?.value==="string"?n.imported.value:i);e.valueImportBindingsByLocalName.set(i,{localName:i,importedName:o,source:r})}}function Vr(e,t){if(!t)return;Ne(t,{enter(r){if(r.type==="ImportDeclaration")Xt(e,r);if(r.type==="FunctionDeclaration"){let n=r;if(n.id?.name)e.funcDecls.set(n.id.name,n)}}})}function wi(e,t,r){let n=t+1;while(n<e.length){if(e[n]==="\\"){n+=2;continue}if(e[n]===r)return n+1;n++}return n}function Ni(e,t){let r=t+1,n=0;while(r<e.length){let i=e[r];if(i==="\\"){r+=2;continue}if(n===0){if(i==="`")return r+1;if(i==="$"&&e[r+1]==="{"){n=1,r+=2;continue}r++;continue}if(i==="{")n++;else if(i==="}")n--;else if(i==='"'||i==="'"){r=wi(e,r,i);continue}else if(i==="`"){r=Ni(e,r);continue}r++}return r}function uc(e,t){let r=[],n=e.length,i=0;while(i<n){let o=e[i];if(o==='"'||o==="'"){i=wi(e,i,o);continue}if(o==="`"){i=Ni(e,i);continue}if(o==="/"&&e[i+1]==="/"){let a=i+2;while(a<n&&e[a]!==`
|
|
16
|
-
`)a++;i=a;continue}if(o==="/"&&e[i+1]==="*"){let a=i,p=i+2;while(p<n&&!(e[p]==="*"&&e[p+1]==="/"))p++;let u=Math.min(p+2,n),m=e.slice(a,u);r.push({end:u+t,isJsDoc:m.startsWith("/**")&&m.length>4,text:m}),i=u;continue}i++}return r}function ki(e,t,r){if(!e||typeof e!=="object"||!("type"in e))return;let n=e;if(n.type==="FunctionDeclaration"){if(n.id?.type==="Identifier"&&n.id.name)r.push({name:n.id.name,start:t});return}if(n.type==="VariableDeclaration"){for(let i of n.declarations??[])if(i?.id?.type==="Identifier"&&i.id.name)r.push({name:i.id.name,start:t})}}function hc(e){let t=[];for(let r of e){if(!r||typeof r!=="object"||!("type"in r))continue;let n=r;if(n.start===void 0)continue;if(n.type==="ExportNamedDeclaration"&&n.declaration)ki(n.declaration,n.start,t);else ki(n,n.start,t)}return t}function dc(e,t,r){let n;for(let i of e){if(i.end>t)break;if(!i.isJsDoc)continue;if(!Rr.test(r.slice(i.end,t)))continue;n=i}return n}function _i(e,t){let r=new Map;if(!e.source)return r;let n=[e.parsed?.module,e.parsed?.instance],i=[],o=[];for(let a of n){let p=a?.content;if(!p?.body||p.start===void 0||p.end===void 0)continue;i.push(...uc(e.source.slice(p.start,p.end),p.start)),o.push(...hc(p.body))}i.sort((a,p)=>a.end-p.end);for(let a of o){let p=dc(i,a.start,e.source);if(!p)continue;let u=xt(p.text),{type:m,description:f}=Mr(u);if(!m)continue;r.set(a.name,{type:t.aliasType(m.type),description:f||m.description})}return r}var fc={li:{direct:["li"]},dt:{descendant:["dt","dd"]},dd:{descendant:["dt","dd"]},p:{descendant:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","menu","nav","ol","p","pre","section","table","ul"]},rt:{descendant:["rt","rp"]},rp:{descendant:["rt","rp"]},optgroup:{descendant:["optgroup"]},option:{descendant:["option","optgroup"]},thead:{direct:["tbody","tfoot"]},tbody:{direct:["tbody","tfoot"]},tfoot:{direct:["tbody"]},tr:{direct:["tr","tbody"]},td:{direct:["td","th","tr"]},th:{direct:["td","th","tr"]}};function Ii(e,t){let r=fc[e];if(!r)return!1;if(!t)return!0;return(r.direct??r.descendant??[]).includes(t)}var Zr={};Ya(Zr,{Node:()=>kt,Parser:()=>ne,Position:()=>st,SourceLocation:()=>Pt,TokContext:()=>Se,Token:()=>or,TokenType:()=>z,defaultOptions:()=>Yt,getLineInfo:()=>Kr,isIdentifierChar:()=>ye,isIdentifierStart:()=>he,isNewLine:()=>Qe,keywordTypes:()=>rr,lineBreak:()=>de,lineBreakG:()=>Vi,nonASCIIwhitespace:()=>Wr,parse:()=>Jc,parseExpressionAt:()=>Yc,tokContexts:()=>re,tokTypes:()=>d,tokenizer:()=>Qc,version:()=>xs});var mc=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],Oi=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],yc="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ--ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・",Bi="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ--ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",jr={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"},$r="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",gc={5:$r,"5module":$r+" export import",6:$r+" const class extends export import super"},Fi=/^in(stanceof)?$/,xc=new RegExp("["+Bi+"]"),bc=new RegExp("["+Bi+yc+"]");function qr(e,t){var r=65536;for(var n=0;n<t.length;n+=2){if(r+=t[n],r>e)return!1;if(r+=t[n+1],r>=e)return!0}return!1}function he(e,t){if(e<65)return e===36;if(e<91)return!0;if(e<97)return e===95;if(e<123)return!0;if(e<=65535)return e>=170&&xc.test(String.fromCharCode(e));if(t===!1)return!1;return qr(e,Oi)}function ye(e,t){if(e<48)return e===36;if(e<58)return!0;if(e<65)return!1;if(e<91)return!0;if(e<97)return e===95;if(e<123)return!0;if(e<=65535)return e>=170&&bc.test(String.fromCharCode(e));if(t===!1)return!1;return qr(e,Oi)||qr(e,mc)}var z=function(t,r){if(r===void 0)r={};this.label=t,this.keyword=r.keyword,this.beforeExpr=!!r.beforeExpr,this.startsExpr=!!r.startsExpr,this.isLoop=!!r.isLoop,this.isAssign=!!r.isAssign,this.prefix=!!r.prefix,this.postfix=!!r.postfix,this.binop=r.binop||null,this.updateContext=null};function ve(e,t){return new z(e,{beforeExpr:!0,binop:t})}var Ee={beforeExpr:!0},me={startsExpr:!0},rr={};function K(e,t){if(t===void 0)t={};return t.keyword=e,rr[e]=new z(e,t)}var d={num:new z("num",me),regexp:new z("regexp",me),string:new z("string",me),name:new z("name",me),privateId:new z("privateId",me),eof:new z("eof"),bracketL:new z("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new z("]"),braceL:new z("{",{beforeExpr:!0,startsExpr:!0}),braceR:new z("}"),parenL:new z("(",{beforeExpr:!0,startsExpr:!0}),parenR:new z(")"),comma:new z(",",Ee),semi:new z(";",Ee),colon:new z(":",Ee),dot:new z("."),question:new z("?",Ee),questionDot:new z("?."),arrow:new z("=>",Ee),template:new z("template"),invalidTemplate:new z("invalidTemplate"),ellipsis:new z("...",Ee),backQuote:new z("`",me),dollarBraceL:new z("${",{beforeExpr:!0,startsExpr:!0}),eq:new z("=",{beforeExpr:!0,isAssign:!0}),assign:new z("_=",{beforeExpr:!0,isAssign:!0}),incDec:new z("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new z("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:ve("||",1),logicalAND:ve("&&",2),bitwiseOR:ve("|",3),bitwiseXOR:ve("^",4),bitwiseAND:ve("&",5),equality:ve("==/!=/===/!==",6),relational:ve("</>/<=/>=",7),bitShift:ve("<</>>/>>>",8),plusMin:new z("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:ve("%",10),star:ve("*",10),slash:ve("/",10),starstar:new z("**",{beforeExpr:!0}),coalesce:ve("??",1),_break:K("break"),_case:K("case",Ee),_catch:K("catch"),_continue:K("continue"),_debugger:K("debugger"),_default:K("default",Ee),_do:K("do",{isLoop:!0,beforeExpr:!0}),_else:K("else",Ee),_finally:K("finally"),_for:K("for",{isLoop:!0}),_function:K("function",me),_if:K("if"),_return:K("return",Ee),_switch:K("switch"),_throw:K("throw",Ee),_try:K("try"),_var:K("var"),_const:K("const"),_while:K("while",{isLoop:!0}),_with:K("with"),_new:K("new",{beforeExpr:!0,startsExpr:!0}),_this:K("this",me),_super:K("super",me),_class:K("class",me),_extends:K("extends",Ee),_export:K("export"),_import:K("import",me),_null:K("null",me),_true:K("true",me),_false:K("false",me),_in:K("in",{beforeExpr:!0,binop:7}),_instanceof:K("instanceof",{beforeExpr:!0,binop:7}),_typeof:K("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:K("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:K("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},de=/\r\n?|\n|\u2028|\u2029/,Vi=new RegExp(de.source,"g");function Qe(e){return e===10||e===13||e===8232||e===8233}function ji(e,t,r){if(r===void 0)r=e.length;for(var n=t;n<r;n++){var i=e.charCodeAt(n);if(Qe(i))return n<r-1&&i===13&&e.charCodeAt(n+1)===10?n+2:n+1}return-1}var Wr=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,oe=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,$i=Object.prototype,Tc=$i.hasOwnProperty,vc=$i.toString,at=Object.hasOwn||function(e,t){return Tc.call(e,t)},Di=Array.isArray||function(e){return vc.call(e)==="[object Array]"},Li=Object.create(null);function He(e){return Li[e]||(Li[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function Be(e){if(e<=65535)return String.fromCharCode(e);return e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320)}var Ec=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,st=function(t,r){this.line=t,this.column=r};st.prototype.offset=function(t){return new st(this.line,this.column+t)};var Pt=function(t,r,n){if(this.start=r,this.end=n,t.sourceFile!==null)this.source=t.sourceFile};function Kr(e,t){for(var r=1,n=0;;){var i=ji(e,n,t);if(i<0)return new st(r,t-n);++r,n=i}}var Yt={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},Ri=!1;function Sc(e){var t={};for(var r in Yt)t[r]=e&&at(e,r)?e[r]:Yt[r];if(t.ecmaVersion==="latest")t.ecmaVersion=1e8;else if(t.ecmaVersion==null){if(!Ri&&typeof console==="object"&&console.warn)Ri=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
|
|
17
|
-
Defaulting to 2020, but this will stop working in the future.`);t.ecmaVersion=11}else if(t.ecmaVersion>=2015)t.ecmaVersion-=2009;if(t.allowReserved==null)t.allowReserved=t.ecmaVersion<5;if(!e||e.allowHashBang==null)t.allowHashBang=t.ecmaVersion>=14;if(Di(t.onToken)){var n=t.onToken;t.onToken=function(i){return n.push(i)}}if(Di(t.onComment))t.onComment=Cc(t,t.onComment);if(t.sourceType==="commonjs"&&t.allowAwaitOutsideFunction)throw Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return t}function Cc(e,t){return function(r,n,i,o,a,p){var u={type:r?"Block":"Line",value:n,start:i,end:o};if(e.locations)u.loc=new Pt(this,a,p);if(e.ranges)u.range=[i,o];t.push(u)}}var Ye=1,Ze=2,zr=4,qi=8,Xr=16,Hi=32,nr=64,Ui=128,et=256,At=512,Gi=1024,ir=Ye|Ze|et;function Jr(e,t){return Ze|(e?zr:0)|(t?qi:0)}var Qt=0,Yr=1,Ve=2,Wi=3,Ki=4,zi=5,ne=function(t,r,n){this.options=t=Sc(t),this.sourceFile=t.sourceFile,this.keywords=He(gc[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var i="";if(t.allowReserved!==!0){if(i=jr[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module")i+=" await"}this.reservedWords=He(i);var o=(i?i+" ":"")+jr.strict;if(this.reservedWordsStrict=He(o),this.reservedWordsStrictBind=He(o+" "+jr.strictBind),this.input=String(r),this.containsEsc=!1,this.pos=n||0,this.curLine=1,t.startLocation)this.lineStart=this.pos-t.startLocation.column,this.curLine=t.startLocation.line;else if(n){if(this.lineStart=this.input.lastIndexOf(`
|
|
18
|
-
`,n-1)+1,this.options.locations)this.curLine=this.input.slice(0,this.lineStart).split(de).length}else this.lineStart=0;if(this.type=d.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=t.sourceType==="module",this.strict=this.inModule||t.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&&t.allowHashBang&&this.input.slice(0,2)==="#!")this.skipLineComment(2);this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?Ze:Ye),this.regexpState=null,this.privateNameStack=[]},Pe={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}};ne.prototype.parse=function(){var t=this,r=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return t.parseTopLevel(r)})};Pe.inFunction.get=function(){return(this.currentVarScope().flags&Ze)>0};Pe.inGenerator.get=function(){return(this.currentVarScope().flags&qi)>0};Pe.inAsync.get=function(){return(this.currentVarScope().flags&zr)>0};Pe.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],r=t.flags;if(r&(et|At))return!1;if(r&Ze)return(r&zr)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};Pe.allowReturn.get=function(){if(this.inFunction)return!0;if(this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&Ye)return!0;return!1};Pe.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&nr)>0||this.options.allowSuperOutsideMethod};Pe.allowDirectSuper.get=function(){return(this.currentThisScope().flags&Ui)>0};Pe.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};Pe.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],r=t.flags;if(r&(et|At)||r&Ze&&!(r&Xr))return!0}return!1};Pe.allowUsing.get=function(){var e=this.currentScope(),t=e.flags;if(t&Gi)return!1;if(!this.inModule&&t&Ye)return!1;return!0};Pe.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&et)>0};ne.extend=function(){var t=[],r=arguments.length;while(r--)t[r]=arguments[r];var n=this;for(var i=0;i<t.length;i++)n=t[i](n);return n};ne.parse=function(t,r){return new this(r,t).parse()};ne.parseExpressionAt=function(t,r,n){var i=new this(n,t,r);return i.nextToken(),i.parseExpression()};ne.tokenizer=function(t,r){return new this(r,t)};Object.defineProperties(ne.prototype,Pe);var ue=ne.prototype,Pc=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;ue.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){oe.lastIndex=e,e+=oe.exec(this.input)[0].length;var t=Pc.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){oe.lastIndex=e+t[0].length;var r=oe.exec(this.input),n=r.index+r[0].length,i=this.input.charAt(n);return i===";"||i==="}"||de.test(r[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(i)||i==="!"&&this.input.charAt(n+1)==="=")}if(e+=t[0].length,oe.lastIndex=e,e+=oe.exec(this.input)[0].length,this.input[e]===";")e++}};ue.eat=function(e){if(this.type===e)return this.next(),!0;else return!1};ue.isContextual=function(e){return this.type===d.name&&this.value===e&&!this.containsEsc};ue.eatContextual=function(e){if(!this.isContextual(e))return!1;return this.next(),!0};ue.catchStackOverflow=function(e){try{return e()}catch(t){if(t instanceof Error&&(/\bstack\b.*\b(exceeded|overflow)\b/i.test(t.message)||/\btoo much recursion\b/i.test(t.message)))this.raise(this.start,"Not enough stack space to parse input");else throw t}};ue.expectContextual=function(e){if(!this.eatContextual(e))this.unexpected()};ue.canInsertSemicolon=function(){return this.type===d.eof||this.type===d.braceR||de.test(this.input.slice(this.lastTokEnd,this.start))};ue.insertSemicolon=function(){if(this.canInsertSemicolon()){if(this.options.onInsertedSemicolon)this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc);return!0}};ue.semicolon=function(){if(!this.eat(d.semi)&&!this.insertSemicolon())this.unexpected()};ue.afterTrailingComma=function(e,t){if(this.type===e){if(this.options.onTrailingComma)this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc);if(!t)this.next();return!0}};ue.expect=function(e){this.eat(e)||this.unexpected()};ue.unexpected=function(e){this.raise(e!=null?e:this.start,"Unexpected token")};var sr=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};ue.checkPatternErrors=function(e,t){if(!e)return;if(e.trailingComma>-1)this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var r=t?e.parenthesizedAssign:e.parenthesizedBind;if(r>-1)this.raiseRecoverable(r,t?"Assigning to rvalue":"Parenthesized pattern")};ue.checkExpressionErrors=function(e,t){if(!e)return!1;var{shorthandAssign:r,doubleProto:n}=e;if(!t)return r>=0||n>=0;if(r>=0)this.raise(r,"Shorthand property assignments are valid only in destructuring patterns");if(n>=0)this.raiseRecoverable(n,"Redefinition of __proto__ property")};ue.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")};ue.isSimpleAssignTarget=function(e){if(e.type==="ParenthesizedExpression")return this.isSimpleAssignTarget(e.expression);return e.type==="Identifier"||e.type==="MemberExpression"};var I=ne.prototype;I.parseTopLevel=function(e){var t=Object.create(null);if(!e.body)e.body=[];while(this.type!==d.eof){var r=this.parseStatement(null,!0,t);e.body.push(r)}if(this.inModule)for(var n=0,i=Object.keys(this.undefinedExports);n<i.length;n+=1){var o=i[n];this.raiseRecoverable(this.undefinedExports[o].start,"Export '"+o+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType==="commonjs"?"script":this.options.sourceType,this.finishNode(e,"Program")};var Qr={kind:"loop"},Ac={kind:"switch"};I.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;oe.lastIndex=this.pos;var t=oe.exec(this.input),r=this.pos+t[0].length,n=this.fullCharCodeAt(r);if(n===91||n===92)return!0;if(e)return!1;if(n===123)return!0;if(he(n)){var i=r;do r+=n<=65535?1:2;while(ye(n=this.fullCharCodeAt(r)));if(n===92)return!0;var o=this.input.slice(i,r);if(!Fi.test(o))return!0}return!1};I.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;oe.lastIndex=this.pos;var e=oe.exec(this.input),t=this.pos+e[0].length,r;return!de.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(ye(r=this.fullCharCodeAt(t+8))||r===92))};I.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?"await":"using"))return!1;oe.lastIndex=this.pos;var r=oe.exec(this.input),n=this.pos+r[0].length;if(de.test(this.input.slice(this.pos,n)))return!1;if(e){var i=n+5,o;if(this.input.slice(n,i)!=="using"||i===this.input.length||ye(o=this.fullCharCodeAt(i))||o===92)return!1;oe.lastIndex=i;var a=oe.exec(this.input);if(n=i+a[0].length,a&&de.test(this.input.slice(i,n)))return!1}var p=this.fullCharCodeAt(n);if(!he(p)&&p!==92)return!1;var u=n;do n+=p<=65535?1:2;while(ye(p=this.fullCharCodeAt(n)));if(p===92)return!0;var m=this.input.slice(u,n);if(Fi.test(m))return!1;if(t&&!e&&m==="of"){oe.lastIndex=n;var f=oe.exec(this.input);if(n=n+f[0].length,this.input.charCodeAt(n)!==61||(p=this.input.charCodeAt(n+1))===61||p===62)return!1}return!0};I.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)};I.isUsing=function(e){return this.isUsingKeyword(!1,e)};I.parseStatement=function(e,t,r){var n=this.type,i=this.startNode(),o;if(this.isLet(e))n=d._var,o="let";switch(n){case d._break:case d._continue:return this.parseBreakContinueStatement(i,n.keyword);case d._debugger:return this.parseDebuggerStatement(i);case d._do:return this.parseDoStatement(i);case d._for:return this.parseForStatement(i);case d._function:if(e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6)this.unexpected();return this.parseFunctionStatement(i,!1,!e);case d._class:if(e)this.unexpected();return this.parseClass(i,!0);case d._if:return this.parseIfStatement(i);case d._return:return this.parseReturnStatement(i);case d._switch:return this.parseSwitchStatement(i);case d._throw:return this.parseThrowStatement(i);case d._try:return this.parseTryStatement(i);case d._const:case d._var:if(o=o||this.value,e&&o!=="var")this.unexpected();return this.parseVarStatement(i,o);case d._while:return this.parseWhileStatement(i);case d._with:return this.parseWithStatement(i);case d.braceL:return this.parseBlock(!0,i);case d.semi:return this.parseEmptyStatement(i);case d._export:case d._import:if(this.options.ecmaVersion>10&&n===d._import){oe.lastIndex=this.pos;var a=oe.exec(this.input),p=this.pos+a[0].length,u=this.input.charCodeAt(p);if(u===40||u===46)return this.parseExpressionStatement(i,this.parseExpression())}if(!this.options.allowImportExportEverywhere){if(!t)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 n===d._import?this.parseImport(i):this.parseExport(i,r);default:if(this.isAsyncFunction()){if(e)this.unexpected();return this.next(),this.parseFunctionStatement(i,!0,!e)}var m=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(m){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(e)this.raise(this.start,"Using declaration is not allowed in single-statement positions");if(m==="await using"){if(!this.canAwait)this.raise(this.start,"Await using cannot appear outside of async function");this.next()}return this.next(),this.parseVar(i,!1,m),this.semicolon(),this.finishNode(i,"VariableDeclaration")}var f=this.value,b=this.parseExpression();if(n===d.name&&b.type==="Identifier"&&this.eat(d.colon))return this.parseLabeledStatement(i,f,b,e);else return this.parseExpressionStatement(i,b)}};I.parseBreakContinueStatement=function(e,t){var r=t==="break";if(this.next(),this.eat(d.semi)||this.insertSemicolon())e.label=null;else if(this.type!==d.name)this.unexpected();else e.label=this.parseIdent(),this.semicolon();var n=0;for(;n<this.labels.length;++n){var i=this.labels[n];if(e.label==null||i.name===e.label.name){if(i.kind!=null&&(r||i.kind==="loop"))break;if(e.label&&r)break}}if(n===this.labels.length)this.raise(e.start,"Unsyntactic "+t);return this.finishNode(e,r?"BreakStatement":"ContinueStatement")};I.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")};I.parseDoStatement=function(e){if(this.next(),this.labels.push(Qr),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(d._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6)this.eat(d.semi);else this.semicolon();return this.finishNode(e,"DoWhileStatement")};I.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Qr),this.enterScope(0),this.expect(d.parenL),this.type===d.semi){if(t>-1)this.unexpected(t);return this.parseFor(e,null)}var r=this.isLet();if(this.type===d._var||this.type===d._const||r){var n=this.startNode(),i=r?"let":this.value;return this.next(),this.parseVar(n,!0,i),this.finishNode(n,"VariableDeclaration"),this.parseForAfterInit(e,n,t)}var o=this.isContextual("let"),a=!1,p=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(p){var u=this.startNode();if(this.next(),p==="await using"){if(!this.canAwait)this.raise(this.start,"Await using cannot appear outside of async function");this.next()}return this.parseVar(u,!0,p),this.finishNode(u,"VariableDeclaration"),this.parseForAfterInit(e,u,t)}var m=this.containsEsc,f=new sr,b=this.start,E=t>-1?this.parseExprSubscripts(f,"await"):this.parseExpression(!0,f);if(this.type===d._in||(a=this.options.ecmaVersion>=6&&this.isContextual("of"))){if(t>-1){if(this.type===d._in)this.unexpected(t);e.await=!0}else if(a&&this.options.ecmaVersion>=8){if(E.start===b&&!m&&E.type==="Identifier"&&E.name==="async")this.unexpected();else if(this.options.ecmaVersion>=9)e.await=!1}if(o&&a)this.raise(E.start,"The left-hand side of a for-of loop may not start with 'let'.");return this.toAssignable(E,!1,f),this.checkLValPattern(E),this.parseForIn(e,E)}else this.checkExpressionErrors(f,!0);if(t>-1)this.unexpected(t);return this.parseFor(e,E)};I.parseForAfterInit=function(e,t,r){if((this.type===d._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&t.declarations.length===1){if(this.type===d._in){if((t.kind==="using"||t.kind==="await using")&&!t.declarations[0].init)this.raise(this.start,"Using declaration is not allowed in for-in loops");if(this.options.ecmaVersion>=9&&r>-1)this.unexpected(r)}else if(this.options.ecmaVersion>=9)e.await=r>-1;return this.parseForIn(e,t)}if(r>-1)this.unexpected(r);return this.parseFor(e,t)};I.parseFunctionStatement=function(e,t,r){return this.next(),this.parseFunction(e,Ct|(r?0:Hr),!1,t)};I.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(d._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};I.parseReturnStatement=function(e){if(!this.allowReturn)this.raise(this.start,"'return' outside of function");if(this.next(),this.eat(d.semi)||this.insertSemicolon())e.argument=null;else e.argument=this.parseExpression(),this.semicolon();return this.finishNode(e,"ReturnStatement")};I.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(d.braceL),this.labels.push(Ac),this.enterScope(Gi);var t;for(var r=!1;this.type!==d.braceR;)if(this.type===d._case||this.type===d._default){var n=this.type===d._case;if(t)this.finishNode(t,"SwitchCase");if(e.cases.push(t=this.startNode()),t.consequent=[],this.next(),n)t.test=this.parseExpression();else{if(r)this.raiseRecoverable(this.lastTokStart,"Multiple default clauses");r=!0,t.test=null}this.expect(d.colon)}else{if(!t)this.unexpected();t.consequent.push(this.parseStatement(null))}if(this.exitScope(),t)this.finishNode(t,"SwitchCase");return this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")};I.parseThrowStatement=function(e){if(this.next(),de.test(this.input.slice(this.lastTokEnd,this.start)))this.raise(this.lastTokEnd,"Illegal newline after throw");return e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var kc=[];I.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?Hi:0),this.checkLValPattern(e,t?Ki:Ve),this.expect(d.parenR),e};I.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===d._catch){var t=this.startNode();if(this.next(),this.eat(d.parenL))t.param=this.parseCatchClauseParam();else{if(this.options.ecmaVersion<10)this.unexpected();t.param=null,this.enterScope(0)}t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}if(e.finalizer=this.eat(d._finally)?this.parseBlock():null,!e.handler&&!e.finalizer)this.raise(e.start,"Missing catch or finally clause");return this.finishNode(e,"TryStatement")};I.parseVarStatement=function(e,t,r){return this.next(),this.parseVar(e,!1,t,r),this.semicolon(),this.finishNode(e,"VariableDeclaration")};I.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(Qr),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};I.parseWithStatement=function(e){if(this.strict)this.raise(this.start,"'with' in strict mode");return this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")};I.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};I.parseLabeledStatement=function(e,t,r,n){for(var i=0,o=this.labels;i<o.length;i+=1){var a=o[i];if(a.name===t)this.raise(r.start,"Label '"+t+"' is already declared")}var p=this.type.isLoop?"loop":this.type===d._switch?"switch":null;for(var u=this.labels.length-1;u>=0;u--){var m=this.labels[u];if(m.statementStart===e.start)m.statementStart=this.start,m.kind=p;else break}return this.labels.push({name:t,kind:p,statementStart:this.start}),e.body=this.parseStatement(n?n.indexOf("label")===-1?n+"label":n:"label"),this.labels.pop(),e.label=r,this.finishNode(e,"LabeledStatement")};I.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")};I.parseBlock=function(e,t,r){if(e===void 0)e=!0;if(t===void 0)t=this.startNode();if(t.body=[],this.expect(d.braceL),e)this.enterScope(0);while(this.type!==d.braceR){var n=this.parseStatement(null);t.body.push(n)}if(r)this.strict=!1;if(this.next(),e)this.exitScope();return this.finishNode(t,"BlockStatement")};I.parseFor=function(e,t){return e.init=t,this.expect(d.semi),e.test=this.type===d.semi?null:this.parseExpression(),this.expect(d.semi),e.update=this.type===d.parenR?null:this.parseExpression(),this.expect(d.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};I.parseForIn=function(e,t){var r=this.type===d._in;if(this.next(),t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!r||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier"))this.raise(t.start,(r?"for-in":"for-of")+" loop variable declaration may not have an initializer");return e.left=t,e.right=r?this.parseExpression():this.parseMaybeAssign(),this.expect(d.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,r?"ForInStatement":"ForOfStatement")};I.parseVar=function(e,t,r,n){e.declarations=[],e.kind=r;for(;;){var i=this.startNode();if(this.parseVarId(i,r),this.eat(d.eq))i.init=this.parseMaybeAssign(t);else if(!n&&r==="const"&&!(this.type===d._in||this.options.ecmaVersion>=6&&this.isContextual("of")))this.unexpected();else if(!n&&(r==="using"||r==="await using")&&this.options.ecmaVersion>=17&&this.type!==d._in&&!this.isContextual("of"))this.raise(this.lastTokEnd,"Missing initializer in "+r+" declaration");else if(!n&&i.id.type!=="Identifier"&&!(t&&(this.type===d._in||this.isContextual("of"))))this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value");else i.init=null;if(e.declarations.push(this.finishNode(i,"VariableDeclarator")),!this.eat(d.comma))break}return e};I.parseVarId=function(e,t){e.id=t==="using"||t==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?Yr:Ve,!1)};var Ct=1,Hr=2,Xi=4;I.parseFunction=function(e,t,r,n,i){if(this.initFunction(e),this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!n){if(this.type===d.star&&t&Hr)this.unexpected();e.generator=this.eat(d.star)}if(this.options.ecmaVersion>=8)e.async=!!n;if(t&Ct){if(e.id=t&Xi&&this.type!==d.name?null:this.parseIdent(),e.id&&!(t&Hr))this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?Yr:Ve:Wi)}var o=this.yieldPos,a=this.awaitPos,p=this.awaitIdentPos;if(this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Jr(e.async,e.generator)),!(t&Ct))e.id=this.type===d.name?this.parseIdent():null;return this.parseFunctionParams(e),this.parseFunctionBody(e,r,!1,i),this.yieldPos=o,this.awaitPos=a,this.awaitIdentPos=p,this.finishNode(e,t&Ct?"FunctionDeclaration":"FunctionExpression")};I.parseFunctionParams=function(e){this.expect(d.parenL),e.params=this.parseBindingList(d.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};I.parseClass=function(e,t){this.next();var r=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var n=this.enterClassBody(),i=this.startNode(),o=!1;i.body=[],this.expect(d.braceL);while(this.type!==d.braceR){var a=this.parseClassElement(e.superClass!==null);if(a){if(i.body.push(a),a.type==="MethodDefinition"&&a.kind==="constructor"){if(o)this.raiseRecoverable(a.start,"Duplicate constructor in the same class");o=!0}else if(a.key&&a.key.type==="PrivateIdentifier"&&wc(n,a))this.raiseRecoverable(a.key.start,"Identifier '#"+a.key.name+"' has already been declared")}}return this.strict=r,this.next(),e.body=this.finishNode(i,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};I.parseClassElement=function(e){if(this.eat(d.semi))return null;var t=this.options.ecmaVersion,r=this.startNode(),n="",i=!1,o=!1,a="method",p=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(d.braceL))return this.parseClassStaticBlock(r),r;if(this.isClassElementNameStart()||this.type===d.star)p=!0;else n="static"}if(r.static=p,!n&&t>=8&&this.eatContextual("async"))if((this.isClassElementNameStart()||this.type===d.star)&&!this.canInsertSemicolon())o=!0;else n="async";if(!n&&(t>=9||!o)&&this.eat(d.star))i=!0;if(!n&&!o&&!i){var u=this.value;if(this.eatContextual("get")||this.eatContextual("set"))if(this.isClassElementNameStart())a=u;else n=u}if(n)r.computed=!1,r.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),r.key.name=n,this.finishNode(r.key,"Identifier");else this.parseClassElementName(r);if(t<13||this.type===d.parenL||a!=="method"||i||o){var m=!r.static&&Zt(r,"constructor"),f=m&&e;if(m&&a!=="method")this.raise(r.key.start,"Constructor can't have get/set modifier");r.kind=m?"constructor":a,this.parseClassMethod(r,i,o,f)}else this.parseClassField(r);return r};I.isClassElementNameStart=function(){return this.type===d.name||this.type===d.privateId||this.type===d.num||this.type===d.string||this.type===d.bracketL||this.type.keyword};I.parseClassElementName=function(e){if(this.type===d.privateId){if(this.value==="constructor")this.raise(this.start,"Classes can't have an element named '#constructor'");e.computed=!1,e.key=this.parsePrivateIdent()}else this.parsePropertyName(e)};I.parseClassMethod=function(e,t,r,n){var i=e.key;if(e.kind==="constructor"){if(t)this.raise(i.start,"Constructor can't be a generator");if(r)this.raise(i.start,"Constructor can't be an async method")}else if(e.static&&Zt(e,"prototype"))this.raise(i.start,"Classes may not have a static property named prototype");var o=e.value=this.parseMethod(t,r,n);if(e.kind==="get"&&o.params.length!==0)this.raiseRecoverable(o.start,"getter should have no params");if(e.kind==="set"&&o.params.length!==1)this.raiseRecoverable(o.start,"setter should have exactly one param");if(e.kind==="set"&&o.params[0].type==="RestElement")this.raiseRecoverable(o.params[0].start,"Setter cannot use rest params");return this.finishNode(e,"MethodDefinition")};I.parseClassField=function(e){if(Zt(e,"constructor"))this.raise(e.key.start,"Classes can't have a field named 'constructor'");else if(e.static&&Zt(e,"prototype"))this.raise(e.key.start,"Classes can't have a static field named 'prototype'");if(this.eat(d.eq))this.enterScope(At|nr),e.value=this.parseMaybeAssign(),this.exitScope();else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")};I.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;this.labels=[],this.enterScope(et|nr);while(this.type!==d.braceR){var r=this.parseStatement(null);e.body.push(r)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")};I.parseClassId=function(e,t){if(this.type===d.name){if(e.id=this.parseIdent(),t)this.checkLValSimple(e.id,Ve,!1)}else{if(t===!0)this.unexpected();e.id=null}};I.parseClassSuper=function(e){e.superClass=this.eat(d._extends)?this.parseExprSubscripts(null,!1):null};I.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};I.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,r=e.used;if(!this.options.checkPrivateFields)return;var n=this.privateNameStack.length,i=n===0?null:this.privateNameStack[n-1];for(var o=0;o<r.length;++o){var a=r[o];if(!at(t,a.name))if(i)i.used.push(a);else this.raiseRecoverable(a.start,"Private field '#"+a.name+"' must be declared in an enclosing class")}};function wc(e,t){var r=t.key.name,n=e[r],i="true";if(t.type==="MethodDefinition"&&(t.kind==="get"||t.kind==="set"))i=(t.static?"s":"i")+t.kind;if(n==="iget"&&i==="iset"||n==="iset"&&i==="iget"||n==="sget"&&i==="sset"||n==="sset"&&i==="sget")return e[r]="true",!1;else if(!n)return e[r]=i,!1;else return!0}function Zt(e,t){var{computed:r,key:n}=e;return!r&&(n.type==="Identifier"&&n.name===t||n.type==="Literal"&&n.value===t)}I.parseExportAllDeclaration=function(e,t){if(this.options.ecmaVersion>=11)if(this.eatContextual("as"))e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart);else e.exported=null;if(this.expectContextual("from"),this.type!==d.string)this.unexpected();if(e.source=this.parseExprAtom(),this.options.ecmaVersion>=16)e.attributes=this.parseWithClause();return this.semicolon(),this.finishNode(e,"ExportAllDeclaration")};I.parseExport=function(e,t){if(this.next(),this.eat(d.star))return this.parseExportAllDeclaration(e,t);if(this.eat(d._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement()){if(e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration")this.checkVariableExport(t,e.declaration.declarations);else this.checkExport(t,e.declaration.id,e.declaration.id.start);if(e.specifiers=[],e.source=null,this.options.ecmaVersion>=16)e.attributes=[]}else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from")){if(this.type!==d.string)this.unexpected();if(e.source=this.parseExprAtom(),this.options.ecmaVersion>=16)e.attributes=this.parseWithClause()}else{for(var r=0,n=e.specifiers;r<n.length;r+=1){var i=n[r];if(this.checkUnreserved(i.local),this.checkLocalExport(i.local),i.local.type==="Literal")this.raise(i.local.start,"A string literal cannot be used as an exported binding without `from`.")}if(e.source=null,this.options.ecmaVersion>=16)e.attributes=[]}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")};I.parseExportDeclaration=function(e){return this.parseStatement(null)};I.parseExportDefaultDeclaration=function(){var e;if(this.type===d._function||(e=this.isAsyncFunction())){var t=this.startNode();if(this.next(),e)this.next();return this.parseFunction(t,Ct|Xi,!1,e)}else if(this.type===d._class){var r=this.startNode();return this.parseClass(r,"nullableID")}else{var n=this.parseMaybeAssign();return this.semicolon(),n}};I.checkExport=function(e,t,r){if(!e)return;if(typeof t!=="string")t=t.type==="Identifier"?t.name:t.value;if(at(e,t))this.raiseRecoverable(r,"Duplicate export '"+t+"'");e[t]=!0};I.checkPatternExport=function(e,t){var r=t.type;if(r==="Identifier")this.checkExport(e,t,t.start);else if(r==="ObjectPattern")for(var n=0,i=t.properties;n<i.length;n+=1){var o=i[n];this.checkPatternExport(e,o)}else if(r==="ArrayPattern")for(var a=0,p=t.elements;a<p.length;a+=1){var u=p[a];if(u)this.checkPatternExport(e,u)}else if(r==="Property")this.checkPatternExport(e,t.value);else if(r==="AssignmentPattern")this.checkPatternExport(e,t.left);else if(r==="RestElement")this.checkPatternExport(e,t.argument)};I.checkVariableExport=function(e,t){if(!e)return;for(var r=0,n=t;r<n.length;r+=1){var i=n[r];this.checkPatternExport(e,i.id)}};I.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()};I.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual("as")?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,"ExportSpecifier")};I.parseExportSpecifiers=function(e){var t=[],r=!0;this.expect(d.braceL);while(!this.eat(d.braceR)){if(!r){if(this.expect(d.comma),this.afterTrailingComma(d.braceR))break}else r=!1;t.push(this.parseExportSpecifier(e))}return t};I.parseImport=function(e){if(this.next(),this.type===d.string)e.specifiers=kc,e.source=this.parseExprAtom();else e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===d.string?this.parseExprAtom():this.unexpected();if(this.options.ecmaVersion>=16)e.attributes=this.parseWithClause();return this.semicolon(),this.finishNode(e,"ImportDeclaration")};I.parseImportSpecifier=function(){var e=this.startNode();if(e.imported=this.parseModuleExportName(),this.eatContextual("as"))e.local=this.parseIdent();else this.checkUnreserved(e.imported),e.local=e.imported;return this.checkLValSimple(e.local,Ve),this.finishNode(e,"ImportSpecifier")};I.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,Ve),this.finishNode(e,"ImportDefaultSpecifier")};I.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,Ve),this.finishNode(e,"ImportNamespaceSpecifier")};I.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===d.name){if(e.push(this.parseImportDefaultSpecifier()),!this.eat(d.comma))return e}if(this.type===d.star)return e.push(this.parseImportNamespaceSpecifier()),e;this.expect(d.braceL);while(!this.eat(d.braceR)){if(!t){if(this.expect(d.comma),this.afterTrailingComma(d.braceR))break}else t=!1;e.push(this.parseImportSpecifier())}return e};I.parseWithClause=function(){var e=[];if(!this.eat(d._with))return e;this.expect(d.braceL);var t={},r=!0;while(!this.eat(d.braceR)){if(!r){if(this.expect(d.comma),this.afterTrailingComma(d.braceR))break}else r=!1;var n=this.parseImportAttribute(),i=n.key.type==="Identifier"?n.key.name:n.key.value;if(at(t,i))this.raiseRecoverable(n.key.start,"Duplicate attribute key '"+i+"'");t[i]=!0,e.push(n)}return e};I.parseImportAttribute=function(){var e=this.startNode();if(e.key=this.type===d.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(d.colon),this.type!==d.string)this.unexpected();return e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")};I.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===d.string){var e=this.parseLiteral(this.value);if(Ec.test(e.value))this.raise(e.start,"An export name cannot include a lone surrogate.");return e}return this.parseIdent(!0)};I.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)};I.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value==="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var Ae=ne.prototype;Ae.toAssignable=function(e,t,r){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":if(this.inAsync&&e.name==="await")this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":if(e.type="ObjectPattern",r)this.checkPatternErrors(r,!0);for(var n=0,i=e.properties;n<i.length;n+=1){var o=i[n];if(this.toAssignable(o,t),o.type==="RestElement"&&(o.argument.type==="ArrayPattern"||o.argument.type==="ObjectPattern"))this.raise(o.argument.start,"Unexpected token")}break;case"Property":if(e.kind!=="init")this.raise(e.key.start,"Object pattern can't contain getter or setter");this.toAssignable(e.value,t);break;case"ArrayExpression":if(e.type="ArrayPattern",r)this.checkPatternErrors(r,!0);this.toAssignableList(e.elements,t);break;case"SpreadElement":if(e.type="RestElement",this.toAssignable(e.argument,t),e.argument.type==="AssignmentPattern")this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":if(e.operator!=="=")this.raise(e.left.end,"Only '=' operator can be used for specifying default value.");e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,r);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else if(r)this.checkPatternErrors(r,!0);return e};Ae.toAssignableList=function(e,t){var r=e.length;for(var n=0;n<r;n++){var i=e[n];if(i)this.toAssignable(i,t)}if(r){var o=e[r-1];if(this.options.ecmaVersion===6&&t&&o&&o.type==="RestElement"&&o.argument.type!=="Identifier")this.unexpected(o.argument.start)}return e};Ae.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")};Ae.parseRestBinding=function(){var e=this.startNode();if(this.next(),this.options.ecmaVersion===6&&this.type!==d.name)this.unexpected();return e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")};Ae.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case d.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(d.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case d.braceL:return this.parseObj(!0)}return this.parseIdent()};Ae.parseBindingList=function(e,t,r,n){var i=[],o=!0;while(!this.eat(e)){if(o)o=!1;else this.expect(d.comma);if(t&&this.type===d.comma)i.push(null);else if(r&&this.afterTrailingComma(e))break;else if(this.type===d.ellipsis){var a=this.parseRestBinding();if(this.parseBindingListItem(a),i.push(a),this.type===d.comma)this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");this.expect(e);break}else i.push(this.parseAssignableListItem(n))}return i};Ae.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t};Ae.parseBindingListItem=function(e){return e};Ae.parseMaybeDefault=function(e,t,r){if(r=r||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(d.eq))return r;var n=this.startNodeAt(e,t);return n.left=r,n.right=this.parseMaybeAssign(),this.finishNode(n,"AssignmentPattern")};Ae.checkLValSimple=function(e,t,r){if(t===void 0)t=Qt;var n=t!==Qt;switch(e.type){case"Identifier":if(this.strict&&this.reservedWordsStrictBind.test(e.name))this.raiseRecoverable(e.start,(n?"Binding ":"Assigning to ")+e.name+" in strict mode");if(n){if(t===Ve&&e.name==="let")this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name");if(r){if(at(r,e.name))this.raiseRecoverable(e.start,"Argument name clash");r[e.name]=!0}if(t!==zi)this.declareName(e.name,t,e.start)}break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(n)this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":if(n)this.raiseRecoverable(e.start,"Binding parenthesized expression");return this.checkLValSimple(e.expression,t,r);default:this.raise(e.start,(n?"Binding":"Assigning to")+" rvalue")}};Ae.checkLValPattern=function(e,t,r){if(t===void 0)t=Qt;switch(e.type){case"ObjectPattern":for(var n=0,i=e.properties;n<i.length;n+=1){var o=i[n];this.checkLValInnerPattern(o,t,r)}break;case"ArrayPattern":for(var a=0,p=e.elements;a<p.length;a+=1){var u=p[a];if(u)this.checkLValInnerPattern(u,t,r)}break;default:this.checkLValSimple(e,t,r)}};Ae.checkLValInnerPattern=function(e,t,r){if(t===void 0)t=Qt;switch(e.type){case"Property":this.checkLValInnerPattern(e.value,t,r);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,r);break;case"RestElement":this.checkLValPattern(e.argument,t,r);break;default:this.checkLValPattern(e,t,r)}};var Se=function(t,r,n,i,o){this.token=t,this.isExpr=!!r,this.preserveSpace=!!n,this.override=i,this.generator=!!o},re={b_stat:new Se("{",!1),b_expr:new Se("{",!0),b_tmpl:new Se("${",!1),p_stat:new Se("(",!1),p_expr:new Se("(",!0),q_tmpl:new Se("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new Se("function",!1),f_expr:new Se("function",!0),f_expr_gen:new Se("function",!0,!1,null,!0),f_gen:new Se("function",!1,!1,null,!0)},ot=ne.prototype;ot.initialContext=function(){return[re.b_stat]};ot.curContext=function(){return this.context[this.context.length-1]};ot.braceIsBlock=function(e){var t=this.curContext();if(t===re.f_expr||t===re.f_stat)return!0;if(e===d.colon&&(t===re.b_stat||t===re.b_expr))return!t.isExpr;if(e===d._return||e===d.name&&this.exprAllowed)return de.test(this.input.slice(this.lastTokEnd,this.start));if(e===d._else||e===d.semi||e===d.eof||e===d.parenR||e===d.arrow)return!0;if(e===d.braceL)return t===re.b_stat;if(e===d._var||e===d._const||e===d.name)return!1;return!this.exprAllowed};ot.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token==="function")return t.generator}return!1};ot.updateContext=function(e){var t,r=this.type;if(r.keyword&&e===d.dot)this.exprAllowed=!1;else if(t=r.updateContext)t.call(this,e);else this.exprAllowed=r.beforeExpr};ot.overrideContext=function(e){if(this.curContext()!==e)this.context[this.context.length-1]=e};d.parenR.updateContext=d.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var e=this.context.pop();if(e===re.b_stat&&this.curContext().token==="function")e=this.context.pop();this.exprAllowed=!e.isExpr};d.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?re.b_stat:re.b_expr),this.exprAllowed=!0};d.dollarBraceL.updateContext=function(){this.context.push(re.b_tmpl),this.exprAllowed=!0};d.parenL.updateContext=function(e){var t=e===d._if||e===d._for||e===d._with||e===d._while;this.context.push(t?re.p_stat:re.p_expr),this.exprAllowed=!0};d.incDec.updateContext=function(){};d._function.updateContext=d._class.updateContext=function(e){if(e.beforeExpr&&e!==d._else&&!(e===d.semi&&this.curContext()!==re.p_stat)&&!(e===d._return&&de.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===d.colon||e===d.braceL)&&this.curContext()===re.b_stat))this.context.push(re.f_expr);else this.context.push(re.f_stat);this.exprAllowed=!1};d.colon.updateContext=function(){if(this.curContext().token==="function")this.context.pop();this.exprAllowed=!0};d.backQuote.updateContext=function(){if(this.curContext()===re.q_tmpl)this.context.pop();else this.context.push(re.q_tmpl);this.exprAllowed=!1};d.star.updateContext=function(e){if(e===d._function){var t=this.context.length-1;if(this.context[t]===re.f_expr)this.context[t]=re.f_expr_gen;else this.context[t]=re.f_gen}this.exprAllowed=!0};d.name.updateContext=function(e){var t=!1;if(this.options.ecmaVersion>=6&&e!==d.dot){if(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())t=!0}this.exprAllowed=t};var q=ne.prototype;q.checkPropClash=function(e,t,r){if(this.options.ecmaVersion>=9&&e.type==="SpreadElement")return;if(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))return;var n=e.key,i;switch(n.type){case"Identifier":i=n.name;break;case"Literal":i=String(n.value);break;default:return}var o=e.kind;if(this.options.ecmaVersion>=6){if(i==="__proto__"&&o==="init"){if(t.proto)if(r){if(r.doubleProto<0)r.doubleProto=n.start}else this.raiseRecoverable(n.start,"Redefinition of __proto__ property");t.proto=!0}return}i="$"+i;var a=t[i];if(a){var p;if(o==="init")p=this.strict&&a.init||a.get||a.set;else p=a.init||a[o];if(p)this.raiseRecoverable(n.start,"Redefinition of property")}else a=t[i]={init:!1,get:!1,set:!1};a[o]=!0};q.parseExpression=function(e,t){var r=this;return this.catchStackOverflow(function(){var{start:n,startLoc:i}=r,o=r.parseMaybeAssign(e,t);if(r.type===d.comma){var a=r.startNodeAt(n,i);a.expressions=[o];while(r.eat(d.comma))a.expressions.push(r.parseMaybeAssign(e,t));return r.finishNode(a,"SequenceExpression")}return o})};q.parseMaybeAssign=function(e,t,r){if(this.isContextual("yield"))if(this.inGenerator)return this.parseYield(e);else this.exprAllowed=!1;var n=!1,i=-1,o=-1,a=-1;if(t)i=t.parenthesizedAssign,o=t.trailingComma,a=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1;else t=new sr,n=!0;var p=this.start,u=this.startLoc;if(this.type===d.parenL||this.type===d.name)this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e==="await";var m=this.parseMaybeConditional(e,t);if(r)m=r.call(this,m,p,u);if(this.type.isAssign){var f=this.startNodeAt(p,u);if(f.operator=this.value,this.type===d.eq)m=this.toAssignable(m,!1,t);if(!n)t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1;if(t.shorthandAssign>=m.start)t.shorthandAssign=-1;if(this.type===d.eq)this.checkLValPattern(m);else this.checkLValSimple(m);if(f.left=m,this.next(),f.right=this.parseMaybeAssign(e),a>-1)t.doubleProto=a;return this.finishNode(f,"AssignmentExpression")}else if(n)this.checkExpressionErrors(t,!0);if(i>-1)t.parenthesizedAssign=i;if(o>-1)t.trailingComma=o;return m};q.parseMaybeConditional=function(e,t){var r=this.start,n=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(!(i.type==="ArrowFunctionExpression"&&i.start===r)&&this.eat(d.question)){var o=this.startNodeAt(r,n);return o.test=i,o.consequent=this.parseMaybeAssign(),this.expect(d.colon),o.alternate=this.parseMaybeAssign(e),this.finishNode(o,"ConditionalExpression")}return i};q.parseExprOps=function(e,t){var r=this.start,n=this.startLoc,i=this.parseMaybeUnary(t,!1,!1,e);if(this.checkExpressionErrors(t))return i;return i.start===r&&i.type==="ArrowFunctionExpression"?i:this.parseExprOp(i,r,n,-1,e)};q.parseExprOp=function(e,t,r,n,i){var o=this.type.binop;if(o!=null&&(!i||this.type!==d._in)){if(o>n){var a=this.type===d.logicalOR||this.type===d.logicalAND,p=this.type===d.coalesce;if(p)o=d.logicalAND.binop;var u=this.value;this.next();var m=this.start,f=this.startLoc,b=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,i),m,f,o,i),E=this.buildBinary(t,r,e,b,u,a||p);if(a&&this.type===d.coalesce||p&&(this.type===d.logicalOR||this.type===d.logicalAND))this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses");return this.parseExprOp(E,t,r,n,i)}}return e};q.buildBinary=function(e,t,r,n,i,o){if(n.type==="PrivateIdentifier")this.raise(n.start,"Private identifier can only be left side of binary expression");var a=this.startNodeAt(e,t);return a.left=r,a.operator=i,a.right=n,this.finishNode(a,o?"LogicalExpression":"BinaryExpression")};q.parseMaybeUnary=function(e,t,r,n){var i=this.start,o=this.startLoc,a;if(this.isContextual("await")&&this.canAwait)a=this.parseAwait(n),t=!0;else if(this.type.prefix){var p=this.startNode(),u=this.type===d.incDec;if(p.operator=this.value,p.prefix=!0,this.next(),p.argument=this.parseMaybeUnary(null,!0,u,n),this.checkExpressionErrors(e,!0),u)this.checkLValSimple(p.argument);else if(this.strict&&p.operator==="delete"&&Ji(p.argument))this.raiseRecoverable(p.start,"Deleting local variable in strict mode");else if(p.operator==="delete"&&Ur(p.argument))this.raiseRecoverable(p.start,"Private fields can not be deleted");else t=!0;a=this.finishNode(p,u?"UpdateExpression":"UnaryExpression")}else if(!t&&this.type===d.privateId){if((n||this.privateNameStack.length===0)&&this.options.checkPrivateFields)this.unexpected();if(a=this.parsePrivateIdent(),this.type!==d._in)this.unexpected()}else{if(a=this.parseExprSubscripts(e,n),this.checkExpressionErrors(e))return a;while(this.type.postfix&&!this.canInsertSemicolon()){var m=this.startNodeAt(i,o);m.operator=this.value,m.prefix=!1,m.argument=a,this.checkLValSimple(a),this.next(),a=this.finishNode(m,"UpdateExpression")}}if(!r&&!(a.type==="ArrowFunctionExpression"&&a.start===i)&&this.eat(d.starstar))if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(i,o,a,this.parseMaybeUnary(null,!1,!1,n),"**",!1);else return a};function Ji(e){return e.type==="Identifier"||e.type==="ParenthesizedExpression"&&Ji(e.expression)}function Ur(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&Ur(e.expression)||e.type==="ParenthesizedExpression"&&Ur(e.expression)}q.parseExprSubscripts=function(e,t){var r=this.start,n=this.startLoc,i=this.parseExprAtom(e,t);if(i.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return i;var o=this.parseSubscripts(i,r,n,!1,t);if(e&&o.type==="MemberExpression"){if(e.parenthesizedAssign>=o.start)e.parenthesizedAssign=-1;if(e.parenthesizedBind>=o.start)e.parenthesizedBind=-1;if(e.trailingComma>=o.start)e.trailingComma=-1}return o};q.parseSubscripts=function(e,t,r,n,i){var o=this.options.ecmaVersion>=8&&e.type==="Identifier"&&e.name==="async"&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start,a=!1;while(!0){var p=this.parseSubscript(e,t,r,n,o,a,i);if(p.optional)a=!0;if(p===e||p.type==="ArrowFunctionExpression"){if(a){var u=this.startNodeAt(t,r);u.expression=p,p=this.finishNode(u,"ChainExpression")}return p}e=p}};q.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(d.arrow)};q.parseSubscriptAsyncArrow=function(e,t,r,n){return this.parseArrowExpression(this.startNodeAt(e,t),r,!0,n)};q.parseSubscript=function(e,t,r,n,i,o,a){var p=this.options.ecmaVersion>=11,u=p&&this.eat(d.questionDot);if(n&&u)this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var m=this.eat(d.bracketL);if(m||u&&this.type!==d.parenL&&this.type!==d.backQuote||this.eat(d.dot)){var f=this.startNodeAt(t,r);if(f.object=e,m)f.property=this.parseExpression(),this.expect(d.bracketR);else if(this.type===d.privateId&&e.type!=="Super")f.property=this.parsePrivateIdent();else f.property=this.parseIdent(this.options.allowReserved!=="never");if(f.computed=!!m,p)f.optional=u;e=this.finishNode(f,"MemberExpression")}else if(!n&&this.eat(d.parenL)){var b=new sr,E=this.yieldPos,T=this.awaitPos,w=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var B=this.parseExprList(d.parenR,this.options.ecmaVersion>=8,!1,b);if(i&&!u&&this.shouldParseAsyncArrow()){if(this.checkPatternErrors(b,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0)this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function");return this.yieldPos=E,this.awaitPos=T,this.awaitIdentPos=w,this.parseSubscriptAsyncArrow(t,r,B,a)}this.checkExpressionErrors(b,!0),this.yieldPos=E||this.yieldPos,this.awaitPos=T||this.awaitPos,this.awaitIdentPos=w||this.awaitIdentPos;var C=this.startNodeAt(t,r);if(C.callee=e,C.arguments=B,p)C.optional=u;e=this.finishNode(C,"CallExpression")}else if(this.type===d.backQuote){if(u||o)this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var F=this.startNodeAt(t,r);F.tag=e,F.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(F,"TaggedTemplateExpression")}return e};q.parseExprAtom=function(e,t,r){if(this.type===d.slash)this.readRegexp();var n,i=this.potentialArrowAt===this.start;switch(this.type){case d._super:if(!this.allowSuper)this.raise(this.start,"'super' keyword outside a method");if(n=this.startNode(),this.next(),this.type===d.parenL&&!this.allowDirectSuper)this.raise(n.start,"super() call outside constructor of a subclass");if(this.type!==d.dot&&this.type!==d.bracketL&&this.type!==d.parenL)this.unexpected();return this.finishNode(n,"Super");case d._this:return n=this.startNode(),this.next(),this.finishNode(n,"ThisExpression");case d.name:var o=this.start,a=this.startLoc,p=this.containsEsc,u=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!p&&u.name==="async"&&!this.canInsertSemicolon()&&this.eat(d._function))return this.overrideContext(re.f_expr),this.parseFunction(this.startNodeAt(o,a),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(d.arrow))return this.parseArrowExpression(this.startNodeAt(o,a),[u],!1,t);if(this.options.ecmaVersion>=8&&u.name==="async"&&this.type===d.name&&!p&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc)){if(u=this.parseIdent(!1),this.canInsertSemicolon()||!this.eat(d.arrow))this.unexpected();return this.parseArrowExpression(this.startNodeAt(o,a),[u],!0,t)}}return u;case d.regexp:var m=this.value;return n=this.parseLiteral(m.value),n.regex={pattern:m.pattern,flags:m.flags},n;case d.num:case d.string:return this.parseLiteral(this.value);case d._null:case d._true:case d._false:return n=this.startNode(),n.value=this.type===d._null?null:this.type===d._true,n.raw=this.type.keyword,this.next(),this.finishNode(n,"Literal");case d.parenL:var f=this.start,b=this.parseParenAndDistinguishExpression(i,t);if(e){if(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(b))e.parenthesizedAssign=f;if(e.parenthesizedBind<0)e.parenthesizedBind=f}return b;case d.bracketL:return n=this.startNode(),this.next(),n.elements=this.parseExprList(d.bracketR,!0,!0,e),this.finishNode(n,"ArrayExpression");case d.braceL:return this.overrideContext(re.b_expr),this.parseObj(!1,e);case d._function:return n=this.startNode(),this.next(),this.parseFunction(n,0);case d._class:return this.parseClass(this.startNode(),!1);case d._new:return this.parseNew();case d.backQuote:return this.parseTemplate();case d._import:if(this.options.ecmaVersion>=11)return this.parseExprImport(r);else return this.unexpected();default:return this.parseExprAtomDefault()}};q.parseExprAtomDefault=function(){this.unexpected()};q.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword import");if(this.next(),this.type===d.parenL&&!e)return this.parseDynamicImport(t);else if(this.type===d.dot){var r=this.startNodeAt(t.start,t.loc&&t.loc.start);return r.name="import",t.meta=this.finishNode(r,"Identifier"),this.parseImportMeta(t)}else this.unexpected()};q.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)if(!this.eat(d.parenR))if(this.expect(d.comma),!this.afterTrailingComma(d.parenR)){if(e.options=this.parseMaybeAssign(),!this.eat(d.parenR)){if(this.expect(d.comma),!this.afterTrailingComma(d.parenR))this.unexpected()}}else e.options=null;else e.options=null;else if(!this.eat(d.parenR)){var t=this.start;if(this.eat(d.comma)&&this.eat(d.parenR))this.raiseRecoverable(t,"Trailing comma is not allowed in import()");else this.unexpected(t)}return this.finishNode(e,"ImportExpression")};q.parseImportMeta=function(e){this.next();var t=this.containsEsc;if(e.property=this.parseIdent(!0),e.property.name!=="meta")this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'");if(t)this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters");if(this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere)this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module");return this.finishNode(e,"MetaProperty")};q.parseLiteral=function(e){var t=this.startNode();if(t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110)t.bigint=t.value!=null?t.value.toString():t.raw.slice(0,-1).replace(/_/g,"");return this.next(),this.finishNode(t,"Literal")};q.parseParenExpression=function(){this.expect(d.parenL);var e=this.parseExpression();return this.expect(d.parenR),e};q.shouldParseArrow=function(e){return!this.canInsertSemicolon()};q.parseParenAndDistinguishExpression=function(e,t){var r=this.start,n=this.startLoc,i,o=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var a=this.start,p=this.startLoc,u=[],m=!0,f=!1,b=new sr,E=this.yieldPos,T=this.awaitPos,w;this.yieldPos=0,this.awaitPos=0;while(this.type!==d.parenR)if(m?m=!1:this.expect(d.comma),o&&this.afterTrailingComma(d.parenR,!0)){f=!0;break}else if(this.type===d.ellipsis){if(w=this.start,u.push(this.parseParenItem(this.parseRestBinding())),this.type===d.comma)this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else u.push(this.parseMaybeAssign(!1,b,this.parseParenItem));var B=this.lastTokEnd,C=this.lastTokEndLoc;if(this.expect(d.parenR),e&&this.shouldParseArrow(u)&&this.eat(d.arrow))return this.checkPatternErrors(b,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=E,this.awaitPos=T,this.parseParenArrowList(r,n,u,t);if(!u.length||f)this.unexpected(this.lastTokStart);if(w)this.unexpected(w);if(this.checkExpressionErrors(b,!0),this.yieldPos=E||this.yieldPos,this.awaitPos=T||this.awaitPos,u.length>1)i=this.startNodeAt(a,p),i.expressions=u,this.finishNodeAt(i,"SequenceExpression",B,C);else i=u[0]}else i=this.parseParenExpression();if(this.options.preserveParens){var F=this.startNodeAt(r,n);return F.expression=i,this.finishNode(F,"ParenthesizedExpression")}else return i};q.parseParenItem=function(e){return e};q.parseParenArrowList=function(e,t,r,n){return this.parseArrowExpression(this.startNodeAt(e,t),r,!1,n)};var Nc=[];q.parseNew=function(){if(this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===d.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var r=this.containsEsc;if(e.property=this.parseIdent(!0),e.property.name!=="target")this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'");if(r)this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters");if(!this.allowNewDotTarget)this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block");return this.finishNode(e,"MetaProperty")}var n=this.start,i=this.startLoc;if(e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),n,i,!0,!1),e.callee.type==="Super")this.raiseRecoverable(n,"Invalid use of 'super'");if(this.eat(d.parenL))e.arguments=this.parseExprList(d.parenR,this.options.ecmaVersion>=8,!1);else e.arguments=Nc;return this.finishNode(e,"NewExpression")};q.parseTemplateElement=function(e){var t=e.isTagged,r=this.startNode();if(this.type===d.invalidTemplate){if(!t)this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal");r.value={raw:this.value.replace(/\r\n?/g,`
|
|
7
|
+
}`:`{ ${n} }`}var Po=/[A-Za-z_$][\w$]*/g;function ko(e,t){if(!t)return!1;let r=new Set(t[0].split(",").map((n)=>n.trim()));for(let[n]of e.matchAll(Po))if(r.has(n))return!0;return!1}function Dr(e,t){if(t===void 0)return;return e.runesPropsDeclarationMetadataByDeclaratorStart.get(t)}function ri(e,t,r){return Dr(e,t)?.props.get(r)}function ni(e){if(!e||typeof e!=="object"||!("type"in e))return;if(e.type==="Identifier"&&"name"in e&&typeof e.name==="string")return e.name;if(e.type==="TSQualifiedName"&&"right"in e&&e.right&&typeof e.right==="object"&&"name"in e.right&&typeof e.right.name==="string")return e.right.name;return}function ii(e){if(!e||typeof e!=="object"||!("type"in e))return;if(e.type==="Identifier"&&"name"in e&&typeof e.name==="string")return e.name;if(e.type==="TSQualifiedName"&&"left"in e&&e.left&&typeof e.left==="object")return ii(e.left);return}function Wt(e,t){let r=t?.start,n=t?.end;if(r===void 0||n===void 0)return;return ee(e,r+1,n)?.trim()}function si(e,t){let r=t?.start,n=t?.end;if(r===void 0||n===void 0)return;return ee(e,r,n)?.trim()}function Te(e,t,r,n,i=new Set){if(!t?.type)return;switch(t.type){case"TSInterfaceDeclaration":Te(e,{type:"TSTypeLiteral",members:t.body?.body},r,n,i);return;case"TSTypeAliasDeclaration":case"TSParenthesizedType":case"TSTypeAnnotation":Te(e,t.typeAnnotation,r,n,i);return;case"TSIntersectionType":case"TSUnionType":for(let o of t.types??[])Te(e,o,r,n,i);return;case"TSTypeLiteral":for(let o of t.members??[]){if(o?.type!=="TSPropertySignature")continue;Te(e,o.typeAnnotation?.typeAnnotation,r,n,i)}return;case"TSTypeReference":{let o=ii(t.typeName);if(o){if(e.typeImportBindingsByLocalName.has(o))r.add(o);let a=e.localTypeDeclarationsByName.get(o);if(a&&!i.has(o))n.add(o),i.add(o),Te(e,a.node,r,n,i),i.delete(o)}if("typeParameters"in t&&t.typeParameters&&typeof t.typeParameters==="object"){let a=t.typeParameters;for(let p of a.params??[])Te(e,p,r,n,i)}return}case"TSArrayType":case"TSRestType":case"TSOptionalType":case"TSIndexedAccessType":case"TSTypeOperator":case"TSExpressionWithTypeArguments":case"TSTupleType":case"TSConditionalType":case"TSInferType":case"TSMappedType":case"TSFunctionType":case"TSConstructorType":case"TSTypeQuery":case"TSImportType":case"TSLiteralType":case"TSTypePredicate":case"TSNamedTupleMember":break;default:break}for(let o of Object.values(t)){if(!o||typeof o!=="object")continue;if(Array.isArray(o)){for(let a of o){if(!a||typeof a!=="object"||!("type"in a))continue;Te(e,a,r,n,i)}continue}if("type"in o)Te(e,o,r,n,i)}}function wo(e,t){let r=new Map;for(let n of Array.from(t).sort()){let i=e.typeImportBindingsByLocalName.get(n);if(!i)continue;let o=r.get(i.source)??{default:[],named:[],namespace:[]};if(i.specifierType==="default")o.default.push(i.localName);else if(i.specifierType==="namespace")o.namespace.push(i.localName);else o.named.push({imported:i.importedName,local:i.localName});r.set(i.source,o)}return Array.from(r.entries()).sort(([n],[i])=>n.localeCompare(i)).map(([n,i])=>{if(i.namespace.length>0)return i.namespace.map((l)=>`import type * as ${l} from "${n}";`).join(`
|
|
8
|
+
`);let o=i.named.map(({imported:l,local:m})=>{if(!l||l===m)return m;return`${l} as ${m}`}),a=i.default[0],p=o.length>0?`{ ${o.join(", ")} }`:"";if(a&&p)return`import type ${a}, ${p} from "${n}";`;if(a)return`import type ${a} from "${n}";`;return`import type ${p} from "${n}";`})}function ai(e){let t=e.pendingCallDefaultCandidates.length>0?e.pendingCallDefaultCandidates.slice():void 0,r=e.pendingContextKeyCandidates.length>0?e.pendingContextKeyCandidates.slice():void 0,n={...t?{pendingCallDefaultCandidates:t}:{},...r?{pendingContextKeyCandidates:r}:{}},i=t!==void 0||r!==void 0;if(e.typedRunesPropsDeclarations.length!==1)return i?{canonicalPropNames:[],localTypeDeclarations:[],typeImportStatements:[],...n}:void 0;let[o]=e.typedRunesPropsDeclarations;if(!o.canonicalType)return i?{canonicalPropNames:[],localTypeDeclarations:[],typeImportStatements:[],...n}:void 0;let a=Array.from(o.referencedLocalTypes).map((p)=>e.localTypeDeclarationsByName.get(p)).filter((p)=>p!==void 0).sort((p,l)=>p.start-l.start).map((p)=>p.code);return{canonicalPropsType:o.canonicalType,canonicalPropNames:Array.from(o.props.keys()).sort(),localTypeDeclarations:a,typeImportStatements:wo(e,o.referencedImportedTypes),referencesComponentGenerics:ko(o.canonicalType,e.generics),...n}}var _o=/^[A-Za-z_$][\w$]*/,No=/[A-Za-z_$][\w$]*/g,oi=/^(?:const|in|out)\s+/;function xt(e){let t=[],r=0,n=0;for(let i=0;i<e.length;i++){let o=e[i];if(o==="<"||o==="("||o==="["||o==="{")r++;else if(o===">"||o===")"||o==="]"||o==="}")r=Math.max(r-1,0);else if(o===","&&r===0)t.push(e.slice(n,i)),n=i+1}return t.push(e.slice(n)),t}function ci(e){let t=xt(e).map((n)=>n.trim()).filter((n)=>n.length>0);if(t.length===0)return null;return[t.map((n)=>{let i=n;while(oi.test(i))i=i.replace(oi,"");return i.match(_o)?.[0]??n}).join(", "),t.join(", ")]}function pi(e,t,r){let n=e.scriptGenericsAttribute?.value;if(!n)return;for(let[i]of n.matchAll(No)){if(e.typeImportBindingsByLocalName.has(i))t.add(i);if(r.has(i))continue;let o=e.localTypeDeclarationsByName.get(i);if(!o)continue;r.add(i),Te(e,o.node,t,r)}}var Rr=/^\s+/,ui=/\s/,Io=/^@[^\s/]+(?=\s|$)/,Lo=/^@(\S+)\s*/;function li(e){let t=0;while(t<e.length){let r=e.charCodeAt(t);if(r!==32&&r!==9&&r!==13&&r!==10&&!ui.test(e[t]))break;t++}return t}function Do(e,t){let r=e.slice(li(e)),n=!1;if(t)r=r.slice(3),n=!0;else if(r.startsWith("*")&&!r.startsWith("*/"))r=r.slice(1),n=!0;let i=r.slice(0,li(r));r=r.slice(i.length);let o=r.trimEnd(),a=o.endsWith("*/")?o.slice(0,-2):r;return{indent:n?i.slice(1):i,separator:i,content:a}}function Ro(e,t,r){let n=r>t&&e.charCodeAt(r-1)===13?r-1:r;return e.slice(t,n)}function Mo(e){let t=[],r=0;while(!0){let n=e.indexOf("/**",r);if(n===-1)break;let i=e.lastIndexOf(`
|
|
9
|
+
`,n-1)+1;if(e.charCodeAt(n+3)===42||e.slice(i,n).trim()!==""){r=n+1;continue}let o=[],a=i,p=!1;while(a<=e.length){let l=e.indexOf(`
|
|
10
|
+
`,a),m=l===-1?e.length:l,d=Ro(e,a,m),{indent:b,separator:T,content:E}=Do(d,o.length===0);if(o.push({raw:d,start:a,number:o.length,indent:b,separator:T,content:E}),d.trimEnd().endsWith("*/")){p=!0,r=m;break}if(l===-1)break;a=l+1}if(!p)break;t.push({start:n,lines:o})}return t}function Oo(e){let t=e;if(t.length>0&&t[0].content==="")t=t.slice(1);if(t.length>0&&t[t.length-1].content==="")t=t.slice(0,-1);return t}function Bo(e){let t=[[]],r=!1;for(let n of e){if(Io.test(n.content)&&!r)t.push([n]);else t[t.length-1].push(n);if(Fo(n.content,"```")%2===1)r=!r}return t}function Fo(e,t){let r=0,n=e.indexOf(t);while(n!==-1)r++,n=e.indexOf(t,n+t.length);return r}function hi(e){return e.map((t)=>t.indent+t.content).join(`
|
|
11
|
+
`)}function Vo(e,t){let r=t;while(r<e.length-1&&e[r].content.trim()==="")r++;if(e[r].content[0]!=="{")return null;let n=0,i=[],o=r;for(;o<e.length;o++){let l=e[o].content,m=0;for(let d of l){if(d==="{")n++;else if(d==="}")n--;if(m++,n===0)break}if(i.push(m),n===0)break}if(n!==0)return null;let a=o;return{type:i.map((l,m)=>{let d=r+m,b=e[d].content.slice(0,l);return e[d].content=e[d].content.slice(l).replace(Rr,""),m===0?b:e[d].indent+b}).join(`
|
|
12
|
+
`).slice(1,-1),endIndex:a}}function jo(e){let t=e.content.match(Rr)?.[0]??"",r=e.content.slice(t.length),n=0,i=0;for(let m of r){if(n===0&&ui.test(m))break;if(m==="[")n++;if(m==="]")n--;i++}let o=n===0?r.slice(0,i):"";if(!o)return null;let a=o,p=!1,l;if(o.startsWith("[")&&o.endsWith("]")){p=!0;let d=o.slice(1,-1).split("=");if(a=d[0].trim(),d.length>1)l=d.slice(1).join("=").trim();if(!a)return null}if(a.length>1&&(a[0]==='"'||a[0]==="'")&&a[a.length-1]===a[0])a=a.slice(1,-1);return e.content=r.slice(i).replace(Rr,""),{name:a,optional:p,default:l}}function $o(e){let t=e[0],r=t.content.match(Lo),n=r?r[1]:"",i=r?t.content.slice(r[0].length):t.content,o=i.trimEnd(),a=e.slice(1).map((E)=>E.separator+E.content),p=(o?[o,...a]:a).join(`
|
|
13
|
+
`);t.content=i,t.tag=n;let l=Vo(e,0),m=l?.type??"",d=0;if(l){d=l.endIndex;while(d<e.length-1&&e[d].content.trim()==="")d++}let b=jo(e[d]),T=hi(e.slice(l?l.endIndex:0));return{tag:n,name:b?.name??"",type:m,optional:b?.optional??!1,default:b?.default,description:T,raw:p,lines:e}}function Ho(e,t){let r=Oo(e);r.forEach((o,a)=>{o.number=a});let n=Bo(r),i=n.slice(1).map($o);return{description:hi(n[0]),tags:i,start:t,lines:r}}function bt(e){return Mo(e).map(({start:t,lines:r})=>Ho(r,t))}var qo=null;function Uo(e,t,r){let n={value:void 0,replace:!1};if(!r||typeof r!=="object"||!("type"in r))return n;if(r.type==="Identifier")n.value=r.name,n.replace=!0;else if(r.type==="Literal")n.value=String(r.value);else if(r.type==="MemberExpression")n.value=qt(e,t,r);else if((r.type==="ObjectExpression"||r.type==="TemplateLiteral")&&"start"in r&&"end"in r&&typeof r.start==="number"&&typeof r.end==="number")n.value=ee(e,r.start,r.end);return n}function di(e,t,r){let n={};for(let i of r.properties){if(i.type!=="Property"||i.computed)continue;let o=t.getPropertyName(i.key);if(!o)continue;n[o]=Uo(e,t,i.value)}return n}function Go(e,t){if(!t||typeof t!=="object"||!("type"in t))return null;if(t.type==="Identifier"){let o=t,a=e.propLocalToPublicName.get(o.name);if(!a)return null;return{publicName:a,trackingName:o.name}}if(t.type!=="MemberExpression")return null;let r=t,n=r.object&&typeof r.object==="object"&&"type"in r.object&&r.object.type==="Identifier"?r.object.name:void 0;if(!n||!e.wholePropsLocals.has(n))return null;let i;if(!r.computed&&r.property&&typeof r.property==="object"&&"type"in r.property){if(r.property.type==="Identifier")i=r.property.name;else if(r.property.type==="Literal"&&r.property.value!=null)i=String(r.property.value)}else if(r.computed&&r.property&&typeof r.property==="object"&&"type"in r.property&&r.property.type==="Literal"&&"value"in r.property&&r.property.value!=null)i=String(r.property.value);if(!i)return null;return{publicName:i,trackingName:i}}function fi(e,t){let r=t;if(r&&typeof r==="object"&&"type"in r&&r.type==="ChainExpression")r=r.expression;if(!r||typeof r!=="object"||!("type"in r)||r.type!=="CallExpression")return null;let n=r;if(!n.callee||typeof n.callee!=="object"||!("type"in n.callee))return null;let i=Go(e,n.callee);if(!i)return null;return{...i,arguments:n.arguments}}function Tt(e,{slot_name:t,slot_props:r,slot_fallback:n,slot_description:i,slot_deprecated:o,slot_tags:a,source:p}){let l=t===void 0||t==="",m=l?qo:t??"",d=be(n),b=r===void 0||r===""?void 0:r,T=i?.trim()||void 0;if(e.slots.has(m)){let E=e.slots.get(m);if(E)e.slots.set(m,{...E,default:E.default??l,fallback:d,slot_props:E.slot_props===void 0?b:E.slot_props,description:E.description||T,deprecated:E.deprecated??o,tags:E.tags||a,source:p||E.source})}else e.slots.set(m,{name:m,default:l,fallback:d,slot_props:r,description:T,deprecated:o,tags:a,source:p})}var Wo=/\s*=\s*/;function mi(e){let t=e.indexOf("<");if(t===-1||!e.endsWith(">"))return e;let r=e.slice(0,t),n=e.slice(t+1,-1),i=xt(n).map((o)=>o.trim().replace(Wo," = ")).join(", ");return`${r}<${i}>`}var Mr=/^\s*$/,Ko=/;$/,zo=/^-\s*/;function Ye(e){if(e===void 0)return;let t=e.replace(zo,"").trim();return t===""?"":t}function Et(e){if(!e||e.length===0)return;return e[0].content}var yi=new Set(["since","example"]);function Xo(e){let t=e.trim();return t===""?!0:t}function gi(e,t){return Xo(`${e??""}${t?` ${t}`:""}`)}function Jo(e){let t=e.trim().replace(Ko,"").trimEnd();if(!t.startsWith("{")||!t.endsWith("}"))return!1;let r=0,n=null;for(let i=0;i<t.length;i++){let o=t[i];if(n!==null){if(o==="\\"){i++;continue}if(o===n)n=null;continue}if(o==='"'||o==="'"||o==="`"){n=o;continue}if(o==="{"||o==="["||o==="(")r++;else if(o==="}"||o==="]"||o===")"){if(r--,r===0&&i<t.length-1)return!1}}return r===0}function Yo(e){let t=e;if(!t.startsWith("/*"))t=`/*${t}`;if(!t.endsWith("*/"))t+="*/";return t}function Or(e){let t=e[0]?.tags??[],r=new Set(["type","param","returns","return","extends","extendProps","restProps","slot","snippet","event","typedef","callback","bindable","deprecated"]),n,i=[],o,a,p,l=[],m=[];for(let d of t)if(d.tag==="type")n=d;else if(d.tag==="param")i.push(d);else if(d.tag==="returns"||d.tag==="return")o=d;else if(d.tag==="deprecated")p??=gi(d.name,d.description);else if(yi.has(d.tag))m.push(d);else if(d.tag==="bindable"){if(d.type)continue;let b=`${d.name}${d.description?` ${d.description}`:""}`.trim();if(b==="readonly"||b==="writable")a??=b}else if(!r.has(d.tag))l.push(d);return{type:n,param:i,returns:o,binding:a,deprecated:p,additional:l,passthrough:m,description:e[0]?.description}}function Qo(e){if(!e||e.length===0)return;let t=e[e.length-1];return t&&typeof t==="object"&&"value"in t?t:void 0}function Zo(e,t,r){if(!t||t.length===0||r===void 0||!e.source)return;for(let n=t.length-1;n>=0;n--){let i=t[n];if(!i||typeof i!=="object"||!("value"in i)||!("end"in i))continue;if(typeof i.end!=="number")continue;let o=e.source.slice(i.end,r);if(Mr.test(o))return i}return}function He(e,t,r){if(!r?.leadingComments)return;let n=Zo(e,r.leadingComments,r.start);if(!n)return;return ec(t,[n])}function xi(e,t,r){if(!r?.leadingComments)return;return He(e,t,r)}function ec(e,t){if(!t)return;let r=Qo(t);if(!r)return;let n=bt(Yo(r.value)),{type:i,param:o,returns:a,binding:p,deprecated:l,additional:m,passthrough:d,description:b}=Or(n),T,E,k,B;if(i)T=e.aliasType(i.type);if(o.length>0)E=o.filter((j)=>!j.name.includes(".")).map((j)=>({name:j.name,type:e.aliasType(j.type),description:Ye(j.description),optional:j.optional||!1}));if(a)k=e.aliasType(a.type);let C=be(b?.trim());if(C||m.length>0){let j=[];if(C)j.push(C);for(let D of m){let X=`@${D.tag}${D.name?` ${D.name}`:""}${D.description?` ${D.description}`:""}`;j.push(X)}B=j.join(`
|
|
14
|
+
`)}let V=d.length>0?d.map((j)=>({name:j.tag,body:j.raw})):void 0;return{type:T,params:E,returnType:k,description:B,binding:p,deprecated:l,tags:V}}function bi(e,t,r=e.source){if(!r)return;for(let{tags:n,description:i,lines:o}of bt(r)){let a,p,l,m,d,b,T=[],E=[],k,B,C,V=[],j,D,X=[],M,Q=!1,x=!0,s=[],c,u=new Map,f=new Set,y=new Set;for(let w of n)if(w.lines.length>0)f.add(w.lines[0].number);for(let w of o)if(!w.tag&&w.content&&w.content.trim()!=="}")u.set(w.number,w.content);let g=(w)=>{if(!w||w.length===0)return;let R=w[0].number,H=[],J=[],F=!1;for(let O=R-1;O>=0;O--){if(f.has(O))break;let G=u.get(O);if(G)H.unshift(G),J.unshift(O),F=!0;else if(F){let U=o[O];if(!(!U||!U.tag&&(!U.content||U.content.trim()==="")))break}}if(H.length===0)return;for(let O of J)y.add(O);return H.join(`
|
|
15
|
+
`).trim()},S=()=>{if(a!==void 0){let w=p&&p!=="object"&&p!=="Object"?p:void 0,R;if(w)R=w;else if(E.length>0)R=Lr(E,a,!0);else R=p||"";if(b!==void 0){let H;for(let O of n){let G=O.lines[0]?.number;if(typeof G!=="number")continue;if(G<=b)continue;if(O.tag==="property"||O.tag==="type")continue;H=G;break}let J=[],F=Array.from(u.keys()).sort((O,G)=>O-G);for(let O of F){if(O<=b)continue;if(H!==void 0&&O>=H)continue;if(y.has(O))continue;let U=u.get(O)?.trim();if(U)J.push(U),y.add(O)}if(J.length>0){let O=J.join(`
|
|
16
|
+
`);l=l?`${l}
|
|
17
|
+
${O}`:O}}gt(e,{name:a,detail:R,has_argument:!1,description:l,deprecated:m,tags:T.length>0?T:void 0,source:d}),e.eventDescriptions.set(a,l),e.jsDocEventNames.add(a),e.jsDocEventSources.set(a,d),E.length=0,a=void 0,p=void 0,l=void 0,m=void 0,d=void 0,b=void 0,T=[]}},P=()=>{if(k!==void 0){let w,R;if(V.length>0)w=Lr(V,void 0,!0),R=`type ${k} = ${w};`;else if(B)w=B,R=Jo(w)?`interface ${k} ${w}`:`type ${k} = ${w};`;else w="{}",R=`type ${k} = ${w};`;e.typedefs.set(k,{type:w,name:k,description:be(C),ts:R}),V.length=0,k=void 0,B=void 0,C=void 0}},A=()=>{if(j!==void 0){let H=`(${X.map(({name:F,type:O,optional:G})=>`${F}${G?"?":""}: ${O}`).join(", ")}) => ${M||"void"}`,J=`type ${j} = ${H};`;e.typedefs.set(j,{type:H,name:j,description:be(D),ts:J}),X.length=0,M=void 0,j=void 0,D=void 0}},v=n.some((w)=>w.tag==="slot"||w.tag==="snippet"),_=n.some((w)=>w.tag==="extends"||w.tag==="extendProps");for(let{tag:w,type:R,name:H,description:J,optional:F,default:O,raw:G,lines:U}of n){let re=t.aliasType(R),Ie=g(U);switch(w){case"extends":case"extendProps":if(e.extends={interface:H,import:re},x)x=!1;break;case"restProps":{let Z=H?J?`${H} ${J}`:H:J,ie=Ye(Z)||Ie;if(!ie&&x&&!Q&&i)ie=i,Q=!0;if(e.rest_props={type:"Element",name:re,description:ie||void 0},x)x=!1;break}case"slot":case"snippet":{let we=Ye(Et(U));if(!we&&x&&!Q&&i)we=i,Q=!0;if(!we&&s.length===0)we=Ie;if(x)x=!1;Tt(e,{slot_name:H,slot_props:re,slot_description:we||void 0,slot_deprecated:c,slot_tags:s.length>0?[...s]:void 0,source:wr(e,U)}),s.length=0,c=void 0;break}case"event":{if(S(),a=H,p=re,b=U.length>0?U[0].number:void 0,l=Ye(Et(U))||Ie,!l&&x&&!Q&&i)l=i,Q=!0;if(d=wr(e,U),x)x=!1;break}case"type":if(a!==void 0)p=re;break;case"param":if(j!==void 0)X.push({name:H,type:re,optional:F||!1});break;case"returns":case"return":if(j!==void 0)M=re;break;case"property":{let Z={name:H,type:re,description:Ye(Et(U)),optional:F||!1,default:O};if(a!==void 0)E.push(Z);else if(k!==void 0)V.push(Z);break}case"typedef":{if(P(),k=mi(H),B=re,C=Ye(Et(U))||Ie,!C&&x&&!Q&&i)C=i,Q=!0;if(x)x=!1;break}case"callback":{if(A(),j=mi(H),D=Ye(Et(U))||Ie,!D&&x&&!Q&&i)D=i,Q=!0;if(x)x=!1;break}case"generics":if(e.generics=[H,re],x)x=!1;break;case"template":{let Z=H;if(re)Z=`${H} extends ${re}`;if(O)Z+=` = ${O}`;if(v&&!_){e.deferredSlotBlockGenerics.push({name:H,constraint:Z});break}if(t.accumulateGeneric(H,Z),x)x=!1;break}case"deprecated":{let Z=gi(H,J);if(a===void 0)c??=Z;else m??=Z;break}case"enum":case"class":case"implements":case"this":case"namespace":case"memberof":case"module":case"file":case"overview":break;default:{let Z={name:w,body:G};if(a!==void 0&&yi.has(w))T.push(Z);else s.push(Z)}break}}S(),P(),A()}}function tc({hasTypeScriptType:e,hasJSDocType:t,inferredType:r,finalType:n}){if(e)return"typescript";if(t)return"jsdoc";if(r!==void 0)return"default";if(n!==void 0)return"inferred";return"unknown"}function St(e){let t=e.explicitType??e.jsdocType??e.resolvedType??e.typeSeed,r=e.jsdocParams??e.resolvedParams,n=e.jsdocReturnType??e.resolvedReturnType;if(e.isFunctionDeclaration&&t==="() => any"&&n)t=r&&r.length>0?`(${r.map((p)=>`${p.name}${p.optional?"?":""}: ${p.type}`).join(", ")}) => ${n}`:`() => ${n}`;let i=e.jsdocDescription??e.resolvedDescription;if(i===void 0&&t!==void 0)i=e.typedefs?.get(t)?.description;let o=tc({hasTypeScriptType:e.explicitType!==void 0,hasJSDocType:e.jsdocType!==void 0||e.jsdocParams!==void 0||e.jsdocReturnType!==void 0||e.resolvedType!==void 0,inferredType:e.inferredTypeForSource,finalType:t}),a=e.initializerIsFunction||e.isFunctionDeclaration||e.inferIsFunctionFromTypeSignature===!0&&(!!e.jsdocParams?.length||e.jsdocReturnType!==void 0||!!e.jsdocType?.includes("=>")||!!e.resolvedType?.includes("=>")||!!e.explicitType?.includes("=>"));return{type:t,typeSource:o,description:i,params:r,returnType:n,isFunction:a}}function rc(e){if(!e||typeof e!=="object"||!("type"in e))return;let t=String(e.type),r=mt(t);if(!r&&!yt(t))return;let n="name"in e&&typeof e.name==="string"?e.name:void 0;if(!n)return;let i=r?{type:"InlineComponent",name:n}:{type:"Element",name:n};if(n==="svelte:element"&&"tag"in e&&e.tag&&typeof e.tag==="object"){let o=e.tag;if(o.type==="Literal"&&typeof o.value==="string")i.thisValue=o.value}return i}function Ti(e,t){if(e.rest_props!==void 0)return;let r=rc(t);if(r)e.rest_props=r}function le(e,t,r){if(!t||e.has(t))return;e.set(t,r)}function vt(e,t){for(let r=e.activeScopes.length-1;r>=0;r-=1){let n=e.activeScopes[r]?.get(t);if(!n)continue;return n.kind==="prop"?n.publicPropName:void 0}return}function ae(e,t=new Set){if(!e||typeof e!=="object"||!("type"in e))return t;switch(e.type){case"Identifier":t.add(e.name);break;case"AssignmentPattern":ae(e.left,t);break;case"ArrayPattern":for(let r of e.elements)ae(r??void 0,t);break;case"ObjectPattern":for(let r of e.properties)if(r.type==="Property")ae(r.value,t);else if(r.type==="RestElement")ae(r.argument,t);break;case"RestElement":ae(e.argument,t);break}return t}function Fr(e,t){if(!t||typeof t!=="object"||!("type"in t))return;if(t.type==="Identifier"){let n=vt(e,t.name);if(n)e.reactive_vars.add(n);return}let r=ae(t);for(let n of r){let i=vt(e,n);if(i)e.reactive_vars.add(i)}}function st(e){if(!e||typeof e!=="object"||!("type"in e))return!1;switch(String(e.type)){case"BlockStatement":case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"CatchClause":case"EachBlock":case"AwaitBlock":return!0;default:return!1}}function Ei(e){if(!e||typeof e!=="object"||!("type"in e))return!1;let t=String(e.type);return t==="FunctionDeclaration"||t==="FunctionExpression"||t==="ArrowFunctionExpression"}function nc(e,t){let r=e.scopeDeclarations.get(t);if(!r)r=new Map,e.scopeDeclarations.set(t,r);return r}function ic(e,t,r){let n=[];if(r.id.type==="Identifier")return n.push({kind:"local",name:r.id.name}),n;if(r.id.type!=="ObjectPattern")return n;for(let i of r.id.properties){if(i.type==="RestElement"){if(i.argument.type==="Identifier")n.push({kind:"local",name:i.argument.name});continue}if(i.computed)continue;let o=e.getPropertyName(i.key);if(!o)continue;let a;if(i.value.type==="Identifier")a=i.value.name;else if(i.value.type==="AssignmentPattern"&&i.value.left.type==="Identifier")a=i.value.left.name;if(!a)continue;n.push({kind:"prop",name:a,publicPropName:o})}return n}function Br(e,t,r,n,i){if(!On(t))return;let o=i?.allowRunesProps??!1,a=i?.forceProp??!1,p=t;for(let l of p.declarations){if(o&&De(je(l.init),"$props")){for(let b of ic(e,p,l))le(b.kind==="prop"?r:n,b.name,b.kind==="prop"?{kind:"prop",publicPropName:b.publicPropName}:{kind:"local"});continue}let m=p.kind==="var"?n:r,d=a?"prop":"local";for(let b of ae(l.id))le(m,b,d==="prop"?{kind:"prop",publicPropName:b}:{kind:"local"})}}function sc(e,t){if("id"in e&&e.id&&typeof e.id==="object"&&"name"in e.id&&typeof e.id.name==="string")le(t,e.id.name,{kind:"local"});for(let r of e.params)for(let n of ae(r))le(t,n,{kind:"local"})}function ac(e,t,r,n){if(!Array.isArray(t))return;for(let i of t){if(!i||typeof i!=="object"||!("type"in i))continue;switch(i.type){case"VariableDeclaration":Br(e,i,r,n);break;case"FunctionDeclaration":if(i.id?.name)le(r,i.id.name,{kind:"local"});break;case"ClassDeclaration":if(i.id?.name)le(r,i.id.name,{kind:"local"});break}}}function oc(e,t,r){if(!r||typeof r!=="object")return;let n="content"in r&&r.content&&typeof r.content==="object"&&"body"in r.content&&Array.isArray(r.content.body)?r.content:("body"in r)&&Array.isArray(r.body)?r:void 0;if(!n||!("body"in n)||!Array.isArray(n.body))return;for(let i of n.body){if(!i||typeof i!=="object"||!("type"in i))continue;switch(i.type){case"ImportDeclaration":for(let o of i.specifiers??[])if(o.local?.name)le(t.componentScope,o.local.name,{kind:"local"});break;case"VariableDeclaration":Br(e,i,t.componentScope,t.componentScope,{allowRunesProps:!0});break;case"FunctionDeclaration":if(i.id?.name)le(t.componentScope,i.id.name,{kind:"local"});break;case"ClassDeclaration":if(i.id?.name)le(t.componentScope,i.id.name,{kind:"local"});break;case"ExportNamedDeclaration":if(!i.declaration||typeof i.declaration!=="object"||!("type"in i.declaration))break;if(i.declaration.type==="VariableDeclaration")Br(e,i.declaration,t.componentScope,t.componentScope,{forceProp:!0});else if(i.declaration.type==="FunctionDeclaration"&&i.declaration.id?.name)le(t.componentScope,i.declaration.id.name,{kind:"prop",publicPropName:i.declaration.id.name});break}}}function Si(e,t){t.componentScope.clear(),t.scopeDeclarations=new WeakMap,t.activeScopes.length=0,oc(e,t,t.parsed?.instance)}function vi(e){return{varScopeStack:[e.componentScope]}}function Ci(e,t,r,n){if(!st(n))return;let i=nc(t,n),o=r.varScopeStack[r.varScopeStack.length-1]??t.componentScope;switch(String(n.type)){case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":sc(n,i);break;case"BlockStatement":ac(e,n.body,i,o);break;case"CatchClause":if("param"in n)for(let p of ae(n.param))le(i,p,{kind:"local"});break;case"EachBlock":{let p=n;for(let l of ae(p.context))le(i,l,{kind:"local"});if(typeof p.index==="string")le(i,p.index,{kind:"local"});else if(p.index&&"name"in p.index)le(i,p.index.name,{kind:"local"});break}case"AwaitBlock":{let p=n;for(let l of ae(p.value))le(i,l,{kind:"local"});for(let l of ae(p.error))le(i,l,{kind:"local"});break}}if(Ei(n))r.varScopeStack.push(i);return i}function Ai(e,t){if(Ei(t))e.varScopeStack.pop()}var wi=new Set(["$state","$derived","$effect","$props","$bindable","$inspect","$host"]);function cc(e,t){switch(t?.type){case"MemberExpression":return t.computed||e===t.object;case"MethodDefinition":return!!t.computed;case"MetaProperty":return e===t.meta;case"PropertyDefinition":return t.computed||e===t.value;case"Property":return t.computed||e===t.value;case"ExportSpecifier":case"ImportSpecifier":return e===t.local;case"LabeledStatement":case"BreakStatement":case"ContinueStatement":return!1;default:return!0}}var pc=Array.from(wi);function Pi(e){return e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122||e===95||e===36}function lc(e){if(e.includes("\\u"))return!0;for(let t of pc){let r=e.indexOf(t);while(r!==-1){if(!Pi(e.charCodeAt(r-1))&&!Pi(e.charCodeAt(r+t.length)))return!0;r=e.indexOf(t,r+1)}}return!1}function uc(e,t){for(let r=t.length-1;r>=0;r-=1)if(t[r]?.has(e))return!0;return!1}function hc(e){let t=new Set;if(!e||typeof e!=="object"||!("type"in e))return t;switch(String(e.type)){case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":{let r=e;if(r.id?.name)t.add(r.id.name);for(let n of r.params??[])ae(n,t);break}case"BlockStatement":Kt(e.body,t);break;case"CatchClause":ae(e.param,t);break;case"EachBlock":{let r=e;if(ae(r.context,t),typeof r.index==="string")t.add(r.index);else if(r.index?.name)t.add(r.index.name);break}case"AwaitBlock":{let r=e;ae(r.value,t),ae(r.error,t);break}}return t}function Kt(e,t){if(!Array.isArray(e))return;for(let r of e){if(!r||typeof r!=="object"||!("type"in r))continue;switch(String(r.type)){case"ImportDeclaration":for(let n of r.specifiers??[])if(n.local?.name)t.add(n.local.name);break;case"VariableDeclaration":for(let n of r.declarations??[])ae(n.id,t);break;case"FunctionDeclaration":case"ClassDeclaration":{let n=r.id?.name;if(n)t.add(n);break}case"ExportNamedDeclaration":{let n=r.declaration;if(n&&typeof n==="object"&&"type"in n)Kt([n],t);break}}}}function Vr(e,t){if(!e||typeof e!=="object")return!1;let r=[...t],n=!1;return _e(e,{enter(i,o){if(n){this.skip();return}if(st(i))r.push(hc(i));if(o&&i.type==="Identifier"&&wi.has(i.name)&&!o.type.startsWith("TS")&&cc(i,o)&&!uc(i.name,r))n=!0,this.skip()},leave(i){if(st(i))r.pop()}}),n}function ki(e){if(!e||typeof e!=="object")return;if("content"in e){let t=e.content,r=t&&typeof t==="object"&&"body"in t?t.body:void 0;if(Array.isArray(r))return r}if("body"in e&&Array.isArray(e.body))return e.body;return}function _i(e){if(e.runesOptionOverride!==void 0)return e.runesOptionOverride?"runes":"legacy";let t=e.parsed;if(!t)return"legacy";if(e.source!==void 0&&!lc(e.source))return"legacy";let r=new Set;Kt(ki(t.module),r);let n=new Set;return Kt(ki(t.instance),n),Vr(t.module,[r])||Vr(t.instance,[r,n])||Vr(t.fragment,[r,n])?"runes":"legacy"}var dc=/[A-Za-z_$][\w$]*/g;function fc(e,t,r){let n=new Map,i=t.typeParameters?.params,o=r.typeArguments?.params;if(!i?.length||!o?.length)return n;for(let a=0;a<i.length;a++){let p=i[a]?.name,l=o[a];if(!p||l?.start===void 0||l?.end===void 0)continue;let m=ee(e,l.start,l.end)?.trim();if(m)n.set(p,m)}return n}function mc(e,t){if(t.size===0)return e;return e.replace(dc,(r)=>t.get(r)??r)}function Ct(e,t,r,n,i=new Set){let o=new Map;if(!r?.type)return o;let a=(p)=>{for(let l of p){if(l?.type!=="TSPropertySignature"||l.computed)continue;if(!l.key)continue;let m=e.getPropertyName(l.key);if(!m)continue;let d=l.typeAnnotation?.start,b=l.typeAnnotation?.end;if(d===void 0||b===void 0)continue;let T=ee(t,d+1,b)?.trim();if(!T)continue;o.set(m,{type:T,optional:l.optional===!0,source:se(t,l)})}};switch(r.type){case"TSTypeLiteral":a(r.members??[]);break;case"TSInterfaceDeclaration":a(r.body?.body??[]);break;case"TSTypeAliasDeclaration":{let p=Ct(e,t,r.typeAnnotation,n,i);for(let[l,m]of p)o.set(l,m);break}case"TSTypeReference":{let p=ni(r.typeName);if(!p||i.has(p))break;let l=n.get(p);if(!l)break;i.add(p);let m=Ct(e,t,l,n,i);i.delete(p);let d=fc(t,l,r);for(let[b,T]of m)o.set(b,d.size===0?T:{...T,type:mc(T.type,d)});break}case"TSIntersectionType":for(let p of r.types??[]){let l=Ct(e,t,p,n,i);for(let[m,d]of l)o.set(m,d)}break;case"TSParenthesizedType":{let p=Ct(e,t,r.typeAnnotation,n,i);for(let[l,m]of p)o.set(l,m);break}}return o}function Ni(e,t,r){if(t.runesPropsDeclarationMetadataByDeclaratorStart.clear(),t.explicitPropTypesByName.clear(),t.explicitVariableTypesByName.clear(),t.typeImportBindingsByLocalName.clear(),t.localTypeDeclarationsByName.clear(),t.typedRunesPropsDeclarations.length=0,!t.source)return;let n=r;t.scriptLanguage=e.resolveScriptLanguage(n),t.customElementTag=n.options?.customElement?.tag,t.runesOptionOverride=n.options?.runes,t.scriptGenericsAttribute=e.resolveScriptGenericsAttribute(n);let i=n.instance?.content?.body??[];for(let o of i){if(!o?.type)continue;if(o.type==="ImportDeclaration"&&o.source?.value)for(let a of o.specifiers??[]){let p=a.local?.name;if(!p)continue;if(!(o.importKind==="type"||a.importKind==="type"))continue;let m,d;if(a.type==="ImportSpecifier")m="named",d=a.imported?.type==="Identifier"?a.imported.name:typeof a.imported?.value==="string"?a.imported.value:void 0;else if(a.type==="ImportDefaultSpecifier")m="default";else if(a.type==="ImportNamespaceSpecifier")m="namespace";if(!m)continue;t.typeImportBindingsByLocalName.set(p,{importedName:d,localName:p,source:String(o.source.value),specifierType:m})}if((o.type==="TSInterfaceDeclaration"||o.type==="TSTypeAliasDeclaration")&&o.id?.name&&o.start!==void 0&&o.end!==void 0)t.localTypeDeclarationsByName.set(o.id.name,{code:ee(t,o.start,o.end)?.trim()??"",node:o,start:o.start});if(o.type==="ExportNamedDeclaration"&&o.declaration?.type==="VariableDeclaration")for(let a of o.declaration.declarations??[]){if(a.id?.type!=="Identifier"||!a.id.name)continue;let p=Wt(t,a.id.typeAnnotation);if(p)t.explicitPropTypesByName.set(a.id.name,p)}else if(o.type==="VariableDeclaration")for(let a of o.declarations??[]){if(a.id?.type!=="Identifier"||!a.id.name)continue;let p=Wt(t,a.id.typeAnnotation);if(p)t.explicitVariableTypesByName.set(a.id.name,p)}}for(let o of i){if(!o||typeof o!=="object"||!("declarations"in o))continue;for(let a of o.declarations??[]){if(!De(je(a.init),"$props"))continue;let p=a.id?.typeAnnotation?void 0:Fn(a.init),l=a.id?.typeAnnotation?.typeAnnotation??p,m=a.id?.typeAnnotation?Wt(t,a.id.typeAnnotation):si(t,p),d=Ct(e,t,l,new Map(Array.from(t.localTypeDeclarationsByName.entries(),([E,k])=>[E,k.node]))),b=new Set,T=new Set;if(Te(t,l,b,T),pi(t,b,T),a.start!==void 0){let E={canonicalType:m,props:d,referencedImportedTypes:b,referencedLocalTypes:T};if(t.runesPropsDeclarationMetadataByDeclaratorStart.set(a.start,E),m)t.typedRunesPropsDeclarations.push(E)}}}}function Ii(e,t,r){for(let n of r.declarations){if(!De(je(n.init),"$props"))continue;if(n.id.type==="Identifier"){t.wholePropsLocals.add(n.id.name),t.restPropLocals.add(n.id.name);let a=Dr(t,n.start);if(a)for(let[p,l]of a.props)ft(e,t,p,{name:p,kind:"let",type:l.type,typeSource:"typescript",isFunction:!1,isFunctionDeclaration:!1,isRequired:!l.optional,constant:!1,reactive:!1,source:l.source});continue}if(n.id.type!=="ObjectPattern")continue;let i=He(t,e,r),o=n.id.properties.filter((a)=>{if(a.type!=="Property"||a.computed)return!1;if(!e.getPropertyName(a.key))return!1;if(a.value.type==="Identifier")return!0;return a.value.type==="AssignmentPattern"&&a.value.left.type==="Identifier"}).length;for(let a of n.id.properties){if(a.type==="RestElement"){if(a.argument.type==="Identifier")t.restPropLocals.add(a.argument.name);continue}let p=e.getPropertyName(a.key);if(!p)continue;let l,m;if(a.value.type==="Identifier")l=a.value.name;else{let u=a.value;l=u.left.name,m=u.right}if(!l)continue;if(e.trackPropLocalName(p,l),p==="children")t.snippetPropLocals.add(l);let d=xi(t,e,a)??(o===1?i:void 0),b=ri(t,n.start,p),{init:T,bindable:E}=Jn(m),k=T==null?{isFunction:!1}:$e(e,t,T),{value:B,type:C,isFunction:V,defaultValue:j}=k,D=b?.type===void 0&&d?.type===void 0?k.resolvedType:void 0;if(k.pendingCallDefault)t.pendingCallDefaultCandidates.push({propName:p,location:"props",...k.pendingCallDefault});let{type:X,typeSource:M,description:Q,params:x,returnType:s,isFunction:c}=St({explicitType:b?.type,typeSeed:C,inferredTypeForSource:C,jsdocType:d?.type,jsdocDescription:d?.description,jsdocParams:d?.params,jsdocReturnType:d?.returnType,resolvedType:D,resolvedDescription:k.resolvedDescription,resolvedParams:k.resolvedParams,resolvedReturnType:k.resolvedReturnType,initializerIsFunction:V,isFunctionDeclaration:!1,inferIsFunctionFromTypeSignature:!0});if(E)t.reactive_vars.add(p);ft(e,t,p,{name:p,...l===p?{}:{localName:l},kind:"let",description:Q,binding:d?.binding,deprecated:d?.deprecated,tags:d?.tags,...E?{bindable:!0}:{},type:X,typeSource:M,value:B,defaultValue:j,params:x,returnType:s,isFunction:c,isFunctionDeclaration:!1,isRequired:T==null&&b?.optional!==!0,constant:!1,reactive:E,source:se(t,a)})}}}function Li(e,t){if(e.syntaxMode!=="runes")return;for(let[r,n]of Array.from(e.events.entries())){if(n.type!=="dispatched")continue;if(t.has(r)||e.forwardedEvents.has(r))continue;let i=`on${r}`,o=e.props.get(i);if(!o)continue;let a=o.type!==void 0||o.params!==void 0||o.returnType!==void 0,p=n.detail===void 0||n.detail==="undefined"||n.detail==="null"?"() => void":`(detail: ${n.detail}) => void`;e.props.set(i,{...o,description:o.description??n.description,type:a?o.type:p,typeSource:a?o.typeSource:"inferred",isFunction:!0}),e.events.delete(r)}}var Di=new Set(["TSAsExpression","TSSatisfiesExpression","TSNonNullExpression","TSTypeAssertion","TSInstantiationExpression"]);function zt(e){if(!e||typeof e!=="object")return;_e(e,{enter(t){if(!Di.has(t.type))return;let r=t.expression;while(r&&Di.has(r.type))r=r.expression;if(r)this.replace(r)}})}function Xt(e,t){let r=t.source?.value;if(typeof r!=="string"||t.importKind==="type")return;for(let n of t.specifiers??[]){if(n.type!=="ImportSpecifier"||n.importKind==="type")continue;let i=n.local?.name;if(!i)continue;let o=n.imported?.name??(typeof n.imported?.value==="string"?n.imported.value:i);e.valueImportBindingsByLocalName.set(i,{localName:i,importedName:o,source:r})}}function jr(e,t){if(!t)return;_e(t,{enter(r){if(r.type==="ImportDeclaration")Xt(e,r);if(r.type==="FunctionDeclaration"){let n=r;if(n.id?.name)e.funcDecls.set(n.id.name,n)}}})}function Mi(e,t,r){let n=t+1;while(n<e.length){if(e[n]==="\\"){n+=2;continue}if(e[n]===r)return n+1;n++}return n}function Oi(e,t){let r=t+1,n=0;while(r<e.length){let i=e[r];if(i==="\\"){r+=2;continue}if(n===0){if(i==="`")return r+1;if(i==="$"&&e[r+1]==="{"){n=1,r+=2;continue}r++;continue}if(i==="{")n++;else if(i==="}")n--;else if(i==='"'||i==="'"){r=Mi(e,r,i);continue}else if(i==="`"){r=Oi(e,r);continue}r++}return r}function yc(e,t){let r=[],n=e.length,i=0;while(i<n){let o=e[i];if(o==='"'||o==="'"){i=Mi(e,i,o);continue}if(o==="`"){i=Oi(e,i);continue}if(o==="/"&&e[i+1]==="/"){let a=i+2;while(a<n&&e[a]!==`
|
|
18
|
+
`)a++;i=a;continue}if(o==="/"&&e[i+1]==="*"){let a=i,p=i+2;while(p<n&&!(e[p]==="*"&&e[p+1]==="/"))p++;let l=Math.min(p+2,n),m=e.slice(a,l);r.push({end:l+t,isJsDoc:m.startsWith("/**")&&m.length>4,text:m}),i=l;continue}i++}return r}function Ri(e,t,r){if(!e||typeof e!=="object"||!("type"in e))return;let n=e;if(n.type==="FunctionDeclaration"){if(n.id?.type==="Identifier"&&n.id.name)r.push({name:n.id.name,start:t});return}if(n.type==="VariableDeclaration"){for(let i of n.declarations??[])if(i?.id?.type==="Identifier"&&i.id.name)r.push({name:i.id.name,start:t})}}function gc(e){let t=[];for(let r of e){if(!r||typeof r!=="object"||!("type"in r))continue;let n=r;if(n.start===void 0)continue;if(n.type==="ExportNamedDeclaration"&&n.declaration)Ri(n.declaration,n.start,t);else Ri(n,n.start,t)}return t}function xc(e,t,r){let n;for(let i of e){if(i.end>t)break;if(!i.isJsDoc)continue;if(!Mr.test(r.slice(i.end,t)))continue;n=i}return n}function Bi(e,t){let r=new Map;if(!e.source)return r;let n=[e.parsed?.module,e.parsed?.instance],i=[],o=[];for(let a of n){let p=a?.content;if(!p?.body||p.start===void 0||p.end===void 0)continue;i.push(...yc(e.source.slice(p.start,p.end),p.start)),o.push(...gc(p.body))}i.sort((a,p)=>a.end-p.end);for(let a of o){let p=xc(i,a.start,e.source);if(!p)continue;let l=bt(p.text),{type:m,description:d}=Or(l);if(!m)continue;r.set(a.name,{type:t.aliasType(m.type),description:d||m.description})}return r}var bc={li:{direct:["li"]},dt:{descendant:["dt","dd"]},dd:{descendant:["dt","dd"]},p:{descendant:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","menu","nav","ol","p","pre","section","table","ul"]},rt:{descendant:["rt","rp"]},rp:{descendant:["rt","rp"]},optgroup:{descendant:["optgroup"]},option:{descendant:["option","optgroup"]},thead:{direct:["tbody","tfoot"]},tbody:{direct:["tbody","tfoot"]},tfoot:{direct:["tbody"]},tr:{direct:["tr","tbody"]},td:{direct:["td","th","tr"]},th:{direct:["td","th","tr"]}};function Fi(e,t){let r=bc[e];if(!r)return!1;if(!t)return!0;return(r.direct??r.descendant??[]).includes(t)}var en={};no(en,{Node:()=>_t,Parser:()=>ne,Position:()=>at,SourceLocation:()=>kt,TokContext:()=>ve,Token:()=>or,TokenType:()=>z,defaultOptions:()=>Yt,getLineInfo:()=>zr,isIdentifierChar:()=>ye,isIdentifierStart:()=>he,isNewLine:()=>Ze,keywordTypes:()=>rr,lineBreak:()=>de,lineBreakG:()=>Wi,nonASCIIwhitespace:()=>Kr,parse:()=>tp,parseExpressionAt:()=>rp,tokContexts:()=>te,tokTypes:()=>h,tokenizer:()=>np,version:()=>As});var Tc=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],qi=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],Ec="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ--ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・",Ui="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-Ა-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ--ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",$r={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"},Hr="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",Sc={5:Hr,"5module":Hr+" export import",6:Hr+" const class extends export import super"},Gi=/^in(stanceof)?$/,vc=new RegExp("["+Ui+"]"),Cc=new RegExp("["+Ui+Ec+"]");function qr(e,t){var r=65536;for(var n=0;n<t.length;n+=2){if(r+=t[n],r>e)return!1;if(r+=t[n+1],r>=e)return!0}return!1}function he(e,t){if(e<65)return e===36;if(e<91)return!0;if(e<97)return e===95;if(e<123)return!0;if(e<=65535)return e>=170&&vc.test(String.fromCharCode(e));if(t===!1)return!1;return qr(e,qi)}function ye(e,t){if(e<48)return e===36;if(e<58)return!0;if(e<65)return!1;if(e<91)return!0;if(e<97)return e===95;if(e<123)return!0;if(e<=65535)return e>=170&&Cc.test(String.fromCharCode(e));if(t===!1)return!1;return qr(e,qi)||qr(e,Tc)}var z=function(t,r){if(r===void 0)r={};this.label=t,this.keyword=r.keyword,this.beforeExpr=!!r.beforeExpr,this.startsExpr=!!r.startsExpr,this.isLoop=!!r.isLoop,this.isAssign=!!r.isAssign,this.prefix=!!r.prefix,this.postfix=!!r.postfix,this.binop=r.binop||null,this.updateContext=null};function Ee(e,t){return new z(e,{beforeExpr:!0,binop:t})}var Se={beforeExpr:!0},me={startsExpr:!0},rr={};function K(e,t){if(t===void 0)t={};return t.keyword=e,rr[e]=new z(e,t)}var h={num:new z("num",me),regexp:new z("regexp",me),string:new z("string",me),name:new z("name",me),privateId:new z("privateId",me),eof:new z("eof"),bracketL:new z("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new z("]"),braceL:new z("{",{beforeExpr:!0,startsExpr:!0}),braceR:new z("}"),parenL:new z("(",{beforeExpr:!0,startsExpr:!0}),parenR:new z(")"),comma:new z(",",Se),semi:new z(";",Se),colon:new z(":",Se),dot:new z("."),question:new z("?",Se),questionDot:new z("?."),arrow:new z("=>",Se),template:new z("template"),invalidTemplate:new z("invalidTemplate"),ellipsis:new z("...",Se),backQuote:new z("`",me),dollarBraceL:new z("${",{beforeExpr:!0,startsExpr:!0}),eq:new z("=",{beforeExpr:!0,isAssign:!0}),assign:new z("_=",{beforeExpr:!0,isAssign:!0}),incDec:new z("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new z("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:Ee("||",1),logicalAND:Ee("&&",2),bitwiseOR:Ee("|",3),bitwiseXOR:Ee("^",4),bitwiseAND:Ee("&",5),equality:Ee("==/!=/===/!==",6),relational:Ee("</>/<=/>=",7),bitShift:Ee("<</>>/>>>",8),plusMin:new z("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:Ee("%",10),star:Ee("*",10),slash:Ee("/",10),starstar:new z("**",{beforeExpr:!0}),coalesce:Ee("??",1),_break:K("break"),_case:K("case",Se),_catch:K("catch"),_continue:K("continue"),_debugger:K("debugger"),_default:K("default",Se),_do:K("do",{isLoop:!0,beforeExpr:!0}),_else:K("else",Se),_finally:K("finally"),_for:K("for",{isLoop:!0}),_function:K("function",me),_if:K("if"),_return:K("return",Se),_switch:K("switch"),_throw:K("throw",Se),_try:K("try"),_var:K("var"),_const:K("const"),_while:K("while",{isLoop:!0}),_with:K("with"),_new:K("new",{beforeExpr:!0,startsExpr:!0}),_this:K("this",me),_super:K("super",me),_class:K("class",me),_extends:K("extends",Se),_export:K("export"),_import:K("import",me),_null:K("null",me),_true:K("true",me),_false:K("false",me),_in:K("in",{beforeExpr:!0,binop:7}),_instanceof:K("instanceof",{beforeExpr:!0,binop:7}),_typeof:K("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:K("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:K("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},de=/\r\n?|\n|\u2028|\u2029/,Wi=new RegExp(de.source,"g");function Ze(e){return e===10||e===13||e===8232||e===8233}function Ki(e,t,r){if(r===void 0)r=e.length;for(var n=t;n<r;n++){var i=e.charCodeAt(n);if(Ze(i))return n<r-1&&i===13&&e.charCodeAt(n+1)===10?n+2:n+1}return-1}var Kr=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,oe=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,zi=Object.prototype,{hasOwnProperty:Ac,toString:Pc}=zi,ot=Object.hasOwn||function(e,t){return Ac.call(e,t)},Vi=Array.isArray||function(e){return Pc.call(e)==="[object Array]"},ji=Object.create(null);function qe(e){return ji[e]||(ji[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function Be(e){if(e<=65535)return String.fromCharCode(e);return e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320)}var kc=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,at=function(t,r){this.line=t,this.column=r};at.prototype.offset=function(t){return new at(this.line,this.column+t)};var kt=function(t,r,n){if(this.start=r,this.end=n,t.sourceFile!==null)this.source=t.sourceFile};function zr(e,t){for(var r=1,n=0;;){var i=Ki(e,n,t);if(i<0)return new at(r,t-n);++r,n=i}}var Yt={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},$i=!1;function wc(e){var t={};for(var r in Yt)t[r]=e&&ot(e,r)?e[r]:Yt[r];if(t.ecmaVersion==="latest")t.ecmaVersion=1e8;else if(t.ecmaVersion==null){if(!$i&&typeof console==="object"&&console.warn)$i=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
|
|
19
|
+
Defaulting to 2020, but this will stop working in the future.`);t.ecmaVersion=11}else if(t.ecmaVersion>=2015)t.ecmaVersion-=2009;if(t.allowReserved==null)t.allowReserved=t.ecmaVersion<5;if(!e||e.allowHashBang==null)t.allowHashBang=t.ecmaVersion>=14;if(Vi(t.onToken)){var n=t.onToken;t.onToken=function(i){return n.push(i)}}if(Vi(t.onComment))t.onComment=_c(t,t.onComment);if(t.sourceType==="commonjs"&&t.allowAwaitOutsideFunction)throw Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return t}function _c(e,t){return function(r,n,i,o,a,p){var l={type:r?"Block":"Line",value:n,start:i,end:o};if(e.locations)l.loc=new kt(this,a,p);if(e.ranges)l.range=[i,o];t.push(l)}}var Qe=1,et=2,Xr=4,Xi=8,Jr=16,Ji=32,nr=64,Yi=128,tt=256,wt=512,Qi=1024,ir=Qe|et|tt;function Yr(e,t){return et|(e?Xr:0)|(t?Xi:0)}var Qt=0,Qr=1,Ve=2,Zi=3,es=4,ts=5,ne=function(t,r,n){this.options=t=wc(t),this.sourceFile=t.sourceFile,this.keywords=qe(Sc[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var i="";if(t.allowReserved!==!0){if(i=$r[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module")i+=" await"}this.reservedWords=qe(i);var o=(i?i+" ":"")+$r.strict;if(this.reservedWordsStrict=qe(o),this.reservedWordsStrictBind=qe(o+" "+$r.strictBind),this.input=String(r),this.containsEsc=!1,this.pos=n||0,this.curLine=1,t.startLocation)this.lineStart=this.pos-t.startLocation.column,this.curLine=t.startLocation.line;else if(n){if(this.lineStart=this.input.lastIndexOf(`
|
|
20
|
+
`,n-1)+1,this.options.locations)this.curLine=this.input.slice(0,this.lineStart).split(de).length}else this.lineStart=0;if(this.type=h.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=t.sourceType==="module",this.strict=this.inModule||t.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&&t.allowHashBang&&this.input.slice(0,2)==="#!")this.skipLineComment(2);this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?et:Qe),this.regexpState=null,this.privateNameStack=[]},Ae={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}};ne.prototype.parse=function(){var t=this,r=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return t.parseTopLevel(r)})};Ae.inFunction.get=function(){return(this.currentVarScope().flags&et)>0};Ae.inGenerator.get=function(){return(this.currentVarScope().flags&Xi)>0};Ae.inAsync.get=function(){return(this.currentVarScope().flags&Xr)>0};Ae.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],r=t.flags;if(r&(tt|wt))return!1;if(r&et)return(r&Xr)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};Ae.allowReturn.get=function(){if(this.inFunction)return!0;if(this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&Qe)return!0;return!1};Ae.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return(t&nr)>0||this.options.allowSuperOutsideMethod};Ae.allowDirectSuper.get=function(){return(this.currentThisScope().flags&Yi)>0};Ae.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};Ae.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],r=t.flags;if(r&(tt|wt)||r&et&&!(r&Jr))return!0}return!1};Ae.allowUsing.get=function(){var e=this.currentScope(),t=e.flags;if(t&Qi)return!1;if(!this.inModule&&t&Qe)return!1;return!0};Ae.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&tt)>0};ne.extend=function(){var t=[],r=arguments.length;while(r--)t[r]=arguments[r];var n=this;for(var i=0;i<t.length;i++)n=t[i](n);return n};ne.parse=function(t,r){return new this(r,t).parse()};ne.parseExpressionAt=function(t,r,n){var i=new this(n,t,r);return i.nextToken(),i.parseExpression()};ne.tokenizer=function(t,r){return new this(r,t)};Object.defineProperties(ne.prototype,Ae);var ue=ne.prototype,Nc=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;ue.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){oe.lastIndex=e,e+=oe.exec(this.input)[0].length;var t=Nc.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])==="use strict"){oe.lastIndex=e+t[0].length;var r=oe.exec(this.input),n=r.index+r[0].length,i=this.input.charAt(n);return i===";"||i==="}"||de.test(r[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(i)||i==="!"&&this.input.charAt(n+1)==="=")}if(e+=t[0].length,oe.lastIndex=e,e+=oe.exec(this.input)[0].length,this.input[e]===";")e++}};ue.eat=function(e){if(this.type===e)return this.next(),!0;else return!1};ue.isContextual=function(e){return this.type===h.name&&this.value===e&&!this.containsEsc};ue.eatContextual=function(e){if(!this.isContextual(e))return!1;return this.next(),!0};ue.catchStackOverflow=function(e){try{return e()}catch(t){if(t instanceof Error&&(/\bstack\b.*\b(exceeded|overflow)\b/i.test(t.message)||/\btoo much recursion\b/i.test(t.message)))this.raise(this.start,"Not enough stack space to parse input");else throw t}};ue.expectContextual=function(e){if(!this.eatContextual(e))this.unexpected()};ue.canInsertSemicolon=function(){return this.type===h.eof||this.type===h.braceR||de.test(this.input.slice(this.lastTokEnd,this.start))};ue.insertSemicolon=function(){if(this.canInsertSemicolon()){if(this.options.onInsertedSemicolon)this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc);return!0}};ue.semicolon=function(){if(!this.eat(h.semi)&&!this.insertSemicolon())this.unexpected()};ue.afterTrailingComma=function(e,t){if(this.type===e){if(this.options.onTrailingComma)this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc);if(!t)this.next();return!0}};ue.expect=function(e){this.eat(e)||this.unexpected()};ue.unexpected=function(e){this.raise(e!=null?e:this.start,"Unexpected token")};var sr=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};ue.checkPatternErrors=function(e,t){if(!e)return;if(e.trailingComma>-1)this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var r=t?e.parenthesizedAssign:e.parenthesizedBind;if(r>-1)this.raiseRecoverable(r,t?"Assigning to rvalue":"Parenthesized pattern")};ue.checkExpressionErrors=function(e,t){if(!e)return!1;var{shorthandAssign:r,doubleProto:n}=e;if(!t)return r>=0||n>=0;if(r>=0)this.raise(r,"Shorthand property assignments are valid only in destructuring patterns");if(n>=0)this.raiseRecoverable(n,"Redefinition of __proto__ property")};ue.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")};ue.isSimpleAssignTarget=function(e){if(e.type==="ParenthesizedExpression")return this.isSimpleAssignTarget(e.expression);return e.type==="Identifier"||e.type==="MemberExpression"};var I=ne.prototype;I.parseTopLevel=function(e){var t=Object.create(null);if(!e.body)e.body=[];while(this.type!==h.eof){var r=this.parseStatement(null,!0,t);e.body.push(r)}if(this.inModule)for(var n=0,i=Object.keys(this.undefinedExports);n<i.length;n+=1){var o=i[n];this.raiseRecoverable(this.undefinedExports[o].start,"Export '"+o+"' is not defined")}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType==="commonjs"?"script":this.options.sourceType,this.finishNode(e,"Program")};var Zr={kind:"loop"},Ic={kind:"switch"};I.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;oe.lastIndex=this.pos;var t=oe.exec(this.input),r=this.pos+t[0].length,n=this.fullCharCodeAt(r);if(n===91||n===92)return!0;if(e)return!1;if(n===123)return!0;if(he(n)){var i=r;do r+=n<=65535?1:2;while(ye(n=this.fullCharCodeAt(r)));if(n===92)return!0;var o=this.input.slice(i,r);if(!Gi.test(o))return!0}return!1};I.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;oe.lastIndex=this.pos;var e=oe.exec(this.input),t=this.pos+e[0].length,r;return!de.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(ye(r=this.fullCharCodeAt(t+8))||r===92))};I.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?"await":"using"))return!1;oe.lastIndex=this.pos;var r=oe.exec(this.input),n=this.pos+r[0].length;if(de.test(this.input.slice(this.pos,n)))return!1;if(e){var i=n+5,o;if(this.input.slice(n,i)!=="using"||i===this.input.length||ye(o=this.fullCharCodeAt(i))||o===92)return!1;oe.lastIndex=i;var a=oe.exec(this.input);if(n=i+a[0].length,a&&de.test(this.input.slice(i,n)))return!1}var p=this.fullCharCodeAt(n);if(!he(p)&&p!==92)return!1;var l=n;do n+=p<=65535?1:2;while(ye(p=this.fullCharCodeAt(n)));if(p===92)return!0;var m=this.input.slice(l,n);if(Gi.test(m))return!1;if(t&&!e&&m==="of"){oe.lastIndex=n;var d=oe.exec(this.input);if(n=n+d[0].length,this.input.charCodeAt(n)!==61||(p=this.input.charCodeAt(n+1))===61||p===62)return!1}return!0};I.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)};I.isUsing=function(e){return this.isUsingKeyword(!1,e)};I.parseStatement=function(e,t,r){var n=this.type,i=this.startNode(),o;if(this.isLet(e))n=h._var,o="let";switch(n){case h._break:case h._continue:return this.parseBreakContinueStatement(i,n.keyword);case h._debugger:return this.parseDebuggerStatement(i);case h._do:return this.parseDoStatement(i);case h._for:return this.parseForStatement(i);case h._function:if(e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6)this.unexpected();return this.parseFunctionStatement(i,!1,!e);case h._class:if(e)this.unexpected();return this.parseClass(i,!0);case h._if:return this.parseIfStatement(i);case h._return:return this.parseReturnStatement(i);case h._switch:return this.parseSwitchStatement(i);case h._throw:return this.parseThrowStatement(i);case h._try:return this.parseTryStatement(i);case h._const:case h._var:if(o=o||this.value,e&&o!=="var")this.unexpected();return this.parseVarStatement(i,o);case h._while:return this.parseWhileStatement(i);case h._with:return this.parseWithStatement(i);case h.braceL:return this.parseBlock(!0,i);case h.semi:return this.parseEmptyStatement(i);case h._export:case h._import:if(this.options.ecmaVersion>10&&n===h._import){oe.lastIndex=this.pos;var a=oe.exec(this.input),p=this.pos+a[0].length,l=this.input.charCodeAt(p);if(l===40||l===46)return this.parseExpressionStatement(i,this.parseExpression())}if(!this.options.allowImportExportEverywhere){if(!t)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 n===h._import?this.parseImport(i):this.parseExport(i,r);default:if(this.isAsyncFunction()){if(e)this.unexpected();return this.next(),this.parseFunctionStatement(i,!0,!e)}var m=this.isAwaitUsing(!1)?"await using":this.isUsing(!1)?"using":null;if(m){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(e)this.raise(this.start,"Using declaration is not allowed in single-statement positions");if(m==="await using"){if(!this.canAwait)this.raise(this.start,"Await using cannot appear outside of async function");this.next()}return this.next(),this.parseVar(i,!1,m),this.semicolon(),this.finishNode(i,"VariableDeclaration")}var d=this.value,b=this.parseExpression();if(n===h.name&&b.type==="Identifier"&&this.eat(h.colon))return this.parseLabeledStatement(i,d,b,e);else return this.parseExpressionStatement(i,b)}};I.parseBreakContinueStatement=function(e,t){var r=t==="break";if(this.next(),this.eat(h.semi)||this.insertSemicolon())e.label=null;else if(this.type!==h.name)this.unexpected();else e.label=this.parseIdent(),this.semicolon();var n=0;for(;n<this.labels.length;++n){var i=this.labels[n];if(e.label==null||i.name===e.label.name){if(i.kind!=null&&(r||i.kind==="loop"))break;if(e.label&&r)break}}if(n===this.labels.length)this.raise(e.start,"Unsyntactic "+t);return this.finishNode(e,r?"BreakStatement":"ContinueStatement")};I.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")};I.parseDoStatement=function(e){if(this.next(),this.labels.push(Zr),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(h._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6)this.eat(h.semi);else this.semicolon();return this.finishNode(e,"DoWhileStatement")};I.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(Zr),this.enterScope(0),this.expect(h.parenL),this.type===h.semi){if(t>-1)this.unexpected(t);return this.parseFor(e,null)}var r=this.isLet();if(this.type===h._var||this.type===h._const||r){var n=this.startNode(),i=r?"let":this.value;return this.next(),this.parseVar(n,!0,i),this.finishNode(n,"VariableDeclaration"),this.parseForAfterInit(e,n,t)}var o=this.isContextual("let"),a=!1,p=this.isUsing(!0)?"using":this.isAwaitUsing(!0)?"await using":null;if(p){var l=this.startNode();if(this.next(),p==="await using"){if(!this.canAwait)this.raise(this.start,"Await using cannot appear outside of async function");this.next()}return this.parseVar(l,!0,p),this.finishNode(l,"VariableDeclaration"),this.parseForAfterInit(e,l,t)}var m=this.containsEsc,d=new sr,b=this.start,T=t>-1?this.parseExprSubscripts(d,"await"):this.parseExpression(!0,d);if(this.type===h._in||(a=this.options.ecmaVersion>=6&&this.isContextual("of"))){if(t>-1){if(this.type===h._in)this.unexpected(t);e.await=!0}else if(a&&this.options.ecmaVersion>=8){if(T.start===b&&!m&&T.type==="Identifier"&&T.name==="async")this.unexpected();else if(this.options.ecmaVersion>=9)e.await=!1}if(o&&a)this.raise(T.start,"The left-hand side of a for-of loop may not start with 'let'.");return this.toAssignable(T,!1,d),this.checkLValPattern(T),this.parseForIn(e,T)}else this.checkExpressionErrors(d,!0);if(t>-1)this.unexpected(t);return this.parseFor(e,T)};I.parseForAfterInit=function(e,t,r){if((this.type===h._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&t.declarations.length===1){if(this.type===h._in){if((t.kind==="using"||t.kind==="await using")&&!t.declarations[0].init)this.raise(this.start,"Using declaration is not allowed in for-in loops");if(this.options.ecmaVersion>=9&&r>-1)this.unexpected(r)}else if(this.options.ecmaVersion>=9)e.await=r>-1;return this.parseForIn(e,t)}if(r>-1)this.unexpected(r);return this.parseFor(e,t)};I.parseFunctionStatement=function(e,t,r){return this.next(),this.parseFunction(e,Pt|(r?0:Ur),!1,t)};I.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(h._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};I.parseReturnStatement=function(e){if(!this.allowReturn)this.raise(this.start,"'return' outside of function");if(this.next(),this.eat(h.semi)||this.insertSemicolon())e.argument=null;else e.argument=this.parseExpression(),this.semicolon();return this.finishNode(e,"ReturnStatement")};I.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(h.braceL),this.labels.push(Ic),this.enterScope(Qi);var t;for(var r=!1;this.type!==h.braceR;)if(this.type===h._case||this.type===h._default){var n=this.type===h._case;if(t)this.finishNode(t,"SwitchCase");if(e.cases.push(t=this.startNode()),t.consequent=[],this.next(),n)t.test=this.parseExpression();else{if(r)this.raiseRecoverable(this.lastTokStart,"Multiple default clauses");r=!0,t.test=null}this.expect(h.colon)}else{if(!t)this.unexpected();t.consequent.push(this.parseStatement(null))}if(this.exitScope(),t)this.finishNode(t,"SwitchCase");return this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")};I.parseThrowStatement=function(e){if(this.next(),de.test(this.input.slice(this.lastTokEnd,this.start)))this.raise(this.lastTokEnd,"Illegal newline after throw");return e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var Lc=[];I.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?Ji:0),this.checkLValPattern(e,t?es:Ve),this.expect(h.parenR),e};I.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===h._catch){var t=this.startNode();if(this.next(),this.eat(h.parenL))t.param=this.parseCatchClauseParam();else{if(this.options.ecmaVersion<10)this.unexpected();t.param=null,this.enterScope(0)}t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}if(e.finalizer=this.eat(h._finally)?this.parseBlock():null,!e.handler&&!e.finalizer)this.raise(e.start,"Missing catch or finally clause");return this.finishNode(e,"TryStatement")};I.parseVarStatement=function(e,t,r){return this.next(),this.parseVar(e,!1,t,r),this.semicolon(),this.finishNode(e,"VariableDeclaration")};I.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(Zr),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};I.parseWithStatement=function(e){if(this.strict)this.raise(this.start,"'with' in strict mode");return this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")};I.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};I.parseLabeledStatement=function(e,t,r,n){for(var i=0,o=this.labels;i<o.length;i+=1){var a=o[i];if(a.name===t)this.raise(r.start,"Label '"+t+"' is already declared")}var p=this.type.isLoop?"loop":this.type===h._switch?"switch":null;for(var l=this.labels.length-1;l>=0;l--){var m=this.labels[l];if(m.statementStart===e.start)m.statementStart=this.start,m.kind=p;else break}return this.labels.push({name:t,kind:p,statementStart:this.start}),e.body=this.parseStatement(n?n.indexOf("label")===-1?n+"label":n:"label"),this.labels.pop(),e.label=r,this.finishNode(e,"LabeledStatement")};I.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")};I.parseBlock=function(e,t,r){if(e===void 0)e=!0;if(t===void 0)t=this.startNode();if(t.body=[],this.expect(h.braceL),e)this.enterScope(0);while(this.type!==h.braceR){var n=this.parseStatement(null);t.body.push(n)}if(r)this.strict=!1;if(this.next(),e)this.exitScope();return this.finishNode(t,"BlockStatement")};I.parseFor=function(e,t){return e.init=t,this.expect(h.semi),e.test=this.type===h.semi?null:this.parseExpression(),this.expect(h.semi),e.update=this.type===h.parenR?null:this.parseExpression(),this.expect(h.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};I.parseForIn=function(e,t){var r=this.type===h._in;if(this.next(),t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!r||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier"))this.raise(t.start,(r?"for-in":"for-of")+" loop variable declaration may not have an initializer");return e.left=t,e.right=r?this.parseExpression():this.parseMaybeAssign(),this.expect(h.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,r?"ForInStatement":"ForOfStatement")};I.parseVar=function(e,t,r,n){e.declarations=[],e.kind=r;for(;;){var i=this.startNode();if(this.parseVarId(i,r),this.eat(h.eq))i.init=this.parseMaybeAssign(t);else if(!n&&r==="const"&&!(this.type===h._in||this.options.ecmaVersion>=6&&this.isContextual("of")))this.unexpected();else if(!n&&(r==="using"||r==="await using")&&this.options.ecmaVersion>=17&&this.type!==h._in&&!this.isContextual("of"))this.raise(this.lastTokEnd,"Missing initializer in "+r+" declaration");else if(!n&&i.id.type!=="Identifier"&&!(t&&(this.type===h._in||this.isContextual("of"))))this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value");else i.init=null;if(e.declarations.push(this.finishNode(i,"VariableDeclarator")),!this.eat(h.comma))break}return e};I.parseVarId=function(e,t){e.id=t==="using"||t==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?Qr:Ve,!1)};var Pt=1,Ur=2,rs=4;I.parseFunction=function(e,t,r,n,i){if(this.initFunction(e),this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!n){if(this.type===h.star&&t&Ur)this.unexpected();e.generator=this.eat(h.star)}if(this.options.ecmaVersion>=8)e.async=!!n;if(t&Pt){if(e.id=t&rs&&this.type!==h.name?null:this.parseIdent(),e.id&&!(t&Ur))this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?Qr:Ve:Zi)}var o=this.yieldPos,a=this.awaitPos,p=this.awaitIdentPos;if(this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Yr(e.async,e.generator)),!(t&Pt))e.id=this.type===h.name?this.parseIdent():null;return this.parseFunctionParams(e),this.parseFunctionBody(e,r,!1,i),this.yieldPos=o,this.awaitPos=a,this.awaitIdentPos=p,this.finishNode(e,t&Pt?"FunctionDeclaration":"FunctionExpression")};I.parseFunctionParams=function(e){this.expect(h.parenL),e.params=this.parseBindingList(h.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()};I.parseClass=function(e,t){this.next();var r=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var n=this.enterClassBody(),i=this.startNode(),o=!1;i.body=[],this.expect(h.braceL);while(this.type!==h.braceR){var a=this.parseClassElement(e.superClass!==null);if(a){if(i.body.push(a),a.type==="MethodDefinition"&&a.kind==="constructor"){if(o)this.raiseRecoverable(a.start,"Duplicate constructor in the same class");o=!0}else if(a.key&&a.key.type==="PrivateIdentifier"&&Dc(n,a))this.raiseRecoverable(a.key.start,"Identifier '#"+a.key.name+"' has already been declared")}}return this.strict=r,this.next(),e.body=this.finishNode(i,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};I.parseClassElement=function(e){if(this.eat(h.semi))return null;var t=this.options.ecmaVersion,r=this.startNode(),n="",i=!1,o=!1,a="method",p=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(h.braceL))return this.parseClassStaticBlock(r),r;if(this.isClassElementNameStart()||this.type===h.star)p=!0;else n="static"}if(r.static=p,!n&&t>=8&&this.eatContextual("async"))if((this.isClassElementNameStart()||this.type===h.star)&&!this.canInsertSemicolon())o=!0;else n="async";if(!n&&(t>=9||!o)&&this.eat(h.star))i=!0;if(!n&&!o&&!i){var l=this.value;if(this.eatContextual("get")||this.eatContextual("set"))if(this.isClassElementNameStart())a=l;else n=l}if(n)r.computed=!1,r.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),r.key.name=n,this.finishNode(r.key,"Identifier");else this.parseClassElementName(r);if(t<13||this.type===h.parenL||a!=="method"||i||o){var m=!r.static&&Zt(r,"constructor"),d=m&&e;if(m&&a!=="method")this.raise(r.key.start,"Constructor can't have get/set modifier");r.kind=m?"constructor":a,this.parseClassMethod(r,i,o,d)}else this.parseClassField(r);return r};I.isClassElementNameStart=function(){return this.type===h.name||this.type===h.privateId||this.type===h.num||this.type===h.string||this.type===h.bracketL||this.type.keyword};I.parseClassElementName=function(e){if(this.type===h.privateId){if(this.value==="constructor")this.raise(this.start,"Classes can't have an element named '#constructor'");e.computed=!1,e.key=this.parsePrivateIdent()}else this.parsePropertyName(e)};I.parseClassMethod=function(e,t,r,n){var i=e.key;if(e.kind==="constructor"){if(t)this.raise(i.start,"Constructor can't be a generator");if(r)this.raise(i.start,"Constructor can't be an async method")}else if(e.static&&Zt(e,"prototype"))this.raise(i.start,"Classes may not have a static property named prototype");var o=e.value=this.parseMethod(t,r,n);if(e.kind==="get"&&o.params.length!==0)this.raiseRecoverable(o.start,"getter should have no params");if(e.kind==="set"&&o.params.length!==1)this.raiseRecoverable(o.start,"setter should have exactly one param");if(e.kind==="set"&&o.params[0].type==="RestElement")this.raiseRecoverable(o.params[0].start,"Setter cannot use rest params");return this.finishNode(e,"MethodDefinition")};I.parseClassField=function(e){if(Zt(e,"constructor"))this.raise(e.key.start,"Classes can't have a field named 'constructor'");else if(e.static&&Zt(e,"prototype"))this.raise(e.key.start,"Classes can't have a static field named 'prototype'");if(this.eat(h.eq))this.enterScope(wt|nr),e.value=this.parseMaybeAssign(),this.exitScope();else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")};I.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;this.labels=[],this.enterScope(tt|nr);while(this.type!==h.braceR){var r=this.parseStatement(null);e.body.push(r)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")};I.parseClassId=function(e,t){if(this.type===h.name){if(e.id=this.parseIdent(),t)this.checkLValSimple(e.id,Ve,!1)}else{if(t===!0)this.unexpected();e.id=null}};I.parseClassSuper=function(e){e.superClass=this.eat(h._extends)?this.parseExprSubscripts(null,!1):null};I.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};I.exitClassBody=function(){var e=this.privateNameStack.pop(),{declared:t,used:r}=e;if(!this.options.checkPrivateFields)return;var n=this.privateNameStack.length,i=n===0?null:this.privateNameStack[n-1];for(var o=0;o<r.length;++o){var a=r[o];if(!ot(t,a.name))if(i)i.used.push(a);else this.raiseRecoverable(a.start,"Private field '#"+a.name+"' must be declared in an enclosing class")}};function Dc(e,t){var r=t.key.name,n=e[r],i="true";if(t.type==="MethodDefinition"&&(t.kind==="get"||t.kind==="set"))i=(t.static?"s":"i")+t.kind;if(n==="iget"&&i==="iset"||n==="iset"&&i==="iget"||n==="sget"&&i==="sset"||n==="sset"&&i==="sget")return e[r]="true",!1;else if(!n)return e[r]=i,!1;else return!0}function Zt(e,t){var{computed:r,key:n}=e;return!r&&(n.type==="Identifier"&&n.name===t||n.type==="Literal"&&n.value===t)}I.parseExportAllDeclaration=function(e,t){if(this.options.ecmaVersion>=11)if(this.eatContextual("as"))e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart);else e.exported=null;if(this.expectContextual("from"),this.type!==h.string)this.unexpected();if(e.source=this.parseExprAtom(),this.options.ecmaVersion>=16)e.attributes=this.parseWithClause();return this.semicolon(),this.finishNode(e,"ExportAllDeclaration")};I.parseExport=function(e,t){if(this.next(),this.eat(h.star))return this.parseExportAllDeclaration(e,t);if(this.eat(h._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement()){if(e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration")this.checkVariableExport(t,e.declaration.declarations);else this.checkExport(t,e.declaration.id,e.declaration.id.start);if(e.specifiers=[],e.source=null,this.options.ecmaVersion>=16)e.attributes=[]}else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from")){if(this.type!==h.string)this.unexpected();if(e.source=this.parseExprAtom(),this.options.ecmaVersion>=16)e.attributes=this.parseWithClause()}else{for(var r=0,n=e.specifiers;r<n.length;r+=1){var i=n[r];if(this.checkUnreserved(i.local),this.checkLocalExport(i.local),i.local.type==="Literal")this.raise(i.local.start,"A string literal cannot be used as an exported binding without `from`.")}if(e.source=null,this.options.ecmaVersion>=16)e.attributes=[]}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")};I.parseExportDeclaration=function(e){return this.parseStatement(null)};I.parseExportDefaultDeclaration=function(){var e;if(this.type===h._function||(e=this.isAsyncFunction())){var t=this.startNode();if(this.next(),e)this.next();return this.parseFunction(t,Pt|rs,!1,e)}else if(this.type===h._class){var r=this.startNode();return this.parseClass(r,"nullableID")}else{var n=this.parseMaybeAssign();return this.semicolon(),n}};I.checkExport=function(e,t,r){if(!e)return;if(typeof t!=="string")t=t.type==="Identifier"?t.name:t.value;if(ot(e,t))this.raiseRecoverable(r,"Duplicate export '"+t+"'");e[t]=!0};I.checkPatternExport=function(e,t){var r=t.type;if(r==="Identifier")this.checkExport(e,t,t.start);else if(r==="ObjectPattern")for(var n=0,i=t.properties;n<i.length;n+=1){var o=i[n];this.checkPatternExport(e,o)}else if(r==="ArrayPattern")for(var a=0,p=t.elements;a<p.length;a+=1){var l=p[a];if(l)this.checkPatternExport(e,l)}else if(r==="Property")this.checkPatternExport(e,t.value);else if(r==="AssignmentPattern")this.checkPatternExport(e,t.left);else if(r==="RestElement")this.checkPatternExport(e,t.argument)};I.checkVariableExport=function(e,t){if(!e)return;for(var r=0,n=t;r<n.length;r+=1){var i=n[r];this.checkPatternExport(e,i.id)}};I.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()};I.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual("as")?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,"ExportSpecifier")};I.parseExportSpecifiers=function(e){var t=[],r=!0;this.expect(h.braceL);while(!this.eat(h.braceR)){if(!r){if(this.expect(h.comma),this.afterTrailingComma(h.braceR))break}else r=!1;t.push(this.parseExportSpecifier(e))}return t};I.parseImport=function(e){if(this.next(),this.type===h.string)e.specifiers=Lc,e.source=this.parseExprAtom();else e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===h.string?this.parseExprAtom():this.unexpected();if(this.options.ecmaVersion>=16)e.attributes=this.parseWithClause();return this.semicolon(),this.finishNode(e,"ImportDeclaration")};I.parseImportSpecifier=function(){var e=this.startNode();if(e.imported=this.parseModuleExportName(),this.eatContextual("as"))e.local=this.parseIdent();else this.checkUnreserved(e.imported),e.local=e.imported;return this.checkLValSimple(e.local,Ve),this.finishNode(e,"ImportSpecifier")};I.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,Ve),this.finishNode(e,"ImportDefaultSpecifier")};I.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,Ve),this.finishNode(e,"ImportNamespaceSpecifier")};I.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===h.name){if(e.push(this.parseImportDefaultSpecifier()),!this.eat(h.comma))return e}if(this.type===h.star)return e.push(this.parseImportNamespaceSpecifier()),e;this.expect(h.braceL);while(!this.eat(h.braceR)){if(!t){if(this.expect(h.comma),this.afterTrailingComma(h.braceR))break}else t=!1;e.push(this.parseImportSpecifier())}return e};I.parseWithClause=function(){var e=[];if(!this.eat(h._with))return e;this.expect(h.braceL);var t={},r=!0;while(!this.eat(h.braceR)){if(!r){if(this.expect(h.comma),this.afterTrailingComma(h.braceR))break}else r=!1;var n=this.parseImportAttribute(),i=n.key.type==="Identifier"?n.key.name:n.key.value;if(ot(t,i))this.raiseRecoverable(n.key.start,"Duplicate attribute key '"+i+"'");t[i]=!0,e.push(n)}return e};I.parseImportAttribute=function(){var e=this.startNode();if(e.key=this.type===h.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(h.colon),this.type!==h.string)this.unexpected();return e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")};I.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===h.string){var e=this.parseLiteral(this.value);if(kc.test(e.value))this.raise(e.start,"An export name cannot include a lone surrogate.");return e}return this.parseIdent(!0)};I.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)};I.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value==="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var Pe=ne.prototype;Pe.toAssignable=function(e,t,r){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":if(this.inAsync&&e.name==="await")this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":if(e.type="ObjectPattern",r)this.checkPatternErrors(r,!0);for(var n=0,i=e.properties;n<i.length;n+=1){var o=i[n];if(this.toAssignable(o,t),o.type==="RestElement"&&(o.argument.type==="ArrayPattern"||o.argument.type==="ObjectPattern"))this.raise(o.argument.start,"Unexpected token")}break;case"Property":if(e.kind!=="init")this.raise(e.key.start,"Object pattern can't contain getter or setter");this.toAssignable(e.value,t);break;case"ArrayExpression":if(e.type="ArrayPattern",r)this.checkPatternErrors(r,!0);this.toAssignableList(e.elements,t);break;case"SpreadElement":if(e.type="RestElement",this.toAssignable(e.argument,t),e.argument.type==="AssignmentPattern")this.raise(e.argument.start,"Rest elements cannot have a default value");break;case"AssignmentExpression":if(e.operator!=="=")this.raise(e.left.end,"Only '=' operator can be used for specifying default value.");e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,r);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue")}else if(r)this.checkPatternErrors(r,!0);return e};Pe.toAssignableList=function(e,t){var r=e.length;for(var n=0;n<r;n++){var i=e[n];if(i)this.toAssignable(i,t)}if(r){var o=e[r-1];if(this.options.ecmaVersion===6&&t&&o&&o.type==="RestElement"&&o.argument.type!=="Identifier")this.unexpected(o.argument.start)}return e};Pe.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,"SpreadElement")};Pe.parseRestBinding=function(){var e=this.startNode();if(this.next(),this.options.ecmaVersion===6&&this.type!==h.name)this.unexpected();return e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")};Pe.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case h.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(h.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case h.braceL:return this.parseObj(!0)}return this.parseIdent()};Pe.parseBindingList=function(e,t,r,n){var i=[],o=!0;while(!this.eat(e)){if(o)o=!1;else this.expect(h.comma);if(t&&this.type===h.comma)i.push(null);else if(r&&this.afterTrailingComma(e))break;else if(this.type===h.ellipsis){var a=this.parseRestBinding();if(this.parseBindingListItem(a),i.push(a),this.type===h.comma)this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");this.expect(e);break}else i.push(this.parseAssignableListItem(n))}return i};Pe.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t};Pe.parseBindingListItem=function(e){return e};Pe.parseMaybeDefault=function(e,t,r){if(r=r||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(h.eq))return r;var n=this.startNodeAt(e,t);return n.left=r,n.right=this.parseMaybeAssign(),this.finishNode(n,"AssignmentPattern")};Pe.checkLValSimple=function(e,t,r){if(t===void 0)t=Qt;var n=t!==Qt;switch(e.type){case"Identifier":if(this.strict&&this.reservedWordsStrictBind.test(e.name))this.raiseRecoverable(e.start,(n?"Binding ":"Assigning to ")+e.name+" in strict mode");if(n){if(t===Ve&&e.name==="let")this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name");if(r){if(ot(r,e.name))this.raiseRecoverable(e.start,"Argument name clash");r[e.name]=!0}if(t!==ts)this.declareName(e.name,t,e.start)}break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(n)this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":if(n)this.raiseRecoverable(e.start,"Binding parenthesized expression");return this.checkLValSimple(e.expression,t,r);default:this.raise(e.start,(n?"Binding":"Assigning to")+" rvalue")}};Pe.checkLValPattern=function(e,t,r){if(t===void 0)t=Qt;switch(e.type){case"ObjectPattern":for(var n=0,i=e.properties;n<i.length;n+=1){var o=i[n];this.checkLValInnerPattern(o,t,r)}break;case"ArrayPattern":for(var a=0,p=e.elements;a<p.length;a+=1){var l=p[a];if(l)this.checkLValInnerPattern(l,t,r)}break;default:this.checkLValSimple(e,t,r)}};Pe.checkLValInnerPattern=function(e,t,r){if(t===void 0)t=Qt;switch(e.type){case"Property":this.checkLValInnerPattern(e.value,t,r);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,r);break;case"RestElement":this.checkLValPattern(e.argument,t,r);break;default:this.checkLValPattern(e,t,r)}};var ve=function(t,r,n,i,o){this.token=t,this.isExpr=!!r,this.preserveSpace=!!n,this.override=i,this.generator=!!o},te={b_stat:new ve("{",!1),b_expr:new ve("{",!0),b_tmpl:new ve("${",!1),p_stat:new ve("(",!1),p_expr:new ve("(",!0),q_tmpl:new ve("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new ve("function",!1),f_expr:new ve("function",!0),f_expr_gen:new ve("function",!0,!1,null,!0),f_gen:new ve("function",!1,!1,null,!0)},ct=ne.prototype;ct.initialContext=function(){return[te.b_stat]};ct.curContext=function(){return this.context[this.context.length-1]};ct.braceIsBlock=function(e){var t=this.curContext();if(t===te.f_expr||t===te.f_stat)return!0;if(e===h.colon&&(t===te.b_stat||t===te.b_expr))return!t.isExpr;if(e===h._return||e===h.name&&this.exprAllowed)return de.test(this.input.slice(this.lastTokEnd,this.start));if(e===h._else||e===h.semi||e===h.eof||e===h.parenR||e===h.arrow)return!0;if(e===h.braceL)return t===te.b_stat;if(e===h._var||e===h._const||e===h.name)return!1;return!this.exprAllowed};ct.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token==="function")return t.generator}return!1};ct.updateContext=function(e){var t,r=this.type;if(r.keyword&&e===h.dot)this.exprAllowed=!1;else if(t=r.updateContext)t.call(this,e);else this.exprAllowed=r.beforeExpr};ct.overrideContext=function(e){if(this.curContext()!==e)this.context[this.context.length-1]=e};h.parenR.updateContext=h.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var e=this.context.pop();if(e===te.b_stat&&this.curContext().token==="function")e=this.context.pop();this.exprAllowed=!e.isExpr};h.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?te.b_stat:te.b_expr),this.exprAllowed=!0};h.dollarBraceL.updateContext=function(){this.context.push(te.b_tmpl),this.exprAllowed=!0};h.parenL.updateContext=function(e){var t=e===h._if||e===h._for||e===h._with||e===h._while;this.context.push(t?te.p_stat:te.p_expr),this.exprAllowed=!0};h.incDec.updateContext=function(){};h._function.updateContext=h._class.updateContext=function(e){if(e.beforeExpr&&e!==h._else&&!(e===h.semi&&this.curContext()!==te.p_stat)&&!(e===h._return&&de.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===h.colon||e===h.braceL)&&this.curContext()===te.b_stat))this.context.push(te.f_expr);else this.context.push(te.f_stat);this.exprAllowed=!1};h.colon.updateContext=function(){if(this.curContext().token==="function")this.context.pop();this.exprAllowed=!0};h.backQuote.updateContext=function(){if(this.curContext()===te.q_tmpl)this.context.pop();else this.context.push(te.q_tmpl);this.exprAllowed=!1};h.star.updateContext=function(e){if(e===h._function){var t=this.context.length-1;if(this.context[t]===te.f_expr)this.context[t]=te.f_expr_gen;else this.context[t]=te.f_gen}this.exprAllowed=!0};h.name.updateContext=function(e){var t=!1;if(this.options.ecmaVersion>=6&&e!==h.dot){if(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())t=!0}this.exprAllowed=t};var q=ne.prototype;q.checkPropClash=function(e,t,r){if(this.options.ecmaVersion>=9&&e.type==="SpreadElement")return;if(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))return;var n=e.key,i;switch(n.type){case"Identifier":i=n.name;break;case"Literal":i=String(n.value);break;default:return}var o=e.kind;if(this.options.ecmaVersion>=6){if(i==="__proto__"&&o==="init"){if(t.proto)if(r){if(r.doubleProto<0)r.doubleProto=n.start}else this.raiseRecoverable(n.start,"Redefinition of __proto__ property");t.proto=!0}return}i="$"+i;var a=t[i];if(a){var p;if(o==="init")p=this.strict&&a.init||a.get||a.set;else p=a.init||a[o];if(p)this.raiseRecoverable(n.start,"Redefinition of property")}else a=t[i]={init:!1,get:!1,set:!1};a[o]=!0};q.parseExpression=function(e,t){var r=this;return this.catchStackOverflow(function(){var{start:n,startLoc:i}=r,o=r.parseMaybeAssign(e,t);if(r.type===h.comma){var a=r.startNodeAt(n,i);a.expressions=[o];while(r.eat(h.comma))a.expressions.push(r.parseMaybeAssign(e,t));return r.finishNode(a,"SequenceExpression")}return o})};q.parseMaybeAssign=function(e,t,r){if(this.isContextual("yield"))if(this.inGenerator)return this.parseYield(e);else this.exprAllowed=!1;var n=!1,i=-1,o=-1,a=-1;if(t)i=t.parenthesizedAssign,o=t.trailingComma,a=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1;else t=new sr,n=!0;var p=this.start,l=this.startLoc;if(this.type===h.parenL||this.type===h.name)this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e==="await";var m=this.parseMaybeConditional(e,t);if(r)m=r.call(this,m,p,l);if(this.type.isAssign){var d=this.startNodeAt(p,l);if(d.operator=this.value,this.type===h.eq)m=this.toAssignable(m,!1,t);if(!n)t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1;if(t.shorthandAssign>=m.start)t.shorthandAssign=-1;if(this.type===h.eq)this.checkLValPattern(m);else this.checkLValSimple(m);if(d.left=m,this.next(),d.right=this.parseMaybeAssign(e),a>-1)t.doubleProto=a;return this.finishNode(d,"AssignmentExpression")}else if(n)this.checkExpressionErrors(t,!0);if(i>-1)t.parenthesizedAssign=i;if(o>-1)t.trailingComma=o;return m};q.parseMaybeConditional=function(e,t){var r=this.start,n=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if(!(i.type==="ArrowFunctionExpression"&&i.start===r)&&this.eat(h.question)){var o=this.startNodeAt(r,n);return o.test=i,o.consequent=this.parseMaybeAssign(),this.expect(h.colon),o.alternate=this.parseMaybeAssign(e),this.finishNode(o,"ConditionalExpression")}return i};q.parseExprOps=function(e,t){var r=this.start,n=this.startLoc,i=this.parseMaybeUnary(t,!1,!1,e);if(this.checkExpressionErrors(t))return i;return i.start===r&&i.type==="ArrowFunctionExpression"?i:this.parseExprOp(i,r,n,-1,e)};q.parseExprOp=function(e,t,r,n,i){var o=this.type.binop;if(o!=null&&(!i||this.type!==h._in)){if(o>n){var a=this.type===h.logicalOR||this.type===h.logicalAND,p=this.type===h.coalesce;if(p)o=h.logicalAND.binop;var l=this.value;this.next();var m=this.start,d=this.startLoc,b=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,i),m,d,o,i),T=this.buildBinary(t,r,e,b,l,a||p);if(a&&this.type===h.coalesce||p&&(this.type===h.logicalOR||this.type===h.logicalAND))this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses");return this.parseExprOp(T,t,r,n,i)}}return e};q.buildBinary=function(e,t,r,n,i,o){if(n.type==="PrivateIdentifier")this.raise(n.start,"Private identifier can only be left side of binary expression");var a=this.startNodeAt(e,t);return a.left=r,a.operator=i,a.right=n,this.finishNode(a,o?"LogicalExpression":"BinaryExpression")};q.parseMaybeUnary=function(e,t,r,n){var i=this.start,o=this.startLoc,a;if(this.isContextual("await")&&this.canAwait)a=this.parseAwait(n),t=!0;else if(this.type.prefix){var p=this.startNode(),l=this.type===h.incDec;if(p.operator=this.value,p.prefix=!0,this.next(),p.argument=this.parseMaybeUnary(null,!0,l,n),this.checkExpressionErrors(e,!0),l)this.checkLValSimple(p.argument);else if(this.strict&&p.operator==="delete"&&ns(p.argument))this.raiseRecoverable(p.start,"Deleting local variable in strict mode");else if(p.operator==="delete"&&Gr(p.argument))this.raiseRecoverable(p.start,"Private fields can not be deleted");else t=!0;a=this.finishNode(p,l?"UpdateExpression":"UnaryExpression")}else if(!t&&this.type===h.privateId){if((n||this.privateNameStack.length===0)&&this.options.checkPrivateFields)this.unexpected();if(a=this.parsePrivateIdent(),this.type!==h._in)this.unexpected()}else{if(a=this.parseExprSubscripts(e,n),this.checkExpressionErrors(e))return a;while(this.type.postfix&&!this.canInsertSemicolon()){var m=this.startNodeAt(i,o);m.operator=this.value,m.prefix=!1,m.argument=a,this.checkLValSimple(a),this.next(),a=this.finishNode(m,"UpdateExpression")}}if(!r&&!(a.type==="ArrowFunctionExpression"&&a.start===i)&&this.eat(h.starstar))if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(i,o,a,this.parseMaybeUnary(null,!1,!1,n),"**",!1);else return a};function ns(e){return e.type==="Identifier"||e.type==="ParenthesizedExpression"&&ns(e.expression)}function Gr(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&Gr(e.expression)||e.type==="ParenthesizedExpression"&&Gr(e.expression)}q.parseExprSubscripts=function(e,t){var r=this.start,n=this.startLoc,i=this.parseExprAtom(e,t);if(i.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return i;var o=this.parseSubscripts(i,r,n,!1,t);if(e&&o.type==="MemberExpression"){if(e.parenthesizedAssign>=o.start)e.parenthesizedAssign=-1;if(e.parenthesizedBind>=o.start)e.parenthesizedBind=-1;if(e.trailingComma>=o.start)e.trailingComma=-1}return o};q.parseSubscripts=function(e,t,r,n,i){var o=this.options.ecmaVersion>=8&&e.type==="Identifier"&&e.name==="async"&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start,a=!1;while(!0){var p=this.parseSubscript(e,t,r,n,o,a,i);if(p.optional)a=!0;if(p===e||p.type==="ArrowFunctionExpression"){if(a){var l=this.startNodeAt(t,r);l.expression=p,p=this.finishNode(l,"ChainExpression")}return p}e=p}};q.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(h.arrow)};q.parseSubscriptAsyncArrow=function(e,t,r,n){return this.parseArrowExpression(this.startNodeAt(e,t),r,!0,n)};q.parseSubscript=function(e,t,r,n,i,o,a){var p=this.options.ecmaVersion>=11,l=p&&this.eat(h.questionDot);if(n&&l)this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var m=this.eat(h.bracketL);if(m||l&&this.type!==h.parenL&&this.type!==h.backQuote||this.eat(h.dot)){var d=this.startNodeAt(t,r);if(d.object=e,m)d.property=this.parseExpression(),this.expect(h.bracketR);else if(this.type===h.privateId&&e.type!=="Super")d.property=this.parsePrivateIdent();else d.property=this.parseIdent(this.options.allowReserved!=="never");if(d.computed=!!m,p)d.optional=l;e=this.finishNode(d,"MemberExpression")}else if(!n&&this.eat(h.parenL)){var b=new sr,T=this.yieldPos,E=this.awaitPos,k=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var B=this.parseExprList(h.parenR,this.options.ecmaVersion>=8,!1,b);if(i&&!l&&this.shouldParseAsyncArrow()){if(this.checkPatternErrors(b,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0)this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function");return this.yieldPos=T,this.awaitPos=E,this.awaitIdentPos=k,this.parseSubscriptAsyncArrow(t,r,B,a)}this.checkExpressionErrors(b,!0),this.yieldPos=T||this.yieldPos,this.awaitPos=E||this.awaitPos,this.awaitIdentPos=k||this.awaitIdentPos;var C=this.startNodeAt(t,r);if(C.callee=e,C.arguments=B,p)C.optional=l;e=this.finishNode(C,"CallExpression")}else if(this.type===h.backQuote){if(l||o)this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var V=this.startNodeAt(t,r);V.tag=e,V.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(V,"TaggedTemplateExpression")}return e};q.parseExprAtom=function(e,t,r){if(this.type===h.slash)this.readRegexp();var n,i=this.potentialArrowAt===this.start;switch(this.type){case h._super:if(!this.allowSuper)this.raise(this.start,"'super' keyword outside a method");if(n=this.startNode(),this.next(),this.type===h.parenL&&!this.allowDirectSuper)this.raise(n.start,"super() call outside constructor of a subclass");if(this.type!==h.dot&&this.type!==h.bracketL&&this.type!==h.parenL)this.unexpected();return this.finishNode(n,"Super");case h._this:return n=this.startNode(),this.next(),this.finishNode(n,"ThisExpression");case h.name:var o=this.start,a=this.startLoc,p=this.containsEsc,l=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!p&&l.name==="async"&&!this.canInsertSemicolon()&&this.eat(h._function))return this.overrideContext(te.f_expr),this.parseFunction(this.startNodeAt(o,a),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(h.arrow))return this.parseArrowExpression(this.startNodeAt(o,a),[l],!1,t);if(this.options.ecmaVersion>=8&&l.name==="async"&&this.type===h.name&&!p&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc)){if(l=this.parseIdent(!1),this.canInsertSemicolon()||!this.eat(h.arrow))this.unexpected();return this.parseArrowExpression(this.startNodeAt(o,a),[l],!0,t)}}return l;case h.regexp:var m=this.value;return n=this.parseLiteral(m.value),n.regex={pattern:m.pattern,flags:m.flags},n;case h.num:case h.string:return this.parseLiteral(this.value);case h._null:case h._true:case h._false:return n=this.startNode(),n.value=this.type===h._null?null:this.type===h._true,n.raw=this.type.keyword,this.next(),this.finishNode(n,"Literal");case h.parenL:var d=this.start,b=this.parseParenAndDistinguishExpression(i,t);if(e){if(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(b))e.parenthesizedAssign=d;if(e.parenthesizedBind<0)e.parenthesizedBind=d}return b;case h.bracketL:return n=this.startNode(),this.next(),n.elements=this.parseExprList(h.bracketR,!0,!0,e),this.finishNode(n,"ArrayExpression");case h.braceL:return this.overrideContext(te.b_expr),this.parseObj(!1,e);case h._function:return n=this.startNode(),this.next(),this.parseFunction(n,0);case h._class:return this.parseClass(this.startNode(),!1);case h._new:return this.parseNew();case h.backQuote:return this.parseTemplate();case h._import:if(this.options.ecmaVersion>=11)return this.parseExprImport(r);else return this.unexpected();default:return this.parseExprAtomDefault()}};q.parseExprAtomDefault=function(){this.unexpected()};q.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword import");if(this.next(),this.type===h.parenL&&!e)return this.parseDynamicImport(t);else if(this.type===h.dot){var r=this.startNodeAt(t.start,t.loc&&t.loc.start);return r.name="import",t.meta=this.finishNode(r,"Identifier"),this.parseImportMeta(t)}else this.unexpected()};q.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)if(!this.eat(h.parenR))if(this.expect(h.comma),!this.afterTrailingComma(h.parenR)){if(e.options=this.parseMaybeAssign(),!this.eat(h.parenR)){if(this.expect(h.comma),!this.afterTrailingComma(h.parenR))this.unexpected()}}else e.options=null;else e.options=null;else if(!this.eat(h.parenR)){var t=this.start;if(this.eat(h.comma)&&this.eat(h.parenR))this.raiseRecoverable(t,"Trailing comma is not allowed in import()");else this.unexpected(t)}return this.finishNode(e,"ImportExpression")};q.parseImportMeta=function(e){this.next();var t=this.containsEsc;if(e.property=this.parseIdent(!0),e.property.name!=="meta")this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'");if(t)this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters");if(this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere)this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module");return this.finishNode(e,"MetaProperty")};q.parseLiteral=function(e){var t=this.startNode();if(t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110)t.bigint=t.value!=null?t.value.toString():t.raw.slice(0,-1).replace(/_/g,"");return this.next(),this.finishNode(t,"Literal")};q.parseParenExpression=function(){this.expect(h.parenL);var e=this.parseExpression();return this.expect(h.parenR),e};q.shouldParseArrow=function(e){return!this.canInsertSemicolon()};q.parseParenAndDistinguishExpression=function(e,t){var r=this.start,n=this.startLoc,i,o=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var a=this.start,p=this.startLoc,l=[],m=!0,d=!1,b=new sr,T=this.yieldPos,E=this.awaitPos,k;this.yieldPos=0,this.awaitPos=0;while(this.type!==h.parenR)if(m?m=!1:this.expect(h.comma),o&&this.afterTrailingComma(h.parenR,!0)){d=!0;break}else if(this.type===h.ellipsis){if(k=this.start,l.push(this.parseParenItem(this.parseRestBinding())),this.type===h.comma)this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else l.push(this.parseMaybeAssign(!1,b,this.parseParenItem));var B=this.lastTokEnd,C=this.lastTokEndLoc;if(this.expect(h.parenR),e&&this.shouldParseArrow(l)&&this.eat(h.arrow))return this.checkPatternErrors(b,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=T,this.awaitPos=E,this.parseParenArrowList(r,n,l,t);if(!l.length||d)this.unexpected(this.lastTokStart);if(k)this.unexpected(k);if(this.checkExpressionErrors(b,!0),this.yieldPos=T||this.yieldPos,this.awaitPos=E||this.awaitPos,l.length>1)i=this.startNodeAt(a,p),i.expressions=l,this.finishNodeAt(i,"SequenceExpression",B,C);else i=l[0]}else i=this.parseParenExpression();if(this.options.preserveParens){var V=this.startNodeAt(r,n);return V.expression=i,this.finishNode(V,"ParenthesizedExpression")}else return i};q.parseParenItem=function(e){return e};q.parseParenArrowList=function(e,t,r,n){return this.parseArrowExpression(this.startNodeAt(e,t),r,!1,n)};var Rc=[];q.parseNew=function(){if(this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===h.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var r=this.containsEsc;if(e.property=this.parseIdent(!0),e.property.name!=="target")this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'");if(r)this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters");if(!this.allowNewDotTarget)this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block");return this.finishNode(e,"MetaProperty")}var n=this.start,i=this.startLoc;if(e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),n,i,!0,!1),e.callee.type==="Super")this.raiseRecoverable(n,"Invalid use of 'super'");if(this.eat(h.parenL))e.arguments=this.parseExprList(h.parenR,this.options.ecmaVersion>=8,!1);else e.arguments=Rc;return this.finishNode(e,"NewExpression")};q.parseTemplateElement=function(e){var t=e.isTagged,r=this.startNode();if(this.type===h.invalidTemplate){if(!t)this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal");r.value={raw:this.value.replace(/\r\n?/g,`
|
|
19
21
|
`),cooked:null}}else r.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
|
|
20
|
-
`),cooked:this.value};return this.next(),r.tail=this.type===d.backQuote,this.finishNode(r,"TemplateElement")};q.parseTemplate=function(e){if(e===void 0)e={};var t=e.isTagged;if(t===void 0)t=!1;var r=this.startNode();this.next(),r.expressions=[];var n=this.parseTemplateElement({isTagged:t});r.quasis=[n];while(!n.tail){if(this.type===d.eof)this.raise(this.pos,"Unterminated template literal");this.expect(d.dollarBraceL),r.expressions.push(this.parseExpression()),this.expect(d.braceR),r.quasis.push(n=this.parseTemplateElement({isTagged:t}))}return this.next(),this.finishNode(r,"TemplateLiteral")};q.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===d.name||this.type===d.num||this.type===d.string||this.type===d.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===d.star)&&!de.test(this.input.slice(this.lastTokEnd,this.start))};q.parseObj=function(e,t){var r=this.startNode(),n=!0,i={};r.properties=[],this.next();while(!this.eat(d.braceR)){if(!n){if(this.expect(d.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(d.braceR))break}else n=!1;var o=this.parseProperty(e,t);if(!e)this.checkPropClash(o,i,t);r.properties.push(o)}return this.finishNode(r,e?"ObjectPattern":"ObjectExpression")};q.parseProperty=function(e,t){var r=this.startNode(),n,i,o,a;if(this.options.ecmaVersion>=9&&this.eat(d.ellipsis)){if(e){if(r.argument=this.parseIdent(!1),this.type===d.comma)this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");return this.finishNode(r,"RestElement")}if(r.argument=this.parseMaybeAssign(!1,t),this.type===d.comma&&t&&t.trailingComma<0)t.trailingComma=this.start;return this.finishNode(r,"SpreadElement")}if(this.options.ecmaVersion>=6){if(r.method=!1,r.shorthand=!1,e||t)o=this.start,a=this.startLoc;if(!e)n=this.eat(d.star)}var p=this.containsEsc;if(this.parsePropertyName(r),!e&&!p&&this.options.ecmaVersion>=8&&!n&&this.isAsyncProp(r))i=!0,n=this.options.ecmaVersion>=9&&this.eat(d.star),this.parsePropertyName(r);else i=!1;return this.parsePropertyValue(r,e,n,i,o,a,t,p),this.finishNode(r,"Property")};q.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var r=e.kind==="get"?0:1;if(e.value.params.length!==r){var n=e.value.start;if(e.kind==="get")this.raiseRecoverable(n,"getter should have no params");else this.raiseRecoverable(n,"setter should have exactly one param")}else if(e.kind==="set"&&e.value.params[0].type==="RestElement")this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};q.parsePropertyValue=function(e,t,r,n,i,o,a,p){if((r||n)&&this.type===d.colon)this.unexpected();if(this.eat(d.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,a),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===d.parenL){if(t)this.unexpected();e.method=!0,e.value=this.parseMethod(r,n),e.kind="init"}else if(!t&&!p&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&(this.type!==d.comma&&this.type!==d.braceR&&this.type!==d.eq)){if(r||n)this.unexpected();this.parseGetterSetter(e)}else if(this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"){if(r||n)this.unexpected();if(this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos)this.awaitIdentPos=i;if(t)e.value=this.parseMaybeDefault(i,o,this.copyNode(e.key));else if(this.type===d.eq&&a){if(a.shorthandAssign<0)a.shorthandAssign=this.start;e.value=this.parseMaybeDefault(i,o,this.copyNode(e.key))}else e.value=this.copyNode(e.key);e.kind="init",e.shorthand=!0}else this.unexpected()};q.parsePropertyName=function(e){if(this.options.ecmaVersion>=6)if(this.eat(d.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(d.bracketR),e.key;else e.computed=!1;return e.key=this.type===d.num||this.type===d.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};q.initFunction=function(e){if(e.id=null,this.options.ecmaVersion>=6)e.generator=e.expression=!1;if(this.options.ecmaVersion>=8)e.async=!1};q.parseMethod=function(e,t,r){var n=this.startNode(),i=this.yieldPos,o=this.awaitPos,a=this.awaitIdentPos;if(this.initFunction(n),this.options.ecmaVersion>=6)n.generator=e;if(this.options.ecmaVersion>=8)n.async=!!t;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Jr(t,n.generator)|nr|(r?Ui:0)),this.expect(d.parenL),n.params=this.parseBindingList(d.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(n,!1,!0,!1),this.yieldPos=i,this.awaitPos=o,this.awaitIdentPos=a,this.finishNode(n,"FunctionExpression")};q.parseArrowExpression=function(e,t,r,n){var i=this.yieldPos,o=this.awaitPos,a=this.awaitIdentPos;if(this.enterScope(Jr(r,!1)|Xr),this.initFunction(e),this.options.ecmaVersion>=8)e.async=!!r;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,n),this.yieldPos=i,this.awaitPos=o,this.awaitIdentPos=a,this.finishNode(e,"ArrowFunctionExpression")};q.parseFunctionBody=function(e,t,r,n){var i=t&&this.type!==d.braceL,o=this.strict,a=!1;if(i)e.body=this.parseMaybeAssign(n),e.expression=!0,this.checkParams(e,!1);else{var p=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);if(!o||p){if(a=this.strictDirective(this.end),a&&p)this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list")}var u=this.labels;if(this.labels=[],a)this.strict=!0;if(this.checkParams(e,!o&&!a&&!t&&!r&&this.isSimpleParamList(e.params)),this.strict&&e.id)this.checkLValSimple(e.id,zi);e.body=this.parseBlock(!1,void 0,a&&!o),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=u}this.exitScope()};q.isSimpleParamList=function(e){for(var t=0,r=e;t<r.length;t+=1){var n=r[t];if(n.type!=="Identifier")return!1}return!0};q.checkParams=function(e,t){var r=Object.create(null);for(var n=0,i=e.params;n<i.length;n+=1){var o=i[n];this.checkLValInnerPattern(o,Yr,t?null:r)}};q.parseExprList=function(e,t,r,n){var i=[],o=!0;while(!this.eat(e)){if(!o){if(this.expect(d.comma),t&&this.afterTrailingComma(e))break}else o=!1;var a=void 0;if(r&&this.type===d.comma)a=null;else if(this.type===d.ellipsis){if(a=this.parseSpread(n),n&&this.type===d.comma&&n.trailingComma<0)n.trailingComma=this.start}else a=this.parseMaybeAssign(!1,n);i.push(a)}return i};q.checkUnreserved=function(e){var{start:t,end:r,name:n}=e;if(this.inGenerator&&n==="yield")this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator");if(this.inAsync&&n==="await")this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function");if(!(this.currentThisScope().flags&ir)&&n==="arguments")this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer");if(this.inClassStaticBlock&&(n==="arguments"||n==="await"))this.raise(t,"Cannot use "+n+" in class static initialization block");if(this.keywords.test(n))this.raise(t,"Unexpected keyword '"+n+"'");if(this.options.ecmaVersion<6&&this.input.slice(t,r).indexOf("\\")!==-1)return;var i=this.strict?this.reservedWordsStrict:this.reservedWords;if(i.test(n)){if(!this.inAsync&&n==="await")this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function");this.raiseRecoverable(t,"The keyword '"+n+"' is reserved")}};q.parseIdent=function(e){var t=this.parseIdentNode();if(this.next(!!e),this.finishNode(t,"Identifier"),!e){if(this.checkUnreserved(t),t.name==="await"&&!this.awaitIdentPos)this.awaitIdentPos=t.start}return t};q.parseIdentNode=function(){var e=this.startNode();if(this.type===d.name)e.name=this.value;else if(this.type.keyword){if(e.name=this.type.keyword,(e.name==="class"||e.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46))this.context.pop();this.type=d.name}else this.unexpected();return e};q.parsePrivateIdent=function(){var e=this.startNode();if(this.type===d.privateId)e.name=this.value;else this.unexpected();if(this.next(),this.finishNode(e,"PrivateIdentifier"),this.options.checkPrivateFields)if(this.privateNameStack.length===0)this.raise(e.start,"Private field '#"+e.name+"' must be declared in an enclosing class");else this.privateNameStack[this.privateNameStack.length-1].used.push(e);return e};q.parseYield=function(e){if(!this.yieldPos)this.yieldPos=this.start;var t=this.startNode();if(this.next(),this.type===d.semi||this.canInsertSemicolon()||this.type!==d.star&&!this.type.startsExpr)t.delegate=!1,t.argument=null;else t.delegate=this.eat(d.star),t.argument=this.parseMaybeAssign(e);return this.finishNode(t,"YieldExpression")};q.parseAwait=function(e){if(!this.awaitPos)this.awaitPos=this.start;var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,"AwaitExpression")};var er=ne.prototype;er.raise=function(e,t){var r=Kr(this.input,e);if(t+=" ("+r.line+":"+r.column+")",this.sourceFile)t+=" in "+this.sourceFile;var n=SyntaxError(t);throw n.pos=e,n.loc=r,n.raisedAt=this.pos,n};er.raiseRecoverable=er.raise;er.curPosition=function(){if(this.options.locations)return new st(this.curLine,this.pos-this.lineStart)};var Ue=ne.prototype,_c=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[]};Ue.enterScope=function(e){this.scopeStack.push(new _c(e))};Ue.exitScope=function(){this.scopeStack.pop()};Ue.treatFunctionsAsVarInScope=function(e){return e.flags&Ze||!this.inModule&&e.flags&Ye};Ue.declareName=function(e,t,r){var n=!1;if(t===Ve){var i=this.currentScope();if(n=i.lexical.indexOf(e)>-1||i.functions.indexOf(e)>-1||i.var.indexOf(e)>-1,i.lexical.push(e),this.inModule&&i.flags&Ye)delete this.undefinedExports[e]}else if(t===Ki){var o=this.currentScope();o.lexical.push(e)}else if(t===Wi){var a=this.currentScope();if(this.treatFunctionsAsVar)n=a.lexical.indexOf(e)>-1;else n=a.lexical.indexOf(e)>-1||a.var.indexOf(e)>-1;a.functions.push(e)}else for(var p=this.scopeStack.length-1;p>=0;--p){var u=this.scopeStack[p];if(u.lexical.indexOf(e)>-1&&!(u.flags&Hi&&u.lexical[0]===e)||!this.treatFunctionsAsVarInScope(u)&&u.functions.indexOf(e)>-1){n=!0;break}if(u.var.push(e),this.inModule&&u.flags&Ye)delete this.undefinedExports[e];if(u.flags&ir)break}if(n)this.raiseRecoverable(r,"Identifier '"+e+"' has already been declared")};Ue.checkLocalExport=function(e){if(this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1)this.undefinedExports[e.name]=e};Ue.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};Ue.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(ir|At|et))return t}};Ue.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(ir|At|et)&&!(t.flags&Xr))return t}};var kt=function(t,r,n){if(this.type="",this.start=r,this.end=0,t.options.locations)this.loc=new Pt(t,n);if(t.options.directSourceFile)this.sourceFile=t.options.directSourceFile;if(t.options.ranges)this.range=[r,0]},wt=ne.prototype;wt.startNode=function(){return new kt(this,this.start,this.startLoc)};wt.startNodeAt=function(e,t){return new kt(this,e,t)};function Yi(e,t,r,n){if(e.type=t,e.end=r,this.options.locations)e.loc.end=n;if(this.options.ranges)e.range[1]=r;return e}wt.finishNode=function(e,t){return Yi.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};wt.finishNodeAt=function(e,t,r,n){return Yi.call(this,e,t,r,n)};wt.copyNode=function(e){var t=new kt(this,e.start,this.startLoc);for(var r in e)t[r]=e[r];return t};var Ic="Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz",Qi="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",Zi=Qi+" Extended_Pictographic",es=Zi,ts=es+" EBase EComp EMod EPres ExtPict",rs=ts,Dc=rs,Lc={9:Qi,10:Zi,11:es,12:ts,13:rs,14:Dc},Rc="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",Mc={9:"",10:"",11:"",12:"",13:"",14:Rc},Mi="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",ns="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",is=ns+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",ss=is+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",as=ss+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",os=as+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Oc=os+" "+Ic,Bc={9:ns,10:is,11:ss,12:as,13:os,14:Oc},cs={};function Fc(e){var t=cs[e]={binary:He(Lc[e]+" "+Mi),binaryOfStrings:He(Mc[e]),nonBinary:{General_Category:He(Mi),Script:He(Bc[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(St=0,Jt=[9,10,11,12,13,14];St<Jt.length;St+=1)Gr=Jt[St],Fc(Gr);var Gr,St,Jt,N=ne.prototype,tr=function(t,r){this.parent=t,this.base=r||this};tr.prototype.separatedFrom=function(t){for(var r=this;r;r=r.parent)for(var n=t;n;n=n.parent)if(r.base===n.base&&r!==n)return!0;return!1};tr.prototype.sibling=function(){return new tr(this.parent,this.base)};var Re=function(t){this.parser=t,this.validFlags="gim"+(t.options.ecmaVersion>=6?"uy":"")+(t.options.ecmaVersion>=9?"s":"")+(t.options.ecmaVersion>=13?"d":"")+(t.options.ecmaVersion>=15?"v":""),this.unicodeProperties=cs[t.options.ecmaVersion>=14?14:t.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};Re.prototype.reset=function(t,r,n){var i=n.indexOf("v")!==-1,o=n.indexOf("u")!==-1;if(this.start=t|0,this.source=r+"",this.flags=n,i&&this.parser.options.ecmaVersion>=15)this.switchU=!0,this.switchV=!0,this.switchN=!0;else this.switchU=o&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=o&&this.parser.options.ecmaVersion>=9};Re.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)};Re.prototype.at=function(t,r){if(r===void 0)r=!1;var n=this.source,i=n.length;if(t>=i)return-1;var o=n.charCodeAt(t);if(!(r||this.switchU)||o<=55295||o>=57344||t+1>=i)return o;var a=n.charCodeAt(t+1);return a>=56320&&a<=57343?(o<<10)+a-56613888:o};Re.prototype.nextIndex=function(t,r){if(r===void 0)r=!1;var n=this.source,i=n.length;if(t>=i)return i;var o=n.charCodeAt(t),a;if(!(r||this.switchU)||o<=55295||o>=57344||t+1>=i||(a=n.charCodeAt(t+1))<56320||a>57343)return t+1;return t+2};Re.prototype.current=function(t){if(t===void 0)t=!1;return this.at(this.pos,t)};Re.prototype.lookahead=function(t){if(t===void 0)t=!1;return this.at(this.nextIndex(this.pos,t),t)};Re.prototype.advance=function(t){if(t===void 0)t=!1;this.pos=this.nextIndex(this.pos,t)};Re.prototype.eat=function(t,r){if(r===void 0)r=!1;if(this.current(r)===t)return this.advance(r),!0;return!1};Re.prototype.eatChars=function(t,r){if(r===void 0)r=!1;var n=this.pos;for(var i=0,o=t;i<o.length;i+=1){var a=o[i],p=this.at(n,r);if(p===-1||p!==a)return!1;n=this.nextIndex(n,r)}return this.pos=n,!0};N.validateRegExpFlags=function(e){var{validFlags:t,flags:r}=e,n=!1,i=!1;for(var o=0;o<r.length;o++){var a=r.charAt(o);if(t.indexOf(a)===-1)this.raise(e.start,"Invalid regular expression flag");if(r.indexOf(a,o+1)>-1)this.raise(e.start,"Duplicate regular expression flag");if(a==="u")n=!0;if(a==="v")i=!0}if(this.options.ecmaVersion>=15&&n&&i)this.raise(e.start,"Invalid regular expression flag")};function Vc(e){for(var t in e)return!0;return!1}N.validateRegExpPattern=function(e){if(this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&Vc(e.groupNames))e.switchN=!0,this.regexp_pattern(e)};N.regexp_pattern=function(e){if(e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames=Object.create(null),e.backReferenceNames.length=0,e.branchID=null,this.regexp_disjunction(e),e.pos!==e.source.length){if(e.eat(41))e.raise("Unmatched ')'");if(e.eat(93)||e.eat(125))e.raise("Lone quantifier brackets")}if(e.maxBackReference>e.numCapturingParens)e.raise("Invalid escape");for(var t=0,r=e.backReferenceNames;t<r.length;t+=1){var n=r[t];if(!e.groupNames[n])e.raise("Invalid named capture referenced")}};N.regexp_disjunction=function(e){var t=this.options.ecmaVersion>=16;if(t)e.branchID=new tr(e.branchID,null);this.regexp_alternative(e);while(e.eat(124)){if(t)e.branchID=e.branchID.sibling();this.regexp_alternative(e)}if(t)e.branchID=e.branchID.parent;if(this.regexp_eatQuantifier(e,!0))e.raise("Nothing to repeat");if(e.eat(123))e.raise("Lone quantifier brackets")};N.regexp_alternative=function(e){while(e.pos<e.source.length&&this.regexp_eatTerm(e));};N.regexp_eatTerm=function(e){if(this.regexp_eatAssertion(e)){if(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)){if(e.switchU)e.raise("Invalid quantifier")}return!0}if(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))return this.regexp_eatQuantifier(e),!0;return!1};N.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var r=!1;if(this.options.ecmaVersion>=9)r=e.eat(60);if(e.eat(61)||e.eat(33)){if(this.regexp_disjunction(e),!e.eat(41))e.raise("Unterminated group");return e.lastAssertionIsQuantifiable=!r,!0}}return e.pos=t,!1};N.regexp_eatQuantifier=function(e,t){if(t===void 0)t=!1;if(this.regexp_eatQuantifierPrefix(e,t))return e.eat(63),!0;return!1};N.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)};N.regexp_eatBracedQuantifier=function(e,t){var r=e.pos;if(e.eat(123)){var n=0,i=-1;if(this.regexp_eatDecimalDigits(e)){if(n=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e))i=e.lastIntValue;if(e.eat(125)){if(i!==-1&&i<n&&!t)e.raise("numbers out of order in {} quantifier");return!0}}if(e.switchU&&!t)e.raise("Incomplete quantifier");e.pos=r}return!1};N.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)};N.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1};N.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)){if(this.options.ecmaVersion>=16){var r=this.regexp_eatModifiers(e),n=e.eat(45);if(r||n){for(var i=0;i<r.length;i++){var o=r.charAt(i);if(r.indexOf(o,i+1)>-1)e.raise("Duplicate regular expression modifiers")}if(n){var a=this.regexp_eatModifiers(e);if(!r&&!a&&e.current()===58)e.raise("Invalid regular expression modifiers");for(var p=0;p<a.length;p++){var u=a.charAt(p);if(a.indexOf(u,p+1)>-1||r.indexOf(u)>-1)e.raise("Duplicate regular expression modifiers")}}}}if(e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}}e.pos=t}return!1};N.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9)this.regexp_groupSpecifier(e);else if(e.current()===63)e.raise("Invalid group");if(this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1};N.regexp_eatModifiers=function(e){var t="",r=0;while((r=e.current())!==-1&&jc(r))t+=Be(r),e.advance();return t};function jc(e){return e===105||e===109||e===115}N.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)};N.regexp_eatInvalidBracedQuantifier=function(e){if(this.regexp_eatBracedQuantifier(e,!0))e.raise("Nothing to repeat");return!1};N.regexp_eatSyntaxCharacter=function(e){var t=e.current();if(ps(t))return e.lastIntValue=t,e.advance(),!0;return!1};function ps(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}N.regexp_eatPatternCharacters=function(e){var t=e.pos,r=0;while((r=e.current())!==-1&&!ps(r))e.advance();return e.pos!==t};N.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();if(t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124)return e.advance(),!0;return!1};N.regexp_groupSpecifier=function(e){if(e.eat(63)){if(!this.regexp_eatGroupName(e))e.raise("Invalid group");var t=this.options.ecmaVersion>=16,r=e.groupNames[e.lastStringValue];if(r)if(t)for(var n=0,i=r;n<i.length;n+=1){var o=i[n];if(!o.separatedFrom(e.branchID))e.raise("Duplicate capture group name")}else e.raise("Duplicate capture group name");if(t)(r||(e.groupNames[e.lastStringValue]=[])).push(e.branchID);else e.groupNames[e.lastStringValue]=!0}};N.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1};N.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){e.lastStringValue+=Be(e.lastIntValue);while(this.regexp_eatRegExpIdentifierPart(e))e.lastStringValue+=Be(e.lastIntValue);return!0}return!1};N.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,r=this.options.ecmaVersion>=11,n=e.current(r);if(e.advance(r),n===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,r))n=e.lastIntValue;if($c(n))return e.lastIntValue=n,!0;return e.pos=t,!1};function $c(e){return he(e,!0)||e===36||e===95}N.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,r=this.options.ecmaVersion>=11,n=e.current(r);if(e.advance(r),n===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,r))n=e.lastIntValue;if(qc(n))return e.lastIntValue=n,!0;return e.pos=t,!1};function qc(e){return ye(e,!0)||e===36||e===95||e===8204||e===8205}N.regexp_eatAtomEscape=function(e){if(this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e))return!0;if(e.switchU){if(e.current()===99)e.raise("Invalid unicode escape");e.raise("Invalid escape")}return!1};N.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var r=e.lastIntValue;if(e.switchU){if(r>e.maxBackReference)e.maxBackReference=r;return!0}if(r<=e.numCapturingParens)return!0;e.pos=t}return!1};N.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1};N.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)};N.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1};N.regexp_eatZero=function(e){if(e.current()===48&&!ar(e.lookahead()))return e.lastIntValue=0,e.advance(),!0;return!1};N.regexp_eatControlEscape=function(e){var t=e.current();if(t===116)return e.lastIntValue=9,e.advance(),!0;if(t===110)return e.lastIntValue=10,e.advance(),!0;if(t===118)return e.lastIntValue=11,e.advance(),!0;if(t===102)return e.lastIntValue=12,e.advance(),!0;if(t===114)return e.lastIntValue=13,e.advance(),!0;return!1};N.regexp_eatControlLetter=function(e){var t=e.current();if(ls(t))return e.lastIntValue=t%32,e.advance(),!0;return!1};function ls(e){return e>=65&&e<=90||e>=97&&e<=122}N.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){if(t===void 0)t=!1;var r=e.pos,n=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var i=e.lastIntValue;if(n&&i>=55296&&i<=56319){var o=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var a=e.lastIntValue;if(a>=56320&&a<=57343)return e.lastIntValue=(i-55296)*1024+(a-56320)+65536,!0}e.pos=o,e.lastIntValue=i}return!0}if(n&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&Hc(e.lastIntValue))return!0;if(n)e.raise("Invalid unicode escape");e.pos=r}return!1};function Hc(e){return e>=0&&e<=1114111}N.regexp_eatIdentityEscape=function(e){if(e.switchU){if(this.regexp_eatSyntaxCharacter(e))return!0;if(e.eat(47))return e.lastIntValue=47,!0;return!1}var t=e.current();if(t!==99&&(!e.switchN||t!==107))return e.lastIntValue=t,e.advance(),!0;return!1};N.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1};var us=0,Fe=1,Ce=2;N.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(Uc(t))return e.lastIntValue=-1,e.advance(),Fe;var r=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((r=t===80)||t===112)){e.lastIntValue=-1,e.advance();var n;if(e.eat(123)&&(n=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125)){if(r&&n===Ce)e.raise("Invalid property name");return n}e.raise("Invalid property name")}return us};function Uc(e){return e===100||e===68||e===115||e===83||e===119||e===87}N.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var r=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var n=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,r,n),Fe}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i)}return us};N.regexp_validateUnicodePropertyNameAndValue=function(e,t,r){if(!at(e.unicodeProperties.nonBinary,t))e.raise("Invalid property name");if(!e.unicodeProperties.nonBinary[t].test(r))e.raise("Invalid property value")};N.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return Fe;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return Ce;e.raise("Invalid property name")};N.regexp_eatUnicodePropertyName=function(e){var t=0;e.lastStringValue="";while(hs(t=e.current()))e.lastStringValue+=Be(t),e.advance();return e.lastStringValue!==""};function hs(e){return ls(e)||e===95}N.regexp_eatUnicodePropertyValue=function(e){var t=0;e.lastStringValue="";while(Gc(t=e.current()))e.lastStringValue+=Be(t),e.advance();return e.lastStringValue!==""};function Gc(e){return hs(e)||ar(e)}N.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)};N.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),r=this.regexp_classContents(e);if(!e.eat(93))e.raise("Unterminated character class");if(t&&r===Ce)e.raise("Negated character class may contain strings");return!0}return!1};N.regexp_classContents=function(e){if(e.current()===93)return Fe;if(e.switchV)return this.regexp_classSetExpression(e);return this.regexp_nonEmptyClassRanges(e),Fe};N.regexp_nonEmptyClassRanges=function(e){while(this.regexp_eatClassAtom(e)){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var r=e.lastIntValue;if(e.switchU&&(t===-1||r===-1))e.raise("Invalid character class");if(t!==-1&&r!==-1&&t>r)e.raise("Range out of order in character class")}}};N.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var r=e.current();if(r===99||ms(r))e.raise("Invalid class escape");e.raise("Invalid escape")}e.pos=t}var n=e.current();if(n!==93)return e.lastIntValue=n,e.advance(),!0;return!1};N.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)};N.regexp_classSetExpression=function(e){var t=Fe,r;if(this.regexp_eatClassSetRange(e));else if(r=this.regexp_eatClassSetOperand(e)){if(r===Ce)t=Ce;var n=e.pos;while(e.eatChars([38,38])){if(e.current()!==38&&(r=this.regexp_eatClassSetOperand(e))){if(r!==Ce)t=Fe;continue}e.raise("Invalid character in character class")}if(n!==e.pos)return t;while(e.eatChars([45,45])){if(this.regexp_eatClassSetOperand(e))continue;e.raise("Invalid character in character class")}if(n!==e.pos)return t}else e.raise("Invalid character in character class");for(;;){if(this.regexp_eatClassSetRange(e))continue;if(r=this.regexp_eatClassSetOperand(e),!r)return t;if(r===Ce)t=Ce}};N.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var n=e.lastIntValue;if(r!==-1&&n!==-1&&r>n)e.raise("Range out of order in character class");return!0}e.pos=t}return!1};N.regexp_eatClassSetOperand=function(e){if(this.regexp_eatClassSetCharacter(e))return Fe;return this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)};N.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var r=e.eat(94),n=this.regexp_classContents(e);if(e.eat(93)){if(r&&n===Ce)e.raise("Negated character class may contain strings");return n}e.pos=t}if(e.eat(92)){var i=this.regexp_eatCharacterClassEscape(e);if(i)return i;e.pos=t}return null};N.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var r=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return r}else e.raise("Invalid escape");e.pos=t}return null};N.regexp_classStringDisjunctionContents=function(e){var t=this.regexp_classString(e);while(e.eat(124))if(this.regexp_classString(e)===Ce)t=Ce;return t};N.regexp_classString=function(e){var t=0;while(this.regexp_eatClassSetCharacter(e))t++;return t===1?Fe:Ce};N.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e))return!0;if(e.eat(98))return e.lastIntValue=8,!0;return e.pos=t,!1}var r=e.current();if(r<0||r===e.lookahead()&&Wc(r))return!1;if(Kc(r))return!1;return e.advance(),e.lastIntValue=r,!0};function Wc(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function Kc(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}N.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();if(zc(t))return e.lastIntValue=t,e.advance(),!0;return!1};function zc(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}N.regexp_eatClassControlLetter=function(e){var t=e.current();if(ar(t)||t===95)return e.lastIntValue=t%32,e.advance(),!0;return!1};N.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;if(e.switchU)e.raise("Invalid escape");e.pos=t}return!1};N.regexp_eatDecimalDigits=function(e){var t=e.pos,r=0;e.lastIntValue=0;while(ar(r=e.current()))e.lastIntValue=10*e.lastIntValue+(r-48),e.advance();return e.pos!==t};function ar(e){return e>=48&&e<=57}N.regexp_eatHexDigits=function(e){var t=e.pos,r=0;e.lastIntValue=0;while(ds(r=e.current()))e.lastIntValue=16*e.lastIntValue+fs(r),e.advance();return e.pos!==t};function ds(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function fs(e){if(e>=65&&e<=70)return 10+(e-65);if(e>=97&&e<=102)return 10+(e-97);return e-48}N.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var r=e.lastIntValue;if(t<=3&&this.regexp_eatOctalDigit(e))e.lastIntValue=t*64+r*8+e.lastIntValue;else e.lastIntValue=t*8+r}else e.lastIntValue=t;return!0}return!1};N.regexp_eatOctalDigit=function(e){var t=e.current();if(ms(t))return e.lastIntValue=t-48,e.advance(),!0;return e.lastIntValue=0,!1};function ms(e){return e>=48&&e<=55}N.regexp_eatFixedHexDigits=function(e,t){var r=e.pos;e.lastIntValue=0;for(var n=0;n<t;++n){var i=e.current();if(!ds(i))return e.pos=r,!1;e.lastIntValue=16*e.lastIntValue+fs(i),e.advance()}return!0};var or=function(t){if(this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,t.options.locations)this.loc=new Pt(t,t.startLoc,t.endLoc);if(t.options.ranges)this.range=[t.start,t.end]},W=ne.prototype;W.next=function(e){if(!e&&this.type.keyword&&this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword);if(this.options.onToken)this.options.onToken(new or(this));this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()};W.getToken=function(){return this.next(),new or(this)};if(typeof Symbol<"u")W[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===d.eof,value:t}}}};W.nextToken=function(){var e=this.curContext();if(!e||!e.preserveSpace)this.skipSpace();if(this.start=this.pos,this.options.locations)this.startLoc=this.curPosition();if(this.pos>=this.input.length)return this.finishToken(d.eof);if(e.override)return e.override(this);else this.readToken(this.fullCharCodeAtPos())};W.readToken=function(e){if(he(e,this.options.ecmaVersion>=6)||e===92)return this.readWord();return this.getTokenFromCode(e)};W.fullCharCodeAt=function(e){var t=this.input.charCodeAt(e);if(t<=55295||t>=56320)return t;var r=this.input.charCodeAt(e+1);return r<=56319||r>=57344?t:(t<<10)+r-56613888};W.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)};W.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,r=this.input.indexOf("*/",this.pos+=2);if(r===-1)this.raise(this.pos-2,"Unterminated comment");if(this.pos=r+2,this.options.locations)for(var n=void 0,i=t;(n=ji(this.input,i,this.pos))>-1;)++this.curLine,i=this.lineStart=n;if(this.options.onComment)this.options.onComment(!0,this.input.slice(t+2,r),t,this.pos,e,this.curPosition())};W.skipLineComment=function(e){var t=this.pos,r=this.options.onComment&&this.curPosition(),n=this.input.charCodeAt(this.pos+=e);while(this.pos<this.input.length&&!Qe(n))n=this.input.charCodeAt(++this.pos);if(this.options.onComment)this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,r,this.curPosition())};W.skipSpace=function(){e:while(this.pos<this.input.length){var e=this.input.charCodeAt(this.pos);switch(e){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(e>8&&e<14||e>=5760&&Wr.test(String.fromCharCode(e)))++this.pos;else break e}}};W.finishToken=function(e,t){if(this.end=this.pos,this.options.locations)this.endLoc=this.curPosition();var r=this.type;this.type=e,this.value=t,this.updateContext(r)};W.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);if(this.options.ecmaVersion>=6&&e===46&&t===46)return this.pos+=3,this.finishToken(d.ellipsis);else return++this.pos,this.finishToken(d.dot)};W.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);if(this.exprAllowed)return++this.pos,this.readRegexp();if(e===61)return this.finishOp(d.assign,2);return this.finishOp(d.slash,1)};W.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),r=1,n=e===42?d.star:d.modulo;if(this.options.ecmaVersion>=7&&e===42&&t===42)++r,n=d.starstar,t=this.input.charCodeAt(this.pos+2);if(t===61)return this.finishOp(d.assign,r+1);return this.finishOp(n,r)};W.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12){var r=this.input.charCodeAt(this.pos+2);if(r===61)return this.finishOp(d.assign,3)}return this.finishOp(e===124?d.logicalOR:d.logicalAND,2)}if(t===61)return this.finishOp(d.assign,2);return this.finishOp(e===124?d.bitwiseOR:d.bitwiseAND,1)};W.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);if(e===61)return this.finishOp(d.assign,2);return this.finishOp(d.bitwiseXOR,1)};W.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||de.test(this.input.slice(this.lastTokEnd,this.pos))))return this.skipLineComment(3),this.skipSpace(),this.nextToken();return this.finishOp(d.incDec,2)}if(t===61)return this.finishOp(d.assign,2);return this.finishOp(d.plusMin,1)};W.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),r=1;if(t===e){if(r=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+r)===61)return this.finishOp(d.assign,r+1);return this.finishOp(d.bitShift,r)}if(t===33&&e===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(t===61)r=2;return this.finishOp(d.relational,r)};W.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===61)return this.finishOp(d.equality,this.input.charCodeAt(this.pos+2)===61?3:2);if(e===61&&t===62&&this.options.ecmaVersion>=6)return this.pos+=2,this.finishToken(d.arrow);return this.finishOp(e===61?d.eq:d.prefix,1)};W.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var r=this.input.charCodeAt(this.pos+2);if(r<48||r>57)return this.finishOp(d.questionDot,2)}if(t===63){if(e>=12){var n=this.input.charCodeAt(this.pos+2);if(n===61)return this.finishOp(d.assign,3)}return this.finishOp(d.coalesce,2)}}return this.finishOp(d.question,1)};W.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13){if(++this.pos,t=this.fullCharCodeAtPos(),he(t,!0)||t===92)return this.finishToken(d.privateId,this.readWord1())}this.raise(this.pos,"Unexpected character '"+Be(t)+"'")};W.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(d.parenL);case 41:return++this.pos,this.finishToken(d.parenR);case 59:return++this.pos,this.finishToken(d.semi);case 44:return++this.pos,this.finishToken(d.comma);case 91:return++this.pos,this.finishToken(d.bracketL);case 93:return++this.pos,this.finishToken(d.bracketR);case 123:return++this.pos,this.finishToken(d.braceL);case 125:return++this.pos,this.finishToken(d.braceR);case 58:return++this.pos,this.finishToken(d.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(d.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===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(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(d.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+Be(e)+"'")};W.finishOp=function(e,t){var r=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,r)};W.readRegexp=function(){var e,t,r=this.pos;for(;;){if(this.pos>=this.input.length)this.raise(r,"Unterminated regular expression");var n=this.input.charAt(this.pos);if(de.test(n))this.raise(r,"Unterminated regular expression");if(!e){if(n==="[")t=!0;else if(n==="]"&&t)t=!1;else if(n==="/"&&!t)break;e=n==="\\"}else e=!1;++this.pos}var i=this.input.slice(r,this.pos);++this.pos;var o=this.pos,a=this.readWord1();if(this.containsEsc)this.unexpected(o);var p=this.regexpState||(this.regexpState=new Re(this));p.reset(r,i,a),this.validateRegExpFlags(p),this.validateRegExpPattern(p);var u=null;try{u=new RegExp(i,a)}catch(m){}return this.finishToken(d.regexp,{pattern:i,flags:a,value:u})};W.readInt=function(e,t,r){var n=this.options.ecmaVersion>=12&&t===void 0,i=r&&this.input.charCodeAt(this.pos)===48,o=this.pos,a=0,p=0;for(var u=0,m=t==null?1/0:t;u<m;++u,++this.pos){var f=this.input.charCodeAt(this.pos),b=void 0;if(n&&f===95){if(i)this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals");if(p===95)this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore");if(u===0)this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits");p=f;continue}if(f>=97)b=f-97+10;else if(f>=65)b=f-65+10;else if(f>=48&&f<=57)b=f-48;else b=1/0;if(b>=e)break;p=f,a=a*e+b}if(n&&p===95)this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits");if(this.pos===o||t!=null&&this.pos-o!==t)return null;return a};function Xc(e,t){if(t)return parseInt(e,8);return parseFloat(e.replace(/_/g,""))}function ys(e){if(typeof BigInt!=="function")return null;return BigInt(e.replace(/_/g,""))}W.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var r=this.readInt(e);if(r==null)this.raise(this.start+2,"Expected number in radix "+e);if(this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110)r=ys(this.input.slice(t,this.pos)),++this.pos;else if(he(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");return this.finishToken(d.num,r)};W.readNumber=function(e){var t=this.pos;if(!e&&this.readInt(10,void 0,!0)===null)this.raise(t,"Invalid number");var r=this.pos-t>=2&&this.input.charCodeAt(t)===48;if(r&&this.strict)this.raise(t,"Invalid number");var n=this.input.charCodeAt(this.pos);if(!r&&!e&&this.options.ecmaVersion>=11&&n===110){var i=ys(this.input.slice(t,this.pos));if(++this.pos,he(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");return this.finishToken(d.num,i)}if(r&&/[89]/.test(this.input.slice(t,this.pos)))r=!1;if(n===46&&!r)++this.pos,this.readInt(10),n=this.input.charCodeAt(this.pos);if((n===69||n===101)&&!r){if(n=this.input.charCodeAt(++this.pos),n===43||n===45)++this.pos;if(this.readInt(10)===null)this.raise(t,"Invalid number")}if(he(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");var o=Xc(this.input.slice(t,this.pos),r);return this.finishToken(d.num,o)};W.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){if(this.options.ecmaVersion<6)this.unexpected();var r=++this.pos;if(t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111)this.invalidStringToken(r,"Code point out of bounds")}else t=this.readHexChar(4);return t};W.readString=function(e){var t="",r=++this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated string constant");var n=this.input.charCodeAt(this.pos);if(n===e)break;if(n===92)t+=this.input.slice(r,this.pos),t+=this.readEscapedChar(!1),r=this.pos;else if(n===8232||n===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(Qe(n))this.raise(this.start,"Unterminated string constant");++this.pos}}return t+=this.input.slice(r,this.pos++),this.finishToken(d.string,t)};var gs={};W.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===gs)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};W.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw gs;else this.raise(e,t)};W.readTmplToken=function(){var e="",t=this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated template");var r=this.input.charCodeAt(this.pos);if(r===96||r===36&&this.input.charCodeAt(this.pos+1)===123){if(this.pos===this.start&&(this.type===d.template||this.type===d.invalidTemplate))if(r===36)return this.pos+=2,this.finishToken(d.dollarBraceL);else return++this.pos,this.finishToken(d.backQuote);return e+=this.input.slice(t,this.pos),this.finishToken(d.template,e)}if(r===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(Qe(r)){switch(e+=this.input.slice(t,this.pos),++this.pos,r){case 13:if(this.input.charCodeAt(this.pos)===10)++this.pos;case 10:e+=`
|
|
21
|
-
`;break;default:e+=String.fromCharCode(r);break}if(this.options.locations)++this.curLine,this.lineStart=this.pos;t=this.pos}else++this.pos}};W.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(
|
|
22
|
+
`),cooked:this.value};return this.next(),r.tail=this.type===h.backQuote,this.finishNode(r,"TemplateElement")};q.parseTemplate=function(e){if(e===void 0)e={};var t=e.isTagged;if(t===void 0)t=!1;var r=this.startNode();this.next(),r.expressions=[];var n=this.parseTemplateElement({isTagged:t});r.quasis=[n];while(!n.tail){if(this.type===h.eof)this.raise(this.pos,"Unterminated template literal");this.expect(h.dollarBraceL),r.expressions.push(this.parseExpression()),this.expect(h.braceR),r.quasis.push(n=this.parseTemplateElement({isTagged:t}))}return this.next(),this.finishNode(r,"TemplateLiteral")};q.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===h.name||this.type===h.num||this.type===h.string||this.type===h.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===h.star)&&!de.test(this.input.slice(this.lastTokEnd,this.start))};q.parseObj=function(e,t){var r=this.startNode(),n=!0,i={};r.properties=[],this.next();while(!this.eat(h.braceR)){if(!n){if(this.expect(h.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(h.braceR))break}else n=!1;var o=this.parseProperty(e,t);if(!e)this.checkPropClash(o,i,t);r.properties.push(o)}return this.finishNode(r,e?"ObjectPattern":"ObjectExpression")};q.parseProperty=function(e,t){var r=this.startNode(),n,i,o,a;if(this.options.ecmaVersion>=9&&this.eat(h.ellipsis)){if(e){if(r.argument=this.parseIdent(!1),this.type===h.comma)this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");return this.finishNode(r,"RestElement")}if(r.argument=this.parseMaybeAssign(!1,t),this.type===h.comma&&t&&t.trailingComma<0)t.trailingComma=this.start;return this.finishNode(r,"SpreadElement")}if(this.options.ecmaVersion>=6){if(r.method=!1,r.shorthand=!1,e||t)o=this.start,a=this.startLoc;if(!e)n=this.eat(h.star)}var p=this.containsEsc;if(this.parsePropertyName(r),!e&&!p&&this.options.ecmaVersion>=8&&!n&&this.isAsyncProp(r))i=!0,n=this.options.ecmaVersion>=9&&this.eat(h.star),this.parsePropertyName(r);else i=!1;return this.parsePropertyValue(r,e,n,i,o,a,t,p),this.finishNode(r,"Property")};q.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var r=e.kind==="get"?0:1;if(e.value.params.length!==r){var n=e.value.start;if(e.kind==="get")this.raiseRecoverable(n,"getter should have no params");else this.raiseRecoverable(n,"setter should have exactly one param")}else if(e.kind==="set"&&e.value.params[0].type==="RestElement")this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")};q.parsePropertyValue=function(e,t,r,n,i,o,a,p){if((r||n)&&this.type===h.colon)this.unexpected();if(this.eat(h.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,a),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===h.parenL){if(t)this.unexpected();e.method=!0,e.value=this.parseMethod(r,n),e.kind="init"}else if(!t&&!p&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&(this.type!==h.comma&&this.type!==h.braceR&&this.type!==h.eq)){if(r||n)this.unexpected();this.parseGetterSetter(e)}else if(this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"){if(r||n)this.unexpected();if(this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos)this.awaitIdentPos=i;if(t)e.value=this.parseMaybeDefault(i,o,this.copyNode(e.key));else if(this.type===h.eq&&a){if(a.shorthandAssign<0)a.shorthandAssign=this.start;e.value=this.parseMaybeDefault(i,o,this.copyNode(e.key))}else e.value=this.copyNode(e.key);e.kind="init",e.shorthand=!0}else this.unexpected()};q.parsePropertyName=function(e){if(this.options.ecmaVersion>=6)if(this.eat(h.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(h.bracketR),e.key;else e.computed=!1;return e.key=this.type===h.num||this.type===h.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};q.initFunction=function(e){if(e.id=null,this.options.ecmaVersion>=6)e.generator=e.expression=!1;if(this.options.ecmaVersion>=8)e.async=!1};q.parseMethod=function(e,t,r){var n=this.startNode(),i=this.yieldPos,o=this.awaitPos,a=this.awaitIdentPos;if(this.initFunction(n),this.options.ecmaVersion>=6)n.generator=e;if(this.options.ecmaVersion>=8)n.async=!!t;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(Yr(t,n.generator)|nr|(r?Yi:0)),this.expect(h.parenL),n.params=this.parseBindingList(h.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(n,!1,!0,!1),this.yieldPos=i,this.awaitPos=o,this.awaitIdentPos=a,this.finishNode(n,"FunctionExpression")};q.parseArrowExpression=function(e,t,r,n){var i=this.yieldPos,o=this.awaitPos,a=this.awaitIdentPos;if(this.enterScope(Yr(r,!1)|Jr),this.initFunction(e),this.options.ecmaVersion>=8)e.async=!!r;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,n),this.yieldPos=i,this.awaitPos=o,this.awaitIdentPos=a,this.finishNode(e,"ArrowFunctionExpression")};q.parseFunctionBody=function(e,t,r,n){var i=t&&this.type!==h.braceL,o=this.strict,a=!1;if(i)e.body=this.parseMaybeAssign(n),e.expression=!0,this.checkParams(e,!1);else{var p=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);if(!o||p){if(a=this.strictDirective(this.end),a&&p)this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list")}var l=this.labels;if(this.labels=[],a)this.strict=!0;if(this.checkParams(e,!o&&!a&&!t&&!r&&this.isSimpleParamList(e.params)),this.strict&&e.id)this.checkLValSimple(e.id,ts);e.body=this.parseBlock(!1,void 0,a&&!o),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=l}this.exitScope()};q.isSimpleParamList=function(e){for(var t=0,r=e;t<r.length;t+=1){var n=r[t];if(n.type!=="Identifier")return!1}return!0};q.checkParams=function(e,t){var r=Object.create(null);for(var n=0,i=e.params;n<i.length;n+=1){var o=i[n];this.checkLValInnerPattern(o,Qr,t?null:r)}};q.parseExprList=function(e,t,r,n){var i=[],o=!0;while(!this.eat(e)){if(!o){if(this.expect(h.comma),t&&this.afterTrailingComma(e))break}else o=!1;var a=void 0;if(r&&this.type===h.comma)a=null;else if(this.type===h.ellipsis){if(a=this.parseSpread(n),n&&this.type===h.comma&&n.trailingComma<0)n.trailingComma=this.start}else a=this.parseMaybeAssign(!1,n);i.push(a)}return i};q.checkUnreserved=function(e){var{start:t,end:r,name:n}=e;if(this.inGenerator&&n==="yield")this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator");if(this.inAsync&&n==="await")this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function");if(!(this.currentThisScope().flags&ir)&&n==="arguments")this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer");if(this.inClassStaticBlock&&(n==="arguments"||n==="await"))this.raise(t,"Cannot use "+n+" in class static initialization block");if(this.keywords.test(n))this.raise(t,"Unexpected keyword '"+n+"'");if(this.options.ecmaVersion<6&&this.input.slice(t,r).indexOf("\\")!==-1)return;var i=this.strict?this.reservedWordsStrict:this.reservedWords;if(i.test(n)){if(!this.inAsync&&n==="await")this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function");this.raiseRecoverable(t,"The keyword '"+n+"' is reserved")}};q.parseIdent=function(e){var t=this.parseIdentNode();if(this.next(!!e),this.finishNode(t,"Identifier"),!e){if(this.checkUnreserved(t),t.name==="await"&&!this.awaitIdentPos)this.awaitIdentPos=t.start}return t};q.parseIdentNode=function(){var e=this.startNode();if(this.type===h.name)e.name=this.value;else if(this.type.keyword){if(e.name=this.type.keyword,(e.name==="class"||e.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46))this.context.pop();this.type=h.name}else this.unexpected();return e};q.parsePrivateIdent=function(){var e=this.startNode();if(this.type===h.privateId)e.name=this.value;else this.unexpected();if(this.next(),this.finishNode(e,"PrivateIdentifier"),this.options.checkPrivateFields)if(this.privateNameStack.length===0)this.raise(e.start,"Private field '#"+e.name+"' must be declared in an enclosing class");else this.privateNameStack[this.privateNameStack.length-1].used.push(e);return e};q.parseYield=function(e){if(!this.yieldPos)this.yieldPos=this.start;var t=this.startNode();if(this.next(),this.type===h.semi||this.canInsertSemicolon()||this.type!==h.star&&!this.type.startsExpr)t.delegate=!1,t.argument=null;else t.delegate=this.eat(h.star),t.argument=this.parseMaybeAssign(e);return this.finishNode(t,"YieldExpression")};q.parseAwait=function(e){if(!this.awaitPos)this.awaitPos=this.start;var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,"AwaitExpression")};var er=ne.prototype;er.raise=function(e,t){var r=zr(this.input,e);if(t+=" ("+r.line+":"+r.column+")",this.sourceFile)t+=" in "+this.sourceFile;var n=SyntaxError(t);throw n.pos=e,n.loc=r,n.raisedAt=this.pos,n};er.raiseRecoverable=er.raise;er.curPosition=function(){if(this.options.locations)return new at(this.curLine,this.pos-this.lineStart)};var Ue=ne.prototype,Mc=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[]};Ue.enterScope=function(e){this.scopeStack.push(new Mc(e))};Ue.exitScope=function(){this.scopeStack.pop()};Ue.treatFunctionsAsVarInScope=function(e){return e.flags&et||!this.inModule&&e.flags&Qe};Ue.declareName=function(e,t,r){var n=!1;if(t===Ve){var i=this.currentScope();if(n=i.lexical.indexOf(e)>-1||i.functions.indexOf(e)>-1||i.var.indexOf(e)>-1,i.lexical.push(e),this.inModule&&i.flags&Qe)delete this.undefinedExports[e]}else if(t===es){var o=this.currentScope();o.lexical.push(e)}else if(t===Zi){var a=this.currentScope();if(this.treatFunctionsAsVar)n=a.lexical.indexOf(e)>-1;else n=a.lexical.indexOf(e)>-1||a.var.indexOf(e)>-1;a.functions.push(e)}else for(var p=this.scopeStack.length-1;p>=0;--p){var l=this.scopeStack[p];if(l.lexical.indexOf(e)>-1&&!(l.flags&Ji&&l.lexical[0]===e)||!this.treatFunctionsAsVarInScope(l)&&l.functions.indexOf(e)>-1){n=!0;break}if(l.var.push(e),this.inModule&&l.flags&Qe)delete this.undefinedExports[e];if(l.flags&ir)break}if(n)this.raiseRecoverable(r,"Identifier '"+e+"' has already been declared")};Ue.checkLocalExport=function(e){if(this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1)this.undefinedExports[e.name]=e};Ue.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};Ue.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(ir|wt|tt))return t}};Ue.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(ir|wt|tt)&&!(t.flags&Jr))return t}};var _t=function(t,r,n){if(this.type="",this.start=r,this.end=0,t.options.locations)this.loc=new kt(t,n);if(t.options.directSourceFile)this.sourceFile=t.options.directSourceFile;if(t.options.ranges)this.range=[r,0]},Nt=ne.prototype;Nt.startNode=function(){return new _t(this,this.start,this.startLoc)};Nt.startNodeAt=function(e,t){return new _t(this,e,t)};function is(e,t,r,n){if(e.type=t,e.end=r,this.options.locations)e.loc.end=n;if(this.options.ranges)e.range[1]=r;return e}Nt.finishNode=function(e,t){return is.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};Nt.finishNodeAt=function(e,t,r,n){return is.call(this,e,t,r,n)};Nt.copyNode=function(e){var t=new _t(this,e.start,this.startLoc);for(var r in e)t[r]=e[r];return t};var Oc="Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz",ss="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",as=ss+" Extended_Pictographic",os=as,cs=os+" EBase EComp EMod EPres ExtPict",ps=cs,Bc=ps,Fc={9:ss,10:as,11:os,12:cs,13:ps,14:Bc},Vc="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",jc={9:"",10:"",11:"",12:"",13:"",14:Vc},Hi="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",ls="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",us=ls+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",hs=us+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",ds=hs+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",fs=ds+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",$c=fs+" "+Oc,Hc={9:ls,10:us,11:hs,12:ds,13:fs,14:$c},ms={};function qc(e){var t=ms[e]={binary:qe(Fc[e]+" "+Hi),binaryOfStrings:qe(jc[e]),nonBinary:{General_Category:qe(Hi),Script:qe(Hc[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(At=0,Jt=[9,10,11,12,13,14];At<Jt.length;At+=1)Wr=Jt[At],qc(Wr);var Wr,At,Jt,N=ne.prototype,tr=function(t,r){this.parent=t,this.base=r||this};tr.prototype.separatedFrom=function(t){for(var r=this;r;r=r.parent)for(var n=t;n;n=n.parent)if(r.base===n.base&&r!==n)return!0;return!1};tr.prototype.sibling=function(){return new tr(this.parent,this.base)};var Re=function(t){this.parser=t,this.validFlags="gim"+(t.options.ecmaVersion>=6?"uy":"")+(t.options.ecmaVersion>=9?"s":"")+(t.options.ecmaVersion>=13?"d":"")+(t.options.ecmaVersion>=15?"v":""),this.unicodeProperties=ms[t.options.ecmaVersion>=14?14:t.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};Re.prototype.reset=function(t,r,n){var i=n.indexOf("v")!==-1,o=n.indexOf("u")!==-1;if(this.start=t|0,this.source=r+"",this.flags=n,i&&this.parser.options.ecmaVersion>=15)this.switchU=!0,this.switchV=!0,this.switchN=!0;else this.switchU=o&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=o&&this.parser.options.ecmaVersion>=9};Re.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)};Re.prototype.at=function(t,r){if(r===void 0)r=!1;var n=this.source,i=n.length;if(t>=i)return-1;var o=n.charCodeAt(t);if(!(r||this.switchU)||o<=55295||o>=57344||t+1>=i)return o;var a=n.charCodeAt(t+1);return a>=56320&&a<=57343?(o<<10)+a-56613888:o};Re.prototype.nextIndex=function(t,r){if(r===void 0)r=!1;var n=this.source,i=n.length;if(t>=i)return i;var o=n.charCodeAt(t),a;if(!(r||this.switchU)||o<=55295||o>=57344||t+1>=i||(a=n.charCodeAt(t+1))<56320||a>57343)return t+1;return t+2};Re.prototype.current=function(t){if(t===void 0)t=!1;return this.at(this.pos,t)};Re.prototype.lookahead=function(t){if(t===void 0)t=!1;return this.at(this.nextIndex(this.pos,t),t)};Re.prototype.advance=function(t){if(t===void 0)t=!1;this.pos=this.nextIndex(this.pos,t)};Re.prototype.eat=function(t,r){if(r===void 0)r=!1;if(this.current(r)===t)return this.advance(r),!0;return!1};Re.prototype.eatChars=function(t,r){if(r===void 0)r=!1;var n=this.pos;for(var i=0,o=t;i<o.length;i+=1){var a=o[i],p=this.at(n,r);if(p===-1||p!==a)return!1;n=this.nextIndex(n,r)}return this.pos=n,!0};N.validateRegExpFlags=function(e){var{validFlags:t,flags:r}=e,n=!1,i=!1;for(var o=0;o<r.length;o++){var a=r.charAt(o);if(t.indexOf(a)===-1)this.raise(e.start,"Invalid regular expression flag");if(r.indexOf(a,o+1)>-1)this.raise(e.start,"Duplicate regular expression flag");if(a==="u")n=!0;if(a==="v")i=!0}if(this.options.ecmaVersion>=15&&n&&i)this.raise(e.start,"Invalid regular expression flag")};function Uc(e){for(var t in e)return!0;return!1}N.validateRegExpPattern=function(e){if(this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&Uc(e.groupNames))e.switchN=!0,this.regexp_pattern(e)};N.regexp_pattern=function(e){if(e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames=Object.create(null),e.backReferenceNames.length=0,e.branchID=null,this.regexp_disjunction(e),e.pos!==e.source.length){if(e.eat(41))e.raise("Unmatched ')'");if(e.eat(93)||e.eat(125))e.raise("Lone quantifier brackets")}if(e.maxBackReference>e.numCapturingParens)e.raise("Invalid escape");for(var t=0,r=e.backReferenceNames;t<r.length;t+=1){var n=r[t];if(!e.groupNames[n])e.raise("Invalid named capture referenced")}};N.regexp_disjunction=function(e){var t=this.options.ecmaVersion>=16;if(t)e.branchID=new tr(e.branchID,null);this.regexp_alternative(e);while(e.eat(124)){if(t)e.branchID=e.branchID.sibling();this.regexp_alternative(e)}if(t)e.branchID=e.branchID.parent;if(this.regexp_eatQuantifier(e,!0))e.raise("Nothing to repeat");if(e.eat(123))e.raise("Lone quantifier brackets")};N.regexp_alternative=function(e){while(e.pos<e.source.length&&this.regexp_eatTerm(e));};N.regexp_eatTerm=function(e){if(this.regexp_eatAssertion(e)){if(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)){if(e.switchU)e.raise("Invalid quantifier")}return!0}if(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))return this.regexp_eatQuantifier(e),!0;return!1};N.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var r=!1;if(this.options.ecmaVersion>=9)r=e.eat(60);if(e.eat(61)||e.eat(33)){if(this.regexp_disjunction(e),!e.eat(41))e.raise("Unterminated group");return e.lastAssertionIsQuantifiable=!r,!0}}return e.pos=t,!1};N.regexp_eatQuantifier=function(e,t){if(t===void 0)t=!1;if(this.regexp_eatQuantifierPrefix(e,t))return e.eat(63),!0;return!1};N.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)};N.regexp_eatBracedQuantifier=function(e,t){var r=e.pos;if(e.eat(123)){var n=0,i=-1;if(this.regexp_eatDecimalDigits(e)){if(n=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e))i=e.lastIntValue;if(e.eat(125)){if(i!==-1&&i<n&&!t)e.raise("numbers out of order in {} quantifier");return!0}}if(e.switchU&&!t)e.raise("Incomplete quantifier");e.pos=r}return!1};N.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)};N.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1};N.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)){if(this.options.ecmaVersion>=16){var r=this.regexp_eatModifiers(e),n=e.eat(45);if(r||n){for(var i=0;i<r.length;i++){var o=r.charAt(i);if(r.indexOf(o,i+1)>-1)e.raise("Duplicate regular expression modifiers")}if(n){var a=this.regexp_eatModifiers(e);if(!r&&!a&&e.current()===58)e.raise("Invalid regular expression modifiers");for(var p=0;p<a.length;p++){var l=a.charAt(p);if(a.indexOf(l,p+1)>-1||r.indexOf(l)>-1)e.raise("Duplicate regular expression modifiers")}}}}if(e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise("Unterminated group")}}e.pos=t}return!1};N.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9)this.regexp_groupSpecifier(e);else if(e.current()===63)e.raise("Invalid group");if(this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1};N.regexp_eatModifiers=function(e){var t="",r=0;while((r=e.current())!==-1&&Gc(r))t+=Be(r),e.advance();return t};function Gc(e){return e===105||e===109||e===115}N.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)};N.regexp_eatInvalidBracedQuantifier=function(e){if(this.regexp_eatBracedQuantifier(e,!0))e.raise("Nothing to repeat");return!1};N.regexp_eatSyntaxCharacter=function(e){var t=e.current();if(ys(t))return e.lastIntValue=t,e.advance(),!0;return!1};function ys(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}N.regexp_eatPatternCharacters=function(e){var t=e.pos,r=0;while((r=e.current())!==-1&&!ys(r))e.advance();return e.pos!==t};N.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();if(t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124)return e.advance(),!0;return!1};N.regexp_groupSpecifier=function(e){if(e.eat(63)){if(!this.regexp_eatGroupName(e))e.raise("Invalid group");var t=this.options.ecmaVersion>=16,r=e.groupNames[e.lastStringValue];if(r)if(t)for(var n=0,i=r;n<i.length;n+=1){var o=i[n];if(!o.separatedFrom(e.branchID))e.raise("Duplicate capture group name")}else e.raise("Duplicate capture group name");if(t)(r||(e.groupNames[e.lastStringValue]=[])).push(e.branchID);else e.groupNames[e.lastStringValue]=!0}};N.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1};N.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){e.lastStringValue+=Be(e.lastIntValue);while(this.regexp_eatRegExpIdentifierPart(e))e.lastStringValue+=Be(e.lastIntValue);return!0}return!1};N.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,r=this.options.ecmaVersion>=11,n=e.current(r);if(e.advance(r),n===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,r))n=e.lastIntValue;if(Wc(n))return e.lastIntValue=n,!0;return e.pos=t,!1};function Wc(e){return he(e,!0)||e===36||e===95}N.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,r=this.options.ecmaVersion>=11,n=e.current(r);if(e.advance(r),n===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,r))n=e.lastIntValue;if(Kc(n))return e.lastIntValue=n,!0;return e.pos=t,!1};function Kc(e){return ye(e,!0)||e===36||e===95||e===8204||e===8205}N.regexp_eatAtomEscape=function(e){if(this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e))return!0;if(e.switchU){if(e.current()===99)e.raise("Invalid unicode escape");e.raise("Invalid escape")}return!1};N.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var r=e.lastIntValue;if(e.switchU){if(r>e.maxBackReference)e.maxBackReference=r;return!0}if(r<=e.numCapturingParens)return!0;e.pos=t}return!1};N.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1};N.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)};N.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1};N.regexp_eatZero=function(e){if(e.current()===48&&!ar(e.lookahead()))return e.lastIntValue=0,e.advance(),!0;return!1};N.regexp_eatControlEscape=function(e){var t=e.current();if(t===116)return e.lastIntValue=9,e.advance(),!0;if(t===110)return e.lastIntValue=10,e.advance(),!0;if(t===118)return e.lastIntValue=11,e.advance(),!0;if(t===102)return e.lastIntValue=12,e.advance(),!0;if(t===114)return e.lastIntValue=13,e.advance(),!0;return!1};N.regexp_eatControlLetter=function(e){var t=e.current();if(gs(t))return e.lastIntValue=t%32,e.advance(),!0;return!1};function gs(e){return e>=65&&e<=90||e>=97&&e<=122}N.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){if(t===void 0)t=!1;var r=e.pos,n=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var i=e.lastIntValue;if(n&&i>=55296&&i<=56319){var o=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var a=e.lastIntValue;if(a>=56320&&a<=57343)return e.lastIntValue=(i-55296)*1024+(a-56320)+65536,!0}e.pos=o,e.lastIntValue=i}return!0}if(n&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&zc(e.lastIntValue))return!0;if(n)e.raise("Invalid unicode escape");e.pos=r}return!1};function zc(e){return e>=0&&e<=1114111}N.regexp_eatIdentityEscape=function(e){if(e.switchU){if(this.regexp_eatSyntaxCharacter(e))return!0;if(e.eat(47))return e.lastIntValue=47,!0;return!1}var t=e.current();if(t!==99&&(!e.switchN||t!==107))return e.lastIntValue=t,e.advance(),!0;return!1};N.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1};var xs=0,Fe=1,Ce=2;N.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(Xc(t))return e.lastIntValue=-1,e.advance(),Fe;var r=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((r=t===80)||t===112)){e.lastIntValue=-1,e.advance();var n;if(e.eat(123)&&(n=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125)){if(r&&n===Ce)e.raise("Invalid property name");return n}e.raise("Invalid property name")}return xs};function Xc(e){return e===100||e===68||e===115||e===83||e===119||e===87}N.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var r=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var n=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,r,n),Fe}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i)}return xs};N.regexp_validateUnicodePropertyNameAndValue=function(e,t,r){if(!ot(e.unicodeProperties.nonBinary,t))e.raise("Invalid property name");if(!e.unicodeProperties.nonBinary[t].test(r))e.raise("Invalid property value")};N.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return Fe;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return Ce;e.raise("Invalid property name")};N.regexp_eatUnicodePropertyName=function(e){var t=0;e.lastStringValue="";while(bs(t=e.current()))e.lastStringValue+=Be(t),e.advance();return e.lastStringValue!==""};function bs(e){return gs(e)||e===95}N.regexp_eatUnicodePropertyValue=function(e){var t=0;e.lastStringValue="";while(Jc(t=e.current()))e.lastStringValue+=Be(t),e.advance();return e.lastStringValue!==""};function Jc(e){return bs(e)||ar(e)}N.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)};N.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),r=this.regexp_classContents(e);if(!e.eat(93))e.raise("Unterminated character class");if(t&&r===Ce)e.raise("Negated character class may contain strings");return!0}return!1};N.regexp_classContents=function(e){if(e.current()===93)return Fe;if(e.switchV)return this.regexp_classSetExpression(e);return this.regexp_nonEmptyClassRanges(e),Fe};N.regexp_nonEmptyClassRanges=function(e){while(this.regexp_eatClassAtom(e)){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var r=e.lastIntValue;if(e.switchU&&(t===-1||r===-1))e.raise("Invalid character class");if(t!==-1&&r!==-1&&t>r)e.raise("Range out of order in character class")}}};N.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var r=e.current();if(r===99||Ss(r))e.raise("Invalid class escape");e.raise("Invalid escape")}e.pos=t}var n=e.current();if(n!==93)return e.lastIntValue=n,e.advance(),!0;return!1};N.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)};N.regexp_classSetExpression=function(e){var t=Fe,r;if(this.regexp_eatClassSetRange(e));else if(r=this.regexp_eatClassSetOperand(e)){if(r===Ce)t=Ce;var n=e.pos;while(e.eatChars([38,38])){if(e.current()!==38&&(r=this.regexp_eatClassSetOperand(e))){if(r!==Ce)t=Fe;continue}e.raise("Invalid character in character class")}if(n!==e.pos)return t;while(e.eatChars([45,45])){if(this.regexp_eatClassSetOperand(e))continue;e.raise("Invalid character in character class")}if(n!==e.pos)return t}else e.raise("Invalid character in character class");for(;;){if(this.regexp_eatClassSetRange(e))continue;if(r=this.regexp_eatClassSetOperand(e),!r)return t;if(r===Ce)t=Ce}};N.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var n=e.lastIntValue;if(r!==-1&&n!==-1&&r>n)e.raise("Range out of order in character class");return!0}e.pos=t}return!1};N.regexp_eatClassSetOperand=function(e){if(this.regexp_eatClassSetCharacter(e))return Fe;return this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)};N.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var r=e.eat(94),n=this.regexp_classContents(e);if(e.eat(93)){if(r&&n===Ce)e.raise("Negated character class may contain strings");return n}e.pos=t}if(e.eat(92)){var i=this.regexp_eatCharacterClassEscape(e);if(i)return i;e.pos=t}return null};N.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var r=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return r}else e.raise("Invalid escape");e.pos=t}return null};N.regexp_classStringDisjunctionContents=function(e){var t=this.regexp_classString(e);while(e.eat(124))if(this.regexp_classString(e)===Ce)t=Ce;return t};N.regexp_classString=function(e){var t=0;while(this.regexp_eatClassSetCharacter(e))t++;return t===1?Fe:Ce};N.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e))return!0;if(e.eat(98))return e.lastIntValue=8,!0;return e.pos=t,!1}var r=e.current();if(r<0||r===e.lookahead()&&Yc(r))return!1;if(Qc(r))return!1;return e.advance(),e.lastIntValue=r,!0};function Yc(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function Qc(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}N.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();if(Zc(t))return e.lastIntValue=t,e.advance(),!0;return!1};function Zc(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}N.regexp_eatClassControlLetter=function(e){var t=e.current();if(ar(t)||t===95)return e.lastIntValue=t%32,e.advance(),!0;return!1};N.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;if(e.switchU)e.raise("Invalid escape");e.pos=t}return!1};N.regexp_eatDecimalDigits=function(e){var t=e.pos,r=0;e.lastIntValue=0;while(ar(r=e.current()))e.lastIntValue=10*e.lastIntValue+(r-48),e.advance();return e.pos!==t};function ar(e){return e>=48&&e<=57}N.regexp_eatHexDigits=function(e){var t=e.pos,r=0;e.lastIntValue=0;while(Ts(r=e.current()))e.lastIntValue=16*e.lastIntValue+Es(r),e.advance();return e.pos!==t};function Ts(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function Es(e){if(e>=65&&e<=70)return 10+(e-65);if(e>=97&&e<=102)return 10+(e-97);return e-48}N.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var r=e.lastIntValue;if(t<=3&&this.regexp_eatOctalDigit(e))e.lastIntValue=t*64+r*8+e.lastIntValue;else e.lastIntValue=t*8+r}else e.lastIntValue=t;return!0}return!1};N.regexp_eatOctalDigit=function(e){var t=e.current();if(Ss(t))return e.lastIntValue=t-48,e.advance(),!0;return e.lastIntValue=0,!1};function Ss(e){return e>=48&&e<=55}N.regexp_eatFixedHexDigits=function(e,t){var r=e.pos;e.lastIntValue=0;for(var n=0;n<t;++n){var i=e.current();if(!Ts(i))return e.pos=r,!1;e.lastIntValue=16*e.lastIntValue+Es(i),e.advance()}return!0};var or=function(t){if(this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,t.options.locations)this.loc=new kt(t,t.startLoc,t.endLoc);if(t.options.ranges)this.range=[t.start,t.end]},W=ne.prototype;W.next=function(e){if(!e&&this.type.keyword&&this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword);if(this.options.onToken)this.options.onToken(new or(this));this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()};W.getToken=function(){return this.next(),new or(this)};if(typeof Symbol<"u")W[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===h.eof,value:t}}}};W.nextToken=function(){var e=this.curContext();if(!e||!e.preserveSpace)this.skipSpace();if(this.start=this.pos,this.options.locations)this.startLoc=this.curPosition();if(this.pos>=this.input.length)return this.finishToken(h.eof);if(e.override)return e.override(this);else this.readToken(this.fullCharCodeAtPos())};W.readToken=function(e){if(he(e,this.options.ecmaVersion>=6)||e===92)return this.readWord();return this.getTokenFromCode(e)};W.fullCharCodeAt=function(e){var t=this.input.charCodeAt(e);if(t<=55295||t>=56320)return t;var r=this.input.charCodeAt(e+1);return r<=56319||r>=57344?t:(t<<10)+r-56613888};W.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)};W.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,r=this.input.indexOf("*/",this.pos+=2);if(r===-1)this.raise(this.pos-2,"Unterminated comment");if(this.pos=r+2,this.options.locations)for(var n=void 0,i=t;(n=Ki(this.input,i,this.pos))>-1;)++this.curLine,i=this.lineStart=n;if(this.options.onComment)this.options.onComment(!0,this.input.slice(t+2,r),t,this.pos,e,this.curPosition())};W.skipLineComment=function(e){var t=this.pos,r=this.options.onComment&&this.curPosition(),n=this.input.charCodeAt(this.pos+=e);while(this.pos<this.input.length&&!Ze(n))n=this.input.charCodeAt(++this.pos);if(this.options.onComment)this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,r,this.curPosition())};W.skipSpace=function(){e:while(this.pos<this.input.length){var e=this.input.charCodeAt(this.pos);switch(e){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(e>8&&e<14||e>=5760&&Kr.test(String.fromCharCode(e)))++this.pos;else break e}}};W.finishToken=function(e,t){if(this.end=this.pos,this.options.locations)this.endLoc=this.curPosition();var r=this.type;this.type=e,this.value=t,this.updateContext(r)};W.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);if(this.options.ecmaVersion>=6&&e===46&&t===46)return this.pos+=3,this.finishToken(h.ellipsis);else return++this.pos,this.finishToken(h.dot)};W.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);if(this.exprAllowed)return++this.pos,this.readRegexp();if(e===61)return this.finishOp(h.assign,2);return this.finishOp(h.slash,1)};W.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),r=1,n=e===42?h.star:h.modulo;if(this.options.ecmaVersion>=7&&e===42&&t===42)++r,n=h.starstar,t=this.input.charCodeAt(this.pos+2);if(t===61)return this.finishOp(h.assign,r+1);return this.finishOp(n,r)};W.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12){var r=this.input.charCodeAt(this.pos+2);if(r===61)return this.finishOp(h.assign,3)}return this.finishOp(e===124?h.logicalOR:h.logicalAND,2)}if(t===61)return this.finishOp(h.assign,2);return this.finishOp(e===124?h.bitwiseOR:h.bitwiseAND,1)};W.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);if(e===61)return this.finishOp(h.assign,2);return this.finishOp(h.bitwiseXOR,1)};W.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||de.test(this.input.slice(this.lastTokEnd,this.pos))))return this.skipLineComment(3),this.skipSpace(),this.nextToken();return this.finishOp(h.incDec,2)}if(t===61)return this.finishOp(h.assign,2);return this.finishOp(h.plusMin,1)};W.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),r=1;if(t===e){if(r=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+r)===61)return this.finishOp(h.assign,r+1);return this.finishOp(h.bitShift,r)}if(t===33&&e===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(t===61)r=2;return this.finishOp(h.relational,r)};W.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===61)return this.finishOp(h.equality,this.input.charCodeAt(this.pos+2)===61?3:2);if(e===61&&t===62&&this.options.ecmaVersion>=6)return this.pos+=2,this.finishToken(h.arrow);return this.finishOp(e===61?h.eq:h.prefix,1)};W.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var r=this.input.charCodeAt(this.pos+2);if(r<48||r>57)return this.finishOp(h.questionDot,2)}if(t===63){if(e>=12){var n=this.input.charCodeAt(this.pos+2);if(n===61)return this.finishOp(h.assign,3)}return this.finishOp(h.coalesce,2)}}return this.finishOp(h.question,1)};W.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13){if(++this.pos,t=this.fullCharCodeAtPos(),he(t,!0)||t===92)return this.finishToken(h.privateId,this.readWord1())}this.raise(this.pos,"Unexpected character '"+Be(t)+"'")};W.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(h.parenL);case 41:return++this.pos,this.finishToken(h.parenR);case 59:return++this.pos,this.finishToken(h.semi);case 44:return++this.pos,this.finishToken(h.comma);case 91:return++this.pos,this.finishToken(h.bracketL);case 93:return++this.pos,this.finishToken(h.bracketR);case 123:return++this.pos,this.finishToken(h.braceL);case 125:return++this.pos,this.finishToken(h.braceR);case 58:return++this.pos,this.finishToken(h.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(h.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===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(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(h.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+Be(e)+"'")};W.finishOp=function(e,t){var r=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,r)};W.readRegexp=function(){var e,t,r=this.pos;for(;;){if(this.pos>=this.input.length)this.raise(r,"Unterminated regular expression");var n=this.input.charAt(this.pos);if(de.test(n))this.raise(r,"Unterminated regular expression");if(!e){if(n==="[")t=!0;else if(n==="]"&&t)t=!1;else if(n==="/"&&!t)break;e=n==="\\"}else e=!1;++this.pos}var i=this.input.slice(r,this.pos);++this.pos;var o=this.pos,a=this.readWord1();if(this.containsEsc)this.unexpected(o);var p=this.regexpState||(this.regexpState=new Re(this));p.reset(r,i,a),this.validateRegExpFlags(p),this.validateRegExpPattern(p);var l=null;try{l=new RegExp(i,a)}catch(m){}return this.finishToken(h.regexp,{pattern:i,flags:a,value:l})};W.readInt=function(e,t,r){var n=this.options.ecmaVersion>=12&&t===void 0,i=r&&this.input.charCodeAt(this.pos)===48,o=this.pos,a=0,p=0;for(var l=0,m=t==null?1/0:t;l<m;++l,++this.pos){var d=this.input.charCodeAt(this.pos),b=void 0;if(n&&d===95){if(i)this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals");if(p===95)this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore");if(l===0)this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits");p=d;continue}if(d>=97)b=d-97+10;else if(d>=65)b=d-65+10;else if(d>=48&&d<=57)b=d-48;else b=1/0;if(b>=e)break;p=d,a=a*e+b}if(n&&p===95)this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits");if(this.pos===o||t!=null&&this.pos-o!==t)return null;return a};function ep(e,t){if(t)return parseInt(e,8);return parseFloat(e.replace(/_/g,""))}function vs(e){if(typeof BigInt!=="function")return null;return BigInt(e.replace(/_/g,""))}W.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var r=this.readInt(e);if(r==null)this.raise(this.start+2,"Expected number in radix "+e);if(this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110)r=vs(this.input.slice(t,this.pos)),++this.pos;else if(he(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");return this.finishToken(h.num,r)};W.readNumber=function(e){var t=this.pos;if(!e&&this.readInt(10,void 0,!0)===null)this.raise(t,"Invalid number");var r=this.pos-t>=2&&this.input.charCodeAt(t)===48;if(r&&this.strict)this.raise(t,"Invalid number");var n=this.input.charCodeAt(this.pos);if(!r&&!e&&this.options.ecmaVersion>=11&&n===110){var i=vs(this.input.slice(t,this.pos));if(++this.pos,he(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");return this.finishToken(h.num,i)}if(r&&/[89]/.test(this.input.slice(t,this.pos)))r=!1;if(n===46&&!r)++this.pos,this.readInt(10),n=this.input.charCodeAt(this.pos);if((n===69||n===101)&&!r){if(n=this.input.charCodeAt(++this.pos),n===43||n===45)++this.pos;if(this.readInt(10)===null)this.raise(t,"Invalid number")}if(he(this.fullCharCodeAtPos()))this.raise(this.pos,"Identifier directly after number");var o=ep(this.input.slice(t,this.pos),r);return this.finishToken(h.num,o)};W.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){if(this.options.ecmaVersion<6)this.unexpected();var r=++this.pos;if(t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111)this.invalidStringToken(r,"Code point out of bounds")}else t=this.readHexChar(4);return t};W.readString=function(e){var t="",r=++this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated string constant");var n=this.input.charCodeAt(this.pos);if(n===e)break;if(n===92)t+=this.input.slice(r,this.pos),t+=this.readEscapedChar(!1),r=this.pos;else if(n===8232||n===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(Ze(n))this.raise(this.start,"Unterminated string constant");++this.pos}}return t+=this.input.slice(r,this.pos++),this.finishToken(h.string,t)};var Cs={};W.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===Cs)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1};W.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Cs;else this.raise(e,t)};W.readTmplToken=function(){var e="",t=this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated template");var r=this.input.charCodeAt(this.pos);if(r===96||r===36&&this.input.charCodeAt(this.pos+1)===123){if(this.pos===this.start&&(this.type===h.template||this.type===h.invalidTemplate))if(r===36)return this.pos+=2,this.finishToken(h.dollarBraceL);else return++this.pos,this.finishToken(h.backQuote);return e+=this.input.slice(t,this.pos),this.finishToken(h.template,e)}if(r===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(Ze(r)){switch(e+=this.input.slice(t,this.pos),++this.pos,r){case 13:if(this.input.charCodeAt(this.pos)===10)++this.pos;case 10:e+=`
|
|
23
|
+
`;break;default:e+=String.fromCharCode(r);break}if(this.options.locations)++this.curLine,this.lineStart=this.pos;t=this.pos}else++this.pos}};W.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(h.invalidTemplate,this.input.slice(this.start,this.pos));case"\r":if(this.input[this.pos+1]===`
|
|
22
24
|
`)++this.pos;case`
|
|
23
25
|
`:case"\u2028":case"\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template")};W.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
|
|
24
|
-
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return Be(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(e){var r=this.pos-1;this.invalidStringToken(r,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var n=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(n,8);if(i>255)n=n.slice(0,-1),i=parseInt(n,8);if(this.pos+=n.length-1,t=this.input.charCodeAt(this.pos),(n!=="0"||t===56||t===57)&&(this.strict||e))this.invalidStringToken(this.pos-1-n.length,e?"Octal literal in template string":"Octal literal in strict mode");return String.fromCharCode(i)}if(Qe(t)){if(this.options.locations)this.lineStart=this.pos,++this.curLine;return""}return String.fromCharCode(t)}};W.readHexChar=function(e){var t=this.pos,r=this.readInt(16,e);if(r===null)this.invalidStringToken(t,"Bad character escape sequence");return r};W.readWord1=function(){this.containsEsc=!1;var e="",t=!0,r=this.pos,n=this.options.ecmaVersion>=6;while(this.pos<this.input.length){var i=this.fullCharCodeAtPos();if(ye(i,n))this.pos+=i<=65535?1:2;else if(i===92){this.containsEsc=!0,e+=this.input.slice(r,this.pos);var o=this.pos;if(this.input.charCodeAt(++this.pos)!==117)this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX");++this.pos;var a=this.readCodePoint();if(!(t?he:ye)(a,n))this.invalidStringToken(o,"Invalid Unicode escape");e+=Be(a),r=this.pos}else break;t=!1}return e+this.input.slice(r,this.pos)};W.readWord=function(){var e=this.readWord1(),t=d.name;if(this.keywords.test(e))t=rr[e];return this.finishToken(t,e)};var xs="8.18.0";ne.acorn={Parser:ne,version:xs,defaultOptions:Yt,Position:st,SourceLocation:Pt,getLineInfo:Kr,Node:kt,TokenType:z,tokTypes:d,keywordTypes:rr,TokContext:Se,tokContexts:re,isIdentifierChar:ye,isIdentifierStart:he,Token:or,isNewLine:Qe,lineBreak:de,lineBreakG:Vi,nonASCIIwhitespace:Wr};function Jc(e,t){return ne.parse(e,t)}function Yc(e,t,r){return ne.parseExpressionAt(e,t,r)}function Qc(e,t){return ne.tokenizer(e,t)}var ge=!0,Zc=new WeakMap;function ep(e){let t=e.Parser.acorn||e,r=Zc.get(t);if(!r){let p=function(O){return O===T.name||O===T.string||O===T.num||B.includes(O)||F.includes(O)},u=function(O){return O===T.name||B.includes(O)||F.includes(O)},m=function(O){return O===T.name||F.includes(O)},f=function(O){return O===C.abstract||O===C.declare||O===C.enum||O===C.module||O===C.namespace||O===C.interface||O===C.type},b=function(O){return O===C.keyof||O===C.readonly||O===C.unique},E=function(O){return O===T.invalidTemplate},{tokTypes:T,keywordTypes:w}=t,B=Object.values(w),C=a(),F=Object.values(C),V=o(),L=i(),X=new RegExp(`^(?:${Object.keys(C).join("|")})$`);V.jsxTagStart.updateContext=function(){this.context.push(L.tc_expr),this.context.push(L.tc_oTag),this.exprAllowed=!1},V.jsxTagEnd.updateContext=function(O){let Q=this.context.pop();if(Q===L.tc_oTag&&O===T.slash||Q===L.tc_cTag)this.context.pop(),this.exprAllowed=this.curContext()===L.tc_expr;else this.exprAllowed=!0},r={tokTypes:{...C,...V},tokContexts:{...L},keywordsRegExp:X,tokenIsLiteralPropertyName:p,tokenIsKeywordOrIdentifier:u,tokenIsIdentifier:m,tokenIsTSDeclarationStart:f,tokenIsTSTypeOperator:b,tokenIsTemplate:E}}return r;function n(p,u={}){return new t.TokenType("name",u)}function i(){return{tc_oTag:new t.TokContext("<tag",!1,!1),tc_cTag:new t.TokContext("</tag",!1,!1),tc_expr:new t.TokContext("<tag>...</tag>",!0,!0)}}function o(){return{at:new t.TokenType("@"),jsxName:new t.TokenType("jsxName"),jsxText:new t.TokenType("jsxText",{beforeExpr:!0}),jsxTagStart:new t.TokenType("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new t.TokenType("jsxTagEnd")}}function a(){return{assert:n("assert",{startsExpr:ge}),asserts:n("asserts",{startsExpr:ge}),global:n("global",{startsExpr:ge}),keyof:n("keyof",{startsExpr:ge}),readonly:n("readonly",{startsExpr:ge}),unique:n("unique",{startsExpr:ge}),abstract:n("abstract",{startsExpr:ge}),declare:n("declare",{startsExpr:ge}),enum:n("enum",{startsExpr:ge}),module:n("module",{startsExpr:ge}),namespace:n("namespace",{startsExpr:ge}),interface:n("interface",{startsExpr:ge}),type:n("type",{startsExpr:ge})}}}var tp=512,Nt=1024,ct=1,lr=2,rp=4,rn=8,np=16,Cs=64,Ps=128,ip=256,sp=512,As=1024,ad=ct|lr|rn|Ps,od=ct|0|rn|0,cd=ct|0|rp|0,pd=ct|0|np|0,ld=0|lr|0|Ps,ud=0|lr|0|0,ap=ct|lr|rn|ip,hd=0|As,dd=0|Cs,fd=ct|0|0|Cs,md=ap|sp,yd=0|As,ks=4,ws=2,Ns=1,gd=ws|Ns,xd=ws|ks,bd=Ns|ks,op=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/y,bs=new RegExp("(?=("+op.source+"))\\1"+/(?=[\n\r\u2028\u2029]|\/\*(?!.*?\*\/)|$)/.source,"y"),_t=class{constructor(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1}};function cp(e,t){let r=t.key.name,n=e[r],i="true";if(t.type==="MethodDefinition"&&(t.kind==="get"||t.kind==="set"))i=(t.static?"s":"i")+t.kind;if(n==="iget"&&i==="iset"||n==="iset"&&i==="iget"||n==="sget"&&i==="sset"||n==="sset"&&i==="sget")return e[r]="true",!1;else if(!n)return e[r]=i,!1;else return!0}function Ts(e,t){let{computed:r,key:n}=e;return!r&&(n.type==="Identifier"&&n.name===t||n.type==="Literal"&&n.value===t)}var D={AbstractMethodHasImplementation:({methodName:e})=>`Method '${e}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:e})=>`Property '${e}' cannot have an initializer because it is marked abstract.`,AccesorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccesorCannotHaveTypeParameters:"An accessor cannot have type parameters.",CannotFindName:({name:e})=>`Cannot find name '${e}'.`,ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:e})=>`'declare' is not allowed in ${e}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:()=>"Accessibility modifier already seen.",DuplicateModifier:({modifier:e})=>`Duplicate modifier: '${e}'.`,EmptyHeritageClauseType:({token:e})=>`'${e}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",IncompatibleModifiers:({modifiers:e})=>`'${e[0]}' modifier cannot be used with '${e[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:e})=>`Index signatures cannot have an accessibility modifier ('${e}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidModifierOnTypeMember:({modifier:e})=>`'${e}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:e})=>`'${e}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:e})=>`'${e}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifiersOrder:({orderedModifiers:e})=>`'${e[0]}' modifier must precede '${e[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifer:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:e})=>`Private elements cannot have an accessibility modifier ('${e}').`,PrivateMethodsHasAccessibility:({modifier:e})=>`Private methods cannot have an accessibility modifier ('${e}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccesorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccesorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccesorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:e})=>`Single type parameter ${e} should have a trailing comma. Example usage: <${e},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",GenericsEndWithComma:"Trailing comma is not allowed at the end of generics.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type:e})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${e}.`,LetInLexicalBinding:"'let' is not allowed to be used as a name in 'let' or 'const' declarations."},pr={UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",TrailingDecorator:"Decorators must be attached to a class element.",SpreadElementDecorator:"Decorators can't be used with SpreadElement"};function pp(e,t,r){let{tokTypes:n}=r,{tokTypes:i}=t;return class extends e{takeDecorators(a){let p=this.decoratorStack[this.decoratorStack.length-1];if(p.length)a.decorators=p,this.resetStartLocationFromNode(a,p[0]),this.decoratorStack[this.decoratorStack.length-1]=[]}parseDecorators(a){let p=this.decoratorStack[this.decoratorStack.length-1];while(this.match(i.at)){let u=this.parseDecorator();p.push(u)}if(this.match(n._export)){if(!a)this.unexpected()}else if(!this.canHaveLeadingDecorator())this.raise(this.start,pr.UnexpectedLeadingDecorator)}parseDecorator(){let a=this.startNode();this.next(),this.decoratorStack.push([]);let p=this.start,u=this.startLoc,m;if(this.match(n.parenL)){let f=this.start,b=this.startLoc;if(this.next(),m=this.parseExpression(),this.expect(n.parenR),this.options.preserveParens){let E=this.startNodeAt(f,b);E.expression=m,m=this.finishNode(E,"ParenthesizedExpression")}}else{m=this.parseIdent(!1);while(this.eat(n.dot)){let f=this.startNodeAt(p,u);f.object=m,f.property=this.parseIdent(!0),f.computed=!1,m=this.finishNode(f,"MemberExpression")}}return a.expression=this.parseMaybeDecoratorArguments(m),this.decoratorStack.pop(),this.finishNode(a,"Decorator")}parseMaybeDecoratorArguments(a){if(this.eat(n.parenL)){let p=this.startNodeAtNode(a);return p.callee=a,p.arguments=this.parseExprList(n.parenR,!1),this.finishNode(p,"CallExpression")}return a}}}var lp={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"},up=/^[\da-fA-F]+$/,hp=/^\d+$/;function It(e){if(!e)return e;if(e.type==="JSXIdentifier")return e.name;if(e.type==="JSXNamespacedName")return e.namespace.name+":"+e.name.name;if(e.type==="JSXMemberExpression")return It(e.object)+"."+It(e.property)}function dp(e,t,r,n){let i=e.tokTypes,o=t.tokTypes,a=e.isNewLine,p=e.isIdentifierChar,u=Object.assign({allowNamespaces:!0,allowNamespacedObjects:!0},n||{});return class extends r{jsx_readToken(){let f="",b=this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated JSX contents");let E=this.input.charCodeAt(this.pos);switch(E){case 60:case 123:if(this.pos===this.start){if(E===60&&this.exprAllowed)return++this.pos,this.finishToken(o.jsxTagStart);return this.getTokenFromCode(E)}return f+=this.input.slice(b,this.pos),this.finishToken(o.jsxText,f);case 38:f+=this.input.slice(b,this.pos),f+=this.jsx_readEntity(),b=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(E===62?">":"}")+'` or `{"'+this.input[this.pos]+'"}`?');default:if(a(E))f+=this.input.slice(b,this.pos),f+=this.jsx_readNewLine(!0),b=this.pos;else++this.pos}}}jsx_readNewLine(f){let b=this.input.charCodeAt(this.pos),E;if(++this.pos,b===13&&this.input.charCodeAt(this.pos)===10)++this.pos,E=f?`
|
|
26
|
+
`;case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return Be(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(e){var r=this.pos-1;this.invalidStringToken(r,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var n=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(n,8);if(i>255)n=n.slice(0,-1),i=parseInt(n,8);if(this.pos+=n.length-1,t=this.input.charCodeAt(this.pos),(n!=="0"||t===56||t===57)&&(this.strict||e))this.invalidStringToken(this.pos-1-n.length,e?"Octal literal in template string":"Octal literal in strict mode");return String.fromCharCode(i)}if(Ze(t)){if(this.options.locations)this.lineStart=this.pos,++this.curLine;return""}return String.fromCharCode(t)}};W.readHexChar=function(e){var t=this.pos,r=this.readInt(16,e);if(r===null)this.invalidStringToken(t,"Bad character escape sequence");return r};W.readWord1=function(){this.containsEsc=!1;var e="",t=!0,r=this.pos,n=this.options.ecmaVersion>=6;while(this.pos<this.input.length){var i=this.fullCharCodeAtPos();if(ye(i,n))this.pos+=i<=65535?1:2;else if(i===92){this.containsEsc=!0,e+=this.input.slice(r,this.pos);var o=this.pos;if(this.input.charCodeAt(++this.pos)!==117)this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX");++this.pos;var a=this.readCodePoint();if(!(t?he:ye)(a,n))this.invalidStringToken(o,"Invalid Unicode escape");e+=Be(a),r=this.pos}else break;t=!1}return e+this.input.slice(r,this.pos)};W.readWord=function(){var e=this.readWord1(),t=h.name;if(this.keywords.test(e))t=rr[e];return this.finishToken(t,e)};var As="8.18.0";ne.acorn={Parser:ne,version:As,defaultOptions:Yt,Position:at,SourceLocation:kt,getLineInfo:zr,Node:_t,TokenType:z,tokTypes:h,keywordTypes:rr,TokContext:ve,tokContexts:te,isIdentifierChar:ye,isIdentifierStart:he,Token:or,isNewLine:Ze,lineBreak:de,lineBreakG:Wi,nonASCIIwhitespace:Kr};function tp(e,t){return ne.parse(e,t)}function rp(e,t,r){return ne.parseExpressionAt(e,t,r)}function np(e,t){return ne.tokenizer(e,t)}var ge=!0,ip=new WeakMap;function sp(e){let t=e.Parser.acorn||e,r=ip.get(t);if(!r){let p=function(M){return M===E.name||M===E.string||M===E.num||B.includes(M)||V.includes(M)},l=function(M){return M===E.name||B.includes(M)||V.includes(M)},m=function(M){return M===E.name||V.includes(M)},d=function(M){return M===C.abstract||M===C.declare||M===C.enum||M===C.module||M===C.namespace||M===C.interface||M===C.type},b=function(M){return M===C.keyof||M===C.readonly||M===C.unique},T=function(M){return M===E.invalidTemplate},{tokTypes:E,keywordTypes:k}=t,B=Object.values(k),C=a(),V=Object.values(C),j=o(),D=i(),X=new RegExp(`^(?:${Object.keys(C).join("|")})$`);j.jsxTagStart.updateContext=function(){this.context.push(D.tc_expr),this.context.push(D.tc_oTag),this.exprAllowed=!1},j.jsxTagEnd.updateContext=function(M){let Q=this.context.pop();if(Q===D.tc_oTag&&M===E.slash||Q===D.tc_cTag)this.context.pop(),this.exprAllowed=this.curContext()===D.tc_expr;else this.exprAllowed=!0},r={tokTypes:{...C,...j},tokContexts:{...D},keywordsRegExp:X,tokenIsLiteralPropertyName:p,tokenIsKeywordOrIdentifier:l,tokenIsIdentifier:m,tokenIsTSDeclarationStart:d,tokenIsTSTypeOperator:b,tokenIsTemplate:T}}return r;function n(p,l={}){return new t.TokenType("name",l)}function i(){return{tc_oTag:new t.TokContext("<tag",!1,!1),tc_cTag:new t.TokContext("</tag",!1,!1),tc_expr:new t.TokContext("<tag>...</tag>",!0,!0)}}function o(){return{at:new t.TokenType("@"),jsxName:new t.TokenType("jsxName"),jsxText:new t.TokenType("jsxText",{beforeExpr:!0}),jsxTagStart:new t.TokenType("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new t.TokenType("jsxTagEnd")}}function a(){return{assert:n("assert",{startsExpr:ge}),asserts:n("asserts",{startsExpr:ge}),global:n("global",{startsExpr:ge}),keyof:n("keyof",{startsExpr:ge}),readonly:n("readonly",{startsExpr:ge}),unique:n("unique",{startsExpr:ge}),abstract:n("abstract",{startsExpr:ge}),declare:n("declare",{startsExpr:ge}),enum:n("enum",{startsExpr:ge}),module:n("module",{startsExpr:ge}),namespace:n("namespace",{startsExpr:ge}),interface:n("interface",{startsExpr:ge}),type:n("type",{startsExpr:ge})}}}var ap=512,It=1024,pt=1,lr=2,op=4,nn=8,cp=16,Is=64,Ls=128,pp=256,lp=512,Ds=1024,ld=pt|lr|nn|Ls,ud=pt|0|nn|0,hd=pt|0|op|0,dd=pt|0|cp|0,fd=0|lr|0|Ls,md=0|lr|0|0,up=pt|lr|nn|pp,yd=0|Ds,gd=0|Is,xd=pt|0|0|Is,bd=up|lp,Td=0|Ds,Rs=4,Ms=2,Os=1,Ed=Ms|Os,Sd=Ms|Rs,vd=Os|Rs,hp=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/y,Ps=new RegExp("(?=("+hp.source+"))\\1"+/(?=[\n\r\u2028\u2029]|\/\*(?!.*?\*\/)|$)/.source,"y"),Lt=class{constructor(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1}};function dp(e,t){let r=t.key.name,n=e[r],i="true";if(t.type==="MethodDefinition"&&(t.kind==="get"||t.kind==="set"))i=(t.static?"s":"i")+t.kind;if(n==="iget"&&i==="iset"||n==="iset"&&i==="iget"||n==="sget"&&i==="sset"||n==="sset"&&i==="sget")return e[r]="true",!1;else if(!n)return e[r]=i,!1;else return!0}function ks(e,t){let{computed:r,key:n}=e;return!r&&(n.type==="Identifier"&&n.name===t||n.type==="Literal"&&n.value===t)}var L={AbstractMethodHasImplementation:({methodName:e})=>`Method '${e}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:e})=>`Property '${e}' cannot have an initializer because it is marked abstract.`,AccesorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccesorCannotHaveTypeParameters:"An accessor cannot have type parameters.",CannotFindName:({name:e})=>`Cannot find name '${e}'.`,ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:e})=>`'declare' is not allowed in ${e}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:()=>"Accessibility modifier already seen.",DuplicateModifier:({modifier:e})=>`Duplicate modifier: '${e}'.`,EmptyHeritageClauseType:({token:e})=>`'${e}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",IncompatibleModifiers:({modifiers:e})=>`'${e[0]}' modifier cannot be used with '${e[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:e})=>`Index signatures cannot have an accessibility modifier ('${e}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidModifierOnTypeMember:({modifier:e})=>`'${e}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:e})=>`'${e}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:e})=>`'${e}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifiersOrder:({orderedModifiers:e})=>`'${e[0]}' modifier must precede '${e[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifer:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:e})=>`Private elements cannot have an accessibility modifier ('${e}').`,PrivateMethodsHasAccessibility:({modifier:e})=>`Private methods cannot have an accessibility modifier ('${e}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccesorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccesorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccesorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:e})=>`Single type parameter ${e} should have a trailing comma. Example usage: <${e},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TypeAnnotationAfterAssign:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeImportCannotSpecifyDefaultAndNamed:"A type-only import can specify a default import or named bindings, but not both.",TypeModifierIsUsedInTypeExports:"The 'type' modifier cannot be used on a named export when 'export type' is used on its export statement.",TypeModifierIsUsedInTypeImports:"The 'type' modifier cannot be used on a named import when 'import type' is used on its import statement.",UnexpectedParameterModifier:"A parameter property is only allowed in a constructor implementation.",UnexpectedReadonly:"'readonly' type modifier is only permitted on array and tuple literal types.",GenericsEndWithComma:"Trailing comma is not allowed at the end of generics.",UnexpectedTypeAnnotation:"Did not expect a type annotation here.",UnexpectedTypeCastInParameter:"Unexpected type cast in parameter position.",UnsupportedImportTypeArgument:"Argument in a type import must be a string literal.",UnsupportedParameterPropertyKind:"A parameter property may not be declared using a binding pattern.",UnsupportedSignatureParameterKind:({type:e})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${e}.`,LetInLexicalBinding:"'let' is not allowed to be used as a name in 'let' or 'const' declarations."},pr={UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",TrailingDecorator:"Decorators must be attached to a class element.",SpreadElementDecorator:"Decorators can't be used with SpreadElement"};function fp(e,t,r){let{tokTypes:n}=r,{tokTypes:i}=t;return class extends e{takeDecorators(a){let p=this.decoratorStack[this.decoratorStack.length-1];if(p.length)a.decorators=p,this.resetStartLocationFromNode(a,p[0]),this.decoratorStack[this.decoratorStack.length-1]=[]}parseDecorators(a){let p=this.decoratorStack[this.decoratorStack.length-1];while(this.match(i.at)){let l=this.parseDecorator();p.push(l)}if(this.match(n._export)){if(!a)this.unexpected()}else if(!this.canHaveLeadingDecorator())this.raise(this.start,pr.UnexpectedLeadingDecorator)}parseDecorator(){let a=this.startNode();this.next(),this.decoratorStack.push([]);let p=this.start,l=this.startLoc,m;if(this.match(n.parenL)){let d=this.start,b=this.startLoc;if(this.next(),m=this.parseExpression(),this.expect(n.parenR),this.options.preserveParens){let T=this.startNodeAt(d,b);T.expression=m,m=this.finishNode(T,"ParenthesizedExpression")}}else{m=this.parseIdent(!1);while(this.eat(n.dot)){let d=this.startNodeAt(p,l);d.object=m,d.property=this.parseIdent(!0),d.computed=!1,m=this.finishNode(d,"MemberExpression")}}return a.expression=this.parseMaybeDecoratorArguments(m),this.decoratorStack.pop(),this.finishNode(a,"Decorator")}parseMaybeDecoratorArguments(a){if(this.eat(n.parenL)){let p=this.startNodeAtNode(a);return p.callee=a,p.arguments=this.parseExprList(n.parenR,!1),this.finishNode(p,"CallExpression")}return a}}}var mp={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"},yp=/^[\da-fA-F]+$/,gp=/^\d+$/;function Dt(e){if(!e)return e;if(e.type==="JSXIdentifier")return e.name;if(e.type==="JSXNamespacedName")return e.namespace.name+":"+e.name.name;if(e.type==="JSXMemberExpression")return Dt(e.object)+"."+Dt(e.property)}function xp(e,t,r,n){let i=e.tokTypes,o=t.tokTypes,{isNewLine:a,isIdentifierChar:p}=e,l=Object.assign({allowNamespaces:!0,allowNamespacedObjects:!0},n||{});return class extends r{jsx_readToken(){let d="",b=this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated JSX contents");let T=this.input.charCodeAt(this.pos);switch(T){case 60:case 123:if(this.pos===this.start){if(T===60&&this.exprAllowed)return++this.pos,this.finishToken(o.jsxTagStart);return this.getTokenFromCode(T)}return d+=this.input.slice(b,this.pos),this.finishToken(o.jsxText,d);case 38:d+=this.input.slice(b,this.pos),d+=this.jsx_readEntity(),b=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(T===62?">":"}")+'` or `{"'+this.input[this.pos]+'"}`?');default:if(a(T))d+=this.input.slice(b,this.pos),d+=this.jsx_readNewLine(!0),b=this.pos;else++this.pos}}}jsx_readNewLine(d){let b=this.input.charCodeAt(this.pos),T;if(++this.pos,b===13&&this.input.charCodeAt(this.pos)===10)++this.pos,T=d?`
|
|
25
27
|
`:`\r
|
|
26
|
-
`;else E=String.fromCharCode(b);if(this.options.locations)++this.curLine,this.lineStart=this.pos;return E}jsx_readString(f){let b="",E=++this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated string constant");let T=this.input.charCodeAt(this.pos);if(T===f)break;if(T===38)b+=this.input.slice(E,this.pos),b+=this.jsx_readEntity(),E=this.pos;else if(a(T))b+=this.input.slice(E,this.pos),b+=this.jsx_readNewLine(!1),E=this.pos;else++this.pos}return b+=this.input.slice(E,this.pos++),this.finishToken(i.string,b)}jsx_readEntity(){let f="",b=0,E,T=this.input[this.pos];if(T!=="&")this.raise(this.pos,"Entity must start with an ampersand");let w=++this.pos;while(this.pos<this.input.length&&b++<10){if(T=this.input[this.pos++],T===";"){if(f[0]==="#"){if(f[1]==="x"){if(f=f.substr(2),up.test(f))E=String.fromCharCode(parseInt(f,16))}else if(f=f.substr(1),hp.test(f))E=String.fromCharCode(parseInt(f,10))}else E=lp[f];break}f+=T}if(!E)return this.pos=w,"&";return E}jsx_readWord(){let f,b=this.pos;do f=this.input.charCodeAt(++this.pos);while(p(f)||f===45);return this.finishToken(o.jsxName,this.input.slice(b,this.pos))}jsx_parseIdentifier(){let f=this.startNode();if(this.type===o.jsxName)f.name=this.value;else if(this.type.keyword)f.name=this.type.keyword;else this.unexpected();return this.next(),this.finishNode(f,"JSXIdentifier")}jsx_parseNamespacedName(){let f=this.start,b=this.startLoc,E=this.jsx_parseIdentifier();if(!u.allowNamespaces||!this.eat(i.colon))return E;var T=this.startNodeAt(f,b);return T.namespace=E,T.name=this.jsx_parseIdentifier(),this.finishNode(T,"JSXNamespacedName")}jsx_parseElementName(){if(this.type===o.jsxTagEnd)return"";let f=this.start,b=this.startLoc,E=this.jsx_parseNamespacedName();if(this.type===i.dot&&E.type==="JSXNamespacedName"&&!u.allowNamespacedObjects)this.unexpected();while(this.eat(i.dot)){let T=this.startNodeAt(f,b);T.object=E,T.property=this.jsx_parseIdentifier(),E=this.finishNode(T,"JSXMemberExpression")}return E}jsx_parseAttributeValue(){switch(this.type){case i.braceL:let f=this.jsx_parseExpressionContainer();if(f.expression.type==="JSXEmptyExpression")this.raise(f.start,"JSX attributes must only be assigned a non-empty expression");return f;case o.jsxTagStart:case i.string:return this.parseExprAtom();default:this.raise(this.start,"JSX value should be either an expression or a quoted JSX text")}}jsx_parseEmptyExpression(){let f=this.startNodeAt(this.lastTokEnd,this.lastTokEndLoc);return this.finishNodeAt(f,"JSXEmptyExpression",this.start,this.startLoc)}jsx_parseExpressionContainer(){let f=this.startNode();return this.next(),f.expression=this.type===i.braceR?this.jsx_parseEmptyExpression():this.parseExpression(),this.expect(i.braceR),this.finishNode(f,"JSXExpressionContainer")}jsx_parseAttribute(){let f=this.startNode();if(this.eat(i.braceL))return this.expect(i.ellipsis),f.argument=this.parseMaybeAssign(),this.expect(i.braceR),this.finishNode(f,"JSXSpreadAttribute");return f.name=this.jsx_parseNamespacedName(),f.value=this.eat(i.eq)?this.jsx_parseAttributeValue():null,this.finishNode(f,"JSXAttribute")}jsx_parseOpeningElementAt(f,b){let E=this.startNodeAt(f,b);E.attributes=[];let T=this.jsx_parseElementName();if(T)E.name=T;while(this.type!==i.slash&&this.type!==o.jsxTagEnd)E.attributes.push(this.jsx_parseAttribute());return E.selfClosing=this.eat(i.slash),this.expect(o.jsxTagEnd),this.finishNode(E,T?"JSXOpeningElement":"JSXOpeningFragment")}jsx_parseClosingElementAt(f,b){let E=this.startNodeAt(f,b),T=this.jsx_parseElementName();if(T)E.name=T;return this.expect(o.jsxTagEnd),this.finishNode(E,T?"JSXClosingElement":"JSXClosingFragment")}jsx_parseElementAt(f,b){let E=this.startNodeAt(f,b),T=[],w=this.jsx_parseOpeningElementAt(f,b),B=null;if(!w.selfClosing){e:for(;;)switch(this.type){case o.jsxTagStart:if(f=this.start,b=this.startLoc,this.next(),this.eat(i.slash)){B=this.jsx_parseClosingElementAt(f,b);break e}T.push(this.jsx_parseElementAt(f,b));break;case o.jsxText:T.push(this.parseExprAtom());break;case i.braceL:T.push(this.jsx_parseExpressionContainer());break;default:this.unexpected()}if(It(B.name)!==It(w.name))this.raise(B.start,"Expected corresponding JSX closing tag for <"+It(w.name)+">")}let C=w.name?"Element":"Fragment";if(E["opening"+C]=w,E["closing"+C]=B,E.children=T,this.type===i.relational&&this.value==="<")this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag");return this.finishNode(E,"JSX"+C)}jsx_parseText(){let f=this.parseLiteral(this.value);return f.type="JSXText",f}jsx_parseElement(){let f=this.start,b=this.startLoc;return this.next(),this.jsx_parseElementAt(f,b)}}}function fp(e,t,r){let{tokTypes:n}=t,{tokTypes:i}=r;return class extends e{parseMaybeImportAttributes(a){if(this.type===i._with||this.type===n.assert){this.next();let p=this.parseImportAttributes();if(p)a.attributes=p}}parseImportAttributes(){this.expect(i.braceL);let a=this.parseWithEntries();return this.expect(i.braceR),a}parseWithEntries(){let a=[],p=new Set;do{if(this.type===i.braceR)break;let u=this.startNode(),m;if(this.type===i.string)m=this.parseLiteral(this.value);else m=this.parseIdent(!0);if(this.next(),u.key=m,p.has(u.key.name))this.raise(this.pos,"Duplicated key in attributes");if(p.add(u.key.name),this.type!==i.string)this.raise(this.pos,"Only string is supported as an attribute value");u.value=this.parseLiteral(this.value),a.push(this.finishNode(u,"ImportAttribute"))}while(this.eat(i.comma));return a}}}var en=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;function vs(e){if(!e)throw Error("Assert fail")}function mp(e){return e==="accessor"}function yp(e){return e==="in"||e==="out"}var cr=1,Es=2,gp=4,Y={SCOPE_TOP:1,SCOPE_FUNCTION:2,SCOPE_ASYNC:4,SCOPE_GENERATOR:8,SCOPE_ARROW:16,SCOPE_SIMPLE_CATCH:32,SCOPE_SUPER:64,SCOPE_DIRECT_SUPER:128,SCOPE_CLASS_STATIC_BLOCK:256,SCOPE_VAR:256,BIND_NONE:0,BIND_VAR:1,BIND_LEXICAL:2,BIND_FUNCTION:3,BIND_SIMPLE_CATCH:4,BIND_OUTSIDE:5,BIND_TS_TYPE:6,BIND_TS_INTERFACE:7,BIND_TS_NAMESPACE:1032,BIND_FLAGS_TS_EXPORT_ONLY:1024,BIND_FLAGS_TS_IMPORT:4096,BIND_FLAGS_TS_ENUM:256,BIND_FLAGS_TS_CONST_ENUM:512,BIND_FLAGS_CLASS:128};function tn(e,t){return Y.SCOPE_FUNCTION|(e?Y.SCOPE_ASYNC:0)|(t?Y.SCOPE_GENERATOR:0)}function xp(e){if(e.type!=="MemberExpression")return!1;let{computed:t,property:r}=e;if(t&&(r.type!=="TemplateLiteral"||r.expressions.length>0))return!1;return _s(e.object)}function _s(e){if(e.type==="Identifier")return!0;if(e.type!=="MemberExpression")return!1;if(e.computed)return!1;return _s(e.object)}function Ss(e){return e==="private"||e==="public"||e==="protected"}function bp(e){return Boolean(e.startsExpr)}function Tp(e){if(e==null)throw Error(`Unexpected ${e} value.`);return e}function vp(e){switch(e){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}function Is(e){let{dts:t=!1}=e||{},r=!!e?.jsx;return function(n){let i=n.acorn||Zr,o=ep(i),a=i.tokTypes,p=i.keywordTypes,u=i.isIdentifierStart,m=i.lineBreak,f=i.isNewLine,b=i.tokContexts,E=i.isIdentifierChar,{tokTypes:T,tokContexts:w,keywordsRegExp:B,tokenIsLiteralPropertyName:C,tokenIsTemplate:F,tokenIsTSDeclarationStart:V,tokenIsIdentifier:L,tokenIsKeywordOrIdentifier:X,tokenIsTSTypeOperator:O}=o;function Q(s,c,l=s.length){for(let h=c;h<l;h++){let y=s.charCodeAt(h);if(f(y))return h<l-1&&y===13&&s.charCodeAt(h+1)===10?h+2:h+1}return-1}if(n=pp(n,o,i),e?.jsx)n=dp(i,o,n,typeof e.jsx==="boolean"?{}:e.jsx);n=fp(n,o,i);class g extends n{constructor(s,c,l){super(s,c,l);this.preValue=null,this.preToken=null,this.isLookahead=!1,this.isAmbientContext=!1,this.inAbstractClass=!1,this.inType=!1,this.inDisallowConditionalTypesContext=!1,this.maybeInArrowParameters=!1,this.shouldParseArrowReturnType=void 0,this.shouldParseAsyncArrowReturnType=void 0,this.decoratorStack=[[]],this.importsStack=[[]],this.importOrExportOuterKind=void 0,this.tsParseConstModifier=(h)=>{this.tsParseModifiers({modified:h,allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:D.InvalidModifierOnTypeParameterPositions})},this.ecmaVersion=this.options.ecmaVersion}static get acornTypeScript(){return o}get acornTypeScript(){return o}getTokenFromCodeInType(s){if(s===62)return this.finishOp(a.relational,1);if(s===60)return this.finishOp(a.relational,1);return super.getTokenFromCode(s)}readToken(s){if(!this.inType){let c=this.curContext();if(c===w.tc_expr)return this.jsx_readToken();if(c===w.tc_oTag||c===w.tc_cTag){if(u(s))return this.jsx_readWord();if(s==62)return++this.pos,this.finishToken(T.jsxTagEnd);if((s===34||s===39)&&c==w.tc_oTag)return this.jsx_readString(s)}if(s===60&&this.exprAllowed&&this.input.charCodeAt(this.pos+1)!==33)if(++this.pos,e?.jsx)return this.finishToken(T.jsxTagStart);else return this.finishToken(a.relational,"<")}return super.readToken(s)}getTokenFromCode(s){if(this.inType)return this.getTokenFromCodeInType(s);if(s===64)return++this.pos,this.finishToken(T.at);return super.getTokenFromCode(s)}isAbstractClass(){return this.ts_isContextual(T.abstract)&&this.lookahead().type===a._class}finishNode(s,c){if(s.type!==""&&s.end!==0)return s;return super.finishNode(s,c)}tryParse(s,c=this.cloneCurLookaheadState()){let l={node:null};try{return{node:s((y=null)=>{throw l.node=y,l}),error:null,thrown:!1,aborted:!1,failState:null}}catch(h){let y=this.getCurLookaheadState();if(this.setLookaheadState(c),h instanceof SyntaxError)return{node:null,error:h,thrown:!0,aborted:!1,failState:y};if(h===l)return{node:l.node,error:null,thrown:!1,aborted:!0,failState:y};throw h}}setOptionalParametersError(s,c){s.optionalParametersLoc=c?.loc??this.startLoc}reScan_lt_gt(){if(this.type===a.relational)this.pos-=1,this.readToken_lt_gt(this.fullCharCodeAtPos())}reScan_lt(){let{type:s}=this;if(s===a.bitShift)return this.pos-=2,this.finishOp(a.relational,1),a.relational;return s}resetEndLocation(s,c=this.lastTokEnd,l=this.lastTokEndLoc){if(s.end=c,s.loc.end=l,this.options.ranges)s.range[1]=c}startNodeAtNode(s){return super.startNodeAt(s.start,s.loc.start)}nextTokenStart(){return this.nextTokenStartSince(this.pos)}tsHasSomeModifiers(s,c){return c.some((l)=>{if(Ss(l))return s.accessibility===l;return!!s[l]})}tsIsStartOfStaticBlocks(){return this.isContextual("static")&&this.lookaheadCharCode()===123}tsCheckForInvalidTypeCasts(s){s.forEach((c)=>{if(c?.type==="TSTypeCastExpression")this.raise(c.typeAnnotation.start,D.UnexpectedTypeAnnotation)})}atPossibleAsyncArrow(s){return s.type==="Identifier"&&s.name==="async"&&this.lastTokEnd===s.end&&!this.canInsertSemicolon()&&s.end-s.start===5&&s.start===this.potentialArrowAt}tsIsIdentifier(){return L(this.type)}tsTryParseTypeOrTypePredicateAnnotation(){return this.match(a.colon)?this.tsParseTypeOrTypePredicateAnnotation(a.colon):void 0}tsTryParseGenericAsyncArrowFunction(s,c,l){if(!this.tsMatchLeftRelational())return;let h=this.maybeInArrowParameters;this.maybeInArrowParameters=!0;let y=this.tsTryParseAndCatch(()=>{let x=this.startNodeAt(s,c);return x.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(x),x.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(a.arrow),x});if(this.maybeInArrowParameters=h,!y)return;return super.parseArrowExpression(y,null,!0,l)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()!==a.relational)return;return this.tsParseTypeArguments()}tsInNoContext(s){let c=this.context;this.context=[c[0]];try{return s()}finally{this.context=c}}tsTryParseTypeAnnotation(){return this.match(a.colon)?this.tsParseTypeAnnotation():void 0}isUnparsedContextual(s,c){let l=s+c.length;if(this.input.slice(s,l)===c){let h=this.input.charCodeAt(l);return!(E(h)||(h&64512)===55296)}return!1}isAbstractConstructorSignature(){return this.ts_isContextual(T.abstract)&&this.lookahead().type===a._new}nextTokenStartSince(s){return en.lastIndex=s,en.test(this.input)?en.lastIndex:s}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}compareLookaheadState(s,c){for(let l of Object.keys(s))if(s[l]!==c[l])return!1;return!0}createLookaheadState(){this.value=null,this.context=[this.curContext()]}getCurLookaheadState(){return{endLoc:this.endLoc,lastTokEnd:this.lastTokEnd,lastTokStart:this.lastTokStart,lastTokStartLoc:this.lastTokStartLoc,pos:this.pos,value:this.value,type:this.type,start:this.start,end:this.end,context:this.context,startLoc:this.startLoc,lastTokEndLoc:this.lastTokEndLoc,curLine:this.curLine,lineStart:this.lineStart,curPosition:this.curPosition,containsEsc:this.containsEsc}}cloneCurLookaheadState(){return{pos:this.pos,value:this.value,type:this.type,start:this.start,end:this.end,context:this.context&&this.context.slice(),startLoc:this.startLoc,lastTokEndLoc:this.lastTokEndLoc,endLoc:this.endLoc,lastTokEnd:this.lastTokEnd,lastTokStart:this.lastTokStart,lastTokStartLoc:this.lastTokStartLoc,curLine:this.curLine,lineStart:this.lineStart,curPosition:this.curPosition,containsEsc:this.containsEsc}}setLookaheadState(s){this.pos=s.pos,this.value=s.value,this.endLoc=s.endLoc,this.lastTokEnd=s.lastTokEnd,this.lastTokStart=s.lastTokStart,this.lastTokStartLoc=s.lastTokStartLoc,this.type=s.type,this.start=s.start,this.end=s.end,this.context=s.context,this.startLoc=s.startLoc,this.lastTokEndLoc=s.lastTokEndLoc,this.curLine=s.curLine,this.lineStart=s.lineStart,this.curPosition=s.curPosition,this.containsEsc=s.containsEsc}tsLookAhead(s){let c=this.getCurLookaheadState(),l=s();return this.setLookaheadState(c),l}lookahead(s){let c=this.getCurLookaheadState();if(this.createLookaheadState(),this.isLookahead=!0,s!==void 0)for(let h=0;h<s;h++)this.nextToken();else this.nextToken();this.isLookahead=!1;let l=this.getCurLookaheadState();return this.setLookaheadState(c),l}readWord(){let s=this.readWord1(),c=a.name;if(this.keywords.test(s))c=p[s];else if(new RegExp(B).test(s))c=T[s];return this.finishToken(c,s)}skipBlockComment(){let s;if(!this.isLookahead)s=this.options.onComment&&this.curPosition();let c=this.pos,l=this.input.indexOf("*/",this.pos+=2);if(l===-1)this.raise(this.pos-2,"Unterminated comment");if(this.pos=l+2,this.options.locations)for(let h,y=c;(h=Q(this.input,y,this.pos))>-1;)++this.curLine,y=this.lineStart=h;if(this.isLookahead)return;if(this.options.onComment)this.options.onComment(!0,this.input.slice(c+2,l),c,this.pos,s,this.curPosition())}skipLineComment(s){let c=this.pos,l;if(!this.isLookahead)l=this.options.onComment&&this.curPosition();let h=this.input.charCodeAt(this.pos+=s);while(this.pos<this.input.length&&!f(h))h=this.input.charCodeAt(++this.pos);if(this.isLookahead)return;if(this.options.onComment)this.options.onComment(!1,this.input.slice(c+s,this.pos),c,this.pos,l,this.curPosition())}finishToken(s,c){if(this.preValue=this.value,this.preToken=this.type,this.end=this.pos,this.options.locations)this.endLoc=this.curPosition();let l=this.type;if(this.type=s,this.value=c,!this.isLookahead)this.updateContext(l)}resetStartLocation(s,c,l){if(s.start=c,s.loc.start=l,this.options.ranges)s.range[0]=c}isLineTerminator(){return this.eat(a.semi)||super.canInsertSemicolon()}hasFollowingLineBreak(){return bs.lastIndex=this.end,bs.test(this.input)}addExtra(s,c,l,h=!0){if(!s)return;let y=s.extra=s.extra||{};if(h)y[c]=l;else Object.defineProperty(y,c,{enumerable:h,value:l})}isLiteralPropertyName(){return C(this.type)}hasPrecedingLineBreak(){return m.test(this.input.slice(this.lastTokEnd,this.start))}createIdentifier(s,c){return s.name=c,this.finishNode(s,"Identifier")}resetStartLocationFromNode(s,c){this.resetStartLocation(s,c.start,c.loc.start)}isThisParam(s){return s.type==="Identifier"&&s.name==="this"}isLookaheadContextual(s){let c=this.nextTokenStart();return this.isUnparsedContextual(c,s)}ts_type_isContextual(s,c){return s===c&&!this.containsEsc}ts_isContextual(s){return this.type===s&&!this.containsEsc}ts_isContextualWithState(s,c){return s.type===c&&!s.containsEsc}isContextualWithState(s,c){return c.type===a.name&&c.value===s&&!c.containsEsc}tsIsStartOfMappedType(){if(this.next(),this.eat(a.plusMin))return this.ts_isContextual(T.readonly);if(this.ts_isContextual(T.readonly))this.next();if(!this.match(a.bracketL))return!1;if(this.next(),!this.tsIsIdentifier())return!1;return this.next(),this.match(a._in)}tsInDisallowConditionalTypesContext(s){let c=this.inDisallowConditionalTypesContext;this.inDisallowConditionalTypesContext=!0;try{return s()}finally{this.inDisallowConditionalTypesContext=c}}tsTryParseType(){return this.tsEatThenParseType(a.colon)}match(s){return this.type===s}matchJsx(s){return this.type===o.tokTypes[s]}ts_eatWithState(s,c,l){let h=l.type;if(s===h){for(let y=0;y<c;y++)this.next();return!0}else return!1}ts_eatContextualWithState(s,c,l){if(B.test(s)){if(this.ts_isContextualWithState(l,T[s])){for(let h=0;h<c;h++)this.next();return!0}return!1}else{if(!this.isContextualWithState(s,l))return!1;for(let h=0;h<c;h++)this.next();return!0}}canHaveLeadingDecorator(){return this.match(a._class)||this.isAbstractClass()}eatContextual(s){if(B.test(s)){if(this.ts_isContextual(T[s]))return this.next(),!0;return!1}else return super.eatContextual(s)}tsIsExternalModuleReference(){return this.isContextual("require")&&this.lookaheadCharCode()===40}tsParseExternalModuleReference(){let s=this.startNode();if(this.expectContextual("require"),this.expect(a.parenL),!this.match(a.string))this.unexpected();return s.expression=this.parseExprAtom(),this.expect(a.parenR),this.finishNode(s,"TSExternalModuleReference")}tsParseEntityName(s=!0){let c=this.parseIdent(s);while(this.eat(a.dot)){let l=this.startNodeAtNode(c);l.left=c,l.right=this.parseIdent(s),c=this.finishNode(l,"TSQualifiedName")}return c}tsParseEnumMember(){let s=this.startNode();if(s.id=this.match(a.string)?this.parseLiteral(this.value):this.parseIdent(!0),this.eat(a.eq))s.initializer=this.parseMaybeAssign();return this.finishNode(s,"TSEnumMember")}tsParseEnumDeclaration(s,c={}){if(c.const)s.const=!0;if(c.declare)s.declare=!0;return this.expectContextual("enum"),s.id=this.parseIdent(),this.checkLValSimple(s.id),this.expect(a.braceL),s.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(a.braceR),this.finishNode(s,"TSEnumDeclaration")}tsParseModuleBlock(){let s=this.startNode();this.enterScope(tp),this.expect(a.braceL),s.body=[];while(this.type!==a.braceR){let c=this.parseStatement(null,!0);s.body.push(c)}return this.next(),super.exitScope(),this.finishNode(s,"TSModuleBlock")}tsParseAmbientExternalModuleDeclaration(s){if(this.ts_isContextual(T.global))s.global=!0,s.id=this.parseIdent();else if(this.match(a.string))s.id=this.parseLiteral(this.value);else this.unexpected();if(this.match(a.braceL))this.enterScope(Nt),s.body=this.tsParseModuleBlock(),super.exitScope();else super.semicolon();return this.finishNode(s,"TSModuleDeclaration")}tsTryParseDeclare(s){if(this.isLineTerminator())return;let c=this.type,l;if(this.isContextual("let"))c=a._var,l="let";return this.tsInAmbientContext(()=>{if(c===a._function)return s.declare=!0,this.parseFunctionStatement(s,!1,!0);if(c===a._class)return s.declare=!0,this.parseClass(s,!0);if(c===T.enum)return this.tsParseEnumDeclaration(s,{declare:!0});if(c===T.global)return this.tsParseAmbientExternalModuleDeclaration(s);if(c===a._const||c===a._var){if(!this.match(a._const)||!this.isLookaheadContextual("enum"))return s.declare=!0,this.parseVarStatement(s,l||this.value,!0);return this.expect(a._const),this.tsParseEnumDeclaration(s,{const:!0,declare:!0})}if(c===T.interface){let h=this.tsParseInterfaceDeclaration(s,{declare:!0});if(h)return h}if(L(c))return this.tsParseDeclaration(s,this.value,!0)})}tsIsListTerminator(s){switch(s){case"EnumMembers":case"TypeMembers":return this.match(a.braceR);case"HeritageClauseElement":return this.match(a.braceL);case"TupleElementTypes":return this.match(a.bracketR);case"TypeParametersOrArguments":return this.tsMatchRightRelational()}}tsParseDelimitedListWorker(s,c,l,h){let y=[],x=-1;for(;;){if(this.tsIsListTerminator(s))break;x=-1;let v=c();if(v==null)return;if(y.push(v),this.eat(a.comma)){x=this.lastTokStart;continue}if(this.tsIsListTerminator(s))break;if(l)this.expect(a.comma);return}if(h)h.value=x;return y}tsParseDelimitedList(s,c,l){return Tp(this.tsParseDelimitedListWorker(s,c,!0,l))}tsParseBracketedList(s,c,l,h,y){if(!h)if(l)this.expect(a.bracketL);else this.expect(a.relational);let x=this.tsParseDelimitedList(s,c,y);if(l)this.expect(a.bracketR);else this.expect(a.relational);return x}tsParseTypeParameterName(){return this.parseIdent().name}tsEatThenParseType(s){return!this.match(s)?void 0:this.tsNextThenParseType()}tsExpectThenParseType(s){return this.tsDoThenParseType(()=>this.expect(s))}tsNextThenParseType(){return this.tsDoThenParseType(()=>this.next())}tsDoThenParseType(s){return this.tsInType(()=>(s(),this.tsParseType()))}tsSkipParameterStart(){if(L(this.type)||this.match(a._this))return this.next(),!0;if(this.match(a.braceL))try{return this.parseObj(!0),!0}catch{return!1}if(this.match(a.bracketL)){this.next();try{return this.parseBindingList(a.bracketR,!0,!0),!0}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){if(this.next(),this.match(a.parenR)||this.match(a.ellipsis))return!0;if(this.tsSkipParameterStart()){if(this.match(a.colon)||this.match(a.comma)||this.match(a.question)||this.match(a.eq))return!0;if(this.match(a.parenR)){if(this.next(),this.match(a.arrow))return!0}}return!1}tsIsStartOfFunctionType(){if(this.tsMatchLeftRelational())return!0;return this.match(a.parenL)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsInAllowConditionalTypesContext(s){let c=this.inDisallowConditionalTypesContext;this.inDisallowConditionalTypesContext=!1;try{return s()}finally{this.inDisallowConditionalTypesContext=c}}tsParseBindingListForSignature(){return super.parseBindingList(a.parenR,!0,!0).map((s)=>{if(s.type!=="Identifier"&&s.type!=="RestElement"&&s.type!=="ObjectPattern"&&s.type!=="ArrayPattern")this.raise(s.start,D.UnsupportedSignatureParameterKind({type:s.type}));return s})}tsParseTypePredicateAsserts(){if(this.type!==T.asserts)return!1;let s=this.containsEsc;if(this.next(),!L(this.type)&&!this.match(a._this))return!1;if(s)this.raise(this.lastTokStart,"Escape sequence in keyword asserts");return!0}tsParseThisTypeNode(){let s=this.startNode();return this.next(),this.finishNode(s,"TSThisType")}tsParseTypeAnnotation(s=!0,c=this.startNode()){return this.tsInType(()=>{if(s)this.expect(a.colon);c.typeAnnotation=this.tsParseType()}),this.finishNode(c,"TSTypeAnnotation")}tsParseThisTypePredicate(s){this.next();let c=this.startNodeAtNode(s);return c.parameterName=s,c.typeAnnotation=this.tsParseTypeAnnotation(!1),c.asserts=!1,this.finishNode(c,"TSTypePredicate")}tsParseThisTypeOrThisTypePredicate(){let s=this.tsParseThisTypeNode();if(this.isContextual("is")&&!this.hasPrecedingLineBreak())return this.tsParseThisTypePredicate(s);else return s}tsParseTypePredicatePrefix(){let s=this.parseIdent();if(this.isContextual("is")&&!this.hasPrecedingLineBreak())return this.next(),s}tsParseTypeOrTypePredicateAnnotation(s){return this.tsInType(()=>{let c=this.startNode();this.expect(s);let l=this.startNode(),h=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(h&&this.match(a._this)){let v=this.tsParseThisTypeOrThisTypePredicate();if(v.type==="TSThisType")l.parameterName=v,l.asserts=!0,l.typeAnnotation=null,v=this.finishNode(l,"TSTypePredicate");else this.resetStartLocationFromNode(v,l),v.asserts=!0;return c.typeAnnotation=v,this.finishNode(c,"TSTypeAnnotation")}let y=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!y){if(!h)return this.tsParseTypeAnnotation(!1,c);return l.parameterName=this.parseIdent(),l.asserts=h,l.typeAnnotation=null,c.typeAnnotation=this.finishNode(l,"TSTypePredicate"),this.finishNode(c,"TSTypeAnnotation")}let x=this.tsParseTypeAnnotation(!1);return l.parameterName=y,l.typeAnnotation=x,l.asserts=h,c.typeAnnotation=this.finishNode(l,"TSTypePredicate"),this.finishNode(c,"TSTypeAnnotation")})}tsFillSignature(s,c){let l=s===a.arrow,h="parameters",y="typeAnnotation";if(c.typeParameters=this.tsTryParseTypeParameters(),this.expect(a.parenL),c.parameters=this.tsParseBindingListForSignature(),l)c.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(s);else if(this.match(s))c.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(s)}tsTryNextParseConstantContext(){if(this.lookahead().type!==a._const)return null;this.next();let s=this.tsParseTypeReference();if(s.typeParameters||s.typeArguments)this.raise(s.typeName.start,D.CannotFindName({name:"const"}));return s}tsParseFunctionOrConstructorType(s,c){let l=this.startNode();if(s==="TSConstructorType"){if(l.abstract=!!c,c)this.next();this.next()}return this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(a.arrow,l)),this.finishNode(l,s)}tsParseUnionOrIntersectionType(s,c,l){let h=this.startNode(),y=this.eat(l),x=[];do x.push(c());while(this.eat(l));if(x.length===1&&!y)return x[0];return h.types=x,this.finishNode(h,s)}tsCheckTypeAnnotationForReadOnly(s){switch(s.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(s.start,D.UnexpectedReadonly)}}tsParseTypeOperator(){let s=this.startNode(),c=this.value;if(this.next(),s.operator=c,s.typeAnnotation=this.tsParseTypeOperatorOrHigher(),c==="readonly")this.tsCheckTypeAnnotationForReadOnly(s);return this.finishNode(s,"TSTypeOperator")}tsParseConstraintForInferType(){if(this.eat(a._extends)){let s=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.inDisallowConditionalTypesContext||!this.match(a.question))return s}}tsParseInferType(){let s=this.startNode();this.expectContextual("infer");let c=this.startNode();return c.name=this.tsParseTypeParameterName(),c.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),s.typeParameter=this.finishNode(c,"TSTypeParameter"),this.finishNode(s,"TSInferType")}tsParseLiteralTypeNode(){let s=this.startNode();return s.literal=(()=>{switch(this.type){case a.num:case a.string:case a._true:case a._false:return this.parseExprAtom();default:this.unexpected()}})(),this.finishNode(s,"TSLiteralType")}tsParseImportType(){let s=this.startNode();if(this.expect(a._import),this.expect(a.parenL),!this.match(a.string))this.raise(this.start,D.UnsupportedImportTypeArgument);if(s.argument=this.parseExprAtom(),this.expect(a.parenR),this.eat(a.dot))s.qualifier=this.tsParseEntityName();if(this.tsMatchLeftRelational())s.typeArguments=this.tsParseTypeArguments();return this.finishNode(s,"TSImportType")}tsParseTypeQuery(){let s=this.startNode();if(this.expect(a._typeof),this.match(a._import))s.exprName=this.tsParseImportType();else s.exprName=this.tsParseEntityName();if(!this.hasPrecedingLineBreak()&&this.tsMatchLeftRelational())s.typeArguments=this.tsParseTypeArguments();return this.finishNode(s,"TSTypeQuery")}tsParseMappedTypeParameter(){let s=this.startNode();return s.name=this.tsParseTypeParameterName(),s.constraint=this.tsExpectThenParseType(a._in),this.finishNode(s,"TSTypeParameter")}tsParseMappedType(){let s=this.startNode();if(this.expect(a.braceL),this.match(a.plusMin))s.readonly=this.value,this.next(),this.expectContextual("readonly");else if(this.eatContextual("readonly"))s.readonly=!0;if(this.expect(a.bracketL),s.typeParameter=this.tsParseMappedTypeParameter(),s.nameType=this.eatContextual("as")?this.tsParseType():null,this.expect(a.bracketR),this.match(a.plusMin))s.optional=this.value,this.next(),this.expect(a.question);else if(this.eat(a.question))s.optional=!0;return s.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(a.braceR),this.finishNode(s,"TSMappedType")}tsParseTypeLiteral(){let s=this.startNode();return s.members=this.tsParseObjectTypeMembers(),this.finishNode(s,"TSTypeLiteral")}tsParseTupleElementType(){let s=this.startLoc,c=this.start,l=this.eat(a.ellipsis),h=this.tsParseType(),y=this.eat(a.question);if(this.eat(a.colon)){let v=this.startNodeAtNode(h);if(v.optional=y,h.type==="TSTypeReference"&&!h.typeArguments&&h.typeName.type==="Identifier")v.label=h.typeName;else this.raise(h.start,D.InvalidTupleMemberLabel),v.label=h;v.elementType=this.tsParseType(),h=this.finishNode(v,"TSNamedTupleMember")}else if(y){let v=this.startNodeAtNode(h);v.typeAnnotation=h,h=this.finishNode(v,"TSOptionalType")}if(l){let v=this.startNodeAt(c,s);v.typeAnnotation=h,h=this.finishNode(v,"TSRestType")}return h}tsParseTupleType(){let s=this.startNode();s.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let c=!1;return s.elementTypes.forEach((l)=>{let{type:h}=l;if(c&&h!=="TSRestType"&&h!=="TSOptionalType"&&!(h==="TSNamedTupleMember"&&l.optional))this.raise(l.start,D.OptionalTypeBeforeRequired);if(c||=h==="TSNamedTupleMember"&&l.optional||h==="TSOptionalType",h==="TSRestType")l=l.typeAnnotation}),this.finishNode(s,"TSTupleType")}tsParseTemplateLiteralType(){let s=this.startNode();return s.literal=this.parseTemplate({isTagged:!1}),this.finishNode(s,"TSLiteralType")}tsParseTypeReference(){let s=this.startNode();if(s.typeName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.tsMatchLeftRelational())s.typeArguments=this.tsParseTypeArguments();return this.finishNode(s,"TSTypeReference")}tsMatchLeftRelational(){return this.match(a.relational)&&this.value==="<"}tsMatchRightRelational(){return this.match(a.relational)&&this.value===">"}tsParseParenthesizedType(){let s=this.startNode();return this.expect(a.parenL),s.typeAnnotation=this.tsParseType(),this.expect(a.parenR),this.finishNode(s,"TSParenthesizedType")}tsParseNonArrayType(){switch(this.type){case a.string:case a.num:case a._true:case a._false:return this.tsParseLiteralTypeNode();case a.plusMin:if(this.value==="-"){let s=this.startNode();if(this.lookahead().type!==a.num)this.unexpected();return s.literal=this.parseMaybeUnary(),this.finishNode(s,"TSLiteralType")}break;case a._this:return this.tsParseThisTypeOrThisTypePredicate();case a._typeof:return this.tsParseTypeQuery();case a._import:return this.tsParseImportType();case a.braceL:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case a.bracketL:return this.tsParseTupleType();case a.parenL:return this.tsParseParenthesizedType();case a.backQuote:case a.dollarBraceL:return this.tsParseTemplateLiteralType();default:{let{type:s}=this;if(L(s)||s===a._void||s===a._null){let c=s===a._void?"TSVoidKeyword":s===a._null?"TSNullKeyword":vp(this.value);if(c!==void 0&&this.lookaheadCharCode()!==46){let l=this.startNode();return this.next(),this.finishNode(l,c)}return this.tsParseTypeReference()}}}this.unexpected()}tsParseArrayTypeOrHigher(){let s=this.tsParseNonArrayType();while(!this.hasPrecedingLineBreak()&&this.eat(a.bracketL))if(this.match(a.bracketR)){let c=this.startNodeAtNode(s);c.elementType=s,this.expect(a.bracketR),s=this.finishNode(c,"TSArrayType")}else{let c=this.startNodeAtNode(s);c.objectType=s,c.indexType=this.tsParseType(),this.expect(a.bracketR),s=this.finishNode(c,"TSIndexedAccessType")}return s}tsParseTypeOperatorOrHigher(){return O(this.type)&&!this.containsEsc?this.tsParseTypeOperator():this.isContextual("infer")?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),a.bitwiseAND)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),a.bitwiseOR)}tsParseNonConditionalType(){if(this.tsIsStartOfFunctionType())return this.tsParseFunctionOrConstructorType("TSFunctionType");if(this.match(a._new))return this.tsParseFunctionOrConstructorType("TSConstructorType");else if(this.isAbstractConstructorSignature())return this.tsParseFunctionOrConstructorType("TSConstructorType",!0);return this.tsParseUnionTypeOrHigher()}tsParseType(){vs(this.inType);let s=this.tsParseNonConditionalType();if(this.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(a._extends))return s;let c=this.startNodeAtNode(s);return c.checkType=s,c.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(a.question),c.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(a.colon),c.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(c,"TSConditionalType")}tsIsUnambiguouslyIndexSignature(){if(this.next(),L(this.type))return this.next(),this.match(a.colon);return!1}tsInType(s){let c=this.inType;this.inType=!0;try{return s()}finally{this.inType=c}}tsTryParseIndexSignature(s){if(!(this.match(a.bracketL)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(a.bracketL);let c=this.parseIdent();c.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(c),this.expect(a.bracketR),s.parameters=[c];let l=this.tsTryParseTypeAnnotation();if(l)s.typeAnnotation=l;return this.tsParseTypeMemberSemicolon(),this.finishNode(s,"TSIndexSignature")}tsParseNoneModifiers(s){this.tsParseModifiers({modified:s,allowedModifiers:[],disallowedModifiers:["in","out"],errorTemplate:D.InvalidModifierOnTypeParameterPositions})}tsParseTypeParameter(s=this.tsParseNoneModifiers.bind(this)){let c=this.startNode();return s(c),c.name=this.tsParseTypeParameterName(),c.constraint=this.tsEatThenParseType(a._extends),c.default=this.tsEatThenParseType(a.eq),this.finishNode(c,"TSTypeParameter")}tsParseTypeParameters(s){let c=this.startNode();if(this.tsMatchLeftRelational()||this.matchJsx("jsxTagStart"))this.next();else this.unexpected();let l={value:-1};if(c.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,s),!1,!0,l),c.params.length===0)this.raise(this.start,D.EmptyTypeParameters);if(l.value!==-1)this.addExtra(c,"trailingComma",l.value);return this.finishNode(c,"TSTypeParameterDeclaration")}tsTryParseTypeParameters(s){if(this.tsMatchLeftRelational())return this.tsParseTypeParameters(s)}tsTryParse(s){let c=this.getCurLookaheadState(),l=s();if(l!==void 0&&l!==!1)return l;else{this.setLookaheadState(c);return}}tsTokenCanFollowModifier(){return(this.match(a.bracketL)||this.match(a.braceL)||this.match(a.star)||this.match(a.ellipsis)||this.match(a.privateId)||this.isLiteralPropertyName())&&!this.hasPrecedingLineBreak()}tsNextTokenCanFollowModifier(){return this.next(!0),this.tsTokenCanFollowModifier()}tsParseModifier(s,c){let l=this.value;if(s.indexOf(l)!==-1&&!this.containsEsc){if(c&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return l}return}tsParseModifiersByMap({modified:s,map:c}){for(let l of Object.keys(c))s[l]=c[l]}tsParseModifiers({modified:s,allowedModifiers:c,disallowedModifiers:l,stopOnStartOfClassStaticBlock:h,errorTemplate:y=D.InvalidModifierOnTypeMember}){let x={},v=(P,S,_,k)=>{if(S===_&&s[k])this.raise(P.column,D.InvalidModifiersOrder({orderedModifiers:[_,k]}))},A=(P,S,_,k)=>{if(s[_]&&S===k||s[k]&&S===_)this.raise(P.column,D.IncompatibleModifiers({modifiers:[_,k]}))};for(;;){let P=this.startLoc,S=this.tsParseModifier(c.concat(l??[]),h);if(!S)break;if(Ss(S))if(s.accessibility)this.raise(this.start,D.DuplicateAccessibilityModifier());else v(P,S,S,"override"),v(P,S,S,"static"),v(P,S,S,"readonly"),v(P,S,S,"accessor"),x.accessibility=S,s.accessibility=S;else if(yp(S))if(s[S])this.raise(this.start,D.DuplicateModifier({modifier:S}));else v(P,S,"in","out"),x[S]=S,s[S]=!0;else if(mp(S))if(s[S])this.raise(this.start,D.DuplicateModifier({modifier:S}));else A(P,S,"accessor","readonly"),A(P,S,"accessor","static"),A(P,S,"accessor","override"),x[S]=S,s[S]=!0;else if(S==="const")if(s[S])this.raise(this.start,D.DuplicateModifier({modifier:S}));else x[S]=S,s[S]=!0;else if(Object.hasOwnProperty.call(s,S))this.raise(this.start,D.DuplicateModifier({modifier:S}));else v(P,S,"static","readonly"),v(P,S,"static","override"),v(P,S,"override","readonly"),v(P,S,"abstract","override"),A(P,S,"declare","override"),A(P,S,"static","abstract"),x[S]=S,s[S]=!0;if(l?.includes(S))this.raise(this.start,y)}return x}tsParseInOutModifiers(s){this.tsParseModifiers({modified:s,allowedModifiers:["in","out"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:D.InvalidModifierOnTypeParameter})}parseMaybeUnary(s,c,l,h){if(!e?.jsx&&this.tsMatchLeftRelational())return this.tsParseTypeAssertion();else return super.parseMaybeUnary(s,c,l,h)}tsParseTypeAssertion(){if(r)this.raise(this.start,D.ReservedTypeAssertion);let s=this.tryParse(()=>{let c=this.startNode(),l=this.tsTryNextParseConstantContext();return c.typeAnnotation=l||this.tsNextThenParseType(),this.expect(a.relational),c.expression=this.parseMaybeUnary(),this.finishNode(c,"TSTypeAssertion")});if(s.error)return this.tsParseTypeParameters(this.tsParseConstModifier);else return s.node}tsParseTypeArguments(){let s=this.startNode();if(s.params=this.tsInType(()=>this.tsInNoContext(()=>(this.expect(a.relational),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),s.params.length===0)this.raise(this.start,D.EmptyTypeArguments);return this.exprAllowed=!1,this.expect(a.relational),this.finishNode(s,"TSTypeParameterInstantiation")}tsParseHeritageClause(s){let c=this.start,l=this.tsParseDelimitedList("HeritageClauseElement",()=>{let h=this.startNode();if(h.expression=this.tsParseEntityName(),this.tsMatchLeftRelational())h.typeParameters=this.tsParseTypeArguments();return this.finishNode(h,"TSExpressionWithTypeArguments")});if(!l.length)this.raise(c,D.EmptyHeritageClauseType({token:s}));return l}tsParseTypeMemberSemicolon(){if(!this.eat(a.comma)&&!this.isLineTerminator())this.expect(a.semi)}tsTryParseAndCatch(s){let c=this.tryParse((l)=>s()||l());if(c.aborted||!c.node)return;if(c.error)this.setLookaheadState(c.failState);return c.node}tsParseSignatureMember(s,c){return this.tsFillSignature(a.colon,c),this.tsParseTypeMemberSemicolon(),this.finishNode(c,s)}tsParsePropertyOrMethodSignature(s,c){if(this.eat(a.question))s.optional=!0;let l=s;if(this.match(a.parenL)||this.tsMatchLeftRelational()){if(c)this.raise(s.start,D.ReadonlyForMethodSignature);let h=l;if(h.kind&&this.tsMatchLeftRelational())this.raise(this.start,D.AccesorCannotHaveTypeParameters);this.tsFillSignature(a.colon,h),this.tsParseTypeMemberSemicolon();let y="parameters",x="typeAnnotation";if(h.kind==="get"){if(h[y].length>0){if(this.raise(this.start,"A 'get' accesor must not have any formal parameters."),this.isThisParam(h[y][0]))this.raise(this.start,D.AccesorCannotDeclareThisParameter)}}else if(h.kind==="set"){if(h[y].length!==1)this.raise(this.start,"A 'get' accesor must not have any formal parameters.");else{let v=h[y][0];if(this.isThisParam(v))this.raise(this.start,D.AccesorCannotDeclareThisParameter);if(v.type==="Identifier"&&v.optional)this.raise(this.start,D.SetAccesorCannotHaveOptionalParameter);if(v.type==="RestElement")this.raise(this.start,D.SetAccesorCannotHaveRestParameter)}if(h[x])this.raise(h[x].start,D.SetAccesorCannotHaveReturnType)}else h.kind="method";return this.finishNode(h,"TSMethodSignature")}else{let h=l;if(c)h.readonly=!0;let y=this.tsTryParseTypeAnnotation();if(y)h.typeAnnotation=y;return this.tsParseTypeMemberSemicolon(),this.finishNode(h,"TSPropertySignature")}}tsParseTypeMember(){let s=this.startNode();if(this.match(a.parenL)||this.tsMatchLeftRelational())return this.tsParseSignatureMember("TSCallSignatureDeclaration",s);if(this.match(a._new)){let l=this.startNode();if(this.next(),this.match(a.parenL)||this.tsMatchLeftRelational())return this.tsParseSignatureMember("TSConstructSignatureDeclaration",s);else return s.key=this.createIdentifier(l,"new"),this.tsParsePropertyOrMethodSignature(s,!1)}this.tsParseModifiers({modified:s,allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]});let c=this.tsTryParseIndexSignature(s);if(c)return c;if(this.parsePropertyName(s),!s.computed&&s.key.type==="Identifier"&&(s.key.name==="get"||s.key.name==="set")&&this.tsTokenCanFollowModifier())s.kind=s.key.name,this.parsePropertyName(s);return this.tsParsePropertyOrMethodSignature(s,!!s.readonly)}tsParseList(s,c){let l=[];while(!this.tsIsListTerminator(s))l.push(c());return l}tsParseObjectTypeMembers(){this.expect(a.braceL);let s=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(a.braceR),s}tsParseInterfaceDeclaration(s,c={}){if(this.hasFollowingLineBreak())return null;if(this.expectContextual("interface"),c.declare)s.declare=!0;if(L(this.type))s.id=this.parseIdent(),this.checkLValSimple(s.id,Y.BIND_TS_INTERFACE);else s.id=null,this.raise(this.start,D.MissingInterfaceName);if(s.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers.bind(this)),this.eat(a._extends))s.extends=this.tsParseHeritageClause("extends");let l=this.startNode();return l.body=this.tsParseInterfaceBody(),s.body=this.finishNode(l,"TSInterfaceBody"),this.finishNode(s,"TSInterfaceDeclaration")}tsParseInterfaceBody(){this.expect(a.braceL);let s=this.inType;this.inType=!0;let c=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.inType=s,this.expect(a.braceR),c}tsParseAbstractDeclaration(s){if(this.match(a._class))return s.abstract=!0,this.parseClass(s,!0);else if(this.ts_isContextual(T.interface)){if(!this.hasFollowingLineBreak())return s.abstract=!0,this.tsParseInterfaceDeclaration(s)}else this.unexpected(s.start)}tsIsDeclarationStart(){return V(this.type)}tsParseExpressionStatement(s,c){switch(c.name){case"declare":{let l=this.tsTryParseDeclare(s);if(l)return l.declare=!0,l;break}case"global":if(this.match(a.braceL)){this.enterScope(Nt);let l=s;return l.global=!0,l.id=c,l.body=this.tsParseModuleBlock(),super.exitScope(),this.finishNode(l,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(s,c.name,!1)}}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsIsExportDefaultSpecifier(){let{type:s}=this,c=this.isAsyncFunction(),l=this.isLet();if(L(s)){if(c&&!this.containsEsc||l)return!1;if((s===T.type||s===T.interface)&&!this.containsEsc){let x=this.lookahead();if(L(x.type)&&!this.isContextualWithState("from",x)||x.type===a.braceL)return!1}}else if(!this.match(a._default))return!1;let h=this.nextTokenStart(),y=this.isUnparsedContextual(h,"from");if(this.input.charCodeAt(h)===44||L(this.type)&&y)return!0;if(this.match(a._default)&&y){let x=this.input.charCodeAt(this.nextTokenStartSince(h+4));return x===34||x===39}return!1}tsInAmbientContext(s){let c=this.isAmbientContext;this.isAmbientContext=!0;try{return s()}finally{this.isAmbientContext=c}}tsCheckLineTerminator(s){if(s){if(this.hasFollowingLineBreak())return!1;return this.next(),!0}return!this.isLineTerminator()}tsParseModuleOrNamespaceDeclaration(s,c=!1){if(s.id=this.parseIdent(),!c)this.checkLValSimple(s.id,Y.BIND_TS_NAMESPACE);if(this.eat(a.dot)){let l=this.startNode();this.tsParseModuleOrNamespaceDeclaration(l,!0),s.body=l}else this.enterScope(Nt),s.body=this.tsParseModuleBlock(),super.exitScope();return this.finishNode(s,"TSModuleDeclaration")}checkLValSimple(s,c=Y.BIND_NONE,l){if(s.type==="TSNonNullExpression"||s.type==="TSAsExpression")s=s.expression;return super.checkLValSimple(s,c,l)}tsParseTypeAliasDeclaration(s){return s.id=this.parseIdent(),this.checkLValSimple(s.id,Y.BIND_TS_TYPE),s.typeAnnotation=this.tsInType(()=>{if(s.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers.bind(this)),this.expect(a.eq),this.ts_isContextual(T.interface)&&this.lookahead().type!==a.dot){let c=this.startNode();return this.next(),this.finishNode(c,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(s,"TSTypeAliasDeclaration")}tsParseDeclaration(s,c,l){switch(c){case"abstract":if(this.tsCheckLineTerminator(l)&&(this.match(a._class)||L(this.type)))return this.tsParseAbstractDeclaration(s);break;case"module":if(this.tsCheckLineTerminator(l)){if(this.match(a.string))return this.tsParseAmbientExternalModuleDeclaration(s);else if(L(this.type))return this.tsParseModuleOrNamespaceDeclaration(s)}break;case"namespace":if(this.tsCheckLineTerminator(l)&&L(this.type))return this.tsParseModuleOrNamespaceDeclaration(s);break;case"type":if(this.tsCheckLineTerminator(l)&&L(this.type))return this.tsParseTypeAliasDeclaration(s);break}}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.value,!0)}tsParseImportEqualsDeclaration(s,c){s.isExport=c||!1,s.id=this.parseIdent(),this.checkLValSimple(s.id,Y.BIND_LEXICAL),super.expect(a.eq);let l=this.tsParseModuleReference();if(s.importKind==="type"&&l.type!=="TSExternalModuleReference")this.raise(l.start,D.ImportAliasHasImportType);return s.moduleReference=l,super.semicolon(),this.finishNode(s,"TSImportEqualsDeclaration")}isExportDefaultSpecifier(){if(this.tsIsDeclarationStart())return!1;let{type:s}=this;if(L(s)){if(this.isContextual("async")||this.isContextual("let"))return!1;if((s===T.type||s===T.interface)&&!this.containsEsc){let h=this.lookahead();if(L(h.type)&&!this.isContextualWithState("from",h)||h.type===a.braceL)return!1}}else if(!this.match(a._default))return!1;let c=this.nextTokenStart(),l=this.isUnparsedContextual(c,"from");if(this.input.charCodeAt(c)===44||L(this.type)&&l)return!0;if(this.match(a._default)&&l){let h=this.input.charCodeAt(this.nextTokenStartSince(c+4));return h===34||h===39}return!1}parseTemplate({isTagged:s=!1}={}){let c=this.startNode();this.next(),c.expressions=[];let l=this.parseTemplateElement({isTagged:s});c.quasis=[l];while(!l.tail){if(this.type===a.eof)this.raise(this.pos,"Unterminated template literal");this.expect(a.dollarBraceL),c.expressions.push(this.inType?this.tsParseType():this.parseExpression()),this.expect(a.braceR),c.quasis.push(l=this.parseTemplateElement({isTagged:s}))}return this.next(),this.finishNode(c,"TemplateLiteral")}parseFunction(s,c,l,h,y){if(this.initFunction(s),this.ecmaVersion>=9||this.ecmaVersion>=6&&!h){if(this.type===a.star&&c&Es)this.unexpected();s.generator=this.eat(a.star)}if(this.ecmaVersion>=8)s.async=!!h;if(c&cr)s.id=c&gp&&this.type!==a.name?null:this.parseIdent();let x=this.yieldPos,v=this.awaitPos,A=this.awaitIdentPos,P=this.maybeInArrowParameters;if(this.maybeInArrowParameters=!1,this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(tn(s.async,s.generator)),!(c&cr))s.id=this.type===a.name?this.parseIdent():null;this.parseFunctionParams(s);let S=c&cr;if(this.parseFunctionBody(s,l,!1,y,{isFunctionDeclaration:S}),this.yieldPos=x,this.awaitPos=v,this.awaitIdentPos=A,c&cr&&s.id&&!(c&Es))if(s.body)this.checkLValSimple(s.id,this.strict||s.generator||s.async?this.treatFunctionsAsVar?Y.BIND_VAR:Y.BIND_LEXICAL:Y.BIND_FUNCTION);else this.checkLValSimple(s.id,Y.BIND_NONE);return this.maybeInArrowParameters=P,this.finishNode(s,S?"FunctionDeclaration":"FunctionExpression")}parseFunctionBody(s,c=!1,l=!1,h=!1,y){if(this.match(a.colon))s.returnType=this.tsParseTypeOrTypePredicateAnnotation(a.colon);let x=y?.isFunctionDeclaration?"TSDeclareFunction":y?.isClassMethod?"TSDeclareMethod":void 0;if(x&&!this.match(a.braceL)&&this.isLineTerminator())return this.exitScope(),this.finishNode(s,x);if(x==="TSDeclareFunction"&&this.isAmbientContext){if(this.raise(s.start,D.DeclareFunctionHasImplementation),s.declare)return super.parseFunctionBody(s,c,l,!1),this.finishNode(s,x)}return super.parseFunctionBody(s,c,l,h),s}parseNew(){if(this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword new");let s=this.startNode(),c=this.parseIdent(!0);if(this.ecmaVersion>=6&&this.eat(a.dot)){s.meta=c;let v=this.containsEsc;if(s.property=this.parseIdent(!0),s.property.name!=="target")this.raiseRecoverable(s.property.start,"The only valid meta property for new is 'new.target'");if(v)this.raiseRecoverable(s.start,"'new.target' must not contain escaped characters");if(!this.allowNewDotTarget)this.raiseRecoverable(s.start,"'new.target' can only be used in functions and class static block");return this.finishNode(s,"MetaProperty")}let l=this.start,h=this.startLoc,y=this.type===a._import;if(s.callee=this.parseSubscripts(this.parseExprAtom(),l,h,!0,!1),y&&s.callee.type==="ImportExpression")this.raise(l,"Cannot use new with import()");let{callee:x}=s;if(x.type==="TSInstantiationExpression"&&!x.extra?.parenthesized)s.typeArguments=x.typeArguments,s.callee=x.expression;if(this.eat(a.parenL))s.arguments=this.parseExprList(a.parenR,this.ecmaVersion>=8,!1);else s.arguments=[];return this.finishNode(s,"NewExpression")}parseExprOp(s,c,l,h,y){if(a._in.binop>h&&!this.hasPrecedingLineBreak()){let x;if(this.isContextual("as"))x="TSAsExpression";if(this.isContextual("satisfies"))x="TSSatisfiesExpression";if(x){let v=this.startNodeAt(c,l);v.expression=s;let A=this.tsTryNextParseConstantContext();if(A)v.typeAnnotation=A;else v.typeAnnotation=this.tsNextThenParseType();return this.finishNode(v,x),this.reScan_lt_gt(),this.parseExprOp(v,c,l,h,y)}}return super.parseExprOp(s,c,l,h,y)}parseImportSpecifiers(){let s=[],c=!0;if(o.tokenIsIdentifier(this.type)){if(s.push(this.parseImportDefaultSpecifier()),!this.eat(a.comma))return s}if(this.type===a.star)return s.push(this.parseImportNamespaceSpecifier()),s;this.expect(a.braceL);while(!this.eat(a.braceR)){if(!c){if(this.expect(a.comma),this.afterTrailingComma(a.braceR))break}else c=!1;s.push(this.parseImportSpecifier())}return s}parseImport(s){let c=this.lookahead();if(s.importKind="value",this.importOrExportOuterKind="value",L(c.type)||this.match(a.star)||this.match(a.braceL)){let l=this.lookahead(2);if(l.type!==a.comma&&!this.isContextualWithState("from",l)&&l.type!==a.eq&&this.ts_eatContextualWithState("type",1,c))this.importOrExportOuterKind="type",s.importKind="type",c=this.lookahead(),l=this.lookahead(2);if(L(c.type)&&l.type===a.eq){this.next();let h=this.tsParseImportEqualsDeclaration(s);return this.importOrExportOuterKind="value",h}}if(this.next(),this.type===a.string)s.specifiers=[],s.source=this.parseExprAtom();else s.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),s.source=this.type===a.string?this.parseExprAtom():this.unexpected();if(this.parseMaybeImportAttributes(s),this.semicolon(),this.finishNode(s,"ImportDeclaration"),this.importOrExportOuterKind="value",s.importKind==="type"&&s.specifiers.length>1&&s.specifiers[0].type==="ImportDefaultSpecifier")this.raise(s.start,D.TypeImportCannotSpecifyDefaultAndNamed);return s}parseExportDefaultDeclaration(){if(this.isAbstractClass()){let s=this.startNode();return this.next(),s.abstract=!0,this.parseClass(s,!0)}if(this.match(T.interface)){let s=this.tsParseInterfaceDeclaration(this.startNode());if(s)return s}return super.parseExportDefaultDeclaration()}parseExportAllDeclaration(s,c){if(this.ecmaVersion>=11)if(this.eatContextual("as"))s.exported=this.parseModuleExportName(),this.checkExport(c,s.exported,this.lastTokStart);else s.exported=null;if(this.expectContextual("from"),this.type!==a.string)this.unexpected();return s.source=this.parseExprAtom(),this.parseMaybeImportAttributes(s),this.semicolon(),this.finishNode(s,"ExportAllDeclaration")}parseDynamicImport(s){if(this.next(),s.source=this.parseMaybeAssign(),this.eat(a.comma)){let c=this.parseExpression();s.arguments=[c]}if(!this.eat(a.parenR)){let c=this.start;if(this.eat(a.comma)&&this.eat(a.parenR))this.raiseRecoverable(c,"Trailing comma is not allowed in import()");else this.unexpected(c)}return this.finishNode(s,"ImportExpression")}parseExport(s,c){let l=this.lookahead();if(this.ts_eatWithState(a._import,2,l)){if(this.ts_isContextual(T.type)&&this.lookaheadCharCode()!==61)s.importKind="type",this.importOrExportOuterKind="type",this.next();else s.importKind="value",this.importOrExportOuterKind="value";let h=this.tsParseImportEqualsDeclaration(s,!0);return this.importOrExportOuterKind=void 0,h}else if(this.ts_eatWithState(a.eq,2,l)){let h=s;return h.expression=this.parseExpression(),this.semicolon(),this.importOrExportOuterKind=void 0,this.finishNode(h,"TSExportAssignment")}else if(this.ts_eatContextualWithState("as",2,l)){let h=s;return this.expectContextual("namespace"),h.id=this.parseIdent(),this.semicolon(),this.importOrExportOuterKind=void 0,this.finishNode(h,"TSNamespaceExportDeclaration")}else{let h=this.lookahead(2).type;if(this.ts_isContextualWithState(l,T.type)&&(h===a.braceL||h===a.star))this.next(),this.importOrExportOuterKind="type",s.exportKind="type";else this.importOrExportOuterKind="value",s.exportKind="value";if(this.next(),this.eat(a.star))return this.parseExportAllDeclaration(s,c);if(this.eat(a._default))return this.checkExport(c,"default",this.lastTokStart),s.declaration=this.parseExportDefaultDeclaration(),this.finishNode(s,"ExportDefaultDeclaration");if(this.shouldParseExportStatement()){if(s.declaration=this.parseExportDeclaration(s),s.declaration.type==="VariableDeclaration")this.checkVariableExport(c,s.declaration.declarations);else this.checkExport(c,s.declaration.id,s.declaration.id.start);s.specifiers=[],s.source=null}else{if(s.declaration=null,s.specifiers=this.parseExportSpecifiers(c),this.eatContextual("from")){if(this.type!==a.string)this.unexpected();s.source=this.parseExprAtom(),this.parseMaybeImportAttributes(s)}else{for(let y of s.specifiers)if(this.checkUnreserved(y.local),this.checkLocalExport(y.local),y.local.type==="Literal")this.raise(y.local.start,"A string literal cannot be used as an exported binding without `from`.");s.source=null}this.semicolon()}return this.finishNode(s,"ExportNamedDeclaration")}}checkExport(s,c,l){if(!s)return;if(typeof c!=="string")c=c.type==="Identifier"?c.name:c.value;s[c]=!0}parseMaybeDefault(s,c,l){let h=super.parseMaybeDefault(s,c,l);if(h.type==="AssignmentPattern"&&h.typeAnnotation&&h.right.start<h.typeAnnotation.start)this.raise(h.typeAnnotation.start,D.TypeAnnotationAfterAssign);return h}typeCastToParameter(s){return s.expression.typeAnnotation=s.typeAnnotation,this.resetEndLocation(s.expression,s.typeAnnotation.end,s.typeAnnotation.loc?.end),s.expression}toAssignableList(s,c){if(!s)s=[];for(let l=0;l<s.length;l++){let h=s[l];if(h?.type==="TSTypeCastExpression")s[l]=this.typeCastToParameter(h)}return super.toAssignableList(s,c)}reportReservedArrowTypeParam(s){if(s.params.length===1&&!s.extra?.trailingComma&&r)this.raise(s.start,D.ReservedArrowTypeParam)}parseExprAtom(s,c,l){if(this.type===T.jsxText)return this.jsx_parseText();else if(this.type===T.jsxTagStart)return this.jsx_parseElement();else if(this.type===T.at)return this.parseDecorators(),this.parseExprAtom();else if(L(this.type)){let h=this.potentialArrowAt===this.start,y=this.start,x=this.startLoc,v=this.containsEsc,A=this.parseIdent(!1);if(this.ecmaVersion>=8&&!v&&A.name==="async"&&!this.canInsertSemicolon()&&this.eat(a._function))return this.overrideContext(b.f_expr),this.parseFunction(this.startNodeAt(y,x),0,!1,!0,c);if(h&&!this.canInsertSemicolon()){if(this.eat(a.arrow))return this.parseArrowExpression(this.startNodeAt(y,x),[A],!1,c);if(this.ecmaVersion>=8&&A.name==="async"&&this.type===a.name&&!v&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc)){if(A=this.parseIdent(!1),this.canInsertSemicolon()||!this.eat(a.arrow))this.unexpected();return this.parseArrowExpression(this.startNodeAt(y,x),[A],!0,c)}}return A}else return super.parseExprAtom(s,c,l)}parseExprAtomDefault(){if(L(this.type)){let s=this.potentialArrowAt===this.start,c=this.containsEsc,l=this.parseIdent();if(!c&&l.name==="async"&&!this.canInsertSemicolon()){let{type:h}=this;if(h===a._function)return this.next(),this.parseFunction(this.startNodeAtNode(l),void 0,!0,!0);else if(L(h))if(this.lookaheadCharCode()===61){let y=this.parseIdent(!1);if(this.canInsertSemicolon()||!this.eat(a.arrow))this.unexpected();return this.parseArrowExpression(this.startNodeAtNode(l),[y],!0)}else return l}if(s&&this.match(a.arrow)&&!this.canInsertSemicolon())return this.next(),this.parseArrowExpression(this.startNodeAtNode(l),[l],!1);return l}else this.unexpected()}parseIdentNode(){let s=this.startNode();if(X(this.type)&&!((this.type.keyword==="class"||this.type.keyword==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)))s.name=this.value;else return super.parseIdentNode();return s}parseVarStatement(s,c,l=!1){let{isAmbientContext:h}=this;this.next(),super.parseVar(s,!1,c,l||h),this.semicolon();let y=this.finishNode(s,"VariableDeclaration");if(!h)return y;for(let{id:x,init:v}of y.declarations){if(!v)continue;if(c!=="const"||!!x.typeAnnotation)this.raise(v.start,D.InitializerNotAllowedInAmbientContext);else if(v.type!=="StringLiteral"&&v.type!=="BooleanLiteral"&&v.type!=="NumericLiteral"&&v.type!=="BigIntLiteral"&&(v.type!=="TemplateLiteral"||v.expressions.length>0)&&!xp(v))this.raise(v.start,D.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference)}return y}parseStatement(s,c,l){if(this.match(T.at))this.parseDecorators(!0);if(this.match(a._const)&&this.isLookaheadContextual("enum")){let h=this.startNode();return this.expect(a._const),this.tsParseEnumDeclaration(h,{const:!0})}if(this.ts_isContextual(T.enum))return this.tsParseEnumDeclaration(this.startNode());if(this.ts_isContextual(T.interface)){let h=this.tsParseInterfaceDeclaration(this.startNode());if(h)return h}return super.parseStatement(s,c,l)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}parsePostMemberNameModifiers(s){if(this.eat(a.question))s.optional=!0;if(s.readonly&&this.match(a.parenL))this.raise(s.start,D.ClassMethodHasReadonly);if(s.declare&&this.match(a.parenL))this.raise(s.start,D.ClassMethodHasDeclare)}parseExpressionStatement(s,c){return(c.type==="Identifier"?this.tsParseExpressionStatement(s,c):void 0)||super.parseExpressionStatement(s,c)}shouldParseExportStatement(){if(this.tsIsDeclarationStart())return!0;if(this.match(T.at))return!0;return super.shouldParseExportStatement()}parseConditional(s,c,l,h,y){if(this.eat(a.question)){let x=this.startNodeAt(c,l);return x.test=s,x.consequent=this.parseMaybeAssign(),this.expect(a.colon),x.alternate=this.parseMaybeAssign(h),this.finishNode(x,"ConditionalExpression")}return s}parseMaybeConditional(s,c){let l=this.start,h=this.startLoc,y=this.parseExprOps(s,c);if(this.checkExpressionErrors(c))return y;if(!this.maybeInArrowParameters||!this.match(a.question))return this.parseConditional(y,l,h,s,c);let x=this.tryParse(()=>this.parseConditional(y,l,h,s,c));if(!x.node){if(x.error)this.setOptionalParametersError(c,x.error);return y}if(x.error)this.setLookaheadState(x.failState);return x.node}parseParenItem(s){let c=this.start,l=this.startLoc;if(s=super.parseParenItem(s),this.eat(a.question))s.optional=!0,this.resetEndLocation(s);if(this.match(a.colon)){let h=this.startNodeAt(c,l);return h.expression=s,h.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(h,"TSTypeCastExpression")}return s}parseExportDeclaration(s){if(!this.isAmbientContext&&this.ts_isContextual(T.declare))return this.tsInAmbientContext(()=>this.parseExportDeclaration(s));let c=this.start,l=this.startLoc,h=this.eatContextual("declare");if(h&&(this.ts_isContextual(T.declare)||!this.shouldParseExportStatement()))this.raise(this.start,D.ExpectedAmbientAfterExportDeclare);let x=L(this.type)&&this.tsTryParseExportDeclaration()||this.parseStatement(null);if(!x)return null;if(x.type==="TSInterfaceDeclaration"||x.type==="TSTypeAliasDeclaration"||h)s.exportKind="type";if(h)this.resetStartLocation(x,c,l),x.declare=!0;return x}parseClassId(s,c){if(!c&&this.isContextual("implements"))return;super.parseClassId(s,c);let l=this.tsTryParseTypeParameters(this.tsParseInOutModifiers.bind(this));if(l)s.typeParameters=l}parseClassPropertyAnnotation(s){if(!s.optional){if(this.value==="!"&&this.eat(a.prefix))s.definite=!0;else if(this.eat(a.question))s.optional=!0}let c=this.tsTryParseTypeAnnotation();if(c)s.typeAnnotation=c}parseClassField(s){if(s.key.type==="PrivateIdentifier"){if(s.abstract)this.raise(s.start,D.PrivateElementHasAbstract);if(s.accessibility)this.raise(s.start,D.PrivateElementHasAccessibility({modifier:s.accessibility}));this.parseClassPropertyAnnotation(s)}else{if(this.parseClassPropertyAnnotation(s),this.isAmbientContext&&!(s.readonly&&!s.typeAnnotation)&&this.match(a.eq))this.raise(this.start,D.DeclareClassFieldHasInitializer);if(s.abstract&&this.match(a.eq)){let{key:l}=s;this.raise(this.start,D.AbstractPropertyHasInitializer({propertyName:l.type==="Identifier"&&!s.computed?l.name:`[${this.input.slice(l.start,l.end)}]`}))}}return super.parseClassField(s)}parseClassMethod(s,c,l,h){let y=s.kind==="constructor",x=s.key.type==="PrivateIdentifier",v=this.tsTryParseTypeParameters(this.tsParseConstModifier);if(x){if(v)s.typeParameters=v;if(s.accessibility)this.raise(s.start,D.PrivateMethodsHasAccessibility({modifier:s.accessibility}))}else if(v&&y)this.raise(v.start,D.ConstructorHasTypeParameters);let{declare:A=!1,kind:P}=s;if(A&&(P==="get"||P==="set"))this.raise(s.start,D.DeclareAccessor({kind:P}));if(v)s.typeParameters=v;let S=s.key;if(s.kind==="constructor"){if(c)this.raise(S.start,"Constructor can't be a generator");if(l)this.raise(S.start,"Constructor can't be an async method")}else if(s.static&&Ts(s,"prototype"))this.raise(S.start,"Classes may not have a static property named prototype");let _=s.value=this.parseMethod(c,l,h,!0,s);if(s.kind==="get"&&_.params.length!==0)this.raiseRecoverable(_.start,"getter should have no params");if(s.kind==="set"&&_.params.length!==1)this.raiseRecoverable(_.start,"setter should have exactly one param");if(s.kind==="set"&&_.params[0].type==="RestElement")this.raiseRecoverable(_.params[0].start,"Setter cannot use rest params");return this.finishNode(s,"MethodDefinition")}isClassMethod(){return this.match(a.relational)}parseClassElement(s){if(this.eat(a.semi))return null;let c=this.startNode(),l="",h=!1,y=!1,x="method",v=!1,A=["declare","private","public","protected","accessor","override","abstract","readonly","static"],P=this.tsParseModifiers({modified:c,allowedModifiers:A,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:D.InvalidModifierOnTypeParameterPositions});v=Boolean(P.static);let S=()=>{if(this.tsIsStartOfStaticBlocks()){if(this.next(),this.next(),this.tsHasSomeModifiers(c,A))this.raise(this.start,D.StaticBlockCannotHaveModifier);if(this.ecmaVersion>=13)return super.parseClassStaticBlock(c),c}else{let _=this.tsTryParseIndexSignature(c);if(_){if(c.abstract)this.raise(c.start,D.IndexSignatureHasAbstract);if(c.accessibility)this.raise(c.start,D.IndexSignatureHasAccessibility({modifier:c.accessibility}));if(c.declare)this.raise(c.start,D.IndexSignatureHasDeclare);if(c.override)this.raise(c.start,D.IndexSignatureHasOverride);return _}if(!this.inAbstractClass&&c.abstract)this.raise(c.start,D.NonAbstractClassHasAbstractMethod);if(c.override){if(!s)this.raise(c.start,D.OverrideNotInSubClass)}if(c.static=v,v){if(!(this.isClassElementNameStart()||this.type===a.star))l="static"}if(!l&&this.ecmaVersion>=8&&this.eatContextual("async"))if((this.isClassElementNameStart()||this.type===a.star)&&!this.canInsertSemicolon())y=!0;else l="async";if(!l&&(this.ecmaVersion>=9||!y)&&this.eat(a.star))h=!0;if(!l&&!y&&!h){let k=this.value;if(this.eatContextual("get")||this.eatContextual("set"))if(this.isClassElementNameStart())x=k;else l=k}if(l)c.computed=!1,c.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),c.key.name=l,this.finishNode(c.key,"Identifier");else this.parseClassElementName(c);if(this.parsePostMemberNameModifiers(c),this.isClassMethod()||this.ecmaVersion<13||this.type===a.parenL||x!=="method"||h||y){let k=!c.static&&Ts(c,"constructor"),R=k&&s;if(k&&x!=="method")this.raise(c.key.start,"Constructor can't have get/set modifier");c.kind=k?"constructor":x,this.parseClassMethod(c,h,y,R)}else this.parseClassField(c);return c}};if(c.declare)this.tsInAmbientContext(S);else S();return c}isClassElementNameStart(){if(this.tsIsIdentifier())return!0;return super.isClassElementNameStart()}parseClassSuper(s){if(super.parseClassSuper(s),s.superClass&&(this.tsMatchLeftRelational()||this.match(a.bitShift)))s.superTypeParameters=this.tsParseTypeArgumentsInExpression();if(this.eatContextual("implements"))s.implements=this.tsParseHeritageClause("implements")}parseFunctionParams(s){let c=this.tsTryParseTypeParameters(this.tsParseConstModifier);if(c)s.typeParameters=c;super.parseFunctionParams(s)}parseVarId(s,c){if(super.parseVarId(s,c),s.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.value==="!"&&this.eat(a.prefix))s.definite=!0;let l=this.tsTryParseTypeAnnotation();if(l)s.id.typeAnnotation=l,this.resetEndLocation(s.id)}parseArrowExpression(s,c,l,h){if(this.match(a.colon))s.returnType=this.tsParseTypeAnnotation();let y=this.yieldPos,x=this.awaitPos,v=this.awaitIdentPos;this.enterScope(tn(l,!1)|Y.SCOPE_ARROW),this.initFunction(s);let A=this.maybeInArrowParameters;if(this.ecmaVersion>=8)s.async=!!l;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.maybeInArrowParameters=!0,s.params=this.toAssignableList(c,!0),this.maybeInArrowParameters=!1,this.parseFunctionBody(s,!0,!1,h),this.yieldPos=y,this.awaitPos=x,this.awaitIdentPos=v,this.maybeInArrowParameters=A,this.finishNode(s,"ArrowFunctionExpression")}parseMaybeAssignOrigin(s,c,l){if(this.isContextual("yield"))if(this.inGenerator)return this.parseYield(s);else this.exprAllowed=!1;let h=!1,y=-1,x=-1,v=-1;if(c)y=c.parenthesizedAssign,x=c.trailingComma,v=c.doubleProto,c.parenthesizedAssign=c.trailingComma=-1;else c=new _t,h=!0;let A=this.start,P=this.startLoc;if(this.type===a.parenL||L(this.type))this.potentialArrowAt=this.start,this.potentialArrowInForAwait=s==="await";let S=this.parseMaybeConditional(s,c);if(l)S=l.call(this,S,A,P);if(this.type.isAssign){let _=this.startNodeAt(A,P);if(_.operator=this.value,this.type===a.eq)S=this.toAssignable(S,!0,c);if(!h)c.parenthesizedAssign=c.trailingComma=c.doubleProto=-1;if(c.shorthandAssign>=S.start)c.shorthandAssign=-1;if(!this.maybeInArrowParameters)if(this.type===a.eq)this.checkLValPattern(S);else this.checkLValSimple(S);if(_.left=S,this.next(),_.right=this.parseMaybeAssign(s),v>-1)c.doubleProto=v;return this.finishNode(_,"AssignmentExpression")}else if(h)this.checkExpressionErrors(c,!0);if(y>-1)c.parenthesizedAssign=y;if(x>-1)c.trailingComma=x;return S}parseMaybeAssign(s,c,l){let h,y,x;if(e?.jsx&&(this.matchJsx("jsxTagStart")||this.tsMatchLeftRelational())){if(h=this.cloneCurLookaheadState(),y=this.tryParse(()=>this.parseMaybeAssignOrigin(s,c,l),h),!y.error)return y.node;let P=this.context,S=P[P.length-1],_=P[P.length-2];if(S===o.tokContexts.tc_oTag&&_===o.tokContexts.tc_expr)P.pop(),P.pop();else if(S===o.tokContexts.tc_oTag||S===o.tokContexts.tc_expr)P.pop()}if(!y?.error&&!this.tsMatchLeftRelational())return this.parseMaybeAssignOrigin(s,c,l);if(!h||this.compareLookaheadState(h,this.getCurLookaheadState()))h=this.cloneCurLookaheadState();let v,A=this.tryParse((P)=>{v=this.tsParseTypeParameters(this.tsParseConstModifier);let S=this.parseMaybeAssignOrigin(s,c,l);if(S.type!=="ArrowFunctionExpression"||S.extra?.parenthesized)P();if(v?.params.length!==0)this.resetStartLocationFromNode(S,v);return S.typeParameters=v,S},h);if(!A.error&&!A.aborted){if(v)this.reportReservedArrowTypeParam(v);return A.node}if(!y){if(vs(!0),x=this.tryParse(()=>this.parseMaybeAssignOrigin(s,c,l),h),!x.error)return x.node}if(y?.node)return this.setLookaheadState(y.failState),y.node;if(A.node){if(this.setLookaheadState(A.failState),v)this.reportReservedArrowTypeParam(v);return A.node}if(x?.node)return this.setLookaheadState(x.failState),x.node;if(y?.thrown)throw y.error;if(A.thrown)throw A.error;if(x?.thrown)throw x.error;throw y?.error||A.error||x?.error}parseAssignableListItem(s){let c=[];while(this.match(T.at))c.push(this.parseDecorator());let l=this.start,h=this.startLoc,y,x=!1,v=!1;if(s!==void 0){let S={};if(this.tsParseModifiers({modified:S,allowedModifiers:["public","private","protected","override","readonly"]}),y=S.accessibility,v=S.override,x=S.readonly,s===!1&&(y||x||v))this.raise(h.column,D.UnexpectedParameterModifier)}let A=this.parseMaybeDefault(l,h);this.parseBindingListItem(A);let P=this.parseMaybeDefault(A.start,A.loc.start,A);if(c.length)P.decorators=c;if(y||x||v){let S=this.startNodeAt(l,h);if(y)S.accessibility=y;if(x)S.readonly=x;if(v)S.override=v;if(P.type!=="Identifier"&&P.type!=="AssignmentPattern")this.raise(S.start,D.UnsupportedParameterPropertyKind);return S.parameter=P,this.finishNode(S,"TSParameterProperty")}return P}checkLValInnerPattern(s,c=Y.BIND_NONE,l){switch(s.type){case"TSParameterProperty":this.checkLValInnerPattern(s.parameter,c,l);break;default:{super.checkLValInnerPattern(s,c,l);break}}}parseBindingListItem(s){if(this.eat(a.question)){if(s.type!=="Identifier"&&!this.isAmbientContext&&!this.inType)this.raise(s.start,D.PatternIsOptional);s.optional=!0}let c=this.tsTryParseTypeAnnotation();if(c)s.typeAnnotation=c;return this.resetEndLocation(s),s}isAssignable(s,c){switch(s.type){case"TSTypeCastExpression":return this.isAssignable(s.expression,c);case"TSParameterProperty":return!0;case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":return!0;case"ObjectExpression":{let l=s.properties.length-1;return s.properties.every((h,y)=>h.type!=="ObjectMethod"&&(y===l||h.type!=="SpreadElement")&&this.isAssignable(h))}case"Property":case"ObjectProperty":return this.isAssignable(s.value);case"SpreadElement":return this.isAssignable(s.argument);case"ArrayExpression":return s.elements.every((l)=>l===null||this.isAssignable(l));case"AssignmentExpression":return s.operator==="=";case"ParenthesizedExpression":return this.isAssignable(s.expression);case"MemberExpression":case"OptionalMemberExpression":return!c;default:return!1}}toAssignable(s,c=!1,l=new _t){switch(s.type){case"ParenthesizedExpression":return this.toAssignableParenthesizedExpression(s,c,l);case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":if(c);else this.raise(s.start,D.UnexpectedTypeCastInParameter);return this.toAssignable(s.expression,c,l);case"MemberExpression":break;case"AssignmentExpression":if(!c&&s.left.type==="TSTypeCastExpression")s.left=this.typeCastToParameter(s.left);return super.toAssignable(s,c,l);case"TSTypeCastExpression":return this.typeCastToParameter(s);default:return super.toAssignable(s,c,l)}return s}toAssignableParenthesizedExpression(s,c,l){switch(s.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":return this.toAssignable(s.expression,c,l);default:return super.toAssignable(s,c,l)}}parseBindingAtom(){switch(this.type){case a._this:return this.parseIdent(!0);default:return super.parseBindingAtom()}}shouldParseArrow(s){let c;if(this.match(a.colon))c=s.every((l)=>this.isAssignable(l,!0));else c=!this.canInsertSemicolon();if(c){if(this.match(a.colon)){let l=this.tryParse((h)=>{let y=this.tsParseTypeOrTypePredicateAnnotation(a.colon);if(this.canInsertSemicolon()||!this.match(a.arrow))h();return y});if(l.aborted)return this.shouldParseArrowReturnType=void 0,!1;if(!l.thrown){if(l.error)this.setLookaheadState(l.failState);this.shouldParseArrowReturnType=l.node}}if(!this.match(a.arrow))return this.shouldParseArrowReturnType=void 0,!1;return!0}return this.shouldParseArrowReturnType=void 0,c}parseParenArrowList(s,c,l,h){let y=this.startNodeAt(s,c);return y.returnType=this.shouldParseArrowReturnType,this.shouldParseArrowReturnType=void 0,this.parseArrowExpression(y,l,!1,h)}parseParenAndDistinguishExpression(s,c){let l=this.start,h=this.startLoc,y,x=this.ecmaVersion>=8;if(this.ecmaVersion>=6){let v=this.maybeInArrowParameters;this.maybeInArrowParameters=!0,this.next();let A=this.start,P=this.startLoc,S=[],_=!0,k=!1,R=new _t,j=this.yieldPos,M=this.awaitPos,J;this.yieldPos=0,this.awaitPos=0;while(this.type!==a.parenR)if(_?_=!1:this.expect(a.comma),x&&this.afterTrailingComma(a.parenR,!0)){k=!0;break}else if(this.type===a.ellipsis){if(J=this.start,S.push(this.parseParenItem(this.parseRestBinding())),this.type===a.comma)this.raise(this.start,"Comma is not permitted after the rest element");break}else S.push(this.parseMaybeAssign(c,R,this.parseParenItem));let H=this.lastTokEnd,G=this.lastTokEndLoc;if(this.expect(a.parenR),this.maybeInArrowParameters=v,s&&this.shouldParseArrow(S)&&this.eat(a.arrow))return this.checkPatternErrors(R,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=j,this.awaitPos=M,this.parseParenArrowList(l,h,S,c);if(!S.length||k)this.unexpected(this.lastTokStart);if(J)this.unexpected(J);if(this.checkExpressionErrors(R,!0),this.yieldPos=j||this.yieldPos,this.awaitPos=M||this.awaitPos,S.length>1)y=this.startNodeAt(A,P),y.expressions=S,this.finishNodeAt(y,"SequenceExpression",H,G);else y=S[0]}else y=this.parseParenExpression();if(this.options.preserveParens){let v=this.startNodeAt(l,h);return v.expression=y,this.finishNode(v,"ParenthesizedExpression")}else return y}parseTaggedTemplateExpression(s,c,l,h){let y=this.startNodeAt(c,l);if(y.tag=s,y.quasi=this.parseTemplate({isTagged:!0}),h)this.raise(c,"Tagged Template Literals are not allowed in optionalChain.");return this.finishNode(y,"TaggedTemplateExpression")}shouldParseAsyncArrow(){if(this.match(a.colon)){let s=this.tryParse((c)=>{let l=this.tsParseTypeOrTypePredicateAnnotation(a.colon);if(this.canInsertSemicolon()||!this.match(a.arrow))c();return l});if(s.aborted)return this.shouldParseAsyncArrowReturnType=void 0,!1;if(!s.thrown){if(s.error)this.setLookaheadState(s.failState);return this.shouldParseAsyncArrowReturnType=s.node,!this.canInsertSemicolon()&&this.eat(a.arrow)}}else return!this.canInsertSemicolon()&&this.eat(a.arrow)}parseSubscriptAsyncArrow(s,c,l,h){let y=this.startNodeAt(s,c);return y.returnType=this.shouldParseAsyncArrowReturnType,this.shouldParseAsyncArrowReturnType=void 0,this.parseArrowExpression(y,l,!0,h)}parseExprList(s,c,l,h){let y=[],x=!0;while(!this.eat(s)){if(!x){if(this.expect(a.comma),c&&this.afterTrailingComma(s))break}else x=!1;let v;if(l&&this.type===a.comma)v=null;else if(this.type===a.ellipsis){if(v=this.parseSpread(h),this.maybeInArrowParameters&&this.match(a.colon))v.typeAnnotation=this.tsParseTypeAnnotation();if(h&&this.type===a.comma&&h.trailingComma<0)h.trailingComma=this.start}else v=this.parseMaybeAssign(!1,h,this.parseParenItem);y.push(v)}return y}parseSubscript(s,c,l,h,y,x,v){let A=x;if(!this.hasPrecedingLineBreak()&&this.value==="!"&&this.match(a.prefix)){this.exprAllowed=!1,this.next();let R=this.startNodeAt(c,l);return R.expression=s,s=this.finishNode(R,"TSNonNullExpression"),s}let P=!1;if(this.match(a.questionDot)&&this.lookaheadCharCode()===60){if(h)return s;s.optional=!0,A=P=!0,this.next()}if(this.tsMatchLeftRelational()||this.match(a.bitShift)){let R,j=this.tsTryParseAndCatch(()=>{if(!h&&this.atPossibleAsyncArrow(s)){let G=this.tsTryParseGenericAsyncArrowFunction(c,l,v);if(G)return s=G,s}let M=this.tsParseTypeArgumentsInExpression();if(!M)return s;if(P&&!this.match(a.parenL))return R=this.curPosition(),s;if(F(this.type)||this.type===a.backQuote){let G=this.parseTaggedTemplateExpression(s,c,l,A);return G.typeArguments=M,G}if(!h&&this.eat(a.parenL)){let G=new _t,U=this.startNodeAt(c,l);if(U.callee=s,U.arguments=this.parseExprList(a.parenR,this.ecmaVersion>=8,!1,G),this.tsCheckForInvalidTypeCasts(U.arguments),U.typeArguments=M,A)U.optional=P;return this.checkExpressionErrors(G,!0),s=this.finishNode(U,"CallExpression"),s}let J=this.type;if(this.tsMatchRightRelational()||J===a.bitShift||J!==a.parenL&&bp(J)&&!this.hasPrecedingLineBreak())return;let H=this.startNodeAt(c,l);return H.expression=s,H.typeArguments=M,this.finishNode(H,"TSInstantiationExpression")});if(R)this.unexpected(R);if(j){if(j.type==="TSInstantiationExpression"&&(this.match(a.dot)||this.match(a.questionDot)&&this.lookaheadCharCode()!==40))this.raise(this.start,D.InvalidPropertyAccessAfterInstantiationExpression);return s=j,s}}let S=this.ecmaVersion>=11,_=S&&this.eat(a.questionDot);if(h&&_)this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");let k=this.eat(a.bracketL);if(k||_&&this.type!==a.parenL&&this.type!==a.backQuote||this.eat(a.dot)){let R=this.startNodeAt(c,l);if(R.object=s,k)R.property=this.parseExpression(),this.expect(a.bracketR);else if(this.type===a.privateId&&s.type!=="Super")R.property=this.parsePrivateIdent();else R.property=this.parseIdent(this.options.allowReserved!=="never");if(R.computed=!!k,S)R.optional=_;s=this.finishNode(R,"MemberExpression")}else if(!h&&this.eat(a.parenL)){let R=this.maybeInArrowParameters;this.maybeInArrowParameters=!0;let j=new _t,M=this.yieldPos,J=this.awaitPos,H=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;let G=this.parseExprList(a.parenR,this.ecmaVersion>=8,!1,j);if(y&&!_&&this.shouldParseAsyncArrow()){if(this.checkPatternErrors(j,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0)this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function");this.yieldPos=M,this.awaitPos=J,this.awaitIdentPos=H,s=this.parseSubscriptAsyncArrow(c,l,G,v)}else{this.checkExpressionErrors(j,!0),this.yieldPos=M||this.yieldPos,this.awaitPos=J||this.awaitPos,this.awaitIdentPos=H||this.awaitIdentPos;let U=this.startNodeAt(c,l);if(U.callee=s,U.arguments=G,S)U.optional=_;s=this.finishNode(U,"CallExpression")}this.maybeInArrowParameters=R}else if(this.type===a.backQuote){if(_||A)this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");let R=this.startNodeAt(c,l);R.tag=s,R.quasi=this.parseTemplate({isTagged:!0}),s=this.finishNode(R,"TaggedTemplateExpression")}return s}parseGetterSetter(s){s.kind=s.key.name,this.parsePropertyName(s);let c=this.tsTryParseTypeParameters(this.tsParseConstModifier);if(s.value=this.parseMethod(!1),c)s.value.typeParameters=c;let l=s.kind==="get"?0:1,h=s.value.params[0];if(l=h&&this.isThisParam(h)?l+1:l,s.value.params.length!==l){let x=s.value.start;if(s.kind==="get")this.raiseRecoverable(x,"getter should have no params");else this.raiseRecoverable(x,"setter should have exactly one param")}else if(s.kind==="set"&&s.value.params[0].type==="RestElement")this.raiseRecoverable(s.value.params[0].start,"Setter cannot use rest params")}parsePropertyValue(s,c,l,h,y,x,v,A){if(this.tsMatchLeftRelational()){if(c)this.unexpected();s.kind="init",s.method=!0;let P=this.tsTryParseTypeParameters(this.tsParseConstModifier);if(s.value=this.parseMethod(l,h),P)s.value.typeParameters=P;return}return super.parsePropertyValue(s,c,l,h,y,x,v,A)}parseProperty(s,c){if(!s){let l=[];if(this.match(T.at))while(this.match(T.at))l.push(this.parseDecorator());let h=super.parseProperty(s,c);if(h.type==="SpreadElement"){if(l.length)this.raise(h.start,pr.SpreadElementDecorator)}if(l.length)h.decorators=l,l=[];return h}return super.parseProperty(s,c)}parseCatchClauseParam(){let s=this.parseBindingAtom(),c=s.type==="Identifier";this.enterScope(c?Y.SCOPE_SIMPLE_CATCH:0),this.checkLValPattern(s,c?Y.BIND_SIMPLE_CATCH:Y.BIND_LEXICAL);let l=this.tsTryParseTypeAnnotation();if(l)s.typeAnnotation=l,this.resetEndLocation(s);return this.expect(a.parenR),s}parseClass(s,c){let l=this.inAbstractClass;this.inAbstractClass=!!s.abstract;try{this.next(),this.takeDecorators(s);let h=this.strict;this.strict=!0,this.parseClassId(s,c),this.parseClassSuper(s);let y=this.enterClassBody(),x=this.startNode(),v=!1;x.body=[];let A=[];this.expect(a.braceL);while(this.type!==a.braceR){if(this.match(T.at)){A.push(this.parseDecorator());continue}let P=this.parseClassElement(s.superClass!==null);if(A.length)P.decorators=A,this.resetStartLocationFromNode(P,A[0]),A=[];if(P){if(x.body.push(P),P.type==="MethodDefinition"&&P.kind==="constructor"&&P.value.type==="FunctionExpression"){if(v)this.raiseRecoverable(P.start,"Duplicate constructor in the same class");if(v=!0,P.decorators&&P.decorators.length>0)this.raise(P.start,pr.DecoratorConstructor)}else if(P.key&&P.key.type==="PrivateIdentifier"&&P.value?.type!=="TSDeclareMethod"&&cp(y,P))this.raiseRecoverable(P.key.start,`Identifier '#${P.key.name}' has already been declared`)}}if(this.strict=h,this.next(),A.length)this.raise(this.start,pr.TrailingDecorator);return s.body=this.finishNode(x,"ClassBody"),this.exitClassBody(),this.finishNode(s,c?"ClassDeclaration":"ClassExpression")}finally{this.inAbstractClass=l}}parseClassFunctionParams(){let s=this.tsTryParseTypeParameters(),c=this.parseBindingList(a.parenR,!1,this.ecmaVersion>=8,!0);if(s)c.typeParameters=s;return c}parseMethod(s,c,l,h,y){let x=this.startNode(),v=this.yieldPos,A=this.awaitPos,P=this.awaitIdentPos;if(this.initFunction(x),this.ecmaVersion>=6)x.generator=s;if(this.ecmaVersion>=8)x.async=!!c;if(this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(tn(c,x.generator)|Y.SCOPE_SUPER|(l?Y.SCOPE_DIRECT_SUPER:0)),this.expect(a.parenL),x.params=this.parseClassFunctionParams(),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(x,!1,!0,!1,{isClassMethod:h}),this.yieldPos=v,this.awaitPos=A,this.awaitIdentPos=P,y&&y.abstract){if(!!x.body){let{key:_}=y;this.raise(y.start,D.AbstractMethodHasImplementation({methodName:_.type==="Identifier"&&!y.computed?_.name:`[${this.input.slice(_.start,_.end)}]`}))}}return this.finishNode(x,"FunctionExpression")}static parse(s,c){if(c.locations===!1)throw Error("You have to enable options.locations while using acorn-typescript");else c.locations=!0;let l=new this(c,s);if(t)l.isAmbientContext=!0;return l.parse()}static parseExpressionAt(s,c,l){if(l.locations===!1)throw Error("You have to enable options.locations while using acorn-typescript");else l.locations=!0;let h=new this(l,s,c);if(t)h.isAmbientContext=!0;return h.nextToken(),h.parseExpression()}parseImportSpecifier(){if(this.ts_isContextual(T.type)){let c=this.startNode();return c.imported=this.parseModuleExportName(),this.parseTypeOnlyImportExportSpecifier(c,!0,this.importOrExportOuterKind==="type"),this.finishNode(c,"ImportSpecifier")}else{let c=super.parseImportSpecifier();return c.importKind="value",c}}parseExportSpecifier(s){let c=this.ts_isContextual(T.type);if(!this.match(a.string)&&c){let h=this.startNode();return h.local=this.parseModuleExportName(),this.parseTypeOnlyImportExportSpecifier(h,!1,this.importOrExportOuterKind==="type"),this.finishNode(h,"ExportSpecifier"),this.checkExport(s,h.exported,h.exported.start),h}else{let h=super.parseExportSpecifier(s);return h.exportKind="value",h}}parseTypeOnlyImportExportSpecifier(s,c,l){let h=c?"imported":"local",y=c?"local":"exported",x=s[h],v,A=!1,P=!0,S=x.start;if(this.isContextual("as")){let k=this.parseIdent();if(this.isContextual("as")){let R=this.parseIdent();if(X(this.type))A=!0,x=k,v=c?this.parseIdent():this.parseModuleExportName(),P=!1;else v=R,P=!1}else if(X(this.type))P=!1,v=c?this.parseIdent():this.parseModuleExportName();else A=!0,x=k}else if(X(this.type))if(A=!0,c){if(x=super.parseIdent(!0),!this.isContextual("as"))this.checkUnreserved(x)}else x=this.parseModuleExportName();if(A&&l)this.raise(S,c?D.TypeModifierIsUsedInTypeImports:D.TypeModifierIsUsedInTypeExports);s[h]=x,s[y]=v;let _=c?"importKind":"exportKind";if(s[_]=A?"type":"value",P&&this.eatContextual("as"))s[y]=c?this.parseIdent():this.parseModuleExportName();if(!s[y])s[y]=this.copyNode(s[h]);if(c)this.checkLValSimple(s[y],Y.BIND_LEXICAL)}raiseCommonCheck(s,c,l){switch(c){case"Comma is not permitted after the rest element":if(this.isAmbientContext&&this.match(a.comma)&&this.lookaheadCharCode()===41){this.next();return}else return super.raise(s,c)}return l?super.raiseRecoverable(s,c):super.raise(s,c)}raiseRecoverable(s,c){return this.raiseCommonCheck(s,c,!0)}raise(s,c){return this.raiseCommonCheck(s,c,!0)}updateContext(s){let{type:c}=this;if(c==a.braceL){var l=this.curContext();if(l==w.tc_oTag)this.context.push(b.b_expr);else if(l==w.tc_expr)this.context.push(b.b_tmpl);else super.updateContext(s);this.exprAllowed=!0}else if(c===a.slash&&s===T.jsxTagStart)this.context.length-=2,this.context.push(w.tc_cTag),this.exprAllowed=!1;else return super.updateContext(s)}jsx_parseOpeningElementAt(s,c){let l=this.startNodeAt(s,c),h=this.jsx_parseElementName();if(h)l.name=h;if(this.match(a.relational)||this.match(a.bitShift)){let y=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());if(y)l.typeArguments=y}l.attributes=[];while(this.type!==a.slash&&this.type!==T.jsxTagEnd)l.attributes.push(this.jsx_parseAttribute());return l.selfClosing=this.eat(a.slash),this.expect(T.jsxTagEnd),this.finishNode(l,h?"JSXOpeningElement":"JSXOpeningFragment")}enterScope(s){if(s===Nt)this.importsStack.push([]);super.enterScope(s);let c=super.currentScope();c.types=[],c.enums=[],c.constEnums=[],c.classes=[],c.exportOnlyBindings=[]}exitScope(){if(super.currentScope().flags===Nt)this.importsStack.pop();super.exitScope()}hasImport(s,c){let l=this.importsStack.length;if(this.importsStack[l-1].indexOf(s)>-1)return!0;if(!c&&l>1){for(let h=0;h<l-1;h++)if(this.importsStack[h].indexOf(s)>-1)return!0}return!1}maybeExportDefined(s,c){if(this.inModule&&s.flags&Y.SCOPE_TOP)delete this.undefinedExports[c]}declareName(s,c,l){if(c&Y.BIND_FLAGS_TS_IMPORT){if(this.hasImport(s,!0))this.raise(l,`Identifier '${s}' has already been declared.`);this.importsStack[this.importsStack.length-1].push(s);return}let h=this.currentScope();if(c&Y.BIND_FLAGS_TS_EXPORT_ONLY){this.maybeExportDefined(h,s),h.exportOnlyBindings.push(s);return}if(c===Y.BIND_TS_TYPE||c===Y.BIND_TS_INTERFACE){if(c===Y.BIND_TS_TYPE&&h.types.includes(s))this.raise(l,`type '${s}' has already been declared.`);h.types.push(s)}else super.declareName(s,c,l);if(c&Y.BIND_FLAGS_TS_ENUM)h.enums.push(s);if(c&Y.BIND_FLAGS_TS_CONST_ENUM)h.constEnums.push(s);if(c&Y.BIND_FLAGS_CLASS)h.classes.push(s)}checkLocalExport(s){let{name:c}=s;if(this.hasImport(c))return;let l=this.scopeStack.length;for(let h=l-1;h>=0;h--){let y=this.scopeStack[h];if(y.types.indexOf(c)>-1||y.exportOnlyBindings.indexOf(c)>-1)return}super.checkLocalExport(s)}}return g}}function Ls(e,t,r){let n=r._,i=!1;function o(p,{next:u,state:m}){u(m)}function a(p,u,m){if(i)return;if(!p.type)return;let f,b={},E={path:u,state:m,next:(w=m)=>{u.push(p);for(let B in p){if(B==="type")continue;let C=p[B];if(C&&typeof C==="object")if(Array.isArray(C)){let F={},V=C.length,L=!1;for(let X=0;X<V;X++){let O=C[X];if(O&&typeof O==="object"){let Q=a(O,u,w);if(Q)F[X]=Q,L=!0}}if(L)b[B]=C.map((X,O)=>F[O]??X)}else{let F=a(C,u,w);if(F)b[B]=F}}if(u.pop(),Object.keys(b).length>0)return Ds(p,b)},stop:()=>{i=!0},visit:(w,B=m)=>{u.push(p);let C=a(w,u,B)??w;return u.pop(),C}},T=r[p.type]??o;if(n){let w;if(f=n(p,{...E,next:(B=m)=>(m=B,w=T(p,{...E,state:B}),w)}),!f&&w)f=w}else f=T(p,E);if(!f){if(Object.keys(b).length>0)f=Ds(p,b)}if(f)return f}return a(e,[],t)??e}function Ds(e,t){let r={},n=Object.getOwnPropertyDescriptors(e);for(let i in n)Object.defineProperty(r,i,n[i]);for(let i in t)r[i]=t[i];return r}var Ep=/\n/,Sp=/[ \t]/,Cp=/^[,) \t]*$/,ur="",Rs=[];function hr(e,t){ur=e,Rs=t}function dr(e,t,r,n){let i=t;if(e&&Ep.test(i)){let o=r;while(o>0&&ur[o-1]!==`
|
|
27
|
-
`)o-=1;let a=o;while(
|
|
28
|
+
`;else T=String.fromCharCode(b);if(this.options.locations)++this.curLine,this.lineStart=this.pos;return T}jsx_readString(d){let b="",T=++this.pos;for(;;){if(this.pos>=this.input.length)this.raise(this.start,"Unterminated string constant");let E=this.input.charCodeAt(this.pos);if(E===d)break;if(E===38)b+=this.input.slice(T,this.pos),b+=this.jsx_readEntity(),T=this.pos;else if(a(E))b+=this.input.slice(T,this.pos),b+=this.jsx_readNewLine(!1),T=this.pos;else++this.pos}return b+=this.input.slice(T,this.pos++),this.finishToken(i.string,b)}jsx_readEntity(){let d="",b=0,T,E=this.input[this.pos];if(E!=="&")this.raise(this.pos,"Entity must start with an ampersand");let k=++this.pos;while(this.pos<this.input.length&&b++<10){if(E=this.input[this.pos++],E===";"){if(d[0]==="#"){if(d[1]==="x"){if(d=d.substr(2),yp.test(d))T=String.fromCharCode(parseInt(d,16))}else if(d=d.substr(1),gp.test(d))T=String.fromCharCode(parseInt(d,10))}else T=mp[d];break}d+=E}if(!T)return this.pos=k,"&";return T}jsx_readWord(){let d,b=this.pos;do d=this.input.charCodeAt(++this.pos);while(p(d)||d===45);return this.finishToken(o.jsxName,this.input.slice(b,this.pos))}jsx_parseIdentifier(){let d=this.startNode();if(this.type===o.jsxName)d.name=this.value;else if(this.type.keyword)d.name=this.type.keyword;else this.unexpected();return this.next(),this.finishNode(d,"JSXIdentifier")}jsx_parseNamespacedName(){let d=this.start,b=this.startLoc,T=this.jsx_parseIdentifier();if(!l.allowNamespaces||!this.eat(i.colon))return T;var E=this.startNodeAt(d,b);return E.namespace=T,E.name=this.jsx_parseIdentifier(),this.finishNode(E,"JSXNamespacedName")}jsx_parseElementName(){if(this.type===o.jsxTagEnd)return"";let d=this.start,b=this.startLoc,T=this.jsx_parseNamespacedName();if(this.type===i.dot&&T.type==="JSXNamespacedName"&&!l.allowNamespacedObjects)this.unexpected();while(this.eat(i.dot)){let E=this.startNodeAt(d,b);E.object=T,E.property=this.jsx_parseIdentifier(),T=this.finishNode(E,"JSXMemberExpression")}return T}jsx_parseAttributeValue(){switch(this.type){case i.braceL:let d=this.jsx_parseExpressionContainer();if(d.expression.type==="JSXEmptyExpression")this.raise(d.start,"JSX attributes must only be assigned a non-empty expression");return d;case o.jsxTagStart:case i.string:return this.parseExprAtom();default:this.raise(this.start,"JSX value should be either an expression or a quoted JSX text")}}jsx_parseEmptyExpression(){let d=this.startNodeAt(this.lastTokEnd,this.lastTokEndLoc);return this.finishNodeAt(d,"JSXEmptyExpression",this.start,this.startLoc)}jsx_parseExpressionContainer(){let d=this.startNode();return this.next(),d.expression=this.type===i.braceR?this.jsx_parseEmptyExpression():this.parseExpression(),this.expect(i.braceR),this.finishNode(d,"JSXExpressionContainer")}jsx_parseAttribute(){let d=this.startNode();if(this.eat(i.braceL))return this.expect(i.ellipsis),d.argument=this.parseMaybeAssign(),this.expect(i.braceR),this.finishNode(d,"JSXSpreadAttribute");return d.name=this.jsx_parseNamespacedName(),d.value=this.eat(i.eq)?this.jsx_parseAttributeValue():null,this.finishNode(d,"JSXAttribute")}jsx_parseOpeningElementAt(d,b){let T=this.startNodeAt(d,b);T.attributes=[];let E=this.jsx_parseElementName();if(E)T.name=E;while(this.type!==i.slash&&this.type!==o.jsxTagEnd)T.attributes.push(this.jsx_parseAttribute());return T.selfClosing=this.eat(i.slash),this.expect(o.jsxTagEnd),this.finishNode(T,E?"JSXOpeningElement":"JSXOpeningFragment")}jsx_parseClosingElementAt(d,b){let T=this.startNodeAt(d,b),E=this.jsx_parseElementName();if(E)T.name=E;return this.expect(o.jsxTagEnd),this.finishNode(T,E?"JSXClosingElement":"JSXClosingFragment")}jsx_parseElementAt(d,b){let T=this.startNodeAt(d,b),E=[],k=this.jsx_parseOpeningElementAt(d,b),B=null;if(!k.selfClosing){e:for(;;)switch(this.type){case o.jsxTagStart:if(d=this.start,b=this.startLoc,this.next(),this.eat(i.slash)){B=this.jsx_parseClosingElementAt(d,b);break e}E.push(this.jsx_parseElementAt(d,b));break;case o.jsxText:E.push(this.parseExprAtom());break;case i.braceL:E.push(this.jsx_parseExpressionContainer());break;default:this.unexpected()}if(Dt(B.name)!==Dt(k.name))this.raise(B.start,"Expected corresponding JSX closing tag for <"+Dt(k.name)+">")}let C=k.name?"Element":"Fragment";if(T["opening"+C]=k,T["closing"+C]=B,T.children=E,this.type===i.relational&&this.value==="<")this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag");return this.finishNode(T,"JSX"+C)}jsx_parseText(){let d=this.parseLiteral(this.value);return d.type="JSXText",d}jsx_parseElement(){let d=this.start,b=this.startLoc;return this.next(),this.jsx_parseElementAt(d,b)}}}function bp(e,t,r){let{tokTypes:n}=t,{tokTypes:i}=r;return class extends e{parseMaybeImportAttributes(a){if(this.type===i._with||this.type===n.assert){this.next();let p=this.parseImportAttributes();if(p)a.attributes=p}}parseImportAttributes(){this.expect(i.braceL);let a=this.parseWithEntries();return this.expect(i.braceR),a}parseWithEntries(){let a=[],p=new Set;do{if(this.type===i.braceR)break;let l=this.startNode(),m;if(this.type===i.string)m=this.parseLiteral(this.value);else m=this.parseIdent(!0);if(this.next(),l.key=m,p.has(l.key.name))this.raise(this.pos,"Duplicated key in attributes");if(p.add(l.key.name),this.type!==i.string)this.raise(this.pos,"Only string is supported as an attribute value");l.value=this.parseLiteral(this.value),a.push(this.finishNode(l,"ImportAttribute"))}while(this.eat(i.comma));return a}}}var tn=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;function ws(e){if(!e)throw Error("Assert fail")}function Tp(e){return e==="accessor"}function Ep(e){return e==="in"||e==="out"}var cr=1,_s=2,Sp=4,Y={SCOPE_TOP:1,SCOPE_FUNCTION:2,SCOPE_ASYNC:4,SCOPE_GENERATOR:8,SCOPE_ARROW:16,SCOPE_SIMPLE_CATCH:32,SCOPE_SUPER:64,SCOPE_DIRECT_SUPER:128,SCOPE_CLASS_STATIC_BLOCK:256,SCOPE_VAR:256,BIND_NONE:0,BIND_VAR:1,BIND_LEXICAL:2,BIND_FUNCTION:3,BIND_SIMPLE_CATCH:4,BIND_OUTSIDE:5,BIND_TS_TYPE:6,BIND_TS_INTERFACE:7,BIND_TS_NAMESPACE:1032,BIND_FLAGS_TS_EXPORT_ONLY:1024,BIND_FLAGS_TS_IMPORT:4096,BIND_FLAGS_TS_ENUM:256,BIND_FLAGS_TS_CONST_ENUM:512,BIND_FLAGS_CLASS:128};function rn(e,t){return Y.SCOPE_FUNCTION|(e?Y.SCOPE_ASYNC:0)|(t?Y.SCOPE_GENERATOR:0)}function vp(e){if(e.type!=="MemberExpression")return!1;let{computed:t,property:r}=e;if(t&&(r.type!=="TemplateLiteral"||r.expressions.length>0))return!1;return Bs(e.object)}function Bs(e){if(e.type==="Identifier")return!0;if(e.type!=="MemberExpression")return!1;if(e.computed)return!1;return Bs(e.object)}function Ns(e){return e==="private"||e==="public"||e==="protected"}function Cp(e){return Boolean(e.startsExpr)}function Ap(e){if(e==null)throw Error(`Unexpected ${e} value.`);return e}function Pp(e){switch(e){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}function Fs(e){let{dts:t=!1}=e||{},r=!!e?.jsx;return function(n){let i=n.acorn||en,o=sp(i),{tokTypes:a,keywordTypes:p,isIdentifierStart:l,lineBreak:m,isNewLine:d,tokContexts:b,isIdentifierChar:T}=i,{tokTypes:E,tokContexts:k,keywordsRegExp:B,tokenIsLiteralPropertyName:C,tokenIsTemplate:V,tokenIsTSDeclarationStart:j,tokenIsIdentifier:D,tokenIsKeywordOrIdentifier:X,tokenIsTSTypeOperator:M}=o;function Q(s,c,u=s.length){for(let f=c;f<u;f++){let y=s.charCodeAt(f);if(d(y))return f<u-1&&y===13&&s.charCodeAt(f+1)===10?f+2:f+1}return-1}if(n=fp(n,o,i),e?.jsx)n=xp(i,o,n,typeof e.jsx==="boolean"?{}:e.jsx);n=bp(n,o,i);class x extends n{constructor(s,c,u){super(s,c,u);this.preValue=null,this.preToken=null,this.isLookahead=!1,this.isAmbientContext=!1,this.inAbstractClass=!1,this.inType=!1,this.inDisallowConditionalTypesContext=!1,this.maybeInArrowParameters=!1,this.shouldParseArrowReturnType=void 0,this.shouldParseAsyncArrowReturnType=void 0,this.decoratorStack=[[]],this.importsStack=[[]],this.importOrExportOuterKind=void 0,this.tsParseConstModifier=(f)=>{this.tsParseModifiers({modified:f,allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:L.InvalidModifierOnTypeParameterPositions})},this.ecmaVersion=this.options.ecmaVersion}static get acornTypeScript(){return o}get acornTypeScript(){return o}getTokenFromCodeInType(s){if(s===62)return this.finishOp(a.relational,1);if(s===60)return this.finishOp(a.relational,1);return super.getTokenFromCode(s)}readToken(s){if(!this.inType){let c=this.curContext();if(c===k.tc_expr)return this.jsx_readToken();if(c===k.tc_oTag||c===k.tc_cTag){if(l(s))return this.jsx_readWord();if(s==62)return++this.pos,this.finishToken(E.jsxTagEnd);if((s===34||s===39)&&c==k.tc_oTag)return this.jsx_readString(s)}if(s===60&&this.exprAllowed&&this.input.charCodeAt(this.pos+1)!==33)if(++this.pos,e?.jsx)return this.finishToken(E.jsxTagStart);else return this.finishToken(a.relational,"<")}return super.readToken(s)}getTokenFromCode(s){if(this.inType)return this.getTokenFromCodeInType(s);if(s===64)return++this.pos,this.finishToken(E.at);return super.getTokenFromCode(s)}isAbstractClass(){return this.ts_isContextual(E.abstract)&&this.lookahead().type===a._class}finishNode(s,c){if(s.type!==""&&s.end!==0)return s;return super.finishNode(s,c)}tryParse(s,c=this.cloneCurLookaheadState()){let u={node:null};try{return{node:s((y=null)=>{throw u.node=y,u}),error:null,thrown:!1,aborted:!1,failState:null}}catch(f){let y=this.getCurLookaheadState();if(this.setLookaheadState(c),f instanceof SyntaxError)return{node:null,error:f,thrown:!0,aborted:!1,failState:y};if(f===u)return{node:u.node,error:null,thrown:!1,aborted:!0,failState:y};throw f}}setOptionalParametersError(s,c){s.optionalParametersLoc=c?.loc??this.startLoc}reScan_lt_gt(){if(this.type===a.relational)this.pos-=1,this.readToken_lt_gt(this.fullCharCodeAtPos())}reScan_lt(){let{type:s}=this;if(s===a.bitShift)return this.pos-=2,this.finishOp(a.relational,1),a.relational;return s}resetEndLocation(s,c=this.lastTokEnd,u=this.lastTokEndLoc){if(s.end=c,s.loc.end=u,this.options.ranges)s.range[1]=c}startNodeAtNode(s){return super.startNodeAt(s.start,s.loc.start)}nextTokenStart(){return this.nextTokenStartSince(this.pos)}tsHasSomeModifiers(s,c){return c.some((u)=>{if(Ns(u))return s.accessibility===u;return!!s[u]})}tsIsStartOfStaticBlocks(){return this.isContextual("static")&&this.lookaheadCharCode()===123}tsCheckForInvalidTypeCasts(s){s.forEach((c)=>{if(c?.type==="TSTypeCastExpression")this.raise(c.typeAnnotation.start,L.UnexpectedTypeAnnotation)})}atPossibleAsyncArrow(s){return s.type==="Identifier"&&s.name==="async"&&this.lastTokEnd===s.end&&!this.canInsertSemicolon()&&s.end-s.start===5&&s.start===this.potentialArrowAt}tsIsIdentifier(){return D(this.type)}tsTryParseTypeOrTypePredicateAnnotation(){return this.match(a.colon)?this.tsParseTypeOrTypePredicateAnnotation(a.colon):void 0}tsTryParseGenericAsyncArrowFunction(s,c,u){if(!this.tsMatchLeftRelational())return;let f=this.maybeInArrowParameters;this.maybeInArrowParameters=!0;let y=this.tsTryParseAndCatch(()=>{let g=this.startNodeAt(s,c);return g.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(g),g.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(a.arrow),g});if(this.maybeInArrowParameters=f,!y)return;return super.parseArrowExpression(y,null,!0,u)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()!==a.relational)return;return this.tsParseTypeArguments()}tsInNoContext(s){let c=this.context;this.context=[c[0]];try{return s()}finally{this.context=c}}tsTryParseTypeAnnotation(){return this.match(a.colon)?this.tsParseTypeAnnotation():void 0}isUnparsedContextual(s,c){let u=s+c.length;if(this.input.slice(s,u)===c){let f=this.input.charCodeAt(u);return!(T(f)||(f&64512)===55296)}return!1}isAbstractConstructorSignature(){return this.ts_isContextual(E.abstract)&&this.lookahead().type===a._new}nextTokenStartSince(s){return tn.lastIndex=s,tn.test(this.input)?tn.lastIndex:s}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}compareLookaheadState(s,c){for(let u of Object.keys(s))if(s[u]!==c[u])return!1;return!0}createLookaheadState(){this.value=null,this.context=[this.curContext()]}getCurLookaheadState(){return{endLoc:this.endLoc,lastTokEnd:this.lastTokEnd,lastTokStart:this.lastTokStart,lastTokStartLoc:this.lastTokStartLoc,pos:this.pos,value:this.value,type:this.type,start:this.start,end:this.end,context:this.context,startLoc:this.startLoc,lastTokEndLoc:this.lastTokEndLoc,curLine:this.curLine,lineStart:this.lineStart,curPosition:this.curPosition,containsEsc:this.containsEsc}}cloneCurLookaheadState(){return{pos:this.pos,value:this.value,type:this.type,start:this.start,end:this.end,context:this.context&&this.context.slice(),startLoc:this.startLoc,lastTokEndLoc:this.lastTokEndLoc,endLoc:this.endLoc,lastTokEnd:this.lastTokEnd,lastTokStart:this.lastTokStart,lastTokStartLoc:this.lastTokStartLoc,curLine:this.curLine,lineStart:this.lineStart,curPosition:this.curPosition,containsEsc:this.containsEsc}}setLookaheadState(s){this.pos=s.pos,this.value=s.value,this.endLoc=s.endLoc,this.lastTokEnd=s.lastTokEnd,this.lastTokStart=s.lastTokStart,this.lastTokStartLoc=s.lastTokStartLoc,this.type=s.type,this.start=s.start,this.end=s.end,this.context=s.context,this.startLoc=s.startLoc,this.lastTokEndLoc=s.lastTokEndLoc,this.curLine=s.curLine,this.lineStart=s.lineStart,this.curPosition=s.curPosition,this.containsEsc=s.containsEsc}tsLookAhead(s){let c=this.getCurLookaheadState(),u=s();return this.setLookaheadState(c),u}lookahead(s){let c=this.getCurLookaheadState();if(this.createLookaheadState(),this.isLookahead=!0,s!==void 0)for(let f=0;f<s;f++)this.nextToken();else this.nextToken();this.isLookahead=!1;let u=this.getCurLookaheadState();return this.setLookaheadState(c),u}readWord(){let s=this.readWord1(),c=a.name;if(this.keywords.test(s))c=p[s];else if(new RegExp(B).test(s))c=E[s];return this.finishToken(c,s)}skipBlockComment(){let s;if(!this.isLookahead)s=this.options.onComment&&this.curPosition();let c=this.pos,u=this.input.indexOf("*/",this.pos+=2);if(u===-1)this.raise(this.pos-2,"Unterminated comment");if(this.pos=u+2,this.options.locations)for(let f,y=c;(f=Q(this.input,y,this.pos))>-1;)++this.curLine,y=this.lineStart=f;if(this.isLookahead)return;if(this.options.onComment)this.options.onComment(!0,this.input.slice(c+2,u),c,this.pos,s,this.curPosition())}skipLineComment(s){let c=this.pos,u;if(!this.isLookahead)u=this.options.onComment&&this.curPosition();let f=this.input.charCodeAt(this.pos+=s);while(this.pos<this.input.length&&!d(f))f=this.input.charCodeAt(++this.pos);if(this.isLookahead)return;if(this.options.onComment)this.options.onComment(!1,this.input.slice(c+s,this.pos),c,this.pos,u,this.curPosition())}finishToken(s,c){if(this.preValue=this.value,this.preToken=this.type,this.end=this.pos,this.options.locations)this.endLoc=this.curPosition();let u=this.type;if(this.type=s,this.value=c,!this.isLookahead)this.updateContext(u)}resetStartLocation(s,c,u){if(s.start=c,s.loc.start=u,this.options.ranges)s.range[0]=c}isLineTerminator(){return this.eat(a.semi)||super.canInsertSemicolon()}hasFollowingLineBreak(){return Ps.lastIndex=this.end,Ps.test(this.input)}addExtra(s,c,u,f=!0){if(!s)return;let y=s.extra=s.extra||{};if(f)y[c]=u;else Object.defineProperty(y,c,{enumerable:f,value:u})}isLiteralPropertyName(){return C(this.type)}hasPrecedingLineBreak(){return m.test(this.input.slice(this.lastTokEnd,this.start))}createIdentifier(s,c){return s.name=c,this.finishNode(s,"Identifier")}resetStartLocationFromNode(s,c){this.resetStartLocation(s,c.start,c.loc.start)}isThisParam(s){return s.type==="Identifier"&&s.name==="this"}isLookaheadContextual(s){let c=this.nextTokenStart();return this.isUnparsedContextual(c,s)}ts_type_isContextual(s,c){return s===c&&!this.containsEsc}ts_isContextual(s){return this.type===s&&!this.containsEsc}ts_isContextualWithState(s,c){return s.type===c&&!s.containsEsc}isContextualWithState(s,c){return c.type===a.name&&c.value===s&&!c.containsEsc}tsIsStartOfMappedType(){if(this.next(),this.eat(a.plusMin))return this.ts_isContextual(E.readonly);if(this.ts_isContextual(E.readonly))this.next();if(!this.match(a.bracketL))return!1;if(this.next(),!this.tsIsIdentifier())return!1;return this.next(),this.match(a._in)}tsInDisallowConditionalTypesContext(s){let c=this.inDisallowConditionalTypesContext;this.inDisallowConditionalTypesContext=!0;try{return s()}finally{this.inDisallowConditionalTypesContext=c}}tsTryParseType(){return this.tsEatThenParseType(a.colon)}match(s){return this.type===s}matchJsx(s){return this.type===o.tokTypes[s]}ts_eatWithState(s,c,u){let f=u.type;if(s===f){for(let y=0;y<c;y++)this.next();return!0}else return!1}ts_eatContextualWithState(s,c,u){if(B.test(s)){if(this.ts_isContextualWithState(u,E[s])){for(let f=0;f<c;f++)this.next();return!0}return!1}else{if(!this.isContextualWithState(s,u))return!1;for(let f=0;f<c;f++)this.next();return!0}}canHaveLeadingDecorator(){return this.match(a._class)||this.isAbstractClass()}eatContextual(s){if(B.test(s)){if(this.ts_isContextual(E[s]))return this.next(),!0;return!1}else return super.eatContextual(s)}tsIsExternalModuleReference(){return this.isContextual("require")&&this.lookaheadCharCode()===40}tsParseExternalModuleReference(){let s=this.startNode();if(this.expectContextual("require"),this.expect(a.parenL),!this.match(a.string))this.unexpected();return s.expression=this.parseExprAtom(),this.expect(a.parenR),this.finishNode(s,"TSExternalModuleReference")}tsParseEntityName(s=!0){let c=this.parseIdent(s);while(this.eat(a.dot)){let u=this.startNodeAtNode(c);u.left=c,u.right=this.parseIdent(s),c=this.finishNode(u,"TSQualifiedName")}return c}tsParseEnumMember(){let s=this.startNode();if(s.id=this.match(a.string)?this.parseLiteral(this.value):this.parseIdent(!0),this.eat(a.eq))s.initializer=this.parseMaybeAssign();return this.finishNode(s,"TSEnumMember")}tsParseEnumDeclaration(s,c={}){if(c.const)s.const=!0;if(c.declare)s.declare=!0;return this.expectContextual("enum"),s.id=this.parseIdent(),this.checkLValSimple(s.id),this.expect(a.braceL),s.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(a.braceR),this.finishNode(s,"TSEnumDeclaration")}tsParseModuleBlock(){let s=this.startNode();this.enterScope(ap),this.expect(a.braceL),s.body=[];while(this.type!==a.braceR){let c=this.parseStatement(null,!0);s.body.push(c)}return this.next(),super.exitScope(),this.finishNode(s,"TSModuleBlock")}tsParseAmbientExternalModuleDeclaration(s){if(this.ts_isContextual(E.global))s.global=!0,s.id=this.parseIdent();else if(this.match(a.string))s.id=this.parseLiteral(this.value);else this.unexpected();if(this.match(a.braceL))this.enterScope(It),s.body=this.tsParseModuleBlock(),super.exitScope();else super.semicolon();return this.finishNode(s,"TSModuleDeclaration")}tsTryParseDeclare(s){if(this.isLineTerminator())return;let c=this.type,u;if(this.isContextual("let"))c=a._var,u="let";return this.tsInAmbientContext(()=>{if(c===a._function)return s.declare=!0,this.parseFunctionStatement(s,!1,!0);if(c===a._class)return s.declare=!0,this.parseClass(s,!0);if(c===E.enum)return this.tsParseEnumDeclaration(s,{declare:!0});if(c===E.global)return this.tsParseAmbientExternalModuleDeclaration(s);if(c===a._const||c===a._var){if(!this.match(a._const)||!this.isLookaheadContextual("enum"))return s.declare=!0,this.parseVarStatement(s,u||this.value,!0);return this.expect(a._const),this.tsParseEnumDeclaration(s,{const:!0,declare:!0})}if(c===E.interface){let f=this.tsParseInterfaceDeclaration(s,{declare:!0});if(f)return f}if(D(c))return this.tsParseDeclaration(s,this.value,!0)})}tsIsListTerminator(s){switch(s){case"EnumMembers":case"TypeMembers":return this.match(a.braceR);case"HeritageClauseElement":return this.match(a.braceL);case"TupleElementTypes":return this.match(a.bracketR);case"TypeParametersOrArguments":return this.tsMatchRightRelational()}}tsParseDelimitedListWorker(s,c,u,f){let y=[],g=-1;for(;;){if(this.tsIsListTerminator(s))break;g=-1;let S=c();if(S==null)return;if(y.push(S),this.eat(a.comma)){g=this.lastTokStart;continue}if(this.tsIsListTerminator(s))break;if(u)this.expect(a.comma);return}if(f)f.value=g;return y}tsParseDelimitedList(s,c,u){return Ap(this.tsParseDelimitedListWorker(s,c,!0,u))}tsParseBracketedList(s,c,u,f,y){if(!f)if(u)this.expect(a.bracketL);else this.expect(a.relational);let g=this.tsParseDelimitedList(s,c,y);if(u)this.expect(a.bracketR);else this.expect(a.relational);return g}tsParseTypeParameterName(){return this.parseIdent().name}tsEatThenParseType(s){return!this.match(s)?void 0:this.tsNextThenParseType()}tsExpectThenParseType(s){return this.tsDoThenParseType(()=>this.expect(s))}tsNextThenParseType(){return this.tsDoThenParseType(()=>this.next())}tsDoThenParseType(s){return this.tsInType(()=>(s(),this.tsParseType()))}tsSkipParameterStart(){if(D(this.type)||this.match(a._this))return this.next(),!0;if(this.match(a.braceL))try{return this.parseObj(!0),!0}catch{return!1}if(this.match(a.bracketL)){this.next();try{return this.parseBindingList(a.bracketR,!0,!0),!0}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){if(this.next(),this.match(a.parenR)||this.match(a.ellipsis))return!0;if(this.tsSkipParameterStart()){if(this.match(a.colon)||this.match(a.comma)||this.match(a.question)||this.match(a.eq))return!0;if(this.match(a.parenR)){if(this.next(),this.match(a.arrow))return!0}}return!1}tsIsStartOfFunctionType(){if(this.tsMatchLeftRelational())return!0;return this.match(a.parenL)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsInAllowConditionalTypesContext(s){let c=this.inDisallowConditionalTypesContext;this.inDisallowConditionalTypesContext=!1;try{return s()}finally{this.inDisallowConditionalTypesContext=c}}tsParseBindingListForSignature(){return super.parseBindingList(a.parenR,!0,!0).map((s)=>{if(s.type!=="Identifier"&&s.type!=="RestElement"&&s.type!=="ObjectPattern"&&s.type!=="ArrayPattern")this.raise(s.start,L.UnsupportedSignatureParameterKind({type:s.type}));return s})}tsParseTypePredicateAsserts(){if(this.type!==E.asserts)return!1;let s=this.containsEsc;if(this.next(),!D(this.type)&&!this.match(a._this))return!1;if(s)this.raise(this.lastTokStart,"Escape sequence in keyword asserts");return!0}tsParseThisTypeNode(){let s=this.startNode();return this.next(),this.finishNode(s,"TSThisType")}tsParseTypeAnnotation(s=!0,c=this.startNode()){return this.tsInType(()=>{if(s)this.expect(a.colon);c.typeAnnotation=this.tsParseType()}),this.finishNode(c,"TSTypeAnnotation")}tsParseThisTypePredicate(s){this.next();let c=this.startNodeAtNode(s);return c.parameterName=s,c.typeAnnotation=this.tsParseTypeAnnotation(!1),c.asserts=!1,this.finishNode(c,"TSTypePredicate")}tsParseThisTypeOrThisTypePredicate(){let s=this.tsParseThisTypeNode();if(this.isContextual("is")&&!this.hasPrecedingLineBreak())return this.tsParseThisTypePredicate(s);else return s}tsParseTypePredicatePrefix(){let s=this.parseIdent();if(this.isContextual("is")&&!this.hasPrecedingLineBreak())return this.next(),s}tsParseTypeOrTypePredicateAnnotation(s){return this.tsInType(()=>{let c=this.startNode();this.expect(s);let u=this.startNode(),f=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(f&&this.match(a._this)){let S=this.tsParseThisTypeOrThisTypePredicate();if(S.type==="TSThisType")u.parameterName=S,u.asserts=!0,u.typeAnnotation=null,S=this.finishNode(u,"TSTypePredicate");else this.resetStartLocationFromNode(S,u),S.asserts=!0;return c.typeAnnotation=S,this.finishNode(c,"TSTypeAnnotation")}let y=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!y){if(!f)return this.tsParseTypeAnnotation(!1,c);return u.parameterName=this.parseIdent(),u.asserts=f,u.typeAnnotation=null,c.typeAnnotation=this.finishNode(u,"TSTypePredicate"),this.finishNode(c,"TSTypeAnnotation")}let g=this.tsParseTypeAnnotation(!1);return u.parameterName=y,u.typeAnnotation=g,u.asserts=f,c.typeAnnotation=this.finishNode(u,"TSTypePredicate"),this.finishNode(c,"TSTypeAnnotation")})}tsFillSignature(s,c){let u=s===a.arrow,f="parameters",y="typeAnnotation";if(c.typeParameters=this.tsTryParseTypeParameters(),this.expect(a.parenL),c.parameters=this.tsParseBindingListForSignature(),u)c.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(s);else if(this.match(s))c.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(s)}tsTryNextParseConstantContext(){if(this.lookahead().type!==a._const)return null;this.next();let s=this.tsParseTypeReference();if(s.typeParameters||s.typeArguments)this.raise(s.typeName.start,L.CannotFindName({name:"const"}));return s}tsParseFunctionOrConstructorType(s,c){let u=this.startNode();if(s==="TSConstructorType"){if(u.abstract=!!c,c)this.next();this.next()}return this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(a.arrow,u)),this.finishNode(u,s)}tsParseUnionOrIntersectionType(s,c,u){let f=this.startNode(),y=this.eat(u),g=[];do g.push(c());while(this.eat(u));if(g.length===1&&!y)return g[0];return f.types=g,this.finishNode(f,s)}tsCheckTypeAnnotationForReadOnly(s){switch(s.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(s.start,L.UnexpectedReadonly)}}tsParseTypeOperator(){let s=this.startNode(),c=this.value;if(this.next(),s.operator=c,s.typeAnnotation=this.tsParseTypeOperatorOrHigher(),c==="readonly")this.tsCheckTypeAnnotationForReadOnly(s);return this.finishNode(s,"TSTypeOperator")}tsParseConstraintForInferType(){if(this.eat(a._extends)){let s=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.inDisallowConditionalTypesContext||!this.match(a.question))return s}}tsParseInferType(){let s=this.startNode();this.expectContextual("infer");let c=this.startNode();return c.name=this.tsParseTypeParameterName(),c.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),s.typeParameter=this.finishNode(c,"TSTypeParameter"),this.finishNode(s,"TSInferType")}tsParseLiteralTypeNode(){let s=this.startNode();return s.literal=(()=>{switch(this.type){case a.num:case a.string:case a._true:case a._false:return this.parseExprAtom();default:this.unexpected()}})(),this.finishNode(s,"TSLiteralType")}tsParseImportType(){let s=this.startNode();if(this.expect(a._import),this.expect(a.parenL),!this.match(a.string))this.raise(this.start,L.UnsupportedImportTypeArgument);if(s.argument=this.parseExprAtom(),this.expect(a.parenR),this.eat(a.dot))s.qualifier=this.tsParseEntityName();if(this.tsMatchLeftRelational())s.typeArguments=this.tsParseTypeArguments();return this.finishNode(s,"TSImportType")}tsParseTypeQuery(){let s=this.startNode();if(this.expect(a._typeof),this.match(a._import))s.exprName=this.tsParseImportType();else s.exprName=this.tsParseEntityName();if(!this.hasPrecedingLineBreak()&&this.tsMatchLeftRelational())s.typeArguments=this.tsParseTypeArguments();return this.finishNode(s,"TSTypeQuery")}tsParseMappedTypeParameter(){let s=this.startNode();return s.name=this.tsParseTypeParameterName(),s.constraint=this.tsExpectThenParseType(a._in),this.finishNode(s,"TSTypeParameter")}tsParseMappedType(){let s=this.startNode();if(this.expect(a.braceL),this.match(a.plusMin))s.readonly=this.value,this.next(),this.expectContextual("readonly");else if(this.eatContextual("readonly"))s.readonly=!0;if(this.expect(a.bracketL),s.typeParameter=this.tsParseMappedTypeParameter(),s.nameType=this.eatContextual("as")?this.tsParseType():null,this.expect(a.bracketR),this.match(a.plusMin))s.optional=this.value,this.next(),this.expect(a.question);else if(this.eat(a.question))s.optional=!0;return s.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(a.braceR),this.finishNode(s,"TSMappedType")}tsParseTypeLiteral(){let s=this.startNode();return s.members=this.tsParseObjectTypeMembers(),this.finishNode(s,"TSTypeLiteral")}tsParseTupleElementType(){let s=this.startLoc,c=this.start,u=this.eat(a.ellipsis),f=this.tsParseType(),y=this.eat(a.question);if(this.eat(a.colon)){let S=this.startNodeAtNode(f);if(S.optional=y,f.type==="TSTypeReference"&&!f.typeArguments&&f.typeName.type==="Identifier")S.label=f.typeName;else this.raise(f.start,L.InvalidTupleMemberLabel),S.label=f;S.elementType=this.tsParseType(),f=this.finishNode(S,"TSNamedTupleMember")}else if(y){let S=this.startNodeAtNode(f);S.typeAnnotation=f,f=this.finishNode(S,"TSOptionalType")}if(u){let S=this.startNodeAt(c,s);S.typeAnnotation=f,f=this.finishNode(S,"TSRestType")}return f}tsParseTupleType(){let s=this.startNode();s.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let c=!1;return s.elementTypes.forEach((u)=>{let{type:f}=u;if(c&&f!=="TSRestType"&&f!=="TSOptionalType"&&!(f==="TSNamedTupleMember"&&u.optional))this.raise(u.start,L.OptionalTypeBeforeRequired);if(c||=f==="TSNamedTupleMember"&&u.optional||f==="TSOptionalType",f==="TSRestType")u=u.typeAnnotation}),this.finishNode(s,"TSTupleType")}tsParseTemplateLiteralType(){let s=this.startNode();return s.literal=this.parseTemplate({isTagged:!1}),this.finishNode(s,"TSLiteralType")}tsParseTypeReference(){let s=this.startNode();if(s.typeName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.tsMatchLeftRelational())s.typeArguments=this.tsParseTypeArguments();return this.finishNode(s,"TSTypeReference")}tsMatchLeftRelational(){return this.match(a.relational)&&this.value==="<"}tsMatchRightRelational(){return this.match(a.relational)&&this.value===">"}tsParseParenthesizedType(){let s=this.startNode();return this.expect(a.parenL),s.typeAnnotation=this.tsParseType(),this.expect(a.parenR),this.finishNode(s,"TSParenthesizedType")}tsParseNonArrayType(){switch(this.type){case a.string:case a.num:case a._true:case a._false:return this.tsParseLiteralTypeNode();case a.plusMin:if(this.value==="-"){let s=this.startNode();if(this.lookahead().type!==a.num)this.unexpected();return s.literal=this.parseMaybeUnary(),this.finishNode(s,"TSLiteralType")}break;case a._this:return this.tsParseThisTypeOrThisTypePredicate();case a._typeof:return this.tsParseTypeQuery();case a._import:return this.tsParseImportType();case a.braceL:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case a.bracketL:return this.tsParseTupleType();case a.parenL:return this.tsParseParenthesizedType();case a.backQuote:case a.dollarBraceL:return this.tsParseTemplateLiteralType();default:{let{type:s}=this;if(D(s)||s===a._void||s===a._null){let c=s===a._void?"TSVoidKeyword":s===a._null?"TSNullKeyword":Pp(this.value);if(c!==void 0&&this.lookaheadCharCode()!==46){let u=this.startNode();return this.next(),this.finishNode(u,c)}return this.tsParseTypeReference()}}}this.unexpected()}tsParseArrayTypeOrHigher(){let s=this.tsParseNonArrayType();while(!this.hasPrecedingLineBreak()&&this.eat(a.bracketL))if(this.match(a.bracketR)){let c=this.startNodeAtNode(s);c.elementType=s,this.expect(a.bracketR),s=this.finishNode(c,"TSArrayType")}else{let c=this.startNodeAtNode(s);c.objectType=s,c.indexType=this.tsParseType(),this.expect(a.bracketR),s=this.finishNode(c,"TSIndexedAccessType")}return s}tsParseTypeOperatorOrHigher(){return M(this.type)&&!this.containsEsc?this.tsParseTypeOperator():this.isContextual("infer")?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),a.bitwiseAND)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),a.bitwiseOR)}tsParseNonConditionalType(){if(this.tsIsStartOfFunctionType())return this.tsParseFunctionOrConstructorType("TSFunctionType");if(this.match(a._new))return this.tsParseFunctionOrConstructorType("TSConstructorType");else if(this.isAbstractConstructorSignature())return this.tsParseFunctionOrConstructorType("TSConstructorType",!0);return this.tsParseUnionTypeOrHigher()}tsParseType(){ws(this.inType);let s=this.tsParseNonConditionalType();if(this.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(a._extends))return s;let c=this.startNodeAtNode(s);return c.checkType=s,c.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(a.question),c.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(a.colon),c.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(c,"TSConditionalType")}tsIsUnambiguouslyIndexSignature(){if(this.next(),D(this.type))return this.next(),this.match(a.colon);return!1}tsInType(s){let c=this.inType;this.inType=!0;try{return s()}finally{this.inType=c}}tsTryParseIndexSignature(s){if(!(this.match(a.bracketL)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(a.bracketL);let c=this.parseIdent();c.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(c),this.expect(a.bracketR),s.parameters=[c];let u=this.tsTryParseTypeAnnotation();if(u)s.typeAnnotation=u;return this.tsParseTypeMemberSemicolon(),this.finishNode(s,"TSIndexSignature")}tsParseNoneModifiers(s){this.tsParseModifiers({modified:s,allowedModifiers:[],disallowedModifiers:["in","out"],errorTemplate:L.InvalidModifierOnTypeParameterPositions})}tsParseTypeParameter(s=this.tsParseNoneModifiers.bind(this)){let c=this.startNode();return s(c),c.name=this.tsParseTypeParameterName(),c.constraint=this.tsEatThenParseType(a._extends),c.default=this.tsEatThenParseType(a.eq),this.finishNode(c,"TSTypeParameter")}tsParseTypeParameters(s){let c=this.startNode();if(this.tsMatchLeftRelational()||this.matchJsx("jsxTagStart"))this.next();else this.unexpected();let u={value:-1};if(c.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,s),!1,!0,u),c.params.length===0)this.raise(this.start,L.EmptyTypeParameters);if(u.value!==-1)this.addExtra(c,"trailingComma",u.value);return this.finishNode(c,"TSTypeParameterDeclaration")}tsTryParseTypeParameters(s){if(this.tsMatchLeftRelational())return this.tsParseTypeParameters(s)}tsTryParse(s){let c=this.getCurLookaheadState(),u=s();if(u!==void 0&&u!==!1)return u;else{this.setLookaheadState(c);return}}tsTokenCanFollowModifier(){return(this.match(a.bracketL)||this.match(a.braceL)||this.match(a.star)||this.match(a.ellipsis)||this.match(a.privateId)||this.isLiteralPropertyName())&&!this.hasPrecedingLineBreak()}tsNextTokenCanFollowModifier(){return this.next(!0),this.tsTokenCanFollowModifier()}tsParseModifier(s,c){let u=this.value;if(s.indexOf(u)!==-1&&!this.containsEsc){if(c&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return u}return}tsParseModifiersByMap({modified:s,map:c}){for(let u of Object.keys(c))s[u]=c[u]}tsParseModifiers({modified:s,allowedModifiers:c,disallowedModifiers:u,stopOnStartOfClassStaticBlock:f,errorTemplate:y=L.InvalidModifierOnTypeMember}){let g={},S=(A,v,_,w)=>{if(v===_&&s[w])this.raise(A.column,L.InvalidModifiersOrder({orderedModifiers:[_,w]}))},P=(A,v,_,w)=>{if(s[_]&&v===w||s[w]&&v===_)this.raise(A.column,L.IncompatibleModifiers({modifiers:[_,w]}))};for(;;){let A=this.startLoc,v=this.tsParseModifier(c.concat(u??[]),f);if(!v)break;if(Ns(v))if(s.accessibility)this.raise(this.start,L.DuplicateAccessibilityModifier());else S(A,v,v,"override"),S(A,v,v,"static"),S(A,v,v,"readonly"),S(A,v,v,"accessor"),g.accessibility=v,s.accessibility=v;else if(Ep(v))if(s[v])this.raise(this.start,L.DuplicateModifier({modifier:v}));else S(A,v,"in","out"),g[v]=v,s[v]=!0;else if(Tp(v))if(s[v])this.raise(this.start,L.DuplicateModifier({modifier:v}));else P(A,v,"accessor","readonly"),P(A,v,"accessor","static"),P(A,v,"accessor","override"),g[v]=v,s[v]=!0;else if(v==="const")if(s[v])this.raise(this.start,L.DuplicateModifier({modifier:v}));else g[v]=v,s[v]=!0;else if(Object.hasOwnProperty.call(s,v))this.raise(this.start,L.DuplicateModifier({modifier:v}));else S(A,v,"static","readonly"),S(A,v,"static","override"),S(A,v,"override","readonly"),S(A,v,"abstract","override"),P(A,v,"declare","override"),P(A,v,"static","abstract"),g[v]=v,s[v]=!0;if(u?.includes(v))this.raise(this.start,y)}return g}tsParseInOutModifiers(s){this.tsParseModifiers({modified:s,allowedModifiers:["in","out"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:L.InvalidModifierOnTypeParameter})}parseMaybeUnary(s,c,u,f){if(!e?.jsx&&this.tsMatchLeftRelational())return this.tsParseTypeAssertion();else return super.parseMaybeUnary(s,c,u,f)}tsParseTypeAssertion(){if(r)this.raise(this.start,L.ReservedTypeAssertion);let s=this.tryParse(()=>{let c=this.startNode(),u=this.tsTryNextParseConstantContext();return c.typeAnnotation=u||this.tsNextThenParseType(),this.expect(a.relational),c.expression=this.parseMaybeUnary(),this.finishNode(c,"TSTypeAssertion")});if(s.error)return this.tsParseTypeParameters(this.tsParseConstModifier);else return s.node}tsParseTypeArguments(){let s=this.startNode();if(s.params=this.tsInType(()=>this.tsInNoContext(()=>(this.expect(a.relational),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),s.params.length===0)this.raise(this.start,L.EmptyTypeArguments);return this.exprAllowed=!1,this.expect(a.relational),this.finishNode(s,"TSTypeParameterInstantiation")}tsParseHeritageClause(s){let c=this.start,u=this.tsParseDelimitedList("HeritageClauseElement",()=>{let f=this.startNode();if(f.expression=this.tsParseEntityName(),this.tsMatchLeftRelational())f.typeParameters=this.tsParseTypeArguments();return this.finishNode(f,"TSExpressionWithTypeArguments")});if(!u.length)this.raise(c,L.EmptyHeritageClauseType({token:s}));return u}tsParseTypeMemberSemicolon(){if(!this.eat(a.comma)&&!this.isLineTerminator())this.expect(a.semi)}tsTryParseAndCatch(s){let c=this.tryParse((u)=>s()||u());if(c.aborted||!c.node)return;if(c.error)this.setLookaheadState(c.failState);return c.node}tsParseSignatureMember(s,c){return this.tsFillSignature(a.colon,c),this.tsParseTypeMemberSemicolon(),this.finishNode(c,s)}tsParsePropertyOrMethodSignature(s,c){if(this.eat(a.question))s.optional=!0;let u=s;if(this.match(a.parenL)||this.tsMatchLeftRelational()){if(c)this.raise(s.start,L.ReadonlyForMethodSignature);let f=u;if(f.kind&&this.tsMatchLeftRelational())this.raise(this.start,L.AccesorCannotHaveTypeParameters);this.tsFillSignature(a.colon,f),this.tsParseTypeMemberSemicolon();let y="parameters",g="typeAnnotation";if(f.kind==="get"){if(f[y].length>0){if(this.raise(this.start,"A 'get' accesor must not have any formal parameters."),this.isThisParam(f[y][0]))this.raise(this.start,L.AccesorCannotDeclareThisParameter)}}else if(f.kind==="set"){if(f[y].length!==1)this.raise(this.start,"A 'get' accesor must not have any formal parameters.");else{let S=f[y][0];if(this.isThisParam(S))this.raise(this.start,L.AccesorCannotDeclareThisParameter);if(S.type==="Identifier"&&S.optional)this.raise(this.start,L.SetAccesorCannotHaveOptionalParameter);if(S.type==="RestElement")this.raise(this.start,L.SetAccesorCannotHaveRestParameter)}if(f[g])this.raise(f[g].start,L.SetAccesorCannotHaveReturnType)}else f.kind="method";return this.finishNode(f,"TSMethodSignature")}else{let f=u;if(c)f.readonly=!0;let y=this.tsTryParseTypeAnnotation();if(y)f.typeAnnotation=y;return this.tsParseTypeMemberSemicolon(),this.finishNode(f,"TSPropertySignature")}}tsParseTypeMember(){let s=this.startNode();if(this.match(a.parenL)||this.tsMatchLeftRelational())return this.tsParseSignatureMember("TSCallSignatureDeclaration",s);if(this.match(a._new)){let u=this.startNode();if(this.next(),this.match(a.parenL)||this.tsMatchLeftRelational())return this.tsParseSignatureMember("TSConstructSignatureDeclaration",s);else return s.key=this.createIdentifier(u,"new"),this.tsParsePropertyOrMethodSignature(s,!1)}this.tsParseModifiers({modified:s,allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]});let c=this.tsTryParseIndexSignature(s);if(c)return c;if(this.parsePropertyName(s),!s.computed&&s.key.type==="Identifier"&&(s.key.name==="get"||s.key.name==="set")&&this.tsTokenCanFollowModifier())s.kind=s.key.name,this.parsePropertyName(s);return this.tsParsePropertyOrMethodSignature(s,!!s.readonly)}tsParseList(s,c){let u=[];while(!this.tsIsListTerminator(s))u.push(c());return u}tsParseObjectTypeMembers(){this.expect(a.braceL);let s=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(a.braceR),s}tsParseInterfaceDeclaration(s,c={}){if(this.hasFollowingLineBreak())return null;if(this.expectContextual("interface"),c.declare)s.declare=!0;if(D(this.type))s.id=this.parseIdent(),this.checkLValSimple(s.id,Y.BIND_TS_INTERFACE);else s.id=null,this.raise(this.start,L.MissingInterfaceName);if(s.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers.bind(this)),this.eat(a._extends))s.extends=this.tsParseHeritageClause("extends");let u=this.startNode();return u.body=this.tsParseInterfaceBody(),s.body=this.finishNode(u,"TSInterfaceBody"),this.finishNode(s,"TSInterfaceDeclaration")}tsParseInterfaceBody(){this.expect(a.braceL);let s=this.inType;this.inType=!0;let c=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.inType=s,this.expect(a.braceR),c}tsParseAbstractDeclaration(s){if(this.match(a._class))return s.abstract=!0,this.parseClass(s,!0);else if(this.ts_isContextual(E.interface)){if(!this.hasFollowingLineBreak())return s.abstract=!0,this.tsParseInterfaceDeclaration(s)}else this.unexpected(s.start)}tsIsDeclarationStart(){return j(this.type)}tsParseExpressionStatement(s,c){switch(c.name){case"declare":{let u=this.tsTryParseDeclare(s);if(u)return u.declare=!0,u;break}case"global":if(this.match(a.braceL)){this.enterScope(It);let u=s;return u.global=!0,u.id=c,u.body=this.tsParseModuleBlock(),super.exitScope(),this.finishNode(u,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(s,c.name,!1)}}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsIsExportDefaultSpecifier(){let{type:s}=this,c=this.isAsyncFunction(),u=this.isLet();if(D(s)){if(c&&!this.containsEsc||u)return!1;if((s===E.type||s===E.interface)&&!this.containsEsc){let g=this.lookahead();if(D(g.type)&&!this.isContextualWithState("from",g)||g.type===a.braceL)return!1}}else if(!this.match(a._default))return!1;let f=this.nextTokenStart(),y=this.isUnparsedContextual(f,"from");if(this.input.charCodeAt(f)===44||D(this.type)&&y)return!0;if(this.match(a._default)&&y){let g=this.input.charCodeAt(this.nextTokenStartSince(f+4));return g===34||g===39}return!1}tsInAmbientContext(s){let c=this.isAmbientContext;this.isAmbientContext=!0;try{return s()}finally{this.isAmbientContext=c}}tsCheckLineTerminator(s){if(s){if(this.hasFollowingLineBreak())return!1;return this.next(),!0}return!this.isLineTerminator()}tsParseModuleOrNamespaceDeclaration(s,c=!1){if(s.id=this.parseIdent(),!c)this.checkLValSimple(s.id,Y.BIND_TS_NAMESPACE);if(this.eat(a.dot)){let u=this.startNode();this.tsParseModuleOrNamespaceDeclaration(u,!0),s.body=u}else this.enterScope(It),s.body=this.tsParseModuleBlock(),super.exitScope();return this.finishNode(s,"TSModuleDeclaration")}checkLValSimple(s,c=Y.BIND_NONE,u){if(s.type==="TSNonNullExpression"||s.type==="TSAsExpression")s=s.expression;return super.checkLValSimple(s,c,u)}tsParseTypeAliasDeclaration(s){return s.id=this.parseIdent(),this.checkLValSimple(s.id,Y.BIND_TS_TYPE),s.typeAnnotation=this.tsInType(()=>{if(s.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers.bind(this)),this.expect(a.eq),this.ts_isContextual(E.interface)&&this.lookahead().type!==a.dot){let c=this.startNode();return this.next(),this.finishNode(c,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(s,"TSTypeAliasDeclaration")}tsParseDeclaration(s,c,u){switch(c){case"abstract":if(this.tsCheckLineTerminator(u)&&(this.match(a._class)||D(this.type)))return this.tsParseAbstractDeclaration(s);break;case"module":if(this.tsCheckLineTerminator(u)){if(this.match(a.string))return this.tsParseAmbientExternalModuleDeclaration(s);else if(D(this.type))return this.tsParseModuleOrNamespaceDeclaration(s)}break;case"namespace":if(this.tsCheckLineTerminator(u)&&D(this.type))return this.tsParseModuleOrNamespaceDeclaration(s);break;case"type":if(this.tsCheckLineTerminator(u)&&D(this.type))return this.tsParseTypeAliasDeclaration(s);break}}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.value,!0)}tsParseImportEqualsDeclaration(s,c){s.isExport=c||!1,s.id=this.parseIdent(),this.checkLValSimple(s.id,Y.BIND_LEXICAL),super.expect(a.eq);let u=this.tsParseModuleReference();if(s.importKind==="type"&&u.type!=="TSExternalModuleReference")this.raise(u.start,L.ImportAliasHasImportType);return s.moduleReference=u,super.semicolon(),this.finishNode(s,"TSImportEqualsDeclaration")}isExportDefaultSpecifier(){if(this.tsIsDeclarationStart())return!1;let{type:s}=this;if(D(s)){if(this.isContextual("async")||this.isContextual("let"))return!1;if((s===E.type||s===E.interface)&&!this.containsEsc){let f=this.lookahead();if(D(f.type)&&!this.isContextualWithState("from",f)||f.type===a.braceL)return!1}}else if(!this.match(a._default))return!1;let c=this.nextTokenStart(),u=this.isUnparsedContextual(c,"from");if(this.input.charCodeAt(c)===44||D(this.type)&&u)return!0;if(this.match(a._default)&&u){let f=this.input.charCodeAt(this.nextTokenStartSince(c+4));return f===34||f===39}return!1}parseTemplate({isTagged:s=!1}={}){let c=this.startNode();this.next(),c.expressions=[];let u=this.parseTemplateElement({isTagged:s});c.quasis=[u];while(!u.tail){if(this.type===a.eof)this.raise(this.pos,"Unterminated template literal");this.expect(a.dollarBraceL),c.expressions.push(this.inType?this.tsParseType():this.parseExpression()),this.expect(a.braceR),c.quasis.push(u=this.parseTemplateElement({isTagged:s}))}return this.next(),this.finishNode(c,"TemplateLiteral")}parseFunction(s,c,u,f,y){if(this.initFunction(s),this.ecmaVersion>=9||this.ecmaVersion>=6&&!f){if(this.type===a.star&&c&_s)this.unexpected();s.generator=this.eat(a.star)}if(this.ecmaVersion>=8)s.async=!!f;if(c&cr)s.id=c&Sp&&this.type!==a.name?null:this.parseIdent();let g=this.yieldPos,S=this.awaitPos,P=this.awaitIdentPos,A=this.maybeInArrowParameters;if(this.maybeInArrowParameters=!1,this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(rn(s.async,s.generator)),!(c&cr))s.id=this.type===a.name?this.parseIdent():null;this.parseFunctionParams(s);let v=c&cr;if(this.parseFunctionBody(s,u,!1,y,{isFunctionDeclaration:v}),this.yieldPos=g,this.awaitPos=S,this.awaitIdentPos=P,c&cr&&s.id&&!(c&_s))if(s.body)this.checkLValSimple(s.id,this.strict||s.generator||s.async?this.treatFunctionsAsVar?Y.BIND_VAR:Y.BIND_LEXICAL:Y.BIND_FUNCTION);else this.checkLValSimple(s.id,Y.BIND_NONE);return this.maybeInArrowParameters=A,this.finishNode(s,v?"FunctionDeclaration":"FunctionExpression")}parseFunctionBody(s,c=!1,u=!1,f=!1,y){if(this.match(a.colon))s.returnType=this.tsParseTypeOrTypePredicateAnnotation(a.colon);let g=y?.isFunctionDeclaration?"TSDeclareFunction":y?.isClassMethod?"TSDeclareMethod":void 0;if(g&&!this.match(a.braceL)&&this.isLineTerminator())return this.exitScope(),this.finishNode(s,g);if(g==="TSDeclareFunction"&&this.isAmbientContext){if(this.raise(s.start,L.DeclareFunctionHasImplementation),s.declare)return super.parseFunctionBody(s,c,u,!1),this.finishNode(s,g)}return super.parseFunctionBody(s,c,u,f),s}parseNew(){if(this.containsEsc)this.raiseRecoverable(this.start,"Escape sequence in keyword new");let s=this.startNode(),c=this.parseIdent(!0);if(this.ecmaVersion>=6&&this.eat(a.dot)){s.meta=c;let S=this.containsEsc;if(s.property=this.parseIdent(!0),s.property.name!=="target")this.raiseRecoverable(s.property.start,"The only valid meta property for new is 'new.target'");if(S)this.raiseRecoverable(s.start,"'new.target' must not contain escaped characters");if(!this.allowNewDotTarget)this.raiseRecoverable(s.start,"'new.target' can only be used in functions and class static block");return this.finishNode(s,"MetaProperty")}let u=this.start,f=this.startLoc,y=this.type===a._import;if(s.callee=this.parseSubscripts(this.parseExprAtom(),u,f,!0,!1),y&&s.callee.type==="ImportExpression")this.raise(u,"Cannot use new with import()");let{callee:g}=s;if(g.type==="TSInstantiationExpression"&&!g.extra?.parenthesized)s.typeArguments=g.typeArguments,s.callee=g.expression;if(this.eat(a.parenL))s.arguments=this.parseExprList(a.parenR,this.ecmaVersion>=8,!1);else s.arguments=[];return this.finishNode(s,"NewExpression")}parseExprOp(s,c,u,f,y){if(a._in.binop>f&&!this.hasPrecedingLineBreak()){let g;if(this.isContextual("as"))g="TSAsExpression";if(this.isContextual("satisfies"))g="TSSatisfiesExpression";if(g){let S=this.startNodeAt(c,u);S.expression=s;let P=this.tsTryNextParseConstantContext();if(P)S.typeAnnotation=P;else S.typeAnnotation=this.tsNextThenParseType();return this.finishNode(S,g),this.reScan_lt_gt(),this.parseExprOp(S,c,u,f,y)}}return super.parseExprOp(s,c,u,f,y)}parseImportSpecifiers(){let s=[],c=!0;if(o.tokenIsIdentifier(this.type)){if(s.push(this.parseImportDefaultSpecifier()),!this.eat(a.comma))return s}if(this.type===a.star)return s.push(this.parseImportNamespaceSpecifier()),s;this.expect(a.braceL);while(!this.eat(a.braceR)){if(!c){if(this.expect(a.comma),this.afterTrailingComma(a.braceR))break}else c=!1;s.push(this.parseImportSpecifier())}return s}parseImport(s){let c=this.lookahead();if(s.importKind="value",this.importOrExportOuterKind="value",D(c.type)||this.match(a.star)||this.match(a.braceL)){let u=this.lookahead(2);if(u.type!==a.comma&&!this.isContextualWithState("from",u)&&u.type!==a.eq&&this.ts_eatContextualWithState("type",1,c))this.importOrExportOuterKind="type",s.importKind="type",c=this.lookahead(),u=this.lookahead(2);if(D(c.type)&&u.type===a.eq){this.next();let f=this.tsParseImportEqualsDeclaration(s);return this.importOrExportOuterKind="value",f}}if(this.next(),this.type===a.string)s.specifiers=[],s.source=this.parseExprAtom();else s.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),s.source=this.type===a.string?this.parseExprAtom():this.unexpected();if(this.parseMaybeImportAttributes(s),this.semicolon(),this.finishNode(s,"ImportDeclaration"),this.importOrExportOuterKind="value",s.importKind==="type"&&s.specifiers.length>1&&s.specifiers[0].type==="ImportDefaultSpecifier")this.raise(s.start,L.TypeImportCannotSpecifyDefaultAndNamed);return s}parseExportDefaultDeclaration(){if(this.isAbstractClass()){let s=this.startNode();return this.next(),s.abstract=!0,this.parseClass(s,!0)}if(this.match(E.interface)){let s=this.tsParseInterfaceDeclaration(this.startNode());if(s)return s}return super.parseExportDefaultDeclaration()}parseExportAllDeclaration(s,c){if(this.ecmaVersion>=11)if(this.eatContextual("as"))s.exported=this.parseModuleExportName(),this.checkExport(c,s.exported,this.lastTokStart);else s.exported=null;if(this.expectContextual("from"),this.type!==a.string)this.unexpected();return s.source=this.parseExprAtom(),this.parseMaybeImportAttributes(s),this.semicolon(),this.finishNode(s,"ExportAllDeclaration")}parseDynamicImport(s){if(this.next(),s.source=this.parseMaybeAssign(),this.eat(a.comma)){let c=this.parseExpression();s.arguments=[c]}if(!this.eat(a.parenR)){let c=this.start;if(this.eat(a.comma)&&this.eat(a.parenR))this.raiseRecoverable(c,"Trailing comma is not allowed in import()");else this.unexpected(c)}return this.finishNode(s,"ImportExpression")}parseExport(s,c){let u=this.lookahead();if(this.ts_eatWithState(a._import,2,u)){if(this.ts_isContextual(E.type)&&this.lookaheadCharCode()!==61)s.importKind="type",this.importOrExportOuterKind="type",this.next();else s.importKind="value",this.importOrExportOuterKind="value";let f=this.tsParseImportEqualsDeclaration(s,!0);return this.importOrExportOuterKind=void 0,f}else if(this.ts_eatWithState(a.eq,2,u)){let f=s;return f.expression=this.parseExpression(),this.semicolon(),this.importOrExportOuterKind=void 0,this.finishNode(f,"TSExportAssignment")}else if(this.ts_eatContextualWithState("as",2,u)){let f=s;return this.expectContextual("namespace"),f.id=this.parseIdent(),this.semicolon(),this.importOrExportOuterKind=void 0,this.finishNode(f,"TSNamespaceExportDeclaration")}else{let f=this.lookahead(2).type;if(this.ts_isContextualWithState(u,E.type)&&(f===a.braceL||f===a.star))this.next(),this.importOrExportOuterKind="type",s.exportKind="type";else this.importOrExportOuterKind="value",s.exportKind="value";if(this.next(),this.eat(a.star))return this.parseExportAllDeclaration(s,c);if(this.eat(a._default))return this.checkExport(c,"default",this.lastTokStart),s.declaration=this.parseExportDefaultDeclaration(),this.finishNode(s,"ExportDefaultDeclaration");if(this.shouldParseExportStatement()){if(s.declaration=this.parseExportDeclaration(s),s.declaration.type==="VariableDeclaration")this.checkVariableExport(c,s.declaration.declarations);else this.checkExport(c,s.declaration.id,s.declaration.id.start);s.specifiers=[],s.source=null}else{if(s.declaration=null,s.specifiers=this.parseExportSpecifiers(c),this.eatContextual("from")){if(this.type!==a.string)this.unexpected();s.source=this.parseExprAtom(),this.parseMaybeImportAttributes(s)}else{for(let y of s.specifiers)if(this.checkUnreserved(y.local),this.checkLocalExport(y.local),y.local.type==="Literal")this.raise(y.local.start,"A string literal cannot be used as an exported binding without `from`.");s.source=null}this.semicolon()}return this.finishNode(s,"ExportNamedDeclaration")}}checkExport(s,c,u){if(!s)return;if(typeof c!=="string")c=c.type==="Identifier"?c.name:c.value;s[c]=!0}parseMaybeDefault(s,c,u){let f=super.parseMaybeDefault(s,c,u);if(f.type==="AssignmentPattern"&&f.typeAnnotation&&f.right.start<f.typeAnnotation.start)this.raise(f.typeAnnotation.start,L.TypeAnnotationAfterAssign);return f}typeCastToParameter(s){return s.expression.typeAnnotation=s.typeAnnotation,this.resetEndLocation(s.expression,s.typeAnnotation.end,s.typeAnnotation.loc?.end),s.expression}toAssignableList(s,c){if(!s)s=[];for(let u=0;u<s.length;u++){let f=s[u];if(f?.type==="TSTypeCastExpression")s[u]=this.typeCastToParameter(f)}return super.toAssignableList(s,c)}reportReservedArrowTypeParam(s){if(s.params.length===1&&!s.extra?.trailingComma&&r)this.raise(s.start,L.ReservedArrowTypeParam)}parseExprAtom(s,c,u){if(this.type===E.jsxText)return this.jsx_parseText();else if(this.type===E.jsxTagStart)return this.jsx_parseElement();else if(this.type===E.at)return this.parseDecorators(),this.parseExprAtom();else if(D(this.type)){let f=this.potentialArrowAt===this.start,y=this.start,g=this.startLoc,S=this.containsEsc,P=this.parseIdent(!1);if(this.ecmaVersion>=8&&!S&&P.name==="async"&&!this.canInsertSemicolon()&&this.eat(a._function))return this.overrideContext(b.f_expr),this.parseFunction(this.startNodeAt(y,g),0,!1,!0,c);if(f&&!this.canInsertSemicolon()){if(this.eat(a.arrow))return this.parseArrowExpression(this.startNodeAt(y,g),[P],!1,c);if(this.ecmaVersion>=8&&P.name==="async"&&this.type===a.name&&!S&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc)){if(P=this.parseIdent(!1),this.canInsertSemicolon()||!this.eat(a.arrow))this.unexpected();return this.parseArrowExpression(this.startNodeAt(y,g),[P],!0,c)}}return P}else return super.parseExprAtom(s,c,u)}parseExprAtomDefault(){if(D(this.type)){let s=this.potentialArrowAt===this.start,c=this.containsEsc,u=this.parseIdent();if(!c&&u.name==="async"&&!this.canInsertSemicolon()){let{type:f}=this;if(f===a._function)return this.next(),this.parseFunction(this.startNodeAtNode(u),void 0,!0,!0);else if(D(f))if(this.lookaheadCharCode()===61){let y=this.parseIdent(!1);if(this.canInsertSemicolon()||!this.eat(a.arrow))this.unexpected();return this.parseArrowExpression(this.startNodeAtNode(u),[y],!0)}else return u}if(s&&this.match(a.arrow)&&!this.canInsertSemicolon())return this.next(),this.parseArrowExpression(this.startNodeAtNode(u),[u],!1);return u}else this.unexpected()}parseIdentNode(){let s=this.startNode();if(X(this.type)&&!((this.type.keyword==="class"||this.type.keyword==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)))s.name=this.value;else return super.parseIdentNode();return s}parseVarStatement(s,c,u=!1){let{isAmbientContext:f}=this;this.next(),super.parseVar(s,!1,c,u||f),this.semicolon();let y=this.finishNode(s,"VariableDeclaration");if(!f)return y;for(let{id:g,init:S}of y.declarations){if(!S)continue;if(c!=="const"||!!g.typeAnnotation)this.raise(S.start,L.InitializerNotAllowedInAmbientContext);else if(S.type!=="StringLiteral"&&S.type!=="BooleanLiteral"&&S.type!=="NumericLiteral"&&S.type!=="BigIntLiteral"&&(S.type!=="TemplateLiteral"||S.expressions.length>0)&&!vp(S))this.raise(S.start,L.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference)}return y}parseStatement(s,c,u){if(this.match(E.at))this.parseDecorators(!0);if(this.match(a._const)&&this.isLookaheadContextual("enum")){let f=this.startNode();return this.expect(a._const),this.tsParseEnumDeclaration(f,{const:!0})}if(this.ts_isContextual(E.enum))return this.tsParseEnumDeclaration(this.startNode());if(this.ts_isContextual(E.interface)){let f=this.tsParseInterfaceDeclaration(this.startNode());if(f)return f}return super.parseStatement(s,c,u)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}parsePostMemberNameModifiers(s){if(this.eat(a.question))s.optional=!0;if(s.readonly&&this.match(a.parenL))this.raise(s.start,L.ClassMethodHasReadonly);if(s.declare&&this.match(a.parenL))this.raise(s.start,L.ClassMethodHasDeclare)}parseExpressionStatement(s,c){return(c.type==="Identifier"?this.tsParseExpressionStatement(s,c):void 0)||super.parseExpressionStatement(s,c)}shouldParseExportStatement(){if(this.tsIsDeclarationStart())return!0;if(this.match(E.at))return!0;return super.shouldParseExportStatement()}parseConditional(s,c,u,f,y){if(this.eat(a.question)){let g=this.startNodeAt(c,u);return g.test=s,g.consequent=this.parseMaybeAssign(),this.expect(a.colon),g.alternate=this.parseMaybeAssign(f),this.finishNode(g,"ConditionalExpression")}return s}parseMaybeConditional(s,c){let u=this.start,f=this.startLoc,y=this.parseExprOps(s,c);if(this.checkExpressionErrors(c))return y;if(!this.maybeInArrowParameters||!this.match(a.question))return this.parseConditional(y,u,f,s,c);let g=this.tryParse(()=>this.parseConditional(y,u,f,s,c));if(!g.node){if(g.error)this.setOptionalParametersError(c,g.error);return y}if(g.error)this.setLookaheadState(g.failState);return g.node}parseParenItem(s){let c=this.start,u=this.startLoc;if(s=super.parseParenItem(s),this.eat(a.question))s.optional=!0,this.resetEndLocation(s);if(this.match(a.colon)){let f=this.startNodeAt(c,u);return f.expression=s,f.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(f,"TSTypeCastExpression")}return s}parseExportDeclaration(s){if(!this.isAmbientContext&&this.ts_isContextual(E.declare))return this.tsInAmbientContext(()=>this.parseExportDeclaration(s));let c=this.start,u=this.startLoc,f=this.eatContextual("declare");if(f&&(this.ts_isContextual(E.declare)||!this.shouldParseExportStatement()))this.raise(this.start,L.ExpectedAmbientAfterExportDeclare);let g=D(this.type)&&this.tsTryParseExportDeclaration()||this.parseStatement(null);if(!g)return null;if(g.type==="TSInterfaceDeclaration"||g.type==="TSTypeAliasDeclaration"||f)s.exportKind="type";if(f)this.resetStartLocation(g,c,u),g.declare=!0;return g}parseClassId(s,c){if(!c&&this.isContextual("implements"))return;super.parseClassId(s,c);let u=this.tsTryParseTypeParameters(this.tsParseInOutModifiers.bind(this));if(u)s.typeParameters=u}parseClassPropertyAnnotation(s){if(!s.optional){if(this.value==="!"&&this.eat(a.prefix))s.definite=!0;else if(this.eat(a.question))s.optional=!0}let c=this.tsTryParseTypeAnnotation();if(c)s.typeAnnotation=c}parseClassField(s){if(s.key.type==="PrivateIdentifier"){if(s.abstract)this.raise(s.start,L.PrivateElementHasAbstract);if(s.accessibility)this.raise(s.start,L.PrivateElementHasAccessibility({modifier:s.accessibility}));this.parseClassPropertyAnnotation(s)}else{if(this.parseClassPropertyAnnotation(s),this.isAmbientContext&&!(s.readonly&&!s.typeAnnotation)&&this.match(a.eq))this.raise(this.start,L.DeclareClassFieldHasInitializer);if(s.abstract&&this.match(a.eq)){let{key:u}=s;this.raise(this.start,L.AbstractPropertyHasInitializer({propertyName:u.type==="Identifier"&&!s.computed?u.name:`[${this.input.slice(u.start,u.end)}]`}))}}return super.parseClassField(s)}parseClassMethod(s,c,u,f){let y=s.kind==="constructor",g=s.key.type==="PrivateIdentifier",S=this.tsTryParseTypeParameters(this.tsParseConstModifier);if(g){if(S)s.typeParameters=S;if(s.accessibility)this.raise(s.start,L.PrivateMethodsHasAccessibility({modifier:s.accessibility}))}else if(S&&y)this.raise(S.start,L.ConstructorHasTypeParameters);let{declare:P=!1,kind:A}=s;if(P&&(A==="get"||A==="set"))this.raise(s.start,L.DeclareAccessor({kind:A}));if(S)s.typeParameters=S;let v=s.key;if(s.kind==="constructor"){if(c)this.raise(v.start,"Constructor can't be a generator");if(u)this.raise(v.start,"Constructor can't be an async method")}else if(s.static&&ks(s,"prototype"))this.raise(v.start,"Classes may not have a static property named prototype");let _=s.value=this.parseMethod(c,u,f,!0,s);if(s.kind==="get"&&_.params.length!==0)this.raiseRecoverable(_.start,"getter should have no params");if(s.kind==="set"&&_.params.length!==1)this.raiseRecoverable(_.start,"setter should have exactly one param");if(s.kind==="set"&&_.params[0].type==="RestElement")this.raiseRecoverable(_.params[0].start,"Setter cannot use rest params");return this.finishNode(s,"MethodDefinition")}isClassMethod(){return this.match(a.relational)}parseClassElement(s){if(this.eat(a.semi))return null;let c=this.startNode(),u="",f=!1,y=!1,g="method",S=!1,P=["declare","private","public","protected","accessor","override","abstract","readonly","static"],A=this.tsParseModifiers({modified:c,allowedModifiers:P,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:L.InvalidModifierOnTypeParameterPositions});S=Boolean(A.static);let v=()=>{if(this.tsIsStartOfStaticBlocks()){if(this.next(),this.next(),this.tsHasSomeModifiers(c,P))this.raise(this.start,L.StaticBlockCannotHaveModifier);if(this.ecmaVersion>=13)return super.parseClassStaticBlock(c),c}else{let _=this.tsTryParseIndexSignature(c);if(_){if(c.abstract)this.raise(c.start,L.IndexSignatureHasAbstract);if(c.accessibility)this.raise(c.start,L.IndexSignatureHasAccessibility({modifier:c.accessibility}));if(c.declare)this.raise(c.start,L.IndexSignatureHasDeclare);if(c.override)this.raise(c.start,L.IndexSignatureHasOverride);return _}if(!this.inAbstractClass&&c.abstract)this.raise(c.start,L.NonAbstractClassHasAbstractMethod);if(c.override){if(!s)this.raise(c.start,L.OverrideNotInSubClass)}if(c.static=S,S){if(!(this.isClassElementNameStart()||this.type===a.star))u="static"}if(!u&&this.ecmaVersion>=8&&this.eatContextual("async"))if((this.isClassElementNameStart()||this.type===a.star)&&!this.canInsertSemicolon())y=!0;else u="async";if(!u&&(this.ecmaVersion>=9||!y)&&this.eat(a.star))f=!0;if(!u&&!y&&!f){let w=this.value;if(this.eatContextual("get")||this.eatContextual("set"))if(this.isClassElementNameStart())g=w;else u=w}if(u)c.computed=!1,c.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),c.key.name=u,this.finishNode(c.key,"Identifier");else this.parseClassElementName(c);if(this.parsePostMemberNameModifiers(c),this.isClassMethod()||this.ecmaVersion<13||this.type===a.parenL||g!=="method"||f||y){let w=!c.static&&ks(c,"constructor"),R=w&&s;if(w&&g!=="method")this.raise(c.key.start,"Constructor can't have get/set modifier");c.kind=w?"constructor":g,this.parseClassMethod(c,f,y,R)}else this.parseClassField(c);return c}};if(c.declare)this.tsInAmbientContext(v);else v();return c}isClassElementNameStart(){if(this.tsIsIdentifier())return!0;return super.isClassElementNameStart()}parseClassSuper(s){if(super.parseClassSuper(s),s.superClass&&(this.tsMatchLeftRelational()||this.match(a.bitShift)))s.superTypeParameters=this.tsParseTypeArgumentsInExpression();if(this.eatContextual("implements"))s.implements=this.tsParseHeritageClause("implements")}parseFunctionParams(s){let c=this.tsTryParseTypeParameters(this.tsParseConstModifier);if(c)s.typeParameters=c;super.parseFunctionParams(s)}parseVarId(s,c){if(super.parseVarId(s,c),s.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.value==="!"&&this.eat(a.prefix))s.definite=!0;let u=this.tsTryParseTypeAnnotation();if(u)s.id.typeAnnotation=u,this.resetEndLocation(s.id)}parseArrowExpression(s,c,u,f){if(this.match(a.colon))s.returnType=this.tsParseTypeAnnotation();let y=this.yieldPos,g=this.awaitPos,S=this.awaitIdentPos;this.enterScope(rn(u,!1)|Y.SCOPE_ARROW),this.initFunction(s);let P=this.maybeInArrowParameters;if(this.ecmaVersion>=8)s.async=!!u;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.maybeInArrowParameters=!0,s.params=this.toAssignableList(c,!0),this.maybeInArrowParameters=!1,this.parseFunctionBody(s,!0,!1,f),this.yieldPos=y,this.awaitPos=g,this.awaitIdentPos=S,this.maybeInArrowParameters=P,this.finishNode(s,"ArrowFunctionExpression")}parseMaybeAssignOrigin(s,c,u){if(this.isContextual("yield"))if(this.inGenerator)return this.parseYield(s);else this.exprAllowed=!1;let f=!1,y=-1,g=-1,S=-1;if(c)y=c.parenthesizedAssign,g=c.trailingComma,S=c.doubleProto,c.parenthesizedAssign=c.trailingComma=-1;else c=new Lt,f=!0;let P=this.start,A=this.startLoc;if(this.type===a.parenL||D(this.type))this.potentialArrowAt=this.start,this.potentialArrowInForAwait=s==="await";let v=this.parseMaybeConditional(s,c);if(u)v=u.call(this,v,P,A);if(this.type.isAssign){let _=this.startNodeAt(P,A);if(_.operator=this.value,this.type===a.eq)v=this.toAssignable(v,!0,c);if(!f)c.parenthesizedAssign=c.trailingComma=c.doubleProto=-1;if(c.shorthandAssign>=v.start)c.shorthandAssign=-1;if(!this.maybeInArrowParameters)if(this.type===a.eq)this.checkLValPattern(v);else this.checkLValSimple(v);if(_.left=v,this.next(),_.right=this.parseMaybeAssign(s),S>-1)c.doubleProto=S;return this.finishNode(_,"AssignmentExpression")}else if(f)this.checkExpressionErrors(c,!0);if(y>-1)c.parenthesizedAssign=y;if(g>-1)c.trailingComma=g;return v}parseMaybeAssign(s,c,u){let f,y,g;if(e?.jsx&&(this.matchJsx("jsxTagStart")||this.tsMatchLeftRelational())){if(f=this.cloneCurLookaheadState(),y=this.tryParse(()=>this.parseMaybeAssignOrigin(s,c,u),f),!y.error)return y.node;let A=this.context,v=A[A.length-1],_=A[A.length-2];if(v===o.tokContexts.tc_oTag&&_===o.tokContexts.tc_expr)A.pop(),A.pop();else if(v===o.tokContexts.tc_oTag||v===o.tokContexts.tc_expr)A.pop()}if(!y?.error&&!this.tsMatchLeftRelational())return this.parseMaybeAssignOrigin(s,c,u);if(!f||this.compareLookaheadState(f,this.getCurLookaheadState()))f=this.cloneCurLookaheadState();let S,P=this.tryParse((A)=>{S=this.tsParseTypeParameters(this.tsParseConstModifier);let v=this.parseMaybeAssignOrigin(s,c,u);if(v.type!=="ArrowFunctionExpression"||v.extra?.parenthesized)A();if(S?.params.length!==0)this.resetStartLocationFromNode(v,S);return v.typeParameters=S,v},f);if(!P.error&&!P.aborted){if(S)this.reportReservedArrowTypeParam(S);return P.node}if(!y){if(ws(!0),g=this.tryParse(()=>this.parseMaybeAssignOrigin(s,c,u),f),!g.error)return g.node}if(y?.node)return this.setLookaheadState(y.failState),y.node;if(P.node){if(this.setLookaheadState(P.failState),S)this.reportReservedArrowTypeParam(S);return P.node}if(g?.node)return this.setLookaheadState(g.failState),g.node;if(y?.thrown)throw y.error;if(P.thrown)throw P.error;if(g?.thrown)throw g.error;throw y?.error||P.error||g?.error}parseAssignableListItem(s){let c=[];while(this.match(E.at))c.push(this.parseDecorator());let u=this.start,f=this.startLoc,y,g=!1,S=!1;if(s!==void 0){let v={};if(this.tsParseModifiers({modified:v,allowedModifiers:["public","private","protected","override","readonly"]}),y=v.accessibility,S=v.override,g=v.readonly,s===!1&&(y||g||S))this.raise(f.column,L.UnexpectedParameterModifier)}let P=this.parseMaybeDefault(u,f);this.parseBindingListItem(P);let A=this.parseMaybeDefault(P.start,P.loc.start,P);if(c.length)A.decorators=c;if(y||g||S){let v=this.startNodeAt(u,f);if(y)v.accessibility=y;if(g)v.readonly=g;if(S)v.override=S;if(A.type!=="Identifier"&&A.type!=="AssignmentPattern")this.raise(v.start,L.UnsupportedParameterPropertyKind);return v.parameter=A,this.finishNode(v,"TSParameterProperty")}return A}checkLValInnerPattern(s,c=Y.BIND_NONE,u){switch(s.type){case"TSParameterProperty":this.checkLValInnerPattern(s.parameter,c,u);break;default:{super.checkLValInnerPattern(s,c,u);break}}}parseBindingListItem(s){if(this.eat(a.question)){if(s.type!=="Identifier"&&!this.isAmbientContext&&!this.inType)this.raise(s.start,L.PatternIsOptional);s.optional=!0}let c=this.tsTryParseTypeAnnotation();if(c)s.typeAnnotation=c;return this.resetEndLocation(s),s}isAssignable(s,c){switch(s.type){case"TSTypeCastExpression":return this.isAssignable(s.expression,c);case"TSParameterProperty":return!0;case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":return!0;case"ObjectExpression":{let u=s.properties.length-1;return s.properties.every((f,y)=>f.type!=="ObjectMethod"&&(y===u||f.type!=="SpreadElement")&&this.isAssignable(f))}case"Property":case"ObjectProperty":return this.isAssignable(s.value);case"SpreadElement":return this.isAssignable(s.argument);case"ArrayExpression":return s.elements.every((u)=>u===null||this.isAssignable(u));case"AssignmentExpression":return s.operator==="=";case"ParenthesizedExpression":return this.isAssignable(s.expression);case"MemberExpression":case"OptionalMemberExpression":return!c;default:return!1}}toAssignable(s,c=!1,u=new Lt){switch(s.type){case"ParenthesizedExpression":return this.toAssignableParenthesizedExpression(s,c,u);case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":if(c);else this.raise(s.start,L.UnexpectedTypeCastInParameter);return this.toAssignable(s.expression,c,u);case"MemberExpression":break;case"AssignmentExpression":if(!c&&s.left.type==="TSTypeCastExpression")s.left=this.typeCastToParameter(s.left);return super.toAssignable(s,c,u);case"TSTypeCastExpression":return this.typeCastToParameter(s);default:return super.toAssignable(s,c,u)}return s}toAssignableParenthesizedExpression(s,c,u){switch(s.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":return this.toAssignable(s.expression,c,u);default:return super.toAssignable(s,c,u)}}parseBindingAtom(){switch(this.type){case a._this:return this.parseIdent(!0);default:return super.parseBindingAtom()}}shouldParseArrow(s){let c;if(this.match(a.colon))c=s.every((u)=>this.isAssignable(u,!0));else c=!this.canInsertSemicolon();if(c){if(this.match(a.colon)){let u=this.tryParse((f)=>{let y=this.tsParseTypeOrTypePredicateAnnotation(a.colon);if(this.canInsertSemicolon()||!this.match(a.arrow))f();return y});if(u.aborted)return this.shouldParseArrowReturnType=void 0,!1;if(!u.thrown){if(u.error)this.setLookaheadState(u.failState);this.shouldParseArrowReturnType=u.node}}if(!this.match(a.arrow))return this.shouldParseArrowReturnType=void 0,!1;return!0}return this.shouldParseArrowReturnType=void 0,c}parseParenArrowList(s,c,u,f){let y=this.startNodeAt(s,c);return y.returnType=this.shouldParseArrowReturnType,this.shouldParseArrowReturnType=void 0,this.parseArrowExpression(y,u,!1,f)}parseParenAndDistinguishExpression(s,c){let u=this.start,f=this.startLoc,y,g=this.ecmaVersion>=8;if(this.ecmaVersion>=6){let S=this.maybeInArrowParameters;this.maybeInArrowParameters=!0,this.next();let P=this.start,A=this.startLoc,v=[],_=!0,w=!1,R=new Lt,H=this.yieldPos,J=this.awaitPos,F;this.yieldPos=0,this.awaitPos=0;while(this.type!==a.parenR)if(_?_=!1:this.expect(a.comma),g&&this.afterTrailingComma(a.parenR,!0)){w=!0;break}else if(this.type===a.ellipsis){if(F=this.start,v.push(this.parseParenItem(this.parseRestBinding())),this.type===a.comma)this.raise(this.start,"Comma is not permitted after the rest element");break}else v.push(this.parseMaybeAssign(c,R,this.parseParenItem));let O=this.lastTokEnd,G=this.lastTokEndLoc;if(this.expect(a.parenR),this.maybeInArrowParameters=S,s&&this.shouldParseArrow(v)&&this.eat(a.arrow))return this.checkPatternErrors(R,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=H,this.awaitPos=J,this.parseParenArrowList(u,f,v,c);if(!v.length||w)this.unexpected(this.lastTokStart);if(F)this.unexpected(F);if(this.checkExpressionErrors(R,!0),this.yieldPos=H||this.yieldPos,this.awaitPos=J||this.awaitPos,v.length>1)y=this.startNodeAt(P,A),y.expressions=v,this.finishNodeAt(y,"SequenceExpression",O,G);else y=v[0]}else y=this.parseParenExpression();if(this.options.preserveParens){let S=this.startNodeAt(u,f);return S.expression=y,this.finishNode(S,"ParenthesizedExpression")}else return y}parseTaggedTemplateExpression(s,c,u,f){let y=this.startNodeAt(c,u);if(y.tag=s,y.quasi=this.parseTemplate({isTagged:!0}),f)this.raise(c,"Tagged Template Literals are not allowed in optionalChain.");return this.finishNode(y,"TaggedTemplateExpression")}shouldParseAsyncArrow(){if(this.match(a.colon)){let s=this.tryParse((c)=>{let u=this.tsParseTypeOrTypePredicateAnnotation(a.colon);if(this.canInsertSemicolon()||!this.match(a.arrow))c();return u});if(s.aborted)return this.shouldParseAsyncArrowReturnType=void 0,!1;if(!s.thrown){if(s.error)this.setLookaheadState(s.failState);return this.shouldParseAsyncArrowReturnType=s.node,!this.canInsertSemicolon()&&this.eat(a.arrow)}}else return!this.canInsertSemicolon()&&this.eat(a.arrow)}parseSubscriptAsyncArrow(s,c,u,f){let y=this.startNodeAt(s,c);return y.returnType=this.shouldParseAsyncArrowReturnType,this.shouldParseAsyncArrowReturnType=void 0,this.parseArrowExpression(y,u,!0,f)}parseExprList(s,c,u,f){let y=[],g=!0;while(!this.eat(s)){if(!g){if(this.expect(a.comma),c&&this.afterTrailingComma(s))break}else g=!1;let S;if(u&&this.type===a.comma)S=null;else if(this.type===a.ellipsis){if(S=this.parseSpread(f),this.maybeInArrowParameters&&this.match(a.colon))S.typeAnnotation=this.tsParseTypeAnnotation();if(f&&this.type===a.comma&&f.trailingComma<0)f.trailingComma=this.start}else S=this.parseMaybeAssign(!1,f,this.parseParenItem);y.push(S)}return y}parseSubscript(s,c,u,f,y,g,S){let P=g;if(!this.hasPrecedingLineBreak()&&this.value==="!"&&this.match(a.prefix)){this.exprAllowed=!1,this.next();let R=this.startNodeAt(c,u);return R.expression=s,s=this.finishNode(R,"TSNonNullExpression"),s}let A=!1;if(this.match(a.questionDot)&&this.lookaheadCharCode()===60){if(f)return s;s.optional=!0,P=A=!0,this.next()}if(this.tsMatchLeftRelational()||this.match(a.bitShift)){let R,H=this.tsTryParseAndCatch(()=>{if(!f&&this.atPossibleAsyncArrow(s)){let G=this.tsTryParseGenericAsyncArrowFunction(c,u,S);if(G)return s=G,s}let J=this.tsParseTypeArgumentsInExpression();if(!J)return s;if(A&&!this.match(a.parenL))return R=this.curPosition(),s;if(V(this.type)||this.type===a.backQuote){let G=this.parseTaggedTemplateExpression(s,c,u,P);return G.typeArguments=J,G}if(!f&&this.eat(a.parenL)){let G=new Lt,U=this.startNodeAt(c,u);if(U.callee=s,U.arguments=this.parseExprList(a.parenR,this.ecmaVersion>=8,!1,G),this.tsCheckForInvalidTypeCasts(U.arguments),U.typeArguments=J,P)U.optional=A;return this.checkExpressionErrors(G,!0),s=this.finishNode(U,"CallExpression"),s}let F=this.type;if(this.tsMatchRightRelational()||F===a.bitShift||F!==a.parenL&&Cp(F)&&!this.hasPrecedingLineBreak())return;let O=this.startNodeAt(c,u);return O.expression=s,O.typeArguments=J,this.finishNode(O,"TSInstantiationExpression")});if(R)this.unexpected(R);if(H){if(H.type==="TSInstantiationExpression"&&(this.match(a.dot)||this.match(a.questionDot)&&this.lookaheadCharCode()!==40))this.raise(this.start,L.InvalidPropertyAccessAfterInstantiationExpression);return s=H,s}}let v=this.ecmaVersion>=11,_=v&&this.eat(a.questionDot);if(f&&_)this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");let w=this.eat(a.bracketL);if(w||_&&this.type!==a.parenL&&this.type!==a.backQuote||this.eat(a.dot)){let R=this.startNodeAt(c,u);if(R.object=s,w)R.property=this.parseExpression(),this.expect(a.bracketR);else if(this.type===a.privateId&&s.type!=="Super")R.property=this.parsePrivateIdent();else R.property=this.parseIdent(this.options.allowReserved!=="never");if(R.computed=!!w,v)R.optional=_;s=this.finishNode(R,"MemberExpression")}else if(!f&&this.eat(a.parenL)){let R=this.maybeInArrowParameters;this.maybeInArrowParameters=!0;let H=new Lt,J=this.yieldPos,F=this.awaitPos,O=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;let G=this.parseExprList(a.parenR,this.ecmaVersion>=8,!1,H);if(y&&!_&&this.shouldParseAsyncArrow()){if(this.checkPatternErrors(H,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0)this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function");this.yieldPos=J,this.awaitPos=F,this.awaitIdentPos=O,s=this.parseSubscriptAsyncArrow(c,u,G,S)}else{this.checkExpressionErrors(H,!0),this.yieldPos=J||this.yieldPos,this.awaitPos=F||this.awaitPos,this.awaitIdentPos=O||this.awaitIdentPos;let U=this.startNodeAt(c,u);if(U.callee=s,U.arguments=G,v)U.optional=_;s=this.finishNode(U,"CallExpression")}this.maybeInArrowParameters=R}else if(this.type===a.backQuote){if(_||P)this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");let R=this.startNodeAt(c,u);R.tag=s,R.quasi=this.parseTemplate({isTagged:!0}),s=this.finishNode(R,"TaggedTemplateExpression")}return s}parseGetterSetter(s){s.kind=s.key.name,this.parsePropertyName(s);let c=this.tsTryParseTypeParameters(this.tsParseConstModifier);if(s.value=this.parseMethod(!1),c)s.value.typeParameters=c;let u=s.kind==="get"?0:1,f=s.value.params[0];if(u=f&&this.isThisParam(f)?u+1:u,s.value.params.length!==u){let g=s.value.start;if(s.kind==="get")this.raiseRecoverable(g,"getter should have no params");else this.raiseRecoverable(g,"setter should have exactly one param")}else if(s.kind==="set"&&s.value.params[0].type==="RestElement")this.raiseRecoverable(s.value.params[0].start,"Setter cannot use rest params")}parsePropertyValue(s,c,u,f,y,g,S,P){if(this.tsMatchLeftRelational()){if(c)this.unexpected();s.kind="init",s.method=!0;let A=this.tsTryParseTypeParameters(this.tsParseConstModifier);if(s.value=this.parseMethod(u,f),A)s.value.typeParameters=A;return}return super.parsePropertyValue(s,c,u,f,y,g,S,P)}parseProperty(s,c){if(!s){let u=[];if(this.match(E.at))while(this.match(E.at))u.push(this.parseDecorator());let f=super.parseProperty(s,c);if(f.type==="SpreadElement"){if(u.length)this.raise(f.start,pr.SpreadElementDecorator)}if(u.length)f.decorators=u,u=[];return f}return super.parseProperty(s,c)}parseCatchClauseParam(){let s=this.parseBindingAtom(),c=s.type==="Identifier";this.enterScope(c?Y.SCOPE_SIMPLE_CATCH:0),this.checkLValPattern(s,c?Y.BIND_SIMPLE_CATCH:Y.BIND_LEXICAL);let u=this.tsTryParseTypeAnnotation();if(u)s.typeAnnotation=u,this.resetEndLocation(s);return this.expect(a.parenR),s}parseClass(s,c){let u=this.inAbstractClass;this.inAbstractClass=!!s.abstract;try{this.next(),this.takeDecorators(s);let f=this.strict;this.strict=!0,this.parseClassId(s,c),this.parseClassSuper(s);let y=this.enterClassBody(),g=this.startNode(),S=!1;g.body=[];let P=[];this.expect(a.braceL);while(this.type!==a.braceR){if(this.match(E.at)){P.push(this.parseDecorator());continue}let A=this.parseClassElement(s.superClass!==null);if(P.length)A.decorators=P,this.resetStartLocationFromNode(A,P[0]),P=[];if(A){if(g.body.push(A),A.type==="MethodDefinition"&&A.kind==="constructor"&&A.value.type==="FunctionExpression"){if(S)this.raiseRecoverable(A.start,"Duplicate constructor in the same class");if(S=!0,A.decorators&&A.decorators.length>0)this.raise(A.start,pr.DecoratorConstructor)}else if(A.key&&A.key.type==="PrivateIdentifier"&&A.value?.type!=="TSDeclareMethod"&&dp(y,A))this.raiseRecoverable(A.key.start,`Identifier '#${A.key.name}' has already been declared`)}}if(this.strict=f,this.next(),P.length)this.raise(this.start,pr.TrailingDecorator);return s.body=this.finishNode(g,"ClassBody"),this.exitClassBody(),this.finishNode(s,c?"ClassDeclaration":"ClassExpression")}finally{this.inAbstractClass=u}}parseClassFunctionParams(){let s=this.tsTryParseTypeParameters(),c=this.parseBindingList(a.parenR,!1,this.ecmaVersion>=8,!0);if(s)c.typeParameters=s;return c}parseMethod(s,c,u,f,y){let g=this.startNode(),S=this.yieldPos,P=this.awaitPos,A=this.awaitIdentPos;if(this.initFunction(g),this.ecmaVersion>=6)g.generator=s;if(this.ecmaVersion>=8)g.async=!!c;if(this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(rn(c,g.generator)|Y.SCOPE_SUPER|(u?Y.SCOPE_DIRECT_SUPER:0)),this.expect(a.parenL),g.params=this.parseClassFunctionParams(),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(g,!1,!0,!1,{isClassMethod:f}),this.yieldPos=S,this.awaitPos=P,this.awaitIdentPos=A,y&&y.abstract){if(!!g.body){let{key:_}=y;this.raise(y.start,L.AbstractMethodHasImplementation({methodName:_.type==="Identifier"&&!y.computed?_.name:`[${this.input.slice(_.start,_.end)}]`}))}}return this.finishNode(g,"FunctionExpression")}static parse(s,c){if(c.locations===!1)throw Error("You have to enable options.locations while using acorn-typescript");else c.locations=!0;let u=new this(c,s);if(t)u.isAmbientContext=!0;return u.parse()}static parseExpressionAt(s,c,u){if(u.locations===!1)throw Error("You have to enable options.locations while using acorn-typescript");else u.locations=!0;let f=new this(u,s,c);if(t)f.isAmbientContext=!0;return f.nextToken(),f.parseExpression()}parseImportSpecifier(){if(this.ts_isContextual(E.type)){let c=this.startNode();return c.imported=this.parseModuleExportName(),this.parseTypeOnlyImportExportSpecifier(c,!0,this.importOrExportOuterKind==="type"),this.finishNode(c,"ImportSpecifier")}else{let c=super.parseImportSpecifier();return c.importKind="value",c}}parseExportSpecifier(s){let c=this.ts_isContextual(E.type);if(!this.match(a.string)&&c){let f=this.startNode();return f.local=this.parseModuleExportName(),this.parseTypeOnlyImportExportSpecifier(f,!1,this.importOrExportOuterKind==="type"),this.finishNode(f,"ExportSpecifier"),this.checkExport(s,f.exported,f.exported.start),f}else{let f=super.parseExportSpecifier(s);return f.exportKind="value",f}}parseTypeOnlyImportExportSpecifier(s,c,u){let f=c?"imported":"local",y=c?"local":"exported",g=s[f],S,P=!1,A=!0,v=g.start;if(this.isContextual("as")){let w=this.parseIdent();if(this.isContextual("as")){let R=this.parseIdent();if(X(this.type))P=!0,g=w,S=c?this.parseIdent():this.parseModuleExportName(),A=!1;else S=R,A=!1}else if(X(this.type))A=!1,S=c?this.parseIdent():this.parseModuleExportName();else P=!0,g=w}else if(X(this.type))if(P=!0,c){if(g=super.parseIdent(!0),!this.isContextual("as"))this.checkUnreserved(g)}else g=this.parseModuleExportName();if(P&&u)this.raise(v,c?L.TypeModifierIsUsedInTypeImports:L.TypeModifierIsUsedInTypeExports);s[f]=g,s[y]=S;let _=c?"importKind":"exportKind";if(s[_]=P?"type":"value",A&&this.eatContextual("as"))s[y]=c?this.parseIdent():this.parseModuleExportName();if(!s[y])s[y]=this.copyNode(s[f]);if(c)this.checkLValSimple(s[y],Y.BIND_LEXICAL)}raiseCommonCheck(s,c,u){switch(c){case"Comma is not permitted after the rest element":if(this.isAmbientContext&&this.match(a.comma)&&this.lookaheadCharCode()===41){this.next();return}else return super.raise(s,c)}return u?super.raiseRecoverable(s,c):super.raise(s,c)}raiseRecoverable(s,c){return this.raiseCommonCheck(s,c,!0)}raise(s,c){return this.raiseCommonCheck(s,c,!0)}updateContext(s){let{type:c}=this;if(c==a.braceL){var u=this.curContext();if(u==k.tc_oTag)this.context.push(b.b_expr);else if(u==k.tc_expr)this.context.push(b.b_tmpl);else super.updateContext(s);this.exprAllowed=!0}else if(c===a.slash&&s===E.jsxTagStart)this.context.length-=2,this.context.push(k.tc_cTag),this.exprAllowed=!1;else return super.updateContext(s)}jsx_parseOpeningElementAt(s,c){let u=this.startNodeAt(s,c),f=this.jsx_parseElementName();if(f)u.name=f;if(this.match(a.relational)||this.match(a.bitShift)){let y=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());if(y)u.typeArguments=y}u.attributes=[];while(this.type!==a.slash&&this.type!==E.jsxTagEnd)u.attributes.push(this.jsx_parseAttribute());return u.selfClosing=this.eat(a.slash),this.expect(E.jsxTagEnd),this.finishNode(u,f?"JSXOpeningElement":"JSXOpeningFragment")}enterScope(s){if(s===It)this.importsStack.push([]);super.enterScope(s);let c=super.currentScope();c.types=[],c.enums=[],c.constEnums=[],c.classes=[],c.exportOnlyBindings=[]}exitScope(){if(super.currentScope().flags===It)this.importsStack.pop();super.exitScope()}hasImport(s,c){let u=this.importsStack.length;if(this.importsStack[u-1].indexOf(s)>-1)return!0;if(!c&&u>1){for(let f=0;f<u-1;f++)if(this.importsStack[f].indexOf(s)>-1)return!0}return!1}maybeExportDefined(s,c){if(this.inModule&&s.flags&Y.SCOPE_TOP)delete this.undefinedExports[c]}declareName(s,c,u){if(c&Y.BIND_FLAGS_TS_IMPORT){if(this.hasImport(s,!0))this.raise(u,`Identifier '${s}' has already been declared.`);this.importsStack[this.importsStack.length-1].push(s);return}let f=this.currentScope();if(c&Y.BIND_FLAGS_TS_EXPORT_ONLY){this.maybeExportDefined(f,s),f.exportOnlyBindings.push(s);return}if(c===Y.BIND_TS_TYPE||c===Y.BIND_TS_INTERFACE){if(c===Y.BIND_TS_TYPE&&f.types.includes(s))this.raise(u,`type '${s}' has already been declared.`);f.types.push(s)}else super.declareName(s,c,u);if(c&Y.BIND_FLAGS_TS_ENUM)f.enums.push(s);if(c&Y.BIND_FLAGS_TS_CONST_ENUM)f.constEnums.push(s);if(c&Y.BIND_FLAGS_CLASS)f.classes.push(s)}checkLocalExport(s){let{name:c}=s;if(this.hasImport(c))return;let u=this.scopeStack.length;for(let f=u-1;f>=0;f--){let y=this.scopeStack[f];if(y.types.indexOf(c)>-1||y.exportOnlyBindings.indexOf(c)>-1)return}super.checkLocalExport(s)}}return x}}function js(e,t,r){let n=r._,i=!1;function o(p,{next:l,state:m}){l(m)}function a(p,l,m){if(i)return;if(!p.type)return;let d,b={},T={path:l,state:m,next:(k=m)=>{l.push(p);for(let B in p){if(B==="type")continue;let C=p[B];if(C&&typeof C==="object")if(Array.isArray(C)){let V={},j=C.length,D=!1;for(let X=0;X<j;X++){let M=C[X];if(M&&typeof M==="object"){let Q=a(M,l,k);if(Q)V[X]=Q,D=!0}}if(D)b[B]=C.map((X,M)=>V[M]??X)}else{let V=a(C,l,k);if(V)b[B]=V}}if(l.pop(),Object.keys(b).length>0)return Vs(p,b)},stop:()=>{i=!0},visit:(k,B=m)=>{l.push(p);let C=a(k,l,B)??k;return l.pop(),C}},E=r[p.type]??o;if(n){let k;if(d=n(p,{...T,next:(B=m)=>(m=B,k=E(p,{...T,state:B}),k)}),!d&&k)d=k}else d=E(p,T);if(!d){if(Object.keys(b).length>0)d=Vs(p,b)}if(d)return d}return a(e,[],t)??e}function Vs(e,t){let r={},n=Object.getOwnPropertyDescriptors(e);for(let i in n)Object.defineProperty(r,i,n[i]);for(let i in t)r[i]=t[i];return r}var kp=/\n/,wp=/[ \t]/,_p=/^[,) \t]*$/,ur="",$s=[];function hr(e,t){ur=e,$s=t}function dr(e,t,r,n){let i=t;if(e&&kp.test(i)){let o=r;while(o>0&&ur[o-1]!==`
|
|
29
|
+
`)o-=1;let a=o;while(wp.test(ur[a]))a+=1;let p=ur.slice(o,a);i=Np(i,p)}$s.push({type:e?"Block":"Line",value:i,start:r,end:n})}function Np(e,t){if(t==="")return e;let r=e.split(`
|
|
28
30
|
`);for(let n=0;n<r.length;n++)if(r[n].startsWith(t))r[n]=r[n].slice(t.length);return r.join(`
|
|
29
|
-
`)}function sn(e,t,r,n){let i=Ap(r,n);if(i>=r.length)return;Ms(e,void 0,r,{index:i},t)}function Ap(e,t){let r=0,n=e.length;while(r<n){let i=r+n>>>1;if(e[i].start<t)r=i+1;else n=i}return r}function Ms(e,t,r,n,i){while(n.index<r.length&&r[n.index].start<(e.start??0))e.leadingComments??=[],e.leadingComments.push(r[n.index]),n.index++;if(n.index>=r.length)return;for(let o of kp(e))Ms(o,e,r,n,i);if(n.index<r.length){let o=r[n.index];if(t===void 0||e.end!==t.end){let a=i.slice(e.end??0,o.start);if((t?.type==="BlockStatement"||t?.type==="Program")&&nn(t.body,e)||t?.type==="ArrayExpression"&&nn(t.elements,e)||t?.type==="ObjectExpression"&&nn(t.properties,e))while(n.index<r.length){if(t&&r[n.index].start>=(t.end??Number.POSITIVE_INFINITY))break;n.index++}else if((e.end??0)<=o.start&&Cp.test(a))n.index++}}}function nn(e,t){return!!e&&e.indexOf(t)===e.length-1}function kp(e){let t=[];for(let r of Object.keys(e)){if(r==="type"||r==="leadingComments")continue;let n=e[r];if(!n||typeof n!=="object")continue;if(Array.isArray(n)){for(let i of n)if(i&&typeof i==="object"&&typeof i.type==="string")t.push(i)}else if(typeof n.type==="string")t.push(n)}return t}var Os=ne,wp=Os.extend(Is());function an(e){return e?wp:Os}var Np={onComment:dr,sourceType:"module",ecmaVersion:16},_p={onComment:dr,sourceType:"module",ecmaVersion:16,preserveParens:!0},Ip={onComment:dr,sourceType:"module",ecmaVersion:16};function Bs(e,t,r,n,i){if(r.length===i)return;sn(e,t,r,n)}function Fs(e,t,r){let n=r.length;hr(e,r);let i=an(t).parse(e,Np);if(r.length>0)sn(i,e,r,n);return i}var Dp={count:0};function pt(e,t,r,n){Dp.count+=1;let i=n.length;hr(e,n);let o=an(r).parseExpressionAt(e,t,_p);Bs(o,e,n,t,i);let a=n.length>i?n.at(-1):void 0,p=a&&a.end>(o.end??0)?a.end:o.end??0,u=o.end??t;return{node:Lp(e,t,u,40)?Rp(o):o,end:p}}function Lp(e,t,r,n){for(let i=t;i<r;i++)if(e.charCodeAt(i)===n)return!0;return!1}function Vs(e,t,r,n){let i=n.length,o=an(r);hr(e,n);let a=new o(Ip,e,t);a.nextToken();let p=a.parseStatement(null,!0,Object.create(null));return Bs(p,e,n,t,i),p}function Rp(e){return Ls(e,null,{ParenthesizedExpression(t,r){return r.visit(t.expression)}})}function tt(e){if(e===32||e<=13&&e>=9)return!0;if(e<160)return!1;return e===160||e===5760||e>=8192&&e<=8202||e===8232||e===8233||e===8239||e===8287||e===12288||e===65279}class on{source;index=0;constructor(e){this.source=e}match(e){if(e.length===1)return this.source.charCodeAt(this.index)===e.charCodeAt(0);return this.source.startsWith(e,this.index)}matchRegex(e){e.lastIndex=this.index;let t=e.exec(this.source);if(!t||t.index!==this.index)return null;return t[0]}eat(e,t=!1){if(this.match(e))return this.index+=e.length,!0;if(t)throw new Ge(`Expected token ${JSON.stringify(e)}`,this.index);return!1}read(e){let t=this.matchRegex(e);if(t)this.index+=t.length;return t}readUntil(e){if(this.index>=this.source.length)throw new Ge("Unexpected end of input",this.source.length);let t=this.index;e.lastIndex=t;let r=e.exec(this.source);if(r)return this.index=r.index,this.source.slice(t,this.index);return this.index=this.source.length,this.source.slice(t)}readUntilString(e){if(this.index>=this.source.length)throw new Ge("Unexpected end of input",this.source.length);let t=this.source.indexOf(e,this.index),r=t===-1?this.source.length:t,n=this.source.slice(this.index,r);return this.index=r,n}allowWhitespace(){while(this.index<this.source.length&&tt(this.source.charCodeAt(this.index)))this.index++}requireWhitespace(){if(!tt(this.source.charCodeAt(this.index)))throw new Ge("Expected whitespace",this.index);this.allowWhitespace()}readIdentifierName(){let e=this.index,t=e,r="",n=this.source.codePointAt(this.index);if(n!==void 0&&he(n,!0)){t+=n<=65535?1:2;while(t<this.source.length){let i=this.source.codePointAt(t);if(i===void 0||!ye(i,!0))break;t+=i<=65535?1:2}r=this.source.slice(e,t),this.index=t}return{type:"Identifier",name:r,start:e,end:t}}}class Ge extends Error{position;constructor(e,t){super(`${e} (at index ${t})`);this.name="TemplateSyntaxError",this.position=t}}function fe(){return{type:"Fragment",nodes:[]}}var Mp=new Set(["await","break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","finally","for","function","if","implements","import","in","instanceof","interface","let","new","package","private","protected","public","return","static","super","switch","this","throw","try","typeof","var","void","while","with","yield"]),Op=["&&","||","??"],Bp=["===","!==","==","!="];function js(e,t){let r=e.codePointAt(t);if(r===void 0||!he(r,!0))return t;let n=t+(r<=65535?1:2);while(n<e.length){let i=e.codePointAt(n);if(!ye(i,!0))break;n+=i<=65535?1:2}return n}function Fp(e,t){let r=t;while(r<e.length){let n=e.charCodeAt(r);if(n<48||n>57)break;r++}return r}function fr(e,t){let r=t;while(r<e.length&&tt(e.charCodeAt(r)))r++;return r}function $s(e,t){let r=Fp(e,t);if(r===t)return null;if(e.charCodeAt(t)===48&&r-t>1)return null;if(r<e.length){let i=e.codePointAt(r);if(i===46||ye(i,!0))return null}let n=e.slice(t,r);return{type:"Literal",start:t,end:r,value:Number(n),raw:n}}function qs(e,t){let r=e.charCodeAt(t),n=t+1;while(n<e.length){let i=e.charCodeAt(n);if(i===r){let o=e.slice(t,n+1);return{type:"Literal",start:t,end:n+1,value:e.slice(t+1,n),raw:o}}if(i===92||i===10||i===13)return null;n++}return null}function Vp(e,t){let r=e.charCodeAt(t);if(r===34||r===39)return qs(e,t);let n=js(e,t);if(n===t)return $s(e,t);let i=e.slice(t,n);if(i==="true"||i==="false")return{type:"Literal",start:t,end:n,value:i==="true",raw:i};if(i==="null")return{type:"Literal",start:t,end:n,value:null,raw:i};if(Mp.has(i))return null;let o={type:"Identifier",start:t,end:n,name:i},a=n;while(a<e.length){let p=e.charCodeAt(a);if(p===46){let u=a+1,m=js(e,u);if(m===u)return null;let f={type:"Identifier",start:u,end:m,name:e.slice(u,m)};o={type:"MemberExpression",start:t,end:m,object:o,property:f,computed:!1,optional:!1},a=m}else if(p===91){let u=a+1,m=e.charCodeAt(u),f=m===34||m===39?qs(e,u):$s(e,u);if(!f||e.charCodeAt(f.end)!==93)return null;o={type:"MemberExpression",start:t,end:f.end+1,object:o,property:f,computed:!0,optional:!1},a=f.end+1}else break}return o}function cn(e,t){if(e.charCodeAt(t)!==33||e.charCodeAt(t+1)===61)return Vp(e,t);let r=cn(e,fr(e,t+1));if(!r)return null;return{type:"UnaryExpression",start:t,end:r.end,operator:"!",prefix:!0,argument:r}}function jp(e,t){for(let r of Bp)if(e.startsWith(r,t))return{operator:r,logical:!1};for(let r of Op)if(e.startsWith(r,t))return{operator:r,logical:!0};return null}function Hs(e,t){let r=fr(e,t);if(r>=e.length)return!1;let n=e.charCodeAt(r);return n===125||n===41}function $p(e){let t=e.source,r=cn(t,e.index);if(!r)return null;if(Hs(t,r.end))return e.index=r.end,r;let n=fr(t,r.end),i=jp(t,n);if(!i)return null;let o=cn(t,fr(t,n+i.operator.length));if(!o||!Hs(t,o.end))return null;return e.index=o.end,{type:i.logical?"LogicalExpression":"BinaryExpression",start:r.start,end:o.end,left:r,operator:i.operator,right:o}}function ce(e){let t=$p(e);if(t)return t;let{node:r,end:n}=pt(e.source,e.index,e.isTypeScript,e.root.comments);return e.index=n,r}var qp={"CounterClockwiseContourIntegral;":8755,"ClockwiseContourIntegral;":8754,"DoubleLongLeftRightArrow;":10234,"NotNestedGreaterGreater;":10914,"DiacriticalDoubleAcute;":733,"NotSquareSupersetEqual;":8931,"CloseCurlyDoubleQuote;":8221,"DoubleContourIntegral;":8751,"FilledVerySmallSquare;":9642,"NegativeVeryThinSpace;":8203,"NotPrecedesSlantEqual;":8928,"NotRightTriangleEqual;":8941,"NotSucceedsSlantEqual;":8929,"CapitalDifferentialD;":8517,"DoubleLeftRightArrow;":8660,"DoubleLongRightArrow;":10233,"EmptyVerySmallSquare;":9643,"NestedGreaterGreater;":8811,"NotDoubleVerticalBar;":8742,"NotGreaterSlantEqual;":10878,"NotLeftTriangleEqual;":8940,"NotSquareSubsetEqual;":8930,"OpenCurlyDoubleQuote;":8220,"ReverseUpEquilibrium;":10607,"DoubleLongLeftArrow;":10232,"DownLeftRightVector;":10576,"LeftArrowRightArrow;":8646,"NegativeMediumSpace;":8203,"NotGreaterFullEqual;":8807,"NotRightTriangleBar;":10704,"RightArrowLeftArrow;":8644,"SquareSupersetEqual;":8850,"leftrightsquigarrow;":8621,"DownRightTeeVector;":10591,"DownRightVectorBar;":10583,"LongLeftRightArrow;":10231,"Longleftrightarrow;":10234,"NegativeThickSpace;":8203,"NotLeftTriangleBar;":10703,"PrecedesSlantEqual;":8828,"ReverseEquilibrium;":8651,"RightDoubleBracket;":10215,"RightDownTeeVector;":10589,"RightDownVectorBar;":10581,"RightTriangleEqual;":8885,"SquareIntersection;":8851,"SucceedsSlantEqual;":8829,"blacktriangleright;":9656,"longleftrightarrow;":10231,"DoubleUpDownArrow;":8661,"DoubleVerticalBar;":8741,"DownLeftTeeVector;":10590,"DownLeftVectorBar;":10582,"FilledSmallSquare;":9724,"GreaterSlantEqual;":10878,"LeftDoubleBracket;":10214,"LeftDownTeeVector;":10593,"LeftDownVectorBar;":10585,"LeftTriangleEqual;":8884,"NegativeThinSpace;":8203,"NotGreaterGreater;":8811,"NotLessSlantEqual;":10877,"NotNestedLessLess;":10913,"NotReverseElement;":8716,"NotSquareSuperset;":8848,"NotTildeFullEqual;":8775,"RightAngleBracket;":10217,"RightUpDownVector;":10575,"SquareSubsetEqual;":8849,"VerticalSeparator;":10072,"blacktriangledown;":9662,"blacktriangleleft;":9666,"leftrightharpoons;":8651,"rightleftharpoons;":8652,"twoheadrightarrow;":8608,"DiacriticalAcute;":180,"DiacriticalGrave;":96,"DiacriticalTilde;":732,"DoubleRightArrow;":8658,"DownArrowUpArrow;":8693,"EmptySmallSquare;":9723,"GreaterEqualLess;":8923,"GreaterFullEqual;":8807,"LeftAngleBracket;":10216,"LeftUpDownVector;":10577,"LessEqualGreater;":8922,"NonBreakingSpace;":160,"NotPrecedesEqual;":10927,"NotRightTriangle;":8939,"NotSucceedsEqual;":10928,"NotSucceedsTilde;":8831,"NotSupersetEqual;":8841,"RightTriangleBar;":10704,"RightUpTeeVector;":10588,"RightUpVectorBar;":10580,"UnderParenthesis;":9181,"UpArrowDownArrow;":8645,"circlearrowright;":8635,"downharpoonright;":8642,"ntrianglerighteq;":8941,"rightharpoondown;":8641,"rightrightarrows;":8649,"twoheadleftarrow;":8606,"vartriangleright;":8883,"CloseCurlyQuote;":8217,"ContourIntegral;":8750,"DoubleDownArrow;":8659,"DoubleLeftArrow;":8656,"DownRightVector;":8641,"LeftRightVector;":10574,"LeftTriangleBar;":10703,"LeftUpTeeVector;":10592,"LeftUpVectorBar;":10584,"LowerRightArrow;":8600,"NotGreaterEqual;":8817,"NotGreaterTilde;":8821,"NotHumpDownHump;":8782,"NotLeftTriangle;":8938,"NotSquareSubset;":8847,"OverParenthesis;":9180,"RightDownVector;":8642,"ShortRightArrow;":8594,"UpperRightArrow;":8599,"bigtriangledown;":9661,"circlearrowleft;":8634,"curvearrowright;":8631,"downharpoonleft;":8643,"leftharpoondown;":8637,"leftrightarrows;":8646,"nLeftrightarrow;":8654,"nleftrightarrow;":8622,"ntrianglelefteq;":8940,"rightleftarrows;":8644,"rightsquigarrow;":8605,"rightthreetimes;":8908,"straightepsilon;":1013,"trianglerighteq;":8885,"vartriangleleft;":8882,"DiacriticalDot;":729,"DoubleRightTee;":8872,"DownLeftVector;":8637,"GreaterGreater;":10914,"HorizontalLine;":9472,"InvisibleComma;":8291,"InvisibleTimes;":8290,"LeftDownVector;":8643,"LeftRightArrow;":8596,"Leftrightarrow;":8660,"LessSlantEqual;":10877,"LongRightArrow;":10230,"Longrightarrow;":10233,"LowerLeftArrow;":8601,"NestedLessLess;":8810,"NotGreaterLess;":8825,"NotLessGreater;":8824,"NotSubsetEqual;":8840,"NotVerticalBar;":8740,"OpenCurlyQuote;":8216,"ReverseElement;":8715,"RightTeeVector;":10587,"RightVectorBar;":10579,"ShortDownArrow;":8595,"ShortLeftArrow;":8592,"SquareSuperset;":8848,"TildeFullEqual;":8773,"UpperLeftArrow;":8598,"ZeroWidthSpace;":8203,"curvearrowleft;":8630,"doublebarwedge;":8966,"downdownarrows;":8650,"hookrightarrow;":8618,"leftleftarrows;":8647,"leftrightarrow;":8596,"leftthreetimes;":8907,"longrightarrow;":10230,"looparrowright;":8620,"nshortparallel;":8742,"ntriangleright;":8939,"rightarrowtail;":8611,"rightharpoonup;":8640,"trianglelefteq;":8884,"upharpoonright;":8638,"ApplyFunction;":8289,"DifferentialD;":8518,"DoubleLeftTee;":10980,"DoubleUpArrow;":8657,"LeftTeeVector;":10586,"LeftVectorBar;":10578,"LessFullEqual;":8806,"LongLeftArrow;":10229,"Longleftarrow;":10232,"NotEqualTilde;":8770,"NotTildeEqual;":8772,"NotTildeTilde;":8777,"Poincareplane;":8460,"PrecedesEqual;":10927,"PrecedesTilde;":8830,"RightArrowBar;":8677,"RightTeeArrow;":8614,"RightTriangle;":8883,"RightUpVector;":8638,"SucceedsEqual;":10928,"SucceedsTilde;":8831,"SupersetEqual;":8839,"UpEquilibrium;":10606,"VerticalTilde;":8768,"VeryThinSpace;":8202,"bigtriangleup;":9651,"blacktriangle;":9652,"divideontimes;":8903,"fallingdotseq;":8786,"hookleftarrow;":8617,"leftarrowtail;":8610,"leftharpoonup;":8636,"longleftarrow;":10229,"looparrowleft;":8619,"measuredangle;":8737,"ntriangleleft;":8938,"shortparallel;":8741,"smallsetminus;":8726,"triangleright;":9657,"upharpoonleft;":8639,"varsubsetneqq;":10955,"varsupsetneqq;":10956,"DownArrowBar;":10515,"DownTeeArrow;":8615,"ExponentialE;":8519,"GreaterEqual;":8805,"GreaterTilde;":8819,"HilbertSpace;":8459,"HumpDownHump;":8782,"Intersection;":8898,"LeftArrowBar;":8676,"LeftTeeArrow;":8612,"LeftTriangle;":8882,"LeftUpVector;":8639,"NotCongruent;":8802,"NotHumpEqual;":8783,"NotLessEqual;":8816,"NotLessTilde;":8820,"Proportional;":8733,"RightCeiling;":8969,"RoundImplies;":10608,"ShortUpArrow;":8593,"SquareSubset;":8847,"UnderBracket;":9141,"VerticalLine;":124,"blacklozenge;":10731,"exponentiale;":8519,"risingdotseq;":8787,"triangledown;":9663,"triangleleft;":9667,"varsubsetneq;":8842,"varsupsetneq;":8843,"CircleMinus;":8854,"CircleTimes;":8855,"Equilibrium;":8652,"GreaterLess;":8823,"LeftCeiling;":8968,"LessGreater;":8822,"MediumSpace;":8287,"NotLessLess;":8810,"NotPrecedes;":8832,"NotSucceeds;":8833,"NotSuperset;":8835,"OverBracket;":9140,"RightVector;":8640,"Rrightarrow;":8667,"RuleDelayed;":10740,"SmallCircle;":8728,"SquareUnion;":8852,"SubsetEqual;":8838,"UpDownArrow;":8597,"Updownarrow;":8661,"VerticalBar;":8739,"backepsilon;":1014,"blacksquare;":9642,"circledcirc;":8858,"circleddash;":8861,"curlyeqprec;":8926,"curlyeqsucc;":8927,"diamondsuit;":9830,"eqslantless;":10901,"expectation;":8496,"nRightarrow;":8655,"nrightarrow;":8603,"preccurlyeq;":8828,"precnapprox;":10937,"quaternions;":8461,"straightphi;":981,"succcurlyeq;":8829,"succnapprox;":10938,"thickapprox;":8776,"updownarrow;":8597,"Bernoullis;":8492,"CirclePlus;":8853,"EqualTilde;":8770,"Fouriertrf;":8497,"ImaginaryI;":8520,"Laplacetrf;":8466,"LeftVector;":8636,"Lleftarrow;":8666,"NotElement;":8713,"NotGreater;":8815,"Proportion;":8759,"RightArrow;":8594,"RightFloor;":8971,"Rightarrow;":8658,"ThickSpace;":8287,"TildeEqual;":8771,"TildeTilde;":8776,"UnderBrace;":9183,"UpArrowBar;":10514,"UpTeeArrow;":8613,"circledast;":8859,"complement;":8705,"curlywedge;":8911,"eqslantgtr;":10902,"gtreqqless;":10892,"lessapprox;":10885,"lesseqqgtr;":10891,"lmoustache;":9136,"longmapsto;":10236,"mapstodown;":8615,"mapstoleft;":8612,"nLeftarrow;":8653,"nleftarrow;":8602,"nsubseteqq;":10949,"nsupseteqq;":10950,"precapprox;":10935,"rightarrow;":8594,"rmoustache;":9137,"sqsubseteq;":8849,"sqsupseteq;":8850,"subsetneqq;":10955,"succapprox;":10936,"supsetneqq;":10956,"upuparrows;":8648,"varepsilon;":1013,"varnothing;":8709,"Backslash;":8726,"CenterDot;":183,"CircleDot;":8857,"Congruent;":8801,"Coproduct;":8720,"DoubleDot;":168,"DownArrow;":8595,"DownBreve;":785,"Downarrow;":8659,"HumpEqual;":8783,"LeftArrow;":8592,"LeftFloor;":8970,"Leftarrow;":8656,"LessTilde;":8818,"Mellintrf;":8499,"MinusPlus;":8723,"NotCupCap;":8813,"NotExists;":8708,"NotSubset;":8834,"OverBrace;":9182,"PlusMinus;":177,"Therefore;":8756,"ThinSpace;":8201,"TripleDot;":8411,"UnionPlus;":8846,"backprime;":8245,"backsimeq;":8909,"bigotimes;":10754,"centerdot;":183,"checkmark;":10003,"complexes;":8450,"dotsquare;":8865,"downarrow;":8595,"gtrapprox;":10886,"gtreqless;":8923,"gvertneqq;":8809,"heartsuit;":9829,"leftarrow;":8592,"lesseqgtr;":8922,"lvertneqq;":8808,"ngeqslant;":10878,"nleqslant;":10877,"nparallel;":8742,"nshortmid;":8740,"nsubseteq;":8840,"nsupseteq;":8841,"pitchfork;":8916,"rationals;":8474,"spadesuit;":9824,"subseteqq;":10949,"subsetneq;":8842,"supseteqq;":10950,"supsetneq;":8843,"therefore;":8756,"triangleq;":8796,"varpropto;":8733,"DDotrahd;":10513,"DotEqual;":8784,"Integral;":8747,"LessLess;":10913,"NotEqual;":8800,"NotTilde;":8769,"PartialD;":8706,"Precedes;":8826,"RightTee;":8866,"Succeeds;":8827,"SuchThat;":8715,"Superset;":8835,"Uarrocir;":10569,"UnderBar;":95,"andslope;":10840,"angmsdaa;":10664,"angmsdab;":10665,"angmsdac;":10666,"angmsdad;":10667,"angmsdae;":10668,"angmsdaf;":10669,"angmsdag;":10670,"angmsdah;":10671,"angrtvbd;":10653,"approxeq;":8778,"awconint;":8755,"backcong;":8780,"barwedge;":8965,"bbrktbrk;":9142,"bigoplus;":10753,"bigsqcup;":10758,"biguplus;":10756,"bigwedge;":8896,"boxminus;":8863,"boxtimes;":8864,"bsolhsub;":10184,"capbrcup;":10825,"circledR;":174,"circledS;":9416,"cirfnint;":10768,"clubsuit;":9827,"cupbrcap;":10824,"curlyvee;":8910,"cwconint;":8754,"doteqdot;":8785,"dotminus;":8760,"drbkarow;":10512,"dzigrarr;":10239,"elinters;":9191,"emptyset;":8709,"eqvparsl;":10725,"fpartint;":10765,"geqslant;":10878,"gesdotol;":10884,"gnapprox;":10890,"hksearow;":10533,"hkswarow;":10534,"imagline;":8464,"imagpart;":8465,"infintie;":10717,"integers;":8484,"intercal;":8890,"intlarhk;":10775,"laemptyv;":10676,"ldrushar;":10571,"leqslant;":10877,"lesdotor;":10883,"llcorner;":8990,"lnapprox;":10889,"lrcorner;":8991,"lurdshar;":10570,"mapstoup;":8613,"multimap;":8888,"naturals;":8469,"ncongdot;":10861,"notindot;":8949,"otimesas;":10806,"parallel;":8741,"plusacir;":10787,"pointint;":10773,"precneqq;":10933,"precnsim;":8936,"profalar;":9006,"profline;":8978,"profsurf;":8979,"raemptyv;":10675,"realpart;":8476,"rppolint;":10770,"rtriltri;":10702,"scpolint;":10771,"setminus;":8726,"shortmid;":8739,"smeparsl;":10724,"sqsubset;":8847,"sqsupset;":8848,"subseteq;":8838,"succneqq;":10934,"succnsim;":8937,"supseteq;":8839,"thetasym;":977,"thicksim;":8764,"timesbar;":10801,"triangle;":9653,"triminus;":10810,"trpezium;":9186,"ulcorner;":8988,"urcorner;":8989,"varkappa;":1008,"varsigma;":962,"vartheta;":977,"Because;":8757,"Cayleys;":8493,"Cconint;":8752,"Cedilla;":184,"Diamond;":8900,"DownTee;":8868,"Element;":8712,"Epsilon;":917,"Implies;":8658,"LeftTee;":8867,"NewLine;":10,"NoBreak;":8288,"NotLess;":8814,"Omicron;":927,"OverBar;":8254,"Product;":8719,"UpArrow;":8593,"Uparrow;":8657,"Upsilon;":933,"alefsym;":8501,"angrtvb;":8894,"angzarr;":9084,"asympeq;":8781,"backsim;":8765,"because;":8757,"bemptyv;":10672,"between;":8812,"bigcirc;":9711,"bigodot;":10752,"bigstar;":9733,"bnequiv;":8801,"boxplus;":8862,"ccupssm;":10832,"cemptyv;":10674,"cirscir;":10690,"coloneq;":8788,"congdot;":10861,"cudarrl;":10552,"cudarrr;":10549,"cularrp;":10557,"curarrm;":10556,"dbkarow;":10511,"ddagger;":8225,"ddotseq;":10871,"demptyv;":10673,"diamond;":8900,"digamma;":989,"dotplus;":8724,"dwangle;":10662,"epsilon;":949,"eqcolon;":8789,"equivDD;":10872,"gesdoto;":10882,"gtquest;":10876,"gtrless;":8823,"harrcir;":10568,"intprod;":10812,"isindot;":8949,"larrbfs;":10527,"larrsim;":10611,"lbrksld;":10639,"lbrkslu;":10637,"ldrdhar;":10599,"lesdoto;":10881,"lessdot;":8918,"lessgtr;":8822,"lesssim;":8818,"lotimes;":10804,"lozenge;":9674,"ltquest;":10875,"luruhar;":10598,"maltese;":10016,"minusdu;":10794,"napprox;":8777,"natural;":9838,"nearrow;":8599,"nexists;":8708,"notinva;":8713,"notinvb;":8951,"notinvc;":8950,"notniva;":8716,"notnivb;":8958,"notnivc;":8957,"npolint;":10772,"npreceq;":10927,"nsqsube;":8930,"nsqsupe;":8931,"nsubset;":8834,"nsucceq;":10928,"nsupset;":8835,"nvinfin;":10718,"nvltrie;":8884,"nvrtrie;":8885,"nwarrow;":8598,"olcross;":10683,"omicron;":959,"orderof;":8500,"orslope;":10839,"pertenk;":8241,"planckh;":8462,"pluscir;":10786,"plussim;":10790,"plustwo;":10791,"precsim;":8830,"quatint;":10774,"questeq;":8799,"rarrbfs;":10528,"rarrsim;":10612,"rbrksld;":10638,"rbrkslu;":10640,"rdldhar;":10601,"realine;":8475,"rotimes;":10805,"ruluhar;":10600,"searrow;":8600,"simplus;":10788,"simrarr;":10610,"subedot;":10947,"submult;":10945,"subplus;":10943,"subrarr;":10617,"succsim;":8831,"supdsub;":10968,"supedot;":10948,"suphsol;":10185,"suphsub;":10967,"suplarr;":10619,"supmult;":10946,"supplus;":10944,"swarrow;":8601,"topfork;":10970,"triplus;":10809,"tritime;":10811,"uparrow;":8593,"upsilon;":965,"uwangle;":10663,"vzigzag;":10650,"zigrarr;":8669,"Aacute;":193,"Abreve;":258,"Agrave;":192,"Assign;":8788,"Atilde;":195,"Barwed;":8966,"Bumpeq;":8782,"Cacute;":262,"Ccaron;":268,"Ccedil;":199,"Colone;":10868,"Conint;":8751,"CupCap;":8781,"Dagger;":8225,"Dcaron;":270,"DotDot;":8412,"Dstrok;":272,"Eacute;":201,"Ecaron;":282,"Egrave;":200,"Exists;":8707,"ForAll;":8704,"Gammad;":988,"Gbreve;":286,"Gcedil;":290,"HARDcy;":1066,"Hstrok;":294,"Iacute;":205,"Igrave;":204,"Itilde;":296,"Jsercy;":1032,"Kcedil;":310,"Lacute;":313,"Lambda;":923,"Lcaron;":317,"Lcedil;":315,"Lmidot;":319,"Lstrok;":321,"Nacute;":323,"Ncaron;":327,"Ncedil;":325,"Ntilde;":209,"Oacute;":211,"Odblac;":336,"Ograve;":210,"Oslash;":216,"Otilde;":213,"Otimes;":10807,"Racute;":340,"Rarrtl;":10518,"Rcaron;":344,"Rcedil;":342,"SHCHcy;":1065,"SOFTcy;":1068,"Sacute;":346,"Scaron;":352,"Scedil;":350,"Square;":9633,"Subset;":8912,"Supset;":8913,"Tcaron;":356,"Tcedil;":354,"Tstrok;":358,"Uacute;":218,"Ubreve;":364,"Udblac;":368,"Ugrave;":217,"Utilde;":360,"Vdashl;":10982,"Verbar;":8214,"Vvdash;":8874,"Yacute;":221,"Zacute;":377,"Zcaron;":381,"aacute;":225,"abreve;":259,"agrave;":224,"andand;":10837,"angmsd;":8737,"angsph;":8738,"apacir;":10863,"approx;":8776,"atilde;":227,"barvee;":8893,"barwed;":8965,"becaus;":8757,"bernou;":8492,"bigcap;":8898,"bigcup;":8899,"bigvee;":8897,"bkarow;":10509,"bottom;":8869,"bowtie;":8904,"boxbox;":10697,"bprime;":8245,"brvbar;":166,"bullet;":8226,"bumpeq;":8783,"cacute;":263,"capand;":10820,"capcap;":10827,"capcup;":10823,"capdot;":10816,"ccaron;":269,"ccedil;":231,"circeq;":8791,"cirmid;":10991,"colone;":8788,"commat;":64,"compfn;":8728,"conint;":8750,"coprod;":8720,"copysr;":8471,"cularr;":8630,"cupcap;":10822,"cupcup;":10826,"cupdot;":8845,"curarr;":8631,"curren;":164,"cylcty;":9005,"dagger;":8224,"daleth;":8504,"dcaron;":271,"dfisht;":10623,"divide;":247,"divonx;":8903,"dlcorn;":8990,"dlcrop;":8973,"dollar;":36,"drcorn;":8991,"drcrop;":8972,"dstrok;":273,"eacute;":233,"easter;":10862,"ecaron;":283,"ecolon;":8789,"egrave;":232,"egsdot;":10904,"elsdot;":10903,"emptyv;":8709,"emsp13;":8196,"emsp14;":8197,"eparsl;":10723,"eqcirc;":8790,"equals;":61,"equest;":8799,"female;":9792,"ffilig;":64259,"ffllig;":64260,"forall;":8704,"frac12;":189,"frac13;":8531,"frac14;":188,"frac15;":8533,"frac16;":8537,"frac18;":8539,"frac23;":8532,"frac25;":8534,"frac34;":190,"frac35;":8535,"frac38;":8540,"frac45;":8536,"frac56;":8538,"frac58;":8541,"frac78;":8542,"gacute;":501,"gammad;":989,"gbreve;":287,"gesdot;":10880,"gesles;":10900,"gtlPar;":10645,"gtrarr;":10616,"gtrdot;":8919,"gtrsim;":8819,"hairsp;":8202,"hamilt;":8459,"hardcy;":1098,"hearts;":9829,"hellip;":8230,"hercon;":8889,"homtht;":8763,"horbar;":8213,"hslash;":8463,"hstrok;":295,"hybull;":8259,"hyphen;":8208,"iacute;":237,"igrave;":236,"iiiint;":10764,"iinfin;":10716,"incare;":8453,"inodot;":305,"intcal;":8890,"iquest;":191,"isinsv;":8947,"itilde;":297,"jsercy;":1112,"kappav;":1008,"kcedil;":311,"kgreen;":312,"lAtail;":10523,"lacute;":314,"lagran;":8466,"lambda;":955,"langle;":10216,"larrfs;":10525,"larrhk;":8617,"larrlp;":8619,"larrpl;":10553,"larrtl;":8610,"latail;":10521,"lbrace;":123,"lbrack;":91,"lcaron;":318,"lcedil;":316,"ldquor;":8222,"lesdot;":10879,"lesges;":10899,"lfisht;":10620,"lfloor;":8970,"lharul;":10602,"llhard;":10603,"lmidot;":320,"lmoust;":9136,"loplus;":10797,"lowast;":8727,"lowbar;":95,"lparlt;":10643,"lrhard;":10605,"lsaquo;":8249,"lsquor;":8218,"lstrok;":322,"lthree;":8907,"ltimes;":8905,"ltlarr;":10614,"ltrPar;":10646,"mapsto;":8614,"marker;":9646,"mcomma;":10793,"midast;":42,"midcir;":10992,"middot;":183,"minusb;":8863,"minusd;":8760,"mnplus;":8723,"models;":8871,"mstpos;":8766,"nVDash;":8879,"nVdash;":8878,"nacute;":324,"nbumpe;":8783,"ncaron;":328,"ncedil;":326,"nearhk;":10532,"nequiv;":8802,"nesear;":10536,"nexist;":8708,"nltrie;":8940,"notinE;":8953,"nparsl;":11005,"nprcue;":8928,"nrarrc;":10547,"nrarrw;":8605,"nrtrie;":8941,"nsccue;":8929,"nsimeq;":8772,"ntilde;":241,"numero;":8470,"nvDash;":8877,"nvHarr;":10500,"nvdash;":8876,"nvlArr;":10498,"nvrArr;":10499,"nwarhk;":10531,"nwnear;":10535,"oacute;":243,"odblac;":337,"odsold;":10684,"ograve;":242,"ominus;":8854,"origof;":8886,"oslash;":248,"otilde;":245,"otimes;":8855,"parsim;":10995,"percnt;":37,"period;":46,"permil;":8240,"phmmat;":8499,"planck;":8463,"plankv;":8463,"plusdo;":8724,"plusdu;":10789,"plusmn;":177,"preceq;":10927,"primes;":8473,"prnsim;":8936,"propto;":8733,"prurel;":8880,"puncsp;":8200,"qprime;":8279,"rAtail;":10524,"racute;":341,"rangle;":10217,"rarrap;":10613,"rarrfs;":10526,"rarrhk;":8618,"rarrlp;":8620,"rarrpl;":10565,"rarrtl;":8611,"ratail;":10522,"rbrace;":125,"rbrack;":93,"rcaron;":345,"rcedil;":343,"rdquor;":8221,"rfisht;":10621,"rfloor;":8971,"rharul;":10604,"rmoust;":9137,"roplus;":10798,"rpargt;":10644,"rsaquo;":8250,"rsquor;":8217,"rthree;":8908,"rtimes;":8906,"sacute;":347,"scaron;":353,"scedil;":351,"scnsim;":8937,"searhk;":10533,"seswar;":10537,"sfrown;":8994,"shchcy;":1097,"sigmaf;":962,"sigmav;":962,"simdot;":10858,"smashp;":10803,"softcy;":1100,"solbar;":9023,"spades;":9824,"sqcaps;":8851,"sqcups;":8852,"sqsube;":8849,"sqsupe;":8850,"square;":9633,"squarf;":9642,"ssetmn;":8726,"ssmile;":8995,"sstarf;":8902,"subdot;":10941,"subset;":8834,"subsim;":10951,"subsub;":10965,"subsup;":10963,"succeq;":10928,"supdot;":10942,"supset;":8835,"supsim;":10952,"supsub;":10964,"supsup;":10966,"swarhk;":10534,"swnwar;":10538,"target;":8982,"tcaron;":357,"tcedil;":355,"telrec;":8981,"there4;":8756,"thetav;":977,"thinsp;":8201,"thksim;":8764,"timesb;":8864,"timesd;":10800,"topbot;":9014,"topcir;":10993,"tprime;":8244,"tridot;":9708,"tstrok;":359,"uacute;":250,"ubreve;":365,"udblac;":369,"ufisht;":10622,"ugrave;":249,"ulcorn;":8988,"ulcrop;":8975,"urcorn;":8989,"urcrop;":8974,"utilde;":361,"vangrt;":10652,"varphi;":981,"varrho;":1009,"veebar;":8891,"vellip;":8942,"verbar;":124,"vsubnE;":10955,"vsubne;":8842,"vsupnE;":10956,"vsupne;":8843,"wedbar;":10847,"wedgeq;":8793,"weierp;":8472,"wreath;":8768,"xoplus;":10753,"xotime;":10754,"xsqcup;":10758,"xuplus;":10756,"xwedge;":8896,"yacute;":253,"zacute;":378,"zcaron;":382,"zeetrf;":8488,"AElig;":198,Aacute:193,"Acirc;":194,Agrave:192,"Alpha;":913,"Amacr;":256,"Aogon;":260,"Aring;":197,Atilde:195,"Breve;":728,Ccedil:199,"Ccirc;":264,"Colon;":8759,"Cross;":10799,"Dashv;":10980,"Delta;":916,Eacute:201,"Ecirc;":202,Egrave:200,"Emacr;":274,"Eogon;":280,"Equal;":10869,"Gamma;":915,"Gcirc;":284,"Hacek;":711,"Hcirc;":292,"IJlig;":306,Iacute:205,"Icirc;":206,Igrave:204,"Imacr;":298,"Iogon;":302,"Iukcy;":1030,"Jcirc;":308,"Jukcy;":1028,"Kappa;":922,Ntilde:209,"OElig;":338,Oacute:211,"Ocirc;":212,Ograve:210,"Omacr;":332,"Omega;":937,Oslash:216,Otilde:213,"Prime;":8243,"RBarr;":10512,"Scirc;":348,"Sigma;":931,"THORN;":222,"TRADE;":8482,"TSHcy;":1035,"Theta;":920,"Tilde;":8764,Uacute:218,"Ubrcy;":1038,"Ucirc;":219,Ugrave:217,"Umacr;":362,"Union;":8899,"Uogon;":370,"UpTee;":8869,"Uring;":366,"VDash;":8875,"Vdash;":8873,"Wcirc;":372,"Wedge;":8896,Yacute:221,"Ycirc;":374,aacute:225,"acirc;":226,"acute;":180,"aelig;":230,agrave:224,"aleph;":8501,"alpha;":945,"amacr;":257,"amalg;":10815,"angle;":8736,"angrt;":8735,"angst;":197,"aogon;":261,"aring;":229,"asymp;":8776,atilde:227,"awint;":10769,"bcong;":8780,"bdquo;":8222,"bepsi;":1014,"blank;":9251,"blk12;":9618,"blk14;":9617,"blk34;":9619,"block;":9608,"boxDL;":9559,"boxDR;":9556,"boxDl;":9558,"boxDr;":9555,"boxHD;":9574,"boxHU;":9577,"boxHd;":9572,"boxHu;":9575,"boxUL;":9565,"boxUR;":9562,"boxUl;":9564,"boxUr;":9561,"boxVH;":9580,"boxVL;":9571,"boxVR;":9568,"boxVh;":9579,"boxVl;":9570,"boxVr;":9567,"boxdL;":9557,"boxdR;":9554,"boxdl;":9488,"boxdr;":9484,"boxhD;":9573,"boxhU;":9576,"boxhd;":9516,"boxhu;":9524,"boxuL;":9563,"boxuR;":9560,"boxul;":9496,"boxur;":9492,"boxvH;":9578,"boxvL;":9569,"boxvR;":9566,"boxvh;":9532,"boxvl;":9508,"boxvr;":9500,"breve;":728,brvbar:166,"bsemi;":8271,"bsime;":8909,"bsolb;":10693,"bumpE;":10926,"bumpe;":8783,"caret;":8257,"caron;":711,"ccaps;":10829,ccedil:231,"ccirc;":265,"ccups;":10828,"cedil;":184,"check;":10003,"clubs;":9827,"colon;":58,"comma;":44,"crarr;":8629,"cross;":10007,"csube;":10961,"csupe;":10962,"ctdot;":8943,"cuepr;":8926,"cuesc;":8927,"cupor;":10821,curren:164,"cuvee;":8910,"cuwed;":8911,"cwint;":8753,"dashv;":8867,"dblac;":733,"ddarr;":8650,"delta;":948,"dharl;":8643,"dharr;":8642,"diams;":9830,"disin;":8946,divide:247,"doteq;":8784,"dtdot;":8945,"dtrif;":9662,"duarr;":8693,"duhar;":10607,"eDDot;":10871,eacute:233,"ecirc;":234,"efDot;":8786,egrave:232,"emacr;":275,"empty;":8709,"eogon;":281,"eplus;":10865,"epsiv;":1013,"eqsim;":8770,"equiv;":8801,"erDot;":8787,"erarr;":10609,"esdot;":8784,"exist;":8707,"fflig;":64256,"filig;":64257,"fjlig;":102,"fllig;":64258,"fltns;":9649,"forkv;":10969,frac12:189,frac14:188,frac34:190,"frasl;":8260,"frown;":8994,"gamma;":947,"gcirc;":285,"gescc;":10921,"gimel;":8503,"gneqq;":8809,"gnsim;":8935,"grave;":96,"gsime;":10894,"gsiml;":10896,"gtcir;":10874,"gtdot;":8919,"harrw;":8621,"hcirc;":293,"hoarr;":8703,iacute:237,"icirc;":238,"iexcl;":161,igrave:236,"iiint;":8749,"iiota;":8489,"ijlig;":307,"imacr;":299,"image;":8465,"imath;":305,"imped;":437,"infin;":8734,"iogon;":303,"iprod;":10812,iquest:191,"isinE;":8953,"isins;":8948,"isinv;":8712,"iukcy;":1110,"jcirc;":309,"jmath;":567,"jukcy;":1108,"kappa;":954,"lAarr;":8666,"lBarr;":10510,"langd;":10641,"laquo;":171,"larrb;":8676,"lates;":10925,"lbarr;":10508,"lbbrk;":10098,"lbrke;":10635,"lceil;":8968,"ldquo;":8220,"lescc;":10920,"lhard;":8637,"lharu;":8636,"lhblk;":9604,"llarr;":8647,"lltri;":9722,"lneqq;":8808,"lnsim;":8934,"loang;":10220,"loarr;":8701,"lobrk;":10214,"lopar;":10629,"lrarr;":8646,"lrhar;":8651,"lrtri;":8895,"lsime;":10893,"lsimg;":10895,"lsquo;":8216,"ltcir;":10873,"ltdot;":8918,"ltrie;":8884,"ltrif;":9666,"mDDot;":8762,"mdash;":8212,"micro;":181,middot:183,"minus;":8722,"mumap;":8888,"nabla;":8711,"napid;":8779,"napos;":329,"natur;":9838,"nbump;":8782,"ncong;":8775,"ndash;":8211,"neArr;":8663,"nearr;":8599,"nedot;":8784,"nesim;":8770,"ngeqq;":8807,"ngsim;":8821,"nhArr;":8654,"nharr;":8622,"nhpar;":10994,"nlArr;":8653,"nlarr;":8602,"nleqq;":8806,"nless;":8814,"nlsim;":8820,"nltri;":8938,"notin;":8713,"notni;":8716,"npart;":8706,"nprec;":8832,"nrArr;":8655,"nrarr;":8603,"nrtri;":8939,"nsime;":8772,"nsmid;":8740,"nspar;":8742,"nsubE;":10949,"nsube;":8840,"nsucc;":8833,"nsupE;":10950,"nsupe;":8841,ntilde:241,"numsp;":8199,"nvsim;":8764,"nwArr;":8662,"nwarr;":8598,oacute:243,"ocirc;":244,"odash;":8861,"oelig;":339,"ofcir;":10687,ograve:242,"ohbar;":10677,"olarr;":8634,"olcir;":10686,"oline;":8254,"omacr;":333,"omega;":969,"operp;":10681,"oplus;":8853,"orarr;":8635,"order;":8500,oslash:248,otilde:245,"ovbar;":9021,"parsl;":11005,"phone;":9742,"plusb;":8862,"pluse;":10866,plusmn:177,"pound;":163,"prcue;":8828,"prime;":8242,"prnap;":10937,"prsim;":8830,"quest;":63,"rAarr;":8667,"rBarr;":10511,"radic;":8730,"rangd;":10642,"range;":10661,"raquo;":187,"rarrb;":8677,"rarrc;":10547,"rarrw;":8605,"ratio;":8758,"rbarr;":10509,"rbbrk;":10099,"rbrke;":10636,"rceil;":8969,"rdquo;":8221,"reals;":8477,"rhard;":8641,"rharu;":8640,"rlarr;":8644,"rlhar;":8652,"rnmid;":10990,"roang;":10221,"roarr;":8702,"robrk;":10215,"ropar;":10630,"rrarr;":8649,"rsquo;":8217,"rtrie;":8885,"rtrif;":9656,"sbquo;":8218,"sccue;":8829,"scirc;":349,"scnap;":10938,"scsim;":8831,"sdotb;":8865,"sdote;":10854,"seArr;":8664,"searr;":8600,"setmn;":8726,"sharp;":9839,"sigma;":963,"simeq;":8771,"simgE;":10912,"simlE;":10911,"simne;":8774,"slarr;":8592,"smile;":8995,"smtes;":10924,"sqcap;":8851,"sqcup;":8852,"sqsub;":8847,"sqsup;":8848,"srarr;":8594,"starf;":9733,"strns;":175,"subnE;":10955,"subne;":8842,"supnE;":10956,"supne;":8843,"swArr;":8665,"swarr;":8601,"szlig;":223,"theta;":952,"thkap;":8776,"thorn;":254,"tilde;":732,"times;":215,"trade;":8482,"trisb;":10701,"tshcy;":1115,"twixt;":8812,uacute:250,"ubrcy;":1118,"ucirc;":251,"udarr;":8645,"udhar;":10606,ugrave:249,"uharl;":8639,"uharr;":8638,"uhblk;":9600,"ultri;":9720,"umacr;":363,"uogon;":371,"uplus;":8846,"upsih;":978,"uring;":367,"urtri;":9721,"utdot;":8944,"utrif;":9652,"uuarr;":8648,"vBarv;":10985,"vDash;":8872,"varpi;":982,"vdash;":8866,"veeeq;":8794,"vltri;":8882,"vnsub;":8834,"vnsup;":8835,"vprop;":8733,"vrtri;":8883,"wcirc;":373,"wedge;":8743,"xcirc;":9711,"xdtri;":9661,"xhArr;":10234,"xharr;":10231,"xlArr;":10232,"xlarr;":10229,"xodot;":10752,"xrArr;":10233,"xrarr;":10230,"xutri;":9651,yacute:253,"ycirc;":375,AElig:198,Acirc:194,"Aopf;":120120,Aring:197,"Ascr;":119964,"Auml;":196,"Barv;":10983,"Beta;":914,"Bopf;":120121,"Bscr;":8492,"CHcy;":1063,"COPY;":169,"Cdot;":266,"Copf;":8450,"Cscr;":119966,"DJcy;":1026,"DScy;":1029,"DZcy;":1039,"Darr;":8609,"Dopf;":120123,"Dscr;":119967,Ecirc:202,"Edot;":278,"Eopf;":120124,"Escr;":8496,"Esim;":10867,"Euml;":203,"Fopf;":120125,"Fscr;":8497,"GJcy;":1027,"Gdot;":288,"Gopf;":120126,"Gscr;":119970,"Hopf;":8461,"Hscr;":8459,"IEcy;":1045,"IOcy;":1025,Icirc:206,"Idot;":304,"Iopf;":120128,"Iota;":921,"Iscr;":8464,"Iuml;":207,"Jopf;":120129,"Jscr;":119973,"KHcy;":1061,"KJcy;":1036,"Kopf;":120130,"Kscr;":119974,"LJcy;":1033,"Lang;":10218,"Larr;":8606,"Lopf;":120131,"Lscr;":8466,"Mopf;":120132,"Mscr;":8499,"NJcy;":1034,"Nopf;":8469,"Nscr;":119977,Ocirc:212,"Oopf;":120134,"Oscr;":119978,"Ouml;":214,"Popf;":8473,"Pscr;":119979,"QUOT;":34,"Qopf;":8474,"Qscr;":119980,"Rang;":10219,"Rarr;":8608,"Ropf;":8477,"Rscr;":8475,"SHcy;":1064,"Sopf;":120138,"Sqrt;":8730,"Sscr;":119982,"Star;":8902,THORN:222,"TScy;":1062,"Topf;":120139,"Tscr;":119983,"Uarr;":8607,Ucirc:219,"Uopf;":120140,"Upsi;":978,"Uscr;":119984,"Uuml;":220,"Vbar;":10987,"Vert;":8214,"Vopf;":120141,"Vscr;":119985,"Wopf;":120142,"Wscr;":119986,"Xopf;":120143,"Xscr;":119987,"YAcy;":1071,"YIcy;":1031,"YUcy;":1070,"Yopf;":120144,"Yscr;":119988,"Yuml;":376,"ZHcy;":1046,"Zdot;":379,"Zeta;":918,"Zopf;":8484,"Zscr;":119989,acirc:226,acute:180,aelig:230,"andd;":10844,"andv;":10842,"ange;":10660,"aopf;":120146,"apid;":8779,"apos;":39,aring:229,"ascr;":119990,"auml;":228,"bNot;":10989,"bbrk;":9141,"beta;":946,"beth;":8502,"bnot;":8976,"bopf;":120147,"boxH;":9552,"boxV;":9553,"boxh;":9472,"boxv;":9474,"bscr;":119991,"bsim;":8765,"bsol;":92,"bull;":8226,"bump;":8782,"caps;":8745,"cdot;":267,cedil:184,"cent;":162,"chcy;":1095,"cirE;":10691,"circ;":710,"cire;":8791,"comp;":8705,"cong;":8773,"copf;":120148,"copy;":169,"cscr;":119992,"csub;":10959,"csup;":10960,"cups;":8746,"dArr;":8659,"dHar;":10597,"darr;":8595,"dash;":8208,"diam;":8900,"djcy;":1106,"dopf;":120149,"dscr;":119993,"dscy;":1109,"dsol;":10742,"dtri;":9663,"dzcy;":1119,"eDot;":8785,"ecir;":8790,ecirc:234,"edot;":279,"emsp;":8195,"ensp;":8194,"eopf;":120150,"epar;":8917,"epsi;":949,"escr;":8495,"esim;":8770,"euml;":235,"euro;":8364,"excl;":33,"flat;":9837,"fnof;":402,"fopf;":120151,"fork;":8916,"fscr;":119995,"gdot;":289,"geqq;":8807,"gesl;":8923,"gjcy;":1107,"gnap;":10890,"gneq;":10888,"gopf;":120152,"gscr;":8458,"gsim;":8819,"gtcc;":10919,"gvnE;":8809,"hArr;":8660,"half;":189,"harr;":8596,"hbar;":8463,"hopf;":120153,"hscr;":119997,icirc:238,"iecy;":1077,iexcl:161,"imof;":8887,"iocy;":1105,"iopf;":120154,"iota;":953,"iscr;":119998,"isin;":8712,"iuml;":239,"jopf;":120155,"jscr;":119999,"khcy;":1093,"kjcy;":1116,"kopf;":120156,"kscr;":120000,"lArr;":8656,"lHar;":10594,"lang;":10216,laquo:171,"larr;":8592,"late;":10925,"lcub;":123,"ldca;":10550,"ldsh;":8626,"leqq;":8806,"lesg;":8922,"ljcy;":1113,"lnap;":10889,"lneq;":10887,"lopf;":120157,"lozf;":10731,"lpar;":40,"lscr;":120001,"lsim;":8818,"lsqb;":91,"ltcc;":10918,"ltri;":9667,"lvnE;":8808,"macr;":175,"male;":9794,"malt;":10016,micro:181,"mlcp;":10971,"mldr;":8230,"mopf;":120158,"mscr;":120002,"nGtv;":8811,"nLtv;":8810,"nang;":8736,"napE;":10864,"nbsp;":160,"ncap;":10819,"ncup;":10818,"ngeq;":8817,"nges;":10878,"ngtr;":8815,"nisd;":8954,"njcy;":1114,"nldr;":8229,"nleq;":8816,"nles;":10877,"nmid;":8740,"nopf;":120159,"npar;":8742,"npre;":10927,"nsce;":10928,"nscr;":120003,"nsim;":8769,"nsub;":8836,"nsup;":8837,"ntgl;":8825,"ntlg;":8824,"nvap;":8781,"nvge;":8805,"nvgt;":62,"nvle;":8804,"nvlt;":60,"oast;":8859,"ocir;":8858,ocirc:244,"odiv;":10808,"odot;":8857,"ogon;":731,"oint;":8750,"omid;":10678,"oopf;":120160,"opar;":10679,"ordf;":170,"ordm;":186,"oror;":10838,"oscr;":8500,"osol;":8856,"ouml;":246,"para;":182,"part;":8706,"perp;":8869,"phiv;":981,"plus;":43,"popf;":120161,pound:163,"prap;":10935,"prec;":8826,"prnE;":10933,"prod;":8719,"prop;":8733,"pscr;":120005,"qint;":10764,"qopf;":120162,"qscr;":120006,"quot;":34,"rArr;":8658,"rHar;":10596,"race;":8765,"rang;":10217,raquo:187,"rarr;":8594,"rcub;":125,"rdca;":10551,"rdsh;":8627,"real;":8476,"rect;":9645,"rhov;":1009,"ring;":730,"ropf;":120163,"rpar;":41,"rscr;":120007,"rsqb;":93,"rtri;":9657,"scap;":10936,"scnE;":10934,"sdot;":8901,"sect;":167,"semi;":59,"sext;":10038,"shcy;":1096,"sime;":8771,"simg;":10910,"siml;":10909,"smid;":8739,"smte;":10924,"solb;":10692,"sopf;":120164,"spar;":8741,"squf;":9642,"sscr;":120008,"star;":9734,"subE;":10949,"sube;":8838,"succ;":8827,"sung;":9834,"sup1;":185,"sup2;":178,"sup3;":179,"supE;":10950,"supe;":8839,szlig:223,"tbrk;":9140,"tdot;":8411,thorn:254,times:215,"tint;":8749,"toea;":10536,"topf;":120165,"tosa;":10537,"trie;":8796,"tscr;":120009,"tscy;":1094,"uArr;":8657,"uHar;":10595,"uarr;":8593,ucirc:251,"uopf;":120166,"upsi;":965,"uscr;":120010,"utri;":9653,"uuml;":252,"vArr;":8661,"vBar;":10984,"varr;":8597,"vert;":124,"vopf;":120167,"vscr;":120011,"wopf;":120168,"wscr;":120012,"xcap;":8898,"xcup;":8899,"xmap;":10236,"xnis;":8955,"xopf;":120169,"xscr;":120013,"xvee;":8897,"yacy;":1103,"yicy;":1111,"yopf;":120170,"yscr;":120014,"yucy;":1102,"yuml;":255,"zdot;":380,"zeta;":950,"zhcy;":1078,"zopf;":120171,"zscr;":120015,"zwnj;":8204,"AMP;":38,"Acy;":1040,"Afr;":120068,"And;":10835,Auml:196,"Bcy;":1041,"Bfr;":120069,COPY:169,"Cap;":8914,"Cfr;":8493,"Chi;":935,"Cup;":8915,"Dcy;":1044,"Del;":8711,"Dfr;":120071,"Dot;":168,"ENG;":330,"ETH;":208,"Ecy;":1069,"Efr;":120072,"Eta;":919,Euml:203,"Fcy;":1060,"Ffr;":120073,"Gcy;":1043,"Gfr;":120074,"Hat;":94,"Hfr;":8460,"Icy;":1048,"Ifr;":8465,"Int;":8748,Iuml:207,"Jcy;":1049,"Jfr;":120077,"Kcy;":1050,"Kfr;":120078,"Lcy;":1051,"Lfr;":120079,"Lsh;":8624,"Map;":10501,"Mcy;":1052,"Mfr;":120080,"Ncy;":1053,"Nfr;":120081,"Not;":10988,"Ocy;":1054,"Ofr;":120082,Ouml:214,"Pcy;":1055,"Pfr;":120083,"Phi;":934,"Psi;":936,QUOT:34,"Qfr;":120084,"REG;":174,"Rcy;":1056,"Rfr;":8476,"Rho;":929,"Rsh;":8625,"Scy;":1057,"Sfr;":120086,"Sub;":8912,"Sum;":8721,"Sup;":8913,"Tab;":9,"Tau;":932,"Tcy;":1058,"Tfr;":120087,"Ucy;":1059,"Ufr;":120088,Uuml:220,"Vcy;":1042,"Vee;":8897,"Vfr;":120089,"Wfr;":120090,"Xfr;":120091,"Ycy;":1067,"Yfr;":120092,"Zcy;":1047,"Zfr;":8488,"acE;":8766,"acd;":8767,"acy;":1072,"afr;":120094,"amp;":38,"and;":8743,"ang;":8736,"apE;":10864,"ape;":8778,"ast;":42,auml:228,"bcy;":1073,"bfr;":120095,"bne;":61,"bot;":8869,"cap;":8745,cent:162,"cfr;":120096,"chi;":967,"cir;":9675,copy:169,"cup;":8746,"dcy;":1076,"deg;":176,"dfr;":120097,"die;":168,"div;":247,"dot;":729,"ecy;":1101,"efr;":120098,"egs;":10902,"ell;":8467,"els;":10901,"eng;":331,"eta;":951,"eth;":240,euml:235,"fcy;":1092,"ffr;":120099,"gEl;":10892,"gap;":10886,"gcy;":1075,"gel;":8923,"geq;":8805,"ges;":10878,"gfr;":120100,"ggg;":8921,"glE;":10898,"gla;":10917,"glj;":10916,"gnE;":8809,"gne;":10888,"hfr;":120101,"icy;":1080,"iff;":8660,"ifr;":120102,"int;":8747,iuml:239,"jcy;":1081,"jfr;":120103,"kcy;":1082,"kfr;":120104,"lEg;":10891,"lap;":10885,"lat;":10923,"lcy;":1083,"leg;":8922,"leq;":8804,"les;":10877,"lfr;":120105,"lgE;":10897,"lnE;":8808,"lne;":10887,"loz;":9674,"lrm;":8206,"lsh;":8624,macr:175,"map;":8614,"mcy;":1084,"mfr;":120106,"mho;":8487,"mid;":8739,"nGg;":8921,"nGt;":8811,"nLl;":8920,"nLt;":8810,"nap;":8777,nbsp:160,"ncy;":1085,"nfr;":120107,"ngE;":8807,"nge;":8817,"ngt;":8815,"nis;":8956,"niv;":8715,"nlE;":8806,"nle;":8816,"nlt;":8814,"not;":172,"npr;":8832,"nsc;":8833,"num;":35,"ocy;":1086,"ofr;":120108,"ogt;":10689,"ohm;":937,"olt;":10688,"ord;":10845,ordf:170,ordm:186,"orv;":10843,ouml:246,"par;":8741,para:182,"pcy;":1087,"pfr;":120109,"phi;":966,"piv;":982,"prE;":10931,"pre;":10927,"psi;":968,"qfr;":120110,quot:34,"rcy;":1088,"reg;":174,"rfr;":120111,"rho;":961,"rlm;":8207,"rsh;":8625,"scE;":10932,"sce;":10928,"scy;":1089,sect:167,"sfr;":120112,"shy;":173,"sim;":8764,"smt;":10922,"sol;":47,"squ;":9633,"sub;":8834,"sum;":8721,sup1:185,sup2:178,sup3:179,"sup;":8835,"tau;":964,"tcy;":1090,"tfr;":120113,"top;":8868,"ucy;":1091,"ufr;":120114,"uml;":168,uuml:252,"vcy;":1074,"vee;":8744,"vfr;":120115,"wfr;":120116,"xfr;":120117,"ycy;":1099,"yen;":165,"yfr;":120118,yuml:255,"zcy;":1079,"zfr;":120119,"zwj;":8205,AMP:38,"DD;":8517,ETH:208,"GT;":62,"Gg;":8921,"Gt;":8811,"Im;":8465,"LT;":60,"Ll;":8920,"Lt;":8810,"Mu;":924,"Nu;":925,"Or;":10836,"Pi;":928,"Pr;":10939,REG:174,"Re;":8476,"Sc;":10940,"Xi;":926,"ac;":8766,"af;":8289,amp:38,"ap;":8776,"dd;":8518,deg:176,"ee;":8519,"eg;":10906,"el;":10905,eth:240,"gE;":8807,"ge;":8805,"gg;":8811,"gl;":8823,"gt;":62,"ic;":8291,"ii;":8520,"in;":8712,"it;":8290,"lE;":8806,"le;":8804,"lg;":8822,"ll;":8810,"lt;":60,"mp;":8723,"mu;":956,"ne;":8800,"ni;":8715,not:172,"nu;":957,"oS;":9416,"or;":8744,"pi;":960,"pm;":177,"pr;":8826,reg:174,"rx;":8478,"sc;":8827,shy:173,uml:168,"wp;":8472,"wr;":8768,"xi;":958,yen:165,GT:62,LT:60,gt:62,lt:60},pn=qp;var Hp=[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];function Up(e,t){if(t&&!e.endsWith(";"))return`${e}\\b(?!=)`;return e}function Us(e){let r=Object.keys(pn).map((n)=>Up(n,e));return new RegExp(`&(#(?:x[a-fA-F\\d]+|\\d+)(?:;)?|${r.join("|")})`,"g")}var ln,un;function Gp(e){if(e){if(!un)un=Us(!0);return un}if(!ln)ln=Us(!1);return ln}var Gs=0;function Wp(e){if(e===10)return 32;if(e<128)return e;if(e<=159)return Hp[e-128];if(e<55296)return e;if(e<=57343)return Gs;if(e<=65535)return e;if(e>=65536&&e<=131071)return e;if(e>=131072&&e<=196607)return e;if(e>=917504&&e<=917631||e>=917760&&e<=917999)return e;return Gs}function hn(e,t){if(e.indexOf("&")===-1)return e;return e.replace(Gp(t),(r,n)=>{let i;if(n[0]!=="#")i=pn[n];else if(n[1]==="x")i=Number.parseInt(n.substring(2),16);else i=Number.parseInt(n.substring(1),10);if(!i)return r;return String.fromCodePoint(Wp(i))})}class Dt extends Error{constructor(e){super(`sveld's template parser doesn't support ${e} yet.`);this.name="TemplateParseNotImplementedError"}}var Kp=/<\/script\s*>/g,zp=/<\/script\s*>/y,Xp=/[^\n]/g,Jp=new Set(["server","client","worker","test","default"]);function Ws(e,t,r){let n=e.index,i=e.readUntil(Kp);if(e.index>=e.source.length)throw Error("sveld: unclosed <script> tag");let o=e.source.slice(0,n).replace(Xp," ")+i;e.read(zp);let a=Fs(o,e.isTypeScript,e.root.comments);a.start=n;let p="default";for(let u of r){if(Jp.has(u.name))throw Error(`sveld: "${u.name}" is a reserved <script> attribute name.`);if(u.name==="module"){if(u.value!==!0)throw Error("sveld: <script module> does not take a value.");p="module"}if(u.name==="context"){let m=u.value;if(m===!0||!Array.isArray(m)||m.length!==1||m[0].type!=="Text")throw Error("sveld: context attribute must be a plain string.");if(m[0].data!=="module")throw Error('sveld: only context="module" is valid.');p="module"}}return{type:"Script",start:t,end:e.index,context:p,content:a,attributes:r}}function Ks(e,t,r){let n=e.index,i=e.source.indexOf("</style",e.index),o=i===-1?e.source.length:i;return e.index=o,e.eat("</style",!0),e.read(/\s*>/y),{type:"StyleSheet",start:t,end:e.index,attributes:r,children:[],comments:[],content:{start:n,end:o,styles:e.source.slice(n,o),comment:null}}}var Yp=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);function dn(e){return Yp.has(e)||e.charCodeAt(0)===33&&e.toLowerCase()==="!doctype"}var Qp="^[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}]*)?$",Zp=new RegExp(Qp,"u");function zs(e){return Zp.test(e)}var el=/(?:"([^"]*)"|'([^'])*'|([^>\s]+))/y,Zs=/["']/y,tl=/(\/>|[\s"'=<>`])/y,fn=/<\/textarea(\s[^>]*)?>/iy,rl=/^![a-zA-Z]+$/,nl=/^[a-zA-Z][a-zA-Z0-9]*:[a-zA-Z][a-zA-Z0-9-]*[a-zA-Z0-9]$/,il=/^(?:\p{Lu}[$\u200c\u200d\p{ID_Continue}.]*|\p{ID_Start}[$\u200c\u200d\p{ID_Continue}]*(?:\.[$\u200c\u200d\p{ID_Continue}]+)+)$/u,ea={"svelte:head":"SvelteHead","svelte:options":"SvelteOptions","svelte:window":"SvelteWindow","svelte:document":"SvelteDocument","svelte:body":"SvelteBody"},Xs={...ea,"svelte:element":"SvelteElement","svelte:component":"SvelteComponent","svelte:self":"SvelteSelf","svelte:fragment":"SvelteFragment","svelte:boundary":"SvelteBoundary"};function sl(e){let t=e.charCodeAt(0);if(t<97||t>122)return!1;for(let r=1;r<e.length;r++){let n=e.charCodeAt(r);if((n<97||n>122)&&(n<48||n>57))return!1}return!0}function al(e){if(sl(e))return!0;if(rl.test(e))return!0;if(nl.test(e))return!0;return zs(e)}function ol(e){let t=e.charCodeAt(0);if(t>=97&&t<=122&&!e.includes("."))return!1;return!0}function cl(e){return`Svelte${e.slice(7).split("-").map((r)=>r.charAt(0).toUpperCase()+r.slice(1)).join("")}`}function pl(e){for(let t=e.length-1;t>=0;t--){let r=e[t].type;if(r==="SvelteHead")return!0;if(r==="RegularElement"||r==="Component")return!1}return!1}function ll(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(r.type==="RegularElement"&&r.attributes?.some((n)=>n.type==="Attribute"&&n.name==="shadowrootmode"))return!0}return!1}function Js(e){let{source:t,index:r}=e;if(r>=t.length)throw new Ge("Unexpected end of input",t.length);let n=r;while(n<t.length){let i=t.charCodeAt(n);if(i===47||i===62||tt(i))break;n++}return e.index=n,{name:t.slice(r,n),start:r,end:n}}function ta(e){let{source:t,index:r}=e;if(r>=t.length)throw new Ge("Unexpected end of input",t.length);let n=r;while(n<t.length){let i=t.charCodeAt(n);if(i===61||i===47||i===62||i===34||i===39||tt(i))break;n++}return e.index=n,{name:t.slice(r,n),start:r,end:n}}function ul(e){let t=e.index;if(e.eat("//")){let r=e.readUntilString(`
|
|
30
|
-
`),n=e.index;e.root.comments.push({type:"Line",value:r,start:t,end:n});return}if(e.eat("/*")){let r=e.readUntilString("*/");e.eat("*/");let n=e.index;e.root.comments.push({type:"Block",value:r,start:t,end:n})}}function hl(e){if(e==="use")return"UseDirective";if(e==="animate")return"AnimateDirective";if(e==="bind")return"BindDirective";if(e==="class")return"ClassDirective";if(e==="style")return"StyleDirective";if(e==="on")return"OnDirective";if(e==="let")return"LetDirective";if(e==="in"||e==="out"||e==="transition")return"TransitionDirective";return!1}function ra(e,t){let r={start:e.index,end:-1,type:"Text",raw:"",data:""},n=[],i=(o)=>{if(o>r.start)r.raw=e.source.slice(r.start,o),r.data=hn(r.raw,!0),r.end=o,n.push(r)};while(e.index<e.source.length){if(t())return i(e.index),n;if(e.eat("{")){if(e.match("#")||e.match("@"))throw new Dt("blocks/tags inside attribute value sequences");let o=e.index-1;i(o),e.allowWhitespace();let a=ce(e);e.allowWhitespace(),e.eat("}",!0),n.push({type:"ExpressionTag",start:o,end:e.index,expression:a}),r={start:e.index,end:-1,type:"Text",raw:"",data:""}}else e.index++}throw new Dt("unterminated attribute value / sequence (loose mode)")}function dl(e){let t=e.eat("'")?"'":e.eat('"')?'"':null;if(t&&e.eat(t))return[{start:e.index-1,end:e.index-1,type:"Text",raw:"",data:""}];let r=ra(e,()=>{if(t)return e.match(t);return!!e.matchRegex(tl)});if(r.length===0&&!t)throw Error("sveld: expected attribute value");if(t)e.index+=1;if(t||r.length>1||r[0].type==="Text")return r;return r[0]}function mn(e,t,r,n){return{type:"Attribute",start:t,end:r,name:e,value:n}}function fl(e){let t=e.index,r=ta(e);if(!r.name)return null;let n=!0;if(e.eat("=")){e.allowWhitespace();let i=e.matchRegex(el);if(!i)throw Error("sveld: expected attribute value");e.index+=i.length;let o=i[0]==='"'||i[0]==="'";if(o)i=i.slice(1,-1);n=[{start:e.index-i.length-(o?1:0),end:o?e.index-1:e.index,type:"Text",raw:i,data:hn(i,!0)}]}if(e.matchRegex(Zs))throw Error("sveld: expected '='");return mn(r.name,t,e.index,n)}function ml(e){while(!0){let p=e.index;if(ul(e),e.index===p)break;e.allowWhitespace()}let t=e.index;if(e.eat("{")){if(e.allowWhitespace(),e.eat("@attach")){e.requireWhitespace();let m=ce(e);return e.allowWhitespace(),e.eat("}",!0),{type:"AttachTag",start:t,end:e.index,expression:m}}if(e.eat("...")){let m=ce(e);return e.allowWhitespace(),e.eat("}",!0),{type:"SpreadAttribute",start:t,end:e.index,expression:m}}let p=e.readIdentifierName();if(p.name==="")throw Error("sveld: empty attribute shorthand");e.allowWhitespace(),e.eat("}",!0);let u={type:"ExpressionTag",start:p.start,end:p.end,expression:p};return mn(p.name,t,e.index,u)}let r=ta(e);if(!r.name)return null;let n=e.index;e.allowWhitespace();let i=r.name.indexOf(":"),o=i!==-1&&hl(r.name.slice(0,i)),a=!0;if(e.eat("="))if(e.allowWhitespace(),e.source[e.index]==="/"&&e.source[e.index+1]===">"){let p=e.index;e.index++,a=[{start:p,end:p+1,type:"Text",raw:"/",data:"/"}],n=e.index}else a=dl(e),n=e.index;else if(e.matchRegex(Zs))throw Error("sveld: expected '='");if(o){let p=r.name.slice(i+1).split("|",1)[0];if(p==="")throw Error("sveld: directive missing a name");if(o==="StyleDirective")return{start:t,end:n,type:o,name:p,value:a};let u=a===!0?void 0:Array.isArray(a)?a[0]:a,m=null;if(u){if((Array.isArray(a)?a.length>1:!1)||u.type==="Text")throw Error("sveld: directive value must be a single expression");m=u.expression}let f={start:t,end:n,type:o,name:p,expression:m};if((f.type==="BindDirective"||f.type==="ClassDirective")&&!f.expression)f.expression={start:t+i+1,end:n,type:"Identifier",name:f.name};return f}return mn(r.name,t,n,a)}function na(e){let t=e.index++,r=e.current();if(e.eat("!--")){let E=e.readUntilString("-->");e.eat("-->",!0),e.append({type:"Comment",start:t,end:e.index,data:E});return}if(e.eat("/")){let{name:E}=Js(e);if(e.allowWhitespace(),e.eat(">",!0),dn(E))throw Error(`sveld: <${E}> is a void element and cannot have a closing tag`);while(r.name!==E){if(r.type==="RegularElement");else throw Error(`sveld: invalid closing tag </${E}>`);r.end=t,e.pop(),r=e.current()}if(r.end=e.index,e.pop(),e.lastAutoClosedTag&&e.stack.length<e.lastAutoClosedTag.depth)e.lastAutoClosedTag=void 0;return}let n=Js(e),i=ol(n.name)&&il.test(n.name);if(!al(n.name)&&!i)throw Error(`sveld: "${n.name}" is not a valid element or component name`);if(n.name in ea&&r.type!=="Root")throw Error(`sveld: <${n.name}> must be a top-level element`);let o;if(n.name in Xs)o=Xs[n.name];else if(n.name.startsWith("svelte:"))o=cl(n.name);else if(i)o="Component";else if(n.name==="title"&&pl(e.stack))o="TitleElement";else if(n.name==="slot"&&!ll(e.stack))o="SlotElement";else o="RegularElement";let a={type:o,start:t,end:-1,name:n.name,attributes:[],fragment:{type:"Fragment",nodes:[]}};if(e.allowWhitespace(),r.type==="RegularElement"&&Ii(r.name,n.name))r.end=t,e.pop(),e.lastAutoClosedTag={tag:r.name,reason:n.name,depth:e.stack.length},r=e.current();let p=e.current(),u=(n.name==="script"||n.name==="style")&&p.type==="Root",m=u?fl:ml,f;while(f=m(e))a.attributes.push(f),e.allowWhitespace();if(a.type==="SvelteComponent")a.expression=Qs(Ys(a));if(a.type==="SvelteElement"){let E=Ys(a);if(E.value===!0)throw Error("sveld: <svelte:element> `this` attribute needs a value");if(yl(E))a.tag=Qs(E);else{let T=E.value[0];a.tag=T.type==="Text"?{type:"Literal",value:T.data,raw:`'${T.raw}'`,start:T.start,end:T.end}:T.expression}}if(u){if(e.eat(">",!0),n.name==="script"){let E=Ws(e,t,a.attributes);if(E.context==="module"){if(e.root.module)throw Error("sveld: duplicate <script module>");e.root.module=E}else{if(e.root.instance)throw Error("sveld: duplicate <script>");e.root.instance=E}}else{if(e.root.css)throw Error("sveld: duplicate <style>");e.root.css=Ks(e,t,a.attributes)}return}e.append(a);let b=e.eat("/")||dn(n.name);if(e.eat(">",!0),b)a.end=e.index;else if(n.name==="textarea")a.fragment.nodes=ra(e,()=>(fn.lastIndex=e.index,fn.test(e.source))),e.read(fn),a.end=e.index;else e.push(a,a.fragment)}function Ys(e){let t=e.attributes,r=t.findIndex((n)=>n.type==="Attribute"&&n.name==="this");if(r===-1)throw Error(`sveld: <${e.name}> requires a \`this\` attribute`);return t.splice(r,1)[0]}function Qs(e){return Array.isArray(e.value)?e.value[0].expression:e.value.expression}function yl(e){return e.value!==!0&&!Array.isArray(e.value)||Array.isArray(e.value)&&e.value.length===1&&e.value[0].type==="ExpressionTag"}function ia(e){let t={start:e.start,end:e.end,attributes:e.attributes};for(let r of e.attributes){if(r.type!=="Attribute")continue;if(r.name==="runes"){let n=sa(r);if(typeof n==="boolean")t.runes=n}if(r.name==="customElement"){let n=gl(r);if(n!==void 0)t.customElement={tag:n}}}return t}function sa(e){let{value:t}=e;if(t===!0)return!0;let r=Array.isArray(t)?t[0]:t;if(!r)return!0;if(Array.isArray(t)&&t.length>1)return null;if(r.type==="Text")return r.data;if(r.expression.type!=="Literal")return null;return r.expression.value}function gl(e){let{value:t}=e;if(t===!0)return;let r=Array.isArray(t)?t[0]:t;if(!r)return;if(r.type==="Text"){let n=sa(e);return typeof n==="string"?n:void 0}if(r.expression.type==="ObjectExpression"){for(let n of r.expression.properties)if(n.type==="Property"&&!n.computed&&n.key.type==="Identifier"&&n.key.name==="tag"&&n.value.type==="Literal"&&typeof n.value.value==="string")return n.value.value}return}var xl=/<script\s+(?:[^>]*|(?:[^=>'"/]+=(?:"[^"]*"|'[^']*'|[^>\s]+)\s+)*)lang=(["'])?ts\1[^>]*>/;class yn extends on{root;stack=[];fragments=[];isTypeScript;lastAutoClosedTag;constructor(e,t){super(e);this.isTypeScript=xl.test(e);let r=fe();this.root={type:"Root",start:0,end:t,css:null,js:[],options:null,fragment:r,comments:[]},this.stack.push(this.root),this.fragments.push(r)}current(){return this.stack[this.stack.length-1]}currentFragment(){return this.fragments[this.fragments.length-1]}push(e,t){this.stack.push(e),this.fragments.push(t)}pop(){return this.fragments.pop(),this.stack.pop()}append(e){return this.currentFragment().nodes.push(e),e}}var gn={"{":"}","(":")","[":"]"},bl=new Set(Object.values(gn));function Lt(e,t,r=gn){let n=r===gn?bl:new Set(Object.values(r)),i=[],o=t;while(o<e.source.length){let a=e.source[o++];if(a==="'"||a==='"'||a==="`"){o=Tl(e,o,a);continue}if(Object.hasOwn(r,a))i.push(a);else if(n.has(a)){let p=i.pop(),u=p?r[p]:void 0;if(a!==u)throw Error(`sveld: expected "${u}"`);if(i.length===0)return o}}throw Error("sveld: unexpected end of input")}function Tl(e,t,r){let n=!1,i=t;while(i<e.source.length){let o=e.source[i++];if(n){n=!1;continue}if(o===r)return i;if(o==="\\")n=!0;if(r==="`"&&o==="$"&&e.source[i]==="{")i=Lt(e,i)}throw Error("sveld: unterminated string constant")}var oa=/[^\n]/g,vl=/\?\s*:/g;function We(e){let t=e.index,r=e.readIdentifierName();if(r.name!==""){let E=aa(e);return{...r,typeAnnotation:E}}let n=e.source[e.index];if(n!=="{"&&n!=="[")throw Error("sveld: expected a binding pattern");let i=Lt(e,t);e.index=i;let o=e.source.slice(t,i),a=e.source.slice(0,t).replace(oa," "),p=a.indexOf(" ");a=a.slice(0,p)+a.slice(p+1);let u=`${a}(${o} = 1)`,{node:m}=pt(u,t-1,e.isTypeScript,e.root.comments),f=m.left,b=aa(e);if(b)f.typeAnnotation=b,f.end=b.end;return f}function aa(e){let t=e.index;if(e.allowWhitespace(),!e.eat(":")){e.index=t;return}let r="_ as ",n=e.index-r.length,i=e.source.slice(0,n).replace(oa," ")+r+e.source.slice(e.index).replace(vl,":"),{node:o}=pt(i,n,e.isTypeScript,e.root.comments),a=o;if(a.type==="AssignmentExpression"){let p=a.right.start;while(i[p]!=="=")p-=1;({node:o}=pt(i.slice(0,p),n,e.isTypeScript,e.root.comments)),a=o}if(a.type==="SequenceExpression"&&a.expressions)a=a.expressions[0];return e.index=a.end,{type:"TSTypeAnnotation",start:t,end:e.index,typeAnnotation:a.typeAnnotation}}var ca=/\s*}/y,El={"<":">"};function pa(e){let t=e.index-2;while(e.source[t]!=="{")t-=1;if(e.eat("if")){e.requireWhitespace();let r={type:"IfBlock",elseif:!1,start:t,end:-1,test:ce(e),consequent:fe(),alternate:null};e.append(r),e.allowWhitespace(),e.eat("}",!0),e.push(r,r.consequent);return}if(e.eat("each")){e.requireWhitespace();let r=ce(e);if(e.allowWhitespace(),!e.match("as")){let p=r;if(p.type==="SequenceExpression"&&p.expressions)p=p.expressions[0];if(p.type==="TSAsExpression"){let u=p;r=u.expression;let m=u.typeAnnotation.start-2;while(m>=0&&!(e.source[m]==="a"&&e.source[m+1]==="s"))m-=1;e.index=m}}let n=null,i,o;if(e.eat("as"))e.requireWhitespace(),n=We(e);if(e.allowWhitespace(),e.eat(",")){e.allowWhitespace();let p=e.readIdentifierName();if(!p.name)throw Error("sveld: expected an identifier");i=p.name,e.allowWhitespace()}if(e.eat("("))e.allowWhitespace(),o=ce(e),e.allowWhitespace(),e.eat(")",!0),e.allowWhitespace();e.eat("}",!0);let a={type:"EachBlock",start:t,end:-1,expression:r,body:fe(),context:n,index:i,key:o};e.append(a),e.push(a,a.body);return}if(e.eat("await")){e.requireWhitespace();let r=ce(e);e.allowWhitespace();let n={type:"AwaitBlock",start:t,end:-1,expression:r,value:null,error:null,pending:null,then:null,catch:null};if(e.eat("then")){if(!e.matchRegex(ca))e.requireWhitespace(),n.value=We(e),e.allowWhitespace();n.then=fe()}else if(e.eat("catch")){if(!e.matchRegex(ca))e.requireWhitespace(),n.error=We(e),e.allowWhitespace();n.catch=fe()}else n.pending=fe();e.eat("}",!0),e.append(n),e.push(n,n.then??n.catch??n.pending);return}if(e.eat("key")){e.requireWhitespace();let r=ce(e);e.allowWhitespace(),e.eat("}",!0);let n={type:"KeyBlock",start:t,end:-1,expression:r,fragment:fe()};e.append(n),e.push(n,n.fragment);return}if(e.eat("snippet")){e.requireWhitespace();let r=e.readIdentifierName();if(r.name==="")throw Error("sveld: expected a snippet name");e.allowWhitespace();let n;if(e.isTypeScript&&e.match("<")){let o=e.index,a=Lt(e,o,El);n=e.source.slice(o+1,a-1),e.index=a}if(e.allowWhitespace(),e.eat("(")){let o=1;while(e.index<e.source.length&&(!e.match(")")||o!==1)){if(e.match("("))o++;if(e.match(")"))o--;e.index+=1}e.eat(")",!0)}e.allowWhitespace(),e.eat("}",!0);let i={type:"SnippetBlock",start:t,end:-1,expression:r,typeParams:n,parameters:[],body:fe()};e.append(i),e.push(i,i.body);return}throw Error("sveld: expected if/each/await/key/snippet")}function la(e){let t=e.index-1,r=e.current();if(r.type==="IfBlock"){if(!e.eat("else"))throw Error("sveld: expected {:else} or {:else if}");if(e.eat("if"))throw Error("sveld: {:else if} cannot follow {:else if} directly");if(e.allowWhitespace(),e.fragments.pop(),r.alternate=fe(),e.fragments.push(r.alternate),e.eat("if")){e.requireWhitespace();let n=ce(e);e.allowWhitespace(),e.eat("}",!0);let i=t-1;while(e.source[i]!=="{")i-=1;let o={type:"IfBlock",start:i,end:-1,elseif:!0,test:n,consequent:fe(),alternate:null};e.append(o),e.stack.push(o),e.fragments.pop(),e.fragments.push(o.consequent)}else e.allowWhitespace(),e.eat("}",!0);return}if(r.type==="EachBlock"){if(!e.eat("else"))throw Error("sveld: expected {:else}");e.allowWhitespace(),e.eat("}",!0),r.fallback=fe(),e.fragments.pop(),e.fragments.push(r.fallback);return}if(r.type==="AwaitBlock"){if(e.eat("then")){if(r.then)throw Error("sveld: duplicate {:then}");if(!e.eat("}"))e.requireWhitespace(),r.value=We(e),e.allowWhitespace(),e.eat("}",!0);r.then=fe(),e.fragments.pop(),e.fragments.push(r.then);return}if(e.eat("catch")){if(r.catch)throw Error("sveld: duplicate {:catch}");if(!e.eat("}"))e.requireWhitespace(),r.error=We(e),e.allowWhitespace(),e.eat("}",!0);r.catch=fe(),e.fragments.pop(),e.fragments.push(r.catch);return}throw Error("sveld: expected {:then ...} or {:catch ...}")}throw Error("sveld: {:...} not valid here")}function ua(e){let t=e.current();switch(t.type){case"IfBlock":{e.eat("if",!0),e.allowWhitespace(),e.eat("}",!0);while(t.type==="IfBlock"&&t.elseif)t.end=e.index,e.stack.pop(),t=e.current();t.end=e.index,e.pop();return}case"EachBlock":e.eat("each",!0);break;case"KeyBlock":e.eat("key",!0);break;case"AwaitBlock":e.eat("await",!0);break;case"SnippetBlock":e.eat("snippet",!0);break;default:throw Error("sveld: unexpected closing block tag")}e.allowWhitespace(),e.eat("}",!0),t.end=e.index,e.pop()}var Sl=/(?:let|const)\b/y,Cl=/(?:var|interface|enum)\b/y,Pl=/type\b/y;function ha(e){let t=e.index;if(e.matchRegex(Cl))throw Error("sveld: `var`/`interface`/`enum` are not valid here");if(!e.matchRegex(Sl)&&!e.matchRegex(Pl))return null;let r=e.root.comments.length,n=Vs(e.source,t,e.isTypeScript,e.root.comments);if(n.type!=="VariableDeclaration"){if(n.type==="ExpressionStatement")return e.root.comments.length=r,null;throw Error("sveld: expected a `let`/`const` declaration")}if(n.kind!=="let"&&n.kind!=="const")throw Error("sveld: expected a `let`/`const` declaration");return e.index=n.end,e.allowWhitespace(),e.eat("}",!0),n}var Al=/\s*}/y;function da(e){let t=e.index;while(e.source[t]!=="{")t-=1;if(e.eat("html")){e.requireWhitespace();let r=ce(e);e.allowWhitespace(),e.eat("}",!0);let n={type:"HtmlTag",start:t,end:e.index,expression:r};e.append(n);return}if(e.eat("debug")){let r;if(e.read(Al))r=[];else{let i=ce(e);r=i.type==="SequenceExpression"?i.expressions:[i];for(let o of r)if(o.type!=="Identifier")throw Error("sveld: {@debug} arguments must be identifiers");e.allowWhitespace(),e.eat("}",!0)}let n={type:"DebugTag",start:t,end:e.index,identifiers:r};e.append(n);return}if(e.eat("const")){e.requireWhitespace();let r=We(e);e.allowWhitespace(),e.eat("=",!0),e.allowWhitespace();let n=ce(e),i=e.index;e.allowWhitespace(),e.eat("}",!0);let o={type:"VariableDeclarator",id:r,init:n,start:r.start,end:i},a={type:"ConstTag",start:t,end:e.index,declaration:{type:"VariableDeclaration",kind:"const",declarations:[o],start:t+2,end:e.index-1}};e.append(a);return}if(e.eat("render")){e.requireWhitespace();let r=ce(e);if(!(r.type==="CallExpression"||r.type==="ChainExpression"&&r.expression.type==="CallExpression"))throw Error("sveld: {@render ...} must be a function call");e.allowWhitespace(),e.eat("}",!0);let i={type:"RenderTag",start:t,end:e.index,expression:r};e.append(i);return}throw Error("sveld: expected html/debug/const/render")}function fa(e){let t=e.index;if(e.index+=1,e.allowWhitespace(),e.eat("#")){pa(e);return}if(e.eat(":")){la(e);return}if(e.eat("@")){da(e);return}if(e.match("/")&&!e.match("/*")&&!e.match("//")){e.eat("/"),ua(e);return}let r=ha(e);if(r){let o={type:"DeclarationTag",start:t,end:e.index,declaration:r};e.append(o);return}let n=ce(e);e.allowWhitespace(),e.eat("}",!0);let i={type:"ExpressionTag",start:t,end:e.index,expression:n};e.append(i)}function ma(e){let{index:t,source:r}=e,n=r.indexOf("<",t),i=r.indexOf("{",t),o;if(n===-1)o=i===-1?r.length:i;else o=i===-1?n:Math.min(n,i);e.index=o;let a=r.slice(t,o),p={type:"Text",start:t,end:e.index,raw:a,data:a};e.append(p)}function xn(e){let t=e.trimEnd(),r=new yn(t,e.length);while(r.index<r.source.length)if(r.match("<"))na(r);else if(r.match("{"))fa(r);else ma(r);let n=r.root.fragment.nodes.findIndex((i)=>i.type==="SvelteOptions");if(n!==-1){let[i]=r.root.fragment.nodes.splice(n,1);r.root.options=ia(i)}return r.root}function ya(e){if(e==="var")return"let";if(e==="using"||e==="await using")return"const";return e}var kl=null,ga=/^@component/,wl=/\r/g,Nl=/^\{\s*\}$/;class pe{ctx=Ar();static mapToArray(e){return Array.from(e,([t,r])=>r)}static getStaticAttributeValue(e){if(!Array.isArray(e.value))return;return e.value.map((t)=>t.data??t.raw??"").join("").trim()}resolveScriptLanguage(e){let t=[e.instance,e.module].filter((n)=>n!==void 0),r=!1;for(let n of t){let i=n.attributes?.find((a)=>a.name==="lang");if(!i){r=!0;continue}if(pe.getStaticAttributeValue(i)?.toLowerCase()==="ts")return"ts"}return r?"js":void 0}resolveScriptGenericsAttribute(e){let t=e.instance?.attributes?.find((a)=>a.name==="generics");if(!t)return;let r=se(this.ctx,t),n=e.instance?.attributes?.find((a)=>a.name==="lang");if((n?pe.getStaticAttributeValue(n)?.toLowerCase():void 0)!=="ts"){Oe(this.ctx,"syntax-skipped","generics",'<script generics="..."> requires lang="ts"; the generics attribute was ignored because the script is not TypeScript.',r);return}let o=pe.getStaticAttributeValue(t);if(!o)return;return{value:o,source:r}}resolvePublicPropName(e){return this.ctx.propLocalToPublicName.get(e)??e}trackPropLocalName(e,t=e){this.ctx.propLocalToPublicName.set(t,e)}getPropByLocalOrPublic(e){return this.ctx.props.get(this.resolvePublicPropName(e))}getPropTypeByLocalOrPublic(e){return this.getPropByLocalOrPublic(e)?.type}getExplicitPropType(e){return this.ctx.explicitPropTypesByName.get(e)}getPropertyName(e){if(!e||typeof e!=="object"||!("type"in e))return;if(De(e))return e.name;if(Xe(e))return e.value==null?void 0:String(e.value);return}isNumericConstant(e){if(!e||typeof e!=="object"||!("type"in e))return!1;if(e.type!=="MemberExpression")return!1;let t=e,r=t.object&&"name"in t.object?t.object.name:void 0,n=t.property&&"name"in t.property?t.property.name:void 0;if(!r||!n)return!1;if(r==="Number")return["POSITIVE_INFINITY","NEGATIVE_INFINITY","MAX_VALUE","MIN_VALUE","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","EPSILON","NaN"].includes(n);if(r==="Math")return["PI","E","LN2","LN10","LOG2E","LOG10E","SQRT2","SQRT1_2"].includes(n);return!1}resolveLocalVarJSDoc(e){for(let r of this.ctx.vars)if(r.declarations.some((i)=>i.id&&typeof i.id==="object"&&("type"in i.id)&&i.id.type==="Identifier"&&("name"in i.id)&&i.id.name===e))return qe(this.ctx,this,r);let t=this.ctx.funcDecls.get(e);if(t)return qe(this.ctx,this,t);return}addModuleExport(e,t){if(be(e)===void 0)return;if(this.ctx.moduleExports.has(e)){let r=this.ctx.moduleExports.get(e);this.ctx.moduleExports.set(e,{...r,...t})}else this.ctx.moduleExports.set(e,t)}aliasType(e){if(e==="*")return"any";return e.trim()}findVariableTypeAndDescription(e){let t=this.getPropByLocalOrPublic(e);if(t?.type)return{type:t.type,description:t.description};if(!this.ctx.variableInfoCacheBuilt)this.ctx.variableInfoCache=_i(this.ctx,this),this.ctx.variableInfoCacheBuilt=!0;let r=this.ctx.variableInfoCache.get(e),n=this.ctx.explicitVariableTypesByName.get(e);if(n)return{type:n,description:r?.description};return r??null}accumulateGeneric(e,t){if(this.ctx.generics)this.ctx.generics=[`${this.ctx.generics[0]}, ${e}`,`${this.ctx.generics[1]}, ${t}`];else this.ctx.generics=[e,t]}cleanup(){this.ctx=Ar()}static SCRIPT_BLOCK_REGEX=/(<script[^>]*>)([\s\S]*?)(<\/script>)/gi;static TS_DIRECTIVE_REGEX=/\/\/\s*@ts-[^\n\r]*/g;static stripTypeScriptDirectivesFromScripts(e){return pe.SCRIPT_BLOCK_REGEX.lastIndex=0,e.replace(pe.SCRIPT_BLOCK_REGEX,(t,r,n,i)=>{pe.TS_DIRECTIVE_REGEX.lastIndex=0;let o=n.replace(pe.TS_DIRECTIVE_REGEX,"");return r+o+i})}parseSvelteComponent(e,t){this.cleanup(),this.ctx.componentFilePath=t.filePath;let r=pe.stripTypeScriptDirectivesFromScripts(e);this.ctx.source=r;let n=xn(r);if(Si(this,this.ctx,n),this.ctx.parsed=n,this.ctx.scriptLanguage==="ts")zt(this.ctx.parsed.module),zt(this.ctx.parsed.instance),zt(this.ctx.parsed.fragment);this.ctx.syntaxMode=Ei(this.ctx);let i=this.ctx.parsed.css,o=i?.start!==void 0&&i?.end!==void 0?r.slice(0,i.start)+" ".repeat(i.end-i.start)+r.slice(i.end):r;fi(this.ctx,this,o);let a={type:"ComponentRoot",instance:this.ctx.parsed.instance,fragment:this.ctx.parsed.fragment};if(Vr(this.ctx,this.ctx.parsed?.module),Vr(this.ctx,this.ctx.parsed?.instance),this.ctx.parsed?.module)Ne(this.ctx.parsed?.module,{enter:(g)=>{if(g.type==="ImportDeclaration")Xt(this.ctx,g);if(g.type==="FunctionDeclaration"){let s=g;if(s.id?.name)this.ctx.funcDecls.set(s.id.name,s)}if(g.type==="VariableDeclaration")this.ctx.vars.add(g);if(g.type==="ExportNamedDeclaration"){if(g.declaration==null)return;if(!g.declaration||typeof g.declaration!=="object"||!("type"in g.declaration))return;let s,c,l=!1,h,y,x,v=!1,A,P,S;if(g.declaration.type==="FunctionDeclaration"){let G=g.declaration;if(!G.id?.name)return;s=G.id.name,c="function",h=void 0,y="() => any",v=!0,l=!0}else if(g.declaration.type==="VariableDeclaration"){let G=g.declaration,U=G.declarations[0];if(!U||typeof U!=="object"||!("id"in U))return;let{id:ie,init:Ie}=U;if(!ie||typeof ie!=="object"||!("name"in ie))return;let Z=ie.name;s=Z,c=ya(G.kind);let ee=Ie==null?{isFunction:!1}:$e(this,this.ctx,Ie);if({value:h,type:y,isFunction:v,defaultValue:A}=ee,P=y,S=ee,x=this.getExplicitPropType(Z),S.pendingCallDefault)this.ctx.pendingCallDefaultCandidates.push({propName:Z,location:"moduleExports",...S.pendingCallDefault})}else return;let _=qe(this.ctx,this,g),{type:k,typeSource:R,description:j,params:M,returnType:J,isFunction:H}=vt({explicitType:x,typeSeed:y,inferredTypeForSource:P,jsdocType:_?.type,jsdocDescription:_?.description,jsdocParams:_?.params,jsdocReturnType:_?.returnType,resolvedType:S?.resolvedType,resolvedDescription:S?.resolvedDescription,resolvedParams:S?.resolvedParams,resolvedReturnType:S?.resolvedReturnType,initializerIsFunction:v,isFunctionDeclaration:l,typedefs:this.ctx.typedefs});this.addModuleExport(s,{name:s,kind:c,description:j,deprecated:_?.deprecated,tags:_?.tags,type:k,typeSource:R,value:h,defaultValue:A,params:M,returnType:J,isFunction:H,isFunctionDeclaration:l,isRequired:!1,constant:c==="const",reactive:!1,source:se(this.ctx,g)})}}});let p,u=new Set,m=new Set,f=[];gi(this,this.ctx),this.ctx.activeScopes.push(this.ctx.componentScope);let b=xi(this.ctx);if(Ne(a,{enter:(g,s,c)=>{bi(this,this.ctx,b,g);let l=this.ctx.scopeDeclarations.get(g);if(l)this.ctx.activeScopes.push(l);if(g.type==="AssignmentExpression")Br(this.ctx,g.left);if(g.type==="UpdateExpression")Br(this.ctx,g.argument);if(g.type==="CallExpression"){let h=g,y=h.callee&&typeof h.callee==="object"&&"name"in h.callee?h.callee.name:void 0;if(y==="createEventDispatcher"){if(s&&typeof s==="object"&&"id"in s&&s.id&&typeof s.id==="object"&&"name"in s.id)p=s.id.name}if(y==="$host"){if(s&&typeof s==="object"&&"id"in s&&s.id&&typeof s.id==="object"&&"name"in s.id)u.add(s.id.name)}if(y==="setContext")Yn(this.ctx,this,g,s??void 0);if(y)f.push({name:y,arguments:h.arguments,source:se(this.ctx,h)});if(Rn(h.callee)&&De(h.callee.property)&&h.callee.property.name==="dispatchEvent"&&(Le(h.callee.object,"$host")||De(h.callee.object)&&u.has(h.callee.object.name))){let x=Qn(this.ctx,h);if(x)m.add(x)}}if(g&&typeof g==="object"&&"type"in g&&String(g.type)==="SpreadAttribute"){let h=g;if(h.expression?.name==="$$restProps"||this.ctx.restPropLocals.has(h.expression?.name??""))mi(this.ctx,s)}if(g.type==="FunctionDeclaration"){let h=g;if(h.id?.name)this.ctx.funcDecls.set(h.id.name,h)}if(g.type==="ImportDeclaration")Xt(this.ctx,g);if(g.type==="VariableDeclaration"){if(this.ctx.vars.add(g),s&&typeof s==="object"&&"type"in s&&s.type==="Program"&&g.declarations.some((h)=>Le(je(h.init),"$props")))Ci(this,this.ctx,g)}if(g.type==="ExportNamedDeclaration"){if(g.declaration==null&&g.specifiers.length===0)return;let h;if(g.declaration==null&&g.specifiers[0]?.type==="ExportSpecifier"){let ee=g.specifiers[0],we=ee.local&&typeof ee.local==="object"&&"name"in ee.local?ee.local.name:void 0,ze=ee.exported&&typeof ee.exported==="object"&&"name"in ee.exported?ee.exported.name:void 0;if(!we||!ze)return;let nt;for(let ht of Array.from(this.ctx.vars))if(ht.declarations.some((Me)=>Me.id&&typeof Me.id==="object"&&("type"in Me.id)&&Me.id.type==="Identifier"&&Me.id.name===we)){nt=ht;break}g.declaration=nt,h=ze}if(g.declaration==null)return;if(!g.declaration||typeof g.declaration!=="object"||!("type"in g.declaration))return;let y,x=!1,v,A,P,S=!1,_=!1,k,R,j,M;if(g.declaration.type==="FunctionDeclaration"){let ee=g.declaration;if(!ee.id?.name)return;h??=ee.id.name,k=ee.id.name,y="function",v=void 0,A="() => any",S=!0,x=!0,_=!1}else if(g.declaration.type==="VariableDeclaration"){let ee=g.declaration,we=ee.declarations[0];if(!we||typeof we!=="object"||!("id"in we))return;let{id:ze,init:nt}=we;if(ze&&typeof ze==="object"&&"name"in ze){let Me=ze.name;k=Me,h??=Me,P=this.getExplicitPropType(Me)}else return;y=ya(ee.kind),_=y==="let"&&nt==null;let ht=nt==null?{isFunction:!1}:$e(this,this.ctx,nt);if({value:v,type:A,isFunction:S,defaultValue:R}=ht,j=A,M=ht,M.pendingCallDefault)this.ctx.pendingCallDefaultCandidates.push({propName:h,location:"props",...M.pendingCallDefault})}else return;let J=qe(this.ctx,this,g),{type:H,typeSource:G,description:U,params:ie,returnType:Ie,isFunction:Z}=vt({explicitType:P,typeSeed:A,inferredTypeForSource:j,jsdocType:J?.type,jsdocDescription:J?.description,jsdocParams:J?.params,jsdocReturnType:J?.returnType,resolvedType:M?.resolvedType,resolvedDescription:M?.resolvedDescription,resolvedParams:M?.resolvedParams,resolvedReturnType:M?.resolvedReturnType,initializerIsFunction:S,isFunctionDeclaration:x,typedefs:this.ctx.typedefs});dt(this,this.ctx,h,{name:h,...k!==void 0&&k!==h?{localName:k}:{},kind:y,description:U,binding:J?.binding,deprecated:J?.deprecated,tags:J?.tags,type:H,typeSource:G,value:v,defaultValue:R,params:ie,returnType:Ie,isFunction:Z,isFunctionDeclaration:x,isRequired:_,constant:y==="const",reactive:this.ctx.reactive_vars.has(h),source:se(this.ctx,g)})}if(g&&typeof g==="object"&&"type"in g&&String(g.type)==="Comment"){let y=g?.data?.trim()??"";if(ga.test(y))this.ctx.componentComment=y.replace(ga,"").replace(wl,""),this.ctx.componentCommentSource=se(this.ctx,g)}if(g&&typeof g==="object"&&"type"in g&&String(g.type)==="SlotElement"){let h=g,y=h.attributes?.find((P)=>P.name==="name")?.value,x=(Array.isArray(y)?y[0]:void 0)?.data,v=(h.attributes||[]).filter((P)=>P.name!=="name").reduce((P,S)=>{let _={value:void 0,replace:!1},k=S.value;if(k===void 0||k===!0)return P;let R=Array.isArray(k)?k[0]:k;if(R){let{type:j,expression:M,raw:J,start:H,end:G}=R;if(j==="Text"&&J!==void 0)_.value=JSON.stringify(J);else if(!Array.isArray(k)&&j==="ExpressionTag"&&M&&typeof M==="object"&&"type"in M&&M.type==="Identifier"&&"name"in M&&M.name===S.name)_.value=M.name,_.replace=!0;if(M&&typeof M==="object"&&"type"in M){if(M.type==="Literal"&&"value"in M){let U=M.value;_.value=typeof U==="string"?JSON.stringify(U):String(U)}else if(M.type==="MemberExpression")_.value=$t(this.ctx,this,M);else if(M.type!=="Identifier"){if(H!==void 0&&G!==void 0){if(M.type==="ObjectExpression"||M.type==="TemplateLiteral")_.value=te(this.ctx,H+1,G-1)}}}}if(S.name)P[S.name]=_;return P},{}),A=h.fragment?.nodes?.map(({start:P,end:S})=>{if(P===void 0||S===void 0)return"";return te(this.ctx,P,S)??""}).join("").trim();bt(this.ctx,{slot_name:x,slot_props:v,slot_fallback:A,source:se(this.ctx,g)})}if(g&&typeof g==="object"&&"type"in g&&String(g.type)==="RenderTag"){let h=g,y=pi(this.ctx,h.expression);if(y){let x;if(y.arguments.length===0)x={};else if(y.arguments.length===1&&typeof y.arguments[0]==="object"&&y.arguments[0]&&"type"in y.arguments[0]&&y.arguments[0].type==="ObjectExpression")x=ci(this.ctx,this,y.arguments[0]);else if(y.arguments.length===1)Oe(this.ctx,"syntax-skipped",y.publicName,`{@render ${y.publicName}(...)} argument is not a plain object literal; the render call was not mapped to slot metadata.`,se(this.ctx,g));let v=y.publicName==="children"?void 0:y.publicName,A=v===void 0?kl:v;if(x!==void 0)bt(this.ctx,{slot_name:v,slot_props:x,source:se(this.ctx,g)});if(x!==void 0||this.ctx.slots.has(A))this.ctx.snippetPropLocals.add(y.trackingName)}}if(g&&typeof g==="object"&&"type"in g&&String(g.type)==="OnDirective"){let h=g;if(h.expression==null&&h.name){if(s!=null&&typeof s==="object"&&"name"in s){let y=typeof s.name==="string"?s.name:void 0,x="type"in s?String(s.type):void 0;if(y&&x){let v=ft(x)?{type:"InlineComponent",name:y}:{type:"Element",name:y};this.ctx.forwardedEvents.set(h.name,v);let A=this.ctx.events.get(h.name),P=this.ctx.eventDescriptions.get(h.name),S=A?.deprecated;if(!A)this.ctx.events.set(h.name,{type:"forwarded",name:h.name,element:v,description:P,deprecated:S,source:se(this.ctx,g)});else if(A.type==="forwarded"&&P&&!A.description)this.ctx.events.set(h.name,{...A,description:P,deprecated:A.deprecated??S,source:A.source||se(this.ctx,g)})}}}}if(s&&typeof s==="object"&&"type"in s&&(mt(String(s.type))||ft(String(s.type)))&&g&&typeof g==="object"&&"type"in g&&String(g.type)==="BindDirective"){let h=g;if(h.expression?.name){let y=Gt(this.ctx,h.expression.name);if(y)this.ctx.reactive_vars.add(y)}if(mt(String(s.type))&&h.name==="this"&&h.expression?.name&&"name"in s&&typeof s.name==="string"){let y=Gt(this.ctx,h.expression.name);if(!y)return;let x=s.name;if(this.ctx.bindings.has(y)){let v=this.ctx.bindings.get(y);if(v&&!v.elements.includes(x))this.ctx.bindings.set(y,{...v,elements:[...v.elements,x]})}else this.ctx.bindings.set(y,{elements:[x]})}}},leave:(g)=>{if(this.ctx.scopeDeclarations.has(g))this.ctx.activeScopes.pop();Ti(b,g)}}),p!==void 0){for(let g of f)if(g.name===p){let s=g.arguments[0],c=s&&typeof s==="object"&&"value"in s?s.value:void 0,l=g.arguments[1],h=l&&typeof l==="object"&&"value"in l?l.value:void 0;if(c!=null)yt(this.ctx,{name:String(c),detail:h==null?"":Ir(h),has_argument:Boolean(l),source:g.source})}}let E=new Set(m);if(p!==void 0){for(let g of f)if(g.name===p){let s=g.arguments[0],c=s&&typeof s==="object"&&"value"in s?s.value:void 0;if(c!=null)E.add(String(c))}}this.ctx.forwardedEvents.forEach((g,s)=>{let c=this.ctx.events.get(s);if(c&&c.type==="dispatched"&&!E.has(s)){let l=this.ctx.eventDescriptions.get(s),h={type:"forwarded",name:s,element:g,description:l,deprecated:c.deprecated,tags:c.tags,source:c.source};if(c.detail!==void 0&&c.detail!=="undefined")h.detail=c.detail;this.ctx.events.set(s,h)}}),Pi(this.ctx,E);let T=this.ctx.syntaxMode==="runes"?new Set(Array.from(this.ctx.snippetPropLocals,(g)=>this.resolvePublicPropName(g))):new Set,w=pe.mapToArray(this.ctx.props).filter((g)=>!T.has(g.name)).map((g)=>{if(this.ctx.bindings.has(g.name)){let s=this.ctx.bindings.get(g.name)?.elements.sort().map((c)=>Fn(c)).join(" | ");return{...g,type:`null | ${s}`,typeSource:"inferred",reactive:g.reactive||this.ctx.reactive_vars.has(g.name)}}return{...g,reactive:g.reactive||this.ctx.reactive_vars.has(g.name)}});this.ctx.activeScopes.length=0;let B=pe.mapToArray(this.ctx.slots).map((g)=>{if(!g.slot_props)return g;if(typeof g.slot_props==="string")return Nl.test(g.slot_props)?{...g,slot_props:"Record<string, never>"}:g;let s=g.slot_props,c=[];for(let h of Object.keys(s)){if(s[h].replace&&s[h].value!==void 0)s[h].value=this.getPropTypeByLocalOrPublic(s[h].value);if(s[h].value===void 0)s[h].value="any";c.push(`${h}: ${s[h].value}`)}let l=c.length===0?"Record<string, never>":c.length===1?`{ ${c[0]} }`:`{
|
|
31
|
+
`)}function on(e,t,r,n){let i=Ip(r,n);if(i>=r.length)return;an(e,void 0,r,{index:i},t)}function Ip(e,t){let r=0,n=e.length;while(r<n){let i=r+n>>>1;if(e[i].start<t)r=i+1;else n=i}return r}function an(e,t,r,n,i){while(n.index<r.length&&r[n.index].start<(e.start??0))e.leadingComments??=[],e.leadingComments.push(r[n.index]),n.index++;if(n.index>=r.length)return;let o=Object.keys(e);for(let a=0;a<o.length;a++){let p=o[a];if(p==="type"||p==="leadingComments")continue;let l=e[p];if(!l||typeof l!=="object")continue;if(Array.isArray(l)){for(let m of l)if(m&&typeof m==="object"&&typeof m.type==="string"){if(an(m,e,r,n,i),n.index>=r.length)return}}else if(typeof l.type==="string"){if(an(l,e,r,n,i),n.index>=r.length)return}}if(n.index<r.length){let a=r[n.index];if(t===void 0||e.end!==t.end){let p=i.slice(e.end??0,a.start);if((t?.type==="BlockStatement"||t?.type==="Program")&&sn(t.body,e)||t?.type==="ArrayExpression"&&sn(t.elements,e)||t?.type==="ObjectExpression"&&sn(t.properties,e))while(n.index<r.length){if(t&&r[n.index].start>=(t.end??Number.POSITIVE_INFINITY))break;n.index++}else if((e.end??0)<=a.start&&_p.test(p))n.index++}}}function sn(e,t){return!!e&&e.indexOf(t)===e.length-1}var Hs=ne,Lp=Hs.extend(Fs());function cn(e){return e?Lp:Hs}var Dp={onComment:dr,sourceType:"module",ecmaVersion:16},Rp={onComment:dr,sourceType:"module",ecmaVersion:16,preserveParens:!0},Mp={onComment:dr,sourceType:"module",ecmaVersion:16};function qs(e,t,r,n,i){if(r.length===i)return;on(e,t,r,n)}function Us(e,t,r){let n=r.length;hr(e,r);let i=cn(t).parse(e,Dp);if(r.length>0)on(i,e,r,n);return i}var Op={count:0};function lt(e,t,r,n){Op.count+=1;let i=n.length;hr(e,n);let o=cn(r).parseExpressionAt(e,t,Rp);qs(o,e,n,t,i);let a=n.length>i?n.at(-1):void 0,p=a&&a.end>(o.end??0)?a.end:o.end??0,l=o.end??t;return{node:Bp(e,t,l,40)?Fp(o):o,end:p}}function Bp(e,t,r,n){for(let i=t;i<r;i++)if(e.charCodeAt(i)===n)return!0;return!1}function Gs(e,t,r,n){let i=n.length,o=cn(r);hr(e,n);let a=new o(Mp,e,t);a.nextToken();let p=a.parseStatement(null,!0,Object.create(null));return qs(p,e,n,t,i),p}function Fp(e){return js(e,null,{ParenthesizedExpression(t,r){return r.visit(t.expression)}})}function rt(e){if(e===32||e<=13&&e>=9)return!0;if(e<160)return!1;return e===160||e===5760||e>=8192&&e<=8202||e===8232||e===8233||e===8239||e===8287||e===12288||e===65279}class pn{source;index=0;constructor(e){this.source=e}match(e){if(e.length===1)return this.source.charCodeAt(this.index)===e.charCodeAt(0);return this.source.startsWith(e,this.index)}matchRegex(e){e.lastIndex=this.index;let t=e.exec(this.source);if(!t||t.index!==this.index)return null;return t[0]}eat(e,t=!1){if(this.match(e))return this.index+=e.length,!0;if(t)throw new Ge(`Expected token ${JSON.stringify(e)}`,this.index);return!1}read(e){let t=this.matchRegex(e);if(t)this.index+=t.length;return t}readUntil(e){if(this.index>=this.source.length)throw new Ge("Unexpected end of input",this.source.length);let t=this.index;e.lastIndex=t;let r=e.exec(this.source);if(r)return this.index=r.index,this.source.slice(t,this.index);return this.index=this.source.length,this.source.slice(t)}readUntilString(e){if(this.index>=this.source.length)throw new Ge("Unexpected end of input",this.source.length);let t=this.source.indexOf(e,this.index),r=t===-1?this.source.length:t,n=this.source.slice(this.index,r);return this.index=r,n}allowWhitespace(){while(this.index<this.source.length&&rt(this.source.charCodeAt(this.index)))this.index++}requireWhitespace(){if(!rt(this.source.charCodeAt(this.index)))throw new Ge("Expected whitespace",this.index);this.allowWhitespace()}readIdentifierName(){let e=this.index,t=e,r="",n=this.source.codePointAt(this.index);if(n!==void 0&&he(n,!0)){t+=n<=65535?1:2;while(t<this.source.length){let i=this.source.codePointAt(t);if(i===void 0||!ye(i,!0))break;t+=i<=65535?1:2}r=this.source.slice(e,t),this.index=t}return{type:"Identifier",name:r,start:e,end:t}}}class Ge extends Error{position;constructor(e,t){super(`${e} (at index ${t})`);this.name="TemplateSyntaxError",this.position=t}}function fe(){return{type:"Fragment",nodes:[]}}var Vp=new Set(["await","break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","export","extends","finally","for","function","if","implements","import","in","instanceof","interface","let","new","package","private","protected","public","return","static","super","switch","this","throw","try","typeof","var","void","while","with","yield"]),jp=["&&","||","??"],$p=["===","!==","==","!="];function Ws(e,t){let r=e.codePointAt(t);if(r===void 0||!he(r,!0))return t;let n=t+(r<=65535?1:2);while(n<e.length){let i=e.codePointAt(n);if(!ye(i,!0))break;n+=i<=65535?1:2}return n}function Hp(e,t){let r=t;while(r<e.length){let n=e.charCodeAt(r);if(n<48||n>57)break;r++}return r}function fr(e,t){let r=t;while(r<e.length&&rt(e.charCodeAt(r)))r++;return r}function Ks(e,t){let r=Hp(e,t);if(r===t)return null;if(e.charCodeAt(t)===48&&r-t>1)return null;if(r<e.length){let i=e.codePointAt(r);if(i===46||ye(i,!0))return null}let n=e.slice(t,r);return{type:"Literal",start:t,end:r,value:Number(n),raw:n}}function zs(e,t){let r=e.charCodeAt(t),n=t+1;while(n<e.length){let i=e.charCodeAt(n);if(i===r){let o=e.slice(t,n+1);return{type:"Literal",start:t,end:n+1,value:e.slice(t+1,n),raw:o}}if(i===92||i===10||i===13)return null;n++}return null}function qp(e,t){let r=e.charCodeAt(t);if(r===34||r===39)return zs(e,t);let n=Ws(e,t);if(n===t)return Ks(e,t);let i=e.slice(t,n);if(i==="true"||i==="false")return{type:"Literal",start:t,end:n,value:i==="true",raw:i};if(i==="null")return{type:"Literal",start:t,end:n,value:null,raw:i};if(Vp.has(i))return null;let o={type:"Identifier",start:t,end:n,name:i},a=n;while(a<e.length){let p=e.charCodeAt(a);if(p===46){let l=a+1,m=Ws(e,l);if(m===l)return null;let d={type:"Identifier",start:l,end:m,name:e.slice(l,m)};o={type:"MemberExpression",start:t,end:m,object:o,property:d,computed:!1,optional:!1},a=m}else if(p===91){let l=a+1,m=e.charCodeAt(l),d=m===34||m===39?zs(e,l):Ks(e,l);if(!d||e.charCodeAt(d.end)!==93)return null;o={type:"MemberExpression",start:t,end:d.end+1,object:o,property:d,computed:!0,optional:!1},a=d.end+1}else break}return o}function ln(e,t){if(e.charCodeAt(t)!==33||e.charCodeAt(t+1)===61)return qp(e,t);let r=ln(e,fr(e,t+1));if(!r)return null;return{type:"UnaryExpression",start:t,end:r.end,operator:"!",prefix:!0,argument:r}}function Up(e,t){for(let r of $p)if(e.startsWith(r,t))return{operator:r,logical:!1};for(let r of jp)if(e.startsWith(r,t))return{operator:r,logical:!0};return null}function Xs(e,t){let r=fr(e,t);if(r>=e.length)return!1;let n=e.charCodeAt(r);return n===125||n===41}function Gp(e){let t=e.source,r=ln(t,e.index);if(!r)return null;if(Xs(t,r.end))return e.index=r.end,r;let n=fr(t,r.end),i=Up(t,n);if(!i)return null;let o=ln(t,fr(t,n+i.operator.length));if(!o||!Xs(t,o.end))return null;return e.index=o.end,{type:i.logical?"LogicalExpression":"BinaryExpression",start:r.start,end:o.end,left:r,operator:i.operator,right:o}}function ce(e){let t=Gp(e);if(t)return t;let{node:r,end:n}=lt(e.source,e.index,e.isTypeScript,e.root.comments);return e.index=n,r}var Wp={"CounterClockwiseContourIntegral;":8755,"ClockwiseContourIntegral;":8754,"DoubleLongLeftRightArrow;":10234,"NotNestedGreaterGreater;":10914,"DiacriticalDoubleAcute;":733,"NotSquareSupersetEqual;":8931,"CloseCurlyDoubleQuote;":8221,"DoubleContourIntegral;":8751,"FilledVerySmallSquare;":9642,"NegativeVeryThinSpace;":8203,"NotPrecedesSlantEqual;":8928,"NotRightTriangleEqual;":8941,"NotSucceedsSlantEqual;":8929,"CapitalDifferentialD;":8517,"DoubleLeftRightArrow;":8660,"DoubleLongRightArrow;":10233,"EmptyVerySmallSquare;":9643,"NestedGreaterGreater;":8811,"NotDoubleVerticalBar;":8742,"NotGreaterSlantEqual;":10878,"NotLeftTriangleEqual;":8940,"NotSquareSubsetEqual;":8930,"OpenCurlyDoubleQuote;":8220,"ReverseUpEquilibrium;":10607,"DoubleLongLeftArrow;":10232,"DownLeftRightVector;":10576,"LeftArrowRightArrow;":8646,"NegativeMediumSpace;":8203,"NotGreaterFullEqual;":8807,"NotRightTriangleBar;":10704,"RightArrowLeftArrow;":8644,"SquareSupersetEqual;":8850,"leftrightsquigarrow;":8621,"DownRightTeeVector;":10591,"DownRightVectorBar;":10583,"LongLeftRightArrow;":10231,"Longleftrightarrow;":10234,"NegativeThickSpace;":8203,"NotLeftTriangleBar;":10703,"PrecedesSlantEqual;":8828,"ReverseEquilibrium;":8651,"RightDoubleBracket;":10215,"RightDownTeeVector;":10589,"RightDownVectorBar;":10581,"RightTriangleEqual;":8885,"SquareIntersection;":8851,"SucceedsSlantEqual;":8829,"blacktriangleright;":9656,"longleftrightarrow;":10231,"DoubleUpDownArrow;":8661,"DoubleVerticalBar;":8741,"DownLeftTeeVector;":10590,"DownLeftVectorBar;":10582,"FilledSmallSquare;":9724,"GreaterSlantEqual;":10878,"LeftDoubleBracket;":10214,"LeftDownTeeVector;":10593,"LeftDownVectorBar;":10585,"LeftTriangleEqual;":8884,"NegativeThinSpace;":8203,"NotGreaterGreater;":8811,"NotLessSlantEqual;":10877,"NotNestedLessLess;":10913,"NotReverseElement;":8716,"NotSquareSuperset;":8848,"NotTildeFullEqual;":8775,"RightAngleBracket;":10217,"RightUpDownVector;":10575,"SquareSubsetEqual;":8849,"VerticalSeparator;":10072,"blacktriangledown;":9662,"blacktriangleleft;":9666,"leftrightharpoons;":8651,"rightleftharpoons;":8652,"twoheadrightarrow;":8608,"DiacriticalAcute;":180,"DiacriticalGrave;":96,"DiacriticalTilde;":732,"DoubleRightArrow;":8658,"DownArrowUpArrow;":8693,"EmptySmallSquare;":9723,"GreaterEqualLess;":8923,"GreaterFullEqual;":8807,"LeftAngleBracket;":10216,"LeftUpDownVector;":10577,"LessEqualGreater;":8922,"NonBreakingSpace;":160,"NotPrecedesEqual;":10927,"NotRightTriangle;":8939,"NotSucceedsEqual;":10928,"NotSucceedsTilde;":8831,"NotSupersetEqual;":8841,"RightTriangleBar;":10704,"RightUpTeeVector;":10588,"RightUpVectorBar;":10580,"UnderParenthesis;":9181,"UpArrowDownArrow;":8645,"circlearrowright;":8635,"downharpoonright;":8642,"ntrianglerighteq;":8941,"rightharpoondown;":8641,"rightrightarrows;":8649,"twoheadleftarrow;":8606,"vartriangleright;":8883,"CloseCurlyQuote;":8217,"ContourIntegral;":8750,"DoubleDownArrow;":8659,"DoubleLeftArrow;":8656,"DownRightVector;":8641,"LeftRightVector;":10574,"LeftTriangleBar;":10703,"LeftUpTeeVector;":10592,"LeftUpVectorBar;":10584,"LowerRightArrow;":8600,"NotGreaterEqual;":8817,"NotGreaterTilde;":8821,"NotHumpDownHump;":8782,"NotLeftTriangle;":8938,"NotSquareSubset;":8847,"OverParenthesis;":9180,"RightDownVector;":8642,"ShortRightArrow;":8594,"UpperRightArrow;":8599,"bigtriangledown;":9661,"circlearrowleft;":8634,"curvearrowright;":8631,"downharpoonleft;":8643,"leftharpoondown;":8637,"leftrightarrows;":8646,"nLeftrightarrow;":8654,"nleftrightarrow;":8622,"ntrianglelefteq;":8940,"rightleftarrows;":8644,"rightsquigarrow;":8605,"rightthreetimes;":8908,"straightepsilon;":1013,"trianglerighteq;":8885,"vartriangleleft;":8882,"DiacriticalDot;":729,"DoubleRightTee;":8872,"DownLeftVector;":8637,"GreaterGreater;":10914,"HorizontalLine;":9472,"InvisibleComma;":8291,"InvisibleTimes;":8290,"LeftDownVector;":8643,"LeftRightArrow;":8596,"Leftrightarrow;":8660,"LessSlantEqual;":10877,"LongRightArrow;":10230,"Longrightarrow;":10233,"LowerLeftArrow;":8601,"NestedLessLess;":8810,"NotGreaterLess;":8825,"NotLessGreater;":8824,"NotSubsetEqual;":8840,"NotVerticalBar;":8740,"OpenCurlyQuote;":8216,"ReverseElement;":8715,"RightTeeVector;":10587,"RightVectorBar;":10579,"ShortDownArrow;":8595,"ShortLeftArrow;":8592,"SquareSuperset;":8848,"TildeFullEqual;":8773,"UpperLeftArrow;":8598,"ZeroWidthSpace;":8203,"curvearrowleft;":8630,"doublebarwedge;":8966,"downdownarrows;":8650,"hookrightarrow;":8618,"leftleftarrows;":8647,"leftrightarrow;":8596,"leftthreetimes;":8907,"longrightarrow;":10230,"looparrowright;":8620,"nshortparallel;":8742,"ntriangleright;":8939,"rightarrowtail;":8611,"rightharpoonup;":8640,"trianglelefteq;":8884,"upharpoonright;":8638,"ApplyFunction;":8289,"DifferentialD;":8518,"DoubleLeftTee;":10980,"DoubleUpArrow;":8657,"LeftTeeVector;":10586,"LeftVectorBar;":10578,"LessFullEqual;":8806,"LongLeftArrow;":10229,"Longleftarrow;":10232,"NotEqualTilde;":8770,"NotTildeEqual;":8772,"NotTildeTilde;":8777,"Poincareplane;":8460,"PrecedesEqual;":10927,"PrecedesTilde;":8830,"RightArrowBar;":8677,"RightTeeArrow;":8614,"RightTriangle;":8883,"RightUpVector;":8638,"SucceedsEqual;":10928,"SucceedsTilde;":8831,"SupersetEqual;":8839,"UpEquilibrium;":10606,"VerticalTilde;":8768,"VeryThinSpace;":8202,"bigtriangleup;":9651,"blacktriangle;":9652,"divideontimes;":8903,"fallingdotseq;":8786,"hookleftarrow;":8617,"leftarrowtail;":8610,"leftharpoonup;":8636,"longleftarrow;":10229,"looparrowleft;":8619,"measuredangle;":8737,"ntriangleleft;":8938,"shortparallel;":8741,"smallsetminus;":8726,"triangleright;":9657,"upharpoonleft;":8639,"varsubsetneqq;":10955,"varsupsetneqq;":10956,"DownArrowBar;":10515,"DownTeeArrow;":8615,"ExponentialE;":8519,"GreaterEqual;":8805,"GreaterTilde;":8819,"HilbertSpace;":8459,"HumpDownHump;":8782,"Intersection;":8898,"LeftArrowBar;":8676,"LeftTeeArrow;":8612,"LeftTriangle;":8882,"LeftUpVector;":8639,"NotCongruent;":8802,"NotHumpEqual;":8783,"NotLessEqual;":8816,"NotLessTilde;":8820,"Proportional;":8733,"RightCeiling;":8969,"RoundImplies;":10608,"ShortUpArrow;":8593,"SquareSubset;":8847,"UnderBracket;":9141,"VerticalLine;":124,"blacklozenge;":10731,"exponentiale;":8519,"risingdotseq;":8787,"triangledown;":9663,"triangleleft;":9667,"varsubsetneq;":8842,"varsupsetneq;":8843,"CircleMinus;":8854,"CircleTimes;":8855,"Equilibrium;":8652,"GreaterLess;":8823,"LeftCeiling;":8968,"LessGreater;":8822,"MediumSpace;":8287,"NotLessLess;":8810,"NotPrecedes;":8832,"NotSucceeds;":8833,"NotSuperset;":8835,"OverBracket;":9140,"RightVector;":8640,"Rrightarrow;":8667,"RuleDelayed;":10740,"SmallCircle;":8728,"SquareUnion;":8852,"SubsetEqual;":8838,"UpDownArrow;":8597,"Updownarrow;":8661,"VerticalBar;":8739,"backepsilon;":1014,"blacksquare;":9642,"circledcirc;":8858,"circleddash;":8861,"curlyeqprec;":8926,"curlyeqsucc;":8927,"diamondsuit;":9830,"eqslantless;":10901,"expectation;":8496,"nRightarrow;":8655,"nrightarrow;":8603,"preccurlyeq;":8828,"precnapprox;":10937,"quaternions;":8461,"straightphi;":981,"succcurlyeq;":8829,"succnapprox;":10938,"thickapprox;":8776,"updownarrow;":8597,"Bernoullis;":8492,"CirclePlus;":8853,"EqualTilde;":8770,"Fouriertrf;":8497,"ImaginaryI;":8520,"Laplacetrf;":8466,"LeftVector;":8636,"Lleftarrow;":8666,"NotElement;":8713,"NotGreater;":8815,"Proportion;":8759,"RightArrow;":8594,"RightFloor;":8971,"Rightarrow;":8658,"ThickSpace;":8287,"TildeEqual;":8771,"TildeTilde;":8776,"UnderBrace;":9183,"UpArrowBar;":10514,"UpTeeArrow;":8613,"circledast;":8859,"complement;":8705,"curlywedge;":8911,"eqslantgtr;":10902,"gtreqqless;":10892,"lessapprox;":10885,"lesseqqgtr;":10891,"lmoustache;":9136,"longmapsto;":10236,"mapstodown;":8615,"mapstoleft;":8612,"nLeftarrow;":8653,"nleftarrow;":8602,"nsubseteqq;":10949,"nsupseteqq;":10950,"precapprox;":10935,"rightarrow;":8594,"rmoustache;":9137,"sqsubseteq;":8849,"sqsupseteq;":8850,"subsetneqq;":10955,"succapprox;":10936,"supsetneqq;":10956,"upuparrows;":8648,"varepsilon;":1013,"varnothing;":8709,"Backslash;":8726,"CenterDot;":183,"CircleDot;":8857,"Congruent;":8801,"Coproduct;":8720,"DoubleDot;":168,"DownArrow;":8595,"DownBreve;":785,"Downarrow;":8659,"HumpEqual;":8783,"LeftArrow;":8592,"LeftFloor;":8970,"Leftarrow;":8656,"LessTilde;":8818,"Mellintrf;":8499,"MinusPlus;":8723,"NotCupCap;":8813,"NotExists;":8708,"NotSubset;":8834,"OverBrace;":9182,"PlusMinus;":177,"Therefore;":8756,"ThinSpace;":8201,"TripleDot;":8411,"UnionPlus;":8846,"backprime;":8245,"backsimeq;":8909,"bigotimes;":10754,"centerdot;":183,"checkmark;":10003,"complexes;":8450,"dotsquare;":8865,"downarrow;":8595,"gtrapprox;":10886,"gtreqless;":8923,"gvertneqq;":8809,"heartsuit;":9829,"leftarrow;":8592,"lesseqgtr;":8922,"lvertneqq;":8808,"ngeqslant;":10878,"nleqslant;":10877,"nparallel;":8742,"nshortmid;":8740,"nsubseteq;":8840,"nsupseteq;":8841,"pitchfork;":8916,"rationals;":8474,"spadesuit;":9824,"subseteqq;":10949,"subsetneq;":8842,"supseteqq;":10950,"supsetneq;":8843,"therefore;":8756,"triangleq;":8796,"varpropto;":8733,"DDotrahd;":10513,"DotEqual;":8784,"Integral;":8747,"LessLess;":10913,"NotEqual;":8800,"NotTilde;":8769,"PartialD;":8706,"Precedes;":8826,"RightTee;":8866,"Succeeds;":8827,"SuchThat;":8715,"Superset;":8835,"Uarrocir;":10569,"UnderBar;":95,"andslope;":10840,"angmsdaa;":10664,"angmsdab;":10665,"angmsdac;":10666,"angmsdad;":10667,"angmsdae;":10668,"angmsdaf;":10669,"angmsdag;":10670,"angmsdah;":10671,"angrtvbd;":10653,"approxeq;":8778,"awconint;":8755,"backcong;":8780,"barwedge;":8965,"bbrktbrk;":9142,"bigoplus;":10753,"bigsqcup;":10758,"biguplus;":10756,"bigwedge;":8896,"boxminus;":8863,"boxtimes;":8864,"bsolhsub;":10184,"capbrcup;":10825,"circledR;":174,"circledS;":9416,"cirfnint;":10768,"clubsuit;":9827,"cupbrcap;":10824,"curlyvee;":8910,"cwconint;":8754,"doteqdot;":8785,"dotminus;":8760,"drbkarow;":10512,"dzigrarr;":10239,"elinters;":9191,"emptyset;":8709,"eqvparsl;":10725,"fpartint;":10765,"geqslant;":10878,"gesdotol;":10884,"gnapprox;":10890,"hksearow;":10533,"hkswarow;":10534,"imagline;":8464,"imagpart;":8465,"infintie;":10717,"integers;":8484,"intercal;":8890,"intlarhk;":10775,"laemptyv;":10676,"ldrushar;":10571,"leqslant;":10877,"lesdotor;":10883,"llcorner;":8990,"lnapprox;":10889,"lrcorner;":8991,"lurdshar;":10570,"mapstoup;":8613,"multimap;":8888,"naturals;":8469,"ncongdot;":10861,"notindot;":8949,"otimesas;":10806,"parallel;":8741,"plusacir;":10787,"pointint;":10773,"precneqq;":10933,"precnsim;":8936,"profalar;":9006,"profline;":8978,"profsurf;":8979,"raemptyv;":10675,"realpart;":8476,"rppolint;":10770,"rtriltri;":10702,"scpolint;":10771,"setminus;":8726,"shortmid;":8739,"smeparsl;":10724,"sqsubset;":8847,"sqsupset;":8848,"subseteq;":8838,"succneqq;":10934,"succnsim;":8937,"supseteq;":8839,"thetasym;":977,"thicksim;":8764,"timesbar;":10801,"triangle;":9653,"triminus;":10810,"trpezium;":9186,"ulcorner;":8988,"urcorner;":8989,"varkappa;":1008,"varsigma;":962,"vartheta;":977,"Because;":8757,"Cayleys;":8493,"Cconint;":8752,"Cedilla;":184,"Diamond;":8900,"DownTee;":8868,"Element;":8712,"Epsilon;":917,"Implies;":8658,"LeftTee;":8867,"NewLine;":10,"NoBreak;":8288,"NotLess;":8814,"Omicron;":927,"OverBar;":8254,"Product;":8719,"UpArrow;":8593,"Uparrow;":8657,"Upsilon;":933,"alefsym;":8501,"angrtvb;":8894,"angzarr;":9084,"asympeq;":8781,"backsim;":8765,"because;":8757,"bemptyv;":10672,"between;":8812,"bigcirc;":9711,"bigodot;":10752,"bigstar;":9733,"bnequiv;":8801,"boxplus;":8862,"ccupssm;":10832,"cemptyv;":10674,"cirscir;":10690,"coloneq;":8788,"congdot;":10861,"cudarrl;":10552,"cudarrr;":10549,"cularrp;":10557,"curarrm;":10556,"dbkarow;":10511,"ddagger;":8225,"ddotseq;":10871,"demptyv;":10673,"diamond;":8900,"digamma;":989,"dotplus;":8724,"dwangle;":10662,"epsilon;":949,"eqcolon;":8789,"equivDD;":10872,"gesdoto;":10882,"gtquest;":10876,"gtrless;":8823,"harrcir;":10568,"intprod;":10812,"isindot;":8949,"larrbfs;":10527,"larrsim;":10611,"lbrksld;":10639,"lbrkslu;":10637,"ldrdhar;":10599,"lesdoto;":10881,"lessdot;":8918,"lessgtr;":8822,"lesssim;":8818,"lotimes;":10804,"lozenge;":9674,"ltquest;":10875,"luruhar;":10598,"maltese;":10016,"minusdu;":10794,"napprox;":8777,"natural;":9838,"nearrow;":8599,"nexists;":8708,"notinva;":8713,"notinvb;":8951,"notinvc;":8950,"notniva;":8716,"notnivb;":8958,"notnivc;":8957,"npolint;":10772,"npreceq;":10927,"nsqsube;":8930,"nsqsupe;":8931,"nsubset;":8834,"nsucceq;":10928,"nsupset;":8835,"nvinfin;":10718,"nvltrie;":8884,"nvrtrie;":8885,"nwarrow;":8598,"olcross;":10683,"omicron;":959,"orderof;":8500,"orslope;":10839,"pertenk;":8241,"planckh;":8462,"pluscir;":10786,"plussim;":10790,"plustwo;":10791,"precsim;":8830,"quatint;":10774,"questeq;":8799,"rarrbfs;":10528,"rarrsim;":10612,"rbrksld;":10638,"rbrkslu;":10640,"rdldhar;":10601,"realine;":8475,"rotimes;":10805,"ruluhar;":10600,"searrow;":8600,"simplus;":10788,"simrarr;":10610,"subedot;":10947,"submult;":10945,"subplus;":10943,"subrarr;":10617,"succsim;":8831,"supdsub;":10968,"supedot;":10948,"suphsol;":10185,"suphsub;":10967,"suplarr;":10619,"supmult;":10946,"supplus;":10944,"swarrow;":8601,"topfork;":10970,"triplus;":10809,"tritime;":10811,"uparrow;":8593,"upsilon;":965,"uwangle;":10663,"vzigzag;":10650,"zigrarr;":8669,"Aacute;":193,"Abreve;":258,"Agrave;":192,"Assign;":8788,"Atilde;":195,"Barwed;":8966,"Bumpeq;":8782,"Cacute;":262,"Ccaron;":268,"Ccedil;":199,"Colone;":10868,"Conint;":8751,"CupCap;":8781,"Dagger;":8225,"Dcaron;":270,"DotDot;":8412,"Dstrok;":272,"Eacute;":201,"Ecaron;":282,"Egrave;":200,"Exists;":8707,"ForAll;":8704,"Gammad;":988,"Gbreve;":286,"Gcedil;":290,"HARDcy;":1066,"Hstrok;":294,"Iacute;":205,"Igrave;":204,"Itilde;":296,"Jsercy;":1032,"Kcedil;":310,"Lacute;":313,"Lambda;":923,"Lcaron;":317,"Lcedil;":315,"Lmidot;":319,"Lstrok;":321,"Nacute;":323,"Ncaron;":327,"Ncedil;":325,"Ntilde;":209,"Oacute;":211,"Odblac;":336,"Ograve;":210,"Oslash;":216,"Otilde;":213,"Otimes;":10807,"Racute;":340,"Rarrtl;":10518,"Rcaron;":344,"Rcedil;":342,"SHCHcy;":1065,"SOFTcy;":1068,"Sacute;":346,"Scaron;":352,"Scedil;":350,"Square;":9633,"Subset;":8912,"Supset;":8913,"Tcaron;":356,"Tcedil;":354,"Tstrok;":358,"Uacute;":218,"Ubreve;":364,"Udblac;":368,"Ugrave;":217,"Utilde;":360,"Vdashl;":10982,"Verbar;":8214,"Vvdash;":8874,"Yacute;":221,"Zacute;":377,"Zcaron;":381,"aacute;":225,"abreve;":259,"agrave;":224,"andand;":10837,"angmsd;":8737,"angsph;":8738,"apacir;":10863,"approx;":8776,"atilde;":227,"barvee;":8893,"barwed;":8965,"becaus;":8757,"bernou;":8492,"bigcap;":8898,"bigcup;":8899,"bigvee;":8897,"bkarow;":10509,"bottom;":8869,"bowtie;":8904,"boxbox;":10697,"bprime;":8245,"brvbar;":166,"bullet;":8226,"bumpeq;":8783,"cacute;":263,"capand;":10820,"capcap;":10827,"capcup;":10823,"capdot;":10816,"ccaron;":269,"ccedil;":231,"circeq;":8791,"cirmid;":10991,"colone;":8788,"commat;":64,"compfn;":8728,"conint;":8750,"coprod;":8720,"copysr;":8471,"cularr;":8630,"cupcap;":10822,"cupcup;":10826,"cupdot;":8845,"curarr;":8631,"curren;":164,"cylcty;":9005,"dagger;":8224,"daleth;":8504,"dcaron;":271,"dfisht;":10623,"divide;":247,"divonx;":8903,"dlcorn;":8990,"dlcrop;":8973,"dollar;":36,"drcorn;":8991,"drcrop;":8972,"dstrok;":273,"eacute;":233,"easter;":10862,"ecaron;":283,"ecolon;":8789,"egrave;":232,"egsdot;":10904,"elsdot;":10903,"emptyv;":8709,"emsp13;":8196,"emsp14;":8197,"eparsl;":10723,"eqcirc;":8790,"equals;":61,"equest;":8799,"female;":9792,"ffilig;":64259,"ffllig;":64260,"forall;":8704,"frac12;":189,"frac13;":8531,"frac14;":188,"frac15;":8533,"frac16;":8537,"frac18;":8539,"frac23;":8532,"frac25;":8534,"frac34;":190,"frac35;":8535,"frac38;":8540,"frac45;":8536,"frac56;":8538,"frac58;":8541,"frac78;":8542,"gacute;":501,"gammad;":989,"gbreve;":287,"gesdot;":10880,"gesles;":10900,"gtlPar;":10645,"gtrarr;":10616,"gtrdot;":8919,"gtrsim;":8819,"hairsp;":8202,"hamilt;":8459,"hardcy;":1098,"hearts;":9829,"hellip;":8230,"hercon;":8889,"homtht;":8763,"horbar;":8213,"hslash;":8463,"hstrok;":295,"hybull;":8259,"hyphen;":8208,"iacute;":237,"igrave;":236,"iiiint;":10764,"iinfin;":10716,"incare;":8453,"inodot;":305,"intcal;":8890,"iquest;":191,"isinsv;":8947,"itilde;":297,"jsercy;":1112,"kappav;":1008,"kcedil;":311,"kgreen;":312,"lAtail;":10523,"lacute;":314,"lagran;":8466,"lambda;":955,"langle;":10216,"larrfs;":10525,"larrhk;":8617,"larrlp;":8619,"larrpl;":10553,"larrtl;":8610,"latail;":10521,"lbrace;":123,"lbrack;":91,"lcaron;":318,"lcedil;":316,"ldquor;":8222,"lesdot;":10879,"lesges;":10899,"lfisht;":10620,"lfloor;":8970,"lharul;":10602,"llhard;":10603,"lmidot;":320,"lmoust;":9136,"loplus;":10797,"lowast;":8727,"lowbar;":95,"lparlt;":10643,"lrhard;":10605,"lsaquo;":8249,"lsquor;":8218,"lstrok;":322,"lthree;":8907,"ltimes;":8905,"ltlarr;":10614,"ltrPar;":10646,"mapsto;":8614,"marker;":9646,"mcomma;":10793,"midast;":42,"midcir;":10992,"middot;":183,"minusb;":8863,"minusd;":8760,"mnplus;":8723,"models;":8871,"mstpos;":8766,"nVDash;":8879,"nVdash;":8878,"nacute;":324,"nbumpe;":8783,"ncaron;":328,"ncedil;":326,"nearhk;":10532,"nequiv;":8802,"nesear;":10536,"nexist;":8708,"nltrie;":8940,"notinE;":8953,"nparsl;":11005,"nprcue;":8928,"nrarrc;":10547,"nrarrw;":8605,"nrtrie;":8941,"nsccue;":8929,"nsimeq;":8772,"ntilde;":241,"numero;":8470,"nvDash;":8877,"nvHarr;":10500,"nvdash;":8876,"nvlArr;":10498,"nvrArr;":10499,"nwarhk;":10531,"nwnear;":10535,"oacute;":243,"odblac;":337,"odsold;":10684,"ograve;":242,"ominus;":8854,"origof;":8886,"oslash;":248,"otilde;":245,"otimes;":8855,"parsim;":10995,"percnt;":37,"period;":46,"permil;":8240,"phmmat;":8499,"planck;":8463,"plankv;":8463,"plusdo;":8724,"plusdu;":10789,"plusmn;":177,"preceq;":10927,"primes;":8473,"prnsim;":8936,"propto;":8733,"prurel;":8880,"puncsp;":8200,"qprime;":8279,"rAtail;":10524,"racute;":341,"rangle;":10217,"rarrap;":10613,"rarrfs;":10526,"rarrhk;":8618,"rarrlp;":8620,"rarrpl;":10565,"rarrtl;":8611,"ratail;":10522,"rbrace;":125,"rbrack;":93,"rcaron;":345,"rcedil;":343,"rdquor;":8221,"rfisht;":10621,"rfloor;":8971,"rharul;":10604,"rmoust;":9137,"roplus;":10798,"rpargt;":10644,"rsaquo;":8250,"rsquor;":8217,"rthree;":8908,"rtimes;":8906,"sacute;":347,"scaron;":353,"scedil;":351,"scnsim;":8937,"searhk;":10533,"seswar;":10537,"sfrown;":8994,"shchcy;":1097,"sigmaf;":962,"sigmav;":962,"simdot;":10858,"smashp;":10803,"softcy;":1100,"solbar;":9023,"spades;":9824,"sqcaps;":8851,"sqcups;":8852,"sqsube;":8849,"sqsupe;":8850,"square;":9633,"squarf;":9642,"ssetmn;":8726,"ssmile;":8995,"sstarf;":8902,"subdot;":10941,"subset;":8834,"subsim;":10951,"subsub;":10965,"subsup;":10963,"succeq;":10928,"supdot;":10942,"supset;":8835,"supsim;":10952,"supsub;":10964,"supsup;":10966,"swarhk;":10534,"swnwar;":10538,"target;":8982,"tcaron;":357,"tcedil;":355,"telrec;":8981,"there4;":8756,"thetav;":977,"thinsp;":8201,"thksim;":8764,"timesb;":8864,"timesd;":10800,"topbot;":9014,"topcir;":10993,"tprime;":8244,"tridot;":9708,"tstrok;":359,"uacute;":250,"ubreve;":365,"udblac;":369,"ufisht;":10622,"ugrave;":249,"ulcorn;":8988,"ulcrop;":8975,"urcorn;":8989,"urcrop;":8974,"utilde;":361,"vangrt;":10652,"varphi;":981,"varrho;":1009,"veebar;":8891,"vellip;":8942,"verbar;":124,"vsubnE;":10955,"vsubne;":8842,"vsupnE;":10956,"vsupne;":8843,"wedbar;":10847,"wedgeq;":8793,"weierp;":8472,"wreath;":8768,"xoplus;":10753,"xotime;":10754,"xsqcup;":10758,"xuplus;":10756,"xwedge;":8896,"yacute;":253,"zacute;":378,"zcaron;":382,"zeetrf;":8488,"AElig;":198,Aacute:193,"Acirc;":194,Agrave:192,"Alpha;":913,"Amacr;":256,"Aogon;":260,"Aring;":197,Atilde:195,"Breve;":728,Ccedil:199,"Ccirc;":264,"Colon;":8759,"Cross;":10799,"Dashv;":10980,"Delta;":916,Eacute:201,"Ecirc;":202,Egrave:200,"Emacr;":274,"Eogon;":280,"Equal;":10869,"Gamma;":915,"Gcirc;":284,"Hacek;":711,"Hcirc;":292,"IJlig;":306,Iacute:205,"Icirc;":206,Igrave:204,"Imacr;":298,"Iogon;":302,"Iukcy;":1030,"Jcirc;":308,"Jukcy;":1028,"Kappa;":922,Ntilde:209,"OElig;":338,Oacute:211,"Ocirc;":212,Ograve:210,"Omacr;":332,"Omega;":937,Oslash:216,Otilde:213,"Prime;":8243,"RBarr;":10512,"Scirc;":348,"Sigma;":931,"THORN;":222,"TRADE;":8482,"TSHcy;":1035,"Theta;":920,"Tilde;":8764,Uacute:218,"Ubrcy;":1038,"Ucirc;":219,Ugrave:217,"Umacr;":362,"Union;":8899,"Uogon;":370,"UpTee;":8869,"Uring;":366,"VDash;":8875,"Vdash;":8873,"Wcirc;":372,"Wedge;":8896,Yacute:221,"Ycirc;":374,aacute:225,"acirc;":226,"acute;":180,"aelig;":230,agrave:224,"aleph;":8501,"alpha;":945,"amacr;":257,"amalg;":10815,"angle;":8736,"angrt;":8735,"angst;":197,"aogon;":261,"aring;":229,"asymp;":8776,atilde:227,"awint;":10769,"bcong;":8780,"bdquo;":8222,"bepsi;":1014,"blank;":9251,"blk12;":9618,"blk14;":9617,"blk34;":9619,"block;":9608,"boxDL;":9559,"boxDR;":9556,"boxDl;":9558,"boxDr;":9555,"boxHD;":9574,"boxHU;":9577,"boxHd;":9572,"boxHu;":9575,"boxUL;":9565,"boxUR;":9562,"boxUl;":9564,"boxUr;":9561,"boxVH;":9580,"boxVL;":9571,"boxVR;":9568,"boxVh;":9579,"boxVl;":9570,"boxVr;":9567,"boxdL;":9557,"boxdR;":9554,"boxdl;":9488,"boxdr;":9484,"boxhD;":9573,"boxhU;":9576,"boxhd;":9516,"boxhu;":9524,"boxuL;":9563,"boxuR;":9560,"boxul;":9496,"boxur;":9492,"boxvH;":9578,"boxvL;":9569,"boxvR;":9566,"boxvh;":9532,"boxvl;":9508,"boxvr;":9500,"breve;":728,brvbar:166,"bsemi;":8271,"bsime;":8909,"bsolb;":10693,"bumpE;":10926,"bumpe;":8783,"caret;":8257,"caron;":711,"ccaps;":10829,ccedil:231,"ccirc;":265,"ccups;":10828,"cedil;":184,"check;":10003,"clubs;":9827,"colon;":58,"comma;":44,"crarr;":8629,"cross;":10007,"csube;":10961,"csupe;":10962,"ctdot;":8943,"cuepr;":8926,"cuesc;":8927,"cupor;":10821,curren:164,"cuvee;":8910,"cuwed;":8911,"cwint;":8753,"dashv;":8867,"dblac;":733,"ddarr;":8650,"delta;":948,"dharl;":8643,"dharr;":8642,"diams;":9830,"disin;":8946,divide:247,"doteq;":8784,"dtdot;":8945,"dtrif;":9662,"duarr;":8693,"duhar;":10607,"eDDot;":10871,eacute:233,"ecirc;":234,"efDot;":8786,egrave:232,"emacr;":275,"empty;":8709,"eogon;":281,"eplus;":10865,"epsiv;":1013,"eqsim;":8770,"equiv;":8801,"erDot;":8787,"erarr;":10609,"esdot;":8784,"exist;":8707,"fflig;":64256,"filig;":64257,"fjlig;":102,"fllig;":64258,"fltns;":9649,"forkv;":10969,frac12:189,frac14:188,frac34:190,"frasl;":8260,"frown;":8994,"gamma;":947,"gcirc;":285,"gescc;":10921,"gimel;":8503,"gneqq;":8809,"gnsim;":8935,"grave;":96,"gsime;":10894,"gsiml;":10896,"gtcir;":10874,"gtdot;":8919,"harrw;":8621,"hcirc;":293,"hoarr;":8703,iacute:237,"icirc;":238,"iexcl;":161,igrave:236,"iiint;":8749,"iiota;":8489,"ijlig;":307,"imacr;":299,"image;":8465,"imath;":305,"imped;":437,"infin;":8734,"iogon;":303,"iprod;":10812,iquest:191,"isinE;":8953,"isins;":8948,"isinv;":8712,"iukcy;":1110,"jcirc;":309,"jmath;":567,"jukcy;":1108,"kappa;":954,"lAarr;":8666,"lBarr;":10510,"langd;":10641,"laquo;":171,"larrb;":8676,"lates;":10925,"lbarr;":10508,"lbbrk;":10098,"lbrke;":10635,"lceil;":8968,"ldquo;":8220,"lescc;":10920,"lhard;":8637,"lharu;":8636,"lhblk;":9604,"llarr;":8647,"lltri;":9722,"lneqq;":8808,"lnsim;":8934,"loang;":10220,"loarr;":8701,"lobrk;":10214,"lopar;":10629,"lrarr;":8646,"lrhar;":8651,"lrtri;":8895,"lsime;":10893,"lsimg;":10895,"lsquo;":8216,"ltcir;":10873,"ltdot;":8918,"ltrie;":8884,"ltrif;":9666,"mDDot;":8762,"mdash;":8212,"micro;":181,middot:183,"minus;":8722,"mumap;":8888,"nabla;":8711,"napid;":8779,"napos;":329,"natur;":9838,"nbump;":8782,"ncong;":8775,"ndash;":8211,"neArr;":8663,"nearr;":8599,"nedot;":8784,"nesim;":8770,"ngeqq;":8807,"ngsim;":8821,"nhArr;":8654,"nharr;":8622,"nhpar;":10994,"nlArr;":8653,"nlarr;":8602,"nleqq;":8806,"nless;":8814,"nlsim;":8820,"nltri;":8938,"notin;":8713,"notni;":8716,"npart;":8706,"nprec;":8832,"nrArr;":8655,"nrarr;":8603,"nrtri;":8939,"nsime;":8772,"nsmid;":8740,"nspar;":8742,"nsubE;":10949,"nsube;":8840,"nsucc;":8833,"nsupE;":10950,"nsupe;":8841,ntilde:241,"numsp;":8199,"nvsim;":8764,"nwArr;":8662,"nwarr;":8598,oacute:243,"ocirc;":244,"odash;":8861,"oelig;":339,"ofcir;":10687,ograve:242,"ohbar;":10677,"olarr;":8634,"olcir;":10686,"oline;":8254,"omacr;":333,"omega;":969,"operp;":10681,"oplus;":8853,"orarr;":8635,"order;":8500,oslash:248,otilde:245,"ovbar;":9021,"parsl;":11005,"phone;":9742,"plusb;":8862,"pluse;":10866,plusmn:177,"pound;":163,"prcue;":8828,"prime;":8242,"prnap;":10937,"prsim;":8830,"quest;":63,"rAarr;":8667,"rBarr;":10511,"radic;":8730,"rangd;":10642,"range;":10661,"raquo;":187,"rarrb;":8677,"rarrc;":10547,"rarrw;":8605,"ratio;":8758,"rbarr;":10509,"rbbrk;":10099,"rbrke;":10636,"rceil;":8969,"rdquo;":8221,"reals;":8477,"rhard;":8641,"rharu;":8640,"rlarr;":8644,"rlhar;":8652,"rnmid;":10990,"roang;":10221,"roarr;":8702,"robrk;":10215,"ropar;":10630,"rrarr;":8649,"rsquo;":8217,"rtrie;":8885,"rtrif;":9656,"sbquo;":8218,"sccue;":8829,"scirc;":349,"scnap;":10938,"scsim;":8831,"sdotb;":8865,"sdote;":10854,"seArr;":8664,"searr;":8600,"setmn;":8726,"sharp;":9839,"sigma;":963,"simeq;":8771,"simgE;":10912,"simlE;":10911,"simne;":8774,"slarr;":8592,"smile;":8995,"smtes;":10924,"sqcap;":8851,"sqcup;":8852,"sqsub;":8847,"sqsup;":8848,"srarr;":8594,"starf;":9733,"strns;":175,"subnE;":10955,"subne;":8842,"supnE;":10956,"supne;":8843,"swArr;":8665,"swarr;":8601,"szlig;":223,"theta;":952,"thkap;":8776,"thorn;":254,"tilde;":732,"times;":215,"trade;":8482,"trisb;":10701,"tshcy;":1115,"twixt;":8812,uacute:250,"ubrcy;":1118,"ucirc;":251,"udarr;":8645,"udhar;":10606,ugrave:249,"uharl;":8639,"uharr;":8638,"uhblk;":9600,"ultri;":9720,"umacr;":363,"uogon;":371,"uplus;":8846,"upsih;":978,"uring;":367,"urtri;":9721,"utdot;":8944,"utrif;":9652,"uuarr;":8648,"vBarv;":10985,"vDash;":8872,"varpi;":982,"vdash;":8866,"veeeq;":8794,"vltri;":8882,"vnsub;":8834,"vnsup;":8835,"vprop;":8733,"vrtri;":8883,"wcirc;":373,"wedge;":8743,"xcirc;":9711,"xdtri;":9661,"xhArr;":10234,"xharr;":10231,"xlArr;":10232,"xlarr;":10229,"xodot;":10752,"xrArr;":10233,"xrarr;":10230,"xutri;":9651,yacute:253,"ycirc;":375,AElig:198,Acirc:194,"Aopf;":120120,Aring:197,"Ascr;":119964,"Auml;":196,"Barv;":10983,"Beta;":914,"Bopf;":120121,"Bscr;":8492,"CHcy;":1063,"COPY;":169,"Cdot;":266,"Copf;":8450,"Cscr;":119966,"DJcy;":1026,"DScy;":1029,"DZcy;":1039,"Darr;":8609,"Dopf;":120123,"Dscr;":119967,Ecirc:202,"Edot;":278,"Eopf;":120124,"Escr;":8496,"Esim;":10867,"Euml;":203,"Fopf;":120125,"Fscr;":8497,"GJcy;":1027,"Gdot;":288,"Gopf;":120126,"Gscr;":119970,"Hopf;":8461,"Hscr;":8459,"IEcy;":1045,"IOcy;":1025,Icirc:206,"Idot;":304,"Iopf;":120128,"Iota;":921,"Iscr;":8464,"Iuml;":207,"Jopf;":120129,"Jscr;":119973,"KHcy;":1061,"KJcy;":1036,"Kopf;":120130,"Kscr;":119974,"LJcy;":1033,"Lang;":10218,"Larr;":8606,"Lopf;":120131,"Lscr;":8466,"Mopf;":120132,"Mscr;":8499,"NJcy;":1034,"Nopf;":8469,"Nscr;":119977,Ocirc:212,"Oopf;":120134,"Oscr;":119978,"Ouml;":214,"Popf;":8473,"Pscr;":119979,"QUOT;":34,"Qopf;":8474,"Qscr;":119980,"Rang;":10219,"Rarr;":8608,"Ropf;":8477,"Rscr;":8475,"SHcy;":1064,"Sopf;":120138,"Sqrt;":8730,"Sscr;":119982,"Star;":8902,THORN:222,"TScy;":1062,"Topf;":120139,"Tscr;":119983,"Uarr;":8607,Ucirc:219,"Uopf;":120140,"Upsi;":978,"Uscr;":119984,"Uuml;":220,"Vbar;":10987,"Vert;":8214,"Vopf;":120141,"Vscr;":119985,"Wopf;":120142,"Wscr;":119986,"Xopf;":120143,"Xscr;":119987,"YAcy;":1071,"YIcy;":1031,"YUcy;":1070,"Yopf;":120144,"Yscr;":119988,"Yuml;":376,"ZHcy;":1046,"Zdot;":379,"Zeta;":918,"Zopf;":8484,"Zscr;":119989,acirc:226,acute:180,aelig:230,"andd;":10844,"andv;":10842,"ange;":10660,"aopf;":120146,"apid;":8779,"apos;":39,aring:229,"ascr;":119990,"auml;":228,"bNot;":10989,"bbrk;":9141,"beta;":946,"beth;":8502,"bnot;":8976,"bopf;":120147,"boxH;":9552,"boxV;":9553,"boxh;":9472,"boxv;":9474,"bscr;":119991,"bsim;":8765,"bsol;":92,"bull;":8226,"bump;":8782,"caps;":8745,"cdot;":267,cedil:184,"cent;":162,"chcy;":1095,"cirE;":10691,"circ;":710,"cire;":8791,"comp;":8705,"cong;":8773,"copf;":120148,"copy;":169,"cscr;":119992,"csub;":10959,"csup;":10960,"cups;":8746,"dArr;":8659,"dHar;":10597,"darr;":8595,"dash;":8208,"diam;":8900,"djcy;":1106,"dopf;":120149,"dscr;":119993,"dscy;":1109,"dsol;":10742,"dtri;":9663,"dzcy;":1119,"eDot;":8785,"ecir;":8790,ecirc:234,"edot;":279,"emsp;":8195,"ensp;":8194,"eopf;":120150,"epar;":8917,"epsi;":949,"escr;":8495,"esim;":8770,"euml;":235,"euro;":8364,"excl;":33,"flat;":9837,"fnof;":402,"fopf;":120151,"fork;":8916,"fscr;":119995,"gdot;":289,"geqq;":8807,"gesl;":8923,"gjcy;":1107,"gnap;":10890,"gneq;":10888,"gopf;":120152,"gscr;":8458,"gsim;":8819,"gtcc;":10919,"gvnE;":8809,"hArr;":8660,"half;":189,"harr;":8596,"hbar;":8463,"hopf;":120153,"hscr;":119997,icirc:238,"iecy;":1077,iexcl:161,"imof;":8887,"iocy;":1105,"iopf;":120154,"iota;":953,"iscr;":119998,"isin;":8712,"iuml;":239,"jopf;":120155,"jscr;":119999,"khcy;":1093,"kjcy;":1116,"kopf;":120156,"kscr;":120000,"lArr;":8656,"lHar;":10594,"lang;":10216,laquo:171,"larr;":8592,"late;":10925,"lcub;":123,"ldca;":10550,"ldsh;":8626,"leqq;":8806,"lesg;":8922,"ljcy;":1113,"lnap;":10889,"lneq;":10887,"lopf;":120157,"lozf;":10731,"lpar;":40,"lscr;":120001,"lsim;":8818,"lsqb;":91,"ltcc;":10918,"ltri;":9667,"lvnE;":8808,"macr;":175,"male;":9794,"malt;":10016,micro:181,"mlcp;":10971,"mldr;":8230,"mopf;":120158,"mscr;":120002,"nGtv;":8811,"nLtv;":8810,"nang;":8736,"napE;":10864,"nbsp;":160,"ncap;":10819,"ncup;":10818,"ngeq;":8817,"nges;":10878,"ngtr;":8815,"nisd;":8954,"njcy;":1114,"nldr;":8229,"nleq;":8816,"nles;":10877,"nmid;":8740,"nopf;":120159,"npar;":8742,"npre;":10927,"nsce;":10928,"nscr;":120003,"nsim;":8769,"nsub;":8836,"nsup;":8837,"ntgl;":8825,"ntlg;":8824,"nvap;":8781,"nvge;":8805,"nvgt;":62,"nvle;":8804,"nvlt;":60,"oast;":8859,"ocir;":8858,ocirc:244,"odiv;":10808,"odot;":8857,"ogon;":731,"oint;":8750,"omid;":10678,"oopf;":120160,"opar;":10679,"ordf;":170,"ordm;":186,"oror;":10838,"oscr;":8500,"osol;":8856,"ouml;":246,"para;":182,"part;":8706,"perp;":8869,"phiv;":981,"plus;":43,"popf;":120161,pound:163,"prap;":10935,"prec;":8826,"prnE;":10933,"prod;":8719,"prop;":8733,"pscr;":120005,"qint;":10764,"qopf;":120162,"qscr;":120006,"quot;":34,"rArr;":8658,"rHar;":10596,"race;":8765,"rang;":10217,raquo:187,"rarr;":8594,"rcub;":125,"rdca;":10551,"rdsh;":8627,"real;":8476,"rect;":9645,"rhov;":1009,"ring;":730,"ropf;":120163,"rpar;":41,"rscr;":120007,"rsqb;":93,"rtri;":9657,"scap;":10936,"scnE;":10934,"sdot;":8901,"sect;":167,"semi;":59,"sext;":10038,"shcy;":1096,"sime;":8771,"simg;":10910,"siml;":10909,"smid;":8739,"smte;":10924,"solb;":10692,"sopf;":120164,"spar;":8741,"squf;":9642,"sscr;":120008,"star;":9734,"subE;":10949,"sube;":8838,"succ;":8827,"sung;":9834,"sup1;":185,"sup2;":178,"sup3;":179,"supE;":10950,"supe;":8839,szlig:223,"tbrk;":9140,"tdot;":8411,thorn:254,times:215,"tint;":8749,"toea;":10536,"topf;":120165,"tosa;":10537,"trie;":8796,"tscr;":120009,"tscy;":1094,"uArr;":8657,"uHar;":10595,"uarr;":8593,ucirc:251,"uopf;":120166,"upsi;":965,"uscr;":120010,"utri;":9653,"uuml;":252,"vArr;":8661,"vBar;":10984,"varr;":8597,"vert;":124,"vopf;":120167,"vscr;":120011,"wopf;":120168,"wscr;":120012,"xcap;":8898,"xcup;":8899,"xmap;":10236,"xnis;":8955,"xopf;":120169,"xscr;":120013,"xvee;":8897,"yacy;":1103,"yicy;":1111,"yopf;":120170,"yscr;":120014,"yucy;":1102,"yuml;":255,"zdot;":380,"zeta;":950,"zhcy;":1078,"zopf;":120171,"zscr;":120015,"zwnj;":8204,"AMP;":38,"Acy;":1040,"Afr;":120068,"And;":10835,Auml:196,"Bcy;":1041,"Bfr;":120069,COPY:169,"Cap;":8914,"Cfr;":8493,"Chi;":935,"Cup;":8915,"Dcy;":1044,"Del;":8711,"Dfr;":120071,"Dot;":168,"ENG;":330,"ETH;":208,"Ecy;":1069,"Efr;":120072,"Eta;":919,Euml:203,"Fcy;":1060,"Ffr;":120073,"Gcy;":1043,"Gfr;":120074,"Hat;":94,"Hfr;":8460,"Icy;":1048,"Ifr;":8465,"Int;":8748,Iuml:207,"Jcy;":1049,"Jfr;":120077,"Kcy;":1050,"Kfr;":120078,"Lcy;":1051,"Lfr;":120079,"Lsh;":8624,"Map;":10501,"Mcy;":1052,"Mfr;":120080,"Ncy;":1053,"Nfr;":120081,"Not;":10988,"Ocy;":1054,"Ofr;":120082,Ouml:214,"Pcy;":1055,"Pfr;":120083,"Phi;":934,"Psi;":936,QUOT:34,"Qfr;":120084,"REG;":174,"Rcy;":1056,"Rfr;":8476,"Rho;":929,"Rsh;":8625,"Scy;":1057,"Sfr;":120086,"Sub;":8912,"Sum;":8721,"Sup;":8913,"Tab;":9,"Tau;":932,"Tcy;":1058,"Tfr;":120087,"Ucy;":1059,"Ufr;":120088,Uuml:220,"Vcy;":1042,"Vee;":8897,"Vfr;":120089,"Wfr;":120090,"Xfr;":120091,"Ycy;":1067,"Yfr;":120092,"Zcy;":1047,"Zfr;":8488,"acE;":8766,"acd;":8767,"acy;":1072,"afr;":120094,"amp;":38,"and;":8743,"ang;":8736,"apE;":10864,"ape;":8778,"ast;":42,auml:228,"bcy;":1073,"bfr;":120095,"bne;":61,"bot;":8869,"cap;":8745,cent:162,"cfr;":120096,"chi;":967,"cir;":9675,copy:169,"cup;":8746,"dcy;":1076,"deg;":176,"dfr;":120097,"die;":168,"div;":247,"dot;":729,"ecy;":1101,"efr;":120098,"egs;":10902,"ell;":8467,"els;":10901,"eng;":331,"eta;":951,"eth;":240,euml:235,"fcy;":1092,"ffr;":120099,"gEl;":10892,"gap;":10886,"gcy;":1075,"gel;":8923,"geq;":8805,"ges;":10878,"gfr;":120100,"ggg;":8921,"glE;":10898,"gla;":10917,"glj;":10916,"gnE;":8809,"gne;":10888,"hfr;":120101,"icy;":1080,"iff;":8660,"ifr;":120102,"int;":8747,iuml:239,"jcy;":1081,"jfr;":120103,"kcy;":1082,"kfr;":120104,"lEg;":10891,"lap;":10885,"lat;":10923,"lcy;":1083,"leg;":8922,"leq;":8804,"les;":10877,"lfr;":120105,"lgE;":10897,"lnE;":8808,"lne;":10887,"loz;":9674,"lrm;":8206,"lsh;":8624,macr:175,"map;":8614,"mcy;":1084,"mfr;":120106,"mho;":8487,"mid;":8739,"nGg;":8921,"nGt;":8811,"nLl;":8920,"nLt;":8810,"nap;":8777,nbsp:160,"ncy;":1085,"nfr;":120107,"ngE;":8807,"nge;":8817,"ngt;":8815,"nis;":8956,"niv;":8715,"nlE;":8806,"nle;":8816,"nlt;":8814,"not;":172,"npr;":8832,"nsc;":8833,"num;":35,"ocy;":1086,"ofr;":120108,"ogt;":10689,"ohm;":937,"olt;":10688,"ord;":10845,ordf:170,ordm:186,"orv;":10843,ouml:246,"par;":8741,para:182,"pcy;":1087,"pfr;":120109,"phi;":966,"piv;":982,"prE;":10931,"pre;":10927,"psi;":968,"qfr;":120110,quot:34,"rcy;":1088,"reg;":174,"rfr;":120111,"rho;":961,"rlm;":8207,"rsh;":8625,"scE;":10932,"sce;":10928,"scy;":1089,sect:167,"sfr;":120112,"shy;":173,"sim;":8764,"smt;":10922,"sol;":47,"squ;":9633,"sub;":8834,"sum;":8721,sup1:185,sup2:178,sup3:179,"sup;":8835,"tau;":964,"tcy;":1090,"tfr;":120113,"top;":8868,"ucy;":1091,"ufr;":120114,"uml;":168,uuml:252,"vcy;":1074,"vee;":8744,"vfr;":120115,"wfr;":120116,"xfr;":120117,"ycy;":1099,"yen;":165,"yfr;":120118,yuml:255,"zcy;":1079,"zfr;":120119,"zwj;":8205,AMP:38,"DD;":8517,ETH:208,"GT;":62,"Gg;":8921,"Gt;":8811,"Im;":8465,"LT;":60,"Ll;":8920,"Lt;":8810,"Mu;":924,"Nu;":925,"Or;":10836,"Pi;":928,"Pr;":10939,REG:174,"Re;":8476,"Sc;":10940,"Xi;":926,"ac;":8766,"af;":8289,amp:38,"ap;":8776,"dd;":8518,deg:176,"ee;":8519,"eg;":10906,"el;":10905,eth:240,"gE;":8807,"ge;":8805,"gg;":8811,"gl;":8823,"gt;":62,"ic;":8291,"ii;":8520,"in;":8712,"it;":8290,"lE;":8806,"le;":8804,"lg;":8822,"ll;":8810,"lt;":60,"mp;":8723,"mu;":956,"ne;":8800,"ni;":8715,not:172,"nu;":957,"oS;":9416,"or;":8744,"pi;":960,"pm;":177,"pr;":8826,reg:174,"rx;":8478,"sc;":8827,shy:173,uml:168,"wp;":8472,"wr;":8768,"xi;":958,yen:165,GT:62,LT:60,gt:62,lt:60},un=Wp;var Kp=[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];function zp(e,t){if(t&&!e.endsWith(";"))return`${e}\\b(?!=)`;return e}function Js(e){let r=Object.keys(un).map((n)=>zp(n,e));return new RegExp(`&(#(?:x[a-fA-F\\d]+|\\d+)(?:;)?|${r.join("|")})`,"g")}var hn,dn;function Xp(e){if(e){if(!dn)dn=Js(!0);return dn}if(!hn)hn=Js(!1);return hn}var Ys=0;function Jp(e){if(e===10)return 32;if(e<128)return e;if(e<=159)return Kp[e-128];if(e<55296)return e;if(e<=57343)return Ys;if(e<=65535)return e;if(e>=65536&&e<=131071)return e;if(e>=131072&&e<=196607)return e;if(e>=917504&&e<=917631||e>=917760&&e<=917999)return e;return Ys}function fn(e,t){if(e.indexOf("&")===-1)return e;return e.replace(Xp(t),(r,n)=>{let i;if(n[0]!=="#")i=un[n];else if(n[1]==="x")i=Number.parseInt(n.substring(2),16);else i=Number.parseInt(n.substring(1),10);if(!i)return r;return String.fromCodePoint(Jp(i))})}class Rt extends Error{constructor(e){super(`sveld's template parser doesn't support ${e} yet.`);this.name="TemplateParseNotImplementedError"}}var Yp=/<\/script\s*>/g,Qp=/<\/script\s*>/y,Zp=/[^\n]/g,el=new Set(["server","client","worker","test","default"]);function Qs(e,t,r){let n=e.index,i=e.readUntil(Yp);if(e.index>=e.source.length)throw Error("sveld: unclosed <script> tag");let o=e.source.slice(0,n).replace(Zp," ")+i;e.read(Qp);let a=Us(o,e.isTypeScript,e.root.comments);a.start=n;let p="default";for(let l of r){if(el.has(l.name))throw Error(`sveld: "${l.name}" is a reserved <script> attribute name.`);if(l.name==="module"){if(l.value!==!0)throw Error("sveld: <script module> does not take a value.");p="module"}if(l.name==="context"){let m=l.value;if(m===!0||!Array.isArray(m)||m.length!==1||m[0].type!=="Text")throw Error("sveld: context attribute must be a plain string.");if(m[0].data!=="module")throw Error('sveld: only context="module" is valid.');p="module"}}return{type:"Script",start:t,end:e.index,context:p,content:a,attributes:r}}function Zs(e,t,r){let n=e.index,i=e.source.indexOf("</style",e.index),o=i===-1?e.source.length:i;return e.index=o,e.eat("</style",!0),e.read(/\s*>/y),{type:"StyleSheet",start:t,end:e.index,attributes:r,children:[],comments:[],content:{start:n,end:o,styles:e.source.slice(n,o),comment:null}}}var tl=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]);function mn(e){return tl.has(e)||e.charCodeAt(0)===33&&e.toLowerCase()==="!doctype"}var rl="^[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}]*)?$",nl=new RegExp(rl,"u");function ea(e){return nl.test(e)}var il=/(?:"([^"]*)"|'([^'])*'|([^>\s]+))/y,sa=/["']/y,sl=/(\/>|[\s"'=<>`])/y,yn=/<\/textarea(\s[^>]*)?>/iy,al=/^![a-zA-Z]+$/,ol=/^[a-zA-Z][a-zA-Z0-9]*:[a-zA-Z][a-zA-Z0-9-]*[a-zA-Z0-9]$/,cl=/^(?:\p{Lu}[$\u200c\u200d\p{ID_Continue}.]*|\p{ID_Start}[$\u200c\u200d\p{ID_Continue}]*(?:\.[$\u200c\u200d\p{ID_Continue}]+)+)$/u,aa={"svelte:head":"SvelteHead","svelte:options":"SvelteOptions","svelte:window":"SvelteWindow","svelte:document":"SvelteDocument","svelte:body":"SvelteBody"},ta={...aa,"svelte:element":"SvelteElement","svelte:component":"SvelteComponent","svelte:self":"SvelteSelf","svelte:fragment":"SvelteFragment","svelte:boundary":"SvelteBoundary"};function pl(e){let t=e.charCodeAt(0);if(t<97||t>122)return!1;for(let r=1;r<e.length;r++){let n=e.charCodeAt(r);if((n<97||n>122)&&(n<48||n>57))return!1}return!0}function ll(e){if(pl(e))return!0;if(al.test(e))return!0;if(ol.test(e))return!0;return ea(e)}function ul(e){let t=e.charCodeAt(0);if(t>=97&&t<=122&&!e.includes("."))return!1;return!0}function hl(e){return`Svelte${e.slice(7).split("-").map((r)=>r.charAt(0).toUpperCase()+r.slice(1)).join("")}`}function dl(e){for(let t=e.length-1;t>=0;t--){let r=e[t].type;if(r==="SvelteHead")return!0;if(r==="RegularElement"||r==="Component")return!1}return!1}function fl(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(r.type==="RegularElement"&&r.attributes?.some((n)=>n.type==="Attribute"&&n.name==="shadowrootmode"))return!0}return!1}function ra(e){let{source:t,index:r}=e;if(r>=t.length)throw new Ge("Unexpected end of input",t.length);let n=r;while(n<t.length){let i=t.charCodeAt(n);if(i===47||i===62||rt(i))break;n++}return e.index=n,{name:t.slice(r,n),start:r,end:n}}function oa(e){let{source:t,index:r}=e;if(r>=t.length)throw new Ge("Unexpected end of input",t.length);let n=r;while(n<t.length){let i=t.charCodeAt(n);if(i===61||i===47||i===62||i===34||i===39||rt(i))break;n++}return e.index=n,{name:t.slice(r,n),start:r,end:n}}function ml(e){let t=e.index;if(e.eat("//")){let r=e.readUntilString(`
|
|
32
|
+
`),n=e.index;e.root.comments.push({type:"Line",value:r,start:t,end:n});return}if(e.eat("/*")){let r=e.readUntilString("*/");e.eat("*/");let n=e.index;e.root.comments.push({type:"Block",value:r,start:t,end:n})}}function yl(e){if(e==="use")return"UseDirective";if(e==="animate")return"AnimateDirective";if(e==="bind")return"BindDirective";if(e==="class")return"ClassDirective";if(e==="style")return"StyleDirective";if(e==="on")return"OnDirective";if(e==="let")return"LetDirective";if(e==="in"||e==="out"||e==="transition")return"TransitionDirective";return!1}function ca(e,t,r){let n={start:e.index,end:-1,type:"Text",raw:"",data:""},i=[],o=(a)=>{if(a>n.start)n.raw=e.source.slice(n.start,a),n.data=fn(n.raw,!0),n.end=a,i.push(n)};while(e.index<e.source.length){if(t())return o(e.index),i;if(e.eat("{")){if(e.match("#")||e.match("@"))throw new Rt("blocks/tags inside attribute value sequences");let a=e.index-1;o(a),e.allowWhitespace();let p=ce(e);e.allowWhitespace(),e.eat("}",!0),i.push({type:"ExpressionTag",start:a,end:e.index,expression:p}),n={start:e.index,end:-1,type:"Text",raw:"",data:""}}else{let a=e.index+1;if(r!==void 0){let p=e.source;while(a<p.length){let l=p.charCodeAt(a);if(l===123||l===r)break;a++}}e.index=a}}throw new Rt("unterminated attribute value / sequence (loose mode)")}function gl(e){let t=e.eat("'")?"'":e.eat('"')?'"':null;if(t&&e.eat(t))return[{start:e.index-1,end:e.index-1,type:"Text",raw:"",data:""}];let r=ca(e,()=>{if(t)return e.match(t);return!!e.matchRegex(sl)},t===null?void 0:t.charCodeAt(0));if(r.length===0&&!t)throw Error("sveld: expected attribute value");if(t)e.index+=1;if(t||r.length>1||r[0].type==="Text")return r;return r[0]}function gn(e,t,r,n){return{type:"Attribute",start:t,end:r,name:e,value:n}}function xl(e){let t=e.index,r=oa(e);if(!r.name)return null;let n=!0;if(e.eat("=")){e.allowWhitespace();let i=e.matchRegex(il);if(!i)throw Error("sveld: expected attribute value");e.index+=i.length;let o=i[0]==='"'||i[0]==="'";if(o)i=i.slice(1,-1);n=[{start:e.index-i.length-(o?1:0),end:o?e.index-1:e.index,type:"Text",raw:i,data:fn(i,!0)}]}if(e.matchRegex(sa))throw Error("sveld: expected '='");return gn(r.name,t,e.index,n)}function bl(e){while(!0){let p=e.index;if(ml(e),e.index===p)break;e.allowWhitespace()}let t=e.index;if(e.eat("{")){if(e.allowWhitespace(),e.eat("@attach")){e.requireWhitespace();let m=ce(e);return e.allowWhitespace(),e.eat("}",!0),{type:"AttachTag",start:t,end:e.index,expression:m}}if(e.eat("...")){let m=ce(e);return e.allowWhitespace(),e.eat("}",!0),{type:"SpreadAttribute",start:t,end:e.index,expression:m}}let p=e.readIdentifierName();if(p.name==="")throw Error("sveld: empty attribute shorthand");e.allowWhitespace(),e.eat("}",!0);let l={type:"ExpressionTag",start:p.start,end:p.end,expression:p};return gn(p.name,t,e.index,l)}let r=oa(e);if(!r.name)return null;let n=e.index;e.allowWhitespace();let i=r.name.indexOf(":"),o=i!==-1&&yl(r.name.slice(0,i)),a=!0;if(e.eat("="))if(e.allowWhitespace(),e.source[e.index]==="/"&&e.source[e.index+1]===">"){let p=e.index;e.index++,a=[{start:p,end:p+1,type:"Text",raw:"/",data:"/"}],n=e.index}else a=gl(e),n=e.index;else if(e.matchRegex(sa))throw Error("sveld: expected '='");if(o){let p=r.name.slice(i+1).split("|",1)[0];if(p==="")throw Error("sveld: directive missing a name");if(o==="StyleDirective")return{start:t,end:n,type:o,name:p,value:a};let l=a===!0?void 0:Array.isArray(a)?a[0]:a,m=null;if(l){if((Array.isArray(a)?a.length>1:!1)||l.type==="Text")throw Error("sveld: directive value must be a single expression");m=l.expression}let d={start:t,end:n,type:o,name:p,expression:m};if((d.type==="BindDirective"||d.type==="ClassDirective")&&!d.expression)d.expression={start:t+i+1,end:n,type:"Identifier",name:d.name};return d}return gn(r.name,t,n,a)}function pa(e){let t=e.index++,r=e.current();if(e.eat("!--")){let T=e.readUntilString("-->");e.eat("-->",!0),e.append({type:"Comment",start:t,end:e.index,data:T});return}if(e.eat("/")){let{name:T}=ra(e);if(e.allowWhitespace(),e.eat(">",!0),mn(T))throw Error(`sveld: <${T}> is a void element and cannot have a closing tag`);while(r.name!==T){if(r.type==="RegularElement");else throw Error(`sveld: invalid closing tag </${T}>`);r.end=t,e.pop(),r=e.current()}if(r.end=e.index,e.pop(),e.lastAutoClosedTag&&e.stack.length<e.lastAutoClosedTag.depth)e.lastAutoClosedTag=void 0;return}let n=ra(e),i=ul(n.name)&&cl.test(n.name);if(!ll(n.name)&&!i)throw Error(`sveld: "${n.name}" is not a valid element or component name`);if(n.name in aa&&r.type!=="Root")throw Error(`sveld: <${n.name}> must be a top-level element`);let o;if(n.name in ta)o=ta[n.name];else if(n.name.startsWith("svelte:"))o=hl(n.name);else if(i)o="Component";else if(n.name==="title"&&dl(e.stack))o="TitleElement";else if(n.name==="slot"&&!fl(e.stack))o="SlotElement";else o="RegularElement";let a={type:o,start:t,end:-1,name:n.name,attributes:[],fragment:{type:"Fragment",nodes:[]}};if(e.allowWhitespace(),r.type==="RegularElement"&&Fi(r.name,n.name))r.end=t,e.pop(),e.lastAutoClosedTag={tag:r.name,reason:n.name,depth:e.stack.length},r=e.current();let p=e.current(),l=(n.name==="script"||n.name==="style")&&p.type==="Root",m=l?xl:bl,d;while(d=m(e))a.attributes.push(d),e.allowWhitespace();if(a.type==="SvelteComponent")a.expression=ia(na(a));if(a.type==="SvelteElement"){let T=na(a);if(T.value===!0)throw Error("sveld: <svelte:element> `this` attribute needs a value");if(Tl(T))a.tag=ia(T);else{let E=T.value[0];a.tag=E.type==="Text"?{type:"Literal",value:E.data,raw:`'${E.raw}'`,start:E.start,end:E.end}:E.expression}}if(l){if(e.eat(">",!0),n.name==="script"){let T=Qs(e,t,a.attributes);if(T.context==="module"){if(e.root.module)throw Error("sveld: duplicate <script module>");e.root.module=T}else{if(e.root.instance)throw Error("sveld: duplicate <script>");e.root.instance=T}}else{if(e.root.css)throw Error("sveld: duplicate <style>");e.root.css=Zs(e,t,a.attributes)}return}e.append(a);let b=e.eat("/")||mn(n.name);if(e.eat(">",!0),b)a.end=e.index;else if(n.name==="textarea")a.fragment.nodes=ca(e,()=>(yn.lastIndex=e.index,yn.test(e.source))),e.read(yn),a.end=e.index;else e.push(a,a.fragment)}function na(e){let t=e.attributes,r=t.findIndex((n)=>n.type==="Attribute"&&n.name==="this");if(r===-1)throw Error(`sveld: <${e.name}> requires a \`this\` attribute`);return t.splice(r,1)[0]}function ia(e){return Array.isArray(e.value)?e.value[0].expression:e.value.expression}function Tl(e){return e.value!==!0&&!Array.isArray(e.value)||Array.isArray(e.value)&&e.value.length===1&&e.value[0].type==="ExpressionTag"}function la(e){let t={start:e.start,end:e.end,attributes:e.attributes};for(let r of e.attributes){if(r.type!=="Attribute")continue;if(r.name==="runes"){let n=ua(r);if(typeof n==="boolean")t.runes=n}if(r.name==="customElement"){let n=El(r);if(n!==void 0)t.customElement={tag:n}}}return t}function ua(e){let{value:t}=e;if(t===!0)return!0;let r=Array.isArray(t)?t[0]:t;if(!r)return!0;if(Array.isArray(t)&&t.length>1)return null;if(r.type==="Text")return r.data;if(r.expression.type!=="Literal")return null;return r.expression.value}function El(e){let{value:t}=e;if(t===!0)return;let r=Array.isArray(t)?t[0]:t;if(!r)return;if(r.type==="Text"){let n=ua(e);return typeof n==="string"?n:void 0}if(r.expression.type==="ObjectExpression"){for(let n of r.expression.properties)if(n.type==="Property"&&!n.computed&&n.key.type==="Identifier"&&n.key.name==="tag"&&n.value.type==="Literal"&&typeof n.value.value==="string")return n.value.value}return}var Sl=/<script\s+(?:[^>]*|(?:[^=>'"/]+=(?:"[^"]*"|'[^']*'|[^>\s]+)\s+)*)lang=(["'])?ts\1[^>]*>/;class xn extends pn{root;stack=[];fragments=[];isTypeScript;lastAutoClosedTag;constructor(e,t){super(e);this.isTypeScript=Sl.test(e);let r=fe();this.root={type:"Root",start:0,end:t,css:null,js:[],options:null,fragment:r,comments:[]},this.stack.push(this.root),this.fragments.push(r)}current(){return this.stack[this.stack.length-1]}currentFragment(){return this.fragments[this.fragments.length-1]}push(e,t){this.stack.push(e),this.fragments.push(t)}pop(){return this.fragments.pop(),this.stack.pop()}append(e){return this.currentFragment().nodes.push(e),e}}var bn={"{":"}","(":")","[":"]"},vl=new Set(Object.values(bn));function Mt(e,t,r=bn){let n=r===bn?vl:new Set(Object.values(r)),i=[],o=t;while(o<e.source.length){let a=e.source[o++];if(a==="'"||a==='"'||a==="`"){o=Cl(e,o,a);continue}if(Object.hasOwn(r,a))i.push(a);else if(n.has(a)){let p=i.pop(),l=p?r[p]:void 0;if(a!==l)throw Error(`sveld: expected "${l}"`);if(i.length===0)return o}}throw Error("sveld: unexpected end of input")}function Cl(e,t,r){let n=!1,i=t;while(i<e.source.length){let o=e.source[i++];if(n){n=!1;continue}if(o===r)return i;if(o==="\\")n=!0;if(r==="`"&&o==="$"&&e.source[i]==="{")i=Mt(e,i)}throw Error("sveld: unterminated string constant")}var da=/[^\n]/g,Al=/\?\s*:/g;function We(e){let t=e.index,r=e.readIdentifierName();if(r.name!==""){let T=ha(e);return{...r,typeAnnotation:T}}let n=e.source[e.index];if(n!=="{"&&n!=="[")throw Error("sveld: expected a binding pattern");let i=Mt(e,t);e.index=i;let o=e.source.slice(t,i),a=e.source.slice(0,t).replace(da," "),p=a.indexOf(" ");a=a.slice(0,p)+a.slice(p+1);let l=`${a}(${o} = 1)`,{node:m}=lt(l,t-1,e.isTypeScript,e.root.comments),d=m.left,b=ha(e);if(b)d.typeAnnotation=b,d.end=b.end;return d}function ha(e){let t=e.index;if(e.allowWhitespace(),!e.eat(":")){e.index=t;return}let r="_ as ",n=e.index-r.length,i=e.source.slice(0,n).replace(da," ")+r+e.source.slice(e.index).replace(Al,":"),{node:o}=lt(i,n,e.isTypeScript,e.root.comments),a=o;if(a.type==="AssignmentExpression"){let p=a.right.start;while(i[p]!=="=")p-=1;({node:o}=lt(i.slice(0,p),n,e.isTypeScript,e.root.comments)),a=o}if(a.type==="SequenceExpression"&&a.expressions)a=a.expressions[0];return e.index=a.end,{type:"TSTypeAnnotation",start:t,end:e.index,typeAnnotation:a.typeAnnotation}}var fa=/\s*}/y,Pl={"<":">"};function ma(e){let t=e.index-2;while(e.source[t]!=="{")t-=1;if(e.eat("if")){e.requireWhitespace();let r={type:"IfBlock",elseif:!1,start:t,end:-1,test:ce(e),consequent:fe(),alternate:null};e.append(r),e.allowWhitespace(),e.eat("}",!0),e.push(r,r.consequent);return}if(e.eat("each")){e.requireWhitespace();let r=ce(e);if(e.allowWhitespace(),!e.match("as")){let p=r;if(p.type==="SequenceExpression"&&p.expressions)p=p.expressions[0];if(p.type==="TSAsExpression"){let l=p;r=l.expression;let m=l.typeAnnotation.start-2;while(m>=0&&!(e.source[m]==="a"&&e.source[m+1]==="s"))m-=1;e.index=m}}let n=null,i,o;if(e.eat("as"))e.requireWhitespace(),n=We(e);if(e.allowWhitespace(),e.eat(",")){e.allowWhitespace();let p=e.readIdentifierName();if(!p.name)throw Error("sveld: expected an identifier");i=p.name,e.allowWhitespace()}if(e.eat("("))e.allowWhitespace(),o=ce(e),e.allowWhitespace(),e.eat(")",!0),e.allowWhitespace();e.eat("}",!0);let a={type:"EachBlock",start:t,end:-1,expression:r,body:fe(),context:n,index:i,key:o};e.append(a),e.push(a,a.body);return}if(e.eat("await")){e.requireWhitespace();let r=ce(e);e.allowWhitespace();let n={type:"AwaitBlock",start:t,end:-1,expression:r,value:null,error:null,pending:null,then:null,catch:null};if(e.eat("then")){if(!e.matchRegex(fa))e.requireWhitespace(),n.value=We(e),e.allowWhitespace();n.then=fe()}else if(e.eat("catch")){if(!e.matchRegex(fa))e.requireWhitespace(),n.error=We(e),e.allowWhitespace();n.catch=fe()}else n.pending=fe();e.eat("}",!0),e.append(n),e.push(n,n.then??n.catch??n.pending);return}if(e.eat("key")){e.requireWhitespace();let r=ce(e);e.allowWhitespace(),e.eat("}",!0);let n={type:"KeyBlock",start:t,end:-1,expression:r,fragment:fe()};e.append(n),e.push(n,n.fragment);return}if(e.eat("snippet")){e.requireWhitespace();let r=e.readIdentifierName();if(r.name==="")throw Error("sveld: expected a snippet name");e.allowWhitespace();let n;if(e.isTypeScript&&e.match("<")){let o=e.index,a=Mt(e,o,Pl);n=e.source.slice(o+1,a-1),e.index=a}if(e.allowWhitespace(),e.eat("(")){let o=1;while(e.index<e.source.length&&(!e.match(")")||o!==1)){if(e.match("("))o++;if(e.match(")"))o--;e.index+=1}e.eat(")",!0)}e.allowWhitespace(),e.eat("}",!0);let i={type:"SnippetBlock",start:t,end:-1,expression:r,typeParams:n,parameters:[],body:fe()};e.append(i),e.push(i,i.body);return}throw Error("sveld: expected if/each/await/key/snippet")}function ya(e){let t=e.index-1,r=e.current();if(r.type==="IfBlock"){if(!e.eat("else"))throw Error("sveld: expected {:else} or {:else if}");if(e.eat("if"))throw Error("sveld: {:else if} cannot follow {:else if} directly");if(e.allowWhitespace(),e.fragments.pop(),r.alternate=fe(),e.fragments.push(r.alternate),e.eat("if")){e.requireWhitespace();let n=ce(e);e.allowWhitespace(),e.eat("}",!0);let i=t-1;while(e.source[i]!=="{")i-=1;let o={type:"IfBlock",start:i,end:-1,elseif:!0,test:n,consequent:fe(),alternate:null};e.append(o),e.stack.push(o),e.fragments.pop(),e.fragments.push(o.consequent)}else e.allowWhitespace(),e.eat("}",!0);return}if(r.type==="EachBlock"){if(!e.eat("else"))throw Error("sveld: expected {:else}");e.allowWhitespace(),e.eat("}",!0),r.fallback=fe(),e.fragments.pop(),e.fragments.push(r.fallback);return}if(r.type==="AwaitBlock"){if(e.eat("then")){if(r.then)throw Error("sveld: duplicate {:then}");if(!e.eat("}"))e.requireWhitespace(),r.value=We(e),e.allowWhitespace(),e.eat("}",!0);r.then=fe(),e.fragments.pop(),e.fragments.push(r.then);return}if(e.eat("catch")){if(r.catch)throw Error("sveld: duplicate {:catch}");if(!e.eat("}"))e.requireWhitespace(),r.error=We(e),e.allowWhitespace(),e.eat("}",!0);r.catch=fe(),e.fragments.pop(),e.fragments.push(r.catch);return}throw Error("sveld: expected {:then ...} or {:catch ...}")}throw Error("sveld: {:...} not valid here")}function ga(e){let t=e.current();switch(t.type){case"IfBlock":{e.eat("if",!0),e.allowWhitespace(),e.eat("}",!0);while(t.type==="IfBlock"&&t.elseif)t.end=e.index,e.stack.pop(),t=e.current();t.end=e.index,e.pop();return}case"EachBlock":e.eat("each",!0);break;case"KeyBlock":e.eat("key",!0);break;case"AwaitBlock":e.eat("await",!0);break;case"SnippetBlock":e.eat("snippet",!0);break;default:throw Error("sveld: unexpected closing block tag")}e.allowWhitespace(),e.eat("}",!0),t.end=e.index,e.pop()}var kl=/(?:let|const)\b/y,wl=/(?:var|interface|enum)\b/y,_l=/type\b/y;function xa(e){let t=e.index;if(e.matchRegex(wl))throw Error("sveld: `var`/`interface`/`enum` are not valid here");if(!e.matchRegex(kl)&&!e.matchRegex(_l))return null;let r=e.root.comments.length,n=Gs(e.source,t,e.isTypeScript,e.root.comments);if(n.type!=="VariableDeclaration"){if(n.type==="ExpressionStatement")return e.root.comments.length=r,null;throw Error("sveld: expected a `let`/`const` declaration")}if(n.kind!=="let"&&n.kind!=="const")throw Error("sveld: expected a `let`/`const` declaration");return e.index=n.end,e.allowWhitespace(),e.eat("}",!0),n}var Nl=/\s*}/y;function ba(e){let t=e.index;while(e.source[t]!=="{")t-=1;if(e.eat("html")){e.requireWhitespace();let r=ce(e);e.allowWhitespace(),e.eat("}",!0);let n={type:"HtmlTag",start:t,end:e.index,expression:r};e.append(n);return}if(e.eat("debug")){let r;if(e.read(Nl))r=[];else{let i=ce(e);r=i.type==="SequenceExpression"?i.expressions:[i];for(let o of r)if(o.type!=="Identifier")throw Error("sveld: {@debug} arguments must be identifiers");e.allowWhitespace(),e.eat("}",!0)}let n={type:"DebugTag",start:t,end:e.index,identifiers:r};e.append(n);return}if(e.eat("const")){e.requireWhitespace();let r=We(e);e.allowWhitespace(),e.eat("=",!0),e.allowWhitespace();let n=ce(e),i=e.index;e.allowWhitespace(),e.eat("}",!0);let o={type:"VariableDeclarator",id:r,init:n,start:r.start,end:i},a={type:"ConstTag",start:t,end:e.index,declaration:{type:"VariableDeclaration",kind:"const",declarations:[o],start:t+2,end:e.index-1}};e.append(a);return}if(e.eat("render")){e.requireWhitespace();let r=ce(e);if(!(r.type==="CallExpression"||r.type==="ChainExpression"&&r.expression.type==="CallExpression"))throw Error("sveld: {@render ...} must be a function call");e.allowWhitespace(),e.eat("}",!0);let i={type:"RenderTag",start:t,end:e.index,expression:r};e.append(i);return}throw Error("sveld: expected html/debug/const/render")}function Ta(e){let t=e.index;if(e.index+=1,e.allowWhitespace(),e.eat("#")){ma(e);return}if(e.eat(":")){ya(e);return}if(e.eat("@")){ba(e);return}if(e.match("/")&&!e.match("/*")&&!e.match("//")){e.eat("/"),ga(e);return}let r=xa(e);if(r){let o={type:"DeclarationTag",start:t,end:e.index,declaration:r};e.append(o);return}let n=ce(e);e.allowWhitespace(),e.eat("}",!0);let i={type:"ExpressionTag",start:t,end:e.index,expression:n};e.append(i)}function Ea(e){let{index:t,source:r}=e,n=r.indexOf("<",t),i=r.indexOf("{",t),o;if(n===-1)o=i===-1?r.length:i;else o=i===-1?n:Math.min(n,i);e.index=o;let a=r.slice(t,o),p={type:"Text",start:t,end:e.index,raw:a,data:a};e.append(p)}function Tn(e){let t=e.trimEnd(),r=new xn(t,e.length);while(r.index<r.source.length)if(r.match("<"))pa(r);else if(r.match("{"))Ta(r);else Ea(r);let n=r.root.fragment.nodes.findIndex((i)=>i.type==="SvelteOptions");if(n!==-1){let[i]=r.root.fragment.nodes.splice(n,1);r.root.options=la(i)}return r.root}function Sa(e){if(e==="var")return"let";if(e==="using"||e==="await using")return"const";return e}var Il=null,va=/^@component/,Ll=/\r/g,Dl=/^\{\s*\}$/;class pe{ctx=Pr();static mapToArray(e){return Array.from(e,([t,r])=>r)}static getStaticAttributeValue(e){if(!Array.isArray(e.value))return;return e.value.map((t)=>t.data??t.raw??"").join("").trim()}resolveScriptLanguage(e){let t=[e.instance,e.module].filter((n)=>n!==void 0),r=!1;for(let n of t){let i=n.attributes?.find((a)=>a.name==="lang");if(!i){r=!0;continue}if(pe.getStaticAttributeValue(i)?.toLowerCase()==="ts")return"ts"}return r?"js":void 0}resolveScriptGenericsAttribute(e){let t=e.instance?.attributes?.find((a)=>a.name==="generics");if(!t)return;let r=se(this.ctx,t),n=e.instance?.attributes?.find((a)=>a.name==="lang");if((n?pe.getStaticAttributeValue(n)?.toLowerCase():void 0)!=="ts"){Oe(this.ctx,"syntax-skipped","generics",'<script generics="..."> requires lang="ts"; the generics attribute was ignored because the script is not TypeScript.',r);return}let o=pe.getStaticAttributeValue(t);if(!o)return;return{value:o,source:r}}resolvePublicPropName(e){return this.ctx.propLocalToPublicName.get(e)??e}trackPropLocalName(e,t=e){this.ctx.propLocalToPublicName.set(t,e)}getPropByLocalOrPublic(e){return this.ctx.props.get(this.resolvePublicPropName(e))}getPropTypeByLocalOrPublic(e){return this.getPropByLocalOrPublic(e)?.type}getExplicitPropType(e){return this.ctx.explicitPropTypesByName.get(e)}getPropertyName(e){if(!e||typeof e!=="object"||!("type"in e))return;if(Le(e))return e.name;if(Je(e))return e.value==null?void 0:String(e.value);return}isNumericConstant(e){if(!e||typeof e!=="object"||!("type"in e))return!1;if(e.type!=="MemberExpression")return!1;let t=e,r=t.object&&"name"in t.object?t.object.name:void 0,n=t.property&&"name"in t.property?t.property.name:void 0;if(!r||!n)return!1;if(r==="Number")return["POSITIVE_INFINITY","NEGATIVE_INFINITY","MAX_VALUE","MIN_VALUE","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","EPSILON","NaN"].includes(n);if(r==="Math")return["PI","E","LN2","LN10","LOG2E","LOG10E","SQRT2","SQRT1_2"].includes(n);return!1}resolveLocalVarJSDoc(e){for(let r of this.ctx.vars)if(r.declarations.some((i)=>i.id&&typeof i.id==="object"&&("type"in i.id)&&i.id.type==="Identifier"&&("name"in i.id)&&i.id.name===e))return He(this.ctx,this,r);let t=this.ctx.funcDecls.get(e);if(t)return He(this.ctx,this,t);return}addModuleExport(e,t){if(be(e)===void 0)return;if(this.ctx.moduleExports.has(e)){let r=this.ctx.moduleExports.get(e);this.ctx.moduleExports.set(e,{...r,...t})}else this.ctx.moduleExports.set(e,t)}aliasType(e){if(e==="*")return"any";return e.trim()}findVariableTypeAndDescription(e){let t=this.getPropByLocalOrPublic(e);if(t?.type)return{type:t.type,description:t.description};if(!this.ctx.variableInfoCacheBuilt)this.ctx.variableInfoCache=Bi(this.ctx,this),this.ctx.variableInfoCacheBuilt=!0;let r=this.ctx.variableInfoCache.get(e),n=this.ctx.explicitVariableTypesByName.get(e);if(n)return{type:n,description:r?.description};return r??null}accumulateGeneric(e,t){if(this.ctx.generics)this.ctx.generics=[`${this.ctx.generics[0]}, ${e}`,`${this.ctx.generics[1]}, ${t}`];else this.ctx.generics=[e,t]}cleanup(){this.ctx=Pr()}static SCRIPT_BLOCK_REGEX=/(<script[^>]*>)([\s\S]*?)(<\/script>)/gi;static TS_DIRECTIVE_REGEX=/\/\/\s*@ts-[^\n\r]*/g;static stripTypeScriptDirectivesFromScripts(e){if(!e.includes("@ts-"))return e;return pe.SCRIPT_BLOCK_REGEX.lastIndex=0,e.replace(pe.SCRIPT_BLOCK_REGEX,(t,r,n,i)=>{pe.TS_DIRECTIVE_REGEX.lastIndex=0;let o=n.replace(pe.TS_DIRECTIVE_REGEX,"");return r+o+i})}parseSvelteComponent(e,t){this.cleanup(),this.ctx.componentFilePath=t.filePath;let r=pe.stripTypeScriptDirectivesFromScripts(e);this.ctx.source=r;let n=Tn(r);if(Ni(this,this.ctx,n),this.ctx.parsed=n,this.ctx.scriptLanguage==="ts")zt(this.ctx.parsed.module),zt(this.ctx.parsed.instance),zt(this.ctx.parsed.fragment);this.ctx.syntaxMode=_i(this.ctx);let i=this.ctx.parsed.css,o=i?.start!==void 0&&i?.end!==void 0?r.slice(0,i.start)+" ".repeat(i.end-i.start)+r.slice(i.end):r;bi(this.ctx,this,o);let a={type:"ComponentRoot",instance:this.ctx.parsed.instance,fragment:this.ctx.parsed.fragment};if(jr(this.ctx,this.ctx.parsed?.module),jr(this.ctx,this.ctx.parsed?.instance),this.ctx.parsed?.module)_e(this.ctx.parsed?.module,{enter:(x)=>{if(x.type==="ImportDeclaration")Xt(this.ctx,x);if(x.type==="FunctionDeclaration"){let s=x;if(s.id?.name)this.ctx.funcDecls.set(s.id.name,s)}if(x.type==="VariableDeclaration")this.ctx.vars.add(x);if(x.type==="ExportNamedDeclaration"){if(x.declaration==null)return;if(!x.declaration||typeof x.declaration!=="object"||!("type"in x.declaration))return;let s,c,u=!1,f,y,g,S=!1,P,A,v;if(x.declaration.type==="FunctionDeclaration"){let G=x.declaration;if(!G.id?.name)return;s=G.id.name,c="function",f=void 0,y="() => any",S=!0,u=!0}else if(x.declaration.type==="VariableDeclaration"){let G=x.declaration,U=G.declarations[0];if(!U||typeof U!=="object"||!("id"in U))return;let{id:re,init:Ie}=U;if(!re||typeof re!=="object"||!("name"in re))return;let Z=re.name;s=Z,c=Sa(G.kind);let we=Ie==null?{isFunction:!1}:$e(this,this.ctx,Ie);if({value:f,type:y,isFunction:S,defaultValue:P}=we,A=y,v=we,g=this.getExplicitPropType(Z),v.pendingCallDefault)this.ctx.pendingCallDefaultCandidates.push({propName:Z,location:"moduleExports",...v.pendingCallDefault})}else return;let _=He(this.ctx,this,x),{type:w,typeSource:R,description:H,params:J,returnType:F,isFunction:O}=St({explicitType:g,typeSeed:y,inferredTypeForSource:A,jsdocType:_?.type,jsdocDescription:_?.description,jsdocParams:_?.params,jsdocReturnType:_?.returnType,resolvedType:v?.resolvedType,resolvedDescription:v?.resolvedDescription,resolvedParams:v?.resolvedParams,resolvedReturnType:v?.resolvedReturnType,initializerIsFunction:S,isFunctionDeclaration:u,typedefs:this.ctx.typedefs});this.addModuleExport(s,{name:s,kind:c,description:H,deprecated:_?.deprecated,tags:_?.tags,type:w,typeSource:R,value:f,defaultValue:P,params:J,returnType:F,isFunction:O,isFunctionDeclaration:u,isRequired:!1,constant:c==="const",reactive:!1,source:se(this.ctx,x)})}}});let p,l=new Set,m=new Set,d=[];Si(this,this.ctx),this.ctx.activeScopes.push(this.ctx.componentScope);let b=vi(this.ctx);if(_e(a,{enter:(x,s,c)=>{let u=Ci(this,this.ctx,b,x);if(u)this.ctx.activeScopes.push(u);let f=x.type;if(x.type==="AssignmentExpression")Fr(this.ctx,x.left);if(x.type==="UpdateExpression")Fr(this.ctx,x.argument);if(x.type==="CallExpression"){let y=x,g=y.callee&&typeof y.callee==="object"&&"name"in y.callee?y.callee.name:void 0;if(g==="createEventDispatcher"){if(s&&typeof s==="object"&&"id"in s&&s.id&&typeof s.id==="object"&&"name"in s.id)p=s.id.name}if(g==="$host"){if(s&&typeof s==="object"&&"id"in s&&s.id&&typeof s.id==="object"&&"name"in s.id)l.add(s.id.name)}if(g==="setContext")ei(this.ctx,this,x,s??void 0);if(g)d.push({name:g,arguments:y.arguments,node:y});if(Bn(y.callee)&&Le(y.callee.property)&&y.callee.property.name==="dispatchEvent"&&(De(y.callee.object,"$host")||Le(y.callee.object)&&l.has(y.callee.object.name))){let S=ti(this.ctx,y);if(S)m.add(S)}}if(f==="SpreadAttribute"){let y=x;if(y.expression?.name==="$$restProps"||this.ctx.restPropLocals.has(y.expression?.name??""))Ti(this.ctx,s)}if(x.type==="FunctionDeclaration"){let y=x;if(y.id?.name)this.ctx.funcDecls.set(y.id.name,y)}if(x.type==="ImportDeclaration")Xt(this.ctx,x);if(x.type==="VariableDeclaration"){if(this.ctx.vars.add(x),s&&typeof s==="object"&&"type"in s&&s.type==="Program"&&x.declarations.some((y)=>De(je(y.init),"$props")))Ii(this,this.ctx,x)}if(x.type==="ExportNamedDeclaration"){if(x.declaration==null&&x.specifiers.length===0)return;let y;if(x.declaration==null&&x.specifiers[0]?.type==="ExportSpecifier"){let ie=x.specifiers[0],ze=ie.local&&typeof ie.local==="object"&&"name"in ie.local?ie.local.name:void 0,Xe=ie.exported&&typeof ie.exported==="object"&&"name"in ie.exported?ie.exported.name:void 0;if(!ze||!Xe)return;let it;for(let dt of Array.from(this.ctx.vars))if(dt.declarations.some((Me)=>Me.id&&typeof Me.id==="object"&&("type"in Me.id)&&Me.id.type==="Identifier"&&Me.id.name===ze)){it=dt;break}x.declaration=it,y=Xe}if(x.declaration==null)return;if(!x.declaration||typeof x.declaration!=="object"||!("type"in x.declaration))return;let g,S=!1,P,A,v,_=!1,w=!1,R,H,J,F;if(x.declaration.type==="FunctionDeclaration"){let ie=x.declaration;if(!ie.id?.name)return;y??=ie.id.name,R=ie.id.name,g="function",P=void 0,A="() => any",_=!0,S=!0,w=!1}else if(x.declaration.type==="VariableDeclaration"){let ie=x.declaration,ze=ie.declarations[0];if(!ze||typeof ze!=="object"||!("id"in ze))return;let{id:Xe,init:it}=ze;if(Xe&&typeof Xe==="object"&&"name"in Xe){let Me=Xe.name;R=Me,y??=Me,v=this.getExplicitPropType(Me)}else return;g=Sa(ie.kind),w=g==="let"&&it==null;let dt=it==null?{isFunction:!1}:$e(this,this.ctx,it);if({value:P,type:A,isFunction:_,defaultValue:H}=dt,J=A,F=dt,F.pendingCallDefault)this.ctx.pendingCallDefaultCandidates.push({propName:y,location:"props",...F.pendingCallDefault})}else return;let O=He(this.ctx,this,x),{type:G,typeSource:U,description:re,params:Ie,returnType:Z,isFunction:we}=St({explicitType:v,typeSeed:A,inferredTypeForSource:J,jsdocType:O?.type,jsdocDescription:O?.description,jsdocParams:O?.params,jsdocReturnType:O?.returnType,resolvedType:F?.resolvedType,resolvedDescription:F?.resolvedDescription,resolvedParams:F?.resolvedParams,resolvedReturnType:F?.resolvedReturnType,initializerIsFunction:_,isFunctionDeclaration:S,typedefs:this.ctx.typedefs});ft(this,this.ctx,y,{name:y,...R!==void 0&&R!==y?{localName:R}:{},kind:g,description:re,binding:O?.binding,deprecated:O?.deprecated,tags:O?.tags,type:G,typeSource:U,value:P,defaultValue:H,params:Ie,returnType:Z,isFunction:we,isFunctionDeclaration:S,isRequired:w,constant:g==="const",reactive:this.ctx.reactive_vars.has(y),source:se(this.ctx,x)})}if(f==="Comment"){let g=x?.data?.trim()??"";if(va.test(g))this.ctx.componentComment=g.replace(va,"").replace(Ll,""),this.ctx.componentCommentSource=se(this.ctx,x)}if(f==="SlotElement"){let y=x,g=y.attributes?.find((v)=>v.name==="name")?.value,S=(Array.isArray(g)?g[0]:void 0)?.data,P=(y.attributes||[]).filter((v)=>v.name!=="name").reduce((v,_)=>{let w={value:void 0,replace:!1},R=_.value;if(R===void 0||R===!0)return v;let H=Array.isArray(R)?R[0]:R;if(H){let{type:J,expression:F,raw:O,start:G,end:U}=H;if(J==="Text"&&O!==void 0)w.value=JSON.stringify(O);else if(!Array.isArray(R)&&J==="ExpressionTag"&&F&&typeof F==="object"&&"type"in F&&F.type==="Identifier"&&"name"in F&&F.name===_.name)w.value=F.name,w.replace=!0;if(F&&typeof F==="object"&&"type"in F){if(F.type==="Literal"&&"value"in F){let re=F.value;w.value=typeof re==="string"?JSON.stringify(re):String(re)}else if(F.type==="MemberExpression")w.value=qt(this.ctx,this,F);else if(F.type!=="Identifier"){if(G!==void 0&&U!==void 0){if(F.type==="ObjectExpression"||F.type==="TemplateLiteral")w.value=ee(this.ctx,G+1,U-1)}}}}if(_.name)v[_.name]=w;return v},{}),A=y.fragment?.nodes?.map(({start:v,end:_})=>{if(v===void 0||_===void 0)return"";return ee(this.ctx,v,_)??""}).join("").trim();Tt(this.ctx,{slot_name:S,slot_props:P,slot_fallback:A,source:se(this.ctx,x)})}if(f==="RenderTag"){let y=x,g=fi(this.ctx,y.expression);if(g){let S;if(g.arguments.length===0)S={};else if(g.arguments.length===1&&typeof g.arguments[0]==="object"&&g.arguments[0]&&"type"in g.arguments[0]&&g.arguments[0].type==="ObjectExpression")S=di(this.ctx,this,g.arguments[0]);else if(g.arguments.length===1)Oe(this.ctx,"syntax-skipped",g.publicName,`{@render ${g.publicName}(...)} argument is not a plain object literal; the render call was not mapped to slot metadata.`,se(this.ctx,x));let P=g.publicName==="children"?void 0:g.publicName,A=P===void 0?Il:P;if(S!==void 0)Tt(this.ctx,{slot_name:P,slot_props:S,source:se(this.ctx,x)});if(S!==void 0||this.ctx.slots.has(A))this.ctx.snippetPropLocals.add(g.trackingName)}}if(f==="OnDirective"){let y=x;if(y.expression==null&&y.name){if(s!=null&&typeof s==="object"&&"name"in s){let g=typeof s.name==="string"?s.name:void 0,S="type"in s?String(s.type):void 0;if(g&&S){let P=mt(S)?{type:"InlineComponent",name:g}:{type:"Element",name:g};this.ctx.forwardedEvents.set(y.name,P);let A=this.ctx.events.get(y.name),v=this.ctx.eventDescriptions.get(y.name),_=A?.deprecated;if(!A)this.ctx.events.set(y.name,{type:"forwarded",name:y.name,element:P,description:v,deprecated:_,source:se(this.ctx,x)});else if(A.type==="forwarded"&&v&&!A.description)this.ctx.events.set(y.name,{...A,description:v,deprecated:A.deprecated??_,source:A.source||se(this.ctx,x)})}}}}if(f==="BindDirective"&&s&&typeof s==="object"&&"type"in s&&(yt(String(s.type))||mt(String(s.type)))){let y=x;if(y.expression?.name){let g=vt(this.ctx,y.expression.name);if(g)this.ctx.reactive_vars.add(g)}if(yt(String(s.type))&&y.name==="this"&&y.expression?.name&&"name"in s&&typeof s.name==="string"){let g=vt(this.ctx,y.expression.name);if(!g)return;let S=s.name;if(this.ctx.bindings.has(g)){let P=this.ctx.bindings.get(g);if(P&&!P.elements.includes(S))this.ctx.bindings.set(g,{...P,elements:[...P.elements,S]})}else this.ctx.bindings.set(g,{elements:[S]})}}},leave:(x)=>{if(st(x))this.ctx.activeScopes.pop(),Ai(b,x)}}),p!==void 0){for(let x of d)if(x.name===p){let s=x.arguments[0],c=s&&typeof s==="object"&&"value"in s?s.value:void 0,u=x.arguments[1],f=u&&typeof u==="object"&&"value"in u?u.value:void 0;if(c!=null)gt(this.ctx,{name:String(c),detail:f==null?"":Ir(f),has_argument:Boolean(u),source:se(this.ctx,x.node)})}}let T=new Set(m);if(p!==void 0){for(let x of d)if(x.name===p){let s=x.arguments[0],c=s&&typeof s==="object"&&"value"in s?s.value:void 0;if(c!=null)T.add(String(c))}}this.ctx.forwardedEvents.forEach((x,s)=>{let c=this.ctx.events.get(s);if(c&&c.type==="dispatched"&&!T.has(s)){let u=this.ctx.eventDescriptions.get(s),f={type:"forwarded",name:s,element:x,description:u,deprecated:c.deprecated,tags:c.tags,source:c.source};if(c.detail!==void 0&&c.detail!=="undefined")f.detail=c.detail;this.ctx.events.set(s,f)}}),Li(this.ctx,T);let E=this.ctx.syntaxMode==="runes"?new Set(Array.from(this.ctx.snippetPropLocals,(x)=>this.resolvePublicPropName(x))):new Set,k=pe.mapToArray(this.ctx.props).filter((x)=>!E.has(x.name)).map((x)=>{if(this.ctx.bindings.has(x.name)){let s=this.ctx.bindings.get(x.name)?.elements.sort().map((c)=>$n(c)).join(" | ");return{...x,type:`null | ${s}`,typeSource:"inferred",reactive:x.reactive||this.ctx.reactive_vars.has(x.name)}}return{...x,reactive:x.reactive||this.ctx.reactive_vars.has(x.name)}});this.ctx.activeScopes.length=0;let B=pe.mapToArray(this.ctx.slots).map((x)=>{if(!x.slot_props)return x;if(typeof x.slot_props==="string")return Dl.test(x.slot_props)?{...x,slot_props:"Record<string, never>"}:x;let s=x.slot_props,c=[];for(let f of Object.keys(s)){if(s[f].replace&&s[f].value!==void 0)s[f].value=this.getPropTypeByLocalOrPublic(s[f].value);if(s[f].value===void 0)s[f].value="any";c.push(`${f}: ${s[f].value}`)}let u=c.length===0?"Record<string, never>":c.length===1?`{ ${c[0]} }`:`{
|
|
31
33
|
${c.join(`;
|
|
32
34
|
`)};
|
|
33
|
-
}`;return{...
|
|
34
|
-
`);for(let{name:s,constraint:c}of this.ctx.deferredSlotBlockGenerics){let
|
|
35
|
-
|
|
36
|
-
`)
|
|
37
|
-
`)
|
|
38
|
-
`);continue}if(
|
|
39
|
-
`)
|
|
40
|
-
`);t.push(
|
|
41
|
-
`)
|
|
42
|
-
`
|
|
43
|
-
`),r=[],n=0,i=!1,o=0;for(let a of t){let p=a.trim();if(p===""){r.push("");continue}if(i){if(r.push(`${" ".repeat(o)} ${p}`),p.includes("*/"))i=!1;continue}if(p.startsWith("/**")&&!p.includes("*/")){r.push(" ".repeat(n)+p),i=!0,o=n;continue}let u=Hl(p),m=Ca.test(u),f=Math.max(0,n-(m?1:0));if(r.push(" ".repeat(f)+u),u.startsWith("/**")&&u.includes("*/"))continue;let b=null;for(let E=0;E<u.length;E++){let T=u[E],w=u[E-1];if(b){if(b==="double"&&T==='"'&&w!=="\\"||b==="single"&&T==="'"&&w!=="\\"||b==="template"&&T==="`"&&w!=="\\")b=null;continue}if(T==='"')b="double";else if(T==="'")b="single";else if(T==="`")b="template";else if(Il.has(T))n++;else if(Dl.has(T))n=Math.max(0,n-1);else if(T==="<")n++;else if(T===">"&&w!=="=")n=Math.max(0,n-1)}}return r.join(`
|
|
44
|
-
`)}function Gl(e){let t=e.split(`
|
|
45
|
-
`).map((n)=>n.replace(Pa,"")),r=[];for(let n of t){let i=n==="",o=r.length>0&&r[r.length-1]==="",a=r.length>0&&Ml.test(r[r.length-1]);if(i){if(r.length===0||o||a)continue;r.push(n);continue}if(Ca.test(n)&&o)r.pop();r.push(n)}while(r.length>0&&r[r.length-1]==="")r.pop();return r.join(`
|
|
46
|
-
`)}function ka(e){let t=Aa(e),r=Ul(t);return`${Gl(r)}
|
|
47
|
-
`}var Ke="any",ke="",Wl="Record<string, any>",vn="Record<string, never>",Kl=/(-|\s+|:)/,zl=/("|')/,Xl=/CustomEvent/,Jl=/^[A-Z]/,Yl=/\n/,Ia=/=>/,Ql=/(?:^|\n)@default\b/,En=/\n/g,Zl=/\s+/g,lt=/(^|[^.\w])Snippet(?:\s*<|\b)/,eu=/import\s+type\s+[^;]*\bSnippet\b[^;]*from\s+"svelte";/,tu=/[.*+?^${}()|[\]\\]/g,ru=/^const\s+/;function Sn(e){return e.replace(ru,"")}function nu(e){if(!e)return;return e.replace(En,`
|
|
35
|
+
}`;return{...x,slot_props:u}}).sort((x,s)=>{let c=x.name??"",u=s.name??"";if(c<u)return-1;if(c>u)return 1;return 0});if(this.ctx.deferredSlotBlockGenerics.length>0){let x=[...k.map((s)=>s.type??""),...B.map((s)=>s.slot_props??"")].join(`
|
|
36
|
+
`);for(let{name:s,constraint:c}of this.ctx.deferredSlotBlockGenerics){let u=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");if(!new RegExp(`\\b${u}\\b`).test(x))continue;this.accumulateGeneric(s,c)}}if(this.ctx.scriptGenericsAttribute){if(this.ctx.generics)Oe(this.ctx,"syntax-skipped","generics",'Both the "generics" script attribute and @generics/@template JSDoc tags declare component generics; the script attribute takes precedence and the JSDoc declaration was ignored.',this.ctx.scriptGenericsAttribute.source);this.ctx.generics=ci(this.ctx.scriptGenericsAttribute.value)}let C=pe.mapToArray(this.ctx.moduleExports),V=pe.mapToArray(this.ctx.events).map((x)=>{switch(x.type){case"forwarded":return{...x,element:x.element.name};case"dispatched":return x;default:return x}}).sort((x,s)=>{let c=x.name.localeCompare(s.name);if(c!==0)return c;let u=x.type.localeCompare(s.type);if(u!==0)return u;if(x.type==="forwarded"&&s.type==="forwarded"){let f=x.element.localeCompare(s.element);if(f!==0)return f}return(x.detail??"").localeCompare(s.detail??"")}),j=pe.mapToArray(this.ctx.typedefs),D=pe.mapToArray(this.ctx.contexts),X={props:new Map(this.ctx.pendingCallDefaultCandidates.filter((x)=>x.location==="props").map((x)=>[x.propName,x])),moduleExports:new Map(this.ctx.pendingCallDefaultCandidates.filter((x)=>x.location==="moduleExports").map((x)=>[x.propName,x]))};for(let x of k)if(x.typeSource==="unknown"){let s=X.props.get(x.name);if(s)x.type="any";let c=s?s.importSource?`Prop "${x.name}" default calls "${s.calleeName}()" imported from "${s.importSource}"; falling back to "any" pending cross-file resolution.`:`Prop "${x.name}" default calls "${s.calleeName}()", but its return type could not be inferred; falling back to "any".`:`Prop "${x.name}" type could not be inferred; falling back to "${x.type??"any"}".`;Oe(this.ctx,"prop-unknown-type",x.name,c,x.source)}for(let x of C)if(x.typeSource==="unknown"&&X.moduleExports.has(x.name))x.type="any";for(let x of this.ctx.jsDocEventNames){if(T.has(x))continue;if(this.ctx.forwardedEvents.has(x))continue;if(this.ctx.props.has(`on${x}`))continue;Oe(this.ctx,"event-no-source",x,`@event "${x}" has no matching dispatch or callback prop.`,this.ctx.jsDocEventSources.get(x))}let M={source:Ut(this.ctx,0,this.ctx.source?.length),syntaxMode:this.ctx.syntaxMode,...this.ctx.scriptLanguage?{scriptLanguage:this.ctx.scriptLanguage}:{},props:k,moduleExports:C,slots:B,events:V,typedefs:j,generics:this.ctx.generics,rest_props:this.ctx.rest_props,extends:this.ctx.extends,componentComment:this.ctx.componentComment,componentCommentSource:this.ctx.componentCommentSource,contexts:D,customElementTag:this.ctx.customElementTag,diagnostics:this.ctx.diagnosticRecords.slice()},Q=ai(this.ctx);if(Q)M[Ht]=Q;return M}}var Aa="sveld",Pa="0.36.11";var En="5.56.10";var wa=1,ka=new WeakMap;function Ot(e,t={}){let r=ka.get(e),n=r?.get(t.entryExports);if(n)return n;let i=Array.from(e,([,a])=>{let{diagnostics:p,...l}=a;return l}).sort((a,p)=>a.moduleName.localeCompare(p.moduleName)),o={schemaVersion:wa,generator:{name:Aa,version:Pa,svelteVersion:En},total:i.length,components:i};if(t.entryExports&&t.entryExports.length>0)o.totalExports=t.entryExports.length,o.exports=t.entryExports;if(!r)r=new Map,ka.set(e,r);return r.set(t.entryExports,o),o}var Ml=/\binterface\s+[A-Za-z_$][\w$]*(\s*<[^{};]*>)?\s*$/;var Ol=/[ \t]+$/,Na=/\s/,Bl=/\s{2}|[^\S ]/;function Fl(e){return Ml.test(e.slice(-200))}var _a=[""];function Sn(e){let t=_a[e];if(t===void 0)t=" ".repeat(e),_a[e]=t;return t}function Vl(e,t){let r="";for(let n=e.length-1;n>=0&&r.length<t;n--)r=e[n]+r;return r.length>t?r.slice(-t):r}function jl(e){if(e.length===0)return!1;let t=e[e.length-1];return t.charCodeAt(t.length-1)===10}function $l(e){while(e.length>0){let t=e[e.length-1],r=t.length;while(r>0){let n=t.charCodeAt(r-1);if(n!==32&&n!==9)break;r--}if(r===t.length)return;if(r===0){e.pop();continue}e[e.length-1]=t.slice(0,r);return}}function Hl(e){while(e.length>0){let t=e[e.length-1];if(!Na.test(t[t.length-1]))return;let r=t.trimEnd();if(r.length===t.length)return;if(r.length===0){e.pop();continue}e[e.length-1]=r;return}}function ql(e){if(e.includes("{"))return!1;let t=0,r=0;for(let n=0;n<e.length;n++){let i=e.charCodeAt(n);if(t!==0){if(i===t&&e.charCodeAt(n-1)!==92)t=0;continue}if(i===34||i===39||i===96){t=i;continue}if(i===59&&++r>=2)return!0}return!1}function Ul(e){if(!Bl.test(e))return e.trimEnd();let t="",r=null,n=!1;for(let i=0;i<e.length;i++){let o=e[i],a=e[i-1];if(r){if(t+=o,r==="double"&&o==='"'&&a!=="\\"||r==="single"&&o==="'"&&a!=="\\"||r==="template"&&o==="`"&&a!=="\\")r=null;n=!1;continue}if(o==='"'||o==="'"||o==="`"){r=o==='"'?"double":o==="'"?"single":"template",t+=o,n=!1;continue}if(Na.test(o)){if(!n&&t.length>0)t+=" ",n=!0;continue}t+=o,n=!1}return t.trimEnd()}function Gl(e){let t=new Int32Array(e.length).fill(-1),r=[],n=0;for(let i=0;i<e.length;i++){let o=e.charCodeAt(i);if(n===4){if(o===47&&e.charCodeAt(i-1)===42)n=0;continue}if(n===1){if(o===34&&e.charCodeAt(i-1)!==92)n=0;continue}if(n===2){if(o===39&&e.charCodeAt(i-1)!==92)n=0;continue}if(n===3){if(o===96&&e.charCodeAt(i-1)!==92)n=0;continue}if(o===47){if(e.charCodeAt(i+1)===42)n=4}else if(o===34)n=1;else if(o===39)n=2;else if(o===96)n=3;else if(o===123)r.push(i);else if(o===125&&r.length>0)t[r.pop()]=i}return t}function Ia(e,t,r,n){let i=[],o=0,a=t;for(let p=t;p<r;p++){let l=e.charCodeAt(p);if(o===4){if(l===47&&e.charCodeAt(p-1)===42)o=0;continue}if(o===1){if(l===34&&e.charCodeAt(p-1)!==92)o=0;continue}if(o===2){if(l===39&&e.charCodeAt(p-1)!==92)o=0;continue}if(o===3){if(l===96&&e.charCodeAt(p-1)!==92)o=0;continue}if(l===47){if(e.charCodeAt(p+1)===42)o=4;continue}if(l===34){o=1;continue}if(l===39){o=2;continue}if(l===96){o=3;continue}if(l===123){let m=n[p];if(m===-1||m>=r)continue;if(a<p)i.push(e.slice(a,p));let d=p+1,b=e.slice(d,m);if(b.trim()===""){i.push("{}"),p=m,a=m+1;continue}let T=e.charCodeAt(d)===10;if(!T&&!b.includes("/*")&&!ql(b)&&!Fl(Vl(i,200))){let E=Ia(e,d,m,n),k=E.trim();if(!k.includes(`
|
|
37
|
+
`)){let B=k.endsWith(";")?k.slice(0,-1):k,C=`{ ${Ul(B)} }`;if(C.length<=120){i.push(C),p=m,a=m+1;continue}}if(i.push("{"),E.charCodeAt(0)!==59)i.push(`
|
|
38
|
+
`);if(E.length>0)i.push(E);p=m-1,a=m;continue}if(i.push("{"),!T)i.push(`
|
|
39
|
+
`);a=d;continue}if(l===125){if(a<p)i.push(e.slice(a,p));if($l(i),!jl(i))i.push(`
|
|
40
|
+
`);i.push("}"),a=p+1;continue}if(l===59){if(a<p)i.push(e.slice(a,p));if(Hl(i),i.push(";"),e.charCodeAt(p+1)!==10)i.push(`
|
|
41
|
+
`);a=p+1}}if(a<r)i.push(e.slice(a,r));return i.join("")}function Wl(e){return Ia(e,0,e.length,Gl(e))}function Kl(e){if(!e.includes(" "))return e;let t="",r=0;for(let n=0;n<e.length;n++){let i=e.charCodeAt(n);if(r!==0){if(t+=e[n],i===r&&e.charCodeAt(n-1)!==92)r=0;continue}if(i===34||i===39||i===96){r=i,t+=e[n];continue}if(i===32&&t.charCodeAt(t.length-1)===32)continue;t+=e[n]}return t}function La(e){let t=e.charCodeAt(0);return t===125||t===93||t===41||t===62}function zl(e){let t=e.split(`
|
|
42
|
+
`),r=[],n=0,i=!1,o=0;for(let a=0;a<t.length;a++){let p=t[a].trim();if(p===""){r.push("");continue}if(i){if(r.push(`${Sn(o)} ${p}`),p.includes("*/"))i=!1;continue}if(p.startsWith("/**")&&!p.includes("*/")){r.push(Sn(n)+p),i=!0,o=n;continue}let l=Kl(p),m=Math.max(0,n-(La(l)?1:0));if(r.push(Sn(m)+l),l.startsWith("/**")&&l.includes("*/"))continue;let d=0;for(let b=0;b<l.length;b++){let T=l.charCodeAt(b);if(d!==0){if(T===d&&l.charCodeAt(b-1)!==92)d=0;continue}if(T===34||T===39||T===96)d=T;else if(T===123||T===40||T===91||T===60)n++;else if(T===125||T===41||T===93)n=Math.max(0,n-1);else if(T===62&&l.charCodeAt(b-1)!==61)n=Math.max(0,n-1)}}return r}function Xl(e){let t=[];for(let r=0;r<e.length;r++){let n=e[r],i=n.charCodeAt(n.length-1);if(i===32||i===9)n=n.replace(Ol,"");let o=t.length>0?t[t.length-1]:void 0,a=o==="";if(n===""){if(o===void 0||a)continue;let p=o.charCodeAt(o.length-1);if(p===123||p===40||p===91)continue;t.push(n);continue}if(a&&La(n))t.pop();t.push(n)}while(t.length>0&&t[t.length-1]==="")t.pop();return t.join(`
|
|
43
|
+
`)}function Da(e){return`${Xl(zl(Wl(e)))}
|
|
44
|
+
`}var Ke="any",ke="",Jl="Record<string, any>",Cn="Record<string, never>",Yl=/(-|\s+|:)/,Ql=/("|')/,Zl=/CustomEvent/,eu=/^[A-Z]/,tu=/\n/,Ba=/=>/,ru=/(?:^|\n)@default\b/,An=/\n/g,nu=/\s+/g,ut=/(^|[^.\w])Snippet(?:\s*<|\b)/,iu=/import\s+type\s+[^;]*\bSnippet\b[^;]*from\s+"svelte";/,su=/[.*+?^${}()|[\]\\]/g,au=/^const\s+/;function Pn(e){return e.replace(au,"")}function ou(e){if(!e)return;return e.replace(An,`
|
|
48
45
|
* `)}function mr(e){if(!e)return"";return`/** ${e} */`}function yr(e){if(!e)return"";return`/**
|
|
49
|
-
* ${e.replace(
|
|
46
|
+
* ${e.replace(An,`
|
|
50
47
|
* `)}
|
|
51
|
-
*/`}function
|
|
48
|
+
*/`}function Fa(e){if(e===void 0)return;return e===!0?"@deprecated":`@deprecated ${e}`}function cu(e){let t=Fa(e);if(t===void 0)return;return`* ${t.replace(An,`
|
|
52
49
|
* `)}
|
|
53
|
-
`}function
|
|
50
|
+
`}function pu(e,t){if(!t)return[`@${e}`];if(!t.includes(`
|
|
54
51
|
`))return[`@${e} ${t}`];return[`@${e}`,...t.split(`
|
|
55
|
-
`)]}function
|
|
52
|
+
`)]}function Va(e){let t=[];for(let{name:r,body:n}of e??[])t.push(...pu(r,n));return t}function Bt(e,t,r){let n=Fa(r),i=Va(t),o=i.length>0;if(!e&&!o&&!n)return"";if(!o&&!n)return e?.includes(`
|
|
56
53
|
`)?yr(e):mr(e);let a=[];if(e)a.push(...e.split(`
|
|
57
54
|
`));if(a.push(...i),n)a.push(...n.split(`
|
|
58
55
|
`));return`/**
|
|
59
56
|
* ${a.join(`
|
|
60
57
|
* `)}
|
|
61
|
-
*/`}function
|
|
58
|
+
*/`}function lu(e){let t=Va(e);if(t.length===0)return"";return t.map((r)=>`* ${r}
|
|
62
59
|
`).join("")}function gr(e){if(e===void 0)return Ke;return`${e}
|
|
63
60
|
`}function xr(e){if(e.typedefs.length===0)return ke;return e.typedefs.map((t)=>`${t.description?`${yr(t.description)}
|
|
64
61
|
`:""}export ${t.ts}`).join(`
|
|
65
62
|
|
|
66
|
-
`)}var
|
|
67
|
-
`:"",m=p.optional?"?":"";return`${
|
|
63
|
+
`)}var Ra=new Map;function ja(e,t){let r=Ra.get(t);if(r===void 0){let n=t.replace(su,"\\$&");r=new RegExp(`\\b${n}\\b`),Ra.set(t,r)}return r.test(e)}var Ma,Oa=[];function kn(e){if(e!==Ma)Ma=e,Oa=xt(e);return Oa}function uu(e){if(e===null)return[];return e[0].split(",").map((t,r)=>({name:t.trim(),constraint:(kn(e[1]??"")[r]??t).trim()}))}function hu(e,t){let r=uu(e).filter(({name:n})=>ja(t,n));if(r.length===0)return{declSuffix:ke,refSuffix:ke};return{declSuffix:`<${r.map(({constraint:n})=>Pn(n)).join(", ")}>`,refSuffix:`<${r.map(({name:n})=>n).join(", ")}>`}}function $a(e){if(!e.contexts||e.contexts.length===0)return ke;let t=e.generics===null?[]:e.generics[0].split(",").map((r,n)=>({name:r.trim(),constraint:(kn(e.generics?.[1]??"")[n]??r).trim()}));return e.contexts.map((r)=>{let n=r.properties.map((p)=>{let l=p.description?`${mr(p.description)}
|
|
64
|
+
`:"",m=p.optional?"?":"";return`${l}${p.name}${m}: ${p.type};`}).join(`
|
|
68
65
|
`),i=r.description?`${yr(r.description)}
|
|
69
|
-
`:"",o=t.filter(({name:p})=>r.properties.some((
|
|
66
|
+
`:"",o=t.filter(({name:p})=>r.properties.some((l)=>ja(l.type,p))).map(({constraint:p})=>p),a=o.length>0?`<${o.map(Pn).join(", ")}>`:"";if(r.properties.length===0)return`${i}export type ${r.typeName} = Record<string, never>;`;return`${i}export type ${r.typeName}${a} = {
|
|
70
67
|
${n}
|
|
71
68
|
};`}).join(`
|
|
72
69
|
|
|
73
|
-
`)}function
|
|
74
|
-
`}function
|
|
75
|
-
${e}*/`:ke}function
|
|
76
|
-
`].filter(Boolean).join(""),
|
|
77
|
-
${
|
|
78
|
-
${C.name}${C.isRequired?"":"?"}: ${
|
|
70
|
+
`)}function Ft(e){if(Yl.test(e))return Ql.test(e)?e:`"${e}"`;return e}function Ha(e,t){if(!e)return;return`* ${t||e}
|
|
71
|
+
`}function wn(e,t,r){return[Ha(ou(e)),cu(t),lu(r)].filter(Boolean).join("")}function _n(e){return e.length>0?`/**
|
|
72
|
+
${e}*/`:ke}function du(e){let t=e.props.filter((C)=>!C.isFunctionDeclaration&&C.kind!=="const"),r=new Set([...t.map((C)=>C.name),...Array.from(e.canonicalPropNames??[])]),n=t.map((C)=>{let V=C.value;if(typeof C.value==="string")V=C.value.replace(nu," ");if(C.value===void 0)V="undefined";let D=ru.test(C.description??"")||C.isFunction&&C.value===void 0,X=[wn(C.description,C.deprecated,C.tags),Ha(C.constant,"@constant"),D?null:`* @default ${V}
|
|
73
|
+
`].filter(Boolean).join(""),M=C.constant&&!C.isFunction?C.value:C.type;return`
|
|
74
|
+
${_n(X)}
|
|
75
|
+
${C.name}${C.isRequired?"":"?"}: ${M};`}),i=e.canonicalPropsType?n.filter((C,V)=>{let j=t[V];return j?!(e.canonicalPropNames?.has(j.name)??!1):!0}):n,o=(e.slots||[]).filter((C)=>!C.default&&C.name!=null&&!r.has(C.name)).map((C)=>{let V=C.name,j=Ft(V),D=Bt(C.description,C.tags,C.deprecated),X=D?`${D}
|
|
79
76
|
`:"",Q=C.slot_props&&C.slot_props!=="Record<string, never>"?`(this: void, ...args: [${C.slot_props}]) => void`:"(this: void) => void";return`
|
|
80
|
-
${X}${
|
|
81
|
-
`:"",
|
|
82
|
-
${
|
|
83
|
-
`),b=`${e.moduleName}Props`,
|
|
84
|
-
type $Props${
|
|
77
|
+
${X}${j}?: ${Q};`}),a=(e.slots||[]).find((C)=>C.default||C.name===null),p=a&&!r.has("children")?(()=>{let C=Bt(a.description,a.tags,a.deprecated),V=C?`${C}
|
|
78
|
+
`:"",D=a.slot_props&&a.slot_props!=="Record<string, never>"?`(this: void, ...args: [${a.slot_props}]) => void`:"(this: void) => void";return`
|
|
79
|
+
${V}children?: ${D};`})():"",l=e.events?bu({events:e.events},r):[],m=[...o,p,...l].filter(Boolean),d=[...i,...m].join(`
|
|
80
|
+
`),b=`${e.moduleName}Props`,T=ke,E=e.generics?`<${kn(e.generics[1]).map((C)=>Pn(C.trim())).join(", ")}>`:"",k=e.generics?`<${e.generics[0]}>`:"",B=e.canonicalPropsType?`
|
|
81
|
+
type $Props${E} = ${e.canonicalPropsType}${d.trim()===""?"":` & {${d}
|
|
85
82
|
}`};
|
|
86
83
|
`:`
|
|
87
|
-
type $Props${
|
|
88
|
-
${
|
|
84
|
+
type $Props${E} = {
|
|
85
|
+
${d}
|
|
89
86
|
};
|
|
90
|
-
`;if(e.rest_props?.type==="Element"){let C;if(e.rest_props.name==="svelte:element")if(e.rest_props.thisValue)C=`SvelteHTMLElements["${e.rest_props.thisValue}"]`;else C="HTMLAttributes<HTMLElement>";else C=e.rest_props.name.split("|").map((
|
|
87
|
+
`;if(e.rest_props?.type==="Element"){let C;if(e.rest_props.name==="svelte:element")if(e.rest_props.thisValue)C=`SvelteHTMLElements["${e.rest_props.thisValue}"]`;else C="HTMLAttributes<HTMLElement>";else C=e.rest_props.name.split("|").map((D)=>`SvelteHTMLElements["${D.trim()}"]`).join(" & ");let V="[key: `data-${string}`]: unknown;",j=e.rest_props.description?e.rest_props.description.includes(`
|
|
91
88
|
`)?`${yr(e.rest_props.description)}
|
|
92
89
|
`:`${mr(e.rest_props.description)}
|
|
93
|
-
`:"";if(e.extends===void 0)
|
|
94
|
-
${
|
|
90
|
+
`:"";if(e.extends===void 0)T=`
|
|
91
|
+
${j}${C?`type $RestProps = ${C};
|
|
95
92
|
`:""}
|
|
96
|
-
${e.canonicalPropsType?`type $Props${
|
|
93
|
+
${e.canonicalPropsType?`type $Props${E} = (${e.canonicalPropsType}) & {${d}
|
|
97
94
|
|
|
98
|
-
${
|
|
99
|
-
};`:`type $Props${
|
|
100
|
-
${
|
|
95
|
+
${V}
|
|
96
|
+
};`:`type $Props${E} = {
|
|
97
|
+
${d}
|
|
101
98
|
|
|
102
|
-
${
|
|
99
|
+
${V}
|
|
103
100
|
};`}
|
|
104
101
|
|
|
105
|
-
export type ${b}${
|
|
106
|
-
`;else
|
|
107
|
-
${
|
|
102
|
+
export type ${b}${E} = Omit<$RestProps, keyof $Props${k}> & $Props${k};
|
|
103
|
+
`;else T=`
|
|
104
|
+
${j}${C?`type $RestProps = ${C};
|
|
108
105
|
`:""}
|
|
109
|
-
${e.canonicalPropsType?`type $Props${
|
|
106
|
+
${e.canonicalPropsType?`type $Props${E} = (${e.canonicalPropsType}) & {${d}
|
|
110
107
|
|
|
111
|
-
${
|
|
112
|
-
};`:`type $Props${
|
|
113
|
-
${
|
|
108
|
+
${V}
|
|
109
|
+
};`:`type $Props${E} = {
|
|
110
|
+
${d}
|
|
114
111
|
|
|
115
|
-
${
|
|
112
|
+
${V}
|
|
116
113
|
};`}
|
|
117
114
|
|
|
118
|
-
export type ${b}${
|
|
119
|
-
`}else if(
|
|
120
|
-
export type ${b}${
|
|
121
|
-
`;else if(e.canonicalPropsType)
|
|
115
|
+
export type ${b}${E} = Omit<$RestProps, keyof ($Props${k} & ${e.extends.interface})> & $Props${k} & ${e.extends.interface};
|
|
116
|
+
`}else if(d.trim()===""&&e.extends===void 0&&!e.canonicalPropsType)T=`
|
|
117
|
+
export type ${b}${E} = ${Cn};
|
|
118
|
+
`;else if(e.canonicalPropsType)T=`
|
|
122
119
|
${B}
|
|
123
|
-
export type ${b}${
|
|
124
|
-
`;else
|
|
125
|
-
export type ${b}${
|
|
126
|
-
${
|
|
120
|
+
export type ${b}${E} = ${e.extends===void 0?"":`${e.extends.interface} & `}$Props${k};
|
|
121
|
+
`;else T=`
|
|
122
|
+
export type ${b}${E} = ${e.extends===void 0?"":`${e.extends.interface} & `} {
|
|
123
|
+
${d}
|
|
127
124
|
};
|
|
128
|
-
`;return{props_name:b,prop_def:
|
|
129
|
-
`:""}${
|
|
125
|
+
`;return{props_name:b,prop_def:T}}function fu(e){if(e.slots.length===0)return Cn;let t=e.slots.map(({name:r,slot_props:n,...i})=>{let o=i.default||r===null?"default":Ft(r??""),a=Bt(i.description,i.tags,i.deprecated);return`${a?`${a}
|
|
126
|
+
`:""}${Ft(o)}: ${gr(n)};`}).join(`
|
|
130
127
|
`);return e.slots.length===1?`{${t}}`:`{
|
|
131
128
|
${t}
|
|
132
|
-
}`}var
|
|
133
|
-
`;return`${n}${
|
|
129
|
+
}`}var mu=()=>"WindowEventMap",yu=new Set(["click","dblclick","mousedown","mouseup","mousemove","mouseover","mouseout","mouseenter","mouseleave","contextmenu","wheel","keydown","keyup","keypress","submit","change","input","focus","blur","focusin","focusout","reset","select","touchstart","touchend","touchmove","touchcancel","drag","dragstart","dragend","dragover","dragenter","dragleave","drop","pointerdown","pointerup","pointermove","pointerover","pointerout","pointerenter","pointerleave","pointercancel","gotpointercapture","lostpointercapture","play","pause","ended","volumechange","timeupdate","loadeddata","loadedmetadata","canplay","canplaythrough","seeking","seeked","playing","waiting","stalled","suspend","abort","error","emptied","ratechange","durationchange","loadstart","progress","loadend","animationstart","animationend","animationiteration","animationcancel","transitionstart","transitionend","transitionrun","transitioncancel","scroll","resize","load","unload","beforeunload","cut","copy","paste","compositionstart","compositionupdate","compositionend"]);function vn(e=Ke){if(Zl.test(e))return e;return`CustomEvent<${e}>`}function gu(e){return yu.has(e)}function qa(e){switch(e.type){case"dispatched":return vn(e.detail);case"forwarded":{let t=e.element,n=!(t&&eu.test(t))||gu(e.name),i=e.detail!==void 0&&e.detail!=="undefined"&&!(e.detail==="null"&&n),o=e.detail==="null"&&!n;if(i||o)return vn(e.detail);else if(n)return`${mu()}["${e.name}"]`;else return vn()}default:return e}}function xu(e){if(e.events.length===0)return Jl;let t=e.events.map((r)=>{let n="",i=Bt(r.description,r.tags,r.deprecated);if(i)n=`${i}
|
|
130
|
+
`;return`${n}${Ft(r.name)}: ${qa(r)};
|
|
134
131
|
`}).join("");return e.events.length===1?`{${t}}`:`{
|
|
135
|
-
${t}}`}function
|
|
132
|
+
${t}}`}function bu(e,t){return e.events.map((r)=>{let n=`on${r.name}`;if(t.has(n))return;let i="",o=Bt(r.description,r.tags,r.deprecated);if(o)i=`${o}
|
|
136
133
|
`;return`
|
|
137
|
-
${i}${
|
|
138
|
-
${
|
|
134
|
+
${i}${Ft(n)}?: (event: ${qa(r)}) => void;`}).filter((r)=>r!==void 0)}function Tu(e){let t=e.type==="() => any";if(e.type&&Ba.test(e.type)&&!t)return e.type;else if(e.params&&e.params.length>0){let n=e.params.map((o)=>{let a=o.optional?"?":"";return`${o.name}${a}: ${o.type}`}).join(", "),i=e.returnType||Ke;return`(${n}) => ${i}`}else if(e.returnType)return`() => ${e.returnType}`;else return e.type||Ke}function Ua(e){return e.props.filter((t)=>t.isFunctionDeclaration||t.kind==="const").map((t)=>{let r=wn(t.description,t.deprecated,t.tags),n=Tu(t);return`
|
|
135
|
+
${_n(r)}
|
|
139
136
|
${t.name}: ${n};`}).join(`
|
|
140
|
-
`)}function
|
|
141
|
-
};`}}function
|
|
137
|
+
`)}function Eu(e){let t=`${e.moduleName}Exports`,r=Ua({props:e.props});if(r.trim()==="")return{exports_name:t,exports_ref:t,exports_def:`export type ${t} = ${Cn};`};let{declSuffix:n,refSuffix:i}=hu(e.generics,r);return{exports_name:t,exports_ref:`${t}${i}`,exports_def:`export type ${t}${n} = {${r}
|
|
138
|
+
};`}}function Su(e){let t=e.props.filter((r)=>r.bindable===!0||r.binding==="writable").map((r)=>`"${r.name}"`);return t.length===0?ke:t.join(" | ")}function vu(e){let t=e.moduleName==="default"?"$$Component":e.moduleName,r=e.bindings===ke?'""':e.bindings;return`declare const ${t}: Component<
|
|
142
139
|
${e.propsRef},
|
|
143
140
|
${e.exportsRef},
|
|
144
141
|
${r}
|
|
145
142
|
>;
|
|
146
|
-
export default ${t};`}function
|
|
143
|
+
export default ${t};`}function Cu(e){let t=e.moduleName==="default"?"$$Component":e.moduleName,r=`${t}Component`,n=e.bindings===ke?'""':e.bindings;return`interface ${r} {
|
|
147
144
|
new ${e.generic}(
|
|
148
145
|
options: ComponentConstructorOptions<${e.propsRef}>
|
|
149
146
|
): SvelteComponent<${e.propsRef}> & ${e.exportsRef};
|
|
@@ -159,50 +156,50 @@ ${t}}`}function mu(e,t){return e.events.map((r)=>{let n=`on${r.name}`;if(t.has(n
|
|
|
159
156
|
z_$$bindings?: ${n};
|
|
160
157
|
}
|
|
161
158
|
declare const ${t}: ${r};
|
|
162
|
-
export default ${t};`}function
|
|
159
|
+
export default ${t};`}function Au(e){if(e.extends===void 0)return"";return`import type { ${e.extends.interface} } from ${e.extends.import};`}function Pu(e){if(!e.componentComment)return"";if(!tu.test(e.componentComment))return mr(e.componentComment.trim());return`/*${e.componentComment.split(`
|
|
163
160
|
`).map((t)=>`* ${t}`).join(`
|
|
164
161
|
`)}
|
|
165
|
-
*/`}function
|
|
166
|
-
`;else if(t.params&&t.params.length>0){let p=t.params.map((m)=>{let
|
|
162
|
+
*/`}function ku(e){return e.moduleExports.map((t)=>{let r=wn(t.description,t.deprecated,t.tags),n,i=t.type&&Ba.test(t.type),o=t.type==="() => any";if(t.kind==="const"&&!i)n=`export declare const ${t.name}: ${t.type||Ke};
|
|
163
|
+
`;else if(t.params&&t.params.length>0){let p=t.params.map((m)=>{let d=m.optional?"?":"";return`${m.name}${d}: ${m.type}`}).join(", "),l=t.returnType||Ke;n=`export declare function ${t.name}(${p}): ${l};`}else if(t.returnType)n=`export declare function ${t.name}(): ${t.returnType};`;else if(i&&t.type&&!o){let[a,p,...l]=t.type.split("=>"),m=l.map((d)=>` => ${d.trim()}`).join("");n=`export declare function ${t.name}${a.trimEnd()}: ${p.trim()}${m};`}else if(i&&t.type){let[a,p,...l]=t.type.split("=>"),m=l.map((d)=>` => ${d.trim()}`).join("");n=`export declare function ${t.name}${a.trimEnd()}: ${p.trim()}${m};`}else if(t.kind==="const")n=`export declare const ${t.name}: ${t.type||Ke};
|
|
167
164
|
`;else n=`export type ${t.name} = ${t.type||Ke};`;return`
|
|
168
|
-
${
|
|
165
|
+
${_n(r)}
|
|
169
166
|
${n}`}).join(`
|
|
170
|
-
`)}var
|
|
171
|
-
`))){let i=`${r}${n.join(", ")}> {}`;if(i.length<=
|
|
167
|
+
`)}var wu=120;function _u(e){let r=`export default class ${e.moduleName==="default"?"":e.moduleName}${e.generic} extends SvelteComponentTyped<`,n=[e.genericProps,e.events,e.slots];if(e.accessors.trim()===""&&n.every((i)=>!i.includes(`
|
|
168
|
+
`))){let i=`${r}${n.join(", ")}> {}`;if(i.length<=wu)return i}return`${r}
|
|
172
169
|
${e.genericProps},
|
|
173
170
|
${e.events},
|
|
174
171
|
${e.slots}
|
|
175
172
|
> {
|
|
176
173
|
${e.accessors}
|
|
177
|
-
}`}function
|
|
174
|
+
}`}function Nu(e,t){let r=Ar(e),{moduleName:n,typedefs:i,generics:o,props:a,moduleExports:p,slots:l,events:m,rest_props:d,extends:b,componentComment:T,contexts:E,syntaxMode:k}=e,B=t?.format==="component",C=o!==null,{props_name:V,prop_def:j}=du({moduleName:n,props:a,rest_props:d,extends:b,generics:o,slots:l,canonicalPropNames:new Set(r?.canonicalPropNames??[]),canonicalPropsType:r?.canonicalPropsType,events:B&&k==="legacy"?m:void 0}),D=o?`<${o[1]}>`:"",X=o?`${V}<${o[0]}>`:V,M=ku({moduleExports:p}),Q=xr({typedefs:i}),x=$a({contexts:E,generics:o}),s=(r?.typeImportStatements??[]).join(`
|
|
178
175
|
`),c=(r?.localTypeDeclarations??[]).join(`
|
|
179
176
|
|
|
180
|
-
`),{exports_ref:
|
|
181
|
-
`),_=B?C?
|
|
177
|
+
`),{exports_ref:u,exports_def:f}=B?Eu({props:a,moduleName:n,generics:o}):{exports_ref:ke,exports_def:ke},y=B?Su({props:a}):ke,g=!iu.test(s)&&(ut.test(j)||ut.test(M)||ut.test(Q)||ut.test(x)||ut.test(c)||ut.test(f)),S=d?.type==="Element"&&(d.name!=="svelte:element"||d.name==="svelte:element"&&d.thisValue),P=d?.type==="Element"&&d.name==="svelte:element"&&!d.thisValue,v=[B?C?`import type { SvelteComponent, ComponentConstructorOptions, ComponentInternals${g?", Snippet":""} } from "svelte";`:`import type { Component${g?", Snippet":""} } from "svelte";`:`import { SvelteComponentTyped${g?", type Snippet":""} } from "svelte";`,S?'import type { SvelteHTMLElements } from "svelte/elements";':"",P?'import type { HTMLAttributes } from "svelte/elements";':"",s,Au({extends:b})].filter(Boolean).join(`
|
|
178
|
+
`),_=B?C?Cu({moduleName:n,generic:D,propsRef:X,exportsRef:u,bindings:y}):vu({moduleName:n,propsRef:X,exportsRef:u,bindings:y}):_u({moduleName:n,generic:D,genericProps:X,events:xu({events:m}),slots:fu({slots:l}),accessors:Ua({props:a})}),w=[M,Q,c,x,j,f,[Pu({componentComment:T}),_].filter(Boolean).join(`
|
|
182
179
|
`)].map((R)=>R.trim()).filter(Boolean).join(`
|
|
183
180
|
|
|
184
|
-
`);return
|
|
181
|
+
`);return Da([v,w].filter(Boolean).join(`
|
|
185
182
|
|
|
186
|
-
`))}var
|
|
183
|
+
`))}var Nn=/`/g,br=/\s+/g,Ne="--",Ga=`| Prop name | Required | Kind | Reactive | Binding | Type | Default value | Description |
|
|
187
184
|
| :- | :- | :- | :- | :- | :- | :- | :- |
|
|
188
|
-
`,
|
|
185
|
+
`,Wa=`| Slot name | Default | Props | Fallback | Description |
|
|
189
186
|
| :- | :- | :- | :- | :- |
|
|
190
|
-
|
|
187
|
+
`,Ka=`| Event name | Type | Detail | Description |
|
|
191
188
|
| :- | :- | :- | :- |
|
|
192
|
-
`,
|
|
189
|
+
`,za=`| Name | Kind | Type | Description |
|
|
193
190
|
| :- | :- | :- | :- |
|
|
194
|
-
`,Tr=/\|/g,
|
|
195
|
-
`).replace(Tr,"|").replace(
|
|
191
|
+
`,Tr=/\|/g,Iu=/</g,Lu=/>/g,ht=/\n/g;function nt(e){if(e===void 0)return Ne;return`<code>${e.replace(Tr,"|")}</code>`}function Vt(e){return e.replace(Iu,"<").replace(Lu,">")}function Xa(e){if(e===void 0)return Ne;return`<code>${e.replace(Nn,"\\`").replace(Tr,"|")}</code>`}function Er(e,t){if(t===void 0)return e;let r=typeof t==="string"&&t.trim().length>0?`: ${Vt(t).replace(ht," ").replace(Tr,"|")}`:"";return`<s>${e}</s><br />**Deprecated**${r}`}function Sr(e){if(e===void 0||e.trim().length===0)return Ne;return Vt(e).replace(ht,"<br />")}function Ja(e){if(e===void 0||e==="{}")return Ne;return nt(gr(e).replace(ht," "))}function Ya(e){if(e===void 0)return Ne;return nt(Vt(e).replace(ht,"<br />"))}function Qa(e,t){let r=[];if(e!==void 0&&e.trim().length>0)r.push(Vt(e));for(let{name:n,body:i}of t??[]){let o=i?.trim();r.push(o?`@${n} ${Vt(o)}`:`@${n}`)}if(r.length===0)return Ne;return r.join(`
|
|
192
|
+
`).replace(Tr,"|").replace(ht,"<br />")}function Za(e){if(e===void 0)return Ne;return nt(e.replace(ht," "))}function Ln(e,t,r){if(e.append("h1","Component Index"),e.append("h2","Components").tableOfContents(),e.append("divider"),r&&r.length>0)Du(e,r);let n=Ot(t);for(let i of n.components)Ru(e,i)}function Du(e,t){e.append("h2","Exports"),e.append("raw",za);for(let r of t){let n=(r.type??r.value)?.replace(br," ").trim();e.append("raw",`| ${r.name} | ${`<code>${r.kind}</code>`} | ${nt(n)} | ${Sr(r.description)} |
|
|
196
193
|
`)}e.append("raw",`
|
|
197
|
-
`),e.append("divider")}function
|
|
198
|
-
`);else e.append("p",n??"None.")}function
|
|
194
|
+
`),e.append("divider")}function In(e,t,r,n){if(t.length>0)r(),e.append("raw",`
|
|
195
|
+
`);else e.append("p",n??"None.")}function Ru(e,t){if(e.append("h2",`\`${t.moduleName}\``),t.generics)e.append("p",`**Type parameters:** ${nt(`<${t.generics[1]}>`)}`);if(t.typedefs.length>0)e.append("h3","Types").append("raw",`\`\`\`ts
|
|
199
196
|
${xr({typedefs:t.typedefs})}
|
|
200
197
|
\`\`\`
|
|
201
198
|
|
|
202
|
-
`);e.append("h3","Props"),
|
|
203
|
-
`)}),e.append("h3","Slots"),
|
|
204
|
-
`)}),e.append("h3","Events"),
|
|
205
|
-
`)})}var
|
|
199
|
+
`);e.append("h3","Props"),In(e,t.props,()=>{e.append("raw",Ga);let r=[...t.props].sort((n)=>{if(n.reactive)return-1;if(n.constant)return 1;return 0});for(let n of r)e.append("raw",`| ${Er(n.name,n.deprecated)} | ${n.isRequired?"Yes":"No"} | ${`<code>${n.kind}</code>`} | ${n.reactive?"Yes":"No"} | ${n.binding??"--"} | ${nt(n.type)} | ${Xa(n.value)} | ${Sr(n.description)} |
|
|
200
|
+
`)}),e.append("h3","Slots"),In(e,t.slots,()=>{e.append("raw",Wa);for(let r of t.slots)e.append("raw",`| ${Er(r.default?Ne:r.name??Ne,r.deprecated)} | ${r.default?"Yes":"No"} | ${Ja(r.slot_props)} | ${Ya(r.fallback)} | ${Qa(r.description,r.tags)} |
|
|
201
|
+
`)}),e.append("h3","Events"),In(e,t.events,()=>{e.append("raw",Ka);for(let r of t.events)e.append("raw",`| ${Er(r.name,r.deprecated)} | ${r.type} | ${r.type==="dispatched"?Za(r.detail):Ne} | ${Sr(r.description)} |
|
|
202
|
+
`)})}var Mu=new Set(["string","number","boolean"]);function Ou(e){return e.map((t)=>({kind:"field",name:t.name,...t.type?{type:{text:t.type}}:{},...t.value===void 0?{}:{default:t.value},...t.description?{description:t.description}:{},...t.deprecated===void 0?{}:{deprecated:t.deprecated}}))}function Bu(e){let t=new Map;for(let n of e){if(!n.type||!Mu.has(n.type.trim()))continue;let i=n.name.toLowerCase(),o=t.get(i);if(o)o.push(n);else t.set(i,[n])}let r=[];for(let[n,i]of t){if(i.length!==1)continue;let o=i[0];r.push({name:n,fieldName:o.name,type:{text:o.type},...o.value===void 0?{}:{default:o.value},...o.description?{description:o.description}:{}})}return r}function Fu(e){return e.filter((t)=>t.type==="dispatched").map((t)=>({name:t.name,type:{text:`CustomEvent<${t.detail??"unknown"}>`},...t.description?{description:t.description}:{},...t.deprecated===void 0?{}:{deprecated:t.deprecated}}))}function Vu(e){return e.map((t)=>({name:t.default?"":t.name??"",...t.description?{description:t.description}:{},...t.deprecated===void 0?{}:{deprecated:t.deprecated}}))}function ju(e){let t={kind:"class",name:e.moduleName,...e.componentComment?{description:e.componentComment}:{},members:Ou(e.props),attributes:Bu(e.props),events:Fu(e.events),slots:Vu(e.slots)};if(e.customElementTag)t.tagName=e.customElementTag,t.customElement=!0;return t}function $u(e,t){let r=[{kind:"js",name:e.moduleName,declaration:{name:e.moduleName,module:t}}];if(e.customElementTag)r.push({kind:"custom-element-definition",name:e.customElementTag,declaration:{name:e.moduleName,module:t}});return r}function Hu(e,t={}){let r=Ot(e),n=t.resolveModulePath??((o)=>o.filePath);return{schemaVersion:"1.0.0",modules:r.components.map((o)=>{let a=n(o);return{kind:"javascript-module",path:a,declarations:[ju(o)],exports:$u(o,a)}})}}class Dn{sourceParts=[];hasToC=!1;toc=[];get source(){return this.sourceParts.join("")}appendLineBreaks(){return this.sourceParts.push(`
|
|
206
203
|
|
|
207
|
-
`),this}append(e,t){switch(e){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":{let r=Number(e.slice(-1));if(this.sourceParts.push(`${"#".repeat(r)} ${t}`),this.hasToC&&e==="h2")this.toc.push({indent:0,raw:t??""});break}case"quote":this.sourceParts.push(`> ${t}`);break;case"p":this.sourceParts.push(t??"");break;case"divider":this.sourceParts.push("---");break;case"raw":this.sourceParts.push(t??"");break}if(e!=="raw")this.appendLineBreaks();return this}tableOfContents(){return this.sourceParts.push("<!-- __TOC__ -->"),this.hasToC=!0,this.appendLineBreaks(),this}end(){return this.sourceParts.join("").replace("<!-- __TOC__ -->",this.toc.map(({indent:t,raw:r})=>`${" ".repeat(t)}- [${r}](#${r.toLowerCase().replace(
|
|
208
|
-
`))}}class
|
|
204
|
+
`),this}append(e,t){switch(e){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":{let r=Number(e.slice(-1));if(this.sourceParts.push(`${"#".repeat(r)} ${t}`),this.hasToC&&e==="h2")this.toc.push({indent:0,raw:t??""});break}case"quote":this.sourceParts.push(`> ${t}`);break;case"p":this.sourceParts.push(t??"");break;case"divider":this.sourceParts.push("---");break;case"raw":this.sourceParts.push(t??"");break}if(e!=="raw")this.appendLineBreaks();return this}tableOfContents(){return this.sourceParts.push("<!-- __TOC__ -->"),this.hasToC=!0,this.appendLineBreaks(),this}end(){return this.sourceParts.join("").replace("<!-- __TOC__ -->",this.toc.map(({indent:t,raw:r})=>`${" ".repeat(t)}- [${r}](#${r.toLowerCase().replace(Nn,"").replace(br,"-")})`).join(`
|
|
205
|
+
`))}}class Rn extends Dn{onAppend;constructor(e){super();this.onAppend=e.onAppend}append(e,t){return super.append(e,t),this.onAppend?.call(this,e,this),this}}function qu(e,t){let r=new Rn({onAppend:(n,i)=>{t?.onAppend?.call(null,n,i,e)}});return Ln(r,e),r.end()}export{Rn as BrowserWriterMarkdown,wa as COMPONENT_API_SCHEMA_VERSION,pe as ComponentParser,io as asNormalizedPath,Ot as buildComponentApiDocument,Hu as buildCustomElementsManifest,gr as formatTsProps,$a as getContextDefs,xr as getTypeDefs,Ln as renderComponentsToMarkdown,qu as writeMarkdownCore,Nu as writeTsDefinition};
|