@next-bricks/data-view 0.13.0 → 0.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (205) hide show
  1. package/dist/bricks.json +5 -5
  2. package/dist/chunks/{1646.7412ac5f.js → 1646.00f8ddfc.js} +2 -2
  3. package/dist/chunks/{1646.7412ac5f.js.map → 1646.00f8ddfc.js.map} +1 -1
  4. package/dist/chunks/2108.53f1e2b5.js.map +1 -1
  5. package/dist/chunks/{2916.34d5150f.js → 2502.f7f556e2.js} +2 -2
  6. package/dist/chunks/2502.f7f556e2.js.map +1 -0
  7. package/dist/chunks/2618.3b734d5a.js +2 -0
  8. package/dist/chunks/2618.3b734d5a.js.map +1 -0
  9. package/dist/chunks/2754.63e58b26.js +2 -0
  10. package/dist/chunks/2754.63e58b26.js.map +1 -0
  11. package/dist/chunks/{3458.66ce61b1.js → 3458.4c99153d.js} +2 -2
  12. package/dist/chunks/{8691.bfecd4c2.js.map → 3458.4c99153d.js.map} +1 -1
  13. package/dist/chunks/3494.c7a24423.js +2 -0
  14. package/dist/chunks/3494.c7a24423.js.map +1 -0
  15. package/dist/chunks/{4049.29408ae2.js → 4049.06228157.js} +2 -2
  16. package/dist/chunks/{4049.29408ae2.js.map → 4049.06228157.js.map} +1 -1
  17. package/dist/chunks/4770.7549442e.js +2 -0
  18. package/dist/chunks/4770.7549442e.js.map +1 -0
  19. package/dist/chunks/4791.ff1d135f.js.map +1 -1
  20. package/dist/chunks/{5114.c504ff08.js → 5114.e362fe95.js} +2 -2
  21. package/dist/chunks/5114.e362fe95.js.map +1 -0
  22. package/dist/chunks/5151.ce644081.js +2 -0
  23. package/dist/chunks/5151.ce644081.js.map +1 -0
  24. package/dist/chunks/{5636.d64d4d52.js → 5636.e1796a6a.js} +2 -2
  25. package/dist/chunks/{5636.d64d4d52.js.map → 5636.e1796a6a.js.map} +1 -1
  26. package/dist/chunks/5637.0144d974.js.map +1 -1
  27. package/dist/chunks/{5725.acd3173d.js → 5725.4e31534a.js} +2 -2
  28. package/dist/chunks/{5725.acd3173d.js.map → 5725.4e31534a.js.map} +1 -1
  29. package/dist/chunks/{6205.f18e341c.js → 6205.47b27d26.js} +2 -2
  30. package/dist/chunks/6205.47b27d26.js.map +1 -0
  31. package/dist/chunks/6252.a408a0a3.js.map +1 -1
  32. package/dist/chunks/6301.8283ed69.js +2 -0
  33. package/dist/chunks/6301.8283ed69.js.map +1 -0
  34. package/dist/chunks/{6473.4c7164f1.js → 6473.5bb88c66.js} +2 -2
  35. package/dist/chunks/{6473.4c7164f1.js.map → 6473.5bb88c66.js.map} +1 -1
  36. package/dist/chunks/6789.fcbbeadb.js.map +1 -1
  37. package/dist/chunks/{7164.f1274bef.js → 7164.272521bc.js} +2 -2
  38. package/dist/chunks/7164.272521bc.js.map +1 -0
  39. package/dist/chunks/{7672.f8c0d9d5.js → 7672.87ae5be6.js} +2 -2
  40. package/dist/chunks/{7672.f8c0d9d5.js.map → 7672.87ae5be6.js.map} +1 -1
  41. package/dist/chunks/{7746.58cce6af.js → 7746.66872fcf.js} +2 -2
  42. package/dist/chunks/{7746.58cce6af.js.map → 7746.66872fcf.js.map} +1 -1
  43. package/dist/chunks/7782.ba06ff15.js +2 -0
  44. package/dist/chunks/7782.ba06ff15.js.map +1 -0
  45. package/dist/chunks/7822.3c93ccc0.js +2 -0
  46. package/dist/chunks/7822.3c93ccc0.js.map +1 -0
  47. package/dist/chunks/{8691.bfecd4c2.js → 8691.dcf26a0c.js} +2 -2
  48. package/dist/chunks/{3458.66ce61b1.js.map → 8691.dcf26a0c.js.map} +1 -1
  49. package/dist/chunks/9526.b1b920ff.js +2 -0
  50. package/dist/chunks/9526.b1b920ff.js.map +1 -0
  51. package/dist/chunks/{app-wall-card-item.773b88a2.js → app-wall-card-item.940bfb27.js} +3 -3
  52. package/dist/chunks/app-wall-card-item.940bfb27.js.map +1 -0
  53. package/dist/chunks/{app-wall-relation-line.b3457721.js → app-wall-relation-line.7d23426d.js} +3 -3
  54. package/dist/chunks/app-wall-relation-line.7d23426d.js.map +1 -0
  55. package/dist/chunks/app-wall-system-card.bde6830e.js.map +1 -1
  56. package/dist/chunks/app-wall.016f9ec6.js +2 -0
  57. package/dist/chunks/app-wall.016f9ec6.js.map +1 -0
  58. package/dist/chunks/battery-chart.a80664a9.js +2 -0
  59. package/dist/chunks/battery-chart.a80664a9.js.map +1 -0
  60. package/dist/chunks/brick-notification.921c2ed3.js +2 -0
  61. package/dist/chunks/brick-notification.921c2ed3.js.map +1 -0
  62. package/dist/chunks/{cabinet-app-layer.7d13abc3.js → cabinet-app-layer.f6d22c56.js} +3 -3
  63. package/dist/chunks/cabinet-app-layer.f6d22c56.js.map +1 -0
  64. package/dist/chunks/{cabinet-button.eace0f9d.js → cabinet-button.6b3d36f2.js} +2 -2
  65. package/dist/chunks/cabinet-button.6b3d36f2.js.map +1 -0
  66. package/dist/chunks/cabinet-container.4a5f4b04.js +3 -0
  67. package/dist/chunks/cabinet-container.4a5f4b04.js.map +1 -0
  68. package/dist/chunks/cabinet-graph.c81b9297.js +2 -0
  69. package/dist/chunks/cabinet-graph.c81b9297.js.map +1 -0
  70. package/dist/chunks/{cabinet-node.ef54d0c4.js → cabinet-node.9c0cd3b5.js} +3 -3
  71. package/dist/chunks/cabinet-node.9c0cd3b5.js.map +1 -0
  72. package/dist/chunks/{cabinet-thumbnail.22282acb.js → cabinet-thumbnail.1027b046.js} +3 -3
  73. package/dist/chunks/{cabinet-thumbnail.22282acb.js.map → cabinet-thumbnail.1027b046.js.map} +1 -1
  74. package/dist/chunks/complex-search.48ed755e.js +2 -0
  75. package/dist/chunks/complex-search.48ed755e.js.map +1 -0
  76. package/dist/chunks/dropdown-menu.122b99af.js +3 -0
  77. package/dist/chunks/dropdown-menu.122b99af.js.map +1 -0
  78. package/dist/chunks/{gauge-chart.f4944080.js → gauge-chart.97728202.js} +2 -2
  79. package/dist/chunks/gauge-chart.97728202.js.map +1 -0
  80. package/dist/chunks/{gear-background.d94e02e2.js → gear-background.aa9c8881.js} +2 -2
  81. package/dist/chunks/gear-background.aa9c8881.js.map +1 -0
  82. package/dist/chunks/graph-layout-grid.9945798d.js +2 -0
  83. package/dist/chunks/graph-layout-grid.9945798d.js.map +1 -0
  84. package/dist/chunks/{graph-node.547a6dc9.js → graph-node.3b722d4b.js} +2 -2
  85. package/dist/chunks/graph-node.3b722d4b.js.map +1 -0
  86. package/dist/chunks/{graph-text.e913f91e.js → graph-text.e6e84fc4.js} +2 -2
  87. package/dist/chunks/graph-text.e6e84fc4.js.map +1 -0
  88. package/dist/chunks/{grid-background.8034709e.js → grid-background.5500a391.js} +2 -2
  89. package/dist/chunks/grid-background.5500a391.js.map +1 -0
  90. package/dist/chunks/hi-tech-button.fc429ec7.js +2 -0
  91. package/dist/chunks/hi-tech-button.fc429ec7.js.map +1 -0
  92. package/dist/chunks/lights-component-title.87c1f519.js +2 -0
  93. package/dist/chunks/lights-component-title.87c1f519.js.map +1 -0
  94. package/dist/chunks/loading-panel.e90ef9a2.js +2 -0
  95. package/dist/chunks/loading-panel.e90ef9a2.js.map +1 -0
  96. package/dist/chunks/main.670e210a.js +2 -0
  97. package/dist/chunks/main.670e210a.js.map +1 -0
  98. package/dist/chunks/{modern-style-component-title.0ecbc822.js → modern-style-component-title.122c04c8.js} +2 -2
  99. package/dist/chunks/modern-style-component-title.122c04c8.js.map +1 -0
  100. package/dist/chunks/{modern-style-page-title.6ec3a54a.js → modern-style-page-title.9c5b4fe4.js} +2 -2
  101. package/dist/chunks/modern-style-page-title.9c5b4fe4.js.map +1 -0
  102. package/dist/chunks/modern-style-treemap.a6ca1bfd.js +3 -0
  103. package/dist/chunks/modern-style-treemap.a6ca1bfd.js.map +1 -0
  104. package/dist/chunks/{particle-animation.0edae74c.js → particle-animation.cc736d30.js} +2 -2
  105. package/dist/chunks/particle-animation.cc736d30.js.map +1 -0
  106. package/dist/chunks/radar-chart.5de4e675.js +2 -0
  107. package/dist/chunks/radar-chart.5de4e675.js.map +1 -0
  108. package/dist/chunks/tabs-drawer.000b4e3e.js +3 -0
  109. package/dist/chunks/tabs-drawer.000b4e3e.js.map +1 -0
  110. package/dist/chunks/tabs-page-title.d7f34cdf.js +3 -0
  111. package/dist/chunks/tabs-page-title.d7f34cdf.js.map +1 -0
  112. package/dist/chunks/tech-mesh-base-view.e6d45c37.js +2 -0
  113. package/dist/chunks/tech-mesh-base-view.e6d45c37.js.map +1 -0
  114. package/dist/chunks/{title-text.0e67fd3e.js → title-text.1dac106c.js} +2 -2
  115. package/dist/chunks/title-text.1dac106c.js.map +1 -0
  116. package/dist/chunks/{top-title-bar.b61de75a.js → top-title-bar.0a07a3e1.js} +2 -2
  117. package/dist/chunks/top-title-bar.0a07a3e1.js.map +1 -0
  118. package/dist/index.d495e9e6.js +2 -0
  119. package/dist/index.d495e9e6.js.map +1 -0
  120. package/dist/manifest.json +66 -66
  121. package/dist/types.json +199 -199
  122. package/package.json +4 -4
  123. package/dist/chunks/2618.b7473aca.js +0 -2
  124. package/dist/chunks/2618.b7473aca.js.map +0 -1
  125. package/dist/chunks/2754.c7ac7717.js +0 -2
  126. package/dist/chunks/2754.c7ac7717.js.map +0 -1
  127. package/dist/chunks/2916.34d5150f.js.map +0 -1
  128. package/dist/chunks/3494.7b59fbc7.js +0 -2
  129. package/dist/chunks/3494.7b59fbc7.js.map +0 -1
  130. package/dist/chunks/4131.68cd0781.js +0 -2
  131. package/dist/chunks/4131.68cd0781.js.map +0 -1
  132. package/dist/chunks/4770.0dcb5da8.js +0 -2
  133. package/dist/chunks/4770.0dcb5da8.js.map +0 -1
  134. package/dist/chunks/5114.c504ff08.js.map +0 -1
  135. package/dist/chunks/5151.13888d0e.js +0 -2
  136. package/dist/chunks/5151.13888d0e.js.map +0 -1
  137. package/dist/chunks/6205.f18e341c.js.map +0 -1
  138. package/dist/chunks/6301.5bc48948.js +0 -2
  139. package/dist/chunks/6301.5bc48948.js.map +0 -1
  140. package/dist/chunks/7164.f1274bef.js.map +0 -1
  141. package/dist/chunks/7822.16f2edd6.js +0 -2
  142. package/dist/chunks/7822.16f2edd6.js.map +0 -1
  143. package/dist/chunks/9526.4ed72968.js +0 -2
  144. package/dist/chunks/9526.4ed72968.js.map +0 -1
  145. package/dist/chunks/app-wall-card-item.773b88a2.js.map +0 -1
  146. package/dist/chunks/app-wall-relation-line.b3457721.js.map +0 -1
  147. package/dist/chunks/app-wall.c42aea16.js +0 -2
  148. package/dist/chunks/app-wall.c42aea16.js.map +0 -1
  149. package/dist/chunks/battery-chart.bce01429.js +0 -2
  150. package/dist/chunks/battery-chart.bce01429.js.map +0 -1
  151. package/dist/chunks/brick-notification.849b2697.js +0 -2
  152. package/dist/chunks/brick-notification.849b2697.js.map +0 -1
  153. package/dist/chunks/cabinet-app-layer.7d13abc3.js.map +0 -1
  154. package/dist/chunks/cabinet-button.eace0f9d.js.map +0 -1
  155. package/dist/chunks/cabinet-container.8b79820d.js +0 -3
  156. package/dist/chunks/cabinet-container.8b79820d.js.map +0 -1
  157. package/dist/chunks/cabinet-graph.ccbdb7d8.js +0 -2
  158. package/dist/chunks/cabinet-graph.ccbdb7d8.js.map +0 -1
  159. package/dist/chunks/cabinet-node.ef54d0c4.js.map +0 -1
  160. package/dist/chunks/complex-search.9a396c27.js +0 -2
  161. package/dist/chunks/complex-search.9a396c27.js.map +0 -1
  162. package/dist/chunks/dropdown-menu.d845a097.js +0 -3
  163. package/dist/chunks/dropdown-menu.d845a097.js.map +0 -1
  164. package/dist/chunks/gauge-chart.f4944080.js.map +0 -1
  165. package/dist/chunks/gear-background.d94e02e2.js.map +0 -1
  166. package/dist/chunks/graph-layout-grid.596f5ff8.js +0 -2
  167. package/dist/chunks/graph-layout-grid.596f5ff8.js.map +0 -1
  168. package/dist/chunks/graph-node.547a6dc9.js.map +0 -1
  169. package/dist/chunks/graph-text.e913f91e.js.map +0 -1
  170. package/dist/chunks/grid-background.8034709e.js.map +0 -1
  171. package/dist/chunks/hi-tech-button.fcb724f8.js +0 -2
  172. package/dist/chunks/hi-tech-button.fcb724f8.js.map +0 -1
  173. package/dist/chunks/lights-component-title.6e709aa8.js +0 -2
  174. package/dist/chunks/lights-component-title.6e709aa8.js.map +0 -1
  175. package/dist/chunks/loading-panel.75c7fcdc.js +0 -2
  176. package/dist/chunks/loading-panel.75c7fcdc.js.map +0 -1
  177. package/dist/chunks/main.999836cf.js +0 -2
  178. package/dist/chunks/main.999836cf.js.map +0 -1
  179. package/dist/chunks/modern-style-component-title.0ecbc822.js.map +0 -1
  180. package/dist/chunks/modern-style-page-title.6ec3a54a.js.map +0 -1
  181. package/dist/chunks/modern-style-treemap.61642f86.js +0 -3
  182. package/dist/chunks/modern-style-treemap.61642f86.js.map +0 -1
  183. package/dist/chunks/particle-animation.0edae74c.js.map +0 -1
  184. package/dist/chunks/radar-chart.3c0fc235.js +0 -2
  185. package/dist/chunks/radar-chart.3c0fc235.js.map +0 -1
  186. package/dist/chunks/tabs-drawer.c77b2402.js +0 -3
  187. package/dist/chunks/tabs-drawer.c77b2402.js.map +0 -1
  188. package/dist/chunks/tabs-page-title.d479525c.js +0 -3
  189. package/dist/chunks/tabs-page-title.d479525c.js.map +0 -1
  190. package/dist/chunks/tech-mesh-base-view.54fff757.js +0 -2
  191. package/dist/chunks/tech-mesh-base-view.54fff757.js.map +0 -1
  192. package/dist/chunks/title-text.0e67fd3e.js.map +0 -1
  193. package/dist/chunks/top-title-bar.b61de75a.js.map +0 -1
  194. package/dist/index.ba2895a5.js +0 -2
  195. package/dist/index.ba2895a5.js.map +0 -1
  196. /package/dist/chunks/{app-wall-card-item.773b88a2.js.LICENSE.txt → app-wall-card-item.940bfb27.js.LICENSE.txt} +0 -0
  197. /package/dist/chunks/{app-wall-relation-line.b3457721.js.LICENSE.txt → app-wall-relation-line.7d23426d.js.LICENSE.txt} +0 -0
  198. /package/dist/chunks/{cabinet-app-layer.7d13abc3.js.LICENSE.txt → cabinet-app-layer.f6d22c56.js.LICENSE.txt} +0 -0
  199. /package/dist/chunks/{cabinet-container.8b79820d.js.LICENSE.txt → cabinet-container.4a5f4b04.js.LICENSE.txt} +0 -0
  200. /package/dist/chunks/{cabinet-node.ef54d0c4.js.LICENSE.txt → cabinet-node.9c0cd3b5.js.LICENSE.txt} +0 -0
  201. /package/dist/chunks/{cabinet-thumbnail.22282acb.js.LICENSE.txt → cabinet-thumbnail.1027b046.js.LICENSE.txt} +0 -0
  202. /package/dist/chunks/{dropdown-menu.d845a097.js.LICENSE.txt → dropdown-menu.122b99af.js.LICENSE.txt} +0 -0
  203. /package/dist/chunks/{modern-style-treemap.61642f86.js.LICENSE.txt → modern-style-treemap.a6ca1bfd.js.LICENSE.txt} +0 -0
  204. /package/dist/chunks/{tabs-drawer.c77b2402.js.LICENSE.txt → tabs-drawer.000b4e3e.js.LICENSE.txt} +0 -0
  205. /package/dist/chunks/{tabs-page-title.d479525c.js.LICENSE.txt → tabs-page-title.d7f34cdf.js.LICENSE.txt} +0 -0
@@ -1,2 +0,0 @@
1
- "use strict";(self.webpackChunk_next_bricks_data_view=self.webpackChunk_next_bricks_data_view||[]).push([[5151],{1874:(e,t)=>{function s(e,t){if(null==e)return{};var s,i,r={},a=Object.keys(e);for(i=0;i<a.length;i++)s=a[i],t.indexOf(s)>=0||(r[s]=e[s]);return r}class i{constructor(e,t,s){this.line=void 0,this.column=void 0,this.index=void 0,this.line=e,this.column=t,this.index=s}}class r{constructor(e,t){this.start=void 0,this.end=void 0,this.filename=void 0,this.identifierName=void 0,this.start=e,this.end=t}}function a(e,t){const{line:s,column:r,index:a}=e;return new i(s,r+t,a+t)}var n="BABEL_PARSER_SOURCETYPE_MODULE_REQUIRED";const o=(e,t=e.length-1)=>({get(){return e.reduce(((e,t)=>e[t]),this)},set(s){e.reduce(((e,i,r)=>r===t?e[i]=s:e[i]),this)}}),h=(e,t,s)=>Object.keys(s).map((e=>[e,s[e]])).filter((([,e])=>!!e)).map((([e,t])=>[e,"function"==typeof t?{value:t,enumerable:!1}:"string"==typeof t.reflect?Object.assign({},t,o(t.reflect.split("."))):t])).reduce(((e,[t,s])=>Object.defineProperty(e,t,Object.assign({configurable:!0},s))),Object.assign(new e,t));var p={ImportMetaOutsideModule:{message:"import.meta may appear only with 'sourceType: \"module\"'",code:n},ImportOutsideModule:{message:"'import' and 'export' may appear only with 'sourceType: \"module\"'",code:n}};const c={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"},l=({type:e,prefix:t})=>"UpdateExpression"===e?c.UpdateExpression[String(t)]:c[e];var u={AccessorIsGenerator:({kind:e})=>`A ${e}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.",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:e})=>`Missing initializer in ${e} 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.",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:e})=>`\`${e}\` has already been exported. Exported identifiers must be unique.`,DuplicateProto:"Redefinition of __proto__ property.",DuplicateRegExpFlags:"Duplicate regular expression flag.",ElementAfterRest:"Rest element must be last element.",EscapedCharNotAnIdentifier:"Invalid Unicode escape.",ExportBindingIsString:({localName:e,exportName:t})=>`A string literal cannot be used as an exported binding without \`from\`.\n- Did you mean \`export { '${e}' as '${t}' } from 'some-module'\`?`,ExportDefaultFromAsIdentifier:"'from' is not allowed as an identifier after 'export default'.",ForInOfLoopInitializer:({type:e})=>`'${"ForInStatement"===e?"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:e})=>`Unsyntactic ${"BreakStatement"===e?"break":"continue"}.`,IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list.",IllegalReturn:"'return' outside of function.",ImportBindingIsString:({importName:e})=>`A string literal cannot be used as an imported binding.\n- Did you mean \`import { "${e}" as foo }\`?`,ImportCallArgumentTrailingComma:"Trailing comma is disallowed inside import(...) arguments.",ImportCallArity:({maxArgumentCount:e})=>`\`import()\` requires exactly ${1===e?"one argument":"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:e})=>`Expected number in radix ${e}.`,InvalidEscapeSequence:"Bad character escape sequence.",InvalidEscapeSequenceTemplate:"Invalid escape sequence in template.",InvalidEscapedReservedWord:({reservedWord:e})=>`Escape sequence in keyword ${e}.`,InvalidIdentifier:({identifierName:e})=>`Invalid identifier ${e}.`,InvalidLhs:({ancestor:e})=>`Invalid left-hand side in ${l(e)}.`,InvalidLhsBinding:({ancestor:e})=>`Binding invalid left-hand side in ${l(e)}.`,InvalidNumber:"Invalid number.",InvalidOrMissingExponent:"Floating-point numbers require a valid exponent after the 'e'.",InvalidOrUnexpectedToken:({unexpected:e})=>`Unexpected character '${e}'.`,InvalidParenthesizedAssignment:"Invalid parenthesized assignment pattern.",InvalidPrivateFieldResolution:({identifierName:e})=>`Private name #${e} 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:e})=>`Label '${e}' is already declared.`,LetInLexicalBinding:"'let' is not allowed to be used as a name in 'let' or 'const' declarations.",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:e})=>`This experimental syntax requires enabling the parser plugin: ${e.map((e=>JSON.stringify(e))).join(", ")}.`,MissingOneOfPlugins:({missingPlugin:e})=>`This experimental syntax requires enabling one of the following parser plugin(s): ${e.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:e})=>`Duplicate key "${e}" is not allowed in module attributes.`,ModuleExportNameHasLoneSurrogate:({surrogateCharCode:e})=>`An export name cannot include a lone surrogate, found '\\u${e.toString(16)}'.`,ModuleExportUndefined:({localName:e})=>`Export '${e}' 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:e})=>`Private names are only allowed in property accesses (\`obj.#${e}\`) or in \`in\` expressions (\`#${e} in obj\`).`,PrivateNameRedeclaration:({identifierName:e})=>`Duplicate private name #${e}.`,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.",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:e})=>`Unexpected keyword '${e}'.`,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:e})=>`Unexpected reserved word '${e}'.`,UnexpectedSuper:"'super' is only allowed in object methods and classes.",UnexpectedToken:({expected:e,unexpected:t})=>`Unexpected token${t?` '${t}'.`:""}${e?`, expected "${e}"`:""}`,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:e,onlyValidPropertyName:t})=>`The only valid meta property for ${e} is ${e}.${t}.`,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.",UsingDeclarationHasBindingPattern:"Using declaration cannot have destructuring patterns.",VarRedeclaration:({identifierName:e})=>`Identifier '${e}' 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."};const d=new Set(["ArrowFunctionExpression","AssignmentExpression","ConditionalExpression","YieldExpression"]);var m={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:e})=>`Invalid topic token ${e}. In order to use ${e} as a topic reference, the pipelineOperator plugin must be configured with { "proposal": "hack", "topicToken": "${e}" }.`,PipeTopicUnused:"Hack-style pipe body does not contain a topic reference; Hack-style pipes must use topic at least once.",PipeUnparenthesizedBody:({type:e})=>`Hack-style pipe body cannot be an unparenthesized ${l({type:e})}; 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.'};const f=["toMessage"],y=["message"];function x(e){let{toMessage:t}=e,r=s(e,f);return function e({loc:s,details:a}){return h(SyntaxError,Object.assign({},r,{loc:s}),{clone(t={}){const s=t.loc||{};return e({loc:new i("line"in s?s.line:this.loc.line,"column"in s?s.column:this.loc.column,"index"in s?s.index:this.loc.index),details:Object.assign({},this.details,t.details)})},details:{value:a,enumerable:!1},message:{get(){return`${t(this.details)} (${this.loc.line}:${this.loc.column})`},set(e){Object.defineProperty(this,"message",{value:e})}},pos:{reflect:"loc.index",enumerable:!0},missingPlugin:"missingPlugin"in a&&{reflect:"details.missingPlugin",enumerable:!0}})}}function P(e,t){if(Array.isArray(e))return t=>P(t,e[0]);const i={};for(const r of Object.keys(e)){const a=e[r],n="string"==typeof a?{message:()=>a}:"function"==typeof a?{message:a}:a,{message:o}=n,h=s(n,y),p="string"==typeof o?()=>o:o;i[r]=x(Object.assign({code:"BABEL_PARSER_SYNTAX_ERROR",reasonCode:r,toMessage:p},t?{syntaxPlugin:t}:{},h))}return i}const g=Object.assign({},P(p),P(u),P({StrictDelete:"Deleting local variable in strict mode.",StrictEvalArguments:({referenceName:e})=>`Assigning to '${e}' in strict mode.`,StrictEvalArgumentsBinding:({bindingName:e})=>`Binding '${e}' 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."}),P`pipelineOperator`(m)),{defineProperty:b}=Object,T=(e,t)=>b(e,t,{enumerable:!1,value:e[t]});function v(e){return e.loc.start&&T(e.loc.start,"index"),e.loc.end&&T(e.loc.end,"index"),e}class A{constructor(e,t){this.token=void 0,this.preserveSpace=void 0,this.token=e,this.preserveSpace=!!t}}const E={brace:new A("{"),j_oTag:new A("<tag"),j_cTag:new A("</tag"),j_expr:new A("<tag>...</tag>",!0)};E.template=new A("`",!0);const w=!0,S=!0,C=!0,I=!0,N=!0;class k{constructor(e,t={}){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=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.rightAssociative=!!t.rightAssociative,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=null!=t.binop?t.binop:null,this.updateContext=null}}const L=new Map;function M(e,t={}){t.keyword=e;const s=V(e,t);return L.set(e,s),s}function O(e,t){return V(e,{beforeExpr:w,binop:t})}let D=-1;const B=[],F=[],R=[],j=[],U=[],_=[];function V(e,t={}){var s,i,r,a;return++D,F.push(e),R.push(null!=(s=t.binop)?s:-1),j.push(null!=(i=t.beforeExpr)&&i),U.push(null!=(r=t.startsExpr)&&r),_.push(null!=(a=t.prefix)&&a),B.push(new k(e,t)),D}function z(e,t={}){var s,i,r,a;return++D,L.set(e,D),F.push(e),R.push(null!=(s=t.binop)?s:-1),j.push(null!=(i=t.beforeExpr)&&i),U.push(null!=(r=t.startsExpr)&&r),_.push(null!=(a=t.prefix)&&a),B.push(new k("name",t)),D}const H={bracketL:V("[",{beforeExpr:w,startsExpr:S}),bracketHashL:V("#[",{beforeExpr:w,startsExpr:S}),bracketBarL:V("[|",{beforeExpr:w,startsExpr:S}),bracketR:V("]"),bracketBarR:V("|]"),braceL:V("{",{beforeExpr:w,startsExpr:S}),braceBarL:V("{|",{beforeExpr:w,startsExpr:S}),braceHashL:V("#{",{beforeExpr:w,startsExpr:S}),braceR:V("}"),braceBarR:V("|}"),parenL:V("(",{beforeExpr:w,startsExpr:S}),parenR:V(")"),comma:V(",",{beforeExpr:w}),semi:V(";",{beforeExpr:w}),colon:V(":",{beforeExpr:w}),doubleColon:V("::",{beforeExpr:w}),dot:V("."),question:V("?",{beforeExpr:w}),questionDot:V("?."),arrow:V("=>",{beforeExpr:w}),template:V("template"),ellipsis:V("...",{beforeExpr:w}),backQuote:V("`",{startsExpr:S}),dollarBraceL:V("${",{beforeExpr:w,startsExpr:S}),templateTail:V("...`",{startsExpr:S}),templateNonTail:V("...${",{beforeExpr:w,startsExpr:S}),at:V("@"),hash:V("#",{startsExpr:S}),interpreterDirective:V("#!..."),eq:V("=",{beforeExpr:w,isAssign:I}),assign:V("_=",{beforeExpr:w,isAssign:I}),slashAssign:V("_=",{beforeExpr:w,isAssign:I}),xorAssign:V("_=",{beforeExpr:w,isAssign:I}),moduloAssign:V("_=",{beforeExpr:w,isAssign:I}),incDec:V("++/--",{prefix:N,postfix:!0,startsExpr:S}),bang:V("!",{beforeExpr:w,prefix:N,startsExpr:S}),tilde:V("~",{beforeExpr:w,prefix:N,startsExpr:S}),doubleCaret:V("^^",{startsExpr:S}),doubleAt:V("@@",{startsExpr:S}),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:V("+/-",{beforeExpr:w,binop:9,prefix:N,startsExpr:S}),modulo:V("%",{binop:10,startsExpr:S}),star:V("*",{binop:10}),slash:O("/",10),exponent:V("**",{beforeExpr:w,binop:11,rightAssociative:!0}),_in:M("in",{beforeExpr:w,binop:7}),_instanceof:M("instanceof",{beforeExpr:w,binop:7}),_break:M("break"),_case:M("case",{beforeExpr:w}),_catch:M("catch"),_continue:M("continue"),_debugger:M("debugger"),_default:M("default",{beforeExpr:w}),_else:M("else",{beforeExpr:w}),_finally:M("finally"),_function:M("function",{startsExpr:S}),_if:M("if"),_return:M("return",{beforeExpr:w}),_switch:M("switch"),_throw:M("throw",{beforeExpr:w,prefix:N,startsExpr:S}),_try:M("try"),_var:M("var"),_const:M("const"),_with:M("with"),_new:M("new",{beforeExpr:w,startsExpr:S}),_this:M("this",{startsExpr:S}),_super:M("super",{startsExpr:S}),_class:M("class",{startsExpr:S}),_extends:M("extends",{beforeExpr:w}),_export:M("export"),_import:M("import",{startsExpr:S}),_null:M("null",{startsExpr:S}),_true:M("true",{startsExpr:S}),_false:M("false",{startsExpr:S}),_typeof:M("typeof",{beforeExpr:w,prefix:N,startsExpr:S}),_void:M("void",{beforeExpr:w,prefix:N,startsExpr:S}),_delete:M("delete",{beforeExpr:w,prefix:N,startsExpr:S}),_do:M("do",{isLoop:C,beforeExpr:w}),_for:M("for",{isLoop:C}),_while:M("while",{isLoop:C}),_as:z("as",{startsExpr:S}),_assert:z("assert",{startsExpr:S}),_async:z("async",{startsExpr:S}),_await:z("await",{startsExpr:S}),_from:z("from",{startsExpr:S}),_get:z("get",{startsExpr:S}),_let:z("let",{startsExpr:S}),_meta:z("meta",{startsExpr:S}),_of:z("of",{startsExpr:S}),_sent:z("sent",{startsExpr:S}),_set:z("set",{startsExpr:S}),_static:z("static",{startsExpr:S}),_using:z("using",{startsExpr:S}),_yield:z("yield",{startsExpr:S}),_asserts:z("asserts",{startsExpr:S}),_checks:z("checks",{startsExpr:S}),_exports:z("exports",{startsExpr:S}),_global:z("global",{startsExpr:S}),_implements:z("implements",{startsExpr:S}),_intrinsic:z("intrinsic",{startsExpr:S}),_infer:z("infer",{startsExpr:S}),_is:z("is",{startsExpr:S}),_mixins:z("mixins",{startsExpr:S}),_proto:z("proto",{startsExpr:S}),_require:z("require",{startsExpr:S}),_satisfies:z("satisfies",{startsExpr:S}),_keyof:z("keyof",{startsExpr:S}),_readonly:z("readonly",{startsExpr:S}),_unique:z("unique",{startsExpr:S}),_abstract:z("abstract",{startsExpr:S}),_declare:z("declare",{startsExpr:S}),_enum:z("enum",{startsExpr:S}),_module:z("module",{startsExpr:S}),_namespace:z("namespace",{startsExpr:S}),_interface:z("interface",{startsExpr:S}),_type:z("type",{startsExpr:S}),_opaque:z("opaque",{startsExpr:S}),name:V("name",{startsExpr:S}),string:V("string",{startsExpr:S}),num:V("num",{startsExpr:S}),bigint:V("bigint",{startsExpr:S}),decimal:V("decimal",{startsExpr:S}),regexp:V("regexp",{startsExpr:S}),privateName:V("#name",{startsExpr:S}),eof:V("eof"),jsxName:V("jsxName"),jsxText:V("jsxText",{beforeExpr:!0}),jsxTagStart:V("jsxTagStart",{startsExpr:!0}),jsxTagEnd:V("jsxTagEnd"),placeholder:V("%%",{startsExpr:!0})};function q(e){return e>=93&&e<=130}function $(e){return e>=58&&e<=130}function K(e){return e>=58&&e<=134}function W(e){return U[e]}function J(e){return e>=127&&e<=129}function X(e){return e>=58&&e<=92}function G(e){return F[e]}function Z(e){return R[e]}function Y(e){return e>=24&&e<=25}function Q(e){return B[e]}B[8].updateContext=e=>{e.pop()},B[5].updateContext=B[7].updateContext=B[23].updateContext=e=>{e.push(E.brace)},B[22].updateContext=e=>{e[e.length-1]===E.template?e.pop():e.push(E.template)},B[140].updateContext=e=>{e.push(E.j_expr,E.j_oTag)};let ee="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",te="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_";const se=new RegExp("["+ee+"]"),ie=new RegExp("["+ee+te+"]");ee=te=null;const re=[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,68,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,349,41,7,1,79,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,159,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,264,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,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,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,757,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,3104,541,1507,4938,6,4191],ae=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,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,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,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,406,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,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,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,983,6,110,6,6,9,4759,9,787719,239];function ne(e,t){let s=65536;for(let i=0,r=t.length;i<r;i+=2){if(s+=t[i],s>e)return!1;if(s+=t[i+1],s>=e)return!0}return!1}function oe(e){return e<65?36===e:e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&se.test(String.fromCharCode(e)):ne(e,re)))}function he(e){return e<48?36===e:e<58||!(e<65)&&(e<=90||(e<97?95===e:e<=122||(e<=65535?e>=170&&ie.test(String.fromCharCode(e)):ne(e,re)||ne(e,ae))))}const pe=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"]),ce=new Set(["implements","interface","let","package","private","protected","public","static","yield"]),le=new Set(["eval","arguments"]);function ue(e,t){return t&&"await"===e||"enum"===e}function de(e,t){return ue(e,t)||ce.has(e)}function me(e){return le.has(e)}function fe(e,t){return de(e,t)||me(e)}const ye=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"]),xe=256,Pe=4096,ge=8201,be=64;class Te{constructor(e){this.var=new Set,this.lexical=new Set,this.functions=new Set,this.flags=e}}class ve{constructor(e,t){this.parser=void 0,this.scopeStack=[],this.inModule=void 0,this.undefinedExports=new Map,this.parser=e,this.inModule=t}get inTopLevel(){return(1&this.currentScope().flags)>0}get inFunction(){return(2&this.currentVarScopeFlags())>0}get allowSuper(){return(16&this.currentThisScopeFlags())>0}get allowDirectSuper(){return(32&this.currentThisScopeFlags())>0}get inClass(){return(64&this.currentThisScopeFlags())>0}get inClassAndNotInNonArrowFunction(){const e=this.currentThisScopeFlags();return(64&e)>0&&0==(2&e)}get inStaticBlock(){for(let e=this.scopeStack.length-1;;e--){const{flags:t}=this.scopeStack[e];if(128&t)return!0;if(451&t)return!1}}get inNonArrowFunction(){return(2&this.currentThisScopeFlags())>0}get treatFunctionsAsVar(){return this.treatFunctionsAsVarInScope(this.currentScope())}createScope(e){return new Te(e)}enter(e){this.scopeStack.push(this.createScope(e))}exit(){return this.scopeStack.pop().flags}treatFunctionsAsVarInScope(e){return!!(130&e.flags||!this.parser.inModule&&1&e.flags)}declareName(e,t,s){let i=this.currentScope();if(8&t||16&t)this.checkRedeclarationInScope(i,e,t,s),16&t?i.functions.add(e):i.lexical.add(e),8&t&&this.maybeExportDefined(i,e);else if(4&t)for(let r=this.scopeStack.length-1;r>=0&&(i=this.scopeStack[r],this.checkRedeclarationInScope(i,e,t,s),i.var.add(e),this.maybeExportDefined(i,e),!(387&i.flags));--r);this.parser.inModule&&1&i.flags&&this.undefinedExports.delete(e)}maybeExportDefined(e,t){this.parser.inModule&&1&e.flags&&this.undefinedExports.delete(t)}checkRedeclarationInScope(e,t,s,i){this.isRedeclaredInScope(e,t,s)&&this.parser.raise(g.VarRedeclaration,{at:i,identifierName:t})}isRedeclaredInScope(e,t,s){return!!(1&s)&&(8&s?e.lexical.has(t)||e.functions.has(t)||e.var.has(t):16&s?e.lexical.has(t)||!this.treatFunctionsAsVarInScope(e)&&e.var.has(t):e.lexical.has(t)&&!(8&e.flags&&e.lexical.values().next().value===t)||!this.treatFunctionsAsVarInScope(e)&&e.functions.has(t))}checkLocalExport(e){const{name:t}=e,s=this.scopeStack[0];s.lexical.has(t)||s.var.has(t)||s.functions.has(t)||this.undefinedExports.set(t,e.loc.start)}currentScope(){return this.scopeStack[this.scopeStack.length-1]}currentVarScopeFlags(){for(let e=this.scopeStack.length-1;;e--){const{flags:t}=this.scopeStack[e];if(387&t)return t}}currentThisScopeFlags(){for(let e=this.scopeStack.length-1;;e--){const{flags:t}=this.scopeStack[e];if(451&t&&!(4&t))return t}}}class Ae extends Te{constructor(...e){super(...e),this.declareFunctions=new Set}}class Ee extends ve{createScope(e){return new Ae(e)}declareName(e,t,s){const i=this.currentScope();if(2048&t)return this.checkRedeclarationInScope(i,e,t,s),this.maybeExportDefined(i,e),void i.declareFunctions.add(e);super.declareName(e,t,s)}isRedeclaredInScope(e,t,s){return!!super.isRedeclaredInScope(e,t,s)||!!(2048&s)&&!e.declareFunctions.has(t)&&(e.lexical.has(t)||e.functions.has(t))}checkLocalExport(e){this.scopeStack[0].declareFunctions.has(e.name)||super.checkLocalExport(e)}}class we{constructor(){this.sawUnambiguousESM=!1,this.ambiguousScriptDifferentAst=!1}hasPlugin(e){if("string"==typeof e)return this.plugins.has(e);{const[t,s]=e;if(!this.hasPlugin(t))return!1;const i=this.plugins.get(t);for(const e of Object.keys(s))if((null==i?void 0:i[e])!==s[e])return!1;return!0}}getPluginOption(e,t){var s;return null==(s=this.plugins.get(e))?void 0:s[t]}}function Se(e,t){void 0===e.trailingComments?e.trailingComments=t:e.trailingComments.unshift(...t)}function Ce(e,t){void 0===e.innerComments?e.innerComments=t:e.innerComments.unshift(...t)}function Ie(e,t,s){let i=null,r=t.length;for(;null===i&&r>0;)i=t[--r];null===i||i.start>s.start?Ce(e,s.comments):Se(i,s.comments)}class Ne extends we{addComment(e){this.filename&&(e.loc.filename=this.filename),this.state.comments.push(e)}processComment(e){const{commentStack:t}=this.state,s=t.length;if(0===s)return;let i=s-1;const r=t[i];r.start===e.end&&(r.leadingNode=e,i--);const{start:a}=e;for(;i>=0;i--){const s=t[i],r=s.end;if(!(r>a)){r===a&&(s.trailingNode=e);break}s.containingNode=e,this.finalizeComment(s),t.splice(i,1)}}finalizeComment(e){const{comments:t}=e;if(null!==e.leadingNode||null!==e.trailingNode)null!==e.leadingNode&&Se(e.leadingNode,t),null!==e.trailingNode&&function(e,t){void 0===e.leadingComments?e.leadingComments=t:e.leadingComments.unshift(...t)}(e.trailingNode,t);else{const{containingNode:s,start:i}=e;if(44===this.input.charCodeAt(i-1))switch(s.type){case"ObjectExpression":case"ObjectPattern":case"RecordExpression":Ie(s,s.properties,e);break;case"CallExpression":case"OptionalCallExpression":Ie(s,s.arguments,e);break;case"FunctionDeclaration":case"FunctionExpression":case"ArrowFunctionExpression":case"ObjectMethod":case"ClassMethod":case"ClassPrivateMethod":Ie(s,s.params,e);break;case"ArrayExpression":case"ArrayPattern":case"TupleExpression":Ie(s,s.elements,e);break;case"ExportNamedDeclaration":case"ImportDeclaration":Ie(s,s.specifiers,e);break;default:Ce(s,t)}else Ce(s,t)}}finalizeRemainingComments(){const{commentStack:e}=this.state;for(let t=e.length-1;t>=0;t--)this.finalizeComment(e[t]);this.state.commentStack=[]}resetPreviousNodeTrailingComments(e){const{commentStack:t}=this.state,{length:s}=t;if(0===s)return;const i=t[s-1];i.leadingNode===e&&(i.leadingNode=null)}takeSurroundingComments(e,t,s){const{commentStack:i}=this.state,r=i.length;if(0===r)return;let a=r-1;for(;a>=0;a--){const r=i[a],n=r.end;if(r.start===s)r.leadingNode=e;else if(n===t)r.trailingNode=e;else if(n<t)break}}}const ke=/\r\n?|[\n\u2028\u2029]/,Le=new RegExp(ke.source,"g");function Me(e){switch(e){case 10:case 13:case 8232:case 8233:return!0;default:return!1}}const Oe=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,De=/(?:[^\S\n\r\u2028\u2029]|\/\/.*|\/\*.*?\*\/)*/g,Be=new RegExp("(?=("+De.source+"))\\1"+/(?=[\n\r\u2028\u2029]|\/\*(?!.*?\*\/)|$)/.source,"y");function Fe(e){switch(e){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}}class Re{constructor(){this.strict=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.maybeInArrowParameters=!1,this.inType=!1,this.noAnonFunctionType=!1,this.hasFlowComment=!1,this.isAmbientContext=!1,this.inAbstractClass=!1,this.inDisallowConditionalTypesContext=!1,this.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null},this.soloAwait=!1,this.inFSharpPipelineDirectBody=!1,this.labels=[],this.comments=[],this.commentStack=[],this.pos=0,this.type=137,this.value=null,this.start=0,this.end=0,this.lastTokEndLoc=null,this.lastTokStartLoc=null,this.lastTokStart=0,this.context=[E.brace],this.canStartJSXElement=!0,this.containsEsc=!1,this.firstInvalidTemplateEscapePos=null,this.strictErrors=new Map,this.tokensLength=0}init({strictMode:e,sourceType:t,startLine:s,startColumn:r}){this.strict=!1!==e&&(!0===e||"module"===t),this.curLine=s,this.lineStart=-r,this.startLoc=this.endLoc=new i(s,r,0)}curPosition(){return new i(this.curLine,this.pos-this.lineStart,this.pos)}clone(e){const t=new Re,s=Object.keys(this);for(let i=0,r=s.length;i<r;i++){const r=s[i];let a=this[r];!e&&Array.isArray(a)&&(a=a.slice()),t[r]=a}return t}}var je=function(e){return e>=48&&e<=57};const Ue={decBinOct:new Set([46,66,69,79,95,98,101,111]),hex:new Set([46,88,95,120])},_e={bin:e=>48===e||49===e,oct:e=>e>=48&&e<=55,dec:e=>e>=48&&e<=57,hex:e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102};function Ve(e,t,s,i,r,a){const n=s,o=i,h=r;let p="",c=null,l=s;const{length:u}=t;for(;;){if(s>=u){a.unterminated(n,o,h),p+=t.slice(l,s);break}const d=t.charCodeAt(s);if(ze(e,d,t,s)){p+=t.slice(l,s);break}if(92===d){p+=t.slice(l,s);const n=He(t,s,i,r,"template"===e,a);null!==n.ch||c?p+=n.ch:c={pos:s,lineStart:i,curLine:r},({pos:s,lineStart:i,curLine:r}=n),l=s}else 8232===d||8233===d?(++r,i=++s):10===d||13===d?"template"===e?(p+=t.slice(l,s)+"\n",++s,13===d&&10===t.charCodeAt(s)&&++s,++r,l=i=s):a.unterminated(n,o,h):++s}return{pos:s,str:p,firstInvalidLoc:c,lineStart:i,curLine:r,containsInvalid:!!c}}function ze(e,t,s,i){return"template"===e?96===t||36===t&&123===s.charCodeAt(i+1):t===("double"===e?34:39)}function He(e,t,s,i,r,a){const n=!r;t++;const o=e=>({pos:t,ch:e,lineStart:s,curLine:i}),h=e.charCodeAt(t++);switch(h){case 110:return o("\n");case 114:return o("\r");case 120:{let r;return({code:r,pos:t}=qe(e,t,s,i,2,!1,n,a)),o(null===r?null:String.fromCharCode(r))}case 117:{let r;return({code:r,pos:t}=Ke(e,t,s,i,n,a)),o(null===r?null:String.fromCodePoint(r))}case 116:return o("\t");case 98:return o("\b");case 118:return o("\v");case 102:return o("\f");case 13:10===e.charCodeAt(t)&&++t;case 10:s=t,++i;case 8232:case 8233:return o("");case 56:case 57:if(r)return o(null);a.strictNumericEscape(t-1,s,i);default:if(h>=48&&h<=55){const n=t-1;let h=e.slice(n,t+2).match(/^[0-7]+/)[0],p=parseInt(h,8);p>255&&(h=h.slice(0,-1),p=parseInt(h,8)),t+=h.length-1;const c=e.charCodeAt(t);if("0"!==h||56===c||57===c){if(r)return o(null);a.strictNumericEscape(n,s,i)}return o(String.fromCharCode(p))}return o(String.fromCharCode(h))}}function qe(e,t,s,i,r,a,n,o){const h=t;let p;return({n:p,pos:t}=$e(e,t,s,i,16,r,a,!1,o,!n)),null===p&&(n?o.invalidEscapeSequence(h,s,i):t=h-1),{code:p,pos:t}}function $e(e,t,s,i,r,a,n,o,h,p){const c=t,l=16===r?Ue.hex:Ue.decBinOct,u=16===r?_e.hex:10===r?_e.dec:8===r?_e.oct:_e.bin;let d=!1,m=0;for(let c=0,f=null==a?1/0:a;c<f;++c){const a=e.charCodeAt(t);let c;if(95!==a||"bail"===o){if(c=a>=97?a-97+10:a>=65?a-65+10:je(a)?a-48:1/0,c>=r){if(c<=9&&p)return{n:null,pos:t};if(c<=9&&h.invalidDigit(t,s,i,r))c=0;else{if(!n)break;c=0,d=!0}}++t,m=m*r+c}else{const r=e.charCodeAt(t-1),a=e.charCodeAt(t+1);if(o){if(Number.isNaN(a)||!u(a)||l.has(r)||l.has(a)){if(p)return{n:null,pos:t};h.unexpectedNumericSeparator(t,s,i)}}else{if(p)return{n:null,pos:t};h.numericSeparatorInEscapeSequence(t,s,i)}++t}}return t===c||null!=a&&t-c!==a||d?{n:null,pos:t}:{n:m,pos:t}}function Ke(e,t,s,i,r,a){let n;if(123===e.charCodeAt(t)){if(++t,({code:n,pos:t}=qe(e,t,s,i,e.indexOf("}",t)-t,!0,r,a)),++t,null!==n&&n>1114111){if(!r)return{code:null,pos:t};a.invalidCodePoint(t,s,i)}}else({code:n,pos:t}=qe(e,t,s,i,4,!1,r,a));return{code:n,pos:t}}const We=["at"],Je=["at"];function Xe(e,t,s){return new i(s,e-t,e)}const Ge=new Set([103,109,115,105,121,117,100,118]);class Ze{constructor(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,this.loc=new r(e.startLoc,e.endLoc)}}class Ye extends Ne{constructor(e,t){super(),this.isLookahead=void 0,this.tokens=[],this.errorHandlers_readInt={invalidDigit:(e,t,s,i)=>!!this.options.errorRecovery&&(this.raise(g.InvalidDigit,{at:Xe(e,t,s),radix:i}),!0),numericSeparatorInEscapeSequence:this.errorBuilder(g.NumericSeparatorInEscapeSequence),unexpectedNumericSeparator:this.errorBuilder(g.UnexpectedNumericSeparator)},this.errorHandlers_readCodePoint=Object.assign({},this.errorHandlers_readInt,{invalidEscapeSequence:this.errorBuilder(g.InvalidEscapeSequence),invalidCodePoint:this.errorBuilder(g.InvalidCodePoint)}),this.errorHandlers_readStringContents_string=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:(e,t,s)=>{this.recordStrictModeErrors(g.StrictNumericEscape,{at:Xe(e,t,s)})},unterminated:(e,t,s)=>{throw this.raise(g.UnterminatedString,{at:Xe(e-1,t,s)})}}),this.errorHandlers_readStringContents_template=Object.assign({},this.errorHandlers_readCodePoint,{strictNumericEscape:this.errorBuilder(g.StrictNumericEscape),unterminated:(e,t,s)=>{throw this.raise(g.UnterminatedTemplate,{at:Xe(e,t,s)})}}),this.state=new Re,this.state.init(e),this.input=t,this.length=t.length,this.isLookahead=!1}pushToken(e){this.tokens.length=this.state.tokensLength,this.tokens.push(e),++this.state.tokensLength}next(){this.checkKeywordEscapes(),this.options.tokens&&this.pushToken(new Ze(this.state)),this.state.lastTokStart=this.state.start,this.state.lastTokEndLoc=this.state.endLoc,this.state.lastTokStartLoc=this.state.startLoc,this.nextToken()}eat(e){return!!this.match(e)&&(this.next(),!0)}match(e){return this.state.type===e}createLookaheadState(e){return{pos:e.pos,value:null,type:e.type,start:e.start,end:e.end,context:[this.curContext()],inType:e.inType,startLoc:e.startLoc,lastTokEndLoc:e.lastTokEndLoc,curLine:e.curLine,lineStart:e.lineStart,curPosition:e.curPosition}}lookahead(){const e=this.state;this.state=this.createLookaheadState(e),this.isLookahead=!0,this.nextToken(),this.isLookahead=!1;const t=this.state;return this.state=e,t}nextTokenStart(){return this.nextTokenStartSince(this.state.pos)}nextTokenStartSince(e){return Oe.lastIndex=e,Oe.test(this.input)?Oe.lastIndex:e}lookaheadCharCode(){return this.input.charCodeAt(this.nextTokenStart())}nextTokenInLineStart(){return this.nextTokenInLineStartSince(this.state.pos)}nextTokenInLineStartSince(e){return De.lastIndex=e,De.test(this.input)?De.lastIndex:e}lookaheadInLineCharCode(){return this.input.charCodeAt(this.nextTokenInLineStart())}codePointAtPos(e){let t=this.input.charCodeAt(e);if(55296==(64512&t)&&++e<this.input.length){const s=this.input.charCodeAt(e);56320==(64512&s)&&(t=65536+((1023&t)<<10)+(1023&s))}return t}setStrict(e){this.state.strict=e,e&&(this.state.strictErrors.forEach((([e,t])=>this.raise(e,{at:t}))),this.state.strictErrors.clear())}curContext(){return this.state.context[this.state.context.length-1]}nextToken(){this.skipSpace(),this.state.start=this.state.pos,this.isLookahead||(this.state.startLoc=this.state.curPosition()),this.state.pos>=this.length?this.finishToken(137):this.getTokenFromCode(this.codePointAtPos(this.state.pos))}skipBlockComment(e){let t;this.isLookahead||(t=this.state.curPosition());const s=this.state.pos,i=this.input.indexOf(e,s+2);if(-1===i)throw this.raise(g.UnterminatedComment,{at:this.state.curPosition()});for(this.state.pos=i+e.length,Le.lastIndex=s+2;Le.test(this.input)&&Le.lastIndex<=i;)++this.state.curLine,this.state.lineStart=Le.lastIndex;if(this.isLookahead)return;const a={type:"CommentBlock",value:this.input.slice(s+2,i),start:s,end:i+e.length,loc:new r(t,this.state.curPosition())};return this.options.tokens&&this.pushToken(a),a}skipLineComment(e){const t=this.state.pos;let s;this.isLookahead||(s=this.state.curPosition());let i=this.input.charCodeAt(this.state.pos+=e);if(this.state.pos<this.length)for(;!Me(i)&&++this.state.pos<this.length;)i=this.input.charCodeAt(this.state.pos);if(this.isLookahead)return;const a=this.state.pos,n={type:"CommentLine",value:this.input.slice(t+e,a),start:t,end:a,loc:new r(s,this.state.curPosition())};return this.options.tokens&&this.pushToken(n),n}skipSpace(){const e=this.state.pos,t=[];e:for(;this.state.pos<this.length;){const s=this.input.charCodeAt(this.state.pos);switch(s){case 32:case 160:case 9:++this.state.pos;break;case 13:10===this.input.charCodeAt(this.state.pos+1)&&++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:{const e=this.skipBlockComment("*/");void 0!==e&&(this.addComment(e),this.options.attachComment&&t.push(e));break}case 47:{const e=this.skipLineComment(2);void 0!==e&&(this.addComment(e),this.options.attachComment&&t.push(e));break}default:break e}break;default:if(Fe(s))++this.state.pos;else if(45===s&&!this.inModule&&this.options.annexB){const s=this.state.pos;if(45!==this.input.charCodeAt(s+1)||62!==this.input.charCodeAt(s+2)||!(0===e||this.state.lineStart>e))break e;{const e=this.skipLineComment(3);void 0!==e&&(this.addComment(e),this.options.attachComment&&t.push(e))}}else{if(60!==s||this.inModule||!this.options.annexB)break e;{const e=this.state.pos;if(33!==this.input.charCodeAt(e+1)||45!==this.input.charCodeAt(e+2)||45!==this.input.charCodeAt(e+3))break e;{const e=this.skipLineComment(4);void 0!==e&&(this.addComment(e),this.options.attachComment&&t.push(e))}}}}}if(t.length>0){const s={start:e,end:this.state.pos,comments:t,leadingNode:null,trailingNode:null,containingNode:null};this.state.commentStack.push(s)}}finishToken(e,t){this.state.end=this.state.pos,this.state.endLoc=this.state.curPosition();const s=this.state.type;this.state.type=e,this.state.value=t,this.isLookahead||this.updateContext(s)}replaceToken(e){this.state.type=e,this.updateContext()}readToken_numberSign(){if(0===this.state.pos&&this.readToken_interpreter())return;const e=this.state.pos+1,t=this.codePointAtPos(e);if(t>=48&&t<=57)throw this.raise(g.UnexpectedDigitAfterHash,{at:this.state.curPosition()});if(123===t||91===t&&this.hasPlugin("recordAndTuple")){if(this.expectPlugin("recordAndTuple"),"bar"===this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(123===t?g.RecordExpressionHashIncorrectStartSyntaxType:g.TupleExpressionHashIncorrectStartSyntaxType,{at:this.state.curPosition()});this.state.pos+=2,123===t?this.finishToken(7):this.finishToken(1)}else oe(t)?(++this.state.pos,this.finishToken(136,this.readWord1(t))):92===t?(++this.state.pos,this.finishToken(136,this.readWord1())):this.finishOp(27,1)}readToken_dot(){const e=this.input.charCodeAt(this.state.pos+1);e>=48&&e<=57?this.readNumber(!0):46===e&&46===this.input.charCodeAt(this.state.pos+2)?(this.state.pos+=3,this.finishToken(21)):(++this.state.pos,this.finishToken(16))}readToken_slash(){61===this.input.charCodeAt(this.state.pos+1)?this.finishOp(31,2):this.finishOp(56,1)}readToken_interpreter(){if(0!==this.state.pos||this.length<2)return!1;let e=this.input.charCodeAt(this.state.pos+1);if(33!==e)return!1;const t=this.state.pos;for(this.state.pos+=1;!Me(e)&&++this.state.pos<this.length;)e=this.input.charCodeAt(this.state.pos);const s=this.input.slice(t+2,this.state.pos);return this.finishToken(28,s),!0}readToken_mult_modulo(e){let t=42===e?55:54,s=1,i=this.input.charCodeAt(this.state.pos+1);42===e&&42===i&&(s++,i=this.input.charCodeAt(this.state.pos+2),t=57),61!==i||this.state.inType||(s++,t=37===e?33:30),this.finishOp(t,s)}readToken_pipe_amp(e){const t=this.input.charCodeAt(this.state.pos+1);if(t!==e){if(124===e){if(62===t)return void this.finishOp(39,2);if(this.hasPlugin("recordAndTuple")&&125===t){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(g.RecordExpressionBarIncorrectEndSyntaxType,{at:this.state.curPosition()});return this.state.pos+=2,void this.finishToken(9)}if(this.hasPlugin("recordAndTuple")&&93===t){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(g.TupleExpressionBarIncorrectEndSyntaxType,{at:this.state.curPosition()});return this.state.pos+=2,void this.finishToken(4)}}61!==t?this.finishOp(124===e?43:45,1):this.finishOp(30,2)}else 61===this.input.charCodeAt(this.state.pos+2)?this.finishOp(30,3):this.finishOp(124===e?41:42,2)}readToken_caret(){const e=this.input.charCodeAt(this.state.pos+1);61!==e||this.state.inType?94===e&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"^^"}])?(this.finishOp(37,2),94===this.input.codePointAt(this.state.pos)&&this.unexpected()):this.finishOp(44,1):this.finishOp(32,2)}readToken_atSign(){64===this.input.charCodeAt(this.state.pos+1)&&this.hasPlugin(["pipelineOperator",{proposal:"hack",topicToken:"@@"}])?this.finishOp(38,2):this.finishOp(26,1)}readToken_plus_min(e){const t=this.input.charCodeAt(this.state.pos+1);t!==e?61===t?this.finishOp(30,2):this.finishOp(53,1):this.finishOp(34,2)}readToken_lt(){const{pos:e}=this.state,t=this.input.charCodeAt(e+1);if(60===t)return 61===this.input.charCodeAt(e+2)?void this.finishOp(30,3):void this.finishOp(51,2);61!==t?this.finishOp(47,1):this.finishOp(49,2)}readToken_gt(){const{pos:e}=this.state,t=this.input.charCodeAt(e+1);if(62===t){const t=62===this.input.charCodeAt(e+2)?3:2;return 61===this.input.charCodeAt(e+t)?void this.finishOp(30,t+1):void this.finishOp(52,t)}61!==t?this.finishOp(48,1):this.finishOp(49,2)}readToken_eq_excl(e){const t=this.input.charCodeAt(this.state.pos+1);if(61!==t)return 61===e&&62===t?(this.state.pos+=2,void this.finishToken(19)):void this.finishOp(61===e?29:35,1);this.finishOp(46,61===this.input.charCodeAt(this.state.pos+2)?3:2)}readToken_question(){const e=this.input.charCodeAt(this.state.pos+1),t=this.input.charCodeAt(this.state.pos+2);63===e?61===t?this.finishOp(30,3):this.finishOp(40,2):46!==e||t>=48&&t<=57?(++this.state.pos,this.finishToken(17)):(this.state.pos+=2,this.finishToken(18))}getTokenFromCode(e){switch(e){case 46:return void this.readToken_dot();case 40:return++this.state.pos,void this.finishToken(10);case 41:return++this.state.pos,void this.finishToken(11);case 59:return++this.state.pos,void this.finishToken(13);case 44:return++this.state.pos,void this.finishToken(12);case 91:if(this.hasPlugin("recordAndTuple")&&124===this.input.charCodeAt(this.state.pos+1)){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(g.TupleExpressionBarIncorrectStartSyntaxType,{at:this.state.curPosition()});this.state.pos+=2,this.finishToken(2)}else++this.state.pos,this.finishToken(0);return;case 93:return++this.state.pos,void this.finishToken(3);case 123:if(this.hasPlugin("recordAndTuple")&&124===this.input.charCodeAt(this.state.pos+1)){if("bar"!==this.getPluginOption("recordAndTuple","syntaxType"))throw this.raise(g.RecordExpressionBarIncorrectStartSyntaxType,{at:this.state.curPosition()});this.state.pos+=2,this.finishToken(6)}else++this.state.pos,this.finishToken(5);return;case 125:return++this.state.pos,void this.finishToken(8);case 58:return void(this.hasPlugin("functionBind")&&58===this.input.charCodeAt(this.state.pos+1)?this.finishOp(15,2):(++this.state.pos,this.finishToken(14)));case 63:return void this.readToken_question();case 96:return void this.readTemplateToken();case 48:{const e=this.input.charCodeAt(this.state.pos+1);if(120===e||88===e)return void this.readRadixNumber(16);if(111===e||79===e)return void this.readRadixNumber(8);if(98===e||66===e)return void this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return void this.readNumber(!1);case 34:case 39:return void this.readString(e);case 47:return void this.readToken_slash();case 37:case 42:return void this.readToken_mult_modulo(e);case 124:case 38:return void this.readToken_pipe_amp(e);case 94:return void this.readToken_caret();case 43:case 45:return void this.readToken_plus_min(e);case 60:return void this.readToken_lt();case 62:return void this.readToken_gt();case 61:case 33:return void this.readToken_eq_excl(e);case 126:return void this.finishOp(36,1);case 64:return void this.readToken_atSign();case 35:return void this.readToken_numberSign();case 92:return void this.readWord();default:if(oe(e))return void this.readWord(e)}throw this.raise(g.InvalidOrUnexpectedToken,{at:this.state.curPosition(),unexpected:String.fromCodePoint(e)})}finishOp(e,t){const s=this.input.slice(this.state.pos,this.state.pos+t);this.state.pos+=t,this.finishToken(e,s)}readRegexp(){const e=this.state.startLoc,t=this.state.start+1;let s,i,{pos:r}=this.state;for(;;++r){if(r>=this.length)throw this.raise(g.UnterminatedRegExp,{at:a(e,1)});const t=this.input.charCodeAt(r);if(Me(t))throw this.raise(g.UnterminatedRegExp,{at:a(e,1)});if(s)s=!1;else{if(91===t)i=!0;else if(93===t&&i)i=!1;else if(47===t&&!i)break;s=92===t}}const n=this.input.slice(t,r);++r;let o="";const h=()=>a(e,r+2-t);for(;r<this.length;){const e=this.codePointAtPos(r),t=String.fromCharCode(e);if(Ge.has(e))118===e?(this.expectPlugin("regexpUnicodeSets",h()),o.includes("u")&&this.raise(g.IncompatibleRegExpUVFlags,{at:h()})):117===e&&o.includes("v")&&this.raise(g.IncompatibleRegExpUVFlags,{at:h()}),o.includes(t)&&this.raise(g.DuplicateRegExpFlags,{at:h()});else{if(!he(e)&&92!==e)break;this.raise(g.MalformedRegExpFlags,{at:h()})}++r,o+=t}this.state.pos=r,this.finishToken(135,{pattern:n,flags:o})}readInt(e,t,s=!1,i=!0){const{n:r,pos:a}=$e(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,t,s,i,this.errorHandlers_readInt,!1);return this.state.pos=a,r}readRadixNumber(e){const t=this.state.curPosition();let s=!1;this.state.pos+=2;const i=this.readInt(e);null==i&&this.raise(g.InvalidDigit,{at:a(t,2),radix:e});const r=this.input.charCodeAt(this.state.pos);if(110===r)++this.state.pos,s=!0;else if(109===r)throw this.raise(g.InvalidDecimal,{at:t});if(oe(this.codePointAtPos(this.state.pos)))throw this.raise(g.NumberIdentifier,{at:this.state.curPosition()});if(s){const e=this.input.slice(t.index,this.state.pos).replace(/[_n]/g,"");this.finishToken(133,e)}else this.finishToken(132,i)}readNumber(e){const t=this.state.pos,s=this.state.curPosition();let i=!1,r=!1,n=!1,o=!1,h=!1;e||null!==this.readInt(10)||this.raise(g.InvalidNumber,{at:this.state.curPosition()});const p=this.state.pos-t>=2&&48===this.input.charCodeAt(t);if(p){const e=this.input.slice(t,this.state.pos);if(this.recordStrictModeErrors(g.StrictOctalLiteral,{at:s}),!this.state.strict){const t=e.indexOf("_");t>0&&this.raise(g.ZeroDigitNumericSeparator,{at:a(s,t)})}h=p&&!/[89]/.test(e)}let c=this.input.charCodeAt(this.state.pos);if(46!==c||h||(++this.state.pos,this.readInt(10),i=!0,c=this.input.charCodeAt(this.state.pos)),69!==c&&101!==c||h||(c=this.input.charCodeAt(++this.state.pos),43!==c&&45!==c||++this.state.pos,null===this.readInt(10)&&this.raise(g.InvalidOrMissingExponent,{at:s}),i=!0,o=!0,c=this.input.charCodeAt(this.state.pos)),110===c&&((i||p)&&this.raise(g.InvalidBigIntLiteral,{at:s}),++this.state.pos,r=!0),109===c&&(this.expectPlugin("decimal",this.state.curPosition()),(o||p)&&this.raise(g.InvalidDecimal,{at:s}),++this.state.pos,n=!0),oe(this.codePointAtPos(this.state.pos)))throw this.raise(g.NumberIdentifier,{at:this.state.curPosition()});const l=this.input.slice(t,this.state.pos).replace(/[_mn]/g,"");if(r)return void this.finishToken(133,l);if(n)return void this.finishToken(134,l);const u=h?parseInt(l,8):parseFloat(l);this.finishToken(132,u)}readCodePoint(e){const{code:t,pos:s}=Ke(this.input,this.state.pos,this.state.lineStart,this.state.curLine,e,this.errorHandlers_readCodePoint);return this.state.pos=s,t}readString(e){const{str:t,pos:s,curLine:i,lineStart:r}=Ve(34===e?"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(131,t)}readTemplateContinuation(){this.match(8)||this.unexpected(null,8),this.state.pos--,this.readTemplateToken()}readTemplateToken(){const e=this.input[this.state.pos],{str:t,firstInvalidLoc:s,pos:r,curLine:a,lineStart:n}=Ve("template",this.input,this.state.pos+1,this.state.lineStart,this.state.curLine,this.errorHandlers_readStringContents_template);this.state.pos=r+1,this.state.lineStart=n,this.state.curLine=a,s&&(this.state.firstInvalidTemplateEscapePos=new i(s.curLine,s.pos-s.lineStart,s.pos)),96===this.input.codePointAt(r)?this.finishToken(24,s?null:e+t+"`"):(this.state.pos++,this.finishToken(25,s?null:e+t+"${"))}recordStrictModeErrors(e,{at:t}){const s=t.index;this.state.strict&&!this.state.strictErrors.has(s)?this.raise(e,{at:t}):this.state.strictErrors.set(s,[e,t])}readWord1(e){this.state.containsEsc=!1;let t="";const s=this.state.pos;let i=this.state.pos;for(void 0!==e&&(this.state.pos+=e<=65535?1:2);this.state.pos<this.length;){const e=this.codePointAtPos(this.state.pos);if(he(e))this.state.pos+=e<=65535?1:2;else{if(92!==e)break;{this.state.containsEsc=!0,t+=this.input.slice(i,this.state.pos);const e=this.state.curPosition(),r=this.state.pos===s?oe:he;if(117!==this.input.charCodeAt(++this.state.pos)){this.raise(g.MissingUnicodeEscape,{at:this.state.curPosition()}),i=this.state.pos-1;continue}++this.state.pos;const a=this.readCodePoint(!0);null!==a&&(r(a)||this.raise(g.EscapedCharNotAnIdentifier,{at:e}),t+=String.fromCodePoint(a)),i=this.state.pos}}}return t+this.input.slice(i,this.state.pos)}readWord(e){const t=this.readWord1(e),s=L.get(t);void 0!==s?this.finishToken(s,G(s)):this.finishToken(130,t)}checkKeywordEscapes(){const{type:e}=this.state;X(e)&&this.state.containsEsc&&this.raise(g.InvalidEscapedReservedWord,{at:this.state.startLoc,reservedWord:G(e)})}raise(e,t){const{at:r}=t,a=s(t,We),n=e({loc:r instanceof i?r:r.loc.start,details:a});if(!this.options.errorRecovery)throw n;return this.isLookahead||this.state.errors.push(n),n}raiseOverwrite(e,t){const{at:r}=t,a=s(t,Je),n=r instanceof i?r:r.loc.start,o=n.index,h=this.state.errors;for(let t=h.length-1;t>=0;t--){const s=h[t];if(s.loc.index===o)return h[t]=e({loc:n,details:a});if(s.loc.index<o)break}return this.raise(e,t)}updateContext(e){}unexpected(e,t){throw this.raise(g.UnexpectedToken,{expected:t?G(t):null,at:null!=e?e:this.state.startLoc})}expectPlugin(e,t){if(this.hasPlugin(e))return!0;throw this.raise(g.MissingPlugin,{at:null!=t?t:this.state.startLoc,missingPlugin:[e]})}expectOnePlugin(e){if(!e.some((e=>this.hasPlugin(e))))throw this.raise(g.MissingOneOfPlugins,{at:this.state.startLoc,missingPlugin:e})}errorBuilder(e){return(t,s,i)=>{this.raise(e,{at:Xe(t,s,i)})}}}class Qe{constructor(){this.privateNames=new Set,this.loneAccessors=new Map,this.undefinedPrivateNames=new Map}}class et{constructor(e){this.parser=void 0,this.stack=[],this.undefinedPrivateNames=new Map,this.parser=e}current(){return this.stack[this.stack.length-1]}enter(){this.stack.push(new Qe)}exit(){const e=this.stack.pop(),t=this.current();for(const[s,i]of Array.from(e.undefinedPrivateNames))t?t.undefinedPrivateNames.has(s)||t.undefinedPrivateNames.set(s,i):this.parser.raise(g.InvalidPrivateFieldResolution,{at:i,identifierName:s})}declarePrivateName(e,t,s){const{privateNames:i,loneAccessors:r,undefinedPrivateNames:a}=this.current();let n=i.has(e);if(3&t){const s=n&&r.get(e);s?(n=(3&s)==(3&t)||(4&s)!=(4&t),n||r.delete(e)):n||r.set(e,t)}n&&this.parser.raise(g.PrivateNameRedeclaration,{at:s,identifierName:e}),i.add(e),a.delete(e)}usePrivateName(e,t){let s;for(s of this.stack)if(s.privateNames.has(e))return;s?s.undefinedPrivateNames.set(e,t):this.parser.raise(g.InvalidPrivateFieldResolution,{at:t,identifierName:e})}}class tt{constructor(e=0){this.type=void 0,this.type=e}canBeArrowParameterDeclaration(){return 2===this.type||1===this.type}isCertainlyParameterDeclaration(){return 3===this.type}}class st extends tt{constructor(e){super(e),this.declarationErrors=new Map}recordDeclarationError(e,{at:t}){const s=t.index;this.declarationErrors.set(s,[e,t])}clearDeclarationError(e){this.declarationErrors.delete(e)}iterateErrors(e){this.declarationErrors.forEach(e)}}class it{constructor(e){this.parser=void 0,this.stack=[new tt],this.parser=e}enter(e){this.stack.push(e)}exit(){this.stack.pop()}recordParameterInitializerError(e,{at:t}){const s={at:t.loc.start},{stack:i}=this;let r=i.length-1,a=i[r];for(;!a.isCertainlyParameterDeclaration();){if(!a.canBeArrowParameterDeclaration())return;a.recordDeclarationError(e,s),a=i[--r]}this.parser.raise(e,s)}recordArrowParameterBindingError(e,{at:t}){const{stack:s}=this,i=s[s.length-1],r={at:t.loc.start};if(i.isCertainlyParameterDeclaration())this.parser.raise(e,r);else{if(!i.canBeArrowParameterDeclaration())return;i.recordDeclarationError(e,r)}}recordAsyncArrowParametersError({at:e}){const{stack:t}=this;let s=t.length-1,i=t[s];for(;i.canBeArrowParameterDeclaration();)2===i.type&&i.recordDeclarationError(g.AwaitBindingIdentifier,{at:e}),i=t[--s]}validateAsPattern(){const{stack:e}=this,t=e[e.length-1];t.canBeArrowParameterDeclaration()&&t.iterateErrors((([t,s])=>{this.parser.raise(t,{at:s});let i=e.length-2,r=e[i];for(;r.canBeArrowParameterDeclaration();)r.clearDeclarationError(s.index),r=e[--i]}))}}function rt(){return new tt}class at{constructor(){this.stacks=[]}enter(e){this.stacks.push(e)}exit(){this.stacks.pop()}currentFlags(){return this.stacks[this.stacks.length-1]}get hasAwait(){return(2&this.currentFlags())>0}get hasYield(){return(1&this.currentFlags())>0}get hasReturn(){return(4&this.currentFlags())>0}get hasIn(){return(8&this.currentFlags())>0}}function nt(e,t){return(e?2:0)|(t?1:0)}class ot extends Ye{addExtra(e,t,s,i=!0){if(!e)return;const r=e.extra=e.extra||{};i?r[t]=s:Object.defineProperty(r,t,{enumerable:i,value:s})}isContextual(e){return this.state.type===e&&!this.state.containsEsc}isUnparsedContextual(e,t){const s=e+t.length;if(this.input.slice(e,s)===t){const e=this.input.charCodeAt(s);return!(he(e)||55296==(64512&e))}return!1}isLookaheadContextual(e){const t=this.nextTokenStart();return this.isUnparsedContextual(t,e)}eatContextual(e){return!!this.isContextual(e)&&(this.next(),!0)}expectContextual(e,t){if(!this.eatContextual(e)){if(null!=t)throw this.raise(t,{at:this.state.startLoc});this.unexpected(null,e)}}canInsertSemicolon(){return this.match(137)||this.match(8)||this.hasPrecedingLineBreak()}hasPrecedingLineBreak(){return ke.test(this.input.slice(this.state.lastTokEndLoc.index,this.state.start))}hasFollowingLineBreak(){return Be.lastIndex=this.state.end,Be.test(this.input)}isLineTerminator(){return this.eat(13)||this.canInsertSemicolon()}semicolon(e=!0){(e?this.isLineTerminator():this.eat(13))||this.raise(g.MissingSemicolon,{at:this.state.lastTokEndLoc})}expect(e,t){this.eat(e)||this.unexpected(t,e)}tryParse(e,t=this.state.clone()){const s={node:null};try{const i=e(((e=null)=>{throw s.node=e,s}));if(this.state.errors.length>t.errors.length){const e=this.state;return this.state=t,this.state.tokensLength=e.tokensLength,{node:i,error:e.errors[t.errors.length],thrown:!1,aborted:!1,failState:e}}return{node:i,error:null,thrown:!1,aborted:!1,failState:null}}catch(e){const i=this.state;if(this.state=t,e instanceof SyntaxError)return{node:null,error:e,thrown:!0,aborted:!1,failState:i};if(e===s)return{node:s.node,error:null,thrown:!1,aborted:!0,failState:i};throw e}}checkExpressionErrors(e,t){if(!e)return!1;const{shorthandAssignLoc:s,doubleProtoLoc:i,privateKeyLoc:r,optionalParametersLoc:a}=e;if(!t)return!!(s||i||a||r);null!=s&&this.raise(g.InvalidCoverInitializedName,{at:s}),null!=i&&this.raise(g.DuplicateProto,{at:i}),null!=r&&this.raise(g.UnexpectedPrivateField,{at:r}),null!=a&&this.unexpected(a)}isLiteralPropertyName(){return K(this.state.type)}isPrivateName(e){return"PrivateName"===e.type}getPrivateNameSV(e){return e.id.name}hasPropertyAsPrivateName(e){return("MemberExpression"===e.type||"OptionalMemberExpression"===e.type)&&this.isPrivateName(e.property)}isObjectProperty(e){return"ObjectProperty"===e.type}isObjectMethod(e){return"ObjectMethod"===e.type}initializeScopes(e="module"===this.options.sourceType){const t=this.state.labels;this.state.labels=[];const s=this.exportedIdentifiers;this.exportedIdentifiers=new Set;const i=this.inModule;this.inModule=e;const r=this.scope,a=this.getScopeHandler();this.scope=new a(this,e);const n=this.prodParam;this.prodParam=new at;const o=this.classScope;this.classScope=new et(this);const h=this.expressionScope;return this.expressionScope=new it(this),()=>{this.state.labels=t,this.exportedIdentifiers=s,this.inModule=i,this.scope=r,this.prodParam=n,this.classScope=o,this.expressionScope=h}}enterInitialScopes(){let e=0;this.inModule&&(e|=2),this.scope.enter(1),this.prodParam.enter(e)}checkDestructuringPrivate(e){const{privateKeyLoc:t}=e;null!==t&&this.expectPlugin("destructuringPrivate",t)}}class ht{constructor(){this.shorthandAssignLoc=null,this.doubleProtoLoc=null,this.privateKeyLoc=null,this.optionalParametersLoc=null}}class pt{constructor(e,t,s){this.type="",this.start=t,this.end=0,this.loc=new r(s),null!=e&&e.options.ranges&&(this.range=[t,0]),null!=e&&e.filename&&(this.loc.filename=e.filename)}}const ct=pt.prototype;function lt(e){const{type:t,start:s,end:i,loc:r,range:a,extra:n,name:o}=e,h=Object.create(ct);return h.type=t,h.start=s,h.end=i,h.loc=r,h.range=a,h.extra=n,h.name=o,"Placeholder"===t&&(h.expectedNode=e.expectedNode),h}ct.__clone=function(){const e=new pt(void 0,this.start,this.loc.start),t=Object.keys(this);for(let s=0,i=t.length;s<i;s++){const i=t[s];"leadingComments"!==i&&"trailingComments"!==i&&"innerComments"!==i&&(e[i]=this[i])}return e};class ut extends ot{startNode(){return new pt(this,this.state.start,this.state.startLoc)}startNodeAt(e){return new pt(this,e.index,e)}startNodeAtNode(e){return this.startNodeAt(e.loc.start)}finishNode(e,t){return this.finishNodeAt(e,t,this.state.lastTokEndLoc)}finishNodeAt(e,t,s){return e.type=t,e.end=s.index,e.loc.end=s,this.options.ranges&&(e.range[1]=s.index),this.options.attachComment&&this.processComment(e),e}resetStartLocation(e,t){e.start=t.index,e.loc.start=t,this.options.ranges&&(e.range[0]=t.index)}resetEndLocation(e,t=this.state.lastTokEndLoc){e.end=t.index,e.loc.end=t,this.options.ranges&&(e.range[1]=t.index)}resetStartLocationFromNode(e,t){this.resetStartLocation(e,t.loc.start)}}const dt=new Set(["_","any","bool","boolean","empty","extends","false","interface","mixed","null","number","static","string","true","typeof","void"]),mt=P`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:e})=>`Cannot overwrite reserved type ${e}.`,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:e,enumName:t})=>`Boolean enum members need to be initialized. Use either \`${e} = true,\` or \`${e} = false,\` in enum \`${t}\`.`,EnumDuplicateMemberName:({memberName:e,enumName:t})=>`Enum member names need to be unique, but the name \`${e}\` has already been used before in enum \`${t}\`.`,EnumInconsistentMemberValues:({enumName:e})=>`Enum \`${e}\` has inconsistent member initializers. Either use no initializers, or consistently use literals (either booleans, numbers, or strings) for all member initializers.`,EnumInvalidExplicitType:({invalidEnumType:e,enumName:t})=>`Enum type \`${e}\` is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${t}\`.`,EnumInvalidExplicitTypeUnknownSupplied:({enumName:e})=>`Supplied enum type is not valid. Use one of \`boolean\`, \`number\`, \`string\`, or \`symbol\` in enum \`${e}\`.`,EnumInvalidMemberInitializerPrimaryType:({enumName:e,memberName:t,explicitType:s})=>`Enum \`${e}\` has type \`${s}\`, so the initializer of \`${t}\` needs to be a ${s} literal.`,EnumInvalidMemberInitializerSymbolType:({enumName:e,memberName:t})=>`Symbol enum members cannot be initialized. Use \`${t},\` in enum \`${e}\`.`,EnumInvalidMemberInitializerUnknownType:({enumName:e,memberName:t})=>`The enum member initializer for \`${t}\` needs to be a literal (either a boolean, number, or string) in enum \`${e}\`.`,EnumInvalidMemberName:({enumName:e,memberName:t,suggestion:s})=>`Enum member names cannot start with lowercase 'a' through 'z'. Instead of using \`${t}\`, consider using \`${s}\`, in enum \`${e}\`.`,EnumNumberMemberNotInitialized:({enumName:e,memberName:t})=>`Number enum members need to be initialized, e.g. \`${t} = 1\` in enum \`${e}\`.`,EnumStringMemberInconsistentlyInitailized:({enumName:e})=>`String enum members need to consistently either all use initializers, or use no initializers, in enum \`${e}\`.`,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:e})=>`Unexpected reserved type ${e}.`,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:e,suggestion:t})=>`\`declare export ${e}\` is not supported. Use \`${t}\` instead.`,UnsupportedStatementInDeclareModule:"Only declares and type imports are allowed inside declare module.",UnterminatedFlowComment:"Unterminated flow-comment."});function ft(e){return"type"===e.importKind||"typeof"===e.importKind}function yt(e){return $(e)&&97!==e}const xt={const:"declare export var",let:"declare export var",type:"export type",interface:"export interface"},Pt=/\*?\s*@((?:no)?flow)\b/,gt={__proto__:null,quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"},bt=P`jsx`({AttributeIsEmpty:"JSX attributes must only be assigned a non-empty expression.",MissingClosingTagElement:({openingTagName:e})=>`Expected corresponding JSX closing tag for <${e}>.`,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:e,HTMLEntity:t})=>`Unexpected token \`${e}\`. Did you mean \`${t}\` or \`{'${e}'}\`?`,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 Tt(e){return!!e&&("JSXOpeningFragment"===e.type||"JSXClosingFragment"===e.type)}function vt(e){if("JSXIdentifier"===e.type)return e.name;if("JSXNamespacedName"===e.type)return e.namespace.name+":"+e.name.name;if("JSXMemberExpression"===e.type)return vt(e.object)+"."+vt(e.property);throw new Error("Node had unexpected type: "+e.type)}class At extends Te{constructor(...e){super(...e),this.types=new Set,this.enums=new Set,this.constEnums=new Set,this.classes=new Set,this.exportOnlyBindings=new Set}}class Et extends ve{constructor(...e){super(...e),this.importsStack=[]}createScope(e){return this.importsStack.push(new Set),new At(e)}enter(e){e==xe&&this.importsStack.push(new Set),super.enter(e)}exit(){const e=super.exit();return e==xe&&this.importsStack.pop(),e}hasImport(e,t){const s=this.importsStack.length;if(this.importsStack[s-1].has(e))return!0;if(!t&&s>1)for(let t=0;t<s-1;t++)if(this.importsStack[t].has(e))return!0;return!1}declareName(e,t,s){if(t&Pe)return this.hasImport(e,!0)&&this.parser.raise(g.VarRedeclaration,{at:s,identifierName:e}),void this.importsStack[this.importsStack.length-1].add(e);const i=this.currentScope();if(1024&t)return this.maybeExportDefined(i,e),void i.exportOnlyBindings.add(e);super.declareName(e,t,s),2&t&&(1&t||(this.checkRedeclarationInScope(i,e,t,s),this.maybeExportDefined(i,e)),i.types.add(e)),256&t&&i.enums.add(e),512&t&&i.constEnums.add(e),128&t&&i.classes.add(e)}isRedeclaredInScope(e,t,s){return e.enums.has(t)?!(256&s)||!!(512&s)!==e.constEnums.has(t):128&s&&e.classes.has(t)?!!e.lexical.has(t)&&!!(1&s):!!(2&s&&e.types.has(t))||super.isRedeclaredInScope(e,t,s)}checkLocalExport(e){const{name:t}=e;if(!this.hasImport(t)){for(let e=this.scopeStack.length-1;e>=0;e--){const s=this.scopeStack[e];if(s.types.has(t)||s.exportOnlyBindings.has(t))return}super.checkLocalExport(e)}}}const wt=e=>"ParenthesizedExpression"===e.type?wt(e.expression):e;class St extends ut{toAssignable(e,t=!1){var s,i;let r;switch(("ParenthesizedExpression"===e.type||null!=(s=e.extra)&&s.parenthesized)&&(r=wt(e),t?"Identifier"===r.type?this.expressionScope.recordArrowParameterBindingError(g.InvalidParenthesizedAssignment,{at:e}):"MemberExpression"!==r.type&&this.raise(g.InvalidParenthesizedAssignment,{at:e}):this.raise(g.InvalidParenthesizedAssignment,{at:e})),e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern";for(let s=0,i=e.properties.length,r=i-1;s<i;s++){var a;const i=e.properties[s],n=s===r;this.toAssignableObjectExpressionProp(i,n,t),n&&"RestElement"===i.type&&null!=(a=e.extra)&&a.trailingCommaLoc&&this.raise(g.RestTrailingComma,{at:e.extra.trailingCommaLoc})}break;case"ObjectProperty":{const{key:s,value:i}=e;this.isPrivateName(s)&&this.classScope.usePrivateName(this.getPrivateNameSV(s),s.loc.start),this.toAssignable(i,t);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":e.type="ArrayPattern",this.toAssignableList(e.elements,null==(i=e.extra)?void 0:i.trailingCommaLoc,t);break;case"AssignmentExpression":"="!==e.operator&&this.raise(g.MissingEqInAssignment,{at:e.left.loc.end}),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(r,t)}}toAssignableObjectExpressionProp(e,t,s){if("ObjectMethod"===e.type)this.raise("get"===e.kind||"set"===e.kind?g.PatternHasAccessor:g.PatternHasMethod,{at:e.key});else if("SpreadElement"===e.type){e.type="RestElement";const i=e.argument;this.checkToRestConversion(i,!1),this.toAssignable(i,s),t||this.raise(g.RestTrailingComma,{at:e})}else this.toAssignable(e,s)}toAssignableList(e,t,s){const i=e.length-1;for(let r=0;r<=i;r++){const a=e[r];if(a){if("SpreadElement"===a.type){a.type="RestElement";const e=a.argument;this.checkToRestConversion(e,!0),this.toAssignable(e,s)}else this.toAssignable(a,s);"RestElement"===a.type&&(r<i?this.raise(g.RestTrailingComma,{at:a}):t&&this.raise(g.RestTrailingComma,{at:t}))}}}isAssignable(e,t){switch(e.type){case"Identifier":case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":return!0;case"ObjectExpression":{const t=e.properties.length-1;return e.properties.every(((e,s)=>"ObjectMethod"!==e.type&&(s===t||"SpreadElement"!==e.type)&&this.isAssignable(e)))}case"ObjectProperty":return this.isAssignable(e.value);case"SpreadElement":return this.isAssignable(e.argument);case"ArrayExpression":return e.elements.every((e=>null===e||this.isAssignable(e)));case"AssignmentExpression":return"="===e.operator;case"ParenthesizedExpression":return this.isAssignable(e.expression);case"MemberExpression":case"OptionalMemberExpression":return!t;default:return!1}}toReferencedList(e,t){return e}toReferencedListDeep(e,t){this.toReferencedList(e,t);for(const t of e)"ArrayExpression"===(null==t?void 0:t.type)&&this.toReferencedListDeep(t.elements)}parseSpread(e){const t=this.startNode();return this.next(),t.argument=this.parseMaybeAssignAllowIn(e,void 0),this.finishNode(t,"SpreadElement")}parseRestBinding(){const e=this.startNode();return this.next(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")}parseBindingAtom(){switch(this.state.type){case 0:{const e=this.startNode();return this.next(),e.elements=this.parseBindingList(3,93,1),this.finishNode(e,"ArrayPattern")}case 5:return this.parseObjectLike(8,!0)}return this.parseIdentifier()}parseBindingList(e,t,s){const i=1&s,r=[];let a=!0;for(;!this.eat(e);)if(a?a=!1:this.expect(12),i&&this.match(12))r.push(null);else{if(this.eat(e))break;if(this.match(21)){if(r.push(this.parseAssignableListItemTypes(this.parseRestBinding(),s)),!this.checkCommaAfterRest(t)){this.expect(e);break}}else{const e=[];for(this.match(26)&&this.hasPlugin("decorators")&&this.raise(g.UnsupportedParameterDecorator,{at:this.state.startLoc});this.match(26);)e.push(this.parseDecorator());r.push(this.parseAssignableListItem(s,e))}}return r}parseBindingRestProperty(e){return this.next(),e.argument=this.parseIdentifier(),this.checkCommaAfterRest(125),this.finishNode(e,"RestElement")}parseBindingProperty(){const e=this.startNode(),{type:t,startLoc:s}=this.state;return 21===t?this.parseBindingRestProperty(e):(136===t?(this.expectPlugin("destructuringPrivate",s),this.classScope.usePrivateName(this.state.value,s),e.key=this.parsePrivateName()):this.parsePropertyName(e),e.method=!1,this.parseObjPropValue(e,s,!1,!1,!0,!1))}parseAssignableListItem(e,t){const s=this.parseMaybeDefault();this.parseAssignableListItemTypes(s,e);const i=this.parseMaybeDefault(s.loc.start,s);return t.length&&(s.decorators=t),i}parseAssignableListItemTypes(e,t){return e}parseMaybeDefault(e,t){var s;if(null!=e||(e=this.state.startLoc),t=null!=(s=t)?s:this.parseBindingAtom(),!this.eat(29))return t;const i=this.startNodeAt(e);return i.left=t,i.right=this.parseMaybeAssignAllowIn(),this.finishNode(i,"AssignmentPattern")}isValidLVal(e,t,s){return i={AssignmentPattern:"left",RestElement:"argument",ObjectProperty:"value",ParenthesizedExpression:"expression",ArrayPattern:"elements",ObjectPattern:"properties"},r=e,Object.hasOwnProperty.call(i,r)&&i[r];var i,r}checkLVal(e,{in:t,binding:s=64,checkClashes:i=!1,strictModeChanged:r=!1,hasParenthesizedAncestor:a=!1}){var n;const o=e.type;if(this.isObjectMethod(e))return;if("MemberExpression"===o)return void(s!==be&&this.raise(g.InvalidPropertyBindingPattern,{at:e}));if("Identifier"===o){this.checkIdentifier(e,s,r);const{name:t}=e;return void(i&&(i.has(t)?this.raise(g.ParamDupe,{at:e}):i.add(t)))}const h=this.isValidLVal(o,!(a||null!=(n=e.extra)&&n.parenthesized)&&"AssignmentExpression"===t.type,s);if(!0===h)return;if(!1===h){const i=s===be?g.InvalidLhs:g.InvalidLhsBinding;return void this.raise(i,{at:e,ancestor:t})}const[p,c]=Array.isArray(h)?h:[h,"ParenthesizedExpression"===o],l="ArrayPattern"===o||"ObjectPattern"===o||"ParenthesizedExpression"===o?{type:o}:t;for(const t of[].concat(e[p]))t&&this.checkLVal(t,{in:l,binding:s,checkClashes:i,strictModeChanged:r,hasParenthesizedAncestor:c})}checkIdentifier(e,t,s=!1){this.state.strict&&(s?fe(e.name,this.inModule):me(e.name))&&(t===be?this.raise(g.StrictEvalArguments,{at:e,referenceName:e.name}):this.raise(g.StrictEvalArgumentsBinding,{at:e,bindingName:e.name})),8192&t&&"let"===e.name&&this.raise(g.LetInLexicalBinding,{at:e}),t&be||this.declareNameFromIdentifier(e,t)}declareNameFromIdentifier(e,t){this.scope.declareName(e.name,t,e.loc.start)}checkToRestConversion(e,t){switch(e.type){case"ParenthesizedExpression":this.checkToRestConversion(e.expression,t);break;case"Identifier":case"MemberExpression":break;case"ArrayExpression":case"ObjectExpression":if(t)break;default:this.raise(g.InvalidRestAssignmentPattern,{at:e})}}checkCommaAfterRest(e){return!!this.match(12)&&(this.raise(this.lookaheadCharCode()===e?g.RestTrailingComma:g.ElementAfterRest,{at:this.state.startLoc}),!0)}}function Ct(e){if(!e)throw new Error("Assert fail")}const It=P`typescript`({AbstractMethodHasImplementation:({methodName:e})=>`Method '${e}' cannot have an implementation because it is marked abstract.`,AbstractPropertyHasInitializer:({propertyName:e})=>`Property '${e}' cannot have an initializer because it is marked abstract.`,AccesorCannotDeclareThisParameter:"'get' and 'set' accessors cannot declare 'this' parameters.",AccesorCannotHaveTypeParameters:"An accessor cannot have type parameters.",AccessorCannotBeOptional:"An 'accessor' property cannot be declared optional.",ClassMethodHasDeclare:"Class methods cannot have the 'declare' modifier.",ClassMethodHasReadonly:"Class methods cannot have the 'readonly' modifier.",ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference:"A 'const' initializer in an ambient context must be a string or numeric literal or literal enum reference.",ConstructorHasTypeParameters:"Type parameters cannot appear on a constructor declaration.",DeclareAccessor:({kind:e})=>`'declare' is not allowed in ${e}ters.`,DeclareClassFieldHasInitializer:"Initializers are not allowed in ambient contexts.",DeclareFunctionHasImplementation:"An implementation cannot be declared in ambient contexts.",DuplicateAccessibilityModifier:({modifier:e})=>"Accessibility modifier already seen.",DuplicateModifier:({modifier:e})=>`Duplicate modifier: '${e}'.`,EmptyHeritageClauseType:({token:e})=>`'${e}' list cannot be empty.`,EmptyTypeArguments:"Type argument list cannot be empty.",EmptyTypeParameters:"Type parameter list cannot be empty.",ExpectedAmbientAfterExportDeclare:"'export declare' must be followed by an ambient declaration.",ImportAliasHasImportType:"An import alias can not use 'import type'.",ImportReflectionHasImportType:"An `import module` declaration can not use `type` modifier",IncompatibleModifiers:({modifiers:e})=>`'${e[0]}' modifier cannot be used with '${e[1]}' modifier.`,IndexSignatureHasAbstract:"Index signatures cannot have the 'abstract' modifier.",IndexSignatureHasAccessibility:({modifier:e})=>`Index signatures cannot have an accessibility modifier ('${e}').`,IndexSignatureHasDeclare:"Index signatures cannot have the 'declare' modifier.",IndexSignatureHasOverride:"'override' modifier cannot appear on an index signature.",IndexSignatureHasStatic:"Index signatures cannot have the 'static' modifier.",InitializerNotAllowedInAmbientContext:"Initializers are not allowed in ambient contexts.",InvalidModifierOnTypeMember:({modifier:e})=>`'${e}' modifier cannot appear on a type member.`,InvalidModifierOnTypeParameter:({modifier:e})=>`'${e}' modifier cannot appear on a type parameter.`,InvalidModifierOnTypeParameterPositions:({modifier:e})=>`'${e}' modifier can only appear on a type parameter of a class, interface or type alias.`,InvalidModifiersOrder:({orderedModifiers:e})=>`'${e[0]}' modifier must precede '${e[1]}' modifier.`,InvalidPropertyAccessAfterInstantiationExpression:"Invalid property access after an instantiation expression. You can either wrap the instantiation expression in parentheses, or delete the type arguments.",InvalidTupleMemberLabel:"Tuple members must be labeled with a simple identifier.",MissingInterfaceName:"'interface' declarations must be followed by an identifier.",MixedLabeledAndUnlabeledElements:"Tuple members must all have names or all not have names.",NonAbstractClassHasAbstractMethod:"Abstract methods can only appear within an abstract class.",NonClassMethodPropertyHasAbstractModifer:"'abstract' modifier can only appear on a class, method, or property declaration.",OptionalTypeBeforeRequired:"A required element cannot follow an optional element.",OverrideNotInSubClass:"This member cannot have an 'override' modifier because its containing class does not extend another class.",PatternIsOptional:"A binding pattern parameter cannot be optional in an implementation signature.",PrivateElementHasAbstract:"Private elements cannot have the 'abstract' modifier.",PrivateElementHasAccessibility:({modifier:e})=>`Private elements cannot have an accessibility modifier ('${e}').`,ReadonlyForMethodSignature:"'readonly' modifier can only appear on a property declaration or index signature.",ReservedArrowTypeParam:"This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma, as in `<T,>() => ...`.",ReservedTypeAssertion:"This syntax is reserved in files with the .mts or .cts extension. Use an `as` expression instead.",SetAccesorCannotHaveOptionalParameter:"A 'set' accessor cannot have an optional parameter.",SetAccesorCannotHaveRestParameter:"A 'set' accessor cannot have rest parameter.",SetAccesorCannotHaveReturnType:"A 'set' accessor cannot have a return type annotation.",SingleTypeParameterWithoutTrailingComma:({typeParameterName:e})=>`Single type parameter ${e} should have a trailing comma. Example usage: <${e},>.`,StaticBlockCannotHaveModifier:"Static class blocks cannot have any modifier.",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:e})=>`Name in a signature must be an Identifier, ObjectPattern or ArrayPattern, instead got ${e}.`});function Nt(e){return"private"===e||"public"===e||"protected"===e}function kt(e){return"in"===e||"out"===e}function Lt(e){if("MemberExpression"!==e.type)return!1;const{computed:t,property:s}=e;return(!t||"StringLiteral"===s.type||!("TemplateLiteral"!==s.type||s.expressions.length>0))&&Dt(e.object)}function Mt(e,t){var s;const{type:i}=e;if(null!=(s=e.extra)&&s.parenthesized)return!1;if(t){if("Literal"===i){const{value:t}=e;if("string"==typeof t||"boolean"==typeof t)return!0}}else if("StringLiteral"===i||"BooleanLiteral"===i)return!0;return!(!Ot(e,t)&&!function(e,t){if("UnaryExpression"===e.type){const{operator:s,argument:i}=e;if("-"===s&&Ot(i,t))return!0}return!1}(e,t))||"TemplateLiteral"===i&&0===e.expressions.length||!!Lt(e)}function Ot(e,t){return t?"Literal"===e.type&&("number"==typeof e.value||"bigint"in e):"NumericLiteral"===e.type||"BigIntLiteral"===e.type}function Dt(e){return"Identifier"===e.type||"MemberExpression"===e.type&&!e.computed&&Dt(e.object)}const Bt=P`placeholders`({ClassNameIsRequired:"A class name is required.",UnexpectedSpace:"Unexpected space in placeholder."});function Ft(e,t){const[s,i]="string"==typeof t?[t,{}]:t,r=Object.keys(i),a=0===r.length;return e.some((e=>{if("string"==typeof e)return a&&e===s;{const[t,a]=e;if(t!==s)return!1;for(const e of r)if(a[e]!==i[e])return!1;return!0}}))}function Rt(e,t,s){const i=e.find((e=>Array.isArray(e)?e[0]===t:e===t));return i&&Array.isArray(i)&&i.length>1?i[1][s]:null}const jt=["minimal","fsharp","hack","smart"],Ut=["^^","@@","^","%","#"],_t=["hash","bar"],Vt={estree:e=>class extends e{parse(){const e=v(super.parse());return this.options.tokens&&(e.tokens=e.tokens.map(v)),e}parseRegExpLiteral({pattern:e,flags:t}){let s=null;try{s=new RegExp(e,t)}catch(e){}const i=this.estreeParseLiteral(s);return i.regex={pattern:e,flags:t},i}parseBigIntLiteral(e){let t;try{t=BigInt(e)}catch(e){t=null}const s=this.estreeParseLiteral(t);return s.bigint=String(s.value||e),s}parseDecimalLiteral(e){const t=this.estreeParseLiteral(null);return t.decimal=String(t.value||e),t}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){const t=e.value;delete e.value,t.type="Literal",t.raw=t.extra.raw,t.value=t.extra.expressionValue;const s=e;return s.type="ExpressionStatement",s.expression=t,s.directive=t.extra.rawValue,delete t.extra,s}initFunction(e,t){super.initFunction(e,t),e.expression=!1}checkDeclaration(e){null!=e&&this.isObjectProperty(e)?this.checkDeclaration(e.value):super.checkDeclaration(e)}getObjectOrClassMethodParams(e){return e.value.params}isValidDirective(e){var t;return"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&!(null!=(t=e.expression.extra)&&t.parenthesized)}parseBlockBody(e,t,s,i,r){super.parseBlockBody(e,t,s,i,r);const a=e.directives.map((e=>this.directiveToStmt(e)));e.body=a.concat(e.body),delete e.directives}pushClassMethod(e,t,s,i,r,a){this.parseMethod(t,s,i,r,a,"ClassMethod",!0),t.typeParameters&&(t.value.typeParameters=t.typeParameters,delete t.typeParameters),e.body.push(t)}parsePrivateName(){const e=super.parsePrivateName();return this.getPluginOption("estree","classFeatures")?this.convertPrivateNameToPrivateIdentifier(e):e}convertPrivateNameToPrivateIdentifier(e){const t=super.getPrivateNameSV(e);return delete e.id,e.name=t,e.type="PrivateIdentifier",e}isPrivateName(e){return this.getPluginOption("estree","classFeatures")?"PrivateIdentifier"===e.type:super.isPrivateName(e)}getPrivateNameSV(e){return this.getPluginOption("estree","classFeatures")?e.name:super.getPrivateNameSV(e)}parseLiteral(e,t){const s=super.parseLiteral(e,t);return s.raw=s.extra.raw,delete s.extra,s}parseFunctionBody(e,t,s=!1){super.parseFunctionBody(e,t,s),e.expression="BlockStatement"!==e.body.type}parseMethod(e,t,s,i,r,a,n=!1){let o=this.startNode();return o.kind=e.kind,o=super.parseMethod(o,t,s,i,r,a,n),o.type="FunctionExpression",delete o.kind,e.value=o,"ClassPrivateMethod"===a&&(e.computed=!1),this.finishNode(e,"MethodDefinition")}parseClassProperty(...e){const t=super.parseClassProperty(...e);return this.getPluginOption("estree","classFeatures")?(t.type="PropertyDefinition",t):t}parseClassPrivateProperty(...e){const t=super.parseClassPrivateProperty(...e);return this.getPluginOption("estree","classFeatures")?(t.type="PropertyDefinition",t.computed=!1,t):t}parseObjectMethod(e,t,s,i,r){const a=super.parseObjectMethod(e,t,s,i,r);return a&&(a.type="Property","method"===a.kind&&(a.kind="init"),a.shorthand=!1),a}parseObjectProperty(e,t,s,i){const r=super.parseObjectProperty(e,t,s,i);return r&&(r.kind="init",r.type="Property"),r}isValidLVal(e,t,s){return"Property"===e?"value":super.isValidLVal(e,t,s)}isAssignable(e,t){return null!=e&&this.isObjectProperty(e)?this.isAssignable(e.value,t):super.isAssignable(e,t)}toAssignable(e,t=!1){if(null!=e&&this.isObjectProperty(e)){const{key:s,value:i}=e;this.isPrivateName(s)&&this.classScope.usePrivateName(this.getPrivateNameSV(s),s.loc.start),this.toAssignable(i,t)}else super.toAssignable(e,t)}toAssignableObjectExpressionProp(e,t,s){"get"===e.kind||"set"===e.kind?this.raise(g.PatternHasAccessor,{at:e.key}):e.method?this.raise(g.PatternHasMethod,{at:e.key}):super.toAssignableObjectExpressionProp(e,t,s)}finishCallExpression(e,t){const s=super.finishCallExpression(e,t);var i;"Import"===s.callee.type&&(s.type="ImportExpression",s.source=s.arguments[0],this.hasPlugin("importAssertions")&&(s.attributes=null!=(i=s.arguments[1])?i:null),delete s.arguments,delete s.callee);return s}toReferencedArguments(e){"ImportExpression"!==e.type&&super.toReferencedArguments(e)}parseExport(e,t){const s=this.state.lastTokStartLoc,i=super.parseExport(e,t);switch(i.type){case"ExportAllDeclaration":i.exported=null;break;case"ExportNamedDeclaration":1===i.specifiers.length&&"ExportNamespaceSpecifier"===i.specifiers[0].type&&(i.type="ExportAllDeclaration",i.exported=i.specifiers[0].exported,delete i.specifiers);case"ExportDefaultDeclaration":{var r;const{declaration:e}=i;"ClassDeclaration"===(null==e?void 0:e.type)&&(null==(r=e.decorators)?void 0:r.length)>0&&e.start===i.start&&this.resetStartLocation(i,s)}}return i}parseSubscript(e,t,s,i){const r=super.parseSubscript(e,t,s,i);if(i.optionalChainMember){if("OptionalMemberExpression"!==r.type&&"OptionalCallExpression"!==r.type||(r.type=r.type.substring(8)),i.stop){const e=this.startNodeAtNode(r);return e.expression=r,this.finishNode(e,"ChainExpression")}}else"MemberExpression"!==r.type&&"CallExpression"!==r.type||(r.optional=!1);return r}hasPropertyAsPrivateName(e){return"ChainExpression"===e.type&&(e=e.expression),super.hasPropertyAsPrivateName(e)}isObjectProperty(e){return"Property"===e.type&&"init"===e.kind&&!e.method}isObjectMethod(e){return e.method||"get"===e.kind||"set"===e.kind}finishNodeAt(e,t,s){return v(super.finishNodeAt(e,t,s))}resetStartLocation(e,t){super.resetStartLocation(e,t),v(e)}resetEndLocation(e,t=this.state.lastTokEndLoc){super.resetEndLocation(e,t),v(e)}},jsx:e=>class extends e{jsxReadToken(){let e="",t=this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(bt.UnterminatedJsxContent,{at:this.state.startLoc});const s=this.input.charCodeAt(this.state.pos);switch(s){case 60:case 123:return this.state.pos===this.state.start?void(60===s&&this.state.canStartJSXElement?(++this.state.pos,this.finishToken(140)):super.getTokenFromCode(s)):(e+=this.input.slice(t,this.state.pos),void this.finishToken(139,e));case 38:e+=this.input.slice(t,this.state.pos),e+=this.jsxReadEntity(),t=this.state.pos;break;default:Me(s)?(e+=this.input.slice(t,this.state.pos),e+=this.jsxReadNewLine(!0),t=this.state.pos):++this.state.pos}}}jsxReadNewLine(e){const t=this.input.charCodeAt(this.state.pos);let s;return++this.state.pos,13===t&&10===this.input.charCodeAt(this.state.pos)?(++this.state.pos,s=e?"\n":"\r\n"):s=String.fromCharCode(t),++this.state.curLine,this.state.lineStart=this.state.pos,s}jsxReadString(e){let t="",s=++this.state.pos;for(;;){if(this.state.pos>=this.length)throw this.raise(g.UnterminatedString,{at:this.state.startLoc});const i=this.input.charCodeAt(this.state.pos);if(i===e)break;38===i?(t+=this.input.slice(s,this.state.pos),t+=this.jsxReadEntity(),s=this.state.pos):Me(i)?(t+=this.input.slice(s,this.state.pos),t+=this.jsxReadNewLine(!1),s=this.state.pos):++this.state.pos}t+=this.input.slice(s,this.state.pos++),this.finishToken(131,t)}jsxReadEntity(){const e=++this.state.pos;if(35===this.codePointAtPos(this.state.pos)){++this.state.pos;let e=10;120===this.codePointAtPos(this.state.pos)&&(e=16,++this.state.pos);const t=this.readInt(e,void 0,!1,"bail");if(null!==t&&59===this.codePointAtPos(this.state.pos))return++this.state.pos,String.fromCodePoint(t)}else{let t=0,s=!1;for(;t++<10&&this.state.pos<this.length&&!(s=59==this.codePointAtPos(this.state.pos));)++this.state.pos;if(s){const t=this.input.slice(e,this.state.pos),s=gt[t];if(++this.state.pos,s)return s}}return this.state.pos=e,"&"}jsxReadWord(){let e;const t=this.state.pos;do{e=this.input.charCodeAt(++this.state.pos)}while(he(e)||45===e);this.finishToken(138,this.input.slice(t,this.state.pos))}jsxParseIdentifier(){const e=this.startNode();return this.match(138)?e.name=this.state.value:X(this.state.type)?e.name=G(this.state.type):this.unexpected(),this.next(),this.finishNode(e,"JSXIdentifier")}jsxParseNamespacedName(){const e=this.state.startLoc,t=this.jsxParseIdentifier();if(!this.eat(14))return t;const s=this.startNodeAt(e);return s.namespace=t,s.name=this.jsxParseIdentifier(),this.finishNode(s,"JSXNamespacedName")}jsxParseElementName(){const e=this.state.startLoc;let t=this.jsxParseNamespacedName();if("JSXNamespacedName"===t.type)return t;for(;this.eat(16);){const s=this.startNodeAt(e);s.object=t,s.property=this.jsxParseIdentifier(),t=this.finishNode(s,"JSXMemberExpression")}return t}jsxParseAttributeValue(){let e;switch(this.state.type){case 5:return e=this.startNode(),this.setContext(E.brace),this.next(),e=this.jsxParseExpressionContainer(e,E.j_oTag),"JSXEmptyExpression"===e.expression.type&&this.raise(bt.AttributeIsEmpty,{at:e}),e;case 140:case 131:return this.parseExprAtom();default:throw this.raise(bt.UnsupportedJsxValue,{at:this.state.startLoc})}}jsxParseEmptyExpression(){const 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(E.j_expr),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXSpreadChild")}jsxParseExpressionContainer(e,t){if(this.match(8))e.expression=this.jsxParseEmptyExpression();else{const t=this.parseExpression();e.expression=t}return this.setContext(t),this.state.canStartJSXElement=!0,this.expect(8),this.finishNode(e,"JSXExpressionContainer")}jsxParseAttribute(){const e=this.startNode();return this.match(5)?(this.setContext(E.brace),this.next(),this.expect(21),e.argument=this.parseMaybeAssignAllowIn(),this.setContext(E.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){const t=this.startNodeAt(e);return this.eat(141)?this.finishNode(t,"JSXOpeningFragment"):(t.name=this.jsxParseElementName(),this.jsxParseOpeningElementAfterName(t))}jsxParseOpeningElementAfterName(e){const t=[];for(;!this.match(56)&&!this.match(141);)t.push(this.jsxParseAttribute());return e.attributes=t,e.selfClosing=this.eat(56),this.expect(141),this.finishNode(e,"JSXOpeningElement")}jsxParseClosingElementAt(e){const t=this.startNodeAt(e);return this.eat(141)?this.finishNode(t,"JSXClosingFragment"):(t.name=this.jsxParseElementName(),this.expect(141),this.finishNode(t,"JSXClosingElement"))}jsxParseElementAt(e){const t=this.startNodeAt(e),s=[],i=this.jsxParseOpeningElementAt(e);let r=null;if(!i.selfClosing){e:for(;;)switch(this.state.type){case 140:if(e=this.state.startLoc,this.next(),this.eat(56)){r=this.jsxParseClosingElementAt(e);break e}s.push(this.jsxParseElementAt(e));break;case 139:s.push(this.parseExprAtom());break;case 5:{const e=this.startNode();this.setContext(E.brace),this.next(),this.match(21)?s.push(this.jsxParseSpreadChild(e)):s.push(this.jsxParseExpressionContainer(e,E.j_expr));break}default:this.unexpected()}Tt(i)&&!Tt(r)&&null!==r?this.raise(bt.MissingClosingTagFragment,{at:r}):!Tt(i)&&Tt(r)?this.raise(bt.MissingClosingTagElement,{at:r,openingTagName:vt(i.name)}):Tt(i)||Tt(r)||vt(r.name)!==vt(i.name)&&this.raise(bt.MissingClosingTagElement,{at:r,openingTagName:vt(i.name)})}if(Tt(i)?(t.openingFragment=i,t.closingFragment=r):(t.openingElement=i,t.closingElement=r),t.children=s,this.match(47))throw this.raise(bt.UnwrappedAdjacentJSXElements,{at:this.state.startLoc});return Tt(i)?this.finishNode(t,"JSXFragment"):this.finishNode(t,"JSXElement")}jsxParseElement(){const e=this.state.startLoc;return this.next(),this.jsxParseElementAt(e)}setContext(e){const{context:t}=this.state;t[t.length-1]=e}parseExprAtom(e){return this.match(139)?this.parseLiteral(this.state.value,"JSXText"):this.match(140)?this.jsxParseElement():this.match(47)&&33!==this.input.charCodeAt(this.state.pos)?(this.replaceToken(140),this.jsxParseElement()):super.parseExprAtom(e)}skipSpace(){this.curContext().preserveSpace||super.skipSpace()}getTokenFromCode(e){const t=this.curContext();if(t!==E.j_expr){if(t===E.j_oTag||t===E.j_cTag){if(oe(e))return void this.jsxReadWord();if(62===e)return++this.state.pos,void this.finishToken(141);if((34===e||39===e)&&t===E.j_oTag)return void this.jsxReadString(e)}if(60===e&&this.state.canStartJSXElement&&33!==this.input.charCodeAt(this.state.pos+1))return++this.state.pos,void this.finishToken(140);super.getTokenFromCode(e)}else this.jsxReadToken()}updateContext(e){const{context:t,type:s}=this.state;if(56===s&&140===e)t.splice(-2,2,E.j_cTag),this.state.canStartJSXElement=!1;else if(140===s)t.push(E.j_oTag);else if(141===s){const s=t[t.length-1];s===E.j_oTag&&56===e||s===E.j_cTag?(t.pop(),this.state.canStartJSXElement=t[t.length-1]===E.j_expr):(this.setContext(E.j_expr),this.state.canStartJSXElement=!0)}else this.state.canStartJSXElement=j[s]}},flow:e=>class extends e{constructor(...e){super(...e),this.flowPragma=void 0}getScopeHandler(){return Ee}shouldParseTypes(){return this.getPluginOption("flow","all")||"flow"===this.flowPragma}shouldParseEnums(){return!!this.getPluginOption("flow","enums")}finishToken(e,t){131!==e&&13!==e&&28!==e&&void 0===this.flowPragma&&(this.flowPragma=null),super.finishToken(e,t)}addComment(e){if(void 0===this.flowPragma){const t=Pt.exec(e.value);if(t)if("flow"===t[1])this.flowPragma="flow";else{if("noflow"!==t[1])throw new Error("Unexpected flow pragma");this.flowPragma="noflow"}}super.addComment(e)}flowParseTypeInitialiser(e){const t=this.state.inType;this.state.inType=!0,this.expect(e||14);const s=this.flowParseType();return this.state.inType=t,s}flowParsePredicate(){const e=this.startNode(),t=this.state.startLoc;return this.next(),this.expectContextual(108),this.state.lastTokStart>t.index+1&&this.raise(mt.UnexpectedSpaceBetweenModuloChecks,{at:t}),this.eat(10)?(e.value=super.parseExpression(),this.expect(11),this.finishNode(e,"DeclaredPredicate")):this.finishNode(e,"InferredPredicate")}flowParseTypeAndPredicateInitialiser(){const e=this.state.inType;this.state.inType=!0,this.expect(14);let t=null,s=null;return this.match(54)?(this.state.inType=e,s=this.flowParsePredicate()):(t=this.flowParseType(),this.state.inType=e,this.match(54)&&(s=this.flowParsePredicate())),[t,s]}flowParseDeclareClass(e){return this.next(),this.flowParseInterfaceish(e,!0),this.finishNode(e,"DeclareClass")}flowParseDeclareFunction(e){this.next();const t=e.id=this.parseIdentifier(),s=this.startNode(),i=this.startNode();this.match(47)?s.typeParameters=this.flowParseTypeParameterDeclaration():s.typeParameters=null,this.expect(10);const r=this.flowParseFunctionTypeParams();return s.params=r.params,s.rest=r.rest,s.this=r._this,this.expect(11),[s.returnType,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),i.typeAnnotation=this.finishNode(s,"FunctionTypeAnnotation"),t.typeAnnotation=this.finishNode(i,"TypeAnnotation"),this.resetEndLocation(t),this.semicolon(),this.scope.declareName(e.id.name,2048,e.id.loc.start),this.finishNode(e,"DeclareFunction")}flowParseDeclare(e,t){return this.match(80)?this.flowParseDeclareClass(e):this.match(68)?this.flowParseDeclareFunction(e):this.match(74)?this.flowParseDeclareVariable(e):this.eatContextual(125)?this.match(16)?this.flowParseDeclareModuleExports(e):(t&&this.raise(mt.NestedDeclareModule,{at:this.state.lastTokStartLoc}),this.flowParseDeclareModule(e)):this.isContextual(128)?this.flowParseDeclareTypeAlias(e):this.isContextual(129)?this.flowParseDeclareOpaqueType(e):this.isContextual(127)?this.flowParseDeclareInterface(e):this.match(82)?this.flowParseDeclareExportDeclaration(e,t):void 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(131)?e.id=super.parseExprAtom():e.id=this.parseIdentifier();const t=e.body=this.startNode(),s=t.body=[];for(this.expect(5);!this.match(8);){let e=this.startNode();this.match(83)?(this.next(),this.isContextual(128)||this.match(87)||this.raise(mt.InvalidNonTypeImportInDeclareModule,{at:this.state.lastTokStartLoc}),super.parseImport(e)):(this.expectContextual(123,mt.UnsupportedStatementInDeclareModule),e=this.flowParseDeclare(e,!0)),s.push(e)}this.scope.exit(),this.expect(8),this.finishNode(t,"BlockStatement");let i=null,r=!1;return s.forEach((e=>{!function(e){return"DeclareExportAllDeclaration"===e.type||"DeclareExportDeclaration"===e.type&&(!e.declaration||"TypeAlias"!==e.declaration.type&&"InterfaceDeclaration"!==e.declaration.type)}(e)?"DeclareModuleExports"===e.type&&(r&&this.raise(mt.DuplicateDeclareModuleExports,{at:e}),"ES"===i&&this.raise(mt.AmbiguousDeclareModuleKind,{at:e}),i="CommonJS",r=!0):("CommonJS"===i&&this.raise(mt.AmbiguousDeclareModuleKind,{at:e}),i="ES")})),e.kind=i||"CommonJS",this.finishNode(e,"DeclareModule")}flowParseDeclareExportDeclaration(e,t){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(128)||this.isContextual(127))&&!t){const e=this.state.value;throw this.raise(mt.UnsupportedDeclareExportKind,{at:this.state.startLoc,unsupportedExportKind:e,suggestion:xt[e]})}return this.match(74)||this.match(68)||this.match(80)||this.isContextual(129)?(e.declaration=this.flowParseDeclare(this.startNode()),e.default=!1,this.finishNode(e,"DeclareExportDeclaration")):this.match(55)||this.match(5)||this.isContextual(127)||this.isContextual(128)||this.isContextual(129)?("ExportNamedDeclaration"===(e=this.parseExport(e,null)).type&&(e.type="ExportDeclaration",e.default=!1,delete e.exportKind),e.type="Declare"+e.type,e):void this.unexpected()}flowParseDeclareModuleExports(e){return this.next(),this.expectContextual(109),e.typeAnnotation=this.flowParseTypeAnnotation(),this.semicolon(),this.finishNode(e,"DeclareModuleExports")}flowParseDeclareTypeAlias(e){this.next();const t=this.flowParseTypeAlias(e);return t.type="DeclareTypeAlias",t}flowParseDeclareOpaqueType(e){this.next();const t=this.flowParseOpaqueType(e,!0);return t.type="DeclareOpaqueType",t}flowParseDeclareInterface(e){return this.next(),this.flowParseInterfaceish(e,!1),this.finishNode(e,"DeclareInterface")}flowParseInterfaceish(e,t){if(e.id=this.flowParseRestrictedIdentifier(!t,!0),this.scope.declareName(e.id.name,t?17:ge,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(!t&&this.eat(12));if(t){if(e.implements=[],e.mixins=[],this.eatContextual(115))do{e.mixins.push(this.flowParseInterfaceExtends())}while(this.eat(12));if(this.eatContextual(111))do{e.implements.push(this.flowParseInterfaceExtends())}while(this.eat(12))}e.body=this.flowParseObjectType({allowStatic:t,allowExact:!1,allowSpread:!1,allowProto:t,allowInexact:!1})}flowParseInterfaceExtends(){const 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(mt.UnexpectedReservedUnderscore,{at:this.state.startLoc})}checkReservedType(e,t,s){dt.has(e)&&this.raise(s?mt.AssignReservedType:mt.UnexpectedReservedType,{at:t,reservedType:e})}flowParseRestrictedIdentifier(e,t){return this.checkReservedType(this.state.value,this.state.startLoc,t),this.parseIdentifier(e)}flowParseTypeAlias(e){return e.id=this.flowParseRestrictedIdentifier(!1,!0),this.scope.declareName(e.id.name,ge,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,t){return this.expectContextual(128),e.id=this.flowParseRestrictedIdentifier(!0,!0),this.scope.declareName(e.id.name,ge,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,t||(e.impltype=this.flowParseTypeInitialiser(29)),this.semicolon(),this.finishNode(e,"OpaqueType")}flowParseTypeParameter(e=!1){const t=this.state.startLoc,s=this.startNode(),i=this.flowParseVariance(),r=this.flowParseTypeAnnotatableIdentifier();return s.name=r.name,s.variance=i,s.bound=r.typeAnnotation,this.match(29)?(this.eat(29),s.default=this.flowParseType()):e&&this.raise(mt.MissingTypeParamDefault,{at:t}),this.finishNode(s,"TypeParameter")}flowParseTypeParameterDeclaration(){const e=this.state.inType,t=this.startNode();t.params=[],this.state.inType=!0,this.match(47)||this.match(140)?this.next():this.unexpected();let s=!1;do{const e=this.flowParseTypeParameter(s);t.params.push(e),e.default&&(s=!0),this.match(48)||this.expect(12)}while(!this.match(48));return this.expect(48),this.state.inType=e,this.finishNode(t,"TypeParameterDeclaration")}flowParseTypeParameterInstantiation(){const e=this.startNode(),t=this.state.inType;e.params=[],this.state.inType=!0,this.expect(47);const s=this.state.noAnonFunctionType;for(this.state.noAnonFunctionType=!1;!this.match(48);)e.params.push(this.flowParseType()),this.match(48)||this.expect(12);return this.state.noAnonFunctionType=s,this.expect(48),this.state.inType=t,this.finishNode(e,"TypeParameterInstantiation")}flowParseTypeParameterInstantiationCallOrNew(){const e=this.startNode(),t=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=t,this.finishNode(e,"TypeParameterInstantiation")}flowParseInterfaceType(){const e=this.startNode();if(this.expectContextual(127),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(132)||this.match(131)?super.parseExprAtom():this.parseIdentifier(!0)}flowParseObjectTypeIndexer(e,t,s){return e.static=t,14===this.lookahead().type?(e.id=this.flowParseObjectPropertyKey(),e.key=this.flowParseTypeInitialiser()):(e.id=null,e.key=this.flowParseType()),this.expect(3),e.value=this.flowParseTypeInitialiser(),e.variance=s,this.finishNode(e,"ObjectTypeIndexer")}flowParseObjectTypeInternalSlot(e,t){return e.static=t,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,t){const s=this.startNode();return e.static=t,e.value=this.flowParseObjectTypeMethodish(s),this.finishNode(e,"ObjectTypeCallProperty")}flowParseObjectType({allowStatic:e,allowExact:t,allowSpread:s,allowProto:i,allowInexact:r}){const a=this.state.inType;this.state.inType=!0;const n=this.startNode();let o,h;n.callProperties=[],n.properties=[],n.indexers=[],n.internalSlots=[];let p=!1;for(t&&this.match(6)?(this.expect(6),o=9,h=!0):(this.expect(5),o=8,h=!1),n.exact=h;!this.match(o);){let t=!1,a=null,o=null;const c=this.startNode();if(i&&this.isContextual(116)){const t=this.lookahead();14!==t.type&&17!==t.type&&(this.next(),a=this.state.startLoc,e=!1)}if(e&&this.isContextual(104)){const e=this.lookahead();14!==e.type&&17!==e.type&&(this.next(),t=!0)}const l=this.flowParseVariance();if(this.eat(0))null!=a&&this.unexpected(a),this.eat(0)?(l&&this.unexpected(l.loc.start),n.internalSlots.push(this.flowParseObjectTypeInternalSlot(c,t))):n.indexers.push(this.flowParseObjectTypeIndexer(c,t,l));else if(this.match(10)||this.match(47))null!=a&&this.unexpected(a),l&&this.unexpected(l.loc.start),n.callProperties.push(this.flowParseObjectTypeCallProperty(c,t));else{let e="init";(this.isContextual(98)||this.isContextual(103))&&K(this.lookahead().type)&&(e=this.state.value,this.next());const i=this.flowParseObjectTypeProperty(c,t,a,l,e,s,null!=r?r:!h);null===i?(p=!0,o=this.state.lastTokStartLoc):n.properties.push(i)}this.flowObjectTypeSemicolon(),!o||this.match(8)||this.match(9)||this.raise(mt.UnexpectedExplicitInexactInObject,{at:o})}this.expect(o),s&&(n.inexact=p);const c=this.finishNode(n,"ObjectTypeAnnotation");return this.state.inType=a,c}flowParseObjectTypeProperty(e,t,s,i,r,a,n){if(this.eat(21))return this.match(12)||this.match(13)||this.match(8)||this.match(9)?(a?n||this.raise(mt.InexactInsideExact,{at:this.state.lastTokStartLoc}):this.raise(mt.InexactInsideNonObject,{at:this.state.lastTokStartLoc}),i&&this.raise(mt.InexactVariance,{at:i}),null):(a||this.raise(mt.UnexpectedSpreadType,{at:this.state.lastTokStartLoc}),null!=s&&this.unexpected(s),i&&this.raise(mt.SpreadVariance,{at:i}),e.argument=this.flowParseType(),this.finishNode(e,"ObjectTypeSpreadProperty"));{e.key=this.flowParseObjectPropertyKey(),e.static=t,e.proto=null!=s,e.kind=r;let n=!1;return this.match(47)||this.match(10)?(e.method=!0,null!=s&&this.unexpected(s),i&&this.unexpected(i.loc.start),e.value=this.flowParseObjectTypeMethodish(this.startNodeAt(e.loc.start)),"get"!==r&&"set"!==r||this.flowCheckGetterSetterParams(e),!a&&"constructor"===e.key.name&&e.value.this&&this.raise(mt.ThisParamBannedInConstructor,{at:e.value.this})):("init"!==r&&this.unexpected(),e.method=!1,this.eat(17)&&(n=!0),e.value=this.flowParseTypeInitialiser(),e.variance=i),e.optional=n,this.finishNode(e,"ObjectTypeProperty")}}flowCheckGetterSetterParams(e){const t="get"===e.kind?0:1,s=e.value.params.length+(e.value.rest?1:0);e.value.this&&this.raise("get"===e.kind?mt.GetterMayNotHaveThisParam:mt.SetterMayNotHaveThisParam,{at:e.value.this}),s!==t&&this.raise("get"===e.kind?g.BadGetterArity:g.BadSetterArity,{at:e}),"set"===e.kind&&e.value.rest&&this.raise(g.BadSetterRestParameter,{at:e})}flowObjectTypeSemicolon(){this.eat(13)||this.eat(12)||this.match(8)||this.match(9)||this.unexpected()}flowParseQualifiedTypeIdentifier(e,t){null!=e||(e=this.state.startLoc);let s=t||this.flowParseRestrictedIdentifier(!0);for(;this.eat(16);){const t=this.startNodeAt(e);t.qualification=s,t.id=this.flowParseRestrictedIdentifier(!0),s=this.finishNode(t,"QualifiedTypeIdentifier")}return s}flowParseGenericType(e,t){const s=this.startNodeAt(e);return s.typeParameters=null,s.id=this.flowParseQualifiedTypeIdentifier(e,t),this.match(47)&&(s.typeParameters=this.flowParseTypeParameterInstantiation()),this.finishNode(s,"GenericTypeAnnotation")}flowParseTypeofType(){const e=this.startNode();return this.expect(87),e.argument=this.flowParsePrimaryType(),this.finishNode(e,"TypeofTypeAnnotation")}flowParseTupleType(){const 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 t=null,s=!1,i=null;const r=this.startNode(),a=this.lookahead(),n=78===this.state.type;return 14===a.type||17===a.type?(n&&!e&&this.raise(mt.ThisParamMustBeFirst,{at:r}),t=this.parseIdentifier(n),this.eat(17)&&(s=!0,n&&this.raise(mt.ThisParamMayNotBeOptional,{at:r})),i=this.flowParseTypeInitialiser()):i=this.flowParseType(),r.name=t,r.optional=s,r.typeAnnotation=i,this.finishNode(r,"FunctionTypeParam")}reinterpretTypeAsFunctionTypeParam(e){const t=this.startNodeAt(e.loc.start);return t.name=null,t.optional=!1,t.typeAnnotation=e,this.finishNode(t,"FunctionTypeParam")}flowParseFunctionTypeParams(e=[]){let t=null,s=null;for(this.match(78)&&(s=this.flowParseFunctionTypeParam(!0),s.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)&&(t=this.flowParseFunctionTypeParam(!1)),{params:e,rest:t,_this:s}}flowIdentToTypeAnnotation(e,t,s){switch(s.name){case"any":return this.finishNode(t,"AnyTypeAnnotation");case"bool":case"boolean":return this.finishNode(t,"BooleanTypeAnnotation");case"mixed":return this.finishNode(t,"MixedTypeAnnotation");case"empty":return this.finishNode(t,"EmptyTypeAnnotation");case"number":return this.finishNode(t,"NumberTypeAnnotation");case"string":return this.finishNode(t,"StringTypeAnnotation");case"symbol":return this.finishNode(t,"SymbolTypeAnnotation");default:return this.checkNotUnderscore(s.name),this.flowParseGenericType(e,s)}}flowParsePrimaryType(){const e=this.state.startLoc,t=this.startNode();let s,i,r=!1;const a=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,i=this.flowParseTupleType(),this.state.noAnonFunctionType=a,i;case 47:return t.typeParameters=this.flowParseTypeParameterDeclaration(),this.expect(10),s=this.flowParseFunctionTypeParams(),t.params=s.params,t.rest=s.rest,t.this=s._this,this.expect(11),this.expect(19),t.returnType=this.flowParseType(),this.finishNode(t,"FunctionTypeAnnotation");case 10:if(this.next(),!this.match(11)&&!this.match(21))if(q(this.state.type)||this.match(78)){const e=this.lookahead().type;r=17!==e&&14!==e}else r=!0;if(r){if(this.state.noAnonFunctionType=!1,i=this.flowParseType(),this.state.noAnonFunctionType=a,this.state.noAnonFunctionType||!(this.match(12)||this.match(11)&&19===this.lookahead().type))return this.expect(11),i;this.eat(12)}return s=i?this.flowParseFunctionTypeParams([this.reinterpretTypeAsFunctionTypeParam(i)]):this.flowParseFunctionTypeParams(),t.params=s.params,t.rest=s.rest,t.this=s._this,this.expect(11),this.expect(19),t.returnType=this.flowParseType(),t.typeParameters=null,this.finishNode(t,"FunctionTypeAnnotation");case 131:return this.parseLiteral(this.state.value,"StringLiteralTypeAnnotation");case 85:case 86:return t.value=this.match(85),this.next(),this.finishNode(t,"BooleanLiteralTypeAnnotation");case 53:if("-"===this.state.value){if(this.next(),this.match(132))return this.parseLiteralAtNode(-this.state.value,"NumberLiteralTypeAnnotation",t);if(this.match(133))return this.parseLiteralAtNode(-this.state.value,"BigIntLiteralTypeAnnotation",t);throw this.raise(mt.UnexpectedSubtractionOperand,{at:this.state.startLoc})}return void this.unexpected();case 132:return this.parseLiteral(this.state.value,"NumberLiteralTypeAnnotation");case 133:return this.parseLiteral(this.state.value,"BigIntLiteralTypeAnnotation");case 88:return this.next(),this.finishNode(t,"VoidTypeAnnotation");case 84:return this.next(),this.finishNode(t,"NullLiteralTypeAnnotation");case 78:return this.next(),this.finishNode(t,"ThisTypeAnnotation");case 55:return this.next(),this.finishNode(t,"ExistsTypeAnnotation");case 87:return this.flowParseTypeofType();default:if(X(this.state.type)){const e=G(this.state.type);return this.next(),super.createIdentifier(t,e)}if(q(this.state.type))return this.isContextual(127)?this.flowParseInterfaceType():this.flowIdentToTypeAnnotation(e,t,this.parseIdentifier())}this.unexpected()}flowParsePostfixType(){const e=this.state.startLoc;let t=this.flowParsePrimaryType(),s=!1;for(;(this.match(0)||this.match(18))&&!this.canInsertSemicolon();){const i=this.startNodeAt(e),r=this.eat(18);s=s||r,this.expect(0),!r&&this.match(3)?(i.elementType=t,this.next(),t=this.finishNode(i,"ArrayTypeAnnotation")):(i.objectType=t,i.indexType=this.flowParseType(),this.expect(3),s?(i.optional=r,t=this.finishNode(i,"OptionalIndexedAccessType")):t=this.finishNode(i,"IndexedAccessType"))}return t}flowParsePrefixType(){const e=this.startNode();return this.eat(17)?(e.typeAnnotation=this.flowParsePrefixType(),this.finishNode(e,"NullableTypeAnnotation")):this.flowParsePostfixType()}flowParseAnonFunctionWithoutParens(){const e=this.flowParsePrefixType();if(!this.state.noAnonFunctionType&&this.eat(19)){const t=this.startNodeAt(e.loc.start);return t.params=[this.reinterpretTypeAsFunctionTypeParam(e)],t.rest=null,t.this=null,t.returnType=this.flowParseType(),t.typeParameters=null,this.finishNode(t,"FunctionTypeAnnotation")}return e}flowParseIntersectionType(){const e=this.startNode();this.eat(45);const t=this.flowParseAnonFunctionWithoutParens();for(e.types=[t];this.eat(45);)e.types.push(this.flowParseAnonFunctionWithoutParens());return 1===e.types.length?t:this.finishNode(e,"IntersectionTypeAnnotation")}flowParseUnionType(){const e=this.startNode();this.eat(43);const t=this.flowParseIntersectionType();for(e.types=[t];this.eat(43);)e.types.push(this.flowParseIntersectionType());return 1===e.types.length?t:this.finishNode(e,"UnionTypeAnnotation")}flowParseType(){const e=this.state.inType;this.state.inType=!0;const t=this.flowParseUnionType();return this.state.inType=e,t}flowParseTypeOrImplicitInstantiation(){if(130===this.state.type&&"_"===this.state.value){const e=this.state.startLoc,t=this.parseIdentifier();return this.flowParseGenericType(e,t)}return this.flowParseType()}flowParseTypeAnnotation(){const e=this.startNode();return e.typeAnnotation=this.flowParseTypeInitialiser(),this.finishNode(e,"TypeAnnotation")}flowParseTypeAnnotatableIdentifier(e){const t=e?this.parseIdentifier():this.flowParseRestrictedIdentifier();return this.match(14)&&(t.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(t)),t}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,t,s=!1){t?this.forwardNoArrowParamsConversionAt(e,(()=>super.parseFunctionBody(e,!0,s))):super.parseFunctionBody(e,!1,s)}parseFunctionBodyAndFinish(e,t,s=!1){if(this.match(14)){const t=this.startNode();[t.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),e.returnType=t.typeAnnotation?this.finishNode(t,"TypeAnnotation"):null}return super.parseFunctionBodyAndFinish(e,t,s)}parseStatementLike(e){if(this.state.strict&&this.isContextual(127)){if($(this.lookahead().type)){const e=this.startNode();return this.next(),this.flowParseInterface(e)}}else if(this.shouldParseEnums()&&this.isContextual(124)){const e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}const t=super.parseStatementLike(e);return void 0!==this.flowPragma||this.isValidDirective(t)||(this.flowPragma=null),t}parseExpressionStatement(e,t,s){if("Identifier"===t.type)if("declare"===t.name){if(this.match(80)||q(this.state.type)||this.match(68)||this.match(74)||this.match(82))return this.flowParseDeclare(e)}else if(q(this.state.type)){if("interface"===t.name)return this.flowParseInterface(e);if("type"===t.name)return this.flowParseTypeAlias(e);if("opaque"===t.name)return this.flowParseOpaqueType(e,!1)}return super.parseExpressionStatement(e,t,s)}shouldParseExportDeclaration(){const{type:e}=this.state;return J(e)||this.shouldParseEnums()&&124===e?!this.state.containsEsc:super.shouldParseExportDeclaration()}isExportDefaultSpecifier(){const{type:e}=this.state;return J(e)||this.shouldParseEnums()&&124===e?this.state.containsEsc:super.isExportDefaultSpecifier()}parseExportDefaultExpression(){if(this.shouldParseEnums()&&this.isContextual(124)){const e=this.startNode();return this.next(),this.flowParseEnumDeclaration(e)}return super.parseExportDefaultExpression()}parseConditional(e,t,s){if(!this.match(17))return e;if(this.state.maybeInArrowParameters){const t=this.lookaheadCharCode();if(44===t||61===t||58===t||41===t)return this.setOptionalParametersError(s),e}this.expect(17);const i=this.state.clone(),r=this.state.noArrowAt,a=this.startNodeAt(t);let{consequent:n,failed:o}=this.tryParseConditionalConsequent(),[h,p]=this.getArrowLikeExpressions(n);if(o||p.length>0){const e=[...r];if(p.length>0){this.state=i,this.state.noArrowAt=e;for(let t=0;t<p.length;t++)e.push(p[t].start);({consequent:n,failed:o}=this.tryParseConditionalConsequent()),[h,p]=this.getArrowLikeExpressions(n)}o&&h.length>1&&this.raise(mt.AmbiguousConditionalArrow,{at:i.startLoc}),o&&1===h.length&&(this.state=i,e.push(h[0].start),this.state.noArrowAt=e,({consequent:n,failed:o}=this.tryParseConditionalConsequent()))}return this.getArrowLikeExpressions(n,!0),this.state.noArrowAt=r,this.expect(14),a.test=e,a.consequent=n,a.alternate=this.forwardNoArrowParamsConversionAt(a,(()=>this.parseMaybeAssign(void 0,void 0))),this.finishNode(a,"ConditionalExpression")}tryParseConditionalConsequent(){this.state.noArrowParamsConversionAt.push(this.state.start);const e=this.parseMaybeAssignAllowIn(),t=!this.match(14);return this.state.noArrowParamsConversionAt.pop(),{consequent:e,failed:t}}getArrowLikeExpressions(e,t){const s=[e],i=[];for(;0!==s.length;){const e=s.pop();"ArrowFunctionExpression"===e.type?(e.typeParameters||!e.returnType?this.finishArrowValidation(e):i.push(e),s.push(e.body)):"ConditionalExpression"===e.type&&(s.push(e.consequent),s.push(e.alternate))}return t?(i.forEach((e=>this.finishArrowValidation(e))),[i,[]]):function(e,t){const s=[],i=[];for(let r=0;r<e.length;r++)(t(e[r])?s:i).push(e[r]);return[s,i]}(i,(e=>e.params.every((e=>this.isAssignable(e,!0)))))}finishArrowValidation(e){var t;this.toAssignableList(e.params,null==(t=e.extra)?void 0:t.trailingCommaLoc,!1),this.scope.enter(6),super.checkParams(e,!1,!0),this.scope.exit()}forwardNoArrowParamsConversionAt(e,t){let s;return-1!==this.state.noArrowParamsConversionAt.indexOf(e.start)?(this.state.noArrowParamsConversionAt.push(this.state.start),s=t(),this.state.noArrowParamsConversionAt.pop()):s=t(),s}parseParenItem(e,t){if(e=super.parseParenItem(e,t),this.eat(17)&&(e.optional=!0,this.resetEndLocation(e)),this.match(14)){const s=this.startNodeAt(t);return s.expression=e,s.typeAnnotation=this.flowParseTypeAnnotation(),this.finishNode(s,"TypeCastExpression")}return e}assertModuleNodeAllowed(e){"ImportDeclaration"===e.type&&("type"===e.importKind||"typeof"===e.importKind)||"ExportNamedDeclaration"===e.type&&"type"===e.exportKind||"ExportAllDeclaration"===e.type&&"type"===e.exportKind||super.assertModuleNodeAllowed(e)}parseExport(e,t){const s=super.parseExport(e,t);return"ExportNamedDeclaration"!==s.type&&"ExportAllDeclaration"!==s.type||(s.exportKind=s.exportKind||"value"),s}parseExportDeclaration(e){if(this.isContextual(128)){e.exportKind="type";const t=this.startNode();return this.next(),this.match(5)?(e.specifiers=this.parseExportSpecifiers(!0),super.parseExportFrom(e),null):this.flowParseTypeAlias(t)}if(this.isContextual(129)){e.exportKind="type";const t=this.startNode();return this.next(),this.flowParseOpaqueType(t,!1)}if(this.isContextual(127)){e.exportKind="type";const t=this.startNode();return this.next(),this.flowParseInterface(t)}if(this.shouldParseEnums()&&this.isContextual(124)){e.exportKind="value";const t=this.startNode();return this.next(),this.flowParseEnumDeclaration(t)}return super.parseExportDeclaration(e)}eatExportStar(e){return!!super.eatExportStar(e)||!(!this.isContextual(128)||55!==this.lookahead().type)&&(e.exportKind="type",this.next(),this.next(),!0)}maybeParseExportNamespaceSpecifier(e){const{startLoc:t}=this.state,s=super.maybeParseExportNamespaceSpecifier(e);return s&&"type"===e.exportKind&&this.unexpected(t),s}parseClassId(e,t,s){super.parseClassId(e,t,s),this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration())}parseClassMember(e,t,s){const{startLoc:i}=this.state;if(this.isContextual(123)){if(super.parseClassMemberFromModifier(e,t))return;t.declare=!0}super.parseClassMember(e,t,s),t.declare&&("ClassProperty"!==t.type&&"ClassPrivateProperty"!==t.type&&"PropertyDefinition"!==t.type?this.raise(mt.DeclareClassElement,{at:i}):t.value&&this.raise(mt.DeclareClassFieldInitializer,{at:t.value}))}isIterator(e){return"iterator"===e||"asyncIterator"===e}readIterator(){const e=super.readWord1(),t="@@"+e;this.isIterator(e)&&this.state.inType||this.raise(g.InvalidIdentifier,{at:this.state.curPosition(),identifierName:t}),this.finishToken(130,t)}getTokenFromCode(e){const t=this.input.charCodeAt(this.state.pos+1);123===e&&124===t?this.finishOp(6,2):!this.state.inType||62!==e&&60!==e?this.state.inType&&63===e?46===t?this.finishOp(18,2):this.finishOp(17,1):function(e,t,s){return 64===e&&64===t&&oe(s)}(e,t,this.input.charCodeAt(this.state.pos+2))?(this.state.pos+=2,this.readIterator()):super.getTokenFromCode(e):this.finishOp(62===e?48:47,1)}isAssignable(e,t){return"TypeCastExpression"===e.type?this.isAssignable(e.expression,t):super.isAssignable(e,t)}toAssignable(e,t=!1){t||"AssignmentExpression"!==e.type||"TypeCastExpression"!==e.left.type||(e.left=this.typeCastToParameter(e.left)),super.toAssignable(e,t)}toAssignableList(e,t,s){for(let t=0;t<e.length;t++){const s=e[t];"TypeCastExpression"===(null==s?void 0:s.type)&&(e[t]=this.typeCastToParameter(s))}super.toAssignableList(e,t,s)}toReferencedList(e,t){for(let i=0;i<e.length;i++){var s;const r=e[i];!r||"TypeCastExpression"!==r.type||null!=(s=r.extra)&&s.parenthesized||!(e.length>1)&&t||this.raise(mt.TypeCastInPattern,{at:r.typeAnnotation})}return e}parseArrayLike(e,t,s,i){const r=super.parseArrayLike(e,t,s,i);return t&&!this.state.maybeInArrowParameters&&this.toReferencedList(r.elements),r}isValidLVal(e,t,s){return"TypeCastExpression"===e||super.isValidLVal(e,t,s)}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,t,s,i,r,a){if(t.variance&&this.unexpected(t.variance.loc.start),delete t.variance,this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassMethod(e,t,s,i,r,a),t.params&&r){const e=t.params;e.length>0&&this.isThisParam(e[0])&&this.raise(mt.ThisParamBannedInConstructor,{at:t})}else if("MethodDefinition"===t.type&&r&&t.value.params){const e=t.value.params;e.length>0&&this.isThisParam(e[0])&&this.raise(mt.ThisParamBannedInConstructor,{at:t})}}pushClassPrivateMethod(e,t,s,i){t.variance&&this.unexpected(t.variance.loc.start),delete t.variance,this.match(47)&&(t.typeParameters=this.flowParseTypeParameterDeclaration()),super.pushClassPrivateMethod(e,t,s,i)}parseClassSuper(e){if(super.parseClassSuper(e),e.superClass&&this.match(47)&&(e.superTypeParameters=this.flowParseTypeParameterInstantiation()),this.isContextual(111)){this.next();const t=e.implements=[];do{const e=this.startNode();e.id=this.flowParseRestrictedIdentifier(!0),this.match(47)?e.typeParameters=this.flowParseTypeParameterInstantiation():e.typeParameters=null,t.push(this.finishNode(e,"ClassImplements"))}while(this.eat(12))}}checkGetterSetterParams(e){super.checkGetterSetterParams(e);const t=this.getObjectOrClassMethodParams(e);if(t.length>0){const s=t[0];this.isThisParam(s)&&"get"===e.kind?this.raise(mt.GetterMayNotHaveThisParam,{at:s}):this.isThisParam(s)&&this.raise(mt.SetterMayNotHaveThisParam,{at:s})}}parsePropertyNamePrefixOperator(e){e.variance=this.flowParseVariance()}parseObjPropValue(e,t,s,i,r,a,n){let o;e.variance&&this.unexpected(e.variance.loc.start),delete e.variance,this.match(47)&&!a&&(o=this.flowParseTypeParameterDeclaration(),this.match(10)||this.unexpected());const h=super.parseObjPropValue(e,t,s,i,r,a,n);return o&&((h.value||h).typeParameters=o),h}parseAssignableListItemTypes(e){return this.eat(17)&&("Identifier"!==e.type&&this.raise(mt.PatternIsOptional,{at:e}),this.isThisParam(e)&&this.raise(mt.ThisParamMayNotBeOptional,{at:e}),e.optional=!0),this.match(14)?e.typeAnnotation=this.flowParseTypeAnnotation():this.isThisParam(e)&&this.raise(mt.ThisParamAnnotationRequired,{at:e}),this.match(29)&&this.isThisParam(e)&&this.raise(mt.ThisParamNoDefault,{at:e}),this.resetEndLocation(e),e}parseMaybeDefault(e,t){const s=super.parseMaybeDefault(e,t);return"AssignmentPattern"===s.type&&s.typeAnnotation&&s.right.start<s.typeAnnotation.start&&this.raise(mt.TypeBeforeInitializer,{at:s.typeAnnotation}),s}shouldParseDefaultImport(e){return ft(e)?yt(this.state.type):super.shouldParseDefaultImport(e)}checkImportReflection(e){super.checkImportReflection(e),e.module&&"value"!==e.importKind&&this.raise(mt.ImportReflectionHasImportType,{at:e.specifiers[0].loc.start})}parseImportSpecifierLocal(e,t,s){t.local=ft(e)?this.flowParseRestrictedIdentifier(!0,!0):this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(t,s))}maybeParseDefaultImportSpecifier(e){e.importKind="value";let t=null;if(this.match(87)?t="typeof":this.isContextual(128)&&(t="type"),t){const s=this.lookahead(),{type:i}=s;"type"===t&&55===i&&this.unexpected(null,s.type),(yt(i)||5===i||55===i)&&(this.next(),e.importKind=t)}return super.maybeParseDefaultImportSpecifier(e)}parseImportSpecifier(e,t,s,i,r){const a=e.imported;let n=null;"Identifier"===a.type&&("type"===a.name?n="type":"typeof"===a.name&&(n="typeof"));let o=!1;if(this.isContextual(93)&&!this.isLookaheadContextual("as")){const t=this.parseIdentifier(!0);null===n||$(this.state.type)?(e.imported=a,e.importKind=null,e.local=this.parseIdentifier()):(e.imported=t,e.importKind=n,e.local=lt(t))}else{if(null!==n&&$(this.state.type))e.imported=this.parseIdentifier(!0),e.importKind=n;else{if(t)throw this.raise(g.ImportBindingIsString,{at:e,importName:a.value});e.imported=a,e.importKind=null}this.eatContextual(93)?e.local=this.parseIdentifier():(o=!0,e.local=lt(e.imported))}const h=ft(e);return s&&h&&this.raise(mt.ImportTypeShorthandOnlyInPureImport,{at:e}),(s||h)&&this.checkReservedType(e.local.name,e.local.loc.start,!0),!o||s||h||this.checkReservedWord(e.local.name,e.loc.start,!0,!0),this.finishImportSpecifier(e,"ImportSpecifier")}parseBindingAtom(){return 78===this.state.type?this.parseIdentifier(!0):super.parseBindingAtom()}parseFunctionParams(e,t){const s=e.kind;"get"!==s&&"set"!==s&&this.match(47)&&(e.typeParameters=this.flowParseTypeParameterDeclaration()),super.parseFunctionParams(e,t)}parseVarId(e,t){super.parseVarId(e,t),this.match(14)&&(e.id.typeAnnotation=this.flowParseTypeAnnotation(),this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,t){if(this.match(14)){const t=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0,e.returnType=this.flowParseTypeAnnotation(),this.state.noAnonFunctionType=t}return super.parseAsyncArrowFromCallExpression(e,t)}shouldParseAsyncArrow(){return this.match(14)||super.shouldParseAsyncArrow()}parseMaybeAssign(e,t){var s;let i,r=null;if(this.hasPlugin("jsx")&&(this.match(140)||this.match(47))){if(r=this.state.clone(),i=this.tryParse((()=>super.parseMaybeAssign(e,t)),r),!i.error)return i.node;const{context:s}=this.state,a=s[s.length-1];a!==E.j_oTag&&a!==E.j_expr||s.pop()}if(null!=(s=i)&&s.error||this.match(47)){var a,n;let s;r=r||this.state.clone();const o=this.tryParse((i=>{var r;s=this.flowParseTypeParameterDeclaration();const a=this.forwardNoArrowParamsConversionAt(s,(()=>{const i=super.parseMaybeAssign(e,t);return this.resetStartLocationFromNode(i,s),i}));null!=(r=a.extra)&&r.parenthesized&&i();const n=this.maybeUnwrapTypeCastExpression(a);return"ArrowFunctionExpression"!==n.type&&i(),n.typeParameters=s,this.resetStartLocationFromNode(n,s),a}),r);let h=null;if(o.node&&"ArrowFunctionExpression"===this.maybeUnwrapTypeCastExpression(o.node).type){if(!o.error&&!o.aborted)return o.node.async&&this.raise(mt.UnexpectedTypeParameterBeforeAsyncArrowFunction,{at:s}),o.node;h=o.node}if(null!=(a=i)&&a.node)return this.state=i.failState,i.node;if(h)return this.state=o.failState,h;if(null!=(n=i)&&n.thrown)throw i.error;if(o.thrown)throw o.error;throw this.raise(mt.UnexpectedTokenAfterTypeParameter,{at:s})}return super.parseMaybeAssign(e,t)}parseArrow(e){if(this.match(14)){const t=this.tryParse((()=>{const t=this.state.noAnonFunctionType;this.state.noAnonFunctionType=!0;const s=this.startNode();return[s.typeAnnotation,e.predicate]=this.flowParseTypeAndPredicateInitialiser(),this.state.noAnonFunctionType=t,this.canInsertSemicolon()&&this.unexpected(),this.match(19)||this.unexpected(),s}));if(t.thrown)return null;t.error&&(this.state=t.failState),e.returnType=t.node.typeAnnotation?this.finishNode(t.node,"TypeAnnotation"):null}return super.parseArrow(e)}shouldParseArrow(e){return this.match(14)||super.shouldParseArrow(e)}setArrowFunctionParameters(e,t){-1!==this.state.noArrowParamsConversionAt.indexOf(e.start)?e.params=t:super.setArrowFunctionParameters(e,t)}checkParams(e,t,s,i=!0){if(!s||-1===this.state.noArrowParamsConversionAt.indexOf(e.start)){for(let t=0;t<e.params.length;t++)this.isThisParam(e.params[t])&&t>0&&this.raise(mt.ThisParamMustBeFirst,{at:e.params[t]});super.checkParams(e,t,s,i)}}parseParenAndDistinguishExpression(e){return super.parseParenAndDistinguishExpression(e&&-1===this.state.noArrowAt.indexOf(this.state.start))}parseSubscripts(e,t,s){if("Identifier"===e.type&&"async"===e.name&&-1!==this.state.noArrowAt.indexOf(t.index)){this.next();const s=this.startNodeAt(t);s.callee=e,s.arguments=super.parseCallExpressionArguments(11,!1),e=this.finishNode(s,"CallExpression")}else if("Identifier"===e.type&&"async"===e.name&&this.match(47)){const i=this.state.clone(),r=this.tryParse((e=>this.parseAsyncArrowWithTypeParameters(t)||e()),i);if(!r.error&&!r.aborted)return r.node;const a=this.tryParse((()=>super.parseSubscripts(e,t,s)),i);if(a.node&&!a.error)return a.node;if(r.node)return this.state=r.failState,r.node;if(a.node)return this.state=a.failState,a.node;throw r.error||a.error}return super.parseSubscripts(e,t,s)}parseSubscript(e,t,s,i){if(this.match(18)&&this.isLookaheadToken_lt()){if(i.optionalChainMember=!0,s)return i.stop=!0,e;this.next();const r=this.startNodeAt(t);return r.callee=e,r.typeArguments=this.flowParseTypeParameterInstantiation(),this.expect(10),r.arguments=this.parseCallExpressionArguments(11,!1),r.optional=!0,this.finishCallExpression(r,!0)}if(!s&&this.shouldParseTypes()&&this.match(47)){const s=this.startNodeAt(t);s.callee=e;const r=this.tryParse((()=>(s.typeArguments=this.flowParseTypeParameterInstantiationCallOrNew(),this.expect(10),s.arguments=super.parseCallExpressionArguments(11,!1),i.optionalChainMember&&(s.optional=!1),this.finishCallExpression(s,i.optionalChainMember))));if(r.node)return r.error&&(this.state=r.failState),r.node}return super.parseSubscript(e,t,s,i)}parseNewCallee(e){super.parseNewCallee(e);let t=null;this.shouldParseTypes()&&this.match(47)&&(t=this.tryParse((()=>this.flowParseTypeParameterInstantiationCallOrNew())).node),e.typeArguments=t}parseAsyncArrowWithTypeParameters(e){const t=this.startNodeAt(e);if(this.parseFunctionParams(t,!1),this.parseArrow(t))return super.parseArrowExpression(t,void 0,!0)}readToken_mult_modulo(e){const t=this.input.charCodeAt(this.state.pos+1);if(42===e&&47===t&&this.state.hasFlowComment)return this.state.hasFlowComment=!1,this.state.pos+=2,void this.nextToken();super.readToken_mult_modulo(e)}readToken_pipe_amp(e){const t=this.input.charCodeAt(this.state.pos+1);124!==e||125!==t?super.readToken_pipe_amp(e):this.finishOp(9,2)}parseTopLevel(e,t){const s=super.parseTopLevel(e,t);return this.state.hasFlowComment&&this.raise(mt.UnterminatedFlowComment,{at:this.state.curPosition()}),s}skipBlockComment(){if(!this.hasPlugin("flowComments")||!this.skipFlowComment())return super.skipBlockComment(this.state.hasFlowComment?"*-/":"*/");{if(this.state.hasFlowComment)throw this.raise(mt.NestedFlowComment,{at:this.state.startLoc});this.hasFlowCommentCompletion();const e=this.skipFlowComment();e&&(this.state.pos+=e,this.state.hasFlowComment=!0)}}skipFlowComment(){const{pos:e}=this.state;let t=2;for(;[32,9].includes(this.input.charCodeAt(e+t));)t++;const s=this.input.charCodeAt(t+e),i=this.input.charCodeAt(t+e+1);return 58===s&&58===i?t+2:"flow-include"===this.input.slice(t+e,t+e+12)?t+12:58===s&&58!==i&&t}hasFlowCommentCompletion(){if(-1===this.input.indexOf("*/",this.state.pos))throw this.raise(g.UnterminatedComment,{at:this.state.curPosition()})}flowEnumErrorBooleanMemberNotInitialized(e,{enumName:t,memberName:s}){this.raise(mt.EnumBooleanMemberNotInitialized,{at:e,memberName:s,enumName:t})}flowEnumErrorInvalidMemberInitializer(e,t){return this.raise(t.explicitType?"symbol"===t.explicitType?mt.EnumInvalidMemberInitializerSymbolType:mt.EnumInvalidMemberInitializerPrimaryType:mt.EnumInvalidMemberInitializerUnknownType,Object.assign({at:e},t))}flowEnumErrorNumberMemberNotInitialized(e,{enumName:t,memberName:s}){this.raise(mt.EnumNumberMemberNotInitialized,{at:e,enumName:t,memberName:s})}flowEnumErrorStringMemberInconsistentlyInitailized(e,{enumName:t}){this.raise(mt.EnumStringMemberInconsistentlyInitailized,{at:e,enumName:t})}flowEnumMemberInit(){const e=this.state.startLoc,t=()=>this.match(12)||this.match(8);switch(this.state.type){case 132:{const s=this.parseNumericLiteral(this.state.value);return t()?{type:"number",loc:s.loc.start,value:s}:{type:"invalid",loc:e}}case 131:{const s=this.parseStringLiteral(this.state.value);return t()?{type:"string",loc:s.loc.start,value:s}:{type:"invalid",loc:e}}case 85:case 86:{const s=this.parseBooleanLiteral(this.match(85));return t()?{type:"boolean",loc:s.loc.start,value:s}:{type:"invalid",loc:e}}default:return{type:"invalid",loc:e}}}flowEnumMemberRaw(){const e=this.state.startLoc;return{id:this.parseIdentifier(!0),init:this.eat(29)?this.flowEnumMemberInit():{type:"none",loc:e}}}flowEnumCheckExplicitTypeMismatch(e,t,s){const{explicitType:i}=t;null!==i&&i!==s&&this.flowEnumErrorInvalidMemberInitializer(e,t)}flowEnumMembers({enumName:e,explicitType:t}){const s=new Set,i={booleanMembers:[],numberMembers:[],stringMembers:[],defaultedMembers:[]};let r=!1;for(;!this.match(8);){if(this.eat(21)){r=!0;break}const a=this.startNode(),{id:n,init:o}=this.flowEnumMemberRaw(),h=n.name;if(""===h)continue;/^[a-z]/.test(h)&&this.raise(mt.EnumInvalidMemberName,{at:n,memberName:h,suggestion:h[0].toUpperCase()+h.slice(1),enumName:e}),s.has(h)&&this.raise(mt.EnumDuplicateMemberName,{at:n,memberName:h,enumName:e}),s.add(h);const p={enumName:e,explicitType:t,memberName:h};switch(a.id=n,o.type){case"boolean":this.flowEnumCheckExplicitTypeMismatch(o.loc,p,"boolean"),a.init=o.value,i.booleanMembers.push(this.finishNode(a,"EnumBooleanMember"));break;case"number":this.flowEnumCheckExplicitTypeMismatch(o.loc,p,"number"),a.init=o.value,i.numberMembers.push(this.finishNode(a,"EnumNumberMember"));break;case"string":this.flowEnumCheckExplicitTypeMismatch(o.loc,p,"string"),a.init=o.value,i.stringMembers.push(this.finishNode(a,"EnumStringMember"));break;case"invalid":throw this.flowEnumErrorInvalidMemberInitializer(o.loc,p);case"none":switch(t){case"boolean":this.flowEnumErrorBooleanMemberNotInitialized(o.loc,p);break;case"number":this.flowEnumErrorNumberMemberNotInitialized(o.loc,p);break;default:i.defaultedMembers.push(this.finishNode(a,"EnumDefaultedMember"))}}this.match(8)||this.expect(12)}return{members:i,hasUnknownMembers:r}}flowEnumStringMembers(e,t,{enumName:s}){if(0===e.length)return t;if(0===t.length)return e;if(t.length>e.length){for(const t of e)this.flowEnumErrorStringMemberInconsistentlyInitailized(t,{enumName:s});return t}for(const e of t)this.flowEnumErrorStringMemberInconsistentlyInitailized(e,{enumName:s});return e}flowEnumParseExplicitType({enumName:e}){if(!this.eatContextual(101))return null;if(!q(this.state.type))throw this.raise(mt.EnumInvalidExplicitTypeUnknownSupplied,{at:this.state.startLoc,enumName:e});const{value:t}=this.state;return this.next(),"boolean"!==t&&"number"!==t&&"string"!==t&&"symbol"!==t&&this.raise(mt.EnumInvalidExplicitType,{at:this.state.startLoc,enumName:e,invalidEnumType:t}),t}flowEnumBody(e,t){const s=t.name,i=t.loc.start,r=this.flowEnumParseExplicitType({enumName:s});this.expect(5);const{members:a,hasUnknownMembers:n}=this.flowEnumMembers({enumName:s,explicitType:r});switch(e.hasUnknownMembers=n,r){case"boolean":return e.explicitType=!0,e.members=a.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody");case"number":return e.explicitType=!0,e.members=a.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody");case"string":return e.explicitType=!0,e.members=this.flowEnumStringMembers(a.stringMembers,a.defaultedMembers,{enumName:s}),this.expect(8),this.finishNode(e,"EnumStringBody");case"symbol":return e.members=a.defaultedMembers,this.expect(8),this.finishNode(e,"EnumSymbolBody");default:{const t=()=>(e.members=[],this.expect(8),this.finishNode(e,"EnumStringBody"));e.explicitType=!1;const r=a.booleanMembers.length,n=a.numberMembers.length,o=a.stringMembers.length,h=a.defaultedMembers.length;if(r||n||o||h){if(r||n){if(!n&&!o&&r>=h){for(const e of a.defaultedMembers)this.flowEnumErrorBooleanMemberNotInitialized(e.loc.start,{enumName:s,memberName:e.id.name});return e.members=a.booleanMembers,this.expect(8),this.finishNode(e,"EnumBooleanBody")}if(!r&&!o&&n>=h){for(const e of a.defaultedMembers)this.flowEnumErrorNumberMemberNotInitialized(e.loc.start,{enumName:s,memberName:e.id.name});return e.members=a.numberMembers,this.expect(8),this.finishNode(e,"EnumNumberBody")}return this.raise(mt.EnumInconsistentMemberValues,{at:i,enumName:s}),t()}return e.members=this.flowEnumStringMembers(a.stringMembers,a.defaultedMembers,{enumName:s}),this.expect(8),this.finishNode(e,"EnumStringBody")}return t()}}}flowParseEnumDeclaration(e){const t=this.parseIdentifier();return e.id=t,e.body=this.flowEnumBody(this.startNode(),t),this.finishNode(e,"EnumDeclaration")}isLookaheadToken_lt(){const e=this.nextTokenStart();if(60===this.input.charCodeAt(e)){const t=this.input.charCodeAt(e+1);return 60!==t&&61!==t}return!1}maybeUnwrapTypeCastExpression(e){return"TypeCastExpression"===e.type?e.expression:e}},typescript:e=>class extends e{constructor(...e){super(...e),this.tsParseInOutModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out"],disallowedModifiers:["const","public","private","protected","readonly","declare","abstract","override"],errorTemplate:It.InvalidModifierOnTypeParameter}),this.tsParseConstModifier=this.tsParseModifiers.bind(this,{allowedModifiers:["const"],disallowedModifiers:["in","out"],errorTemplate:It.InvalidModifierOnTypeParameterPositions}),this.tsParseInOutConstModifiers=this.tsParseModifiers.bind(this,{allowedModifiers:["in","out","const"],disallowedModifiers:["public","private","protected","readonly","declare","abstract","override"],errorTemplate:It.InvalidModifierOnTypeParameter})}getScopeHandler(){return Et}tsIsIdentifier(){return q(this.state.type)}tsTokenCanFollowModifier(){return(this.match(0)||this.match(5)||this.match(55)||this.match(21)||this.match(136)||this.isLiteralPropertyName())&&!this.hasPrecedingLineBreak()}tsNextTokenCanFollowModifier(){return this.next(),this.tsTokenCanFollowModifier()}tsParseModifier(e,t){if(!q(this.state.type)&&58!==this.state.type&&75!==this.state.type)return;const s=this.state.value;if(-1!==e.indexOf(s)){if(t&&this.tsIsStartOfStaticBlocks())return;if(this.tsTryParse(this.tsNextTokenCanFollowModifier.bind(this)))return s}}tsParseModifiers({allowedModifiers:e,disallowedModifiers:t,stopOnStartOfClassStaticBlock:s,errorTemplate:i=It.InvalidModifierOnTypeMember},r){const a=(e,t,s,i)=>{t===s&&r[i]&&this.raise(It.InvalidModifiersOrder,{at:e,orderedModifiers:[s,i]})},n=(e,t,s,i)=>{(r[s]&&t===i||r[i]&&t===s)&&this.raise(It.IncompatibleModifiers,{at:e,modifiers:[s,i]})};for(;;){const{startLoc:o}=this.state,h=this.tsParseModifier(e.concat(null!=t?t:[]),s);if(!h)break;Nt(h)?r.accessibility?this.raise(It.DuplicateAccessibilityModifier,{at:o,modifier:h}):(a(o,h,h,"override"),a(o,h,h,"static"),a(o,h,h,"readonly"),r.accessibility=h):kt(h)?(r[h]&&this.raise(It.DuplicateModifier,{at:o,modifier:h}),r[h]=!0,a(o,h,"in","out")):(Object.hasOwnProperty.call(r,h)?this.raise(It.DuplicateModifier,{at:o,modifier:h}):(a(o,h,"static","readonly"),a(o,h,"static","override"),a(o,h,"override","readonly"),a(o,h,"abstract","override"),n(o,h,"declare","override"),n(o,h,"static","abstract")),r[h]=!0),null!=t&&t.includes(h)&&this.raise(i,{at:o,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,t){const s=[];for(;!this.tsIsListTerminator(e);)s.push(t());return s}tsParseDelimitedList(e,t,s){return function(e){if(null==e)throw new Error(`Unexpected ${e} value.`);return e}(this.tsParseDelimitedListWorker(e,t,!0,s))}tsParseDelimitedListWorker(e,t,s,i){const r=[];let a=-1;for(;!this.tsIsListTerminator(e);){a=-1;const i=t();if(null==i)return;if(r.push(i),!this.eat(12)){if(this.tsIsListTerminator(e))break;return void(s&&this.expect(12))}a=this.state.lastTokStart}return i&&(i.value=a),r}tsParseBracketedList(e,t,s,i,r){i||(s?this.expect(0):this.expect(47));const a=this.tsParseDelimitedList(e,t,r);return s?this.expect(3):this.expect(48),a}tsParseImportType(){const e=this.startNode();return this.expect(83),this.expect(10),this.match(131)||this.raise(It.UnsupportedImportTypeArgument,{at:this.state.startLoc}),e.argument=super.parseExprAtom(),this.expect(11),this.eat(16)&&(e.qualifier=this.tsParseEntityName()),this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSImportType")}tsParseEntityName(e=!0){let t=this.parseIdentifier(e);for(;this.eat(16);){const s=this.startNodeAtNode(t);s.left=t,s.right=this.parseIdentifier(e),t=this.finishNode(s,"TSQualifiedName")}return t}tsParseTypeReference(){const e=this.startNode();return e.typeName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeReference")}tsParseThisTypePredicate(e){this.next();const t=this.startNodeAtNode(e);return t.parameterName=e,t.typeAnnotation=this.tsParseTypeAnnotation(!1),t.asserts=!1,this.finishNode(t,"TSTypePredicate")}tsParseThisTypeNode(){const e=this.startNode();return this.next(),this.finishNode(e,"TSThisType")}tsParseTypeQuery(){const e=this.startNode();return this.expect(87),this.match(83)?e.exprName=this.tsParseImportType():e.exprName=this.tsParseEntityName(),!this.hasPrecedingLineBreak()&&this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSTypeQuery")}tsParseTypeParameter(e){const t=this.startNode();return e(t),t.name=this.tsParseTypeParameterName(),t.constraint=this.tsEatThenParseType(81),t.default=this.tsEatThenParseType(29),this.finishNode(t,"TSTypeParameter")}tsTryParseTypeParameters(e){if(this.match(47))return this.tsParseTypeParameters(e)}tsParseTypeParameters(e){const t=this.startNode();this.match(47)||this.match(140)?this.next():this.unexpected();const s={value:-1};return t.params=this.tsParseBracketedList("TypeParametersOrArguments",this.tsParseTypeParameter.bind(this,e),!1,!0,s),0===t.params.length&&this.raise(It.EmptyTypeParameters,{at:t}),-1!==s.value&&this.addExtra(t,"trailingComma",s.value),this.finishNode(t,"TSTypeParameterDeclaration")}tsFillSignature(e,t){const s=19===e;t.typeParameters=this.tsTryParseTypeParameters(this.tsParseConstModifier),this.expect(10),t.parameters=this.tsParseBindingListForSignature(),(s||this.match(e))&&(t.typeAnnotation=this.tsParseTypeOrTypePredicateAnnotation(e))}tsParseBindingListForSignature(){const e=super.parseBindingList(11,41,2);for(const t of e){const{type:e}=t;"AssignmentPattern"!==e&&"TSParameterProperty"!==e||this.raise(It.UnsupportedSignatureParameterKind,{at:t,type:e})}return e}tsParseTypeMemberSemicolon(){this.eat(12)||this.isLineTerminator()||this.expect(13)}tsParseSignatureMember(e,t){return this.tsFillSignature(14,t),this.tsParseTypeMemberSemicolon(),this.finishNode(t,e)}tsIsUnambiguouslyIndexSignature(){return this.next(),!!q(this.state.type)&&(this.next(),this.match(14))}tsTryParseIndexSignature(e){if(!this.match(0)||!this.tsLookAhead(this.tsIsUnambiguouslyIndexSignature.bind(this)))return;this.expect(0);const t=this.parseIdentifier();t.typeAnnotation=this.tsParseTypeAnnotation(),this.resetEndLocation(t),this.expect(3),e.parameters=[t];const s=this.tsTryParseTypeAnnotation();return s&&(e.typeAnnotation=s),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSIndexSignature")}tsParsePropertyOrMethodSignature(e,t){this.eat(17)&&(e.optional=!0);const s=e;if(this.match(10)||this.match(47)){t&&this.raise(It.ReadonlyForMethodSignature,{at:e});const i=s;i.kind&&this.match(47)&&this.raise(It.AccesorCannotHaveTypeParameters,{at:this.state.curPosition()}),this.tsFillSignature(14,i),this.tsParseTypeMemberSemicolon();const r="parameters",a="typeAnnotation";if("get"===i.kind)i[r].length>0&&(this.raise(g.BadGetterArity,{at:this.state.curPosition()}),this.isThisParam(i[r][0])&&this.raise(It.AccesorCannotDeclareThisParameter,{at:this.state.curPosition()}));else if("set"===i.kind){if(1!==i[r].length)this.raise(g.BadSetterArity,{at:this.state.curPosition()});else{const e=i[r][0];this.isThisParam(e)&&this.raise(It.AccesorCannotDeclareThisParameter,{at:this.state.curPosition()}),"Identifier"===e.type&&e.optional&&this.raise(It.SetAccesorCannotHaveOptionalParameter,{at:this.state.curPosition()}),"RestElement"===e.type&&this.raise(It.SetAccesorCannotHaveRestParameter,{at:this.state.curPosition()})}i[a]&&this.raise(It.SetAccesorCannotHaveReturnType,{at:i[a]})}else i.kind="method";return this.finishNode(i,"TSMethodSignature")}{const e=s;t&&(e.readonly=!0);const i=this.tsTryParseTypeAnnotation();return i&&(e.typeAnnotation=i),this.tsParseTypeMemberSemicolon(),this.finishNode(e,"TSPropertySignature")}}tsParseTypeMember(){const e=this.startNode();if(this.match(10)||this.match(47))return this.tsParseSignatureMember("TSCallSignatureDeclaration",e);if(this.match(77)){const t=this.startNode();return this.next(),this.match(10)||this.match(47)?this.tsParseSignatureMember("TSConstructSignatureDeclaration",e):(e.key=this.createIdentifier(t,"new"),this.tsParsePropertyOrMethodSignature(e,!1))}this.tsParseModifiers({allowedModifiers:["readonly"],disallowedModifiers:["declare","abstract","private","protected","public","static","override"]},e);return this.tsTryParseIndexSignature(e)||(super.parsePropertyName(e),e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||!this.tsTokenCanFollowModifier()||(e.kind=e.key.name,super.parsePropertyName(e)),this.tsParsePropertyOrMethodSignature(e,!!e.readonly))}tsParseTypeLiteral(){const e=this.startNode();return e.members=this.tsParseObjectTypeMembers(),this.finishNode(e,"TSTypeLiteral")}tsParseObjectTypeMembers(){this.expect(5);const e=this.tsParseList("TypeMembers",this.tsParseTypeMember.bind(this));return this.expect(8),e}tsIsStartOfMappedType(){return this.next(),this.eat(53)?this.isContextual(120):(this.isContextual(120)&&this.next(),!!this.match(0)&&(this.next(),!!this.tsIsIdentifier()&&(this.next(),this.match(58))))}tsParseMappedTypeParameter(){const e=this.startNode();return e.name=this.tsParseTypeParameterName(),e.constraint=this.tsExpectThenParseType(58),this.finishNode(e,"TSTypeParameter")}tsParseMappedType(){const e=this.startNode();return this.expect(5),this.match(53)?(e.readonly=this.state.value,this.next(),this.expectContextual(120)):this.eatContextual(120)&&(e.readonly=!0),this.expect(0),e.typeParameter=this.tsParseMappedTypeParameter(),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(){const e=this.startNode();e.elementTypes=this.tsParseBracketedList("TupleElementTypes",this.tsParseTupleElementType.bind(this),!0,!1);let t=!1,s=null;return e.elementTypes.forEach((e=>{const{type:i}=e;!t||"TSRestType"===i||"TSOptionalType"===i||"TSNamedTupleMember"===i&&e.optional||this.raise(It.OptionalTypeBeforeRequired,{at:e}),t||(t="TSNamedTupleMember"===i&&e.optional||"TSOptionalType"===i);let r=i;"TSRestType"===i&&(r=(e=e.typeAnnotation).type);const a="TSNamedTupleMember"===r;null!=s||(s=a),s!==a&&this.raise(It.MixedLabeledAndUnlabeledElements,{at:e})})),this.finishNode(e,"TSTupleType")}tsParseTupleElementType(){const{startLoc:e}=this.state,t=this.eat(21);let s,i,r,a;const n=$(this.state.type)?this.lookaheadCharCode():null;if(58===n)s=!0,r=!1,i=this.parseIdentifier(!0),this.expect(14),a=this.tsParseType();else if(63===n){r=!0;const e=this.state.startLoc,t=this.state.value,n=this.tsParseNonArrayType();58===this.lookaheadCharCode()?(s=!0,i=this.createIdentifier(this.startNodeAt(e),t),this.expect(17),this.expect(14),a=this.tsParseType()):(s=!1,a=n,this.expect(17))}else a=this.tsParseType(),r=this.eat(17),s=this.eat(14);if(s){let e;i?(e=this.startNodeAtNode(i),e.optional=r,e.label=i,e.elementType=a,this.eat(17)&&(e.optional=!0,this.raise(It.TupleOptionalAfterType,{at:this.state.lastTokStartLoc}))):(e=this.startNodeAtNode(a),e.optional=r,this.raise(It.InvalidTupleMemberLabel,{at:a}),e.label=a,e.elementType=this.tsParseType()),a=this.finishNode(e,"TSNamedTupleMember")}else if(r){const e=this.startNodeAtNode(a);e.typeAnnotation=a,a=this.finishNode(e,"TSOptionalType")}if(t){const t=this.startNodeAt(e);t.typeAnnotation=a,a=this.finishNode(t,"TSRestType")}return a}tsParseParenthesizedType(){const e=this.startNode();return this.expect(10),e.typeAnnotation=this.tsParseType(),this.expect(11),this.finishNode(e,"TSParenthesizedType")}tsParseFunctionOrConstructorType(e,t){const s=this.startNode();return"TSConstructorType"===e&&(s.abstract=!!t,t&&this.next(),this.next()),this.tsInAllowConditionalTypesContext((()=>this.tsFillSignature(19,s))),this.finishNode(s,e)}tsParseLiteralTypeNode(){const e=this.startNode();switch(this.state.type){case 132:case 133:case 131:case 85:case 86:e.literal=super.parseExprAtom();break;default:this.unexpected()}return this.finishNode(e,"TSLiteralType")}tsParseTemplateLiteralType(){const e=this.startNode();return e.literal=super.parseTemplate(!1),this.finishNode(e,"TSLiteralType")}parseTemplateSubstitution(){return this.state.inType?this.tsParseType():super.parseTemplateSubstitution()}tsParseThisTypeOrThisTypePredicate(){const e=this.tsParseThisTypeNode();return this.isContextual(114)&&!this.hasPrecedingLineBreak()?this.tsParseThisTypePredicate(e):e}tsParseNonArrayType(){switch(this.state.type){case 131:case 132:case 133:case 85:case 86:return this.tsParseLiteralTypeNode();case 53:if("-"===this.state.value){const e=this.startNode(),t=this.lookahead();return 132!==t.type&&133!==t.type&&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:{const{type:e}=this.state;if(q(e)||88===e||84===e){const t=88===e?"TSVoidKeyword":84===e?"TSNullKeyword":function(e){switch(e){case"any":return"TSAnyKeyword";case"boolean":return"TSBooleanKeyword";case"bigint":return"TSBigIntKeyword";case"never":return"TSNeverKeyword";case"number":return"TSNumberKeyword";case"object":return"TSObjectKeyword";case"string":return"TSStringKeyword";case"symbol":return"TSSymbolKeyword";case"undefined":return"TSUndefinedKeyword";case"unknown":return"TSUnknownKeyword";default:return}}(this.state.value);if(void 0!==t&&46!==this.lookaheadCharCode()){const e=this.startNode();return this.next(),this.finishNode(e,t)}return this.tsParseTypeReference()}}}this.unexpected()}tsParseArrayTypeOrHigher(){let e=this.tsParseNonArrayType();for(;!this.hasPrecedingLineBreak()&&this.eat(0);)if(this.match(3)){const t=this.startNodeAtNode(e);t.elementType=e,this.expect(3),e=this.finishNode(t,"TSArrayType")}else{const t=this.startNodeAtNode(e);t.objectType=e,t.indexType=this.tsParseType(),this.expect(3),e=this.finishNode(t,"TSIndexedAccessType")}return e}tsParseTypeOperator(){const e=this.startNode(),t=this.state.value;return this.next(),e.operator=t,e.typeAnnotation=this.tsParseTypeOperatorOrHigher(),"readonly"===t&&this.tsCheckTypeAnnotationForReadOnly(e),this.finishNode(e,"TSTypeOperator")}tsCheckTypeAnnotationForReadOnly(e){switch(e.typeAnnotation.type){case"TSTupleType":case"TSArrayType":return;default:this.raise(It.UnexpectedReadonly,{at:e})}}tsParseInferType(){const e=this.startNode();this.expectContextual(113);const t=this.startNode();return t.name=this.tsParseTypeParameterName(),t.constraint=this.tsTryParse((()=>this.tsParseConstraintForInferType())),e.typeParameter=this.finishNode(t,"TSTypeParameter"),this.finishNode(e,"TSInferType")}tsParseConstraintForInferType(){if(this.eat(81)){const e=this.tsInDisallowConditionalTypesContext((()=>this.tsParseType()));if(this.state.inDisallowConditionalTypesContext||!this.match(17))return e}}tsParseTypeOperatorOrHigher(){var e;return(e=this.state.type)>=119&&e<=121&&!this.state.containsEsc?this.tsParseTypeOperator():this.isContextual(113)?this.tsParseInferType():this.tsInAllowConditionalTypesContext((()=>this.tsParseArrayTypeOrHigher()))}tsParseUnionOrIntersectionType(e,t,s){const i=this.startNode(),r=this.eat(s),a=[];do{a.push(t())}while(this.eat(s));return 1!==a.length||r?(i.types=a,this.finishNode(i,e)):a[0]}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)||this.match(10)&&this.tsLookAhead(this.tsIsUnambiguouslyStartOfFunctionType.bind(this))}tsSkipParameterStart(){if(q(this.state.type)||this.match(78))return this.next(),!0;if(this.match(5)){const{errors:e}=this.state,t=e.length;try{return this.parseObjectLike(8,!0),e.length===t}catch(e){return!1}}if(this.match(0)){this.next();const{errors:e}=this.state,t=e.length;try{return super.parseBindingList(3,93,1),e.length===t}catch(e){return!1}}return!1}tsIsUnambiguouslyStartOfFunctionType(){if(this.next(),this.match(11)||this.match(21))return!0;if(this.tsSkipParameterStart()){if(this.match(14)||this.match(12)||this.match(17)||this.match(29))return!0;if(this.match(11)&&(this.next(),this.match(19)))return!0}return!1}tsParseTypeOrTypePredicateAnnotation(e){return this.tsInType((()=>{const t=this.startNode();this.expect(e);const s=this.startNode(),i=!!this.tsTryParse(this.tsParseTypePredicateAsserts.bind(this));if(i&&this.match(78)){let e=this.tsParseThisTypeOrThisTypePredicate();return"TSThisType"===e.type?(s.parameterName=e,s.asserts=!0,s.typeAnnotation=null,e=this.finishNode(s,"TSTypePredicate")):(this.resetStartLocationFromNode(e,s),e.asserts=!0),t.typeAnnotation=e,this.finishNode(t,"TSTypeAnnotation")}const r=this.tsIsIdentifier()&&this.tsTryParse(this.tsParseTypePredicatePrefix.bind(this));if(!r)return i?(s.parameterName=this.parseIdentifier(),s.asserts=i,s.typeAnnotation=null,t.typeAnnotation=this.finishNode(s,"TSTypePredicate"),this.finishNode(t,"TSTypeAnnotation")):this.tsParseTypeAnnotation(!1,t);const a=this.tsParseTypeAnnotation(!1);return s.parameterName=r,s.typeAnnotation=a,s.asserts=i,t.typeAnnotation=this.finishNode(s,"TSTypePredicate"),this.finishNode(t,"TSTypeAnnotation")}))}tsTryParseTypeOrTypePredicateAnnotation(){if(this.match(14))return this.tsParseTypeOrTypePredicateAnnotation(14)}tsTryParseTypeAnnotation(){if(this.match(14))return this.tsParseTypeAnnotation()}tsTryParseType(){return this.tsEatThenParseType(14)}tsParseTypePredicatePrefix(){const e=this.parseIdentifier();if(this.isContextual(114)&&!this.hasPrecedingLineBreak())return this.next(),e}tsParseTypePredicateAsserts(){if(107!==this.state.type)return!1;const e=this.state.containsEsc;return this.next(),!(!q(this.state.type)&&!this.match(78)||(e&&this.raise(g.InvalidEscapedReservedWord,{at:this.state.lastTokStartLoc,reservedWord:"asserts"}),0))}tsParseTypeAnnotation(e=!0,t=this.startNode()){return this.tsInType((()=>{e&&this.expect(14),t.typeAnnotation=this.tsParseType()})),this.finishNode(t,"TSTypeAnnotation")}tsParseType(){Ct(this.state.inType);const e=this.tsParseNonConditionalType();if(this.state.inDisallowConditionalTypesContext||this.hasPrecedingLineBreak()||!this.eat(81))return e;const t=this.startNodeAtNode(e);return t.checkType=e,t.extendsType=this.tsInDisallowConditionalTypesContext((()=>this.tsParseNonConditionalType())),this.expect(17),t.trueType=this.tsInAllowConditionalTypesContext((()=>this.tsParseType())),this.expect(14),t.falseType=this.tsInAllowConditionalTypesContext((()=>this.tsParseType())),this.finishNode(t,"TSConditionalType")}isAbstractConstructorSignature(){return this.isContextual(122)&&77===this.lookahead().type}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(It.ReservedTypeAssertion,{at:this.state.startLoc});const 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){const t=this.state.startLoc,s=this.tsParseDelimitedList("HeritageClauseElement",(()=>{const e=this.startNode();return e.expression=this.tsParseEntityName(),this.match(47)&&(e.typeParameters=this.tsParseTypeArguments()),this.finishNode(e,"TSExpressionWithTypeArguments")}));return s.length||this.raise(It.EmptyHeritageClauseType,{at:t,token:e}),s}tsParseInterfaceDeclaration(e,t={}){if(this.hasFollowingLineBreak())return null;this.expectContextual(127),t.declare&&(e.declare=!0),q(this.state.type)?(e.id=this.parseIdentifier(),this.checkIdentifier(e.id,130)):(e.id=null,this.raise(It.MissingInterfaceName,{at:this.state.startLoc})),e.typeParameters=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers),this.eat(81)&&(e.extends=this.tsParseHeritageClause("extends"));const s=this.startNode();return s.body=this.tsInType(this.tsParseObjectTypeMembers.bind(this)),e.body=this.finishNode(s,"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(112)&&16!==this.lookahead().type){const e=this.startNode();return this.next(),this.finishNode(e,"TSIntrinsicKeyword")}return this.tsParseType()})),this.semicolon(),this.finishNode(e,"TSTypeAliasDeclaration")}tsInNoContext(e){const t=this.state.context;this.state.context=[t[0]];try{return e()}finally{this.state.context=t}}tsInType(e){const t=this.state.inType;this.state.inType=!0;try{return e()}finally{this.state.inType=t}}tsInDisallowConditionalTypesContext(e){const t=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!0;try{return e()}finally{this.state.inDisallowConditionalTypesContext=t}}tsInAllowConditionalTypesContext(e){const t=this.state.inDisallowConditionalTypesContext;this.state.inDisallowConditionalTypesContext=!1;try{return e()}finally{this.state.inDisallowConditionalTypesContext=t}}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(){const e=this.startNode();return e.id=this.match(131)?super.parseStringLiteral(this.state.value):this.parseIdentifier(!0),this.eat(29)&&(e.initializer=super.parseMaybeAssignAllowIn()),this.finishNode(e,"TSEnumMember")}tsParseEnumDeclaration(e,t={}){return t.const&&(e.const=!0),t.declare&&(e.declare=!0),this.expectContextual(124),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")}tsParseModuleBlock(){const 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,t=!1){if(e.id=this.parseIdentifier(),t||this.checkIdentifier(e.id,1024),this.eat(16)){const t=this.startNode();this.tsParseModuleOrNamespaceDeclaration(t,!0),e.body=t}else this.scope.enter(xe),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit();return this.finishNode(e,"TSModuleDeclaration")}tsParseAmbientExternalModuleDeclaration(e){return this.isContextual(110)?(e.global=!0,e.id=this.parseIdentifier()):this.match(131)?e.id=super.parseStringLiteral(this.state.value):this.unexpected(),this.match(5)?(this.scope.enter(xe),this.prodParam.enter(0),e.body=this.tsParseModuleBlock(),this.prodParam.exit(),this.scope.exit()):this.semicolon(),this.finishNode(e,"TSModuleDeclaration")}tsParseImportEqualsDeclaration(e,t){e.isExport=t||!1,e.id=this.parseIdentifier(),this.checkIdentifier(e.id,Pe),this.expect(29);const s=this.tsParseModuleReference();return"type"===e.importKind&&"TSExternalModuleReference"!==s.type&&this.raise(It.ImportAliasHasImportType,{at:s}),e.moduleReference=s,this.semicolon(),this.finishNode(e,"TSImportEqualsDeclaration")}tsIsExternalModuleReference(){return this.isContextual(117)&&40===this.lookaheadCharCode()}tsParseModuleReference(){return this.tsIsExternalModuleReference()?this.tsParseExternalModuleReference():this.tsParseEntityName(!1)}tsParseExternalModuleReference(){const e=this.startNode();return this.expectContextual(117),this.expect(10),this.match(131)||this.unexpected(),e.expression=super.parseExprAtom(),this.expect(11),this.finishNode(e,"TSExternalModuleReference")}tsLookAhead(e){const t=this.state.clone(),s=e();return this.state=t,s}tsTryParseAndCatch(e){const t=this.tryParse((t=>e()||t()));if(!t.aborted&&t.node)return t.error&&(this.state=t.failState),t.node}tsTryParse(e){const t=this.state.clone(),s=e();if(void 0!==s&&!1!==s)return s;this.state=t}tsTryParseDeclare(e){if(this.isLineTerminator())return;let t,s=this.state.type;return this.isContextual(99)&&(s=74,t="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 124:return this.tsParseEnumDeclaration(e,{declare:!0});case 110:return this.tsParseAmbientExternalModuleDeclaration(e);case 75:case 74:return this.match(75)&&this.isLookaheadContextual("enum")?(this.expect(75),this.tsParseEnumDeclaration(e,{const:!0,declare:!0})):(e.declare=!0,this.parseVarStatement(e,t||this.state.value,!0));case 127:{const t=this.tsParseInterfaceDeclaration(e,{declare:!0});if(t)return t}default:if(q(s))return this.tsParseDeclaration(e,this.state.value,!0,null)}}))}tsTryParseExportDeclaration(){return this.tsParseDeclaration(this.startNode(),this.state.value,!0,null)}tsParseExpressionStatement(e,t,s){switch(t.name){case"declare":{const t=this.tsTryParseDeclare(e);return t&&(t.declare=!0),t}case"global":if(this.match(5)){this.scope.enter(xe),this.prodParam.enter(0);const s=e;return s.global=!0,s.id=t,s.body=this.tsParseModuleBlock(),this.scope.exit(),this.prodParam.exit(),this.finishNode(s,"TSModuleDeclaration")}break;default:return this.tsParseDeclaration(e,t.name,!1,s)}}tsParseDeclaration(e,t,s,i){switch(t){case"abstract":if(this.tsCheckLineTerminator(s)&&(this.match(80)||q(this.state.type)))return this.tsParseAbstractDeclaration(e,i);break;case"module":if(this.tsCheckLineTerminator(s)){if(this.match(131))return this.tsParseAmbientExternalModuleDeclaration(e);if(q(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(e)}break;case"namespace":if(this.tsCheckLineTerminator(s)&&q(this.state.type))return this.tsParseModuleOrNamespaceDeclaration(e);break;case"type":if(this.tsCheckLineTerminator(s)&&q(this.state.type))return this.tsParseTypeAliasDeclaration(e)}}tsCheckLineTerminator(e){return e?!this.hasFollowingLineBreak()&&(this.next(),!0):!this.isLineTerminator()}tsTryParseGenericAsyncArrowFunction(e){if(!this.match(47))return;const t=this.state.maybeInArrowParameters;this.state.maybeInArrowParameters=!0;const s=this.tsTryParseAndCatch((()=>{const t=this.startNodeAt(e);return t.typeParameters=this.tsParseTypeParameters(this.tsParseConstModifier),super.parseFunctionParams(t),t.returnType=this.tsTryParseTypeOrTypePredicateAnnotation(),this.expect(19),t}));return this.state.maybeInArrowParameters=t,s?super.parseArrowExpression(s,null,!0):void 0}tsParseTypeArgumentsInExpression(){if(47===this.reScan_lt())return this.tsParseTypeArguments()}tsParseTypeArguments(){const e=this.startNode();return e.params=this.tsInType((()=>this.tsInNoContext((()=>(this.expect(47),this.tsParseDelimitedList("TypeParametersOrArguments",this.tsParseType.bind(this))))))),0===e.params.length?this.raise(It.EmptyTypeArguments,{at:e}):this.state.inType||this.curContext()!==E.brace||this.reScan_lt_gt(),this.expect(48),this.finishNode(e,"TSTypeParameterInstantiation")}tsIsDeclarationStart(){return(e=this.state.type)>=122&&e<=128;var e}isExportDefaultSpecifier(){return!this.tsIsDeclarationStart()&&super.isExportDefaultSpecifier()}parseAssignableListItem(e,t){const s=this.state.startLoc,i={};this.tsParseModifiers({allowedModifiers:["public","private","protected","override","readonly"]},i);const r=i.accessibility,a=i.override,n=i.readonly;4&e||!(r||n||a)||this.raise(It.UnexpectedParameterModifier,{at:s});const o=this.parseMaybeDefault();this.parseAssignableListItemTypes(o,e);const h=this.parseMaybeDefault(o.loc.start,o);if(r||n||a){const e=this.startNodeAt(s);return t.length&&(e.decorators=t),r&&(e.accessibility=r),n&&(e.readonly=n),a&&(e.override=a),"Identifier"!==h.type&&"AssignmentPattern"!==h.type&&this.raise(It.UnsupportedParameterPropertyKind,{at:e}),e.parameter=h,this.finishNode(e,"TSParameterProperty")}return t.length&&(o.decorators=t),h}isSimpleParameter(e){return"TSParameterProperty"===e.type&&super.isSimpleParameter(e.parameter)||super.isSimpleParameter(e)}tsDisallowOptionalPattern(e){for(const t of e.params)"Identifier"!==t.type&&t.optional&&!this.state.isAmbientContext&&this.raise(It.PatternIsOptional,{at:t})}setArrowFunctionParameters(e,t,s){super.setArrowFunctionParameters(e,t,s),this.tsDisallowOptionalPattern(e)}parseFunctionBodyAndFinish(e,t,s=!1){this.match(14)&&(e.returnType=this.tsParseTypeOrTypePredicateAnnotation(14));const i="FunctionDeclaration"===t?"TSDeclareFunction":"ClassMethod"===t||"ClassPrivateMethod"===t?"TSDeclareMethod":void 0;return i&&!this.match(5)&&this.isLineTerminator()?this.finishNode(e,i):"TSDeclareFunction"===i&&this.state.isAmbientContext&&(this.raise(It.DeclareFunctionHasImplementation,{at:e}),e.declare)?super.parseFunctionBodyAndFinish(e,i,s):(this.tsDisallowOptionalPattern(e),super.parseFunctionBodyAndFinish(e,t,s))}registerFunctionStatementId(e){!e.body&&e.id?this.checkIdentifier(e.id,1024):super.registerFunctionStatementId(e)}tsCheckForInvalidTypeCasts(e){e.forEach((e=>{"TSTypeCastExpression"===(null==e?void 0:e.type)&&this.raise(It.UnexpectedTypeAnnotation,{at:e.typeAnnotation})}))}toReferencedList(e,t){return this.tsCheckForInvalidTypeCasts(e),e}parseArrayLike(e,t,s,i){const r=super.parseArrayLike(e,t,s,i);return"ArrayExpression"===r.type&&this.tsCheckForInvalidTypeCasts(r.elements),r}parseSubscript(e,t,s,i){if(!this.hasPrecedingLineBreak()&&this.match(35)){this.state.canStartJSXElement=!1,this.next();const s=this.startNodeAt(t);return s.expression=e,this.finishNode(s,"TSNonNullExpression")}let r=!1;if(this.match(18)&&60===this.lookaheadCharCode()){if(s)return i.stop=!0,e;i.optionalChainMember=r=!0,this.next()}if(this.match(47)||this.match(51)){let a;const n=this.tsTryParseAndCatch((()=>{if(!s&&this.atPossibleAsyncArrow(e)){const e=this.tsTryParseGenericAsyncArrowFunction(t);if(e)return e}const n=this.tsParseTypeArgumentsInExpression();if(!n)return;if(r&&!this.match(10))return void(a=this.state.curPosition());if(Y(this.state.type)){const s=super.parseTaggedTemplateExpression(e,t,i);return s.typeParameters=n,s}if(!s&&this.eat(10)){const s=this.startNodeAt(t);return s.callee=e,s.arguments=this.parseCallExpressionArguments(11,!1),this.tsCheckForInvalidTypeCasts(s.arguments),s.typeParameters=n,i.optionalChainMember&&(s.optional=r),this.finishCallExpression(s,i.optionalChainMember)}const o=this.state.type;if(48===o||52===o||10!==o&&W(o)&&!this.hasPrecedingLineBreak())return;const h=this.startNodeAt(t);return h.expression=e,h.typeParameters=n,this.finishNode(h,"TSInstantiationExpression")}));if(a&&this.unexpected(a,10),n)return"TSInstantiationExpression"===n.type&&(this.match(16)||this.match(18)&&40!==this.lookaheadCharCode())&&this.raise(It.InvalidPropertyAccessAfterInstantiationExpression,{at:this.state.startLoc}),n}return super.parseSubscript(e,t,s,i)}parseNewCallee(e){var t;super.parseNewCallee(e);const{callee:s}=e;"TSInstantiationExpression"!==s.type||null!=(t=s.extra)&&t.parenthesized||(e.typeParameters=s.typeParameters,e.callee=s.expression)}parseExprOp(e,t,s){let i;if(Z(58)>s&&!this.hasPrecedingLineBreak()&&(this.isContextual(93)||(i=this.isContextual(118)))){const r=this.startNodeAt(t);return r.expression=e,r.typeAnnotation=this.tsInType((()=>(this.next(),this.match(75)?(i&&this.raise(g.UnexpectedKeyword,{at:this.state.startLoc,keyword:"const"}),this.tsParseTypeReference()):this.tsParseType()))),this.finishNode(r,i?"TSSatisfiesExpression":"TSAsExpression"),this.reScan_lt_gt(),this.parseExprOp(r,t,s)}return super.parseExprOp(e,t,s)}checkReservedWord(e,t,s,i){this.state.isAmbientContext||super.checkReservedWord(e,t,s,i)}checkImportReflection(e){super.checkImportReflection(e),e.module&&"value"!==e.importKind&&this.raise(It.ImportReflectionHasImportType,{at:e.specifiers[0].loc.start})}checkDuplicateExports(){}parseImport(e){if(e.importKind="value",q(this.state.type)||this.match(55)||this.match(5)){let t=this.lookahead();if(this.isContextual(128)&&12!==t.type&&97!==t.type&&29!==t.type&&(e.importKind="type",this.next(),t=this.lookahead()),q(this.state.type)&&29===t.type)return this.tsParseImportEqualsDeclaration(e)}const t=super.parseImport(e);return"type"===t.importKind&&t.specifiers.length>1&&"ImportDefaultSpecifier"===t.specifiers[0].type&&this.raise(It.TypeImportCannotSpecifyDefaultAndNamed,{at:t}),t}parseExport(e,t){if(this.match(83))return this.next(),this.isContextual(128)&&61!==this.lookaheadCharCode()?(e.importKind="type",this.next()):e.importKind="value",this.tsParseImportEqualsDeclaration(e,!0);if(this.eat(29)){const t=e;return t.expression=super.parseExpression(),this.semicolon(),this.finishNode(t,"TSExportAssignment")}if(this.eatContextual(93)){const t=e;return this.expectContextual(126),t.id=this.parseIdentifier(),this.semicolon(),this.finishNode(t,"TSNamespaceExportDeclaration")}if(e.exportKind="value",this.isContextual(128)){const t=this.lookaheadCharCode();123!==t&&42!==t||(this.next(),e.exportKind="type")}return super.parseExport(e,t)}isAbstractClass(){return this.isContextual(122)&&80===this.lookahead().type}parseExportDefaultExpression(){if(this.isAbstractClass()){const e=this.startNode();return this.next(),e.abstract=!0,this.parseClass(e,!0,!0)}if(this.match(127)){const e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e}return super.parseExportDefaultExpression()}parseVarStatement(e,t,s=!1){const{isAmbientContext:i}=this.state,r=super.parseVarStatement(e,t,s||i);if(!i)return r;for(const{id:e,init:s}of r.declarations)s&&("const"!==t||e.typeAnnotation?this.raise(It.InitializerNotAllowedInAmbientContext,{at:s}):Mt(s,this.hasPlugin("estree"))||this.raise(It.ConstInitiailizerMustBeStringOrNumericLiteralOrLiteralEnumReference,{at:s}));return r}parseStatementContent(e,t){if(this.match(75)&&this.isLookaheadContextual("enum")){const e=this.startNode();return this.expect(75),this.tsParseEnumDeclaration(e,{const:!0})}if(this.isContextual(124))return this.tsParseEnumDeclaration(this.startNode());if(this.isContextual(127)){const e=this.tsParseInterfaceDeclaration(this.startNode());if(e)return e}return super.parseStatementContent(e,t)}parseAccessModifier(){return this.tsParseModifier(["public","protected","private"])}tsHasSomeModifiers(e,t){return t.some((t=>Nt(t)?e.accessibility===t:!!e[t]))}tsIsStartOfStaticBlocks(){return this.isContextual(104)&&123===this.lookaheadCharCode()}parseClassMember(e,t,s){const i=["declare","private","public","protected","override","abstract","readonly","static"];this.tsParseModifiers({allowedModifiers:i,disallowedModifiers:["in","out"],stopOnStartOfClassStaticBlock:!0,errorTemplate:It.InvalidModifierOnTypeParameterPositions},t);const r=()=>{this.tsIsStartOfStaticBlocks()?(this.next(),this.next(),this.tsHasSomeModifiers(t,i)&&this.raise(It.StaticBlockCannotHaveModifier,{at:this.state.curPosition()}),super.parseClassStaticBlock(e,t)):this.parseClassMemberWithIsStatic(e,t,s,!!t.static)};t.declare?this.tsInAmbientContext(r):r()}parseClassMemberWithIsStatic(e,t,s,i){const r=this.tsTryParseIndexSignature(t);if(r)return e.body.push(r),t.abstract&&this.raise(It.IndexSignatureHasAbstract,{at:t}),t.accessibility&&this.raise(It.IndexSignatureHasAccessibility,{at:t,modifier:t.accessibility}),t.declare&&this.raise(It.IndexSignatureHasDeclare,{at:t}),void(t.override&&this.raise(It.IndexSignatureHasOverride,{at:t}));!this.state.inAbstractClass&&t.abstract&&this.raise(It.NonAbstractClassHasAbstractMethod,{at:t}),t.override&&(s.hadSuperClass||this.raise(It.OverrideNotInSubClass,{at:t})),super.parseClassMemberWithIsStatic(e,t,s,i)}parsePostMemberNameModifiers(e){this.eat(17)&&(e.optional=!0),e.readonly&&this.match(10)&&this.raise(It.ClassMethodHasReadonly,{at:e}),e.declare&&this.match(10)&&this.raise(It.ClassMethodHasDeclare,{at:e})}parseExpressionStatement(e,t,s){return("Identifier"===t.type?this.tsParseExpressionStatement(e,t,s):void 0)||super.parseExpressionStatement(e,t,s)}shouldParseExportDeclaration(){return!!this.tsIsDeclarationStart()||super.shouldParseExportDeclaration()}parseConditional(e,t,s){if(!this.state.maybeInArrowParameters||!this.match(17))return super.parseConditional(e,t,s);const i=this.tryParse((()=>super.parseConditional(e,t)));return i.node?(i.error&&(this.state=i.failState),i.node):(i.error&&super.setOptionalParametersError(s,i.error),e)}parseParenItem(e,t){if(e=super.parseParenItem(e,t),this.eat(17)&&(e.optional=!0,this.resetEndLocation(e)),this.match(14)){const s=this.startNodeAt(t);return s.expression=e,s.typeAnnotation=this.tsParseTypeAnnotation(),this.finishNode(s,"TSTypeCastExpression")}return e}parseExportDeclaration(e){if(!this.state.isAmbientContext&&this.isContextual(123))return this.tsInAmbientContext((()=>this.parseExportDeclaration(e)));const t=this.state.startLoc,s=this.eatContextual(123);if(s&&(this.isContextual(123)||!this.shouldParseExportDeclaration()))throw this.raise(It.ExpectedAmbientAfterExportDeclare,{at:this.state.startLoc});const i=q(this.state.type)&&this.tsTryParseExportDeclaration()||super.parseExportDeclaration(e);return i?(("TSInterfaceDeclaration"===i.type||"TSTypeAliasDeclaration"===i.type||s)&&(e.exportKind="type"),s&&(this.resetStartLocation(i,t),i.declare=!0),i):null}parseClassId(e,t,s,i){if((!t||s)&&this.isContextual(111))return;super.parseClassId(e,t,s,e.declare?1024:8331);const r=this.tsTryParseTypeParameters(this.tsParseInOutConstModifiers);r&&(e.typeParameters=r)}parseClassPropertyAnnotation(e){e.optional||(this.eat(35)?e.definite=!0:this.eat(17)&&(e.optional=!0));const t=this.tsTryParseTypeAnnotation();t&&(e.typeAnnotation=t)}parseClassProperty(e){if(this.parseClassPropertyAnnotation(e),this.state.isAmbientContext&&(!e.readonly||e.typeAnnotation)&&this.match(29)&&this.raise(It.DeclareClassFieldHasInitializer,{at:this.state.startLoc}),e.abstract&&this.match(29)){const{key:t}=e;this.raise(It.AbstractPropertyHasInitializer,{at:this.state.startLoc,propertyName:"Identifier"!==t.type||e.computed?`[${this.input.slice(t.start,t.end)}]`:t.name})}return super.parseClassProperty(e)}parseClassPrivateProperty(e){return e.abstract&&this.raise(It.PrivateElementHasAbstract,{at:e}),e.accessibility&&this.raise(It.PrivateElementHasAccessibility,{at:e,modifier:e.accessibility}),this.parseClassPropertyAnnotation(e),super.parseClassPrivateProperty(e)}parseClassAccessorProperty(e){return this.parseClassPropertyAnnotation(e),e.optional&&this.raise(It.AccessorCannotBeOptional,{at:e}),super.parseClassAccessorProperty(e)}pushClassMethod(e,t,s,i,r,a){const n=this.tsTryParseTypeParameters(this.tsParseConstModifier);n&&r&&this.raise(It.ConstructorHasTypeParameters,{at:n});const{declare:o=!1,kind:h}=t;!o||"get"!==h&&"set"!==h||this.raise(It.DeclareAccessor,{at:t,kind:h}),n&&(t.typeParameters=n),super.pushClassMethod(e,t,s,i,r,a)}pushClassPrivateMethod(e,t,s,i){const r=this.tsTryParseTypeParameters(this.tsParseConstModifier);r&&(t.typeParameters=r),super.pushClassPrivateMethod(e,t,s,i)}declareClassPrivateMethodInScope(e,t){"TSDeclareMethod"!==e.type&&("MethodDefinition"!==e.type||e.value.body)&&super.declareClassPrivateMethodInScope(e,t)}parseClassSuper(e){super.parseClassSuper(e),e.superClass&&(this.match(47)||this.match(51))&&(e.superTypeParameters=this.tsParseTypeArgumentsInExpression()),this.eatContextual(111)&&(e.implements=this.tsParseHeritageClause("implements"))}parseObjPropValue(e,t,s,i,r,a,n){const o=this.tsTryParseTypeParameters(this.tsParseConstModifier);return o&&(e.typeParameters=o),super.parseObjPropValue(e,t,s,i,r,a,n)}parseFunctionParams(e,t){const s=this.tsTryParseTypeParameters(this.tsParseConstModifier);s&&(e.typeParameters=s),super.parseFunctionParams(e,t)}parseVarId(e,t){super.parseVarId(e,t),"Identifier"===e.id.type&&!this.hasPrecedingLineBreak()&&this.eat(35)&&(e.definite=!0);const s=this.tsTryParseTypeAnnotation();s&&(e.id.typeAnnotation=s,this.resetEndLocation(e.id))}parseAsyncArrowFromCallExpression(e,t){return this.match(14)&&(e.returnType=this.tsParseTypeAnnotation()),super.parseAsyncArrowFromCallExpression(e,t)}parseMaybeAssign(e,t){var s,i,r,a,n;let o,h,p,c;if(this.hasPlugin("jsx")&&(this.match(140)||this.match(47))){if(o=this.state.clone(),h=this.tryParse((()=>super.parseMaybeAssign(e,t)),o),!h.error)return h.node;const{context:s}=this.state,i=s[s.length-1];i!==E.j_oTag&&i!==E.j_expr||s.pop()}if(!(null!=(s=h)&&s.error||this.match(47)))return super.parseMaybeAssign(e,t);o&&o!==this.state||(o=this.state.clone());const l=this.tryParse((s=>{var i,r;c=this.tsParseTypeParameters(this.tsParseConstModifier);const a=super.parseMaybeAssign(e,t);return("ArrowFunctionExpression"!==a.type||null!=(i=a.extra)&&i.parenthesized)&&s(),0!==(null==(r=c)?void 0:r.params.length)&&this.resetStartLocationFromNode(a,c),a.typeParameters=c,a}),o);if(!l.error&&!l.aborted)return c&&this.reportReservedArrowTypeParam(c),l.node;if(!h&&(Ct(!this.hasPlugin("jsx")),p=this.tryParse((()=>super.parseMaybeAssign(e,t)),o),!p.error))return p.node;if(null!=(i=h)&&i.node)return this.state=h.failState,h.node;if(l.node)return this.state=l.failState,c&&this.reportReservedArrowTypeParam(c),l.node;if(null!=(r=p)&&r.node)return this.state=p.failState,p.node;throw(null==(a=h)?void 0:a.error)||l.error||(null==(n=p)?void 0:n.error)}reportReservedArrowTypeParam(e){var t;1!==e.params.length||e.params[0].constraint||null!=(t=e.extra)&&t.trailingComma||!this.getPluginOption("typescript","disallowAmbiguousJSXLike")||this.raise(It.ReservedArrowTypeParam,{at:e})}parseMaybeUnary(e,t){return!this.hasPlugin("jsx")&&this.match(47)?this.tsParseTypeAssertion():super.parseMaybeUnary(e,t)}parseArrow(e){if(this.match(14)){const t=this.tryParse((e=>{const t=this.tsParseTypeOrTypePredicateAnnotation(14);return!this.canInsertSemicolon()&&this.match(19)||e(),t}));if(t.aborted)return;t.thrown||(t.error&&(this.state=t.failState),e.returnType=t.node)}return super.parseArrow(e)}parseAssignableListItemTypes(e,t){if(!(2&t))return e;this.eat(17)&&(e.optional=!0);const s=this.tsTryParseTypeAnnotation();return s&&(e.typeAnnotation=s),this.resetEndLocation(e),e}isAssignable(e,t){switch(e.type){case"TSTypeCastExpression":return this.isAssignable(e.expression,t);case"TSParameterProperty":return!0;default:return super.isAssignable(e,t)}}toAssignable(e,t=!1){switch(e.type){case"ParenthesizedExpression":this.toAssignableParenthesizedExpression(e,t);break;case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":t?this.expressionScope.recordArrowParameterBindingError(It.UnexpectedTypeCastInParameter,{at:e}):this.raise(It.UnexpectedTypeCastInParameter,{at:e}),this.toAssignable(e.expression,t);break;case"AssignmentExpression":t||"TSTypeCastExpression"!==e.left.type||(e.left=this.typeCastToParameter(e.left));default:super.toAssignable(e,t)}}toAssignableParenthesizedExpression(e,t){switch(e.expression.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSNonNullExpression":case"TSTypeAssertion":case"ParenthesizedExpression":this.toAssignable(e.expression,t);break;default:super.toAssignable(e,t)}}checkToRestConversion(e,t){switch(e.type){case"TSAsExpression":case"TSSatisfiesExpression":case"TSTypeAssertion":case"TSNonNullExpression":this.checkToRestConversion(e.expression,!1);break;default:super.checkToRestConversion(e,t)}}isValidLVal(e,t,s){return i={TSTypeCastExpression:!0,TSParameterProperty:"parameter",TSNonNullExpression:"expression",TSAsExpression:(s!==be||!t)&&["expression",!0],TSSatisfiesExpression:(s!==be||!t)&&["expression",!0],TSTypeAssertion:(s!==be||!t)&&["expression",!0]},r=e,Object.hasOwnProperty.call(i,r)&&i[r]||super.isValidLVal(e,t,s);var i,r}parseBindingAtom(){return 78===this.state.type?this.parseIdentifier(!0):super.parseBindingAtom()}parseMaybeDecoratorArguments(e){if(this.match(47)||this.match(51)){const t=this.tsParseTypeArgumentsInExpression();if(this.match(10)){const s=super.parseMaybeDecoratorArguments(e);return s.typeParameters=t,s}this.unexpected(null,10)}return super.parseMaybeDecoratorArguments(e)}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,t){const s=super.parseMaybeDefault(e,t);return"AssignmentPattern"===s.type&&s.typeAnnotation&&s.right.start<s.typeAnnotation.start&&this.raise(It.TypeAnnotationAfterAssign,{at:s.typeAnnotation}),s}getTokenFromCode(e){if(this.state.inType){if(62===e)return void this.finishOp(48,1);if(60===e)return void this.finishOp(47,1)}super.getTokenFromCode(e)}reScan_lt_gt(){const{type:e}=this.state;47===e?(this.state.pos-=1,this.readToken_lt()):48===e&&(this.state.pos-=1,this.readToken_gt())}reScan_lt(){const{type:e}=this.state;return 51===e?(this.state.pos-=2,this.finishOp(47,1),47):e}toAssignableList(e,t,s){for(let t=0;t<e.length;t++){const s=e[t];"TSTypeCastExpression"===(null==s?void 0:s.type)&&(e[t]=this.typeCastToParameter(s))}super.toAssignableList(e,t,s)}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((e=>this.isAssignable(e,!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)){const t=this.tsTryParseAndCatch((()=>this.tsParseTypeArgumentsInExpression()));t&&(e.typeParameters=t)}return super.jsxParseOpeningElementAfterName(e)}getGetterSetterExpectedParamCount(e){const t=super.getGetterSetterExpectedParamCount(e),s=this.getObjectOrClassMethodParams(e)[0];return s&&this.isThisParam(s)?t+1:t}parseCatchClauseParam(){const e=super.parseCatchClauseParam(),t=this.tsTryParseTypeAnnotation();return t&&(e.typeAnnotation=t,this.resetEndLocation(e)),e}tsInAmbientContext(e){const t=this.state.isAmbientContext;this.state.isAmbientContext=!0;try{return e()}finally{this.state.isAmbientContext=t}}parseClass(e,t,s){const i=this.state.inAbstractClass;this.state.inAbstractClass=!!e.abstract;try{return super.parseClass(e,t,s)}finally{this.state.inAbstractClass=i}}tsParseAbstractDeclaration(e,t){if(this.match(80))return e.abstract=!0,this.maybeTakeDecorators(t,this.parseClass(e,!0,!1));if(this.isContextual(127)){if(!this.hasFollowingLineBreak())return e.abstract=!0,this.raise(It.NonClassMethodPropertyHasAbstractModifer,{at:e}),this.tsParseInterfaceDeclaration(e)}else this.unexpected(null,80)}parseMethod(e,t,s,i,r,a,n){const o=super.parseMethod(e,t,s,i,r,a,n);if(o.abstract&&(this.hasPlugin("estree")?o.value.body:o.body)){const{key:e}=o;this.raise(It.AbstractMethodHasImplementation,{at:o,methodName:"Identifier"!==e.type||o.computed?`[${this.input.slice(e.start,e.end)}]`:e.name})}return o}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,t,s,i){return!t&&i?(this.parseTypeOnlyImportExportSpecifier(e,!1,s),this.finishNode(e,"ExportSpecifier")):(e.exportKind="value",super.parseExportSpecifier(e,t,s,i))}parseImportSpecifier(e,t,s,i,r){return!t&&i?(this.parseTypeOnlyImportExportSpecifier(e,!0,s),this.finishNode(e,"ImportSpecifier")):(e.importKind="value",super.parseImportSpecifier(e,t,s,i,s?4098:Pe))}parseTypeOnlyImportExportSpecifier(e,t,s){const i=t?"imported":"local",r=t?"local":"exported";let a,n=e[i],o=!1,h=!0;const p=n.loc.start;if(this.isContextual(93)){const e=this.parseIdentifier();if(this.isContextual(93)){const s=this.parseIdentifier();$(this.state.type)?(o=!0,n=e,a=t?this.parseIdentifier():this.parseModuleExportName(),h=!1):(a=s,h=!1)}else $(this.state.type)?(h=!1,a=t?this.parseIdentifier():this.parseModuleExportName()):(o=!0,n=e)}else $(this.state.type)&&(o=!0,t?(n=this.parseIdentifier(!0),this.isContextual(93)||this.checkReservedWord(n.name,n.loc.start,!0,!0)):n=this.parseModuleExportName());o&&s&&this.raise(t?It.TypeModifierIsUsedInTypeImports:It.TypeModifierIsUsedInTypeExports,{at:p}),e[i]=n,e[r]=a,e[t?"importKind":"exportKind"]=o?"type":"value",h&&this.eatContextual(93)&&(e[r]=t?this.parseIdentifier():this.parseModuleExportName()),e[r]||(e[r]=lt(e[i])),t&&this.checkIdentifier(e[r],o?4098:Pe)}},v8intrinsic:e=>class extends e{parseV8Intrinsic(){if(this.match(54)){const e=this.state.startLoc,t=this.startNode();if(this.next(),q(this.state.type)){const e=this.parseIdentifierName(),s=this.createIdentifier(t,e);if(s.type="V8IntrinsicIdentifier",this.match(10))return s}this.unexpected(e)}}parseExprAtom(e){return this.parseV8Intrinsic()||super.parseExprAtom(e)}},placeholders:e=>class extends e{parsePlaceholder(e){if(this.match(142)){const t=this.startNode();return this.next(),this.assertNoSpace(),t.name=super.parseIdentifier(!0),this.assertNoSpace(),this.expect(142),this.finishPlaceholder(t,e)}}finishPlaceholder(e,t){const s=!(!e.expectedNode||"Placeholder"!==e.type);return e.expectedNode=t,s?e:this.finishNode(e,"Placeholder")}getTokenFromCode(e){37===e&&37===this.input.charCodeAt(this.state.pos+1)?this.finishOp(142,2):super.getTokenFromCode(e)}parseExprAtom(e){return this.parsePlaceholder("Expression")||super.parseExprAtom(e)}parseIdentifier(e){return this.parsePlaceholder("Identifier")||super.parseIdentifier(e)}checkReservedWord(e,t,s,i){void 0!==e&&super.checkReservedWord(e,t,s,i)}parseBindingAtom(){return this.parsePlaceholder("Pattern")||super.parseBindingAtom()}isValidLVal(e,t,s){return"Placeholder"===e||super.isValidLVal(e,t,s)}toAssignable(e,t){e&&"Placeholder"===e.type&&"Expression"===e.expectedNode?e.expectedNode="Pattern":super.toAssignable(e,t)}chStartsBindingIdentifier(e,t){return!!super.chStartsBindingIdentifier(e,t)||142===this.lookahead().type}verifyBreakContinue(e,t){e.label&&"Placeholder"===e.label.type||super.verifyBreakContinue(e,t)}parseExpressionStatement(e,t){if("Placeholder"!==t.type||t.extra&&t.extra.parenthesized)return super.parseExpressionStatement(e,t);if(this.match(14)){const s=e;return s.label=this.finishPlaceholder(t,"Identifier"),this.next(),s.body=super.parseStatementOrSloppyAnnexBFunctionDeclaration(),this.finishNode(s,"LabeledStatement")}return this.semicolon(),e.name=t.name,this.finishPlaceholder(e,"Statement")}parseBlock(e,t,s){return this.parsePlaceholder("BlockStatement")||super.parseBlock(e,t,s)}parseFunctionId(e){return this.parsePlaceholder("Identifier")||super.parseFunctionId(e)}parseClass(e,t,s){const i=t?"ClassDeclaration":"ClassExpression";this.next();const r=this.state.strict,a=this.parsePlaceholder("Identifier");if(a){if(!(this.match(81)||this.match(142)||this.match(5))){if(s||!t)return e.id=null,e.body=this.finishPlaceholder(a,"ClassBody"),this.finishNode(e,i);throw this.raise(Bt.ClassNameIsRequired,{at:this.state.startLoc})}e.id=a}else this.parseClassId(e,t,s);return super.parseClassSuper(e),e.body=this.parsePlaceholder("ClassBody")||super.parseClassBody(!!e.superClass,r),this.finishNode(e,i)}parseExport(e,t){const s=this.parsePlaceholder("Identifier");if(!s)return super.parseExport(e,t);if(!this.isContextual(97)&&!this.match(12))return e.specifiers=[],e.source=null,e.declaration=this.finishPlaceholder(s,"Declaration"),this.finishNode(e,"ExportNamedDeclaration");this.expectPlugin("exportDefaultFrom");const i=this.startNode();return i.exported=s,e.specifiers=[this.finishNode(i,"ExportDefaultSpecifier")],super.parseExport(e,t)}isExportDefaultSpecifier(){if(this.match(65)){const e=this.nextTokenStart();if(this.isUnparsedContextual(e,"from")&&this.input.startsWith(G(142),this.nextTokenStartSince(e+4)))return!0}return super.isExportDefaultSpecifier()}maybeParseExportDefaultSpecifier(e){return!!(e.specifiers&&e.specifiers.length>0)||super.maybeParseExportDefaultSpecifier(e)}checkExport(e){const{specifiers:t}=e;null!=t&&t.length&&(e.specifiers=t.filter((e=>"Placeholder"===e.exported.type))),super.checkExport(e),e.specifiers=t}parseImport(e){const t=this.parsePlaceholder("Identifier");if(!t)return super.parseImport(e);if(e.specifiers=[],!this.isContextual(97)&&!this.match(12))return e.source=this.finishPlaceholder(t,"StringLiteral"),this.semicolon(),this.finishNode(e,"ImportDeclaration");const s=this.startNodeAtNode(t);return s.local=t,e.specifiers.push(this.finishNode(s,"ImportDefaultSpecifier")),this.eat(12)&&(this.maybeParseStarImportSpecifier(e)||this.parseNamedImportSpecifiers(e)),this.expectContextual(97),e.source=this.parseImportSource(),this.semicolon(),this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.parsePlaceholder("StringLiteral")||super.parseImportSource()}assertNoSpace(){this.state.start>this.state.lastTokEndLoc.index&&this.raise(Bt.UnexpectedSpace,{at:this.state.lastTokEndLoc})}}},zt=Object.keys(Vt),Ht={sourceType:"script",sourceFilename:void 0,startColumn:0,startLine:1,allowAwaitOutsideFunction:!1,allowReturnOutsideFunction:!1,allowNewTargetOutsideFunction:!1,allowImportExportEverywhere:!1,allowSuperOutsideMethod:!1,allowUndeclaredExports:!1,plugins:[],strictMode:null,ranges:!1,tokens:!1,createParenthesizedExpressions:!1,errorRecovery:!1,attachComment:!0,annexB:!0};class qt extends St{checkProto(e,t,s,i){if("SpreadElement"===e.type||this.isObjectMethod(e)||e.computed||e.shorthand)return;const r=e.key;if("__proto__"===("Identifier"===r.type?r.name:r.value)){if(t)return void this.raise(g.RecordNoProto,{at:r});s.used&&(i?null===i.doubleProtoLoc&&(i.doubleProtoLoc=r.loc.start):this.raise(g.DuplicateProto,{at:r})),s.used=!0}}shouldExitDescending(e,t){return"ArrowFunctionExpression"===e.type&&e.start===t}getExpression(){this.enterInitialScopes(),this.nextToken();const e=this.parseExpression();return this.match(137)||this.unexpected(),this.finalizeRemainingComments(),e.comments=this.state.comments,e.errors=this.state.errors,this.options.tokens&&(e.tokens=this.tokens),e}parseExpression(e,t){return e?this.disallowInAnd((()=>this.parseExpressionBase(t))):this.allowInAnd((()=>this.parseExpressionBase(t)))}parseExpressionBase(e){const t=this.state.startLoc,s=this.parseMaybeAssign(e);if(this.match(12)){const i=this.startNodeAt(t);for(i.expressions=[s];this.eat(12);)i.expressions.push(this.parseMaybeAssign(e));return this.toReferencedList(i.expressions),this.finishNode(i,"SequenceExpression")}return s}parseMaybeAssignDisallowIn(e,t){return this.disallowInAnd((()=>this.parseMaybeAssign(e,t)))}parseMaybeAssignAllowIn(e,t){return this.allowInAnd((()=>this.parseMaybeAssign(e,t)))}setOptionalParametersError(e,t){var s;e.optionalParametersLoc=null!=(s=null==t?void 0:t.loc)?s:this.state.startLoc}parseMaybeAssign(e,t){const s=this.state.startLoc;if(this.isContextual(106)&&this.prodParam.hasYield){let e=this.parseYield();return t&&(e=t.call(this,e,s)),e}let i;e?i=!1:(e=new ht,i=!0);const{type:r}=this.state;(10===r||q(r))&&(this.state.potentialArrowAt=this.state.start);let a=this.parseMaybeConditional(e);if(t&&(a=t.call(this,a,s)),(n=this.state.type)>=29&&n<=33){const t=this.startNodeAt(s),i=this.state.value;if(t.operator=i,this.match(29)){this.toAssignable(a,!0),t.left=a;const i=s.index;null!=e.doubleProtoLoc&&e.doubleProtoLoc.index>=i&&(e.doubleProtoLoc=null),null!=e.shorthandAssignLoc&&e.shorthandAssignLoc.index>=i&&(e.shorthandAssignLoc=null),null!=e.privateKeyLoc&&e.privateKeyLoc.index>=i&&(this.checkDestructuringPrivate(e),e.privateKeyLoc=null)}else t.left=a;return this.next(),t.right=this.parseMaybeAssign(),this.checkLVal(a,{in:this.finishNode(t,"AssignmentExpression")}),t}var n;return i&&this.checkExpressionErrors(e,!0),a}parseMaybeConditional(e){const t=this.state.startLoc,s=this.state.potentialArrowAt,i=this.parseExprOps(e);return this.shouldExitDescending(i,s)?i:this.parseConditional(i,t,e)}parseConditional(e,t,s){if(this.eat(17)){const s=this.startNodeAt(t);return s.test=e,s.consequent=this.parseMaybeAssignAllowIn(),this.expect(14),s.alternate=this.parseMaybeAssign(),this.finishNode(s,"ConditionalExpression")}return e}parseMaybeUnaryOrPrivate(e){return this.match(136)?this.parsePrivateName():this.parseMaybeUnary(e)}parseExprOps(e){const t=this.state.startLoc,s=this.state.potentialArrowAt,i=this.parseMaybeUnaryOrPrivate(e);return this.shouldExitDescending(i,s)?i:this.parseExprOp(i,t,-1)}parseExprOp(e,t,s){if(this.isPrivateName(e)){const t=this.getPrivateNameSV(e);(s>=Z(58)||!this.prodParam.hasIn||!this.match(58))&&this.raise(g.PrivateInExpectedIn,{at:e,identifierName:t}),this.classScope.usePrivateName(t,e.loc.start)}const i=this.state.type;if((r=i)>=39&&r<=59&&(this.prodParam.hasIn||!this.match(58))){let r=Z(i);if(r>s){if(39===i){if(this.expectPlugin("pipelineOperator"),this.state.inFSharpPipelineDirectBody)return e;this.checkPipelineAtInfixOperator(e,t)}const a=this.startNodeAt(t);a.left=e,a.operator=this.state.value;const n=41===i||42===i,o=40===i;if(o&&(r=Z(42)),this.next(),39===i&&this.hasPlugin(["pipelineOperator",{proposal:"minimal"}])&&96===this.state.type&&this.prodParam.hasAwait)throw this.raise(g.UnexpectedAwaitAfterPipelineBody,{at:this.state.startLoc});a.right=this.parseExprOpRightExpr(i,r);const h=this.finishNode(a,n||o?"LogicalExpression":"BinaryExpression"),p=this.state.type;if(o&&(41===p||42===p)||n&&40===p)throw this.raise(g.MixingCoalesceWithLogical,{at:this.state.startLoc});return this.parseExprOp(h,t,s)}}var r;return e}parseExprOpRightExpr(e,t){const s=this.state.startLoc;if(39===e)switch(this.getPluginOption("pipelineOperator","proposal")){case"hack":return this.withTopicBindingContext((()=>this.parseHackPipeBody()));case"smart":return this.withTopicBindingContext((()=>{if(this.prodParam.hasYield&&this.isContextual(106))throw this.raise(g.PipeBodyIsTighter,{at:this.state.startLoc});return this.parseSmartPipelineBodyInStyle(this.parseExprOpBaseRightExpr(e,t),s)}));case"fsharp":return this.withSoloAwaitPermittingContext((()=>this.parseFSharpPipelineBody(t)))}return this.parseExprOpBaseRightExpr(e,t)}parseExprOpBaseRightExpr(e,t){const s=this.state.startLoc;return this.parseExprOp(this.parseMaybeUnaryOrPrivate(),s,57===e?t-1:t)}parseHackPipeBody(){var e;const{startLoc:t}=this.state,s=this.parseMaybeAssign();return!d.has(s.type)||null!=(e=s.extra)&&e.parenthesized||this.raise(g.PipeUnparenthesizedBody,{at:t,type:s.type}),this.topicReferenceWasUsedInCurrentContext()||this.raise(g.PipeTopicUnused,{at:t}),s}checkExponentialAfterUnary(e){this.match(57)&&this.raise(g.UnexpectedTokenUnaryExponentiation,{at:e.argument})}parseMaybeUnary(e,t){const s=this.state.startLoc,i=this.isContextual(96);if(i&&this.isAwaitAllowed()){this.next();const e=this.parseAwait(s);return t||this.checkExponentialAfterUnary(e),e}const r=this.match(34),a=this.startNode();if(n=this.state.type,_[n]){a.operator=this.state.value,a.prefix=!0,this.match(72)&&this.expectPlugin("throwExpressions");const s=this.match(89);if(this.next(),a.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),this.state.strict&&s){const e=a.argument;"Identifier"===e.type?this.raise(g.StrictDelete,{at:a}):this.hasPropertyAsPrivateName(e)&&this.raise(g.DeletePrivateField,{at:a})}if(!r)return t||this.checkExponentialAfterUnary(a),this.finishNode(a,"UnaryExpression")}var n;const o=this.parseUpdate(a,r,e);if(i){const{type:e}=this.state;if((this.hasPlugin("v8intrinsic")?W(e):W(e)&&!this.match(54))&&!this.isAmbiguousAwait())return this.raiseOverwrite(g.AwaitNotInAsyncContext,{at:s}),this.parseAwait(s)}return o}parseUpdate(e,t,s){if(t){const t=e;return this.checkLVal(t.argument,{in:this.finishNode(t,"UpdateExpression")}),e}const i=this.state.startLoc;let r=this.parseExprSubscripts(s);if(this.checkExpressionErrors(s,!1))return r;for(;34===this.state.type&&!this.canInsertSemicolon();){const e=this.startNodeAt(i);e.operator=this.state.value,e.prefix=!1,e.argument=r,this.next(),this.checkLVal(r,{in:r=this.finishNode(e,"UpdateExpression")})}return r}parseExprSubscripts(e){const t=this.state.startLoc,s=this.state.potentialArrowAt,i=this.parseExprAtom(e);return this.shouldExitDescending(i,s)?i:this.parseSubscripts(i,t)}parseSubscripts(e,t,s){const i={optionalChainMember:!1,maybeAsyncArrow:this.atPossibleAsyncArrow(e),stop:!1};do{e=this.parseSubscript(e,t,s,i),i.maybeAsyncArrow=!1}while(!i.stop);return e}parseSubscript(e,t,s,i){const{type:r}=this.state;if(!s&&15===r)return this.parseBind(e,t,s,i);if(Y(r))return this.parseTaggedTemplateExpression(e,t,i);let a=!1;if(18===r){if(s&&(this.raise(g.OptionalChainingNoNew,{at:this.state.startLoc}),40===this.lookaheadCharCode()))return i.stop=!0,e;i.optionalChainMember=a=!0,this.next()}if(!s&&this.match(10))return this.parseCoverCallAndAsyncArrowHead(e,t,i,a);{const s=this.eat(0);return s||a||this.eat(16)?this.parseMember(e,t,i,s,a):(i.stop=!0,e)}}parseMember(e,t,s,i,r){const a=this.startNodeAt(t);return a.object=e,a.computed=i,i?(a.property=this.parseExpression(),this.expect(3)):this.match(136)?("Super"===e.type&&this.raise(g.SuperPrivateField,{at:t}),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(e,t,s,i){const r=this.startNodeAt(t);return r.object=e,this.next(),r.callee=this.parseNoCallExpr(),i.stop=!0,this.parseSubscripts(this.finishNode(r,"BindExpression"),t,s)}parseCoverCallAndAsyncArrowHead(e,t,s,i){const r=this.state.maybeInArrowParameters;let a=null;this.state.maybeInArrowParameters=!0,this.next();const n=this.startNodeAt(t);n.callee=e;const{maybeAsyncArrow:o,optionalChainMember:h}=s;o&&(this.expressionScope.enter(new st(2)),a=new ht),h&&(n.optional=i),n.arguments=i?this.parseCallExpressionArguments(11):this.parseCallExpressionArguments(11,"Import"===e.type,"Super"!==e.type,n,a);let p=this.finishCallExpression(n,h);return o&&this.shouldParseAsyncArrow()&&!i?(s.stop=!0,this.checkDestructuringPrivate(a),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),p=this.parseAsyncArrowFromCallExpression(this.startNodeAt(t),p)):(o&&(this.checkExpressionErrors(a,!0),this.expressionScope.exit()),this.toReferencedArguments(p)),this.state.maybeInArrowParameters=r,p}toReferencedArguments(e,t){this.toReferencedListDeep(e.arguments,t)}parseTaggedTemplateExpression(e,t,s){const i=this.startNodeAt(t);return i.tag=e,i.quasi=this.parseTemplate(!0),s.optionalChainMember&&this.raise(g.OptionalChainingNoTemplate,{at:t}),this.finishNode(i,"TaggedTemplateExpression")}atPossibleAsyncArrow(e){return"Identifier"===e.type&&"async"===e.name&&this.state.lastTokEndLoc.index===e.end&&!this.canInsertSemicolon()&&e.end-e.start==5&&e.start===this.state.potentialArrowAt}finishCallExpression(e,t){if("Import"===e.callee.type)if(2===e.arguments.length&&(this.hasPlugin("moduleAttributes")||this.expectPlugin("importAssertions")),0===e.arguments.length||e.arguments.length>2)this.raise(g.ImportCallArity,{at:e,maxArgumentCount:this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")?2:1});else for(const t of e.arguments)"SpreadElement"===t.type&&this.raise(g.ImportCallSpreadArgument,{at:t});return this.finishNode(e,t?"OptionalCallExpression":"CallExpression")}parseCallExpressionArguments(e,t,s,i,r){const a=[];let n=!0;const o=this.state.inFSharpPipelineDirectBody;for(this.state.inFSharpPipelineDirectBody=!1;!this.eat(e);){if(n)n=!1;else if(this.expect(12),this.match(e)){!t||this.hasPlugin("importAssertions")||this.hasPlugin("moduleAttributes")||this.raise(g.ImportCallArgumentTrailingComma,{at:this.state.lastTokStartLoc}),i&&this.addTrailingCommaExtraToNode(i),this.next();break}a.push(this.parseExprListItem(!1,r,s))}return this.state.inFSharpPipelineDirectBody=o,a}shouldParseAsyncArrow(){return this.match(19)&&!this.canInsertSemicolon()}parseAsyncArrowFromCallExpression(e,t){var s;return this.resetPreviousNodeTrailingComments(t),this.expect(19),this.parseArrowExpression(e,t.arguments,!0,null==(s=t.extra)?void 0:s.trailingCommaLoc),t.innerComments&&Ce(e,t.innerComments),t.callee.trailingComments&&Ce(e,t.callee.trailingComments),e}parseNoCallExpr(){const e=this.state.startLoc;return this.parseSubscripts(this.parseExprAtom(),e,!0)}parseExprAtom(e){let t,s=null;const{type:i}=this.state;switch(i){case 79:return this.parseSuper();case 83:return t=this.startNode(),this.next(),this.match(16)?this.parseImportMetaProperty(t):(this.match(10)||this.raise(g.UnsupportedImport,{at:this.state.lastTokStartLoc}),this.finishNode(t,"Import"));case 78:return t=this.startNode(),this.next(),this.finishNode(t,"ThisExpression");case 90:return this.parseDo(this.startNode(),!1);case 56:case 31:return this.readRegexp(),this.parseRegExpLiteral(this.state.value);case 132:return this.parseNumericLiteral(this.state.value);case 133:return this.parseBigIntLiteral(this.state.value);case 134:return this.parseDecimalLiteral(this.state.value);case 131: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:{const e=this.state.potentialArrowAt===this.state.start;return this.parseParenAndDistinguishExpression(e)}case 2:case 1:return this.parseArrayLike(2===this.state.type?4:3,!1,!0);case 0:return this.parseArrayLike(3,!0,!1,e);case 6:case 7:return this.parseObjectLike(6===this.state.type?9:8,!1,!0);case 5:return this.parseObjectLike(8,!1,!1,e);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:{t=this.startNode(),this.next(),t.object=null;const e=t.callee=this.parseNoCallExpr();if("MemberExpression"===e.type)return this.finishNode(t,"BindExpression");throw this.raise(g.UnsupportedBind,{at:e})}case 136:return this.raise(g.PrivateInExpectedIn,{at: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:{const e=this.getPluginOption("pipelineOperator","proposal");if(e)return this.parseTopicReference(e);this.unexpected();break}case 47:{const e=this.input.codePointAt(this.nextTokenStart());oe(e)||62===e?this.expectOnePlugin(["jsx","flow","typescript"]):this.unexpected();break}default:if(q(i)){if(this.isContextual(125)&&123===this.lookaheadInLineCharCode())return this.parseModuleExpression();const e=this.state.potentialArrowAt===this.state.start,t=this.state.containsEsc,s=this.parseIdentifier();if(!t&&"async"===s.name&&!this.canInsertSemicolon()){const{type:e}=this.state;if(68===e)return this.resetPreviousNodeTrailingComments(s),this.next(),this.parseAsyncFunctionExpression(this.startNodeAtNode(s));if(q(e))return 61===this.lookaheadCharCode()?this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(s)):s;if(90===e)return this.resetPreviousNodeTrailingComments(s),this.parseDo(this.startNodeAtNode(s),!0)}return e&&this.match(19)&&!this.canInsertSemicolon()?(this.next(),this.parseArrowExpression(this.startNodeAtNode(s),[s],!1)):s}this.unexpected()}}parseTopicReferenceThenEqualsSign(e,t){const s=this.getPluginOption("pipelineOperator","proposal");if(s)return this.state.type=e,this.state.value=t,this.state.pos--,this.state.end--,this.state.endLoc=a(this.state.endLoc,-1),this.parseTopicReference(s);this.unexpected()}parseTopicReference(e){const t=this.startNode(),s=this.state.startLoc,i=this.state.type;return this.next(),this.finishTopicReference(t,s,e,i)}finishTopicReference(e,t,s,i){if(this.testTopicReferenceConfiguration(s,t,i)){const i="smart"===s?"PipelinePrimaryTopicReference":"TopicReference";return this.topicReferenceIsAllowedInCurrentContext()||this.raise("smart"===s?g.PrimaryTopicNotAllowed:g.PipeTopicUnbound,{at:t}),this.registerTopicReference(),this.finishNode(e,i)}throw this.raise(g.PipeTopicUnconfiguredToken,{at:t,token:G(i)})}testTopicReferenceConfiguration(e,t,s){switch(e){case"hack":return this.hasPlugin(["pipelineOperator",{topicToken:G(s)}]);case"smart":return 27===s;default:throw this.raise(g.PipeTopicRequiresHackPipes,{at:t})}}parseAsyncArrowUnaryFunction(e){this.prodParam.enter(nt(!0,this.prodParam.hasYield));const t=[this.parseIdentifier()];return this.prodParam.exit(),this.hasPrecedingLineBreak()&&this.raise(g.LineTerminatorBeforeArrow,{at:this.state.curPosition()}),this.expect(19),this.parseArrowExpression(e,t,!0)}parseDo(e,t){this.expectPlugin("doExpressions"),t&&this.expectPlugin("asyncDoExpressions"),e.async=t,this.next();const s=this.state.labels;return this.state.labels=[],t?(this.prodParam.enter(2),e.body=this.parseBlock(),this.prodParam.exit()):e.body=this.parseBlock(),this.state.labels=s,this.finishNode(e,"DoExpression")}parseSuper(){const e=this.startNode();return this.next(),!this.match(10)||this.scope.allowDirectSuper||this.options.allowSuperOutsideMethod?this.scope.allowSuper||this.options.allowSuperOutsideMethod||this.raise(g.UnexpectedSuper,{at:e}):this.raise(g.SuperNotAllowed,{at:e}),this.match(10)||this.match(0)||this.match(16)||this.raise(g.UnsupportedSuper,{at:e}),this.finishNode(e,"Super")}parsePrivateName(){const e=this.startNode(),t=this.startNodeAt(a(this.state.startLoc,1)),s=this.state.value;return this.next(),e.id=this.createIdentifier(t,s),this.finishNode(e,"PrivateName")}parseFunctionOrFunctionSent(){const e=this.startNode();if(this.next(),this.prodParam.hasYield&&this.match(16)){const t=this.createIdentifier(this.startNodeAtNode(e),"function");return this.next(),this.match(102)?this.expectPlugin("functionSent"):this.hasPlugin("functionSent")||this.unexpected(),this.parseMetaProperty(e,t,"sent")}return this.parseFunction(e)}parseMetaProperty(e,t,s){e.meta=t;const i=this.state.containsEsc;return e.property=this.parseIdentifier(!0),(e.property.name!==s||i)&&this.raise(g.UnsupportedMetaProperty,{at:e.property,target:t.name,onlyValidPropertyName:s}),this.finishNode(e,"MetaProperty")}parseImportMetaProperty(e){const t=this.createIdentifier(this.startNodeAtNode(e),"import");return this.next(),this.isContextual(100)&&(this.inModule||this.raise(g.ImportMetaOutsideModule,{at:t}),this.sawUnambiguousESM=!0),this.parseMetaProperty(e,t,"meta")}parseLiteralAtNode(e,t,s){return this.addExtra(s,"rawValue",e),this.addExtra(s,"raw",this.input.slice(s.start,this.state.end)),s.value=e,this.next(),this.finishNode(s,t)}parseLiteral(e,t){const s=this.startNode();return this.parseLiteralAtNode(e,t,s)}parseStringLiteral(e){return this.parseLiteral(e,"StringLiteral")}parseNumericLiteral(e){return this.parseLiteral(e,"NumericLiteral")}parseBigIntLiteral(e){return this.parseLiteral(e,"BigIntLiteral")}parseDecimalLiteral(e){return this.parseLiteral(e,"DecimalLiteral")}parseRegExpLiteral(e){const t=this.parseLiteral(e.value,"RegExpLiteral");return t.pattern=e.pattern,t.flags=e.flags,t}parseBooleanLiteral(e){const t=this.startNode();return t.value=e,this.next(),this.finishNode(t,"BooleanLiteral")}parseNullLiteral(){const e=this.startNode();return this.next(),this.finishNode(e,"NullLiteral")}parseParenAndDistinguishExpression(e){const t=this.state.startLoc;let s;this.next(),this.expressionScope.enter(new st(1));const i=this.state.maybeInArrowParameters,r=this.state.inFSharpPipelineDirectBody;this.state.maybeInArrowParameters=!0,this.state.inFSharpPipelineDirectBody=!1;const a=this.state.startLoc,n=[],o=new ht;let h,p,c=!0;for(;!this.match(11);){if(c)c=!1;else if(this.expect(12,null===o.optionalParametersLoc?null:o.optionalParametersLoc),this.match(11)){p=this.state.startLoc;break}if(this.match(21)){const e=this.state.startLoc;if(h=this.state.startLoc,n.push(this.parseParenItem(this.parseRestBinding(),e)),!this.checkCommaAfterRest(41))break}else n.push(this.parseMaybeAssignAllowIn(o,this.parseParenItem))}const l=this.state.lastTokEndLoc;this.expect(11),this.state.maybeInArrowParameters=i,this.state.inFSharpPipelineDirectBody=r;let u=this.startNodeAt(t);return e&&this.shouldParseArrow(n)&&(u=this.parseArrow(u))?(this.checkDestructuringPrivate(o),this.expressionScope.validateAsPattern(),this.expressionScope.exit(),this.parseArrowExpression(u,n,!1),u):(this.expressionScope.exit(),n.length||this.unexpected(this.state.lastTokStartLoc),p&&this.unexpected(p),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,l)):s=n[0],this.wrapParenthesis(t,s))}wrapParenthesis(e,t){if(!this.options.createParenthesizedExpressions)return this.addExtra(t,"parenthesized",!0),this.addExtra(t,"parenStart",e.index),this.takeSurroundingComments(t,e.index,this.state.lastTokEndLoc.index),t;const s=this.startNodeAt(e);return s.expression=t,this.finishNode(s,"ParenthesizedExpression")}shouldParseArrow(e){return!this.canInsertSemicolon()}parseArrow(e){if(this.eat(19))return e}parseParenItem(e,t){return e}parseNewOrNewTarget(){const e=this.startNode();if(this.next(),this.match(16)){const t=this.createIdentifier(this.startNodeAtNode(e),"new");this.next();const s=this.parseMetaProperty(e,t,"target");return this.scope.inNonArrowFunction||this.scope.inClass||this.options.allowNewTargetOutsideFunction||this.raise(g.UnexpectedNewTarget,{at:s}),s}return this.parseNew(e)}parseNew(e){if(this.parseNewCallee(e),this.eat(10)){const t=this.parseExprList(11);this.toReferencedList(t),e.arguments=t}else e.arguments=[];return this.finishNode(e,"NewExpression")}parseNewCallee(e){e.callee=this.parseNoCallExpr(),"Import"===e.callee.type&&this.raise(g.ImportCallNotNewExpression,{at:e.callee})}parseTemplateElement(e){const{start:t,startLoc:s,end:i,value:r}=this.state,n=t+1,o=this.startNodeAt(a(s,1));null===r&&(e||this.raise(g.InvalidEscapeSequenceTemplate,{at:a(this.state.firstInvalidTemplateEscapePos,1)}));const h=this.match(24),p=h?-1:-2,c=i+p;o.value={raw:this.input.slice(n,c).replace(/\r\n?/g,"\n"),cooked:null===r?null:r.slice(1,p)},o.tail=h,this.next();const l=this.finishNode(o,"TemplateElement");return this.resetEndLocation(l,a(this.state.lastTokEndLoc,p)),l}parseTemplate(e){const t=this.startNode();t.expressions=[];let s=this.parseTemplateElement(e);for(t.quasis=[s];!s.tail;)t.expressions.push(this.parseTemplateSubstitution()),this.readTemplateContinuation(),t.quasis.push(s=this.parseTemplateElement(e));return this.finishNode(t,"TemplateLiteral")}parseTemplateSubstitution(){return this.parseExpression()}parseObjectLike(e,t,s,i){s&&this.expectPlugin("recordAndTuple");const r=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const a=Object.create(null);let n=!0;const o=this.startNode();for(o.properties=[],this.next();!this.match(e);){if(n)n=!1;else if(this.expect(12),this.match(e)){this.addTrailingCommaExtraToNode(o);break}let r;t?r=this.parseBindingProperty():(r=this.parsePropertyDefinition(i),this.checkProto(r,s,a,i)),s&&!this.isObjectProperty(r)&&"SpreadElement"!==r.type&&this.raise(g.InvalidRecordProperty,{at:r}),r.shorthand&&this.addExtra(r,"shorthand",!0),o.properties.push(r)}this.next(),this.state.inFSharpPipelineDirectBody=r;let h="ObjectExpression";return t?h="ObjectPattern":s&&(h="RecordExpression"),this.finishNode(o,h)}addTrailingCommaExtraToNode(e){this.addExtra(e,"trailingComma",this.state.lastTokStart),this.addExtra(e,"trailingCommaLoc",this.state.lastTokStartLoc,!1)}maybeAsyncOrAccessorProp(e){return!e.computed&&"Identifier"===e.key.type&&(this.isLiteralPropertyName()||this.match(0)||this.match(55))}parsePropertyDefinition(e){let t=[];if(this.match(26))for(this.hasPlugin("decorators")&&this.raise(g.UnsupportedPropertyDecorator,{at:this.state.startLoc});this.match(26);)t.push(this.parseDecorator());const s=this.startNode();let i,r=!1,a=!1;if(this.match(21))return t.length&&this.unexpected(),this.parseSpread();t.length&&(s.decorators=t,t=[]),s.method=!1,e&&(i=this.state.startLoc);let n=this.eat(55);this.parsePropertyNamePrefixOperator(s);const o=this.state.containsEsc,h=this.parsePropertyName(s,e);if(!n&&!o&&this.maybeAsyncOrAccessorProp(s)){const e=h.name;"async"!==e||this.hasPrecedingLineBreak()||(r=!0,this.resetPreviousNodeTrailingComments(h),n=this.eat(55),this.parsePropertyName(s)),"get"!==e&&"set"!==e||(a=!0,this.resetPreviousNodeTrailingComments(h),s.kind=e,this.match(55)&&(n=!0,this.raise(g.AccessorIsGenerator,{at:this.state.curPosition(),kind:e}),this.next()),this.parsePropertyName(s))}return this.parseObjPropValue(s,i,n,r,!1,a,e)}getGetterSetterExpectedParamCount(e){return"get"===e.kind?0:1}getObjectOrClassMethodParams(e){return e.params}checkGetterSetterParams(e){var t;const s=this.getGetterSetterExpectedParamCount(e),i=this.getObjectOrClassMethodParams(e);i.length!==s&&this.raise("get"===e.kind?g.BadGetterArity:g.BadSetterArity,{at:e}),"set"===e.kind&&"RestElement"===(null==(t=i[i.length-1])?void 0:t.type)&&this.raise(g.BadSetterRestParameter,{at:e})}parseObjectMethod(e,t,s,i,r){if(r){const s=this.parseMethod(e,t,!1,!1,!1,"ObjectMethod");return this.checkGetterSetterParams(s),s}if(s||t||this.match(10))return i&&this.unexpected(),e.kind="method",e.method=!0,this.parseMethod(e,t,s,!1,!1,"ObjectMethod")}parseObjectProperty(e,t,s,i){if(e.shorthand=!1,this.eat(14))return e.value=s?this.parseMaybeDefault(this.state.startLoc):this.parseMaybeAssignAllowIn(i),this.finishNode(e,"ObjectProperty");if(!e.computed&&"Identifier"===e.key.type){if(this.checkReservedWord(e.key.name,e.key.loc.start,!0,!1),s)e.value=this.parseMaybeDefault(t,lt(e.key));else if(this.match(29)){const s=this.state.startLoc;null!=i?null===i.shorthandAssignLoc&&(i.shorthandAssignLoc=s):this.raise(g.InvalidCoverInitializedName,{at:s}),e.value=this.parseMaybeDefault(t,lt(e.key))}else e.value=lt(e.key);return e.shorthand=!0,this.finishNode(e,"ObjectProperty")}}parseObjPropValue(e,t,s,i,r,a,n){const o=this.parseObjectMethod(e,s,i,r,a)||this.parseObjectProperty(e,t,r,n);return o||this.unexpected(),o}parsePropertyName(e,t){if(this.eat(0))e.computed=!0,e.key=this.parseMaybeAssignAllowIn(),this.expect(3);else{const{type:s,value:i}=this.state;let r;if($(s))r=this.parseIdentifier(!0);else switch(s){case 132:r=this.parseNumericLiteral(i);break;case 131:r=this.parseStringLiteral(i);break;case 133:r=this.parseBigIntLiteral(i);break;case 134:r=this.parseDecimalLiteral(i);break;case 136:{const e=this.state.startLoc;null!=t?null===t.privateKeyLoc&&(t.privateKeyLoc=e):this.raise(g.UnexpectedPrivateField,{at:e}),r=this.parsePrivateName();break}default:this.unexpected()}e.key=r,136!==s&&(e.computed=!1)}return e.key}initFunction(e,t){e.id=null,e.generator=!1,e.async=t}parseMethod(e,t,s,i,r,a,n=!1){this.initFunction(e,s),e.generator=t,this.scope.enter(18|(n?64:0)|(r?32:0)),this.prodParam.enter(nt(s,e.generator)),this.parseFunctionParams(e,i);const o=this.parseFunctionBodyAndFinish(e,a,!0);return this.prodParam.exit(),this.scope.exit(),o}parseArrayLike(e,t,s,i){s&&this.expectPlugin("recordAndTuple");const r=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!1;const a=this.startNode();return this.next(),a.elements=this.parseExprList(e,!s,i,a),this.state.inFSharpPipelineDirectBody=r,this.finishNode(a,s?"TupleExpression":"ArrayExpression")}parseArrowExpression(e,t,s,i){this.scope.enter(6);let r=nt(s,!1);!this.match(5)&&this.prodParam.hasIn&&(r|=8),this.prodParam.enter(r),this.initFunction(e,s);const a=this.state.maybeInArrowParameters;return t&&(this.state.maybeInArrowParameters=!0,this.setArrowFunctionParameters(e,t,i)),this.state.maybeInArrowParameters=!1,this.parseFunctionBody(e,!0),this.prodParam.exit(),this.scope.exit(),this.state.maybeInArrowParameters=a,this.finishNode(e,"ArrowFunctionExpression")}setArrowFunctionParameters(e,t,s){this.toAssignableList(t,s,!1),e.params=t}parseFunctionBodyAndFinish(e,t,s=!1){return this.parseFunctionBody(e,!1,s),this.finishNode(e,t)}parseFunctionBody(e,t,s=!1){const i=t&&!this.match(5);if(this.expressionScope.enter(rt()),i)e.body=this.parseMaybeAssign(),this.checkParams(e,!1,t,!1);else{const i=this.state.strict,r=this.state.labels;this.state.labels=[],this.prodParam.enter(4|this.prodParam.currentFlags()),e.body=this.parseBlock(!0,!1,(r=>{const a=!this.isSimpleParamList(e.params);r&&a&&this.raise(g.IllegalLanguageModeDirective,{at:"method"!==e.kind&&"constructor"!==e.kind||!e.key?e:e.key.loc.end});const n=!i&&this.state.strict;this.checkParams(e,!(this.state.strict||t||s||a),t,n),this.state.strict&&e.id&&this.checkIdentifier(e.id,65,n)})),this.prodParam.exit(),this.state.labels=r}this.expressionScope.exit()}isSimpleParameter(e){return"Identifier"===e.type}isSimpleParamList(e){for(let t=0,s=e.length;t<s;t++)if(!this.isSimpleParameter(e[t]))return!1;return!0}checkParams(e,t,s,i=!0){const r=!t&&new Set,a={type:"FormalParameters"};for(const t of e.params)this.checkLVal(t,{in:a,binding:5,checkClashes:r,strictModeChanged:i})}parseExprList(e,t,s,i){const r=[];let a=!0;for(;!this.eat(e);){if(a)a=!1;else if(this.expect(12),this.match(e)){i&&this.addTrailingCommaExtraToNode(i),this.next();break}r.push(this.parseExprListItem(t,s))}return r}parseExprListItem(e,t,s){let i;if(this.match(12))e||this.raise(g.UnexpectedToken,{at:this.state.curPosition(),unexpected:","}),i=null;else if(this.match(21)){const e=this.state.startLoc;i=this.parseParenItem(this.parseSpread(t),e)}else if(this.match(17)){this.expectPlugin("partialApplication"),s||this.raise(g.UnexpectedArgumentPlaceholder,{at:this.state.startLoc});const e=this.startNode();this.next(),i=this.finishNode(e,"ArgumentPlaceholder")}else i=this.parseMaybeAssignAllowIn(t,this.parseParenItem);return i}parseIdentifier(e){const t=this.startNode(),s=this.parseIdentifierName(e);return this.createIdentifier(t,s)}createIdentifier(e,t){return e.name=t,e.loc.identifierName=t,this.finishNode(e,"Identifier")}parseIdentifierName(e){let t;const{startLoc:s,type:i}=this.state;$(i)?t=this.state.value:this.unexpected();const r=i<=92;return e?r&&this.replaceToken(130):this.checkReservedWord(t,s,r,!1),this.next(),t}checkReservedWord(e,t,s,i){if(!(e.length>10)&&function(e){return ye.has(e)}(e))if(s&&function(e){return pe.has(e)}(e))this.raise(g.UnexpectedKeyword,{at:t,keyword:e});else if((this.state.strict?i?fe:de:ue)(e,this.inModule))this.raise(g.UnexpectedReservedWord,{at:t,reservedWord:e});else if("yield"===e){if(this.prodParam.hasYield)return void this.raise(g.YieldBindingIdentifier,{at:t})}else if("await"===e){if(this.prodParam.hasAwait)return void this.raise(g.AwaitBindingIdentifier,{at:t});if(this.scope.inStaticBlock)return void this.raise(g.AwaitBindingIdentifierInStaticBlock,{at:t});this.expressionScope.recordAsyncArrowParametersError({at:t})}else if("arguments"===e&&this.scope.inClassAndNotInNonArrowFunction)return void this.raise(g.ArgumentsInClass,{at:t})}isAwaitAllowed(){return!!this.prodParam.hasAwait||!(!this.options.allowAwaitOutsideFunction||this.scope.inFunction)}parseAwait(e){const t=this.startNodeAt(e);return this.expressionScope.recordParameterInitializerError(g.AwaitExpressionFormalParameter,{at:t}),this.eat(55)&&this.raise(g.ObsoleteAwaitStar,{at:t}),this.scope.inFunction||this.options.allowAwaitOutsideFunction||(this.isAmbiguousAwait()?this.ambiguousScriptDifferentAst=!0:this.sawUnambiguousESM=!0),this.state.soloAwait||(t.argument=this.parseMaybeUnary(null,!0)),this.finishNode(t,"AwaitExpression")}isAmbiguousAwait(){if(this.hasPrecedingLineBreak())return!0;const{type:e}=this.state;return 53===e||10===e||0===e||Y(e)||101===e&&!this.state.containsEsc||135===e||56===e||this.hasPlugin("v8intrinsic")&&54===e}parseYield(){const e=this.startNode();this.expressionScope.recordParameterInitializerError(g.YieldInParameter,{at:e}),this.next();let t=!1,s=null;if(!this.hasPrecedingLineBreak())switch(t=this.eat(55),this.state.type){case 13:case 137:case 8:case 11:case 3:case 9:case 14:case 12:if(!t)break;default:s=this.parseMaybeAssign()}return e.delegate=t,e.argument=s,this.finishNode(e,"YieldExpression")}checkPipelineAtInfixOperator(e,t){this.hasPlugin(["pipelineOperator",{proposal:"smart"}])&&"SequenceExpression"===e.type&&this.raise(g.PipelineHeadSequenceExpression,{at:t})}parseSmartPipelineBodyInStyle(e,t){if(this.isSimpleReference(e)){const s=this.startNodeAt(t);return s.callee=e,this.finishNode(s,"PipelineBareFunction")}{const s=this.startNodeAt(t);return this.checkSmartPipeTopicBodyEarlyErrors(t),s.expression=e,this.finishNode(s,"PipelineTopicExpression")}}isSimpleReference(e){switch(e.type){case"MemberExpression":return!e.computed&&this.isSimpleReference(e.object);case"Identifier":return!0;default:return!1}}checkSmartPipeTopicBodyEarlyErrors(e){if(this.match(19))throw this.raise(g.PipelineBodyNoArrow,{at:this.state.startLoc});this.topicReferenceWasUsedInCurrentContext()||this.raise(g.PipelineTopicUnused,{at:e})}withTopicBindingContext(e){const t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:1,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=t}}withSmartMixTopicForbiddingContext(e){if(!this.hasPlugin(["pipelineOperator",{proposal:"smart"}]))return e();{const t=this.state.topicContext;this.state.topicContext={maxNumOfResolvableTopics:0,maxTopicIndex:null};try{return e()}finally{this.state.topicContext=t}}}withSoloAwaitPermittingContext(e){const t=this.state.soloAwait;this.state.soloAwait=!0;try{return e()}finally{this.state.soloAwait=t}}allowInAnd(e){const t=this.prodParam.currentFlags();if(8&~t){this.prodParam.enter(8|t);try{return e()}finally{this.prodParam.exit()}}return e()}disallowInAnd(e){const t=this.prodParam.currentFlags();if(8&t){this.prodParam.enter(-9&t);try{return e()}finally{this.prodParam.exit()}}return e()}registerTopicReference(){this.state.topicContext.maxTopicIndex=0}topicReferenceIsAllowedInCurrentContext(){return this.state.topicContext.maxNumOfResolvableTopics>=1}topicReferenceWasUsedInCurrentContext(){return null!=this.state.topicContext.maxTopicIndex&&this.state.topicContext.maxTopicIndex>=0}parseFSharpPipelineBody(e){const t=this.state.startLoc;this.state.potentialArrowAt=this.state.start;const s=this.state.inFSharpPipelineDirectBody;this.state.inFSharpPipelineDirectBody=!0;const i=this.parseExprOp(this.parseMaybeUnaryOrPrivate(),t,e);return this.state.inFSharpPipelineDirectBody=s,i}parseModuleExpression(){this.expectPlugin("moduleBlocks");const e=this.startNode();this.next(),this.match(5)||this.unexpected(null,5);const t=this.startNodeAt(this.state.endLoc);this.next();const s=this.initializeScopes(!0);this.enterInitialScopes();try{e.body=this.parseProgram(t,8,"module")}finally{s()}return this.finishNode(e,"ModuleExpression")}parsePropertyNamePrefixOperator(e){}}const $t={kind:"loop"},Kt={kind:"switch"},Wt=/[\uD800-\uDFFF]/u,Jt=/in(?:stanceof)?/y;class Xt extends qt{parseTopLevel(e,t){return e.program=this.parseProgram(t),e.comments=this.state.comments,this.options.tokens&&(e.tokens=function(e,t){for(let s=0;s<e.length;s++){const i=e[s],{type:r}=i;if("number"==typeof r){if(136===r){const{loc:t,start:r,value:n,end:o}=i,h=r+1,p=a(t.start,1);e.splice(s,1,new Ze({type:Q(27),value:"#",start:r,end:h,startLoc:t.start,endLoc:p}),new Ze({type:Q(130),value:n,start:h,end:o,startLoc:p,endLoc:t.end})),s++;continue}if(Y(r)){const{loc:n,start:o,value:h,end:p}=i,c=o+1,l=a(n.start,1);let u,d,m,f,y;u=96===t.charCodeAt(o)?new Ze({type:Q(22),value:"`",start:o,end:c,startLoc:n.start,endLoc:l}):new Ze({type:Q(8),value:"}",start:o,end:c,startLoc:n.start,endLoc:l}),24===r?(m=p-1,f=a(n.end,-1),d=null===h?null:h.slice(1,-1),y=new Ze({type:Q(22),value:"`",start:m,end:p,startLoc:f,endLoc:n.end})):(m=p-2,f=a(n.end,-2),d=null===h?null:h.slice(1,-2),y=new Ze({type:Q(23),value:"${",start:m,end:p,startLoc:f,endLoc:n.end})),e.splice(s,1,u,new Ze({type:Q(20),value:d,start:c,end:m,startLoc:l,endLoc:f}),y),s+=2;continue}i.type=Q(r)}}return e}(this.tokens,this.input)),this.finishNode(e,"File")}parseProgram(e,t=137,s=this.options.sourceType){if(e.sourceType=s,e.interpreter=this.parseInterpreterDirective(),this.parseBlockBody(e,!0,!0,t),this.inModule&&!this.options.allowUndeclaredExports&&this.scope.undefinedExports.size>0)for(const[e,t]of Array.from(this.scope.undefinedExports))this.raise(g.ModuleExportUndefined,{at:t,localName:e});let i;return i=137===t?this.finishNode(e,"Program"):this.finishNodeAt(e,"Program",a(this.state.startLoc,-1)),i}stmtToDirective(e){const t=e;t.type="Directive",t.value=t.expression,delete t.expression;const s=t.value,i=s.value,r=this.input.slice(s.start,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",t}parseInterpreterDirective(){if(!this.match(28))return null;const e=this.startNode();return e.value=this.state.value,this.next(),this.finishNode(e,"InterpreterDirective")}isLet(){return!!this.isContextual(99)&&this.hasFollowingBindingAtom()}chStartsBindingIdentifier(e,t){if(oe(e)){if(Jt.lastIndex=t,Jt.test(this.input)){const e=this.codePointAtPos(Jt.lastIndex);if(!he(e)&&92!==e)return!1}return!0}return 92===e}chStartsBindingPattern(e){return 91===e||123===e}hasFollowingBindingAtom(){const e=this.nextTokenStart(),t=this.codePointAtPos(e);return this.chStartsBindingPattern(t)||this.chStartsBindingIdentifier(t,e)}hasInLineFollowingBindingIdentifier(){const e=this.nextTokenInLineStart(),t=this.codePointAtPos(e);return this.chStartsBindingIdentifier(t,e)}startsUsingForOf(){const{type:e,containsEsc:t}=this.lookahead();return!(101===e&&!t)&&(q(e)&&!this.hasFollowingLineBreak()?(this.expectPlugin("explicitResourceManagement"),!0):void 0)}parseModuleItem(){return this.parseStatementLike(15)}parseStatementListItem(){return this.parseStatementLike(6|(!this.options.annexB||this.state.strict?0:8))}parseStatementOrSloppyAnnexBFunctionDeclaration(e=!1){let t=0;return this.options.annexB&&!this.state.strict&&(t|=4,e&&(t|=8)),this.parseStatementLike(t)}parseStatement(){return this.parseStatementLike(0)}parseStatementLike(e){let t=null;return this.match(26)&&(t=this.parseDecorators(!0)),this.parseStatementContent(e,t)}parseStatementContent(e,t){const s=this.state.type,i=this.startNode(),r=!!(2&e),a=!!(4&e),n=1&e;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(46===this.lookaheadCharCode())break;return a||this.raise(this.state.strict?g.StrictFunction:this.options.annexB?g.SloppyFunctionAnnexB:g.SloppyFunction,{at:this.state.startLoc}),this.parseFunctionStatement(i,!1,!r&&a);case 80:return r||this.unexpected(),this.parseClass(this.maybeTakeDecorators(t,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 105:if(this.state.containsEsc||!this.hasInLineFollowingBindingIdentifier())break;return this.expectPlugin("explicitResourceManagement"),!this.scope.inModule&&this.scope.inTopLevel?this.raise(g.UnexpectedUsingDeclaration,{at:this.state.startLoc}):r||this.raise(g.UnexpectedLexicalDeclaration,{at:this.state.startLoc}),this.parseVarStatement(i,"using");case 99:{if(this.state.containsEsc)break;const e=this.nextTokenStart(),t=this.codePointAtPos(e);if(91!==t){if(!r&&this.hasFollowingLineBreak())break;if(!this.chStartsBindingIdentifier(t,e)&&123!==t)break}}case 75:r||this.raise(g.UnexpectedLexicalDeclaration,{at:this.state.startLoc});case 74:{const e=this.state.value;return this.parseVarStatement(i,e)}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:{const e=this.lookaheadCharCode();if(40===e||46===e)break}case 82:{let e;return this.options.allowImportExportEverywhere||n||this.raise(g.UnexpectedImportExport,{at:this.state.startLoc}),this.next(),83===s?(e=this.parseImport(i),"ImportDeclaration"!==e.type||e.importKind&&"value"!==e.importKind||(this.sawUnambiguousESM=!0)):(e=this.parseExport(i,t),("ExportNamedDeclaration"!==e.type||e.exportKind&&"value"!==e.exportKind)&&("ExportAllDeclaration"!==e.type||e.exportKind&&"value"!==e.exportKind)&&"ExportDefaultDeclaration"!==e.type||(this.sawUnambiguousESM=!0)),this.assertModuleNodeAllowed(e),e}default:if(this.isAsyncFunction())return r||this.raise(g.AsyncFunctionInSingleStatementContext,{at:this.state.startLoc}),this.next(),this.parseFunctionStatement(i,!0,!r&&a)}const o=this.state.value,h=this.parseExpression();return q(s)&&"Identifier"===h.type&&this.eat(14)?this.parseLabeledStatement(i,o,h,e):this.parseExpressionStatement(i,h,t)}assertModuleNodeAllowed(e){this.options.allowImportExportEverywhere||this.inModule||this.raise(g.ImportOutsideModule,{at:e})}decoratorsEnabledBeforeExport(){return!!this.hasPlugin("decorators-legacy")||this.hasPlugin("decorators")&&!1!==this.getPluginOption("decorators","decoratorsBeforeExport")}maybeTakeDecorators(e,t,s){return e&&(t.decorators&&t.decorators.length>0?("boolean"!=typeof this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(g.DecoratorsBeforeAfterExport,{at:t.decorators[0]}),t.decorators.unshift(...e)):t.decorators=e,this.resetStartLocationFromNode(t,e[0]),s&&this.resetStartLocationFromNode(s,t)),t}canHaveLeadingDecorator(){return this.match(80)}parseDecorators(e){const t=[];do{t.push(this.parseDecorator())}while(this.match(26));if(this.match(82))e||this.unexpected(),this.decoratorsEnabledBeforeExport()||this.raise(g.DecoratorExportClass,{at:this.state.startLoc});else if(!this.canHaveLeadingDecorator())throw this.raise(g.UnexpectedLeadingDecorator,{at:this.state.startLoc});return t}parseDecorator(){this.expectOnePlugin(["decorators","decorators-legacy"]);const e=this.startNode();if(this.next(),this.hasPlugin("decorators")){const t=this.state.startLoc;let s;if(this.match(10)){const t=this.state.startLoc;this.next(),s=this.parseExpression(),this.expect(11),s=this.wrapParenthesis(t,s);const i=this.state.startLoc;e.expression=this.parseMaybeDecoratorArguments(s),!1===this.getPluginOption("decorators","allowCallParenthesized")&&e.expression!==s&&this.raise(g.DecoratorArgumentsOutsideParentheses,{at:i})}else{for(s=this.parseIdentifier(!1);this.eat(16);){const e=this.startNodeAt(t);e.object=s,this.match(136)?(this.classScope.usePrivateName(this.state.value,this.state.startLoc),e.property=this.parsePrivateName()):e.property=this.parseIdentifier(!0),e.computed=!1,s=this.finishNode(e,"MemberExpression")}e.expression=this.parseMaybeDecoratorArguments(s)}}else e.expression=this.parseExprSubscripts();return this.finishNode(e,"Decorator")}parseMaybeDecoratorArguments(e){if(this.eat(10)){const t=this.startNodeAtNode(e);return t.callee=e,t.arguments=this.parseCallExpressionArguments(11,!1),this.toReferencedList(t.arguments),this.finishNode(t,"CallExpression")}return e}parseBreakContinueStatement(e,t){return this.next(),this.isLineTerminator()?e.label=null:(e.label=this.parseIdentifier(),this.semicolon()),this.verifyBreakContinue(e,t),this.finishNode(e,t?"BreakStatement":"ContinueStatement")}verifyBreakContinue(e,t){let s;for(s=0;s<this.state.labels.length;++s){const i=this.state.labels[s];if(null==e.label||i.name===e.label.name){if(null!=i.kind&&(t||"loop"===i.kind))break;if(e.label&&t)break}}if(s===this.state.labels.length){const s=t?"BreakStatement":"ContinueStatement";this.raise(g.IllegalBreakContinue,{at:e,type:s})}}parseDebuggerStatement(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")}parseHeaderExpression(){this.expect(10);const e=this.parseExpression();return this.expect(11),e}parseDoWhileStatement(e){return this.next(),this.state.labels.push($t),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.state.labels.pop(),this.expect(92),e.test=this.parseHeaderExpression(),this.eat(13),this.finishNode(e,"DoWhileStatement")}parseForStatement(e){this.next(),this.state.labels.push($t);let t=null;if(this.isAwaitAllowed()&&this.eatContextual(96)&&(t=this.state.lastTokStartLoc),this.scope.enter(0),this.expect(10),this.match(13))return null!==t&&this.unexpected(t),this.parseFor(e,null);const s=this.isContextual(99),i=this.isContextual(105),r=s&&this.hasFollowingBindingAtom()||i&&this.startsUsingForOf();if(this.match(74)||this.match(75)||r){const s=this.startNode(),r=this.state.value;this.next(),this.parseVar(s,!0,r);const a=this.finishNode(s,"VariableDeclaration"),n=this.match(58);return n&&i&&this.raise(g.ForInUsing,{at:a}),(n||this.isContextual(101))&&1===a.declarations.length?this.parseForIn(e,a,t):(null!==t&&this.unexpected(t),this.parseFor(e,a))}const a=this.isContextual(95),n=new ht,o=this.parseExpression(!0,n),h=this.isContextual(101);if(h&&(s&&this.raise(g.ForOfLet,{at:o}),null===t&&a&&"Identifier"===o.type&&this.raise(g.ForOfAsync,{at:o})),h||this.match(58)){this.checkDestructuringPrivate(n),this.toAssignable(o,!0);const s=h?"ForOfStatement":"ForInStatement";return this.checkLVal(o,{in:{type:s}}),this.parseForIn(e,o,t)}return this.checkExpressionErrors(n,!0),null!==t&&this.unexpected(t),this.parseFor(e,o)}parseFunctionStatement(e,t,s){return this.next(),this.parseFunction(e,1|(s?2:0)|(t?8:0))}parseIfStatement(e){return this.next(),e.test=this.parseHeaderExpression(),e.consequent=this.parseStatementOrSloppyAnnexBFunctionDeclaration(),e.alternate=this.eat(66)?this.parseStatementOrSloppyAnnexBFunctionDeclaration():null,this.finishNode(e,"IfStatement")}parseReturnStatement(e){return this.prodParam.hasReturn||this.options.allowReturnOutsideFunction||this.raise(g.IllegalReturn,{at:this.state.startLoc}),this.next(),this.isLineTerminator()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")}parseSwitchStatement(e){this.next(),e.discriminant=this.parseHeaderExpression();const t=e.cases=[];let s;this.expect(5),this.state.labels.push(Kt),this.scope.enter(0);for(let e;!this.match(8);)if(this.match(61)||this.match(65)){const i=this.match(61);s&&this.finishNode(s,"SwitchCase"),t.push(s=this.startNode()),s.consequent=[],this.next(),i?s.test=this.parseExpression():(e&&this.raise(g.MultipleDefaultsInSwitch,{at:this.state.lastTokStartLoc}),e=!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(e,"SwitchStatement")}parseThrowStatement(e){return this.next(),this.hasPrecedingLineBreak()&&this.raise(g.NewlineAfterThrow,{at:this.state.lastTokEndLoc}),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")}parseCatchClauseParam(){const e=this.parseBindingAtom();return this.scope.enter(this.options.annexB&&"Identifier"===e.type?8:0),this.checkLVal(e,{in:{type:"CatchClause"},binding:9}),e}parseTryStatement(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.match(62)){const t=this.startNode();this.next(),this.match(10)?(this.expect(10),t.param=this.parseCatchClauseParam(),this.expect(11)):(t.param=null,this.scope.enter(0)),t.body=this.withSmartMixTopicForbiddingContext((()=>this.parseBlock(!1,!1))),this.scope.exit(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(67)?this.parseBlock():null,e.handler||e.finalizer||this.raise(g.NoCatchOrFinally,{at:e}),this.finishNode(e,"TryStatement")}parseVarStatement(e,t,s=!1){return this.next(),this.parseVar(e,!1,t,s),this.semicolon(),this.finishNode(e,"VariableDeclaration")}parseWhileStatement(e){return this.next(),e.test=this.parseHeaderExpression(),this.state.labels.push($t),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.state.labels.pop(),this.finishNode(e,"WhileStatement")}parseWithStatement(e){return this.state.strict&&this.raise(g.StrictWith,{at:this.state.startLoc}),this.next(),e.object=this.parseHeaderExpression(),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.finishNode(e,"WithStatement")}parseEmptyStatement(e){return this.next(),this.finishNode(e,"EmptyStatement")}parseLabeledStatement(e,t,s,i){for(const e of this.state.labels)e.name===t&&this.raise(g.LabelRedeclaration,{at:s,labelName:t});const r=(a=this.state.type)>=90&&a<=92?"loop":this.match(71)?"switch":null;var a;for(let t=this.state.labels.length-1;t>=0;t--){const s=this.state.labels[t];if(s.statementStart!==e.start)break;s.statementStart=this.state.start,s.kind=r}return this.state.labels.push({name:t,kind:r,statementStart:this.state.start}),e.body=8&i?this.parseStatementOrSloppyAnnexBFunctionDeclaration(!0):this.parseStatement(),this.state.labels.pop(),e.label=s,this.finishNode(e,"LabeledStatement")}parseExpressionStatement(e,t,s){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")}parseBlock(e=!1,t=!0,s){const i=this.startNode();return e&&this.state.strictErrors.clear(),this.expect(5),t&&this.scope.enter(0),this.parseBlockBody(i,e,!1,8,s),t&&this.scope.exit(),this.finishNode(i,"BlockStatement")}isValidDirective(e){return"ExpressionStatement"===e.type&&"StringLiteral"===e.expression.type&&!e.expression.extra.parenthesized}parseBlockBody(e,t,s,i,r){const a=e.body=[],n=e.directives=[];this.parseBlockOrModuleBlockBody(a,t?n:void 0,s,i,r)}parseBlockOrModuleBlockBody(e,t,s,i,r){const a=this.state.strict;let n=!1,o=!1;for(;!this.match(i);){const i=s?this.parseModuleItem():this.parseStatementListItem();if(t&&!o){if(this.isValidDirective(i)){const e=this.stmtToDirective(i);t.push(e),n||"use strict"!==e.value.value||(n=!0,this.setStrict(!0));continue}o=!0,this.state.strictErrors.clear()}e.push(i)}r&&r.call(this,n),a||this.setStrict(!1),this.next()}parseFor(e,t){return e.init=t,this.semicolon(!1),e.test=this.match(13)?null:this.parseExpression(),this.semicolon(!1),e.update=this.match(11)?null:this.parseExpression(),this.expect(11),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,"ForStatement")}parseForIn(e,t,s){const i=this.match(58);return this.next(),i?null!==s&&this.unexpected(s):e.await=null!==s,"VariableDeclaration"!==t.type||null==t.declarations[0].init||i&&this.options.annexB&&!this.state.strict&&"var"===t.kind&&"Identifier"===t.declarations[0].id.type||this.raise(g.ForInOfLoopInitializer,{at:t,type:i?"ForInStatement":"ForOfStatement"}),"AssignmentPattern"===t.type&&this.raise(g.InvalidLhs,{at:t,ancestor:{type:"ForStatement"}}),e.left=t,e.right=i?this.parseExpression():this.parseMaybeAssignAllowIn(),this.expect(11),e.body=this.withSmartMixTopicForbiddingContext((()=>this.parseStatement())),this.scope.exit(),this.state.labels.pop(),this.finishNode(e,i?"ForInStatement":"ForOfStatement")}parseVar(e,t,s,i=!1){const r=e.declarations=[];for(e.kind=s;;){const e=this.startNode();if(this.parseVarId(e,s),e.init=this.eat(29)?t?this.parseMaybeAssignDisallowIn():this.parseMaybeAssignAllowIn():null,null!==e.init||i||("Identifier"===e.id.type||t&&(this.match(58)||this.isContextual(101))?"const"!==s||this.match(58)||this.isContextual(101)||this.raise(g.DeclarationMissingInitializer,{at:this.state.lastTokEndLoc,kind:"const"}):this.raise(g.DeclarationMissingInitializer,{at:this.state.lastTokEndLoc,kind:"destructuring"})),r.push(this.finishNode(e,"VariableDeclarator")),!this.eat(12))break}return e}parseVarId(e,t){const s=this.parseBindingAtom();this.checkLVal(s,{in:{type:"VariableDeclarator"},binding:"var"===t?5:ge}),e.id=s}parseAsyncFunctionExpression(e){return this.parseFunction(e,8)}parseFunction(e,t=0){const s=2&t,i=!!(1&t),r=i&&!(4&t),a=!!(8&t);this.initFunction(e,a),this.match(55)&&(s&&this.raise(g.GeneratorInSingleStatementContext,{at:this.state.startLoc}),this.next(),e.generator=!0),i&&(e.id=this.parseFunctionId(r));const n=this.state.maybeInArrowParameters;return this.state.maybeInArrowParameters=!1,this.scope.enter(2),this.prodParam.enter(nt(a,e.generator)),i||(e.id=this.parseFunctionId()),this.parseFunctionParams(e,!1),this.withSmartMixTopicForbiddingContext((()=>{this.parseFunctionBodyAndFinish(e,i?"FunctionDeclaration":"FunctionExpression")})),this.prodParam.exit(),this.scope.exit(),i&&!s&&this.registerFunctionStatementId(e),this.state.maybeInArrowParameters=n,e}parseFunctionId(e){return e||q(this.state.type)?this.parseIdentifier():null}parseFunctionParams(e,t){this.expect(10),this.expressionScope.enter(new tt(3)),e.params=this.parseBindingList(11,41,2|(t?4:0)),this.expressionScope.exit()}registerFunctionStatementId(e){e.id&&this.scope.declareName(e.id.name,!this.options.annexB||this.state.strict||e.generator||e.async?this.scope.treatFunctionsAsVar?5:ge:17,e.id.loc.start)}parseClass(e,t,s){this.next();const i=this.state.strict;return this.state.strict=!0,this.parseClassId(e,t,s),this.parseClassSuper(e),e.body=this.parseClassBody(!!e.superClass,i),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")}isClassProperty(){return this.match(29)||this.match(13)||this.match(8)}isClassMethod(){return this.match(10)}isNonstaticConstructor(e){return!(e.computed||e.static||"constructor"!==e.key.name&&"constructor"!==e.key.value)}parseClassBody(e,t){this.classScope.enter();const s={hadConstructor:!1,hadSuperClass:e};let i=[];const 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(g.DecoratorSemicolon,{at:this.state.lastTokEndLoc});continue}if(this.match(26)){i.push(this.parseDecorator());continue}const e=this.startNode();i.length&&(e.decorators=i,this.resetStartLocationFromNode(e,i[0]),i=[]),this.parseClassMember(r,e,s),"constructor"===e.kind&&e.decorators&&e.decorators.length>0&&this.raise(g.DecoratorConstructor,{at:e})}})),this.state.strict=t,this.next(),i.length)throw this.raise(g.TrailingDecorator,{at:this.state.startLoc});return this.classScope.exit(),this.finishNode(r,"ClassBody")}parseClassMemberFromModifier(e,t){const s=this.parseIdentifier(!0);if(this.isClassMethod()){const i=t;return i.kind="method",i.computed=!1,i.key=s,i.static=!1,this.pushClassMethod(e,i,!1,!1,!1,!1),!0}if(this.isClassProperty()){const i=t;return i.computed=!1,i.key=s,i.static=!1,e.body.push(this.parseClassProperty(i)),!0}return this.resetPreviousNodeTrailingComments(s),!1}parseClassMember(e,t,s){const i=this.isContextual(104);if(i){if(this.parseClassMemberFromModifier(e,t))return;if(this.eat(5))return void this.parseClassStaticBlock(e,t)}this.parseClassMemberWithIsStatic(e,t,s,i)}parseClassMemberWithIsStatic(e,t,s,i){const r=t,a=t,n=t,o=t,h=t,p=r,c=r;if(t.static=i,this.parsePropertyNamePrefixOperator(t),this.eat(55)){p.kind="method";const t=this.match(136);return this.parseClassElementName(p),t?void this.pushClassPrivateMethod(e,a,!0,!1):(this.isNonstaticConstructor(r)&&this.raise(g.ConstructorIsGenerator,{at:r.key}),void this.pushClassMethod(e,r,!0,!1,!1,!1))}const l=q(this.state.type)&&!this.state.containsEsc,u=this.match(136),d=this.parseClassElementName(t),m=this.state.startLoc;if(this.parsePostMemberNameModifiers(c),this.isClassMethod()){if(p.kind="method",u)return void this.pushClassPrivateMethod(e,a,!1,!1);const i=this.isNonstaticConstructor(r);let n=!1;i&&(r.kind="constructor",s.hadConstructor&&!this.hasPlugin("typescript")&&this.raise(g.DuplicateConstructor,{at:d}),i&&this.hasPlugin("typescript")&&t.override&&this.raise(g.OverrideOnConstructor,{at:d}),s.hadConstructor=!0,n=s.hadSuperClass),this.pushClassMethod(e,r,!1,!1,i,n)}else if(this.isClassProperty())u?this.pushClassPrivateProperty(e,o):this.pushClassProperty(e,n);else if(l&&"async"===d.name&&!this.isLineTerminator()){this.resetPreviousNodeTrailingComments(d);const t=this.eat(55);c.optional&&this.unexpected(m),p.kind="method";const s=this.match(136);this.parseClassElementName(p),this.parsePostMemberNameModifiers(c),s?this.pushClassPrivateMethod(e,a,t,!0):(this.isNonstaticConstructor(r)&&this.raise(g.ConstructorIsAsync,{at:r.key}),this.pushClassMethod(e,r,t,!0,!1,!1))}else if(!l||"get"!==d.name&&"set"!==d.name||this.match(55)&&this.isLineTerminator())if(l&&"accessor"===d.name&&!this.isLineTerminator()){this.expectPlugin("decoratorAutoAccessors"),this.resetPreviousNodeTrailingComments(d);const t=this.match(136);this.parseClassElementName(n),this.pushClassAccessorProperty(e,h,t)}else this.isLineTerminator()?u?this.pushClassPrivateProperty(e,o):this.pushClassProperty(e,n):this.unexpected();else{this.resetPreviousNodeTrailingComments(d),p.kind=d.name;const t=this.match(136);this.parseClassElementName(r),t?this.pushClassPrivateMethod(e,a,!1,!1):(this.isNonstaticConstructor(r)&&this.raise(g.ConstructorIsAccessor,{at:r.key}),this.pushClassMethod(e,r,!1,!1,!1,!1)),this.checkGetterSetterParams(r)}}parseClassElementName(e){const{type:t,value:s}=this.state;if(130!==t&&131!==t||!e.static||"prototype"!==s||this.raise(g.StaticPrototype,{at:this.state.startLoc}),136===t){"constructor"===s&&this.raise(g.ConstructorClassPrivateField,{at:this.state.startLoc});const t=this.parsePrivateName();return e.key=t,t}return this.parsePropertyName(e)}parseClassStaticBlock(e,t){var s;this.scope.enter(208);const i=this.state.labels;this.state.labels=[],this.prodParam.enter(0);const r=t.body=[];this.parseBlockOrModuleBlockBody(r,void 0,!1,8),this.prodParam.exit(),this.scope.exit(),this.state.labels=i,e.body.push(this.finishNode(t,"StaticBlock")),null!=(s=t.decorators)&&s.length&&this.raise(g.DecoratorStaticBlock,{at:t})}pushClassProperty(e,t){t.computed||"constructor"!==t.key.name&&"constructor"!==t.key.value||this.raise(g.ConstructorClassField,{at:t.key}),e.body.push(this.parseClassProperty(t))}pushClassPrivateProperty(e,t){const s=this.parseClassPrivateProperty(t);e.body.push(s),this.classScope.declarePrivateName(this.getPrivateNameSV(s.key),0,s.key.loc.start)}pushClassAccessorProperty(e,t,s){if(!s&&!t.computed){const e=t.key;"constructor"!==e.name&&"constructor"!==e.value||this.raise(g.ConstructorClassField,{at:e})}const i=this.parseClassAccessorProperty(t);e.body.push(i),s&&this.classScope.declarePrivateName(this.getPrivateNameSV(i.key),0,i.key.loc.start)}pushClassMethod(e,t,s,i,r,a){e.body.push(this.parseMethod(t,s,i,r,a,"ClassMethod",!0))}pushClassPrivateMethod(e,t,s,i){const r=this.parseMethod(t,s,i,!1,!1,"ClassPrivateMethod",!0);e.body.push(r);const a="get"===r.kind?r.static?6:2:"set"===r.kind?r.static?5:1:0;this.declareClassPrivateMethodInScope(r,a)}declareClassPrivateMethodInScope(e,t){this.classScope.declarePrivateName(this.getPrivateNameSV(e.key),t,e.key.loc.start)}parsePostMemberNameModifiers(e){}parseClassPrivateProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassPrivateProperty")}parseClassProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassProperty")}parseClassAccessorProperty(e){return this.parseInitializer(e),this.semicolon(),this.finishNode(e,"ClassAccessorProperty")}parseInitializer(e){this.scope.enter(80),this.expressionScope.enter(rt()),this.prodParam.enter(0),e.value=this.eat(29)?this.parseMaybeAssignAllowIn():null,this.expressionScope.exit(),this.prodParam.exit(),this.scope.exit()}parseClassId(e,t,s,i=8331){if(q(this.state.type))e.id=this.parseIdentifier(),t&&this.declareNameFromIdentifier(e.id,i);else{if(!s&&t)throw this.raise(g.MissingClassName,{at:this.state.startLoc});e.id=null}}parseClassSuper(e){e.superClass=this.eat(81)?this.parseExprSubscripts():null}parseExport(e,t){const s=this.maybeParseExportDefaultSpecifier(e),i=!s||this.eat(12),r=i&&this.eatExportStar(e),a=r&&this.maybeParseExportNamespaceSpecifier(e),n=i&&(!a||this.eat(12)),o=s||r;if(r&&!a){if(s&&this.unexpected(),t)throw this.raise(g.UnsupportedDecoratorExport,{at:e});return this.parseExportFrom(e,!0),this.finishNode(e,"ExportAllDeclaration")}const h=this.maybeParseExportNamedSpecifiers(e);let p;if(s&&i&&!r&&!h&&this.unexpected(null,5),a&&n&&this.unexpected(null,97),o||h){if(p=!1,t)throw this.raise(g.UnsupportedDecoratorExport,{at:e});this.parseExportFrom(e,o)}else p=this.maybeParseExportDeclaration(e);if(o||h||p){var c;const s=e;if(this.checkExport(s,!0,!1,!!s.source),"ClassDeclaration"===(null==(c=s.declaration)?void 0:c.type))this.maybeTakeDecorators(t,s.declaration,s);else if(t)throw this.raise(g.UnsupportedDecoratorExport,{at:e});return this.finishNode(s,"ExportNamedDeclaration")}if(this.eat(65)){const s=e,i=this.parseExportDefaultExpression();if(s.declaration=i,"ClassDeclaration"===i.type)this.maybeTakeDecorators(t,i,s);else if(t)throw this.raise(g.UnsupportedDecoratorExport,{at:e});return this.checkExport(s,!0,!0),this.finishNode(s,"ExportDefaultDeclaration")}this.unexpected(null,5)}eatExportStar(e){return this.eat(55)}maybeParseExportDefaultSpecifier(e){if(this.isExportDefaultSpecifier()){this.expectPlugin("exportDefaultFrom");const t=this.startNode();return t.exported=this.parseIdentifier(!0),e.specifiers=[this.finishNode(t,"ExportDefaultSpecifier")],!0}return!1}maybeParseExportNamespaceSpecifier(e){if(this.isContextual(93)){e.specifiers||(e.specifiers=[]);const t=this.startNodeAt(this.state.lastTokStartLoc);return this.next(),t.exported=this.parseModuleExportName(),e.specifiers.push(this.finishNode(t,"ExportNamespaceSpecifier")),!0}return!1}maybeParseExportNamedSpecifiers(e){if(this.match(5)){e.specifiers||(e.specifiers=[]);const t="type"===e.exportKind;return e.specifiers.push(...this.parseExportSpecifiers(t)),e.source=null,e.declaration=null,this.hasPlugin("importAssertions")&&(e.assertions=[]),!0}return!1}maybeParseExportDeclaration(e){return!!this.shouldParseExportDeclaration()&&(e.specifiers=[],e.source=null,this.hasPlugin("importAssertions")&&(e.assertions=[]),e.declaration=this.parseExportDeclaration(e),!0)}isAsyncFunction(){if(!this.isContextual(95))return!1;const e=this.nextTokenStart();return!ke.test(this.input.slice(this.state.pos,e))&&this.isUnparsedContextual(e,"function")}parseExportDefaultExpression(){const e=this.startNode();if(this.match(68))return this.next(),this.parseFunction(e,5);if(this.isAsyncFunction())return this.next(),this.next(),this.parseFunction(e,13);if(this.match(80))return this.parseClass(e,!0,!0);if(this.match(26))return this.hasPlugin("decorators")&&!0===this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(g.DecoratorBeforeExport,{at: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(g.UnsupportedDefaultExport,{at:this.state.startLoc});const t=this.parseMaybeAssignAllowIn();return this.semicolon(),t}parseExportDeclaration(e){return this.match(80)?this.parseClass(this.startNode(),!0,!1):this.parseStatementListItem()}isExportDefaultSpecifier(){const{type:e}=this.state;if(q(e)){if(95===e&&!this.state.containsEsc||99===e)return!1;if((128===e||127===e)&&!this.state.containsEsc){const{type:e}=this.lookahead();if(q(e)&&97!==e||5===e)return this.expectOnePlugin(["flow","typescript"]),!1}}else if(!this.match(65))return!1;const t=this.nextTokenStart(),s=this.isUnparsedContextual(t,"from");if(44===this.input.charCodeAt(t)||q(this.state.type)&&s)return!0;if(this.match(65)&&s){const e=this.input.charCodeAt(this.nextTokenStartSince(t+4));return 34===e||39===e}return!1}parseExportFrom(e,t){if(this.eatContextual(97)){e.source=this.parseImportSource(),this.checkExport(e);const t=this.maybeParseImportAssertions();t&&(e.assertions=t,this.checkJSONModuleImport(e))}else t&&this.unexpected();this.semicolon()}shouldParseExportDeclaration(){const{type:e}=this.state;return 26===e&&(this.expectOnePlugin(["decorators","decorators-legacy"]),this.hasPlugin("decorators"))?(!0===this.getPluginOption("decorators","decoratorsBeforeExport")&&this.raise(g.DecoratorBeforeExport,{at:this.state.startLoc}),!0):74===e||75===e||68===e||80===e||this.isLet()||this.isAsyncFunction()}checkExport(e,t,s,i){if(t)if(s){if(this.checkDuplicateExports(e,"default"),this.hasPlugin("exportDefaultFrom")){var r;const t=e.declaration;"Identifier"!==t.type||"from"!==t.name||t.end-t.start!=4||null!=(r=t.extra)&&r.parenthesized||this.raise(g.ExportDefaultFromAsIdentifier,{at:t})}}else if(e.specifiers&&e.specifiers.length)for(const t of e.specifiers){const{exported:e}=t,s="Identifier"===e.type?e.name:e.value;if(this.checkDuplicateExports(t,s),!i&&t.local){const{local:e}=t;"Identifier"!==e.type?this.raise(g.ExportBindingIsString,{at:t,localName:e.value,exportName:s}):(this.checkReservedWord(e.name,e.loc.start,!0,!1),this.scope.checkLocalExport(e))}}else if(e.declaration)if("FunctionDeclaration"===e.declaration.type||"ClassDeclaration"===e.declaration.type){const t=e.declaration.id;if(!t)throw new Error("Assertion failure");this.checkDuplicateExports(e,t.name)}else if("VariableDeclaration"===e.declaration.type)for(const t of e.declaration.declarations)this.checkDeclaration(t.id)}checkDeclaration(e){if("Identifier"===e.type)this.checkDuplicateExports(e,e.name);else if("ObjectPattern"===e.type)for(const t of e.properties)this.checkDeclaration(t);else if("ArrayPattern"===e.type)for(const t of e.elements)t&&this.checkDeclaration(t);else"ObjectProperty"===e.type?this.checkDeclaration(e.value):"RestElement"===e.type?this.checkDeclaration(e.argument):"AssignmentPattern"===e.type&&this.checkDeclaration(e.left)}checkDuplicateExports(e,t){this.exportedIdentifiers.has(t)&&("default"===t?this.raise(g.DuplicateDefaultExport,{at:e}):this.raise(g.DuplicateExport,{at:e,exportName:t})),this.exportedIdentifiers.add(t)}parseExportSpecifiers(e){const t=[];let s=!0;for(this.expect(5);!this.eat(8);){if(s)s=!1;else if(this.expect(12),this.eat(8))break;const i=this.isContextual(128),r=this.match(131),a=this.startNode();a.local=this.parseModuleExportName(),t.push(this.parseExportSpecifier(a,r,e,i))}return t}parseExportSpecifier(e,t,s,i){return this.eatContextual(93)?e.exported=this.parseModuleExportName():t?e.exported=function(e){const{type:t,start:s,end:i,loc:r,range:a,extra:n}=e;if("Placeholder"===t)return function(e){return lt(e)}(e);const o=Object.create(ct);return o.type=t,o.start=s,o.end=i,o.loc=r,o.range=a,void 0!==e.raw?o.raw=e.raw:o.extra=n,o.value=e.value,o}(e.local):e.exported||(e.exported=lt(e.local)),this.finishNode(e,"ExportSpecifier")}parseModuleExportName(){if(this.match(131)){const e=this.parseStringLiteral(this.state.value),t=e.value.match(Wt);return t&&this.raise(g.ModuleExportNameHasLoneSurrogate,{at:e,surrogateCharCode:t[0].charCodeAt(0)}),e}return this.parseIdentifier(!0)}isJSONModuleImport(e){return null!=e.assertions&&e.assertions.some((({key:e,value:t})=>"json"===t.value&&("Identifier"===e.type?"type"===e.name:"type"===e.value)))}checkImportReflection(e){var t;e.module&&(1===e.specifiers.length&&"ImportDefaultSpecifier"===e.specifiers[0].type||this.raise(g.ImportReflectionNotBinding,{at:e.specifiers[0].loc.start}),(null==(t=e.assertions)?void 0:t.length)>0&&this.raise(g.ImportReflectionHasAssertion,{at:e.specifiers[0].loc.start}))}checkJSONModuleImport(e){if(this.isJSONModuleImport(e)&&"ExportAllDeclaration"!==e.type){const{specifiers:t}=e;if(null!=t){const e=t.find((e=>{let t;if("ExportSpecifier"===e.type?t=e.local:"ImportSpecifier"===e.type&&(t=e.imported),void 0!==t)return"Identifier"===t.type?"default"!==t.name:"default"!==t.value}));void 0!==e&&this.raise(g.ImportJSONBindingNotDefault,{at:e.loc.start})}}}parseMaybeImportReflection(e){let t=!1;if(this.isContextual(125)){const e=this.lookahead(),s=e.type;q(s)?(97!==s||102===this.input.charCodeAt(this.nextTokenStartSince(e.end)))&&(t=!0):12!==s&&(t=!0)}t?(this.expectPlugin("importReflection"),this.next(),e.module=!0):this.hasPlugin("importReflection")&&(e.module=!1)}parseImport(e){if(e.specifiers=[],!this.match(131)){this.parseMaybeImportReflection(e);const t=!this.maybeParseDefaultImportSpecifier(e)||this.eat(12),s=t&&this.maybeParseStarImportSpecifier(e);t&&!s&&this.parseNamedImportSpecifiers(e),this.expectContextual(97)}e.source=this.parseImportSource();const t=this.maybeParseImportAssertions();if(t)e.assertions=t;else{const t=this.maybeParseModuleAttributes();t&&(e.attributes=t)}return this.checkImportReflection(e),this.checkJSONModuleImport(e),this.semicolon(),this.finishNode(e,"ImportDeclaration")}parseImportSource(){return this.match(131)||this.unexpected(),this.parseExprAtom()}shouldParseDefaultImport(e){return q(this.state.type)}parseImportSpecifierLocal(e,t,s){t.local=this.parseIdentifier(),e.specifiers.push(this.finishImportSpecifier(t,s))}finishImportSpecifier(e,t,s=8201){return this.checkLVal(e.local,{in:{type:t},binding:s}),this.finishNode(e,t)}parseAssertEntries(){const e=[],t=new Set;do{if(this.match(8))break;const s=this.startNode(),i=this.state.value;if(t.has(i)&&this.raise(g.ModuleAttributesWithDuplicateKeys,{at:this.state.startLoc,key:i}),t.add(i),this.match(131)?s.key=this.parseStringLiteral(i):s.key=this.parseIdentifier(!0),this.expect(14),!this.match(131))throw this.raise(g.ModuleAttributeInvalidValue,{at:this.state.startLoc});s.value=this.parseStringLiteral(this.state.value),e.push(this.finishNode(s,"ImportAttribute"))}while(this.eat(12));return e}maybeParseModuleAttributes(){if(!this.match(76)||this.hasPrecedingLineBreak())return this.hasPlugin("moduleAttributes")?[]:null;this.expectPlugin("moduleAttributes"),this.next();const e=[],t=new Set;do{const s=this.startNode();if(s.key=this.parseIdentifier(!0),"type"!==s.key.name&&this.raise(g.ModuleAttributeDifferentFromType,{at:s.key}),t.has(s.key.name)&&this.raise(g.ModuleAttributesWithDuplicateKeys,{at:s.key,key:s.key.name}),t.add(s.key.name),this.expect(14),!this.match(131))throw this.raise(g.ModuleAttributeInvalidValue,{at:this.state.startLoc});s.value=this.parseStringLiteral(this.state.value),this.finishNode(s,"ImportAttribute"),e.push(s)}while(this.eat(12));return e}maybeParseImportAssertions(){if(!this.isContextual(94)||this.hasPrecedingLineBreak())return this.hasPlugin("importAssertions")?[]:null;this.expectPlugin("importAssertions"),this.next(),this.eat(5);const e=this.parseAssertEntries();return this.eat(8),e}maybeParseDefaultImportSpecifier(e){return!!this.shouldParseDefaultImport(e)&&(this.parseImportSpecifierLocal(e,this.startNode(),"ImportDefaultSpecifier"),!0)}maybeParseStarImportSpecifier(e){if(this.match(55)){const t=this.startNode();return this.next(),this.expectContextual(93),this.parseImportSpecifierLocal(e,t,"ImportNamespaceSpecifier"),!0}return!1}parseNamedImportSpecifiers(e){let t=!0;for(this.expect(5);!this.eat(8);){if(t)t=!1;else{if(this.eat(14))throw this.raise(g.DestructureNamedImport,{at:this.state.startLoc});if(this.expect(12),this.eat(8))break}const s=this.startNode(),i=this.match(131),r=this.isContextual(128);s.imported=this.parseModuleExportName();const a=this.parseImportSpecifier(s,i,"type"===e.importKind||"typeof"===e.importKind,r,void 0);e.specifiers.push(a)}}parseImportSpecifier(e,t,s,i,r){if(this.eatContextual(93))e.local=this.parseIdentifier();else{const{imported:s}=e;if(t)throw this.raise(g.ImportBindingIsString,{at:e,importName:s.value});this.checkReservedWord(s.name,e.loc.start,!0,!0),e.local||(e.local=lt(s))}return this.finishImportSpecifier(e,"ImportSpecifier",r)}isThisParam(e){return"Identifier"===e.type&&"this"===e.name}}class Gt extends Xt{constructor(e,t){super(e=function(e){if(e&&null!=e.annexB&&!1!==e.annexB)throw new Error("The `annexB` option can only be set to `false`.");const t={};for(const s of Object.keys(Ht))t[s]=e&&null!=e[s]?e[s]:Ht[s];return t}(e),t),this.options=e,this.initializeScopes(),this.plugins=function(e){const t=new Map;for(const s of e){const[e,i]=Array.isArray(s)?s:[s,{}];t.has(e)||t.set(e,i||{})}return t}(this.options.plugins),this.filename=e.sourceFilename}getScopeHandler(){return ve}parse(){this.enterInitialScopes();const e=this.startNode(),t=this.startNode();return this.nextToken(),e.errors=null,this.parseTopLevel(e,t),e.errors=this.state.errors,e}}!function(e){const t={};for(const s of Object.keys(e))t[s]=Q(e[s])}(H);function Zt(e,t){let s=Gt;return null!=e&&e.plugins&&(function(e){if(Ft(e,"decorators")){if(Ft(e,"decorators-legacy"))throw new Error("Cannot use the decorators and decorators-legacy plugin together");const t=Rt(e,"decorators","decoratorsBeforeExport");if(null!=t&&"boolean"!=typeof t)throw new Error("'decoratorsBeforeExport' must be a boolean, if specified.");const s=Rt(e,"decorators","allowCallParenthesized");if(null!=s&&"boolean"!=typeof s)throw new Error("'allowCallParenthesized' must be a boolean.")}if(Ft(e,"flow")&&Ft(e,"typescript"))throw new Error("Cannot combine flow and typescript plugins.");if(Ft(e,"placeholders")&&Ft(e,"v8intrinsic"))throw new Error("Cannot combine placeholders and v8intrinsic plugins.");if(Ft(e,"pipelineOperator")){const t=Rt(e,"pipelineOperator","proposal");if(!jt.includes(t)){const e=jt.map((e=>`"${e}"`)).join(", ");throw new Error(`"pipelineOperator" requires "proposal" option whose value must be one of: ${e}.`)}const s=Ft(e,["recordAndTuple",{syntaxType:"hash"}]);if("hack"===t){if(Ft(e,"placeholders"))throw new Error("Cannot combine placeholders plugin and Hack-style pipes.");if(Ft(e,"v8intrinsic"))throw new Error("Cannot combine v8intrinsic plugin and Hack-style pipes.");const t=Rt(e,"pipelineOperator","topicToken");if(!Ut.includes(t)){const e=Ut.map((e=>`"${e}"`)).join(", ");throw new Error(`"pipelineOperator" in "proposal": "hack" mode also requires a "topicToken" option whose value must be one of: ${e}.`)}if("#"===t&&s)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "hack", topicToken: "#" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}else if("smart"===t&&s)throw new Error('Plugin conflict between `["pipelineOperator", { proposal: "smart" }]` and `["recordAndtuple", { syntaxType: "hash"}]`.')}if(Ft(e,"moduleAttributes")){if(Ft(e,"importAssertions"))throw new Error("Cannot combine importAssertions and moduleAttributes plugins.");if("may-2020"!==Rt(e,"moduleAttributes","version"))throw new Error("The 'moduleAttributes' plugin requires a 'version' option, representing the last proposal update. Currently, the only supported value is 'may-2020'.")}if(Ft(e,"recordAndTuple")&&null!=Rt(e,"recordAndTuple","syntaxType")&&!_t.includes(Rt(e,"recordAndTuple","syntaxType")))throw new Error("The 'syntaxType' option of the 'recordAndTuple' plugin must be one of: "+_t.map((e=>`'${e}'`)).join(", "));if(Ft(e,"asyncDoExpressions")&&!Ft(e,"doExpressions")){const e=new Error("'asyncDoExpressions' requires 'doExpressions', please add 'doExpressions' to parser plugins.");throw e.missingPlugins="doExpressions",e}}(e.plugins),s=function(e){const t=zt.filter((t=>Ft(e,t))),s=t.join("/");let i=Yt[s];if(!i){i=Gt;for(const e of t)i=Vt[e](i);Yt[s]=i}return i}(e.plugins)),new s(e,t)}const Yt={};t.Qc=function(e,t){var s;if("unambiguous"!==(null==(s=t)?void 0:s.sourceType))return Zt(t,e).parse();t=Object.assign({},t);try{t.sourceType="module";const s=Zt(t,e),i=s.parse();if(s.sawUnambiguousESM)return i;if(s.ambiguousScriptDifferentAst)try{return t.sourceType="script",Zt(t,e).parse()}catch(e){}else i.program.sourceType="script";return i}catch(s){try{return t.sourceType="script",Zt(t,e).parse()}catch(e){}throw s}},t.BJ=function(e,t){const s=Zt(t,e);return s.options.strictMode&&(s.state.strict=!0),s.getExpression()}},6666:(e,t,s)=>{s.d(t,{Z:()=>r});var i=s(5850);function r(e,t,s){return(t=(0,i.Z)(t))in e?Object.defineProperty(e,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[t]=s,e}},3028:(e,t,s)=>{s.d(t,{Z:()=>a});var i=s(6666);function r(e,t){var s=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),s.push.apply(s,i)}return s}function a(e){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{};t%2?r(Object(s),!0).forEach((function(t){(0,i.Z)(e,t,s[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(s)):r(Object(s)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(s,t))}))}return e}},2159:(e,t,s)=>{function i(e,t){if(null==e)return{};var s,i,r=function(e,t){if(null==e)return{};var s,i,r={},a=Object.keys(e);for(i=0;i<a.length;i++)s=a[i],t.indexOf(s)>=0||(r[s]=e[s]);return r}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)s=a[i],t.indexOf(s)>=0||Object.prototype.propertyIsEnumerable.call(e,s)&&(r[s]=e[s])}return r}s.d(t,{Z:()=>i})},5850:(e,t,s)=>{s.d(t,{Z:()=>r});var i=s(6522);function r(e){var t=function(e,t){if("object"!==(0,i.Z)(e)||null===e)return e;var s=e[Symbol.toPrimitive];if(void 0!==s){var r=s.call(e,"string");if("object"!==(0,i.Z)(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===(0,i.Z)(t)?t:String(t)}},6522:(e,t,s)=>{function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}s.d(t,{Z:()=>i})},5151:(e,t,s)=>{s.r(t),s.d(t,{cook:()=>R,isEvaluable:()=>W,isTrackAll:()=>X,precook:()=>V,precookFunction:()=>$,preevaluate:()=>K,shouldAllowRecursiveEvaluations:()=>J});var i=s(6666);class r{constructor(){(0,i.Z)(this,"VariableEnvironment",void 0),(0,i.Z)(this,"LexicalEnvironment",void 0),(0,i.Z)(this,"Function",void 0)}}class a{constructor(e){(0,i.Z)(this,"OuterEnv",void 0),(0,i.Z)(this,"bindingMap",new Map),this.OuterEnv=e}HasBinding(e){return this.bindingMap.has(e)}CreateMutableBinding(e,t){return this.bindingMap.set(e,{mutable:!0,deletable:t}),f(void 0)}CreateImmutableBinding(e,t){return this.bindingMap.set(e,{strict:t}),f(void 0)}InitializeBinding(e,t){var s=this.bindingMap.get(e);return Object.assign(s,{initialized:!0,value:t}),f(void 0)}SetMutableBinding(e,t,s){var i=this.bindingMap.get(e);if(!i.initialized)throw new ReferenceError("".concat(e," is not initialized"));if(!i.mutable)throw new TypeError("Assignment to constant variable");return i.value=t,f(void 0)}GetBindingValue(e,t){var s=this.bindingMap.get(e);if(!s.initialized)throw new ReferenceError("".concat(e," is not initialized"));return s.value}}class n extends a{}class o extends a{}var h=Symbol.for("SourceNode"),p=Symbol.for("FormalParameters"),c=Symbol.for("ECMAScriptCode"),l=Symbol.for("Environment"),u=Symbol.for("IsConstructor");class d{constructor(e,t,s){(0,i.Z)(this,"Base",void 0),(0,i.Z)(this,"ReferenceName",void 0),(0,i.Z)(this,"Strict",void 0),this.Base=e,this.ReferenceName=t,this.Strict=s}}class m{constructor(e,t){(0,i.Z)(this,"Type",void 0),(0,i.Z)(this,"Value",void 0),this.Type=e,this.Value=t}}function f(e){return new m("normal",e)}var y=Symbol("empty completion");function x(e){var t=new Set,s=e=>{if(Array.isArray(e))for(var i of e)s(i);else if(e)switch(e.type){case"Identifier":return void t.add(e.name);case"VariableDeclaration":return s(e.declarations);case"VariableDeclarator":case"FunctionDeclaration":return s(e.id);case"ArrayPattern":return s(e.elements);case"AssignmentPattern":return s(e.left);case"ObjectPattern":return s(e.properties);case"Property":return s(e.value);case"RestElement":return s(e.argument)}};return s(e),Array.from(t)}function P(e){var t=e=>{if(Array.isArray(e))return e.some(t);if(e)switch(e.type){case"ArrayPattern":return t(e.elements);case"AssignmentPattern":return!0;case"ObjectPattern":return t(e.properties);case"Property":return e.computed||t(e.value);case"RestElement":return t(e.argument)}};return t(e)}function g(e,t){var s=[],i={var:t.var},r=(e,t)=>{if(Array.isArray(e))for(var a of e)r(a,t);else if(e){switch(e.type){case"FunctionDeclaration":return void(Number(!t.var)^Number(t.topLevel)&&s.push(e));case"VariableDeclaration":return void(Number(!t.var)^Number("var"===e.kind)&&s.push(e));case"SwitchCase":return void r(e.consequent,i);case"CatchClause":return void r(e.body,i)}if(t.var)switch(e.type){case"BlockStatement":case"DoWhileStatement":case"WhileStatement":return void r(e.body,i);case"IfStatement":return r(e.consequent,i),void r(e.alternate,i);case"ForStatement":return r(e.init,i),void r(e.body,i);case"ForInStatement":case"ForOfStatement":return r(e.left,i),void r(e.body,i);case"SwitchStatement":return void r(e.cases,i);case"TryStatement":return r(e.block,i),r(e.handler,i),void r(e.finalizer,i)}}};return r(e,t),s}function b(e){return"unresolvable"!==e.Base&&!(e.Base instanceof a)}function T(e,t){return e.Base.InitializeBinding(e.ReferenceName,t)}function v(e,t,s){if(null==t)return e;var i=Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t));for(var r of i)if(!s.has(r)){var a=Object.getOwnPropertyDescriptor(t,r);null!=a&&a.enumerable&&(e[r]=t[r])}return e}function A(e,t){var s="const"===e.kind;for(var i of x(e))s?t.CreateImmutableBinding(i,!0):t.CreateMutableBinding(i,!1)}function E(e){return"normal"===e.Type||"continue"==e.Type}function w(e,t){return e.Value!==y?e:new m(e.Type,t)}function S(e){if(e instanceof m&&(e=e.Value),!(e instanceof d))return e;if("unresolvable"===e.Base)throw new ReferenceError("".concat(e.ReferenceName," is not defined"));return e.Base instanceof a?e.Base.GetBindingValue(e.ReferenceName,e.Strict):e.Base[e.ReferenceName]}function C(e){return"symbol"==typeof e?e:String(e)}function I(e,t){return e[t]}function N(e,t){if("unresolvable"===e.Base)throw new ReferenceError("".concat(e.ReferenceName," is not defined"));return e.Base instanceof a?e.Base.SetMutableBinding(e.ReferenceName,t,e.Strict):(e.Base[e.ReferenceName]=t,f(void 0))}function k(e){if(t=e,!(Array.isArray(t)||null!=t&&"function"==typeof t[Symbol.iterator]))throw new TypeError("".concat(typeof e," is not iterable"));var t;return e[Symbol.iterator]()}function L(e){if(null==e)throw new TypeError("Cannot destructure properties of undefined or null")}function M(e,t,s){return e?e.HasBinding(t)?new d(e,t,s):M(e.OuterEnv,t,s):new d("unresolvable",t,s)}function O(e,t,s){switch(t){case"+":return e+s;case"-":return e-s;case"/":return e/s;case"%":return e%s;case"*":return e*s;case"**":return e**s;case"==":return e==s;case"===":return e===s;case"!=":return e!=s;case"!==":return e!==s;case">":return e>s;case"<":return e<s;case">=":return e>=s;case"<=":return e<=s}throw new SyntaxError("Unsupported binary operator `".concat(t,"`"))}var D=new WeakSet([Function,Object,Function.prototype,Object.prototype,function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if("undefined"!=typeof global)return global;throw new Error("unable to locate global object")}()]);function B(e){if(D.has(e))throw new TypeError("Cannot access reserved objects such as `Function`.")}var F=new WeakSet([Array,Map,Set,URLSearchParams,WeakMap,WeakSet,RegExp]);function R(e,t){var s,{rules:i,globalVariables:a={},hooks:D={}}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},R="FunctionDeclaration"!==e.type,j=new n(null),U=new r;U.VariableEnvironment=j,U.LexicalEnvironment=j;var _=[U];for(var[V,z]of Object.entries(a))j.CreateImmutableBinding(V,!0),j.InitializeBinding(V,z);var H=new WeakMap;function q(e,s){var i,r,a;switch(null===(i=D.beforeEvaluate)||void 0===i||i.call(D,e),e.type){case"ArrayExpression":var o=[];for(var h of e.elements)if(h)if("SpreadElement"===h.type){var p=S(q(h.argument));o.push(...p)}else o.push(S(q(h)));else o.length+=1;return f(o);case"ArrowFunctionExpression":return le(e),f(ae(e,$().LexicalEnvironment,!1));case"BinaryExpression":var c=S(q(e.left)),l=q(e.right).Value,P=S(l);if(R&&"|>"===e.operator){if("function"!=typeof P){var g=t.substring(e.right.start,e.right.end);throw new TypeError("".concat(g," is not a function"))}var I;return l instanceof d&&b(l)&&(I=l.Base),f(P.call(I,c))}return f(O(c,e.operator,P));case"CallExpression":var L=q(e.callee,s).Value,M=S(L);return null==M&&(e.optional||null!=s&&s.skipped)?(s.skipped=!0,f(void 0)):(B(M),te(M,L,e.arguments,e.callee));case"ChainExpression":return q(e.expression,{});case"ConditionalExpression":return f(S(q(S(q(e.test))?e.consequent:e.alternate)));case"Identifier":return f(K(e.name));case"Literal":if(e.regex){if(null===e.value)throw new SyntaxError("Invalid regular expression: ".concat(e.raw));if(e.regex.flags.includes("u"))throw new SyntaxError("Unsupported unicode flag in regular expression: ".concat(e.raw))}return f(e.value);case"LogicalExpression":var j=S(q(e.left));switch(e.operator){case"&&":return f(j&&S(q(e.right)));case"||":return f(j||S(q(e.right)));case"??":return f(null!=j?j:S(q(e.right)));default:throw new SyntaxError("Unsupported logical operator '".concat(e.operator,"'"))}case"MemberExpression":var U=S(q(e.object,s).Value);if(null==U&&(e.optional||null!=s&&s.skipped))return s.skipped=!0,f(void 0);B(U);var _=e.computed?function(e,t,s){var i=C(S(q(t)));return new d(e,i,!0)}(U,e.property):function(e,t,s){var i=t.name;return new d(e,i,!0)}(U,e.property);return B(_),f(_);case"NewExpression":return function(e,s){var i=S(q(e)),r=se(s);if("function"!=typeof i||!1===i[u]){var a=t.substring(e.start,e.end);throw new TypeError("".concat(a," is not a constructor"))}if(!function(e){return F.has(e)||e===Date}(i)){var n=t.substring(e.start,e.end);throw new TypeError("".concat(n," is not an allowed constructor"))}return f(new i(...r))}(e.callee,e.arguments);case"ObjectExpression":var V={};for(var z of e.properties)if("SpreadElement"===z.type)v(V,S(q(z.argument)),new Set);else{if("init"!==z.kind)throw new SyntaxError("Unsupported object getter/setter");var H=z.computed||"Identifier"!==z.key.type?oe(z.key):z.key.name;if("__proto__"===H)throw new TypeError("Setting '__proto__' property is not allowed");V[H]=S(q(z.value))}return f(V);case"SequenceExpression":var G;for(var Y of e.expressions)G=f(S(q(Y)));return G;case"TemplateLiteral":var Q=[e.quasis[0].value.cooked],re=0;for(var he of e.expressions){var pe=S(q(he));Q.push(String(pe)),Q.push(e.quasis[re+=1].value.cooked)}return f(Q.join(""));case"TaggedTemplateExpression":var ce=q(e.tag).Value,ue=S(ce);return B(ue),te(ue,ce,e.quasi,e.tag);case"UnaryExpression":var de=q(e.argument).Value;if(!R&&"delete"===e.operator){if(!(de instanceof d))return f(!0);if(b(de))return f(delete de.Base[de.ReferenceName])}return"typeof"===e.operator?de instanceof d&&"unresolvable"===de.Base?f("undefined"):f(typeof S(de)):f(function(e,t){switch(t){case"!":return!e;case"+":return+e;case"-":return-e;case"void":return}throw new SyntaxError("Unsupported unary operator `".concat(t,"`"))}(S(de),e.operator))}if(!R)switch(e.type){case"AssignmentExpression":if("="===e.operator){if("ArrayPattern"!==e.left.type&&"ObjectPattern"!==e.left.type){var me=q(e.left).Value,fe=S(q(e.right));return N(me,fe),f(fe)}var ye=S(q(e.right));return Z(e.left,ye),f(ye)}var xe=q(e.left).Value,Pe=S(xe),ge=S(q(e.right)),be=function(e,t,s){switch(t){case"+=":case"-=":case"*=":case"/=":case"%=":case"**=":return O(e,t.substr(0,t.length-1),s)}throw new SyntaxError("Unsupported assignment operator `".concat(t,"`"))}(Pe,e.operator,ge);return N(xe,be),f(be);case"BlockStatement":if(!e.body.length)return f(y);var Te=$().LexicalEnvironment,ve=new n(Te);ee(e.body,ve),$().LexicalEnvironment=ve;var Ae=ie(e.body);return $().LexicalEnvironment=Te,Ae;case"BreakStatement":return new m("break",y);case"ContinueStatement":return new m("continue",y);case"EmptyStatement":case"FunctionDeclaration":return f(y);case"DoWhileStatement":return W(function(e){for(var t;;){var s=q(e.body);if(!E(s))return w(s,t);if(s.Value!==y&&(t=s.Value),!S(q(e.test)))return f(t)}}(e));case"ExpressionStatement":case"TSAsExpression":return q(e.expression);case"ForInStatement":case"ForOfStatement":return W(function(e){var t=e.left,s="VariableDeclaration"===t.type?"var"===t.kind?"varBinding":"lexicalBinding":"assignment",i="lexicalBinding"===s?x(t):[],r="ForInStatement"===e.type?"enumerate":"iterate",a=function(e,t,s){var i=$(),r=i.LexicalEnvironment;if(e.length>0){var a=new n(r);for(var o of e)a.CreateMutableBinding(o,!1);i.LexicalEnvironment=a}var h=q(t);i.LexicalEnvironment=r;var p=S(h);if("enumerate"===s){if(null==p)return new m("break",y);var c=function*(e){for(var t in e)yield t}(p);return f(c)}return f(k(p))}(i,e.right,r);return"normal"!==a.Type?a:function(e,t,s,i,r){for(var a,o="assignment"===r?e:e.declarations[0].id,h=$().LexicalEnvironment,p="ObjectPattern"===o.type||"ArrayPattern"===o.type;;){var{done:c,value:l}=s.next();if(c)return f(a);var u=void 0,d=void 0;if("lexicalBinding"===r){if(A(e,d=new n(h)),$().LexicalEnvironment=d,!p){var[m]=x(o);u=K(m)}}else p||(u=q(o).Value);p?"assignment"===r?Z(o,l):ne(o,l,"varBinding"===r?void 0:d):"lexicalBinding"===r?T(u,l):N(u,l);var P=q(t);if($().LexicalEnvironment=h,!E(P)){var g=w(P,a);if("enumerate"!==i&&void 0!==s.return){var b=s.return();if(!b||!["object","function"].includes(typeof b))throw new TypeError("Iterator result is not an object")}return g}P.Value!==y&&(a=P.Value)}}(t,e.body,a.Value,r,s)}(e));case"ForStatement":return W(function(e){var t;if("VariableDeclaration"===(null===(t=e.init)||void 0===t?void 0:t.type)){if("var"===e.init.kind)return q(e.init),X(e.test,e.update,e.body,[]);var s=$().LexicalEnvironment,i=new n(s),r="const"===e.init.kind,a=x(e.init);for(var o of a)r?i.CreateImmutableBinding(o,!0):i.CreateMutableBinding(o,!1);$().LexicalEnvironment=i,q(e.init);var h=r?[]:Array.from(a),p=X(e.test,e.update,e.body,h);return $().LexicalEnvironment=s,p}return e.init&&S(q(e.init)),X(e.test,e.update,e.body,[])}(e));case"FunctionExpression":return le(e),f(function(e){var t=$().LexicalEnvironment;if(e.id){var s=e.id.name,i=new n(t);i.CreateImmutableBinding(s,!1);var r=ae(e,i,!0);return i.InitializeBinding(s,r),r}return ae(e,t,!0)}(e));case"IfStatement":return S(q(e.test))?(null!==(r=D.beforeBranch)&&void 0!==r&&r.call(D,e,"if"),w(q(e.consequent),void 0)):(null!==(a=D.beforeBranch)&&void 0!==a&&a.call(D,e,"else"),e.alternate?w(q(e.alternate),void 0):f(void 0));case"ReturnStatement":var Ee;return e.argument&&(Ee=S(q(e.argument))),new m("return",Ee);case"ThrowStatement":throw S(q(e.argument));case"UpdateExpression":var we=q(e.argument).Value,Se=Number(S(we)),Ce="++"===e.operator?Se+1:Se-1;return N(we,Ce),f(e.prefix?Ce:Se);case"SwitchCase":return ie(e.consequent);case"SwitchStatement":var Ie=S(q(e.discriminant)),Ne=$().LexicalEnvironment,ke=new n(Ne);ee(e.cases,ke),$().LexicalEnvironment=ke;var Le=function(e,t){var s,i=e.findIndex((e=>!e.test)),r=i>=0,a=r?e.slice(0,i):e,n=!1;for(var o of a)if(n||(n=J(o,t)),n){var h=q(o);if(h.Value!==y&&(s=h.Value),"normal"!==h.Type)return w(h,s)}if(!r)return f(s);var p=!1,c=e.slice(i+1);if(!n)for(var l of c)if(p||(p=J(l,t)),p){var u=q(l);if(u.Value!==y&&(s=u.Value),"normal"!==u.Type)return w(u,s)}if(p)return f(s);var d=q(e[i]);if(d.Value!==y&&(s=d.Value),"normal"!==d.Type)return w(d,s);for(var m of c){var x=q(m);if(x.Value!==y&&(s=x.Value),"normal"!==x.Type)return w(x,s)}return f(s)}(e.cases,Ie);return $().LexicalEnvironment=Ne,W(Le);case"TryStatement":var Me;try{Me=q(e.block)}catch(t){if(!e.handler)throw t;var Oe;null===(Oe=D.beforeEvaluate)||void 0===Oe||Oe.call(D,e.handler),Me=function(e,t){if(!e.param)return q(e.body);var s=$().LexicalEnvironment,i=new n(s);for(var r of x(e.param))i.CreateMutableBinding(r,!1);$().LexicalEnvironment=i,ne(e.param,t,i);var a=q(e.body);return $().LexicalEnvironment=s,a}(e.handler,t)}finally{if(e.finalizer){var De=q(e.finalizer);"normal"!==De.Type&&(Me=De)}}return Me;case"VariableDeclaration":var Be;for(var Fe of e.declarations)if(Fe.init)if("Identifier"===Fe.id.type){var Re=K(Fe.id.name),je=S(q(Fe.init));Be="var"===e.kind?N(Re,je):T(Re,je)}else{var Ue=S(q(Fe.init));Be=ne(Fe.id,Ue,"var"===e.kind?void 0:$().LexicalEnvironment)}else Be="var"===e.kind?f(y):T(K(Fe.id.name),void 0);return Be;case"WhileStatement":return W(function(e){for(var t;;){if(!S(q(e.test)))return f(t);var s=q(e.body);if(!E(s))return w(s,t);s.Value!==y&&(t=s.Value)}}(e))}throw new SyntaxError("Unsupported node type `".concat(e.type,"`"))}function $(){return _[_.length-1]}function K(e,t){return t||(t=$().LexicalEnvironment),M(t,e,!0)}function W(e){return"break"===e.Type?e.Value===y?f(void 0):f(e.Value):e}function J(e,t){return t===S(q(e.test))}function X(e,t,s,i){var r;for(G(i);;){if(e&&!S(q(e)))return f(r);var a=q(s);if(!E(a))return w(a,r);a.Value&&(r=a.Value),G(i),t&&S(q(t))}}function G(e){if(0!==e.length){var t=$().LexicalEnvironment,s=t.OuterEnv,i=new n(s);for(var r of e){i.CreateMutableBinding(r,!1);var a=t.GetBindingValue(r,!1);i.InitializeBinding(r,a)}$().LexicalEnvironment=i}}function Z(e,t){if("ObjectPattern"===e.type)return L(t),e.properties.length>0&&function(e,t){var s=new Set;for(var i of e)if("Property"===i.type){var r=i.computed||"Identifier"!==i.key.type?oe(i.key):i.key.name,a="AssignmentPattern"===i.value.type?i.value.left:i.value;if("Identifier"===a.type){var n=K(a.name),o=I(t,r);"AssignmentPattern"===i.value.type&&void 0===o&&(o=S(q(i.value.right))),N(n,o),s.add(r)}else Y(i.value,t,r),s.add(r)}else Q(i,t,s)}(e.properties,t),f(y);var s=k(t);return function(e,t){var s=f(y);for(var i of e)if(i){var r="RestElement"===i.type?i.argument:"AssignmentPattern"===i.type?i.left:i,a="ArrayPattern"===r.type||"ObjectPattern"===r.type,n=void 0;a||(n=q(r).Value);var o=void 0;if("RestElement"!==i.type){var{done:h,value:p}=t.next(),c=h?void 0:p;o="AssignmentPattern"===i.type&&void 0===c?S(q(i.right)):c}else{o=[];for(var l=0;;){var{done:u,value:d}=t.next();if(u)break;o[l]=d,l++}}s=a?Z(r,o):N(n,o)}else t.next(),s=f(y);return s}(e.elements,s)}function Y(e,t,s){var i,r="AssignmentPattern"===e.type?e.left:e,a="ArrayPattern"===r.type||"ObjectPattern"===r.type;a||(i=q(r).Value);var n,o=I(t,s);return n="AssignmentPattern"===e.type&&void 0===o?S(q(e.right)):o,a?Z(r,n):N(i,n)}function Q(e,t,s){return N(q(e.argument).Value,v({},t,s))}function ee(e,t){var s=g(e,{var:!1,topLevel:!1});for(var i of s){var r="VariableDeclaration"===i.type&&"const"===i.kind;for(var a of x(i))r?t.CreateImmutableBinding(a,!0):t.CreateMutableBinding(a,!1);if("FunctionDeclaration"===i.type){var[n]=x(i),o=re(i,t);t.InitializeBinding(n,o)}}}function te(e,s,i,r){var a;s instanceof d&&b(s)&&(a=s.Base);var n=se(i);if("function"!=typeof e){var o=t.substring(r.start,r.end);throw new TypeError("".concat(o," is not a function"))}var h=e.apply(a,n);return B(h),f(h)}function se(e){var t=[];if(Array.isArray(e))for(var s of e)if("SpreadElement"===s.type){var i=S(q(s.argument));t.push(...i)}else t.push(S(q(s)));else for(var r of(t.push(function(e){var t=H.get(e);if(t)return t;var s=e.quasis.map((e=>e.value.raw)),i=e.quasis.map((e=>e.value.cooked));return Object.freeze(s),Object.defineProperty(i,"raw",{value:s,writable:!1,enumerable:!1,configurable:!1}),Object.freeze(i),H.set(e,i),i}(e)),e.expressions))t.push(S(q(r)));return t}function ie(e){var t=f(y);for(var s of e){var i=q(s);if("normal"!==i.Type)return i;t=w(t,i.Value)}return t}function re(e,t){return ae(e,t,!0)}function ae(e,t,s){var a=function(){return function(e,t){var s;null===(s=D.beforeCall)||void 0===s||s.call(D,e[h]),function(e){var t=new r;t.Function=e;var s=new o(e[l]);t.VariableEnvironment=s,t.LexicalEnvironment=s,_.push(t)}(e);var a=function(e,t){return function(e,t,s){return function(e,t){for(var s=$(),r=e[c],a=e[p],o=x(a),h=P(a),l=g(r,{var:!0,topLevel:!0}),u=x(l),d=[],m=[],f=l.length-1;f>=0;f--){var y=l[f];if("FunctionDeclaration"===y.type){le(y);var[b]=x(y);d.includes(b)||(d.unshift(b),m.unshift(y))}else if(null!=i&&i.noVar)throw new SyntaxError("Var declaration is not recommended, use `let` or `const` instead")}var T,v=s.LexicalEnvironment;for(var A of o)v.CreateMutableBinding(A,!1);if(pe(a,k(t),v),h)for(var E of(T=new n(v),s.VariableEnvironment=T,u)){T.CreateMutableBinding(E,!1);var w=void 0;o.includes(E)&&!d.includes(E)&&(w=v.GetBindingValue(E,!1)),T.InitializeBinding(E,w)}else{for(var S of u)o.includes(S)||(v.CreateMutableBinding(S,!1),v.InitializeBinding(S,void 0));T=v}var C=T;s.LexicalEnvironment=C;var I=g(r,{var:!1,topLevel:!0});for(var N of I)for(var L of x(N))"const"===N.kind?C.CreateImmutableBinding(L,!0):C.CreateMutableBinding(L,!1);for(var M of m){var[O]=x(M),D=re(M,C);T.SetMutableBinding(O,D,!1)}}(t,s),Array.isArray(e)?ie(e):new m("return",S(q(e)))}(e[c],e,t)}(e,t);if(_.pop(),"return"===a.Type)return a.Value}(a,arguments)};return Object.defineProperties(a,{[h]:{value:e},[p]:{value:e.params},[c]:{value:"BlockStatement"===e.body.type?e.body.body:e.body},[l]:{value:t},[u]:{value:s}}),a}function ne(e,t,s){switch(e.type){case"Identifier":return function(e,t,s){return s.InitializeBinding(e,t),f(y)}(e.name,t,s);case"ObjectPattern":return L(t),function(e,t,s){var i=new Set;for(var r of e){if("RestElement"===r.type)return he(r,t,s,i);if(r.computed||"Identifier"!==r.key.type){var a=oe(r.key);ce(r.value,t,s,a),i.add(a)}else ce(r.value,t,s,r.key.name),i.add(r.key.name)}return f(y)}(e.properties,t,s);case"ArrayPattern":var i=k(t);return pe(e.elements,i,s)}}function oe(e){return C(S(q(e)))}function he(e,t,s,i){var r=K(e.argument.name,s),a=v({},t,i);return s?T(r,a):N(r,a)}function pe(e,t,s){if(0===e.length)return f(y);var i;for(var r of e)if(r)if("RestElement"===r.type)if("Identifier"===r.argument.type)for(var a=K(r.argument.name,s),n=[],o=0;;){var{done:h,value:p}=t.next();if(h){i=s?T(a,n):N(a,n);break}n[o]=p,o++}else for(var c=[],l=0;;){var{done:u,value:d}=t.next();if(u){i=ne(r.argument,c,s);break}c[l]=d,l++}else{var m="AssignmentPattern"===r.type?r.left:r;switch(m.type){case"ObjectPattern":case"ArrayPattern":var x=void 0,{done:P,value:g}=t.next();P||(x=g),"AssignmentPattern"===r.type&&void 0===x&&(x=S(q(r.right))),i=ne(m,x,s);break;case"Identifier":var b=K(m.name,s),v=void 0,{done:A,value:E}=t.next();A||(v=E),"AssignmentPattern"===r.type&&void 0===v&&(v=S(q(r.right))),i=s?T(b,v):N(b,v)}}else t.next(),i=f(y);return i}function ce(e,t,s,i){if("Identifier"===e.type||"AssignmentPattern"===e.type&&"Identifier"===e.left.type){var r=K("Identifier"===e.type?e.name:e.left.name,s),a=I(t,i);return"AssignmentPattern"===e.type&&void 0===a&&(a=S(q(e.right))),s?T(r,a):N(r,a)}var n=I(t,i);return"AssignmentPattern"===e.type&&void 0===n&&(n=S(q(e.right))),ne("AssignmentPattern"===e.type?e.left:e,n,s)}function le(e){if(e.async||e.generator)throw new SyntaxError("".concat(e.async?"Async":"Generator"," function is not allowed"));if(R&&!e.expression)throw new SyntaxError("Only an `Expression` is allowed in `ArrowFunctionExpression`'s body")}if(R)return S(q(e));null===(s=D.beforeEvaluate)||void 0===s||s.call(D,e),le(e);var[ue]=x(e);j.CreateImmutableBinding(ue,!0);var de=re(e,j);return j.InitializeBinding(ue,de),de}var j=s(3028);class U{constructor(){(0,i.Z)(this,"VariableEnvironment",void 0),(0,i.Z)(this,"LexicalEnvironment",void 0)}}class _{constructor(e){(0,i.Z)(this,"OuterEnv",void 0),(0,i.Z)(this,"bindingSet",new Set),this.OuterEnv=e}HasBinding(e){return this.bindingSet.has(e)}CreateBinding(e){this.bindingSet.add(e)}}function V(e){var{expressionOnly:t,visitors:s,withParent:i,hooks:r={}}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=new Set,n=[],o=new _(null),h=new U;function p(){return n[n.length-1]}function c(e,t,s){for(var i of t)l(e[i],null==s?void 0:s.concat({node:e,key:i}))}function l(e,i){if(Array.isArray(e))e.forEach(((e,t)=>{l(e,i?i.slice(0,-1).concat((0,j.Z)((0,j.Z)({},i[i.length-1]),{},{index:t})):i)}));else if(e){var n,o;switch(null===(n=r.beforeVisit)||void 0===n||n.call(r,e,i),function(e){var t,i;s&&(t=s,i=e.type,Object.prototype.hasOwnProperty.call(t,i))&&s[e.type](e)}(e),e.type){case"Identifier":var h;return z=e.name,void(d(p().LexicalEnvironment,z)||(null===(h=r.beforeVisitGlobal)||void 0===h||h.call(r,e,i),a.add(e.name)));case"ArrayExpression":case"ArrayPattern":return void c(e,["elements"],i);case"ArrowFunctionExpression":return void f(y(e,p().LexicalEnvironment),i);case"AssignmentPattern":case"BinaryExpression":case"LogicalExpression":return void c(e,["left","right"],i);case"CallExpression":case"NewExpression":return void c(e,["callee","arguments"],i);case"ChainExpression":return void c(e,["expression"],i);case"ConditionalExpression":return void c(e,["test","consequent","alternate"],i);case"MemberExpression":return c(e,["object"],i),void(e.computed&&c(e,["property"],i));case"ObjectExpression":case"ObjectPattern":return void c(e,["properties"],i);case"Property":return e.computed&&c(e,["key"],i),void c(e,["value"],i);case"RestElement":case"SpreadElement":case"UnaryExpression":return void c(e,["argument"],i);case"SequenceExpression":case"TemplateLiteral":return void c(e,["expressions"],i);case"TaggedTemplateExpression":return void c(e,["tag","quasi"],i);case"Literal":return}if(!t)switch(e.type){case"AssignmentExpression":return void c(e,["right","left"],i);case"BlockStatement":if(!e.body.length)return;var P=p(),g=P.LexicalEnvironment,b=new _(g);return m(e.body,b),P.LexicalEnvironment=b,c(e,["body"],i),void(P.LexicalEnvironment=g);case"BreakStatement":case"ContinueStatement":case"EmptyStatement":return;case"CatchClause":var T=p(),v=T.LexicalEnvironment,A=new _(v);return u(e.param,A),T.LexicalEnvironment=A,c(e,["param","body"],i),void(T.LexicalEnvironment=v);case"DoWhileStatement":return void c(e,["body","test"],i);case"ExpressionStatement":case"TSAsExpression":return void c(e,["expression"],i);case"ForInStatement":case"ForOfStatement":var E="VariableDeclaration"===e.left.type&&"var"!==e.left.kind,w=p(),S=w.LexicalEnvironment;if(E){var C=new _(S);u(e.left,C),w.LexicalEnvironment=C}if(c(e,["right"],i),w.LexicalEnvironment=S,E){var I=new _(S);u(e.left,I),w.LexicalEnvironment=I}return c(e,["left","body"],i),void(w.LexicalEnvironment=S);case"ForStatement":var N,k="VariableDeclaration"===(null===(N=e.init)||void 0===N?void 0:N.type)&&"var"!==e.init.kind,L=p(),M=L.LexicalEnvironment;if(k){var O=new _(M);u(e.init,O),L.LexicalEnvironment=O}return c(e,["init","test","body","update"],i),void(L.LexicalEnvironment=M);case"FunctionDeclaration":var[D]=x(e),B=p().LexicalEnvironment,F=y(e,B);return B.CreateBinding(D),void f(F,i);case"FunctionExpression":return void f(function(e){var t=p().LexicalEnvironment;if(!e.id)return y(e,t);var s=e.id.name,i=new _(t);return i.CreateBinding(s),y(e,i)}(e),i);case"IfStatement":return void c(e,["test","consequent","alternate"],i);case"ReturnStatement":case"ThrowStatement":case"UpdateExpression":return void c(e,["argument"],i);case"SwitchCase":return void c(e,["test","consequent"],i);case"SwitchStatement":c(e,["discriminant"],i);var R=p(),U=R.LexicalEnvironment,V=new _(U);return m(e.cases,V),R.LexicalEnvironment=V,c(e,["cases"],i),void(R.LexicalEnvironment=U);case"TryStatement":return void c(e,["block","handler","finalizer"],i);case"VariableDeclaration":return void c(e,["declarations"],i);case"VariableDeclarator":return void c(e,["id","init"],i);case"WhileStatement":return void c(e,["test","body"],i)}(null===(o=r.beforeVisitUnknown)||void 0===o?void 0:o.call(r,e,i))||console.warn("Unsupported node type `".concat(e.type,"`"))}var z}function u(e,t){for(var s of x(e))t.CreateBinding(s)}function d(e,t){return!!e&&(e.HasBinding(t)||d(e.OuterEnv,t))}function m(e,t){u(g(e,{var:!1,topLevel:!1}),t)}function f(e,t){var s,i,r;s=e,i=new U,r=new _(s.Environment),i.VariableEnvironment=r,i.LexicalEnvironment=r,n.push(i),function(e,t){var s,i=p(),r=e.ECMAScriptCode,a=e.FormalParameters,n=P(a),o=x(g(r,{var:!0,topLevel:!0})),h=i.LexicalEnvironment;if(u(a,h),l(a,null==t?void 0:t.concat({node:e.Function,key:"params"})),n)for(var c of(s=new _(h),i.VariableEnvironment=s,o))s.CreateBinding(c);else{for(var d of o)h.CreateBinding(d);s=h}var m=s;i.LexicalEnvironment=m,u(g(r,{var:!1,topLevel:!0}),m)}(e,t),l(e.ECMAScriptCode,null==t?void 0:t.concat({node:e.Function,key:"body"}).concat("BlockStatement"===e.Function.body.type?{node:e.Function.body,key:"body"}:[])),n.pop()}function y(e,t){return{Function:e,FormalParameters:e.params,ECMAScriptCode:"BlockStatement"===e.body.type?e.body.body:e.body,Environment:t}}return h.VariableEnvironment=o,h.LexicalEnvironment=o,n.push(h),l(e,i?[]:void 0),a}var z=s(2159),H=s(1874),q=["typescript"];function $(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{typescript:s}=t,i=(0,z.Z)(t,q),r=function(e){var{typescript:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=(0,H.Qc)(e,{plugins:["estree",t&&"typescript"].filter(Boolean),strictMode:!0,attachComment:!1}).program.body,i=t?[]:s;if(t)for(var r of s)if(r.type.startsWith("TS")){if(/Enum|Import|Export/.test(r.type))throw new SyntaxError("Unsupported TypeScript syntax: ".concat(r.type))}else i.push(r);if(0===i.length)throw new SyntaxError("Function declaration not found");if(i.length>1||"FunctionDeclaration"!==i[0].type)throw new SyntaxError("Expect a single function declaration at top level, but received: ".concat(i.map((e=>'"'.concat(e.type,'"'))).join(", ")));return i[0]}(e,{typescript:s});return{function:r,attemptToVisitGlobals:V(r,i)}}function K(e,t){var s=[],i=e.replace(/^\s*<%[~=]?\s|\s%>\s*$/g,(e=>(s.push(e),""))),r=function(e){return(0,H.BJ)(e,{plugins:["estree",["pipelineOperator",{proposal:"minimal"}]],attachComment:!1})}(i);return{expression:r,attemptToVisitGlobals:V(r,(0,j.Z)((0,j.Z)({},t),{},{expressionOnly:!0})),source:i,prefix:s[0],suffix:s[1]}}function W(e){return/^\s*<%[~=]?\s/.test(e)&&/\s%>\s*$/.test(e)}function J(e){return/^\s*<%~\s/.test(e)}function X(e){return/^\s*<%=\s/.test(e)&&/\s%>\s*$/.test(e)}}}]);
2
- //# sourceMappingURL=5151.13888d0e.js.map