@epxing/cli 0.5.0-beta.1 → 0.5.0-beta.10

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.
@@ -1,32 +0,0 @@
1
- import{a as h,b as ir}from"./H4POBCHI.mjs";var bn=ir(De=>{"use strict";Object.defineProperty(De,"__esModule",{value:!0});function rr(r,t){if(r==null)return{};var e={};for(var s in r)if({}.hasOwnProperty.call(r,s)){if(t.indexOf(s)!==-1)continue;e[s]=r[s]}return e}h(rr,"_objectWithoutPropertiesLoose");var G=class{static{h(this,"Position")}constructor(t,e,s){this.line=void 0,this.column=void 0,this.index=void 0,this.line=t,this.column=e,this.index=s}},xe=class{static{h(this,"SourceLocation")}constructor(t,e){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=t,this.end=e}};function V(r,t){let{line:e,column:s,index:i}=r;return new G(e,s+t,i+t)}h(V,"createPositionWithColumnOffset");var _s="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",nr={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:_s},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:_s}},Ls={ArrayPattern:"array destructuring pattern",AssignmentExpression:"assignment expression",AssignmentPattern:"assignment expression",ArrowFunctionExpression:"arrow function expression",ConditionalExpression:"conditional expression",CatchClause:"catch clause",ForOfStatement:"for-of statement",ForInStatement:"for-in statement",ForStatement:"for-loop",FormalParameters:"function parameter list",Identifier:"identifier",ImportSpecifier:"import specifier",ImportDefaultSpecifier:"import default specifier",ImportNamespaceSpecifier:"import namespace specifier",ObjectPattern:"object destructuring pattern",ParenthesizedExpression:"parenthesized expression",RestElement:"rest element",UpdateExpression:{true:"prefix operation",false:"postfix operation"},VariableDeclarator:"variable declaration",YieldExpression:"yield expression"},$e=h(r=>r.type==="UpdateExpression"?Ls.UpdateExpression[`${r.prefix}`]:Ls[r.type],"toNodeDescription"),ar={AccessorIsGenerator:h(({kind:r})=>`A ${r}ter cannot be a generator.`,"AccessorIsGenerator"),ArgumentsInClass:"'arguments' is only allowed in functions and class methods.",AsyncFunctionInSingleStatementContext:"Async functions can only be declared at the top level or inside a block.",AwaitBindingIdentifier:"Can not use 'await' as identifier inside an async function.",AwaitBindingIdentifierInStaticBlock:"Can not use 'await' as identifier inside a static block.",AwaitExpressionFormalParameter:"'await' is not allowed in async function parameters.",AwaitUsingNotInAsyncContext:"'await using' is only allowed within async functions and at the top levels of modules.",AwaitNotInAsyncContext:"'await' is only allowed within async functions and at the top levels of modules.",BadGetterArity:"A 'get' accessor must not have any formal parameters.",BadSetterArity:"A 'set' accessor must have exactly one formal parameter.",BadSetterRestParameter:"A 'set' accessor function argument must not be a rest parameter.",ConstructorClassField:"Classes may not have a field named 'constructor'.",ConstructorClassPrivateField:"Classes may not have a private field named '#constructor'.",ConstructorIsAccessor:"Class constructor may not be an accessor.",ConstructorIsAsync:"Constructor can't be an async function.",ConstructorIsGenerator:"Constructor can't be a generator.",DeclarationMissingInitializer:h(({kind:r})=>`Missing initializer in ${r} declaration.`,"DeclarationMissingInitializer"),DecoratorArgumentsOutsideParentheses:"Decorator arguments must be moved inside parentheses: use '@(decorator(args))' instead of '@(decorator)(args)'.",DecoratorBeforeExport:"Decorators must be placed *before* the 'export' keyword. Remove the 'decoratorsBeforeExport: true' option to use the 'export @decorator class {}' syntax.",DecoratorsBeforeAfterExport:"Decorators can be placed *either* before or after the 'export' keyword, but not in both locations at the same time.",DecoratorConstructor:"Decorators can't be used with a constructor. Did you mean '@dec class { ... }'?",DecoratorExportClass:"Decorators must be placed *after* the 'export' keyword. Remove the 'decoratorsBeforeExport: false' option to use the '@decorator export class {}' syntax.",DecoratorSemicolon:"Decorators must not be followed by a semicolon.",DecoratorStaticBlock:"Decorators can't be used with a static block.",DeferImportRequiresNamespace:'Only `import defer * as x from "./module"` is valid.',DeletePrivateField:"Deleting a private field is not allowed.",DestructureNamedImport:"ES2015 named imports do not destructure. Use another statement for destructuring after the import.",DuplicateConstructor:"Duplicate constructor in the same class.",DuplicateDefaultExport:"Only one default export allowed per module.",DuplicateExport:h(({exportName:r})=>`\`${r}\` has already been exported. Exported identifiers must be unique.`,"DuplicateExport"),DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:h(({localName:r,exportName:t})=>`A string literal cannot be used as an exported binding without \`from\`.
2
- - Did you mean \`export { '${r}' as '${t}' } from 'some-module'\`?`,"ExportBindingIsString"),ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:h(({type:r})=>`'${r==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,"ForInOfLoopInitializer"),ForInUsing:"For-in loop may not start with 'using' declaration.",ForOfAsync:"The left-hand side of a for-of loop may not be 'async'.",ForOfLet:"The left-hand side of a for-of loop may not start with 'let'.",GeneratorInSingleStatementContext:"Generators can only be declared at the top level or inside a block.",IllegalBreakContinue:h(({type:r})=>`Unsyntactic ${r==="BreakStatement"?"break":"continue"}.`,"IllegalBreakContinue"),IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportAttributesUseAssert:"The `assert` keyword in import attributes is deprecated and it has been replaced by the `with` keyword. You can enable the `deprecatedImportAssert` parser plugin to suppress this error.",ImportBindingIsString:h(({importName:r})=>`A string literal cannot be used as an imported binding.
3
- - Did you mean \`import { "${r}" as foo }\`?`,"ImportBindingIsString"),ImportCallArity:"`import()` requires exactly one or two arguments.",ImportCallNotNewExpression:"Cannot use new with import(...).",ImportCallSpreadArgument:"`...` is not allowed in `import()`.",ImportJSONBindingNotDefault:"A JSON module can only be imported with `default`.",ImportReflectionHasAssertion:"`import module x` cannot have assertions.",ImportReflectionNotBinding:'Only `import module x from "./module"` is valid.',IncompatibleRegExpUVFlags:"The 'u' and 'v' regular expression flags cannot be enabled at the same time.",InvalidBigIntLiteral:"Invalid BigIntLiteral.",InvalidCodePoint:"Code point out of bounds.",InvalidCoverDiscardElement:"'void' must be followed by an expression when not used in a binding position.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:h(({radix:r})=>`Expected number in radix ${r}.`,"InvalidDigit"),InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:h(({reservedWord:r})=>`Escape sequence in keyword ${r}.`,"InvalidEscapedReservedWord"),InvalidIdentifier:h(({identifierName:r})=>`Invalid identifier ${r}.`,"InvalidIdentifier"),InvalidLhs:h(({ancestor:r})=>`Invalid left-hand side in ${$e(r)}.`,"InvalidLhs"),InvalidLhsBinding:h(({ancestor:r})=>`Binding invalid left-hand side in ${$e(r)}.`,"InvalidLhsBinding"),InvalidLhsOptionalChaining:h(({ancestor:r})=>`Invalid optional chaining in the left-hand side of ${$e(r)}.`,"InvalidLhsOptionalChaining"),InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:h(({unexpected:r})=>`Unexpected character '${r}'.`,"InvalidOrUnexpectedToken"),InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:h(({identifierName:r})=>`Private name #${r} is not defined.`,"InvalidPrivateFieldResolution"),InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:h(({labelName:r})=>`Label '${r}' is already declared.`,"LabelRedeclaration"),LetInLexicalBinding:"'let' is disallowed as a lexically bound name.",LineTerminatorBeforeArrow:"No line break is allowed before '=>'.",MalformedRegExpFlags:"Invalid regular expression flag.",MissingClassName:"A class name is required.",MissingEqInAssignment:"Only '=' operator can be used for specifying default value.",MissingSemicolon:"Missing semicolon.",MissingPlugin:h(({missingPlugin:r})=>`This experimental syntax requires enabling the parser plugin: ${r.map(t=>JSON.stringify(t)).join(", ")}.`,"MissingPlugin"),MissingOneOfPlugins:h(({missingPlugin:r})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${r.map(t=>JSON.stringify(t)).join(", ")}.`,"MissingOneOfPlugins"),MissingUnicodeEscape:"Expecting Unicode escape sequence \\uXXXX.",MixingCoalesceWithLogical:"Nullish coalescing operator(??) requires parens when mixing with logical operators.",ModuleAttributeDifferentFromType:"The only accepted module attribute is `type`.",ModuleAttributeInvalidValue:"Only string literals are allowed as module attribute values.",ModuleAttributesWithDuplicateKeys:h(({key:r})=>`Duplicate key "${r}" is not allowed in module attributes.`,"ModuleAttributesWithDuplicateKeys"),ModuleExportNameHasLoneSurrogate:h(({surrogateCharCode:r})=>`An export name cannot include a lone surrogate, found '\\u${r.toString(16)}'.`,"ModuleExportNameHasLoneSurrogate"),ModuleExportUndefined:h(({localName:r})=>`Export '${r}' is not defined.`,"ModuleExportUndefined"),MultipleDefaultsInSwitch:"Multiple default clauses.",NewlineAfterThrow:"Illegal newline after throw.",NoCatchOrFinally:"Missing catch or finally clause.",NumberIdentifier:"Identifier directly after number.",NumericSeparatorInEscapeSequence:"Numeric separators are not allowed inside unicode escape sequences or hex escape sequences.",ObsoleteAwaitStar:"'await*' has been removed from the async functions proposal. Use Promise.all() instead.",OptionalChainingNoNew:"Constructors in/after an Optional Chain are not allowed.",OptionalChainingNoTemplate:"Tagged Template Literals are not allowed in optionalChain.",OverrideOnConstructor:"'override' modifier cannot appear on a constructor declaration.",ParamDupe:"Argument name clash.",PatternHasAccessor:"Object pattern can't contain getter or setter.",PatternHasMethod:"Object pattern can't contain methods.",PrivateInExpectedIn:h(({identifierName:r})=>`Private names are only allowed in property accesses (\`obj.#${r}\`) or in \`in\` expressions (\`#${r} in obj\`).`,"PrivateInExpectedIn"),PrivateNameRedeclaration:h(({identifierName:r})=>`Duplicate private name #${r}.`,"PrivateNameRedeclaration"),RecordExpressionBarIncorrectEndSyntaxType:"Record expressions ending with '|}' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionBarIncorrectStartSyntaxType:"Record expressions starting with '{|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",RecordExpressionHashIncorrectStartSyntaxType:"Record expressions starting with '#{' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",RecordNoProto:"'__proto__' is not allowed in Record expressions.",RestTrailingComma:"Unexpected trailing comma after rest element.",SloppyFunction:"In non-strict mode code, functions can only be declared at top level or inside a block.",SloppyFunctionAnnexB:"In non-strict mode code, functions can only be declared at top level, inside a block, or as the body of an if statement.",SourcePhaseImportRequiresDefault:'Only `import source x from "./module"` is valid.',StaticPrototype:"Classes may not have static property named prototype.",SuperNotAllowed:"`super()` is only valid inside a class constructor of a subclass. Maybe a typo in the method name ('constructor') or not extending another class?",SuperPrivateField:"Private fields can't be accessed on super.",TrailingDecorator:"Decorators must be attached to a class element.",TupleExpressionBarIncorrectEndSyntaxType:"Tuple expressions ending with '|]' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionBarIncorrectStartSyntaxType:"Tuple expressions starting with '[|' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'bar'.",TupleExpressionHashIncorrectStartSyntaxType:"Tuple expressions starting with '#[' are only allowed when the 'syntaxType' option of the 'recordAndTuple' plugin is set to 'hash'.",UnexpectedArgumentPlaceholder:"Unexpected argument placeholder.",UnexpectedAwaitAfterPipelineBody:'Unexpected "await" after pipeline body; await must have parentheses in minimal proposal.',UnexpectedDigitAfterHash:"Unexpected digit after hash token.",UnexpectedImportExport:"'import' and 'export' may only appear at the top level.",UnexpectedKeyword:h(({keyword:r})=>`Unexpected keyword '${r}'.`,"UnexpectedKeyword"),UnexpectedLeadingDecorator:"Leading decorators must be attached to a class declaration.",UnexpectedLexicalDeclaration:"Lexical declaration cannot appear in a single-statement context.",UnexpectedNewTarget:"`new.target` can only be used in functions or class properties.",UnexpectedNumericSeparator:"A numeric separator is only allowed between two digits.",UnexpectedPrivateField:"Unexpected private name.",UnexpectedReservedWord:h(({reservedWord:r})=>`Unexpected reserved word '${r}'.`,"UnexpectedReservedWord"),UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:h(({expected:r,unexpected:t})=>`Unexpected token${t?` '${t}'.`:""}${r?`, expected "${r}"`:""}`,"UnexpectedToken"),UnexpectedTokenUnaryExponentiation:"Illegal expression. Wrap left hand side or entire exponentiation in parentheses.",UnexpectedUsingDeclaration:"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement.",UnexpectedVoidPattern:"Unexpected void binding.",UnsupportedBind:"Binding should be performed on object property.",UnsupportedDecoratorExport:"A decorated export must export a class declaration.",UnsupportedDefaultExport:"Only expressions, functions or classes are allowed as the `default` export.",UnsupportedImport:"`import` can only be used in `import()` or `import.meta`.",UnsupportedMetaProperty:h(({target:r,onlyValidPropertyName:t})=>`The only valid meta property for ${r} is ${r}.${t}.`,"UnsupportedMetaProperty"),UnsupportedParameterDecorator:"Decorators cannot be used to decorate parameters.",UnsupportedPropertyDecorator:"Decorators cannot be used to decorate object literal properties.",UnsupportedSuper:"'super' can only be used with function calls (i.e. super()) or in property accesses (i.e. super.prop or super[prop]).",UnterminatedComment:"Unterminated comment.",UnterminatedRegExp:"Unterminated regular expression.",UnterminatedString:"Unterminated string constant.",UnterminatedTemplate:"Unterminated template.",UsingDeclarationExport:"Using declaration cannot be exported.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:h(({identifierName:r})=>`Identifier '${r}' has already been declared.`,"VarRedeclaration"),VoidPatternCatchClauseParam:"A void binding can not be the catch clause parameter. Use `try { ... } catch { ... }` if you want to discard the caught error.",VoidPatternInitializer:"A void binding may not have an initializer.",YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",YieldNotInGeneratorFunction:"'yield' is only allowed within generator functions.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},or={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:h(({referenceName:r})=>`Assigning to '${r}' in strict mode.`,"StrictEvalArguments"),StrictEvalArgumentsBinding:h(({bindingName:r})=>`Binding '${r}' in strict mode.`,"StrictEvalArgumentsBinding"),StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block.",StrictNumericEscape:"The only valid numeric escape in strict mode is '\\0'.",StrictOctalLiteral:"Legacy octal literals are not allowed in strict mode.",StrictWith:"'with' in strict mode."},lr={ParseExpressionEmptyInput:"Unexpected parseExpression() input: The input is empty or contains only comments.",ParseExpressionExpectsEOF:h(({unexpected:r})=>`Unexpected parseExpression() input: The input should contain exactly one expression, but the first expression is followed by the unexpected character \`${String.fromCodePoint(r)}\`.`,"ParseExpressionExpectsEOF")},cr=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),hr=Object.assign({PipeBodyIsTighter:"Unexpected yield after pipeline body; any yield expression acting as Hack-style pipe body must be parenthesized due to its loose operator precedence.",PipeTopicRequiresHackPipes:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.',PipeTopicUnbound:"Topic reference is unbound; it must be inside a pipe body.",PipeTopicUnconfiguredToken:h(({token:r})=>`Invalid topic token ${r}. In order to use ${r} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${r}" }.`,"PipeTopicUnconfiguredToken"),PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:h(({type:r})=>`Hack-style pipe body cannot be an unparenthesized ${$e({type:r})}; please wrap it in parentheses.`,"PipeUnparenthesizedBody")},{PipelineBodyNoArrow:'Unexpected arrow "=>" after pipeline body; arrow function in pipeline body must be parenthesized.',PipelineBodySequenceExpression:"Pipeline body may not be a comma-separated sequence expression.",PipelineHeadSequenceExpression:"Pipeline head should not be a comma-separated sequence expression.",PipelineTopicUnused:"Pipeline is in topic style but does not use topic reference.",PrimaryTopicNotAllowed:"Topic reference was used in a lexical context without topic binding.",PrimaryTopicRequiresSmartPipeline:'Topic reference is used, but the pipelineOperator plugin was not passed a "proposal": "hack" or "smart" option.'}),ur=["message"];function Ds(r,t,e){Object.defineProperty(r,t,{enumerable:!1,configurable:!0,value:e})}h(Ds,"defineHidden");function pr({toMessage:r,code:t,reasonCode:e,syntaxPlugin:s}){let i=e==="MissingPlugin"||e==="MissingOneOfPlugins",n={AccessorCannotDeclareThisParameter:"AccesorCannotDeclareThisParameter",AccessorCannotHaveTypeParameters:"AccesorCannotHaveTypeParameters",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference",SetAccessorCannotHaveOptionalParameter:"SetAccesorCannotHaveOptionalParameter",SetAccessorCannotHaveRestParameter:"SetAccesorCannotHaveRestParameter",SetAccessorCannotHaveReturnType:"SetAccesorCannotHaveReturnType"};return n[e]&&(e=n[e]),h(function a(o,l){let c=new SyntaxError;return c.code=t,c.reasonCode=e,c.loc=o,c.pos=o.index,c.syntaxPlugin=s,i&&(c.missingPlugin=l.missingPlugin),Ds(c,"clone",h(function(f={}){var d;let{line:m,column:y,index:S}=(d=f.loc)!=null?d:o;return a(new G(m,y,S),Object.assign({},l,f.details))},"clone")),Ds(c,"details",l),Object.defineProperty(c,"message",{configurable:!0,get(){let u=`${r(l)} (${o.line}:${o.column})`;return this.message=u,u},set(u){Object.defineProperty(this,"message",{value:u,writable:!0})}}),c},"constructor")}h(pr,"toParseErrorConstructor");function K(r,t){if(Array.isArray(r))return s=>K(s,r[0]);let e={};for(let s of Object.keys(r)){let i=r[s],n=typeof i=="string"?{message:h(()=>i,"message")}:typeof i=="function"?{message:i}:i,{message:a}=n,o=rr(n,ur),l=typeof a=="string"?()=>a:a;e[s]=pr(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:s,toMessage:l},t?{syntaxPlugin:t}:{},o))}return e}h(K,"ParseErrorEnum");var p=Object.assign({},K(nr),K(ar),K(or),K(lr),K`pipelineOperator`(hr));function fr(){return{sourceType:"script",sourceFilename:void 0,startIndex:0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,allowYieldOutsideFunction:!1,plugins:[],strictMode:void 0,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0}}h(fr,"createDefaultOptions");function dr(r){let t=fr();if(r==null)return t;if(r.annexB!=null&&r.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");for(let e of Object.keys(t))r[e]!=null&&(t[e]=r[e]);if(t.startLine===1)r.startIndex==null&&t.startColumn>0?t.startIndex=t.startColumn:r.startColumn==null&&t.startIndex>0&&(t.startColumn=t.startIndex);else if((r.startColumn==null||r.startIndex==null)&&r.startIndex!=null)throw new Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`.");if(t.sourceType==="commonjs"){if(r.allowAwaitOutsideFunction!=null)throw new Error("The `allowAwaitOutsideFunction` option cannot be used with `sourceType: 'commonjs'`.");if(r.allowReturnOutsideFunction!=null)throw new Error("`sourceType: 'commonjs'` implies `allowReturnOutsideFunction: true`, please remove the `allowReturnOutsideFunction` option or use `sourceType: 'script'`.");if(r.allowNewTargetOutsideFunction!=null)throw new Error("`sourceType: 'commonjs'` implies `allowNewTargetOutsideFunction: true`, please remove the `allowNewTargetOutsideFunction` option or use `sourceType: 'script'`.")}return t}h(dr,"getOptions");var{defineProperty:mr}=Object,Ms=h((r,t)=>{r&&mr(r,t,{enumerable:!1,value:r[t]})},"toUnenumerable");function Ne(r){return Ms(r.loc.start,"index"),Ms(r.loc.end,"index"),r}h(Ne,"toESTreeLocation");var yr=h(r=>class extends r{static{h(this,"ESTreeParserMixin")}parse(){let e=Ne(super.parse());return this.optionFlags&256&&(e.tokens=e.tokens.map(Ne)),e}parseRegExpLiteral({pattern:e,flags:s}){let i=null;try{i=new RegExp(e,s)}catch{}let n=this.estreeParseLiteral(i);return n.regex={pattern:e,flags:s},n}parseBigIntLiteral(e){let s;try{s=BigInt(e)}catch{s=null}let i=this.estreeParseLiteral(s);return i.bigint=String(i.value||e),i}parseDecimalLiteral(e){let i=this.estreeParseLiteral(null);return i.decimal=String(i.value||e),i}estreeParseLiteral(e){return this.parseLiteral(e,"Literal")}parseStringLiteral(e){return this.estreeParseLiteral(e)}parseNumericLiteral(e){return this.estreeParseLiteral(e)}parseNullLiteral(){return this.estreeParseLiteral(null)}parseBooleanLiteral(e){return this.estreeParseLiteral(e)}estreeParseChainExpression(e,s){let i=this.startNodeAtNode(e);return i.expression=e,this.finishNodeAt(i,"ChainExpression",s)}directiveToStmt(e){let s=e.value;delete e.value,this.castNodeTo(s,"Literal"),s.raw=s.extra.raw,s.value=s.extra.expressionValue;let i=this.castNodeTo(e,"ExpressionStatement");return i.expression=s,i.directive=s.extra.rawValue,delete s.extra,i}fillOptionalPropertiesForTSESLint(e){}cloneEstreeStringLiteral(e){let{start:s,end:i,loc:n,range:a,raw:o,value:l}=e,c=Object.create(e.constructor.prototype);return c.type="Literal",c.start=s,c.end=i,c.loc=n,c.range=a,c.raw=o,c.value=l,c}initFunction(e,s){super.initFunction(e,s),e.expression=!1}checkDeclaration(e){e!=null&&this.isObjectProperty(e)?this.checkDeclaration(e.value):super.checkDeclaration(e)}getObjectOrClassMethodParams(e){return e.value.params}isValidDirective(e){var s;return e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&!((s=e.expression.extra)!=null&&s.parenthesized)}parseBlockBody(e,s,i,n,a){super.parseBlockBody(e,s,i,n,a);let o=e.directives.map(l=>this.directiveToStmt(l));e.body=o.concat(e.body),delete e.directives}parsePrivateName(){let e=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(e):e}convertPrivateNameToPrivateIdentifier(e){let s=super.getPrivateNameSV(e);return delete e.id,e.name=s,this.castNodeTo(e,"PrivateIdentifier")}isPrivateName(e){return this.getPluginOption("estree","classFeatures")?e.type==="PrivateIdentifier":super.isPrivateName(e)}getPrivateNameSV(e){return this.getPluginOption("estree","classFeatures")?e.name:super.getPrivateNameSV(e)}parseLiteral(e,s){let i=super.parseLiteral(e,s);return i.raw=i.extra.raw,delete i.extra,i}parseFunctionBody(e,s,i=!1){super.parseFunctionBody(e,s,i),e.expression=e.body.type!=="BlockStatement"}parseMethod(e,s,i,n,a,o,l=!1){let c=this.startNode();c.kind=e.kind,c=super.parseMethod(c,s,i,n,a,o,l),delete c.kind;let{typeParameters:u}=e;u&&(delete e.typeParameters,c.typeParameters=u,this.resetStartLocationFromNode(c,u));let f=this.castNodeTo(c,"FunctionExpression");return e.value=f,o==="ClassPrivateMethod"&&(e.computed=!1),o==="ObjectMethod"?(e.kind==="method"&&(e.kind="init"),e.shorthand=!1,this.finishNode(e,"Property")):this.finishNode(e,"MethodDefinition")}nameIsConstructor(e){return e.type==="Literal"?e.value==="constructor":super.nameIsConstructor(e)}parseClassProperty(...e){let s=super.parseClassProperty(...e);return this.getPluginOption("estree","classFeatures")&&this.castNodeTo(s,"PropertyDefinition"),s}parseClassPrivateProperty(...e){let s=super.parseClassPrivateProperty(...e);return this.getPluginOption("estree","classFeatures")&&(this.castNodeTo(s,"PropertyDefinition"),s.computed=!1),s}parseClassAccessorProperty(e){let s=super.parseClassAccessorProperty(e);return this.getPluginOption("estree","classFeatures")&&(s.abstract&&this.hasPlugin("typescript")?(delete s.abstract,this.castNodeTo(s,"TSAbstractAccessorProperty")):this.castNodeTo(s,"AccessorProperty")),s}parseObjectProperty(e,s,i,n){let a=super.parseObjectProperty(e,s,i,n);return a&&(a.kind="init",this.castNodeTo(a,"Property")),a}finishObjectProperty(e){return e.kind="init",this.finishNode(e,"Property")}isValidLVal(e,s,i,n){return e==="Property"?"value":super.isValidLVal(e,s,i,n)}isAssignable(e,s){return e!=null&&this.isObjectProperty(e)?this.isAssignable(e.value,s):super.isAssignable(e,s)}toAssignable(e,s=!1){if(e!=null&&this.isObjectProperty(e)){let{key:i,value:n}=e;this.isPrivateName(i)&&this.classScope.usePrivateName(this.getPrivateNameSV(i),i.loc.start),this.toAssignable(n,s)}else super.toAssignable(e,s)}toAssignableObjectExpressionProp(e,s,i){e.type==="Property"&&(e.kind==="get"||e.kind==="set")?this.raise(p.PatternHasAccessor,e.key):e.type==="Property"&&e.method?this.raise(p.PatternHasMethod,e.key):super.toAssignableObjectExpressionProp(e,s,i)}finishCallExpression(e,s){let i=super.finishCallExpression(e,s);if(i.callee.type==="Import"){var n,a;this.castNodeTo(i,"ImportExpression"),i.source=i.arguments[0],i.options=(n=i.arguments[1])!=null?n:null,i.attributes=(a=i.arguments[1])!=null?a:null,delete i.arguments,delete i.callee}else i.type==="OptionalCallExpression"?this.castNodeTo(i,"CallExpression"):i.optional=!1;return i}toReferencedArguments(e){e.type!=="ImportExpression"&&super.toReferencedArguments(e)}parseExport(e,s){let i=this.state.lastTokStartLoc,n=super.parseExport(e,s);switch(n.type){case"ExportAllDeclaration":n.exported=null;break;case"ExportNamedDeclaration":n.specifiers.length===1&&n.specifiers[0].type==="ExportNamespaceSpecifier"&&(this.castNodeTo(n,"ExportAllDeclaration"),n.exported=n.specifiers[0].exported,delete n.specifiers);case"ExportDefaultDeclaration":{var a;let{declaration:o}=n;o?.type==="ClassDeclaration"&&((a=o.decorators)==null?void 0:a.length)>0&&o.start===n.start&&this.resetStartLocation(n,i)}break}return n}stopParseSubscript(e,s){let i=super.stopParseSubscript(e,s);return s.optionalChainMember?this.estreeParseChainExpression(i,e.loc.end):i}parseMember(e,s,i,n,a){let o=super.parseMember(e,s,i,n,a);return o.type==="OptionalMemberExpression"?this.castNodeTo(o,"MemberExpression"):o.optional=!1,o}isOptionalMemberExpression(e){return e.type==="ChainExpression"?e.expression.type==="MemberExpression":super.isOptionalMemberExpression(e)}hasPropertyAsPrivateName(e){return e.type==="ChainExpression"&&(e=e.expression),super.hasPropertyAsPrivateName(e)}isObjectProperty(e){return e.type==="Property"&&e.kind==="init"&&!e.method}isObjectMethod(e){return e.type==="Property"&&(e.method||e.kind==="get"||e.kind==="set")}castNodeTo(e,s){let i=super.castNodeTo(e,s);return this.fillOptionalPropertiesForTSESLint(i),i}cloneIdentifier(e){let s=super.cloneIdentifier(e);return this.fillOptionalPropertiesForTSESLint(s),s}cloneStringLiteral(e){return e.type==="Literal"?this.cloneEstreeStringLiteral(e):super.cloneStringLiteral(e)}finishNodeAt(e,s,i){return Ne(super.finishNodeAt(e,s,i))}finishNode(e,s){let i=super.finishNode(e,s);return this.fillOptionalPropertiesForTSESLint(i),i}resetStartLocation(e,s){super.resetStartLocation(e,s),Ne(e)}resetEndLocation(e,s=this.state.lastTokEndLoc){super.resetEndLocation(e,s),Ne(e)}},"estree"),he=class{static{h(this,"TokContext")}constructor(t,e){this.token=void 0,this.preserveSpace=void 0,this.token=t,this.preserveSpace=!!e}},C={brace:new he("{"),j_oTag:new he("<tag"),j_cTag:new he("</tag"),j_expr:new he("<tag>...</tag>",!0)};C.template=new he("`",!0);var b=!0,g=!0,nt=!0,Ie=!0,re=!0,gr=!0,qe=class{static{h(this,"ExportedTokenType")}constructor(t,e={}){this.label=void 0,this.keyword=void 0,this.beforeExpr=void 0,this.startsExpr=void 0,this.rightAssociative=void 0,this.isLoop=void 0,this.isAssign=void 0,this.prefix=void 0,this.postfix=void 0,this.binop=void 0,this.label=t,this.keyword=e.keyword,this.beforeExpr=!!e.beforeExpr,this.startsExpr=!!e.startsExpr,this.rightAssociative=!!e.rightAssociative,this.isLoop=!!e.isLoop,this.isAssign=!!e.isAssign,this.prefix=!!e.prefix,this.postfix=!!e.postfix,this.binop=e.binop!=null?e.binop:null,this.updateContext=null}},_t=new Map;function I(r,t={}){t.keyword=r;let e=T(r,t);return _t.set(r,e),e}h(I,"createKeyword");function B(r,t){return T(r,{beforeExpr:b,binop:t})}h(B,"createBinop");var ke=-1,Q=[],Lt=[],Dt=[],Mt=[],Rt=[],Ft=[];function T(r,t={}){var e,s,i,n;return++ke,Lt.push(r),Dt.push((e=t.binop)!=null?e:-1),Mt.push((s=t.beforeExpr)!=null?s:!1),Rt.push((i=t.startsExpr)!=null?i:!1),Ft.push((n=t.prefix)!=null?n:!1),Q.push(new qe(r,t)),ke}h(T,"createToken");function A(r,t={}){var e,s,i,n;return++ke,_t.set(r,ke),Lt.push(r),Dt.push((e=t.binop)!=null?e:-1),Mt.push((s=t.beforeExpr)!=null?s:!1),Rt.push((i=t.startsExpr)!=null?i:!1),Ft.push((n=t.prefix)!=null?n:!1),Q.push(new qe("name",t)),ke}h(A,"createKeywordLike");var xr={bracketL:T("[",{beforeExpr:b,startsExpr:g}),bracketHashL:T("#[",{beforeExpr:b,startsExpr:g}),bracketBarL:T("[|",{beforeExpr:b,startsExpr:g}),bracketR:T("]"),bracketBarR:T("|]"),braceL:T("{",{beforeExpr:b,startsExpr:g}),braceBarL:T("{|",{beforeExpr:b,startsExpr:g}),braceHashL:T("#{",{beforeExpr:b,startsExpr:g}),braceR:T("}"),braceBarR:T("|}"),parenL:T("(",{beforeExpr:b,startsExpr:g}),parenR:T(")"),comma:T(",",{beforeExpr:b}),semi:T(";",{beforeExpr:b}),colon:T(":",{beforeExpr:b}),doubleColon:T("::",{beforeExpr:b}),dot:T("."),question:T("?",{beforeExpr:b}),questionDot:T("?."),arrow:T("=>",{beforeExpr:b}),template:T("template"),ellipsis:T("...",{beforeExpr:b}),backQuote:T("`",{startsExpr:g}),dollarBraceL:T("${",{beforeExpr:b,startsExpr:g}),templateTail:T("...`",{startsExpr:g}),templateNonTail:T("...${",{beforeExpr:b,startsExpr:g}),at:T("@"),hash:T("#",{startsExpr:g}),interpreterDirective:T("#!..."),eq:T("=",{beforeExpr:b,isAssign:Ie}),assign:T("_=",{beforeExpr:b,isAssign:Ie}),slashAssign:T("_=",{beforeExpr:b,isAssign:Ie}),xorAssign:T("_=",{beforeExpr:b,isAssign:Ie}),moduloAssign:T("_=",{beforeExpr:b,isAssign:Ie}),incDec:T("++/--",{prefix:re,postfix:gr,startsExpr:g}),bang:T("!",{beforeExpr:b,prefix:re,startsExpr:g}),tilde:T("~",{beforeExpr:b,prefix:re,startsExpr:g}),doubleCaret:T("^^",{startsExpr:g}),doubleAt:T("@@",{startsExpr:g}),pipeline:B("|>",0),nullishCoalescing:B("??",1),logicalOR:B("||",1),logicalAND:B("&&",2),bitwiseOR:B("|",3),bitwiseXOR:B("^",4),bitwiseAND:B("&",5),equality:B("==/!=/===/!==",6),lt:B("</>/<=/>=",7),gt:B("</>/<=/>=",7),relational:B("</>/<=/>=",7),bitShift:B("<</>>/>>>",8),bitShiftL:B("<</>>/>>>",8),bitShiftR:B("<</>>/>>>",8),plusMin:T("+/-",{beforeExpr:b,binop:9,prefix:re,startsExpr:g}),modulo:T("%",{binop:10,startsExpr:g}),star:T("*",{binop:10}),slash:B("/",10),exponent:T("**",{beforeExpr:b,binop:11,rightAssociative:!0}),_in:I("in",{beforeExpr:b,binop:7}),_instanceof:I("instanceof",{beforeExpr:b,binop:7}),_break:I("break"),_case:I("case",{beforeExpr:b}),_catch:I("catch"),_continue:I("continue"),_debugger:I("debugger"),_default:I("default",{beforeExpr:b}),_else:I("else",{beforeExpr:b}),_finally:I("finally"),_function:I("function",{startsExpr:g}),_if:I("if"),_return:I("return",{beforeExpr:b}),_switch:I("switch"),_throw:I("throw",{beforeExpr:b,prefix:re,startsExpr:g}),_try:I("try"),_var:I("var"),_const:I("const"),_with:I("with"),_new:I("new",{beforeExpr:b,startsExpr:g}),_this:I("this",{startsExpr:g}),_super:I("super",{startsExpr:g}),_class:I("class",{startsExpr:g}),_extends:I("extends",{beforeExpr:b}),_export:I("export"),_import:I("import",{startsExpr:g}),_null:I("null",{startsExpr:g}),_true:I("true",{startsExpr:g}),_false:I("false",{startsExpr:g}),_typeof:I("typeof",{beforeExpr:b,prefix:re,startsExpr:g}),_void:I("void",{beforeExpr:b,prefix:re,startsExpr:g}),_delete:I("delete",{beforeExpr:b,prefix:re,startsExpr:g}),_do:I("do",{isLoop:nt,beforeExpr:b}),_for:I("for",{isLoop:nt}),_while:I("while",{isLoop:nt}),_as:A("as",{startsExpr:g}),_assert:A("assert",{startsExpr:g}),_async:A("async",{startsExpr:g}),_await:A("await",{startsExpr:g}),_defer:A("defer",{startsExpr:g}),_from:A("from",{startsExpr:g}),_get:A("get",{startsExpr:g}),_let:A("let",{startsExpr:g}),_meta:A("meta",{startsExpr:g}),_of:A("of",{startsExpr:g}),_sent:A("sent",{startsExpr:g}),_set:A("set",{startsExpr:g}),_source:A("source",{startsExpr:g}),_static:A("static",{startsExpr:g}),_using:A("using",{startsExpr:g}),_yield:A("yield",{startsExpr:g}),_asserts:A("asserts",{startsExpr:g}),_checks:A("checks",{startsExpr:g}),_exports:A("exports",{startsExpr:g}),_global:A("global",{startsExpr:g}),_implements:A("implements",{startsExpr:g}),_intrinsic:A("intrinsic",{startsExpr:g}),_infer:A("infer",{startsExpr:g}),_is:A("is",{startsExpr:g}),_mixins:A("mixins",{startsExpr:g}),_proto:A("proto",{startsExpr:g}),_require:A("require",{startsExpr:g}),_satisfies:A("satisfies",{startsExpr:g}),_keyof:A("keyof",{startsExpr:g}),_readonly:A("readonly",{startsExpr:g}),_unique:A("unique",{startsExpr:g}),_abstract:A("abstract",{startsExpr:g}),_declare:A("declare",{startsExpr:g}),_enum:A("enum",{startsExpr:g}),_module:A("module",{startsExpr:g}),_namespace:A("namespace",{startsExpr:g}),_interface:A("interface",{startsExpr:g}),_type:A("type",{startsExpr:g}),_opaque:A("opaque",{startsExpr:g}),name:T("name",{startsExpr:g}),placeholder:T("%%",{startsExpr:g}),string:T("string",{startsExpr:g}),num:T("num",{startsExpr:g}),bigint:T("bigint",{startsExpr:g}),decimal:T("decimal",{startsExpr:g}),regexp:T("regexp",{startsExpr:g}),privateName:T("#name",{startsExpr:g}),eof:T("eof"),jsxName:T("jsxName"),jsxText:T("jsxText",{beforeExpr:b}),jsxTagStart:T("jsxTagStart",{startsExpr:g}),jsxTagEnd:T("jsxTagEnd")};function k(r){return r>=93&&r<=133}h(k,"tokenIsIdentifier");function Tr(r){return r<=92}h(Tr,"tokenKeywordOrIdentifierIsKeyword");function X(r){return r>=58&&r<=133}h(X,"tokenIsKeywordOrIdentifier");function Ks(r){return r>=58&&r<=137}h(Ks,"tokenIsLiteralPropertyName");function Er(r){return Mt[r]}h(Er,"tokenComesBeforeExpression");function we(r){return Rt[r]}h(we,"tokenCanStartExpression");function Pr(r){return r>=29&&r<=33}h(Pr,"tokenIsAssignment");function Rs(r){return r>=129&&r<=131}h(Rs,"tokenIsFlowInterfaceOrTypeOrOpaque");function Sr(r){return r>=90&&r<=92}h(Sr,"tokenIsLoop");function Bt(r){return r>=58&&r<=92}h(Bt,"tokenIsKeyword");function br(r){return r>=39&&r<=59}h(br,"tokenIsOperator");function Ar(r){return r===34}h(Ar,"tokenIsPostfix");function Nr(r){return Ft[r]}h(Nr,"tokenIsPrefix");function Ir(r){return r>=121&&r<=123}h(Ir,"tokenIsTSTypeOperator");function Cr(r){return r>=124&&r<=130}h(Cr,"tokenIsTSDeclarationStart");function ae(r){return Lt[r]}h(ae,"tokenLabelName");function He(r){return Dt[r]}h(He,"tokenOperatorPrecedence");function wr(r){return r===57}h(wr,"tokenIsRightAssociative");function ze(r){return r>=24&&r<=25}h(ze,"tokenIsTemplate");function Y(r){return Q[r]}h(Y,"getExportedToken");Q[8].updateContext=r=>{r.pop()};Q[5].updateContext=Q[7].updateContext=Q[23].updateContext=r=>{r.push(C.brace)};Q[22].updateContext=r=>{r[r.length-1]===C.template?r.pop():r.push(C.template)};Q[143].updateContext=r=>{r.push(C.j_expr,C.j_oTag)};var Vt="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",Ws="\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",vr=new RegExp("["+Vt+"]"),kr=new RegExp("["+Vt+Ws+"]");Vt=Ws=null;var Gs=[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],Or=[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];function ut(r,t){let e=65536;for(let s=0,i=t.length;s<i;s+=2){if(e+=t[s],e>r)return!1;if(e+=t[s+1],e>=r)return!0}return!1}h(ut,"isInAstralSet");function W(r){return r<65?r===36:r<=90?!0:r<97?r===95:r<=122?!0:r<=65535?r>=170&&vr.test(String.fromCharCode(r)):ut(r,Gs)}h(W,"isIdentifierStart");function ue(r){return r<48?r===36:r<58?!0:r<65?!1:r<=90?!0:r<97?r===95:r<=122?!0:r<=65535?r>=170&&kr.test(String.fromCharCode(r)):ut(r,Gs)||ut(r,Or)}h(ue,"isIdentifierChar");var Ut={keyword:["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete"],strict:["implements","interface","let","package","private","protected","public","static","yield"],strictBind:["eval","arguments"]},_r=new Set(Ut.keyword),Lr=new Set(Ut.strict),Dr=new Set(Ut.strictBind);function Js(r,t){return t&&r==="await"||r==="enum"}h(Js,"isReservedWord");function Ys(r,t){return Js(r,t)||Lr.has(r)}h(Ys,"isStrictReservedWord");function Qs(r){return Dr.has(r)}h(Qs,"isStrictBindOnlyReservedWord");function Zs(r,t){return Ys(r,t)||Qs(r)}h(Zs,"isStrictBindReservedWord");function Mr(r){return _r.has(r)}h(Mr,"isKeyword");function Rr(r,t,e){return r===64&&t===64&&W(e)}h(Rr,"isIteratorStart");var Fr=new Set(["break","case","catch","continue","debugger","default","do","else","finally","for","function","if","return","switch","throw","try","var","const","while","with","new","this","super","class","extends","export","import","null","true","false","in","instanceof","typeof","void","delete","implements","interface","let","package","private","protected","public","static","yield","eval","arguments","enum","await"]);function Br(r){return Fr.has(r)}h(Br,"canBeReservedWord");var Oe=class{static{h(this,"Scope")}constructor(t){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=t}},_e=class{static{h(this,"ScopeHandler")}constructor(t,e){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=t,this.inModule=e}get inTopLevel(){return(this.currentScope().flags&1)>0}get inFunction(){return(this.currentVarScopeFlags()&2)>0}get allowSuper(){return(this.currentThisScopeFlags()&16)>0}get allowDirectSuper(){return(this.currentThisScopeFlags()&32)>0}get allowNewTarget(){return(this.currentThisScopeFlags()&512)>0}get inClass(){return(this.currentThisScopeFlags()&64)>0}get inClassAndNotInNonArrowFunction(){let t=this.currentThisScopeFlags();return(t&64)>0&&(t&2)===0}get inStaticBlock(){for(let t=this.scopeStack.length-1;;t--){let{flags:e}=this.scopeStack[t];if(e&128)return!0;if(e&1731)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get inBareCaseStatement(){return(this.currentScope().flags&256)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(t){return new Oe(t)}enter(t){this.scopeStack.push(this.createScope(t))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(t){return!!(t.flags&130||!this.parser.inModule&&t.flags&1)}declareName(t,e,s){let i=this.currentScope();if(e&8||e&16){this.checkRedeclarationInScope(i,t,e,s);let n=i.names.get(t)||0;e&16?n=n|4:(i.firstLexicalName||(i.firstLexicalName=t),n=n|2),i.names.set(t,n),e&8&&this.maybeExportDefined(i,t)}else if(e&4)for(let n=this.scopeStack.length-1;n>=0&&(i=this.scopeStack[n],this.checkRedeclarationInScope(i,t,e,s),i.names.set(t,(i.names.get(t)||0)|1),this.maybeExportDefined(i,t),!(i.flags&1667));--n);this.parser.inModule&&i.flags&1&&this.undefinedExports.delete(t)}maybeExportDefined(t,e){this.parser.inModule&&t.flags&1&&this.undefinedExports.delete(e)}checkRedeclarationInScope(t,e,s,i){this.isRedeclaredInScope(t,e,s)&&this.parser.raise(p.VarRedeclaration,i,{identifierName:e})}isRedeclaredInScope(t,e,s){if(!(s&1))return!1;if(s&8)return t.names.has(e);let i=t.names.get(e)||0;return s&16?(i&2)>0||!this.treatFunctionsAsVarInScope(t)&&(i&1)>0:(i&2)>0&&!(t.flags&8&&t.firstLexicalName===e)||!this.treatFunctionsAsVarInScope(t)&&(i&4)>0}checkLocalExport(t){let{name:e}=t;this.scopeStack[0].names.has(e)||this.undefinedExports.set(e,t.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let t=this.scopeStack.length-1;;t--){let{flags:e}=this.scopeStack[t];if(e&1667)return e}}currentThisScopeFlags(){for(let t=this.scopeStack.length-1;;t--){let{flags:e}=this.scopeStack[t];if(e&1731&&!(e&4))return e}}},pt=class extends Oe{static{h(this,"FlowScope")}constructor(...t){super(...t),this.declareFunctions=new Set}},ft=class extends _e{static{h(this,"FlowScopeHandler")}createScope(t){return new pt(t)}declareName(t,e,s){let i=this.currentScope();if(e&2048){this.checkRedeclarationInScope(i,t,e,s),this.maybeExportDefined(i,t),i.declareFunctions.add(t);return}super.declareName(t,e,s)}isRedeclaredInScope(t,e,s){if(super.isRedeclaredInScope(t,e,s))return!0;if(s&2048&&!t.declareFunctions.has(e)){let i=t.names.get(e);return(i&4)>0||(i&2)>0}return!1}checkLocalExport(t){this.scopeStack[0].declareFunctions.has(t.name)||super.checkLocalExport(t)}},Vr=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),E=K`flow`({AmbiguousConditionalArrow:"Ambiguous expression: wrap the arrow functions in parentheses to disambiguate.",AmbiguousDeclareModuleKind:"Found both `declare module.exports` and `declare export` in the same module. Modules can only have 1 since they are either an ES module or they are a CommonJS module.",AssignReservedType:h(({reservedType:r})=>`Cannot overwrite reserved type ${r}.`,"AssignReservedType"),DeclareClassElement:"The `declare` modifier can only appear on class fields.",DeclareClassFieldInitializer:"Initializers are not allowed in fields with the `declare` modifier.",DuplicateDeclareModuleExports:"Duplicate `declare module.exports` statement.",EnumBooleanMemberNotInitialized:h(({memberName:r,enumName:t})=>`Boolean enum members need to be initialized. Use either \`${r} = true,\` or \`${r} = false,\` in enum \`${t}\`.`,"EnumBooleanMemberNotInitialized"),EnumDuplicateMemberName:h(({memberName:r,enumName:t})=>`Enum member names need to be unique, but the name \`${r}\` has already been used before in enum \`${t}\`.`,"EnumDuplicateMemberName"),EnumInconsistentMemberValues:h(({enumName:r})=>`Enum \`${r}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,"EnumInconsistentMemberValues"),EnumInvalidExplicitType:h(({invalidEnumType:r,enumName:t})=>`Enum type \`${r}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${t}\`.`,"EnumInvalidExplicitType"),EnumInvalidExplicitTypeUnknownSupplied:h(({enumName:r})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${r}\`.`,"EnumInvalidExplicitTypeUnknownSupplied"),EnumInvalidMemberInitializerPrimaryType:h(({enumName:r,memberName:t,explicitType:e})=>`Enum \`${r}\` has type \`${e}\`, so the initializer of \`${t}\` needs to be a ${e} literal.`,"EnumInvalidMemberInitializerPrimaryType"),EnumInvalidMemberInitializerSymbolType:h(({enumName:r,memberName:t})=>`Symbol enum members cannot be initialized. Use \`${t},\` in enum \`${r}\`.`,"EnumInvalidMemberInitializerSymbolType"),EnumInvalidMemberInitializerUnknownType:h(({enumName:r,memberName:t})=>`The enum member initializer for \`${t}\` needs to be a literal (either a boolean, number, or string) in enum \`${r}\`.`,"EnumInvalidMemberInitializerUnknownType"),EnumInvalidMemberName:h(({enumName:r,memberName:t,suggestion:e})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${t}\`, consider using \`${e}\`, in enum \`${r}\`.`,"EnumInvalidMemberName"),EnumNumberMemberNotInitialized:h(({enumName:r,memberName:t})=>`Number enum members need to be initialized, e.g. \`${t} = 1\` in enum \`${r}\`.`,"EnumNumberMemberNotInitialized"),EnumStringMemberInconsistentlyInitialized:h(({enumName:r})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${r}\`.`,"EnumStringMemberInconsistentlyInitialized"),GetterMayNotHaveThisParam:"A getter cannot have a `this` parameter.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` or `typeof` keyword.",ImportTypeShorthandOnlyInPureImport:"The `type` and `typeof` keywords on named imports can only be used on regular `import` statements. It cannot be used with `import type` or `import typeof` statements.",InexactInsideExact:"Explicit inexact syntax cannot appear inside an explicit exact object type.",InexactInsideNonObject:"Explicit inexact syntax cannot appear in class or interface definitions.",InexactVariance:"Explicit inexact syntax cannot have variance.",InvalidNonTypeImportInDeclareModule:"Imports within a `declare module` body must always be `import type` or `import typeof`.",MissingTypeParamDefault:"Type parameter declaration needs a default, since a preceding type parameter declaration has a default.",NestedDeclareModule:"`declare module` cannot be used inside another `declare module`.",NestedFlowComment:"Cannot have a flow comment inside another flow comment.",PatternIsOptional:Object.assign({message:"A binding pattern parameter cannot be optional in an implementation signature."},{reasonCode:"OptionalBindingPattern"}),SetterMayNotHaveThisParam:"A setter cannot have a `this` parameter.",SpreadVariance:"Spread properties cannot have variance.",ThisParamAnnotationRequired:"A type annotation is required for the `this` parameter.",ThisParamBannedInConstructor:"Constructors cannot have a `this` parameter; constructors don't bind `this` like other functions.",ThisParamMayNotBeOptional:"The `this` parameter cannot be optional.",ThisParamMustBeFirst:"The `this` parameter must be the first function parameter.",ThisParamNoDefault:"The `this` parameter may not have a default value.",TypeBeforeInitializer:"Type annotations must come before default assignments, e.g. instead of `age = 25: number` use `age: number = 25`.",TypeCastInPattern:"The type cast expression is expected to be wrapped with parenthesis.",UnexpectedExplicitInexactInObject:"Explicit inexact syntax must appear at the end of an inexact object.",UnexpectedReservedType:h(({reservedType:r})=>`Unexpected reserved type ${r}.`,"UnexpectedReservedType"),UnexpectedReservedUnderscore:"`_` is only allowed as a type argument to call or new.",UnexpectedSpaceBetweenModuloChecks:"Spaces between `%` and `checks` are not allowed here.",UnexpectedSpreadType:"Spread operator cannot appear in class or interface definitions.",UnexpectedSubtractionOperand:'Unexpected token, expected "number" or "bigint".',UnexpectedTokenAfterTypeParameter:"Expected an arrow function after this type parameter declaration.",UnexpectedTypeParameterBeforeAsyncArrowFunction:"Type parameters must come after the async keyword, e.g. instead of `<T> async () => {}`, use `async <T>() => {}`.",UnsupportedDeclareExportKind:h(({unsupportedExportKind:r,suggestion:t})=>`\`declare export ${r}\` is not supported. Use \`${t}\` instead.`,"UnsupportedDeclareExportKind"),UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function Ur(r){return r.type==="DeclareExportAllDeclaration"||r.type==="DeclareExportDeclaration"&&(!r.declaration||r.declaration.type!=="TypeAlias"&&r.declaration.type!=="InterfaceDeclaration")}h(Ur,"isEsModuleType");function Fs(r){return r.importKind==="type"||r.importKind==="typeof"}h(Fs,"hasTypeImportKind");var jr={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function $r(r,t){let e=[],s=[];for(let i=0;i<r.length;i++)(t(r[i],i,r)?e:s).push(r[i]);return[e,s]}h($r,"partition");var Hr=/\*?\s*@((?:no)?flow)\b/,Xr=h(r=>class extends r{static{h(this,"FlowParserMixin")}constructor(...e){super(...e),this.flowPragma=void 0}getScopeHandler(){return ft}shouldParseTypes(){return this.getPluginOption("flow","all")||this.flowPragma==="flow"}finishToken(e,s){e!==134&&e!==13&&e!==28&&this.flowPragma===void 0&&(this.flowPragma=null),super.finishToken(e,s)}addComment(e){if(this.flowPragma===void 0){let s=Hr.exec(e.value);if(s)if(s[1]==="flow")this.flowPragma="flow";else if(s[1]==="noflow")this.flowPragma="noflow";else throw new Error("Unexpected flow pragma")}super.addComment(e)}flowParseTypeInitialiser(e){let s=this.state.inType;this.state.inType=!0,this.expect(e||14);let i=this.flowParseType();return this.state.inType=s,i}flowParsePredicate(){let e=this.startNode(),s=this.state.startLoc;return this.next(),this.expectContextual(110),this.state.lastTokStartLoc.index>s.index+1&&this.raise(E.UnexpectedSpaceBetweenModuloChecks,s),this.eat(10)?(e.value=super.parseExpression(),this.expect(11),this.finishNode(e,"DeclaredPredicate")):this.finishNode(e,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){let e=this.state.inType;this.state.inType=!0,this.expect(14);let s=null,i=null;return this.match(54)?(this.state.inType=e,i=this.flowParsePredicate()):(s=this.flowParseType(),this.state.inType=e,this.match(54)&&(i=this.flowParsePredicate())),[s,i]}flowParseDeclareClass(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")}flowParseDeclareFunction(e){this.next();let s=e.id=this.parseIdentifier(),i=this.startNode(),n=this.startNode();this.match(47)?i.typeParameters=this.flowParseTypeParameterDeclaration():i.typeParameters=null,this.expect(10);let a=this.flowParseFunctionTypeParams();return i.params=a.params,i.rest=a.rest,i.this=a._this,this.expect(11),[i.returnType,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),n.typeAnnotation=this.finishNode(i,"FunctionTypeAnnotation"),s.typeAnnotation=this.finishNode(n,"TypeAnnotation"),this.resetEndLocation(s),this.semicolon(),this.scope.declareName(e.id.name,2048,e.id.loc.start),this.finishNode(e,"DeclareFunction")}flowParseDeclare(e,s){if(this.match(80))return this.flowParseDeclareClass(e);if(this.match(68))return this.flowParseDeclareFunction(e);if(this.match(74))return this.flowParseDeclareVariable(e);if(this.eatContextual(127))return this.match(16)?this.flowParseDeclareModuleExports(e):(s&&this.raise(E.NestedDeclareModule,this.state.lastTokStartLoc),this.flowParseDeclareModule(e));if(this.isContextual(130))return this.flowParseDeclareTypeAlias(e);if(this.isContextual(131))return this.flowParseDeclareOpaqueType(e);if(this.isContextual(129))return this.flowParseDeclareInterface(e);if(this.match(82))return this.flowParseDeclareExportDeclaration(e,s);throw this.unexpected()}flowParseDeclareVariable(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(),this.scope.declareName(e.id.name,5,e.id.loc.start),this.semicolon(),this.finishNode(e,"DeclareVariable")}flowParseDeclareModule(e){this.scope.enter(0),this.match(134)?e.id=super.parseExprAtom():e.id=this.parseIdentifier();let s=e.body=this.startNode(),i=s.body=[];for(this.expect(5);!this.match(8);){let o=this.startNode();this.match(83)?(this.next(),!this.isContextual(130)&&!this.match(87)&&this.raise(E.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),i.push(super.parseImport(o))):(this.expectContextual(125,E.UnsupportedStatementInDeclareModule),i.push(this.flowParseDeclare(o,!0)))}this.scope.exit(),this.expect(8),this.finishNode(s,"BlockStatement");let n=null,a=!1;return i.forEach(o=>{Ur(o)?(n==="CommonJS"&&this.raise(E.AmbiguousDeclareModuleKind,o),n="ES"):o.type==="DeclareModuleExports"&&(a&&this.raise(E.DuplicateDeclareModuleExports,o),n==="ES"&&this.raise(E.AmbiguousDeclareModuleKind,o),n="CommonJS",a=!0)}),e.kind=n||"CommonJS",this.finishNode(e,"DeclareModule")}flowParseDeclareExportDeclaration(e,s){if(this.expect(82),this.eat(65))return this.match(68)||this.match(80)?e.declaration=this.flowParseDeclare(this.startNode()):(e.declaration=this.flowParseType(),this.semicolon()),e.default=!0,this.finishNode(e,"DeclareExportDeclaration");if(this.match(75)||this.isLet()||(this.isContextual(130)||this.isContextual(129))&&!s){let i=this.state.value;throw this.raise(E.UnsupportedDeclareExportKind,this.state.startLoc,{unsupportedExportKind:i,suggestion:jr[i]})}if(this.match(74)||this.match(68)||this.match(80)||this.isContextual(131))return e.declaration=this.flowParseDeclare(this.startNode()),e.default=!1,this.finishNode(e,"DeclareExportDeclaration");if(this.match(55)||this.match(5)||this.isContextual(129)||this.isContextual(130)||this.isContextual(131))return e=this.parseExport(e,null),e.type==="ExportNamedDeclaration"?(e.default=!1,delete e.exportKind,this.castNodeTo(e,"DeclareExportDeclaration")):this.castNodeTo(e,"DeclareExportAllDeclaration");throw this.unexpected()}flowParseDeclareModuleExports(e){return this.next(),this.expectContextual(111),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")}flowParseDeclareTypeAlias(e){this.next();let s=this.flowParseTypeAlias(e);return this.castNodeTo(s,"DeclareTypeAlias"),s}flowParseDeclareOpaqueType(e){this.next();let s=this.flowParseOpaqueType(e,!0);return this.castNodeTo(s,"DeclareOpaqueType"),s}flowParseDeclareInterface(e){return this.next(),this.flowParseInterfaceish(e,!1),this.finishNode(e,"DeclareInterface")}flowParseInterfaceish(e,s){if(e.id=this.flowParseRestrictedIdentifier(!s,!0),this.scope.declareName(e.id.name,s?17:8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.extends=[],this.eat(81))do e.extends.push(this.flowParseInterfaceExtends());while(!s&&this.eat(12));if(s){if(e.implements=[],e.mixins=[],this.eatContextual(117))do e.mixins.push(this.flowParseInterfaceExtends());while(this.eat(12));if(this.eatContextual(113))do e.implements.push(this.flowParseInterfaceExtends());while(this.eat(12))}e.body=this.flowParseObjectType({allowStatic:s,allowExact:!1,allowSpread:!1,allowProto:s,allowInexact:!1})}flowParseInterfaceExtends(){let e=this.startNode();return e.id=this.flowParseQualifiedTypeIdentifier(),this.match(47)?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,this.finishNode(e,"InterfaceExtends")}flowParseInterface(e){return this.flowParseInterfaceish(e,!1),this.finishNode(e,"InterfaceDeclaration")}checkNotUnderscore(e){e==="_"&&this.raise(E.UnexpectedReservedUnderscore,this.state.startLoc)}checkReservedType(e,s,i){Vr.has(e)&&this.raise(i?E.AssignReservedType:E.UnexpectedReservedType,s,{reservedType:e})}flowParseRestrictedIdentifierName(e,s){return this.checkReservedType(this.state.value,this.state.startLoc,s),this.parseIdentifierName(e)}flowParseRestrictedIdentifier(e,s){let i=this.startNode(),n=this.flowParseRestrictedIdentifierName(e,s);return this.createIdentifier(i,n)}flowParseTypeAlias(e){return e.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.right=this.flowParseTypeInitialiser(29),this.semicolon(),this.finishNode(e,"TypeAlias")}flowParseOpaqueType(e,s){return this.expectContextual(130),e.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(e.id.name,8201,e.id.loc.start),this.match(47)?e.typeParameters=this.flowParseTypeParameterDeclaration():e.typeParameters=null,e.supertype=null,this.match(14)&&(e.supertype=this.flowParseTypeInitialiser(14)),e.impltype=null,s||(e.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(e,"OpaqueType")}flowParseTypeParameterBound(){if(this.match(14)||this.isContextual(81)){let e=this.startNode();return this.next(),e.typeAnnotation=this.flowParseType(),this.finishNode(e,"TypeAnnotation")}}flowParseTypeParameter(e=!1){let s=this.state.startLoc,i=this.startNode(),n=this.flowParseVariance();return i.name=this.flowParseRestrictedIdentifierName(),i.variance=n,i.bound=this.flowParseTypeParameterBound(),this.match(29)?(this.eat(29),i.default=this.flowParseType()):e&&this.raise(E.MissingTypeParamDefault,s),this.finishNode(i,"TypeParameter")}flowParseTypeParameterDeclaration(){let e=this.state.inType,s=this.startNode();s.params=[],this.state.inType=!0,this.match(47)||this.match(143)?this.next():this.unexpected();let i=!1;do{let n=this.flowParseTypeParameter(i);s.params.push(n),n.default&&(i=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=e,this.finishNode(s,"TypeParameterDeclaration")}flowInTopLevelContext(e){if(this.curContext()!==C.brace){let s=this.state.context;this.state.context=[s[0]];try{return e()}finally{this.state.context=s}}else return e()}flowParseTypeParameterInstantiationInExpression(){if(this.reScan_lt()===47)return this.flowParseTypeParameterInstantiation()}flowParseTypeParameterInstantiation(){let e=this.startNode(),s=this.state.inType;return this.state.inType=!0,e.params=[],this.flowInTopLevelContext(()=>{this.expect(47);let i=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)e.params.push(this.flowParseType()),this.match(48)||this.expect(12);this.state.noAnonFunctionType=i}),this.state.inType=s,!this.state.inType&&this.curContext()===C.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(e,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){if(this.reScan_lt()!==47)return null;let e=this.startNode(),s=this.state.inType;for(e.params=[],this.state.inType=!0,this.expect(47);!this.match(48);)e.params.push(this.flowParseTypeOrImplicitInstantiation()),this.match(48)||this.expect(12);return this.expect(48),this.state.inType=s,this.finishNode(e,"TypeParameterInstantiation")}flowParseInterfaceType(){let e=this.startNode();if(this.expectContextual(129),e.extends=[],this.eat(81))do e.extends.push(this.flowParseInterfaceExtends());while(this.eat(12));return e.body=this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!1,allowProto:!1,allowInexact:!1}),this.finishNode(e,"InterfaceTypeAnnotation")}flowParseObjectPropertyKey(){return this.match(135)||this.match(134)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(e,s,i){return e.static=s,this.lookahead().type===14?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(3),e.value=this.flowParseTypeInitialiser(),e.variance=i,this.finishNode(e,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(e,s){return e.static=s,e.id=this.flowParseObjectPropertyKey(),this.expect(3),this.expect(3),this.match(47)||this.match(10)?(e.method=!0,e.optional=!1,e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start))):(e.method=!1,this.eat(17)&&(e.optional=!0),e.value=this.flowParseTypeInitialiser()),this.finishNode(e,"ObjectTypeInternalSlot")}flowParseObjectTypeMethodish(e){for(e.params=[],e.rest=null,e.typeParameters=null,e.this=null,this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),this.expect(10),this.match(78)&&(e.this=this.flowParseFunctionTypeParam(!0),e.this.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.params.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(e.rest=this.flowParseFunctionTypeParam(!1)),this.expect(11),e.returnType=this.flowParseTypeInitialiser(),this.finishNode(e,"FunctionTypeAnnotation")}flowParseObjectTypeCallProperty(e,s){let i=this.startNode();return e.static=s,e.value=this.flowParseObjectTypeMethodish(i),this.finishNode(e,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:e,allowExact:s,allowSpread:i,allowProto:n,allowInexact:a}){let o=this.state.inType;this.state.inType=!0;let l=this.startNode();l.callProperties=[],l.properties=[],l.indexers=[],l.internalSlots=[];let c,u,f=!1;for(s&&this.match(6)?(this.expect(6),c=9,u=!0):(this.expect(5),c=8,u=!1),l.exact=u;!this.match(c);){let m=!1,y=null,S=null,O=this.startNode();if(n&&this.isContextual(118)){let v=this.lookahead();v.type!==14&&v.type!==17&&(this.next(),y=this.state.startLoc,e=!1)}if(e&&this.isContextual(106)){let v=this.lookahead();v.type!==14&&v.type!==17&&(this.next(),m=!0)}let P=this.flowParseVariance();if(this.eat(0))y!=null&&this.unexpected(y),this.eat(0)?(P&&this.unexpected(P.loc.start),l.internalSlots.push(this.flowParseObjectTypeInternalSlot(O,m))):l.indexers.push(this.flowParseObjectTypeIndexer(O,m,P));else if(this.match(10)||this.match(47))y!=null&&this.unexpected(y),P&&this.unexpected(P.loc.start),l.callProperties.push(this.flowParseObjectTypeCallProperty(O,m));else{let v="init";if(this.isContextual(99)||this.isContextual(104)){let ie=this.lookahead();Ks(ie.type)&&(v=this.state.value,this.next())}let se=this.flowParseObjectTypeProperty(O,m,y,P,v,i,a??!u);se===null?(f=!0,S=this.state.lastTokStartLoc):l.properties.push(se)}this.flowObjectTypeSemicolon(),S&&!this.match(8)&&!this.match(9)&&this.raise(E.UnexpectedExplicitInexactInObject,S)}this.expect(c),i&&(l.inexact=f);let d=this.finishNode(l,"ObjectTypeAnnotation");return this.state.inType=o,d}flowParseObjectTypeProperty(e,s,i,n,a,o,l){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(o?l||this.raise(E.InexactInsideExact,this.state.lastTokStartLoc):this.raise(E.InexactInsideNonObject,this.state.lastTokStartLoc),n&&this.raise(E.InexactVariance,n),null):(o||this.raise(E.UnexpectedSpreadType,this.state.lastTokStartLoc),i!=null&&this.unexpected(i),n&&this.raise(E.SpreadVariance,n),e.argument=this.flowParseType(),this.finishNode(e,"ObjectTypeSpreadProperty"));{e.key=this.flowParseObjectPropertyKey(),e.static=s,e.proto=i!=null,e.kind=a;let c=!1;return this.match(47)||this.match(10)?(e.method=!0,i!=null&&this.unexpected(i),n&&this.unexpected(n.loc.start),e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start)),(a==="get"||a==="set")&&this.flowCheckGetterSetterParams(e),!o&&e.key.name==="constructor"&&e.value.this&&this.raise(E.ThisParamBannedInConstructor,e.value.this)):(a!=="init"&&this.unexpected(),e.method=!1,this.eat(17)&&(c=!0),e.value=this.flowParseTypeInitialiser(),e.variance=n),e.optional=c,this.finishNode(e,"ObjectTypeProperty")}}flowCheckGetterSetterParams(e){let s=e.kind==="get"?0:1,i=e.value.params.length+(e.value.rest?1:0);e.value.this&&this.raise(e.kind==="get"?E.GetterMayNotHaveThisParam:E.SetterMayNotHaveThisParam,e.value.this),i!==s&&this.raise(e.kind==="get"?p.BadGetterArity:p.BadSetterArity,e),e.kind==="set"&&e.value.rest&&this.raise(p.BadSetterRestParameter,e)}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(e,s){e??(e=this.state.startLoc);let i=s||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){let n=this.startNodeAt(e);n.qualification=i,n.id=this.flowParseRestrictedIdentifier(!0),i=this.finishNode(n,"QualifiedTypeIdentifier")}return i}flowParseGenericType(e,s){let i=this.startNodeAt(e);return i.typeParameters=null,i.id=this.flowParseQualifiedTypeIdentifier(e,s),this.match(47)&&(i.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(i,"GenericTypeAnnotation")}flowParseTypeofType(){let e=this.startNode();return this.expect(87),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")}flowParseTupleType(){let e=this.startNode();for(e.types=[],this.expect(0);this.state.pos<this.length&&!this.match(3)&&(e.types.push(this.flowParseType()),!this.match(3));)this.expect(12);return this.expect(3),this.finishNode(e,"TupleTypeAnnotation")}flowParseFunctionTypeParam(e){let s=null,i=!1,n=null,a=this.startNode(),o=this.lookahead(),l=this.state.type===78;return o.type===14||o.type===17?(l&&!e&&this.raise(E.ThisParamMustBeFirst,a),s=this.parseIdentifier(l),this.eat(17)&&(i=!0,l&&this.raise(E.ThisParamMayNotBeOptional,a)),n=this.flowParseTypeInitialiser()):n=this.flowParseType(),a.name=s,a.optional=i,a.typeAnnotation=n,this.finishNode(a,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(e){let s=this.startNodeAt(e.loc.start);return s.name=null,s.optional=!1,s.typeAnnotation=e,this.finishNode(s,"FunctionTypeParam")}flowParseFunctionTypeParams(e=[]){let s=null,i=null;for(this.match(78)&&(i=this.flowParseFunctionTypeParam(!0),i.name=null,this.match(11)||this.expect(12));!this.match(11)&&!this.match(21);)e.push(this.flowParseFunctionTypeParam(!1)),this.match(11)||this.expect(12);return this.eat(21)&&(s=this.flowParseFunctionTypeParam(!1)),{params:e,rest:s,_this:i}}flowIdentToTypeAnnotation(e,s,i){switch(i.name){case"any":return this.finishNode(s,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(s,"BooleanTypeAnnotation");case"mixed":return this.finishNode(s,"MixedTypeAnnotation");case"empty":return this.finishNode(s,"EmptyTypeAnnotation");case"number":return this.finishNode(s,"NumberTypeAnnotation");case"string":return this.finishNode(s,"StringTypeAnnotation");case"symbol":return this.finishNode(s,"SymbolTypeAnnotation");default:return this.checkNotUnderscore(i.name),this.flowParseGenericType(e,i)}}flowParsePrimaryType(){let e=this.state.startLoc,s=this.startNode(),i,n,a=!1,o=this.state.noAnonFunctionType;switch(this.state.type){case 5:return this.flowParseObjectType({allowStatic:!1,allowExact:!1,allowSpread:!0,allowProto:!1,allowInexact:!0});case 6:return this.flowParseObjectType({allowStatic:!1,allowExact:!0,allowSpread:!0,allowProto:!1,allowInexact:!1});case 0:return this.state.noAnonFunctionType=!1,n=this.flowParseTupleType(),this.state.noAnonFunctionType=o,n;case 47:{let l=this.startNode();return l.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),i=this.flowParseFunctionTypeParams(),l.params=i.params,l.rest=i.rest,l.this=i._this,this.expect(11),this.expect(19),l.returnType=this.flowParseType(),this.finishNode(l,"FunctionTypeAnnotation")}case 10:{let l=this.startNode();if(this.next(),!this.match(11)&&!this.match(21))if(k(this.state.type)||this.match(78)){let c=this.lookahead().type;a=c!==17&&c!==14}else a=!0;if(a){if(this.state.noAnonFunctionType=!1,n=this.flowParseType(),this.state.noAnonFunctionType=o,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&this.lookahead().type===19))return this.expect(11),n;this.eat(12)}return n?i=this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(n)]):i=this.flowParseFunctionTypeParams(),l.params=i.params,l.rest=i.rest,l.this=i._this,this.expect(11),this.expect(19),l.returnType=this.flowParseType(),l.typeParameters=null,this.finishNode(l,"FunctionTypeAnnotation")}case 134:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case 85:case 86:return s.value=this.match(85),this.next(),this.finishNode(s,"BooleanLiteralTypeAnnotation");case 53:if(this.state.value==="-"){if(this.next(),this.match(135))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",s);if(this.match(136))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",s);throw this.raise(E.UnexpectedSubtractionOperand,this.state.startLoc)}throw this.unexpected();case 135:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case 136:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case 88:return this.next(),this.finishNode(s,"VoidTypeAnnotation");case 84:return this.next(),this.finishNode(s,"NullLiteralTypeAnnotation");case 78:return this.next(),this.finishNode(s,"ThisTypeAnnotation");case 55:return this.next(),this.finishNode(s,"ExistsTypeAnnotation");case 87:return this.flowParseTypeofType();default:if(Bt(this.state.type)){let l=ae(this.state.type);return this.next(),super.createIdentifier(s,l)}else if(k(this.state.type))return this.isContextual(129)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(e,s,this.parseIdentifier())}throw this.unexpected()}flowParsePostfixType(){let e=this.state.startLoc,s=this.flowParsePrimaryType(),i=!1;for(;(this.match(0)||this.match(18))&&!this.canInsertSemicolon();){let n=this.startNodeAt(e),a=this.eat(18);i=i||a,this.expect(0),!a&&this.match(3)?(n.elementType=s,this.next(),s=this.finishNode(n,"ArrayTypeAnnotation")):(n.objectType=s,n.indexType=this.flowParseType(),this.expect(3),i?(n.optional=a,s=this.finishNode(n,"OptionalIndexedAccessType")):s=this.finishNode(n,"IndexedAccessType"))}return s}flowParsePrefixType(){let e=this.startNode();return this.eat(17)?(e.typeAnnotation=this.flowParsePrefixType(),this.finishNode(e,"NullableTypeAnnotation")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){let e=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(19)){let s=this.startNodeAt(e.loc.start);return s.params=[this.reinterpretTypeAsFunctionTypeParam(e)],s.rest=null,s.this=null,s.returnType=this.flowParseType(),s.typeParameters=null,this.finishNode(s,"FunctionTypeAnnotation")}return e}flowParseIntersectionType(){let e=this.startNode();this.eat(45);let s=this.flowParseAnonFunctionWithoutParens();for(e.types=[s];this.eat(45);)e.types.push(this.flowParseAnonFunctionWithoutParens());return e.types.length===1?s:this.finishNode(e,"IntersectionTypeAnnotation")}flowParseUnionType(){let e=this.startNode();this.eat(43);let s=this.flowParseIntersectionType();for(e.types=[s];this.eat(43);)e.types.push(this.flowParseIntersectionType());return e.types.length===1?s:this.finishNode(e,"UnionTypeAnnotation")}flowParseType(){let e=this.state.inType;this.state.inType=!0;let s=this.flowParseUnionType();return this.state.inType=e,s}flowParseTypeOrImplicitInstantiation(){if(this.state.type===132&&this.state.value==="_"){let e=this.state.startLoc,s=this.parseIdentifier();return this.flowParseGenericType(e,s)}else return this.flowParseType()}flowParseTypeAnnotation(){let e=this.startNode();return e.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(e,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(){let e=this.startNode(),s=this.parseIdentifierName();return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),this.createIdentifier(e,s)}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocation(e.expression,e.typeAnnotation.loc.end),e.expression}flowParseVariance(){let e=null;return this.match(53)?(e=this.startNode(),this.state.value==="+"?e.kind="plus":e.kind="minus",this.next(),this.finishNode(e,"Variance")):e}parseFunctionBody(e,s,i=!1){if(s){this.forwardNoArrowParamsConversionAt(e,()=>super.parseFunctionBody(e,!0,i));return}super.parseFunctionBody(e,!1,i)}parseFunctionBodyAndFinish(e,s,i=!1){if(this.match(14)){let n=this.startNode();[n.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),e.returnType=n.typeAnnotation?this.finishNode(n,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(e,s,i)}parseStatementLike(e){if(this.state.strict&&this.isContextual(129)){let i=this.lookahead();if(X(i.type)){let n=this.startNode();return this.next(),this.flowParseInterface(n)}}else if(this.isContextual(126)){let i=this.startNode();return this.next(),this.flowParseEnumDeclaration(i)}let s=super.parseStatementLike(e);return this.flowPragma===void 0&&!this.isValidDirective(s)&&(this.flowPragma=null),s}parseExpressionStatement(e,s,i){if(s.type==="Identifier"){if(s.name==="declare"){if(this.match(80)||k(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(e)}else if(k(this.state.type)){if(s.name==="interface")return this.flowParseInterface(e);if(s.name==="type")return this.flowParseTypeAlias(e);if(s.name==="opaque")return this.flowParseOpaqueType(e,!1)}}return super.parseExpressionStatement(e,s,i)}shouldParseExportDeclaration(){let{type:e}=this.state;return e===126||Rs(e)?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:e}=this.state;return e===126||Rs(e)?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.isContextual(126)){let e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}return super.parseExportDefaultExpression()}parseConditional(e,s,i){if(!this.match(17))return e;if(this.state.maybeInArrowParameters){let d=this.lookaheadCharCode();if(d===44||d===61||d===58||d===41)return this.setOptionalParametersError(i),e}this.expect(17);let n=this.state.clone(),a=this.state.noArrowAt,o=this.startNodeAt(s),{consequent:l,failed:c}=this.tryParseConditionalConsequent(),[u,f]=this.getArrowLikeExpressions(l);if(c||f.length>0){let d=[...a];if(f.length>0){this.state=n,this.state.noArrowAt=d;for(let m=0;m<f.length;m++)d.push(f[m].start);({consequent:l,failed:c}=this.tryParseConditionalConsequent()),[u,f]=this.getArrowLikeExpressions(l)}c&&u.length>1&&this.raise(E.AmbiguousConditionalArrow,n.startLoc),c&&u.length===1&&(this.state=n,d.push(u[0].start),this.state.noArrowAt=d,{consequent:l,failed:c}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(l,!0),this.state.noArrowAt=a,this.expect(14),o.test=e,o.consequent=l,o.alternate=this.forwardNoArrowParamsConversionAt(o,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(o,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);let e=this.parseMaybeAssignAllowIn(),s=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:e,failed:s}}getArrowLikeExpressions(e,s){let i=[e],n=[];for(;i.length!==0;){let a=i.pop();a.type==="ArrowFunctionExpression"&&a.body.type!=="BlockStatement"?(a.typeParameters||!a.returnType?this.finishArrowValidation(a):n.push(a),i.push(a.body)):a.type==="ConditionalExpression"&&(i.push(a.consequent),i.push(a.alternate))}return s?(n.forEach(a=>this.finishArrowValidation(a)),[n,[]]):$r(n,a=>a.params.every(o=>this.isAssignable(o,!0)))}finishArrowValidation(e){var s;this.toAssignableList(e.params,(s=e.extra)==null?void 0:s.trailingCommaLoc,!1),this.scope.enter(518),super.checkParams(e,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(e,s){let i;return this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(e.start))?(this.state.noArrowParamsConversionAt.push(this.state.start),i=s(),this.state.noArrowParamsConversionAt.pop()):i=s(),i}parseParenItem(e,s){let i=super.parseParenItem(e,s);if(this.eat(17)&&(i.optional=!0,this.resetEndLocation(e)),this.match(14)){let n=this.startNodeAt(s);return n.expression=i,n.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(n,"TypeCastExpression")}return i}assertModuleNodeAllowed(e){e.type==="ImportDeclaration"&&(e.importKind==="type"||e.importKind==="typeof")||e.type==="ExportNamedDeclaration"&&e.exportKind==="type"||e.type==="ExportAllDeclaration"&&e.exportKind==="type"||super.assertModuleNodeAllowed(e)}parseExportDeclaration(e){if(this.isContextual(130)){e.exportKind="type";let s=this.startNode();return this.next(),this.match(5)?(e.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(e),null):this.flowParseTypeAlias(s)}else if(this.isContextual(131)){e.exportKind="type";let s=this.startNode();return this.next(),this.flowParseOpaqueType(s,!1)}else if(this.isContextual(129)){e.exportKind="type";let s=this.startNode();return this.next(),this.flowParseInterface(s)}else if(this.isContextual(126)){e.exportKind="value";let s=this.startNode();return this.next(),this.flowParseEnumDeclaration(s)}else return super.parseExportDeclaration(e)}eatExportStar(e){return super.eatExportStar(e)?!0:this.isContextual(130)&&this.lookahead().type===55?(e.exportKind="type",this.next(),this.next(),!0):!1}maybeParseExportNamespaceSpecifier(e){let{startLoc:s}=this.state,i=super.maybeParseExportNamespaceSpecifier(e);return i&&e.exportKind==="type"&&this.unexpected(s),i}parseClassId(e,s,i){super.parseClassId(e,s,i),this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(e,s,i){let{startLoc:n}=this.state;if(this.isContextual(125)){if(super.parseClassMemberFromModifier(e,s))return;s.declare=!0}super.parseClassMember(e,s,i),s.declare&&(s.type!=="ClassProperty"&&s.type!=="ClassPrivateProperty"&&s.type!=="PropertyDefinition"?this.raise(E.DeclareClassElement,n):s.value&&this.raise(E.DeclareClassFieldInitializer,s.value))}isIterator(e){return e==="iterator"||e==="asyncIterator"}readIterator(){let e=super.readWord1(),s="@@"+e;(!this.isIterator(e)||!this.state.inType)&&this.raise(p.InvalidIdentifier,this.state.curPosition(),{identifierName:s}),this.finishToken(132,s)}getTokenFromCode(e){let s=this.input.charCodeAt(this.state.pos+1);e===123&&s===124?this.finishOp(6,2):this.state.inType&&(e===62||e===60)?this.finishOp(e===62?48:47,1):this.state.inType&&e===63?s===46?this.finishOp(18,2):this.finishOp(17,1):Rr(e,s,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(e)}isAssignable(e,s){return e.type==="TypeCastExpression"?this.isAssignable(e.expression,s):super.isAssignable(e,s)}toAssignable(e,s=!1){!s&&e.type==="AssignmentExpression"&&e.left.type==="TypeCastExpression"&&(e.left=this.typeCastToParameter(e.left)),super.toAssignable(e,s)}toAssignableList(e,s,i){for(let n=0;n<e.length;n++){let a=e[n];a?.type==="TypeCastExpression"&&(e[n]=this.typeCastToParameter(a))}super.toAssignableList(e,s,i)}toReferencedList(e,s){for(let n=0;n<e.length;n++){var i;let a=e[n];a&&a.type==="TypeCastExpression"&&!((i=a.extra)!=null&&i.parenthesized)&&(e.length>1||!s)&&this.raise(E.TypeCastInPattern,a.typeAnnotation)}return e}parseArrayLike(e,s,i){let n=super.parseArrayLike(e,s,i);return i!=null&&!this.state.maybeInArrowParameters&&this.toReferencedList(n.elements),n}isValidLVal(e,s,i,n){return e==="TypeCastExpression"||super.isValidLVal(e,s,i,n)}parseClassProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassProperty(e)}parseClassPrivateProperty(e){return this.match(14)&&(e.typeAnnotation=this.flowParseTypeAnnotation()),super.parseClassPrivateProperty(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(14)||super.isClassProperty()}isNonstaticConstructor(e){return!this.match(14)&&super.isNonstaticConstructor(e)}pushClassMethod(e,s,i,n,a,o){if(s.variance&&this.unexpected(s.variance.loc.start),delete s.variance,this.match(47)&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(e,s,i,n,a,o),s.params&&a){let l=s.params;l.length>0&&this.isThisParam(l[0])&&this.raise(E.ThisParamBannedInConstructor,s)}else if(s.type==="MethodDefinition"&&a&&s.value.params){let l=s.value.params;l.length>0&&this.isThisParam(l[0])&&this.raise(E.ThisParamBannedInConstructor,s)}}pushClassPrivateMethod(e,s,i,n){s.variance&&this.unexpected(s.variance.loc.start),delete s.variance,this.match(47)&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(e,s,i,n)}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass&&(this.match(47)||this.match(51))&&(e.superTypeParameters=this.flowParseTypeParameterInstantiationInExpression()),this.isContextual(113)){this.next();let s=e.implements=[];do{let i=this.startNode();i.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?i.typeParameters=this.flowParseTypeParameterInstantiation():i.typeParameters=null,s.push(this.finishNode(i,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(e){super.checkGetterSetterParams(e);let s=this.getObjectOrClassMethodParams(e);if(s.length>0){let i=s[0];this.isThisParam(i)&&e.kind==="get"?this.raise(E.GetterMayNotHaveThisParam,i):this.isThisParam(i)&&this.raise(E.SetterMayNotHaveThisParam,i)}}parsePropertyNamePrefixOperator(e){e.variance=this.flowParseVariance()}parseObjPropValue(e,s,i,n,a,o,l){e.variance&&this.unexpected(e.variance.loc.start),delete e.variance;let c;this.match(47)&&!o&&(c=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());let u=super.parseObjPropValue(e,s,i,n,a,o,l);return c&&((u.value||u).typeParameters=c),u}parseFunctionParamType(e){return this.eat(17)&&(e.type!=="Identifier"&&this.raise(E.PatternIsOptional,e),this.isThisParam(e)&&this.raise(E.ThisParamMayNotBeOptional,e),e.optional=!0),this.match(14)?e.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(e)&&this.raise(E.ThisParamAnnotationRequired,e),this.match(29)&&this.isThisParam(e)&&this.raise(E.ThisParamNoDefault,e),this.resetEndLocation(e),e}parseMaybeDefault(e,s){let i=super.parseMaybeDefault(e,s);return i.type==="AssignmentPattern"&&i.typeAnnotation&&i.right.start<i.typeAnnotation.start&&this.raise(E.TypeBeforeInitializer,i.typeAnnotation),i}checkImportReflection(e){super.checkImportReflection(e),e.module&&e.importKind!=="value"&&this.raise(E.ImportReflectionHasImportType,e.specifiers[0].loc.start)}parseImportSpecifierLocal(e,s,i){s.local=Fs(e)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(s,i))}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(130)){if(!e)return!0;let s=this.lookaheadCharCode();return s===123||s===42}return!e&&this.isContextual(87)}applyImportPhase(e,s,i,n){if(super.applyImportPhase(e,s,i,n),s){if(!i&&this.match(65))return;e.exportKind=i==="type"?i:"value"}else i==="type"&&this.match(55)&&this.unexpected(),e.importKind=i==="type"||i==="typeof"?i:"value"}parseImportSpecifier(e,s,i,n,a){let o=e.imported,l=null;o.type==="Identifier"&&(o.name==="type"?l="type":o.name==="typeof"&&(l="typeof"));let c=!1;if(this.isContextual(93)&&!this.isLookaheadContextual("as")){let f=this.parseIdentifier(!0);l!==null&&!X(this.state.type)?(e.imported=f,e.importKind=l,e.local=this.cloneIdentifier(f)):(e.imported=o,e.importKind=null,e.local=this.parseIdentifier())}else{if(l!==null&&X(this.state.type))e.imported=this.parseIdentifier(!0),e.importKind=l;else{if(s)throw this.raise(p.ImportBindingIsString,e,{importName:o.value});e.imported=o,e.importKind=null}this.eatContextual(93)?e.local=this.parseIdentifier():(c=!0,e.local=this.cloneIdentifier(e.imported))}let u=Fs(e);return i&&u&&this.raise(E.ImportTypeShorthandOnlyInPureImport,e),(i||u)&&this.checkReservedType(e.local.name,e.local.loc.start,!0),c&&!i&&!u&&this.checkReservedWord(e.local.name,e.loc.start,!0,!0),this.finishImportSpecifier(e,"ImportSpecifier")}parseBindingAtom(){switch(this.state.type){case 78:return this.parseIdentifier(!0);default:return super.parseBindingAtom()}}parseFunctionParams(e,s){let i=e.kind;i!=="get"&&i!=="set"&&this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(e,s)}parseVarId(e,s){super.parseVarId(e,s),this.match(14)&&(e.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,s){if(this.match(14)){let i=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,e.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=i}return super.parseAsyncArrowFromCallExpression(e,s)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(e,s){var i;let n=null,a;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(n=this.state.clone(),a=this.tryParse(()=>super.parseMaybeAssign(e,s),n),!a.error)return a.node;let{context:c}=this.state,u=c[c.length-1];(u===C.j_oTag||u===C.j_expr)&&c.pop()}if((i=a)!=null&&i.error||this.match(47)){var o,l;n=n||this.state.clone();let c,u=this.tryParse(d=>{var m;c=this.flowParseTypeParameterDeclaration();let y=this.forwardNoArrowParamsConversionAt(c,()=>{let O=super.parseMaybeAssign(e,s);return this.resetStartLocationFromNode(O,c),O});(m=y.extra)!=null&&m.parenthesized&&d();let S=this.maybeUnwrapTypeCastExpression(y);return S.type!=="ArrowFunctionExpression"&&d(),S.typeParameters=c,this.resetStartLocationFromNode(S,c),y},n),f=null;if(u.node&&this.maybeUnwrapTypeCastExpression(u.node).type==="ArrowFunctionExpression"){if(!u.error&&!u.aborted)return u.node.async&&this.raise(E.UnexpectedTypeParameterBeforeAsyncArrowFunction,c),u.node;f=u.node}if((o=a)!=null&&o.node)return this.state=a.failState,a.node;if(f)return this.state=u.failState,f;throw(l=a)!=null&&l.thrown?a.error:u.thrown?u.error:this.raise(E.UnexpectedTokenAfterTypeParameter,c)}return super.parseMaybeAssign(e,s)}parseArrow(e){if(this.match(14)){let s=this.tryParse(()=>{let i=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;let n=this.startNode();return[n.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=i,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),n});if(s.thrown)return null;s.error&&(this.state=s.failState),e.returnType=s.node.typeAnnotation?this.finishNode(s.node,"TypeAnnotation"):null}return super.parseArrow(e)}shouldParseArrow(e){return this.match(14)||super.shouldParseArrow(e)}setArrowFunctionParameters(e,s){this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(e.start))?e.params=s:super.setArrowFunctionParameters(e,s)}checkParams(e,s,i,n=!0){if(!(i&&this.state.noArrowParamsConversionAt.includes(this.offsetToSourcePos(e.start)))){for(let a=0;a<e.params.length;a++)this.isThisParam(e.params[a])&&a>0&&this.raise(E.ThisParamMustBeFirst,e.params[a]);super.checkParams(e,s,i,n)}}parseParenAndDistinguishExpression(e){return super.parseParenAndDistinguishExpression(e&&!this.state.noArrowAt.includes(this.sourceToOffsetPos(this.state.start)))}parseSubscripts(e,s,i){if(e.type==="Identifier"&&e.name==="async"&&this.state.noArrowAt.includes(s.index)){this.next();let n=this.startNodeAt(s);n.callee=e,n.arguments=super.parseCallExpressionArguments(),e=this.finishNode(n,"CallExpression")}else if(e.type==="Identifier"&&e.name==="async"&&this.match(47)){let n=this.state.clone(),a=this.tryParse(l=>this.parseAsyncArrowWithTypeParameters(s)||l(),n);if(!a.error&&!a.aborted)return a.node;let o=this.tryParse(()=>super.parseSubscripts(e,s,i),n);if(o.node&&!o.error)return o.node;if(a.node)return this.state=a.failState,a.node;if(o.node)return this.state=o.failState,o.node;throw a.error||o.error}return super.parseSubscripts(e,s,i)}parseSubscript(e,s,i,n){if(this.match(18)&&this.isLookaheadToken_lt()){if(n.optionalChainMember=!0,i)return n.stop=!0,e;this.next();let a=this.startNodeAt(s);return a.callee=e,a.typeArguments=this.flowParseTypeParameterInstantiationInExpression(),this.expect(10),a.arguments=this.parseCallExpressionArguments(),a.optional=!0,this.finishCallExpression(a,!0)}else if(!i&&this.shouldParseTypes()&&(this.match(47)||this.match(51))){let a=this.startNodeAt(s);a.callee=e;let o=this.tryParse(()=>(a.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),a.arguments=super.parseCallExpressionArguments(),n.optionalChainMember&&(a.optional=!1),this.finishCallExpression(a,n.optionalChainMember)));if(o.node)return o.error&&(this.state=o.failState),o.node}return super.parseSubscript(e,s,i,n)}parseNewCallee(e){super.parseNewCallee(e);let s=null;this.shouldParseTypes()&&this.match(47)&&(s=this.tryParse(()=>this.flowParseTypeParameterInstantiationCallOrNew()).node),e.typeArguments=s}parseAsyncArrowWithTypeParameters(e){let s=this.startNodeAt(e);if(this.parseFunctionParams(s,!1),!!this.parseArrow(s))return super.parseArrowExpression(s,void 0,!0)}readToken_mult_modulo(e){let s=this.input.charCodeAt(this.state.pos+1);if(e===42&&s===47&&this.state.hasFlowComment){this.state.hasFlowComment=!1,this.state.pos+=2,this.nextToken();return}super.readToken_mult_modulo(e)}readToken_pipe_amp(e){let s=this.input.charCodeAt(this.state.pos+1);if(e===124&&s===125){this.finishOp(9,2);return}super.readToken_pipe_amp(e)}parseTopLevel(e,s){let i=super.parseTopLevel(e,s);return this.state.hasFlowComment&&this.raise(E.UnterminatedFlowComment,this.state.curPosition()),i}skipBlockComment(){if(this.hasPlugin("flowComments")&&this.skipFlowComment()){if(this.state.hasFlowComment)throw this.raise(E.NestedFlowComment,this.state.startLoc);this.hasFlowCommentCompletion();let e=this.skipFlowComment();e&&(this.state.pos+=e,this.state.hasFlowComment=!0);return}return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/")}skipFlowComment(){let{pos:e}=this.state,s=2;for(;[32,9].includes(this.input.charCodeAt(e+s));)s++;let i=this.input.charCodeAt(s+e),n=this.input.charCodeAt(s+e+1);return i===58&&n===58?s+2:this.input.slice(s+e,s+e+12)==="flow-include"?s+12:i===58&&n!==58?s:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(p.UnterminatedComment,this.state.curPosition())}flowEnumErrorBooleanMemberNotInitialized(e,{enumName:s,memberName:i}){this.raise(E.EnumBooleanMemberNotInitialized,e,{memberName:i,enumName:s})}flowEnumErrorInvalidMemberInitializer(e,s){return this.raise(s.explicitType?s.explicitType==="symbol"?E.EnumInvalidMemberInitializerSymbolType:E.EnumInvalidMemberInitializerPrimaryType:E.EnumInvalidMemberInitializerUnknownType,e,s)}flowEnumErrorNumberMemberNotInitialized(e,s){this.raise(E.EnumNumberMemberNotInitialized,e,s)}flowEnumErrorStringMemberInconsistentlyInitialized(e,s){this.raise(E.EnumStringMemberInconsistentlyInitialized,e,s)}flowEnumMemberInit(){let e=this.state.startLoc,s=h(()=>this.match(12)||this.match(8),"endOfInit");switch(this.state.type){case 135:{let i=this.parseNumericLiteral(this.state.value);return s()?{type:"number",loc:i.loc.start,value:i}:{type:"invalid",loc:e}}case 134:{let i=this.parseStringLiteral(this.state.value);return s()?{type:"string",loc:i.loc.start,value:i}:{type:"invalid",loc:e}}case 85:case 86:{let i=this.parseBooleanLiteral(this.match(85));return s()?{type:"boolean",loc:i.loc.start,value:i}:{type:"invalid",loc:e}}default:return{type:"invalid",loc:e}}}flowEnumMemberRaw(){let e=this.state.startLoc,s=this.parseIdentifier(!0),i=this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:e};return{id:s,init:i}}flowEnumCheckExplicitTypeMismatch(e,s,i){let{explicitType:n}=s;n!==null&&n!==i&&this.flowEnumErrorInvalidMemberInitializer(e,s)}flowEnumMembers({enumName:e,explicitType:s}){let i=new Set,n={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},a=!1;for(;!this.match(8);){if(this.eat(21)){a=!0;break}let o=this.startNode(),{id:l,init:c}=this.flowEnumMemberRaw(),u=l.name;if(u==="")continue;/^[a-z]/.test(u)&&this.raise(E.EnumInvalidMemberName,l,{memberName:u,suggestion:u[0].toUpperCase()+u.slice(1),enumName:e}),i.has(u)&&this.raise(E.EnumDuplicateMemberName,l,{memberName:u,enumName:e}),i.add(u);let f={enumName:e,explicitType:s,memberName:u};switch(o.id=l,c.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(c.loc,f,"boolean"),o.init=c.value,n.booleanMembers.push(this.finishNode(o,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(c.loc,f,"number"),o.init=c.value,n.numberMembers.push(this.finishNode(o,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(c.loc,f,"string"),o.init=c.value,n.stringMembers.push(this.finishNode(o,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(c.loc,f);case"none":switch(s){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(c.loc,f);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(c.loc,f);break;default:n.defaultedMembers.push(this.finishNode(o,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:n,hasUnknownMembers:a}}flowEnumStringMembers(e,s,{enumName:i}){if(e.length===0)return s;if(s.length===0)return e;if(s.length>e.length){for(let n of e)this.flowEnumErrorStringMemberInconsistentlyInitialized(n,{enumName:i});return s}else{for(let n of s)this.flowEnumErrorStringMemberInconsistentlyInitialized(n,{enumName:i});return e}}flowEnumParseExplicitType({enumName:e}){if(!this.eatContextual(102))return null;if(!k(this.state.type))throw this.raise(E.EnumInvalidExplicitTypeUnknownSupplied,this.state.startLoc,{enumName:e});let{value:s}=this.state;return this.next(),s!=="boolean"&&s!=="number"&&s!=="string"&&s!=="symbol"&&this.raise(E.EnumInvalidExplicitType,this.state.startLoc,{enumName:e,invalidEnumType:s}),s}flowEnumBody(e,s){let i=s.name,n=s.loc.start,a=this.flowEnumParseExplicitType({enumName:i});this.expect(5);let{members:o,hasUnknownMembers:l}=this.flowEnumMembers({enumName:i,explicitType:a});switch(e.hasUnknownMembers=l,a){case"boolean":return e.explicitType=!0,e.members=o.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody");case"number":return e.explicitType=!0,e.members=o.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody");case"string":return e.explicitType=!0,e.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:i}),this.expect(8),this.finishNode(e,"EnumStringBody");case"symbol":return e.members=o.defaultedMembers,this.expect(8),this.finishNode(e,"EnumSymbolBody");default:{let c=h(()=>(e.members=[],this.expect(8),this.finishNode(e,"EnumStringBody")),"empty");e.explicitType=!1;let u=o.booleanMembers.length,f=o.numberMembers.length,d=o.stringMembers.length,m=o.defaultedMembers.length;if(!u&&!f&&!d&&!m)return c();if(!u&&!f)return e.members=this.flowEnumStringMembers(o.stringMembers,o.defaultedMembers,{enumName:i}),this.expect(8),this.finishNode(e,"EnumStringBody");if(!f&&!d&&u>=m){for(let y of o.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(y.loc.start,{enumName:i,memberName:y.id.name});return e.members=o.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody")}else if(!u&&!d&&f>=m){for(let y of o.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(y.loc.start,{enumName:i,memberName:y.id.name});return e.members=o.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody")}else return this.raise(E.EnumInconsistentMemberValues,n,{enumName:i}),c()}}}flowParseEnumDeclaration(e){let s=this.parseIdentifier();return e.id=s,e.body=this.flowEnumBody(this.startNode(),s),this.finishNode(e,"EnumDeclaration")}jsxParseOpeningElementAfterName(e){return this.shouldParseTypes()&&(this.match(47)||this.match(51))&&(e.typeArguments=this.flowParseTypeParameterInstantiationInExpression()),super.jsxParseOpeningElementAfterName(e)}isLookaheadToken_lt(){let e=this.nextTokenStart();if(this.input.charCodeAt(e)===60){let s=this.input.charCodeAt(e+1);return s!==60&&s!==61}return!1}reScan_lt_gt(){let{type:e}=this.state;e===47?(this.state.pos-=1,this.readToken_lt()):e===48&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){let{type:e}=this.state;return e===51?(this.state.pos-=2,this.finishOp(47,1),47):e}maybeUnwrapTypeCastExpression(e){return e.type==="TypeCastExpression"?e.expression:e}},"flow"),qr={__proto__:null,quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:"\xA0",iexcl:"\xA1",cent:"\xA2",pound:"\xA3",curren:"\xA4",yen:"\xA5",brvbar:"\xA6",sect:"\xA7",uml:"\xA8",copy:"\xA9",ordf:"\xAA",laquo:"\xAB",not:"\xAC",shy:"\xAD",reg:"\xAE",macr:"\xAF",deg:"\xB0",plusmn:"\xB1",sup2:"\xB2",sup3:"\xB3",acute:"\xB4",micro:"\xB5",para:"\xB6",middot:"\xB7",cedil:"\xB8",sup1:"\xB9",ordm:"\xBA",raquo:"\xBB",frac14:"\xBC",frac12:"\xBD",frac34:"\xBE",iquest:"\xBF",Agrave:"\xC0",Aacute:"\xC1",Acirc:"\xC2",Atilde:"\xC3",Auml:"\xC4",Aring:"\xC5",AElig:"\xC6",Ccedil:"\xC7",Egrave:"\xC8",Eacute:"\xC9",Ecirc:"\xCA",Euml:"\xCB",Igrave:"\xCC",Iacute:"\xCD",Icirc:"\xCE",Iuml:"\xCF",ETH:"\xD0",Ntilde:"\xD1",Ograve:"\xD2",Oacute:"\xD3",Ocirc:"\xD4",Otilde:"\xD5",Ouml:"\xD6",times:"\xD7",Oslash:"\xD8",Ugrave:"\xD9",Uacute:"\xDA",Ucirc:"\xDB",Uuml:"\xDC",Yacute:"\xDD",THORN:"\xDE",szlig:"\xDF",agrave:"\xE0",aacute:"\xE1",acirc:"\xE2",atilde:"\xE3",auml:"\xE4",aring:"\xE5",aelig:"\xE6",ccedil:"\xE7",egrave:"\xE8",eacute:"\xE9",ecirc:"\xEA",euml:"\xEB",igrave:"\xEC",iacute:"\xED",icirc:"\xEE",iuml:"\xEF",eth:"\xF0",ntilde:"\xF1",ograve:"\xF2",oacute:"\xF3",ocirc:"\xF4",otilde:"\xF5",ouml:"\xF6",divide:"\xF7",oslash:"\xF8",ugrave:"\xF9",uacute:"\xFA",ucirc:"\xFB",uuml:"\xFC",yacute:"\xFD",thorn:"\xFE",yuml:"\xFF",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02C6",tilde:"\u02DC",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039A",Lambda:"\u039B",Mu:"\u039C",Nu:"\u039D",Xi:"\u039E",Omicron:"\u039F",Pi:"\u03A0",Rho:"\u03A1",Sigma:"\u03A3",Tau:"\u03A4",Upsilon:"\u03A5",Phi:"\u03A6",Chi:"\u03A7",Psi:"\u03A8",Omega:"\u03A9",alpha:"\u03B1",beta:"\u03B2",gamma:"\u03B3",delta:"\u03B4",epsilon:"\u03B5",zeta:"\u03B6",eta:"\u03B7",theta:"\u03B8",iota:"\u03B9",kappa:"\u03BA",lambda:"\u03BB",mu:"\u03BC",nu:"\u03BD",xi:"\u03BE",omicron:"\u03BF",pi:"\u03C0",rho:"\u03C1",sigmaf:"\u03C2",sigma:"\u03C3",tau:"\u03C4",upsilon:"\u03C5",phi:"\u03C6",chi:"\u03C7",psi:"\u03C8",omega:"\u03C9",thetasym:"\u03D1",upsih:"\u03D2",piv:"\u03D6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200C",zwj:"\u200D",lrm:"\u200E",rlm:"\u200F",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201A",ldquo:"\u201C",rdquo:"\u201D",bdquo:"\u201E",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203A",oline:"\u203E",frasl:"\u2044",euro:"\u20AC",image:"\u2111",weierp:"\u2118",real:"\u211C",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21B5",lArr:"\u21D0",uArr:"\u21D1",rArr:"\u21D2",dArr:"\u21D3",hArr:"\u21D4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220B",prod:"\u220F",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221A",prop:"\u221D",infin:"\u221E",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222A",int:"\u222B",there4:"\u2234",sim:"\u223C",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22A5",sdot:"\u22C5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230A",rfloor:"\u230B",lang:"\u2329",rang:"\u232A",loz:"\u25CA",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666"},zr=/\r\n|[\r\n\u2028\u2029]/,Ue=new RegExp(zr.source,"g");function ye(r){switch(r){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}h(ye,"isNewLine");function Bs(r,t,e){for(let s=t;s<e;s++)if(ye(r.charCodeAt(s)))return!0;return!1}h(Bs,"hasNewLine");var at=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,ot=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;function Kr(r){switch(r){case 9:case 11:case 12:case 32:case 160:case 5760:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8239:case 8287:case 12288:case 65279:return!0;default:return!1}}h(Kr,"isWhitespace");var ce=K`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:h(({openingTagName:r})=>`Expected corresponding JSX closing tag for <${r}>.`,"MissingClosingTagElement"),MissingClosingTagFragment:"Expected corresponding JSX closing tag for <>.",UnexpectedSequenceExpression:"Sequence expressions cannot be directly nested inside JSX. Did you mean to wrap it in parentheses (...)?",UnexpectedToken:h(({unexpected:r,HTMLEntity:t})=>`Unexpected token \`${r}\`. Did you mean \`${t}\` or \`{'${r}'}\`?`,"UnexpectedToken"),UnsupportedJsxValue:"JSX value should be either an expression or a quoted JSX text.",UnterminatedJsxContent:"Unterminated JSX contents.",UnwrappedAdjacentJSXElements:"Adjacent JSX elements must be wrapped in an enclosing tag. Did you want a JSX fragment <>...</>?"});function ne(r){return r?r.type==="JSXOpeningFragment"||r.type==="JSXClosingFragment":!1}h(ne,"isFragment");function me(r){if(r.type==="JSXIdentifier")return r.name;if(r.type==="JSXNamespacedName")return r.namespace.name+":"+r.name.name;if(r.type==="JSXMemberExpression")return me(r.object)+"."+me(r.property);throw new Error("Node had unexpected type: "+r.type)}h(me,"getQualifiedJSXName");var Wr=h(r=>class extends r{static{h(this,"JSXParserMixin")}jsxReadToken(){let e="",s=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(ce.UnterminatedJsxContent,this.state.startLoc);let i=this.input.charCodeAt(this.state.pos);switch(i){case 60:case 123:if(this.state.pos===this.state.start){i===60&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(143)):super.getTokenFromCode(i);return}e+=this.input.slice(s,this.state.pos),this.finishToken(142,e);return;case 38:e+=this.input.slice(s,this.state.pos),e+=this.jsxReadEntity(),s=this.state.pos;break;case 62:case 125:default:ye(i)?(e+=this.input.slice(s,this.state.pos),e+=this.jsxReadNewLine(!0),s=this.state.pos):++this.state.pos}}}jsxReadNewLine(e){let s=this.input.charCodeAt(this.state.pos),i;return++this.state.pos,s===13&&this.input.charCodeAt(this.state.pos)===10?(++this.state.pos,i=e?`
4
- `:`\r
5
- `):i=String.fromCharCode(s),++this.state.curLine,this.state.lineStart=this.state.pos,i}jsxReadString(e){let s="",i=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(p.UnterminatedString,this.state.startLoc);let n=this.input.charCodeAt(this.state.pos);if(n===e)break;n===38?(s+=this.input.slice(i,this.state.pos),s+=this.jsxReadEntity(),i=this.state.pos):ye(n)?(s+=this.input.slice(i,this.state.pos),s+=this.jsxReadNewLine(!1),i=this.state.pos):++this.state.pos}s+=this.input.slice(i,this.state.pos++),this.finishToken(134,s)}jsxReadEntity(){let e=++this.state.pos;if(this.codePointAtPos(this.state.pos)===35){++this.state.pos;let s=10;this.codePointAtPos(this.state.pos)===120&&(s=16,++this.state.pos);let i=this.readInt(s,void 0,!1,"bail");if(i!==null&&this.codePointAtPos(this.state.pos)===59)return++this.state.pos,String.fromCodePoint(i)}else{let s=0,i=!1;for(;s++<10&&this.state.pos<this.length&&!(i=this.codePointAtPos(this.state.pos)===59);)++this.state.pos;if(i){let n=this.input.slice(e,this.state.pos),a=qr[n];if(++this.state.pos,a)return a}}return this.state.pos=e,"&"}jsxReadWord(){let e,s=this.state.pos;do e=this.input.charCodeAt(++this.state.pos);while(ue(e)||e===45);this.finishToken(141,this.input.slice(s,this.state.pos))}jsxParseIdentifier(){let e=this.startNode();return this.match(141)?e.name=this.state.value:Bt(this.state.type)?e.name=ae(this.state.type):this.unexpected(),this.next(),this.finishNode(e,"JSXIdentifier")}jsxParseNamespacedName(){let e=this.state.startLoc,s=this.jsxParseIdentifier();if(!this.eat(14))return s;let i=this.startNodeAt(e);return i.namespace=s,i.name=this.jsxParseIdentifier(),this.finishNode(i,"JSXNamespacedName")}jsxParseElementName(){let e=this.state.startLoc,s=this.jsxParseNamespacedName();if(s.type==="JSXNamespacedName")return s;for(;this.eat(16);){let i=this.startNodeAt(e);i.object=s,i.property=this.jsxParseIdentifier(),s=this.finishNode(i,"JSXMemberExpression")}return s}jsxParseAttributeValue(){let e;switch(this.state.type){case 5:return e=this.startNode(),this.setContext(C.brace),this.next(),e=this.jsxParseExpressionContainer(e,C.j_oTag),e.expression.type==="JSXEmptyExpression"&&this.raise(ce.AttributeIsEmpty,e),e;case 143:case 134:return this.parseExprAtom();default:throw this.raise(ce.UnsupportedJsxValue,this.state.startLoc)}}jsxParseEmptyExpression(){let e=this.startNodeAt(this.state.lastTokEndLoc);return this.finishNodeAt(e,"JSXEmptyExpression",this.state.startLoc)}jsxParseSpreadChild(e){return this.next(),e.expression=this.parseExpression(),this.setContext(C.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadChild")}jsxParseExpressionContainer(e,s){if(this.match(8))e.expression=this.jsxParseEmptyExpression();else{let i=this.parseExpression();e.expression=i}return this.setContext(s),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXExpressionContainer")}jsxParseAttribute(){let e=this.startNode();return this.match(5)?(this.setContext(C.brace),this.next(),this.expect(21),e.argument=this.parseMaybeAssignAllowIn(),this.setContext(C.j_oTag),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadAttribute")):(e.name=this.jsxParseNamespacedName(),e.value=this.eat(29)?this.jsxParseAttributeValue():null,this.finishNode(e,"JSXAttribute"))}jsxParseOpeningElementAt(e){let s=this.startNodeAt(e);return this.eat(144)?this.finishNode(s,"JSXOpeningFragment"):(s.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(s))}jsxParseOpeningElementAfterName(e){let s=[];for(;!this.match(56)&&!this.match(144);)s.push(this.jsxParseAttribute());return e.attributes=s,e.selfClosing=this.eat(56),this.expect(144),this.finishNode(e,"JSXOpeningElement")}jsxParseClosingElementAt(e){let s=this.startNodeAt(e);return this.eat(144)?this.finishNode(s,"JSXClosingFragment"):(s.name=this.jsxParseElementName(),this.expect(144),this.finishNode(s,"JSXClosingElement"))}jsxParseElementAt(e){let s=this.startNodeAt(e),i=[],n=this.jsxParseOpeningElementAt(e),a=null;if(!n.selfClosing){e:for(;;)switch(this.state.type){case 143:if(e=this.state.startLoc,this.next(),this.eat(56)){a=this.jsxParseClosingElementAt(e);break e}i.push(this.jsxParseElementAt(e));break;case 142:i.push(this.parseLiteral(this.state.value,"JSXText"));break;case 5:{let o=this.startNode();this.setContext(C.brace),this.next(),this.match(21)?i.push(this.jsxParseSpreadChild(o)):i.push(this.jsxParseExpressionContainer(o,C.j_expr));break}default:this.unexpected()}ne(n)&&!ne(a)&&a!==null?this.raise(ce.MissingClosingTagFragment,a):!ne(n)&&ne(a)?this.raise(ce.MissingClosingTagElement,a,{openingTagName:me(n.name)}):!ne(n)&&!ne(a)&&me(a.name)!==me(n.name)&&this.raise(ce.MissingClosingTagElement,a,{openingTagName:me(n.name)})}if(ne(n)?(s.openingFragment=n,s.closingFragment=a):(s.openingElement=n,s.closingElement=a),s.children=i,this.match(47))throw this.raise(ce.UnwrappedAdjacentJSXElements,this.state.startLoc);return ne(n)?this.finishNode(s,"JSXFragment"):this.finishNode(s,"JSXElement")}jsxParseElement(){let e=this.state.startLoc;return this.next(),this.jsxParseElementAt(e)}setContext(e){let{context:s}=this.state;s[s.length-1]=e}parseExprAtom(e){return this.match(143)?this.jsxParseElement():this.match(47)&&this.input.charCodeAt(this.state.pos)!==33?(this.replaceToken(143),this.jsxParseElement()):super.parseExprAtom(e)}skipSpace(){this.curContext().preserveSpace||super.skipSpace()}getTokenFromCode(e){let s=this.curContext();if(s===C.j_expr){this.jsxReadToken();return}if(s===C.j_oTag||s===C.j_cTag){if(W(e)){this.jsxReadWord();return}if(e===62){++this.state.pos,this.finishToken(144);return}if((e===34||e===39)&&s===C.j_oTag){this.jsxReadString(e);return}}if(e===60&&this.state.canStartJSXElement&&this.input.charCodeAt(this.state.pos+1)!==33){++this.state.pos,this.finishToken(143);return}super.getTokenFromCode(e)}updateContext(e){let{context:s,type:i}=this.state;if(i===56&&e===143)s.splice(-2,2,C.j_cTag),this.state.canStartJSXElement=!1;else if(i===143)s.push(C.j_oTag);else if(i===144){let n=s[s.length-1];n===C.j_oTag&&e===56||n===C.j_cTag?(s.pop(),this.state.canStartJSXElement=s[s.length-1]===C.j_expr):(this.setContext(C.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=Er(i)}},"jsx"),dt=class extends Oe{static{h(this,"TypeScriptScope")}constructor(...t){super(...t),this.tsNames=new Map}},mt=class extends _e{static{h(this,"TypeScriptScopeHandler")}constructor(...t){super(...t),this.importsStack=[]}createScope(t){return this.importsStack.push(new Set),new dt(t)}enter(t){t===1024&&this.importsStack.push(new Set),super.enter(t)}exit(){let t=super.exit();return t===1024&&this.importsStack.pop(),t}hasImport(t,e){let s=this.importsStack.length;if(this.importsStack[s-1].has(t))return!0;if(!e&&s>1){for(let i=0;i<s-1;i++)if(this.importsStack[i].has(t))return!0}return!1}declareName(t,e,s){if(e&4096){this.hasImport(t,!0)&&this.parser.raise(p.VarRedeclaration,s,{identifierName:t}),this.importsStack[this.importsStack.length-1].add(t);return}let i=this.currentScope(),n=i.tsNames.get(t)||0;if(e&1024){this.maybeExportDefined(i,t),i.tsNames.set(t,n|16);return}super.declareName(t,e,s),e&2&&(e&1||(this.checkRedeclarationInScope(i,t,e,s),this.maybeExportDefined(i,t)),n=n|1),e&256&&(n=n|2),e&512&&(n=n|4),e&128&&(n=n|8),n&&i.tsNames.set(t,n)}isRedeclaredInScope(t,e,s){let i=t.tsNames.get(e);if((i&2)>0){if(s&256){let n=!!(s&512),a=(i&4)>0;return n!==a}return!0}return s&128&&(i&8)>0?t.names.get(e)&2?!!(s&1):!1:s&2&&(i&1)>0?!0:super.isRedeclaredInScope(t,e,s)}checkLocalExport(t){let{name:e}=t;if(this.hasImport(e))return;let s=this.scopeStack.length;for(let i=s-1;i>=0;i--){let a=this.scopeStack[i].tsNames.get(e);if((a&1)>0||(a&16)>0)return}super.checkLocalExport(t)}},yt=class{static{h(this,"ProductionParameterHandler")}constructor(){this.stacks=[]}enter(t){this.stacks.push(t)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(this.currentFlags()&2)>0}get hasYield(){return(this.currentFlags()&1)>0}get hasReturn(){return(this.currentFlags()&4)>0}get hasIn(){return(this.currentFlags()&8)>0}};function Xe(r,t){return(r?2:0)|(t?1:0)}h(Xe,"functionFlags");var gt=class{static{h(this,"BaseParser")}constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}sourceToOffsetPos(t){return t+this.startIndex}offsetToSourcePos(t){return t-this.startIndex}hasPlugin(t){if(typeof t=="string")return this.plugins.has(t);{let[e,s]=t;if(!this.hasPlugin(e))return!1;let i=this.plugins.get(e);for(let n of Object.keys(s))if(i?.[n]!==s[n])return!1;return!0}}getPluginOption(t,e){var s;return(s=this.plugins.get(t))==null?void 0:s[e]}};function ei(r,t){r.trailingComments===void 0?r.trailingComments=t:r.trailingComments.unshift(...t)}h(ei,"setTrailingComments");function Gr(r,t){r.leadingComments===void 0?r.leadingComments=t:r.leadingComments.unshift(...t)}h(Gr,"setLeadingComments");function Le(r,t){r.innerComments===void 0?r.innerComments=t:r.innerComments.unshift(...t)}h(Le,"setInnerComments");function H(r,t,e){let s=null,i=t.length;for(;s===null&&i>0;)s=t[--i];s===null||s.start>e.start?Le(r,e.comments):ei(s,e.comments)}h(H,"adjustInnerComments");var xt=class extends gt{static{h(this,"CommentsParser")}addComment(t){this.filename&&(t.loc.filename=this.filename);let{commentsLen:e}=this.state;this.comments.length!==e&&(this.comments.length=e),this.comments.push(t),this.state.commentsLen++}processComment(t){let{commentStack:e}=this.state,s=e.length;if(s===0)return;let i=s-1,n=e[i];n.start===t.end&&(n.leadingNode=t,i--);let{start:a}=t;for(;i>=0;i--){let o=e[i],l=o.end;if(l>a)o.containingNode=t,this.finalizeComment(o),e.splice(i,1);else{l===a&&(o.trailingNode=t);break}}}finalizeComment(t){var e;let{comments:s}=t;if(t.leadingNode!==null||t.trailingNode!==null)t.leadingNode!==null&&ei(t.leadingNode,s),t.trailingNode!==null&&Gr(t.trailingNode,s);else{let i=t.containingNode,n=t.start;if(this.input.charCodeAt(this.offsetToSourcePos(n)-1)===44)switch(i.type){case"ObjectExpression":case"ObjectPattern":H(i,i.properties,t);break;case"CallExpression":case"NewExpression":case"OptionalCallExpression":H(i,i.arguments,t);break;case"ImportExpression":H(i,[i.source,(e=i.options)!=null?e:null],t);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":case"TSTypeParameterDeclaration":H(i,i.params,t);break;case"ArrayExpression":case"ArrayPattern":H(i,i.elements,t);break;case"ExportNamedDeclaration":case"ImportDeclaration":H(i,i.specifiers,t);break;case"TSEnumDeclaration":H(i,i.members,t);break;case"TSEnumBody":H(i,i.members,t);break;case"TSInterfaceBody":H(i,i.body,t);break;default:{if(i.type==="RecordExpression"){H(i,i.properties,t);break}if(i.type==="TupleExpression"){H(i,i.elements,t);break}Le(i,s)}}else Le(i,s)}}finalizeRemainingComments(){let{commentStack:t}=this.state;for(let e=t.length-1;e>=0;e--)this.finalizeComment(t[e]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(t){let{commentStack:e}=this.state,{length:s}=e;if(s===0)return;let i=e[s-1];i.leadingNode===t&&(i.leadingNode=null)}takeSurroundingComments(t,e,s){let{commentStack:i}=this.state,n=i.length;if(n===0)return;let a=n-1;for(;a>=0;a--){let o=i[a],l=o.end;if(o.start===s)o.leadingNode=t;else if(l===e)o.trailingNode=t;else if(l<e)break}}},Tt=class r{static{h(this,"State")}constructor(){this.flags=1024,this.startIndex=void 0,this.curLine=void 0,this.lineStart=void 0,this.startLoc=void 0,this.endLoc=void 0,this.errors=[],this.potentialArrowAt=-1,this.noArrowAt=[],this.noArrowParamsConversionAt=[],this.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null},this.labels=[],this.commentsLen=0,this.commentStack=[],this.pos=0,this.type=140,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.context=[C.brace],this.firstInvalidTemplateEscapePos=null,this.strictErrors=new Map,this.tokensLength=0}get strict(){return(this.flags&1)>0}set strict(t){t?this.flags|=1:this.flags&=-2}init({strictMode:t,sourceType:e,startIndex:s,startLine:i,startColumn:n}){this.strict=t===!1?!1:t===!0?!0:e==="module",this.startIndex=s,this.curLine=i,this.lineStart=-n,this.startLoc=this.endLoc=new G(i,n,s)}get maybeInArrowParameters(){return(this.flags&2)>0}set maybeInArrowParameters(t){t?this.flags|=2:this.flags&=-3}get inType(){return(this.flags&4)>0}set inType(t){t?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(this.flags&8)>0}set noAnonFunctionType(t){t?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(this.flags&16)>0}set hasFlowComment(t){t?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(this.flags&32)>0}set isAmbientContext(t){t?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(this.flags&64)>0}set inAbstractClass(t){t?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(this.flags&128)>0}set inDisallowConditionalTypesContext(t){t?this.flags|=128:this.flags&=-129}get soloAwait(){return(this.flags&256)>0}set soloAwait(t){t?this.flags|=256:this.flags&=-257}get inFSharpPipelineDirectBody(){return(this.flags&512)>0}set inFSharpPipelineDirectBody(t){t?this.flags|=512:this.flags&=-513}get canStartJSXElement(){return(this.flags&1024)>0}set canStartJSXElement(t){t?this.flags|=1024:this.flags&=-1025}get containsEsc(){return(this.flags&2048)>0}set containsEsc(t){t?this.flags|=2048:this.flags&=-2049}get hasTopLevelAwait(){return(this.flags&4096)>0}set hasTopLevelAwait(t){t?this.flags|=4096:this.flags&=-4097}curPosition(){return new G(this.curLine,this.pos-this.lineStart,this.pos+this.startIndex)}clone(){let t=new r;return t.flags=this.flags,t.startIndex=this.startIndex,t.curLine=this.curLine,t.lineStart=this.lineStart,t.startLoc=this.startLoc,t.endLoc=this.endLoc,t.errors=this.errors.slice(),t.potentialArrowAt=this.potentialArrowAt,t.noArrowAt=this.noArrowAt.slice(),t.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),t.topicContext=this.topicContext,t.labels=this.labels.slice(),t.commentsLen=this.commentsLen,t.commentStack=this.commentStack.slice(),t.pos=this.pos,t.type=this.type,t.value=this.value,t.start=this.start,t.end=this.end,t.lastTokEndLoc=this.lastTokEndLoc,t.lastTokStartLoc=this.lastTokStartLoc,t.context=this.context.slice(),t.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,t.strictErrors=this.strictErrors,t.tokensLength=this.tokensLength,t}},Jr=h(function(t){return t>=48&&t<=57},"isDigit"),Vs={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},je={bin:h(r=>r===48||r===49,"bin"),oct:h(r=>r>=48&&r<=55,"oct"),dec:h(r=>r>=48&&r<=57,"dec"),hex:h(r=>r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102,"hex")};function Us(r,t,e,s,i,n){let a=e,o=s,l=i,c="",u=null,f=e,{length:d}=t;for(;;){if(e>=d){n.unterminated(a,o,l),c+=t.slice(f,e);break}let m=t.charCodeAt(e);if(Yr(r,m,t,e)){c+=t.slice(f,e);break}if(m===92){c+=t.slice(f,e);let y=Qr(t,e,s,i,r==="template",n);y.ch===null&&!u?u={pos:e,lineStart:s,curLine:i}:c+=y.ch,{pos:e,lineStart:s,curLine:i}=y,f=e}else m===8232||m===8233?(++e,++i,s=e):m===10||m===13?r==="template"?(c+=t.slice(f,e)+`
6
- `,++e,m===13&&t.charCodeAt(e)===10&&++e,++i,f=s=e):n.unterminated(a,o,l):++e}return{pos:e,str:c,firstInvalidLoc:u,lineStart:s,curLine:i,containsInvalid:!!u}}h(Us,"readStringContents");function Yr(r,t,e,s){return r==="template"?t===96||t===36&&e.charCodeAt(s+1)===123:t===(r==="double"?34:39)}h(Yr,"isStringEnd");function Qr(r,t,e,s,i,n){let a=!i;t++;let o=h(c=>({pos:t,ch:c,lineStart:e,curLine:s}),"res"),l=r.charCodeAt(t++);switch(l){case 110:return o(`
7
- `);case 114:return o("\r");case 120:{let c;return{code:c,pos:t}=Et(r,t,e,s,2,!1,a,n),o(c===null?null:String.fromCharCode(c))}case 117:{let c;return{code:c,pos:t}=si(r,t,e,s,a,n),o(c===null?null:String.fromCodePoint(c))}case 116:return o(" ");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:r.charCodeAt(t)===10&&++t;case 10:e=t,++s;case 8232:case 8233:return o("");case 56:case 57:if(i)return o(null);n.strictNumericEscape(t-1,e,s);default:if(l>=48&&l<=55){let c=t-1,f=/^[0-7]+/.exec(r.slice(c,t+2))[0],d=parseInt(f,8);d>255&&(f=f.slice(0,-1),d=parseInt(f,8)),t+=f.length-1;let m=r.charCodeAt(t);if(f!=="0"||m===56||m===57){if(i)return o(null);n.strictNumericEscape(c,e,s)}return o(String.fromCharCode(d))}return o(String.fromCharCode(l))}}h(Qr,"readEscapedChar");function Et(r,t,e,s,i,n,a,o){let l=t,c;return{n:c,pos:t}=ti(r,t,e,s,16,i,n,!1,o,!a),c===null&&(a?o.invalidEscapeSequence(l,e,s):t=l-1),{code:c,pos:t}}h(Et,"readHexChar");function ti(r,t,e,s,i,n,a,o,l,c){let u=t,f=i===16?Vs.hex:Vs.decBinOct,d=i===16?je.hex:i===10?je.dec:i===8?je.oct:je.bin,m=!1,y=0;for(let S=0,O=n??1/0;S<O;++S){let P=r.charCodeAt(t),v;if(P===95&&o!=="bail"){let se=r.charCodeAt(t-1),ie=r.charCodeAt(t+1);if(o){if(Number.isNaN(ie)||!d(ie)||f.has(se)||f.has(ie)){if(c)return{n:null,pos:t};l.unexpectedNumericSeparator(t,e,s)}}else{if(c)return{n:null,pos:t};l.numericSeparatorInEscapeSequence(t,e,s)}++t;continue}if(P>=97?v=P-97+10:P>=65?v=P-65+10:Jr(P)?v=P-48:v=1/0,v>=i){if(v<=9&&c)return{n:null,pos:t};if(v<=9&&l.invalidDigit(t,e,s,i))v=0;else if(a)v=0,m=!0;else break}++t,y=y*i+v}return t===u||n!=null&&t-u!==n||m?{n:null,pos:t}:{n:y,pos:t}}h(ti,"readInt");function si(r,t,e,s,i,n){let a=r.charCodeAt(t),o;if(a===123){if(++t,{code:o,pos:t}=Et(r,t,e,s,r.indexOf("}",t)-t,!0,i,n),++t,o!==null&&o>1114111)if(i)n.invalidCodePoint(t,e,s);else return{code:null,pos:t}}else({code:o,pos:t}=Et(r,t,e,s,4,!1,i,n));return{code:o,pos:t}}h(si,"readCodePoint");function Ce(r,t,e){return new G(e,r-t,r)}h(Ce,"buildPosition");var Zr=new Set([103,109,115,105,121,117,100,118]),z=class{static{h(this,"Token")}constructor(t){let e=t.startIndex||0;this.type=t.type,this.value=t.value,this.start=e+t.start,this.end=e+t.end,this.loc=new xe(t.startLoc,t.endLoc)}},Pt=class extends xt{static{h(this,"Tokenizer")}constructor(t,e){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:h((s,i,n,a)=>this.optionFlags&2048?(this.raise(p.InvalidDigit,Ce(s,i,n),{radix:a}),!0):!1,"invalidDigit"),numericSeparatorInEscapeSequence:this.errorBuilder(p.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(p.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(p.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(p.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:h((s,i,n)=>{this.recordStrictModeErrors(p.StrictNumericEscape,Ce(s,i,n))},"strictNumericEscape"),unterminated:h((s,i,n)=>{throw this.raise(p.UnterminatedString,Ce(s-1,i,n))},"unterminated")}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(p.StrictNumericEscape),unterminated:h((s,i,n)=>{throw this.raise(p.UnterminatedTemplate,Ce(s,i,n))},"unterminated")}),this.state=new Tt,this.state.init(t),this.input=e,this.length=e.length,this.comments=[],this.isLookahead=!1}pushToken(t){this.tokens.length=this.state.tokensLength,this.tokens.push(t),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.optionFlags&256&&this.pushToken(new z(this.state)),this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(t){return this.match(t)?(this.next(),!0):!1}match(t){return this.state.type===t}createLookaheadState(t){return{pos:t.pos,value:null,type:t.type,start:t.start,end:t.end,context:[this.curContext()],inType:t.inType,startLoc:t.startLoc,lastTokEndLoc:t.lastTokEndLoc,curLine:t.curLine,lineStart:t.lineStart,curPosition:t.curPosition}}lookahead(){let t=this.state;this.state=this.createLookaheadState(t),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;let e=this.state;return this.state=t,e}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(t){return at.lastIndex=t,at.test(this.input)?at.lastIndex:t}lookaheadCharCode(){return this.lookaheadCharCodeSince(this.state.pos)}lookaheadCharCodeSince(t){return this.input.charCodeAt(this.nextTokenStartSince(t))}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(t){return ot.lastIndex=t,ot.test(this.input)?ot.lastIndex:t}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(t){let e=this.input.charCodeAt(t);if((e&64512)===55296&&++t<this.input.length){let s=this.input.charCodeAt(t);(s&64512)===56320&&(e=65536+((e&1023)<<10)+(s&1023))}return e}setStrict(t){this.state.strict=t,t&&(this.state.strictErrors.forEach(([e,s])=>this.raise(e,s)),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){if(this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length){this.finishToken(140);return}this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(t){let e;this.isLookahead||(e=this.state.curPosition());let s=this.state.pos,i=this.input.indexOf(t,s+2);if(i===-1)throw this.raise(p.UnterminatedComment,this.state.curPosition());for(this.state.pos=i+t.length,Ue.lastIndex=s+2;Ue.test(this.input)&&Ue.lastIndex<=i;)++this.state.curLine,this.state.lineStart=Ue.lastIndex;if(this.isLookahead)return;let n={type:"CommentBlock",value:this.input.slice(s+2,i),start:this.sourceToOffsetPos(s),end:this.sourceToOffsetPos(i+t.length),loc:new xe(e,this.state.curPosition())};return this.optionFlags&256&&this.pushToken(n),n}skipLineComment(t){let e=this.state.pos,s;this.isLookahead||(s=this.state.curPosition());let i=this.input.charCodeAt(this.state.pos+=t);if(this.state.pos<this.length)for(;!ye(i)&&++this.state.pos<this.length;)i=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;let n=this.state.pos,o={type:"CommentLine",value:this.input.slice(e+t,n),start:this.sourceToOffsetPos(e),end:this.sourceToOffsetPos(n),loc:new xe(s,this.state.curPosition())};return this.optionFlags&256&&this.pushToken(o),o}skipSpace(){let t=this.state.pos,e=this.optionFlags&4096?[]:null;e:for(;this.state.pos<this.length;){let s=this.input.charCodeAt(this.state.pos);switch(s){case 32:case 160:case 9:++this.state.pos;break;case 13:this.input.charCodeAt(this.state.pos+1)===10&&++this.state.pos;case 10:case 8232:case 8233:++this.state.pos,++this.state.curLine,this.state.lineStart=this.state.pos;break;case 47:switch(this.input.charCodeAt(this.state.pos+1)){case 42:{let i=this.skipBlockComment("*/");i!==void 0&&(this.addComment(i),e?.push(i));break}case 47:{let i=this.skipLineComment(2);i!==void 0&&(this.addComment(i),e?.push(i));break}default:break e}break;default:if(Kr(s))++this.state.pos;else if(s===45&&!this.inModule&&this.optionFlags&8192){let i=this.state.pos;if(this.input.charCodeAt(i+1)===45&&this.input.charCodeAt(i+2)===62&&(t===0||this.state.lineStart>t)){let n=this.skipLineComment(3);n!==void 0&&(this.addComment(n),e?.push(n))}else break e}else if(s===60&&!this.inModule&&this.optionFlags&8192){let i=this.state.pos;if(this.input.charCodeAt(i+1)===33&&this.input.charCodeAt(i+2)===45&&this.input.charCodeAt(i+3)===45){let n=this.skipLineComment(4);n!==void 0&&(this.addComment(n),e?.push(n))}else break e}else break e}}if(e?.length>0){let s=this.state.pos,i={start:this.sourceToOffsetPos(t),end:this.sourceToOffsetPos(s),comments:e,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(i)}}finishToken(t,e){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();let s=this.state.type;this.state.type=t,this.state.value=e,this.isLookahead||this.updateContext(s)}replaceToken(t){this.state.type=t,this.updateContext()}readToken_numberSign(){if(this.state.pos===0&&this.readToken_interpreter())return;let t=this.state.pos+1,e=this.codePointAtPos(t);if(e>=48&&e<=57)throw this.raise(p.UnexpectedDigitAfterHash,this.state.curPosition());if(e===123||e===91&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),this.getPluginOption("recordAndTuple","syntaxType")==="bar")throw this.raise(e===123?p.RecordExpressionHashIncorrectStartSyntaxType:p.TupleExpressionHashIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,e===123?this.finishToken(7):this.finishToken(1)}else W(e)?(++this.state.pos,this.finishToken(139,this.readWord1(e))):e===92?(++this.state.pos,this.finishToken(139,this.readWord1())):this.finishOp(27,1)}readToken_dot(){let t=this.input.charCodeAt(this.state.pos+1);if(t>=48&&t<=57){this.readNumber(!0);return}t===46&&this.input.charCodeAt(this.state.pos+2)===46?(this.state.pos+=3,this.finishToken(21)):(++this.state.pos,this.finishToken(16))}readToken_slash(){this.input.charCodeAt(this.state.pos+1)===61?this.finishOp(31,2):this.finishOp(56,1)}readToken_interpreter(){if(this.state.pos!==0||this.length<2)return!1;let t=this.input.charCodeAt(this.state.pos+1);if(t!==33)return!1;let e=this.state.pos;for(this.state.pos+=1;!ye(t)&&++this.state.pos<this.length;)t=this.input.charCodeAt(this.state.pos);let s=this.input.slice(e+2,this.state.pos);return this.finishToken(28,s),!0}readToken_mult_modulo(t){let e=t===42?55:54,s=1,i=this.input.charCodeAt(this.state.pos+1);t===42&&i===42&&(s++,i=this.input.charCodeAt(this.state.pos+2),e=57),i===61&&!this.state.inType&&(s++,e=t===37?33:30),this.finishOp(e,s)}readToken_pipe_amp(t){let e=this.input.charCodeAt(this.state.pos+1);if(e===t){this.input.charCodeAt(this.state.pos+2)===61?this.finishOp(30,3):this.finishOp(t===124?41:42,2);return}if(t===124){if(e===62){this.finishOp(39,2);return}if(this.hasPlugin("recordAndTuple")&&e===125){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(p.RecordExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(9);return}if(this.hasPlugin("recordAndTuple")&&e===93){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(p.TupleExpressionBarIncorrectEndSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(4);return}}if(e===61){this.finishOp(30,2);return}this.finishOp(t===124?43:45,1)}readToken_caret(){let t=this.input.charCodeAt(this.state.pos+1);t===61&&!this.state.inType?this.finishOp(32,2):t===94&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"^^"}])?(this.finishOp(37,2),this.input.codePointAt(this.state.pos)===94&&this.unexpected()):this.finishOp(44,1)}readToken_atSign(){this.input.charCodeAt(this.state.pos+1)===64&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"@@"}])?this.finishOp(38,2):this.finishOp(26,1)}readToken_plus_min(t){let e=this.input.charCodeAt(this.state.pos+1);if(e===t){this.finishOp(34,2);return}e===61?this.finishOp(30,2):this.finishOp(53,1)}readToken_lt(){let{pos:t}=this.state,e=this.input.charCodeAt(t+1);if(e===60){if(this.input.charCodeAt(t+2)===61){this.finishOp(30,3);return}this.finishOp(51,2);return}if(e===61){this.finishOp(49,2);return}this.finishOp(47,1)}readToken_gt(){let{pos:t}=this.state,e=this.input.charCodeAt(t+1);if(e===62){let s=this.input.charCodeAt(t+2)===62?3:2;if(this.input.charCodeAt(t+s)===61){this.finishOp(30,s+1);return}this.finishOp(52,s);return}if(e===61){this.finishOp(49,2);return}this.finishOp(48,1)}readToken_eq_excl(t){let e=this.input.charCodeAt(this.state.pos+1);if(e===61){this.finishOp(46,this.input.charCodeAt(this.state.pos+2)===61?3:2);return}if(t===61&&e===62){this.state.pos+=2,this.finishToken(19);return}this.finishOp(t===61?29:35,1)}readToken_question(){let t=this.input.charCodeAt(this.state.pos+1),e=this.input.charCodeAt(this.state.pos+2);t===63?e===61?this.finishOp(30,3):this.finishOp(40,2):t===46&&!(e>=48&&e<=57)?(this.state.pos+=2,this.finishToken(18)):(++this.state.pos,this.finishToken(17))}getTokenFromCode(t){switch(t){case 46:this.readToken_dot();return;case 40:++this.state.pos,this.finishToken(10);return;case 41:++this.state.pos,this.finishToken(11);return;case 59:++this.state.pos,this.finishToken(13);return;case 44:++this.state.pos,this.finishToken(12);return;case 91:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(p.TupleExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(2)}else++this.state.pos,this.finishToken(0);return;case 93:++this.state.pos,this.finishToken(3);return;case 123:if(this.hasPlugin("recordAndTuple")&&this.input.charCodeAt(this.state.pos+1)===124){if(this.getPluginOption("recordAndTuple","syntaxType")!=="bar")throw this.raise(p.RecordExpressionBarIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,this.finishToken(6)}else++this.state.pos,this.finishToken(5);return;case 125:++this.state.pos,this.finishToken(8);return;case 58:this.hasPlugin("functionBind")&&this.input.charCodeAt(this.state.pos+1)===58?this.finishOp(15,2):(++this.state.pos,this.finishToken(14));return;case 63:this.readToken_question();return;case 96:this.readTemplateToken();return;case 48:{let e=this.input.charCodeAt(this.state.pos+1);if(e===120||e===88){this.readRadixNumber(16);return}if(e===111||e===79){this.readRadixNumber(8);return}if(e===98||e===66){this.readRadixNumber(2);return}}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:this.readNumber(!1);return;case 34:case 39:this.readString(t);return;case 47:this.readToken_slash();return;case 37:case 42:this.readToken_mult_modulo(t);return;case 124:case 38:this.readToken_pipe_amp(t);return;case 94:this.readToken_caret();return;case 43:case 45:this.readToken_plus_min(t);return;case 60:this.readToken_lt();return;case 62:this.readToken_gt();return;case 61:case 33:this.readToken_eq_excl(t);return;case 126:this.finishOp(36,1);return;case 64:this.readToken_atSign();return;case 35:this.readToken_numberSign();return;case 92:this.readWord();return;default:if(W(t)){this.readWord(t);return}}throw this.raise(p.InvalidOrUnexpectedToken,this.state.curPosition(),{unexpected:String.fromCodePoint(t)})}finishOp(t,e){let s=this.input.slice(this.state.pos,this.state.pos+e);this.state.pos+=e,this.finishToken(t,s)}readRegexp(){let t=this.state.startLoc,e=this.state.start+1,s,i,{pos:n}=this.state;for(;;++n){if(n>=this.length)throw this.raise(p.UnterminatedRegExp,V(t,1));let c=this.input.charCodeAt(n);if(ye(c))throw this.raise(p.UnterminatedRegExp,V(t,1));if(s)s=!1;else{if(c===91)i=!0;else if(c===93&&i)i=!1;else if(c===47&&!i)break;s=c===92}}let a=this.input.slice(e,n);++n;let o="",l=h(()=>V(t,n+2-e),"nextPos");for(;n<this.length;){let c=this.codePointAtPos(n),u=String.fromCharCode(c);if(Zr.has(c))c===118?o.includes("u")&&this.raise(p.IncompatibleRegExpUVFlags,l()):c===117&&o.includes("v")&&this.raise(p.IncompatibleRegExpUVFlags,l()),o.includes(u)&&this.raise(p.DuplicateRegExpFlags,l());else if(ue(c)||c===92)this.raise(p.MalformedRegExpFlags,l());else break;++n,o+=u}this.state.pos=n,this.finishToken(138,{pattern:a,flags:o})}readInt(t,e,s=!1,i=!0){let{n,pos:a}=ti(this.input,this.state.pos,this.state.lineStart,this.state.curLine,t,e,s,i,this.errorHandlers_readInt,!1);return this.state.pos=a,n}readRadixNumber(t){let e=this.state.pos,s=this.state.curPosition(),i=!1;this.state.pos+=2;let n=this.readInt(t);n==null&&this.raise(p.InvalidDigit,V(s,2),{radix:t});let a=this.input.charCodeAt(this.state.pos);if(a===110)++this.state.pos,i=!0;else if(a===109)throw this.raise(p.InvalidDecimal,s);if(W(this.codePointAtPos(this.state.pos)))throw this.raise(p.NumberIdentifier,this.state.curPosition());if(i){let o=this.input.slice(e,this.state.pos).replace(/[_n]/g,"");this.finishToken(136,o);return}this.finishToken(135,n)}readNumber(t){let e=this.state.pos,s=this.state.curPosition(),i=!1,n=!1,a=!1,o=!1;!t&&this.readInt(10)===null&&this.raise(p.InvalidNumber,this.state.curPosition());let l=this.state.pos-e>=2&&this.input.charCodeAt(e)===48;if(l){let m=this.input.slice(e,this.state.pos);if(this.recordStrictModeErrors(p.StrictOctalLiteral,s),!this.state.strict){let y=m.indexOf("_");y>0&&this.raise(p.ZeroDigitNumericSeparator,V(s,y))}o=l&&!/[89]/.test(m)}let c=this.input.charCodeAt(this.state.pos);if(c===46&&!o&&(++this.state.pos,this.readInt(10),i=!0,c=this.input.charCodeAt(this.state.pos)),(c===69||c===101)&&!o&&(c=this.input.charCodeAt(++this.state.pos),(c===43||c===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(p.InvalidOrMissingExponent,s),i=!0,a=!0,c=this.input.charCodeAt(this.state.pos)),c===110&&((i||l)&&this.raise(p.InvalidBigIntLiteral,s),++this.state.pos,n=!0),c===109){this.expectPlugin("decimal",this.state.curPosition()),(a||l)&&this.raise(p.InvalidDecimal,s),++this.state.pos;var u=!0}if(W(this.codePointAtPos(this.state.pos)))throw this.raise(p.NumberIdentifier,this.state.curPosition());let f=this.input.slice(e,this.state.pos).replace(/[_mn]/g,"");if(n){this.finishToken(136,f);return}if(u){this.finishToken(137,f);return}let d=o?parseInt(f,8):parseFloat(f);this.finishToken(135,d)}readCodePoint(t){let{code:e,pos:s}=si(this.input,this.state.pos,this.state.lineStart,this.state.curLine,t,this.errorHandlers_readCodePoint);return this.state.pos=s,e}readString(t){let{str:e,pos:s,curLine:i,lineStart:n}=Us(t===34?"double":"single",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_string);this.state.pos=s+1,this.state.lineStart=n,this.state.curLine=i,this.finishToken(134,e)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){let t=this.input[this.state.pos],{str:e,firstInvalidLoc:s,pos:i,curLine:n,lineStart:a}=Us("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=i+1,this.state.lineStart=a,this.state.curLine=n,s&&(this.state.firstInvalidTemplateEscapePos=new G(s.curLine,s.pos-s.lineStart,this.sourceToOffsetPos(s.pos))),this.input.codePointAt(i)===96?this.finishToken(24,s?null:t+e+"`"):(this.state.pos++,this.finishToken(25,s?null:t+e+"${"))}recordStrictModeErrors(t,e){let s=e.index;this.state.strict&&!this.state.strictErrors.has(s)?this.raise(t,e):this.state.strictErrors.set(s,[t,e])}readWord1(t){this.state.containsEsc=!1;let e="",s=this.state.pos,i=this.state.pos;for(t!==void 0&&(this.state.pos+=t<=65535?1:2);this.state.pos<this.length;){let n=this.codePointAtPos(this.state.pos);if(ue(n))this.state.pos+=n<=65535?1:2;else if(n===92){this.state.containsEsc=!0,e+=this.input.slice(i,this.state.pos);let a=this.state.curPosition(),o=this.state.pos===s?W:ue;if(this.input.charCodeAt(++this.state.pos)!==117){this.raise(p.MissingUnicodeEscape,this.state.curPosition()),i=this.state.pos-1;continue}++this.state.pos;let l=this.readCodePoint(!0);l!==null&&(o(l)||this.raise(p.EscapedCharNotAnIdentifier,a),e+=String.fromCodePoint(l)),i=this.state.pos}else break}return e+this.input.slice(i,this.state.pos)}readWord(t){let e=this.readWord1(t),s=_t.get(e);s!==void 0?this.finishToken(s,ae(s)):this.finishToken(132,e)}checkKeywordEscapes(){let{type:t}=this.state;Bt(t)&&this.state.containsEsc&&this.raise(p.InvalidEscapedReservedWord,this.state.startLoc,{reservedWord:ae(t)})}raise(t,e,s={}){let i=e instanceof G?e:e.loc.start,n=t(i,s);if(!(this.optionFlags&2048))throw n;return this.isLookahead||this.state.errors.push(n),n}raiseOverwrite(t,e,s={}){let i=e instanceof G?e:e.loc.start,n=i.index,a=this.state.errors;for(let o=a.length-1;o>=0;o--){let l=a[o];if(l.loc.index===n)return a[o]=t(i,s);if(l.loc.index<n)break}return this.raise(t,e,s)}updateContext(t){}unexpected(t,e){throw this.raise(p.UnexpectedToken,t??this.state.startLoc,{expected:e?ae(e):null})}expectPlugin(t,e){if(this.hasPlugin(t))return!0;throw this.raise(p.MissingPlugin,e??this.state.startLoc,{missingPlugin:[t]})}expectOnePlugin(t){if(!t.some(e=>this.hasPlugin(e)))throw this.raise(p.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:t})}errorBuilder(t){return(e,s,i)=>{this.raise(t,Ce(e,s,i))}}},St=class{static{h(this,"ClassScope")}constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}},bt=class{static{h(this,"ClassScopeHandler")}constructor(t){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=t}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new St)}exit(){let t=this.stack.pop(),e=this.current();for(let[s,i]of Array.from(t.undefinedPrivateNames))e?e.undefinedPrivateNames.has(s)||e.undefinedPrivateNames.set(s,i):this.parser.raise(p.InvalidPrivateFieldResolution,i,{identifierName:s})}declarePrivateName(t,e,s){let{privateNames:i,loneAccessors:n,undefinedPrivateNames:a}=this.current(),o=i.has(t);if(e&3){let l=o&&n.get(t);if(l){let c=l&4,u=e&4,f=l&3,d=e&3;o=f===d||c!==u,o||n.delete(t)}else o||n.set(t,e)}o&&this.parser.raise(p.PrivateNameRedeclaration,s,{identifierName:t}),i.add(t),a.delete(t)}usePrivateName(t,e){let s;for(s of this.stack)if(s.privateNames.has(t))return;s?s.undefinedPrivateNames.set(t,e):this.parser.raise(p.InvalidPrivateFieldResolution,e,{identifierName:t})}},Te=class{static{h(this,"ExpressionScope")}constructor(t=0){this.type=t}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}},Ke=class extends Te{static{h(this,"ArrowHeadParsingScope")}constructor(t){super(t),this.declarationErrors=new Map}recordDeclarationError(t,e){let s=e.index;this.declarationErrors.set(s,[t,e])}clearDeclarationError(t){this.declarationErrors.delete(t)}iterateErrors(t){this.declarationErrors.forEach(t)}},At=class{static{h(this,"ExpressionScopeHandler")}constructor(t){this.parser=void 0,this.stack=[new Te],this.parser=t}enter(t){this.stack.push(t)}exit(){this.stack.pop()}recordParameterInitializerError(t,e){let s=e.loc.start,{stack:i}=this,n=i.length-1,a=i[n];for(;!a.isCertainlyParameterDeclaration();){if(a.canBeArrowParameterDeclaration())a.recordDeclarationError(t,s);else return;a=i[--n]}this.parser.raise(t,s)}recordArrowParameterBindingError(t,e){let{stack:s}=this,i=s[s.length-1],n=e.loc.start;if(i.isCertainlyParameterDeclaration())this.parser.raise(t,n);else if(i.canBeArrowParameterDeclaration())i.recordDeclarationError(t,n);else return}recordAsyncArrowParametersError(t){let{stack:e}=this,s=e.length-1,i=e[s];for(;i.canBeArrowParameterDeclaration();)i.type===2&&i.recordDeclarationError(p.AwaitBindingIdentifier,t),i=e[--s]}validateAsPattern(){let{stack:t}=this,e=t[t.length-1];e.canBeArrowParameterDeclaration()&&e.iterateErrors(([s,i])=>{this.parser.raise(s,i);let n=t.length-2,a=t[n];for(;a.canBeArrowParameterDeclaration();)a.clearDeclarationError(i.index),a=t[--n]})}};function en(){return new Te(3)}h(en,"newParameterDeclarationScope");function tn(){return new Ke(1)}h(tn,"newArrowHeadScope");function sn(){return new Ke(2)}h(sn,"newAsyncArrowScope");function ii(){return new Te}h(ii,"newExpressionScope");var Nt=class extends Pt{static{h(this,"UtilParser")}addExtra(t,e,s,i=!0){if(!t)return;let{extra:n}=t;n==null&&(n={},t.extra=n),i?n[e]=s:Object.defineProperty(n,e,{enumerable:i,value:s})}isContextual(t){return this.state.type===t&&!this.state.containsEsc}isUnparsedContextual(t,e){if(this.input.startsWith(e,t)){let s=this.input.charCodeAt(t+e.length);return!(ue(s)||(s&64512)===55296)}return!1}isLookaheadContextual(t){let e=this.nextTokenStart();return this.isUnparsedContextual(e,t)}eatContextual(t){return this.isContextual(t)?(this.next(),!0):!1}expectContextual(t,e){if(!this.eatContextual(t)){if(e!=null)throw this.raise(e,this.state.startLoc);this.unexpected(null,t)}}canInsertSemicolon(){return this.match(140)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return Bs(this.input,this.offsetToSourcePos(this.state.lastTokEndLoc.index),this.state.start)}hasFollowingLineBreak(){return Bs(this.input,this.state.end,this.nextTokenStart())}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(t=!0){(t?this.isLineTerminator():this.eat(13))||this.raise(p.MissingSemicolon,this.state.lastTokEndLoc)}expect(t,e){this.eat(t)||this.unexpected(e,t)}tryParse(t,e=this.state.clone()){let s={node:null};try{let i=t((n=null)=>{throw s.node=n,s});if(this.state.errors.length>e.errors.length){let n=this.state;return this.state=e,this.state.tokensLength=n.tokensLength,{node:i,error:n.errors[e.errors.length],thrown:!1,aborted:!1,failState:n}}return{node:i,error:null,thrown:!1,aborted:!1,failState:null}}catch(i){let n=this.state;if(this.state=e,i instanceof SyntaxError)return{node:null,error:i,thrown:!0,aborted:!1,failState:n};if(i===s)return{node:s.node,error:null,thrown:!1,aborted:!0,failState:n};throw i}}checkExpressionErrors(t,e){if(!t)return!1;let{shorthandAssignLoc:s,doubleProtoLoc:i,privateKeyLoc:n,optionalParametersLoc:a,voidPatternLoc:o}=t,l=!!s||!!i||!!a||!!n||!!o;if(!e)return l;s!=null&&this.raise(p.InvalidCoverInitializedName,s),i!=null&&this.raise(p.DuplicateProto,i),n!=null&&this.raise(p.UnexpectedPrivateField,n),a!=null&&this.unexpected(a),o!=null&&this.raise(p.InvalidCoverDiscardElement,o)}isLiteralPropertyName(){return Ks(this.state.type)}isPrivateName(t){return t.type==="PrivateName"}getPrivateNameSV(t){return t.id.name}hasPropertyAsPrivateName(t){return(t.type==="MemberExpression"||t.type==="OptionalMemberExpression")&&this.isPrivateName(t.property)}isObjectProperty(t){return t.type==="ObjectProperty"}isObjectMethod(t){return t.type==="ObjectMethod"}initializeScopes(t=this.options.sourceType==="module"){let e=this.state.labels;this.state.labels=[];let s=this.exportedIdentifiers;this.exportedIdentifiers=new Set;let i=this.inModule;this.inModule=t;let n=this.scope,a=this.getScopeHandler();this.scope=new a(this,t);let o=this.prodParam;this.prodParam=new yt;let l=this.classScope;this.classScope=new bt(this);let c=this.expressionScope;return this.expressionScope=new At(this),()=>{this.state.labels=e,this.exportedIdentifiers=s,this.inModule=i,this.scope=n,this.prodParam=o,this.classScope=l,this.expressionScope=c}}enterInitialScopes(){let t=0;(this.inModule||this.optionFlags&1)&&(t|=2),this.optionFlags&32&&(t|=1);let e=!this.inModule&&this.options.sourceType==="commonjs";(e||this.optionFlags&2)&&(t|=4),this.prodParam.enter(t);let s=e?514:1;this.optionFlags&4&&(s|=512),this.scope.enter(s)}checkDestructuringPrivate(t){let{privateKeyLoc:e}=t;e!==null&&this.expectPlugin("destructuringPrivate",e)}},ge=class{static{h(this,"ExpressionErrors")}constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null,this.voidPatternLoc=null}},Ee=class{static{h(this,"Node")}constructor(t,e,s){this.type="",this.start=e,this.end=0,this.loc=new xe(s),t?.optionFlags&128&&(this.range=[e,0]),t!=null&&t.filename&&(this.loc.filename=t.filename)}},It=Ee.prototype;It.__clone=function(){let r=new Ee(void 0,this.start,this.loc.start),t=Object.keys(this);for(let e=0,s=t.length;e<s;e++){let i=t[e];i!=="leadingComments"&&i!=="trailingComments"&&i!=="innerComments"&&(r[i]=this[i])}return r};var Ct=class extends Nt{static{h(this,"NodeUtils")}startNode(){let t=this.state.startLoc;return new Ee(this,t.index,t)}startNodeAt(t){return new Ee(this,t.index,t)}startNodeAtNode(t){return this.startNodeAt(t.loc.start)}finishNode(t,e){return this.finishNodeAt(t,e,this.state.lastTokEndLoc)}finishNodeAt(t,e,s){return t.type=e,t.end=s.index,t.loc.end=s,this.optionFlags&128&&(t.range[1]=s.index),this.optionFlags&4096&&this.processComment(t),t}resetStartLocation(t,e){t.start=e.index,t.loc.start=e,this.optionFlags&128&&(t.range[0]=e.index)}resetEndLocation(t,e=this.state.lastTokEndLoc){t.end=e.index,t.loc.end=e,this.optionFlags&128&&(t.range[1]=e.index)}resetStartLocationFromNode(t,e){this.resetStartLocation(t,e.loc.start)}castNodeTo(t,e){return t.type=e,t}cloneIdentifier(t){let{type:e,start:s,end:i,loc:n,range:a,name:o}=t,l=Object.create(It);return l.type=e,l.start=s,l.end=i,l.loc=n,l.range=a,l.name=o,t.extra&&(l.extra=t.extra),l}cloneStringLiteral(t){let{type:e,start:s,end:i,loc:n,range:a,extra:o}=t,l=Object.create(It);return l.type=e,l.start=s,l.end=i,l.loc=n,l.range=a,l.extra=o,l.value=t.value,l}},wt=h(r=>r.type==="ParenthesizedExpression"?wt(r.expression):r,"unwrapParenthesizedExpression"),vt=class extends Ct{static{h(this,"LValParser")}toAssignable(t,e=!1){var s,i;let n;switch((t.type==="ParenthesizedExpression"||(s=t.extra)!=null&&s.parenthesized)&&(n=wt(t),e?n.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(p.InvalidParenthesizedAssignment,t):n.type!=="CallExpression"&&n.type!=="MemberExpression"&&!this.isOptionalMemberExpression(n)&&this.raise(p.InvalidParenthesizedAssignment,t):this.raise(p.InvalidParenthesizedAssignment,t)),t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":case"VoidPattern":break;case"ObjectExpression":this.castNodeTo(t,"ObjectPattern");for(let o=0,l=t.properties.length,c=l-1;o<l;o++){var a;let u=t.properties[o],f=o===c;this.toAssignableObjectExpressionProp(u,f,e),f&&u.type==="RestElement"&&(a=t.extra)!=null&&a.trailingCommaLoc&&this.raise(p.RestTrailingComma,t.extra.trailingCommaLoc)}break;case"ObjectProperty":{let{key:o,value:l}=t;this.isPrivateName(o)&&this.classScope.usePrivateName(this.getPrivateNameSV(o),o.loc.start),this.toAssignable(l,e);break}case"SpreadElement":throw new Error("Internal @babel/parser error (this is a bug, please report it). SpreadElement should be converted by .toAssignable's caller.");case"ArrayExpression":this.castNodeTo(t,"ArrayPattern"),this.toAssignableList(t.elements,(i=t.extra)==null?void 0:i.trailingCommaLoc,e);break;case"AssignmentExpression":t.operator!=="="&&this.raise(p.MissingEqInAssignment,t.left.loc.end),this.castNodeTo(t,"AssignmentPattern"),delete t.operator,t.left.type==="VoidPattern"&&this.raise(p.VoidPatternInitializer,t.left),this.toAssignable(t.left,e);break;case"ParenthesizedExpression":this.toAssignable(n,e);break}}toAssignableObjectExpressionProp(t,e,s){if(t.type==="ObjectMethod")this.raise(t.kind==="get"||t.kind==="set"?p.PatternHasAccessor:p.PatternHasMethod,t.key);else if(t.type==="SpreadElement"){this.castNodeTo(t,"RestElement");let i=t.argument;this.checkToRestConversion(i,!1),this.toAssignable(i,s),e||this.raise(p.RestTrailingComma,t)}else this.toAssignable(t,s)}toAssignableList(t,e,s){let i=t.length-1;for(let n=0;n<=i;n++){let a=t[n];a&&(this.toAssignableListItem(t,n,s),a.type==="RestElement"&&(n<i?this.raise(p.RestTrailingComma,a):e&&this.raise(p.RestTrailingComma,e)))}}toAssignableListItem(t,e,s){let i=t[e];if(i.type==="SpreadElement"){this.castNodeTo(i,"RestElement");let n=i.argument;this.checkToRestConversion(n,!0),this.toAssignable(n,s)}else this.toAssignable(i,s)}isAssignable(t,e){switch(t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":case"VoidPattern":return!0;case"ObjectExpression":{let s=t.properties.length-1;return t.properties.every((i,n)=>i.type!=="ObjectMethod"&&(n===s||i.type!=="SpreadElement")&&this.isAssignable(i))}case"ObjectProperty":return this.isAssignable(t.value);case"SpreadElement":return this.isAssignable(t.argument);case"ArrayExpression":return t.elements.every(s=>s===null||this.isAssignable(s));case"AssignmentExpression":return t.operator==="=";case"ParenthesizedExpression":return this.isAssignable(t.expression);case"MemberExpression":case"OptionalMemberExpression":return!e;default:return!1}}toReferencedList(t,e){return t}toReferencedListDeep(t,e){this.toReferencedList(t,e);for(let s of t)s?.type==="ArrayExpression"&&this.toReferencedListDeep(s.elements)}parseSpread(t){let e=this.startNode();return this.next(),e.argument=this.parseMaybeAssignAllowIn(t,void 0),this.finishNode(e,"SpreadElement")}parseRestBinding(){let t=this.startNode();this.next();let e=this.parseBindingAtom();return e.type==="VoidPattern"&&this.raise(p.UnexpectedVoidPattern,e),t.argument=e,this.finishNode(t,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{let t=this.startNode();return this.next(),t.elements=this.parseBindingList(3,93,1),this.finishNode(t,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0);case 88:return this.parseVoidPattern(null)}return this.parseIdentifier()}parseBindingList(t,e,s){let i=s&1,n=[],a=!0;for(;!this.eat(t);)if(a?a=!1:this.expect(12),i&&this.match(12))n.push(null);else{if(this.eat(t))break;if(this.match(21)){let o=this.parseRestBinding();if((this.hasPlugin("flow")||s&2)&&(o=this.parseFunctionParamType(o)),n.push(o),!this.checkCommaAfterRest(e)){this.expect(t);break}}else{let o=[];if(s&2)for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(p.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)o.push(this.parseDecorator());n.push(this.parseBindingElement(s,o))}}return n}parseBindingRestProperty(t){return this.next(),this.hasPlugin("discardBinding")&&this.match(88)?(t.argument=this.parseVoidPattern(null),this.raise(p.UnexpectedVoidPattern,t.argument)):t.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(t,"RestElement")}parseBindingProperty(){let{type:t,startLoc:e}=this.state;if(t===21)return this.parseBindingRestProperty(this.startNode());let s=this.startNode();return t===139?(this.expectPlugin("destructuringPrivate",e),this.classScope.usePrivateName(this.state.value,e),s.key=this.parsePrivateName()):this.parsePropertyName(s),s.method=!1,this.parseObjPropValue(s,e,!1,!1,!0,!1)}parseBindingElement(t,e){let s=this.parseMaybeDefault();return(this.hasPlugin("flow")||t&2)&&this.parseFunctionParamType(s),e.length&&(s.decorators=e,this.resetStartLocationFromNode(s,e[0])),this.parseMaybeDefault(s.loc.start,s)}parseFunctionParamType(t){return t}parseMaybeDefault(t,e){if(t??(t=this.state.startLoc),e=e??this.parseBindingAtom(),!this.eat(29))return e;let s=this.startNodeAt(t);return e.type==="VoidPattern"&&this.raise(p.VoidPatternInitializer,e),s.left=e,s.right=this.parseMaybeAssignAllowIn(),this.finishNode(s,"AssignmentPattern")}isValidLVal(t,e,s,i){switch(t){case"AssignmentPattern":return"left";case"RestElement":return"argument";case"ObjectProperty":return"value";case"ParenthesizedExpression":return"expression";case"ArrayPattern":return"elements";case"ObjectPattern":return"properties";case"VoidPattern":return!0;case"CallExpression":if(!e&&!this.state.strict&&this.optionFlags&8192)return!0}return!1}isOptionalMemberExpression(t){return t.type==="OptionalMemberExpression"}checkLVal(t,e,s=64,i=!1,n=!1,a=!1,o=!1){var l;let c=t.type;if(this.isObjectMethod(t))return;let u=this.isOptionalMemberExpression(t);if(u||c==="MemberExpression"){u&&(this.expectPlugin("optionalChainingAssign",t.loc.start),e.type!=="AssignmentExpression"&&this.raise(p.InvalidLhsOptionalChaining,t,{ancestor:e})),s!==64&&this.raise(p.InvalidPropertyBindingPattern,t);return}if(c==="Identifier"){this.checkIdentifier(t,s,n);let{name:P}=t;i&&(i.has(P)?this.raise(p.ParamDupe,t):i.add(P));return}else c==="VoidPattern"&&e.type==="CatchClause"&&this.raise(p.VoidPatternCatchClauseParam,t);let f=wt(t);o||(o=f.type==="CallExpression"&&(f.callee.type==="Import"||f.callee.type==="Super"));let d=this.isValidLVal(c,o,!(a||(l=t.extra)!=null&&l.parenthesized)&&e.type==="AssignmentExpression",s);if(d===!0)return;if(d===!1){let P=s===64?p.InvalidLhs:p.InvalidLhsBinding;this.raise(P,t,{ancestor:e});return}let m,y;typeof d=="string"?(m=d,y=c==="ParenthesizedExpression"):[m,y]=d;let S=c==="ArrayPattern"||c==="ObjectPattern"?{type:c}:e,O=t[m];if(Array.isArray(O))for(let P of O)P&&this.checkLVal(P,S,s,i,n,y,!0);else O&&this.checkLVal(O,S,s,i,n,y,o)}checkIdentifier(t,e,s=!1){this.state.strict&&(s?Zs(t.name,this.inModule):Qs(t.name))&&(e===64?this.raise(p.StrictEvalArguments,t,{referenceName:t.name}):this.raise(p.StrictEvalArgumentsBinding,t,{bindingName:t.name})),e&8192&&t.name==="let"&&this.raise(p.LetInLexicalBinding,t),e&64||this.declareNameFromIdentifier(t,e)}declareNameFromIdentifier(t,e){this.scope.declareName(t.name,e,t.loc.start)}checkToRestConversion(t,e){switch(t.type){case"ParenthesizedExpression":this.checkToRestConversion(t.expression,e);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(e)break;default:this.raise(p.InvalidRestAssignmentPattern,t)}}checkCommaAfterRest(t){return this.match(12)?(this.raise(this.lookaheadCharCode()===t?p.RestTrailingComma:p.ElementAfterRest,this.state.startLoc),!0):!1}},lt=/in(?:stanceof)?|as|satisfies/y;function rn(r){if(r==null)throw new Error(`Unexpected ${r} value.`);return r}h(rn,"nonNull");function js(r){if(!r)throw new Error("Assert fail")}h(js,"assert");var x=K`typescript`({AbstractMethodHasImplementation:h(({methodName:r})=>`Method '${r}' cannot have an implementation because it is marked abstract.`,"AbstractMethodHasImplementation"),AbstractPropertyHasInitializer:h(({propertyName:r})=>`Property '${r}' cannot have an initializer because it is marked abstract.`,"AbstractPropertyHasInitializer"),AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",AccessorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccessorCannotHaveTypeParameters:"An accessor cannot have type parameters.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"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:h(({kind:r})=>`'declare' is not allowed in ${r}ters.`,"DeclareAccessor"),DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:h(({modifier:r})=>`Accessibility modifier already seen: '${r}'.`,"DuplicateAccessibilityModifier"),DuplicateModifier:h(({modifier:r})=>`Duplicate modifier: '${r}'.`,"DuplicateModifier"),EmptyHeritageClauseType:h(({token:r})=>`'${r}' list cannot be empty.`,"EmptyHeritageClauseType"),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'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:h(({modifiers:r})=>`'${r[0]}' modifier cannot be used with '${r[1]}' modifier.`,"IncompatibleModifiers"),IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:h(({modifier:r})=>`Index signatures cannot have an accessibility modifier ('${r}').`,"IndexSignatureHasAccessibility"),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.",InvalidHeritageClauseType:h(({token:r})=>`'${r}' list can only include identifiers or qualified-names with optional type arguments.`,"InvalidHeritageClauseType"),InvalidModifierOnAwaitUsingDeclaration:h(r=>`'${r}' modifier cannot appear on an await using declaration.`,"InvalidModifierOnAwaitUsingDeclaration"),InvalidModifierOnTypeMember:h(({modifier:r})=>`'${r}' modifier cannot appear on a type member.`,"InvalidModifierOnTypeMember"),InvalidModifierOnTypeParameter:h(({modifier:r})=>`'${r}' modifier cannot appear on a type parameter.`,"InvalidModifierOnTypeParameter"),InvalidModifierOnTypeParameterPositions:h(({modifier:r})=>`'${r}' modifier can only appear on a type parameter of a class, interface or type alias.`,"InvalidModifierOnTypeParameterPositions"),InvalidModifierOnUsingDeclaration:h(r=>`'${r}' modifier cannot appear on a using declaration.`,"InvalidModifierOnUsingDeclaration"),InvalidModifiersOrder:h(({orderedModifiers:r})=>`'${r[0]}' modifier must precede '${r[1]}' modifier.`,"InvalidModifiersOrder"),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.",NonClassMethodPropertyHasAbstractModifier:"'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:h(({modifier:r})=>`Private elements cannot have an accessibility modifier ('${r}').`,"PrivateElementHasAccessibility"),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.",SetAccessorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccessorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccessorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:h(({typeParameterName:r})=>`Single type parameter ${r} should have a trailing comma. Example usage: <${r},>.`,"SingleTypeParameterWithoutTrailingComma"),StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",TupleOptionalAfterType:"A labeled tuple optional element must be declared using a question mark after the name and before the colon (`name?: type`), rather than after the type (`name: type?`).",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.",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:h(({type:r})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${r}.`,"UnsupportedSignatureParameterKind"),UsingDeclarationInAmbientContext:h(r=>`'${r}' declarations are not allowed in ambient contexts.`,"UsingDeclarationInAmbientContext")});function nn(r){switch(r){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}}h(nn,"keywordTypeFromName");function $s(r){return r==="private"||r==="public"||r==="protected"}h($s,"tsIsAccessModifier");function an(r){return r==="in"||r==="out"}h(an,"tsIsVarianceAnnotations");var on=h(r=>class extends r{static{h(this,"TypeScriptParserMixin")}constructor(...e){super(...e),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:x.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:x.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:x.InvalidModifierOnTypeParameter})}getScopeHandler(){return mt}tsIsIdentifier(){return k(this.state.type)}tsTokenCanFollowModifier(){return this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(139)||this.isLiteralPropertyName()}tsNextTokenOnSameLineAndCanFollowModifier(){return this.next(),this.hasPrecedingLineBreak()?!1:this.tsTokenCanFollowModifier()}tsNextTokenCanFollowModifier(){return this.match(106)?(this.next(),this.tsTokenCanFollowModifier()):this.tsNextTokenOnSameLineAndCanFollowModifier()}tsParseModifier(e,s,i){if(!k(this.state.type)&&this.state.type!==58&&this.state.type!==75)return;let n=this.state.value;if(e.includes(n)){if(i&&this.match(106)||s&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return n}}tsParseModifiers({allowedModifiers:e,disallowedModifiers:s,stopOnStartOfClassStaticBlock:i,errorTemplate:n=x.InvalidModifierOnTypeMember},a){let o=h((c,u,f,d)=>{u===f&&a[d]&&this.raise(x.InvalidModifiersOrder,c,{orderedModifiers:[f,d]})},"enforceOrder"),l=h((c,u,f,d)=>{(a[f]&&u===d||a[d]&&u===f)&&this.raise(x.IncompatibleModifiers,c,{modifiers:[f,d]})},"incompatible");for(;;){let{startLoc:c}=this.state,u=this.tsParseModifier(e.concat(s??[]),i,a.static);if(!u)break;$s(u)?a.accessibility?this.raise(x.DuplicateAccessibilityModifier,c,{modifier:u}):(o(c,u,u,"override"),o(c,u,u,"static"),o(c,u,u,"readonly"),a.accessibility=u):an(u)?(a[u]&&this.raise(x.DuplicateModifier,c,{modifier:u}),a[u]=!0,o(c,u,"in","out")):(hasOwnProperty.call(a,u)?this.raise(x.DuplicateModifier,c,{modifier:u}):(o(c,u,"static","readonly"),o(c,u,"static","override"),o(c,u,"override","readonly"),o(c,u,"abstract","override"),l(c,u,"declare","override"),l(c,u,"static","abstract")),a[u]=!0),s!=null&&s.includes(u)&&this.raise(n,c,{modifier:u})}}tsIsListTerminator(e){switch(e){case"EnumMembers":case"TypeMembers":return this.match(8);case"HeritageClauseElement":return this.match(5);case"TupleElementTypes":return this.match(3);case"TypeParametersOrArguments":return this.match(48)}}tsParseList(e,s){let i=[];for(;!this.tsIsListTerminator(e);)i.push(s());return i}tsParseDelimitedList(e,s,i){return rn(this.tsParseDelimitedListWorker(e,s,!0,i))}tsParseDelimitedListWorker(e,s,i,n){let a=[],o=-1;for(;!this.tsIsListTerminator(e);){o=-1;let l=s();if(l==null)return;if(a.push(l),this.eat(12)){o=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(e))break;i&&this.expect(12);return}return n&&(n.value=o),a}tsParseBracketedList(e,s,i,n,a){n||(i?this.expect(0):this.expect(47));let o=this.tsParseDelimitedList(e,s,a);return i?this.expect(3):this.expect(48),o}tsParseImportType(){let e=this.startNode();return this.expect(83),this.expect(10),this.match(134)?e.argument=this.parseStringLiteral(this.state.value):(this.raise(x.UnsupportedImportTypeArgument,this.state.startLoc),e.argument=super.parseExprAtom()),this.eat(12)?e.options=this.tsParseImportTypeOptions():e.options=null,this.expect(11),this.eat(16)&&(e.qualifier=this.tsParseEntityName(3)),this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSImportType")}tsParseImportTypeOptions(){let e=this.startNode();this.expect(5);let s=this.startNode();return this.isContextual(76)?(s.method=!1,s.key=this.parseIdentifier(!0),s.computed=!1,s.shorthand=!1):this.unexpected(null,76),this.expect(14),s.value=this.tsParseImportTypeWithPropertyValue(),e.properties=[this.finishObjectProperty(s)],this.eat(12),this.expect(8),this.finishNode(e,"ObjectExpression")}tsParseImportTypeWithPropertyValue(){let e=this.startNode(),s=[];for(this.expect(5);!this.match(8);){let i=this.state.type;k(i)||i===134?s.push(super.parsePropertyDefinition(null)):this.unexpected(),this.eat(12)}return e.properties=s,this.next(),this.finishNode(e,"ObjectExpression")}tsParseEntityName(e){let s;if(e&1&&this.match(78))if(e&2)s=this.parseIdentifier(!0);else{let i=this.startNode();this.next(),s=this.finishNode(i,"ThisExpression")}else s=this.parseIdentifier(!!(e&1));for(;this.eat(16);){let i=this.startNodeAtNode(s);i.left=s,i.right=this.parseIdentifier(!!(e&1)),s=this.finishNode(i,"TSQualifiedName")}return s}tsParseTypeReference(){let e=this.startNode();return e.typeName=this.tsParseEntityName(1),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeReference")}tsParseThisTypePredicate(e){this.next();let s=this.startNodeAtNode(e);return s.parameterName=e,s.typeAnnotation=this.tsParseTypeAnnotation(!1),s.asserts=!1,this.finishNode(s,"TSTypePredicate")}tsParseThisTypeNode(){let e=this.startNode();return this.next(),this.finishNode(e,"TSThisType")}tsParseTypeQuery(){let e=this.startNode();return this.expect(87),this.match(83)?e.exprName=this.tsParseImportType():e.exprName=this.tsParseEntityName(3),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeQuery")}tsParseTypeParameter(e){let s=this.startNode();return e(s),s.name=this.tsParseTypeParameterName(),s.constraint=this.tsEatThenParseType(81),s.default=this.tsEatThenParseType(29),this.finishNode(s,"TSTypeParameter")}tsTryParseTypeParameters(e){if(this.match(47))return this.tsParseTypeParameters(e)}tsParseTypeParameters(e){let s=this.startNode();this.match(47)||this.match(143)?this.next():this.unexpected();let i={value:-1};return s.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,e),!1,!0,i),s.params.length===0&&this.raise(x.EmptyTypeParameters,s),i.value!==-1&&this.addExtra(s,"trailingComma",i.value),this.finishNode(s,"TSTypeParameterDeclaration")}tsFillSignature(e,s){let i=e===19,n="parameters",a="typeAnnotation";s.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),s[n]=this.tsParseBindingListForSignature(),i?s[a]=this.tsParseTypeOrTypePredicateAnnotation(e):this.match(e)&&(s[a]=this.tsParseTypeOrTypePredicateAnnotation(e))}tsParseBindingListForSignature(){let e=super.parseBindingList(11,41,2);for(let s of e){let{type:i}=s;(i==="AssignmentPattern"||i==="TSParameterProperty")&&this.raise(x.UnsupportedSignatureParameterKind,s,{type:i})}return e}tsParseTypeMemberSemicolon(){!this.eat(12)&&!this.isLineTerminator()&&this.expect(13)}tsParseSignatureMember(e,s){return this.tsFillSignature(14,s),this.tsParseTypeMemberSemicolon(),this.finishNode(s,e)}tsIsUnambiguouslyIndexSignature(){return this.next(),k(this.state.type)?(this.next(),this.match(14)):!1}tsTryParseIndexSignature(e){if(!(this.match(0)&&this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this))))return;this.expect(0);let s=this.parseIdentifier();s.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(s),this.expect(3),e.parameters=[s];let i=this.tsTryParseTypeAnnotation();return i&&(e.typeAnnotation=i),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSIndexSignature")}tsParsePropertyOrMethodSignature(e,s){if(this.eat(17)&&(e.optional=!0),this.match(10)||this.match(47)){s&&this.raise(x.ReadonlyForMethodSignature,e);let i=e;i.kind&&this.match(47)&&this.raise(x.AccessorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,i),this.tsParseTypeMemberSemicolon();let n="parameters",a="typeAnnotation";if(i.kind==="get")i[n].length>0&&(this.raise(p.BadGetterArity,this.state.curPosition()),this.isThisParam(i[n][0])&&this.raise(x.AccessorCannotDeclareThisParameter,this.state.curPosition()));else if(i.kind==="set"){if(i[n].length!==1)this.raise(p.BadSetterArity,this.state.curPosition());else{let o=i[n][0];this.isThisParam(o)&&this.raise(x.AccessorCannotDeclareThisParameter,this.state.curPosition()),o.type==="Identifier"&&o.optional&&this.raise(x.SetAccessorCannotHaveOptionalParameter,this.state.curPosition()),o.type==="RestElement"&&this.raise(x.SetAccessorCannotHaveRestParameter,this.state.curPosition())}i[a]&&this.raise(x.SetAccessorCannotHaveReturnType,i[a])}else i.kind="method";return this.finishNode(i,"TSMethodSignature")}else{let i=e;s&&(i.readonly=!0);let n=this.tsTryParseTypeAnnotation();return n&&(i.typeAnnotation=n),this.tsParseTypeMemberSemicolon(),this.finishNode(i,"TSPropertySignature")}}tsParseTypeMember(){let e=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",e);if(this.match(77)){let i=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",e):(e.key=this.createIdentifier(i,"new"),this.tsParsePropertyOrMethodSignature(e,!1))}this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},e);let s=this.tsTryParseIndexSignature(e);return s||(super.parsePropertyName(e),!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.tsTokenCanFollowModifier()&&(e.kind=e.key.name,super.parsePropertyName(e),!this.match(10)&&!this.match(47)&&this.unexpected(null,10)),this.tsParsePropertyOrMethodSignature(e,!!e.readonly))}tsParseTypeLiteral(){let e=this.startNode();return e.members=this.tsParseObjectTypeMembers(),this.finishNode(e,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);let e=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),e}tsIsStartOfMappedType(){return this.next(),this.eat(53)?this.isContextual(122):(this.isContextual(122)&&this.next(),!this.match(0)||(this.next(),!this.tsIsIdentifier())?!1:(this.next(),this.match(58)))}tsParseMappedType(){let e=this.startNode();this.expect(5),this.match(53)?(e.readonly=this.state.value,this.next(),this.expectContextual(122)):this.eatContextual(122)&&(e.readonly=!0),this.expect(0);let s=this.startNode();return s.name=this.tsParseTypeParameterName(),s.constraint=this.tsExpectThenParseType(58),e.typeParameter=this.finishNode(s,"TSTypeParameter"),e.nameType=this.eatContextual(93)?this.tsParseType():null,this.expect(3),this.match(53)?(e.optional=this.state.value,this.next(),this.expect(17)):this.eat(17)&&(e.optional=!0),e.typeAnnotation=this.tsTryParseType(),this.semicolon(),this.expect(8),this.finishNode(e,"TSMappedType")}tsParseTupleType(){let e=this.startNode();e.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let s=!1;return e.elementTypes.forEach(i=>{let{type:n}=i;s&&n!=="TSRestType"&&n!=="TSOptionalType"&&!(n==="TSNamedTupleMember"&&i.optional)&&this.raise(x.OptionalTypeBeforeRequired,i),s||(s=n==="TSNamedTupleMember"&&i.optional||n==="TSOptionalType")}),this.finishNode(e,"TSTupleType")}tsParseTupleElementType(){let e=this.state.startLoc,s=this.eat(21),{startLoc:i}=this.state,n,a,o,l,u=X(this.state.type)?this.lookaheadCharCode():null;if(u===58)n=!0,o=!1,a=this.parseIdentifier(!0),this.expect(14),l=this.tsParseType();else if(u===63){o=!0;let f=this.state.value,d=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(n=!0,a=this.createIdentifier(this.startNodeAt(i),f),this.expect(17),this.expect(14),l=this.tsParseType()):(n=!1,l=d,this.expect(17))}else l=this.tsParseType(),o=this.eat(17),n=this.eat(14);if(n){let f;a?(f=this.startNodeAt(i),f.optional=o,f.label=a,f.elementType=l,this.eat(17)&&(f.optional=!0,this.raise(x.TupleOptionalAfterType,this.state.lastTokStartLoc))):(f=this.startNodeAt(i),f.optional=o,this.raise(x.InvalidTupleMemberLabel,l),f.label=l,f.elementType=this.tsParseType()),l=this.finishNode(f,"TSNamedTupleMember")}else if(o){let f=this.startNodeAt(i);f.typeAnnotation=l,l=this.finishNode(f,"TSOptionalType")}if(s){let f=this.startNodeAt(e);f.typeAnnotation=l,l=this.finishNode(f,"TSRestType")}return l}tsParseParenthesizedType(){let e=this.startNode();return this.expect(10),e.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(e,"TSParenthesizedType")}tsParseFunctionOrConstructorType(e,s){let i=this.startNode();return e==="TSConstructorType"&&(i.abstract=!!s,s&&this.next(),this.next()),this.tsInAllowConditionalTypesContext(()=>this.tsFillSignature(19,i)),this.finishNode(i,e)}tsParseLiteralTypeNode(){let e=this.startNode();switch(this.state.type){case 135:case 136:case 134:case 85:case 86:e.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(e,"TSLiteralType")}tsParseTemplateLiteralType(){let e=this.startNode();return e.literal=super.parseTemplate(!1),this.finishNode(e,"TSLiteralType")}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){let e=this.tsParseThisTypeNode();return this.isContextual(116)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(e):e}tsParseNonArrayType(){switch(this.state.type){case 134:case 135:case 136:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if(this.state.value==="-"){let e=this.startNode(),s=this.lookahead();return s.type!==135&&s.type!==136&&this.unexpected(),e.literal=this.parseMaybeUnary(),this.finishNode(e,"TSLiteralType")}break;case 78:return this.tsParseThisTypeOrThisTypePredicate();case 87:return this.tsParseTypeQuery();case 83:return this.tsParseImportType();case 5:return this.tsLookAhead(this.tsIsStartOfMappedType.bind(this))?this.tsParseMappedType():this.tsParseTypeLiteral();case 0:return this.tsParseTupleType();case 10:return this.tsParseParenthesizedType();case 25:case 24:return this.tsParseTemplateLiteralType();default:{let{type:e}=this.state;if(k(e)||e===88||e===84){let s=e===88?"TSVoidKeyword":e===84?"TSNullKeyword":nn(this.state.value);if(s!==void 0&&this.lookaheadCharCode()!==46){let i=this.startNode();return this.next(),this.finishNode(i,s)}return this.tsParseTypeReference()}}}throw this.unexpected()}tsParseArrayTypeOrHigher(){let{startLoc:e}=this.state,s=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){let i=this.startNodeAt(e);i.elementType=s,this.expect(3),s=this.finishNode(i,"TSArrayType")}else{let i=this.startNodeAt(e);i.objectType=s,i.indexType=this.tsParseType(),this.expect(3),s=this.finishNode(i,"TSIndexedAccessType")}return s}tsParseTypeOperator(){let e=this.startNode(),s=this.state.value;return this.next(),e.operator=s,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),s==="readonly"&&this.tsCheckTypeAnnotationForReadOnly(e),this.finishNode(e,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(e){switch(e.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(x.UnexpectedReadonly,e)}}tsParseInferType(){let e=this.startNode();this.expectContextual(115);let s=this.startNode();return s.name=this.tsParseTypeParameterName(),s.constraint=this.tsTryParse(()=>this.tsParseConstraintForInferType()),e.typeParameter=this.finishNode(s,"TSTypeParameter"),this.finishNode(e,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){let e=this.tsInDisallowConditionalTypesContext(()=>this.tsParseType());if(this.state.inDisallowConditionalTypesContext||!this.match(17))return e}}tsParseTypeOperatorOrHigher(){return Ir(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(e,s,i){let n=this.startNode(),a=this.eat(i),o=[];do o.push(s());while(this.eat(i));return o.length===1&&!a?o[0]:(n.types=o,this.finishNode(n,e))}tsParseIntersectionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSIntersectionType",this.tsParseTypeOperatorOrHigher.bind(this),45)}tsParseUnionTypeOrHigher(){return this.tsParseUnionOrIntersectionType("TSUnionType",this.tsParseIntersectionTypeOrHigher.bind(this),43)}tsIsStartOfFunctionType(){return this.match(47)?!0:this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(k(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){let{errors:e}=this.state,s=e.length;try{return this.parseObjectLike(8,!0),e.length===s}catch{return!1}}if(this.match(0)){this.next();let{errors:e}=this.state,s=e.length;try{return super.parseBindingList(3,93,1),e.length===s}catch{return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){return this.next(),!!(this.match(11)||this.match(21)||this.tsSkipParameterStart()&&(this.match(14)||this.match(12)||this.match(17)||this.match(29)||this.match(11)&&(this.next(),this.match(19))))}tsParseTypeOrTypePredicateAnnotation(e){return this.tsInType(()=>{let s=this.startNode();this.expect(e);let i=this.startNode(),n=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(n&&this.match(78)){let l=this.tsParseThisTypeOrThisTypePredicate();return l.type==="TSThisType"?(i.parameterName=l,i.asserts=!0,i.typeAnnotation=null,l=this.finishNode(i,"TSTypePredicate")):(this.resetStartLocationFromNode(l,i),l.asserts=!0),s.typeAnnotation=l,this.finishNode(s,"TSTypeAnnotation")}let a=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!a)return n?(i.parameterName=this.parseIdentifier(),i.asserts=n,i.typeAnnotation=null,s.typeAnnotation=this.finishNode(i,"TSTypePredicate"),this.finishNode(s,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,s);let o=this.tsParseTypeAnnotation(!1);return i.parameterName=a,i.typeAnnotation=o,i.asserts=n,s.typeAnnotation=this.finishNode(i,"TSTypePredicate"),this.finishNode(s,"TSTypeAnnotation")})}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}tsTryParseTypeAnnotation(){if(this.match(14))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){let e=this.parseIdentifier();if(this.isContextual(116)&&!this.hasPrecedingLineBreak())return this.next(),e}tsParseTypePredicateAsserts(){if(this.state.type!==109)return!1;let e=this.state.containsEsc;return this.next(),!k(this.state.type)&&!this.match(78)?!1:(e&&this.raise(p.InvalidEscapedReservedWord,this.state.lastTokStartLoc,{reservedWord:"asserts"}),!0)}tsParseTypeAnnotation(e=!0,s=this.startNode()){return this.tsInType(()=>{e&&this.expect(14),s.typeAnnotation=this.tsParseType()}),this.finishNode(s,"TSTypeAnnotation")}tsParseType(){js(this.state.inType);let e=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return e;let s=this.startNodeAtNode(e);return s.checkType=e,s.extendsType=this.tsInDisallowConditionalTypesContext(()=>this.tsParseNonConditionalType()),this.expect(17),s.trueType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.expect(14),s.falseType=this.tsInAllowConditionalTypesContext(()=>this.tsParseType()),this.finishNode(s,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(124)&&this.isLookaheadContextual("new")}tsParseNonConditionalType(){return this.tsIsStartOfFunctionType()?this.tsParseFunctionOrConstructorType("TSFunctionType"):this.match(77)?this.tsParseFunctionOrConstructorType("TSConstructorType"):this.isAbstractConstructorSignature()?this.tsParseFunctionOrConstructorType("TSConstructorType",!0):this.tsParseUnionTypeOrHigher()}tsParseTypeAssertion(){this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(x.ReservedTypeAssertion,this.state.startLoc);let e=this.startNode();return e.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?this.tsParseTypeReference():this.tsParseType())),this.expect(48),e.expression=this.parseMaybeUnary(),this.finishNode(e,"TSTypeAssertion")}tsParseHeritageClause(e){let s=this.state.startLoc,i=this.tsParseDelimitedList("HeritageClauseElement",()=>{let n=this.startNode();return n.expression=this.tsParseEntityName(3),this.match(47)&&(n.typeParameters=this.tsParseTypeArguments()),this.finishNode(n,"TSExpressionWithTypeArguments")});return i.length||this.raise(x.EmptyHeritageClauseType,s,{token:e}),i}tsParseInterfaceDeclaration(e,s={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),s.declare&&(e.declare=!0),k(this.state.type)?(e.id=this.parseIdentifier(),this.checkIdentifier(e.id,130)):(e.id=null,this.raise(x.MissingInterfaceName,this.state.startLoc)),e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(e.extends=this.tsParseHeritageClause("extends"));let i=this.startNode();return i.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),e.body=this.finishNode(i,"TSInterfaceBody"),this.finishNode(e,"TSInterfaceDeclaration")}tsParseTypeAliasDeclaration(e){return e.id=this.parseIdentifier(),this.checkIdentifier(e.id,2),e.typeAnnotation=this.tsInType(()=>{if(e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutModifiers),this.expect(29),this.isContextual(114)&&this.lookaheadCharCode()!==46){let s=this.startNode();return this.next(),this.finishNode(s,"TSIntrinsicKeyword")}return this.tsParseType()}),this.semicolon(),this.finishNode(e,"TSTypeAliasDeclaration")}tsInTopLevelContext(e){if(this.curContext()!==C.brace){let s=this.state.context;this.state.context=[s[0]];try{return e()}finally{this.state.context=s}}else return e()}tsInType(e){let s=this.state.inType;this.state.inType=!0;try{return e()}finally{this.state.inType=s}}tsInDisallowConditionalTypesContext(e){let s=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return e()}finally{this.state.inDisallowConditionalTypesContext=s}}tsInAllowConditionalTypesContext(e){let s=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return e()}finally{this.state.inDisallowConditionalTypesContext=s}}tsEatThenParseType(e){if(this.match(e))return this.tsNextThenParseType()}tsExpectThenParseType(e){return this.tsInType(()=>(this.expect(e),this.tsParseType()))}tsNextThenParseType(){return this.tsInType(()=>(this.next(),this.tsParseType()))}tsParseEnumMember(){let e=this.startNode();return e.id=this.match(134)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(e.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(e,"TSEnumMember")}tsParseEnumDeclaration(e,s={}){return s.const&&(e.const=!0),s.declare&&(e.declare=!0),this.expectContextual(126),e.id=this.parseIdentifier(),this.checkIdentifier(e.id,e.const?8971:8459),this.expect(5),e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(e,"TSEnumDeclaration")}tsParseEnumBody(){let e=this.startNode();return this.expect(5),e.members=this.tsParseDelimitedList("EnumMembers",this.tsParseEnumMember.bind(this)),this.expect(8),this.finishNode(e,"TSEnumBody")}tsParseModuleBlock(){let e=this.startNode();return this.scope.enter(0),this.expect(5),super.parseBlockOrModuleBlockBody(e.body=[],void 0,!0,8),this.scope.exit(),this.finishNode(e,"TSModuleBlock")}tsParseModuleOrNamespaceDeclaration(e,s=!1){if(e.id=this.parseIdentifier(),s||this.checkIdentifier(e.id,1024),this.eat(16)){let i=this.startNode();this.tsParseModuleOrNamespaceDeclaration(i,!0),e.body=i}else this.scope.enter(1024),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(e,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(e){return this.isContextual(112)?(e.kind="global",e.global=!0,e.id=this.parseIdentifier()):this.match(134)?(e.kind="module",e.id=super.parseStringLiteral(this.state.value)):this.unexpected(),this.match(5)?(this.scope.enter(1024),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(e,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(e,s,i){e.isExport=i||!1,e.id=s||this.parseIdentifier(),this.checkIdentifier(e.id,4096),this.expect(29);let n=this.tsParseModuleReference();return e.importKind==="type"&&n.type!=="TSExternalModuleReference"&&this.raise(x.ImportAliasHasImportType,n),e.moduleReference=n,this.semicolon(),this.finishNode(e,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(119)&&this.lookaheadCharCode()===40}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(0)}tsParseExternalModuleReference(){let e=this.startNode();return this.expectContextual(119),this.expect(10),this.match(134)||this.unexpected(),e.expression=super.parseExprAtom(),this.expect(11),this.sawUnambiguousESM=!0,this.finishNode(e,"TSExternalModuleReference")}tsLookAhead(e){let s=this.state.clone(),i=e();return this.state=s,i}tsTryParseAndCatch(e){let s=this.tryParse(i=>e()||i());if(!(s.aborted||!s.node))return s.error&&(this.state=s.failState),s.node}tsTryParse(e){let s=this.state.clone(),i=e();if(i!==void 0&&i!==!1)return i;this.state=s}tsTryParseDeclare(e){if(this.isLineTerminator())return;let s=this.state.type;return this.tsInAmbientContext(()=>{switch(s){case 68:return e.declare=!0,super.parseFunctionStatement(e,!1,!1);case 80:return e.declare=!0,this.parseClass(e,!0,!1);case 126:return this.tsParseEnumDeclaration(e,{declare:!0});case 112:return this.tsParseAmbientExternalModuleDeclaration(e);case 100:if(this.state.containsEsc)return;case 75:case 74:return!this.match(75)||!this.isLookaheadContextual("enum")?(e.declare=!0,this.parseVarStatement(e,this.state.value,!0)):(this.expect(75),this.tsParseEnumDeclaration(e,{const:!0,declare:!0}));case 107:if(this.isUsing())return this.raise(x.InvalidModifierOnUsingDeclaration,this.state.startLoc,"declare"),e.declare=!0,this.parseVarStatement(e,"using",!0);break;case 96:if(this.isAwaitUsing())return this.raise(x.InvalidModifierOnAwaitUsingDeclaration,this.state.startLoc,"declare"),e.declare=!0,this.next(),this.parseVarStatement(e,"await using",!0);break;case 129:{let i=this.tsParseInterfaceDeclaration(e,{declare:!0});if(i)return i}default:if(k(s))return this.tsParseDeclaration(e,this.state.type,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.type,!0,null)}tsParseDeclaration(e,s,i,n){switch(s){case 124:if(this.tsCheckLineTerminator(i)&&(this.match(80)||k(this.state.type)))return this.tsParseAbstractDeclaration(e,n);break;case 127:if(this.tsCheckLineTerminator(i)){if(this.match(134))return this.tsParseAmbientExternalModuleDeclaration(e);if(k(this.state.type))return e.kind="module",this.tsParseModuleOrNamespaceDeclaration(e)}break;case 128:if(this.tsCheckLineTerminator(i)&&k(this.state.type))return e.kind="namespace",this.tsParseModuleOrNamespaceDeclaration(e);break;case 130:if(this.tsCheckLineTerminator(i)&&k(this.state.type))return this.tsParseTypeAliasDeclaration(e);break}}tsCheckLineTerminator(e){return e?this.hasFollowingLineBreak()?!1:(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(e){if(!this.match(47))return;let s=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;let i=this.tsTryParseAndCatch(()=>{let n=this.startNodeAt(e);return n.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(n),n.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),n});if(this.state.maybeInArrowParameters=s,!!i)return super.parseArrowExpression(i,null,!0)}tsParseTypeArgumentsInExpression(){if(this.reScan_lt()===47)return this.tsParseTypeArguments()}tsParseTypeArguments(){let e=this.startNode();return e.params=this.tsInType(()=>this.tsInTopLevelContext(()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))),e.params.length===0?this.raise(x.EmptyTypeArguments,e):!this.state.inType&&this.curContext()===C.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(e,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return Cr(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseBindingElement(e,s){let i=s.length?s[0].loc.start:this.state.startLoc,n={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},n);let a=n.accessibility,o=n.override,l=n.readonly;!(e&4)&&(a||l||o)&&this.raise(x.UnexpectedParameterModifier,i);let c=this.parseMaybeDefault();e&2&&this.parseFunctionParamType(c);let u=this.parseMaybeDefault(c.loc.start,c);if(a||l||o){let f=this.startNodeAt(i);return s.length&&(f.decorators=s),a&&(f.accessibility=a),l&&(f.readonly=l),o&&(f.override=o),u.type!=="Identifier"&&u.type!=="AssignmentPattern"&&this.raise(x.UnsupportedParameterPropertyKind,f),f.parameter=u,this.finishNode(f,"TSParameterProperty")}return s.length&&(c.decorators=s),u}isSimpleParameter(e){return e.type==="TSParameterProperty"&&super.isSimpleParameter(e.parameter)||super.isSimpleParameter(e)}tsDisallowOptionalPattern(e){for(let s of e.params)s.type!=="Identifier"&&s.optional&&!this.state.isAmbientContext&&this.raise(x.PatternIsOptional,s)}setArrowFunctionParameters(e,s,i){super.setArrowFunctionParameters(e,s,i),this.tsDisallowOptionalPattern(e)}parseFunctionBodyAndFinish(e,s,i=!1){this.match(14)&&(e.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));let n=s==="FunctionDeclaration"?"TSDeclareFunction":s==="ClassMethod"||s==="ClassPrivateMethod"?"TSDeclareMethod":void 0;return n&&!this.match(5)&&this.isLineTerminator()?this.finishNode(e,n):n==="TSDeclareFunction"&&this.state.isAmbientContext&&(this.raise(x.DeclareFunctionHasImplementation,e),e.declare)?super.parseFunctionBodyAndFinish(e,n,i):(this.tsDisallowOptionalPattern(e),super.parseFunctionBodyAndFinish(e,s,i))}registerFunctionStatementId(e){!e.body&&e.id?this.checkIdentifier(e.id,1024):super.registerFunctionStatementId(e)}tsCheckForInvalidTypeCasts(e){e.forEach(s=>{s?.type==="TSTypeCastExpression"&&this.raise(x.UnexpectedTypeAnnotation,s.typeAnnotation)})}toReferencedList(e,s){return this.tsCheckForInvalidTypeCasts(e),e}parseArrayLike(e,s,i){let n=super.parseArrayLike(e,s,i);return n.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(n.elements),n}parseSubscript(e,s,i,n){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();let o=this.startNodeAt(s);return o.expression=e,this.finishNode(o,"TSNonNullExpression")}let a=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(i)return n.stop=!0,e;n.optionalChainMember=a=!0,this.next()}if(this.match(47)||this.match(51)){let o,l=this.tsTryParseAndCatch(()=>{if(!i&&this.atPossibleAsyncArrow(e)){let d=this.tsTryParseGenericAsyncArrowFunction(s);if(d)return n.stop=!0,d}let c=this.tsParseTypeArgumentsInExpression();if(!c)return;if(a&&!this.match(10)){o=this.state.curPosition();return}if(ze(this.state.type)){let d=super.parseTaggedTemplateExpression(e,s,n);return d.typeParameters=c,d}if(!i&&this.eat(10)){let d=this.startNodeAt(s);return d.callee=e,d.arguments=this.parseCallExpressionArguments(),this.tsCheckForInvalidTypeCasts(d.arguments),d.typeParameters=c,n.optionalChainMember&&(d.optional=a),this.finishCallExpression(d,n.optionalChainMember)}let u=this.state.type;if(u===48||u===52||u!==10&&u!==93&&u!==120&&we(u)&&!this.hasPrecedingLineBreak())return;let f=this.startNodeAt(s);return f.expression=e,f.typeParameters=c,this.finishNode(f,"TSInstantiationExpression")});if(o&&this.unexpected(o,10),l)return l.type==="TSInstantiationExpression"&&((this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise(x.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),!this.match(16)&&!this.match(18)&&(l.expression=super.stopParseSubscript(e,n))),l}return super.parseSubscript(e,s,i,n)}parseNewCallee(e){var s;super.parseNewCallee(e);let{callee:i}=e;i.type==="TSInstantiationExpression"&&!((s=i.extra)!=null&&s.parenthesized)&&(e.typeParameters=i.typeParameters,e.callee=i.expression)}parseExprOp(e,s,i){let n;if(He(58)>i&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(n=this.isContextual(120)))){let a=this.startNodeAt(s);return a.expression=e,a.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?(n&&this.raise(p.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(a,n?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(a,s,i)}return super.parseExprOp(e,s,i)}checkReservedWord(e,s,i,n){this.state.isAmbientContext||super.checkReservedWord(e,s,i,n)}checkImportReflection(e){super.checkImportReflection(e),e.module&&e.importKind!=="value"&&this.raise(x.ImportReflectionHasImportType,e.specifiers[0].loc.start)}checkDuplicateExports(){}isPotentialImportPhase(e){if(super.isPotentialImportPhase(e))return!0;if(this.isContextual(130)){let s=this.lookaheadCharCode();return e?s===123||s===42:s!==61}return!e&&this.isContextual(87)}applyImportPhase(e,s,i,n){super.applyImportPhase(e,s,i,n),s?e.exportKind=i==="type"?"type":"value":e.importKind=i==="type"||i==="typeof"?i:"value"}parseImport(e){if(this.match(134))return e.importKind="value",super.parseImport(e);let s;if(k(this.state.type)&&this.lookaheadCharCode()===61)return e.importKind="value",this.tsParseImportEqualsDeclaration(e);if(this.isContextual(130)){let i=this.parseMaybeImportPhase(e,!1);if(this.lookaheadCharCode()===61)return this.tsParseImportEqualsDeclaration(e,i);s=super.parseImportSpecifiersAndAfter(e,i)}else s=super.parseImport(e);return s.importKind==="type"&&s.specifiers.length>1&&s.specifiers[0].type==="ImportDefaultSpecifier"&&this.raise(x.TypeImportCannotSpecifyDefaultAndNamed,s),s}parseExport(e,s){if(this.match(83)){let i=e;this.next();let n=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?n=this.parseMaybeImportPhase(i,!1):i.importKind="value",this.tsParseImportEqualsDeclaration(i,n,!0)}else if(this.eat(29)){let i=e;return i.expression=super.parseExpression(),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(i,"TSExportAssignment")}else if(this.eatContextual(93)){let i=e;return this.expectContextual(128),i.id=this.parseIdentifier(),this.semicolon(),this.finishNode(i,"TSNamespaceExportDeclaration")}else return super.parseExport(e,s)}isAbstractClass(){return this.isContextual(124)&&this.isLookaheadContextual("class")}parseExportDefaultExpression(){if(this.isAbstractClass()){let e=this.startNode();return this.next(),e.abstract=!0,this.parseClass(e,!0,!0)}if(this.match(129)){let e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e}return super.parseExportDefaultExpression()}parseVarStatement(e,s,i=!1){let{isAmbientContext:n}=this.state,a=super.parseVarStatement(e,s,i||n);if(!n)return a;if(!e.declare&&(s==="using"||s==="await using"))return this.raiseOverwrite(x.UsingDeclarationInAmbientContext,e,s),a;for(let{id:o,init:l}of a.declarations)l&&(s==="var"||s==="let"||o.typeAnnotation?this.raise(x.InitializerNotAllowedInAmbientContext,l):cn(l,this.hasPlugin("estree"))||this.raise(x.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,l));return a}parseStatementContent(e,s){if(!this.state.containsEsc)switch(this.state.type){case 75:{if(this.isLookaheadContextual("enum")){let i=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(i,{const:!0})}break}case 124:case 125:{if(this.nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine()){let i=this.state.type,n=this.startNode();this.next();let a=i===125?this.tsTryParseDeclare(n):this.tsParseAbstractDeclaration(n,s);return a?(i===125&&(a.declare=!0),a):(n.expression=this.createIdentifier(this.startNodeAt(n.loc.start),i===125?"declare":"abstract"),this.semicolon(!1),this.finishNode(n,"ExpressionStatement"))}break}case 126:return this.tsParseEnumDeclaration(this.startNode());case 112:{if(this.lookaheadCharCode()===123){let n=this.startNode();return this.tsParseAmbientExternalModuleDeclaration(n)}break}case 129:{let i=this.tsParseInterfaceDeclaration(this.startNode());if(i)return i;break}case 127:{if(this.nextTokenIsIdentifierOrStringLiteralOnSameLine()){let i=this.startNode();return this.next(),this.tsParseDeclaration(i,127,!1,s)}break}case 128:{if(this.nextTokenIsIdentifierOnSameLine()){let i=this.startNode();return this.next(),this.tsParseDeclaration(i,128,!1,s)}break}case 130:{if(this.nextTokenIsIdentifierOnSameLine()){let i=this.startNode();return this.next(),this.tsParseTypeAliasDeclaration(i)}break}}return super.parseStatementContent(e,s)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(e,s){return s.some(i=>$s(i)?e.accessibility===i:!!e[i])}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&this.lookaheadCharCode()===123}parseClassMember(e,s,i){let n=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:n,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:x.InvalidModifierOnTypeParameterPositions},s);let a=h(()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(s,n)&&this.raise(x.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(e,s)):this.parseClassMemberWithIsStatic(e,s,i,!!s.static)},"callParseClassMemberWithIsStatic");s.declare?this.tsInAmbientContext(a):a()}parseClassMemberWithIsStatic(e,s,i,n){let a=this.tsTryParseIndexSignature(s);if(a){e.body.push(a),s.abstract&&this.raise(x.IndexSignatureHasAbstract,s),s.accessibility&&this.raise(x.IndexSignatureHasAccessibility,s,{modifier:s.accessibility}),s.declare&&this.raise(x.IndexSignatureHasDeclare,s),s.override&&this.raise(x.IndexSignatureHasOverride,s);return}!this.state.inAbstractClass&&s.abstract&&this.raise(x.NonAbstractClassHasAbstractMethod,s),s.override&&(i.hadSuperClass||this.raise(x.OverrideNotInSubClass,s)),super.parseClassMemberWithIsStatic(e,s,i,n)}parsePostMemberNameModifiers(e){this.eat(17)&&(e.optional=!0),e.readonly&&this.match(10)&&this.raise(x.ClassMethodHasReadonly,e),e.declare&&this.match(10)&&this.raise(x.ClassMethodHasDeclare,e)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(e,s,i){if(!this.match(17))return e;if(this.state.maybeInArrowParameters){let n=this.lookaheadCharCode();if(n===44||n===61||n===58||n===41)return this.setOptionalParametersError(i),e}return super.parseConditional(e,s,i)}parseParenItem(e,s){let i=super.parseParenItem(e,s);if(this.eat(17)&&(i.optional=!0,this.resetEndLocation(e)),this.match(14)){let n=this.startNodeAt(s);return n.expression=e,n.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(n,"TSTypeCastExpression")}return e}parseExportDeclaration(e){if(!this.state.isAmbientContext&&this.isContextual(125))return this.tsInAmbientContext(()=>this.parseExportDeclaration(e));let s=this.state.startLoc,i=this.eatContextual(125);if(i&&(this.isContextual(125)||!this.shouldParseExportDeclaration()))throw this.raise(x.ExpectedAmbientAfterExportDeclare,this.state.startLoc);let a=k(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(e);return a?((a.type==="TSInterfaceDeclaration"||a.type==="TSTypeAliasDeclaration"||i)&&(e.exportKind="type"),i&&a.type!=="TSImportEqualsDeclaration"&&(this.resetStartLocation(a,s),a.declare=!0),a):null}parseClassId(e,s,i,n){if((!s||i)&&this.isContextual(113))return;super.parseClassId(e,s,i,e.declare?1024:8331);let a=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);a&&(e.typeParameters=a)}parseClassPropertyAnnotation(e){e.optional||(this.eat(35)?e.definite=!0:this.eat(17)&&(e.optional=!0));let s=this.tsTryParseTypeAnnotation();s&&(e.typeAnnotation=s)}parseClassProperty(e){if(this.parseClassPropertyAnnotation(e),this.state.isAmbientContext&&!(e.readonly&&!e.typeAnnotation)&&this.match(29)&&this.raise(x.DeclareClassFieldHasInitializer,this.state.startLoc),e.abstract&&this.match(29)){let{key:s}=e;this.raise(x.AbstractPropertyHasInitializer,this.state.startLoc,{propertyName:s.type==="Identifier"&&!e.computed?s.name:`[${this.input.slice(this.offsetToSourcePos(s.start),this.offsetToSourcePos(s.end))}]`})}return super.parseClassProperty(e)}parseClassPrivateProperty(e){return e.abstract&&this.raise(x.PrivateElementHasAbstract,e),e.accessibility&&this.raise(x.PrivateElementHasAccessibility,e,{modifier:e.accessibility}),this.parseClassPropertyAnnotation(e),super.parseClassPrivateProperty(e)}parseClassAccessorProperty(e){return this.parseClassPropertyAnnotation(e),e.optional&&this.raise(x.AccessorCannotBeOptional,e),super.parseClassAccessorProperty(e)}pushClassMethod(e,s,i,n,a,o){let l=this.tsTryParseTypeParameters(this.tsParseConstModifier);l&&a&&this.raise(x.ConstructorHasTypeParameters,l);let{declare:c=!1,kind:u}=s;c&&(u==="get"||u==="set")&&this.raise(x.DeclareAccessor,s,{kind:u}),l&&(s.typeParameters=l),super.pushClassMethod(e,s,i,n,a,o)}pushClassPrivateMethod(e,s,i,n){let a=this.tsTryParseTypeParameters(this.tsParseConstModifier);a&&(s.typeParameters=a),super.pushClassPrivateMethod(e,s,i,n)}declareClassPrivateMethodInScope(e,s){e.type!=="TSDeclareMethod"&&(e.type==="MethodDefinition"&&e.value.body==null||super.declareClassPrivateMethodInScope(e,s))}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass)if(e.superClass.type==="TSInstantiationExpression"){let s=e.superClass,i=s.expression;this.takeSurroundingComments(i,i.start,i.end);let n=s.typeParameters;this.takeSurroundingComments(n,n.start,n.end),e.superClass=i,e.superTypeParameters=n}else(this.match(47)||this.match(51))&&(e.superTypeParameters=this.tsParseTypeArgumentsInExpression());this.eatContextual(113)&&(e.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(e,s,i,n,a,o,l){let c=this.tsTryParseTypeParameters(this.tsParseConstModifier);return c&&(e.typeParameters=c),super.parseObjPropValue(e,s,i,n,a,o,l)}parseFunctionParams(e,s){let i=this.tsTryParseTypeParameters(this.tsParseConstModifier);i&&(e.typeParameters=i),super.parseFunctionParams(e,s)}parseVarId(e,s){super.parseVarId(e,s),e.id.type==="Identifier"&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(e.definite=!0);let i=this.tsTryParseTypeAnnotation();i&&(e.id.typeAnnotation=i,this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,s){return this.match(14)&&(e.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(e,s)}parseMaybeAssign(e,s){var i,n,a,o,l;let c,u,f;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(c=this.state.clone(),u=this.tryParse(()=>super.parseMaybeAssign(e,s),c),!u.error)return u.node;let{context:y}=this.state,S=y[y.length-1];(S===C.j_oTag||S===C.j_expr)&&y.pop()}if(!((i=u)!=null&&i.error)&&!this.match(47))return super.parseMaybeAssign(e,s);(!c||c===this.state)&&(c=this.state.clone());let d,m=this.tryParse(y=>{var S,O;d=this.tsParseTypeParameters(this.tsParseConstModifier);let P=super.parseMaybeAssign(e,s);return(P.type!=="ArrowFunctionExpression"||(S=P.extra)!=null&&S.parenthesized)&&y(),((O=d)==null?void 0:O.params.length)!==0&&this.resetStartLocationFromNode(P,d),P.typeParameters=d,P},c);if(!m.error&&!m.aborted)return d&&this.reportReservedArrowTypeParam(d),m.node;if(!u&&(js(!this.hasPlugin("jsx")),f=this.tryParse(()=>super.parseMaybeAssign(e,s),c),!f.error))return f.node;if((n=u)!=null&&n.node)return this.state=u.failState,u.node;if(m.node)return this.state=m.failState,d&&this.reportReservedArrowTypeParam(d),m.node;if((a=f)!=null&&a.node)return this.state=f.failState,f.node;throw((o=u)==null?void 0:o.error)||m.error||((l=f)==null?void 0:l.error)}reportReservedArrowTypeParam(e){var s;e.params.length===1&&!e.params[0].constraint&&!((s=e.extra)!=null&&s.trailingComma)&&this.getPluginOption("typescript","disallowAmbiguousJSXLike")&&this.raise(x.ReservedArrowTypeParam,e)}parseMaybeUnary(e,s){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(e,s)}parseArrow(e){if(this.match(14)){let s=this.tryParse(i=>{let n=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&i(),n});if(s.aborted)return;s.thrown||(s.error&&(this.state=s.failState),e.returnType=s.node)}return super.parseArrow(e)}parseFunctionParamType(e){this.eat(17)&&(e.optional=!0);let s=this.tsTryParseTypeAnnotation();return s&&(e.typeAnnotation=s),this.resetEndLocation(e),e}isAssignable(e,s){switch(e.type){case"TSTypeCastExpression":return this.isAssignable(e.expression,s);case"TSParameterProperty":return!0;default:return super.isAssignable(e,s)}}toAssignable(e,s=!1){switch(e.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(e,s);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":s?this.expressionScope.recordArrowParameterBindingError(x.UnexpectedTypeCastInParameter,e):this.raise(x.UnexpectedTypeCastInParameter,e),this.toAssignable(e.expression,s);break;case"AssignmentExpression":!s&&e.left.type==="TSTypeCastExpression"&&(e.left=this.typeCastToParameter(e.left));default:super.toAssignable(e,s)}}toAssignableParenthesizedExpression(e,s){switch(e.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(e.expression,s);break;default:super.toAssignable(e,s)}}checkToRestConversion(e,s){switch(e.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(e.expression,!1);break;default:super.checkToRestConversion(e,s)}}isValidLVal(e,s,i,n){switch(e){case"TSTypeCastExpression":return!0;case"TSParameterProperty":return"parameter";case"TSNonNullExpression":return"expression";case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":return(n!==64||!i)&&["expression",!0];default:return super.isValidLVal(e,s,i,n)}}parseBindingAtom(){return this.state.type===78?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(e,s){if(this.match(47)||this.match(51)){let i=this.tsParseTypeArgumentsInExpression();if(this.match(10)){let n=super.parseMaybeDecoratorArguments(e,s);return n.typeParameters=i,n}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(e,s)}checkCommaAfterRest(e){return this.state.isAmbientContext&&this.match(12)&&this.lookaheadCharCode()===e?(this.next(),!1):super.checkCommaAfterRest(e)}isClassMethod(){return this.match(47)||super.isClassMethod()}isClassProperty(){return this.match(35)||this.match(14)||super.isClassProperty()}parseMaybeDefault(e,s){let i=super.parseMaybeDefault(e,s);return i.type==="AssignmentPattern"&&i.typeAnnotation&&i.right.start<i.typeAnnotation.start&&this.raise(x.TypeAnnotationAfterAssign,i.typeAnnotation),i}getTokenFromCode(e){if(this.state.inType){if(e===62){this.finishOp(48,1);return}if(e===60){this.finishOp(47,1);return}}super.getTokenFromCode(e)}reScan_lt_gt(){let{type:e}=this.state;e===47?(this.state.pos-=1,this.readToken_lt()):e===48&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){let{type:e}=this.state;return e===51?(this.state.pos-=2,this.finishOp(47,1),47):e}toAssignableListItem(e,s,i){let n=e[s];n.type==="TSTypeCastExpression"&&(e[s]=this.typeCastToParameter(n)),super.toAssignableListItem(e,s,i)}typeCastToParameter(e){return e.expression.typeAnnotation=e.typeAnnotation,this.resetEndLocation(e.expression,e.typeAnnotation.loc.end),e.expression}shouldParseArrow(e){return this.match(14)?e.every(s=>this.isAssignable(s,!0)):super.shouldParseArrow(e)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}canHaveLeadingDecorator(){return super.canHaveLeadingDecorator()||this.isAbstractClass()}jsxParseOpeningElementAfterName(e){if(this.match(47)||this.match(51)){let s=this.tsTryParseAndCatch(()=>this.tsParseTypeArgumentsInExpression());s&&(e.typeParameters=s)}return super.jsxParseOpeningElementAfterName(e)}getGetterSetterExpectedParamCount(e){let s=super.getGetterSetterExpectedParamCount(e),n=this.getObjectOrClassMethodParams(e)[0];return n&&this.isThisParam(n)?s+1:s}parseCatchClauseParam(){let e=super.parseCatchClauseParam(),s=this.tsTryParseTypeAnnotation();return s&&(e.typeAnnotation=s,this.resetEndLocation(e)),e}tsInAmbientContext(e){let{isAmbientContext:s,strict:i}=this.state;this.state.isAmbientContext=!0,this.state.strict=!1;try{return e()}finally{this.state.isAmbientContext=s,this.state.strict=i}}parseClass(e,s,i){let n=this.state.inAbstractClass;this.state.inAbstractClass=!!e.abstract;try{return super.parseClass(e,s,i)}finally{this.state.inAbstractClass=n}}tsParseAbstractDeclaration(e,s){if(this.match(80))return e.abstract=!0,this.maybeTakeDecorators(s,this.parseClass(e,!0,!1));if(this.isContextual(129))return this.hasFollowingLineBreak()?null:(e.abstract=!0,this.raise(x.NonClassMethodPropertyHasAbstractModifier,e),this.tsParseInterfaceDeclaration(e));throw this.unexpected(null,80)}parseMethod(e,s,i,n,a,o,l){let c=super.parseMethod(e,s,i,n,a,o,l);if((c.abstract||c.type==="TSAbstractMethodDefinition")&&(this.hasPlugin("estree")?c.value:c).body){let{key:d}=c;this.raise(x.AbstractMethodHasImplementation,c,{methodName:d.type==="Identifier"&&!c.computed?d.name:`[${this.input.slice(this.offsetToSourcePos(d.start),this.offsetToSourcePos(d.end))}]`})}return c}tsParseTypeParameterName(){return this.parseIdentifier().name}shouldParseAsAmbientContext(){return!!this.getPluginOption("typescript","dts")}parse(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.parse()}getExpression(){return this.shouldParseAsAmbientContext()&&(this.state.isAmbientContext=!0),super.getExpression()}parseExportSpecifier(e,s,i,n){return!s&&n?(this.parseTypeOnlyImportExportSpecifier(e,!1,i),this.finishNode(e,"ExportSpecifier")):(e.exportKind="value",super.parseExportSpecifier(e,s,i,n))}parseImportSpecifier(e,s,i,n,a){return!s&&n?(this.parseTypeOnlyImportExportSpecifier(e,!0,i),this.finishNode(e,"ImportSpecifier")):(e.importKind="value",super.parseImportSpecifier(e,s,i,n,i?4098:4096))}parseTypeOnlyImportExportSpecifier(e,s,i){let n=s?"imported":"local",a=s?"local":"exported",o=e[n],l,c=!1,u=!0,f=o.loc.start;if(this.isContextual(93)){let m=this.parseIdentifier();if(this.isContextual(93)){let y=this.parseIdentifier();X(this.state.type)?(c=!0,o=m,l=s?this.parseIdentifier():this.parseModuleExportName(),u=!1):(l=y,u=!1)}else X(this.state.type)?(u=!1,l=s?this.parseIdentifier():this.parseModuleExportName()):(c=!0,o=m)}else X(this.state.type)&&(c=!0,s?(o=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(o.name,o.loc.start,!0,!0)):o=this.parseModuleExportName());c&&i&&this.raise(s?x.TypeModifierIsUsedInTypeImports:x.TypeModifierIsUsedInTypeExports,f),e[n]=o,e[a]=l;let d=s?"importKind":"exportKind";e[d]=c?"type":"value",u&&this.eatContextual(93)&&(e[a]=s?this.parseIdentifier():this.parseModuleExportName()),e[a]||(e[a]=this.cloneIdentifier(e[n])),s&&this.checkIdentifier(e[a],c?4098:4096)}fillOptionalPropertiesForTSESLint(e){var s,i,n,a,o,l,c,u,f,d,m,y,S,O,P,v,se,ie,ss,is,rs,ns,as,os,ls,cs,hs,us,ps,fs,ds,ms,ys,gs,xs,Ts,Es,Ps,Ss,bs,As,Ns,Is,Cs,ws,vs,ks,Os;switch(e.type){case"ExpressionStatement":(s=e.directive)!=null||(e.directive=void 0);return;case"RestElement":e.value=void 0;case"Identifier":case"ArrayPattern":case"AssignmentPattern":case"ObjectPattern":(i=e.decorators)!=null||(e.decorators=[]),(n=e.optional)!=null||(e.optional=!1),(a=e.typeAnnotation)!=null||(e.typeAnnotation=void 0);return;case"TSParameterProperty":(o=e.accessibility)!=null||(e.accessibility=void 0),(l=e.decorators)!=null||(e.decorators=[]),(c=e.override)!=null||(e.override=!1),(u=e.readonly)!=null||(e.readonly=!1),(f=e.static)!=null||(e.static=!1);return;case"TSEmptyBodyFunctionExpression":e.body=null;case"TSDeclareFunction":case"FunctionDeclaration":case"FunctionExpression":case"ClassMethod":case"ClassPrivateMethod":(d=e.declare)!=null||(e.declare=!1),(m=e.returnType)!=null||(e.returnType=void 0),(y=e.typeParameters)!=null||(e.typeParameters=void 0);return;case"Property":(S=e.optional)!=null||(e.optional=!1);return;case"TSMethodSignature":case"TSPropertySignature":(O=e.optional)!=null||(e.optional=!1);case"TSIndexSignature":(P=e.accessibility)!=null||(e.accessibility=void 0),(v=e.readonly)!=null||(e.readonly=!1),(se=e.static)!=null||(e.static=!1);return;case"TSAbstractPropertyDefinition":case"PropertyDefinition":case"TSAbstractAccessorProperty":case"AccessorProperty":(ie=e.declare)!=null||(e.declare=!1),(ss=e.definite)!=null||(e.definite=!1),(is=e.readonly)!=null||(e.readonly=!1),(rs=e.typeAnnotation)!=null||(e.typeAnnotation=void 0);case"TSAbstractMethodDefinition":case"MethodDefinition":(ns=e.accessibility)!=null||(e.accessibility=void 0),(as=e.decorators)!=null||(e.decorators=[]),(os=e.override)!=null||(e.override=!1),(ls=e.optional)!=null||(e.optional=!1);return;case"ClassExpression":(cs=e.id)!=null||(e.id=null);case"ClassDeclaration":(hs=e.abstract)!=null||(e.abstract=!1),(us=e.declare)!=null||(e.declare=!1),(ps=e.decorators)!=null||(e.decorators=[]),(fs=e.implements)!=null||(e.implements=[]),(ds=e.superTypeArguments)!=null||(e.superTypeArguments=void 0),(ms=e.typeParameters)!=null||(e.typeParameters=void 0);return;case"TSTypeAliasDeclaration":case"VariableDeclaration":(ys=e.declare)!=null||(e.declare=!1);return;case"VariableDeclarator":(gs=e.definite)!=null||(e.definite=!1);return;case"TSEnumDeclaration":(xs=e.const)!=null||(e.const=!1),(Ts=e.declare)!=null||(e.declare=!1);return;case"TSEnumMember":(Es=e.computed)!=null||(e.computed=!1);return;case"TSImportType":(Ps=e.qualifier)!=null||(e.qualifier=null),(Ss=e.options)!=null||(e.options=null);return;case"TSInterfaceDeclaration":(bs=e.declare)!=null||(e.declare=!1),(As=e.extends)!=null||(e.extends=[]);return;case"TSMappedType":(Ns=e.optional)!=null||(e.optional=!1),(Is=e.readonly)!=null||(e.readonly=void 0);return;case"TSModuleDeclaration":(Cs=e.declare)!=null||(e.declare=!1),(ws=e.global)!=null||(e.global=e.kind==="global");return;case"TSTypeParameter":(vs=e.const)!=null||(e.const=!1),(ks=e.in)!=null||(e.in=!1),(Os=e.out)!=null||(e.out=!1);return}}chStartsBindingIdentifierAndNotRelationalOperator(e,s){if(W(e)){if(lt.lastIndex=s,lt.test(this.input)){let i=this.codePointAtPos(lt.lastIndex);if(!ue(i)&&i!==92)return!1}return!0}else return e===92}nextTokenIsIdentifierAndNotTSRelationalOperatorOnSameLine(){let e=this.nextTokenInLineStart(),s=this.codePointAtPos(e);return this.chStartsBindingIdentifierAndNotRelationalOperator(s,e)}nextTokenIsIdentifierOrStringLiteralOnSameLine(){let e=this.nextTokenInLineStart(),s=this.codePointAtPos(e);return this.chStartsBindingIdentifier(s,e)||s===34||s===39}},"typescript");function ln(r){if(r.type!=="MemberExpression")return!1;let{computed:t,property:e}=r;return t&&e.type!=="StringLiteral"&&(e.type!=="TemplateLiteral"||e.expressions.length>0)?!1:ni(r.object)}h(ln,"isPossiblyLiteralEnum");function cn(r,t){var e;let{type:s}=r;if((e=r.extra)!=null&&e.parenthesized)return!1;if(t){if(s==="Literal"){let{value:i}=r;if(typeof i=="string"||typeof i=="boolean")return!0}}else if(s==="StringLiteral"||s==="BooleanLiteral")return!0;return!!(ri(r,t)||hn(r,t)||s==="TemplateLiteral"&&r.expressions.length===0||ln(r))}h(cn,"isValidAmbientConstInitializer");function ri(r,t){return t?r.type==="Literal"&&(typeof r.value=="number"||"bigint"in r):r.type==="NumericLiteral"||r.type==="BigIntLiteral"}h(ri,"isNumber");function hn(r,t){if(r.type==="UnaryExpression"){let{operator:e,argument:s}=r;if(e==="-"&&ri(s,t))return!0}return!1}h(hn,"isNegativeNumber");function ni(r){return r.type==="Identifier"?!0:r.type!=="MemberExpression"||r.computed?!1:ni(r.object)}h(ni,"isUncomputedMemberExpressionChain");var Hs=K`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),un=h(r=>class extends r{static{h(this,"PlaceholdersParserMixin")}parsePlaceholder(e){if(this.match(133)){let s=this.startNode();return this.next(),this.assertNoSpace(),s.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(133),this.finishPlaceholder(s,e)}}finishPlaceholder(e,s){let i=e;return(!i.expectedNode||!i.type)&&(i=this.finishNode(i,"Placeholder")),i.expectedNode=s,i}getTokenFromCode(e){e===37&&this.input.charCodeAt(this.state.pos+1)===37?this.finishOp(133,2):super.getTokenFromCode(e)}parseExprAtom(e){return this.parsePlaceholder("Expression")||super.parseExprAtom(e)}parseIdentifier(e){return this.parsePlaceholder("Identifier")||super.parseIdentifier(e)}checkReservedWord(e,s,i,n){e!==void 0&&super.checkReservedWord(e,s,i,n)}cloneIdentifier(e){let s=super.cloneIdentifier(e);return s.type==="Placeholder"&&(s.expectedNode=e.expectedNode),s}cloneStringLiteral(e){return e.type==="Placeholder"?this.cloneIdentifier(e):super.cloneStringLiteral(e)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(e,s,i,n){return e==="Placeholder"||super.isValidLVal(e,s,i,n)}toAssignable(e,s){e&&e.type==="Placeholder"&&e.expectedNode==="Expression"?e.expectedNode="Pattern":super.toAssignable(e,s)}chStartsBindingIdentifier(e,s){if(super.chStartsBindingIdentifier(e,s))return!0;let i=this.nextTokenStart();return this.input.charCodeAt(i)===37&&this.input.charCodeAt(i+1)===37}verifyBreakContinue(e,s){var i;((i=e.label)==null?void 0:i.type)!=="Placeholder"&&super.verifyBreakContinue(e,s)}parseExpressionStatement(e,s){var i;if(s.type!=="Placeholder"||(i=s.extra)!=null&&i.parenthesized)return super.parseExpressionStatement(e,s);if(this.match(14)){let a=e;return a.label=this.finishPlaceholder(s,"Identifier"),this.next(),a.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(a,"LabeledStatement")}this.semicolon();let n=e;return n.name=s.name,this.finishPlaceholder(n,"Statement")}parseBlock(e,s,i){return this.parsePlaceholder("BlockStatement")||super.parseBlock(e,s,i)}parseFunctionId(e){return this.parsePlaceholder("Identifier")||super.parseFunctionId(e)}parseClass(e,s,i){let n=s?"ClassDeclaration":"ClassExpression";this.next();let a=this.state.strict,o=this.parsePlaceholder("Identifier");if(o)if(this.match(81)||this.match(133)||this.match(5))e.id=o;else{if(i||!s)return e.id=null,e.body=this.finishPlaceholder(o,"ClassBody"),this.finishNode(e,n);throw this.raise(Hs.ClassNameIsRequired,this.state.startLoc)}else this.parseClassId(e,s,i);return super.parseClassSuper(e),e.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!e.superClass,a),this.finishNode(e,n)}parseExport(e,s){let i=this.parsePlaceholder("Identifier");if(!i)return super.parseExport(e,s);let n=e;if(!this.isContextual(98)&&!this.match(12))return n.specifiers=[],n.source=null,n.declaration=this.finishPlaceholder(i,"Declaration"),this.finishNode(n,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");let a=this.startNode();return a.exported=i,n.specifiers=[this.finishNode(a,"ExportDefaultSpecifier")],super.parseExport(n,s)}isExportDefaultSpecifier(){if(this.match(65)){let e=this.nextTokenStart();if(this.isUnparsedContextual(e,"from")&&this.input.startsWith(ae(133),this.nextTokenStartSince(e+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(e,s){var i;return(i=e.specifiers)!=null&&i.length?!0:super.maybeParseExportDefaultSpecifier(e,s)}checkExport(e){let{specifiers:s}=e;s!=null&&s.length&&(e.specifiers=s.filter(i=>i.exported.type==="Placeholder")),super.checkExport(e),e.specifiers=s}parseImport(e){let s=this.parsePlaceholder("Identifier");if(!s)return super.parseImport(e);if(e.specifiers=[],!this.isContextual(98)&&!this.match(12))return e.source=this.finishPlaceholder(s,"StringLiteral"),this.semicolon(),this.finishNode(e,"ImportDeclaration");let i=this.startNodeAtNode(s);return i.local=s,e.specifiers.push(this.finishNode(i,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(e)||this.parseNamedImportSpecifiers(e)),this.expectContextual(98),e.source=this.parseImportSource(),this.semicolon(),this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.offsetToSourcePos(this.state.lastTokEndLoc.index)&&this.raise(Hs.UnexpectedSpace,this.state.lastTokEndLoc)}},"placeholders"),pn=h(r=>class extends r{static{h(this,"V8IntrinsicMixin")}parseV8Intrinsic(){if(this.match(54)){let e=this.state.startLoc,s=this.startNode();if(this.next(),k(this.state.type)){let i=this.parseIdentifierName(),n=this.createIdentifier(s,i);if(this.castNodeTo(n,"V8IntrinsicIdentifier"),this.match(10))return n}this.unexpected(e)}}parseExprAtom(e){return this.parseV8Intrinsic()||super.parseExprAtom(e)}},"v8intrinsic"),Xs=["minimal","fsharp","hack","smart"],qs=["^^","@@","^","%","#"];function fn(r){if(r.has("decorators")){if(r.has("decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");let s=r.get("decorators").decoratorsBeforeExport;if(s!=null&&typeof s!="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");let i=r.get("decorators").allowCallParenthesized;if(i!=null&&typeof i!="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(r.has("flow")&&r.has("typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(r.has("placeholders")&&r.has("v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(r.has("pipelineOperator")){var t;let s=r.get("pipelineOperator").proposal;if(!Xs.includes(s)){let i=Xs.map(n=>`"${n}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${i}.`)}if(s==="hack"){var e;if(r.has("placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(r.has("v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");let i=r.get("pipelineOperator").topicToken;if(!qs.includes(i)){let n=qs.map(a=>`"${a}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${n}.`)}if(i==="#"&&((e=r.get("recordAndTuple"))==null?void 0:e.syntaxType)==="hash")throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple",r.get("recordAndTuple")])}\`.`)}else if(s==="smart"&&((t=r.get("recordAndTuple"))==null?void 0:t.syntaxType)==="hash")throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(["recordAndTuple",r.get("recordAndTuple")])}\`.`)}if(r.has("moduleAttributes")){if(r.has("deprecatedImportAssert")||r.has("importAssertions"))throw new Error("Cannot combine importAssertions, deprecatedImportAssert and moduleAttributes plugins.");if(r.get("moduleAttributes").version!=="may-2020")throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(r.has("importAssertions")&&r.has("deprecatedImportAssert"))throw new Error("Cannot combine importAssertions and deprecatedImportAssert plugins.");if(r.has("deprecatedImportAssert")||r.has("importAttributes")&&r.get("importAttributes").deprecatedAssertSyntax&&r.set("deprecatedImportAssert",{}),r.has("recordAndTuple")){let s=r.get("recordAndTuple").syntaxType;if(s!=null){let i=["hash","bar"];if(!i.includes(s))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+i.map(n=>`'${n}'`).join(", "))}}if(r.has("asyncDoExpressions")&&!r.has("doExpressions")){let s=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw s.missingPlugins="doExpressions",s}if(r.has("optionalChainingAssign")&&r.get("optionalChainingAssign").version!=="2023-07")throw new Error("The 'optionalChainingAssign' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is '2023-07'.");if(r.has("discardBinding")&&r.get("discardBinding").syntaxType!=="void")throw new Error("The 'discardBinding' plugin requires a 'syntaxType' option. Currently the only supported value is 'void'.")}h(fn,"validatePlugins");var ai={estree:yr,jsx:Wr,flow:Xr,typescript:on,v8intrinsic:pn,placeholders:un},dn=Object.keys(ai),kt=class extends vt{static{h(this,"ExpressionParser")}checkProto(t,e,s,i){if(t.type==="SpreadElement"||this.isObjectMethod(t)||t.computed||t.shorthand)return s;let n=t.key;return(n.type==="Identifier"?n.name:n.value)==="__proto__"?e?(this.raise(p.RecordNoProto,n),!0):(s&&(i?i.doubleProtoLoc===null&&(i.doubleProtoLoc=n.loc.start):this.raise(p.DuplicateProto,n)),!0):s}shouldExitDescending(t,e){return t.type==="ArrowFunctionExpression"&&this.offsetToSourcePos(t.start)===e}getExpression(){if(this.enterInitialScopes(),this.nextToken(),this.match(140))throw this.raise(p.ParseExpressionEmptyInput,this.state.startLoc);let t=this.parseExpression();if(!this.match(140))throw this.raise(p.ParseExpressionExpectsEOF,this.state.startLoc,{unexpected:this.input.codePointAt(this.state.start)});return this.finalizeRemainingComments(),t.comments=this.comments,t.errors=this.state.errors,this.optionFlags&256&&(t.tokens=this.tokens),t}parseExpression(t,e){return t?this.disallowInAnd(()=>this.parseExpressionBase(e)):this.allowInAnd(()=>this.parseExpressionBase(e))}parseExpressionBase(t){let e=this.state.startLoc,s=this.parseMaybeAssign(t);if(this.match(12)){let i=this.startNodeAt(e);for(i.expressions=[s];this.eat(12);)i.expressions.push(this.parseMaybeAssign(t));return this.toReferencedList(i.expressions),this.finishNode(i,"SequenceExpression")}return s}parseMaybeAssignDisallowIn(t,e){return this.disallowInAnd(()=>this.parseMaybeAssign(t,e))}parseMaybeAssignAllowIn(t,e){return this.allowInAnd(()=>this.parseMaybeAssign(t,e))}setOptionalParametersError(t){t.optionalParametersLoc=this.state.startLoc}parseMaybeAssign(t,e){let s=this.state.startLoc,i=this.isContextual(108);if(i&&this.prodParam.hasYield){this.next();let l=this.parseYield(s);return e&&(l=e.call(this,l,s)),l}let n;t?n=!1:(t=new ge,n=!0);let{type:a}=this.state;(a===10||k(a))&&(this.state.potentialArrowAt=this.state.start);let o=this.parseMaybeConditional(t);if(e&&(o=e.call(this,o,s)),Pr(this.state.type)){let l=this.startNodeAt(s),c=this.state.value;if(l.operator=c,this.match(29)){this.toAssignable(o,!0),l.left=o;let u=s.index;t.doubleProtoLoc!=null&&t.doubleProtoLoc.index>=u&&(t.doubleProtoLoc=null),t.shorthandAssignLoc!=null&&t.shorthandAssignLoc.index>=u&&(t.shorthandAssignLoc=null),t.privateKeyLoc!=null&&t.privateKeyLoc.index>=u&&(this.checkDestructuringPrivate(t),t.privateKeyLoc=null),t.voidPatternLoc!=null&&t.voidPatternLoc.index>=u&&(t.voidPatternLoc=null)}else l.left=o;return this.next(),l.right=this.parseMaybeAssign(),this.checkLVal(o,this.finishNode(l,"AssignmentExpression"),void 0,void 0,void 0,void 0,c==="||="||c==="&&="||c==="??="),l}else n&&this.checkExpressionErrors(t,!0);if(i){let{type:l}=this.state;if((this.hasPlugin("v8intrinsic")?we(l):we(l)&&!this.match(54))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(p.YieldNotInGeneratorFunction,s),this.parseYield(s)}return o}parseMaybeConditional(t){let e=this.state.startLoc,s=this.state.potentialArrowAt,i=this.parseExprOps(t);return this.shouldExitDescending(i,s)?i:this.parseConditional(i,e,t)}parseConditional(t,e,s){if(this.eat(17)){let i=this.startNodeAt(e);return i.test=t,i.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),i.alternate=this.parseMaybeAssign(),this.finishNode(i,"ConditionalExpression")}return t}parseMaybeUnaryOrPrivate(t){return this.match(139)?this.parsePrivateName():this.parseMaybeUnary(t)}parseExprOps(t){let e=this.state.startLoc,s=this.state.potentialArrowAt,i=this.parseMaybeUnaryOrPrivate(t);return this.shouldExitDescending(i,s)?i:this.parseExprOp(i,e,-1)}parseExprOp(t,e,s){if(this.isPrivateName(t)){let n=this.getPrivateNameSV(t);(s>=He(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(p.PrivateInExpectedIn,t,{identifierName:n}),this.classScope.usePrivateName(n,t.loc.start)}let i=this.state.type;if(br(i)&&(this.prodParam.hasIn||!this.match(58))){let n=He(i);if(n>s){if(i===39){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return t;this.checkPipelineAtInfixOperator(t,e)}let a=this.startNodeAt(e);a.left=t,a.operator=this.state.value;let o=i===41||i===42,l=i===40;if(l&&(n=He(42)),this.next(),i===39&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&this.state.type===96&&this.prodParam.hasAwait)throw this.raise(p.UnexpectedAwaitAfterPipelineBody,this.state.startLoc);a.right=this.parseExprOpRightExpr(i,n);let c=this.finishNode(a,o||l?"LogicalExpression":"BinaryExpression"),u=this.state.type;if(l&&(u===41||u===42)||o&&u===40)throw this.raise(p.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(c,e,s)}}return t}parseExprOpRightExpr(t,e){let s=this.state.startLoc;switch(t){case 39:switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext(()=>this.parseHackPipeBody());case"fsharp":return this.withSoloAwaitPermittingContext(()=>this.parseFSharpPipelineBody(e))}if(this.getPluginOption("pipelineOperator","proposal")==="smart")return this.withTopicBindingContext(()=>{if(this.prodParam.hasYield&&this.isContextual(108))throw this.raise(p.PipeBodyIsTighter,this.state.startLoc);return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(t,e),s)});default:return this.parseExprOpBaseRightExpr(t,e)}}parseExprOpBaseRightExpr(t,e){let s=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),s,wr(t)?e-1:e)}parseHackPipeBody(){var t;let{startLoc:e}=this.state,s=this.parseMaybeAssign();return cr.has(s.type)&&!((t=s.extra)!=null&&t.parenthesized)&&this.raise(p.PipeUnparenthesizedBody,e,{type:s.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(p.PipeTopicUnused,e),s}checkExponentialAfterUnary(t){this.match(57)&&this.raise(p.UnexpectedTokenUnaryExponentiation,t.argument)}parseMaybeUnary(t,e){let s=this.state.startLoc,i=this.isContextual(96);if(i&&this.recordAwaitIfAllowed()){this.next();let l=this.parseAwait(s);return e||this.checkExponentialAfterUnary(l),l}let n=this.match(34),a=this.startNode();if(Nr(this.state.type)){a.operator=this.state.value,a.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");let l=this.match(89);if(this.next(),a.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(t,!0),this.state.strict&&l){let c=a.argument;c.type==="Identifier"?this.raise(p.StrictDelete,a):this.hasPropertyAsPrivateName(c)&&this.raise(p.DeletePrivateField,a)}if(!n)return e||this.checkExponentialAfterUnary(a),this.finishNode(a,"UnaryExpression")}let o=this.parseUpdate(a,n,t);if(i){let{type:l}=this.state;if((this.hasPlugin("v8intrinsic")?we(l):we(l)&&!this.match(54))&&!this.isAmbiguousPrefixOrIdentifier())return this.raiseOverwrite(p.AwaitNotInAsyncContext,s),this.parseAwait(s)}return o}parseUpdate(t,e,s){if(e){let a=t;return this.checkLVal(a.argument,this.finishNode(a,"UpdateExpression")),t}let i=this.state.startLoc,n=this.parseExprSubscripts(s);if(this.checkExpressionErrors(s,!1))return n;for(;Ar(this.state.type)&&!this.canInsertSemicolon();){let a=this.startNodeAt(i);a.operator=this.state.value,a.prefix=!1,a.argument=n,this.next(),this.checkLVal(n,n=this.finishNode(a,"UpdateExpression"))}return n}parseExprSubscripts(t){let e=this.state.startLoc,s=this.state.potentialArrowAt,i=this.parseExprAtom(t);return this.shouldExitDescending(i,s)?i:this.parseSubscripts(i,e)}parseSubscripts(t,e,s){let i={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(t),stop:!1};do t=this.parseSubscript(t,e,s,i),i.maybeAsyncArrow=!1;while(!i.stop);return t}parseSubscript(t,e,s,i){let{type:n}=this.state;if(!s&&n===15)return this.parseBind(t,e,s,i);if(ze(n))return this.parseTaggedTemplateExpression(t,e,i);let a=!1;if(n===18){if(s&&(this.raise(p.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return this.stopParseSubscript(t,i);i.optionalChainMember=a=!0,this.next()}if(!s&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(t,e,i,a);{let o=this.eat(0);return o||a||this.eat(16)?this.parseMember(t,e,i,o,a):this.stopParseSubscript(t,i)}}stopParseSubscript(t,e){return e.stop=!0,t}parseMember(t,e,s,i,n){let a=this.startNodeAt(e);return a.object=t,a.computed=i,i?(a.property=this.parseExpression(),this.expect(3)):this.match(139)?(t.type==="Super"&&this.raise(p.SuperPrivateField,e),this.classScope.usePrivateName(this.state.value,this.state.startLoc),a.property=this.parsePrivateName()):a.property=this.parseIdentifier(!0),s.optionalChainMember?(a.optional=n,this.finishNode(a,"OptionalMemberExpression")):this.finishNode(a,"MemberExpression")}parseBind(t,e,s,i){let n=this.startNodeAt(e);return n.object=t,this.next(),n.callee=this.parseNoCallExpr(),i.stop=!0,this.parseSubscripts(this.finishNode(n,"BindExpression"),e,s)}parseCoverCallAndAsyncArrowHead(t,e,s,i){let n=this.state.maybeInArrowParameters,a=null;this.state.maybeInArrowParameters=!0,this.next();let o=this.startNodeAt(e);o.callee=t;let{maybeAsyncArrow:l,optionalChainMember:c}=s;l&&(this.expressionScope.enter(sn()),a=new ge),c&&(o.optional=i),i?o.arguments=this.parseCallExpressionArguments():o.arguments=this.parseCallExpressionArguments(t.type!=="Super",o,a);let u=this.finishCallExpression(o,c);return l&&this.shouldParseAsyncArrow()&&!i?(s.stop=!0,this.checkDestructuringPrivate(a),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),u=this.parseAsyncArrowFromCallExpression(this.startNodeAt(e),u)):(l&&(this.checkExpressionErrors(a,!0),this.expressionScope.exit()),this.toReferencedArguments(u)),this.state.maybeInArrowParameters=n,u}toReferencedArguments(t,e){this.toReferencedListDeep(t.arguments,e)}parseTaggedTemplateExpression(t,e,s){let i=this.startNodeAt(e);return i.tag=t,i.quasi=this.parseTemplate(!0),s.optionalChainMember&&this.raise(p.OptionalChainingNoTemplate,e),this.finishNode(i,"TaggedTemplateExpression")}atPossibleAsyncArrow(t){return t.type==="Identifier"&&t.name==="async"&&this.state.lastTokEndLoc.index===t.end&&!this.canInsertSemicolon()&&t.end-t.start===5&&this.offsetToSourcePos(t.start)===this.state.potentialArrowAt}finishCallExpression(t,e){if(t.callee.type==="Import")if(t.arguments.length===0||t.arguments.length>2)this.raise(p.ImportCallArity,t);else for(let s of t.arguments)s.type==="SpreadElement"&&this.raise(p.ImportCallSpreadArgument,s);return this.finishNode(t,e?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(t,e,s){let i=[],n=!0,a=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(11);){if(n)n=!1;else if(this.expect(12),this.match(11)){e&&this.addTrailingCommaExtraToNode(e),this.next();break}i.push(this.parseExprListItem(11,!1,s,t))}return this.state.inFSharpPipelineDirectBody=a,i}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(t,e){var s;return this.resetPreviousNodeTrailingComments(e),this.expect(19),this.parseArrowExpression(t,e.arguments,!0,(s=e.extra)==null?void 0:s.trailingCommaLoc),e.innerComments&&Le(t,e.innerComments),e.callee.trailingComments&&Le(t,e.callee.trailingComments),t}parseNoCallExpr(){let t=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),t,!0)}parseExprAtom(t){let e,s=null,{type:i}=this.state;switch(i){case 79:return this.parseSuper();case 83:return e=this.startNode(),this.next(),this.match(16)?this.parseImportMetaPropertyOrPhaseCall(e):this.match(10)?this.optionFlags&512?this.parseImportCall(e):this.finishNode(e,"Import"):(this.raise(p.UnsupportedImport,this.state.lastTokStartLoc),this.finishNode(e,"Import"));case 78:return e=this.startNode(),this.next(),this.finishNode(e,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 135:return this.parseNumericLiteral(this.state.value);case 136:return this.parseBigIntLiteral(this.state.value);case 134:return this.parseStringLiteral(this.state.value);case 84:return this.parseNullLiteral();case 85:return this.parseBooleanLiteral(!0);case 86:return this.parseBooleanLiteral(!1);case 10:{let n=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(n)}case 0:return this.parseArrayLike(3,!1,t);case 5:return this.parseObjectLike(8,!1,!1,t);case 68:return this.parseFunctionOrFunctionSent();case 26:s=this.parseDecorators();case 80:return this.parseClass(this.maybeTakeDecorators(s,this.startNode()),!1);case 77:return this.parseNewOrNewTarget();case 25:case 24:return this.parseTemplate(!1);case 15:{e=this.startNode(),this.next(),e.object=null;let n=e.callee=this.parseNoCallExpr();if(n.type==="MemberExpression")return this.finishNode(e,"BindExpression");throw this.raise(p.UnsupportedBind,n)}case 139:return this.raise(p.PrivateInExpectedIn,this.state.startLoc,{identifierName:this.state.value}),this.parsePrivateName();case 33:return this.parseTopicReferenceThenEqualsSign(54,"%");case 32:return this.parseTopicReferenceThenEqualsSign(44,"^");case 37:case 38:return this.parseTopicReference("hack");case 44:case 54:case 27:{let n=this.getPluginOption("pipelineOperator","proposal");if(n)return this.parseTopicReference(n);throw this.unexpected()}case 47:{let n=this.input.codePointAt(this.nextTokenStart());throw W(n)||n===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected()}default:if(i===137)return this.parseDecimalLiteral(this.state.value);if(i===2||i===1)return this.parseArrayLike(this.state.type===2?4:3,!0);if(i===6||i===7)return this.parseObjectLike(this.state.type===6?9:8,!1,!0);if(k(i)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();let n=this.state.potentialArrowAt===this.state.start,a=this.state.containsEsc,o=this.parseIdentifier();if(!a&&o.name==="async"&&!this.canInsertSemicolon()){let{type:l}=this.state;if(l===68)return this.resetPreviousNodeTrailingComments(o),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(o));if(k(l))return n&&this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(o)):o;if(l===90)return this.resetPreviousNodeTrailingComments(o),this.parseDo(this.startNodeAtNode(o),!0)}return n&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(o),[o],!1)):o}else throw this.unexpected()}}parseTopicReferenceThenEqualsSign(t,e){let s=this.getPluginOption("pipelineOperator","proposal");if(s)return this.state.type=t,this.state.value=e,this.state.pos--,this.state.end--,this.state.endLoc=V(this.state.endLoc,-1),this.parseTopicReference(s);throw this.unexpected()}parseTopicReference(t){let e=this.startNode(),s=this.state.startLoc,i=this.state.type;return this.next(),this.finishTopicReference(e,s,t,i)}finishTopicReference(t,e,s,i){if(this.testTopicReferenceConfiguration(s,e,i))return s==="hack"?(this.topicReferenceIsAllowedInCurrentContext()||this.raise(p.PipeTopicUnbound,e),this.registerTopicReference(),this.finishNode(t,"TopicReference")):(this.topicReferenceIsAllowedInCurrentContext()||this.raise(p.PrimaryTopicNotAllowed,e),this.registerTopicReference(),this.finishNode(t,"PipelinePrimaryTopicReference"));throw this.raise(p.PipeTopicUnconfiguredToken,e,{token:ae(i)})}testTopicReferenceConfiguration(t,e,s){switch(t){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:ae(s)}]);case"smart":return s===27;default:throw this.raise(p.PipeTopicRequiresHackPipes,e)}}parseAsyncArrowUnaryFunction(t){this.prodParam.enter(Xe(!0,this.prodParam.hasYield));let e=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(p.LineTerminatorBeforeArrow,this.state.curPosition()),this.expect(19),this.parseArrowExpression(t,e,!0)}parseDo(t,e){this.expectPlugin("doExpressions"),e&&this.expectPlugin("asyncDoExpressions"),t.async=e,this.next();let s=this.state.labels;return this.state.labels=[],e?(this.prodParam.enter(2),t.body=this.parseBlock(),this.prodParam.exit()):t.body=this.parseBlock(),this.state.labels=s,this.finishNode(t,"DoExpression")}parseSuper(){let t=this.startNode();return this.next(),this.match(10)&&!this.scope.allowDirectSuper?this.optionFlags&16||this.raise(p.SuperNotAllowed,t):this.scope.allowSuper||this.optionFlags&16||this.raise(p.UnexpectedSuper,t),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(p.UnsupportedSuper,t),this.finishNode(t,"Super")}parsePrivateName(){let t=this.startNode(),e=this.startNodeAt(V(this.state.startLoc,1)),s=this.state.value;return this.next(),t.id=this.createIdentifier(e,s),this.finishNode(t,"PrivateName")}parseFunctionOrFunctionSent(){let t=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){let e=this.createIdentifier(this.startNodeAtNode(t),"function");return this.next(),this.match(103)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(t,e,"sent")}return this.parseFunction(t)}parseMetaProperty(t,e,s){t.meta=e;let i=this.state.containsEsc;return t.property=this.parseIdentifier(!0),(t.property.name!==s||i)&&this.raise(p.UnsupportedMetaProperty,t.property,{target:e.name,onlyValidPropertyName:s}),this.finishNode(t,"MetaProperty")}parseImportMetaPropertyOrPhaseCall(t){if(this.next(),this.isContextual(105)||this.isContextual(97)){let e=this.isContextual(105);return this.expectPlugin(e?"sourcePhaseImports":"deferredImportEvaluation"),this.next(),t.phase=e?"source":"defer",this.parseImportCall(t)}else{let e=this.createIdentifierAt(this.startNodeAtNode(t),"import",this.state.lastTokStartLoc);return this.isContextual(101)&&(this.inModule||this.raise(p.ImportMetaOutsideModule,e),this.sawUnambiguousESM=!0),this.parseMetaProperty(t,e,"meta")}}parseLiteralAtNode(t,e,s){return this.addExtra(s,"rawValue",t),this.addExtra(s,"raw",this.input.slice(this.offsetToSourcePos(s.start),this.state.end)),s.value=t,this.next(),this.finishNode(s,e)}parseLiteral(t,e){let s=this.startNode();return this.parseLiteralAtNode(t,e,s)}parseStringLiteral(t){return this.parseLiteral(t,"StringLiteral")}parseNumericLiteral(t){return this.parseLiteral(t,"NumericLiteral")}parseBigIntLiteral(t){return this.parseLiteral(t,"BigIntLiteral")}parseDecimalLiteral(t){return this.parseLiteral(t,"DecimalLiteral")}parseRegExpLiteral(t){let e=this.startNode();return this.addExtra(e,"raw",this.input.slice(this.offsetToSourcePos(e.start),this.state.end)),e.pattern=t.pattern,e.flags=t.flags,this.next(),this.finishNode(e,"RegExpLiteral")}parseBooleanLiteral(t){let e=this.startNode();return e.value=t,this.next(),this.finishNode(e,"BooleanLiteral")}parseNullLiteral(){let t=this.startNode();return this.next(),this.finishNode(t,"NullLiteral")}parseParenAndDistinguishExpression(t){let e=this.state.startLoc,s;this.next(),this.expressionScope.enter(tn());let i=this.state.maybeInArrowParameters,n=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;let a=this.state.startLoc,o=[],l=new ge,c=!0,u,f;for(;!this.match(11);){if(c)c=!1;else if(this.expect(12,l.optionalParametersLoc===null?null:l.optionalParametersLoc),this.match(11)){f=this.state.startLoc;break}if(this.match(21)){let y=this.state.startLoc;if(u=this.state.startLoc,o.push(this.parseParenItem(this.parseRestBinding(),y)),!this.checkCommaAfterRest(41))break}else o.push(this.parseMaybeAssignAllowInOrVoidPattern(11,l,this.parseParenItem))}let d=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=i,this.state.inFSharpPipelineDirectBody=n;let m=this.startNodeAt(e);return t&&this.shouldParseArrow(o)&&(m=this.parseArrow(m))?(this.checkDestructuringPrivate(l),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(m,o,!1),m):(this.expressionScope.exit(),o.length||this.unexpected(this.state.lastTokStartLoc),f&&this.unexpected(f),u&&this.unexpected(u),this.checkExpressionErrors(l,!0),this.toReferencedListDeep(o,!0),o.length>1?(s=this.startNodeAt(a),s.expressions=o,this.finishNode(s,"SequenceExpression"),this.resetEndLocation(s,d)):s=o[0],this.wrapParenthesis(e,s))}wrapParenthesis(t,e){if(!(this.optionFlags&1024))return this.addExtra(e,"parenthesized",!0),this.addExtra(e,"parenStart",t.index),this.takeSurroundingComments(e,t.index,this.state.lastTokEndLoc.index),e;let s=this.startNodeAt(t);return s.expression=e,this.finishNode(s,"ParenthesizedExpression")}shouldParseArrow(t){return!this.canInsertSemicolon()}parseArrow(t){if(this.eat(19))return t}parseParenItem(t,e){return t}parseNewOrNewTarget(){let t=this.startNode();if(this.next(),this.match(16)){let e=this.createIdentifier(this.startNodeAtNode(t),"new");this.next();let s=this.parseMetaProperty(t,e,"target");return this.scope.allowNewTarget||this.raise(p.UnexpectedNewTarget,s),s}return this.parseNew(t)}parseNew(t){if(this.parseNewCallee(t),this.eat(10)){let e=this.parseExprList(11);this.toReferencedList(e),t.arguments=e}else t.arguments=[];return this.finishNode(t,"NewExpression")}parseNewCallee(t){let e=this.match(83),s=this.parseNoCallExpr();t.callee=s,e&&(s.type==="Import"||s.type==="ImportExpression")&&this.raise(p.ImportCallNotNewExpression,s)}parseTemplateElement(t){let{start:e,startLoc:s,end:i,value:n}=this.state,a=e+1,o=this.startNodeAt(V(s,1));n===null&&(t||this.raise(p.InvalidEscapeSequenceTemplate,V(this.state.firstInvalidTemplateEscapePos,1)));let l=this.match(24),c=l?-1:-2,u=i+c;o.value={raw:this.input.slice(a,u).replace(/\r\n?/g,`
8
- `),cooked:n===null?null:n.slice(1,c)},o.tail=l,this.next();let f=this.finishNode(o,"TemplateElement");return this.resetEndLocation(f,V(this.state.lastTokEndLoc,c)),f}parseTemplate(t){let e=this.startNode(),s=this.parseTemplateElement(t),i=[s],n=[];for(;!s.tail;)n.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),i.push(s=this.parseTemplateElement(t));return e.expressions=n,e.quasis=i,this.finishNode(e,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(t,e,s,i){s&&this.expectPlugin("recordAndTuple");let n=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let a=!1,o=!0,l=this.startNode();for(l.properties=[],this.next();!this.match(t);){if(o)o=!1;else if(this.expect(12),this.match(t)){this.addTrailingCommaExtraToNode(l);break}let u;e?u=this.parseBindingProperty():(u=this.parsePropertyDefinition(i),a=this.checkProto(u,s,a,i)),s&&!this.isObjectProperty(u)&&u.type!=="SpreadElement"&&this.raise(p.InvalidRecordProperty,u),u.shorthand&&this.addExtra(u,"shorthand",!0),l.properties.push(u)}this.next(),this.state.inFSharpPipelineDirectBody=n;let c="ObjectExpression";return e?c="ObjectPattern":s&&(c="RecordExpression"),this.finishNode(l,c)}addTrailingCommaExtraToNode(t){this.addExtra(t,"trailingComma",this.state.lastTokStartLoc.index),this.addExtra(t,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(t){return!t.computed&&t.key.type==="Identifier"&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(t){let e=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(p.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)e.push(this.parseDecorator());let s=this.startNode(),i=!1,n=!1,a;if(this.match(21))return e.length&&this.unexpected(),this.parseSpread();e.length&&(s.decorators=e,e=[]),s.method=!1,t&&(a=this.state.startLoc);let o=this.eat(55);this.parsePropertyNamePrefixOperator(s);let l=this.state.containsEsc;if(this.parsePropertyName(s,t),!o&&!l&&this.maybeAsyncOrAccessorProp(s)){let{key:c}=s,u=c.name;u==="async"&&!this.hasPrecedingLineBreak()&&(i=!0,this.resetPreviousNodeTrailingComments(c),o=this.eat(55),this.parsePropertyName(s)),(u==="get"||u==="set")&&(n=!0,this.resetPreviousNodeTrailingComments(c),s.kind=u,this.match(55)&&(o=!0,this.raise(p.AccessorIsGenerator,this.state.curPosition(),{kind:u}),this.next()),this.parsePropertyName(s))}return this.parseObjPropValue(s,a,o,i,!1,n,t)}getGetterSetterExpectedParamCount(t){return t.kind==="get"?0:1}getObjectOrClassMethodParams(t){return t.params}checkGetterSetterParams(t){var e;let s=this.getGetterSetterExpectedParamCount(t),i=this.getObjectOrClassMethodParams(t);i.length!==s&&this.raise(t.kind==="get"?p.BadGetterArity:p.BadSetterArity,t),t.kind==="set"&&((e=i[i.length-1])==null?void 0:e.type)==="RestElement"&&this.raise(p.BadSetterRestParameter,t)}parseObjectMethod(t,e,s,i,n){if(n){let a=this.parseMethod(t,e,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(a),a}if(s||e||this.match(10))return i&&this.unexpected(),t.kind="method",t.method=!0,this.parseMethod(t,e,s,!1,!1,"ObjectMethod")}parseObjectProperty(t,e,s,i){if(t.shorthand=!1,this.eat(14))return t.value=s?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowInOrVoidPattern(8,i),this.finishObjectProperty(t);if(!t.computed&&t.key.type==="Identifier"){if(this.checkReservedWord(t.key.name,t.key.loc.start,!0,!1),s)t.value=this.parseMaybeDefault(e,this.cloneIdentifier(t.key));else if(this.match(29)){let n=this.state.startLoc;i!=null?i.shorthandAssignLoc===null&&(i.shorthandAssignLoc=n):this.raise(p.InvalidCoverInitializedName,n),t.value=this.parseMaybeDefault(e,this.cloneIdentifier(t.key))}else t.value=this.cloneIdentifier(t.key);return t.shorthand=!0,this.finishObjectProperty(t)}}finishObjectProperty(t){return this.finishNode(t,"ObjectProperty")}parseObjPropValue(t,e,s,i,n,a,o){let l=this.parseObjectMethod(t,s,i,n,a)||this.parseObjectProperty(t,e,n,o);return l||this.unexpected(),l}parsePropertyName(t,e){if(this.eat(0))t.computed=!0,t.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{let{type:s,value:i}=this.state,n;if(X(s))n=this.parseIdentifier(!0);else switch(s){case 135:n=this.parseNumericLiteral(i);break;case 134:n=this.parseStringLiteral(i);break;case 136:n=this.parseBigIntLiteral(i);break;case 139:{let a=this.state.startLoc;e!=null?e.privateKeyLoc===null&&(e.privateKeyLoc=a):this.raise(p.UnexpectedPrivateField,a),n=this.parsePrivateName();break}default:if(s===137){n=this.parseDecimalLiteral(i);break}this.unexpected()}t.key=n,s!==139&&(t.computed=!1)}}initFunction(t,e){t.id=null,t.generator=!1,t.async=e}parseMethod(t,e,s,i,n,a,o=!1){this.initFunction(t,s),t.generator=e,this.scope.enter(530|(o?576:0)|(n?32:0)),this.prodParam.enter(Xe(s,t.generator)),this.parseFunctionParams(t,i);let l=this.parseFunctionBodyAndFinish(t,a,!0);return this.prodParam.exit(),this.scope.exit(),l}parseArrayLike(t,e,s){e&&this.expectPlugin("recordAndTuple");let i=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let n=this.startNode();return this.next(),n.elements=this.parseExprList(t,!e,s,n),this.state.inFSharpPipelineDirectBody=i,this.finishNode(n,e?"TupleExpression":"ArrayExpression")}parseArrowExpression(t,e,s,i){this.scope.enter(518);let n=Xe(s,!1);!this.match(5)&&this.prodParam.hasIn&&(n|=8),this.prodParam.enter(n),this.initFunction(t,s);let a=this.state.maybeInArrowParameters;return e&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(t,e,i)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(t,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=a,this.finishNode(t,"ArrowFunctionExpression")}setArrowFunctionParameters(t,e,s){this.toAssignableList(e,s,!1),t.params=e}parseFunctionBodyAndFinish(t,e,s=!1){return this.parseFunctionBody(t,!1,s),this.finishNode(t,e)}parseFunctionBody(t,e,s=!1){let i=e&&!this.match(5);if(this.expressionScope.enter(ii()),i)t.body=this.parseMaybeAssign(),this.checkParams(t,!1,e,!1);else{let n=this.state.strict,a=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),t.body=this.parseBlock(!0,!1,o=>{let l=!this.isSimpleParamList(t.params);o&&l&&this.raise(p.IllegalLanguageModeDirective,(t.kind==="method"||t.kind==="constructor")&&t.key?t.key.loc.end:t);let c=!n&&this.state.strict;this.checkParams(t,!this.state.strict&&!e&&!s&&!l,e,c),this.state.strict&&t.id&&this.checkIdentifier(t.id,65,c)}),this.prodParam.exit(),this.state.labels=a}this.expressionScope.exit()}isSimpleParameter(t){return t.type==="Identifier"}isSimpleParamList(t){for(let e=0,s=t.length;e<s;e++)if(!this.isSimpleParameter(t[e]))return!1;return!0}checkParams(t,e,s,i=!0){let n=!e&&new Set,a={type:"FormalParameters"};for(let o of t.params)this.checkLVal(o,a,5,n,i)}parseExprList(t,e,s,i){let n=[],a=!0;for(;!this.eat(t);){if(a)a=!1;else if(this.expect(12),this.match(t)){i&&this.addTrailingCommaExtraToNode(i),this.next();break}n.push(this.parseExprListItem(t,e,s))}return n}parseExprListItem(t,e,s,i){let n;if(this.match(12))e||this.raise(p.UnexpectedToken,this.state.curPosition(),{unexpected:","}),n=null;else if(this.match(21)){let a=this.state.startLoc;n=this.parseParenItem(this.parseSpread(s),a)}else if(this.match(17)){this.expectPlugin("partialApplication"),i||this.raise(p.UnexpectedArgumentPlaceholder,this.state.startLoc);let a=this.startNode();this.next(),n=this.finishNode(a,"ArgumentPlaceholder")}else n=this.parseMaybeAssignAllowInOrVoidPattern(t,s,this.parseParenItem);return n}parseIdentifier(t){let e=this.startNode(),s=this.parseIdentifierName(t);return this.createIdentifier(e,s)}createIdentifier(t,e){return t.name=e,t.loc.identifierName=e,this.finishNode(t,"Identifier")}createIdentifierAt(t,e,s){return t.name=e,t.loc.identifierName=e,this.finishNodeAt(t,"Identifier",s)}parseIdentifierName(t){let e,{startLoc:s,type:i}=this.state;X(i)?e=this.state.value:this.unexpected();let n=Tr(i);return t?n&&this.replaceToken(132):this.checkReservedWord(e,s,n,!1),this.next(),e}checkReservedWord(t,e,s,i){if(t.length>10||!Br(t))return;if(s&&Mr(t)){this.raise(p.UnexpectedKeyword,e,{keyword:t});return}if((this.state.strict?i?Zs:Ys:Js)(t,this.inModule)){this.raise(p.UnexpectedReservedWord,e,{reservedWord:t});return}else if(t==="yield"){if(this.prodParam.hasYield){this.raise(p.YieldBindingIdentifier,e);return}}else if(t==="await"){if(this.prodParam.hasAwait){this.raise(p.AwaitBindingIdentifier,e);return}if(this.scope.inStaticBlock){this.raise(p.AwaitBindingIdentifierInStaticBlock,e);return}this.expressionScope.recordAsyncArrowParametersError(e)}else if(t==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(p.ArgumentsInClass,e);return}}recordAwaitIfAllowed(){let t=this.prodParam.hasAwait;return t&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),t}parseAwait(t){let e=this.startNodeAt(t);return this.expressionScope.recordParameterInitializerError(p.AwaitExpressionFormalParameter,e),this.eat(55)&&this.raise(p.ObsoleteAwaitStar,e),!this.scope.inFunction&&!(this.optionFlags&1)&&(this.isAmbiguousPrefixOrIdentifier()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(e.argument=this.parseMaybeUnary(null,!0)),this.finishNode(e,"AwaitExpression")}isAmbiguousPrefixOrIdentifier(){if(this.hasPrecedingLineBreak())return!0;let{type:t}=this.state;return t===53||t===10||t===0||ze(t)||t===102&&!this.state.containsEsc||t===138||t===56||this.hasPlugin("v8intrinsic")&&t===54}parseYield(t){let e=this.startNodeAt(t);this.expressionScope.recordParameterInitializerError(p.YieldInParameter,e);let s=!1,i=null;if(!this.hasPrecedingLineBreak())switch(s=this.eat(55),this.state.type){case 13:case 140:case 8:case 11:case 3:case 9:case 14:case 12:if(!s)break;default:i=this.parseMaybeAssign()}return e.delegate=s,e.argument=i,this.finishNode(e,"YieldExpression")}parseImportCall(t){if(this.next(),t.source=this.parseMaybeAssignAllowIn(),t.options=null,this.eat(12)){if(this.match(11))this.addTrailingCommaExtraToNode(t.source);else if(t.options=this.parseMaybeAssignAllowIn(),this.eat(12)&&(this.addTrailingCommaExtraToNode(t.options),!this.match(11))){do this.parseMaybeAssignAllowIn();while(this.eat(12)&&!this.match(11));this.raise(p.ImportCallArity,t)}}return this.expect(11),this.finishNode(t,"ImportExpression")}checkPipelineAtInfixOperator(t,e){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&t.type==="SequenceExpression"&&this.raise(p.PipelineHeadSequenceExpression,e)}parseSmartPipelineBodyInStyle(t,e){if(this.isSimpleReference(t)){let s=this.startNodeAt(e);return s.callee=t,this.finishNode(s,"PipelineBareFunction")}else{let s=this.startNodeAt(e);return this.checkSmartPipeTopicBodyEarlyErrors(e),s.expression=t,this.finishNode(s,"PipelineTopicExpression")}}isSimpleReference(t){switch(t.type){case"MemberExpression":return!t.computed&&this.isSimpleReference(t.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(t){if(this.match(19))throw this.raise(p.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(p.PipelineTopicUnused,t)}withTopicBindingContext(t){let e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}}withSmartMixTopicForbiddingContext(t){if(this.hasPlugin(["pipelineOperator",{proposal:"smart"}])){let e=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return t()}finally{this.state.topicContext=e}}else return t()}withSoloAwaitPermittingContext(t){let e=this.state.soloAwait;this.state.soloAwait=!0;try{return t()}finally{this.state.soloAwait=e}}allowInAnd(t){let e=this.prodParam.currentFlags();if(8&~e){this.prodParam.enter(e|8);try{return t()}finally{this.prodParam.exit()}}return t()}disallowInAnd(t){let e=this.prodParam.currentFlags();if(8&e){this.prodParam.enter(e&-9);try{return t()}finally{this.prodParam.exit()}}return t()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return this.state.topicContext.maxTopicIndex!=null&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(t){let e=this.state.startLoc;this.state.potentialArrowAt=this.state.start;let s=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;let i=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),e,t);return this.state.inFSharpPipelineDirectBody=s,i}parseModuleExpression(){this.expectPlugin("moduleBlocks");let t=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);let e=this.startNodeAt(this.state.endLoc);this.next();let s=this.initializeScopes(!0);this.enterInitialScopes();try{t.body=this.parseProgram(e,8,"module")}finally{s()}return this.finishNode(t,"ModuleExpression")}parseVoidPattern(t){this.expectPlugin("discardBinding");let e=this.startNode();return t!=null&&(t.voidPatternLoc=this.state.startLoc),this.next(),this.finishNode(e,"VoidPattern")}parseMaybeAssignAllowInOrVoidPattern(t,e,s){if(e!=null&&this.match(88)){let i=this.lookaheadCharCode();if(i===44||i===(t===3?93:t===8?125:41)||i===61)return this.parseMaybeDefault(this.state.startLoc,this.parseVoidPattern(e))}return this.parseMaybeAssignAllowIn(e,s)}parsePropertyNamePrefixOperator(t){}},ct={kind:1},mn={kind:2},yn=/[\uD800-\uDFFF]/u,ht=/in(?:stanceof)?/y;function gn(r,t,e){for(let s=0;s<r.length;s++){let i=r[s],{type:n}=i;if(typeof n=="number"){if(n===139){let{loc:a,start:o,value:l,end:c}=i,u=o+1,f=V(a.start,1);r.splice(s,1,new z({type:Y(27),value:"#",start:o,end:u,startLoc:a.start,endLoc:f}),new z({type:Y(132),value:l,start:u,end:c,startLoc:f,endLoc:a.end})),s++;continue}if(ze(n)){let{loc:a,start:o,value:l,end:c}=i,u=o+1,f=V(a.start,1),d;t.charCodeAt(o-e)===96?d=new z({type:Y(22),value:"`",start:o,end:u,startLoc:a.start,endLoc:f}):d=new z({type:Y(8),value:"}",start:o,end:u,startLoc:a.start,endLoc:f});let m,y,S,O;n===24?(y=c-1,S=V(a.end,-1),m=l===null?null:l.slice(1,-1),O=new z({type:Y(22),value:"`",start:y,end:c,startLoc:S,endLoc:a.end})):(y=c-2,S=V(a.end,-2),m=l===null?null:l.slice(1,-2),O=new z({type:Y(23),value:"${",start:y,end:c,startLoc:S,endLoc:a.end})),r.splice(s,1,d,new z({type:Y(20),value:m,start:u,end:y,startLoc:f,endLoc:S}),O),s+=2;continue}i.type=Y(n)}}return r}h(gn,"babel7CompatTokens");var Ot=class extends kt{static{h(this,"StatementParser")}parseTopLevel(t,e){return t.program=this.parseProgram(e,140,this.options.sourceType==="module"?"module":"script"),t.comments=this.comments,this.optionFlags&256&&(t.tokens=gn(this.tokens,this.input,this.startIndex)),this.finishNode(t,"File")}parseProgram(t,e,s){if(t.sourceType=s,t.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(t,!0,!0,e),this.inModule){if(!(this.optionFlags&64)&&this.scope.undefinedExports.size>0)for(let[n,a]of Array.from(this.scope.undefinedExports))this.raise(p.ModuleExportUndefined,a,{localName:n});this.addExtra(t,"topLevelAwait",this.state.hasTopLevelAwait)}let i;return e===140?i=this.finishNode(t,"Program"):i=this.finishNodeAt(t,"Program",V(this.state.startLoc,-1)),i}stmtToDirective(t){let e=this.castNodeTo(t,"Directive"),s=this.castNodeTo(t.expression,"DirectiveLiteral"),i=s.value,n=this.input.slice(this.offsetToSourcePos(s.start),this.offsetToSourcePos(s.end)),a=s.value=n.slice(1,-1);return this.addExtra(s,"raw",n),this.addExtra(s,"rawValue",a),this.addExtra(s,"expressionValue",i),e.value=s,delete t.expression,e}parseInterpreterDirective(){if(!this.match(28))return null;let t=this.startNode();return t.value=this.state.value,this.next(),this.finishNode(t,"InterpreterDirective")}isLet(){return this.isContextual(100)?this.hasFollowingBindingAtom():!1}isUsing(){return this.isContextual(107)?this.nextTokenIsIdentifierOnSameLine():!1}isForUsing(){if(!this.isContextual(107))return!1;let t=this.nextTokenInLineStart(),e=this.codePointAtPos(t);if(this.isUnparsedContextual(t,"of")){let s=this.lookaheadCharCodeSince(t+2);if(s!==61&&s!==58&&s!==59)return!1}return!!(this.chStartsBindingIdentifier(e,t)||this.isUnparsedContextual(t,"void"))}nextTokenIsIdentifierOnSameLine(){let t=this.nextTokenInLineStart(),e=this.codePointAtPos(t);return this.chStartsBindingIdentifier(e,t)}isAwaitUsing(){if(!this.isContextual(96))return!1;let t=this.nextTokenInLineStart();if(this.isUnparsedContextual(t,"using")){t=this.nextTokenInLineStartSince(t+5);let e=this.codePointAtPos(t);if(this.chStartsBindingIdentifier(e,t))return!0}return!1}chStartsBindingIdentifier(t,e){if(W(t)){if(ht.lastIndex=e,ht.test(this.input)){let s=this.codePointAtPos(ht.lastIndex);if(!ue(s)&&s!==92)return!1}return!0}else return t===92}chStartsBindingPattern(t){return t===91||t===123}hasFollowingBindingAtom(){let t=this.nextTokenStart(),e=this.codePointAtPos(t);return this.chStartsBindingPattern(e)||this.chStartsBindingIdentifier(e,t)}hasInLineFollowingBindingIdentifierOrBrace(){let t=this.nextTokenInLineStart(),e=this.codePointAtPos(t);return e===123||this.chStartsBindingIdentifier(e,t)}allowsUsing(){return(this.scope.inModule||!this.scope.inTopLevel)&&!this.scope.inBareCaseStatement}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(t=!1){let e=0;return this.options.annexB&&!this.state.strict&&(e|=4,t&&(e|=8)),this.parseStatementLike(e)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(t){let e=null;return this.match(26)&&(e=this.parseDecorators(!0)),this.parseStatementContent(t,e)}parseStatementContent(t,e){let s=this.state.type,i=this.startNode(),n=!!(t&2),a=!!(t&4),o=t&1;switch(s){case 60:return this.parseBreakContinueStatement(i,!0);case 63:return this.parseBreakContinueStatement(i,!1);case 64:return this.parseDebuggerStatement(i);case 90:return this.parseDoWhileStatement(i);case 91:return this.parseForStatement(i);case 68:if(this.lookaheadCharCode()===46)break;return a||this.raise(this.state.strict?p.StrictFunction:this.options.annexB?p.SloppyFunctionAnnexB:p.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(i,!1,!n&&a);case 80:return n||this.unexpected(),this.parseClass(this.maybeTakeDecorators(e,i),!0);case 69:return this.parseIfStatement(i);case 70:return this.parseReturnStatement(i);case 71:return this.parseSwitchStatement(i);case 72:return this.parseThrowStatement(i);case 73:return this.parseTryStatement(i);case 96:if(this.isAwaitUsing())return this.allowsUsing()?n?this.recordAwaitIfAllowed()||this.raise(p.AwaitUsingNotInAsyncContext,i):this.raise(p.UnexpectedLexicalDeclaration,i):this.raise(p.UnexpectedUsingDeclaration,i),this.next(),this.parseVarStatement(i,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.allowsUsing()?n||this.raise(p.UnexpectedLexicalDeclaration,this.state.startLoc):this.raise(p.UnexpectedUsingDeclaration,this.state.startLoc),this.parseVarStatement(i,"using");case 100:{if(this.state.containsEsc)break;let u=this.nextTokenStart(),f=this.codePointAtPos(u);if(f!==91&&(!n&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(f,u)&&f!==123))break}case 75:n||this.raise(p.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{let u=this.state.value;return this.parseVarStatement(i,u)}case 92:return this.parseWhileStatement(i);case 76:return this.parseWithStatement(i);case 5:return this.parseBlock();case 13:return this.parseEmptyStatement(i);case 83:{let u=this.lookaheadCharCode();if(u===40||u===46)break}case 82:{!(this.optionFlags&8)&&!o&&this.raise(p.UnexpectedImportExport,this.state.startLoc),this.next();let u;return s===83?u=this.parseImport(i):u=this.parseExport(i,e),this.assertModuleNodeAllowed(u),u}default:if(this.isAsyncFunction())return n||this.raise(p.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(i,!0,!n&&a)}let l=this.state.value,c=this.parseExpression();return k(s)&&c.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(i,l,c,t):this.parseExpressionStatement(i,c,e)}assertModuleNodeAllowed(t){!(this.optionFlags&8)&&!this.inModule&&this.raise(p.ImportOutsideModule,t)}decoratorsEnabledBeforeExport(){return this.hasPlugin("decorators-legacy")?!0:this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")!==!1}maybeTakeDecorators(t,e,s){if(t){var i;(i=e.decorators)!=null&&i.length?(typeof this.getPluginOption("decorators","decoratorsBeforeExport")!="boolean"&&this.raise(p.DecoratorsBeforeAfterExport,e.decorators[0]),e.decorators.unshift(...t)):e.decorators=t,this.resetStartLocationFromNode(e,t[0]),s&&this.resetStartLocationFromNode(s,e)}return e}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(t){let e=[];do e.push(this.parseDecorator());while(this.match(26));if(this.match(82))t||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(p.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(p.UnexpectedLeadingDecorator,this.state.startLoc);return e}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);let t=this.startNode();if(this.next(),this.hasPlugin("decorators")){let e=this.state.startLoc,s;if(this.match(10)){let i=this.state.startLoc;this.next(),s=this.parseExpression(),this.expect(11),s=this.wrapParenthesis(i,s);let n=this.state.startLoc;t.expression=this.parseMaybeDecoratorArguments(s,i),this.getPluginOption("decorators","allowCallParenthesized")===!1&&t.expression!==s&&this.raise(p.DecoratorArgumentsOutsideParentheses,n)}else{for(s=this.parseIdentifier(!1);this.eat(16);){let i=this.startNodeAt(e);i.object=s,this.match(139)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),i.property=this.parsePrivateName()):i.property=this.parseIdentifier(!0),i.computed=!1,s=this.finishNode(i,"MemberExpression")}t.expression=this.parseMaybeDecoratorArguments(s,e)}}else t.expression=this.parseExprSubscripts();return this.finishNode(t,"Decorator")}parseMaybeDecoratorArguments(t,e){if(this.eat(10)){let s=this.startNodeAt(e);return s.callee=t,s.arguments=this.parseCallExpressionArguments(),this.toReferencedList(s.arguments),this.finishNode(s,"CallExpression")}return t}parseBreakContinueStatement(t,e){return this.next(),this.isLineTerminator()?t.label=null:(t.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(t,e),this.finishNode(t,e?"BreakStatement":"ContinueStatement")}verifyBreakContinue(t,e){let s;for(s=0;s<this.state.labels.length;++s){let i=this.state.labels[s];if((t.label==null||i.name===t.label.name)&&(i.kind!=null&&(e||i.kind===1)||t.label&&e))break}if(s===this.state.labels.length){let i=e?"BreakStatement":"ContinueStatement";this.raise(p.IllegalBreakContinue,t,{type:i})}}parseDebuggerStatement(t){return this.next(),this.semicolon(),this.finishNode(t,"DebuggerStatement")}parseHeaderExpression(){this.expect(10);let t=this.parseExpression();return this.expect(11),t}parseDoWhileStatement(t){return this.next(),this.state.labels.push(ct),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.expect(92),t.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(t,"DoWhileStatement")}parseForStatement(t){this.next(),this.state.labels.push(ct);let e=null;if(this.isContextual(96)&&this.recordAwaitIfAllowed()&&(e=this.state.startLoc,this.next()),this.scope.enter(0),this.expect(10),this.match(13))return e!==null&&this.unexpected(e),this.parseFor(t,null);let s=this.isContextual(100);{let l=this.isAwaitUsing(),c=l||this.isForUsing(),u=s&&this.hasFollowingBindingAtom()||c;if(this.match(74)||this.match(75)||u){let f=this.startNode(),d;l?(d="await using",this.recordAwaitIfAllowed()||this.raise(p.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):d=this.state.value,this.next(),this.parseVar(f,!0,d);let m=this.finishNode(f,"VariableDeclaration"),y=this.match(58);return y&&c&&this.raise(p.ForInUsing,m),(y||this.isContextual(102))&&m.declarations.length===1?this.parseForIn(t,m,e):(e!==null&&this.unexpected(e),this.parseFor(t,m))}}let i=this.isContextual(95),n=new ge,a=this.parseExpression(!0,n),o=this.isContextual(102);if(o&&(s&&this.raise(p.ForOfLet,a),e===null&&i&&a.type==="Identifier"&&this.raise(p.ForOfAsync,a)),o||this.match(58)){this.checkDestructuringPrivate(n),this.toAssignable(a,!0);let l=o?"ForOfStatement":"ForInStatement";return this.checkLVal(a,{type:l}),this.parseForIn(t,a,e)}else this.checkExpressionErrors(n,!0);return e!==null&&this.unexpected(e),this.parseFor(t,a)}parseFunctionStatement(t,e,s){return this.next(),this.parseFunction(t,1|(s?2:0)|(e?8:0))}parseIfStatement(t){return this.next(),t.test=this.parseHeaderExpression(),t.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),t.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(t,"IfStatement")}parseReturnStatement(t){return this.prodParam.hasReturn||this.raise(p.IllegalReturn,this.state.startLoc),this.next(),this.isLineTerminator()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")}parseSwitchStatement(t){this.next(),t.discriminant=this.parseHeaderExpression();let e=t.cases=[];this.expect(5),this.state.labels.push(mn),this.scope.enter(256);let s;for(let i;!this.match(8);)if(this.match(61)||this.match(65)){let n=this.match(61);s&&this.finishNode(s,"SwitchCase"),e.push(s=this.startNode()),s.consequent=[],this.next(),n?s.test=this.parseExpression():(i&&this.raise(p.MultipleDefaultsInSwitch,this.state.lastTokStartLoc),i=!0,s.test=null),this.expect(14)}else s?s.consequent.push(this.parseStatementListItem()):this.unexpected();return this.scope.exit(),s&&this.finishNode(s,"SwitchCase"),this.next(),this.state.labels.pop(),this.finishNode(t,"SwitchStatement")}parseThrowStatement(t){return this.next(),this.hasPrecedingLineBreak()&&this.raise(p.NewlineAfterThrow,this.state.lastTokEndLoc),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")}parseCatchClauseParam(){let t=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&t.type==="Identifier"?8:0),this.checkLVal(t,{type:"CatchClause"},9),t}parseTryStatement(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.match(62)){let e=this.startNode();this.next(),this.match(10)?(this.expect(10),e.param=this.parseCatchClauseParam(),this.expect(11)):(e.param=null,this.scope.enter(0)),e.body=this.withSmartMixTopicForbiddingContext(()=>this.parseBlock(!1,!1)),this.scope.exit(),t.handler=this.finishNode(e,"CatchClause")}return t.finalizer=this.eat(67)?this.parseBlock():null,!t.handler&&!t.finalizer&&this.raise(p.NoCatchOrFinally,t),this.finishNode(t,"TryStatement")}parseVarStatement(t,e,s=!1){return this.next(),this.parseVar(t,!1,e,s),this.semicolon(),this.finishNode(t,"VariableDeclaration")}parseWhileStatement(t){return this.next(),t.test=this.parseHeaderExpression(),this.state.labels.push(ct),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(t,"WhileStatement")}parseWithStatement(t){return this.state.strict&&this.raise(p.StrictWith,this.state.startLoc),this.next(),t.object=this.parseHeaderExpression(),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.finishNode(t,"WithStatement")}parseEmptyStatement(t){return this.next(),this.finishNode(t,"EmptyStatement")}parseLabeledStatement(t,e,s,i){for(let a of this.state.labels)a.name===e&&this.raise(p.LabelRedeclaration,s,{labelName:e});let n=Sr(this.state.type)?1:this.match(71)?2:null;for(let a=this.state.labels.length-1;a>=0;a--){let o=this.state.labels[a];if(o.statementStart===t.start)o.statementStart=this.sourceToOffsetPos(this.state.start),o.kind=n;else break}return this.state.labels.push({name:e,kind:n,statementStart:this.sourceToOffsetPos(this.state.start)}),t.body=i&8?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),t.label=s,this.finishNode(t,"LabeledStatement")}parseExpressionStatement(t,e,s){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")}parseBlock(t=!1,e=!0,s){let i=this.startNode();return t&&this.state.strictErrors.clear(),this.expect(5),e&&this.scope.enter(0),this.parseBlockBody(i,t,!1,8,s),e&&this.scope.exit(),this.finishNode(i,"BlockStatement")}isValidDirective(t){return t.type==="ExpressionStatement"&&t.expression.type==="StringLiteral"&&!t.expression.extra.parenthesized}parseBlockBody(t,e,s,i,n){let a=t.body=[],o=t.directives=[];this.parseBlockOrModuleBlockBody(a,e?o:void 0,s,i,n)}parseBlockOrModuleBlockBody(t,e,s,i,n){let a=this.state.strict,o=!1,l=!1;for(;!this.match(i);){let c=s?this.parseModuleItem():this.parseStatementListItem();if(e&&!l){if(this.isValidDirective(c)){let u=this.stmtToDirective(c);e.push(u),!o&&u.value.value==="use strict"&&(o=!0,this.setStrict(!0));continue}l=!0,this.state.strictErrors.clear()}t.push(c)}n?.call(this,o),a||this.setStrict(!1),this.next()}parseFor(t,e){return t.init=e,this.semicolon(!1),t.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),t.update=this.match(11)?null:this.parseExpression(),this.expect(11),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,"ForStatement")}parseForIn(t,e,s){let i=this.match(58);return this.next(),i?s!==null&&this.unexpected(s):t.await=s!==null,e.type==="VariableDeclaration"&&e.declarations[0].init!=null&&(!i||!this.options.annexB||this.state.strict||e.kind!=="var"||e.declarations[0].id.type!=="Identifier")&&this.raise(p.ForInOfLoopInitializer,e,{type:i?"ForInStatement":"ForOfStatement"}),e.type==="AssignmentPattern"&&this.raise(p.InvalidLhs,e,{ancestor:{type:"ForStatement"}}),t.left=e,t.right=i?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.scope.exit(),this.state.labels.pop(),this.finishNode(t,i?"ForInStatement":"ForOfStatement")}parseVar(t,e,s,i=!1){let n=t.declarations=[];for(t.kind=s;;){let a=this.startNode();if(this.parseVarId(a,s),a.init=this.eat(29)?e?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,a.init===null&&!i&&(a.id.type!=="Identifier"&&!(e&&(this.match(58)||this.isContextual(102)))?this.raise(p.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):(s==="const"||s==="using"||s==="await using")&&!(this.match(58)||this.isContextual(102))&&this.raise(p.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:s})),n.push(this.finishNode(a,"VariableDeclarator")),!this.eat(12))break}return t}parseVarId(t,e){let s=this.parseBindingAtom();e==="using"||e==="await using"?(s.type==="ArrayPattern"||s.type==="ObjectPattern")&&this.raise(p.UsingDeclarationHasBindingPattern,s.loc.start):s.type==="VoidPattern"&&this.raise(p.UnexpectedVoidPattern,s.loc.start),this.checkLVal(s,{type:"VariableDeclarator"},e==="var"?5:8201),t.id=s}parseAsyncFunctionExpression(t){return this.parseFunction(t,8)}parseFunction(t,e=0){let s=e&2,i=!!(e&1),n=i&&!(e&4),a=!!(e&8);this.initFunction(t,a),this.match(55)&&(s&&this.raise(p.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),t.generator=!0),i&&(t.id=this.parseFunctionId(n));let o=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(514),this.prodParam.enter(Xe(a,t.generator)),i||(t.id=this.parseFunctionId()),this.parseFunctionParams(t,!1),this.withSmartMixTopicForbiddingContext(()=>{this.parseFunctionBodyAndFinish(t,i?"FunctionDeclaration":"FunctionExpression")}),this.prodParam.exit(),this.scope.exit(),i&&!s&&this.registerFunctionStatementId(t),this.state.maybeInArrowParameters=o,t}parseFunctionId(t){return t||k(this.state.type)?this.parseIdentifier():null}parseFunctionParams(t,e){this.expect(10),this.expressionScope.enter(en()),t.params=this.parseBindingList(11,41,2|(e?4:0)),this.expressionScope.exit()}registerFunctionStatementId(t){t.id&&this.scope.declareName(t.id.name,!this.options.annexB||this.state.strict||t.generator||t.async?this.scope.treatFunctionsAsVar?5:8201:17,t.id.loc.start)}parseClass(t,e,s){this.next();let i=this.state.strict;return this.state.strict=!0,this.parseClassId(t,e,s),this.parseClassSuper(t),t.body=this.parseClassBody(!!t.superClass,i),this.finishNode(t,e?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}nameIsConstructor(t){return t.type==="Identifier"&&t.name==="constructor"||t.type==="StringLiteral"&&t.value==="constructor"}isNonstaticConstructor(t){return!t.computed&&!t.static&&this.nameIsConstructor(t.key)}parseClassBody(t,e){this.classScope.enter();let s={hadConstructor:!1,hadSuperClass:t},i=[],n=this.startNode();if(n.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(i.length>0)throw this.raise(p.DecoratorSemicolon,this.state.lastTokEndLoc);continue}if(this.match(26)){i.push(this.parseDecorator());continue}let a=this.startNode();i.length&&(a.decorators=i,this.resetStartLocationFromNode(a,i[0]),i=[]),this.parseClassMember(n,a,s),a.kind==="constructor"&&a.decorators&&a.decorators.length>0&&this.raise(p.DecoratorConstructor,a)}}),this.state.strict=e,this.next(),i.length)throw this.raise(p.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(n,"ClassBody")}parseClassMemberFromModifier(t,e){let s=this.parseIdentifier(!0);if(this.isClassMethod()){let i=e;return i.kind="method",i.computed=!1,i.key=s,i.static=!1,this.pushClassMethod(t,i,!1,!1,!1,!1),!0}else if(this.isClassProperty()){let i=e;return i.computed=!1,i.key=s,i.static=!1,t.body.push(this.parseClassProperty(i)),!0}return this.resetPreviousNodeTrailingComments(s),!1}parseClassMember(t,e,s){let i=this.isContextual(106);if(i){if(this.parseClassMemberFromModifier(t,e))return;if(this.eat(5)){this.parseClassStaticBlock(t,e);return}}this.parseClassMemberWithIsStatic(t,e,s,i)}parseClassMemberWithIsStatic(t,e,s,i){let n=e,a=e,o=e,l=e,c=e,u=n,f=n;if(e.static=i,this.parsePropertyNamePrefixOperator(e),this.eat(55)){u.kind="method";let P=this.match(139);if(this.parseClassElementName(u),this.parsePostMemberNameModifiers(u),P){this.pushClassPrivateMethod(t,a,!0,!1);return}this.isNonstaticConstructor(n)&&this.raise(p.ConstructorIsGenerator,n.key),this.pushClassMethod(t,n,!0,!1,!1,!1);return}let d=!this.state.containsEsc&&k(this.state.type),m=this.parseClassElementName(e),y=d?m.name:null,S=this.isPrivateName(m),O=this.state.startLoc;if(this.parsePostMemberNameModifiers(f),this.isClassMethod()){if(u.kind="method",S){this.pushClassPrivateMethod(t,a,!1,!1);return}let P=this.isNonstaticConstructor(n),v=!1;P&&(n.kind="constructor",s.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(p.DuplicateConstructor,m),P&&this.hasPlugin("typescript")&&e.override&&this.raise(p.OverrideOnConstructor,m),s.hadConstructor=!0,v=s.hadSuperClass),this.pushClassMethod(t,n,!1,!1,P,v)}else if(this.isClassProperty())S?this.pushClassPrivateProperty(t,l):this.pushClassProperty(t,o);else if(y==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(m);let P=this.eat(55);f.optional&&this.unexpected(O),u.kind="method";let v=this.match(139);this.parseClassElementName(u),this.parsePostMemberNameModifiers(f),v?this.pushClassPrivateMethod(t,a,P,!0):(this.isNonstaticConstructor(n)&&this.raise(p.ConstructorIsAsync,n.key),this.pushClassMethod(t,n,P,!0,!1,!1))}else if((y==="get"||y==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(m),u.kind=y;let P=this.match(139);this.parseClassElementName(n),P?this.pushClassPrivateMethod(t,a,!1,!1):(this.isNonstaticConstructor(n)&&this.raise(p.ConstructorIsAccessor,n.key),this.pushClassMethod(t,n,!1,!1,!1,!1)),this.checkGetterSetterParams(n)}else if(y==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(m);let P=this.match(139);this.parseClassElementName(o),this.pushClassAccessorProperty(t,c,P)}else this.isLineTerminator()?S?this.pushClassPrivateProperty(t,l):this.pushClassProperty(t,o):this.unexpected()}parseClassElementName(t){let{type:e,value:s}=this.state;if((e===132||e===134)&&t.static&&s==="prototype"&&this.raise(p.StaticPrototype,this.state.startLoc),e===139){s==="constructor"&&this.raise(p.ConstructorClassPrivateField,this.state.startLoc);let i=this.parsePrivateName();return t.key=i,i}return this.parsePropertyName(t),t.key}parseClassStaticBlock(t,e){var s;this.scope.enter(720);let i=this.state.labels;this.state.labels=[],this.prodParam.enter(0);let n=e.body=[];this.parseBlockOrModuleBlockBody(n,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=i,t.body.push(this.finishNode(e,"StaticBlock")),(s=e.decorators)!=null&&s.length&&this.raise(p.DecoratorStaticBlock,e)}pushClassProperty(t,e){!e.computed&&this.nameIsConstructor(e.key)&&this.raise(p.ConstructorClassField,e.key),t.body.push(this.parseClassProperty(e))}pushClassPrivateProperty(t,e){let s=this.parseClassPrivateProperty(e);t.body.push(s),this.classScope.declarePrivateName(this.getPrivateNameSV(s.key),0,s.key.loc.start)}pushClassAccessorProperty(t,e,s){!s&&!e.computed&&this.nameIsConstructor(e.key)&&this.raise(p.ConstructorClassField,e.key);let i=this.parseClassAccessorProperty(e);t.body.push(i),s&&this.classScope.declarePrivateName(this.getPrivateNameSV(i.key),0,i.key.loc.start)}pushClassMethod(t,e,s,i,n,a){t.body.push(this.parseMethod(e,s,i,n,a,"ClassMethod",!0))}pushClassPrivateMethod(t,e,s,i){let n=this.parseMethod(e,s,i,!1,!1,"ClassPrivateMethod",!0);t.body.push(n);let a=n.kind==="get"?n.static?6:2:n.kind==="set"?n.static?5:1:0;this.declareClassPrivateMethodInScope(n,a)}declareClassPrivateMethodInScope(t,e){this.classScope.declarePrivateName(this.getPrivateNameSV(t.key),e,t.key.loc.start)}parsePostMemberNameModifiers(t){}parseClassPrivateProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassPrivateProperty")}parseClassProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassProperty")}parseClassAccessorProperty(t){return this.parseInitializer(t),this.semicolon(),this.finishNode(t,"ClassAccessorProperty")}parseInitializer(t){this.scope.enter(592),this.expressionScope.enter(ii()),this.prodParam.enter(0),t.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(t,e,s,i=8331){if(k(this.state.type))t.id=this.parseIdentifier(),e&&this.declareNameFromIdentifier(t.id,i);else if(s||!e)t.id=null;else throw this.raise(p.MissingClassName,this.state.startLoc)}parseClassSuper(t){t.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(t,e){let s=this.parseMaybeImportPhase(t,!0),i=this.maybeParseExportDefaultSpecifier(t,s),n=!i||this.eat(12),a=n&&this.eatExportStar(t),o=a&&this.maybeParseExportNamespaceSpecifier(t),l=n&&(!o||this.eat(12)),c=i||a;if(a&&!o){if(i&&this.unexpected(),e)throw this.raise(p.UnsupportedDecoratorExport,t);return this.parseExportFrom(t,!0),this.sawUnambiguousESM=!0,this.finishNode(t,"ExportAllDeclaration")}let u=this.maybeParseExportNamedSpecifiers(t);i&&n&&!a&&!u&&this.unexpected(null,5),o&&l&&this.unexpected(null,98);let f;if(c||u){if(f=!1,e)throw this.raise(p.UnsupportedDecoratorExport,t);this.parseExportFrom(t,c)}else f=this.maybeParseExportDeclaration(t);if(c||u||f){var d;let m=t;if(this.checkExport(m,!0,!1,!!m.source),((d=m.declaration)==null?void 0:d.type)==="ClassDeclaration")this.maybeTakeDecorators(e,m.declaration,m);else if(e)throw this.raise(p.UnsupportedDecoratorExport,t);return this.sawUnambiguousESM=!0,this.finishNode(m,"ExportNamedDeclaration")}if(this.eat(65)){let m=t,y=this.parseExportDefaultExpression();if(m.declaration=y,y.type==="ClassDeclaration")this.maybeTakeDecorators(e,y,m);else if(e)throw this.raise(p.UnsupportedDecoratorExport,t);return this.checkExport(m,!0,!0),this.sawUnambiguousESM=!0,this.finishNode(m,"ExportDefaultDeclaration")}throw this.unexpected(null,5)}eatExportStar(t){return this.eat(55)}maybeParseExportDefaultSpecifier(t,e){if(e||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",e?.loc.start);let s=e||this.parseIdentifier(!0),i=this.startNodeAtNode(s);return i.exported=s,t.specifiers=[this.finishNode(i,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(t){if(this.isContextual(93)){var e,s;(s=(e=t).specifiers)!=null||(e.specifiers=[]);let i=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),i.exported=this.parseModuleExportName(),t.specifiers.push(this.finishNode(i,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(t){if(this.match(5)){let e=t;e.specifiers||(e.specifiers=[]);let s=e.exportKind==="type";return e.specifiers.push(...this.parseExportSpecifiers(s)),e.source=null,this.hasPlugin("importAssertions")?e.assertions=[]:e.attributes=[],e.declaration=null,!0}return!1}maybeParseExportDeclaration(t){return this.shouldParseExportDeclaration()?(t.specifiers=[],t.source=null,this.hasPlugin("importAssertions")?t.assertions=[]:t.attributes=[],t.declaration=this.parseExportDeclaration(t),!0):!1}isAsyncFunction(){if(!this.isContextual(95))return!1;let t=this.nextTokenInLineStart();return this.isUnparsedContextual(t,"function")}parseExportDefaultExpression(){let t=this.startNode();if(this.match(68))return this.next(),this.parseFunction(t,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(t,13);if(this.match(80))return this.parseClass(t,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(p.DecoratorBeforeExport,this.state.startLoc),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet()||this.isUsing()||this.isAwaitUsing())throw this.raise(p.UnsupportedDefaultExport,this.state.startLoc);let e=this.parseMaybeAssignAllowIn();return this.semicolon(),e}parseExportDeclaration(t){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){let{type:t}=this.state;if(k(t)){if(t===95&&!this.state.containsEsc||t===100)return!1;if((t===130||t===129)&&!this.state.containsEsc){let i=this.nextTokenStart(),n=this.input.charCodeAt(i);if(n===123||this.chStartsBindingIdentifier(n,i)&&!this.input.startsWith("from",i))return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;let e=this.nextTokenStart(),s=this.isUnparsedContextual(e,"from");if(this.input.charCodeAt(e)===44||k(this.state.type)&&s)return!0;if(this.match(65)&&s){let i=this.input.charCodeAt(this.nextTokenStartSince(e+4));return i===34||i===39}return!1}parseExportFrom(t,e){this.eatContextual(98)?(t.source=this.parseImportSource(),this.checkExport(t),this.maybeParseImportAttributes(t),this.checkJSONModuleImport(t)):e&&this.unexpected(),this.semicolon()}shouldParseExportDeclaration(){let{type:t}=this.state;return t===26&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(this.getPluginOption("decorators","decoratorsBeforeExport")===!0&&this.raise(p.DecoratorBeforeExport,this.state.startLoc),!0):this.isUsing()?(this.raise(p.UsingDeclarationExport,this.state.startLoc),!0):this.isAwaitUsing()?(this.raise(p.UsingDeclarationExport,this.state.startLoc),!0):t===74||t===75||t===68||t===80||this.isLet()||this.isAsyncFunction()}checkExport(t,e,s,i){if(e){var n;if(s){if(this.checkDuplicateExports(t,"default"),this.hasPlugin("exportDefaultFrom")){var a;let o=t.declaration;o.type==="Identifier"&&o.name==="from"&&o.end-o.start===4&&!((a=o.extra)!=null&&a.parenthesized)&&this.raise(p.ExportDefaultFromAsIdentifier,o)}}else if((n=t.specifiers)!=null&&n.length)for(let o of t.specifiers){let{exported:l}=o,c=l.type==="Identifier"?l.name:l.value;if(this.checkDuplicateExports(o,c),!i&&o.local){let{local:u}=o;u.type!=="Identifier"?this.raise(p.ExportBindingIsString,o,{localName:u.value,exportName:c}):(this.checkReservedWord(u.name,u.loc.start,!0,!1),this.scope.checkLocalExport(u))}}else if(t.declaration){let o=t.declaration;if(o.type==="FunctionDeclaration"||o.type==="ClassDeclaration"){let{id:l}=o;if(!l)throw new Error("Assertion failure");this.checkDuplicateExports(t,l.name)}else if(o.type==="VariableDeclaration")for(let l of o.declarations)this.checkDeclaration(l.id)}}}checkDeclaration(t){if(t.type==="Identifier")this.checkDuplicateExports(t,t.name);else if(t.type==="ObjectPattern")for(let e of t.properties)this.checkDeclaration(e);else if(t.type==="ArrayPattern")for(let e of t.elements)e&&this.checkDeclaration(e);else t.type==="ObjectProperty"?this.checkDeclaration(t.value):t.type==="RestElement"?this.checkDeclaration(t.argument):t.type==="AssignmentPattern"&&this.checkDeclaration(t.left)}checkDuplicateExports(t,e){this.exportedIdentifiers.has(e)&&(e==="default"?this.raise(p.DuplicateDefaultExport,t):this.raise(p.DuplicateExport,t,{exportName:e})),this.exportedIdentifiers.add(e)}parseExportSpecifiers(t){let e=[],s=!0;for(this.expect(5);!this.eat(8);){if(s)s=!1;else if(this.expect(12),this.eat(8))break;let i=this.isContextual(130),n=this.match(134),a=this.startNode();a.local=this.parseModuleExportName(),e.push(this.parseExportSpecifier(a,n,t,i))}return e}parseExportSpecifier(t,e,s,i){return this.eatContextual(93)?t.exported=this.parseModuleExportName():e?t.exported=this.cloneStringLiteral(t.local):t.exported||(t.exported=this.cloneIdentifier(t.local)),this.finishNode(t,"ExportSpecifier")}parseModuleExportName(){if(this.match(134)){let t=this.parseStringLiteral(this.state.value),e=yn.exec(t.value);return e&&this.raise(p.ModuleExportNameHasLoneSurrogate,t,{surrogateCharCode:e[0].charCodeAt(0)}),t}return this.parseIdentifier(!0)}isJSONModuleImport(t){return t.assertions!=null?t.assertions.some(({key:e,value:s})=>s.value==="json"&&(e.type==="Identifier"?e.name==="type":e.value==="type")):!1}checkImportReflection(t){let{specifiers:e}=t,s=e.length===1?e[0].type:null;if(t.phase==="source")s!=="ImportDefaultSpecifier"&&this.raise(p.SourcePhaseImportRequiresDefault,e[0].loc.start);else if(t.phase==="defer")s!=="ImportNamespaceSpecifier"&&this.raise(p.DeferImportRequiresNamespace,e[0].loc.start);else if(t.module){var i;s!=="ImportDefaultSpecifier"&&this.raise(p.ImportReflectionNotBinding,e[0].loc.start),((i=t.assertions)==null?void 0:i.length)>0&&this.raise(p.ImportReflectionHasAssertion,e[0].loc.start)}}checkJSONModuleImport(t){if(this.isJSONModuleImport(t)&&t.type!=="ExportAllDeclaration"){let{specifiers:e}=t;if(e!=null){let s=e.find(i=>{let n;if(i.type==="ExportSpecifier"?n=i.local:i.type==="ImportSpecifier"&&(n=i.imported),n!==void 0)return n.type==="Identifier"?n.name!=="default":n.value!=="default"});s!==void 0&&this.raise(p.ImportJSONBindingNotDefault,s.loc.start)}}}isPotentialImportPhase(t){return t?!1:this.isContextual(105)||this.isContextual(97)||this.isContextual(127)}applyImportPhase(t,e,s,i){e||(s==="module"?(this.expectPlugin("importReflection",i),t.module=!0):this.hasPlugin("importReflection")&&(t.module=!1),s==="source"?(this.expectPlugin("sourcePhaseImports",i),t.phase="source"):s==="defer"?(this.expectPlugin("deferredImportEvaluation",i),t.phase="defer"):this.hasPlugin("sourcePhaseImports")&&(t.phase=null))}parseMaybeImportPhase(t,e){if(!this.isPotentialImportPhase(e))return this.applyImportPhase(t,e,null),null;let s=this.startNode(),i=this.parseIdentifierName(!0),{type:n}=this.state;return(X(n)?n!==98||this.lookaheadCharCode()===102:n!==12)?(this.applyImportPhase(t,e,i,s.loc.start),null):(this.applyImportPhase(t,e,null),this.createIdentifier(s,i))}isPrecedingIdImportPhase(t){let{type:e}=this.state;return k(e)?e!==98||this.lookaheadCharCode()===102:e!==12}parseImport(t){return this.match(134)?this.parseImportSourceAndAttributes(t):this.parseImportSpecifiersAndAfter(t,this.parseMaybeImportPhase(t,!1))}parseImportSpecifiersAndAfter(t,e){t.specifiers=[];let i=!this.maybeParseDefaultImportSpecifier(t,e)||this.eat(12),n=i&&this.maybeParseStarImportSpecifier(t);return i&&!n&&this.parseNamedImportSpecifiers(t),this.expectContextual(98),this.parseImportSourceAndAttributes(t)}parseImportSourceAndAttributes(t){var e;return(e=t.specifiers)!=null||(t.specifiers=[]),t.source=this.parseImportSource(),this.maybeParseImportAttributes(t),this.checkImportReflection(t),this.checkJSONModuleImport(t),this.semicolon(),this.sawUnambiguousESM=!0,this.finishNode(t,"ImportDeclaration")}parseImportSource(){return this.match(134)||this.unexpected(),this.parseExprAtom()}parseImportSpecifierLocal(t,e,s){e.local=this.parseIdentifier(),t.specifiers.push(this.finishImportSpecifier(e,s))}finishImportSpecifier(t,e,s=8201){return this.checkLVal(t.local,{type:e},s),this.finishNode(t,e)}parseImportAttributes(){this.expect(5);let t=[],e=new Set;do{if(this.match(8))break;let s=this.startNode(),i=this.state.value;if(e.has(i)&&this.raise(p.ModuleAttributesWithDuplicateKeys,this.state.startLoc,{key:i}),e.add(i),this.match(134)?s.key=this.parseStringLiteral(i):s.key=this.parseIdentifier(!0),this.expect(14),!this.match(134))throw this.raise(p.ModuleAttributeInvalidValue,this.state.startLoc);s.value=this.parseStringLiteral(this.state.value),t.push(this.finishNode(s,"ImportAttribute"))}while(this.eat(12));return this.expect(8),t}parseModuleAttributes(){let t=[],e=new Set;do{let s=this.startNode();if(s.key=this.parseIdentifier(!0),s.key.name!=="type"&&this.raise(p.ModuleAttributeDifferentFromType,s.key),e.has(s.key.name)&&this.raise(p.ModuleAttributesWithDuplicateKeys,s.key,{key:s.key.name}),e.add(s.key.name),this.expect(14),!this.match(134))throw this.raise(p.ModuleAttributeInvalidValue,this.state.startLoc);s.value=this.parseStringLiteral(this.state.value),t.push(this.finishNode(s,"ImportAttribute"))}while(this.eat(12));return t}maybeParseImportAttributes(t){let e;var s=!1;if(this.match(76)){if(this.hasPrecedingLineBreak()&&this.lookaheadCharCode()===40)return;this.next(),this.hasPlugin("moduleAttributes")?(e=this.parseModuleAttributes(),this.addExtra(t,"deprecatedWithLegacySyntax",!0)):e=this.parseImportAttributes(),s=!0}else this.isContextual(94)&&!this.hasPrecedingLineBreak()?(!this.hasPlugin("deprecatedImportAssert")&&!this.hasPlugin("importAssertions")&&this.raise(p.ImportAttributesUseAssert,this.state.startLoc),this.hasPlugin("importAssertions")||this.addExtra(t,"deprecatedAssertSyntax",!0),this.next(),e=this.parseImportAttributes()):e=[];!s&&this.hasPlugin("importAssertions")?t.assertions=e:t.attributes=e}maybeParseDefaultImportSpecifier(t,e){if(e){let s=this.startNodeAtNode(e);return s.local=e,t.specifiers.push(this.finishImportSpecifier(s,"ImportDefaultSpecifier")),!0}else if(X(this.state.type))return this.parseImportSpecifierLocal(t,this.startNode(),"ImportDefaultSpecifier"),!0;return!1}maybeParseStarImportSpecifier(t){if(this.match(55)){let e=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(t,e,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(t){let e=!0;for(this.expect(5);!this.eat(8);){if(e)e=!1;else{if(this.eat(14))throw this.raise(p.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}let s=this.startNode(),i=this.match(134),n=this.isContextual(130);s.imported=this.parseModuleExportName();let a=this.parseImportSpecifier(s,i,t.importKind==="type"||t.importKind==="typeof",n,void 0);t.specifiers.push(a)}}parseImportSpecifier(t,e,s,i,n){if(this.eatContextual(93))t.local=this.parseIdentifier();else{let{imported:a}=t;if(e)throw this.raise(p.ImportBindingIsString,t,{importName:a.value});this.checkReservedWord(a.name,t.loc.start,!0,!0),t.local||(t.local=this.cloneIdentifier(a))}return this.finishImportSpecifier(t,"ImportSpecifier",n)}isThisParam(t){return t.type==="Identifier"&&t.name==="this"}},We=class extends Ot{static{h(this,"Parser")}constructor(t,e,s){let i=dr(t);super(i,e),this.options=i,this.initializeScopes(),this.plugins=s,this.filename=i.sourceFilename,this.startIndex=i.startIndex;let n=0;i.allowAwaitOutsideFunction&&(n|=1),i.allowReturnOutsideFunction&&(n|=2),i.allowImportExportEverywhere&&(n|=8),i.allowSuperOutsideMethod&&(n|=16),i.allowUndeclaredExports&&(n|=64),i.allowNewTargetOutsideFunction&&(n|=4),i.allowYieldOutsideFunction&&(n|=32),i.ranges&&(n|=128),i.tokens&&(n|=256),i.createImportExpressions&&(n|=512),i.createParenthesizedExpressions&&(n|=1024),i.errorRecovery&&(n|=2048),i.attachComment&&(n|=4096),i.annexB&&(n|=8192),this.optionFlags=n}getScopeHandler(){return _e}parse(){this.enterInitialScopes();let t=this.startNode(),e=this.startNode();this.nextToken(),t.errors=null;let s=this.parseTopLevel(t,e);return s.errors=this.state.errors,s.comments.length=this.state.commentsLen,s}};function xn(r,t){var e;if(((e=t)==null?void 0:e.sourceType)==="unambiguous"){t=Object.assign({},t);try{t.sourceType="module";let s=ve(t,r),i=s.parse();if(s.sawUnambiguousESM)return i;if(s.ambiguousScriptDifferentAst)try{return t.sourceType="script",ve(t,r).parse()}catch{}else i.program.sourceType="script";return i}catch(s){try{return t.sourceType="script",ve(t,r).parse()}catch{}throw s}}else return ve(t,r).parse()}h(xn,"parse");function Tn(r,t){let e=ve(t,r);return e.options.strictMode&&(e.state.strict=!0),e.getExpression()}h(Tn,"parseExpression");function En(r){let t={};for(let e of Object.keys(r))t[e]=Y(r[e]);return t}h(En,"generateExportedTokenTypes");var Pn=En(xr);function ve(r,t){let e=We,s=new Map;if(r!=null&&r.plugins){for(let i of r.plugins){let n,a;typeof i=="string"?n=i:[n,a]=i,s.has(n)||s.set(n,a||{})}fn(s),e=Sn(s)}return new e(r,t,s)}h(ve,"getParser");var zs=new Map;function Sn(r){let t=[];for(let i of dn)r.has(i)&&t.push(i);let e=t.join("|"),s=zs.get(e);if(!s){s=We;for(let i of t)s=ai[i](s);zs.set(e,s)}return s}h(Sn,"getParserClass");De.parse=xn;De.parseExpression=Tn;De.tokTypes=Pn});function Pe(r){let t=Object.create(null);for(let e of r.split(","))t[e]=1;return e=>e in t}h(Pe,"makeMap");var Me=h(()=>!1,"NO");var Se=Object.assign;var oi=Array.isArray;var J=h(r=>typeof r=="string","isString");var Ge=h(r=>{let t=Object.create(null);return(e=>t[e]||(t[e]=r(e)))},"cacheStringFunction"),An=/-\w/g,Nn=Ge(r=>r.replace(An,t=>t.slice(1).toUpperCase())),In=/\B([A-Z])/g,qa=Ge(r=>r.replace(In,"-$1").toLowerCase()),jt=Ge(r=>r.charAt(0).toUpperCase()+r.slice(1)),Cn=Ge(r=>r?`on${jt(r)}`:"");var wn="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot",vn="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",kn="annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics",On="area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr",li=Pe(wn),ci=Pe(vn),hi=Pe(kn),ui=Pe(On),_n="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly";var za=Pe(_n+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");var et=Symbol(""),Ci=Symbol(""),wi=Symbol(""),vi=Symbol(""),ki=Symbol(""),Re=Symbol(""),Oi=Symbol(""),_i=Symbol(""),Li=Symbol(""),Di=Symbol(""),Kt=Symbol(""),Ln=Symbol(""),Dn=Symbol(""),Mn=Symbol(""),Rn=Symbol(""),Fn=Symbol(""),Bn=Symbol(""),Mi=Symbol(""),Ri=Symbol(""),Vn=Symbol(""),Un=Symbol(""),Wt=Symbol(""),$t=Symbol(""),jn=Symbol(""),$n=Symbol(""),Fi=Symbol(""),Gt=Symbol(""),Bi=Symbol(""),Hn=Symbol(""),Xn=Symbol(""),qn=Symbol(""),zn=Symbol(""),Kn=Symbol(""),Wn=Symbol(""),Gn=Symbol(""),Jn=Symbol(""),Yn=Symbol(""),Vi=Symbol(""),Ui=Symbol(""),Qn={[et]:"Fragment",[Ci]:"Teleport",[wi]:"Suspense",[vi]:"KeepAlive",[ki]:"BaseTransition",[Re]:"openBlock",[Oi]:"createBlock",[_i]:"createElementBlock",[Li]:"createVNode",[Di]:"createElementVNode",[Kt]:"createCommentVNode",[Ln]:"createTextVNode",[Dn]:"createStaticVNode",[Mn]:"resolveComponent",[Rn]:"resolveDynamicComponent",[Fn]:"resolveDirective",[Bn]:"resolveFilter",[Mi]:"withDirectives",[Ri]:"renderList",[Vn]:"renderSlot",[Un]:"createSlots",[Wt]:"toDisplayString",[$t]:"mergeProps",[jn]:"normalizeClass",[$n]:"normalizeStyle",[Fi]:"normalizeProps",[Gt]:"guardReactiveProps",[Bi]:"toHandlers",[Hn]:"camelize",[Xn]:"capitalize",[qn]:"toHandlerKey",[zn]:"setBlockTracking",[Kn]:"pushScopeId",[Wn]:"popScopeId",[Gn]:"withCtx",[Jn]:"unref",[Yn]:"isRef",[Vi]:"withMemo",[Ui]:"isMemoSame"};function ji(r){Object.getOwnPropertySymbols(r).forEach(t=>{Qn[t]=r[t]})}h(ji,"registerRuntimeHelpers");var q={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function Zn(r,t=""){return{type:0,source:t,children:r,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:q}}h(Zn,"createRoot");function Ht(r,t,e,s,i,n,a,o=!1,l=!1,c=!1,u=q){return r&&(o?(r.helper(Re),r.helper(st(r.inSSR,c))):r.helper(tt(r.inSSR,c)),a&&r.helper(Mi)),{type:13,tag:t,props:e,children:s,patchFlag:i,dynamicProps:n,directives:a,isBlock:o,disableTracking:l,isComponent:c,loc:u}}h(Ht,"createVNodeCall");function be(r,t=q){return{type:15,loc:t,properties:r}}h(be,"createObjectExpression");function Jt(r,t){return{type:16,loc:q,key:J(r)?U(r,!0):r,value:t}}h(Jt,"createObjectProperty");function U(r,t=!1,e=q,s=0){return{type:4,loc:e,content:r,isStatic:t,constType:t?3:s}}h(U,"createSimpleExpression");function Ye(r,t=q){return{type:8,loc:t,children:r}}h(Ye,"createCompoundExpression");function Fe(r,t=[],e=q){return{type:14,loc:e,callee:r,arguments:t}}h(Fe,"createCallExpression");function pi(r,t=void 0,e=!1,s=!1,i=q){return{type:18,params:r,returns:t,newline:e,isSlot:s,loc:i}}h(pi,"createFunctionExpression");function ea(r,t,e,s=!0){return{type:19,test:r,consequent:t,alternate:e,newline:s,loc:q}}h(ea,"createConditionalExpression");function ta(r){return{type:21,body:r,loc:q}}h(ta,"createBlockStatement");function tt(r,t){return r||t?Li:Di}h(tt,"getVNodeHelper");function st(r,t){return r||t?Oi:_i}h(st,"getVNodeBlockHelper");function sa(r,{helper:t,removeHelper:e,inSSR:s}){r.isBlock||(r.isBlock=!0,e(tt(s,r.isComponent)),t(Re),t(st(s,r.isComponent)))}h(sa,"convertToBlock");var fi=new Uint8Array([123,123]),di=new Uint8Array([125,125]);function mi(r){return r>=97&&r<=122||r>=65&&r<=90}h(mi,"isTagStartChar");function $(r){return r===32||r===10||r===9||r===12||r===13}h($,"isWhitespace");function oe(r){return r===47||r===62||$(r)}h(oe,"isEndOfTagSection");function it(r){let t=new Uint8Array(r.length);for(let e=0;e<r.length;e++)t[e]=r.charCodeAt(e);return t}h(it,"toCharCodes");var R={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])},Xt=class{static{h(this,"Tokenizer")}constructor(t,e){this.stack=t,this.cbs=e,this.state=1,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inVPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=fi,this.delimiterClose=di,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return this.mode===2&&this.stack.length===0}reset(){this.state=1,this.mode=0,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.length=0,this.delimiterOpen=fi,this.delimiterClose=di}getPos(t){let e=1,s=t+1,i=this.newlines.length,n=-1;if(i>100){let a=-1,o=i;for(;a+1<o;){let l=a+o>>>1;this.newlines[l]<t?a=l:o=l}n=a}else for(let a=i-1;a>=0;a--)if(t>this.newlines[a]){n=a;break}return n>=0&&(e=n+2,s=t-this.newlines[n]),{column:s,line:e,offset:t}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(t){t===60?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):!this.inVPre&&t===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(t))}stateInterpolationOpen(t){if(t===this.delimiterOpen[this.delimiterIndex])if(this.delimiterIndex===this.delimiterOpen.length-1){let e=this.index+1-this.delimiterOpen.length;e>this.sectionStart&&this.cbs.ontext(this.sectionStart,e),this.state=3,this.sectionStart=e}else this.delimiterIndex++;else this.inRCDATA?(this.state=32,this.stateInRCDATA(t)):(this.state=1,this.stateText(t))}stateInterpolation(t){t===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(t))}stateInterpolationClose(t){t===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(t))}stateSpecialStartSequence(t){let e=this.sequenceIndex===this.currentSequence.length;if(!(e?oe(t):(t|32)===this.currentSequence[this.sequenceIndex]))this.inRCDATA=!1;else if(!e){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=6,this.stateInTagName(t)}stateInRCDATA(t){if(this.sequenceIndex===this.currentSequence.length){if(t===62||$(t)){let e=this.index-this.currentSequence.length;if(this.sectionStart<e){let s=this.index;this.index=e,this.cbs.ontext(this.sectionStart,e),this.index=s}this.sectionStart=e+2,this.stateInClosingTagName(t),this.inRCDATA=!1;return}this.sequenceIndex=0}(t|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===R.TitleEnd||this.currentSequence===R.TextareaEnd&&!this.inSFCRoot?!this.inVPre&&t===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(t)):this.fastForwardTo(60)&&(this.sequenceIndex=1):this.sequenceIndex=+(t===60)}stateCDATASequence(t){t===R.Cdata[this.sequenceIndex]?++this.sequenceIndex===R.Cdata.length&&(this.state=28,this.currentSequence=R.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=23,this.stateInDeclaration(t))}fastForwardTo(t){for(;++this.index<this.buffer.length;){let e=this.buffer.charCodeAt(this.index);if(e===10&&this.newlines.push(this.index),e===t)return!0}return this.index=this.buffer.length-1,!1}stateInCommentLike(t){t===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===R.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index-2):this.cbs.oncomment(this.sectionStart,this.index-2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=1):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):t!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}startSpecial(t,e){this.enterRCDATA(t,e),this.state=31}enterRCDATA(t,e){this.inRCDATA=!0,this.currentSequence=t,this.sequenceIndex=e}stateBeforeTagName(t){t===33?(this.state=22,this.sectionStart=this.index+1):t===63?(this.state=24,this.sectionStart=this.index+1):mi(t)?(this.sectionStart=this.index,this.mode===0?this.state=6:this.inSFCRoot?this.state=34:this.inXML?this.state=6:t===116?this.state=30:this.state=t===115?29:6):t===47?this.state=8:(this.state=1,this.stateText(t))}stateInTagName(t){oe(t)&&this.handleTagName(t)}stateInSFCRootTagName(t){if(oe(t)){let e=this.buffer.slice(this.sectionStart,this.index);e!=="template"&&this.enterRCDATA(it("</"+e),0),this.handleTagName(t)}}handleTagName(t){this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(t)}stateBeforeClosingTagName(t){$(t)||(t===62?(this.state=1,this.sectionStart=this.index+1):(this.state=mi(t)?9:27,this.sectionStart=this.index))}stateInClosingTagName(t){(t===62||$(t))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=10,this.stateAfterClosingTagName(t))}stateAfterClosingTagName(t){t===62&&(this.state=1,this.sectionStart=this.index+1)}stateBeforeAttrName(t){t===62?(this.cbs.onopentagend(this.index),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):t===47?this.state=7:t===60&&this.peek()===47?(this.cbs.onopentagend(this.index),this.state=5,this.sectionStart=this.index):$(t)||this.handleAttrStart(t)}handleAttrStart(t){t===118&&this.peek()===45?(this.state=13,this.sectionStart=this.index):t===46||t===58||t===64||t===35?(this.cbs.ondirname(this.index,this.index+1),this.state=14,this.sectionStart=this.index+1):(this.state=12,this.sectionStart=this.index)}stateInSelfClosingTag(t){t===62?(this.cbs.onselfclosingtag(this.index),this.state=1,this.sectionStart=this.index+1,this.inRCDATA=!1):$(t)||(this.state=11,this.stateBeforeAttrName(t))}stateInAttrName(t){(t===61||oe(t))&&(this.cbs.onattribname(this.sectionStart,this.index),this.handleAttrNameEnd(t))}stateInDirName(t){t===61||oe(t)?(this.cbs.ondirname(this.sectionStart,this.index),this.handleAttrNameEnd(t)):t===58?(this.cbs.ondirname(this.sectionStart,this.index),this.state=14,this.sectionStart=this.index+1):t===46&&(this.cbs.ondirname(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDirArg(t){t===61||oe(t)?(this.cbs.ondirarg(this.sectionStart,this.index),this.handleAttrNameEnd(t)):t===91?this.state=15:t===46&&(this.cbs.ondirarg(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDynamicDirArg(t){t===93?this.state=14:(t===61||oe(t))&&(this.cbs.ondirarg(this.sectionStart,this.index+1),this.handleAttrNameEnd(t))}stateInDirModifier(t){t===61||oe(t)?(this.cbs.ondirmodifier(this.sectionStart,this.index),this.handleAttrNameEnd(t)):t===46&&(this.cbs.ondirmodifier(this.sectionStart,this.index),this.sectionStart=this.index+1)}handleAttrNameEnd(t){this.sectionStart=this.index,this.state=17,this.cbs.onattribnameend(this.index),this.stateAfterAttrName(t)}stateAfterAttrName(t){t===61?this.state=18:t===47||t===62?(this.cbs.onattribend(0,this.sectionStart),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(t)):$(t)||(this.cbs.onattribend(0,this.sectionStart),this.handleAttrStart(t))}stateBeforeAttrValue(t){t===34?(this.state=19,this.sectionStart=this.index+1):t===39?(this.state=20,this.sectionStart=this.index+1):$(t)||(this.sectionStart=this.index,this.state=21,this.stateInAttrValueNoQuotes(t))}handleInAttrValue(t,e){(t===e||this.fastForwardTo(e))&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(e===34?3:2,this.index+1),this.state=11)}stateInAttrValueDoubleQuotes(t){this.handleInAttrValue(t,34)}stateInAttrValueSingleQuotes(t){this.handleInAttrValue(t,39)}stateInAttrValueNoQuotes(t){$(t)||t===62?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(1,this.index),this.state=11,this.stateBeforeAttrName(t)):(t===39||t===60||t===61||t===96)&&this.cbs.onerr(18,this.index)}stateBeforeDeclaration(t){t===91?(this.state=26,this.sequenceIndex=0):this.state=t===45?25:23}stateInDeclaration(t){(t===62||this.fastForwardTo(62))&&(this.state=1,this.sectionStart=this.index+1)}stateInProcessingInstruction(t){(t===62||this.fastForwardTo(62))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeComment(t){t===45?(this.state=28,this.currentSequence=R.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=23}stateInSpecialComment(t){(t===62||this.fastForwardTo(62))&&(this.cbs.oncomment(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeSpecialS(t){t===R.ScriptEnd[3]?this.startSpecial(R.ScriptEnd,4):t===R.StyleEnd[3]?this.startSpecial(R.StyleEnd,4):(this.state=6,this.stateInTagName(t))}stateBeforeSpecialT(t){t===R.TitleEnd[3]?this.startSpecial(R.TitleEnd,4):t===R.TextareaEnd[3]?this.startSpecial(R.TextareaEnd,4):(this.state=6,this.stateInTagName(t))}startEntity(){}stateInEntity(){}parse(t){for(this.buffer=t;this.index<this.buffer.length;){let e=this.buffer.charCodeAt(this.index);switch(e===10&&this.state!==33&&this.newlines.push(this.index),this.state){case 1:{this.stateText(e);break}case 2:{this.stateInterpolationOpen(e);break}case 3:{this.stateInterpolation(e);break}case 4:{this.stateInterpolationClose(e);break}case 31:{this.stateSpecialStartSequence(e);break}case 32:{this.stateInRCDATA(e);break}case 26:{this.stateCDATASequence(e);break}case 19:{this.stateInAttrValueDoubleQuotes(e);break}case 12:{this.stateInAttrName(e);break}case 13:{this.stateInDirName(e);break}case 14:{this.stateInDirArg(e);break}case 15:{this.stateInDynamicDirArg(e);break}case 16:{this.stateInDirModifier(e);break}case 28:{this.stateInCommentLike(e);break}case 27:{this.stateInSpecialComment(e);break}case 11:{this.stateBeforeAttrName(e);break}case 6:{this.stateInTagName(e);break}case 34:{this.stateInSFCRootTagName(e);break}case 9:{this.stateInClosingTagName(e);break}case 5:{this.stateBeforeTagName(e);break}case 17:{this.stateAfterAttrName(e);break}case 20:{this.stateInAttrValueSingleQuotes(e);break}case 18:{this.stateBeforeAttrValue(e);break}case 8:{this.stateBeforeClosingTagName(e);break}case 10:{this.stateAfterClosingTagName(e);break}case 29:{this.stateBeforeSpecialS(e);break}case 30:{this.stateBeforeSpecialT(e);break}case 21:{this.stateInAttrValueNoQuotes(e);break}case 7:{this.stateInSelfClosingTag(e);break}case 23:{this.stateInDeclaration(e);break}case 22:{this.stateBeforeDeclaration(e);break}case 25:{this.stateBeforeComment(e);break}case 24:{this.stateInProcessingInstruction(e);break}case 33:{this.stateInEntity();break}}this.index++}this.cleanup(),this.finish()}cleanup(){this.sectionStart!==this.index&&(this.state===1||this.state===32&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===19||this.state===20||this.state===21)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}finish(){this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){let t=this.buffer.length;this.sectionStart>=t||(this.state===28?this.currentSequence===R.CdataEnd?this.cbs.oncdata(this.sectionStart,t):this.cbs.oncomment(this.sectionStart,t):this.state===6||this.state===11||this.state===18||this.state===17||this.state===12||this.state===13||this.state===14||this.state===15||this.state===16||this.state===20||this.state===19||this.state===21||this.state===9||this.cbs.ontext(this.sectionStart,t))}emitCodePoint(t,e){}};function yi(r,{compatConfig:t}){let e=t&&t[r];return r==="MODE"?e||3:e}h(yi,"getCompatValue");function $i(r,t){let e=yi("MODE",t),s=yi(r,t);return e===3?s===!0:s!==!1}h($i,"isCompatEnabled");function Be(r,t,e,...s){return $i(r,t)}h(Be,"checkCompatEnabled");function ia(r){throw r}h(ia,"defaultOnError");function ra(r){}h(ra,"defaultOnWarn");function de(r,t,e,s){let i=`https://vuejs.org/error-reference/#compiler-${r}`,n=new SyntaxError(String(i));return n.code=r,n.loc=t,n}h(de,"createCompilerError");var Hi=h(r=>r.type===4&&r.isStatic,"isStaticExp");function na(r){switch(r){case"Teleport":case"teleport":return Ci;case"Suspense":case"suspense":return wi;case"KeepAlive":case"keep-alive":return vi;case"BaseTransition":case"base-transition":return ki}}h(na,"isCoreComponent");function Yt(r,t,e=!1){for(let s=0;s<r.props.length;s++){let i=r.props[s];if(i.type===7&&(e||i.exp)&&(J(t)?i.name===t:t.test(i.name)))return i}}h(Yt,"findDir");function Qt(r,t,e=!1,s=!1){for(let i=0;i<r.props.length;i++){let n=r.props[i];if(n.type===6){if(e)continue;if(n.name===t&&(n.value||s))return n}else if(n.name==="bind"&&(n.exp||s)&&Zt(n.arg,t))return n}}h(Qt,"findProp");function Zt(r,t){return!!(r&&Hi(r)&&r.content===t)}h(Zt,"isStaticArgOf");function gi(r){return r.type===7&&r.name==="pre"}h(gi,"isVPre");function aa(r){return r.type===7&&r.name==="slot"}h(aa,"isVSlot");function Xi(r){return r.type===1&&r.tagType===3}h(Xi,"isTemplateNode");function xi(r){return r.type===1&&r.tagType===2}h(xi,"isSlotOutlet");var oa=new Set([Fi,Gt]);function qi(r,t=[]){if(r&&!J(r)&&r.type===14){let e=r.callee;if(!J(e)&&oa.has(e))return qi(r.arguments[0],t.concat(r))}return[r,t]}h(qi,"getUnnormalizedProps");function rt(r,t,e){let s,i=r.type===13?r.props:r.arguments[2],n=[],a;if(i&&!J(i)&&i.type===14){let o=qi(i);i=o[0],n=o[1],a=n[n.length-1]}if(i==null||J(i))s=be([t]);else if(i.type===14){let o=i.arguments[0];!J(o)&&o.type===15?Ti(t,o)||o.properties.unshift(t):i.callee===Bi?s=Fe(e.helper($t),[be([t]),i]):i.arguments.unshift(be([t])),!s&&(s=i)}else i.type===15?(Ti(t,i)||i.properties.unshift(t),s=i):(s=Fe(e.helper($t),[be([t]),i]),a&&a.callee===Gt&&(a=n[n.length-2]));r.type===13?a?a.arguments[0]=s:r.props=s:a?a.arguments[0]=s:r.arguments[2]=s}h(rt,"injectProp");function Ti(r,t){let e=!1;if(r.key.type===4){let s=r.key.content;e=t.properties.some(i=>i.key.type===4&&i.key.content===s)}return e}h(Ti,"hasProp");function la(r){return r.type===14&&r.callee===Vi?r.arguments[1].returns:r}h(la,"getMemoedVNodeCall");var ca=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/;function zi(r){for(let t=0;t<r.length;t++)if(!$(r.charCodeAt(t)))return!1;return!0}h(zi,"isAllWhitespace");function Ki(r){return r.type===2&&zi(r.content)||r.type===12&&Ki(r.content)}h(Ki,"isWhitespaceText");function Wi(r){return r.type===3||Ki(r)}h(Wi,"isCommentOrWhitespace");var Gi={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:h(()=>0,"getNamespace"),isVoidTag:Me,isPreTag:Me,isIgnoreNewlineTag:Me,isCustomElement:Me,onError:ia,onWarn:ra,comments:!1,prefixIdentifiers:!1},w=Gi,Ve=null,te="",F=null,N=null,j="",ee=-1,pe=-1,es=0,le=!1,qt=null,_=[],L=new Xt(_,{onerr:Z,ontext(r,t){Je(M(r,t),r,t)},ontextentity(r,t,e){Je(r,t,e)},oninterpolation(r,t){if(le)return Je(M(r,t),r,t);let e=r+L.delimiterOpen.length,s=t-L.delimiterClose.length;for(;$(te.charCodeAt(e));)e++;for(;$(te.charCodeAt(s-1));)s--;let i=M(e,s);i.includes("&")&&(i=w.decodeEntities(i,!1)),zt({type:5,content:Ze(i,!1,D(e,s)),loc:D(r,t)})},onopentagname(r,t){let e=M(r,t);F={type:1,tag:e,ns:w.getNamespace(e,_[0],w.ns),tagType:0,props:[],children:[],loc:D(r-1,t),codegenNode:void 0}},onopentagend(r){Pi(r)},onclosetag(r,t){let e=M(r,t);if(!w.isVoidTag(e)){let s=!1;for(let i=0;i<_.length;i++)if(_[i].tag.toLowerCase()===e.toLowerCase()){s=!0,i>0&&Z(24,_[0].loc.start.offset);for(let a=0;a<=i;a++){let o=_.shift();Qe(o,t,a<i)}break}s||Z(23,Ji(r,60))}},onselfclosingtag(r){let t=F.tag;F.isSelfClosing=!0,Pi(r),_[0]&&_[0].tag===t&&Qe(_.shift(),r)},onattribname(r,t){N={type:6,name:M(r,t),nameLoc:D(r,t),value:void 0,loc:D(r)}},ondirname(r,t){let e=M(r,t),s=e==="."||e===":"?"bind":e==="@"?"on":e==="#"?"slot":e.slice(2);if(!le&&s===""&&Z(26,r),le||s==="")N={type:6,name:e,nameLoc:D(r,t),value:void 0,loc:D(r)};else if(N={type:7,name:s,rawName:e,exp:void 0,arg:void 0,modifiers:e==="."?[U("prop")]:[],loc:D(r)},s==="pre"){le=L.inVPre=!0,qt=F;let i=F.props;for(let n=0;n<i.length;n++)i[n].type===7&&(i[n]=Ta(i[n]))}},ondirarg(r,t){if(r===t)return;let e=M(r,t);if(le&&!gi(N))N.name+=e,fe(N.nameLoc,t);else{let s=e[0]!=="[";N.arg=Ze(s?e:e.slice(1,-1),s,D(r,t),s?3:0)}},ondirmodifier(r,t){let e=M(r,t);if(le&&!gi(N))N.name+="."+e,fe(N.nameLoc,t);else if(N.name==="slot"){let s=N.arg;s&&(s.content+="."+e,fe(s.loc,t))}else{let s=U(e,!0,D(r,t));N.modifiers.push(s)}},onattribdata(r,t){j+=M(r,t),ee<0&&(ee=r),pe=t},onattribentity(r,t,e){j+=r,ee<0&&(ee=t),pe=e},onattribnameend(r){let t=N.loc.start.offset,e=M(t,r);N.type===7&&(N.rawName=e),F.props.some(s=>(s.type===7?s.rawName:s.name)===e)&&Z(2,t)},onattribend(r,t){if(F&&N){if(fe(N.loc,t),r!==0)if(j.includes("&")&&(j=w.decodeEntities(j,!0)),N.type===6)N.name==="class"&&(j=Qi(j).trim()),r===1&&!j&&Z(13,t),N.value={type:2,content:j,loc:r===1?D(ee,pe):D(ee-1,pe+1)},L.inSFCRoot&&F.tag==="template"&&N.name==="lang"&&j&&j!=="html"&&L.enterRCDATA(it("</template"),0);else{let e=0;N.exp=Ze(j,!1,D(ee,pe),0,e),N.name==="for"&&(N.forParseResult=ua(N.exp));let s=-1;N.name==="bind"&&(s=N.modifiers.findIndex(i=>i.content==="sync"))>-1&&Be("COMPILER_V_BIND_SYNC",w,N.loc,N.arg.loc.source)&&(N.name="model",N.modifiers.splice(s,1))}(N.type!==7||N.name!=="pre")&&F.props.push(N)}j="",ee=pe=-1},oncomment(r,t){w.comments&&zt({type:3,content:M(r,t),loc:D(r-4,t+3)})},onend(){let r=te.length;for(let t=0;t<_.length;t++)Qe(_[t],r-1),Z(24,_[t].loc.start.offset)},oncdata(r,t){(_[0]?_[0].ns:w.ns)!==0?Je(M(r,t),r,t):Z(1,r-9)},onprocessinginstruction(r){(_[0]?_[0].ns:w.ns)===0&&Z(21,r-1)}}),Ei=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,ha=/^\(|\)$/g;function ua(r){let t=r.loc,e=r.content,s=e.match(ca);if(!s)return;let[,i,n]=s,a=h((f,d,m=!1)=>{let y=t.start.offset+d,S=y+f.length;return Ze(f,!1,D(y,S),0,m?1:0)},"createAliasExpression"),o={source:a(n.trim(),e.indexOf(n,i.length)),value:void 0,key:void 0,index:void 0,finalized:!1},l=i.trim().replace(ha,"").trim(),c=i.indexOf(l),u=l.match(Ei);if(u){l=l.replace(Ei,"").trim();let f=u[1].trim(),d;if(f&&(d=e.indexOf(f,c+l.length),o.key=a(f,d,!0)),u[2]){let m=u[2].trim();m&&(o.index=a(m,e.indexOf(m,o.key?d+f.length:c+l.length),!0))}}return l&&(o.value=a(l,c,!0)),o}h(ua,"parseForExpression");function M(r,t){return te.slice(r,t)}h(M,"getSlice");function Pi(r){L.inSFCRoot&&(F.innerLoc=D(r+1,r+1)),zt(F);let{tag:t,ns:e}=F;e===0&&w.isPreTag(t)&&es++,w.isVoidTag(t)?Qe(F,r):(_.unshift(F),(e===1||e===2)&&(L.inXML=!0)),F=null}h(Pi,"endOpenTag");function Je(r,t,e){{let n=_[0]&&_[0].tag;n!=="script"&&n!=="style"&&r.includes("&")&&(r=w.decodeEntities(r,!1))}let s=_[0]||Ve,i=s.children[s.children.length-1];i&&i.type===2?(i.content+=r,fe(i.loc,e)):s.children.push({type:2,content:r,loc:D(t,e)})}h(Je,"onText");function Qe(r,t,e=!1){e?fe(r.loc,Ji(t,60)):fe(r.loc,pa(t,62)+1),L.inSFCRoot&&(r.children.length?r.innerLoc.end=Se({},r.children[r.children.length-1].loc.end):r.innerLoc.end=Se({},r.innerLoc.start),r.innerLoc.source=M(r.innerLoc.start.offset,r.innerLoc.end.offset));let{tag:s,ns:i,children:n}=r;if(le||(s==="slot"?r.tagType=2:Si(r)?r.tagType=3:da(r)&&(r.tagType=1)),L.inRCDATA||(r.children=Yi(n)),i===0&&w.isIgnoreNewlineTag(s)){let a=n[0];a&&a.type===2&&(a.content=a.content.replace(/^\r?\n/,""))}i===0&&w.isPreTag(s)&&es--,qt===r&&(le=L.inVPre=!1,qt=null),L.inXML&&(_[0]?_[0].ns:w.ns)===0&&(L.inXML=!1);{let a=r.props;if(!L.inSFCRoot&&$i("COMPILER_NATIVE_TEMPLATE",w)&&r.tag==="template"&&!Si(r)){let l=_[0]||Ve,c=l.children.indexOf(r);l.children.splice(c,1,...r.children)}let o=a.find(l=>l.type===6&&l.name==="inline-template");o&&Be("COMPILER_INLINE_TEMPLATE",w,o.loc)&&r.children.length&&(o.value={type:2,content:M(r.children[0].loc.start.offset,r.children[r.children.length-1].loc.end.offset),loc:o.loc})}}h(Qe,"onCloseTag");function pa(r,t){let e=r;for(;te.charCodeAt(e)!==t&&e<te.length-1;)e++;return e}h(pa,"lookAhead");function Ji(r,t){let e=r;for(;te.charCodeAt(e)!==t&&e>=0;)e--;return e}h(Ji,"backTrack");var fa=new Set(["if","else","else-if","for","slot"]);function Si({tag:r,props:t}){if(r==="template"){for(let e=0;e<t.length;e++)if(t[e].type===7&&fa.has(t[e].name))return!0}return!1}h(Si,"isFragmentTemplate");function da({tag:r,props:t}){if(w.isCustomElement(r))return!1;if(r==="component"||ma(r.charCodeAt(0))||na(r)||w.isBuiltInComponent&&w.isBuiltInComponent(r)||w.isNativeTag&&!w.isNativeTag(r))return!0;for(let e=0;e<t.length;e++){let s=t[e];if(s.type===6){if(s.name==="is"&&s.value){if(s.value.content.startsWith("vue:"))return!0;if(Be("COMPILER_IS_ON_ELEMENT",w,s.loc))return!0}}else if(s.name==="bind"&&Zt(s.arg,"is")&&Be("COMPILER_IS_ON_ELEMENT",w,s.loc))return!0}return!1}h(da,"isComponent");function ma(r){return r>64&&r<91}h(ma,"isUpperCase");var ya=/\r\n/g;function Yi(r){let t=w.whitespace!=="preserve",e=!1;for(let s=0;s<r.length;s++){let i=r[s];if(i.type===2)if(es)i.content=i.content.replace(ya,`
9
- `);else if(zi(i.content)){let n=r[s-1]&&r[s-1].type,a=r[s+1]&&r[s+1].type;!n||!a||t&&(n===3&&(a===3||a===1)||n===1&&(a===3||a===1&&ga(i.content)))?(e=!0,r[s]=null):i.content=" "}else t&&(i.content=Qi(i.content))}return e?r.filter(Boolean):r}h(Yi,"condenseWhitespace");function ga(r){for(let t=0;t<r.length;t++){let e=r.charCodeAt(t);if(e===10||e===13)return!0}return!1}h(ga,"hasNewlineChar");function Qi(r){let t="",e=!1;for(let s=0;s<r.length;s++)$(r.charCodeAt(s))?e||(t+=" ",e=!0):(t+=r[s],e=!1);return t}h(Qi,"condense");function zt(r){(_[0]||Ve).children.push(r)}h(zt,"addNode");function D(r,t){return{start:L.getPos(r),end:t==null?t:L.getPos(t),source:t==null?t:M(r,t)}}h(D,"getLoc");function xa(r){return D(r.start.offset,r.end.offset)}h(xa,"cloneLoc");function fe(r,t){r.end=L.getPos(t),r.source=M(r.start.offset,t)}h(fe,"setLocEnd");function Ta(r){let t={type:6,name:r.rawName,nameLoc:D(r.loc.start.offset,r.loc.start.offset+r.rawName.length),value:void 0,loc:r.loc};if(r.exp){let e=r.exp.loc;e.end.offset<r.loc.end.offset&&(e.start.offset--,e.start.column--,e.end.offset++,e.end.column++),t.value={type:2,content:r.exp.content,loc:e}}return t}h(Ta,"dirToAttr");function Ze(r,t=!1,e,s=0,i=0){return U(r,t,e,s)}h(Ze,"createExp");function Z(r,t,e){w.onError(de(r,D(t,t),void 0,e))}h(Z,"emitError");function Ea(){L.reset(),F=null,N=null,j="",ee=-1,pe=-1,_.length=0}h(Ea,"reset");function Zi(r,t){if(Ea(),te=r,w=Se({},Gi),t){let i;for(i in t)t[i]!=null&&(w[i]=t[i])}L.mode=w.parseMode==="html"?1:w.parseMode==="sfc"?2:0,L.inXML=w.ns===1||w.ns===2;let e=t&&t.delimiters;e&&(L.delimiterOpen=it(e[0]),L.delimiterClose=it(e[1]));let s=Ve=Zn([],r);return L.parse(te),s.loc=D(0,r.length),s.children=Yi(s.children),Ve=null,s}h(Zi,"baseParse");function Pa(r,t){let e=0,s=h(()=>{e--},"nodeRemoved");for(;e<r.children.length;e++){let i=r.children[e];J(i)||(t.grandParent=t.parent,t.parent=r,t.childIndex=e,t.onNodeRemoved=s,ts(i,t))}}h(Pa,"traverseChildren");function ts(r,t){t.currentNode=r;let{nodeTransforms:e}=t,s=[];for(let n=0;n<e.length;n++){let a=e[n](r,t);if(a&&(oi(a)?s.push(...a):s.push(a)),t.currentNode)r=t.currentNode;else return}switch(r.type){case 3:t.ssr||t.helper(Kt);break;case 5:t.ssr||t.helper(Wt);break;case 9:for(let n=0;n<r.branches.length;n++)ts(r.branches[n],t);break;case 10:case 11:case 1:case 0:Pa(r,t);break}t.currentNode=r;let i=s.length;for(;i--;)s[i]()}h(ts,"traverseNode");function er(r,t){let e=J(r)?s=>s===r:s=>r.test(s);return(s,i)=>{if(s.type===1){let{props:n}=s;if(s.tagType===3&&n.some(aa))return;let a=[];for(let o=0;o<n.length;o++){let l=n[o];if(l.type===7&&e(l.name)){n.splice(o,1),o--;let c=t(s,l,i);c&&a.push(c)}}return a}}}h(er,"createStructuralDirectiveTransform");var no=new RegExp("\\b"+"arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b")+"\\b");var ao=er(/^(?:if|else|else-if)$/,(r,t,e)=>Sa(r,t,e,(s,i,n)=>{let a=e.parent.children,o=a.indexOf(s),l=0;for(;o-->=0;){let c=a[o];c&&c.type===9&&(l+=c.branches.length)}return()=>{if(n)s.codegenNode=Ai(i,l,e);else{let c=ba(s.codegenNode);c.alternate=Ai(i,l+s.branches.length-1,e)}}}));function Sa(r,t,e,s){if(t.name!=="else"&&(!t.exp||!t.exp.content.trim())){let i=t.exp?t.exp.loc:r.loc;e.onError(de(28,t.loc)),t.exp=U("true",!1,i)}if(t.name==="if"){let i=bi(r,t),n={type:9,loc:xa(r.loc),branches:[i]};if(e.replaceNode(n),s)return s(n,i,!0)}else{let i=e.parent.children,n=[],a=i.indexOf(r);for(;a-->=-1;){let o=i[a];if(o&&Wi(o)){e.removeNode(o);continue}if(o&&o.type===9){(t.name==="else-if"||t.name==="else")&&o.branches[o.branches.length-1].condition===void 0&&e.onError(de(30,r.loc)),e.removeNode();let l=bi(r,t);o.branches.push(l);let c=s&&s(o,l,!1);ts(l,e),c&&c(),e.currentNode=null}else e.onError(de(30,r.loc));break}}}h(Sa,"processIf");function bi(r,t){let e=r.tagType===3;return{type:10,loc:r.loc,condition:t.name==="else"?void 0:t.exp,children:e&&!Yt(r,"for")?r.children:[r],userKey:Qt(r,"key"),isTemplateIf:e}}h(bi,"createIfBranch");function Ai(r,t,e){return r.condition?ea(r.condition,Ni(r,t,e),Fe(e.helper(Kt),['""',"true"])):Ni(r,t,e)}h(Ai,"createCodegenNodeForBranch");function Ni(r,t,e){let{helper:s}=e,i=Jt("key",U(`${t}`,!1,q,2)),{children:n}=r,a=n[0];if(n.length!==1||a.type!==1)if(n.length===1&&a.type===11){let l=a.codegenNode;return rt(l,i,e),l}else return Ht(e,s(et),be([i]),n,64,void 0,void 0,!0,!1,!1,r.loc);else{let l=a.codegenNode,c=la(l);return c.type===13&&sa(c,e),rt(c,i,e),l}}h(Ni,"createChildrenCodegenNode");function ba(r){for(;;)if(r.type===19)if(r.alternate.type===19)r=r.alternate;else return r;else r.type===20&&(r=r.value)}h(ba,"getParentCondition");var oo=er("for",(r,t,e)=>{let{helper:s,removeHelper:i}=e;return Aa(r,t,e,n=>{let a=Fe(s(Ri),[n.source]),o=Xi(r),l=Yt(r,"memo"),c=Qt(r,"key",!1,!0);c&&c.type;let u=c&&(c.type===6?c.value?U(c.value.content,!0):void 0:c.exp),f=u?Jt("key",u):null,d=n.source.type===4&&n.source.constType>0,m=d?64:c?128:256;return n.codegenNode=Ht(e,s(et),void 0,a,m,void 0,void 0,!0,!d,!1,r.loc),()=>{let y,{children:S}=n,O=S.length!==1||S[0].type!==1,P=xi(r)?r:o&&r.children.length===1&&xi(r.children[0])?r.children[0]:null;if(P?(y=P.codegenNode,o&&f&&rt(y,f,e)):O?y=Ht(e,s(et),f?be([f]):void 0,r.children,64,void 0,void 0,!0,void 0,!1):(y=S[0].codegenNode,o&&f&&rt(y,f,e),y.isBlock!==!d&&(y.isBlock?(i(Re),i(st(e.inSSR,y.isComponent))):i(tt(e.inSSR,y.isComponent))),y.isBlock=!d,y.isBlock?(s(Re),s(st(e.inSSR,y.isComponent))):s(tt(e.inSSR,y.isComponent))),l){let v=pi(Ii(n.parseResult,[U("_cached")]));v.body=ta([Ye(["const _memo = (",l.exp,")"]),Ye(["if (_cached && _cached.el",...u?[" && _cached.key === ",u]:[],` && ${e.helperString(Ui)}(_cached, _memo)) return _cached`]),Ye(["const _item = ",y]),U("_item.memo = _memo"),U("return _item")]),a.arguments.push(v,U("_cache"),U(String(e.cached.length))),e.cached.push(null)}else a.arguments.push(pi(Ii(n.parseResult),y,!0))}})});function Aa(r,t,e,s){if(!t.exp){e.onError(de(31,t.loc));return}let i=t.forParseResult;if(!i){e.onError(de(32,t.loc));return}Na(i,e);let{addIdentifiers:n,removeIdentifiers:a,scopes:o}=e,{source:l,value:c,key:u,index:f}=i,d={type:11,loc:t.loc,source:l,valueAlias:c,keyAlias:u,objectIndexAlias:f,parseResult:i,children:Xi(r)?r.children:[r]};e.replaceNode(d),o.vFor++;let m=s&&s(d);return()=>{o.vFor--,m&&m()}}h(Aa,"processFor");function Na(r,t){r.finalized||(r.finalized=!0)}h(Na,"finalizeForParseResult");function Ii({value:r,key:t,index:e},s=[]){return Ia([r,t,e,...s])}h(Ii,"createForLoopParams");function Ia(r){let t=r.length;for(;t--&&!r[t];);return r.slice(0,t+1).map((e,s)=>e||U("_".repeat(s+1),!1))}h(Ia,"createParamsList");var lo=U("undefined",!1);var Ca=Symbol(""),wa=Symbol(""),va=Symbol(""),ka=Symbol(""),Oa=Symbol(""),_a=Symbol(""),La=Symbol(""),Da=Symbol(""),tr=Symbol(""),sr=Symbol("");ji({[Ca]:"vModelRadio",[wa]:"vModelCheckbox",[va]:"vModelText",[ka]:"vModelSelect",[Oa]:"vModelDynamic",[_a]:"withModifiers",[La]:"withKeys",[Da]:"vShow",[tr]:"Transition",[sr]:"TransitionGroup"});var Ae;function Ma(r,t=!1){return Ae||(Ae=document.createElement("div")),t?(Ae.innerHTML=`<div foo="${r.replace(/"/g,"&quot;")}">`,Ae.children[0].getAttribute("foo")):(Ae.innerHTML=r,Ae.textContent)}h(Ma,"decodeHtmlBrowser");var Ra={parseMode:"html",isVoidTag:ui,isNativeTag:h(r=>li(r)||ci(r)||hi(r),"isNativeTag"),isPreTag:h(r=>r==="pre","isPreTag"),isIgnoreNewlineTag:h(r=>r==="pre"||r==="textarea","isIgnoreNewlineTag"),decodeEntities:Ma,isBuiltInComponent:h(r=>{if(r==="Transition"||r==="transition")return tr;if(r==="TransitionGroup"||r==="transition-group")return sr},"isBuiltInComponent"),getNamespace(r,t,e){let s=t?t.ns:e;if(t&&s===2)if(t.tag==="annotation-xml"){if(r==="svg")return 1;t.props.some(i=>i.type===6&&i.name==="encoding"&&i.value!=null&&(i.value.content==="text/html"||i.value.content==="application/xhtml+xml"))&&(s=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&r!=="mglyph"&&r!=="malignmark"&&(s=0);else t&&s===1&&(t.tag==="foreignObject"||t.tag==="desc"||t.tag==="title")&&(s=0);if(s===0){if(r==="svg")return 1;if(r==="math")return 2}return s}};function Po(r,t={}){return Zi(r,Se({},Ra,t))}h(Po,"parse");export{bn as a,Po as b};
10
- /*! Bundled license information:
11
-
12
- @vue/shared/dist/shared.esm-bundler.js:
13
- (**
14
- * @vue/shared v3.5.39
15
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
16
- * @license MIT
17
- **)
18
-
19
- @vue/compiler-core/dist/compiler-core.esm-bundler.js:
20
- (**
21
- * @vue/compiler-core v3.5.39
22
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
23
- * @license MIT
24
- **)
25
-
26
- @vue/compiler-dom/dist/compiler-dom.esm-bundler.js:
27
- (**
28
- * @vue/compiler-dom v3.5.39
29
- * (c) 2018-present Yuxi (Evan) You and Vue contributors
30
- * @license MIT
31
- **)
32
- */