@crewx/sdk 0.9.0-rc.17 → 0.9.0-rc.170

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 (343) hide show
  1. package/README.md +1 -1
  2. package/dist/account/auth-client.d.ts +61 -0
  3. package/dist/account/auth-json-v2.d.ts +1 -0
  4. package/dist/account/auth-json.d.ts +30 -0
  5. package/dist/account/config.d.ts +37 -0
  6. package/dist/account/env-bootstrap.d.ts +11 -0
  7. package/dist/account/errors.d.ts +24 -0
  8. package/dist/account/index.d.ts +12 -0
  9. package/dist/account/index.js +2 -0
  10. package/dist/account/session-manager.d.ts +47 -0
  11. package/dist/activity-log/builder.d.ts +59 -6
  12. package/dist/agent/agent-list-view.d.ts +19 -0
  13. package/dist/agent-interceptor/chain.d.ts +25 -0
  14. package/dist/agent-interceptor/index.d.ts +6 -0
  15. package/dist/agent-interceptor/model-runner.d.ts +19 -0
  16. package/dist/agent-interceptor/program-runner.d.ts +13 -0
  17. package/dist/agent-interceptor/protocol.d.ts +68 -0
  18. package/dist/agent-interceptor/run-stop.d.ts +3 -0
  19. package/dist/agent-interceptor/schema.d.ts +267 -0
  20. package/dist/agent-interceptor/types.d.ts +88 -0
  21. package/dist/app/app.d.ts +167 -0
  22. package/dist/app/backend-env.d.ts +3 -0
  23. package/dist/app/content-media-types.d.ts +2 -0
  24. package/dist/app/context.d.ts +2 -0
  25. package/dist/app/entry.d.ts +9 -0
  26. package/dist/app/frame.d.ts +55 -0
  27. package/dist/app/index.d.ts +18 -0
  28. package/dist/app/index.js +12 -0
  29. package/dist/app/job-bridge.child.d.ts +1 -0
  30. package/dist/app/job-bridge.d.ts +67 -0
  31. package/dist/app/job-bridge.drain.child.d.ts +1 -0
  32. package/dist/app/job-bridge.example.d.ts +11 -0
  33. package/dist/app/job-contract.d.ts +40 -0
  34. package/dist/app/job-wire.d.ts +149 -0
  35. package/dist/app/protocol.d.ts +9 -0
  36. package/dist/app/runtime.d.ts +23 -0
  37. package/dist/app/schedule-contract.d.ts +59 -0
  38. package/dist/app/tool-mode.d.ts +3 -0
  39. package/dist/app-artifact-policy/check.d.ts +2 -0
  40. package/dist/app-artifact-policy/contract.d.ts +54 -0
  41. package/dist/app-artifact-policy/helper.d.ts +15 -0
  42. package/dist/app-artifact-policy/index.d.ts +3 -0
  43. package/dist/app-artifact-policy/index.js +18 -0
  44. package/dist/app-artifact-policy/paths.d.ts +24 -0
  45. package/dist/app-artifact-policy/scan.d.ts +47 -0
  46. package/dist/boxing/box.types.d.ts +4 -0
  47. package/dist/config/canonicalize-agent-options.d.ts +18 -0
  48. package/dist/config/default-agent-models.d.ts +11 -0
  49. package/dist/config/global-settings.d.ts +33 -0
  50. package/dist/config/migrate-grok-mode.d.ts +6 -0
  51. package/dist/config/model-compat.d.ts +31 -0
  52. package/dist/config/models.generated.d.ts +37 -0
  53. package/dist/config/models.remote.d.ts +1 -0
  54. package/dist/config/overdrive.d.ts +7 -0
  55. package/dist/config/pricing.d.ts +6 -3
  56. package/dist/config/pricing.generated.d.ts +4 -0
  57. package/dist/config/pricing.types.d.ts +4 -0
  58. package/dist/config/timeout.config.d.ts +4 -0
  59. package/dist/config/wi-boards.d.ts +19 -0
  60. package/dist/context-budget/continuity.d.ts +63 -0
  61. package/dist/context-budget/index.d.ts +142 -0
  62. package/dist/conversation/index.d.ts +1 -1
  63. package/dist/conversation/sqlite-provider.d.ts +6 -3
  64. package/dist/conversation/to-template-messages.d.ts +9 -0
  65. package/dist/conversation/types.d.ts +58 -1
  66. package/dist/desktop/command-runner.d.ts +4 -0
  67. package/dist/desktop/default-adapters.d.ts +4 -0
  68. package/dist/desktop/global-install.d.ts +19 -0
  69. package/dist/desktop/index.d.ts +3 -0
  70. package/dist/desktop/index.js +3 -0
  71. package/dist/desktop/install.d.ts +5 -0
  72. package/dist/desktop/lnk.d.ts +22 -0
  73. package/dist/desktop/manifest.d.ts +21 -0
  74. package/dist/desktop/types.d.ts +67 -0
  75. package/dist/desktop/version.d.ts +1 -0
  76. package/dist/desktop/windows-paths.d.ts +21 -0
  77. package/dist/desktop/wrapper.d.ts +18 -0
  78. package/dist/esm/account/index.js +2 -0
  79. package/dist/esm/app/index.js +12 -0
  80. package/dist/esm/app-artifact-policy/index.js +18 -0
  81. package/dist/esm/desktop/index.js +3 -0
  82. package/dist/esm/index.js +1175 -224
  83. package/dist/esm/node/index.js +2 -0
  84. package/dist/esm/plugins/index.js +527 -214
  85. package/dist/esm/process/index.js +1 -0
  86. package/dist/esm/publish/index.js +2 -0
  87. package/dist/esm/repository/index.js +648 -211
  88. package/dist/esm/skills/index.js +2 -0
  89. package/dist/esm/testing/index.js +1 -1
  90. package/dist/events/types.d.ts +28 -0
  91. package/dist/facade/Crewx.d.ts +70 -5
  92. package/dist/facade/task-ticket.d.ts +14 -0
  93. package/dist/highlight/thread-highlight-prompt.d.ts +2 -0
  94. package/dist/highlight/thread-highlighter.d.ts +326 -0
  95. package/dist/index.browser.d.ts +25 -1
  96. package/dist/index.browser.js +6 -2
  97. package/dist/index.d.ts +157 -17
  98. package/dist/index.js +1175 -224
  99. package/dist/internal/console-decoder.d.ts +38 -0
  100. package/dist/internal/windows-spawn.d.ts +10 -0
  101. package/dist/layout/types.d.ts +18 -1
  102. package/dist/lifecycle/process-lease.d.ts +80 -0
  103. package/dist/lifecycle/process-owner.d.ts +20 -0
  104. package/dist/lifecycle/task-heartbeat.d.ts +41 -0
  105. package/dist/lifecycle/task-stop.d.ts +82 -0
  106. package/dist/lifecycle/update-admission.d.ts +45 -0
  107. package/dist/local-server/base-url.d.ts +18 -0
  108. package/dist/local-server/index.d.ts +8 -0
  109. package/dist/local-server/opencode.d.ts +8 -0
  110. package/dist/local-server/probe.d.ts +3 -0
  111. package/dist/local-server/runtime.d.ts +26 -0
  112. package/dist/local-server/types.d.ts +43 -0
  113. package/dist/mcp-app/agent-access.d.ts +26 -0
  114. package/dist/mcp-app/app-handoff.d.ts +109 -0
  115. package/dist/mcp-app/app-icon-read.d.ts +7 -0
  116. package/dist/mcp-app/app-job-bridge.d.ts +30 -0
  117. package/dist/mcp-app/app-job-bridge.example.d.ts +36 -0
  118. package/dist/mcp-app/app-job.d.ts +168 -0
  119. package/dist/mcp-app/app-schedule.d.ts +85 -0
  120. package/dist/mcp-app/apps-context.d.ts +32 -0
  121. package/dist/mcp-app/bundle-provenance.d.ts +3 -0
  122. package/dist/mcp-app/candidate-registration.d.ts +4 -0
  123. package/dist/mcp-app/card-handler.d.ts +7 -0
  124. package/dist/mcp-app/catalog.d.ts +7 -0
  125. package/dist/mcp-app/content-channel.d.ts +86 -0
  126. package/dist/mcp-app/content-declarations.d.ts +31 -0
  127. package/dist/mcp-app/dev-checks.d.ts +31 -0
  128. package/dist/mcp-app/diagnostic-reason.d.ts +3 -0
  129. package/dist/mcp-app/discovery.d.ts +164 -0
  130. package/dist/mcp-app/errors.d.ts +7 -0
  131. package/dist/mcp-app/index.d.ts +45 -0
  132. package/dist/mcp-app/installed-app-ref.d.ts +25 -0
  133. package/dist/mcp-app/model-context.d.ts +29 -0
  134. package/dist/mcp-app/node-app-discovery-fs.d.ts +23 -0
  135. package/dist/mcp-app/product-bundle-assets.d.ts +27 -0
  136. package/dist/mcp-app/product-bundle-loader.d.ts +53 -0
  137. package/dist/mcp-app/projection.d.ts +14 -0
  138. package/dist/mcp-app/prompt-cards.d.ts +28 -0
  139. package/dist/mcp-app/registry.d.ts +28 -0
  140. package/dist/mcp-app/skill-backend.d.ts +141 -0
  141. package/dist/mcp-app/state-set.d.ts +9 -0
  142. package/dist/mcp-app/types.d.ts +488 -0
  143. package/dist/mcp-app/workspace-app-assets.d.ts +42 -0
  144. package/dist/mcp-app/workspace-app-scan-cache.d.ts +27 -0
  145. package/dist/mcp-app/workspace-snapshot.d.ts +75 -0
  146. package/dist/migrations/0011_far_black_tarantula.sql +1 -0
  147. package/dist/migrations/0012_blue_turbo.sql +23 -0
  148. package/dist/migrations/0013_hesitant_adam_destine.sql +15 -0
  149. package/dist/migrations/0014_organic_mongu.sql +73 -0
  150. package/dist/migrations/0015_panoramic_gorilla_man.sql +71 -0
  151. package/dist/migrations/0016_fuzzy_hemingway.sql +14 -0
  152. package/dist/migrations/0017_project_stage_sdk_migration.sql +29 -0
  153. package/dist/migrations/0018_bored_jackal.sql +33 -0
  154. package/dist/migrations/0019_backfill_task_thread_ids.sql +74 -0
  155. package/dist/migrations/0020_useful_iron_lad.sql +55 -0
  156. package/dist/migrations/0021_dashing_peter_quill.sql +51 -0
  157. package/dist/migrations/0022_wandering_bucky.sql +1 -0
  158. package/dist/migrations/0023_red_payback.sql +1 -0
  159. package/dist/migrations/0024_storage_metadata.sql +262 -0
  160. package/dist/migrations/0025_task_heartbeat.sql +8 -0
  161. package/dist/migrations/0025_thread_app_instance_ledger.sql +2 -0
  162. package/dist/migrations/0026_mcp_action_source.sql +47 -0
  163. package/dist/migrations/0027_task_stop_scope_cleanup.sql +5 -0
  164. package/dist/migrations/0027_ui_instance_active_unique.sql +2 -0
  165. package/dist/migrations/0029_nice_rhino.sql +1 -0
  166. package/dist/migrations/0031_petite_arclight.sql +6 -0
  167. package/dist/migrations/0032_ui_instance_opened_by.sql +1 -0
  168. package/dist/migrations/0033_thread_creator_boundary_guard.sql +38 -0
  169. package/dist/migrations/0034_keen_fallen_one.sql +36 -0
  170. package/dist/migrations/0035_request_log_daily.sql +11 -0
  171. package/dist/migrations/0036_ui_definition_archive.sql +8 -0
  172. package/dist/migrations/0037_ui_instance_agent_open_request.sql +1 -0
  173. package/dist/migrations/0038_task_rating.sql +3 -0
  174. package/dist/migrations/0039_aspiring_purifiers.sql +9 -0
  175. package/dist/migrations/0040_task_provider_inputs.sql +53 -0
  176. package/dist/migrations/0041_tranquil_vivisector.sql +54 -0
  177. package/dist/migrations/meta/0011_snapshot.json +1342 -0
  178. package/dist/migrations/meta/0012_snapshot.json +1494 -0
  179. package/dist/migrations/meta/0013_snapshot.json +1592 -0
  180. package/dist/migrations/meta/0014_snapshot.json +1975 -0
  181. package/dist/migrations/meta/0015_snapshot.json +2315 -0
  182. package/dist/migrations/meta/0016_snapshot.json +2419 -0
  183. package/dist/migrations/meta/0017_snapshot.json +2419 -0
  184. package/dist/migrations/meta/0018_snapshot.json +2570 -0
  185. package/dist/migrations/meta/0020_snapshot.json +2895 -0
  186. package/dist/migrations/meta/0021_snapshot.json +3031 -0
  187. package/dist/migrations/meta/0022_snapshot.json +3039 -0
  188. package/dist/migrations/meta/0023_snapshot.json +3047 -0
  189. package/dist/migrations/meta/0029_snapshot.json +3206 -0
  190. package/dist/migrations/meta/0031_snapshot.json +3251 -0
  191. package/dist/migrations/meta/0034_snapshot.json +3473 -0
  192. package/dist/migrations/meta/0035_snapshot.json +3547 -0
  193. package/dist/migrations/meta/0036_snapshot.json +3591 -0
  194. package/dist/migrations/meta/0037_snapshot.json +3598 -0
  195. package/dist/migrations/meta/0038_snapshot.json +3626 -0
  196. package/dist/migrations/meta/0039_snapshot.json +3684 -0
  197. package/dist/migrations/meta/0040_snapshot.json +3759 -0
  198. package/dist/migrations/meta/0041_snapshot.json +4156 -0
  199. package/dist/migrations/meta/_journal.json +217 -0
  200. package/dist/node/index.d.ts +1 -0
  201. package/dist/node/index.js +2 -0
  202. package/dist/paths.d.ts +1 -0
  203. package/dist/plugin/types.d.ts +1 -0
  204. package/dist/plugins/index.d.ts +1 -1
  205. package/dist/plugins/index.js +527 -214
  206. package/dist/plugins/sqlite-tracing.d.ts +46 -0
  207. package/dist/process/index.d.ts +2 -0
  208. package/dist/process/index.js +1 -0
  209. package/dist/process/process-control.d.ts +60 -0
  210. package/dist/prompt/tag-names.d.ts +22 -0
  211. package/dist/provider/acp/connection.d.ts +6 -0
  212. package/dist/provider/acp/meta.d.ts +11 -0
  213. package/dist/provider/bridge.d.ts +12 -2
  214. package/dist/provider/classify-task-error.d.ts +2 -0
  215. package/dist/provider/claude-agent-env.d.ts +1 -0
  216. package/dist/provider/cli/adapter.types.d.ts +23 -2
  217. package/dist/provider/cli/adapters/agent-call.util.d.ts +1 -1
  218. package/dist/provider/cli/adapters/cli-knob.util.d.ts +7 -0
  219. package/dist/provider/cli/adapters/codex-item.d.ts +1 -0
  220. package/dist/provider/cli/adapters/event-timestamp.util.d.ts +1 -0
  221. package/dist/provider/cli/adapters/grok.d.ts +2 -0
  222. package/dist/provider/cli/adapters/index.d.ts +5 -0
  223. package/dist/provider/cli/index.d.ts +3 -2
  224. package/dist/provider/cli/meta.d.ts +5 -0
  225. package/dist/provider/cli/protocol-envelope.d.ts +3 -0
  226. package/dist/provider/errors.d.ts +5 -1
  227. package/dist/provider/idle-watchdog.d.ts +19 -0
  228. package/dist/provider/models.d.ts +17 -12
  229. package/dist/provider/order.d.ts +1 -1
  230. package/dist/provider/parse-usage.d.ts +6 -0
  231. package/dist/provider/provider-selection.d.ts +8 -0
  232. package/dist/provider/redact-technical-message.d.ts +1 -0
  233. package/dist/provider/task-error.types.d.ts +17 -0
  234. package/dist/provider-account/accounts.d.ts +15 -0
  235. package/dist/provider-account/index.d.ts +5 -0
  236. package/dist/provider-account/registry.d.ts +30 -0
  237. package/dist/provider-account/types.d.ts +40 -0
  238. package/dist/publish/constants.d.ts +6 -0
  239. package/dist/publish/errors.d.ts +7 -0
  240. package/dist/publish/index.d.ts +55 -0
  241. package/dist/publish/index.js +2 -0
  242. package/dist/publish/manifest.d.ts +47 -0
  243. package/dist/publish/marketplace-api.constants.d.ts +1 -0
  244. package/dist/publish/pack.d.ts +6 -0
  245. package/dist/publish/scan.d.ts +10 -0
  246. package/dist/publish/secrets.d.ts +6 -0
  247. package/dist/publish/upload.d.ts +19 -0
  248. package/dist/remote/execution-profile.d.ts +9 -0
  249. package/dist/remote/index.d.ts +1 -0
  250. package/dist/remote/types.d.ts +28 -0
  251. package/dist/repository/agent-send-history.repository.d.ts +23 -0
  252. package/dist/repository/agent-suggestion.repository.d.ts +34 -0
  253. package/dist/repository/base-sqlite-repository.d.ts +1 -0
  254. package/dist/repository/common-code.repository.d.ts +45 -0
  255. package/dist/repository/db.d.ts +12 -1
  256. package/dist/repository/index.d.ts +53 -6
  257. package/dist/repository/index.js +648 -211
  258. package/dist/repository/logs-db.d.ts +12 -0
  259. package/dist/repository/notification.repository.d.ts +58 -0
  260. package/dist/repository/project.repository.d.ts +90 -0
  261. package/dist/repository/public-task-answer.d.ts +24 -0
  262. package/dist/repository/request-log-mover.d.ts +70 -0
  263. package/dist/repository/request-log.repository.d.ts +7 -3
  264. package/dist/repository/sidebar-tab.repository.d.ts +86 -0
  265. package/dist/repository/storage-metadata.repository.d.ts +64 -0
  266. package/dist/repository/task-log-migration.d.ts +74 -0
  267. package/dist/repository/task-log.repository.d.ts +44 -0
  268. package/dist/repository/task-status.d.ts +21 -0
  269. package/dist/repository/task.repository.d.ts +307 -8
  270. package/dist/repository/thread-history.repository.d.ts +193 -0
  271. package/dist/repository/thread-origin-verdict.d.ts +27 -0
  272. package/dist/repository/thread-title.types.d.ts +29 -0
  273. package/dist/repository/thread.repository.d.ts +134 -5
  274. package/dist/repository/usage-backfill.d.ts +62 -0
  275. package/dist/repository/usage-from-logs.d.ts +21 -0
  276. package/dist/repository/workspace.repository.d.ts +3 -0
  277. package/dist/schema/agent-send-history.d.ts +85 -0
  278. package/dist/schema/agent-suggestions.d.ts +199 -0
  279. package/dist/schema/common-codes.d.ts +216 -0
  280. package/dist/schema/index.d.ts +16 -0
  281. package/dist/schema/notifications.d.ts +303 -0
  282. package/dist/schema/projects.d.ts +610 -0
  283. package/dist/schema/request-log-daily.d.ts +151 -0
  284. package/dist/schema/sidebar-tabs.d.ts +466 -0
  285. package/dist/schema/storage-metadata.d.ts +181 -0
  286. package/dist/schema/task-log-events.d.ts +119 -0
  287. package/dist/schema/task-provider-inputs.d.ts +100 -0
  288. package/dist/schema/tasks.d.ts +1058 -1
  289. package/dist/schema/thread-creator-unverified.d.ts +45 -0
  290. package/dist/schema/thread-history.d.ts +734 -0
  291. package/dist/schema/threads.d.ts +59 -0
  292. package/dist/schema/ui-action-receipts.d.ts +358 -0
  293. package/dist/schema/ui-definition-archive.d.ts +63 -0
  294. package/dist/schema/ui-instance-repins.d.ts +222 -0
  295. package/dist/schema/ui-instances.d.ts +324 -0
  296. package/dist/schema/workspaces.d.ts +17 -0
  297. package/dist/skills/index.d.ts +15 -0
  298. package/dist/skills/index.js +2 -0
  299. package/dist/skills/types.d.ts +18 -0
  300. package/dist/task-log/anchor-child-tasks.d.ts +7 -0
  301. package/dist/task-log/delegation-trailer.d.ts +34 -0
  302. package/dist/template/engine.d.ts +2 -2
  303. package/dist/template/helpers/exec.browser.d.ts +4 -3
  304. package/dist/template/helpers/exec.d.ts +4 -3
  305. package/dist/template/helpers/format-conversation.d.ts +1 -0
  306. package/dist/template/types.d.ts +20 -0
  307. package/dist/testing/index.js +1 -1
  308. package/dist/types/index.d.ts +1611 -3
  309. package/dist/types/task-log.types.d.ts +6 -1
  310. package/dist/ui-card/index.d.ts +2 -0
  311. package/dist/ui-card/legacy-card-parser.d.ts +11 -0
  312. package/dist/ui-instance/definition.d.ts +6 -0
  313. package/dist/ui-instance/errors.d.ts +18 -0
  314. package/dist/ui-instance/index.d.ts +11 -0
  315. package/dist/ui-instance/json.d.ts +19 -0
  316. package/dist/ui-instance/lineage.d.ts +24 -0
  317. package/dist/ui-instance/runtime.d.ts +19 -0
  318. package/dist/ui-instance/store.d.ts +213 -0
  319. package/dist/ui-instance/types.d.ts +343 -0
  320. package/dist/ui-plugin/app-icon.d.ts +50 -0
  321. package/dist/ui-plugin/app-manifest.d.ts +64 -0
  322. package/dist/ui-plugin/csp.d.ts +28 -0
  323. package/dist/ui-plugin/index.d.ts +8 -0
  324. package/dist/ui-plugin/limits.d.ts +27 -0
  325. package/dist/ui-plugin/manifest.d.ts +3 -0
  326. package/dist/ui-plugin/types.d.ts +207 -0
  327. package/dist/ui-plugin/validator.d.ts +18 -0
  328. package/dist/utils/crewx-executable.d.ts +76 -0
  329. package/dist/utils/crewx-home.d.ts +1 -0
  330. package/dist/utils/env-defaults.d.ts +3 -0
  331. package/dist/utils/id.d.ts +1 -1
  332. package/dist/utils/local-identity.d.ts +2 -0
  333. package/dist/utils/runner-env.d.ts +3 -0
  334. package/dist/utils/timestamp.d.ts +1 -0
  335. package/dist/utils/workspace.d.ts +1 -0
  336. package/dist/wi/create.d.ts +48 -0
  337. package/dist/wi/select.d.ts +20 -0
  338. package/package.json +63 -3
  339. package/templates/agents/default.yaml +303 -128
  340. package/templates/documents/crewx-manual.md +138 -138
  341. package/templates/documents/crewx-quick-guide.md +8 -7
  342. package/templates/workflows/wi-default-flow.yaml +65 -0
  343. package/templates/workflows/wi-plan-flow.yaml +140 -0
