ct-rich-text-editor 1.0.6 → 1.0.8

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.
Files changed (172) hide show
  1. package/dist/assets/babel-70ddf1b3.js +16 -0
  2. package/dist/assets/babel-70ddf1b3.js.map +1 -0
  3. package/dist/assets/chevron-down-7ab1bec2.svg +1 -0
  4. package/dist/assets/close-5a175ff6.svg +1 -0
  5. package/dist/assets/code-211c00f3.svg +1 -0
  6. package/dist/assets/copy-0a348586.svg +1 -0
  7. package/dist/assets/estree-e637acda.js +37 -0
  8. package/dist/assets/estree-e637acda.js.map +1 -0
  9. package/dist/assets/html-132cf17b.js +23 -0
  10. package/dist/assets/html-132cf17b.js.map +1 -0
  11. package/dist/assets/index-92719fbf.js +2 -0
  12. package/dist/assets/index-92719fbf.js.map +1 -0
  13. package/dist/assets/index-a2d0e228.js +443 -0
  14. package/dist/assets/index-a2d0e228.js.map +1 -0
  15. package/dist/assets/index-db471160.css +1 -0
  16. package/dist/assets/link-dabc7da5.svg +1 -0
  17. package/dist/assets/markdown-d8306e54.js +64 -0
  18. package/dist/assets/markdown-d8306e54.js.map +1 -0
  19. package/dist/assets/pencil-fill-633b2c8d.svg +1 -0
  20. package/dist/assets/plus-cc33d039.svg +1 -0
  21. package/dist/assets/postcss-25dc98df.js +55 -0
  22. package/dist/assets/postcss-25dc98df.js.map +1 -0
  23. package/dist/assets/prettier-6c905155.svg +1 -0
  24. package/dist/assets/prettier-error-0ed0d492.svg +1 -0
  25. package/dist/assets/standalone-e79c0887.js +40 -0
  26. package/dist/assets/standalone-e79c0887.js.map +1 -0
  27. package/dist/assets/success-e7e6caa5.svg +1 -0
  28. package/dist/assets/trash-e93c6b1b.svg +1 -0
  29. package/dist/assets/type-bold-1f17e5da.svg +1 -0
  30. package/dist/assets/type-capitalize-2bd9e890.svg +1 -0
  31. package/dist/assets/type-italic-f9cdcec5.svg +1 -0
  32. package/dist/assets/type-lowercase-e9b820a3.svg +3 -0
  33. package/dist/assets/type-strikethrough-ea22e2f6.svg +1 -0
  34. package/dist/assets/type-subscript-84ecc6bb.svg +1 -0
  35. package/dist/assets/type-superscript-fd5795bc.svg +1 -0
  36. package/dist/assets/type-underline-9639e1cd.svg +1 -0
  37. package/dist/assets/type-uppercase-cd9fe147.svg +3 -0
  38. package/dist/assets/typescript-c6c5f850.js +21 -0
  39. package/dist/assets/typescript-c6c5f850.js.map +1 -0
  40. package/dist/assets/user-085d4653.svg +1 -0
  41. package/dist/index.html +18 -0
  42. package/package.json +5 -2
  43. package/dist/App.d.ts +0 -4
  44. package/dist/Provider/EditorProvider.d.ts +0 -19
  45. package/dist/Provider/LexicalProvider.d.ts +0 -7
  46. package/dist/api/ai/index.d.ts +0 -15
  47. package/dist/api/auth.d.ts +0 -99
  48. package/dist/api/config/axios.d.ts +0 -3
  49. package/dist/api/config/endpoints.d.ts +0 -11
  50. package/dist/assets/style.css +0 -1
  51. package/dist/babel-1c4a328b.js +0 -7479
  52. package/dist/babel-1c4a328b.js.map +0 -1
  53. package/dist/components/AiPlugin/index.d.ts +0 -4
  54. package/dist/components/AlignMenu/AlignMenu.d.ts +0 -10
  55. package/dist/components/AlignMenu/index.d.ts +0 -1
  56. package/dist/components/BlockFormatMenu/BlockFormatMenu.d.ts +0 -5
  57. package/dist/components/BlockFormatMenu/constants.d.ts +0 -14
  58. package/dist/components/BlockFormatMenu/index.d.ts +0 -1
  59. package/dist/components/CodeActionMenuPlugin/components/CopyButton/index.d.ts +0 -8
  60. package/dist/components/CodeActionMenuPlugin/components/PrettierButton/index.d.ts +0 -10
  61. package/dist/components/CodeActionMenuPlugin/index.d.ts +0 -5
  62. package/dist/components/CodeActionMenuPlugin/utils.d.ts +0 -1
  63. package/dist/components/ColorPicker/ColorPicker.d.ts +0 -5
  64. package/dist/components/ColorPicker/index.d.ts +0 -1
  65. package/dist/components/ConfigurableEditorWithAuth.d.ts +0 -15
  66. package/dist/components/EmojiPickerWidget/EmojiPickerWidget.d.ts +0 -5
  67. package/dist/components/EmojiPickerWidget/index.d.ts +0 -1
  68. package/dist/components/FileUpload/InsertFileDialog.d.ts +0 -7
  69. package/dist/components/FileUpload/InsertFileUploadedDialogBody.d.ts +0 -6
  70. package/dist/components/FontFamilySelect/FontFamilyMenu.d.ts +0 -9
  71. package/dist/components/FontSizePicker/FontSizeControl.d.ts +0 -4
  72. package/dist/components/FormatTextMenu/FormatTextMenu.d.ts +0 -5
  73. package/dist/components/FormatTextMenu/index.d.ts +0 -1
  74. package/dist/components/ImageView/ImageDialog/ImageUploadDialogBody.d.ts +0 -6
  75. package/dist/components/ImageView/ImageDialog/index.d.ts +0 -7
  76. package/dist/components/ImageView/ImageResizer.d.ts +0 -17
  77. package/dist/components/ImageView/index.d.ts +0 -15
  78. package/dist/components/InsertMenu/InsertMenu.d.ts +0 -10
  79. package/dist/components/InsertMenu/index.d.ts +0 -1
  80. package/dist/components/Placeholder/Placeholder.d.ts +0 -5
  81. package/dist/components/Placeholder/index.d.ts +0 -1
  82. package/dist/components/TableColorPicker/index.d.ts +0 -9
  83. package/dist/components/TableModal/TableModal.d.ts +0 -11
  84. package/dist/components/Toolbar/Toolbar.d.ts +0 -5
  85. package/dist/components/Toolbar/index.d.ts +0 -1
  86. package/dist/components/Toolbar/styles.d.ts +0 -6
  87. package/dist/components/ui/button.d.ts +0 -12
  88. package/dist/components/ui/dialog.d.ts +0 -19
  89. package/dist/components/ui/dropdown-menu.d.ts +0 -27
  90. package/dist/components/ui/input.d.ts +0 -3
  91. package/dist/components/ui/label.d.ts +0 -5
  92. package/dist/components/ui/popover.d.ts +0 -7
  93. package/dist/components/ui/select.d.ts +0 -13
  94. package/dist/components/ui/separator.d.ts +0 -4
  95. package/dist/components/ui/tooltip.d.ts +0 -7
  96. package/dist/constants.d.ts +0 -35
  97. package/dist/context/ToolbarContext.d.ts +0 -55
  98. package/dist/editorConfig.d.ts +0 -36
  99. package/dist/estree-2cbea43c.js +0 -4668
  100. package/dist/estree-2cbea43c.js.map +0 -1
  101. package/dist/hooks/useBlockFormat.d.ts +0 -22
  102. package/dist/hooks/useColorPicker.d.ts +0 -5
  103. package/dist/hooks/useCustomCommands.d.ts +0 -4
  104. package/dist/hooks/useDebounce.d.ts +0 -1
  105. package/dist/hooks/useEditorToolbar.d.ts +0 -11
  106. package/dist/hooks/useInsertMenu.d.ts +0 -9
  107. package/dist/hooks/useModal.d.ts +0 -5
  108. package/dist/hooks/useS3Uploader.d.ts +0 -11
  109. package/dist/html-c18fb60e.js +0 -2842
  110. package/dist/html-c18fb60e.js.map +0 -1
  111. package/dist/index-ab416a15.js +0 -633
  112. package/dist/index-ab416a15.js.map +0 -1
  113. package/dist/index-dc0603c6.js +0 -31767
  114. package/dist/index-dc0603c6.js.map +0 -1
  115. package/dist/index.d.ts +0 -6
  116. package/dist/index.js +0 -22
  117. package/dist/index.js.map +0 -1
  118. package/dist/lib/utils.d.ts +0 -3
  119. package/dist/main.d.ts +0 -1
  120. package/dist/markdown-39c3822b.js +0 -3548
  121. package/dist/markdown-39c3822b.js.map +0 -1
  122. package/dist/nodes/EmbedNode.d.ts +0 -27
  123. package/dist/nodes/ImageNode.d.ts +0 -48
  124. package/dist/nodes/MentionNode.d.ts +0 -76
  125. package/dist/pages/ConfigurableEditor/ConfigurableEditor.d.ts +0 -14
  126. package/dist/pages/ConfigurableEditor/index.d.ts +0 -2
  127. package/dist/pages/NotFound.d.ts +0 -2
  128. package/dist/pages/RichTextEditor.d.ts +0 -6
  129. package/dist/pages/TextareaEditor.d.ts +0 -6
  130. package/dist/pages/styles.d.ts +0 -5
  131. package/dist/plugins/AIChatPlugin.d.ts +0 -6
  132. package/dist/plugins/CodeHighlightPlugin.d.ts +0 -4
  133. package/dist/plugins/DragDropPastePlugin/index.d.ts +0 -8
  134. package/dist/plugins/EmbedPreviewPlugin/FloatingEmbedMenuPlugin.d.ts +0 -4
  135. package/dist/plugins/EmbedPreviewPlugin/index.d.ts +0 -7
  136. package/dist/plugins/FilePlugin.d.ts +0 -8
  137. package/dist/plugins/FloatingLinkEditorPlugin/index.d.ts +0 -7
  138. package/dist/plugins/FloatingTextFormatToolbarPlugin/index.d.ts +0 -25
  139. package/dist/plugins/HtmlCodeViewPlugin/index.d.ts +0 -2
  140. package/dist/plugins/ImagePlugin.d.ts +0 -10
  141. package/dist/plugins/LinkPlugin/index.d.ts +0 -7
  142. package/dist/plugins/LocalStoragePlugin.d.ts +0 -9
  143. package/dist/plugins/MentionsPlugin/index.d.ts +0 -8
  144. package/dist/plugins/RichTextPastePlugin/index.d.ts +0 -1
  145. package/dist/plugins/SignatureCanvasPlugin/SignatureCanvasDialog.d.ts +0 -7
  146. package/dist/plugins/SignatureCanvasPlugin/SignatureCanvasPlugin.d.ts +0 -3
  147. package/dist/plugins/SignatureCanvasPlugin/index.d.ts +0 -2
  148. package/dist/plugins/TableActionMenuPlugin/index.d.ts +0 -7
  149. package/dist/plugins/TableCellResizer/index.d.ts +0 -3
  150. package/dist/plugins/TableHoverActionsPlugin/index.d.ts +0 -11
  151. package/dist/plugins/TablePlugin.d.ts +0 -1
  152. package/dist/plugins/TreeViewPlugin.d.ts +0 -4
  153. package/dist/postcss-bbcc713e.js +0 -5152
  154. package/dist/postcss-bbcc713e.js.map +0 -1
  155. package/dist/standalone-36ad3877.js +0 -2601
  156. package/dist/standalone-36ad3877.js.map +0 -1
  157. package/dist/styles/PlaygroundEditorTheme.d.ts +0 -4
  158. package/dist/types.d.ts +0 -131
  159. package/dist/typescript-39d06710.js +0 -13534
  160. package/dist/typescript-39d06710.js.map +0 -1
  161. package/dist/ui/ColorPicker.d.ts +0 -14
  162. package/dist/ui/Icons.d.ts +0 -34
  163. package/dist/ui/TextInput.d.ts +0 -12
  164. package/dist/utils/debounce.d.ts +0 -7
  165. package/dist/utils/getDOMRangeRect.d.ts +0 -13
  166. package/dist/utils/getSelectedNode.d.ts +0 -4
  167. package/dist/utils/helper.d.ts +0 -3
  168. package/dist/utils/index.d.ts +0 -6
  169. package/dist/utils/invarient.d.ts +0 -1
  170. package/dist/utils/setFloatingElemPosition.d.ts +0 -8
  171. package/dist/utils/setFloatingElemPositionForLinkEditor.d.ts +0 -1
  172. package/dist/utils/url.d.ts +0 -9