@@ -0,0 +1,18 @@
1
+ 'use strict';var hi="app-runtime-references/1",ci=["INPUT_INVALID","LIMIT_EXCEEDED","PARSE_FAILED","UNSUPPORTED_LOADER","BINDING_AMBIGUOUS","TARGET_OUTSIDE_CLOSURE","BARE_SPECIFIER","BUILTIN_NOT_SELECTED","WORKER_UNSUPPORTED"],L={maxSourceBytesPerArtifact:16777216,maxSourceBytesTotal:33554432,maxExecutableArtifacts:512,maxAstNodesPerArtifact:15e5,maxAstNodesTotal:2e6,maxNestingDepth:512,maxClosurePaths:4096,maxBuiltinSelections:256,maxMetadataBytes:4194304,maxPathLength:1024,maxBuiltinNameLength:256};var st=new Set(`
2
+ _http_agent _http_client _http_common _http_incoming _http_outgoing _http_server _stream_duplex
3
+ _stream_passthrough _stream_readable _stream_transform _stream_wrap _stream_writable _tls_common
4
+ _tls_wrap assert assert/strict async_hooks buffer child_process cluster console constants crypto
5
+ dgram diagnostics_channel dns dns/promises domain events fs fs/promises http http2 https inspector
6
+ inspector/promises module net os path path/posix path/win32 perf_hooks process punycode querystring
7
+ readline readline/promises repl stream stream/consumers stream/promises stream/web string_decoder sys
8
+ timers timers/promises tls trace_events tty url util util/types v8 vm wasi worker_threads zlib
9
+ `.trim().split(/\s+/u)),at=/^[a-z_][a-z0-9_]*(?:\/[a-z0-9_]+)*$/u,nt=/[\\?#%:\u0000-\u001f\u007f]/u;function Te(e){if(e.length===0)return "path is empty";if(e.startsWith("/"))return "absolute path";if(nt.test(e))return "path has a query, fragment, percent escape or reserved character";if(e.endsWith(".node"))return "native addon path";if(e.split("/").some(i=>i===""||i==="."||i===".."))return "path is not normalized"}function pe(e){return /\.(?:m|c)?js$/u.test(e)}function ot(e){if(e.startsWith("node:")){let t=e.slice(5);return at.test(t)?t:void 0}return st.has(e)?e:void 0}function ie(e){if(e==="")return te("BARE_SPECIFIER","empty specifier");if(e==="."||e==="..")return te("UNSUPPORTED_LOADER","directory target");if(e.startsWith("./")||e.startsWith("../"))return {kind:"relative"};if(e.startsWith("/"))return te("TARGET_OUTSIDE_CLOSURE","absolute target");if(/^file:/iu.test(e))return te("TARGET_OUTSIDE_CLOSURE","file URL target");if(e.startsWith("node:")){let t=e.slice(5);return at.test(t)?{kind:"builtin",name:t}:te("BARE_SPECIFIER","invalid built-in name")}return st.has(e)?{kind:"builtin",name:e}:/^[A-Za-z][A-Za-z0-9+.-]*:/u.test(e)?te("BARE_SPECIFIER","URL scheme specifier"):te("BARE_SPECIFIER","bare package specifier")}function Le(e,t){if(nt.test(t))return {code:"UNSUPPORTED_LOADER",detail:"target has a query, fragment, percent escape or reserved character"};if(t.endsWith("/"))return {code:"UNSUPPORTED_LOADER",detail:"directory target"};let i=e.split("/").slice(0,-1);for(let r of t.split("/"))if(!(r===""||r===".")){if(r===".."){if(i.length===0)return {code:"TARGET_OUTSIDE_CLOSURE",detail:"target escapes the closure root"};i.pop();continue}i.push(r);}return i.length===0?{code:"UNSUPPORTED_LOADER",detail:"target names the closure root"}:{path:i.join("/")}}function Oe(e){let t=0;for(let i=0;i<e.length;i+=1){let r=e.charCodeAt(i);if(r<128)t+=1;else if(r<2048)t+=2;else if(r>=55296&&r<=56319&&i+1<e.length){let s=e.charCodeAt(i+1);s>=56320&&s<=57343?(t+=4,i+=1):t+=3;}else t+=3;}return t}function te(e,t){return {kind:"refused",code:e,detail:t}}var li=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],ft=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],pi="\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65",dt="\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088F\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5C\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDC-\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7DC\uA7F1-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC",Ve={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"},De="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this",fi={5:De,"5module":De+" export import",6:De+" const class extends export import super"},mt=/^in(stanceof)?$/,di=new RegExp("["+dt+"]"),mi=new RegExp("["+dt+pi+"]");function Be(e,t){for(var i=65536,r=0;r<t.length;r+=2){if(i+=t[r],i>e)return false;if(i+=t[r+1],i>=e)return true}return false}function K(e,t){return e<65?e===36:e<91?true:e<97?e===95:e<123?true:e<=65535?e>=170&&di.test(String.fromCharCode(e)):t===false?false:Be(e,ft)}function $(e,t){return e<48?e===36:e<58?true:e<65?false:e<91?true:e<97?e===95:e<123?true:e<=65535?e>=170&&mi.test(String.fromCharCode(e)):t===false?false:Be(e,ft)||Be(e,li)}var _=function(t,i){i===void 0&&(i={}),this.label=t,this.keyword=i.keyword,this.beforeExpr=!!i.beforeExpr,this.startsExpr=!!i.startsExpr,this.isLoop=!!i.isLoop,this.isAssign=!!i.isAssign,this.prefix=!!i.prefix,this.postfix=!!i.postfix,this.binop=i.binop||null,this.updateContext=null;};function U(e,t){return new _(e,{beforeExpr:true,binop:t})}var B={beforeExpr:true},V={startsExpr:true},We={};function b(e,t){return t===void 0&&(t={}),t.keyword=e,We[e]=new _(e,t)}var a={num:new _("num",V),regexp:new _("regexp",V),string:new _("string",V),name:new _("name",V),privateId:new _("privateId",V),eof:new _("eof"),bracketL:new _("[",{beforeExpr:true,startsExpr:true}),bracketR:new _("]"),braceL:new _("{",{beforeExpr:true,startsExpr:true}),braceR:new _("}"),parenL:new _("(",{beforeExpr:true,startsExpr:true}),parenR:new _(")"),comma:new _(",",B),semi:new _(";",B),colon:new _(":",B),dot:new _("."),question:new _("?",B),questionDot:new _("?."),arrow:new _("=>",B),template:new _("template"),invalidTemplate:new _("invalidTemplate"),ellipsis:new _("...",B),backQuote:new _("`",V),dollarBraceL:new _("${",{beforeExpr:true,startsExpr:true}),eq:new _("=",{beforeExpr:true,isAssign:true}),assign:new _("_=",{beforeExpr:true,isAssign:true}),incDec:new _("++/--",{prefix:true,postfix:true,startsExpr:true}),prefix:new _("!/~",{beforeExpr:true,prefix:true,startsExpr:true}),logicalOR:U("||",1),logicalAND:U("&&",2),bitwiseOR:U("|",3),bitwiseXOR:U("^",4),bitwiseAND:U("&",5),equality:U("==/!=/===/!==",6),relational:U("</>/<=/>=",7),bitShift:U("<</>>/>>>",8),plusMin:new _("+/-",{beforeExpr:true,binop:9,prefix:true,startsExpr:true}),modulo:U("%",10),star:U("*",10),slash:U("/",10),starstar:new _("**",{beforeExpr:true}),coalesce:U("??",1),_break:b("break"),_case:b("case",B),_catch:b("catch"),_continue:b("continue"),_debugger:b("debugger"),_default:b("default",B),_do:b("do",{isLoop:true,beforeExpr:true}),_else:b("else",B),_finally:b("finally"),_for:b("for",{isLoop:true}),_function:b("function",V),_if:b("if"),_return:b("return",B),_switch:b("switch"),_throw:b("throw",B),_try:b("try"),_var:b("var"),_const:b("const"),_while:b("while",{isLoop:true}),_with:b("with"),_new:b("new",{beforeExpr:true,startsExpr:true}),_this:b("this",V),_super:b("super",V),_class:b("class",V),_extends:b("extends",B),_export:b("export"),_import:b("import",V),_null:b("null",V),_true:b("true",V),_false:b("false",V),_in:b("in",{beforeExpr:true,binop:7}),_instanceof:b("instanceof",{beforeExpr:true,binop:7}),_typeof:b("typeof",{beforeExpr:true,prefix:true,startsExpr:true}),_void:b("void",{beforeExpr:true,prefix:true,startsExpr:true}),_delete:b("delete",{beforeExpr:true,prefix:true,startsExpr:true})},D=/\r\n?|\n|\u2028|\u2029/,xi=new RegExp(D.source,"g");function oe(e){return e===10||e===13||e===8232||e===8233}function xt(e,t,i){i===void 0&&(i=e.length);for(var r=t;r<i;r++){var s=e.charCodeAt(r);if(oe(s))return r<i-1&&s===13&&e.charCodeAt(r+1)===10?r+2:r+1}return -1}var gt=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,T=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,yt=Object.prototype,gi=yt.hasOwnProperty,yi=yt.toString,ue=Object.hasOwn||(function(e,t){return gi.call(e,t)}),ut=Array.isArray||(function(e){return yi.call(e)==="[object Array]"}),ht=Object.create(null);function J(e){return ht[e]||(ht[e]=new RegExp("^(?:"+e.replace(/ /g,"|")+")$"))}function Q(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}var vi=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,de=function(t,i){this.line=t,this.column=i;};de.prototype.offset=function(t){return new de(this.line,this.column+t)};var Ae=function(t,i,r){this.start=i,this.end=r,t.sourceFile!==null&&(this.source=t.sourceFile);};function vt(e,t){for(var i=1,r=0;;){var s=xt(e,r,t);if(s<0)return new de(i,t-r);++i,r=s;}}var Me={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:false,allowImportExportEverywhere:false,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:false,checkPrivateFields:true,locations:false,onToken:null,onComment:null,ranges:false,program:null,sourceFile:null,directSourceFile:null,preserveParens:false},ct=false;function bi(e){var t={};for(var i in Me)t[i]=e&&ue(e,i)?e[i]:Me[i];if(t.ecmaVersion==="latest"?t.ecmaVersion=1e8:t.ecmaVersion==null?(!ct&&typeof console=="object"&&console.warn&&(ct=true,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
10
+ Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved==null&&(t.allowReserved=t.ecmaVersion<5),(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),ut(t.onToken)){var r=t.onToken;t.onToken=function(s){return r.push(s)};}if(ut(t.onComment)&&(t.onComment=_i(t,t.onComment)),t.sourceType==="commonjs"&&t.allowAwaitOutsideFunction)throw new Error("Cannot use allowAwaitOutsideFunction with sourceType: commonjs");return t}function _i(e,t){return function(i,r,s,n,o,u){var h={type:i?"Block":"Line",value:r,start:s,end:n};e.locations&&(h.loc=new Ae(this,o,u)),e.ranges&&(h.range=[s,n]),t.push(h);}}var re=1,se=2,qe=4,bt=8,Ge=16,_t=32,Ee=64,kt=128,ae=256,me=512,St=1024,Ce=re|se|ae;function He(e,t){return se|(e?qe:0)|(t?bt:0)}var be=0,Ke=1,Y=2,At=3,Et=4,Ct=5,R=function(t,i,r){this.options=t=bi(t),this.sourceFile=t.sourceFile,this.keywords=J(fi[t.ecmaVersion>=6?6:t.sourceType==="module"?"5module":5]);var s="";t.allowReserved!==true&&(s=Ve[t.ecmaVersion>=6?6:t.ecmaVersion===5?5:3],t.sourceType==="module"&&(s+=" await")),this.reservedWords=J(s);var n=(s?s+" ":"")+Ve.strict;this.reservedWordsStrict=J(n),this.reservedWordsStrictBind=J(n+" "+Ve.strictBind),this.input=String(i),this.containsEsc=false,r?(this.pos=r,this.lineStart=this.input.lastIndexOf(`
11
+ `,r-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(D).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=a.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=true,this.inModule=t.sourceType==="module",this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=false,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&t.allowHashBang&&this.input.slice(0,2)==="#!"&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(this.options.sourceType==="commonjs"?se:re),this.regexpState=null,this.privateNameStack=[];},F={inFunction:{configurable:true},inGenerator:{configurable:true},inAsync:{configurable:true},canAwait:{configurable:true},allowReturn:{configurable:true},allowSuper:{configurable:true},allowDirectSuper:{configurable:true},treatFunctionsAsVar:{configurable:true},allowNewDotTarget:{configurable:true},allowUsing:{configurable:true},inClassStaticBlock:{configurable:true}};R.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)};F.inFunction.get=function(){return (this.currentVarScope().flags&se)>0};F.inGenerator.get=function(){return (this.currentVarScope().flags&bt)>0};F.inAsync.get=function(){return (this.currentVarScope().flags&qe)>0};F.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],i=t.flags;if(i&(ae|me))return false;if(i&se)return (i&qe)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};F.allowReturn.get=function(){return !!(this.inFunction||this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&re)};F.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags;return (t&Ee)>0||this.options.allowSuperOutsideMethod};F.allowDirectSuper.get=function(){return (this.currentThisScope().flags&kt)>0};F.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};F.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e],i=t.flags;if(i&(ae|me)||i&se&&!(i&Ge))return true}return false};F.allowUsing.get=function(){var e=this.currentScope(),t=e.flags;return !(t&St||!this.inModule&&t&re)};F.inClassStaticBlock.get=function(){return (this.currentVarScope().flags&ae)>0};R.extend=function(){for(var t=[],i=arguments.length;i--;)t[i]=arguments[i];for(var r=this,s=0;s<t.length;s++)r=t[s](r);return r};R.parse=function(t,i){return new this(i,t).parse()};R.parseExpressionAt=function(t,i,r){var s=new this(r,t,i);return s.nextToken(),s.parseExpression()};R.tokenizer=function(t,i){return new this(i,t)};Object.defineProperties(R.prototype,F);var O=R.prototype,ki=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;O.strictDirective=function(e){if(this.options.ecmaVersion<5)return false;for(;;){T.lastIndex=e,e+=T.exec(this.input)[0].length;var t=ki.exec(this.input.slice(e));if(!t)return false;if((t[1]||t[2])==="use strict"){T.lastIndex=e+t[0].length;var i=T.exec(this.input),r=i.index+i[0].length,s=this.input.charAt(r);return s===";"||s==="}"||D.test(i[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(s)||s==="!"&&this.input.charAt(r+1)==="=")}e+=t[0].length,T.lastIndex=e,e+=T.exec(this.input)[0].length,this.input[e]===";"&&e++;}};O.eat=function(e){return this.type===e?(this.next(),true):false};O.isContextual=function(e){return this.type===a.name&&this.value===e&&!this.containsEsc};O.eatContextual=function(e){return this.isContextual(e)?(this.next(),true):false};O.expectContextual=function(e){this.eatContextual(e)||this.unexpected();};O.canInsertSemicolon=function(){return this.type===a.eof||this.type===a.braceR||D.test(this.input.slice(this.lastTokEnd,this.start))};O.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),true};O.semicolon=function(){!this.eat(a.semi)&&!this.insertSemicolon()&&this.unexpected();};O.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),true};O.expect=function(e){this.eat(e)||this.unexpected();};O.unexpected=function(e){this.raise(e??this.start,"Unexpected token");};var we=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1;};O.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var i=t?e.parenthesizedAssign:e.parenthesizedBind;i>-1&&this.raiseRecoverable(i,t?"Assigning to rvalue":"Parenthesized pattern");}};O.checkExpressionErrors=function(e,t){if(!e)return false;var i=e.shorthandAssign,r=e.doubleProto;if(!t)return i>=0||r>=0;i>=0&&this.raise(i,"Shorthand property assignments are valid only in destructuring patterns"),r>=0&&this.raiseRecoverable(r,"Redefinition of __proto__ property");};O.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,"Yield expression cannot be a default value"),this.awaitPos&&this.raise(this.awaitPos,"Await expression cannot be a default value");};O.isSimpleAssignTarget=function(e){return e.type==="ParenthesizedExpression"?this.isSimpleAssignTarget(e.expression):e.type==="Identifier"||e.type==="MemberExpression"};var f=R.prototype;f.parseTopLevel=function(e){var t=Object.create(null);for(e.body||(e.body=[]);this.type!==a.eof;){var i=this.parseStatement(null,true,t);e.body.push(i);}if(this.inModule)for(var r=0,s=Object.keys(this.undefinedExports);r<s.length;r+=1){var n=s[r];this.raiseRecoverable(this.undefinedExports[n].start,"Export '"+n+"' is not defined");}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType==="commonjs"?"script":this.options.sourceType,this.finishNode(e,"Program")};var ze={kind:"loop"},Si={kind:"switch"};f.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let"))return false;T.lastIndex=this.pos;var t=T.exec(this.input),i=this.pos+t[0].length,r=this.fullCharCodeAt(i);if(r===91||r===92)return true;if(e)return false;if(r===123)return true;if(K(r)){var s=i;do i+=r<=65535?1:2;while($(r=this.fullCharCodeAt(i)));if(r===92)return true;var n=this.input.slice(s,i);if(!mt.test(n))return true}return false};f.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return false;T.lastIndex=this.pos;var e=T.exec(this.input),t=this.pos+e[0].length,i;return !D.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!($(i=this.fullCharCodeAt(t+8))||i===92))};f.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?"await":"using"))return false;T.lastIndex=this.pos;var i=T.exec(this.input),r=this.pos+i[0].length;if(D.test(this.input.slice(this.pos,r)))return false;if(e){var s=r+5,n;if(this.input.slice(r,s)!=="using"||s===this.input.length||$(n=this.fullCharCodeAt(s))||n===92)return false;T.lastIndex=s;var o=T.exec(this.input);if(r=s+o[0].length,o&&D.test(this.input.slice(s,r)))return false}var u=this.fullCharCodeAt(r);if(!K(u)&&u!==92)return false;var h=r;do r+=u<=65535?1:2;while($(u=this.fullCharCodeAt(r)));if(u===92)return true;var c=this.input.slice(h,r);return !(mt.test(c)||t&&c==="of")};f.isAwaitUsing=function(e){return this.isUsingKeyword(true,e)};f.isUsing=function(e){return this.isUsingKeyword(false,e)};f.parseStatement=function(e,t,i){var r=this.type,s=this.startNode(),n;switch(this.isLet(e)&&(r=a._var,n="let"),r){case a._break:case a._continue:return this.parseBreakContinueStatement(s,r.keyword);case a._debugger:return this.parseDebuggerStatement(s);case a._do:return this.parseDoStatement(s);case a._for:return this.parseForStatement(s);case a._function:return e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(s,false,!e);case a._class:return e&&this.unexpected(),this.parseClass(s,true);case a._if:return this.parseIfStatement(s);case a._return:return this.parseReturnStatement(s);case a._switch:return this.parseSwitchStatement(s);case a._throw:return this.parseThrowStatement(s);case a._try:return this.parseTryStatement(s);case a._const:case a._var:return n=n||this.value,e&&n!=="var"&&this.unexpected(),this.parseVarStatement(s,n);case a._while:return this.parseWhileStatement(s);case a._with:return this.parseWithStatement(s);case a.braceL:return this.parseBlock(true,s);case a.semi:return this.parseEmptyStatement(s);case a._export:case a._import:if(this.options.ecmaVersion>10&&r===a._import){T.lastIndex=this.pos;var o=T.exec(this.input),u=this.pos+o[0].length,h=this.input.charCodeAt(u);if(h===40||h===46)return this.parseExpressionStatement(s,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),r===a._import?this.parseImport(s):this.parseExport(s,i);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(s,true,!e);var c=this.isAwaitUsing(false)?"await using":this.isUsing(false)?"using":null;if(c)return this.allowUsing||this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"),c==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.next(),this.parseVar(s,false,c),this.semicolon(),this.finishNode(s,"VariableDeclaration");var l=this.value,g=this.parseExpression();return r===a.name&&g.type==="Identifier"&&this.eat(a.colon)?this.parseLabeledStatement(s,l,g,e):this.parseExpressionStatement(s,g)}};f.parseBreakContinueStatement=function(e,t){var i=t==="break";this.next(),this.eat(a.semi)||this.insertSemicolon()?e.label=null:this.type!==a.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var r=0;r<this.labels.length;++r){var s=this.labels[r];if((e.label==null||s.name===e.label.name)&&(s.kind!=null&&(i||s.kind==="loop")||e.label&&i))break}return r===this.labels.length&&this.raise(e.start,"Unsyntactic "+t),this.finishNode(e,i?"BreakStatement":"ContinueStatement")};f.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,"DebuggerStatement")};f.parseDoStatement=function(e){return this.next(),this.labels.push(ze),e.body=this.parseStatement("do"),this.labels.pop(),this.expect(a._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(a.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")};f.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(ze),this.enterScope(0),this.expect(a.parenL),this.type===a.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var i=this.isLet();if(this.type===a._var||this.type===a._const||i){var r=this.startNode(),s=i?"let":this.value;return this.next(),this.parseVar(r,true,s),this.finishNode(r,"VariableDeclaration"),this.parseForAfterInit(e,r,t)}var n=this.isContextual("let"),o=false,u=this.isUsing(true)?"using":this.isAwaitUsing(true)?"await using":null;if(u){var h=this.startNode();return this.next(),u==="await using"&&(this.canAwait||this.raise(this.start,"Await using cannot appear outside of async function"),this.next()),this.parseVar(h,true,u),this.finishNode(h,"VariableDeclaration"),this.parseForAfterInit(e,h,t)}var c=this.containsEsc,l=new we,g=this.start,E=t>-1?this.parseExprSubscripts(l,"await"):this.parseExpression(true,l);return this.type===a._in||(o=this.options.ecmaVersion>=6&&this.isContextual("of"))?(t>-1?(this.type===a._in&&this.unexpected(t),e.await=true):o&&this.options.ecmaVersion>=8&&(E.start===g&&!c&&E.type==="Identifier"&&E.name==="async"?this.unexpected():this.options.ecmaVersion>=9&&(e.await=false)),n&&o&&this.raise(E.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(E,false,l),this.checkLValPattern(E),this.parseForIn(e,E)):(this.checkExpressionErrors(l,true),t>-1&&this.unexpected(t),this.parseFor(e,E))};f.parseForAfterInit=function(e,t,i){return (this.type===a._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&t.declarations.length===1?(this.options.ecmaVersion>=9&&(this.type===a._in?i>-1&&this.unexpected(i):e.await=i>-1),this.parseForIn(e,t)):(i>-1&&this.unexpected(i),this.parseFor(e,t))};f.parseFunctionStatement=function(e,t,i){return this.next(),this.parseFunction(e,fe|(i?0:Fe),false,t)};f.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(a._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")};f.parseReturnStatement=function(e){return this.allowReturn||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(a.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")};f.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(a.braceL),this.labels.push(Si),this.enterScope(St);for(var t,i=false;this.type!==a.braceR;)if(this.type===a._case||this.type===a._default){var r=this.type===a._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r?t.test=this.parseExpression():(i&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),i=true,t.test=null),this.expect(a.colon);}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")};f.parseThrowStatement=function(e){return this.next(),D.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var Ai=[];f.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type==="Identifier";return this.enterScope(t?_t:0),this.checkLValPattern(e,t?Et:Y),this.expect(a.parenR),e};f.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===a._catch){var t=this.startNode();this.next(),this.eat(a.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(false),this.exitScope(),e.handler=this.finishNode(t,"CatchClause");}return e.finalizer=this.eat(a._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")};f.parseVarStatement=function(e,t,i){return this.next(),this.parseVar(e,false,t,i),this.semicolon(),this.finishNode(e,"VariableDeclaration")};f.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(ze),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")};f.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")};f.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")};f.parseLabeledStatement=function(e,t,i,r){for(var s=0,n=this.labels;s<n.length;s+=1){var o=n[s];o.name===t&&this.raise(i.start,"Label '"+t+"' is already declared");}for(var u=this.type.isLoop?"loop":this.type===a._switch?"switch":null,h=this.labels.length-1;h>=0;h--){var c=this.labels[h];if(c.statementStart===e.start)c.statementStart=this.start,c.kind=u;else break}return this.labels.push({name:t,kind:u,statementStart:this.start}),e.body=this.parseStatement(r?r.indexOf("label")===-1?r+"label":r:"label"),this.labels.pop(),e.label=i,this.finishNode(e,"LabeledStatement")};f.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")};f.parseBlock=function(e,t,i){for(e===void 0&&(e=true),t===void 0&&(t=this.startNode()),t.body=[],this.expect(a.braceL),e&&this.enterScope(0);this.type!==a.braceR;){var r=this.parseStatement(null);t.body.push(r);}return i&&(this.strict=false),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")};f.parseFor=function(e,t){return e.init=t,this.expect(a.semi),e.test=this.type===a.semi?null:this.parseExpression(),this.expect(a.semi),e.update=this.type===a.parenR?null:this.parseExpression(),this.expect(a.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")};f.parseForIn=function(e,t){var i=this.type===a._in;return this.next(),t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!i||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")&&this.raise(t.start,(i?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=i?this.parseExpression():this.parseMaybeAssign(),this.expect(a.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,i?"ForInStatement":"ForOfStatement")};f.parseVar=function(e,t,i,r){for(e.declarations=[],e.kind=i;;){var s=this.startNode();if(this.parseVarId(s,i),this.eat(a.eq)?s.init=this.parseMaybeAssign(t):!r&&i==="const"&&!(this.type===a._in||this.options.ecmaVersion>=6&&this.isContextual("of"))?this.unexpected():!r&&(i==="using"||i==="await using")&&this.options.ecmaVersion>=17&&this.type!==a._in&&!this.isContextual("of")?this.raise(this.lastTokEnd,"Missing initializer in "+i+" declaration"):!r&&s.id.type!=="Identifier"&&!(t&&(this.type===a._in||this.isContextual("of")))?this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):s.init=null,e.declarations.push(this.finishNode(s,"VariableDeclarator")),!this.eat(a.comma))break}return e};f.parseVarId=function(e,t){e.id=t==="using"||t==="await using"?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,t==="var"?Ke:Y,false);};var fe=1,Fe=2,wt=4;f.parseFunction=function(e,t,i,r,s){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===a.star&&t&Fe&&this.unexpected(),e.generator=this.eat(a.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&fe&&(e.id=t&wt&&this.type!==a.name?null:this.parseIdent(),e.id&&!(t&Fe)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?Ke:Y:At));var n=this.yieldPos,o=this.awaitPos,u=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(He(e.async,e.generator)),t&fe||(e.id=this.type===a.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,i,false,s),this.yieldPos=n,this.awaitPos=o,this.awaitIdentPos=u,this.finishNode(e,t&fe?"FunctionDeclaration":"FunctionExpression")};f.parseFunctionParams=function(e){this.expect(a.parenL),e.params=this.parseBindingList(a.parenR,false,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams();};f.parseClass=function(e,t){this.next();var i=this.strict;this.strict=true,this.parseClassId(e,t),this.parseClassSuper(e);var r=this.enterClassBody(),s=this.startNode(),n=false;for(s.body=[],this.expect(a.braceL);this.type!==a.braceR;){var o=this.parseClassElement(e.superClass!==null);o&&(s.body.push(o),o.type==="MethodDefinition"&&o.kind==="constructor"?(n&&this.raiseRecoverable(o.start,"Duplicate constructor in the same class"),n=true):o.key&&o.key.type==="PrivateIdentifier"&&Ei(r,o)&&this.raiseRecoverable(o.key.start,"Identifier '#"+o.key.name+"' has already been declared"));}return this.strict=i,this.next(),e.body=this.finishNode(s,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};f.parseClassElement=function(e){if(this.eat(a.semi))return null;var t=this.options.ecmaVersion,i=this.startNode(),r="",s=false,n=false,o="method",u=false;if(this.eatContextual("static")){if(t>=13&&this.eat(a.braceL))return this.parseClassStaticBlock(i),i;this.isClassElementNameStart()||this.type===a.star?u=true:r="static";}if(i.static=u,!r&&t>=8&&this.eatContextual("async")&&((this.isClassElementNameStart()||this.type===a.star)&&!this.canInsertSemicolon()?n=true:r="async"),!r&&(t>=9||!n)&&this.eat(a.star)&&(s=true),!r&&!n&&!s){var h=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?o=h:r=h);}if(r?(i.computed=false,i.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),i.key.name=r,this.finishNode(i.key,"Identifier")):this.parseClassElementName(i),t<13||this.type===a.parenL||o!=="method"||s||n){var c=!i.static&&_e(i,"constructor"),l=c&&e;c&&o!=="method"&&this.raise(i.key.start,"Constructor can't have get/set modifier"),i.kind=c?"constructor":o,this.parseClassMethod(i,s,n,l);}else this.parseClassField(i);return i};f.isClassElementNameStart=function(){return this.type===a.name||this.type===a.privateId||this.type===a.num||this.type===a.string||this.type===a.bracketL||this.type.keyword};f.parseClassElementName=function(e){this.type===a.privateId?(this.value==="constructor"&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=false,e.key=this.parsePrivateIdent()):this.parsePropertyName(e);};f.parseClassMethod=function(e,t,i,r){var s=e.key;e.kind==="constructor"?(t&&this.raise(s.start,"Constructor can't be a generator"),i&&this.raise(s.start,"Constructor can't be an async method")):e.static&&_e(e,"prototype")&&this.raise(s.start,"Classes may not have a static property named prototype");var n=e.value=this.parseMethod(t,i,r);return e.kind==="get"&&n.params.length!==0&&this.raiseRecoverable(n.start,"getter should have no params"),e.kind==="set"&&n.params.length!==1&&this.raiseRecoverable(n.start,"setter should have exactly one param"),e.kind==="set"&&n.params[0].type==="RestElement"&&this.raiseRecoverable(n.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")};f.parseClassField=function(e){return _e(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&_e(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(a.eq)?(this.enterScope(me|Ee),e.value=this.parseMaybeAssign(),this.exitScope()):e.value=null,this.semicolon(),this.finishNode(e,"PropertyDefinition")};f.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(ae|Ee);this.type!==a.braceR;){var i=this.parseStatement(null);e.body.push(i);}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")};f.parseClassId=function(e,t){this.type===a.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,Y,false)):(t===true&&this.unexpected(),e.id=null);};f.parseClassSuper=function(e){e.superClass=this.eat(a._extends)?this.parseExprSubscripts(null,false):null;};f.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared};f.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,i=e.used;if(this.options.checkPrivateFields)for(var r=this.privateNameStack.length,s=r===0?null:this.privateNameStack[r-1],n=0;n<i.length;++n){var o=i[n];ue(t,o.name)||(s?s.used.push(o):this.raiseRecoverable(o.start,"Private field '#"+o.name+"' must be declared in an enclosing class"));}};function Ei(e,t){var i=t.key.name,r=e[i],s="true";return t.type==="MethodDefinition"&&(t.kind==="get"||t.kind==="set")&&(s=(t.static?"s":"i")+t.kind),r==="iget"&&s==="iset"||r==="iset"&&s==="iget"||r==="sget"&&s==="sset"||r==="sset"&&s==="sget"?(e[i]="true",false):r?true:(e[i]=s,false)}function _e(e,t){var i=e.computed,r=e.key;return !i&&(r.type==="Identifier"&&r.name===t||r.type==="Literal"&&r.value===t)}f.parseExportAllDeclaration=function(e,t){return this.options.ecmaVersion>=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==a.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")};f.parseExport=function(e,t){if(this.next(),this.eat(a.star))return this.parseExportAllDeclaration(e,t);if(this.eat(a._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type==="VariableDeclaration"?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[]);else {if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==a.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause());else {for(var i=0,r=e.specifiers;i<r.length;i+=1){var s=r[i];this.checkUnreserved(s.local),this.checkLocalExport(s.local),s.local.type==="Literal"&&this.raise(s.local.start,"A string literal cannot be used as an exported binding without `from`.");}e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[]);}this.semicolon();}return this.finishNode(e,"ExportNamedDeclaration")};f.parseExportDeclaration=function(e){return this.parseStatement(null)};f.parseExportDefaultDeclaration=function(){var e;if(this.type===a._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,fe|wt,false,e)}else if(this.type===a._class){var i=this.startNode();return this.parseClass(i,"nullableID")}else {var r=this.parseMaybeAssign();return this.semicolon(),r}};f.checkExport=function(e,t,i){e&&(typeof t!="string"&&(t=t.type==="Identifier"?t.name:t.value),ue(e,t)&&this.raiseRecoverable(i,"Duplicate export '"+t+"'"),e[t]=true);};f.checkPatternExport=function(e,t){var i=t.type;if(i==="Identifier")this.checkExport(e,t,t.start);else if(i==="ObjectPattern")for(var r=0,s=t.properties;r<s.length;r+=1){var n=s[r];this.checkPatternExport(e,n);}else if(i==="ArrayPattern")for(var o=0,u=t.elements;o<u.length;o+=1){var h=u[o];h&&this.checkPatternExport(e,h);}else i==="Property"?this.checkPatternExport(e,t.value):i==="AssignmentPattern"?this.checkPatternExport(e,t.left):i==="RestElement"&&this.checkPatternExport(e,t.argument);};f.checkVariableExport=function(e,t){if(e)for(var i=0,r=t;i<r.length;i+=1){var s=r[i];this.checkPatternExport(e,s.id);}};f.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()};f.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual("as")?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,"ExportSpecifier")};f.parseExportSpecifiers=function(e){var t=[],i=true;for(this.expect(a.braceL);!this.eat(a.braceR);){if(i)i=false;else if(this.expect(a.comma),this.afterTrailingComma(a.braceR))break;t.push(this.parseExportSpecifier(e));}return t};f.parseImport=function(e){return this.next(),this.type===a.string?(e.specifiers=Ai,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual("from"),e.source=this.type===a.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,"ImportDeclaration")};f.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual("as")?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,Y),this.finishNode(e,"ImportSpecifier")};f.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,Y),this.finishNode(e,"ImportDefaultSpecifier")};f.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual("as"),e.local=this.parseIdent(),this.checkLValSimple(e.local,Y),this.finishNode(e,"ImportNamespaceSpecifier")};f.parseImportSpecifiers=function(){var e=[],t=true;if(this.type===a.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(a.comma)))return e;if(this.type===a.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(a.braceL);!this.eat(a.braceR);){if(t)t=false;else if(this.expect(a.comma),this.afterTrailingComma(a.braceR))break;e.push(this.parseImportSpecifier());}return e};f.parseWithClause=function(){var e=[];if(!this.eat(a._with))return e;this.expect(a.braceL);for(var t={},i=true;!this.eat(a.braceR);){if(i)i=false;else if(this.expect(a.comma),this.afterTrailingComma(a.braceR))break;var r=this.parseImportAttribute(),s=r.key.type==="Identifier"?r.key.name:r.key.value;ue(t,s)&&this.raiseRecoverable(r.key.start,"Duplicate attribute key '"+s+"'"),t[s]=true,e.push(r);}return e};f.parseImportAttribute=function(){var e=this.startNode();return e.key=this.type===a.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never"),this.expect(a.colon),this.type!==a.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,"ImportAttribute")};f.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===a.string){var e=this.parseLiteral(this.value);return vi.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(true)};f.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1);};f.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value=="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var j=R.prototype;j.toAssignable=function(e,t,i){if(this.options.ecmaVersion>=6&&e)switch(e.type){case "Identifier":this.inAsync&&e.name==="await"&&this.raise(e.start,"Cannot use 'await' as identifier inside an async function");break;case "ObjectPattern":case "ArrayPattern":case "AssignmentPattern":case "RestElement":break;case "ObjectExpression":e.type="ObjectPattern",i&&this.checkPatternErrors(i,true);for(var r=0,s=e.properties;r<s.length;r+=1){var n=s[r];this.toAssignable(n,t),n.type==="RestElement"&&(n.argument.type==="ArrayPattern"||n.argument.type==="ObjectPattern")&&this.raise(n.argument.start,"Unexpected token");}break;case "Property":e.kind!=="init"&&this.raise(e.key.start,"Object pattern can't contain getter or setter"),this.toAssignable(e.value,t);break;case "ArrayExpression":e.type="ArrayPattern",i&&this.checkPatternErrors(i,true),this.toAssignableList(e.elements,t);break;case "SpreadElement":e.type="RestElement",this.toAssignable(e.argument,t),e.argument.type==="AssignmentPattern"&&this.raise(e.argument.start,"Rest elements cannot have a default value");break;case "AssignmentExpression":e.operator!=="="&&this.raise(e.left.end,"Only '=' operator can be used for specifying default value."),e.type="AssignmentPattern",delete e.operator,this.toAssignable(e.left,t);break;case "ParenthesizedExpression":this.toAssignable(e.expression,t,i);break;case "ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case "MemberExpression":if(!t)break;default:this.raise(e.start,"Assigning to rvalue");}else i&&this.checkPatternErrors(i,true);return e};j.toAssignableList=function(e,t){for(var i=e.length,r=0;r<i;r++){var s=e[r];s&&this.toAssignable(s,t);}if(i){var n=e[i-1];this.options.ecmaVersion===6&&t&&n&&n.type==="RestElement"&&n.argument.type!=="Identifier"&&this.unexpected(n.argument.start);}return e};j.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(false,e),this.finishNode(t,"SpreadElement")};j.parseRestBinding=function(){var e=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==a.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,"RestElement")};j.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case a.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(a.bracketR,true,true),this.finishNode(e,"ArrayPattern");case a.braceL:return this.parseObj(true)}return this.parseIdent()};j.parseBindingList=function(e,t,i,r){for(var s=[],n=true;!this.eat(e);)if(n?n=false:this.expect(a.comma),t&&this.type===a.comma)s.push(null);else {if(i&&this.afterTrailingComma(e))break;if(this.type===a.ellipsis){var o=this.parseRestBinding();this.parseBindingListItem(o),s.push(o),this.type===a.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}else s.push(this.parseAssignableListItem(r));}return s};j.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t};j.parseBindingListItem=function(e){return e};j.parseMaybeDefault=function(e,t,i){if(i=i||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(a.eq))return i;var r=this.startNodeAt(e,t);return r.left=i,r.right=this.parseMaybeAssign(),this.finishNode(r,"AssignmentPattern")};j.checkLValSimple=function(e,t,i){t===void 0&&(t=be);var r=t!==be;switch(e.type){case "Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(r?"Binding ":"Assigning to ")+e.name+" in strict mode"),r&&(t===Y&&e.name==="let"&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),i&&(ue(i,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),i[e.name]=true),t!==Ct&&this.declareName(e.name,t,e.start));break;case "ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case "MemberExpression":r&&this.raiseRecoverable(e.start,"Binding member expression");break;case "ParenthesizedExpression":return r&&this.raiseRecoverable(e.start,"Binding parenthesized expression"),this.checkLValSimple(e.expression,t,i);default:this.raise(e.start,(r?"Binding":"Assigning to")+" rvalue");}};j.checkLValPattern=function(e,t,i){switch(t===void 0&&(t=be),e.type){case "ObjectPattern":for(var r=0,s=e.properties;r<s.length;r+=1){var n=s[r];this.checkLValInnerPattern(n,t,i);}break;case "ArrayPattern":for(var o=0,u=e.elements;o<u.length;o+=1){var h=u[o];h&&this.checkLValInnerPattern(h,t,i);}break;default:this.checkLValSimple(e,t,i);}};j.checkLValInnerPattern=function(e,t,i){switch(t===void 0&&(t=be),e.type){case "Property":this.checkLValInnerPattern(e.value,t,i);break;case "AssignmentPattern":this.checkLValPattern(e.left,t,i);break;case "RestElement":this.checkLValPattern(e.argument,t,i);break;default:this.checkLValPattern(e,t,i);}};var q=function(t,i,r,s,n){this.token=t,this.isExpr=!!i,this.preserveSpace=!!r,this.override=s,this.generator=!!n;},C={b_stat:new q("{",false),b_expr:new q("{",true),b_tmpl:new q("${",false),p_stat:new q("(",false),p_expr:new q("(",true),q_tmpl:new q("`",true,true,function(e){return e.tryReadTemplateToken()}),f_stat:new q("function",false),f_expr:new q("function",true),f_expr_gen:new q("function",true,false,null,true),f_gen:new q("function",false,false,null,true)},he=R.prototype;he.initialContext=function(){return [C.b_stat]};he.curContext=function(){return this.context[this.context.length-1]};he.braceIsBlock=function(e){var t=this.curContext();return t===C.f_expr||t===C.f_stat?true:e===a.colon&&(t===C.b_stat||t===C.b_expr)?!t.isExpr:e===a._return||e===a.name&&this.exprAllowed?D.test(this.input.slice(this.lastTokEnd,this.start)):e===a._else||e===a.semi||e===a.eof||e===a.parenR||e===a.arrow?true:e===a.braceL?t===C.b_stat:e===a._var||e===a._const||e===a.name?false:!this.exprAllowed};he.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token==="function")return t.generator}return false};he.updateContext=function(e){var t,i=this.type;i.keyword&&e===a.dot?this.exprAllowed=false:(t=i.updateContext)?t.call(this,e):this.exprAllowed=i.beforeExpr;};he.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e);};a.parenR.updateContext=a.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=true;return}var e=this.context.pop();e===C.b_stat&&this.curContext().token==="function"&&(e=this.context.pop()),this.exprAllowed=!e.isExpr;};a.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?C.b_stat:C.b_expr),this.exprAllowed=true;};a.dollarBraceL.updateContext=function(){this.context.push(C.b_tmpl),this.exprAllowed=true;};a.parenL.updateContext=function(e){var t=e===a._if||e===a._for||e===a._with||e===a._while;this.context.push(t?C.p_stat:C.p_expr),this.exprAllowed=true;};a.incDec.updateContext=function(){};a._function.updateContext=a._class.updateContext=function(e){e.beforeExpr&&e!==a._else&&!(e===a.semi&&this.curContext()!==C.p_stat)&&!(e===a._return&&D.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===a.colon||e===a.braceL)&&this.curContext()===C.b_stat)?this.context.push(C.f_expr):this.context.push(C.f_stat),this.exprAllowed=false;};a.colon.updateContext=function(){this.curContext().token==="function"&&this.context.pop(),this.exprAllowed=true;};a.backQuote.updateContext=function(){this.curContext()===C.q_tmpl?this.context.pop():this.context.push(C.q_tmpl),this.exprAllowed=false;};a.star.updateContext=function(e){if(e===a._function){var t=this.context.length-1;this.context[t]===C.f_expr?this.context[t]=C.f_expr_gen:this.context[t]=C.f_gen;}this.exprAllowed=true;};a.name.updateContext=function(e){var t=false;this.options.ecmaVersion>=6&&e!==a.dot&&(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext())&&(t=true),this.exprAllowed=t;};var m=R.prototype;m.checkPropClash=function(e,t,i){if(!(this.options.ecmaVersion>=9&&e.type==="SpreadElement")&&!(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var r=e.key,s;switch(r.type){case "Identifier":s=r.name;break;case "Literal":s=String(r.value);break;default:return}var n=e.kind;if(this.options.ecmaVersion>=6){s==="__proto__"&&n==="init"&&(t.proto&&(i?i.doubleProto<0&&(i.doubleProto=r.start):this.raiseRecoverable(r.start,"Redefinition of __proto__ property")),t.proto=true);return}s="$"+s;var o=t[s];if(o){var u;n==="init"?u=this.strict&&o.init||o.get||o.set:u=o.init||o[n],u&&this.raiseRecoverable(r.start,"Redefinition of property");}else o=t[s]={init:false,get:false,set:false};o[n]=true;}};m.parseExpression=function(e,t){var i=this.start,r=this.startLoc,s=this.parseMaybeAssign(e,t);if(this.type===a.comma){var n=this.startNodeAt(i,r);for(n.expressions=[s];this.eat(a.comma);)n.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(n,"SequenceExpression")}return s};m.parseMaybeAssign=function(e,t,i){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=false;}var r=false,s=-1,n=-1,o=-1;t?(s=t.parenthesizedAssign,n=t.trailingComma,o=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new we,r=true);var u=this.start,h=this.startLoc;(this.type===a.parenL||this.type===a.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e==="await");var c=this.parseMaybeConditional(e,t);if(i&&(c=i.call(this,c,u,h)),this.type.isAssign){var l=this.startNodeAt(u,h);return l.operator=this.value,this.type===a.eq&&(c=this.toAssignable(c,false,t)),r||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=c.start&&(t.shorthandAssign=-1),this.type===a.eq?this.checkLValPattern(c):this.checkLValSimple(c),l.left=c,this.next(),l.right=this.parseMaybeAssign(e),o>-1&&(t.doubleProto=o),this.finishNode(l,"AssignmentExpression")}else r&&this.checkExpressionErrors(t,true);return s>-1&&(t.parenthesizedAssign=s),n>-1&&(t.trailingComma=n),c};m.parseMaybeConditional=function(e,t){var i=this.start,r=this.startLoc,s=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return s;if(this.eat(a.question)){var n=this.startNodeAt(i,r);return n.test=s,n.consequent=this.parseMaybeAssign(),this.expect(a.colon),n.alternate=this.parseMaybeAssign(e),this.finishNode(n,"ConditionalExpression")}return s};m.parseExprOps=function(e,t){var i=this.start,r=this.startLoc,s=this.parseMaybeUnary(t,false,false,e);return this.checkExpressionErrors(t)||s.start===i&&s.type==="ArrowFunctionExpression"?s:this.parseExprOp(s,i,r,-1,e)};m.parseExprOp=function(e,t,i,r,s){var n=this.type.binop;if(n!=null&&(!s||this.type!==a._in)&&n>r){var o=this.type===a.logicalOR||this.type===a.logicalAND,u=this.type===a.coalesce;u&&(n=a.logicalAND.binop);var h=this.value;this.next();var c=this.start,l=this.startLoc,g=this.parseExprOp(this.parseMaybeUnary(null,false,false,s),c,l,n,s),E=this.buildBinary(t,i,e,g,h,o||u);return (o&&this.type===a.coalesce||u&&(this.type===a.logicalOR||this.type===a.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(E,t,i,r,s)}return e};m.buildBinary=function(e,t,i,r,s,n){r.type==="PrivateIdentifier"&&this.raise(r.start,"Private identifier can only be left side of binary expression");var o=this.startNodeAt(e,t);return o.left=i,o.operator=s,o.right=r,this.finishNode(o,n?"LogicalExpression":"BinaryExpression")};m.parseMaybeUnary=function(e,t,i,r){var s=this.start,n=this.startLoc,o;if(this.isContextual("await")&&this.canAwait)o=this.parseAwait(r),t=true;else if(this.type.prefix){var u=this.startNode(),h=this.type===a.incDec;u.operator=this.value,u.prefix=true,this.next(),u.argument=this.parseMaybeUnary(null,true,h,r),this.checkExpressionErrors(e,true),h?this.checkLValSimple(u.argument):this.strict&&u.operator==="delete"&&It(u.argument)?this.raiseRecoverable(u.start,"Deleting local variable in strict mode"):u.operator==="delete"&&je(u.argument)?this.raiseRecoverable(u.start,"Private fields can not be deleted"):t=true,o=this.finishNode(u,h?"UpdateExpression":"UnaryExpression");}else if(!t&&this.type===a.privateId)(r||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),o=this.parsePrivateIdent(),this.type!==a._in&&this.unexpected();else {if(o=this.parseExprSubscripts(e,r),this.checkExpressionErrors(e))return o;for(;this.type.postfix&&!this.canInsertSemicolon();){var c=this.startNodeAt(s,n);c.operator=this.value,c.prefix=false,c.argument=o,this.checkLValSimple(o),this.next(),o=this.finishNode(c,"UpdateExpression");}}if(!i&&this.eat(a.starstar))if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(s,n,o,this.parseMaybeUnary(null,false,false,r),"**",false);else return o};function It(e){return e.type==="Identifier"||e.type==="ParenthesizedExpression"&&It(e.expression)}function je(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&je(e.expression)||e.type==="ParenthesizedExpression"&&je(e.expression)}m.parseExprSubscripts=function(e,t){var i=this.start,r=this.startLoc,s=this.parseExprAtom(e,t);if(s.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")")return s;var n=this.parseSubscripts(s,i,r,false,t);return e&&n.type==="MemberExpression"&&(e.parenthesizedAssign>=n.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=n.start&&(e.parenthesizedBind=-1),e.trailingComma>=n.start&&(e.trailingComma=-1)),n};m.parseSubscripts=function(e,t,i,r,s){for(var n=this.options.ecmaVersion>=8&&e.type==="Identifier"&&e.name==="async"&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start,o=false;;){var u=this.parseSubscript(e,t,i,r,n,o,s);if(u.optional&&(o=true),u===e||u.type==="ArrowFunctionExpression"){if(o){var h=this.startNodeAt(t,i);h.expression=u,u=this.finishNode(h,"ChainExpression");}return u}e=u;}};m.shouldParseAsyncArrow=function(){return !this.canInsertSemicolon()&&this.eat(a.arrow)};m.parseSubscriptAsyncArrow=function(e,t,i,r){return this.parseArrowExpression(this.startNodeAt(e,t),i,true,r)};m.parseSubscript=function(e,t,i,r,s,n,o){var u=this.options.ecmaVersion>=11,h=u&&this.eat(a.questionDot);r&&h&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var c=this.eat(a.bracketL);if(c||h&&this.type!==a.parenL&&this.type!==a.backQuote||this.eat(a.dot)){var l=this.startNodeAt(t,i);l.object=e,c?(l.property=this.parseExpression(),this.expect(a.bracketR)):this.type===a.privateId&&e.type!=="Super"?l.property=this.parsePrivateIdent():l.property=this.parseIdent(this.options.allowReserved!=="never"),l.computed=!!c,u&&(l.optional=h),e=this.finishNode(l,"MemberExpression");}else if(!r&&this.eat(a.parenL)){var g=new we,E=this.yieldPos,y=this.awaitPos,x=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var S=this.parseExprList(a.parenR,this.options.ecmaVersion>=8,false,g);if(s&&!h&&this.shouldParseAsyncArrow())return this.checkPatternErrors(g,false),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=E,this.awaitPos=y,this.awaitIdentPos=x,this.parseSubscriptAsyncArrow(t,i,S,o);this.checkExpressionErrors(g,true),this.yieldPos=E||this.yieldPos,this.awaitPos=y||this.awaitPos,this.awaitIdentPos=x||this.awaitIdentPos;var I=this.startNodeAt(t,i);I.callee=e,I.arguments=S,u&&(I.optional=h),e=this.finishNode(I,"CallExpression");}else if(this.type===a.backQuote){(h||n)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var N=this.startNodeAt(t,i);N.tag=e,N.quasi=this.parseTemplate({isTagged:true}),e=this.finishNode(N,"TaggedTemplateExpression");}return e};m.parseExprAtom=function(e,t,i){this.type===a.slash&&this.readRegexp();var r,s=this.potentialArrowAt===this.start;switch(this.type){case a._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),r=this.startNode(),this.next(),this.type===a.parenL&&!this.allowDirectSuper&&this.raise(r.start,"super() call outside constructor of a subclass"),this.type!==a.dot&&this.type!==a.bracketL&&this.type!==a.parenL&&this.unexpected(),this.finishNode(r,"Super");case a._this:return r=this.startNode(),this.next(),this.finishNode(r,"ThisExpression");case a.name:var n=this.start,o=this.startLoc,u=this.containsEsc,h=this.parseIdent(false);if(this.options.ecmaVersion>=8&&!u&&h.name==="async"&&!this.canInsertSemicolon()&&this.eat(a._function))return this.overrideContext(C.f_expr),this.parseFunction(this.startNodeAt(n,o),0,false,true,t);if(s&&!this.canInsertSemicolon()){if(this.eat(a.arrow))return this.parseArrowExpression(this.startNodeAt(n,o),[h],false,t);if(this.options.ecmaVersion>=8&&h.name==="async"&&this.type===a.name&&!u&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc))return h=this.parseIdent(false),(this.canInsertSemicolon()||!this.eat(a.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(n,o),[h],true,t)}return h;case a.regexp:var c=this.value;return r=this.parseLiteral(c.value),r.regex={pattern:c.pattern,flags:c.flags},r;case a.num:case a.string:return this.parseLiteral(this.value);case a._null:case a._true:case a._false:return r=this.startNode(),r.value=this.type===a._null?null:this.type===a._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,"Literal");case a.parenL:var l=this.start,g=this.parseParenAndDistinguishExpression(s,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(g)&&(e.parenthesizedAssign=l),e.parenthesizedBind<0&&(e.parenthesizedBind=l)),g;case a.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(a.bracketR,true,true,e),this.finishNode(r,"ArrayExpression");case a.braceL:return this.overrideContext(C.b_expr),this.parseObj(false,e);case a._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case a._class:return this.parseClass(this.startNode(),false);case a._new:return this.parseNew();case a.backQuote:return this.parseTemplate();case a._import:return this.options.ecmaVersion>=11?this.parseExprImport(i):this.unexpected();default:return this.parseExprAtomDefault()}};m.parseExprAtomDefault=function(){this.unexpected();};m.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===a.parenL&&!e)return this.parseDynamicImport(t);if(this.type===a.dot){var i=this.startNodeAt(t.start,t.loc&&t.loc.start);return i.name="import",t.meta=this.finishNode(i,"Identifier"),this.parseImportMeta(t)}else this.unexpected();};m.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(a.parenR)?e.options=null:(this.expect(a.comma),this.afterTrailingComma(a.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),this.eat(a.parenR)||(this.expect(a.comma),this.afterTrailingComma(a.parenR)||this.unexpected())));else if(!this.eat(a.parenR)){var t=this.start;this.eat(a.comma)&&this.eat(a.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t);}return this.finishNode(e,"ImportExpression")};m.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(true),e.property.name!=="meta"&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")};m.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.value!=null?t.value.toString():t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")};m.parseParenExpression=function(){this.expect(a.parenL);var e=this.parseExpression();return this.expect(a.parenR),e};m.shouldParseArrow=function(e){return !this.canInsertSemicolon()};m.parseParenAndDistinguishExpression=function(e,t){var i=this.start,r=this.startLoc,s,n=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o=this.start,u=this.startLoc,h=[],c=true,l=false,g=new we,E=this.yieldPos,y=this.awaitPos,x;for(this.yieldPos=0,this.awaitPos=0;this.type!==a.parenR;)if(c?c=false:this.expect(a.comma),n&&this.afterTrailingComma(a.parenR,true)){l=true;break}else if(this.type===a.ellipsis){x=this.start,h.push(this.parseParenItem(this.parseRestBinding())),this.type===a.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}else h.push(this.parseMaybeAssign(false,g,this.parseParenItem));var S=this.lastTokEnd,I=this.lastTokEndLoc;if(this.expect(a.parenR),e&&this.shouldParseArrow(h)&&this.eat(a.arrow))return this.checkPatternErrors(g,false),this.checkYieldAwaitInDefaultParams(),this.yieldPos=E,this.awaitPos=y,this.parseParenArrowList(i,r,h,t);(!h.length||l)&&this.unexpected(this.lastTokStart),x&&this.unexpected(x),this.checkExpressionErrors(g,true),this.yieldPos=E||this.yieldPos,this.awaitPos=y||this.awaitPos,h.length>1?(s=this.startNodeAt(o,u),s.expressions=h,this.finishNodeAt(s,"SequenceExpression",S,I)):s=h[0];}else s=this.parseParenExpression();if(this.options.preserveParens){var N=this.startNodeAt(i,r);return N.expression=s,this.finishNode(N,"ParenthesizedExpression")}else return s};m.parseParenItem=function(e){return e};m.parseParenArrowList=function(e,t,i,r){return this.parseArrowExpression(this.startNodeAt(e,t),i,false,r)};var Ci=[];m.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===a.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var i=this.containsEsc;return e.property=this.parseIdent(true),e.property.name!=="target"&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),i&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var r=this.start,s=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,false,true),r,s,true,false),this.eat(a.parenL)?e.arguments=this.parseExprList(a.parenR,this.options.ecmaVersion>=8,false):e.arguments=Ci,this.finishNode(e,"NewExpression")};m.parseTemplateElement=function(e){var t=e.isTagged,i=this.startNode();return this.type===a.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),i.value={raw:this.value.replace(/\r\n?/g,`
12
+ `),cooked:null}):i.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
13
+ `),cooked:this.value},this.next(),i.tail=this.type===a.backQuote,this.finishNode(i,"TemplateElement")};m.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=false);var i=this.startNode();this.next(),i.expressions=[];var r=this.parseTemplateElement({isTagged:t});for(i.quasis=[r];!r.tail;)this.type===a.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(a.dollarBraceL),i.expressions.push(this.parseExpression()),this.expect(a.braceR),i.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(i,"TemplateLiteral")};m.isAsyncProp=function(e){return !e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===a.name||this.type===a.num||this.type===a.string||this.type===a.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===a.star)&&!D.test(this.input.slice(this.lastTokEnd,this.start))};m.parseObj=function(e,t){var i=this.startNode(),r=true,s={};for(i.properties=[],this.next();!this.eat(a.braceR);){if(r)r=false;else if(this.expect(a.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(a.braceR))break;var n=this.parseProperty(e,t);e||this.checkPropClash(n,s,t),i.properties.push(n);}return this.finishNode(i,e?"ObjectPattern":"ObjectExpression")};m.parseProperty=function(e,t){var i=this.startNode(),r,s,n,o;if(this.options.ecmaVersion>=9&&this.eat(a.ellipsis))return e?(i.argument=this.parseIdent(false),this.type===a.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(i,"RestElement")):(i.argument=this.parseMaybeAssign(false,t),this.type===a.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(i,"SpreadElement"));this.options.ecmaVersion>=6&&(i.method=false,i.shorthand=false,(e||t)&&(n=this.start,o=this.startLoc),e||(r=this.eat(a.star)));var u=this.containsEsc;return this.parsePropertyName(i),!e&&!u&&this.options.ecmaVersion>=8&&!r&&this.isAsyncProp(i)?(s=true,r=this.options.ecmaVersion>=9&&this.eat(a.star),this.parsePropertyName(i)):s=false,this.parsePropertyValue(i,e,r,s,n,o,t,u),this.finishNode(i,"Property")};m.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(false),e.kind=t;var i=e.kind==="get"?0:1;if(e.value.params.length!==i){var r=e.value.start;e.kind==="get"?this.raiseRecoverable(r,"getter should have no params"):this.raiseRecoverable(r,"setter should have exactly one param");}else e.kind==="set"&&e.value.params[0].type==="RestElement"&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params");};m.parsePropertyValue=function(e,t,i,r,s,n,o,u){(i||r)&&this.type===a.colon&&this.unexpected(),this.eat(a.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(false,o),e.kind="init"):this.options.ecmaVersion>=6&&this.type===a.parenL?(t&&this.unexpected(),e.method=true,e.value=this.parseMethod(i,r),e.kind="init"):!t&&!u&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&this.type!==a.comma&&this.type!==a.braceR&&this.type!==a.eq?((i||r)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"?((i||r)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=s),t?e.value=this.parseMaybeDefault(s,n,this.copyNode(e.key)):this.type===a.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(s,n,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.kind="init",e.shorthand=true):this.unexpected();};m.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(a.bracketL))return e.computed=true,e.key=this.parseMaybeAssign(),this.expect(a.bracketR),e.key;e.computed=false;}return e.key=this.type===a.num||this.type===a.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};m.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=false),this.options.ecmaVersion>=8&&(e.async=false);};m.parseMethod=function(e,t,i){var r=this.startNode(),s=this.yieldPos,n=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=e),this.options.ecmaVersion>=8&&(r.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(He(t,r.generator)|Ee|(i?kt:0)),this.expect(a.parenL),r.params=this.parseBindingList(a.parenR,false,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,false,true,false),this.yieldPos=s,this.awaitPos=n,this.awaitIdentPos=o,this.finishNode(r,"FunctionExpression")};m.parseArrowExpression=function(e,t,i,r){var s=this.yieldPos,n=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(He(i,false)|Ge),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!i),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,true),this.parseFunctionBody(e,true,false,r),this.yieldPos=s,this.awaitPos=n,this.awaitIdentPos=o,this.finishNode(e,"ArrowFunctionExpression")};m.parseFunctionBody=function(e,t,i,r){var s=t&&this.type!==a.braceL,n=this.strict,o=false;if(s)e.body=this.parseMaybeAssign(r),e.expression=true,this.checkParams(e,false);else {var u=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!n||u)&&(o=this.strictDirective(this.end),o&&u&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list"));var h=this.labels;this.labels=[],o&&(this.strict=true),this.checkParams(e,!n&&!o&&!t&&!i&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,Ct),e.body=this.parseBlock(false,void 0,o&&!n),e.expression=false,this.adaptDirectivePrologue(e.body.body),this.labels=h;}this.exitScope();};m.isSimpleParamList=function(e){for(var t=0,i=e;t<i.length;t+=1){var r=i[t];if(r.type!=="Identifier")return false}return true};m.checkParams=function(e,t){for(var i=Object.create(null),r=0,s=e.params;r<s.length;r+=1){var n=s[r];this.checkLValInnerPattern(n,Ke,t?null:i);}};m.parseExprList=function(e,t,i,r){for(var s=[],n=true;!this.eat(e);){if(n)n=false;else if(this.expect(a.comma),t&&this.afterTrailingComma(e))break;var o=void 0;i&&this.type===a.comma?o=null:this.type===a.ellipsis?(o=this.parseSpread(r),r&&this.type===a.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):o=this.parseMaybeAssign(false,r),s.push(o);}return s};m.checkUnreserved=function(e){var t=e.start,i=e.end,r=e.name;if(this.inGenerator&&r==="yield"&&this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator"),this.inAsync&&r==="await"&&this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function"),!(this.currentThisScope().flags&Ce)&&r==="arguments"&&this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer"),this.inClassStaticBlock&&(r==="arguments"||r==="await")&&this.raise(t,"Cannot use "+r+" in class static initialization block"),this.keywords.test(r)&&this.raise(t,"Unexpected keyword '"+r+"'"),!(this.options.ecmaVersion<6&&this.input.slice(t,i).indexOf("\\")!==-1)){var s=this.strict?this.reservedWordsStrict:this.reservedWords;s.test(r)&&(!this.inAsync&&r==="await"&&this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function"),this.raiseRecoverable(t,"The keyword '"+r+"' is reserved"));}};m.parseIdent=function(e){var t=this.parseIdentNode();return this.next(!!e),this.finishNode(t,"Identifier"),e||(this.checkUnreserved(t),t.name==="await"&&!this.awaitIdentPos&&(this.awaitIdentPos=t.start)),t};m.parseIdentNode=function(){var e=this.startNode();return this.type===a.name?e.name=this.value:this.type.keyword?(e.name=this.type.keyword,(e.name==="class"||e.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop(),this.type=a.name):this.unexpected(),e};m.parsePrivateIdent=function(){var e=this.startNode();return this.type===a.privateId?e.name=this.value:this.unexpected(),this.next(),this.finishNode(e,"PrivateIdentifier"),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(e.start,"Private field '#"+e.name+"' must be declared in an enclosing class"):this.privateNameStack[this.privateNameStack.length-1].used.push(e)),e};m.parseYield=function(e){this.yieldPos||(this.yieldPos=this.start);var t=this.startNode();return this.next(),this.type===a.semi||this.canInsertSemicolon()||this.type!==a.star&&!this.type.startsExpr?(t.delegate=false,t.argument=null):(t.delegate=this.eat(a.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,"YieldExpression")};m.parseAwait=function(e){this.awaitPos||(this.awaitPos=this.start);var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,true,false,e),this.finishNode(t,"AwaitExpression")};var ke=R.prototype;ke.raise=function(e,t){var i=vt(this.input,e);t+=" ("+i.line+":"+i.column+")",this.sourceFile&&(t+=" in "+this.sourceFile);var r=new SyntaxError(t);throw r.pos=e,r.loc=i,r.raisedAt=this.pos,r};ke.raiseRecoverable=ke.raise;ke.curPosition=function(){if(this.options.locations)return new de(this.curLine,this.pos-this.lineStart)};var ee=R.prototype,wi=function(t){this.flags=t,this.var=[],this.lexical=[],this.functions=[];};ee.enterScope=function(e){this.scopeStack.push(new wi(e));};ee.exitScope=function(){this.scopeStack.pop();};ee.treatFunctionsAsVarInScope=function(e){return e.flags&se||!this.inModule&&e.flags&re};ee.declareName=function(e,t,i){var r=false;if(t===Y){var s=this.currentScope();r=s.lexical.indexOf(e)>-1||s.functions.indexOf(e)>-1||s.var.indexOf(e)>-1,s.lexical.push(e),this.inModule&&s.flags&re&&delete this.undefinedExports[e];}else if(t===Et){var n=this.currentScope();n.lexical.push(e);}else if(t===At){var o=this.currentScope();this.treatFunctionsAsVar?r=o.lexical.indexOf(e)>-1:r=o.lexical.indexOf(e)>-1||o.var.indexOf(e)>-1,o.functions.push(e);}else for(var u=this.scopeStack.length-1;u>=0;--u){var h=this.scopeStack[u];if(h.lexical.indexOf(e)>-1&&!(h.flags&_t&&h.lexical[0]===e)||!this.treatFunctionsAsVarInScope(h)&&h.functions.indexOf(e)>-1){r=true;break}if(h.var.push(e),this.inModule&&h.flags&re&&delete this.undefinedExports[e],h.flags&Ce)break}r&&this.raiseRecoverable(i,"Identifier '"+e+"' has already been declared");};ee.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e);};ee.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};ee.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(Ce|me|ae))return t}};ee.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(Ce|me|ae)&&!(t.flags&Ge))return t}};var Ie=function(t,i,r){this.type="",this.start=i,this.end=0,t.options.locations&&(this.loc=new Ae(t,r)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[i,0]);},xe=R.prototype;xe.startNode=function(){return new Ie(this,this.start,this.startLoc)};xe.startNodeAt=function(e,t){return new Ie(this,e,t)};function Rt(e,t,i,r){return e.type=t,e.end=i,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=i),e}xe.finishNode=function(e,t){return Rt.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};xe.finishNodeAt=function(e,t,i,r){return Rt.call(this,e,t,i,r)};xe.copyNode=function(e){var t=new Ie(this,e.start,this.startLoc);for(var i in e)t[i]=e[i];return t};var Ii="Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz",Pt="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",Nt=Pt+" Extended_Pictographic",Tt=Nt,Lt=Tt+" EBase EComp EMod EPres ExtPict",Ot=Lt,Ri=Ot,Pi={9:Pt,10:Nt,11:Tt,12:Lt,13:Ot,14:Ri},Ni="Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji",Ti={9:"",10:"",11:"",12:"",13:"",14:Ni},lt="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",Vt="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",Dt=Vt+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Ut=Dt+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Bt=Ut+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Mt=Bt+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",Li=Mt+" "+Ii,Oi={9:Vt,10:Dt,11:Ut,12:Bt,13:Mt,14:Li},Ft={};function Vi(e){var t=Ft[e]={binary:J(Pi[e]+" "+lt),binaryOfStrings:J(Ti[e]),nonBinary:{General_Category:J(lt),Script:J(Oi[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions;}for(ve=0,Ue=[9,10,11,12,13,14];ve<Ue.length;ve+=1)pt=Ue[ve],Vi(pt);var pt,ve,Ue,p=R.prototype,Se=function(t,i){this.parent=t,this.base=i||this;};Se.prototype.separatedFrom=function(t){for(var i=this;i;i=i.parent)for(var r=t;r;r=r.parent)if(i.base===r.base&&i!==r)return true;return false};Se.prototype.sibling=function(){return new Se(this.parent,this.base)};var z=function(t){this.parser=t,this.validFlags="gim"+(t.options.ecmaVersion>=6?"uy":"")+(t.options.ecmaVersion>=9?"s":"")+(t.options.ecmaVersion>=13?"d":"")+(t.options.ecmaVersion>=15?"v":""),this.unicodeProperties=Ft[t.options.ecmaVersion>=14?14:t.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=false,this.switchV=false,this.switchN=false,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=false,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null;};z.prototype.reset=function(t,i,r){var s=r.indexOf("v")!==-1,n=r.indexOf("u")!==-1;this.start=t|0,this.source=i+"",this.flags=r,s&&this.parser.options.ecmaVersion>=15?(this.switchU=true,this.switchV=true,this.switchN=true):(this.switchU=n&&this.parser.options.ecmaVersion>=6,this.switchV=false,this.switchN=n&&this.parser.options.ecmaVersion>=9);};z.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t);};z.prototype.at=function(t,i){i===void 0&&(i=false);var r=this.source,s=r.length;if(t>=s)return -1;var n=r.charCodeAt(t);if(!(i||this.switchU)||n<=55295||n>=57344||t+1>=s)return n;var o=r.charCodeAt(t+1);return o>=56320&&o<=57343?(n<<10)+o-56613888:n};z.prototype.nextIndex=function(t,i){i===void 0&&(i=false);var r=this.source,s=r.length;if(t>=s)return s;var n=r.charCodeAt(t),o;return !(i||this.switchU)||n<=55295||n>=57344||t+1>=s||(o=r.charCodeAt(t+1))<56320||o>57343?t+1:t+2};z.prototype.current=function(t){return t===void 0&&(t=false),this.at(this.pos,t)};z.prototype.lookahead=function(t){return t===void 0&&(t=false),this.at(this.nextIndex(this.pos,t),t)};z.prototype.advance=function(t){t===void 0&&(t=false),this.pos=this.nextIndex(this.pos,t);};z.prototype.eat=function(t,i){return i===void 0&&(i=false),this.current(i)===t?(this.advance(i),true):false};z.prototype.eatChars=function(t,i){i===void 0&&(i=false);for(var r=this.pos,s=0,n=t;s<n.length;s+=1){var o=n[s],u=this.at(r,i);if(u===-1||u!==o)return false;r=this.nextIndex(r,i);}return this.pos=r,true};p.validateRegExpFlags=function(e){for(var t=e.validFlags,i=e.flags,r=false,s=false,n=0;n<i.length;n++){var o=i.charAt(n);t.indexOf(o)===-1&&this.raise(e.start,"Invalid regular expression flag"),i.indexOf(o,n+1)>-1&&this.raise(e.start,"Duplicate regular expression flag"),o==="u"&&(r=true),o==="v"&&(s=true);}this.options.ecmaVersion>=15&&r&&s&&this.raise(e.start,"Invalid regular expression flag");};function Di(e){for(var t in e)return true;return false}p.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&Di(e.groupNames)&&(e.switchN=true,this.regexp_pattern(e));};p.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=false,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames=Object.create(null),e.backReferenceNames.length=0,e.branchID=null,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,i=e.backReferenceNames;t<i.length;t+=1){var r=i[t];e.groupNames[r]||e.raise("Invalid named capture referenced");}};p.regexp_disjunction=function(e){var t=this.options.ecmaVersion>=16;for(t&&(e.branchID=new Se(e.branchID,null)),this.regexp_alternative(e);e.eat(124);)t&&(e.branchID=e.branchID.sibling()),this.regexp_alternative(e);t&&(e.branchID=e.branchID.parent),this.regexp_eatQuantifier(e,true)&&e.raise("Nothing to repeat"),e.eat(123)&&e.raise("Lone quantifier brackets");};p.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););};p.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise("Invalid quantifier"),true):(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))?(this.regexp_eatQuantifier(e),true):false};p.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=false,e.eat(94)||e.eat(36))return true;if(e.eat(92)){if(e.eat(66)||e.eat(98))return true;e.pos=t;}if(e.eat(40)&&e.eat(63)){var i=false;if(this.options.ecmaVersion>=9&&(i=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!i,true}return e.pos=t,false};p.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=false),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),true):false};p.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)};p.regexp_eatBracedQuantifier=function(e,t){var i=e.pos;if(e.eat(123)){var r=0,s=-1;if(this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(s=e.lastIntValue),e.eat(125)))return s!==-1&&s<r&&!t&&e.raise("numbers out of order in {} quantifier"),true;e.switchU&&!t&&e.raise("Incomplete quantifier"),e.pos=i;}return false};p.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)};p.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return true;e.pos=t;}return false};p.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)){if(this.options.ecmaVersion>=16){var i=this.regexp_eatModifiers(e),r=e.eat(45);if(i||r){for(var s=0;s<i.length;s++){var n=i.charAt(s);i.indexOf(n,s+1)>-1&&e.raise("Duplicate regular expression modifiers");}if(r){var o=this.regexp_eatModifiers(e);!i&&!o&&e.current()===58&&e.raise("Invalid regular expression modifiers");for(var u=0;u<o.length;u++){var h=o.charAt(u);(o.indexOf(h,u+1)>-1||i.indexOf(h)>-1)&&e.raise("Duplicate regular expression modifiers");}}}}if(e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return true;e.raise("Unterminated group");}}e.pos=t;}return false};p.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,true;e.raise("Unterminated group");}return false};p.regexp_eatModifiers=function(e){for(var t="",i=0;(i=e.current())!==-1&&Ui(i);)t+=Q(i),e.advance();return t};function Ui(e){return e===105||e===109||e===115}p.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)};p.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,true)&&e.raise("Nothing to repeat"),false};p.regexp_eatSyntaxCharacter=function(e){var t=e.current();return jt(t)?(e.lastIntValue=t,e.advance(),true):false};function jt(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}p.regexp_eatPatternCharacters=function(e){for(var t=e.pos,i=0;(i=e.current())!==-1&&!jt(i);)e.advance();return e.pos!==t};p.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124?(e.advance(),true):false};p.regexp_groupSpecifier=function(e){if(e.eat(63)){this.regexp_eatGroupName(e)||e.raise("Invalid group");var t=this.options.ecmaVersion>=16,i=e.groupNames[e.lastStringValue];if(i)if(t)for(var r=0,s=i;r<s.length;r+=1){var n=s[r];n.separatedFrom(e.branchID)||e.raise("Duplicate capture group name");}else e.raise("Duplicate capture group name");t?(i||(e.groupNames[e.lastStringValue]=[])).push(e.branchID):e.groupNames[e.lastStringValue]=true;}};p.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return true;e.raise("Invalid capture group name");}return false};p.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=Q(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=Q(e.lastIntValue);return true}return false};p.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,i=this.options.ecmaVersion>=11,r=e.current(i);return e.advance(i),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,i)&&(r=e.lastIntValue),Bi(r)?(e.lastIntValue=r,true):(e.pos=t,false)};function Bi(e){return K(e,true)||e===36||e===95}p.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,i=this.options.ecmaVersion>=11,r=e.current(i);return e.advance(i),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,i)&&(r=e.lastIntValue),Mi(r)?(e.lastIntValue=r,true):(e.pos=t,false)};function Mi(e){return $(e,true)||e===36||e===95||e===8204||e===8205}p.regexp_eatAtomEscape=function(e){return this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)?true:(e.switchU&&(e.current()===99&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),false)};p.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var i=e.lastIntValue;if(e.switchU)return i>e.maxBackReference&&(e.maxBackReference=i),true;if(i<=e.numCapturingParens)return true;e.pos=t;}return false};p.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),true;e.raise("Invalid named reference");}return false};p.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,false)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)};p.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return true;e.pos=t;}return false};p.regexp_eatZero=function(e){return e.current()===48&&!Re(e.lookahead())?(e.lastIntValue=0,e.advance(),true):false};p.regexp_eatControlEscape=function(e){var t=e.current();return t===116?(e.lastIntValue=9,e.advance(),true):t===110?(e.lastIntValue=10,e.advance(),true):t===118?(e.lastIntValue=11,e.advance(),true):t===102?(e.lastIntValue=12,e.advance(),true):t===114?(e.lastIntValue=13,e.advance(),true):false};p.regexp_eatControlLetter=function(e){var t=e.current();return Wt(t)?(e.lastIntValue=t%32,e.advance(),true):false};function Wt(e){return e>=65&&e<=90||e>=97&&e<=122}p.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){t===void 0&&(t=false);var i=e.pos,r=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var s=e.lastIntValue;if(r&&s>=55296&&s<=56319){var n=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var o=e.lastIntValue;if(o>=56320&&o<=57343)return e.lastIntValue=(s-55296)*1024+(o-56320)+65536,true}e.pos=n,e.lastIntValue=s;}return true}if(r&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&Fi(e.lastIntValue))return true;r&&e.raise("Invalid unicode escape"),e.pos=i;}return false};function Fi(e){return e>=0&&e<=1114111}p.regexp_eatIdentityEscape=function(e){if(e.switchU)return this.regexp_eatSyntaxCharacter(e)?true:e.eat(47)?(e.lastIntValue=47,true):false;var t=e.current();return t!==99&&(!e.switchN||t!==107)?(e.lastIntValue=t,e.advance(),true):false};p.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return true}return false};var qt=0,X=1,M=2;p.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(ji(t))return e.lastIntValue=-1,e.advance(),X;var i=false;if(e.switchU&&this.options.ecmaVersion>=9&&((i=t===80)||t===112)){e.lastIntValue=-1,e.advance();var r;if(e.eat(123)&&(r=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return i&&r===M&&e.raise("Invalid property name"),r;e.raise("Invalid property name");}return qt};function ji(e){return e===100||e===68||e===115||e===83||e===119||e===87}p.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var i=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,i,r),X}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var s=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,s)}return qt};p.regexp_validateUnicodePropertyNameAndValue=function(e,t,i){ue(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(i)||e.raise("Invalid property value");};p.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return X;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return M;e.raise("Invalid property name");};p.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";Gt(t=e.current());)e.lastStringValue+=Q(t),e.advance();return e.lastStringValue!==""};function Gt(e){return Wt(e)||e===95}p.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";Wi(t=e.current());)e.lastStringValue+=Q(t),e.advance();return e.lastStringValue!==""};function Wi(e){return Gt(e)||Re(e)}p.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)};p.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),i=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&i===M&&e.raise("Negated character class may contain strings"),true}return false};p.regexp_classContents=function(e){return e.current()===93?X:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),X)};p.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var i=e.lastIntValue;e.switchU&&(t===-1||i===-1)&&e.raise("Invalid character class"),t!==-1&&i!==-1&&t>i&&e.raise("Range out of order in character class");}}};p.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return true;if(e.switchU){var i=e.current();(i===99||zt(i))&&e.raise("Invalid class escape"),e.raise("Invalid escape");}e.pos=t;}var r=e.current();return r!==93?(e.lastIntValue=r,e.advance(),true):false};p.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,true;if(e.switchU&&e.eat(45))return e.lastIntValue=45,true;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return true;e.pos=t;}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)};p.regexp_classSetExpression=function(e){var t=X,i;if(!this.regexp_eatClassSetRange(e))if(i=this.regexp_eatClassSetOperand(e)){i===M&&(t=M);for(var r=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(i=this.regexp_eatClassSetOperand(e))){i!==M&&(t=X);continue}e.raise("Invalid character in character class");}if(r!==e.pos)return t;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(r!==e.pos)return t}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(i=this.regexp_eatClassSetOperand(e),!i)return t;i===M&&(t=M);}};p.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var i=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;return i!==-1&&r!==-1&&i>r&&e.raise("Range out of order in character class"),true}e.pos=t;}return false};p.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?X:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)};p.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var i=e.eat(94),r=this.regexp_classContents(e);if(e.eat(93))return i&&r===M&&e.raise("Negated character class may contain strings"),r;e.pos=t;}if(e.eat(92)){var s=this.regexp_eatCharacterClassEscape(e);if(s)return s;e.pos=t;}return null};p.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var i=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return i}else e.raise("Invalid escape");e.pos=t;}return null};p.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===M&&(t=M);return t};p.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?X:M};p.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e)?true:e.eat(98)?(e.lastIntValue=8,true):(e.pos=t,false);var i=e.current();return i<0||i===e.lookahead()&&qi(i)||Gi(i)?false:(e.advance(),e.lastIntValue=i,true)};function qi(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function Gi(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}p.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return Hi(t)?(e.lastIntValue=t,e.advance(),true):false};function Hi(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}p.regexp_eatClassControlLetter=function(e){var t=e.current();return Re(t)||t===95?(e.lastIntValue=t%32,e.advance(),true):false};p.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return true;e.switchU&&e.raise("Invalid escape"),e.pos=t;}return false};p.regexp_eatDecimalDigits=function(e){var t=e.pos,i=0;for(e.lastIntValue=0;Re(i=e.current());)e.lastIntValue=10*e.lastIntValue+(i-48),e.advance();return e.pos!==t};function Re(e){return e>=48&&e<=57}p.regexp_eatHexDigits=function(e){var t=e.pos,i=0;for(e.lastIntValue=0;Ht(i=e.current());)e.lastIntValue=16*e.lastIntValue+Kt(i),e.advance();return e.pos!==t};function Ht(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function Kt(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}p.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var i=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=t*64+i*8+e.lastIntValue:e.lastIntValue=t*8+i;}else e.lastIntValue=t;return true}return false};p.regexp_eatOctalDigit=function(e){var t=e.current();return zt(t)?(e.lastIntValue=t-48,e.advance(),true):(e.lastIntValue=0,false)};function zt(e){return e>=48&&e<=55}p.regexp_eatFixedHexDigits=function(e,t){var i=e.pos;e.lastIntValue=0;for(var r=0;r<t;++r){var s=e.current();if(!Ht(s))return e.pos=i,false;e.lastIntValue=16*e.lastIntValue+Kt(s),e.advance();}return true};var Qe=function(t){this.type=t.type,this.value=t.value,this.start=t.start,this.end=t.end,t.options.locations&&(this.loc=new Ae(t,t.startLoc,t.endLoc)),t.options.ranges&&(this.range=[t.start,t.end]);},v=R.prototype;v.next=function(e){!e&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword),this.options.onToken&&this.options.onToken(new Qe(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken();};v.getToken=function(){return this.next(),new Qe(this)};typeof Symbol<"u"&&(v[Symbol.iterator]=function(){var e=this;return {next:function(){var t=e.getToken();return {done:t.type===a.eof,value:t}}}});v.nextToken=function(){var e=this.curContext();if((!e||!e.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(a.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos());};v.readToken=function(e){return K(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)};v.fullCharCodeAt=function(e){var t=this.input.charCodeAt(e);if(t<=55295||t>=56320)return t;var i=this.input.charCodeAt(e+1);return i<=56319||i>=57344?t:(t<<10)+i-56613888};v.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)};v.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,i=this.input.indexOf("*/",this.pos+=2);if(i===-1&&this.raise(this.pos-2,"Unterminated comment"),this.pos=i+2,this.options.locations)for(var r=void 0,s=t;(r=xt(this.input,s,this.pos))>-1;)++this.curLine,s=this.lineStart=r;this.options.onComment&&this.options.onComment(true,this.input.slice(t+2,i),t,this.pos,e,this.curPosition());};v.skipLineComment=function(e){for(var t=this.pos,i=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!oe(r);)r=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(false,this.input.slice(t+e,this.pos),t,this.pos,i,this.curPosition());};v.skipSpace=function(){e:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(e>8&&e<14||e>=5760&&gt.test(String.fromCharCode(e)))++this.pos;else break e}}};v.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var i=this.type;this.type=e,this.value=t,this.updateContext(i);};v.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(true);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&e===46&&t===46?(this.pos+=3,this.finishToken(a.ellipsis)):(++this.pos,this.finishToken(a.dot))};v.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(a.assign,2):this.finishOp(a.slash,1)};v.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),i=1,r=e===42?a.star:a.modulo;return this.options.ecmaVersion>=7&&e===42&&t===42&&(++i,r=a.starstar,t=this.input.charCodeAt(this.pos+2)),t===61?this.finishOp(a.assign,i+1):this.finishOp(r,i)};v.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12){var i=this.input.charCodeAt(this.pos+2);if(i===61)return this.finishOp(a.assign,3)}return this.finishOp(e===124?a.logicalOR:a.logicalAND,2)}return t===61?this.finishOp(a.assign,2):this.finishOp(e===124?a.bitwiseOR:a.bitwiseAND,1)};v.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return e===61?this.finishOp(a.assign,2):this.finishOp(a.bitwiseXOR,1)};v.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||D.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(a.incDec,2):t===61?this.finishOp(a.assign,2):this.finishOp(a.plusMin,1)};v.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),i=1;return t===e?(i=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+i)===61?this.finishOp(a.assign,i+1):this.finishOp(a.bitShift,i)):t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(t===61&&(i=2),this.finishOp(a.relational,i))};v.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(a.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&t===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(a.arrow)):this.finishOp(e===61?a.eq:a.prefix,1)};v.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var i=this.input.charCodeAt(this.pos+2);if(i<48||i>57)return this.finishOp(a.questionDot,2)}if(t===63){if(e>=12){var r=this.input.charCodeAt(this.pos+2);if(r===61)return this.finishOp(a.assign,3)}return this.finishOp(a.coalesce,2)}}return this.finishOp(a.question,1)};v.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),K(t,true)||t===92))return this.finishToken(a.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+Q(t)+"'");};v.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return ++this.pos,this.finishToken(a.parenL);case 41:return ++this.pos,this.finishToken(a.parenR);case 59:return ++this.pos,this.finishToken(a.semi);case 44:return ++this.pos,this.finishToken(a.comma);case 91:return ++this.pos,this.finishToken(a.bracketL);case 93:return ++this.pos,this.finishToken(a.bracketR);case 123:return ++this.pos,this.finishToken(a.braceL);case 125:return ++this.pos,this.finishToken(a.braceR);case 58:return ++this.pos,this.finishToken(a.colon);case 96:if(this.options.ecmaVersion<6)break;return ++this.pos,this.finishToken(a.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(false);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(a.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+Q(e)+"'");};v.finishOp=function(e,t){var i=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,i)};v.readRegexp=function(){for(var e,t,i=this.pos;;){this.pos>=this.input.length&&this.raise(i,"Unterminated regular expression");var r=this.input.charAt(this.pos);if(D.test(r)&&this.raise(i,"Unterminated regular expression"),e)e=false;else {if(r==="[")t=true;else if(r==="]"&&t)t=false;else if(r==="/"&&!t)break;e=r==="\\";}++this.pos;}var s=this.input.slice(i,this.pos);++this.pos;var n=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(n);var u=this.regexpState||(this.regexpState=new z(this));u.reset(i,s,o),this.validateRegExpFlags(u),this.validateRegExpPattern(u);var h=null;try{h=new RegExp(s,o);}catch{}return this.finishToken(a.regexp,{pattern:s,flags:o,value:h})};v.readInt=function(e,t,i){for(var r=this.options.ecmaVersion>=12&&t===void 0,s=i&&this.input.charCodeAt(this.pos)===48,n=this.pos,o=0,u=0,h=0,c=t??1/0;h<c;++h,++this.pos){var l=this.input.charCodeAt(this.pos),g=void 0;if(r&&l===95){s&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals"),u===95&&this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore"),h===0&&this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits"),u=l;continue}if(l>=97?g=l-97+10:l>=65?g=l-65+10:l>=48&&l<=57?g=l-48:g=1/0,g>=e)break;u=l,o=o*e+g;}return r&&u===95&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===n||t!=null&&this.pos-n!==t?null:o};function Ki(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,""))}function Qt(e){return typeof BigInt!="function"?null:BigInt(e.replace(/_/g,""))}v.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var i=this.readInt(e);return i==null&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(i=Qt(this.input.slice(t,this.pos)),++this.pos):K(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(a.num,i)};v.readNumber=function(e){var t=this.pos;!e&&this.readInt(10,void 0,true)===null&&this.raise(t,"Invalid number");var i=this.pos-t>=2&&this.input.charCodeAt(t)===48;i&&this.strict&&this.raise(t,"Invalid number");var r=this.input.charCodeAt(this.pos);if(!i&&!e&&this.options.ecmaVersion>=11&&r===110){var s=Qt(this.input.slice(t,this.pos));return ++this.pos,K(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(a.num,s)}i&&/[89]/.test(this.input.slice(t,this.pos))&&(i=false),r===46&&!i&&(++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos)),(r===69||r===101)&&!i&&(r=this.input.charCodeAt(++this.pos),(r===43||r===45)&&++this.pos,this.readInt(10)===null&&this.raise(t,"Invalid number")),K(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var n=Ki(this.input.slice(t,this.pos),i);return this.finishToken(a.num,n)};v.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){this.options.ecmaVersion<6&&this.unexpected();var i=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(i,"Code point out of bounds");}else t=this.readHexChar(4);return t};v.readString=function(e){for(var t="",i=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var r=this.input.charCodeAt(this.pos);if(r===e)break;r===92?(t+=this.input.slice(i,this.pos),t+=this.readEscapedChar(false),i=this.pos):r===8232||r===8233?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(oe(r)&&this.raise(this.start,"Unterminated string constant"),++this.pos);}return t+=this.input.slice(i,this.pos++),this.finishToken(a.string,t)};var Xt={};v.tryReadTemplateToken=function(){this.inTemplateElement=true;try{this.readTmplToken();}catch(e){if(e===Xt)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=false;};v.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw Xt;this.raise(e,t);};v.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var i=this.input.charCodeAt(this.pos);if(i===96||i===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===a.template||this.type===a.invalidTemplate)?i===36?(this.pos+=2,this.finishToken(a.dollarBraceL)):(++this.pos,this.finishToken(a.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(a.template,e));if(i===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(true),t=this.pos;else if(oe(i)){switch(e+=this.input.slice(t,this.pos),++this.pos,i){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=`
14
+ `;break;default:e+=String.fromCharCode(i);break}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos;}else ++this.pos;}};v.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case "\\":++this.pos;break;case "$":if(this.input[this.pos+1]!=="{")break;case "`":return this.finishToken(a.invalidTemplate,this.input.slice(this.start,this.pos));case "\r":this.input[this.pos+1]===`
15
+ `&&++this.pos;case `
16
+ `:case "\u2028":case "\u2029":++this.curLine,this.lineStart=this.pos+1;break}this.raise(this.start,"Unterminated template");};v.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return `
17
+ `;case 114:return "\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return Q(this.readCodePoint());case 116:return " ";case 98:return "\b";case 118:return "\v";case 102:return "\f";case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,"Invalid escape sequence"),e){var i=this.pos-1;this.invalidStringToken(i,"Invalid escape sequence in template string");}default:if(t>=48&&t<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],s=parseInt(r,8);return s>255&&(r=r.slice(0,-1),s=parseInt(r,8)),this.pos+=r.length-1,t=this.input.charCodeAt(this.pos),(r!=="0"||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-r.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(s)}return oe(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),""):String.fromCharCode(t)}};v.readHexChar=function(e){var t=this.pos,i=this.readInt(16,e);return i===null&&this.invalidStringToken(t,"Bad character escape sequence"),i};v.readWord1=function(){this.containsEsc=false;for(var e="",t=true,i=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var s=this.fullCharCodeAtPos();if($(s,r))this.pos+=s<=65535?1:2;else if(s===92){this.containsEsc=true,e+=this.input.slice(i,this.pos);var n=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX"),++this.pos;var o=this.readCodePoint();(t?K:$)(o,r)||this.invalidStringToken(n,"Invalid Unicode escape"),e+=Q(o),i=this.pos;}else break;t=false;}return e+this.input.slice(i,this.pos)};v.readWord=function(){var e=this.readWord1(),t=a.name;return this.keywords.test(e)&&(t=We[e]),this.finishToken(t,e)};var zi="8.16.0";R.acorn={Parser:R,version:zi,defaultOptions:Me,Position:de,SourceLocation:Ae,getLineInfo:vt,Node:Ie,TokenType:_,tokTypes:a,keywordTypes:We,TokContext:q,tokContexts:C,isIdentifierChar:$,isIdentifierStart:K,Token:Qe,isNewLine:oe,lineBreak:D,lineBreakG:xi,nonASCIIwhitespace:gt};function Yt(e,t){return R.parse(e,t)}var ce=class extends Error{constructor(i){super(`AST limit exceeded: ${i}`);this.limit=i;this.name="ScanLimitError";}limit},Xe=new Set(["require","__require","__crewxCreateRequire","module","eval","Function","Worker","URL","globalThis","global"]),Qi=new Set(["type","start","end","loc","range"]);function k(e){return typeof e=="object"&&e!==null&&typeof e.type=="string"}function d(e,t){let i=e[t];return k(i)?i:void 0}function A(e,t){let i=e[t];return Array.isArray(i)?i:[]}function Ye(e,t){for(let i of Object.keys(e)){if(Qi.has(i)||e.type==="Property"&&e.shorthand===true&&i==="key")continue;let r=e[i];if(Array.isArray(r))for(let s of r)k(s)&&t(s,i);else k(r)&&t(r,i);}}function W(e){return k(e)&&e.type==="Literal"&&typeof e.value=="string"?e.value:void 0}function w(e){return k(e)&&e.type==="Identifier"&&typeof e.name=="string"?e.name:void 0}function Pe(e,t){return Yt(e,{ecmaVersion:"latest",sourceType:t==="esm"?"module":"script",allowHashBang:true,allowReturnOutsideFunction:t==="commonjs"})}function Zt(e,t=Xe){let i=new Set,r=new Set,s=new Set,n=new Map,o=new Map,u=[],h=[],c=[],l=[],g=[],E=[{node:e,parent:void 0,key:"",depth:1}],y=0;for(let x=E.pop();x!==void 0;x=E.pop()){let{node:S,parent:I,key:N,depth:le}=x;if(le>L.maxNestingDepth)throw new ce("nesting depth");if(y+=1,y>L.maxAstNodesPerArtifact)throw new ce("AST node count");switch(Xi(S,{bindings:i,assignments:r,skipped:s}),S.type){case "ImportDeclaration":u.push(S);break;case "ImportExpression":h.push(S);break;case "ExportNamedDeclaration":case "ExportAllDeclaration":d(S,"source")!==void 0&&c.push(S);break;case "MetaProperty":l.push({node:S,parent:I,key:N});break;case "WithStatement":g.push(S);break;case "CallExpression":{let H=w(d(S,"callee"));H!==void 0&&t.has(H)&&n.set(S,{parent:I,key:N});break}case "Identifier":{let H=w(S);if(H===void 0||!t.has(H)||I===void 0||!Yi(S,I,N,s))break;let ye=Zi(S,I,N,i,r),rt=o.get(H)??[];rt.push({name:H,node:S,parent:I,key:N,role:ye,callSite:ye==="call"?n.get(I):void 0}),o.set(H,rt);break}}Ye(S,(H,ye)=>{E.push({node:H,parent:S,key:ye,depth:le+1});});}return {program:e,uses:o,importDeclarations:u,importExpressions:h,reexports:c,metaUses:l,withStatements:g,nodeCount:y}}function Xi(e,t){switch(e.type){case "VariableDeclarator":Z(d(e,"id"),t.bindings);break;case "FunctionDeclaration":case "FunctionExpression":case "ArrowFunctionExpression":Z(d(e,"id"),t.bindings);for(let i of A(e,"params"))Z(i,t.bindings);break;case "ClassDeclaration":case "ClassExpression":Z(d(e,"id"),t.bindings);break;case "CatchClause":Z(d(e,"param"),t.bindings);break;case "ImportSpecifier":case "ImportDefaultSpecifier":case "ImportNamespaceSpecifier":Z(d(e,"local"),t.bindings);break;case "AssignmentExpression":Z(d(e,"left"),t.assignments);break;case "UpdateExpression":Z(d(e,"argument"),t.assignments);break;case "ForInStatement":case "ForOfStatement":{let i=d(e,"left");i!==void 0&&i.type!=="VariableDeclaration"&&Z(i,t.assignments);break}case "ExportNamedDeclaration":if(d(e,"source")!==void 0)for(let i of A(e,"specifiers")){let r=k(i)?d(i,"local"):void 0;r!==void 0&&t.skipped.add(r);}break;}}function Z(e,t){let i=[e];for(let r=i.pop();r!==void 0;r=i.pop())if(k(r))switch(r.type){case "Identifier":t.add(r);break;case "ObjectPattern":for(let s of A(r,"properties"))k(s)&&i.push(s.type==="RestElement"?s.argument:s.value);break;case "ArrayPattern":for(let s of A(r,"elements"))i.push(s);break;case "AssignmentPattern":i.push(r.left);break;case "RestElement":i.push(r.argument);break;}}function Yi(e,t,i,r){return !(r.has(e)||t.type==="MemberExpression"&&i==="property"&&t.computed!==true||t.type==="Property"&&i==="key"&&t.computed!==true||(t.type==="MethodDefinition"||t.type==="PropertyDefinition")&&i==="key"&&t.computed!==true||(t.type==="LabeledStatement"||t.type==="BreakStatement"||t.type==="ContinueStatement")&&i==="label"||t.type==="MetaProperty"||t.type==="ImportSpecifier"&&i==="imported"||t.type==="ExportSpecifier"&&i==="exported"||t.type==="ExportAllDeclaration"&&i==="exported")}function Zi(e,t,i,r,s){return r.has(e)?"binding":s.has(e)?"assign":t.type==="CallExpression"&&i==="callee"?"call":t.type==="NewExpression"&&i==="callee"?"new":"other"}var Ji=['var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {',' get: (a, b) => (typeof require !== "undefined" ? require : a)[b]',"}) : x)(function(x) {",' if (typeof require !== "undefined") return require.apply(this, arguments);',` throw Error('Dynamic require of "' + x + '" is not supported');`,"});"].join(`
18
+ `),Jt=new Set(["start","end","loc","range","raw"]);function $t(e){let[t,i]=e;if(!k(t)||!k(i)||t.type!=="ImportDeclaration"||W(d(t,"source"))!=="node:module"||A(t,"attributes").length!==0)return;let r=A(t,"specifiers"),s=r[0];if(r.length!==1||!k(s)||s.type!=="ImportSpecifier"||w(d(s,"imported"))!=="createRequire")return;let n=d(s,"local");if(n===void 0||w(n)!=="__crewxCreateRequire"||i.type!=="VariableDeclaration"||i.kind!=="const")return;let o=A(i,"declarations"),u=o[0];if(o.length!==1||!k(u))return;let h=d(u,"id");if(h===void 0||w(h)!=="require")return;let c=d(u,"init");if(c===void 0||c.type!=="CallExpression"||c.optional===true)return;let l=d(c,"callee");if(l===void 0||w(l)!=="__crewxCreateRequire")return;let g=A(c,"arguments");if(!(g.length!==1||!Je(g[0])))return {importDeclaration:t,importLocal:n,calleeNode:l,requireId:h}}function ei(e){let t=e.filter(o=>k(o)&&o.type==="VariableDeclaration"&&A(o,"declarations").some(u=>k(u)&&w(d(u,"id"))==="__require")),i=t[0];if(t.length!==1||i===void 0)return;let r=$i();if(ti(i,r.count)!==r.count||Ne(i)!==r.shape)return;let s=A(i,"declarations")[0],n=k(s)?d(s,"id"):void 0;if(n!==void 0)return {bindingId:n,start:i.start,end:i.end}}function Je(e){if(!k(e)||e.type!=="MemberExpression"||e.computed===true||w(d(e,"property"))!=="url")return false;let t=d(e,"object");return t!==void 0&&t.type==="MetaProperty"&&w(d(t,"meta"))==="import"&&w(d(t,"property"))==="meta"}var Ze;function $i(){if(Ze===void 0){let e=A(Pe(Ji,"commonjs"),"body")[0];if(!k(e))throw new Error("the esbuild helper constant does not parse to a declaration");Ze={shape:Ne(e),count:ti(e,Number.POSITIVE_INFINITY)};}return Ze}function ti(e,t){let i=[e],r=0;for(let s=i.pop();s!==void 0;s=i.pop()){if(r+=1,r>t)return r;for(let n of Object.keys(s)){if(Jt.has(n)||n==="type")continue;let o=s[n];if(Array.isArray(o))for(let u of o)k(u)&&i.push(u);else k(o)&&i.push(o);}}return r}function Ne(e){if(Array.isArray(e))return `[${e.map(Ne).join(",")}]`;if(k(e)){let t=Object.keys(e).filter(i=>i!=="type"&&!Jt.has(i)).sort().map(i=>`${i}:${Ne(e[i])}`);return `${e.type}{${t.join(",")}}`}return String(JSON.stringify(e))}var er=new Set(["eval","Function","require","module","Worker"]);function tr(e){let t=rr(e);if(!t.ok)return t.refusal;let i=[],r=0;for(let s of t.artifacts){let n=new it(s.source),o,u;try{let l=Pe(s.source,s.kind);o=hr(l),u=Zt(l,ar(o));}catch(l){return ir(l,s.path,n)}if(r+=u.nodeCount,r>L.maxAstNodesTotal)return G("LIMIT_EXCEEDED",s.path,"AST node count across artifacts exceeds the limit");let h=new tt({path:s.path,kind:s.kind,closure:t.closure,builtins:t.builtins},u,o);if(h.run(),h.findings.length>0){let l=h.findings.reduce((g,E)=>E.offset<g.offset?E:g);return G(l.code,s.path,l.detail,n.locate(l.offset))}let c=[...h.references].sort((l,g)=>l.offset-g.offset);for(let l of c)i.push({from:s.path,kind:l.kind,target:l.target,loc:n.locate(l.offset)});}return {ok:true,references:i}}function G(e,t,i,r){return r===void 0?{ok:false,code:e,path:t,detail:i}:{ok:false,code:e,path:t,loc:r,detail:i}}function ir(e,t,i){if(e instanceof ce)return G("LIMIT_EXCEEDED",t,`artifact exceeds the ${e.limit} limit`);if(e instanceof RangeError)return G("LIMIT_EXCEEDED",t,"artifact nesting exceeds the parser stack");if(e instanceof SyntaxError){let r=e.pos,s=typeof r=="number"?i.locate(r):void 0;return G("PARSE_FAILED",t,"artifact source does not parse as its declared kind",s)}throw e}function rr(e){if(typeof e!="object"||e===null)return P("","input must be an object");let{artifacts:t,closurePaths:i,builtins:r}=e;if(!Array.isArray(t)||!Array.isArray(i)||!Array.isArray(r))return P("","artifacts, closurePaths and builtins must be arrays");if(t.length>L.maxExecutableArtifacts)return $e("too many executable artifacts");if(i.length>L.maxClosurePaths)return $e("too many closure paths");if(r.length>L.maxBuiltinSelections)return $e("too many built-in selections");let s=new et,n=[];for(let y of i){if(typeof y!="string")return P("","closure paths must be strings");let x=s.charge(y,L.maxPathLength,"closure path");if(x!==void 0)return {ok:false,refusal:x};n.push(y);}n.sort();for(let y=0;y<n.length;y+=1){let x=n[y],S=Te(x);if(S!==void 0)return P(x,`closure path: ${S}`);if(y>0&&n[y-1]===x)return P(x,"duplicate closure path")}let o=new Set(n),u=new Map,h=[];for(let y of r){if(typeof y!="string")return P("","builtin names must be strings");let x=s.charge(y,L.maxBuiltinNameLength,"built-in name");if(x!==void 0)return {ok:false,refusal:x};h.push(y);}h.sort();for(let y of h){let x=ot(y);if(x===void 0)return P("","builtin name is not a Node built-in module");if(u.has(x))return P("","builtin is selected twice, with and without node:");u.set(x,y);}let c=[];for(let y of t){if(typeof y!="object"||y===null)return P("","artifact must be an object");let x=y,S=x.path;if(typeof S!="string")return P("","artifact path must be a string");let I=s.charge(S,L.maxPathLength,"artifact path");if(I!==void 0)return {ok:false,refusal:I};c.push(x);}c.sort((y,x)=>sr(y.path,x.path));let l=[],g=new Set,E=0;for(let y of c){let x=y.path,S=Te(x);if(S!==void 0)return P(x,`artifact path: ${S}`);if(!pe(x))return P(x,"artifact must be a .js, .mjs or .cjs module");if(g.has(x))return P(x,"duplicate artifact path");g.add(x);let I=y.kind;if(I!=="esm"&&I!=="commonjs")return P(x,"artifact kind must be esm or commonjs");let N=y.source;if(typeof N!="string")return P(x,"artifact source must be a string");let le=Oe(N);if(le>L.maxSourceBytesPerArtifact)return {ok:false,refusal:G("LIMIT_EXCEEDED",x,"artifact source exceeds the per-artifact byte limit")};if(E+=le,E>L.maxSourceBytesTotal)return {ok:false,refusal:G("LIMIT_EXCEEDED",x,"artifact sources exceed the total byte limit")};if(!o.has(x))return P(x,"artifact is not a closure path");l.push({path:x,kind:I,source:N});}for(let y of n)if(pe(y)&&!g.has(y))return P(y,"closure module has no artifact source");return {ok:true,artifacts:l,closure:o,builtins:u}}function P(e,t){return {ok:false,refusal:G("INPUT_INVALID",e,t)}}function $e(e){return {ok:false,refusal:G("LIMIT_EXCEEDED","",e)}}var et=class{bytes=0;charge(t,i,r){if(t.length>i)return G("LIMIT_EXCEEDED","",`${r} exceeds the length limit`);if(this.bytes+=Oe(t),this.bytes>L.maxMetadataBytes)return G("LIMIT_EXCEEDED","","path and name metadata exceeds the aggregate byte limit")}};function sr(e,t){let i=typeof e=="string"?e:"",r=typeof t=="string"?t:"";return i<r?-1:i>r?1:0}function ar(e){let t=new Set(Xe);for(let i of e){let r=w(i);r!==void 0&&t.add(r);}return t}var tt=class{constructor(t,i,r){this.environment=t;this.scan=i;this.workerLocals=r;}environment;scan;workerLocals;findings=[];references=[];banner;helper;urlShadowed=false;run(){let t=A(this.scan.program,"body");this.banner=this.environment.kind==="esm"?$t(t):void 0,this.helper=ei(t),this.urlShadowed=this.usesOf("URL").some(i=>i.role==="binding"||i.role==="assign");for(let i of this.scan.importDeclarations)this.checkImportDeclaration(i);for(let i of this.scan.reexports)this.checkReexport(i);for(let i of this.scan.importExpressions)this.checkImportExpression(i);for(let i of this.scan.withStatements)this.refuse("BINDING_AMBIGUOUS",i.start,"with statement can rebind names at run time");this.checkLoaderUses("require"),this.checkLoaderUses("__require"),this.checkBannerLoader(),this.checkWorkerUses(),this.checkMetaUses(),this.checkCodeUses();}usesOf(t){return this.scan.uses.get(t)??[]}refuse(t,i,r){this.findings.push({code:t,offset:i,detail:r});}reference(t,i,r){this.references.push({kind:t,target:i,offset:r});}checkImportDeclaration(t){let i=t.start,r=W(d(t,"source"));if(r===void 0)return this.refuse("UNSUPPORTED_LOADER",i,"import source is not a string literal");if(this.banner!==void 0&&t===this.banner.importDeclaration){let o=this.builtinTarget("module");o.ok?this.reference("import",o.target,i):this.refuse("BUILTIN_NOT_SELECTED",i,"node:module is needed by the App banner and is not selected");return}let s=ie(r);if(s.kind==="builtin"&&s.name==="worker_threads"){let o=ur(t);if(o!==void 0)return this.refuse("WORKER_UNSUPPORTED",i,o)}let n=this.resolveModule(r,ii(t),"import");n.ok?this.reference("import",n.target,i):this.refuse(n.code,i,n.detail);}checkReexport(t){let i=t.start,r=W(d(t,"source"));if(r===void 0)return this.refuse("UNSUPPORTED_LOADER",i,"re-export source is not a string literal");let s=ie(r);if(s.kind==="builtin"&&s.name==="worker_threads"){let o=t.type==="ExportAllDeclaration",u=A(t,"specifiers").some(h=>k(h)&&w(d(h,"local"))==="Worker");if(o||u)return this.refuse("WORKER_UNSUPPORTED",i,"re-export of node:worker_threads would expose Worker")}let n=this.resolveModule(r,ii(t),"import");n.ok?this.reference("reexport",n.target,i):this.refuse(n.code,i,n.detail);}checkImportExpression(t){let i=t.start,r=d(t,"source"),s=W(r),n="dynamic-import";if(s===void 0){let c=or(r)?ri(d(r,"object")):void 0;if(c===void 0)return this.refuse("UNSUPPORTED_LOADER",i,"dynamic import target is not a literal or new URL(literal, import.meta.url).href");if(this.urlShadowed)return this.refuse("BINDING_AMBIGUOUS",i,"URL is declared in this artifact");if(!si(c))return this.refuse("UNSUPPORTED_LOADER",i,"URL import target must be a relative literal");s=c,n="url-import";}let o=nr(d(t,"options")),u=ie(s);if(u.kind==="builtin"&&u.name==="worker_threads")return this.refuse("WORKER_UNSUPPORTED",i,"dynamic import of node:worker_threads would expose Worker");let h=this.resolveModule(s,o,"import");h.ok?this.reference(n,h.target,i):this.refuse(h.code,i,h.detail);}checkLoaderUses(t){let i=t==="require"?this.banner?.requireId:this.helper?.bindingId,r=t==="require"&&this.environment.kind==="commonjs";for(let s of this.usesOf(t)){if(this.helper!==void 0&&s.node.start>=this.helper.start&&s.node.end<=this.helper.end)continue;let n=s.node.start;if(s.role==="binding")s.node!==i&&this.refuse("BINDING_AMBIGUOUS",n,`${t} is declared outside the App banner or esbuild helper`);else if(s.role==="assign")this.refuse("BINDING_AMBIGUOUS",n,`${t} is reassigned`);else {if(ui(s))continue;i===void 0&&!r?this.refuse("UNSUPPORTED_LOADER",n,`${t} is not bound in this artifact`):s.role==="call"?this.checkLoaderCall(t,s):this.refuse("UNSUPPORTED_LOADER",n,`${t} is used other than as a direct call with one string literal`);}}}checkLoaderCall(t,i){let r=i.parent,s=r.start,n=A(r,"arguments"),o=W(n[0]);if(r.optional===true||n.length!==1||o===void 0)return this.refuse("UNSUPPORTED_LOADER",s,`${t} call with a computed or optional argument`);let u=ie(o);if(u.kind==="builtin"&&u.name==="worker_threads"){let c=lr(i.callSite);if(c!==void 0)return this.refuse("WORKER_UNSUPPORTED",s,c)}let h=this.resolveModule(o,"none","require");h.ok?this.reference("require",h.target,s):this.refuse(h.code,s,h.detail);}checkBannerLoader(){for(let t of this.usesOf("__crewxCreateRequire")){let i=this.banner;i!==void 0&&(t.node===i.importLocal||t.role==="call"&&t.node===i.calleeNode)||(t.role==="binding"||t.role==="assign"?this.refuse("BINDING_AMBIGUOUS",t.node.start,"__crewxCreateRequire is declared outside the App banner"):this.refuse("UNSUPPORTED_LOADER",t.node.start,"createRequire is reachable only through the App banner"));}}checkWorkerUses(){let t=new Map;for(let i of this.workerLocals){let r=w(i);if(r===void 0)continue;let s=t.get(r)??new Set;s.size>0&&this.refuse("BINDING_AMBIGUOUS",i.start,`${r} is bound to node:worker_threads more than once`),s.add(i),t.set(r,s);}for(let i of new Set(["Worker",...t.keys()])){let r=t.get(i)??new Set;for(let s of this.usesOf(i)){let n=s.node.start;s.role==="binding"?r.has(s.node)||this.refuse("BINDING_AMBIGUOUS",n,`${i} is declared outside node:worker_threads`):s.role==="assign"?this.refuse("BINDING_AMBIGUOUS",n,`${i} is reassigned`):s.role==="new"&&r.size>0?this.checkWorkerNew(s.parent):s.role==="new"?this.refuse("WORKER_UNSUPPORTED",n,`${i} is not bound to node:worker_threads`):this.refuse("WORKER_UNSUPPORTED",n,`${i} is used other than as new ${i}(new URL(...))`);}}}checkWorkerNew(t){let i=t.start,r=A(t,"arguments");if(r.length<1||r.length>2||r.some(h=>!k(h)||h.type==="SpreadElement"))return this.refuse("WORKER_UNSUPPORTED",i,"Worker takes new URL(relative, import.meta.url) and an optional options object");let s=r[0],n=k(s)?ri(s):void 0;if(n===void 0)return this.refuse("WORKER_UNSUPPORTED",i,"Worker target is not new URL(relative, import.meta.url)");if(this.urlShadowed)return this.refuse("BINDING_AMBIGUOUS",i,"URL is declared in this artifact");if(!si(n))return this.refuse("WORKER_UNSUPPORTED",i,"Worker target must be a relative literal");if(r.length===2){let h=pr(r[1]);if(h!==void 0)return this.refuse("WORKER_UNSUPPORTED",i,h)}let o=Le(this.environment.path,n);if("code"in o)return this.refuse(o.code,i,o.detail);let u=o.path;if(u.endsWith(".node"))return this.refuse("UNSUPPORTED_LOADER",i,"native addon target");if(!this.environment.closure.has(u))return this.refuse("TARGET_OUTSIDE_CLOSURE",i,"Worker target is not a closure path");if(!pe(u))return this.refuse("WORKER_UNSUPPORTED",i,"Worker target is not a .js, .mjs or .cjs module");this.reference("worker",{path:u},i);}checkMetaUses(){for(let t of this.scan.metaUses){let i=t.parent;i!==void 0&&i.type==="MemberExpression"&&t.key==="object"&&i.computed!==true&&w(d(i,"property"))==="url"||this.refuse("UNSUPPORTED_LOADER",t.node.start,"import.meta is supported only as import.meta.url");}}checkCodeUses(){for(let t of this.usesOf("eval"))this.refuse("UNSUPPORTED_LOADER",t.node.start,"eval runs code from a string");for(let t of this.usesOf("Function"))fr(t)||(t.role==="binding"||t.role==="assign"?this.refuse("BINDING_AMBIGUOUS",t.node.start,"Function is declared or reassigned in this artifact"):this.refuse("UNSUPPORTED_LOADER",t.node.start,"Function can build code from a string; only instanceof and typeof tests are allowed"));for(let t of this.usesOf("module"))ai(t)&&(t.parent.computed===true||w(d(t.parent,"property"))==="require")&&this.refuse("UNSUPPORTED_LOADER",t.node.start,"module.require and computed module access are not supported");for(let t of ["globalThis","global"])for(let i of this.usesOf(t)){if(!ai(i))continue;let r=w(d(i.parent,"property"));(i.parent.computed===true||r!==void 0&&er.has(r))&&this.refuse("UNSUPPORTED_LOADER",i.node.start,`${t} reaches a loader through a property`);}}resolveModule(t,i,r){let s=ie(t);if(s.kind==="refused")return {ok:false,code:s.code,detail:s.detail};if(s.kind==="builtin")return i!=="none"?{ok:false,code:"UNSUPPORTED_LOADER",detail:"built-in imports take no import attributes"}:s.name==="module"?{ok:false,code:"UNSUPPORTED_LOADER",detail:"node:module is reachable only through the App banner"}:this.builtinTarget(s.name);if(i==="invalid")return {ok:false,code:"UNSUPPORTED_LOADER",detail:"unsupported import attributes"};let n=Le(this.environment.path,t);if("code"in n)return {ok:false,code:n.code,detail:n.detail};let o=n.path;if(o.endsWith(".node"))return {ok:false,code:"UNSUPPORTED_LOADER",detail:"native addon target"};if(!this.environment.closure.has(o))return {ok:false,code:"TARGET_OUTSIDE_CLOSURE",detail:"target is not a closure path"};if(o.endsWith(".json")){if(r==="import"&&i!=="json")return {ok:false,code:"UNSUPPORTED_LOADER",detail:"JSON import needs the type json attribute"}}else if(pe(o)){if(i==="json")return {ok:false,code:"UNSUPPORTED_LOADER",detail:"type json attribute on a non-JSON target"}}else return {ok:false,code:"UNSUPPORTED_LOADER",detail:"target extension is not .js, .mjs, .cjs or .json"};return {ok:true,target:{path:o}}}builtinTarget(t){let i=this.environment.builtins.get(t);return i===void 0?{ok:false,code:"BUILTIN_NOT_SELECTED",detail:"built-in is not selected by the Host"}:{ok:true,target:{builtin:i}}}};function ii(e){return ni(A(e,"attributes"))}function ni(e){if(e.length===0)return "none";if(e.length!==1)return "invalid";let t=e[0];return k(t)&&ge(t)==="type"&&W(d(t,"value"))==="json"?"json":"invalid"}function nr(e){if(e===void 0)return "none";if(e.type!=="ObjectExpression")return "invalid";let t=A(e,"properties");if(t.length===0)return "none";let i=t[0];if(t.length!==1||!k(i)||i.type!=="Property"||ge(i)!=="with")return "invalid";let r=d(i,"value");if(r===void 0||r.type!=="ObjectExpression")return "invalid";let s=A(r,"properties");return s.length===0?"none":ni(s)}function ri(e){if(e===void 0||e.type!=="NewExpression"||w(d(e,"callee"))!=="URL")return;let t=A(e,"arguments");if(!(t.length!==2||!Je(t[1])))return W(t[0])}function or(e){return e!==void 0&&e.type==="MemberExpression"&&e.computed!==true&&w(d(e,"property"))==="href"&&d(e,"object")!==void 0}function si(e){return e.startsWith("./")||e.startsWith("../")}function ge(e){if(e.computed===true)return;let t=d(e,"key");return w(t)??W(t)}function ur(e){for(let t of A(e,"specifiers"))if(!k(t)||t.type!=="ImportSpecifier")return "default or namespace import of node:worker_threads would expose Worker"}function hr(e){let t=[],i=[e];for(let r=i.pop();r!==void 0;r=i.pop()){if(r.type==="ImportDeclaration"&&oi(d(r,"source")))for(let s of A(r,"specifiers")){if(!k(s)||s.type!=="ImportSpecifier")continue;let n=w(d(s,"imported"))??W(d(s,"imported")),o=d(s,"local");n==="Worker"&&o!==void 0&&t.push(o);}else if(r.type==="VariableDeclarator"&&cr(d(r,"init"))){let s=d(r,"id");if(s?.type==="ObjectPattern")for(let n of A(s,"properties")){if(!k(n)||n.type!=="Property"||ge(n)!=="Worker")continue;let o=d(n,"value");o?.type==="Identifier"&&t.push(o);}}Ye(r,s=>{i.push(s);});}return t}function oi(e){let t=W(e);if(t===void 0)return false;let i=ie(t);return i.kind==="builtin"&&i.name==="worker_threads"}function cr(e){if(e===void 0||e.type!=="CallExpression"||w(d(e,"callee"))!=="require")return false;let t=A(e,"arguments");return t.length===1&&oi(t[0])}function lr(e){let t=e?.parent;if(t===void 0||t.type!=="VariableDeclarator"||e?.key!=="init")return "node:worker_threads must be destructured in a variable declaration";let i=d(t,"id");if(i===void 0||i.type!=="ObjectPattern")return "node:worker_threads must be destructured";for(let r of A(i,"properties")){if(!k(r))continue;if(r.type!=="Property")return "rest element of node:worker_threads may expose Worker";let s=ge(r);if(s===void 0)return "computed key of node:worker_threads may expose Worker";if(s!=="Worker")continue;let n=d(r,"value");if(n===void 0||n.type!=="Identifier")return "Worker must be destructured into a plain identifier"}}function pr(e){if(!k(e)||e.type!=="ObjectExpression")return "Worker options must be an object literal";for(let t of A(e,"properties")){if(!k(t)||t.type!=="Property")return "Worker options must not spread values";let i=ge(t);if(i===void 0)return "Worker options must not use computed keys";if(i==="eval"||i==="execArgv")return "Worker eval and execArgv options are not supported"}}function fr(e){if(e.role!=="other")return false;let{parent:t,key:i}=e;return t.type==="BinaryExpression"&&t.operator==="instanceof"&&i==="right"?true:ui(e)}function ui(e){return e.role==="other"&&e.parent.type==="UnaryExpression"&&e.parent.operator==="typeof"&&e.key==="argument"}function ai(e){return e.role==="other"&&e.parent.type==="MemberExpression"&&e.key==="object"}var it=class{constructor(t){this.source=t;}source;starts;locate(t){let i=this.lineStarts(),r=0,s=i.length-1;for(;r<s;){let n=r+s+1>>1;i[n]<=t?r=n:s=n-1;}return {offset:t,line:r+1,column:t-i[r]+1}}lineStarts(){if(this.starts===void 0){let t=[0];for(let i=0;i<this.source.length;i+=1){let r=this.source.charCodeAt(i);(r===10||r===8232||r===8233||r===13&&this.source.charCodeAt(i+1)!==10)&&t.push(i+1);}this.starts=t;}return this.starts}};exports.APP_RUNTIME_LIMITS=L;exports.APP_RUNTIME_POLICY_VERSION=hi;exports.APP_RUNTIME_REFUSAL_CODES=ci;exports.checkAppRuntimeReferences=tr;
@@ -0,0 +1,24 @@
1
+ import type { AppRuntimeRefusalCode } from './contract.js';
2
+ export declare const NODE_BUILTIN_MODULE_NAMES: ReadonlySet<string>;
3
+ export type SpecifierClass = {
4
+ readonly kind: 'relative';
5
+ } | {
6
+ readonly kind: 'builtin';
7
+ readonly name: string;
8
+ } | {
9
+ readonly kind: 'refused';
10
+ readonly code: AppRuntimeRefusalCode;
11
+ readonly detail: string;
12
+ };
13
+ export type PathOutcome = {
14
+ readonly path: string;
15
+ } | {
16
+ readonly code: AppRuntimeRefusalCode;
17
+ readonly detail: string;
18
+ };
19
+ export declare function invalidRelativePath(path: string): string | undefined;
20
+ export declare function isExecutablePath(path: string): boolean;
21
+ export declare function builtinNameOf(supplied: string): string | undefined;
22
+ export declare function classifySpecifier(specifier: string): SpecifierClass;
23
+ export declare function resolveRelativeTarget(fromPath: string, specifier: string): PathOutcome;
24
+ export declare function utf8ByteLength(text: string): number;
@@ -0,0 +1,47 @@
1
+ import { type AppArtifactKind } from './contract.js';
2
+ export interface Ast {
3
+ readonly type: string;
4
+ readonly start: number;
5
+ readonly end: number;
6
+ readonly [key: string]: unknown;
7
+ }
8
+ export type UseRole = 'binding' | 'assign' | 'call' | 'new' | 'other';
9
+ export interface CallSite {
10
+ readonly parent: Ast | undefined;
11
+ readonly key: string;
12
+ }
13
+ export interface IdentifierUse {
14
+ readonly name: string;
15
+ readonly node: Ast;
16
+ readonly parent: Ast;
17
+ readonly key: string;
18
+ readonly role: UseRole;
19
+ readonly callSite: CallSite | undefined;
20
+ }
21
+ export interface ScanResult {
22
+ readonly program: Ast;
23
+ readonly uses: ReadonlyMap<string, readonly IdentifierUse[]>;
24
+ readonly importDeclarations: readonly Ast[];
25
+ readonly importExpressions: readonly Ast[];
26
+ readonly reexports: readonly Ast[];
27
+ readonly metaUses: readonly {
28
+ readonly node: Ast;
29
+ readonly parent: Ast | undefined;
30
+ readonly key: string;
31
+ }[];
32
+ readonly withStatements: readonly Ast[];
33
+ readonly nodeCount: number;
34
+ }
35
+ export declare class ScanLimitError extends Error {
36
+ readonly limit: string;
37
+ constructor(limit: string);
38
+ }
39
+ export declare const WATCHED_NAMES: ReadonlySet<string>;
40
+ export declare function isAst(value: unknown): value is Ast;
41
+ export declare function childOf(node: Ast, key: string): Ast | undefined;
42
+ export declare function listOf(node: Ast, key: string): readonly unknown[];
43
+ export declare function forEachAstChild(node: Ast, visit: (child: Ast, key: string) => void): void;
44
+ export declare function stringLiteralValue(node: unknown): string | undefined;
45
+ export declare function identifierName(node: unknown): string | undefined;
46
+ export declare function parseArtifact(source: string, kind: AppArtifactKind): Ast;
47
+ export declare function scanProgram(program: Ast, watched?: ReadonlySet<string>): ScanResult;
@@ -43,11 +43,15 @@ export interface ThreadMessage {
43
43
  content: string;
44
44
  timestamp: string;
45
45
  metadata: Record<string, unknown> | null;
46
+ contentTruncated?: boolean;
47
+ originalTokens?: number;
48
+ includedTokens?: number;
46
49
  }
47
50
  export interface ContextBuildParams {
48
51
  maxTokens: number;
49
52
  hotzoneRatio: number;
50
53
  warmzoneRatio: number;
54
+ minGuaranteedPairs?: number;
51
55
  }
52
56
  export interface ContextBuildResponse {
53
57
  hot: ThreadMessage[];
@@ -0,0 +1,18 @@
1
+ export declare function normalizeClaudeMode(mode: string): string;
2
+ export interface AgentOptionsLike {
3
+ query?: unknown;
4
+ execute?: unknown;
5
+ [key: string]: unknown;
6
+ }
7
+ export interface CanonicalizeAgentOptionsInput {
8
+ provider?: string;
9
+ model?: string;
10
+ options: unknown;
11
+ }
12
+ export interface CanonicalizeAgentOptionsResult {
13
+ options: unknown;
14
+ changed: boolean;
15
+ removed: string[];
16
+ }
17
+ export declare function normalizeProviderMode(providerId: string, mode: string): string;
18
+ export declare function canonicalizeAgentOptions(input: CanonicalizeAgentOptionsInput): CanonicalizeAgentOptionsResult;
@@ -0,0 +1,11 @@
1
+ import { type ProviderExecutionOptions } from './models.generated.js';
2
+ export type DefaultAgentStage = {
3
+ model: string;
4
+ query: Pick<ProviderExecutionOptions, 'mode' | 'effort'>;
5
+ execute: Pick<ProviderExecutionOptions, 'mode' | 'effort'>;
6
+ };
7
+ export interface DefaultAgentProfile {
8
+ planner: DefaultAgentStage;
9
+ worker: DefaultAgentStage;
10
+ }
11
+ export declare function getDefaultAgentProfile(provider: string): DefaultAgentProfile | undefined;
@@ -0,0 +1,33 @@
1
+ import { mkdirSync, readFileSync, renameSync, statSync, writeFileSync } from 'fs';
2
+ import type { LocalServerSettings } from '../local-server/types';
3
+ export interface GlobalSettings {
4
+ cron?: {
5
+ auto_start?: boolean;
6
+ [key: string]: unknown;
7
+ };
8
+ ai_server?: LocalServerSettings;
9
+ [key: string]: unknown;
10
+ }
11
+ export type DeepPartial<T> = T extends object ? {
12
+ [K in keyof T]?: DeepPartial<T[K]>;
13
+ } : T;
14
+ export interface GlobalSettingsStore {
15
+ read(): GlobalSettings;
16
+ update(patch: DeepPartial<GlobalSettings>): GlobalSettings;
17
+ set(key: string, value: unknown): GlobalSettings;
18
+ remove(key: string): GlobalSettings;
19
+ readonly path: string;
20
+ }
21
+ interface GlobalSettingsFileSystem {
22
+ mkdirSync: typeof mkdirSync;
23
+ readFileSync: typeof readFileSync;
24
+ renameSync: typeof renameSync;
25
+ statSync: typeof statSync;
26
+ writeFileSync: typeof writeFileSync;
27
+ }
28
+ export interface CreateGlobalSettingsStoreOptions {
29
+ filePath?: string;
30
+ fileSystem?: Partial<GlobalSettingsFileSystem>;
31
+ }
32
+ export declare function createGlobalSettingsStore(opts?: CreateGlobalSettingsStoreOptions): GlobalSettingsStore;
33
+ export {};
@@ -0,0 +1,6 @@
1
+ export type GrokSandbox = 'workspace' | 'read-only' | 'off';
2
+ export interface GrokNativeOptions {
3
+ alwaysApprove?: boolean;
4
+ sandbox?: GrokSandbox;
5
+ }
6
+ export declare function migrateGrokLegacyMode<T>(slot: T): T;
@@ -0,0 +1,31 @@
1
+ export declare const CLAUDE_OPUS_4_8_BASE_MODEL_ID: "claude-opus-4-8";
2
+ export declare const CLAUDE_OPUS_4_8_LEGACY_MODEL_ID: "claude-opus-4-8[1m]";
3
+ export declare const CLAUDE_MODEL_COMPATIBILITY_PAIRS: readonly [{
4
+ readonly baseModelId: "claude-opus-4-8";
5
+ readonly catalogModelId: "claude-opus-4-8[1m]";
6
+ }, {
7
+ readonly baseModelId: "claude-opus-4-7";
8
+ readonly catalogModelId: "claude-opus-4-7[1m]";
9
+ }, {
10
+ readonly baseModelId: "claude-opus-4-6";
11
+ readonly catalogModelId: "claude-opus-4-6[1m]";
12
+ }, {
13
+ readonly baseModelId: "claude-sonnet-4-6";
14
+ readonly catalogModelId: "claude-sonnet-4-6[1m]";
15
+ }];
16
+ export declare function normalizeAntigravityMode(mode: string): string;
17
+ export declare function resolveCatalogModelId(model: string): string;
18
+ export declare const ANTIGRAVITY_MODEL_COMPATIBILITY: ReadonlyArray<{
19
+ legacyId: string;
20
+ model: string;
21
+ effort?: string;
22
+ }>;
23
+ export type AntigravityResolvedModel = {
24
+ model?: string;
25
+ effort?: string;
26
+ };
27
+ export declare function resolveAntigravityModel(model?: string): AntigravityResolvedModel;
28
+ export declare function resolveProviderCatalogModel(providerId: string, model?: string): {
29
+ model?: string;
30
+ effort?: string;
31
+ };