@@ -0,0 +1,16 @@
1
+ var Bi=Object.create,Ze=Object.defineProperty,Mi=Object.getOwnPropertyDescriptor,Oi=Object.getOwnPropertyNames,Ri=Object.getPrototypeOf,ji=Object.prototype.hasOwnProperty,Ui=(l,c)=>()=>(c||l((c={exports:{}}).exports,c),c.exports),_i=(l,c)=>{for(var m in c)Ze(l,m,{get:c[m],enumerable:!0})},Hi=(l,c,m,x)=>{if(c&&typeof c=="object"||typeof c=="function")for(let f of Oi(c))!ji.call(l,f)&&f!==m&&Ze(l,f,{get:()=>c[f],enumerable:!(x=Mi(c,f))||x.enumerable});return l},Vt=(l,c,m)=>(m=l!=null?Bi(Ri(l)):{},Hi(c||!l||!l.__esModule?Ze(m,"default",{value:l,enumerable:!0}):m,l)),qt=Ui(l=>{Object.defineProperty(l,"__esModule",{value:!0});function c(t,e){if(t==null)return{};var s={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.includes(i))continue;s[i]=t[i]}return s}var m=class{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}},x=class{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 f(t,e){let{line:s,column:i,index:r}=t;return new m(s,i+e,r+e)}var C="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED",S={ImportMetaOutsideModule:{message:`import.meta may appear only with 'sourceType: "module"'`,code:C},ImportOutsideModule:{message:`'import' and 'export' may appear only with 'sourceType: "module"'`,code:C}},M={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"},R=t=>t.type==="UpdateExpression"?M.UpdateExpression[`${t.prefix}`]:M[t.type],Se={AccessorIsGenerator:({kind:t})=>`A ${t}ter cannot be a generator.`,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.",AwaitNotInAsyncFunction:"'await' is only allowed within async functions.",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:({kind:t})=>`Missing initializer in ${t} declaration.`,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:({exportName:t})=>`\`${t}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",DynamicImportPhaseRequiresImportExpressions:({phase:t})=>`'import.${t}(...)' can only be parsed when using the 'createImportExpressions' option.`,ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:t,exportName:e})=>`A string literal cannot be used as an exported binding without \`from\`.
2
+ - Did you mean \`export { '${t}' as '${e}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:t})=>`'${t==="ForInStatement"?"for-in":"for-of"}' loop variable declaration may not have an initializer.`,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:({type:t})=>`Unsyntactic ${t==="BreakStatement"?"break":"continue"}.`,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:({importName:t})=>`A string literal cannot be used as an imported binding.
3
+ - Did you mean \`import { "${t}" as foo }\`?`,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.",InvalidCoverInitializedName:"Invalid shorthand property initializer.",InvalidDecimal:"Invalid decimal.",InvalidDigit:({radix:t})=>`Expected number in radix ${t}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:t})=>`Escape sequence in keyword ${t}.`,InvalidIdentifier:({identifierName:t})=>`Invalid identifier ${t}.`,InvalidLhs:({ancestor:t})=>`Invalid left-hand side in ${R(t)}.`,InvalidLhsBinding:({ancestor:t})=>`Binding invalid left-hand side in ${R(t)}.`,InvalidLhsOptionalChaining:({ancestor:t})=>`Invalid optional chaining in the left-hand side of ${R(t)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:t})=>`Unexpected character '${t}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:t})=>`Private name #${t} is not defined.`,InvalidPropertyBindingPattern:"Binding member expression.",InvalidRecordProperty:"Only properties and spread elements are allowed in record definitions.",InvalidRestAssignmentPattern:"Invalid rest operator's argument.",LabelRedeclaration:({labelName:t})=>`Label '${t}' is already declared.`,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:({missingPlugin:t})=>`This experimental syntax requires enabling the parser plugin: ${t.map(e=>JSON.stringify(e)).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:t})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${t.map(e=>JSON.stringify(e)).join(", ")}.`,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:({key:t})=>`Duplicate key "${t}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:t})=>`An export name cannot include a lone surrogate, found '\\u${t.toString(16)}'.`,ModuleExportUndefined:({localName:t})=>`Export '${t}' is not defined.`,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:({identifierName:t})=>`Private names are only allowed in property accesses (\`obj.#${t}\`) or in \`in\` expressions (\`#${t} in obj\`).`,PrivateNameRedeclaration:({identifierName:t})=>`Duplicate private name #${t}.`,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:({keyword:t})=>`Unexpected keyword '${t}'.`,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:({reservedWord:t})=>`Unexpected reserved word '${t}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:t,unexpected:e})=>`Unexpected token${e?` '${e}'.`:""}${t?`, expected "${t}"`:""}`,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`.",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:({target:t,onlyValidPropertyName:e})=>`The only valid meta property for ${t} is ${t}.${e}.`,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:({identifierName:t})=>`Identifier '${t}' has already been declared.`,YieldBindingIdentifier:"Can not use 'yield' as identifier inside a generator.",YieldInParameter:"Yield expression is not allowed in formal parameters.",ZeroDigitNumericSeparator:"Numeric separator can not be used after leading 0."},ss={StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:t})=>`Assigning to '${t}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:t})=>`Binding '${t}' in strict mode.`,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."},is=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]),rs=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:({token:t})=>`Invalid topic token ${t}. In order to use ${t} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${t}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:t})=>`Hack-style pipe body cannot be an unparenthesized ${R({type:t})}; please wrap it in parentheses.`},{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.'}),as=["message"];function tt(t,e,s){Object.defineProperty(t,e,{enumerable:!1,configurable:!0,value:s})}function ns({toMessage:t,code:e,reasonCode:s,syntaxPlugin:i}){let r=s==="MissingPlugin"||s==="MissingOneOfPlugins";{let a={AccessorCannotDeclareThisParameter:"AccesorCannotDeclareThisParameter",AccessorCannotHaveTypeParameters:"AccesorCannotHaveTypeParameters",ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference:"ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference",SetAccessorCannotHaveOptionalParameter:"SetAccesorCannotHaveOptionalParameter",SetAccessorCannotHaveRestParameter:"SetAccesorCannotHaveRestParameter",SetAccessorCannotHaveReturnType:"SetAccesorCannotHaveReturnType"};a[s]&&(s=a[s])}return function a(n,o){let p=new SyntaxError;return p.code=e,p.reasonCode=s,p.loc=n,p.pos=n.index,p.syntaxPlugin=i,r&&(p.missingPlugin=o.missingPlugin),tt(p,"clone",function(h={}){var d;let{line:y,column:A,index:T}=(d=h.loc)!=null?d:n;return a(new m(y,A,T),Object.assign({},o,h.details))}),tt(p,"details",o),Object.defineProperty(p,"message",{configurable:!0,get(){let h=`${t(o)} (${n.line}:${n.column})`;return this.message=h,h},set(h){Object.defineProperty(this,"message",{value:h,writable:!0})}}),p}}function H(t,e){if(Array.isArray(t))return i=>H(i,t[0]);let s={};for(let i of Object.keys(t)){let r=t[i],a=typeof r=="string"?{message:()=>r}:typeof r=="function"?{message:r}:r,{message:n}=a,o=c(a,as),p=typeof n=="string"?()=>n:n;s[i]=ns(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:i,toMessage:p},e?{syntaxPlugin:e}:{},o))}return s}var u=Object.assign({},H(S),H(Se),H(ss),H`pipelineOperator`(rs));function os(){return{sourceType:"script",sourceFilename:void 0,startIndex:0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createImportExpressions:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0}}function hs(t){let e=os();if(t==null)return e;if(t.annexB!=null&&t.annexB!==!1)throw new Error("The `annexB` option can only be set to `false`.");for(let s of Object.keys(e))t[s]!=null&&(e[s]=t[s]);if(e.startLine===1)t.startIndex==null&&e.startColumn>0?e.startIndex=e.startColumn:t.startColumn==null&&e.startIndex>0&&(e.startColumn=e.startIndex);else if((t.startColumn==null||t.startIndex==null)&&t.startIndex!=null)throw new Error("With a `startLine > 1` you must also specify `startIndex` and `startColumn`.");return e}var{defineProperty:ps}=Object,st=(t,e)=>{t&&ps(t,e,{enumerable:!1,value:t[e]})};function ne(t){return st(t.loc.start,"index"),st(t.loc.end,"index"),t}var ls=t=>class extends t{parse(){let e=ne(super.parse());return this.optionFlags&128&&(e.tokens=e.tokens.map(ne)),e}parseRegExpLiteral({pattern:e,flags:s}){let i=null;try{i=new RegExp(e,s)}catch{}let r=this.estreeParseLiteral(i);return r.regex={pattern:e,flags:s},r}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 s=this.estreeParseLiteral(null);return s.decimal=String(s.value||e),s}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)}directiveToStmt(e){let s=e.value;delete e.value,s.type="Literal",s.raw=s.extra.raw,s.value=s.extra.expressionValue;let i=e;return i.type="ExpressionStatement",i.expression=s,i.directive=s.extra.rawValue,delete s.extra,i}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,r,a){super.parseBlockBody(e,s,i,r,a);let n=e.directives.map(o=>this.directiveToStmt(o));e.body=n.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 e=e,delete e.id,e.name=s,e.type="PrivateIdentifier",e}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,r,a,n,o=!1){let p=this.startNode();p.kind=e.kind,p=super.parseMethod(p,s,i,r,a,n,o),p.type="FunctionExpression",delete p.kind,e.value=p;let{typeParameters:h}=e;return h&&(delete e.typeParameters,p.typeParameters=h,this.resetStartLocationFromNode(p,h)),n==="ClassPrivateMethod"&&(e.computed=!1),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")&&(s.type="PropertyDefinition"),s}parseClassPrivateProperty(...e){let s=super.parseClassPrivateProperty(...e);return this.getPluginOption("estree","classFeatures")&&(s.type="PropertyDefinition",s.computed=!1),s}parseObjectMethod(e,s,i,r,a){let n=super.parseObjectMethod(e,s,i,r,a);return n&&(n.type="Property",n.kind==="method"&&(n.kind="init"),n.shorthand=!1),n}parseObjectProperty(e,s,i,r){let a=super.parseObjectProperty(e,s,i,r);return a&&(a.kind="init",a.type="Property"),a}isValidLVal(e,s,i){return e==="Property"?"value":super.isValidLVal(e,s,i)}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:r}=e;this.isPrivateName(i)&&this.classScope.usePrivateName(this.getPrivateNameSV(i),i.loc.start),this.toAssignable(r,s)}else super.toAssignable(e,s)}toAssignableObjectExpressionProp(e,s,i){e.type==="Property"&&(e.kind==="get"||e.kind==="set")?this.raise(u.PatternHasAccessor,e.key):e.type==="Property"&&e.method?this.raise(u.PatternHasMethod,e.key):super.toAssignableObjectExpressionProp(e,s,i)}finishCallExpression(e,s){let i=super.finishCallExpression(e,s);if(i.callee.type==="Import"){var r,a;i.type="ImportExpression",i.source=i.arguments[0],i.options=(r=i.arguments[1])!=null?r:null,i.attributes=(a=i.arguments[1])!=null?a:null,delete i.arguments,delete i.callee}return i}toReferencedArguments(e){e.type!=="ImportExpression"&&super.toReferencedArguments(e)}parseExport(e,s){let i=this.state.lastTokStartLoc,r=super.parseExport(e,s);switch(r.type){case"ExportAllDeclaration":r.exported=null;break;case"ExportNamedDeclaration":r.specifiers.length===1&&r.specifiers[0].type==="ExportNamespaceSpecifier"&&(r.type="ExportAllDeclaration",r.exported=r.specifiers[0].exported,delete r.specifiers);case"ExportDefaultDeclaration":{var a;let{declaration:n}=r;(n==null?void 0:n.type)==="ClassDeclaration"&&((a=n.decorators)==null?void 0:a.length)>0&&n.start===r.start&&this.resetStartLocation(r,i)}break}return r}parseSubscript(e,s,i,r){let a=super.parseSubscript(e,s,i,r);if(r.optionalChainMember){if((a.type==="OptionalMemberExpression"||a.type==="OptionalCallExpression")&&(a.type=a.type.substring(8)),r.stop){let n=this.startNodeAtNode(a);return n.expression=a,this.finishNode(n,"ChainExpression")}}else(a.type==="MemberExpression"||a.type==="CallExpression")&&(a.optional=!1);return a}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")}finishNodeAt(e,s,i){return ne(super.finishNodeAt(e,s,i))}resetStartLocation(e,s){super.resetStartLocation(e,s),ne(e)}resetEndLocation(e,s=this.state.lastTokEndLoc){super.resetEndLocation(e,s),ne(e)}},oe=class{constructor(t,e){this.token=void 0,this.preserveSpace=void 0,this.token=t,this.preserveSpace=!!e}},k={brace:new oe("{"),j_oTag:new oe("<tag"),j_cTag:new oe("</tag"),j_expr:new oe("<tag>...</tag>",!0)};k.template=new oe("`",!0);var w=!0,P=!0,we=!0,he=!0,J=!0,us=!0,it=class{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}},Ie=new Map;function v(t,e={}){e.keyword=t;let s=b(t,e);return Ie.set(t,s),s}function O(t,e){return b(t,{beforeExpr:w,binop:e})}var pe=-1,z=[],Ne=[],ve=[],ke=[],De=[],Fe=[];function b(t,e={}){var s,i,r,a;return++pe,Ne.push(t),ve.push((s=e.binop)!=null?s:-1),ke.push((i=e.beforeExpr)!=null?i:!1),De.push((r=e.startsExpr)!=null?r:!1),Fe.push((a=e.prefix)!=null?a:!1),z.push(new it(t,e)),pe}function I(t,e={}){var s,i,r,a;return++pe,Ie.set(t,pe),Ne.push(t),ve.push((s=e.binop)!=null?s:-1),ke.push((i=e.beforeExpr)!=null?i:!1),De.push((r=e.startsExpr)!=null?r:!1),Fe.push((a=e.prefix)!=null?a:!1),z.push(new it("name",e)),pe}var cs={bracketL:b("[",{beforeExpr:w,startsExpr:P}),bracketHashL:b("#[",{beforeExpr:w,startsExpr:P}),bracketBarL:b("[|",{beforeExpr:w,startsExpr:P}),bracketR:b("]"),bracketBarR:b("|]"),braceL:b("{",{beforeExpr:w,startsExpr:P}),braceBarL:b("{|",{beforeExpr:w,startsExpr:P}),braceHashL:b("#{",{beforeExpr:w,startsExpr:P}),braceR:b("}"),braceBarR:b("|}"),parenL:b("(",{beforeExpr:w,startsExpr:P}),parenR:b(")"),comma:b(",",{beforeExpr:w}),semi:b(";",{beforeExpr:w}),colon:b(":",{beforeExpr:w}),doubleColon:b("::",{beforeExpr:w}),dot:b("."),question:b("?",{beforeExpr:w}),questionDot:b("?."),arrow:b("=>",{beforeExpr:w}),template:b("template"),ellipsis:b("...",{beforeExpr:w}),backQuote:b("`",{startsExpr:P}),dollarBraceL:b("${",{beforeExpr:w,startsExpr:P}),templateTail:b("...`",{startsExpr:P}),templateNonTail:b("...${",{beforeExpr:w,startsExpr:P}),at:b("@"),hash:b("#",{startsExpr:P}),interpreterDirective:b("#!..."),eq:b("=",{beforeExpr:w,isAssign:he}),assign:b("_=",{beforeExpr:w,isAssign:he}),slashAssign:b("_=",{beforeExpr:w,isAssign:he}),xorAssign:b("_=",{beforeExpr:w,isAssign:he}),moduloAssign:b("_=",{beforeExpr:w,isAssign:he}),incDec:b("++/--",{prefix:J,postfix:us,startsExpr:P}),bang:b("!",{beforeExpr:w,prefix:J,startsExpr:P}),tilde:b("~",{beforeExpr:w,prefix:J,startsExpr:P}),doubleCaret:b("^^",{startsExpr:P}),doubleAt:b("@@",{startsExpr:P}),pipeline:O("|>",0),nullishCoalescing:O("??",1),logicalOR:O("||",1),logicalAND:O("&&",2),bitwiseOR:O("|",3),bitwiseXOR:O("^",4),bitwiseAND:O("&",5),equality:O("==/!=/===/!==",6),lt:O("</>/<=/>=",7),gt:O("</>/<=/>=",7),relational:O("</>/<=/>=",7),bitShift:O("<</>>/>>>",8),bitShiftL:O("<</>>/>>>",8),bitShiftR:O("<</>>/>>>",8),plusMin:b("+/-",{beforeExpr:w,binop:9,prefix:J,startsExpr:P}),modulo:b("%",{binop:10,startsExpr:P}),star:b("*",{binop:10}),slash:O("/",10),exponent:b("**",{beforeExpr:w,binop:11,rightAssociative:!0}),_in:v("in",{beforeExpr:w,binop:7}),_instanceof:v("instanceof",{beforeExpr:w,binop:7}),_break:v("break"),_case:v("case",{beforeExpr:w}),_catch:v("catch"),_continue:v("continue"),_debugger:v("debugger"),_default:v("default",{beforeExpr:w}),_else:v("else",{beforeExpr:w}),_finally:v("finally"),_function:v("function",{startsExpr:P}),_if:v("if"),_return:v("return",{beforeExpr:w}),_switch:v("switch"),_throw:v("throw",{beforeExpr:w,prefix:J,startsExpr:P}),_try:v("try"),_var:v("var"),_const:v("const"),_with:v("with"),_new:v("new",{beforeExpr:w,startsExpr:P}),_this:v("this",{startsExpr:P}),_super:v("super",{startsExpr:P}),_class:v("class",{startsExpr:P}),_extends:v("extends",{beforeExpr:w}),_export:v("export"),_import:v("import",{startsExpr:P}),_null:v("null",{startsExpr:P}),_true:v("true",{startsExpr:P}),_false:v("false",{startsExpr:P}),_typeof:v("typeof",{beforeExpr:w,prefix:J,startsExpr:P}),_void:v("void",{beforeExpr:w,prefix:J,startsExpr:P}),_delete:v("delete",{beforeExpr:w,prefix:J,startsExpr:P}),_do:v("do",{isLoop:we,beforeExpr:w}),_for:v("for",{isLoop:we}),_while:v("while",{isLoop:we}),_as:I("as",{startsExpr:P}),_assert:I("assert",{startsExpr:P}),_async:I("async",{startsExpr:P}),_await:I("await",{startsExpr:P}),_defer:I("defer",{startsExpr:P}),_from:I("from",{startsExpr:P}),_get:I("get",{startsExpr:P}),_let:I("let",{startsExpr:P}),_meta:I("meta",{startsExpr:P}),_of:I("of",{startsExpr:P}),_sent:I("sent",{startsExpr:P}),_set:I("set",{startsExpr:P}),_source:I("source",{startsExpr:P}),_static:I("static",{startsExpr:P}),_using:I("using",{startsExpr:P}),_yield:I("yield",{startsExpr:P}),_asserts:I("asserts",{startsExpr:P}),_checks:I("checks",{startsExpr:P}),_exports:I("exports",{startsExpr:P}),_global:I("global",{startsExpr:P}),_implements:I("implements",{startsExpr:P}),_intrinsic:I("intrinsic",{startsExpr:P}),_infer:I("infer",{startsExpr:P}),_is:I("is",{startsExpr:P}),_mixins:I("mixins",{startsExpr:P}),_proto:I("proto",{startsExpr:P}),_require:I("require",{startsExpr:P}),_satisfies:I("satisfies",{startsExpr:P}),_keyof:I("keyof",{startsExpr:P}),_readonly:I("readonly",{startsExpr:P}),_unique:I("unique",{startsExpr:P}),_abstract:I("abstract",{startsExpr:P}),_declare:I("declare",{startsExpr:P}),_enum:I("enum",{startsExpr:P}),_module:I("module",{startsExpr:P}),_namespace:I("namespace",{startsExpr:P}),_interface:I("interface",{startsExpr:P}),_type:I("type",{startsExpr:P}),_opaque:I("opaque",{startsExpr:P}),name:b("name",{startsExpr:P}),placeholder:b("%%",{startsExpr:!0}),string:b("string",{startsExpr:P}),num:b("num",{startsExpr:P}),bigint:b("bigint",{startsExpr:P}),decimal:b("decimal",{startsExpr:P}),regexp:b("regexp",{startsExpr:P}),privateName:b("#name",{startsExpr:P}),eof:b("eof"),jsxName:b("jsxName"),jsxText:b("jsxText",{beforeExpr:!0}),jsxTagStart:b("jsxTagStart",{startsExpr:!0}),jsxTagEnd:b("jsxTagEnd")};function D(t){return t>=93&&t<=133}function ds(t){return t<=92}function U(t){return t>=58&&t<=133}function rt(t){return t>=58&&t<=137}function ms(t){return ke[t]}function Le(t){return De[t]}function fs(t){return t>=29&&t<=33}function at(t){return t>=129&&t<=131}function ys(t){return t>=90&&t<=92}function Be(t){return t>=58&&t<=92}function xs(t){return t>=39&&t<=59}function Ps(t){return t===34}function As(t){return Fe[t]}function gs(t){return t>=121&&t<=123}function Ts(t){return t>=124&&t<=130}function W(t){return Ne[t]}function ye(t){return ve[t]}function bs(t){return t===57}function xe(t){return t>=24&&t<=25}function V(t){return z[t]}z[8].updateContext=t=>{t.pop()},z[5].updateContext=z[7].updateContext=z[23].updateContext=t=>{t.push(k.brace)},z[22].updateContext=t=>{t[t.length-1]===k.template?t.pop():t.push(k.template)},z[143].updateContext=t=>{t.push(k.j_expr,k.j_oTag)};var Me="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟍꟐꟑꟓꟕ-Ƛꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",nt="·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・",Es=new RegExp("["+Me+"]"),Cs=new RegExp("["+Me+nt+"]");Me=nt=null;var ot=[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,71,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,2,60,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,328,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,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,42,9,8936,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,496,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,4153,7,221,3,5761,15,7472,16,621,2467,541,1507,4938,6,4191],Ss=[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,80,3,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,343,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,330,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,726,6,110,6,6,9,4759,9,787719,239];function Oe(t,e){let s=65536;for(let i=0,r=e.length;i<r;i+=2){if(s+=e[i],s>t)return!1;if(s+=e[i+1],s>=t)return!0}return!1}function q(t){return t<65?t===36:t<=90?!0:t<97?t===95:t<=122?!0:t<=65535?t>=170&&Es.test(String.fromCharCode(t)):Oe(t,ot)}function te(t){return t<48?t===36:t<58?!0:t<65?!1:t<=90?!0:t<97?t===95:t<=122?!0:t<=65535?t>=170&&Cs.test(String.fromCharCode(t)):Oe(t,ot)||Oe(t,Ss)}var Re={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"]},ws=new Set(Re.keyword),Is=new Set(Re.strict),Ns=new Set(Re.strictBind);function ht(t,e){return e&&t==="await"||t==="enum"}function pt(t,e){return ht(t,e)||Is.has(t)}function lt(t){return Ns.has(t)}function ut(t,e){return pt(t,e)||lt(t)}function vs(t){return ws.has(t)}function ks(t,e,s){return t===64&&e===64&&q(s)}var Ds=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 Fs(t){return Ds.has(t)}var je=class{constructor(t){this.flags=0,this.names=new Map,this.firstLexicalName="",this.flags=t}},Ue=class{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 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&451)return!1}}get inNonArrowFunction(){return(this.currentThisScopeFlags()&2)>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(t){return new je(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 r=i.names.get(t)||0;e&16?r=r|4:(i.firstLexicalName||(i.firstLexicalName=t),r=r|2),i.names.set(t,r),e&8&&this.maybeExportDefined(i,t)}else if(e&4)for(let r=this.scopeStack.length-1;r>=0&&(i=this.scopeStack[r],this.checkRedeclarationInScope(i,t,e,s),i.names.set(t,(i.names.get(t)||0)|1),this.maybeExportDefined(i,t),!(i.flags&387));--r);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(u.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);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&387)return e}}currentThisScopeFlags(){for(let t=this.scopeStack.length-1;;t--){let{flags:e}=this.scopeStack[t];if(e&451&&!(e&4))return e}}},Ls=class extends je{constructor(...t){super(...t),this.declareFunctions=new Set}},Bs=class extends Ue{createScope(t){return new Ls(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)}},Ms=class{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 r of Object.keys(s))if((i==null?void 0:i[r])!==s[r])return!1;return!0}}getPluginOption(t,e){var s;return(s=this.plugins.get(t))==null?void 0:s[e]}};function ct(t,e){t.trailingComments===void 0?t.trailingComments=e:t.trailingComments.unshift(...e)}function Os(t,e){t.leadingComments===void 0?t.leadingComments=e:t.leadingComments.unshift(...e)}function le(t,e){t.innerComments===void 0?t.innerComments=e:t.innerComments.unshift(...e)}function Q(t,e,s){let i=null,r=e.length;for(;i===null&&r>0;)i=e[--r];i===null||i.start>s.start?le(t,s.comments):ct(i,s.comments)}var Rs=class extends Ms{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,r=e[i];r.start===t.end&&(r.leadingNode=t,i--);let{start:a}=t;for(;i>=0;i--){let n=e[i],o=n.end;if(o>a)n.containingNode=t,this.finalizeComment(n),e.splice(i,1);else{o===a&&(n.trailingNode=t);break}}}finalizeComment(t){let{comments:e}=t;if(t.leadingNode!==null||t.trailingNode!==null)t.leadingNode!==null&&ct(t.leadingNode,e),t.trailingNode!==null&&Os(t.trailingNode,e);else{let{containingNode:s,start:i}=t;if(this.input.charCodeAt(this.offsetToSourcePos(i)-1)===44)switch(s.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":Q(s,s.properties,t);break;case"CallExpression":case"OptionalCallExpression":Q(s,s.arguments,t);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":Q(s,s.params,t);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":Q(s,s.elements,t);break;case"ExportNamedDeclaration":case"ImportDeclaration":Q(s,s.specifiers,t);break;case"TSEnumDeclaration":Q(s,s.members,t);break;case"TSEnumBody":Q(s,s.members,t);break;default:le(s,e)}else le(s,e)}}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)}resetPreviousIdentifierLeadingComments(t){let{commentStack:e}=this.state,{length:s}=e;s!==0&&(e[s-1].trailingNode===t?e[s-1].trailingNode=null:s>=2&&e[s-2].trailingNode===t&&(e[s-2].trailingNode=null))}takeSurroundingComments(t,e,s){let{commentStack:i}=this.state,r=i.length;if(r===0)return;let a=r-1;for(;a>=0;a--){let n=i[a],o=n.end;if(n.start===s)n.leadingNode=t;else if(o===e)n.trailingNode=t;else if(o<e)break}}},js=/\r\n|[\r\n\u2028\u2029]/,Pe=new RegExp(js.source,"g");function se(t){switch(t){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}function dt(t,e,s){for(let i=e;i<s;i++)if(se(t.charCodeAt(i)))return!0;return!1}var _e=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,He=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g;function Us(t){switch(t){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}}var _s=class $t{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=[k.brace],this.firstInvalidTemplateEscapePos=null,this.strictErrors=new Map,this.tokensLength=0}get strict(){return(this.flags&1)>0}set strict(e){e?this.flags|=1:this.flags&=-2}init({strictMode:e,sourceType:s,startIndex:i,startLine:r,startColumn:a}){this.strict=e===!1?!1:e===!0?!0:s==="module",this.startIndex=i,this.curLine=r,this.lineStart=-a,this.startLoc=this.endLoc=new m(r,a,i)}get maybeInArrowParameters(){return(this.flags&2)>0}set maybeInArrowParameters(e){e?this.flags|=2:this.flags&=-3}get inType(){return(this.flags&4)>0}set inType(e){e?this.flags|=4:this.flags&=-5}get noAnonFunctionType(){return(this.flags&8)>0}set noAnonFunctionType(e){e?this.flags|=8:this.flags&=-9}get hasFlowComment(){return(this.flags&16)>0}set hasFlowComment(e){e?this.flags|=16:this.flags&=-17}get isAmbientContext(){return(this.flags&32)>0}set isAmbientContext(e){e?this.flags|=32:this.flags&=-33}get inAbstractClass(){return(this.flags&64)>0}set inAbstractClass(e){e?this.flags|=64:this.flags&=-65}get inDisallowConditionalTypesContext(){return(this.flags&128)>0}set inDisallowConditionalTypesContext(e){e?this.flags|=128:this.flags&=-129}get soloAwait(){return(this.flags&256)>0}set soloAwait(e){e?this.flags|=256:this.flags&=-257}get inFSharpPipelineDirectBody(){return(this.flags&512)>0}set inFSharpPipelineDirectBody(e){e?this.flags|=512:this.flags&=-513}get canStartJSXElement(){return(this.flags&1024)>0}set canStartJSXElement(e){e?this.flags|=1024:this.flags&=-1025}get containsEsc(){return(this.flags&2048)>0}set containsEsc(e){e?this.flags|=2048:this.flags&=-2049}get hasTopLevelAwait(){return(this.flags&4096)>0}set hasTopLevelAwait(e){e?this.flags|=4096:this.flags&=-4097}curPosition(){return new m(this.curLine,this.pos-this.lineStart,this.pos+this.startIndex)}clone(){let e=new $t;return e.flags=this.flags,e.startIndex=this.startIndex,e.curLine=this.curLine,e.lineStart=this.lineStart,e.startLoc=this.startLoc,e.endLoc=this.endLoc,e.errors=this.errors.slice(),e.potentialArrowAt=this.potentialArrowAt,e.noArrowAt=this.noArrowAt.slice(),e.noArrowParamsConversionAt=this.noArrowParamsConversionAt.slice(),e.topicContext=this.topicContext,e.labels=this.labels.slice(),e.commentsLen=this.commentsLen,e.commentStack=this.commentStack.slice(),e.pos=this.pos,e.type=this.type,e.value=this.value,e.start=this.start,e.end=this.end,e.lastTokEndLoc=this.lastTokEndLoc,e.lastTokStartLoc=this.lastTokStartLoc,e.context=this.context.slice(),e.firstInvalidTemplateEscapePos=this.firstInvalidTemplateEscapePos,e.strictErrors=this.strictErrors,e.tokensLength=this.tokensLength,e}},Hs=function(t){return t>=48&&t<=57},mt={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},Ae={bin:t=>t===48||t===49,oct:t=>t>=48&&t<=55,dec:t=>t>=48&&t<=57,hex:t=>t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102};function ft(t,e,s,i,r,a){let n=s,o=i,p=r,h="",d=null,y=s,{length:A}=e;for(;;){if(s>=A){a.unterminated(n,o,p),h+=e.slice(y,s);break}let T=e.charCodeAt(s);if(zs(t,T,e,s)){h+=e.slice(y,s);break}if(T===92){h+=e.slice(y,s);let N=Vs(e,s,i,r,t==="template",a);N.ch===null&&!d?d={pos:s,lineStart:i,curLine:r}:h+=N.ch,{pos:s,lineStart:i,curLine:r}=N,y=s}else T===8232||T===8233?(++s,++r,i=s):T===10||T===13?t==="template"?(h+=e.slice(y,s)+`
4
+ `,++s,T===13&&e.charCodeAt(s)===10&&++s,++r,y=i=s):a.unterminated(n,o,p):++s}return{pos:s,str:h,firstInvalidLoc:d,lineStart:i,curLine:r,containsInvalid:!!d}}function zs(t,e,s,i){return t==="template"?e===96||e===36&&s.charCodeAt(i+1)===123:e===(t==="double"?34:39)}function Vs(t,e,s,i,r,a){let n=!r;e++;let o=h=>({pos:e,ch:h,lineStart:s,curLine:i}),p=t.charCodeAt(e++);switch(p){case 110:return o(`
5
+ `);case 114:return o("\r");case 120:{let h;return{code:h,pos:e}=ze(t,e,s,i,2,!1,n,a),o(h===null?null:String.fromCharCode(h))}case 117:{let h;return{code:h,pos:e}=xt(t,e,s,i,n,a),o(h===null?null:String.fromCodePoint(h))}case 116:return o(" ");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:t.charCodeAt(e)===10&&++e;case 10:s=e,++i;case 8232:case 8233:return o("");case 56:case 57:if(r)return o(null);a.strictNumericEscape(e-1,s,i);default:if(p>=48&&p<=55){let h=e-1,d=/^[0-7]+/.exec(t.slice(h,e+2))[0],y=parseInt(d,8);y>255&&(d=d.slice(0,-1),y=parseInt(d,8)),e+=d.length-1;let A=t.charCodeAt(e);if(d!=="0"||A===56||A===57){if(r)return o(null);a.strictNumericEscape(h,s,i)}return o(String.fromCharCode(y))}return o(String.fromCharCode(p))}}function ze(t,e,s,i,r,a,n,o){let p=e,h;return{n:h,pos:e}=yt(t,e,s,i,16,r,a,!1,o,!n),h===null&&(n?o.invalidEscapeSequence(p,s,i):e=p-1),{code:h,pos:e}}function yt(t,e,s,i,r,a,n,o,p,h){let d=e,y=r===16?mt.hex:mt.decBinOct,A=r===16?Ae.hex:r===10?Ae.dec:r===8?Ae.oct:Ae.bin,T=!1,N=0;for(let L=0,F=a??1/0;L<F;++L){let B=t.charCodeAt(e),j;if(B===95&&o!=="bail"){let Ke=t.charCodeAt(e-1),Je=t.charCodeAt(e+1);if(o){if(Number.isNaN(Je)||!A(Je)||y.has(Ke)||y.has(Je)){if(h)return{n:null,pos:e};p.unexpectedNumericSeparator(e,s,i)}}else{if(h)return{n:null,pos:e};p.numericSeparatorInEscapeSequence(e,s,i)}++e;continue}if(B>=97?j=B-97+10:B>=65?j=B-65+10:Hs(B)?j=B-48:j=1/0,j>=r){if(j<=9&&h)return{n:null,pos:e};if(j<=9&&p.invalidDigit(e,s,i,r))j=0;else if(n)j=0,T=!0;else break}++e,N=N*r+j}return e===d||a!=null&&e-d!==a||T?{n:null,pos:e}:{n:N,pos:e}}function xt(t,e,s,i,r,a){let n=t.charCodeAt(e),o;if(n===123){if(++e,{code:o,pos:e}=ze(t,e,s,i,t.indexOf("}",e)-e,!0,r,a),++e,o!==null&&o>1114111)if(r)a.invalidCodePoint(e,s,i);else return{code:null,pos:e}}else({code:o,pos:e}=ze(t,e,s,i,4,!1,r,a));return{code:o,pos:e}}function ue(t,e,s){return new m(s,t-e,t)}var qs=new Set([103,109,115,105,121,117,100,118]),X=class{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 x(t.startLoc,t.endLoc)}},$s=class extends Rs{constructor(t,e){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(s,i,r,a)=>this.optionFlags&1024?(this.raise(u.InvalidDigit,ue(s,i,r),{radix:a}),!0):!1,numericSeparatorInEscapeSequence:this.errorBuilder(u.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(u.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(u.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(u.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(s,i,r)=>{this.recordStrictModeErrors(u.StrictNumericEscape,ue(s,i,r))},unterminated:(s,i,r)=>{throw this.raise(u.UnterminatedString,ue(s-1,i,r))}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(u.StrictNumericEscape),unterminated:(s,i,r)=>{throw this.raise(u.UnterminatedTemplate,ue(s,i,r))}}),this.state=new _s,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&128&&this.pushToken(new X(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 _e.lastIndex=t,_e.test(this.input)?_e.lastIndex:t}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(t){return He.lastIndex=t,He.test(this.input)?He.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(u.UnterminatedComment,this.state.curPosition());for(this.state.pos=i+t.length,Pe.lastIndex=s+2;Pe.test(this.input)&&Pe.lastIndex<=i;)++this.state.curLine,this.state.lineStart=Pe.lastIndex;if(this.isLookahead)return;let r={type:"CommentBlock",value:this.input.slice(s+2,i),start:this.sourceToOffsetPos(s),end:this.sourceToOffsetPos(i+t.length),loc:new x(e,this.state.curPosition())};return this.optionFlags&128&&this.pushToken(r),r}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(;!se(i)&&++this.state.pos<this.length;)i=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;let r=this.state.pos,a={type:"CommentLine",value:this.input.slice(e+t,r),start:this.sourceToOffsetPos(e),end:this.sourceToOffsetPos(r),loc:new x(s,this.state.curPosition())};return this.optionFlags&128&&this.pushToken(a),a}skipSpace(){let t=this.state.pos,e=this.optionFlags&2048?[]: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==null||e.push(i));break}case 47:{let i=this.skipLineComment(2);i!==void 0&&(this.addComment(i),e==null||e.push(i));break}default:break e}break;default:if(Us(s))++this.state.pos;else if(s===45&&!this.inModule&&this.optionFlags&4096){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 r=this.skipLineComment(3);r!==void 0&&(this.addComment(r),e==null||e.push(r))}else break e}else if(s===60&&!this.inModule&&this.optionFlags&4096){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 r=this.skipLineComment(4);r!==void 0&&(this.addComment(r),e==null||e.push(r))}else break e}else break e}}if((e==null?void 0: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(u.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?u.RecordExpressionHashIncorrectStartSyntaxType:u.TupleExpressionHashIncorrectStartSyntaxType,this.state.curPosition());this.state.pos+=2,e===123?this.finishToken(7):this.finishToken(1)}else q(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;!se(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(u.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(u.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(u.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(u.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(q(t)){this.readWord(t);return}}throw this.raise(u.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:r}=this.state;for(;;++r){if(r>=this.length)throw this.raise(u.UnterminatedRegExp,f(t,1));let p=this.input.charCodeAt(r);if(se(p))throw this.raise(u.UnterminatedRegExp,f(t,1));if(s)s=!1;else{if(p===91)i=!0;else if(p===93&&i)i=!1;else if(p===47&&!i)break;s=p===92}}let a=this.input.slice(e,r);++r;let n="",o=()=>f(t,r+2-e);for(;r<this.length;){let p=this.codePointAtPos(r),h=String.fromCharCode(p);if(qs.has(p))p===118?n.includes("u")&&this.raise(u.IncompatibleRegExpUVFlags,o()):p===117&&n.includes("v")&&this.raise(u.IncompatibleRegExpUVFlags,o()),n.includes(h)&&this.raise(u.DuplicateRegExpFlags,o());else if(te(p)||p===92)this.raise(u.MalformedRegExpFlags,o());else break;++r,n+=h}this.state.pos=r,this.finishToken(138,{pattern:a,flags:n})}readInt(t,e,s=!1,i=!0){let{n:r,pos:a}=yt(this.input,this.state.pos,this.state.lineStart,this.state.curLine,t,e,s,i,this.errorHandlers_readInt,!1);return this.state.pos=a,r}readRadixNumber(t){let e=this.state.pos,s=this.state.curPosition(),i=!1;this.state.pos+=2;let r=this.readInt(t);r==null&&this.raise(u.InvalidDigit,f(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(u.InvalidDecimal,s);if(q(this.codePointAtPos(this.state.pos)))throw this.raise(u.NumberIdentifier,this.state.curPosition());if(i){let n=this.input.slice(e,this.state.pos).replace(/[_n]/g,"");this.finishToken(136,n);return}this.finishToken(135,r)}readNumber(t){let e=this.state.pos,s=this.state.curPosition(),i=!1,r=!1,a=!1,n=!1;!t&&this.readInt(10)===null&&this.raise(u.InvalidNumber,this.state.curPosition());let o=this.state.pos-e>=2&&this.input.charCodeAt(e)===48;if(o){let A=this.input.slice(e,this.state.pos);if(this.recordStrictModeErrors(u.StrictOctalLiteral,s),!this.state.strict){let T=A.indexOf("_");T>0&&this.raise(u.ZeroDigitNumericSeparator,f(s,T))}n=o&&!/[89]/.test(A)}let p=this.input.charCodeAt(this.state.pos);if(p===46&&!n&&(++this.state.pos,this.readInt(10),i=!0,p=this.input.charCodeAt(this.state.pos)),(p===69||p===101)&&!n&&(p=this.input.charCodeAt(++this.state.pos),(p===43||p===45)&&++this.state.pos,this.readInt(10)===null&&this.raise(u.InvalidOrMissingExponent,s),i=!0,a=!0,p=this.input.charCodeAt(this.state.pos)),p===110&&((i||o)&&this.raise(u.InvalidBigIntLiteral,s),++this.state.pos,r=!0),p===109){this.expectPlugin("decimal",this.state.curPosition()),(a||o)&&this.raise(u.InvalidDecimal,s),++this.state.pos;var h=!0}if(q(this.codePointAtPos(this.state.pos)))throw this.raise(u.NumberIdentifier,this.state.curPosition());let d=this.input.slice(e,this.state.pos).replace(/[_mn]/g,"");if(r){this.finishToken(136,d);return}if(h){this.finishToken(137,d);return}let y=n?parseInt(d,8):parseFloat(d);this.finishToken(135,y)}readCodePoint(t){let{code:e,pos:s}=xt(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:r}=ft(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=r,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:r,lineStart:a}=ft("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=r,s&&(this.state.firstInvalidTemplateEscapePos=new m(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 r=this.codePointAtPos(this.state.pos);if(te(r))this.state.pos+=r<=65535?1:2;else if(r===92){this.state.containsEsc=!0,e+=this.input.slice(i,this.state.pos);let a=this.state.curPosition(),n=this.state.pos===s?q:te;if(this.input.charCodeAt(++this.state.pos)!==117){this.raise(u.MissingUnicodeEscape,this.state.curPosition()),i=this.state.pos-1;continue}++this.state.pos;let o=this.readCodePoint(!0);o!==null&&(n(o)||this.raise(u.EscapedCharNotAnIdentifier,a),e+=String.fromCodePoint(o)),i=this.state.pos}else break}return e+this.input.slice(i,this.state.pos)}readWord(t){let e=this.readWord1(t),s=Ie.get(e);s!==void 0?this.finishToken(s,W(s)):this.finishToken(132,e)}checkKeywordEscapes(){let{type:t}=this.state;Be(t)&&this.state.containsEsc&&this.raise(u.InvalidEscapedReservedWord,this.state.startLoc,{reservedWord:W(t)})}raise(t,e,s={}){let i=e instanceof m?e:e.loc.start,r=t(i,s);if(!(this.optionFlags&1024))throw r;return this.isLookahead||this.state.errors.push(r),r}raiseOverwrite(t,e,s={}){let i=e instanceof m?e:e.loc.start,r=i.index,a=this.state.errors;for(let n=a.length-1;n>=0;n--){let o=a[n];if(o.loc.index===r)return a[n]=t(i,s);if(o.loc.index<r)break}return this.raise(t,e,s)}updateContext(t){}unexpected(t,e){throw this.raise(u.UnexpectedToken,t??this.state.startLoc,{expected:e?W(e):null})}expectPlugin(t,e){if(this.hasPlugin(t))return!0;throw this.raise(u.MissingPlugin,e??this.state.startLoc,{missingPlugin:[t]})}expectOnePlugin(t){if(!t.some(e=>this.hasPlugin(e)))throw this.raise(u.MissingOneOfPlugins,this.state.startLoc,{missingPlugin:t})}errorBuilder(t){return(e,s,i)=>{this.raise(t,ue(e,s,i))}}},Ks=class{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}},Js=class{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 Ks)}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(u.InvalidPrivateFieldResolution,i,{identifierName:s})}declarePrivateName(t,e,s){let{privateNames:i,loneAccessors:r,undefinedPrivateNames:a}=this.current(),n=i.has(t);if(e&3){let o=n&&r.get(t);if(o){let p=o&4,h=e&4,d=o&3,y=e&3;n=d===y||p!==h,n||r.delete(t)}else n||r.set(t,e)}n&&this.parser.raise(u.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(u.InvalidPrivateFieldResolution,e,{identifierName:t})}},ge=class{constructor(t=0){this.type=t}canBeArrowParameterDeclaration(){return this.type===2||this.type===1}isCertainlyParameterDeclaration(){return this.type===3}},Pt=class extends ge{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)}},Ws=class{constructor(t){this.parser=void 0,this.stack=[new ge],this.parser=t}enter(t){this.stack.push(t)}exit(){this.stack.pop()}recordParameterInitializerError(t,e){let s=e.loc.start,{stack:i}=this,r=i.length-1,a=i[r];for(;!a.isCertainlyParameterDeclaration();){if(a.canBeArrowParameterDeclaration())a.recordDeclarationError(t,s);else return;a=i[--r]}this.parser.raise(t,s)}recordArrowParameterBindingError(t,e){let{stack:s}=this,i=s[s.length-1],r=e.loc.start;if(i.isCertainlyParameterDeclaration())this.parser.raise(t,r);else if(i.canBeArrowParameterDeclaration())i.recordDeclarationError(t,r);else return}recordAsyncArrowParametersError(t){let{stack:e}=this,s=e.length-1,i=e[s];for(;i.canBeArrowParameterDeclaration();)i.type===2&&i.recordDeclarationError(u.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 r=t.length-2,a=t[r];for(;a.canBeArrowParameterDeclaration();)a.clearDeclarationError(i.index),a=t[--r]})}};function Xs(){return new ge(3)}function Gs(){return new Pt(1)}function Ys(){return new Pt(2)}function At(){return new ge}var Qs=class{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 Te(t,e){return(t?2:0)|(e?1:0)}var Zs=class extends $s{addExtra(t,e,s,i=!0){if(!t)return;let{extra:r}=t;r==null&&(r={},t.extra=r),i?r[e]=s:Object.defineProperty(r,e,{enumerable:i,value:s})}isContextual(t){return this.state.type===t&&!this.state.containsEsc}isUnparsedContextual(t,e){let s=t+e.length;if(this.input.slice(t,s)===e){let i=this.input.charCodeAt(s);return!(te(i)||(i&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 dt(this.input,this.offsetToSourcePos(this.state.lastTokEndLoc.index),this.state.start)}hasFollowingLineBreak(){return dt(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(u.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((r=null)=>{throw s.node=r,s});if(this.state.errors.length>e.errors.length){let r=this.state;return this.state=e,this.state.tokensLength=r.tokensLength,{node:i,error:r.errors[e.errors.length],thrown:!1,aborted:!1,failState:r}}return{node:i,error:null,thrown:!1,aborted:!1,failState:null}}catch(i){let r=this.state;if(this.state=e,i instanceof SyntaxError)return{node:null,error:i,thrown:!0,aborted:!1,failState:r};if(i===s)return{node:s.node,error:null,thrown:!1,aborted:!0,failState:r};throw i}}checkExpressionErrors(t,e){if(!t)return!1;let{shorthandAssignLoc:s,doubleProtoLoc:i,privateKeyLoc:r,optionalParametersLoc:a}=t,n=!!s||!!i||!!a||!!r;if(!e)return n;s!=null&&this.raise(u.InvalidCoverInitializedName,s),i!=null&&this.raise(u.DuplicateProto,i),r!=null&&this.raise(u.UnexpectedPrivateField,r),a!=null&&this.unexpected(a)}isLiteralPropertyName(){return rt(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 r=this.scope,a=this.getScopeHandler();this.scope=new a(this,t);let n=this.prodParam;this.prodParam=new Qs;let o=this.classScope;this.classScope=new Js(this);let p=this.expressionScope;return this.expressionScope=new Ws(this),()=>{this.state.labels=e,this.exportedIdentifiers=s,this.inModule=i,this.scope=r,this.prodParam=n,this.classScope=o,this.expressionScope=p}}enterInitialScopes(){let t=0;this.inModule&&(t|=2),this.scope.enter(1),this.prodParam.enter(t)}checkDestructuringPrivate(t){let{privateKeyLoc:e}=t;e!==null&&this.expectPlugin("destructuringPrivate",e)}},be=class{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null}},Ee=class{constructor(t,e,s){this.type="",this.start=e,this.end=0,this.loc=new x(s),(t==null?void 0:t.optionFlags)&64&&(this.range=[e,0]),t!=null&&t.filename&&(this.loc.filename=t.filename)}},Ve=Ee.prototype;Ve.__clone=function(){let t=new Ee(void 0,this.start,this.loc.start),e=Object.keys(this);for(let s=0,i=e.length;s<i;s++){let r=e[s];r!=="leadingComments"&&r!=="trailingComments"&&r!=="innerComments"&&(t[r]=this[r])}return t};function ei(t){return $(t)}function $(t){let{type:e,start:s,end:i,loc:r,range:a,extra:n,name:o}=t,p=Object.create(Ve);return p.type=e,p.start=s,p.end=i,p.loc=r,p.range=a,p.extra=n,p.name=o,e==="Placeholder"&&(p.expectedNode=t.expectedNode),p}function ti(t){let{type:e,start:s,end:i,loc:r,range:a,extra:n}=t;if(e==="Placeholder")return ei(t);let o=Object.create(Ve);return o.type=e,o.start=s,o.end=i,o.loc=r,o.range=a,t.raw!==void 0?o.raw=t.raw:o.extra=n,o.value=t.value,o}var si=class extends Zs{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&64&&(t.range[1]=s.index),this.optionFlags&2048&&this.processComment(t),t}resetStartLocation(t,e){t.start=e.index,t.loc.start=e,this.optionFlags&64&&(t.range[0]=e.index)}resetEndLocation(t,e=this.state.lastTokEndLoc){t.end=e.index,t.loc.end=e,this.optionFlags&64&&(t.range[1]=e.index)}resetStartLocationFromNode(t,e){this.resetStartLocation(t,e.loc.start)}},ii=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),E=H`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:({reservedType:t})=>`Cannot overwrite reserved type ${t}.`,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:({memberName:t,enumName:e})=>`Boolean enum members need to be initialized. Use either \`${t} = true,\` or \`${t} = false,\` in enum \`${e}\`.`,EnumDuplicateMemberName:({memberName:t,enumName:e})=>`Enum member names need to be unique, but the name \`${t}\` has already been used before in enum \`${e}\`.`,EnumInconsistentMemberValues:({enumName:t})=>`Enum \`${t}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:t,enumName:e})=>`Enum type \`${t}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${e}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:t})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${t}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:t,memberName:e,explicitType:s})=>`Enum \`${t}\` has type \`${s}\`, so the initializer of \`${e}\` needs to be a ${s} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:t,memberName:e})=>`Symbol enum members cannot be initialized. Use \`${e},\` in enum \`${t}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:t,memberName:e})=>`The enum member initializer for \`${e}\` needs to be a literal (either a boolean, number, or string) in enum \`${t}\`.`,EnumInvalidMemberName:({enumName:t,memberName:e,suggestion:s})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${e}\`, consider using \`${s}\`, in enum \`${t}\`.`,EnumNumberMemberNotInitialized:({enumName:t,memberName:e})=>`Number enum members need to be initialized, e.g. \`${e} = 1\` in enum \`${t}\`.`,EnumStringMemberInconsistentlyInitialized:({enumName:t})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${t}\`.`,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:({reservedType:t})=>`Unexpected reserved type ${t}.`,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:({unsupportedExportKind:t,suggestion:e})=>`\`declare export ${t}\` is not supported. Use \`${e}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function ri(t){return t.type==="DeclareExportAllDeclaration"||t.type==="DeclareExportDeclaration"&&(!t.declaration||t.declaration.type!=="TypeAlias"&&t.declaration.type!=="InterfaceDeclaration")}function gt(t){return t.importKind==="type"||t.importKind==="typeof"}var ai={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"};function ni(t,e){let s=[],i=[];for(let r=0;r<t.length;r++)(e(t[r],r,t)?s:i).push(t[r]);return[s,i]}var oi=/\*?\s*@((?:no)?flow)\b/,hi=t=>class extends t{constructor(...e){super(...e),this.flowPragma=void 0}getScopeHandler(){return Bs}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=oi.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(),r=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(),r.typeAnnotation=this.finishNode(i,"FunctionTypeAnnotation"),s.typeAnnotation=this.finishNode(r,"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);this.unexpected()}flowParseDeclareVariable(e){return this.next(),e.id=this.flowParseTypeAnnotatableIdentifier(!0),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 n=this.startNode();this.match(83)?(this.next(),!this.isContextual(130)&&!this.match(87)&&this.raise(E.InvalidNonTypeImportInDeclareModule,this.state.lastTokStartLoc),super.parseImport(n)):(this.expectContextual(125,E.UnsupportedStatementInDeclareModule),n=this.flowParseDeclare(n,!0)),i.push(n)}this.scope.exit(),this.expect(8),this.finishNode(s,"BlockStatement");let r=null,a=!1;return i.forEach(n=>{ri(n)?(r==="CommonJS"&&this.raise(E.AmbiguousDeclareModuleKind,n),r="ES"):n.type==="DeclareModuleExports"&&(a&&this.raise(E.DuplicateDeclareModuleExports,n),r==="ES"&&this.raise(E.AmbiguousDeclareModuleKind,n),r="CommonJS",a=!0)}),e.kind=r||"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:ai[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.type="ExportDeclaration",e.default=!1,delete e.exportKind),e.type="Declare"+e.type,e;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 s.type="DeclareTypeAlias",s}flowParseDeclareOpaqueType(e){this.next();let s=this.flowParseOpaqueType(e,!0);return s.type="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){ii.has(e)&&this.raise(i?E.AssignReservedType:E.UnexpectedReservedType,s,{reservedType:e})}flowParseRestrictedIdentifier(e,s){return this.checkReservedType(this.state.value,this.state.startLoc,s),this.parseIdentifier(e)}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")}flowParseTypeParameter(e=!1){let s=this.state.startLoc,i=this.startNode(),r=this.flowParseVariance(),a=this.flowParseTypeAnnotatableIdentifier();return i.name=a.name,i.variance=r,i.bound=a.typeAnnotation,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 r=this.flowParseTypeParameter(i);s.params.push(r),r.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()!==k.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()===k.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(e,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){if(this.reScan_lt()!==47)return;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:r,allowInexact:a}){let n=this.state.inType;this.state.inType=!0;let o=this.startNode();o.callProperties=[],o.properties=[],o.indexers=[],o.internalSlots=[];let p,h,d=!1;for(s&&this.match(6)?(this.expect(6),p=9,h=!0):(this.expect(5),p=8,h=!1),o.exact=h;!this.match(p);){let A=!1,T=null,N=null,L=this.startNode();if(r&&this.isContextual(118)){let B=this.lookahead();B.type!==14&&B.type!==17&&(this.next(),T=this.state.startLoc,e=!1)}if(e&&this.isContextual(106)){let B=this.lookahead();B.type!==14&&B.type!==17&&(this.next(),A=!0)}let F=this.flowParseVariance();if(this.eat(0))T!=null&&this.unexpected(T),this.eat(0)?(F&&this.unexpected(F.loc.start),o.internalSlots.push(this.flowParseObjectTypeInternalSlot(L,A))):o.indexers.push(this.flowParseObjectTypeIndexer(L,A,F));else if(this.match(10)||this.match(47))T!=null&&this.unexpected(T),F&&this.unexpected(F.loc.start),o.callProperties.push(this.flowParseObjectTypeCallProperty(L,A));else{let B="init";if(this.isContextual(99)||this.isContextual(104)){let Ke=this.lookahead();rt(Ke.type)&&(B=this.state.value,this.next())}let j=this.flowParseObjectTypeProperty(L,A,T,F,B,i,a??!h);j===null?(d=!0,N=this.state.lastTokStartLoc):o.properties.push(j)}this.flowObjectTypeSemicolon(),N&&!this.match(8)&&!this.match(9)&&this.raise(E.UnexpectedExplicitInexactInObject,N)}this.expect(p),i&&(o.inexact=d);let y=this.finishNode(o,"ObjectTypeAnnotation");return this.state.inType=n,y}flowParseObjectTypeProperty(e,s,i,r,a,n,o){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(n?o||this.raise(E.InexactInsideExact,this.state.lastTokStartLoc):this.raise(E.InexactInsideNonObject,this.state.lastTokStartLoc),r&&this.raise(E.InexactVariance,r),null):(n||this.raise(E.UnexpectedSpreadType,this.state.lastTokStartLoc),i!=null&&this.unexpected(i),r&&this.raise(E.SpreadVariance,r),e.argument=this.flowParseType(),this.finishNode(e,"ObjectTypeSpreadProperty"));{e.key=this.flowParseObjectPropertyKey(),e.static=s,e.proto=i!=null,e.kind=a;let p=!1;return this.match(47)||this.match(10)?(e.method=!0,i!=null&&this.unexpected(i),r&&this.unexpected(r.loc.start),e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start)),(a==="get"||a==="set")&&this.flowCheckGetterSetterParams(e),!n&&e.key.name==="constructor"&&e.value.this&&this.raise(E.ThisParamBannedInConstructor,e.value.this)):(a!=="init"&&this.unexpected(),e.method=!1,this.eat(17)&&(p=!0),e.value=this.flowParseTypeInitialiser(),e.variance=r),e.optional=p,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"?u.BadGetterArity:u.BadSetterArity,e),e.kind==="set"&&e.value.rest&&this.raise(u.BadSetterRestParameter,e)}flowObjectTypeSemicolon(){!this.eat(13)&&!this.eat(12)&&!this.match(8)&&!this.match(9)&&this.unexpected()}flowParseQualifiedTypeIdentifier(e,s){e!=null||(e=this.state.startLoc);let i=s||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){let r=this.startNodeAt(e);r.qualification=i,r.id=this.flowParseRestrictedIdentifier(!0),i=this.finishNode(r,"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,r=null,a=this.startNode(),n=this.lookahead(),o=this.state.type===78;return n.type===14||n.type===17?(o&&!e&&this.raise(E.ThisParamMustBeFirst,a),s=this.parseIdentifier(o),this.eat(17)&&(i=!0,o&&this.raise(E.ThisParamMayNotBeOptional,a)),r=this.flowParseTypeInitialiser()):r=this.flowParseType(),a.name=s,a.optional=i,a.typeAnnotation=r,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,r,a=!1,n=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,r=this.flowParseTupleType(),this.state.noAnonFunctionType=n,r;case 47:{let o=this.startNode();return o.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),i=this.flowParseFunctionTypeParams(),o.params=i.params,o.rest=i.rest,o.this=i._this,this.expect(11),this.expect(19),o.returnType=this.flowParseType(),this.finishNode(o,"FunctionTypeAnnotation")}case 10:{let o=this.startNode();if(this.next(),!this.match(11)&&!this.match(21))if(D(this.state.type)||this.match(78)){let p=this.lookahead().type;a=p!==17&&p!==14}else a=!0;if(a){if(this.state.noAnonFunctionType=!1,r=this.flowParseType(),this.state.noAnonFunctionType=n,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&this.lookahead().type===19))return this.expect(11),r;this.eat(12)}return r?i=this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(r)]):i=this.flowParseFunctionTypeParams(),o.params=i.params,o.rest=i.rest,o.this=i._this,this.expect(11),this.expect(19),o.returnType=this.flowParseType(),o.typeParameters=null,this.finishNode(o,"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)}this.unexpected();return;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(Be(this.state.type)){let o=W(this.state.type);return this.next(),super.createIdentifier(s,o)}else if(D(this.state.type))return this.isContextual(129)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(e,s,this.parseIdentifier())}this.unexpected()}flowParsePostfixType(){let e=this.state.startLoc,s=this.flowParsePrimaryType(),i=!1;for(;(this.match(0)||this.match(18))&&!this.canInsertSemicolon();){let r=this.startNodeAt(e),a=this.eat(18);i=i||a,this.expect(0),!a&&this.match(3)?(r.elementType=s,this.next(),s=this.finishNode(r,"ArrayTypeAnnotation")):(r.objectType=s,r.indexType=this.flowParseType(),this.expect(3),i?(r.optional=a,s=this.finishNode(r,"OptionalIndexedAccessType")):s=this.finishNode(r,"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(e){let s=e?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(14)&&(s.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(s)),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 r=this.startNode();[r.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),e.returnType=r.typeAnnotation?this.finishNode(r,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(e,s,i)}parseStatementLike(e){if(this.state.strict&&this.isContextual(129)){let i=this.lookahead();if(U(i.type)){let r=this.startNode();return this.next(),this.flowParseInterface(r)}}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)||D(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(e)}else if(D(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||at(e)?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){let{type:e}=this.state;return e===126||at(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 y=this.lookaheadCharCode();if(y===44||y===61||y===58||y===41)return this.setOptionalParametersError(i),e}this.expect(17);let r=this.state.clone(),a=this.state.noArrowAt,n=this.startNodeAt(s),{consequent:o,failed:p}=this.tryParseConditionalConsequent(),[h,d]=this.getArrowLikeExpressions(o);if(p||d.length>0){let y=[...a];if(d.length>0){this.state=r,this.state.noArrowAt=y;for(let A=0;A<d.length;A++)y.push(d[A].start);({consequent:o,failed:p}=this.tryParseConditionalConsequent()),[h,d]=this.getArrowLikeExpressions(o)}p&&h.length>1&&this.raise(E.AmbiguousConditionalArrow,r.startLoc),p&&h.length===1&&(this.state=r,y.push(h[0].start),this.state.noArrowAt=y,{consequent:o,failed:p}=this.tryParseConditionalConsequent())}return this.getArrowLikeExpressions(o,!0),this.state.noArrowAt=a,this.expect(14),n.test=e,n.consequent=o,n.alternate=this.forwardNoArrowParamsConversionAt(n,()=>this.parseMaybeAssign(void 0,void 0)),this.finishNode(n,"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],r=[];for(;i.length!==0;){let a=i.pop();a.type==="ArrowFunctionExpression"&&a.body.type!=="BlockStatement"?(a.typeParameters||!a.returnType?this.finishArrowValidation(a):r.push(a),i.push(a.body)):a.type==="ConditionalExpression"&&(i.push(a.consequent),i.push(a.alternate))}return s?(r.forEach(a=>this.finishArrowValidation(a)),[r,[]]):ni(r,a=>a.params.every(n=>this.isAssignable(n,!0)))}finishArrowValidation(e){var s;this.toAssignableList(e.params,(s=e.extra)==null?void 0:s.trailingCommaLoc,!1),this.scope.enter(6),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 r=this.startNodeAt(s);return r.expression=i,r.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(r,"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:r}=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,r):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(u.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):ks(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 r=0;r<e.length;r++){let a=e[r];(a==null?void 0:a.type)==="TypeCastExpression"&&(e[r]=this.typeCastToParameter(a))}super.toAssignableList(e,s,i)}toReferencedList(e,s){for(let r=0;r<e.length;r++){var i;let a=e[r];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,r){let a=super.parseArrayLike(e,s,i,r);return s&&!this.state.maybeInArrowParameters&&this.toReferencedList(a.elements),a}isValidLVal(e,s,i){return e==="TypeCastExpression"||super.isValidLVal(e,s,i)}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,r,a,n){if(s.variance&&this.unexpected(s.variance.loc.start),delete s.variance,this.match(47)&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(e,s,i,r,a,n),s.params&&a){let o=s.params;o.length>0&&this.isThisParam(o[0])&&this.raise(E.ThisParamBannedInConstructor,s)}else if(s.type==="MethodDefinition"&&a&&s.value.params){let o=s.value.params;o.length>0&&this.isThisParam(o[0])&&this.raise(E.ThisParamBannedInConstructor,s)}}pushClassPrivateMethod(e,s,i,r){s.variance&&this.unexpected(s.variance.loc.start),delete s.variance,this.match(47)&&(s.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(e,s,i,r)}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,r,a,n,o){e.variance&&this.unexpected(e.variance.loc.start),delete e.variance;let p;this.match(47)&&!n&&(p=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());let h=super.parseObjPropValue(e,s,i,r,a,n,o);return p&&((h.value||h).typeParameters=p),h}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=gt(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,r){if(super.applyImportPhase(e,s,i,r),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,r,a){let n=e.imported,o=null;n.type==="Identifier"&&(n.name==="type"?o="type":n.name==="typeof"&&(o="typeof"));let p=!1;if(this.isContextual(93)&&!this.isLookaheadContextual("as")){let d=this.parseIdentifier(!0);o!==null&&!U(this.state.type)?(e.imported=d,e.importKind=o,e.local=$(d)):(e.imported=n,e.importKind=null,e.local=this.parseIdentifier())}else{if(o!==null&&U(this.state.type))e.imported=this.parseIdentifier(!0),e.importKind=o;else{if(s)throw this.raise(u.ImportBindingIsString,e,{importName:n.value});e.imported=n,e.importKind=null}this.eatContextual(93)?e.local=this.parseIdentifier():(p=!0,e.local=$(e.imported))}let h=gt(e);return i&&h&&this.raise(E.ImportTypeShorthandOnlyInPureImport,e),(i||h)&&this.checkReservedType(e.local.name,e.local.loc.start,!0),p&&!i&&!h&&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 r=null,a;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(r=this.state.clone(),a=this.tryParse(()=>super.parseMaybeAssign(e,s),r),!a.error)return a.node;let{context:p}=this.state,h=p[p.length-1];(h===k.j_oTag||h===k.j_expr)&&p.pop()}if((i=a)!=null&&i.error||this.match(47)){var n,o;r=r||this.state.clone();let p,h=this.tryParse(y=>{var A;p=this.flowParseTypeParameterDeclaration();let T=this.forwardNoArrowParamsConversionAt(p,()=>{let L=super.parseMaybeAssign(e,s);return this.resetStartLocationFromNode(L,p),L});(A=T.extra)!=null&&A.parenthesized&&y();let N=this.maybeUnwrapTypeCastExpression(T);return N.type!=="ArrowFunctionExpression"&&y(),N.typeParameters=p,this.resetStartLocationFromNode(N,p),T},r),d=null;if(h.node&&this.maybeUnwrapTypeCastExpression(h.node).type==="ArrowFunctionExpression"){if(!h.error&&!h.aborted)return h.node.async&&this.raise(E.UnexpectedTypeParameterBeforeAsyncArrowFunction,p),h.node;d=h.node}if((n=a)!=null&&n.node)return this.state=a.failState,a.node;if(d)return this.state=h.failState,d;throw(o=a)!=null&&o.thrown?a.error:h.thrown?h.error:this.raise(E.UnexpectedTokenAfterTypeParameter,p)}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 r=this.startNode();return[r.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=i,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),r});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,r=!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,r)}}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 r=this.startNodeAt(s);r.callee=e,r.arguments=super.parseCallExpressionArguments(11),e=this.finishNode(r,"CallExpression")}else if(e.type==="Identifier"&&e.name==="async"&&this.match(47)){let r=this.state.clone(),a=this.tryParse(o=>this.parseAsyncArrowWithTypeParameters(s)||o(),r);if(!a.error&&!a.aborted)return a.node;let n=this.tryParse(()=>super.parseSubscripts(e,s,i),r);if(n.node&&!n.error)return n.node;if(a.node)return this.state=a.failState,a.node;if(n.node)return this.state=n.failState,n.node;throw a.error||n.error}return super.parseSubscripts(e,s,i)}parseSubscript(e,s,i,r){if(this.match(18)&&this.isLookaheadToken_lt()){if(r.optionalChainMember=!0,i)return r.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(11),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 n=this.tryParse(()=>(a.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),a.arguments=super.parseCallExpressionArguments(11),r.optionalChainMember&&(a.optional=!1),this.finishCallExpression(a,r.optionalChainMember)));if(n.node)return n.error&&(this.state=n.failState),n.node}return super.parseSubscript(e,s,i,r)}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),r=this.input.charCodeAt(s+e+1);return i===58&&r===58?s+2:this.input.slice(s+e,s+e+12)==="flow-include"?s+12:i===58&&r!==58?s:!1}hasFlowCommentCompletion(){if(this.input.indexOf("*/",this.state.pos)===-1)throw this.raise(u.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=()=>this.match(12)||this.match(8);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:r}=s;r!==null&&r!==i&&this.flowEnumErrorInvalidMemberInitializer(e,s)}flowEnumMembers({enumName:e,explicitType:s}){let i=new Set,r={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]},a=!1;for(;!this.match(8);){if(this.eat(21)){a=!0;break}let n=this.startNode(),{id:o,init:p}=this.flowEnumMemberRaw(),h=o.name;if(h==="")continue;/^[a-z]/.test(h)&&this.raise(E.EnumInvalidMemberName,o,{memberName:h,suggestion:h[0].toUpperCase()+h.slice(1),enumName:e}),i.has(h)&&this.raise(E.EnumDuplicateMemberName,o,{memberName:h,enumName:e}),i.add(h);let d={enumName:e,explicitType:s,memberName:h};switch(n.id=o,p.type){case"boolean":{this.flowEnumCheckExplicitTypeMismatch(p.loc,d,"boolean"),n.init=p.value,r.booleanMembers.push(this.finishNode(n,"EnumBooleanMember"));break}case"number":{this.flowEnumCheckExplicitTypeMismatch(p.loc,d,"number"),n.init=p.value,r.numberMembers.push(this.finishNode(n,"EnumNumberMember"));break}case"string":{this.flowEnumCheckExplicitTypeMismatch(p.loc,d,"string"),n.init=p.value,r.stringMembers.push(this.finishNode(n,"EnumStringMember"));break}case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(p.loc,d);case"none":switch(s){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(p.loc,d);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(p.loc,d);break;default:r.defaultedMembers.push(this.finishNode(n,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:r,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 r of e)this.flowEnumErrorStringMemberInconsistentlyInitialized(r,{enumName:i});return s}else{for(let r of s)this.flowEnumErrorStringMemberInconsistentlyInitialized(r,{enumName:i});return e}}flowEnumParseExplicitType({enumName:e}){if(!this.eatContextual(102))return null;if(!D(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,r=s.loc.start,a=this.flowEnumParseExplicitType({enumName:i});this.expect(5);let{members:n,hasUnknownMembers:o}=this.flowEnumMembers({enumName:i,explicitType:a});switch(e.hasUnknownMembers=o,a){case"boolean":return e.explicitType=!0,e.members=n.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody");case"number":return e.explicitType=!0,e.members=n.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody");case"string":return e.explicitType=!0,e.members=this.flowEnumStringMembers(n.stringMembers,n.defaultedMembers,{enumName:i}),this.expect(8),this.finishNode(e,"EnumStringBody");case"symbol":return e.members=n.defaultedMembers,this.expect(8),this.finishNode(e,"EnumSymbolBody");default:{let p=()=>(e.members=[],this.expect(8),this.finishNode(e,"EnumStringBody"));e.explicitType=!1;let h=n.booleanMembers.length,d=n.numberMembers.length,y=n.stringMembers.length,A=n.defaultedMembers.length;if(!h&&!d&&!y&&!A)return p();if(!h&&!d)return e.members=this.flowEnumStringMembers(n.stringMembers,n.defaultedMembers,{enumName:i}),this.expect(8),this.finishNode(e,"EnumStringBody");if(!d&&!y&&h>=A){for(let T of n.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(T.loc.start,{enumName:i,memberName:T.id.name});return e.members=n.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody")}else if(!h&&!y&&d>=A){for(let T of n.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(T.loc.start,{enumName:i,memberName:T.id.name});return e.members=n.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody")}else return this.raise(E.EnumInconsistentMemberValues,r,{enumName:i}),p()}}}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}},Z=H`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:t})=>`Expected corresponding JSX closing tag for <${t}>.`,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:({unexpected:t,HTMLEntity:e})=>`Unexpected token \`${t}\`. Did you mean \`${e}\` or \`{'${t}'}\`?`,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 G(t){return t?t.type==="JSXOpeningFragment"||t.type==="JSXClosingFragment":!1}function ie(t){if(t.type==="JSXIdentifier")return t.name;if(t.type==="JSXNamespacedName")return t.namespace.name+":"+t.name.name;if(t.type==="JSXMemberExpression")return ie(t.object)+"."+ie(t.property);throw new Error("Node had unexpected type: "+t.type)}var pi=t=>class extends t{jsxReadToken(){let e="",s=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(Z.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:se(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?`
6
+ `:`\r
7
+ `):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(u.UnterminatedString,this.state.startLoc);let r=this.input.charCodeAt(this.state.pos);if(r===e)break;r===38?(s+=this.input.slice(i,this.state.pos),s+=this.jsxReadEntity(),i=this.state.pos):se(r)?(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){this.input.slice(e,this.state.pos);let r;++this.state.pos}}return this.state.pos=e,"&"}jsxReadWord(){let e,s=this.state.pos;do e=this.input.charCodeAt(++this.state.pos);while(te(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:Be(this.state.type)?e.name=W(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(k.brace),this.next(),e=this.jsxParseExpressionContainer(e,k.j_oTag),e.expression.type==="JSXEmptyExpression"&&this.raise(Z.AttributeIsEmpty,e),e;case 143:case 134:return this.parseExprAtom();default:throw this.raise(Z.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(k.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(k.brace),this.next(),this.expect(21),e.argument=this.parseMaybeAssignAllowIn(),this.setContext(k.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=[],r=this.jsxParseOpeningElementAt(e),a=null;if(!r.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 n=this.startNode();this.setContext(k.brace),this.next(),this.match(21)?i.push(this.jsxParseSpreadChild(n)):i.push(this.jsxParseExpressionContainer(n,k.j_expr));break}default:this.unexpected()}G(r)&&!G(a)&&a!==null?this.raise(Z.MissingClosingTagFragment,a):!G(r)&&G(a)?this.raise(Z.MissingClosingTagElement,a,{openingTagName:ie(r.name)}):!G(r)&&!G(a)&&ie(a.name)!==ie(r.name)&&this.raise(Z.MissingClosingTagElement,a,{openingTagName:ie(r.name)})}if(G(r)?(s.openingFragment=r,s.closingFragment=a):(s.openingElement=r,s.closingElement=a),s.children=i,this.match(47))throw this.raise(Z.UnwrappedAdjacentJSXElements,this.state.startLoc);return G(r)?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===k.j_expr){this.jsxReadToken();return}if(s===k.j_oTag||s===k.j_cTag){if(q(e)){this.jsxReadWord();return}if(e===62){++this.state.pos,this.finishToken(144);return}if((e===34||e===39)&&s===k.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,k.j_cTag),this.state.canStartJSXElement=!1;else if(i===143)s.push(k.j_oTag);else if(i===144){let r=s[s.length-1];r===k.j_oTag&&e===56||r===k.j_cTag?(s.pop(),this.state.canStartJSXElement=s[s.length-1]===k.j_expr):(this.setContext(k.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=ms(i)}},li=class extends je{constructor(...t){super(...t),this.tsNames=new Map}},ui=class extends Ue{constructor(...t){super(...t),this.importsStack=[]}createScope(t){return this.importsStack.push(new Set),new li(t)}enter(t){t===256&&this.importsStack.push(new Set),super.enter(t)}exit(){let t=super.exit();return t===256&&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(u.VarRedeclaration,s,{identifierName:t}),this.importsStack[this.importsStack.length-1].add(t);return}let i=this.currentScope(),r=i.tsNames.get(t)||0;if(e&1024){this.maybeExportDefined(i,t),i.tsNames.set(t,r|16);return}super.declareName(t,e,s),e&2&&(e&1||(this.checkRedeclarationInScope(i,t,e,s),this.maybeExportDefined(i,t)),r=r|1),e&256&&(r=r|2),e&512&&(r=r|4),e&128&&(r=r|8),r&&i.tsNames.set(t,r)}isRedeclaredInScope(t,e,s){let i=t.tsNames.get(e);if((i&2)>0){if(s&256){let r=!!(s&512),a=(i&4)>0;return r!==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 r=this.scopeStack[i].tsNames.get(e);if((r&1)>0||(r&16)>0)return}super.checkLocalExport(t)}},Tt=t=>t.type==="ParenthesizedExpression"?Tt(t.expression):t,ci=class extends si{toAssignable(t,e=!1){var s,i;let r;switch((t.type==="ParenthesizedExpression"||(s=t.extra)!=null&&s.parenthesized)&&(r=Tt(t),e?r.type==="Identifier"?this.expressionScope.recordArrowParameterBindingError(u.InvalidParenthesizedAssignment,t):r.type!=="MemberExpression"&&!this.isOptionalMemberExpression(r)&&this.raise(u.InvalidParenthesizedAssignment,t):this.raise(u.InvalidParenthesizedAssignment,t)),t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":t.type="ObjectPattern";for(let n=0,o=t.properties.length,p=o-1;n<o;n++){var a;let h=t.properties[n],d=n===p;this.toAssignableObjectExpressionProp(h,d,e),d&&h.type==="RestElement"&&(a=t.extra)!=null&&a.trailingCommaLoc&&this.raise(u.RestTrailingComma,t.extra.trailingCommaLoc)}break;case"ObjectProperty":{let{key:n,value:o}=t;this.isPrivateName(n)&&this.classScope.usePrivateName(this.getPrivateNameSV(n),n.loc.start),this.toAssignable(o,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":t.type="ArrayPattern",this.toAssignableList(t.elements,(i=t.extra)==null?void 0:i.trailingCommaLoc,e);break;case"AssignmentExpression":t.operator!=="="&&this.raise(u.MissingEqInAssignment,t.left.loc.end),t.type="AssignmentPattern",delete t.operator,this.toAssignable(t.left,e);break;case"ParenthesizedExpression":this.toAssignable(r,e);break}}toAssignableObjectExpressionProp(t,e,s){if(t.type==="ObjectMethod")this.raise(t.kind==="get"||t.kind==="set"?u.PatternHasAccessor:u.PatternHasMethod,t.key);else if(t.type==="SpreadElement"){t.type="RestElement";let i=t.argument;this.checkToRestConversion(i,!1),this.toAssignable(i,s),e||this.raise(u.RestTrailingComma,t)}else this.toAssignable(t,s)}toAssignableList(t,e,s){let i=t.length-1;for(let r=0;r<=i;r++){let a=t[r];if(a){if(a.type==="SpreadElement"){a.type="RestElement";let n=a.argument;this.checkToRestConversion(n,!0),this.toAssignable(n,s)}else this.toAssignable(a,s);a.type==="RestElement"&&(r<i?this.raise(u.RestTrailingComma,a):e&&this.raise(u.RestTrailingComma,e))}}}isAssignable(t,e){switch(t.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":return!0;case"ObjectExpression":{let s=t.properties.length-1;return t.properties.every((i,r)=>i.type!=="ObjectMethod"&&(r===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==null?void 0: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();return this.next(),t.argument=this.parseBindingAtom(),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)}return this.parseIdentifier()}parseBindingList(t,e,s){let i=s&1,r=[],a=!0;for(;!this.eat(t);)if(a?a=!1:this.expect(12),i&&this.match(12))r.push(null);else{if(this.eat(t))break;if(this.match(21)){let n=this.parseRestBinding();if((this.hasPlugin("flow")||s&2)&&(n=this.parseFunctionParamType(n)),r.push(n),!this.checkCommaAfterRest(e)){this.expect(t);break}}else{let n=[];for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(u.UnsupportedParameterDecorator,this.state.startLoc);this.match(26);)n.push(this.parseDecorator());r.push(this.parseAssignableListItem(s,n))}}return r}parseBindingRestProperty(t){return this.next(),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)}parseAssignableListItem(t,e){let s=this.parseMaybeDefault();(this.hasPlugin("flow")||t&2)&&this.parseFunctionParamType(s);let i=this.parseMaybeDefault(s.loc.start,s);return e.length&&(s.decorators=e),i}parseFunctionParamType(t){return t}parseMaybeDefault(t,e){var s;if(t!=null||(t=this.state.startLoc),e=(s=e)!=null?s:this.parseBindingAtom(),!this.eat(29))return e;let i=this.startNodeAt(t);return i.left=e,i.right=this.parseMaybeAssignAllowIn(),this.finishNode(i,"AssignmentPattern")}isValidLVal(t,e,s){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"}return!1}isOptionalMemberExpression(t){return t.type==="OptionalMemberExpression"}checkLVal(t,e,s=64,i=!1,r=!1,a=!1){var n;let o=t.type;if(this.isObjectMethod(t))return;let p=this.isOptionalMemberExpression(t);if(p||o==="MemberExpression"){p&&(this.expectPlugin("optionalChainingAssign",t.loc.start),e.type!=="AssignmentExpression"&&this.raise(u.InvalidLhsOptionalChaining,t,{ancestor:e})),s!==64&&this.raise(u.InvalidPropertyBindingPattern,t);return}if(o==="Identifier"){this.checkIdentifier(t,s,r);let{name:N}=t;i&&(i.has(N)?this.raise(u.ParamDupe,t):i.add(N));return}let h=this.isValidLVal(o,!(a||(n=t.extra)!=null&&n.parenthesized)&&e.type==="AssignmentExpression",s);if(h===!0)return;if(h===!1){let N=s===64?u.InvalidLhs:u.InvalidLhsBinding;this.raise(N,t,{ancestor:e});return}let d,y;typeof h=="string"?(d=h,y=o==="ParenthesizedExpression"):[d,y]=h;let A=o==="ArrayPattern"||o==="ObjectPattern"?{type:o}:e,T=t[d];if(Array.isArray(T))for(let N of T)N&&this.checkLVal(N,A,s,i,r,y);else T&&this.checkLVal(T,A,s,i,r,y)}checkIdentifier(t,e,s=!1){this.state.strict&&(s?ut(t.name,this.inModule):lt(t.name))&&(e===64?this.raise(u.StrictEvalArguments,t,{referenceName:t.name}):this.raise(u.StrictEvalArgumentsBinding,t,{bindingName:t.name})),e&8192&&t.name==="let"&&this.raise(u.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(u.InvalidRestAssignmentPattern,t)}}checkCommaAfterRest(t){return this.match(12)?(this.raise(this.lookaheadCharCode()===t?u.RestTrailingComma:u.ElementAfterRest,this.state.startLoc),!0):!1}};function di(t){if(t==null)throw new Error(`Unexpected ${t} value.`);return t}function bt(t){if(!t)throw new Error("Assert fail")}var g=H`typescript`({AbstractMethodHasImplementation:({methodName:t})=>`Method '${t}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:t})=>`Property '${t}' cannot have an initializer because it is marked abstract.`,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:({kind:t})=>`'declare' is not allowed in ${t}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:t})=>"Accessibility modifier already seen.",DuplicateModifier:({modifier:t})=>`Duplicate modifier: '${t}'.`,EmptyHeritageClauseType:({token:t})=>`'${t}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:({modifiers:t})=>`'${t[0]}' modifier cannot be used with '${t[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:t})=>`Index signatures cannot have an accessibility modifier ('${t}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidModifierOnTypeMember:({modifier:t})=>`'${t}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:t})=>`'${t}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:t})=>`'${t}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifiersOrder:({orderedModifiers:t})=>`'${t[0]}' modifier must precede '${t[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifer:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:t})=>`Private elements cannot have an accessibility modifier ('${t}').`,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:({typeParameterName:t})=>`Single type parameter ${t} should have a trailing comma. Example usage: <${t},>.`,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:({type:t})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${t}.`});function mi(t){switch(t){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}function Et(t){return t==="private"||t==="public"||t==="protected"}function fi(t){return t==="in"||t==="out"}var yi=t=>class extends t{constructor(...e){super(...e),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:g.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:g.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:g.InvalidModifierOnTypeParameter})}getScopeHandler(){return ui}tsIsIdentifier(){return D(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){if(!D(this.state.type)&&this.state.type!==58&&this.state.type!==75)return;let i=this.state.value;if(e.includes(i)){if(s&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return i}}tsParseModifiers({allowedModifiers:e,disallowedModifiers:s,stopOnStartOfClassStaticBlock:i,errorTemplate:r=g.InvalidModifierOnTypeMember},a){let n=(p,h,d,y)=>{h===d&&a[y]&&this.raise(g.InvalidModifiersOrder,p,{orderedModifiers:[d,y]})},o=(p,h,d,y)=>{(a[d]&&h===y||a[y]&&h===d)&&this.raise(g.IncompatibleModifiers,p,{modifiers:[d,y]})};for(;;){let{startLoc:p}=this.state,h=this.tsParseModifier(e.concat(s??[]),i);if(!h)break;Et(h)?a.accessibility?this.raise(g.DuplicateAccessibilityModifier,p,{modifier:h}):(n(p,h,h,"override"),n(p,h,h,"static"),n(p,h,h,"readonly"),a.accessibility=h):fi(h)?(a[h]&&this.raise(g.DuplicateModifier,p,{modifier:h}),a[h]=!0,n(p,h,"in","out")):(hasOwnProperty.call(a,h)?this.raise(g.DuplicateModifier,p,{modifier:h}):(n(p,h,"static","readonly"),n(p,h,"static","override"),n(p,h,"override","readonly"),n(p,h,"abstract","override"),o(p,h,"declare","override"),o(p,h,"static","abstract")),a[h]=!0),s!=null&&s.includes(h)&&this.raise(r,p,{modifier:h})}}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 di(this.tsParseDelimitedListWorker(e,s,!0,i))}tsParseDelimitedListWorker(e,s,i,r){let a=[],n=-1;for(;!this.tsIsListTerminator(e);){n=-1;let o=s();if(o==null)return;if(a.push(o),this.eat(12)){n=this.state.lastTokStartLoc.index;continue}if(this.tsIsListTerminator(e))break;i&&this.expect(12);return}return r&&(r.value=n),a}tsParseBracketedList(e,s,i,r,a){r||(i?this.expect(0):this.expect(47));let n=this.tsParseDelimitedList(e,s,a);return i?this.expect(3):this.expect(48),n}tsParseImportType(){let e=this.startNode();return this.expect(83),this.expect(10),this.match(134)?e.argument=this.parseStringLiteral(this.state.value):(this.raise(g.UnsupportedImportTypeArgument,this.state.startLoc),e.argument=super.parseExprAtom()),this.eat(12)&&!this.match(11)?(e.options=super.parseMaybeAssignAllowIn(),this.eat(12)):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")}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(g.EmptyTypeParameters,s),i.value!==-1&&this.addExtra(s,"trailingComma",i.value),this.finishNode(s,"TSTypeParameterDeclaration")}tsFillSignature(e,s){let i=e===19,r="parameters",a="typeAnnotation";s.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),s[r]=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(g.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(),D(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){this.eat(17)&&(e.optional=!0);let i=e;if(this.match(10)||this.match(47)){s&&this.raise(g.ReadonlyForMethodSignature,e);let r=i;r.kind&&this.match(47)&&this.raise(g.AccessorCannotHaveTypeParameters,this.state.curPosition()),this.tsFillSignature(14,r),this.tsParseTypeMemberSemicolon();let a="parameters",n="typeAnnotation";if(r.kind==="get")r[a].length>0&&(this.raise(u.BadGetterArity,this.state.curPosition()),this.isThisParam(r[a][0])&&this.raise(g.AccessorCannotDeclareThisParameter,this.state.curPosition()));else if(r.kind==="set"){if(r[a].length!==1)this.raise(u.BadSetterArity,this.state.curPosition());else{let o=r[a][0];this.isThisParam(o)&&this.raise(g.AccessorCannotDeclareThisParameter,this.state.curPosition()),o.type==="Identifier"&&o.optional&&this.raise(g.SetAccessorCannotHaveOptionalParameter,this.state.curPosition()),o.type==="RestElement"&&this.raise(g.SetAccessorCannotHaveRestParameter,this.state.curPosition())}r[n]&&this.raise(g.SetAccessorCannotHaveReturnType,r[n])}else r.kind="method";return this.finishNode(r,"TSMethodSignature")}else{let r=i;s&&(r.readonly=!0);let a=this.tsTryParseTypeAnnotation();return a&&(r.typeAnnotation=a),this.tsParseTypeMemberSemicolon(),this.finishNode(r,"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))}return this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},e),this.tsTryParseIndexSignature(e)||(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.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();s.name=this.tsParseTypeParameterName(),s.constraint=this.tsExpectThenParseType(58),e.typeParameter=this.finishNode(s,"TSTypeParameter")}return 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:r}=i;s&&r!=="TSRestType"&&r!=="TSOptionalType"&&!(r==="TSNamedTupleMember"&&i.optional)&&this.raise(g.OptionalTypeBeforeRequired,i),s||(s=r==="TSNamedTupleMember"&&i.optional||r==="TSOptionalType")}),this.finishNode(e,"TSTupleType")}tsParseTupleElementType(){let e=this.state.startLoc,s=this.eat(21),{startLoc:i}=this.state,r,a,n,o,p=U(this.state.type)?this.lookaheadCharCode():null;if(p===58)r=!0,n=!1,a=this.parseIdentifier(!0),this.expect(14),o=this.tsParseType();else if(p===63){n=!0;let h=this.state.value,d=this.tsParseNonArrayType();this.lookaheadCharCode()===58?(r=!0,a=this.createIdentifier(this.startNodeAt(i),h),this.expect(17),this.expect(14),o=this.tsParseType()):(r=!1,o=d,this.expect(17))}else o=this.tsParseType(),n=this.eat(17),r=this.eat(14);if(r){let h;a?(h=this.startNodeAt(i),h.optional=n,h.label=a,h.elementType=o,this.eat(17)&&(h.optional=!0,this.raise(g.TupleOptionalAfterType,this.state.lastTokStartLoc))):(h=this.startNodeAt(i),h.optional=n,this.raise(g.InvalidTupleMemberLabel,o),h.label=o,h.elementType=this.tsParseType()),o=this.finishNode(h,"TSNamedTupleMember")}else if(n){let h=this.startNodeAt(i);h.typeAnnotation=o,o=this.finishNode(h,"TSOptionalType")}if(s){let h=this.startNodeAt(e);h.typeAnnotation=o,o=this.finishNode(h,"TSRestType")}return o}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(D(e)||e===88||e===84){let s=e===88?"TSVoidKeyword":e===84?"TSNullKeyword":mi(this.state.value);if(s!==void 0&&this.lookaheadCharCode()!==46){let i=this.startNode();return this.next(),this.finishNode(i,s)}return this.tsParseTypeReference()}}}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(g.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 gs(this.state.type)&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(115)?this.tsParseInferType():this.tsInAllowConditionalTypesContext(()=>this.tsParseArrayTypeOrHigher())}tsParseUnionOrIntersectionType(e,s,i){let r=this.startNode(),a=this.eat(i),n=[];do n.push(s());while(this.eat(i));return n.length===1&&!a?n[0]:(r.types=n,this.finishNode(r,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(D(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(),r=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(r&&this.match(78)){let o=this.tsParseThisTypeOrThisTypePredicate();return o.type==="TSThisType"?(i.parameterName=o,i.asserts=!0,i.typeAnnotation=null,o=this.finishNode(i,"TSTypePredicate")):(this.resetStartLocationFromNode(o,i),o.asserts=!0),s.typeAnnotation=o,this.finishNode(s,"TSTypeAnnotation")}let a=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!a)return r?(i.parameterName=this.parseIdentifier(),i.asserts=r,i.typeAnnotation=null,s.typeAnnotation=this.finishNode(i,"TSTypePredicate"),this.finishNode(s,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,s);let n=this.tsParseTypeAnnotation(!1);return i.parameterName=a,i.typeAnnotation=n,i.asserts=r,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(),!D(this.state.type)&&!this.match(78)?!1:(e&&this.raise(u.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(){bt(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.lookahead().type===77}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(g.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 r=this.startNode();return r.expression=this.tsParseEntityName(3),this.match(47)&&(r.typeParameters=this.tsParseTypeArguments()),this.finishNode(r,"TSExpressionWithTypeArguments")});return i.length||this.raise(g.EmptyHeritageClauseType,s,{token:e}),i}tsParseInterfaceDeclaration(e,s={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(129),s.declare&&(e.declare=!0),D(this.state.type)?(e.id=this.parseIdentifier(),this.checkIdentifier(e.id,130)):(e.id=null,this.raise(g.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.lookahead().type!==16){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()!==k.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(256),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(256),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 r=this.tsParseModuleReference();return e.importKind==="type"&&r.type!=="TSExternalModuleReference"&&this.raise(g.ImportAliasHasImportType,r),e.moduleReference=r,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,i;return this.isContextual(100)&&(s=74,i="let"),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 75:case 74:return!this.match(75)||!this.isLookaheadContextual("enum")?(e.declare=!0,this.parseVarStatement(e,i||this.state.value,!0)):(this.expect(75),this.tsParseEnumDeclaration(e,{const:!0,declare:!0}));case 129:{let r=this.tsParseInterfaceDeclaration(e,{declare:!0});if(r)return r}default:if(D(s))return this.tsParseDeclaration(e,this.state.value,!0,null)}})}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0,null)}tsParseExpressionStatement(e,s,i){switch(s.name){case"declare":{let r=this.tsTryParseDeclare(e);return r&&(r.declare=!0),r}case"global":if(this.match(5)){this.scope.enter(256),this.prodParam.enter(0);let r=e;return r.kind="global",e.global=!0,r.id=s,r.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(r,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(e,s.name,!1,i)}}tsParseDeclaration(e,s,i,r){switch(s){case"abstract":if(this.tsCheckLineTerminator(i)&&(this.match(80)||D(this.state.type)))return this.tsParseAbstractDeclaration(e,r);break;case"module":if(this.tsCheckLineTerminator(i)){if(this.match(134))return this.tsParseAmbientExternalModuleDeclaration(e);if(D(this.state.type))return e.kind="module",this.tsParseModuleOrNamespaceDeclaration(e)}break;case"namespace":if(this.tsCheckLineTerminator(i)&&D(this.state.type))return e.kind="namespace",this.tsParseModuleOrNamespaceDeclaration(e);break;case"type":if(this.tsCheckLineTerminator(i)&&D(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 r=this.startNodeAt(e);return r.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(r),r.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),r});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(g.EmptyTypeArguments,e):!this.state.inType&&this.curContext()===k.brace&&this.reScan_lt_gt(),this.expect(48),this.finishNode(e,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return Ts(this.state.type)}isExportDefaultSpecifier(){return this.tsIsDeclarationStart()?!1:super.isExportDefaultSpecifier()}parseAssignableListItem(e,s){let i=this.state.startLoc,r={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},r);let a=r.accessibility,n=r.override,o=r.readonly;!(e&4)&&(a||o||n)&&this.raise(g.UnexpectedParameterModifier,i);let p=this.parseMaybeDefault();e&2&&this.parseFunctionParamType(p);let h=this.parseMaybeDefault(p.loc.start,p);if(a||o||n){let d=this.startNodeAt(i);return s.length&&(d.decorators=s),a&&(d.accessibility=a),o&&(d.readonly=o),n&&(d.override=n),h.type!=="Identifier"&&h.type!=="AssignmentPattern"&&this.raise(g.UnsupportedParameterPropertyKind,d),d.parameter=h,this.finishNode(d,"TSParameterProperty")}return s.length&&(p.decorators=s),h}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(g.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 r=s==="FunctionDeclaration"?"TSDeclareFunction":s==="ClassMethod"||s==="ClassPrivateMethod"?"TSDeclareMethod":void 0;return r&&!this.match(5)&&this.isLineTerminator()?this.finishNode(e,r):r==="TSDeclareFunction"&&this.state.isAmbientContext&&(this.raise(g.DeclareFunctionHasImplementation,e),e.declare)?super.parseFunctionBodyAndFinish(e,r,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==null?void 0:s.type)==="TSTypeCastExpression"&&this.raise(g.UnexpectedTypeAnnotation,s.typeAnnotation)})}toReferencedList(e,s){return this.tsCheckForInvalidTypeCasts(e),e}parseArrayLike(e,s,i,r){let a=super.parseArrayLike(e,s,i,r);return a.type==="ArrayExpression"&&this.tsCheckForInvalidTypeCasts(a.elements),a}parseSubscript(e,s,i,r){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();let n=this.startNodeAt(s);return n.expression=e,this.finishNode(n,"TSNonNullExpression")}let a=!1;if(this.match(18)&&this.lookaheadCharCode()===60){if(i)return r.stop=!0,e;r.optionalChainMember=a=!0,this.next()}if(this.match(47)||this.match(51)){let n,o=this.tsTryParseAndCatch(()=>{if(!i&&this.atPossibleAsyncArrow(e)){let y=this.tsTryParseGenericAsyncArrowFunction(s);if(y)return y}let p=this.tsParseTypeArgumentsInExpression();if(!p)return;if(a&&!this.match(10)){n=this.state.curPosition();return}if(xe(this.state.type)){let y=super.parseTaggedTemplateExpression(e,s,r);return y.typeParameters=p,y}if(!i&&this.eat(10)){let y=this.startNodeAt(s);return y.callee=e,y.arguments=this.parseCallExpressionArguments(11),this.tsCheckForInvalidTypeCasts(y.arguments),y.typeParameters=p,r.optionalChainMember&&(y.optional=a),this.finishCallExpression(y,r.optionalChainMember)}let h=this.state.type;if(h===48||h===52||h!==10&&Le(h)&&!this.hasPrecedingLineBreak())return;let d=this.startNodeAt(s);return d.expression=e,d.typeParameters=p,this.finishNode(d,"TSInstantiationExpression")});if(n&&this.unexpected(n,10),o)return o.type==="TSInstantiationExpression"&&(this.match(16)||this.match(18)&&this.lookaheadCharCode()!==40)&&this.raise(g.InvalidPropertyAccessAfterInstantiationExpression,this.state.startLoc),o}return super.parseSubscript(e,s,i,r)}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 r;if(ye(58)>i&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(r=this.isContextual(120)))){let a=this.startNodeAt(s);return a.expression=e,a.typeAnnotation=this.tsInType(()=>(this.next(),this.match(75)?(r&&this.raise(u.UnexpectedKeyword,this.state.startLoc,{keyword:"const"}),this.tsParseTypeReference()):this.tsParseType())),this.finishNode(a,r?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(a,s,i)}return super.parseExprOp(e,s,i)}checkReservedWord(e,s,i,r){this.state.isAmbientContext||super.checkReservedWord(e,s,i,r)}checkImportReflection(e){super.checkImportReflection(e),e.module&&e.importKind!=="value"&&this.raise(g.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,r){super.applyImportPhase(e,s,i,r),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(D(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(g.TypeImportCannotSpecifyDefaultAndNamed,s),s}parseExport(e,s){if(this.match(83)){let i=e;this.next();let r=null;return this.isContextual(130)&&this.isPotentialImportPhase(!1)?r=this.parseMaybeImportPhase(i,!1):i.importKind="value",this.tsParseImportEqualsDeclaration(i,r,!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.lookahead().type===80}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:r}=this.state,a=super.parseVarStatement(e,s,i||r);if(!r)return a;for(let{id:n,init:o}of a.declarations)o&&(s!=="const"||n.typeAnnotation?this.raise(g.InitializerNotAllowedInAmbientContext,o):Pi(o,this.hasPlugin("estree"))||this.raise(g.ConstInitializerMustBeStringOrNumericLiteralOrLiteralEnumReference,o));return a}parseStatementContent(e,s){if(this.match(75)&&this.isLookaheadContextual("enum")){let i=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(i,{const:!0})}if(this.isContextual(126))return this.tsParseEnumDeclaration(this.startNode());if(this.isContextual(129)){let i=this.tsParseInterfaceDeclaration(this.startNode());if(i)return i}return super.parseStatementContent(e,s)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(e,s){return s.some(i=>Et(i)?e.accessibility===i:!!e[i])}tsIsStartOfStaticBlocks(){return this.isContextual(106)&&this.lookaheadCharCode()===123}parseClassMember(e,s,i){let r=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:r,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:g.InvalidModifierOnTypeParameterPositions},s);let a=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(s,r)&&this.raise(g.StaticBlockCannotHaveModifier,this.state.curPosition()),super.parseClassStaticBlock(e,s)):this.parseClassMemberWithIsStatic(e,s,i,!!s.static)};s.declare?this.tsInAmbientContext(a):a()}parseClassMemberWithIsStatic(e,s,i,r){let a=this.tsTryParseIndexSignature(s);if(a){e.body.push(a),s.abstract&&this.raise(g.IndexSignatureHasAbstract,s),s.accessibility&&this.raise(g.IndexSignatureHasAccessibility,s,{modifier:s.accessibility}),s.declare&&this.raise(g.IndexSignatureHasDeclare,s),s.override&&this.raise(g.IndexSignatureHasOverride,s);return}!this.state.inAbstractClass&&s.abstract&&this.raise(g.NonAbstractClassHasAbstractMethod,s),s.override&&(i.hadSuperClass||this.raise(g.OverrideNotInSubClass,s)),super.parseClassMemberWithIsStatic(e,s,i,r)}parsePostMemberNameModifiers(e){this.eat(17)&&(e.optional=!0),e.readonly&&this.match(10)&&this.raise(g.ClassMethodHasReadonly,e),e.declare&&this.match(10)&&this.raise(g.ClassMethodHasDeclare,e)}parseExpressionStatement(e,s,i){return(s.type==="Identifier"?this.tsParseExpressionStatement(e,s,i):void 0)||super.parseExpressionStatement(e,s,i)}shouldParseExportDeclaration(){return this.tsIsDeclarationStart()?!0:super.shouldParseExportDeclaration()}parseConditional(e,s,i){if(!this.state.maybeInArrowParameters||!this.match(17))return super.parseConditional(e,s,i);let r=this.tryParse(()=>super.parseConditional(e,s));return r.node?(r.error&&(this.state=r.failState),r.node):(r.error&&super.setOptionalParametersError(i,r.error),e)}parseParenItem(e,s){let i=super.parseParenItem(e,s);if(this.eat(17)&&(i.optional=!0,this.resetEndLocation(e)),this.match(14)){let r=this.startNodeAt(s);return r.expression=e,r.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(r,"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(g.ExpectedAmbientAfterExportDeclare,this.state.startLoc);let r=D(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(e);return r?((r.type==="TSInterfaceDeclaration"||r.type==="TSTypeAliasDeclaration"||i)&&(e.exportKind="type"),i&&r.type!=="TSImportEqualsDeclaration"&&(this.resetStartLocation(r,s),r.declare=!0),r):null}parseClassId(e,s,i,r){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(g.DeclareClassFieldHasInitializer,this.state.startLoc),e.abstract&&this.match(29)){let{key:s}=e;this.raise(g.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(g.PrivateElementHasAbstract,e),e.accessibility&&this.raise(g.PrivateElementHasAccessibility,e,{modifier:e.accessibility}),this.parseClassPropertyAnnotation(e),super.parseClassPrivateProperty(e)}parseClassAccessorProperty(e){return this.parseClassPropertyAnnotation(e),e.optional&&this.raise(g.AccessorCannotBeOptional,e),super.parseClassAccessorProperty(e)}pushClassMethod(e,s,i,r,a,n){let o=this.tsTryParseTypeParameters(this.tsParseConstModifier);o&&a&&this.raise(g.ConstructorHasTypeParameters,o);let{declare:p=!1,kind:h}=s;p&&(h==="get"||h==="set")&&this.raise(g.DeclareAccessor,s,{kind:h}),o&&(s.typeParameters=o),super.pushClassMethod(e,s,i,r,a,n)}pushClassPrivateMethod(e,s,i,r){let a=this.tsTryParseTypeParameters(this.tsParseConstModifier);a&&(s.typeParameters=a),super.pushClassPrivateMethod(e,s,i,r)}declareClassPrivateMethodInScope(e,s){e.type!=="TSDeclareMethod"&&(e.type==="MethodDefinition"&&!hasOwnProperty.call(e.value,"body")||super.declareClassPrivateMethodInScope(e,s))}parseClassSuper(e){super.parseClassSuper(e),e.superClass&&(this.match(47)||this.match(51))&&(e.superTypeParameters=this.tsParseTypeArgumentsInExpression()),this.eatContextual(113)&&(e.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(e,s,i,r,a,n,o){let p=this.tsTryParseTypeParameters(this.tsParseConstModifier);return p&&(e.typeParameters=p),super.parseObjPropValue(e,s,i,r,a,n,o)}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,r,a,n,o;let p,h,d;if(this.hasPlugin("jsx")&&(this.match(143)||this.match(47))){if(p=this.state.clone(),h=this.tryParse(()=>super.parseMaybeAssign(e,s),p),!h.error)return h.node;let{context:T}=this.state,N=T[T.length-1];(N===k.j_oTag||N===k.j_expr)&&T.pop()}if(!((i=h)!=null&&i.error)&&!this.match(47))return super.parseMaybeAssign(e,s);(!p||p===this.state)&&(p=this.state.clone());let y,A=this.tryParse(T=>{var N,L;y=this.tsParseTypeParameters(this.tsParseConstModifier);let F=super.parseMaybeAssign(e,s);return(F.type!=="ArrowFunctionExpression"||(N=F.extra)!=null&&N.parenthesized)&&T(),((L=y)==null?void 0:L.params.length)!==0&&this.resetStartLocationFromNode(F,y),F.typeParameters=y,F},p);if(!A.error&&!A.aborted)return y&&this.reportReservedArrowTypeParam(y),A.node;if(!h&&(bt(!this.hasPlugin("jsx")),d=this.tryParse(()=>super.parseMaybeAssign(e,s),p),!d.error))return d.node;if((r=h)!=null&&r.node)return this.state=h.failState,h.node;if(A.node)return this.state=A.failState,y&&this.reportReservedArrowTypeParam(y),A.node;if((a=d)!=null&&a.node)return this.state=d.failState,d.node;throw((n=h)==null?void 0:n.error)||A.error||((o=d)==null?void 0:o.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(g.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 r=this.tsParseTypeOrTypePredicateAnnotation(14);return(this.canInsertSemicolon()||!this.match(19))&&i(),r});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(g.UnexpectedTypeCastInParameter,e):this.raise(g.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){switch(e){case"TSTypeCastExpression":return!0;case"TSParameterProperty":return"parameter";case"TSNonNullExpression":case"TSInstantiationExpression":return"expression";case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":return(i!==64||!s)&&["expression",!0];default:return super.isValidLVal(e,s,i)}}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 r=super.parseMaybeDecoratorArguments(e,s);return r.typeParameters=i,r}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(g.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}toAssignableList(e,s,i){for(let r=0;r<e.length;r++){let a=e[r];(a==null?void 0:a.type)==="TSTypeCastExpression"&&(e[r]=this.typeCastToParameter(a))}super.toAssignableList(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),i=this.getObjectOrClassMethodParams(e)[0];return i&&this.isThisParam(i)?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 r=this.state.inAbstractClass;this.state.inAbstractClass=!!e.abstract;try{return super.parseClass(e,s,i)}finally{this.state.inAbstractClass=r}}tsParseAbstractDeclaration(e,s){if(this.match(80))return e.abstract=!0,this.maybeTakeDecorators(s,this.parseClass(e,!0,!1));if(this.isContextual(129)){if(!this.hasFollowingLineBreak())return e.abstract=!0,this.raise(g.NonClassMethodPropertyHasAbstractModifer,e),this.tsParseInterfaceDeclaration(e)}else this.unexpected(null,80)}parseMethod(e,s,i,r,a,n,o){let p=super.parseMethod(e,s,i,r,a,n,o);if(p.abstract&&(this.hasPlugin("estree")?p.value:p).body){let{key:h}=p;this.raise(g.AbstractMethodHasImplementation,p,{methodName:h.type==="Identifier"&&!p.computed?h.name:`[${this.input.slice(this.offsetToSourcePos(h.start),this.offsetToSourcePos(h.end))}]`})}return p}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,r){return!s&&r?(this.parseTypeOnlyImportExportSpecifier(e,!1,i),this.finishNode(e,"ExportSpecifier")):(e.exportKind="value",super.parseExportSpecifier(e,s,i,r))}parseImportSpecifier(e,s,i,r,a){return!s&&r?(this.parseTypeOnlyImportExportSpecifier(e,!0,i),this.finishNode(e,"ImportSpecifier")):(e.importKind="value",super.parseImportSpecifier(e,s,i,r,i?4098:4096))}parseTypeOnlyImportExportSpecifier(e,s,i){let r=s?"imported":"local",a=s?"local":"exported",n=e[r],o,p=!1,h=!0,d=n.loc.start;if(this.isContextual(93)){let A=this.parseIdentifier();if(this.isContextual(93)){let T=this.parseIdentifier();U(this.state.type)?(p=!0,n=A,o=s?this.parseIdentifier():this.parseModuleExportName(),h=!1):(o=T,h=!1)}else U(this.state.type)?(h=!1,o=s?this.parseIdentifier():this.parseModuleExportName()):(p=!0,n=A)}else U(this.state.type)&&(p=!0,s?(n=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(n.name,n.loc.start,!0,!0)):n=this.parseModuleExportName());p&&i&&this.raise(s?g.TypeModifierIsUsedInTypeImports:g.TypeModifierIsUsedInTypeExports,d),e[r]=n,e[a]=o;let y=s?"importKind":"exportKind";e[y]=p?"type":"value",h&&this.eatContextual(93)&&(e[a]=s?this.parseIdentifier():this.parseModuleExportName()),e[a]||(e[a]=$(e[r])),s&&this.checkIdentifier(e[a],p?4098:4096)}};function xi(t){if(t.type!=="MemberExpression")return!1;let{computed:e,property:s}=t;return e&&s.type!=="StringLiteral"&&(s.type!=="TemplateLiteral"||s.expressions.length>0)?!1:St(t.object)}function Pi(t,e){var s;let{type:i}=t;if((s=t.extra)!=null&&s.parenthesized)return!1;if(e){if(i==="Literal"){let{value:r}=t;if(typeof r=="string"||typeof r=="boolean")return!0}}else if(i==="StringLiteral"||i==="BooleanLiteral")return!0;return!!(Ct(t,e)||Ai(t,e)||i==="TemplateLiteral"&&t.expressions.length===0||xi(t))}function Ct(t,e){return e?t.type==="Literal"&&(typeof t.value=="number"||"bigint"in t):t.type==="NumericLiteral"||t.type==="BigIntLiteral"}function Ai(t,e){if(t.type==="UnaryExpression"){let{operator:s,argument:i}=t;if(s==="-"&&Ct(i,e))return!0}return!1}function St(t){return t.type==="Identifier"?!0:t.type!=="MemberExpression"||t.computed?!1:St(t.object)}var wt=H`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."}),gi=t=>class extends t{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,r){e!==void 0&&super.checkReservedWord(e,s,i,r)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(e,s,i){return e==="Placeholder"||super.isValidLVal(e,s,i)}toAssignable(e,s){e&&e.type==="Placeholder"&&e.expectedNode==="Expression"?e.expectedNode="Pattern":super.toAssignable(e,s)}chStartsBindingIdentifier(e,s){return!!(super.chStartsBindingIdentifier(e,s)||this.lookahead().type===133)}verifyBreakContinue(e,s){e.label&&e.label.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 r=e;return r.name=s.name,this.finishPlaceholder(r,"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 r=s?"ClassDeclaration":"ClassExpression";this.next();let a=this.state.strict,n=this.parsePlaceholder("Identifier");if(n)if(this.match(81)||this.match(133)||this.match(5))e.id=n;else{if(i||!s)return e.id=null,e.body=this.finishPlaceholder(n,"ClassBody"),this.finishNode(e,r);throw this.raise(wt.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,r)}parseExport(e,s){let i=this.parsePlaceholder("Identifier");if(!i)return super.parseExport(e,s);let r=e;if(!this.isContextual(98)&&!this.match(12))return r.specifiers=[],r.source=null,r.declaration=this.finishPlaceholder(i,"Declaration"),this.finishNode(r,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");let a=this.startNode();return a.exported=i,r.specifiers=[this.finishNode(a,"ExportDefaultSpecifier")],super.parseExport(r,s)}isExportDefaultSpecifier(){if(this.match(65)){let e=this.nextTokenStart();if(this.isUnparsedContextual(e,"from")&&this.input.startsWith(W(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(wt.UnexpectedSpace,this.state.lastTokEndLoc)}},Ti=t=>class extends t{parseV8Intrinsic(){if(this.match(54)){let e=this.state.startLoc,s=this.startNode();if(this.next(),D(this.state.type)){let i=this.parseIdentifierName(),r=this.createIdentifier(s,i);if(r.type="V8IntrinsicIdentifier",this.match(10))return r}this.unexpected(e)}}parseExprAtom(e){return this.parseV8Intrinsic()||super.parseExprAtom(e)}},It=["minimal","fsharp","hack","smart"],Nt=["^^","@@","^","%","#"];function bi(t){if(t.has("decorators")){if(t.has("decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");let s=t.get("decorators").decoratorsBeforeExport;if(s!=null&&typeof s!="boolean")throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");let i=t.get("decorators").allowCallParenthesized;if(i!=null&&typeof i!="boolean")throw new Error("'allowCallParenthesized' must be a boolean.")}if(t.has("flow")&&t.has("typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(t.has("placeholders")&&t.has("v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(t.has("pipelineOperator")){var e;let s=t.get("pipelineOperator").proposal;if(!It.includes(s)){let r=It.map(a=>`"${a}"`).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${r}.`)}let i=((e=t.get("recordAndTuple"))==null?void 0:e.syntaxType)==="hash";if(s==="hack"){if(t.has("placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(t.has("v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");let r=t.get("pipelineOperator").topicToken;if(!Nt.includes(r)){let a=Nt.map(n=>`"${n}"`).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${a}.`)}if(r==="#"&&i)throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "hack", topicToken: "#" }]\` and \`${JSON.stringify(["recordAndTuple",t.get("recordAndTuple")])}\`.`)}else if(s==="smart"&&i)throw new Error(`Plugin conflict between \`["pipelineOperator", { proposal: "smart" }]\` and \`${JSON.stringify(["recordAndTuple",t.get("recordAndTuple")])}\`.`)}if(t.has("moduleAttributes")){if(t.has("deprecatedImportAssert")||t.has("importAssertions"))throw new Error("Cannot combine importAssertions, deprecatedImportAssert and moduleAttributes plugins.");if(t.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(t.has("importAssertions")&&t.has("deprecatedImportAssert"))throw new Error("Cannot combine importAssertions and deprecatedImportAssert plugins.");if(!t.has("deprecatedImportAssert")&&t.has("importAttributes")&&t.get("importAttributes").deprecatedAssertSyntax&&t.set("deprecatedImportAssert",{}),t.has("recordAndTuple")){let s=t.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(r=>`'${r}'`).join(", "))}}if(t.has("asyncDoExpressions")&&!t.has("doExpressions")){let s=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw s.missingPlugins="doExpressions",s}if(t.has("optionalChainingAssign")&&t.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'.")}var vt={estree:ls,jsx:pi,flow:hi,typescript:yi,v8intrinsic:Ti,placeholders:gi},Ei=Object.keys(vt),Ci=class extends ci{checkProto(t,e,s,i){if(t.type==="SpreadElement"||this.isObjectMethod(t)||t.computed||t.shorthand)return;let r=t.key;if((r.type==="Identifier"?r.name:r.value)==="__proto__"){if(e){this.raise(u.RecordNoProto,r);return}s.used&&(i?i.doubleProtoLoc===null&&(i.doubleProtoLoc=r.loc.start):this.raise(u.DuplicateProto,r)),s.used=!0}}shouldExitDescending(t,e){return t.type==="ArrowFunctionExpression"&&this.offsetToSourcePos(t.start)===e}getExpression(){this.enterInitialScopes(),this.nextToken();let t=this.parseExpression();return this.match(140)||this.unexpected(),this.finalizeRemainingComments(),t.comments=this.comments,t.errors=this.state.errors,this.optionFlags&128&&(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,e){var s;t.optionalParametersLoc=(s=e==null?void 0:e.loc)!=null?s:this.state.startLoc}parseMaybeAssign(t,e){let s=this.state.startLoc;if(this.isContextual(108)&&this.prodParam.hasYield){let n=this.parseYield();return e&&(n=e.call(this,n,s)),n}let i;t?i=!1:(t=new be,i=!0);let{type:r}=this.state;(r===10||D(r))&&(this.state.potentialArrowAt=this.state.start);let a=this.parseMaybeConditional(t);if(e&&(a=e.call(this,a,s)),fs(this.state.type)){let n=this.startNodeAt(s),o=this.state.value;if(n.operator=o,this.match(29)){this.toAssignable(a,!0),n.left=a;let p=s.index;t.doubleProtoLoc!=null&&t.doubleProtoLoc.index>=p&&(t.doubleProtoLoc=null),t.shorthandAssignLoc!=null&&t.shorthandAssignLoc.index>=p&&(t.shorthandAssignLoc=null),t.privateKeyLoc!=null&&t.privateKeyLoc.index>=p&&(this.checkDestructuringPrivate(t),t.privateKeyLoc=null)}else n.left=a;return this.next(),n.right=this.parseMaybeAssign(),this.checkLVal(a,this.finishNode(n,"AssignmentExpression")),n}else i&&this.checkExpressionErrors(t,!0);return a}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 r=this.getPrivateNameSV(t);(s>=ye(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(u.PrivateInExpectedIn,t,{identifierName:r}),this.classScope.usePrivateName(r,t.loc.start)}let i=this.state.type;if(xs(i)&&(this.prodParam.hasIn||!this.match(58))){let r=ye(i);if(r>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 n=i===41||i===42,o=i===40;if(o&&(r=ye(42)),this.next(),i===39&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&this.state.type===96&&this.prodParam.hasAwait)throw this.raise(u.UnexpectedAwaitAfterPipelineBody,this.state.startLoc);a.right=this.parseExprOpRightExpr(i,r);let p=this.finishNode(a,n||o?"LogicalExpression":"BinaryExpression"),h=this.state.type;if(o&&(h===41||h===42)||n&&h===40)throw this.raise(u.MixingCoalesceWithLogical,this.state.startLoc);return this.parseExprOp(p,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(u.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,bs(t)?e-1:e)}parseHackPipeBody(){var t;let{startLoc:e}=this.state,s=this.parseMaybeAssign();return is.has(s.type)&&!((t=s.extra)!=null&&t.parenthesized)&&this.raise(u.PipeUnparenthesizedBody,e,{type:s.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(u.PipeTopicUnused,e),s}checkExponentialAfterUnary(t){this.match(57)&&this.raise(u.UnexpectedTokenUnaryExponentiation,t.argument)}parseMaybeUnary(t,e){let s=this.state.startLoc,i=this.isContextual(96);if(i&&this.recordAwaitIfAllowed()){this.next();let o=this.parseAwait(s);return e||this.checkExponentialAfterUnary(o),o}let r=this.match(34),a=this.startNode();if(As(this.state.type)){a.operator=this.state.value,a.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");let o=this.match(89);if(this.next(),a.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(t,!0),this.state.strict&&o){let p=a.argument;p.type==="Identifier"?this.raise(u.StrictDelete,a):this.hasPropertyAsPrivateName(p)&&this.raise(u.DeletePrivateField,a)}if(!r)return e||this.checkExponentialAfterUnary(a),this.finishNode(a,"UnaryExpression")}let n=this.parseUpdate(a,r,t);if(i){let{type:o}=this.state;if((this.hasPlugin("v8intrinsic")?Le(o):Le(o)&&!this.match(54))&&!this.isAmbiguousAwait())return this.raiseOverwrite(u.AwaitNotInAsyncContext,s),this.parseAwait(s)}return n}parseUpdate(t,e,s){if(e){let a=t;return this.checkLVal(a.argument,this.finishNode(a,"UpdateExpression")),t}let i=this.state.startLoc,r=this.parseExprSubscripts(s);if(this.checkExpressionErrors(s,!1))return r;for(;Ps(this.state.type)&&!this.canInsertSemicolon();){let a=this.startNodeAt(i);a.operator=this.state.value,a.prefix=!1,a.argument=r,this.next(),this.checkLVal(r,r=this.finishNode(a,"UpdateExpression"))}return r}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:r}=this.state;if(!s&&r===15)return this.parseBind(t,e,s,i);if(xe(r))return this.parseTaggedTemplateExpression(t,e,i);let a=!1;if(r===18){if(s&&(this.raise(u.OptionalChainingNoNew,this.state.startLoc),this.lookaheadCharCode()===40))return i.stop=!0,t;i.optionalChainMember=a=!0,this.next()}if(!s&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(t,e,i,a);{let n=this.eat(0);return n||a||this.eat(16)?this.parseMember(t,e,i,n,a):(i.stop=!0,t)}}parseMember(t,e,s,i,r){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(u.SuperPrivateField,e),this.classScope.usePrivateName(this.state.value,this.state.startLoc),a.property=this.parsePrivateName()):a.property=this.parseIdentifier(!0),s.optionalChainMember?(a.optional=r,this.finishNode(a,"OptionalMemberExpression")):this.finishNode(a,"MemberExpression")}parseBind(t,e,s,i){let r=this.startNodeAt(e);return r.object=t,this.next(),r.callee=this.parseNoCallExpr(),i.stop=!0,this.parseSubscripts(this.finishNode(r,"BindExpression"),e,s)}parseCoverCallAndAsyncArrowHead(t,e,s,i){let r=this.state.maybeInArrowParameters,a=null;this.state.maybeInArrowParameters=!0,this.next();let n=this.startNodeAt(e);n.callee=t;let{maybeAsyncArrow:o,optionalChainMember:p}=s;o&&(this.expressionScope.enter(Ys()),a=new be),p&&(n.optional=i),i?n.arguments=this.parseCallExpressionArguments(11):n.arguments=this.parseCallExpressionArguments(11,t.type!=="Super",n,a);let h=this.finishCallExpression(n,p);return o&&this.shouldParseAsyncArrow()&&!i?(s.stop=!0,this.checkDestructuringPrivate(a),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),h=this.parseAsyncArrowFromCallExpression(this.startNodeAt(e),h)):(o&&(this.checkExpressionErrors(a,!0),this.expressionScope.exit()),this.toReferencedArguments(h)),this.state.maybeInArrowParameters=r,h}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(u.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(u.ImportCallArity,t);else for(let s of t.arguments)s.type==="SpreadElement"&&this.raise(u.ImportCallSpreadArgument,s);return this.finishNode(t,e?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(t,e,s,i){let r=[],a=!0,n=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(t);){if(a)a=!1;else if(this.expect(12),this.match(t)){s&&this.addTrailingCommaExtraToNode(s),this.next();break}r.push(this.parseExprListItem(!1,i,e))}return this.state.inFSharpPipelineDirectBody=n,r}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.parseImportMetaProperty(e):this.match(10)?this.optionFlags&256?this.parseImportCall(e):this.finishNode(e,"Import"):(this.raise(u.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 r=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(r)}case 2:case 1:return this.parseArrayLike(this.state.type===2?4:3,!1,!0);case 0:return this.parseArrayLike(3,!0,!1,t);case 6:case 7:return this.parseObjectLike(this.state.type===6?9:8,!1,!0);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 r=e.callee=this.parseNoCallExpr();if(r.type==="MemberExpression")return this.finishNode(e,"BindExpression");throw this.raise(u.UnsupportedBind,r)}case 139:return this.raise(u.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 r=this.getPluginOption("pipelineOperator","proposal");if(r)return this.parseTopicReference(r);this.unexpected();break}case 47:{let r=this.input.codePointAt(this.nextTokenStart());q(r)||r===62?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected();break}default:if(i===137)return this.parseDecimalLiteral(this.state.value);if(D(i)){if(this.isContextual(127)&&this.lookaheadInLineCharCode()===123)return this.parseModuleExpression();let r=this.state.potentialArrowAt===this.state.start,a=this.state.containsEsc,n=this.parseIdentifier();if(!a&&n.name==="async"&&!this.canInsertSemicolon()){let{type:o}=this.state;if(o===68)return this.resetPreviousNodeTrailingComments(n),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(n));if(D(o))return this.lookaheadCharCode()===61?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(n)):n;if(o===90)return this.resetPreviousNodeTrailingComments(n),this.parseDo(this.startNodeAtNode(n),!0)}return r&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(n),[n],!1)):n}else 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=f(this.state.endLoc,-1),this.parseTopicReference(s);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(u.PipeTopicUnbound,e),this.registerTopicReference(),this.finishNode(t,"TopicReference")):(this.topicReferenceIsAllowedInCurrentContext()||this.raise(u.PrimaryTopicNotAllowed,e),this.registerTopicReference(),this.finishNode(t,"PipelinePrimaryTopicReference"));throw this.raise(u.PipeTopicUnconfiguredToken,e,{token:W(i)})}testTopicReferenceConfiguration(t,e,s){switch(t){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:W(s)}]);case"smart":return s===27;default:throw this.raise(u.PipeTopicRequiresHackPipes,e)}}parseAsyncArrowUnaryFunction(t){this.prodParam.enter(Te(!0,this.prodParam.hasYield));let e=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(u.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(u.SuperNotAllowed,t):!this.scope.allowSuper&&!(this.optionFlags&16)&&this.raise(u.UnexpectedSuper,t),!this.match(10)&&!this.match(0)&&!this.match(16)&&this.raise(u.UnsupportedSuper,t),this.finishNode(t,"Super")}parsePrivateName(){let t=this.startNode(),e=this.startNodeAt(f(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(u.UnsupportedMetaProperty,t.property,{target:e.name,onlyValidPropertyName:s}),this.finishNode(t,"MetaProperty")}parseImportMetaProperty(t){let e=this.createIdentifier(this.startNodeAtNode(t),"import");if(this.next(),this.isContextual(101))this.inModule||this.raise(u.ImportMetaOutsideModule,e),this.sawUnambiguousESM=!0;else if(this.isContextual(105)||this.isContextual(97)){let s=this.isContextual(105);if(this.expectPlugin(s?"sourcePhaseImports":"deferredImportEvaluation"),!(this.optionFlags&256))throw this.raise(u.DynamicImportPhaseRequiresImportExpressions,this.state.startLoc,{phase:this.state.value});return this.next(),t.phase=s?"source":"defer",this.parseImportCall(t)}return 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(Gs());let i=this.state.maybeInArrowParameters,r=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;let a=this.state.startLoc,n=[],o=new be,p=!0,h,d;for(;!this.match(11);){if(p)p=!1;else if(this.expect(12,o.optionalParametersLoc===null?null:o.optionalParametersLoc),this.match(11)){d=this.state.startLoc;break}if(this.match(21)){let T=this.state.startLoc;if(h=this.state.startLoc,n.push(this.parseParenItem(this.parseRestBinding(),T)),!this.checkCommaAfterRest(41))break}else n.push(this.parseMaybeAssignAllowIn(o,this.parseParenItem))}let y=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=i,this.state.inFSharpPipelineDirectBody=r;let A=this.startNodeAt(e);return t&&this.shouldParseArrow(n)&&(A=this.parseArrow(A))?(this.checkDestructuringPrivate(o),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(A,n,!1),A):(this.expressionScope.exit(),n.length||this.unexpected(this.state.lastTokStartLoc),d&&this.unexpected(d),h&&this.unexpected(h),this.checkExpressionErrors(o,!0),this.toReferencedListDeep(n,!0),n.length>1?(s=this.startNodeAt(a),s.expressions=n,this.finishNode(s,"SequenceExpression"),this.resetEndLocation(s,y)):s=n[0],this.wrapParenthesis(e,s))}wrapParenthesis(t,e){if(!(this.optionFlags&512))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.inNonArrowFunction&&!this.scope.inClass&&!(this.optionFlags&4)&&this.raise(u.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(u.ImportCallNotNewExpression,s)}parseTemplateElement(t){let{start:e,startLoc:s,end:i,value:r}=this.state,a=e+1,n=this.startNodeAt(f(s,1));r===null&&(t||this.raise(u.InvalidEscapeSequenceTemplate,f(this.state.firstInvalidTemplateEscapePos,1)));let o=this.match(24),p=o?-1:-2,h=i+p;n.value={raw:this.input.slice(a,h).replace(/\r\n?/g,`
8
+ `),cooked:r===null?null:r.slice(1,p)},n.tail=o,this.next();let d=this.finishNode(n,"TemplateElement");return this.resetEndLocation(d,f(this.state.lastTokEndLoc,p)),d}parseTemplate(t){let e=this.startNode(),s=this.parseTemplateElement(t),i=[s],r=[];for(;!s.tail;)r.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),i.push(s=this.parseTemplateElement(t));return e.expressions=r,e.quasis=i,this.finishNode(e,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(t,e,s,i){s&&this.expectPlugin("recordAndTuple");let r=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let a=Object.create(null),n=!0,o=this.startNode();for(o.properties=[],this.next();!this.match(t);){if(n)n=!1;else if(this.expect(12),this.match(t)){this.addTrailingCommaExtraToNode(o);break}let h;e?h=this.parseBindingProperty():(h=this.parsePropertyDefinition(i),this.checkProto(h,s,a,i)),s&&!this.isObjectProperty(h)&&h.type!=="SpreadElement"&&this.raise(u.InvalidRecordProperty,h),h.shorthand&&this.addExtra(h,"shorthand",!0),o.properties.push(h)}this.next(),this.state.inFSharpPipelineDirectBody=r;let p="ObjectExpression";return e?p="ObjectPattern":s&&(p="RecordExpression"),this.finishNode(o,p)}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(u.UnsupportedPropertyDecorator,this.state.startLoc);this.match(26);)e.push(this.parseDecorator());let s=this.startNode(),i=!1,r=!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 n=this.eat(55);this.parsePropertyNamePrefixOperator(s);let o=this.state.containsEsc;if(this.parsePropertyName(s,t),!n&&!o&&this.maybeAsyncOrAccessorProp(s)){let{key:p}=s,h=p.name;h==="async"&&!this.hasPrecedingLineBreak()&&(i=!0,this.resetPreviousNodeTrailingComments(p),n=this.eat(55),this.parsePropertyName(s)),(h==="get"||h==="set")&&(r=!0,this.resetPreviousNodeTrailingComments(p),s.kind=h,this.match(55)&&(n=!0,this.raise(u.AccessorIsGenerator,this.state.curPosition(),{kind:h}),this.next()),this.parsePropertyName(s))}return this.parseObjPropValue(s,a,n,i,!1,r,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"?u.BadGetterArity:u.BadSetterArity,t),t.kind==="set"&&((e=i[i.length-1])==null?void 0:e.type)==="RestElement"&&this.raise(u.BadSetterRestParameter,t)}parseObjectMethod(t,e,s,i,r){if(r){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.parseMaybeAssignAllowIn(i),this.finishNode(t,"ObjectProperty");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,$(t.key));else if(this.match(29)){let r=this.state.startLoc;i!=null?i.shorthandAssignLoc===null&&(i.shorthandAssignLoc=r):this.raise(u.InvalidCoverInitializedName,r),t.value=this.parseMaybeDefault(e,$(t.key))}else t.value=$(t.key);return t.shorthand=!0,this.finishNode(t,"ObjectProperty")}}parseObjPropValue(t,e,s,i,r,a,n){let o=this.parseObjectMethod(t,s,i,r,a)||this.parseObjectProperty(t,e,r,n);return o||this.unexpected(),o}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,r;if(U(s))r=this.parseIdentifier(!0);else switch(s){case 135:r=this.parseNumericLiteral(i);break;case 134:r=this.parseStringLiteral(i);break;case 136:r=this.parseBigIntLiteral(i);break;case 139:{let a=this.state.startLoc;e!=null?e.privateKeyLoc===null&&(e.privateKeyLoc=a):this.raise(u.UnexpectedPrivateField,a),r=this.parsePrivateName();break}default:if(s===137){r=this.parseDecimalLiteral(i);break}this.unexpected()}t.key=r,s!==139&&(t.computed=!1)}}initFunction(t,e){t.id=null,t.generator=!1,t.async=e}parseMethod(t,e,s,i,r,a,n=!1){this.initFunction(t,s),t.generator=e,this.scope.enter(18|(n?64:0)|(r?32:0)),this.prodParam.enter(Te(s,t.generator)),this.parseFunctionParams(t,i);let o=this.parseFunctionBodyAndFinish(t,a,!0);return this.prodParam.exit(),this.scope.exit(),o}parseArrayLike(t,e,s,i){s&&this.expectPlugin("recordAndTuple");let r=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;let a=this.startNode();return this.next(),a.elements=this.parseExprList(t,!s,i,a),this.state.inFSharpPipelineDirectBody=r,this.finishNode(a,s?"TupleExpression":"ArrayExpression")}parseArrowExpression(t,e,s,i){this.scope.enter(6);let r=Te(s,!1);!this.match(5)&&this.prodParam.hasIn&&(r|=8),this.prodParam.enter(r),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(At()),i)t.body=this.parseMaybeAssign(),this.checkParams(t,!1,e,!1);else{let r=this.state.strict,a=this.state.labels;this.state.labels=[],this.prodParam.enter(this.prodParam.currentFlags()|4),t.body=this.parseBlock(!0,!1,n=>{let o=!this.isSimpleParamList(t.params);n&&o&&this.raise(u.IllegalLanguageModeDirective,(t.kind==="method"||t.kind==="constructor")&&t.key?t.key.loc.end:t);let p=!r&&this.state.strict;this.checkParams(t,!this.state.strict&&!e&&!s&&!o,e,p),this.state.strict&&t.id&&this.checkIdentifier(t.id,65,p)}),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 r=!e&&new Set,a={type:"FormalParameters"};for(let n of t.params)this.checkLVal(n,a,5,r,i)}parseExprList(t,e,s,i){let r=[],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}r.push(this.parseExprListItem(e,s))}return r}parseExprListItem(t,e,s){let i;if(this.match(12))t||this.raise(u.UnexpectedToken,this.state.curPosition(),{unexpected:","}),i=null;else if(this.match(21)){let r=this.state.startLoc;i=this.parseParenItem(this.parseSpread(e),r)}else if(this.match(17)){this.expectPlugin("partialApplication"),s||this.raise(u.UnexpectedArgumentPlaceholder,this.state.startLoc);let r=this.startNode();this.next(),i=this.finishNode(r,"ArgumentPlaceholder")}else i=this.parseMaybeAssignAllowIn(e,this.parseParenItem);return i}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")}parseIdentifierName(t){let e,{startLoc:s,type:i}=this.state;U(i)?e=this.state.value:this.unexpected();let r=ds(i);return t?r&&this.replaceToken(132):this.checkReservedWord(e,s,r,!1),this.next(),e}checkReservedWord(t,e,s,i){if(!(t.length>10||!Fs(t))){if(s&&vs(t)){this.raise(u.UnexpectedKeyword,e,{keyword:t});return}if((this.state.strict?i?ut:pt:ht)(t,this.inModule)){this.raise(u.UnexpectedReservedWord,e,{reservedWord:t});return}else if(t==="yield"){if(this.prodParam.hasYield){this.raise(u.YieldBindingIdentifier,e);return}}else if(t==="await"){if(this.prodParam.hasAwait){this.raise(u.AwaitBindingIdentifier,e);return}if(this.scope.inStaticBlock){this.raise(u.AwaitBindingIdentifierInStaticBlock,e);return}this.expressionScope.recordAsyncArrowParametersError(e)}else if(t==="arguments"&&this.scope.inClassAndNotInNonArrowFunction){this.raise(u.ArgumentsInClass,e);return}}}recordAwaitIfAllowed(){let t=this.prodParam.hasAwait||this.optionFlags&1&&!this.scope.inFunction;return t&&!this.scope.inFunction&&(this.state.hasTopLevelAwait=!0),t}parseAwait(t){let e=this.startNodeAt(t);return this.expressionScope.recordParameterInitializerError(u.AwaitExpressionFormalParameter,e),this.eat(55)&&this.raise(u.ObsoleteAwaitStar,e),!this.scope.inFunction&&!(this.optionFlags&1)&&(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(e.argument=this.parseMaybeUnary(null,!0)),this.finishNode(e,"AwaitExpression")}isAmbiguousAwait(){if(this.hasPrecedingLineBreak())return!0;let{type:t}=this.state;return t===53||t===10||t===0||xe(t)||t===102&&!this.state.containsEsc||t===138||t===56||this.hasPlugin("v8intrinsic")&&t===54}parseYield(){let t=this.startNode();this.expressionScope.recordParameterInitializerError(u.YieldInParameter,t),this.next();let e=!1,s=null;if(!this.hasPrecedingLineBreak())switch(e=this.eat(55),this.state.type){case 13:case 140:case 8:case 11:case 3:case 9:case 14:case 12:if(!e)break;default:s=this.parseMaybeAssign()}return t.delegate=e,t.argument=s,this.finishNode(t,"YieldExpression")}parseImportCall(t){if(this.next(),t.source=this.parseMaybeAssignAllowIn(),t.options=null,this.eat(12)&&!this.match(11)&&(t.options=this.parseMaybeAssignAllowIn(),this.eat(12)&&!this.match(11))){do this.parseMaybeAssignAllowIn();while(this.eat(12)&&!this.match(11));this.raise(u.ImportCallArity,t)}return this.expect(11),this.finishNode(t,"ImportExpression")}checkPipelineAtInfixOperator(t,e){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&t.type==="SequenceExpression"&&this.raise(u.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(u.PipelineBodyNoArrow,this.state.startLoc);this.topicReferenceWasUsedInCurrentContext()||this.raise(u.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")}parsePropertyNamePrefixOperator(t){}},qe={kind:1},Si={kind:2},wi=/[\uD800-\uDFFF]/u,$e=/in(?:stanceof)?/y;function Ii(t,e,s){for(let i=0;i<t.length;i++){let r=t[i],{type:a}=r;if(typeof a=="number"){{if(a===139){let{loc:n,start:o,value:p,end:h}=r,d=o+1,y=f(n.start,1);t.splice(i,1,new X({type:V(27),value:"#",start:o,end:d,startLoc:n.start,endLoc:y}),new X({type:V(132),value:p,start:d,end:h,startLoc:y,endLoc:n.end})),i++;continue}if(xe(a)){let{loc:n,start:o,value:p,end:h}=r,d=o+1,y=f(n.start,1),A;e.charCodeAt(o-s)===96?A=new X({type:V(22),value:"`",start:o,end:d,startLoc:n.start,endLoc:y}):A=new X({type:V(8),value:"}",start:o,end:d,startLoc:n.start,endLoc:y});let T,N,L,F;a===24?(N=h-1,L=f(n.end,-1),T=p===null?null:p.slice(1,-1),F=new X({type:V(22),value:"`",start:N,end:h,startLoc:L,endLoc:n.end})):(N=h-2,L=f(n.end,-2),T=p===null?null:p.slice(1,-2),F=new X({type:V(23),value:"${",start:N,end:h,startLoc:L,endLoc:n.end})),t.splice(i,1,A,new X({type:V(20),value:T,start:d,end:N,startLoc:y,endLoc:L}),F),i+=2;continue}}r.type=V(a)}}return t}var Ni=class extends Ci{parseTopLevel(t,e){return t.program=this.parseProgram(e),t.comments=this.comments,this.optionFlags&128&&(t.tokens=Ii(this.tokens,this.input,this.startIndex)),this.finishNode(t,"File")}parseProgram(t,e=140,s=this.options.sourceType){if(t.sourceType=s,t.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(t,!0,!0,e),this.inModule){if(!(this.optionFlags&32)&&this.scope.undefinedExports.size>0)for(let[r,a]of Array.from(this.scope.undefinedExports))this.raise(u.ModuleExportUndefined,a,{localName:r});this.addExtra(t,"topLevelAwait",this.state.hasTopLevelAwait)}let i;return e===140?i=this.finishNode(t,"Program"):i=this.finishNodeAt(t,"Program",f(this.state.startLoc,-1)),i}stmtToDirective(t){let e=t;e.type="Directive",e.value=e.expression,delete e.expression;let s=e.value,i=s.value,r=this.input.slice(this.offsetToSourcePos(s.start),this.offsetToSourcePos(s.end)),a=s.value=r.slice(1,-1);return this.addExtra(s,"raw",r),this.addExtra(s,"rawValue",a),this.addExtra(s,"expressionValue",i),s.type="DirectiveLiteral",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}chStartsBindingIdentifier(t,e){if(q(t)){if($e.lastIndex=e,$e.test(this.input)){let s=this.codePointAtPos($e.lastIndex);if(!te(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)}startsUsingForOf(){let{type:t,containsEsc:e}=this.lookahead();if(t===102&&!e)return!1;if(D(t)&&!this.hasFollowingLineBreak())return this.expectPlugin("explicitResourceManagement"),!0}startsAwaitUsing(){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 this.expectPlugin("explicitResourceManagement"),!0}return!1}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(),r=!!(t&2),a=!!(t&4),n=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?u.StrictFunction:this.options.annexB?u.SloppyFunctionAnnexB:u.SloppyFunction,this.state.startLoc),this.parseFunctionStatement(i,!1,!r&&a);case 80:return r||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.state.containsEsc&&this.startsAwaitUsing())return this.recordAwaitIfAllowed()?r||this.raise(u.UnexpectedLexicalDeclaration,i):this.raise(u.AwaitUsingNotInAsyncContext,i),this.next(),this.parseVarStatement(i,"await using");break;case 107:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifierOrBrace())break;return this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel?this.raise(u.UnexpectedUsingDeclaration,this.state.startLoc):r||this.raise(u.UnexpectedLexicalDeclaration,this.state.startLoc),this.parseVarStatement(i,"using");case 100:{if(this.state.containsEsc)break;let h=this.nextTokenStart(),d=this.codePointAtPos(h);if(d!==91&&(!r&&this.hasFollowingLineBreak()||!this.chStartsBindingIdentifier(d,h)&&d!==123))break}case 75:r||this.raise(u.UnexpectedLexicalDeclaration,this.state.startLoc);case 74:{let h=this.state.value;return this.parseVarStatement(i,h)}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 h=this.lookaheadCharCode();if(h===40||h===46)break}case 82:{!(this.optionFlags&8)&&!n&&this.raise(u.UnexpectedImportExport,this.state.startLoc),this.next();let h;return s===83?(h=this.parseImport(i),h.type==="ImportDeclaration"&&(!h.importKind||h.importKind==="value")&&(this.sawUnambiguousESM=!0)):(h=this.parseExport(i,e),(h.type==="ExportNamedDeclaration"&&(!h.exportKind||h.exportKind==="value")||h.type==="ExportAllDeclaration"&&(!h.exportKind||h.exportKind==="value")||h.type==="ExportDefaultDeclaration")&&(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(h),h}default:if(this.isAsyncFunction())return r||this.raise(u.AsyncFunctionInSingleStatementContext,this.state.startLoc),this.next(),this.parseFunctionStatement(i,!0,!r&&a)}let o=this.state.value,p=this.parseExpression();return D(s)&&p.type==="Identifier"&&this.eat(14)?this.parseLabeledStatement(i,o,p,t):this.parseExpressionStatement(i,p,e)}assertModuleNodeAllowed(t){!(this.optionFlags&8)&&!this.inModule&&this.raise(u.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(u.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(u.DecoratorExportClass,this.state.startLoc);else if(!this.canHaveLeadingDecorator())throw this.raise(u.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 r=this.state.startLoc;t.expression=this.parseMaybeDecoratorArguments(s,i),this.getPluginOption("decorators","allowCallParenthesized")===!1&&t.expression!==s&&this.raise(u.DecoratorArgumentsOutsideParentheses,r)}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(11),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(u.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(qe),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(qe);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 o=this.isContextual(96)&&this.startsAwaitUsing(),p=o||this.isContextual(107)&&this.startsUsingForOf(),h=s&&this.hasFollowingBindingAtom()||p;if(this.match(74)||this.match(75)||h){let d=this.startNode(),y;o?(y="await using",this.recordAwaitIfAllowed()||this.raise(u.AwaitUsingNotInAsyncContext,this.state.startLoc),this.next()):y=this.state.value,this.next(),this.parseVar(d,!0,y);let A=this.finishNode(d,"VariableDeclaration"),T=this.match(58);return T&&p&&this.raise(u.ForInUsing,A),(T||this.isContextual(102))&&A.declarations.length===1?this.parseForIn(t,A,e):(e!==null&&this.unexpected(e),this.parseFor(t,A))}}let i=this.isContextual(95),r=new be,a=this.parseExpression(!0,r),n=this.isContextual(102);if(n&&(s&&this.raise(u.ForOfLet,a),e===null&&i&&a.type==="Identifier"&&this.raise(u.ForOfAsync,a)),n||this.match(58)){this.checkDestructuringPrivate(r),this.toAssignable(a,!0);let o=n?"ForOfStatement":"ForInStatement";return this.checkLVal(a,{type:o}),this.parseForIn(t,a,e)}else this.checkExpressionErrors(r,!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.optionFlags&2)&&this.raise(u.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(Si),this.scope.enter(0);let s;for(let i;!this.match(8);)if(this.match(61)||this.match(65)){let r=this.match(61);s&&this.finishNode(s,"SwitchCase"),e.push(s=this.startNode()),s.consequent=[],this.next(),r?s.test=this.parseExpression():(i&&this.raise(u.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(u.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(u.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(qe),t.body=this.withSmartMixTopicForbiddingContext(()=>this.parseStatement()),this.state.labels.pop(),this.finishNode(t,"WhileStatement")}parseWithStatement(t){return this.state.strict&&this.raise(u.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(u.LabelRedeclaration,s,{labelName:e});let r=ys(this.state.type)?1:this.match(71)?2:null;for(let a=this.state.labels.length-1;a>=0;a--){let n=this.state.labels[a];if(n.statementStart===t.start)n.statementStart=this.sourceToOffsetPos(this.state.start),n.kind=r;else break}return this.state.labels.push({name:e,kind:r,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,r){let a=t.body=[],n=t.directives=[];this.parseBlockOrModuleBlockBody(a,e?n:void 0,s,i,r)}parseBlockOrModuleBlockBody(t,e,s,i,r){let a=this.state.strict,n=!1,o=!1;for(;!this.match(i);){let p=s?this.parseModuleItem():this.parseStatementListItem();if(e&&!o){if(this.isValidDirective(p)){let h=this.stmtToDirective(p);e.push(h),!n&&h.value.value==="use strict"&&(n=!0,this.setStrict(!0));continue}o=!0,this.state.strictErrors.clear()}t.push(p)}r==null||r.call(this,n),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(u.ForInOfLoopInitializer,e,{type:i?"ForInStatement":"ForOfStatement"}),e.type==="AssignmentPattern"&&this.raise(u.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 r=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(u.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:"destructuring"}):(s==="const"||s==="using"||s==="await using")&&!(this.match(58)||this.isContextual(102))&&this.raise(u.DeclarationMissingInitializer,this.state.lastTokEndLoc,{kind:s})),r.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(u.UsingDeclarationHasBindingPattern,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),r=i&&!(e&4),a=!!(e&8);this.initFunction(t,a),this.match(55)&&(s&&this.raise(u.GeneratorInSingleStatementContext,this.state.startLoc),this.next(),t.generator=!0),i&&(t.id=this.parseFunctionId(r));let n=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(Te(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=n,t}parseFunctionId(t){return t||D(this.state.type)?this.parseIdentifier():null}parseFunctionParams(t,e){this.expect(10),this.expressionScope.enter(Xs()),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=[],r=this.startNode();if(r.body=[],this.expect(5),this.withSmartMixTopicForbiddingContext(()=>{for(;!this.match(8);){if(this.eat(13)){if(i.length>0)throw this.raise(u.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(r,a,s),a.kind==="constructor"&&a.decorators&&a.decorators.length>0&&this.raise(u.DecoratorConstructor,a)}}),this.state.strict=e,this.next(),i.length)throw this.raise(u.TrailingDecorator,this.state.startLoc);return this.classScope.exit(),this.finishNode(r,"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 r=e,a=e,n=e,o=e,p=e,h=r,d=r;if(e.static=i,this.parsePropertyNamePrefixOperator(e),this.eat(55)){h.kind="method";let F=this.match(139);if(this.parseClassElementName(h),F){this.pushClassPrivateMethod(t,a,!0,!1);return}this.isNonstaticConstructor(r)&&this.raise(u.ConstructorIsGenerator,r.key),this.pushClassMethod(t,r,!0,!1,!1,!1);return}let y=!this.state.containsEsc&&D(this.state.type),A=this.parseClassElementName(e),T=y?A.name:null,N=this.isPrivateName(A),L=this.state.startLoc;if(this.parsePostMemberNameModifiers(d),this.isClassMethod()){if(h.kind="method",N){this.pushClassPrivateMethod(t,a,!1,!1);return}let F=this.isNonstaticConstructor(r),B=!1;F&&(r.kind="constructor",s.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(u.DuplicateConstructor,A),F&&this.hasPlugin("typescript")&&e.override&&this.raise(u.OverrideOnConstructor,A),s.hadConstructor=!0,B=s.hadSuperClass),this.pushClassMethod(t,r,!1,!1,F,B)}else if(this.isClassProperty())N?this.pushClassPrivateProperty(t,o):this.pushClassProperty(t,n);else if(T==="async"&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(A);let F=this.eat(55);d.optional&&this.unexpected(L),h.kind="method";let B=this.match(139);this.parseClassElementName(h),this.parsePostMemberNameModifiers(d),B?this.pushClassPrivateMethod(t,a,F,!0):(this.isNonstaticConstructor(r)&&this.raise(u.ConstructorIsAsync,r.key),this.pushClassMethod(t,r,F,!0,!1,!1))}else if((T==="get"||T==="set")&&!(this.match(55)&&this.isLineTerminator())){this.resetPreviousNodeTrailingComments(A),h.kind=T;let F=this.match(139);this.parseClassElementName(r),F?this.pushClassPrivateMethod(t,a,!1,!1):(this.isNonstaticConstructor(r)&&this.raise(u.ConstructorIsAccessor,r.key),this.pushClassMethod(t,r,!1,!1,!1,!1)),this.checkGetterSetterParams(r)}else if(T==="accessor"&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(A);let F=this.match(139);this.parseClassElementName(n),this.pushClassAccessorProperty(t,p,F)}else this.isLineTerminator()?N?this.pushClassPrivateProperty(t,o):this.pushClassProperty(t,n):this.unexpected()}parseClassElementName(t){let{type:e,value:s}=this.state;if((e===132||e===134)&&t.static&&s==="prototype"&&this.raise(u.StaticPrototype,this.state.startLoc),e===139){s==="constructor"&&this.raise(u.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(208);let i=this.state.labels;this.state.labels=[],this.prodParam.enter(0);let r=e.body=[];this.parseBlockOrModuleBlockBody(r,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(u.DecoratorStaticBlock,e)}pushClassProperty(t,e){!e.computed&&this.nameIsConstructor(e.key)&&this.raise(u.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(u.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,r,a){t.body.push(this.parseMethod(e,s,i,r,a,"ClassMethod",!0))}pushClassPrivateMethod(t,e,s,i){let r=this.parseMethod(e,s,i,!1,!1,"ClassPrivateMethod",!0);t.body.push(r);let a=r.kind==="get"?r.static?6:2:r.kind==="set"?r.static?5:1:0;this.declareClassPrivateMethodInScope(r,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(80),this.expressionScope.enter(At()),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(D(this.state.type))t.id=this.parseIdentifier(),e&&this.declareNameFromIdentifier(t.id,i);else if(s||!e)t.id=null;else throw this.raise(u.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),r=!i||this.eat(12),a=r&&this.eatExportStar(t),n=a&&this.maybeParseExportNamespaceSpecifier(t),o=r&&(!n||this.eat(12)),p=i||a;if(a&&!n){if(i&&this.unexpected(),e)throw this.raise(u.UnsupportedDecoratorExport,t);return this.parseExportFrom(t,!0),this.finishNode(t,"ExportAllDeclaration")}let h=this.maybeParseExportNamedSpecifiers(t);i&&r&&!a&&!h&&this.unexpected(null,5),n&&o&&this.unexpected(null,98);let d;if(p||h){if(d=!1,e)throw this.raise(u.UnsupportedDecoratorExport,t);this.parseExportFrom(t,p)}else d=this.maybeParseExportDeclaration(t);if(p||h||d){var y;let A=t;if(this.checkExport(A,!0,!1,!!A.source),((y=A.declaration)==null?void 0:y.type)==="ClassDeclaration")this.maybeTakeDecorators(e,A.declaration,A);else if(e)throw this.raise(u.UnsupportedDecoratorExport,t);return this.finishNode(A,"ExportNamedDeclaration")}if(this.eat(65)){let A=t,T=this.parseExportDefaultExpression();if(A.declaration=T,T.type==="ClassDeclaration")this.maybeTakeDecorators(e,T,A);else if(e)throw this.raise(u.UnsupportedDecoratorExport,t);return this.checkExport(A,!0,!0),this.finishNode(A,"ExportDefaultDeclaration")}this.unexpected(null,5)}eatExportStar(t){return this.eat(55)}maybeParseExportDefaultSpecifier(t,e){if(e||this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom",e==null?void 0: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;(e=t).specifiers!=null||(e.specifiers=[]);let s=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),s.exported=this.parseModuleExportName(),t.specifiers.push(this.finishNode(s,"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,e.declaration=null,this.hasPlugin("importAssertions")&&(e.assertions=[]),!0}return!1}maybeParseExportDeclaration(t){return this.shouldParseExportDeclaration()?(t.specifiers=[],t.source=null,this.hasPlugin("importAssertions")&&(t.assertions=[]),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(u.DecoratorBeforeExport,this.state.startLoc),this.parseClass(this.maybeTakeDecorators(this.parseDecorators(!1),this.startNode()),!0,!0);if(this.match(75)||this.match(74)||this.isLet())throw this.raise(u.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(D(t)){if(t===95&&!this.state.containsEsc||t===100)return!1;if((t===130||t===129)&&!this.state.containsEsc){let{type:i}=this.lookahead();if(D(i)&&i!==98||i===5)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||D(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(u.DecoratorBeforeExport,this.state.startLoc),!0):this.isContextual(107)?(this.raise(u.UsingDeclarationExport,this.state.startLoc),!0):this.isContextual(96)&&this.startsAwaitUsing()?(this.raise(u.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 r;if(s){if(this.checkDuplicateExports(t,"default"),this.hasPlugin("exportDefaultFrom")){var a;let n=t.declaration;n.type==="Identifier"&&n.name==="from"&&n.end-n.start===4&&!((a=n.extra)!=null&&a.parenthesized)&&this.raise(u.ExportDefaultFromAsIdentifier,n)}}else if((r=t.specifiers)!=null&&r.length)for(let n of t.specifiers){let{exported:o}=n,p=o.type==="Identifier"?o.name:o.value;if(this.checkDuplicateExports(n,p),!i&&n.local){let{local:h}=n;h.type!=="Identifier"?this.raise(u.ExportBindingIsString,n,{localName:h.value,exportName:p}):(this.checkReservedWord(h.name,h.loc.start,!0,!1),this.scope.checkLocalExport(h))}}else if(t.declaration){let n=t.declaration;if(n.type==="FunctionDeclaration"||n.type==="ClassDeclaration"){let{id:o}=n;if(!o)throw new Error("Assertion failure");this.checkDuplicateExports(t,o.name)}else if(n.type==="VariableDeclaration")for(let o of n.declarations)this.checkDeclaration(o.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(u.DuplicateDefaultExport,t):this.raise(u.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),r=this.match(134),a=this.startNode();a.local=this.parseModuleExportName(),e.push(this.parseExportSpecifier(a,r,t,i))}return e}parseExportSpecifier(t,e,s,i){return this.eatContextual(93)?t.exported=this.parseModuleExportName():e?t.exported=ti(t.local):t.exported||(t.exported=$(t.local)),this.finishNode(t,"ExportSpecifier")}parseModuleExportName(){if(this.match(134)){let t=this.parseStringLiteral(this.state.value),e=wi.exec(t.value);return e&&this.raise(u.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(u.SourcePhaseImportRequiresDefault,e[0].loc.start);else if(t.phase==="defer")s!=="ImportNamespaceSpecifier"&&this.raise(u.DeferImportRequiresNamespace,e[0].loc.start);else if(t.module){var i;s!=="ImportDefaultSpecifier"&&this.raise(u.ImportReflectionNotBinding,e[0].loc.start),((i=t.assertions)==null?void 0:i.length)>0&&this.raise(u.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 r;if(i.type==="ExportSpecifier"?r=i.local:i.type==="ImportSpecifier"&&(r=i.imported),r!==void 0)return r.type==="Identifier"?r.name!=="default":r.value!=="default"});s!==void 0&&this.raise(u.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.parseIdentifier(!0),{type:i}=this.state;return(U(i)?i!==98||this.lookaheadCharCode()===102:i!==12)?(this.resetPreviousIdentifierLeadingComments(s),this.applyImportPhase(t,e,s.name,s.loc.start),null):(this.applyImportPhase(t,e,null),s)}isPrecedingIdImportPhase(t){let{type:e}=this.state;return D(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 s=!this.maybeParseDefaultImportSpecifier(t,e)||this.eat(12),i=s&&this.maybeParseStarImportSpecifier(t);return s&&!i&&this.parseNamedImportSpecifiers(t),this.expectContextual(98),this.parseImportSourceAndAttributes(t)}parseImportSourceAndAttributes(t){return t.specifiers!=null||(t.specifiers=[]),t.source=this.parseImportSource(),this.maybeParseImportAttributes(t),this.checkImportReflection(t),this.checkJSONModuleImport(t),this.semicolon(),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(u.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(u.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(u.ModuleAttributeDifferentFromType,s.key),e.has(s.key.name)&&this.raise(u.ModuleAttributesWithDuplicateKeys,s.key,{key:s.key.name}),e.add(s.key.name),this.expect(14),!this.match(134))throw this.raise(u.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():e=this.parseImportAttributes(),s=!0}else this.isContextual(94)&&!this.hasPrecedingLineBreak()?(!this.hasPlugin("deprecatedImportAssert")&&!this.hasPlugin("importAssertions")&&this.raise(u.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(U(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(u.DestructureNamedImport,this.state.startLoc);if(this.expect(12),this.eat(8))break}let s=this.startNode(),i=this.match(134),r=this.isContextual(130);s.imported=this.parseModuleExportName();let a=this.parseImportSpecifier(s,i,t.importKind==="type"||t.importKind==="typeof",r,void 0);t.specifiers.push(a)}}parseImportSpecifier(t,e,s,i,r){if(this.eatContextual(93))t.local=this.parseIdentifier();else{let{imported:a}=t;if(e)throw this.raise(u.ImportBindingIsString,t,{importName:a.value});this.checkReservedWord(a.name,t.loc.start,!0,!0),t.local||(t.local=$(a))}return this.finishImportSpecifier(t,"ImportSpecifier",r)}isThisParam(t){return t.type==="Identifier"&&t.name==="this"}},kt=class extends Ni{constructor(t,e,s){t=hs(t),super(t,e),this.options=t,this.initializeScopes(),this.plugins=s,this.filename=t.sourceFilename,this.startIndex=t.startIndex;let i=0;t.allowAwaitOutsideFunction&&(i|=1),t.allowReturnOutsideFunction&&(i|=2),t.allowImportExportEverywhere&&(i|=8),t.allowSuperOutsideMethod&&(i|=16),t.allowUndeclaredExports&&(i|=32),t.allowNewTargetOutsideFunction&&(i|=4),t.ranges&&(i|=64),t.tokens&&(i|=128),t.createImportExpressions&&(i|=256),t.createParenthesizedExpressions&&(i|=512),t.errorRecovery&&(i|=1024),t.attachComment&&(i|=2048),t.annexB&&(i|=4096),this.optionFlags=i}getScopeHandler(){return Ue}parse(){this.enterInitialScopes();let t=this.startNode(),e=this.startNode();return this.nextToken(),t.errors=null,this.parseTopLevel(t,e),t.errors=this.state.errors,t.comments.length=this.state.commentsLen,t}};function vi(t,e){var s;if(((s=e)==null?void 0:s.sourceType)==="unambiguous"){e=Object.assign({},e);try{e.sourceType="module";let i=ce(e,t),r=i.parse();if(i.sawUnambiguousESM)return r;if(i.ambiguousScriptDifferentAst)try{return e.sourceType="script",ce(e,t).parse()}catch{}else r.program.sourceType="script";return r}catch(i){try{return e.sourceType="script",ce(e,t).parse()}catch{}throw i}}else return ce(e,t).parse()}function ki(t,e){let s=ce(e,t);return s.options.strictMode&&(s.state.strict=!0),s.getExpression()}function Di(t){let e={};for(let s of Object.keys(t))e[s]=V(t[s]);return e}var Fi=Di(cs);function ce(t,e){let s=kt,i=new Map;if(t!=null&&t.plugins){for(let r of t.plugins){let a,n;typeof r=="string"?a=r:[a,n]=r,i.has(a)||i.set(a,n||{})}bi(i),s=Li(i)}return new s(t,e,i)}var Dt=new Map;function Li(t){let e=[];for(let r of Ei)t.has(r)&&e.push(r);let s=e.join("|"),i=Dt.get(s);if(!i){i=kt;for(let r of e)i=vt[r](i);Dt.set(s,i)}return i}l.parse=vi,l.parseExpression=ki,l.tokTypes=Fi}),Kt={};_i(Kt,{parsers:()=>Jr});var Ft=Vt(qt(),1);function Jt(l){return(c,m,x)=>{let f=!!(x!=null&&x.backwards);if(m===!1)return!1;let{length:C}=c,S=m;for(;S>=0&&S<C;){let M=c.charAt(S);if(l instanceof RegExp){if(!l.test(M))return S}else if(!l.includes(M))return S;f?S--:S++}return S===-1||S===C?S:!1}}var zi=Jt(" "),Vi=Jt(/[^\n\r]/u);function qi(l,c){if(c===!1)return!1;if(l.charAt(c)==="/"&&l.charAt(c+1)==="*"){for(let m=c+2;m<l.length;++m)if(l.charAt(m)==="*"&&l.charAt(m+1)==="/")return m+2}return c}var $i=qi;function Ki(l,c,m){let x=!!(m!=null&&m.backwards);if(c===!1)return!1;let f=l.charAt(c);if(x){if(l.charAt(c-1)==="\r"&&f===`
9
+ `)return c-2;if(f===`
10
+ `||f==="\r"||f==="\u2028"||f==="\u2029")return c-1}else{if(f==="\r"&&l.charAt(c+1)===`
11
+ `)return c+2;if(f===`
12
+ `||f==="\r"||f==="\u2028"||f==="\u2029")return c+1}return c}var Ji=Ki;function Wi(l,c){return c===!1?!1:l.charAt(c)==="/"&&l.charAt(c+1)==="/"?Vi(l,c):c}var Xi=Wi;function Gi(l,c){let m=null,x=c;for(;x!==m;)m=x,x=zi(l,x),x=$i(l,x),x=Xi(l,x),x=Ji(l,x);return x}var Yi=Gi;function Qi(l){let c=[];for(let m of l)try{return m()}catch(x){c.push(x)}throw Object.assign(new Error("All combinations failed"),{errors:c})}var Zi=Qi;function er(l){if(!l.startsWith("#!"))return"";let c=l.indexOf(`
13
+ `);return c===-1?l:l.slice(0,c)}var Wt=er,tr=(l,c,m)=>{if(!(l&&c==null))return Array.isArray(c)||typeof c=="string"?c[m<0?c.length+m:m]:c.at(m)},Lt=tr;function sr(l){return Array.isArray(l)&&l.length>0}var et=sr;function _(l){var c,m,x;let f=((c=l.range)==null?void 0:c[0])??l.start,C=(x=((m=l.declaration)==null?void 0:m.decorators)??l.decorators)==null?void 0:x[0];return C?Math.min(_(C),f):f}function ee(l){var c;return((c=l.range)==null?void 0:c[1])??l.end}function ir(l){let c=new Set(l);return m=>c.has(m==null?void 0:m.type)}var rr=ir,ar=rr(["Block","CommentBlock","MultiLine"]),Ge=ar;function nr(l){let c=`*${l.value}*`.split(`
14
+ `);return c.length>1&&c.every(m=>m.trimStart()[0]==="*")}var Bt=nr;function or(l){return Ge(l)&&l.value[0]==="*"&&/@(?:type|satisfies)\b/u.test(l.value)}var hr=or,de=null;function fe(l){if(de!==null&&typeof de.property){let c=de;return de=fe.prototype=null,c}return de=fe.prototype=l??Object.create(null),new fe}var pr=10;for(let l=0;l<=pr;l++)fe();function lr(l){return fe(l)}function ur(l,c="type"){lr(l);function m(x){let f=x[c],C=l[f];if(!Array.isArray(C))throw Object.assign(new Error(`Missing visitor keys for '${f}'.`),{node:x});return C}return m}var cr=ur,dr={ArrayExpression:["elements"],AssignmentExpression:["left","right"],BinaryExpression:["left","right"],InterpreterDirective:[],Directive:["value"],DirectiveLiteral:[],BlockStatement:["directives","body"],BreakStatement:["label"],CallExpression:["callee","arguments","typeParameters","typeArguments"],CatchClause:["param","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExpressionStatement:["expression"],File:["program"],ForInStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","typeParameters","params","predicate","returnType","body"],FunctionExpression:["id","typeParameters","params","returnType","body"],Identifier:["typeAnnotation","decorators"],IfStatement:["test","consequent","alternate"],LabeledStatement:["label","body"],StringLiteral:[],NumericLiteral:[],NullLiteral:[],BooleanLiteral:[],RegExpLiteral:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],NewExpression:["callee","arguments","typeParameters","typeArguments"],Program:["directives","body"],ObjectExpression:["properties"],ObjectMethod:["decorators","key","typeParameters","params","returnType","body"],ObjectProperty:["key","value","decorators"],RestElement:["argument","typeAnnotation","decorators"],ReturnStatement:["argument"],SequenceExpression:["expressions"],ParenthesizedExpression:["expression"],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],AssignmentPattern:["left","right","decorators","typeAnnotation"],ArrayPattern:["elements","typeAnnotation","decorators"],ArrowFunctionExpression:["typeParameters","params","predicate","returnType","body"],ClassBody:["body"],ClassExpression:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body","superTypeArguments"],ClassDeclaration:["decorators","id","typeParameters","superClass","superTypeParameters","mixins","implements","body","superTypeArguments"],ExportAllDeclaration:["source","attributes","exported"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source","attributes"],ExportSpecifier:["local","exported"],ForOfStatement:["left","right","body"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],ImportExpression:["source","options"],MetaProperty:["meta","property"],ClassMethod:["decorators","key","typeParameters","params","returnType","body"],ObjectPattern:["properties","typeAnnotation","decorators"],SpreadElement:["argument"],Super:[],TaggedTemplateExpression:["tag","typeParameters","quasi","typeArguments"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],YieldExpression:["argument"],AwaitExpression:["argument"],BigIntLiteral:[],ExportNamespaceSpecifier:["exported"],OptionalMemberExpression:["object","property"],OptionalCallExpression:["callee","arguments","typeParameters","typeArguments"],ClassProperty:["decorators","variance","key","typeAnnotation","value"],ClassAccessorProperty:["decorators","key","typeAnnotation","value"],ClassPrivateProperty:["decorators","variance","key","typeAnnotation","value"],ClassPrivateMethod:["decorators","key","typeParameters","params","returnType","body"],PrivateName:["id"],StaticBlock:["body"],AnyTypeAnnotation:[],ArrayTypeAnnotation:["elementType"],BooleanTypeAnnotation:[],BooleanLiteralTypeAnnotation:[],NullLiteralTypeAnnotation:[],ClassImplements:["id","typeParameters"],DeclareClass:["id","typeParameters","extends","mixins","implements","body"],DeclareFunction:["id","predicate"],DeclareInterface:["id","typeParameters","extends","body"],DeclareModule:["id","body"],DeclareModuleExports:["typeAnnotation"],DeclareTypeAlias:["id","typeParameters","right"],DeclareOpaqueType:["id","typeParameters","supertype"],DeclareVariable:["id"],DeclareExportDeclaration:["declaration","specifiers","source","attributes"],DeclareExportAllDeclaration:["source","attributes"],DeclaredPredicate:["value"],ExistsTypeAnnotation:[],FunctionTypeAnnotation:["typeParameters","this","params","rest","returnType"],FunctionTypeParam:["name","typeAnnotation"],GenericTypeAnnotation:["id","typeParameters"],InferredPredicate:[],InterfaceExtends:["id","typeParameters"],InterfaceDeclaration:["id","typeParameters","extends","body"],InterfaceTypeAnnotation:["extends","body"],IntersectionTypeAnnotation:["types"],MixedTypeAnnotation:[],EmptyTypeAnnotation:[],NullableTypeAnnotation:["typeAnnotation"],NumberLiteralTypeAnnotation:[],NumberTypeAnnotation:[],ObjectTypeAnnotation:["properties","indexers","callProperties","internalSlots"],ObjectTypeInternalSlot:["id","value"],ObjectTypeCallProperty:["value"],ObjectTypeIndexer:["variance","id","key","value"],ObjectTypeProperty:["key","value","variance"],ObjectTypeSpreadProperty:["argument"],OpaqueType:["id","typeParameters","supertype","impltype"],QualifiedTypeIdentifier:["qualification","id"],StringLiteralTypeAnnotation:[],StringTypeAnnotation:[],SymbolTypeAnnotation:[],ThisTypeAnnotation:[],TupleTypeAnnotation:["types","elementTypes"],TypeofTypeAnnotation:["argument","typeArguments"],TypeAlias:["id","typeParameters","right"],TypeAnnotation:["typeAnnotation"],TypeCastExpression:["expression","typeAnnotation"],TypeParameter:["bound","default","variance"],TypeParameterDeclaration:["params"],TypeParameterInstantiation:["params"],UnionTypeAnnotation:["types"],Variance:[],VoidTypeAnnotation:[],EnumDeclaration:["id","body"],EnumBooleanBody:["members"],EnumNumberBody:["members"],EnumStringBody:["members"],EnumSymbolBody:["members"],EnumBooleanMember:["id","init"],EnumNumberMember:["id","init"],EnumStringMember:["id","init"],EnumDefaultedMember:["id"],IndexedAccessType:["objectType","indexType"],OptionalIndexedAccessType:["objectType","indexType"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXSpreadChild:["expression"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","typeParameters","typeArguments","attributes"],JSXSpreadAttribute:["argument"],JSXText:[],JSXFragment:["openingFragment","children","closingFragment"],JSXOpeningFragment:[],JSXClosingFragment:[],Noop:[],Placeholder:[],V8IntrinsicIdentifier:[],ArgumentPlaceholder:[],BindExpression:["object","callee"],ImportAttribute:["key","value"],Decorator:["expression"],DoExpression:["body"],ExportDefaultSpecifier:["exported"],RecordExpression:["properties"],TupleExpression:["elements"],ModuleExpression:["body"],TopicReference:[],PipelineTopicExpression:["expression"],PipelineBareFunction:["callee"],PipelinePrimaryTopicReference:[],TSParameterProperty:["parameter","decorators"],TSDeclareFunction:["id","typeParameters","params","returnType","body"],TSDeclareMethod:["decorators","key","typeParameters","params","returnType"],TSQualifiedName:["left","right"],TSCallSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructSignatureDeclaration:["typeParameters","parameters","typeAnnotation","params","returnType"],TSPropertySignature:["key","typeAnnotation"],TSMethodSignature:["key","typeParameters","parameters","typeAnnotation","params","returnType"],TSIndexSignature:["parameters","typeAnnotation"],TSAnyKeyword:[],TSBooleanKeyword:[],TSBigIntKeyword:[],TSIntrinsicKeyword:[],TSNeverKeyword:[],TSNullKeyword:[],TSNumberKeyword:[],TSObjectKeyword:[],TSStringKeyword:[],TSSymbolKeyword:[],TSUndefinedKeyword:[],TSUnknownKeyword:[],TSVoidKeyword:[],TSThisType:[],TSFunctionType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSConstructorType:["typeParameters","parameters","typeAnnotation","params","returnType"],TSTypeReference:["typeName","typeParameters","typeArguments"],TSTypePredicate:["parameterName","typeAnnotation"],TSTypeQuery:["exprName","typeParameters","typeArguments"],TSTypeLiteral:["members"],TSArrayType:["elementType"],TSTupleType:["elementTypes"],TSOptionalType:["typeAnnotation"],TSRestType:["typeAnnotation"],TSNamedTupleMember:["label","elementType"],TSUnionType:["types"],TSIntersectionType:["types"],TSConditionalType:["checkType","extendsType","trueType","falseType"],TSInferType:["typeParameter"],TSParenthesizedType:["typeAnnotation"],TSTypeOperator:["typeAnnotation"],TSIndexedAccessType:["objectType","indexType"],TSMappedType:["typeParameter","nameType","typeAnnotation"],TSTemplateLiteralType:["quasis","types"],TSLiteralType:["literal"],TSExpressionWithTypeArguments:["expression","typeParameters"],TSInterfaceDeclaration:["id","typeParameters","extends","body"],TSInterfaceBody:["body"],TSTypeAliasDeclaration:["id","typeParameters","typeAnnotation"],TSInstantiationExpression:["expression","typeParameters","typeArguments"],TSAsExpression:["expression","typeAnnotation"],TSSatisfiesExpression:["expression","typeAnnotation"],TSTypeAssertion:["typeAnnotation","expression"],TSEnumBody:["members"],TSEnumDeclaration:["id","members"],TSEnumMember:["id","initializer"],TSModuleDeclaration:["id","body"],TSModuleBlock:["body"],TSImportType:["argument","options","qualifier","typeParameters","typeArguments"],TSImportEqualsDeclaration:["id","moduleReference"],TSExternalModuleReference:["expression"],TSNonNullExpression:["expression"],TSExportAssignment:["expression"],TSNamespaceExportDeclaration:["id"],TSTypeAnnotation:["typeAnnotation"],TSTypeParameterInstantiation:["params"],TSTypeParameterDeclaration:["params"],TSTypeParameter:["constraint","default","name"],ChainExpression:["expression"],ExperimentalRestProperty:["argument"],ExperimentalSpreadProperty:["argument"],Literal:[],MethodDefinition:["decorators","key","value"],PrivateIdentifier:[],Property:["key","value"],PropertyDefinition:["decorators","key","typeAnnotation","value","variance"],AccessorProperty:["decorators","key","typeAnnotation","value"],TSAbstractAccessorProperty:["decorators","key","typeAnnotation"],TSAbstractKeyword:[],TSAbstractMethodDefinition:["key","value"],TSAbstractPropertyDefinition:["decorators","key","typeAnnotation"],TSAsyncKeyword:[],TSClassImplements:["expression","typeArguments","typeParameters"],TSDeclareKeyword:[],TSEmptyBodyFunctionExpression:["id","typeParameters","params","returnType"],TSExportKeyword:[],TSInterfaceHeritage:["expression","typeArguments","typeParameters"],TSPrivateKeyword:[],TSProtectedKeyword:[],TSPublicKeyword:[],TSReadonlyKeyword:[],TSStaticKeyword:[],AsConstExpression:["expression"],AsExpression:["expression","typeAnnotation"],BigIntLiteralTypeAnnotation:[],BigIntTypeAnnotation:[],ComponentDeclaration:["id","params","body","typeParameters","rendersType"],ComponentParameter:["name","local"],ComponentTypeAnnotation:["params","rest","typeParameters","rendersType"],ComponentTypeParameter:["name","typeAnnotation"],ConditionalTypeAnnotation:["checkType","extendsType","trueType","falseType"],DeclareComponent:["id","params","rest","typeParameters","rendersType"],DeclareEnum:["id","body"],DeclareHook:["id"],DeclareNamespace:["id","body"],EnumBigIntBody:["members"],EnumBigIntMember:["id","init"],HookDeclaration:["id","params","body","typeParameters","returnType"],HookTypeAnnotation:["params","returnType","rest","typeParameters"],InferTypeAnnotation:["typeParameter"],KeyofTypeAnnotation:["argument"],ObjectTypeMappedTypeProperty:["keyTparam","propType","sourceType","variance"],QualifiedTypeofIdentifier:["qualification","id"],TupleTypeLabeledElement:["label","elementType","variance"],TupleTypeSpreadElement:["label","typeAnnotation"],TypeOperator:["typeAnnotation"],TypePredicate:["parameterName","typeAnnotation","asserts"],NGRoot:["node"],NGPipeExpression:["left","right","arguments"],NGChainedExpression:["expressions"],NGEmptyExpression:[],NGMicrosyntax:["body"],NGMicrosyntaxKey:[],NGMicrosyntaxExpression:["expression","alias"],NGMicrosyntaxKeyedExpression:["key","expression"],NGMicrosyntaxLet:["key","value"],NGMicrosyntaxAs:["key","alias"],JsExpressionRoot:["node"],JsonRoot:["node"],TSJSDocAllType:[],TSJSDocUnknownType:[],TSJSDocNullableType:["typeAnnotation"],TSJSDocNonNullableType:["typeAnnotation"],NeverTypeAnnotation:[],UndefinedTypeAnnotation:[],UnknownTypeAnnotation:[],SatisfiesExpression:["expression","typeAnnotation"]},mr=cr(dr),fr=mr;function Ye(l,c){if(!(l!==null&&typeof l=="object"))return l;if(Array.isArray(l)){for(let x=0;x<l.length;x++)l[x]=Ye(l[x],c);return l}let m=fr(l);for(let x=0;x<m.length;x++)l[m[x]]=Ye(l[m[x]],c);return c(l)||l}var We=Ye;function yr(l,c){let{parser:m,text:x}=c;if(l.type==="File"&&l.program.interpreter){let{program:{interpreter:f},comments:C}=l;delete l.program.interpreter,C.unshift(f)}if(m==="babel"){let f=new Set;l=We(l,C=>{var S;(S=C.leadingComments)!=null&&S.some(hr)&&f.add(_(C))}),l=We(l,C=>{if(C.type==="ParenthesizedExpression"){let{expression:S}=C;if(S.type==="TypeCastExpression")return S.range=[...C.range],S;let M=_(C);if(!f.has(M))return S.extra={...S.extra,parenthesized:!0},S}})}if(l=We(l,f=>{switch(f.type){case"LogicalExpression":if(Xt(f))return Qe(f);break;case"VariableDeclaration":{let C=Lt(!1,f.declarations,-1);C!=null&&C.init&&x[ee(C)]!==";"&&(f.range=[_(f),ee(C)]);break}case"TSParenthesizedType":return f.typeAnnotation;case"TSTypeParameter":if(typeof f.name=="string"){let C=_(f);f.name={type:"Identifier",name:f.name,range:[C,C+f.name.length]}}break;case"TopicReference":l.extra={...l.extra,__isUsingHackPipeline:!0};break;case"TSUnionType":case"TSIntersectionType":if(f.types.length===1)return f.types[0];break}}),et(l.comments)){let f=Lt(!1,l.comments,-1);for(let C=l.comments.length-2;C>=0;C--){let S=l.comments[C];ee(S)===_(f)&&Ge(S)&&Ge(f)&&Bt(S)&&Bt(f)&&(l.comments.splice(C+1,1),S.value+="*//*"+f.value,S.range=[_(S),ee(f)]),f=S}}return l.type==="Program"&&(l.range=[0,x.length]),l}function Xt(l){return l.type==="LogicalExpression"&&l.right.type==="LogicalExpression"&&l.operator===l.right.operator}function Qe(l){return Xt(l)?Qe({type:"LogicalExpression",operator:l.operator,left:Qe({type:"LogicalExpression",operator:l.operator,left:l.left,right:l.right.left,range:[_(l.left),ee(l.right.left)]}),right:l.right.right,range:[_(l),ee(l)]}):l}var xr=yr;function Pr(l,c){let m=new SyntaxError(l+" ("+c.loc.start.line+":"+c.loc.start.column+")");return Object.assign(m,c)}var Gt=Pr;function Ar(l){let{message:c,loc:{line:m,column:x},reasonCode:f}=l,C=l;(f==="MissingPlugin"||f==="MissingOneOfPlugins")&&(c="Unexpected token.",C=void 0);let S=` (${m}:${x})`;return c.endsWith(S)&&(c=c.slice(0,-S.length)),Gt(c,{loc:{start:{line:m,column:x+1}},cause:C})}var Yt=Ar,gr=(l,c,m,x)=>{if(!(l&&c==null))return c.replaceAll?c.replaceAll(m,x):m.global?c.replace(m,x):c.split(m).join(x)},Ce=gr,Tr=/\*\/$/,br=/^\/\*\*?/,Er=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/,Cr=/(^|\s+)\/\/([^\n\r]*)/g,Mt=/^(\r?\n)+/,Sr=/(?:^|\r?\n) *(@[^\n\r]*?) *\r?\n *(?![^\n\r@]*\/\/[^]*)([^\s@][^\n\r@]+?) *\r?\n/g,Ot=/(?:^|\r?\n) *@(\S+) *([^\n\r]*)/g,wr=/(\r?\n|^) *\* ?/g,Ir=[];function Nr(l){let c=l.match(Er);return c?c[0].trimStart():""}function vr(l){let c=`
15
+ `;l=Ce(!1,l.replace(br,"").replace(Tr,""),wr,"$1");let m="";for(;m!==l;)m=l,l=Ce(!1,l,Sr,`${c}$1 $2${c}`);l=l.replace(Mt,"").trimEnd();let x=Object.create(null),f=Ce(!1,l,Ot,"").replace(Mt,"").trimEnd(),C;for(;C=Ot.exec(l);){let S=Ce(!1,C[2],Cr,"");if(typeof x[C[1]]=="string"||Array.isArray(x[C[1]])){let M=x[C[1]];x[C[1]]=[...Ir,...Array.isArray(M)?M:[M],S]}else x[C[1]]=S}return{comments:f,pragmas:x}}function kr(l){let c=Wt(l);c&&(l=l.slice(c.length+1));let m=Nr(l),{pragmas:x,comments:f}=vr(m);return{shebang:c,text:l,pragmas:x,comments:f}}function Dr(l){let{pragmas:c}=kr(l);return Object.prototype.hasOwnProperty.call(c,"prettier")||Object.prototype.hasOwnProperty.call(c,"format")}function Fr(l){return l=typeof l=="function"?{parse:l}:l,{astFormat:"estree",hasPragma:Dr,locStart:_,locEnd:ee,...l}}var me=Fr;function Lr(l){let{filepath:c}=l;if(c){if(c=c.toLowerCase(),c.endsWith(".cjs")||c.endsWith(".cts"))return"script";if(c.endsWith(".mjs")||c.endsWith(".mts"))return"module"}}var Br=Lr;function Mr(l,c){let{type:m="JsExpressionRoot",rootMarker:x,text:f}=c,{tokens:C,comments:S}=l;return delete l.tokens,delete l.comments,{tokens:C,comments:S,type:m,node:l,range:[0,f.length],rootMarker:x}}var Qt=Mr,ae=l=>me(_r(l)),Or={sourceType:"module",allowImportExportEverywhere:!0,allowReturnOutsideFunction:!0,allowNewTargetOutsideFunction:!0,allowSuperOutsideMethod:!0,allowUndeclaredExports:!0,errorRecovery:!0,createParenthesizedExpressions:!0,createImportExpressions:!0,plugins:["doExpressions","exportDefaultFrom","functionBind","functionSent","throwExpressions","partialApplication","decorators","moduleBlocks","asyncDoExpressions","destructuringPrivate","decoratorAutoAccessors","explicitResourceManagement","sourcePhaseImports","deferredImportEvaluation",["optionalChainingAssign",{version:"2023-07"}],"recordAndTuple"],tokens:!0,ranges:!0},Rt="v8intrinsic",jt=[["pipelineOperator",{proposal:"hack",topicToken:"%"}],["pipelineOperator",{proposal:"fsharp"}]],K=(l,c=Or)=>({...c,plugins:[...c.plugins,...l]}),Rr=/@(?:no)?flow\b/u;function jr(l,c){var m;if((m=c.filepath)!=null&&m.endsWith(".js.flow"))return!0;let x=Wt(l);x&&(l=l.slice(x.length));let f=Yi(l,0);return f!==!1&&(l=l.slice(0,f)),Rr.test(l)}function Ur(l,c,m){let x=l(c,m),f=x.errors.find(C=>!Hr.has(C.reasonCode));if(f)throw f;return x}function _r({isExpression:l=!1,optionsCombinations:c}){return(m,x={})=>{if((x.parser==="babel"||x.parser==="__babel_estree")&&jr(m,x))return x.parser="babel-flow",es.parse(m,x);let f=c;(x.__babelSourceType??Br(x))==="script"&&(f=f.map(R=>({...R,sourceType:"script"})));let C=/%[A-Z]/u.test(m);m.includes("|>")?f=(C?[...jt,Rt]:jt).flatMap(R=>f.map(Se=>K([R],Se))):C&&(f=f.map(R=>K([Rt],R)));let S=l?Ft.parseExpression:Ft.parse,M;try{M=Zi(f.map(R=>()=>Ur(S,m,R)))}catch({errors:[R]}){throw Yt(R)}return l&&(M=Qt(M,{text:m,rootMarker:x.rootMarker})),xr(M,{parser:"babel",text:m})}}var Hr=new Set(["StrictNumericEscape","StrictWith","StrictOctalLiteral","StrictDelete","StrictEvalArguments","StrictEvalArgumentsBinding","StrictFunction","ForInOfLoopInitializer","EmptyTypeArguments","EmptyTypeParameters","ConstructorHasTypeParameters","UnsupportedParameterPropertyKind","DecoratorExportClass","ParamDupe","InvalidDecimal","RestTrailingComma","UnsupportedParameterDecorator","UnterminatedJsxContent","UnexpectedReservedWord","ModuleAttributesWithDuplicateKeys","LineTerminatorBeforeArrow","InvalidEscapeSequenceTemplate","NonAbstractClassHasAbstractMethod","OptionalTypeBeforeRequired","PatternIsOptional","OptionalBindingPattern","DeclareClassFieldHasInitializer","TypeImportCannotSpecifyDefaultAndNamed","ConstructorClassField","VarRedeclaration","InvalidPrivateFieldResolution","DuplicateExport","ImportAttributesUseAssert"]),Zt=[K(["jsx"])],Ut=ae({optionsCombinations:Zt}),_t=ae({optionsCombinations:[K(["jsx","typescript"]),K(["typescript"])]}),Ht=ae({isExpression:!0,optionsCombinations:[K(["jsx"])]}),zt=ae({isExpression:!0,optionsCombinations:[K(["typescript"])]}),es=ae({optionsCombinations:[K(["jsx",["flow",{all:!0}],"flowComments"])]}),zr=ae({optionsCombinations:Zt.map(l=>K(["estree"],l))}),Vr={babel:Ut,"babel-flow":es,"babel-ts":_t,__js_expression:Ht,__ts_expression:zt,__vue_expression:Ht,__vue_ts_expression:zt,__vue_event_binding:Ut,__vue_ts_event_binding:_t,__babel_estree:zr},qr=Vt(qt(),1);function ts(l={}){let{allowComments:c=!0}=l;return function(m){let x;try{x=(0,qr.parseExpression)(m,{tokens:!0,ranges:!0,attachComment:!1})}catch(f){throw Yt(f)}if(!c&&et(x.comments))throw Y(x.comments[0],"Comment");return re(x),Qt(x,{type:"JsonRoot",text:m})}}function Y(l,c){let[m,x]=[l.loc.start,l.loc.end].map(({line:f,column:C})=>({line:f,column:C+1}));return Gt(`${c} is not allowed in JSON.`,{loc:{start:m,end:x}})}function re(l){switch(l.type){case"ArrayExpression":for(let c of l.elements)c!==null&&re(c);return;case"ObjectExpression":for(let c of l.properties)re(c);return;case"ObjectProperty":if(l.computed)throw Y(l.key,"Computed key");if(l.shorthand)throw Y(l.key,"Shorthand property");l.key.type!=="Identifier"&&re(l.key),re(l.value);return;case"UnaryExpression":{let{operator:c,argument:m}=l;if(c!=="+"&&c!=="-")throw Y(l,`Operator '${l.operator}'`);if(m.type==="NumericLiteral"||m.type==="Identifier"&&(m.name==="Infinity"||m.name==="NaN"))return;throw Y(m,`Operator '${c}' before '${m.type}'`)}case"Identifier":if(l.name!=="Infinity"&&l.name!=="NaN"&&l.name!=="undefined")throw Y(l,`Identifier '${l.name}'`);return;case"TemplateLiteral":if(et(l.expressions))throw Y(l.expressions[0],"'TemplateLiteral' with expression");for(let c of l.quasis)re(c);return;case"NullLiteral":case"BooleanLiteral":case"NumericLiteral":case"StringLiteral":case"TemplateElement":return;default:throw Y(l,`'${l.type}'`)}}var Xe=ts(),$r={json:me({parse:Xe,hasPragma(){return!0}}),json5:me(Xe),jsonc:me(Xe),"json-stringify":me({parse:ts({allowComments:!1}),astFormat:"estree-json"})},Kr=$r,Jr={...Vr,...Kr},Wr=Kt;export{Wr as default,Jr as parsers};
16
+ //# sourceMappingURL=babel-70ddf1b3.js.map