openlanes 3.0.0

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 (466) hide show
  1. checksums.yaml +7 -0
  2. data/agents/hansolo-reviewer.md +59 -0
  3. data/agents/lando-broker.md +70 -0
  4. data/agents/leah-researcher.md +60 -0
  5. data/agents/luke-backend.md +73 -0
  6. data/agents/palpatine-planner.md +61 -0
  7. data/agents/r2d2-mechanic.md +57 -0
  8. data/agents/rey-frontend.md +68 -0
  9. data/agents/yoda-writer.md +67 -0
  10. data/bin/factory-e2e +157 -0
  11. data/bin/plan-number +164 -0
  12. data/bin/setup +26 -0
  13. data/evals/cases/hansolo-reviewer/review-medium/fail/plan/plan.md +3 -0
  14. data/evals/cases/hansolo-reviewer/review-medium/fail/plan/pull-requests.md +12 -0
  15. data/evals/cases/hansolo-reviewer/review-medium/fail/plan/spec.md +5 -0
  16. data/evals/cases/hansolo-reviewer/review-medium/fail/repo/lib/cart.rb +9 -0
  17. data/evals/cases/hansolo-reviewer/review-medium/fail/repo/spec/cart_spec.rb +7 -0
  18. data/evals/cases/hansolo-reviewer/review-medium/fail/run.json +1 -0
  19. data/evals/cases/hansolo-reviewer/review-medium/pass/plan/plan.md +3 -0
  20. data/evals/cases/hansolo-reviewer/review-medium/pass/plan/pull-requests.md +15 -0
  21. data/evals/cases/hansolo-reviewer/review-medium/pass/plan/spec.md +5 -0
  22. data/evals/cases/hansolo-reviewer/review-medium/pass/repo/lib/cart.rb +9 -0
  23. data/evals/cases/hansolo-reviewer/review-medium/pass/repo/spec/cart_spec.rb +7 -0
  24. data/evals/cases/hansolo-reviewer/review-medium/pass/run.json +1 -0
  25. data/evals/cases/hansolo-reviewer/review-medium.yml +60 -0
  26. data/evals/cases/lando-broker/unblock-fast/fail/plan/blocked.md +9 -0
  27. data/evals/cases/lando-broker/unblock-fast/fail/plan/spec.md +16 -0
  28. data/evals/cases/lando-broker/unblock-fast/fail/run.json +1 -0
  29. data/evals/cases/lando-broker/unblock-fast/pass/plan/spec.md +18 -0
  30. data/evals/cases/lando-broker/unblock-fast/pass/run.json +1 -0
  31. data/evals/cases/lando-broker/unblock-fast.yml +44 -0
  32. data/evals/cases/leah-researcher/research-deep/fail/plan/spec.md +26 -0
  33. data/evals/cases/leah-researcher/research-deep/fail/run.json +1 -0
  34. data/evals/cases/leah-researcher/research-deep/pass/plan/spec.md +39 -0
  35. data/evals/cases/leah-researcher/research-deep/pass/run.json +1 -0
  36. data/evals/cases/leah-researcher/research-deep.yml +51 -0
  37. data/evals/cases/leah-researcher/research-fast/fail/plan/spec.md +27 -0
  38. data/evals/cases/leah-researcher/research-fast/fail/run.json +1 -0
  39. data/evals/cases/leah-researcher/research-fast/pass/plan/spec.md +23 -0
  40. data/evals/cases/leah-researcher/research-fast/pass/run.json +1 -0
  41. data/evals/cases/leah-researcher/research-fast.yml +55 -0
  42. data/evals/cases/luke-backend/build-medium/fail/plan/plan-backend.md +7 -0
  43. data/evals/cases/luke-backend/build-medium/fail/plan/plan-frontend.md +1 -0
  44. data/evals/cases/luke-backend/build-medium/fail/plan/plan.md +3 -0
  45. data/evals/cases/luke-backend/build-medium/fail/plan/pull-requests.md +8 -0
  46. data/evals/cases/luke-backend/build-medium/fail/plan/spec.md +8 -0
  47. data/evals/cases/luke-backend/build-medium/fail/repo/Gemfile +2 -0
  48. data/evals/cases/luke-backend/build-medium/fail/repo/lib/cart.rb +11 -0
  49. data/evals/cases/luke-backend/build-medium/fail/repo/spec/cart_spec.rb +7 -0
  50. data/evals/cases/luke-backend/build-medium/fail/run.json +1 -0
  51. data/evals/cases/luke-backend/build-medium/pass/plan/plan-backend.md +7 -0
  52. data/evals/cases/luke-backend/build-medium/pass/plan/plan-frontend.md +1 -0
  53. data/evals/cases/luke-backend/build-medium/pass/plan/plan.md +3 -0
  54. data/evals/cases/luke-backend/build-medium/pass/plan/pull-requests.md +8 -0
  55. data/evals/cases/luke-backend/build-medium/pass/plan/spec.md +8 -0
  56. data/evals/cases/luke-backend/build-medium/pass/repo/Gemfile +2 -0
  57. data/evals/cases/luke-backend/build-medium/pass/repo/lib/cart.rb +11 -0
  58. data/evals/cases/luke-backend/build-medium/pass/repo/spec/cart_spec.rb +11 -0
  59. data/evals/cases/luke-backend/build-medium/pass/run.json +1 -0
  60. data/evals/cases/luke-backend/build-medium.yml +68 -0
  61. data/evals/cases/palpatine-planner/plan-deep/fail/plan/plan-backend.md +6 -0
  62. data/evals/cases/palpatine-planner/plan-deep/fail/plan/plan.md +8 -0
  63. data/evals/cases/palpatine-planner/plan-deep/fail/plan/spec.md +14 -0
  64. data/evals/cases/palpatine-planner/plan-deep/fail/run.json +1 -0
  65. data/evals/cases/palpatine-planner/plan-deep/pass/plan/plan-backend.md +32 -0
  66. data/evals/cases/palpatine-planner/plan-deep/pass/plan/plan-frontend.md +1 -0
  67. data/evals/cases/palpatine-planner/plan-deep/pass/plan/plan.md +28 -0
  68. data/evals/cases/palpatine-planner/plan-deep/pass/plan/spec.md +14 -0
  69. data/evals/cases/palpatine-planner/plan-deep/pass/run.json +1 -0
  70. data/evals/cases/palpatine-planner/plan-deep.yml +50 -0
  71. data/evals/cases/palpatine-planner/plan-fast/fail/plan/plan-backend.md +48 -0
  72. data/evals/cases/palpatine-planner/plan-fast/fail/plan/plan-frontend.md +1 -0
  73. data/evals/cases/palpatine-planner/plan-fast/fail/plan/plan.md +12 -0
  74. data/evals/cases/palpatine-planner/plan-fast/fail/plan/spec.md +12 -0
  75. data/evals/cases/palpatine-planner/plan-fast/fail/run.json +1 -0
  76. data/evals/cases/palpatine-planner/plan-fast/pass/plan/plan-backend.md +8 -0
  77. data/evals/cases/palpatine-planner/plan-fast/pass/plan/plan-frontend.md +1 -0
  78. data/evals/cases/palpatine-planner/plan-fast/pass/plan/plan.md +12 -0
  79. data/evals/cases/palpatine-planner/plan-fast/pass/plan/spec.md +12 -0
  80. data/evals/cases/palpatine-planner/plan-fast/pass/run.json +1 -0
  81. data/evals/cases/palpatine-planner/plan-fast.yml +47 -0
  82. data/evals/cases/r2d2-mechanic/task-fast/fail/plan/plan.md +7 -0
  83. data/evals/cases/r2d2-mechanic/task-fast/fail/plan/pull-requests.md +6 -0
  84. data/evals/cases/r2d2-mechanic/task-fast/fail/plan/spec.md +6 -0
  85. data/evals/cases/r2d2-mechanic/task-fast/fail/repo/README.md +3 -0
  86. data/evals/cases/r2d2-mechanic/task-fast/fail/repo/lib/greeter/formatter.rb +12 -0
  87. data/evals/cases/r2d2-mechanic/task-fast/fail/repo/lib/greeter.rb +15 -0
  88. data/evals/cases/r2d2-mechanic/task-fast/fail/repo/spec/greeter_spec.rb +7 -0
  89. data/evals/cases/r2d2-mechanic/task-fast/fail/run.json +1 -0
  90. data/evals/cases/r2d2-mechanic/task-fast/pass/plan/plan.md +7 -0
  91. data/evals/cases/r2d2-mechanic/task-fast/pass/plan/pull-requests.md +6 -0
  92. data/evals/cases/r2d2-mechanic/task-fast/pass/plan/spec.md +6 -0
  93. data/evals/cases/r2d2-mechanic/task-fast/pass/repo/README.md +3 -0
  94. data/evals/cases/r2d2-mechanic/task-fast/pass/repo/lib/greeter.rb +3 -0
  95. data/evals/cases/r2d2-mechanic/task-fast/pass/repo/spec/greeter_spec.rb +7 -0
  96. data/evals/cases/r2d2-mechanic/task-fast/pass/run.json +1 -0
  97. data/evals/cases/r2d2-mechanic/task-fast.yml +59 -0
  98. data/evals/cases/r2d2-mechanic/task-medium/fail/plan/plan.md +7 -0
  99. data/evals/cases/r2d2-mechanic/task-medium/fail/plan/pull-requests.md +6 -0
  100. data/evals/cases/r2d2-mechanic/task-medium/fail/plan/spec.md +6 -0
  101. data/evals/cases/r2d2-mechanic/task-medium/fail/repo/Gemfile +2 -0
  102. data/evals/cases/r2d2-mechanic/task-medium/fail/repo/lib/greeter.rb +6 -0
  103. data/evals/cases/r2d2-mechanic/task-medium/fail/repo/spec/greeter_spec.rb +11 -0
  104. data/evals/cases/r2d2-mechanic/task-medium/fail/run.json +1 -0
  105. data/evals/cases/r2d2-mechanic/task-medium/pass/plan/plan.md +7 -0
  106. data/evals/cases/r2d2-mechanic/task-medium/pass/plan/pull-requests.md +6 -0
  107. data/evals/cases/r2d2-mechanic/task-medium/pass/plan/spec.md +6 -0
  108. data/evals/cases/r2d2-mechanic/task-medium/pass/repo/Gemfile +2 -0
  109. data/evals/cases/r2d2-mechanic/task-medium/pass/repo/lib/greeter.rb +6 -0
  110. data/evals/cases/r2d2-mechanic/task-medium/pass/repo/spec/greeter_spec.rb +11 -0
  111. data/evals/cases/r2d2-mechanic/task-medium/pass/run.json +1 -0
  112. data/evals/cases/r2d2-mechanic/task-medium.yml +58 -0
  113. data/evals/cases/rey-frontend/ui-medium/fail/plan/plan-frontend.md +7 -0
  114. data/evals/cases/rey-frontend/ui-medium/fail/plan/plan.md +4 -0
  115. data/evals/cases/rey-frontend/ui-medium/fail/plan/pull-requests.md +8 -0
  116. data/evals/cases/rey-frontend/ui-medium/fail/plan/spec.md +5 -0
  117. data/evals/cases/rey-frontend/ui-medium/fail/repo/lib/cart.rb +5 -0
  118. data/evals/cases/rey-frontend/ui-medium/fail/repo/web/cart_badge.js +4 -0
  119. data/evals/cases/rey-frontend/ui-medium/fail/repo/web/cart_badge.test.js +3 -0
  120. data/evals/cases/rey-frontend/ui-medium/fail/run.json +1 -0
  121. data/evals/cases/rey-frontend/ui-medium/pass/plan/plan-frontend.md +7 -0
  122. data/evals/cases/rey-frontend/ui-medium/pass/plan/plan.md +4 -0
  123. data/evals/cases/rey-frontend/ui-medium/pass/plan/pull-requests.md +8 -0
  124. data/evals/cases/rey-frontend/ui-medium/pass/plan/spec.md +5 -0
  125. data/evals/cases/rey-frontend/ui-medium/pass/repo/lib/cart.rb +3 -0
  126. data/evals/cases/rey-frontend/ui-medium/pass/repo/web/cart_badge.js +4 -0
  127. data/evals/cases/rey-frontend/ui-medium/pass/repo/web/cart_badge.test.js +3 -0
  128. data/evals/cases/rey-frontend/ui-medium/pass/run.json +1 -0
  129. data/evals/cases/rey-frontend/ui-medium.yml +55 -0
  130. data/evals/cases/yoda-writer/spec-medium/fail/plan/plan.md +5 -0
  131. data/evals/cases/yoda-writer/spec-medium/fail/plan/spec.md +45 -0
  132. data/evals/cases/yoda-writer/spec-medium/fail/run.json +1 -0
  133. data/evals/cases/yoda-writer/spec-medium/pass/plan/plan.md +0 -0
  134. data/evals/cases/yoda-writer/spec-medium/pass/plan/spec.md +63 -0
  135. data/evals/cases/yoda-writer/spec-medium/pass/run.json +1 -0
  136. data/evals/cases/yoda-writer/spec-medium.yml +40 -0
  137. data/exe/depot +1 -0
  138. data/exe/lanes +1 -0
  139. data/exe/openlanes +32 -0
  140. data/lib/openlanes/adapters/base.rb +69 -0
  141. data/lib/openlanes/adapters/claude.rb +124 -0
  142. data/lib/openlanes/adapters/codex.rb +33 -0
  143. data/lib/openlanes/adapters/model.rb +37 -0
  144. data/lib/openlanes/adapters/pi.rb +22 -0
  145. data/lib/openlanes/adapters/stream.rb +196 -0
  146. data/lib/openlanes/adapters.rb +92 -0
  147. data/lib/openlanes/agents/agent.rb +103 -0
  148. data/lib/openlanes/agents/profile.rb +57 -0
  149. data/lib/openlanes/agents/registry.rb +151 -0
  150. data/lib/openlanes/agents/roster.rb +103 -0
  151. data/lib/openlanes/agents/routing.rb +88 -0
  152. data/lib/openlanes/agents.rb +20 -0
  153. data/lib/openlanes/cli/agents/subcommands/describe.rb +66 -0
  154. data/lib/openlanes/cli/agents/subcommands/list.rb +20 -0
  155. data/lib/openlanes/cli/base.rb +263 -0
  156. data/lib/openlanes/cli/create/create.rb +354 -0
  157. data/lib/openlanes/cli/docs/docs.rb +40 -0
  158. data/lib/openlanes/cli/eval/eval.rb +110 -0
  159. data/lib/openlanes/cli/index/index.rb +40 -0
  160. data/lib/openlanes/cli/init/init.rb +145 -0
  161. data/lib/openlanes/cli/linear/linear.rb +36 -0
  162. data/lib/openlanes/cli/linear/subcommands/import.rb +174 -0
  163. data/lib/openlanes/cli/linear/subcommands/projects.rb +55 -0
  164. data/lib/openlanes/cli/list_plans/list_plans.rb +21 -0
  165. data/lib/openlanes/cli/mail/mail.rb +31 -0
  166. data/lib/openlanes/cli/mail/subcommands/read.rb +43 -0
  167. data/lib/openlanes/cli/mail/subcommands/send.rb +43 -0
  168. data/lib/openlanes/cli/resync/subcommands/dirs.rb +48 -0
  169. data/lib/openlanes/cli/resync/subcommands/prs.rb +111 -0
  170. data/lib/openlanes/cli/run/run.rb +544 -0
  171. data/lib/openlanes/cli/skills/subcommands/install.rb +92 -0
  172. data/lib/openlanes/cli/start/start.rb +110 -0
  173. data/lib/openlanes/cli/state/state.rb +26 -0
  174. data/lib/openlanes/cli/state/subcommands/show.rb +30 -0
  175. data/lib/openlanes/cli/state/subcommands/sign.rb +48 -0
  176. data/lib/openlanes/cli/states/states.rb +15 -0
  177. data/lib/openlanes/cli/unblock/unblock.rb +235 -0
  178. data/lib/openlanes/cli/version/version.rb +13 -0
  179. data/lib/openlanes/cli/web/web.rb +100 -0
  180. data/lib/openlanes/cli/worktree/worktree.rb +85 -0
  181. data/lib/openlanes/cli.rb +162 -0
  182. data/lib/openlanes/engine/board.rb +104 -0
  183. data/lib/openlanes/engine/dispatcher.rb +1297 -0
  184. data/lib/openlanes/engine/progress_log.rb +125 -0
  185. data/lib/openlanes/engine/runner.rb +224 -0
  186. data/lib/openlanes/engine/state_file.rb +190 -0
  187. data/lib/openlanes/engine/tally.rb +177 -0
  188. data/lib/openlanes/engine.rb +19 -0
  189. data/lib/openlanes/evals/case.rb +191 -0
  190. data/lib/openlanes/evals/changes.rb +67 -0
  191. data/lib/openlanes/evals/check.rb +224 -0
  192. data/lib/openlanes/evals/evidence.rb +71 -0
  193. data/lib/openlanes/evals/live.rb +140 -0
  194. data/lib/openlanes/evals/recording.rb +38 -0
  195. data/lib/openlanes/evals/run.rb +34 -0
  196. data/lib/openlanes/evals/score.rb +24 -0
  197. data/lib/openlanes/evals/scorer.rb +42 -0
  198. data/lib/openlanes/evals/verdict.rb +18 -0
  199. data/lib/openlanes/evals.rb +56 -0
  200. data/lib/openlanes/execution/checks.rb +73 -0
  201. data/lib/openlanes/execution/child.rb +228 -0
  202. data/lib/openlanes/execution/clock.rb +121 -0
  203. data/lib/openlanes/execution/control.rb +194 -0
  204. data/lib/openlanes/execution/executor.rb +849 -0
  205. data/lib/openlanes/execution/prompt.rb +455 -0
  206. data/lib/openlanes/execution/transcript.rb +531 -0
  207. data/lib/openlanes/execution.rb +19 -0
  208. data/lib/openlanes/launcher.rb +69 -0
  209. data/lib/openlanes/lifecycle/adoption.rb +197 -0
  210. data/lib/openlanes/lifecycle/brief.rb +288 -0
  211. data/lib/openlanes/lifecycle/completion.rb +58 -0
  212. data/lib/openlanes/lifecycle/creator.rb +126 -0
  213. data/lib/openlanes/lifecycle/lanes.rb +74 -0
  214. data/lib/openlanes/lifecycle/resync.rb +428 -0
  215. data/lib/openlanes/lifecycle/unblocker.rb +236 -0
  216. data/lib/openlanes/lifecycle.rb +28 -0
  217. data/lib/openlanes/linear/api.rb +224 -0
  218. data/lib/openlanes/linear/attribution.rb +185 -0
  219. data/lib/openlanes/linear/fuzzy.rb +68 -0
  220. data/lib/openlanes/linear/import.rb +314 -0
  221. data/lib/openlanes/linear/issue.rb +187 -0
  222. data/lib/openlanes/linear/mapping.rb +116 -0
  223. data/lib/openlanes/linear/push.rb +197 -0
  224. data/lib/openlanes/linear/survey.rb +174 -0
  225. data/lib/openlanes/linear/unit.rb +274 -0
  226. data/lib/openlanes/linear.rb +41 -0
  227. data/lib/openlanes/live/claims.rb +71 -0
  228. data/lib/openlanes/live/command.rb +122 -0
  229. data/lib/openlanes/live/commands.rb +505 -0
  230. data/lib/openlanes/live/keys.rb +93 -0
  231. data/lib/openlanes/live/memory_store.rb +265 -0
  232. data/lib/openlanes/live/meter.rb +51 -0
  233. data/lib/openlanes/live/node.rb +88 -0
  234. data/lib/openlanes/live/publisher.rb +179 -0
  235. data/lib/openlanes/live/repo.rb +60 -0
  236. data/lib/openlanes/live/run_record.rb +133 -0
  237. data/lib/openlanes/live/run_state.rb +101 -0
  238. data/lib/openlanes/live/session.rb +107 -0
  239. data/lib/openlanes/live/snapshot.rb +322 -0
  240. data/lib/openlanes/live/stations.rb +67 -0
  241. data/lib/openlanes/live/store.rb +277 -0
  242. data/lib/openlanes/live.rb +109 -0
  243. data/lib/openlanes/plans/dev_work.rb +56 -0
  244. data/lib/openlanes/plans/feature.rb +131 -0
  245. data/lib/openlanes/plans/index.rb +208 -0
  246. data/lib/openlanes/plans/ledger.rb +255 -0
  247. data/lib/openlanes/plans/mailbox.rb +164 -0
  248. data/lib/openlanes/plans/ordinal.rb +92 -0
  249. data/lib/openlanes/plans/plan_state.rb +291 -0
  250. data/lib/openlanes/plans/pull_request.rb +29 -0
  251. data/lib/openlanes/plans/pull_requests.rb +229 -0
  252. data/lib/openlanes/plans/spec.rb +213 -0
  253. data/lib/openlanes/plans/state_machine.rb +433 -0
  254. data/lib/openlanes/plans/status.rb +365 -0
  255. data/lib/openlanes/plans/subject.rb +133 -0
  256. data/lib/openlanes/plans/tree.rb +79 -0
  257. data/lib/openlanes/plans.rb +39 -0
  258. data/lib/openlanes/presentation/diagram.rb +149 -0
  259. data/lib/openlanes/presentation/documentation.rb +438 -0
  260. data/lib/openlanes/presentation/reporter.rb +181 -0
  261. data/lib/openlanes/presentation/viewer.rb +62 -0
  262. data/lib/openlanes/presentation.rb +23 -0
  263. data/lib/openlanes/skills/installer.rb +68 -0
  264. data/lib/openlanes/skills/skill.rb +60 -0
  265. data/lib/openlanes/skills.rb +25 -0
  266. data/lib/openlanes/support/config.rb +217 -0
  267. data/lib/openlanes/support/frontmatter.rb +38 -0
  268. data/lib/openlanes/support/markdown.rb +56 -0
  269. data/lib/openlanes/support/project.rb +79 -0
  270. data/lib/openlanes/support/ui.rb +671 -0
  271. data/lib/openlanes/vcs/github.rb +171 -0
  272. data/lib/openlanes/vcs/publisher.rb +221 -0
  273. data/lib/openlanes/vcs/worktree.rb +248 -0
  274. data/lib/openlanes/vcs.rb +19 -0
  275. data/lib/openlanes/version.rb +10 -0
  276. data/lib/openlanes/web/app.rb +176 -0
  277. data/lib/openlanes/web/context.rb +66 -0
  278. data/lib/openlanes/web/demo.rb +169 -0
  279. data/lib/openlanes/web/demo_board.rb +286 -0
  280. data/lib/openlanes/web/events.rb +104 -0
  281. data/lib/openlanes/web/launcher.rb +143 -0
  282. data/lib/openlanes/web/server.rb +77 -0
  283. data/lib/openlanes/web/stores.rb +36 -0
  284. data/lib/openlanes/web.rb +92 -0
  285. data/lib/openlanes.rb +151 -0
  286. data/openlanes.gemspec +87 -0
  287. data/schemas/plan-state.schema.json +101 -0
  288. data/skills/openlanes/SKILL.md +48 -0
  289. data/skills/openlanes-documents/SKILL.md +61 -0
  290. data/skills/openlanes-documents/references/blocked-template.md +49 -0
  291. data/skills/openlanes-documents/references/closing-templates.md +59 -0
  292. data/skills/openlanes-documents/references/plan-template.md +61 -0
  293. data/skills/openlanes-documents/references/retroactive-spec.md +43 -0
  294. data/skills/openlanes-documents/references/spec-template.md +45 -0
  295. data/skills/openlanes-run/SKILL.md +90 -0
  296. data/skills/openlanes-setup/SKILL.md +64 -0
  297. data/skills/openlanes-spec/SKILL.md +90 -0
  298. data/skills/openlanes-status/SKILL.md +32 -0
  299. data/skills/openlanes-sync/SKILL.md +22 -0
  300. data/web/dist/assets/apl-B4CMkyY2.js +2 -0
  301. data/web/dist/assets/asciiarmor-Df11BRmG.js +2 -0
  302. data/web/dist/assets/asn1-EdZsLKOL.js +2 -0
  303. data/web/dist/assets/asterisk-B-8jnY81.js +2 -0
  304. data/web/dist/assets/barlow-condensed-latin-600-normal-BFJEwTuo.woff +0 -0
  305. data/web/dist/assets/barlow-condensed-latin-600-normal-DepVgxBB.woff2 +0 -0
  306. data/web/dist/assets/barlow-condensed-latin-ext-600-normal-18ESti3H.woff2 +0 -0
  307. data/web/dist/assets/barlow-condensed-latin-ext-600-normal-Clv9cIcR.woff +0 -0
  308. data/web/dist/assets/barlow-condensed-vietnamese-600-normal-A5AYRdjN.woff2 +0 -0
  309. data/web/dist/assets/barlow-condensed-vietnamese-600-normal-CNlPk46_.woff +0 -0
  310. data/web/dist/assets/brainfuck-C4LP7Hcl.js +2 -0
  311. data/web/dist/assets/clike-B9uivgTg.js +2 -0
  312. data/web/dist/assets/clojure-BMjYHr_A.js +2 -0
  313. data/web/dist/assets/cmake-BQqOBYOt.js +2 -0
  314. data/web/dist/assets/cobol-CWcv1MsR.js +2 -0
  315. data/web/dist/assets/coffeescript-S37ZYGWr.js +2 -0
  316. data/web/dist/assets/commonlisp-DBKNyK5s.js +2 -0
  317. data/web/dist/assets/crystal-SjHAIU92.js +2 -0
  318. data/web/dist/assets/css-BnMrqG3P.js +2 -0
  319. data/web/dist/assets/cypher-C_CwsFkJ.js +2 -0
  320. data/web/dist/assets/d-pRatUO7H.js +2 -0
  321. data/web/dist/assets/diff-DbItnlRl.js +2 -0
  322. data/web/dist/assets/dockerfile-BKs6k2Af.js +2 -0
  323. data/web/dist/assets/dtd-DF_7sFjM.js +2 -0
  324. data/web/dist/assets/dylan-DwRh75JA.js +2 -0
  325. data/web/dist/assets/ebnf-CDyGwa7X.js +2 -0
  326. data/web/dist/assets/ecl-Cabwm37j.js +2 -0
  327. data/web/dist/assets/eiffel-CnydiIhH.js +2 -0
  328. data/web/dist/assets/elm-vLlmbW-K.js +2 -0
  329. data/web/dist/assets/erlang-BNw1qcRV.js +2 -0
  330. data/web/dist/assets/factor-kuTfRLto.js +2 -0
  331. data/web/dist/assets/favicon-C8pAuqqr.png +0 -0
  332. data/web/dist/assets/fcl-Kvtd6kyn.js +2 -0
  333. data/web/dist/assets/forth-Ffai-XNe.js +2 -0
  334. data/web/dist/assets/fortran-DYz_wnZ1.js +2 -0
  335. data/web/dist/assets/gas-Bneqetm1.js +2 -0
  336. data/web/dist/assets/gherkin-heZmZLOM.js +2 -0
  337. data/web/dist/assets/groovy-D9Dt4D0W.js +2 -0
  338. data/web/dist/assets/haskell-Cw1EW3IL.js +2 -0
  339. data/web/dist/assets/haxe-H-WmDvRZ.js +2 -0
  340. data/web/dist/assets/http-DBlCnlav.js +2 -0
  341. data/web/dist/assets/idl-BEugSyMb.js +2 -0
  342. data/web/dist/assets/index-2xPC-eHt.js +2 -0
  343. data/web/dist/assets/index-8dNhRmiO.js +8 -0
  344. data/web/dist/assets/index-B7-O9ujQ.js +2 -0
  345. data/web/dist/assets/index-BdR34cXC.js +2 -0
  346. data/web/dist/assets/index-Bp7W-ZTq.js +2 -0
  347. data/web/dist/assets/index-Byyxbh_z.js +4 -0
  348. data/web/dist/assets/index-C0VmkrO-.js +2 -0
  349. data/web/dist/assets/index-CI74IkWP.js +198 -0
  350. data/web/dist/assets/index-CYxcbpRM.js +3 -0
  351. data/web/dist/assets/index-D0rmJN3h.js +2 -0
  352. data/web/dist/assets/index-DB4QwuYn.js +2 -0
  353. data/web/dist/assets/index-DDI7zoAS.js +2 -0
  354. data/web/dist/assets/index-DGLUuEXi.js +2 -0
  355. data/web/dist/assets/index-OR-odsl9.js +2 -0
  356. data/web/dist/assets/index-P3vSkiU-.js +2 -0
  357. data/web/dist/assets/index-a4EHR-u4.css +1 -0
  358. data/web/dist/assets/index-mRV4XhJZ.js +2 -0
  359. data/web/dist/assets/index-popk9wbW.js +2 -0
  360. data/web/dist/assets/index-uM88Njdj.js +2 -0
  361. data/web/dist/assets/javascript-iXu5QeM3.js +2 -0
  362. data/web/dist/assets/julia-DuME0IfC.js +2 -0
  363. data/web/dist/assets/livescript-BwQOo05w.js +2 -0
  364. data/web/dist/assets/logo-on-dark-DI9gCdN4.png +0 -0
  365. data/web/dist/assets/logo-on-light-BciwqxcJ.png +0 -0
  366. data/web/dist/assets/lua-VAEuO923.js +2 -0
  367. data/web/dist/assets/mathematica-DTrFuWx2.js +2 -0
  368. data/web/dist/assets/mbox-CNhZ1qSd.js +2 -0
  369. data/web/dist/assets/mirc-CjQqDB4T.js +2 -0
  370. data/web/dist/assets/mllike-CXdrOF99.js +2 -0
  371. data/web/dist/assets/modelica-Dc1JOy9r.js +2 -0
  372. data/web/dist/assets/mscgen-BA5vi2Kp.js +2 -0
  373. data/web/dist/assets/mumps-BT43cFF4.js +2 -0
  374. data/web/dist/assets/nginx-DdIZxoE0.js +2 -0
  375. data/web/dist/assets/nsis-LY0VT_u5.js +2 -0
  376. data/web/dist/assets/ntriples-BfvgReVJ.js +2 -0
  377. data/web/dist/assets/octave-Ck1zUtKM.js +2 -0
  378. data/web/dist/assets/overpass-cyrillic-400-normal-CZsFKZCk.woff +0 -0
  379. data/web/dist/assets/overpass-cyrillic-400-normal-tXDxWGRy.woff2 +0 -0
  380. data/web/dist/assets/overpass-cyrillic-600-normal-B-hc8bdn.woff2 +0 -0
  381. data/web/dist/assets/overpass-cyrillic-600-normal-CXB2Mrig.woff +0 -0
  382. data/web/dist/assets/overpass-cyrillic-800-normal-CP6RWG8X.woff2 +0 -0
  383. data/web/dist/assets/overpass-cyrillic-800-normal-PJW4A9xW.woff +0 -0
  384. data/web/dist/assets/overpass-cyrillic-ext-400-normal-AKUz2ZI5.woff2 +0 -0
  385. data/web/dist/assets/overpass-cyrillic-ext-400-normal-C2ZjKngx.woff +0 -0
  386. data/web/dist/assets/overpass-cyrillic-ext-600-normal-CW4Fknsm.woff2 +0 -0
  387. data/web/dist/assets/overpass-cyrillic-ext-600-normal-Zx-mtRSD.woff +0 -0
  388. data/web/dist/assets/overpass-cyrillic-ext-800-normal-CIth-cA7.woff2 +0 -0
  389. data/web/dist/assets/overpass-cyrillic-ext-800-normal-hx3cL3ZN.woff +0 -0
  390. data/web/dist/assets/overpass-latin-400-normal-BpeLJ0bs.woff2 +0 -0
  391. data/web/dist/assets/overpass-latin-400-normal-c_C8zulu.woff +0 -0
  392. data/web/dist/assets/overpass-latin-600-normal-25RhTNCi.woff2 +0 -0
  393. data/web/dist/assets/overpass-latin-600-normal-DhYQrzaY.woff +0 -0
  394. data/web/dist/assets/overpass-latin-800-normal-Bzx_XP5l.woff2 +0 -0
  395. data/web/dist/assets/overpass-latin-800-normal-D6-q4f0l.woff +0 -0
  396. data/web/dist/assets/overpass-latin-ext-400-normal-BIkXRwl6.woff2 +0 -0
  397. data/web/dist/assets/overpass-latin-ext-400-normal-DUq_h-_z.woff +0 -0
  398. data/web/dist/assets/overpass-latin-ext-600-normal-Cyj4Nio0.woff2 +0 -0
  399. data/web/dist/assets/overpass-latin-ext-600-normal-DQKKMGzp.woff +0 -0
  400. data/web/dist/assets/overpass-latin-ext-800-normal-D6WKWGNs.woff +0 -0
  401. data/web/dist/assets/overpass-latin-ext-800-normal-DZ60AB77.woff2 +0 -0
  402. data/web/dist/assets/overpass-mono-cyrillic-400-normal-B144qALP.woff2 +0 -0
  403. data/web/dist/assets/overpass-mono-cyrillic-400-normal-XK9_jwT8.woff +0 -0
  404. data/web/dist/assets/overpass-mono-cyrillic-ext-400-normal-Dgejvo4A.woff2 +0 -0
  405. data/web/dist/assets/overpass-mono-cyrillic-ext-400-normal-DgxwtUZy.woff +0 -0
  406. data/web/dist/assets/overpass-mono-latin-400-normal-DqAOLzCO.woff +0 -0
  407. data/web/dist/assets/overpass-mono-latin-400-normal-VINZG6Js.woff2 +0 -0
  408. data/web/dist/assets/overpass-mono-latin-ext-400-normal-5YIw-E8g.woff +0 -0
  409. data/web/dist/assets/overpass-mono-latin-ext-400-normal-DBdJzBs_.woff2 +0 -0
  410. data/web/dist/assets/overpass-mono-vietnamese-400-normal-DrLp_cHj.woff +0 -0
  411. data/web/dist/assets/overpass-mono-vietnamese-400-normal-jmOeL0rj.woff2 +0 -0
  412. data/web/dist/assets/overpass-vietnamese-400-normal-BKRCEiXy.woff2 +0 -0
  413. data/web/dist/assets/overpass-vietnamese-400-normal-CCWAWVG7.woff +0 -0
  414. data/web/dist/assets/overpass-vietnamese-600-normal-CjS-4vQf.woff2 +0 -0
  415. data/web/dist/assets/overpass-vietnamese-600-normal-DlMMlPfM.woff +0 -0
  416. data/web/dist/assets/overpass-vietnamese-800-normal-BB8K9-Vo.woff2 +0 -0
  417. data/web/dist/assets/overpass-vietnamese-800-normal-DZUygvj_.woff +0 -0
  418. data/web/dist/assets/oz-BzwKVEFT.js +2 -0
  419. data/web/dist/assets/pascal--L3eBynH.js +2 -0
  420. data/web/dist/assets/perl-CdXCOZ3F.js +2 -0
  421. data/web/dist/assets/pig-CevX1Tat.js +2 -0
  422. data/web/dist/assets/powershell-CFHJl5sT.js +2 -0
  423. data/web/dist/assets/properties-C78fOPTZ.js +2 -0
  424. data/web/dist/assets/protobuf-ChK-085T.js +2 -0
  425. data/web/dist/assets/pug-DeIclll2.js +2 -0
  426. data/web/dist/assets/puppet-DMA9R1ak.js +2 -0
  427. data/web/dist/assets/python-BuPzkPfP.js +2 -0
  428. data/web/dist/assets/q-pXgVlZs6.js +2 -0
  429. data/web/dist/assets/r-B6wPVr8A.js +2 -0
  430. data/web/dist/assets/rpm-CTu-6PCP.js +2 -0
  431. data/web/dist/assets/ruby-BK5aLJev.js +2 -0
  432. data/web/dist/assets/sas-B4kiWyti.js +2 -0
  433. data/web/dist/assets/scheme-C41bIUwD.js +2 -0
  434. data/web/dist/assets/shell-CjFT_Tl9.js +2 -0
  435. data/web/dist/assets/sieve-C3Gn_uJK.js +2 -0
  436. data/web/dist/assets/simple-mode-GW_nhZxv.js +2 -0
  437. data/web/dist/assets/smalltalk-CnHTOXQT.js +2 -0
  438. data/web/dist/assets/solr-DehyRSwq.js +2 -0
  439. data/web/dist/assets/sparql-DkYu6x3z.js +2 -0
  440. data/web/dist/assets/spreadsheet-BCZA_wO0.js +2 -0
  441. data/web/dist/assets/sql-D0XecflT.js +2 -0
  442. data/web/dist/assets/stex-C3f8Ysf7.js +2 -0
  443. data/web/dist/assets/stylus-B533Al4x.js +2 -0
  444. data/web/dist/assets/swift-BzpIVaGY.js +2 -0
  445. data/web/dist/assets/tcl-DVfN8rqt.js +2 -0
  446. data/web/dist/assets/textile-CnDTJFAw.js +2 -0
  447. data/web/dist/assets/tiddlywiki-DO-Gjzrf.js +2 -0
  448. data/web/dist/assets/tiki-DGYXhP31.js +2 -0
  449. data/web/dist/assets/toml-Bm5Em-hy.js +2 -0
  450. data/web/dist/assets/troff-wAsdV37c.js +2 -0
  451. data/web/dist/assets/ttcn-CfJYG6tj.js +2 -0
  452. data/web/dist/assets/ttcn-cfg-B9xdYoR4.js +2 -0
  453. data/web/dist/assets/turtle-B1tBg_DP.js +2 -0
  454. data/web/dist/assets/vb-CmGdzxic.js +2 -0
  455. data/web/dist/assets/vbscript-BuJXcnF6.js +2 -0
  456. data/web/dist/assets/velocity-D8B20fx6.js +2 -0
  457. data/web/dist/assets/verilog-C6RDOZhf.js +2 -0
  458. data/web/dist/assets/vhdl-lSbBsy5d.js +2 -0
  459. data/web/dist/assets/webidl-ZXfAyPTL.js +2 -0
  460. data/web/dist/assets/xquery-DzFWVndE.js +2 -0
  461. data/web/dist/assets/yacas-BJ4BC0dw.js +2 -0
  462. data/web/dist/assets/z80-Hz9HOZM7.js +2 -0
  463. data/web/dist/index.html +14 -0
  464. data/web/dist/vite.svg +1 -0
  465. data/web/src/api/fixtures/board.json +512 -0
  466. metadata +907 -0
@@ -0,0 +1,198 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dockerfile-BKs6k2Af.js","assets/simple-mode-GW_nhZxv.js","assets/factor-kuTfRLto.js","assets/nsis-LY0VT_u5.js","assets/pug-DeIclll2.js","assets/javascript-iXu5QeM3.js"])))=>i.map(i=>d[i]);
2
+ var Sq=Object.defineProperty;var DP=t=>{throw TypeError(t)};var xq=(t,e,n)=>e in t?Sq(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var kt=(t,e,n)=>xq(t,typeof e!="symbol"?e+"":e,n),uS=(t,e,n)=>e.has(t)||DP("Cannot "+n);var z=(t,e,n)=>(uS(t,e,"read from private field"),n?n.call(t):e.get(t)),Je=(t,e,n)=>e.has(t)?DP("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Qe=(t,e,n,i)=>(uS(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n),Ot=(t,e,n)=>(uS(t,e,"access private method"),n);var Mg=(t,e,n,i)=>({set _(r){Qe(t,e,r,n)},get _(){return z(t,e,i)}});function wq(t,e){for(var n=0;n<e.length;n++){const i=e[n];if(typeof i!="string"&&!Array.isArray(i)){for(const r in i)if(r!=="default"&&!(r in t)){const s=Object.getOwnPropertyDescriptor(i,r);s&&Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>i[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function n(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(r){if(r.ep)return;r.ep=!0;const s=n(r);fetch(r.href,s)}})();function v2(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var fS={exports:{}},xd={};/**
3
+ * @license React
4
+ * react-jsx-runtime.production.js
5
+ *
6
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
7
+ *
8
+ * This source code is licensed under the MIT license found in the
9
+ * LICENSE file in the root directory of this source tree.
10
+ */var LP;function Eq(){if(LP)return xd;LP=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(i,r,s){var a=null;if(s!==void 0&&(a=""+s),r.key!==void 0&&(a=""+r.key),"key"in r){s={};for(var c in r)c!=="key"&&(s[c]=r[c])}else s=r;return r=s.ref,{$$typeof:t,type:i,key:a,ref:r!==void 0?r:null,props:s}}return xd.Fragment=e,xd.jsx=n,xd.jsxs=n,xd}var IP;function _q(){return IP||(IP=1,fS.exports=Eq()),fS.exports}var _=_q(),hS={exports:{}},ct={};/**
11
+ * @license React
12
+ * react.production.js
13
+ *
14
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
15
+ *
16
+ * This source code is licensed under the MIT license found in the
17
+ * LICENSE file in the root directory of this source tree.
18
+ */var jP;function Tq(){if(jP)return ct;jP=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),a=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),g=Symbol.for("react.view_transition"),y=Symbol.iterator;function v(I){return I===null||typeof I!="object"?null:(I=y&&I[y]||I["@@iterator"],typeof I=="function"?I:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,w={};function C(I,ie,B){this.props=I,this.context=ie,this.refs=w,this.updater=B||S}C.prototype.isReactComponent={},C.prototype.setState=function(I,ie){if(typeof I!="object"&&typeof I!="function"&&I!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,I,ie,"setState")},C.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function k(){}k.prototype=C.prototype;function A(I,ie,B){this.props=I,this.context=ie,this.refs=w,this.updater=B||S}var R=A.prototype=new k;R.constructor=A,x(R,C.prototype),R.isPureReactComponent=!0;var P=Array.isArray;function N(){}var $={H:null,A:null,T:null,S:null},D=Object.prototype.hasOwnProperty;function U(I,ie,B){var se=B.ref;return{$$typeof:t,type:I,key:ie,ref:se!==void 0?se:null,props:B}}function V(I,ie){return U(I.type,ie,I.props)}function X(I){return typeof I=="object"&&I!==null&&I.$$typeof===t}function ee(I){var ie={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(B){return ie[B]})}var le=/\/+/g;function re(I,ie){return typeof I=="object"&&I!==null&&I.key!=null?ee(""+I.key):ie.toString(36)}function G(I){switch(I.status){case"fulfilled":return I.value;case"rejected":throw I.reason;default:switch(typeof I.status=="string"?I.then(N,N):(I.status="pending",I.then(function(ie){I.status==="pending"&&(I.status="fulfilled",I.value=ie)},function(ie){I.status==="pending"&&(I.status="rejected",I.reason=ie)})),I.status){case"fulfilled":return I.value;case"rejected":throw I.reason}}throw I}function oe(I,ie,B,se,we){var _e=typeof I;(_e==="undefined"||_e==="boolean")&&(I=null);var be=!1;if(I===null)be=!0;else switch(_e){case"bigint":case"string":case"number":be=!0;break;case"object":switch(I.$$typeof){case t:case e:be=!0;break;case d:return be=I._init,oe(be(I._payload),ie,B,se,we)}}if(be)return we=we(I),be=se===""?"."+re(I,0):se,P(we)?(B="",be!=null&&(B=be.replace(le,"$&/")+"/"),oe(we,ie,B,"",function(Ie){return Ie})):we!=null&&(X(we)&&(we=V(we,B+(we.key==null||I&&I.key===we.key?"":(""+we.key).replace(le,"$&/")+"/")+be)),ie.push(we)),1;be=0;var Se=se===""?".":se+":";if(P(I))for(var Ee=0;Ee<I.length;Ee++)se=I[Ee],_e=Se+re(se,Ee),be+=oe(se,ie,B,_e,we);else if(Ee=v(I),typeof Ee=="function")for(I=Ee.call(I),Ee=0;!(se=I.next()).done;)se=se.value,_e=Se+re(se,Ee++),be+=oe(se,ie,B,_e,we);else if(_e==="object"){if(typeof I.then=="function")return oe(G(I),ie,B,se,we);throw ie=String(I),Error("Objects are not valid as a React child (found: "+(ie==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":ie)+"). If you meant to render a collection of children, use an array instead.")}return be}function K(I,ie,B){if(I==null)return I;var se=[],we=0;return oe(I,se,"","",function(_e){return ie.call(B,_e,we++)}),se}function me(I){if(I._status===-1){var ie=I._result,B=ie();B.then(function(se){(I._status===0||I._status===-1)&&(I._status=1,I._result=se,B.status===void 0&&(B.status="fulfilled",B.value=se))},function(se){(I._status===0||I._status===-1)&&(I._status=2,I._result=se,B.status===void 0&&(B.status="rejected",B.reason=se))}),I._status===-1&&(I._status=0,I._result=B)}if(I._status===1)return I._result.default;throw I._result}var fe=typeof reportError=="function"?reportError:function(I){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var ie=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof I=="object"&&I!==null&&typeof I.message=="string"?String(I.message):String(I),error:I});if(!window.dispatchEvent(ie))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",I);return}console.error(I)};function Te(I){var ie=$.T,B={};B.types=ie!==null?ie.types:null,$.T=B;try{var se=I(),we=$.S;we!==null&&we(B,se),typeof se=="object"&&se!==null&&typeof se.then=="function"&&se.then(N,fe)}catch(_e){fe(_e)}finally{ie!==null&&B.types!==null&&(ie.types=B.types),$.T=ie}}function ze(I){var ie=$.T;if(ie!==null){var B=ie.types;B===null?ie.types=[I]:B.indexOf(I)===-1&&B.push(I)}else Te(ze.bind(null,I))}var tt={map:K,forEach:function(I,ie,B){K(I,function(){ie.apply(this,arguments)},B)},count:function(I){var ie=0;return K(I,function(){ie++}),ie},toArray:function(I){return K(I,function(ie){return ie})||[]},only:function(I){if(!X(I))throw Error("React.Children.only expected to receive a single React element child.");return I}};return ct.Activity=m,ct.Children=tt,ct.Component=C,ct.Fragment=n,ct.Profiler=r,ct.PureComponent=A,ct.StrictMode=i,ct.Suspense=u,ct.ViewTransition=g,ct.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=$,ct.__COMPILER_RUNTIME={__proto__:null,c:function(I){return $.H.useMemoCache(I)}},ct.addTransitionType=ze,ct.cache=function(I){return function(){return I.apply(null,arguments)}},ct.cacheSignal=function(){return null},ct.cloneElement=function(I,ie,B){if(I==null)throw Error("The argument must be a React element, but you passed "+I+".");var se=x({},I.props),we=I.key;if(ie!=null)for(_e in ie.key!==void 0&&(we=""+ie.key),ie)!D.call(ie,_e)||_e==="key"||_e==="__self"||_e==="__source"||_e==="ref"&&ie.ref===void 0||(se[_e]=ie[_e]);var _e=arguments.length-2;if(_e===1)se.children=B;else if(1<_e){for(var be=Array(_e),Se=0;Se<_e;Se++)be[Se]=arguments[Se+2];se.children=be}return U(I.type,we,se)},ct.createContext=function(I){return I={$$typeof:a,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null},I.Provider=I,I.Consumer={$$typeof:s,_context:I},I},ct.createElement=function(I,ie,B){var se,we={},_e=null;if(ie!=null)for(se in ie.key!==void 0&&(_e=""+ie.key),ie)D.call(ie,se)&&se!=="key"&&se!=="__self"&&se!=="__source"&&(we[se]=ie[se]);var be=arguments.length-2;if(be===1)we.children=B;else if(1<be){for(var Se=Array(be),Ee=0;Ee<be;Ee++)Se[Ee]=arguments[Ee+2];we.children=Se}if(I&&I.defaultProps)for(se in be=I.defaultProps,be)we[se]===void 0&&(we[se]=be[se]);return U(I,_e,we)},ct.createRef=function(){return{current:null}},ct.forwardRef=function(I){return{$$typeof:c,render:I}},ct.isValidElement=X,ct.lazy=function(I){return{$$typeof:d,_payload:{_status:-1,_result:I},_init:me}},ct.memo=function(I,ie){return{$$typeof:h,type:I,compare:ie===void 0?null:ie}},ct.startTransition=Te,ct.unstable_useCacheRefresh=function(){return $.H.useCacheRefresh()},ct.use=function(I){return $.H.use(I)},ct.useActionState=function(I,ie,B){return $.H.useActionState(I,ie,B)},ct.useCallback=function(I,ie){return $.H.useCallback(I,ie)},ct.useContext=function(I){return $.H.useContext(I)},ct.useDebugValue=function(){},ct.useDeferredValue=function(I,ie){return $.H.useDeferredValue(I,ie)},ct.useEffect=function(I,ie){return $.H.useEffect(I,ie)},ct.useEffectEvent=function(I){return $.H.useEffectEvent(I)},ct.useId=function(){return $.H.useId()},ct.useImperativeHandle=function(I,ie,B){return $.H.useImperativeHandle(I,ie,B)},ct.useInsertionEffect=function(I,ie){return $.H.useInsertionEffect(I,ie)},ct.useLayoutEffect=function(I,ie){return $.H.useLayoutEffect(I,ie)},ct.useMemo=function(I,ie){return $.H.useMemo(I,ie)},ct.useOptimistic=function(I,ie){return $.H.useOptimistic(I,ie)},ct.useReducer=function(I,ie,B){return $.H.useReducer(I,ie,B)},ct.useRef=function(I){return $.H.useRef(I)},ct.useState=function(I){return $.H.useState(I)},ct.useSyncExternalStore=function(I,ie,B){return $.H.useSyncExternalStore(I,ie,B)},ct.useTransition=function(){return $.H.useTransition()},ct.version="19.3.0",ct}var BP;function YE(){return BP||(BP=1,hS.exports=Tq()),hS.exports}var T=YE();const kq=v2(T),uu=wq({__proto__:null,default:kq},[T]);var dS={exports:{}},wd={},pS={exports:{}},mS={};/**
19
+ * @license React
20
+ * scheduler.production.js
21
+ *
22
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
23
+ *
24
+ * This source code is licensed under the MIT license found in the
25
+ * LICENSE file in the root directory of this source tree.
26
+ */var zP;function Cq(){return zP||(zP=1,(function(t){function e(G,oe){var K=G.length;G.push(oe);e:for(;0<K;){var me=K-1>>>1,fe=G[me];if(0<r(fe,oe))G[me]=oe,G[K]=fe,K=me;else break e}}function n(G){return G.length===0?null:G[0]}function i(G){if(G.length===0)return null;var oe=G[0],K=G.pop();if(K!==oe){G[0]=K;e:for(var me=0,fe=G.length,Te=fe>>>1;me<Te;){var ze=2*(me+1)-1,tt=G[ze],I=ze+1,ie=G[I];if(0>r(tt,K))I<fe&&0>r(ie,tt)?(G[me]=ie,G[I]=K,me=I):(G[me]=tt,G[ze]=K,me=ze);else if(I<fe&&0>r(ie,K))G[me]=ie,G[I]=K,me=I;else break e}}return oe}function r(G,oe){var K=G.sortIndex-oe.sortIndex;return K!==0?K:G.id-oe.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var a=Date,c=a.now();t.unstable_now=function(){return a.now()-c}}var u=[],h=[],d=1,m=null,g=3,y=!1,v=!1,S=!1,x=!1,w=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function A(G){for(var oe=n(h);oe!==null;){if(oe.callback===null)i(h);else if(oe.startTime<=G)i(h),oe.sortIndex=oe.expirationTime,e(u,oe);else break;oe=n(h)}}function R(G){if(S=!1,A(G),!v)if(n(u)!==null)v=!0,P||(P=!0,X());else{var oe=n(h);oe!==null&&re(R,oe.startTime-G)}}var P=!1,N=-1,$=5,D=-1;function U(){return x?!0:!(t.unstable_now()-D<$)}function V(){if(x=!1,P){var G=t.unstable_now();D=G;var oe=!0;try{e:{v=!1,S&&(S=!1,C(N),N=-1),y=!0;var K=g;try{t:{for(A(G),m=n(u);m!==null&&!(m.expirationTime>G&&U());){var me=m.callback;if(typeof me=="function"){m.callback=null,g=m.priorityLevel;var fe=me(m.expirationTime<=G);if(G=t.unstable_now(),typeof fe=="function"){m.callback=fe,A(G),oe=!0;break t}m===n(u)&&i(u),A(G)}else i(u);m=n(u)}if(m!==null)oe=!0;else{var Te=n(h);Te!==null&&re(R,Te.startTime-G),oe=!1}}break e}finally{m=null,g=K,y=!1}oe=void 0}}finally{oe?X():P=!1}}}var X;if(typeof k=="function")X=function(){k(V)};else if(typeof MessageChannel<"u"){var ee=new MessageChannel,le=ee.port2;ee.port1.onmessage=V,X=function(){le.postMessage(null)}}else X=function(){w(V,0)};function re(G,oe){N=w(function(){G(t.unstable_now())},oe)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(G){G.callback=null},t.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<G?Math.floor(1e3/G):5},t.unstable_getCurrentPriorityLevel=function(){return g},t.unstable_next=function(G){switch(g){case 1:case 2:case 3:var oe=3;break;default:oe=g}var K=g;g=oe;try{return G()}finally{g=K}},t.unstable_requestPaint=function(){x=!0},t.unstable_runWithPriority=function(G,oe){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var K=g;g=G;try{return oe()}finally{g=K}},t.unstable_scheduleCallback=function(G,oe,K){var me=t.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?me+K:me):K=me,G){case 1:var fe=-1;break;case 2:fe=250;break;case 5:fe=1073741823;break;case 4:fe=1e4;break;default:fe=5e3}return fe=K+fe,G={id:d++,callback:oe,priorityLevel:G,startTime:K,expirationTime:fe,sortIndex:-1},K>me?(G.sortIndex=K,e(h,G),n(u)===null&&G===n(h)&&(S?(C(N),N=-1):S=!0,re(R,K-me))):(G.sortIndex=fe,e(u,G),v||y||(v=!0,P||(P=!0,X()))),G},t.unstable_shouldYield=U,t.unstable_wrapCallback=function(G){var oe=g;return function(){var K=g;g=oe;try{return G.apply(this,arguments)}finally{g=K}}}})(mS)),mS}var XP;function Aq(){return XP||(XP=1,pS.exports=Cq()),pS.exports}var gS={exports:{}},Ai={};/**
27
+ * @license React
28
+ * react-dom.production.js
29
+ *
30
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
31
+ *
32
+ * This source code is licensed under the MIT license found in the
33
+ * LICENSE file in the root directory of this source tree.
34
+ */var UP;function Rq(){if(UP)return Ai;UP=1;var t=YE();function e(d){var m="https://react.dev/errors/"+d;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)m+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+d+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var i={d:{f:n,r:function(){throw Error(e(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},r=Symbol.for("react.portal"),s=Symbol.for("react.recoverable"),a=Symbol.for("react.optimistic_key");function c(d,m,g){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:r,key:y==null?null:y===a?a:""+y,children:d,containerInfo:m,implementation:g}}var u=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(d,m){if(d==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Ai.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,Ai.browser=function(d){return{$$typeof:s,_reason:d}},Ai.createPortal=function(d,m){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(e(299));return c(d,m,null,g)},Ai.flushSync=function(d){var m=u.T,g=i.p;try{if(u.T=null,i.p=2,d)return d()}finally{u.T=m,i.p=g,i.d.f()}},Ai.preconnect=function(d,m){typeof d=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,i.d.C(d,m))},Ai.prefetchDNS=function(d){typeof d=="string"&&i.d.D(d)},Ai.preinit=function(d,m){if(typeof d=="string"&&m&&typeof m.as=="string"){var g=m.as,y=h(g,m.crossOrigin),v=typeof m.integrity=="string"?m.integrity:void 0,S=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;g==="style"?i.d.S(d,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:y,integrity:v,fetchPriority:S}):g==="script"&&i.d.X(d,{crossOrigin:y,integrity:v,fetchPriority:S,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Ai.preinitModule=function(d,m){if(typeof d=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var g=h(m.as,m.crossOrigin);i.d.M(d,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0})}}else m==null&&i.d.M(d)},Ai.preload=function(d,m){if(typeof d=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var g=m.as,y=h(g,m.crossOrigin);i.d.L(d,g,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},Ai.preloadModule=function(d,m){if(typeof d=="string")if(m){var g=h(m.as,m.crossOrigin);i.d.m(d,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0})}else i.d.m(d)},Ai.requestFormReset=function(d){i.d.r(d)},Ai.unstable_batchedUpdates=function(d,m){return d(m)},Ai.useFormState=function(d,m,g){return u.H.useFormState(d,m,g)},Ai.useFormStatus=function(){return u.H.useHostTransitionStatus()},Ai.version="19.3.0",Ai}var ZP;function S2(){if(ZP)return gS.exports;ZP=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),gS.exports=Rq(),gS.exports}/**
35
+ * @license React
36
+ * react-dom-client.production.js
37
+ *
38
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
39
+ *
40
+ * This source code is licensed under the MIT license found in the
41
+ * LICENSE file in the root directory of this source tree.
42
+ */var VP;function Pq(){if(VP)return wd;VP=1;var t=Aq(),e=YE(),n=S2();function i(o){var l="https://react.dev/errors/"+o;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var f=2;f<arguments.length;f++)l+="&args[]="+encodeURIComponent(arguments[f])}return"Minified React error #"+o+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function s(o){for(var l=o,f=l;f&&!f.alternate;)l=f,(l.flags&4098)!==0&&(o=l.return),f=l.return;for(;l.return;)l=l.return;return l.tag===3?o:null}function a(o){if(o.tag===13){var l=o.memoizedState;if(l===null&&(o=o.alternate,o!==null&&(l=o.memoizedState)),l!==null)return l.dehydrated}return null}function c(o){if(o.tag===31){var l=o.memoizedState;if(l===null&&(o=o.alternate,o!==null&&(l=o.memoizedState)),l!==null)return l.dehydrated}return null}function u(o){if(s(o)!==o)throw Error(i(188))}function h(o){var l=o.alternate;if(!l){if(l=s(o),l===null)throw Error(i(188));return l!==o?null:o}for(var f=o,p=l;;){var O=f.return;if(O===null)break;var b=O.alternate;if(b===null){if(p=O.return,p!==null){f=p;continue}break}if(O.child===b.child){for(b=O.child;b;){if(b===f)return u(O),o;if(b===p)return u(O),l;b=b.sibling}throw Error(i(188))}if(f.return!==p.return)f=O,p=b;else{for(var E=!1,M=O.child;M;){if(M===f){E=!0,f=O,p=b;break}if(M===p){E=!0,p=O,f=b;break}M=M.sibling}if(!E){for(M=b.child;M;){if(M===f){E=!0,f=b,p=O;break}if(M===p){E=!0,p=b,f=O;break}M=M.sibling}if(!E)throw Error(i(189))}}if(f.alternate!==p)throw Error(i(190))}if(f.tag!==3)throw Error(i(188));return f.stateNode.current===f?o:l}function d(o){var l=o.tag;if(l===5||l===26||l===27||l===6)return o;for(o=o.child;o!==null;){if(l=d(o),l!==null)return l;o=o.sibling}return null}function m(o,l,f,p,O,b){for(;o!==null;){if((o.tag===5||o.tag===27||o.tag===6)&&f(o,p,O,b)||(o.tag!==22||o.memoizedState===null)&&(l||o.tag!==5&&o.tag!==27)&&m(o.child,l,f,p,O,b))return!0;o=o.sibling}return!1}function g(o){for(o=o.return;o!==null;){if(o.tag===3||o.tag===5||o.tag===27)return o;o=o.return}return null}function y(o){var l=!1;for(o=o.return;o!==null&&(o.tag===4&&(l=!0),!(o.tag===3||o.tag===5||o.tag===27));)o=o.return;return l}function v(o){var l=[null,null],f=g(o);return f===null||S(l,o,f.child,{foundSelf:!1}),l}function S(o,l,f,p){for(;f!==null;){if(f===l)p.foundSelf=!0;else if(f.tag===5||f.tag===27||f.tag===6){if(p.foundSelf)return o[1]=f,!0;o[0]=f}else if((f.tag!==22||f.memoizedState===null)&&S(o,l,f.child,p))return!0;f=f.sibling}return!1}function x(o){switch(o.tag){case 5:case 27:case 6:return o.stateNode;case 3:return o.stateNode.containerInfo;default:throw Error(i(559))}}var w=null,C=null;function k(o,l,f){return o===f?!0:o===l?(w=o,!0):!1}function A(o,l,f){return o===f?(C=o,!1):o===l?(C!==null&&(w=o),!0):!1}function R(o){if(o===null)return null;do o=o===null?null:o.return;while(o&&o.tag!==5&&o.tag!==27&&o.tag!==3);return o||null}function P(o,l,f){for(var p=0,O=o;O;O=f(O))p++;O=0;for(var b=l;b;b=f(b))O++;for(;0<p-O;)o=f(o),p--;for(;0<O-p;)l=f(l),O--;for(;p--;){if(o===l||l!==null&&o===l.alternate)return o;o=f(o),l=f(l)}return null}var N=Object.assign,$=Symbol.for("react.element"),D=Symbol.for("react.transitional.element"),U=Symbol.for("react.portal"),V=Symbol.for("react.fragment"),X=Symbol.for("react.strict_mode"),ee=Symbol.for("react.profiler"),le=Symbol.for("react.consumer"),re=Symbol.for("react.context"),G=Symbol.for("react.forward_ref"),oe=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),me=Symbol.for("react.memo"),fe=Symbol.for("react.lazy"),Te=Symbol.for("react.activity"),ze=Symbol.for("react.legacy_hidden"),tt=Symbol.for("react.memo_cache_sentinel"),I=Symbol.for("react.view_transition"),ie=Symbol.for("react.recoverable"),B=Symbol.iterator;function se(o){return o===null||typeof o!="object"?null:(o=B&&o[B]||o["@@iterator"],typeof o=="function"?o:null)}var we=Symbol.for("react.client.reference");function _e(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===we?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case V:return"Fragment";case ee:return"Profiler";case X:return"StrictMode";case oe:return"Suspense";case K:return"SuspenseList";case Te:return"Activity";case I:return"ViewTransition"}if(typeof o=="object")switch(o.$$typeof){case U:return"Portal";case re:return o.displayName||"Context";case le:return(o._context.displayName||"Context")+".Consumer";case G:var l=o.render;return o=o.displayName,o||(o=l.displayName||l.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case me:return l=o.displayName||null,l!==null?l:_e(o.type)||"Memo";case fe:l=o._payload,o=o._init;try{return _e(o(l))}catch{}}return null}var be=Array.isArray,Se=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ee=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ie={pending:!1,data:null,method:null,action:null},Ye=[],Ge=-1;function qe(o){return{current:o}}function He(o){0>Ge||(o.current=Ye[Ge],Ye[Ge]=null,Ge--)}function Xe(o,l){Ge++,Ye[Ge]=o.current,o.current=l}var zn=qe(null),vn=qe(null),wn=qe(null),Ii=qe(null);function ci(o,l){switch(Xe(wn,l),Xe(vn,o),Xe(zn,null),l.nodeType){case 9:case 11:o=(o=l.documentElement)&&(o=o.namespaceURI)?VR(o):0;break;default:if(o=l.tagName,l=l.namespaceURI)l=VR(l),o=qR(l,o);else switch(o){case"svg":o=1;break;case"math":o=2;break;default:o=0}}He(zn),Xe(zn,o)}function ei(){He(zn),He(vn),He(wn)}function qi(o){var l=o.memoizedState;l!==null&&(rf._currentValue=l.memoizedState,Xe(Ii,o)),l=zn.current;var f=qR(l,o.type);l!==f&&(Xe(vn,o),Xe(zn,f))}function En(o){vn.current===o&&(He(zn),He(vn)),Ii.current===o&&(He(Ii),rf._currentValue=Ie)}var cr,yi;function Nn(o){if(cr===void 0)try{throw Error()}catch(f){var l=f.stack.trim().match(/\n( *(at )?)/);cr=l&&l[1]||"",yi=-1<f.stack.indexOf(`
43
+ at`)?" (<anonymous>)":-1<f.stack.indexOf("@")?"@unknown:0:0":""}return`
44
+ `+cr+o+yi}var vi=!1;function ks(o,l){if(!o||vi)return"";vi=!0;var f=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var p={DetermineComponentFrameRoot:function(){try{if(l){var pe=function(){throw Error()};if(Object.defineProperty(pe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(pe,[])}catch(Me){var F=Me}Reflect.construct(o,[],pe)}else{try{pe.call()}catch(Me){F=Me}pe=!1;try{var te=Object.getOwnPropertyDescriptor(o.prototype,"props");Object.defineProperty(o.prototype,"props",{configurable:!0,set:function(){throw Error()}}),pe=!0,new o}finally{pe&&(te!==void 0?Object.defineProperty(o.prototype,"props",te):delete o.prototype.props)}}}else{try{throw Error()}catch(Me){F=Me}(pe=o())&&typeof pe.catch=="function"&&pe.catch(function(){})}}catch(Me){if(Me&&F&&typeof Me.stack=="string")return[Me.stack,F.stack]}return[null,null]}};p.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var O=Object.getOwnPropertyDescriptor(p.DetermineComponentFrameRoot,"name");O&&O.configurable&&Object.defineProperty(p.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=p.DetermineComponentFrameRoot(),E=b[0],M=b[1];if(E&&M){var j=E.split(`
45
+ `),W=M.split(`
46
+ `);for(O=p=0;p<j.length&&!j[p].includes("DetermineComponentFrameRoot");)p++;for(;O<W.length&&!W[O].includes("DetermineComponentFrameRoot");)O++;if(p===j.length||O===W.length)for(p=j.length-1,O=W.length-1;1<=p&&0<=O&&j[p]!==W[O];)O--;for(;1<=p&&0<=O;p--,O--)if(j[p]!==W[O]){if(p!==1||O!==1)do if(p--,O--,0>O||j[p]!==W[O]){var ne=`
47
+ `+j[p].replace(" at new "," at ");return o.displayName&&ne.includes("<anonymous>")&&(ne=ne.replace("<anonymous>",o.displayName)),ne}while(1<=p&&0<=O);break}}}finally{vi=!1,Error.prepareStackTrace=f}return(f=o?o.displayName||o.name:"")?Nn(f):""}function Cs(o,l){switch(o.tag){case 26:case 27:case 5:return Nn(o.type);case 16:return Nn("Lazy");case 13:return o.child!==l&&l!==null?Nn("Suspense Fallback"):Nn("Suspense");case 19:return Nn("SuspenseList");case 0:case 15:return ks(o.type,!1);case 11:return ks(o.type.render,!1);case 1:return ks(o.type,!0);case 31:return Nn("Activity");case 30:return Nn("ViewTransition");default:return""}}function As(o){try{var l="",f=null;do l+=Cs(o,f),f=o,o=o.return;while(o);return l}catch(p){return`
48
+ Error generating stack: `+p.message+`
49
+ `+p.stack}}var Kr=Object.prototype.hasOwnProperty,ur=t.unstable_scheduleCallback,Jr=t.unstable_cancelCallback,eo=t.unstable_shouldYield,to=t.unstable_requestPaint,Qn=t.unstable_now,Rt=t.unstable_getCurrentPriorityLevel,Cr=t.unstable_ImmediatePriority,Yi=t.unstable_UserBlockingPriority,$n=t.unstable_NormalPriority,Z=t.unstable_LowPriority,he=t.unstable_IdlePriority,Pe=t.log,ot=t.unstable_setDisableYieldValue,Xt=null,vt=null;function Le(o){if(typeof Pe=="function"&&ot(o),vt&&typeof vt.setStrictMode=="function")try{vt.setStrictMode(Xt,o)}catch{}}var Ce=Math.clz32?Math.clz32:qt,nt=Math.log,jt=Math.LN2;function qt(o){return o>>>=0,o===0?32:31-(nt(o)/jt|0)|0}var fr=256,es=262144,no=4194304;function ts(o){var l=o&42;if(l!==0)return l;switch(o&-o){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return o&-o;case 262144:case 524288:case 1048576:case 2097152:return o&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return o&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return o}}function ns(o,l,f){var p=o.pendingLanes;if(p===0)return 0;var O=0,b=o.suspendedLanes,E=o.pingedLanes;o=o.warmLanes;var M=p&134217727;return M!==0?(p=M&~b,p!==0?O=ts(p):(E&=M,E!==0?O=ts(E):f||(f=M&~o,f!==0&&(O=ts(f))))):(M=p&~b,M!==0?O=ts(M):E!==0?O=ts(E):f||(f=p&~o,f!==0&&(O=ts(f)))),O===0?0:l!==0&&l!==O&&(l&b)===0&&(b=O&-O,f=l&-l,b>=f||b===32&&(f&4194048)!==0)?l:O}function io(o,l){return(o.pendingLanes&~(o.suspendedLanes&~o.pingedLanes)&l)===0}function La(o,l){(l&8)!==0&&(l|=l&32);var f=o.entangledLanes;if(f!==0)for(o=o.entanglements,f&=l;0<f;){var p=31-Ce(f),O=1<<p;l|=o[p],f&=~O}return l}function Nh(o,l){switch(o){case 1:case 2:case 4:case 8:case 64:return l+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Rs(){var o=no;return no<<=1,(no&62914560)===0&&(no=4194304),o}function ro(o){for(var l=[],f=0;31>f;f++)l.push(o);return l}function Ko(o,l){o.pendingLanes|=l,l!==268435456&&(o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0)}function pn(o,l,f,p,O,b){var E=o.pendingLanes;o.pendingLanes=f,o.suspendedLanes=0,o.pingedLanes=0,o.warmLanes=0,o.expiredLanes&=f,o.entangledLanes&=f,o.errorRecoveryDisabledLanes&=f,o.shellSuspendCounter=0;var M=o.entanglements,j=o.expirationTimes,W=o.hiddenUpdates;for(f=E&~f;0<f;){var ne=31-Ce(f),pe=1<<ne;M[ne]=0,j[ne]=-1;var F=W[ne];if(F!==null)for(W[ne]=null,ne=0;ne<F.length;ne++){var te=F[ne];te!==null&&(te.lane&=-536870913)}f&=~pe}p!==0&&Ps(o,p,0),b!==0&&O===0&&o.tag!==0&&(o.suspendedLanes|=b&~(E&~l))}function Ps(o,l,f){o.pendingLanes|=l,o.suspendedLanes&=~l;var p=31-Ce(l);o.entangledLanes|=l,o.entanglements[p]=o.entanglements[p]|1073741824|f&261930}function Ar(o,l){var f=o.entangledLanes|=l;for(o=o.entanglements;f;){var p=31-Ce(f),O=1<<p;O&l|o[p]&l&&(o[p]|=l),f&=~O}}function Ia(o,l){var f=l&-l;return f=(f&42)!==0?1:so(f),(f&(o.suspendedLanes|l))!==0?0:f}function so(o){switch(o){case 2:o=1;break;case 8:o=4;break;case 32:o=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:o=128;break;case 268435456:o=134217728;break;default:o=0}return o}function ja(o){return o&=-o,2<o?8<o?(o&134217727)!==0?32:268435456:8:2}function Jl(){var o=Ee.p;return o!==0?o:(o=window.event,o===void 0?32:AP(o.type))}function yu(o,l){var f=Ee.p;try{return Ee.p=o,l()}finally{Ee.p=f}}var ji=Math.random().toString(36).slice(2),Dn="__reactFiber$"+ji,xe="__reactProps$"+ji,je="__reactContainer$"+ji,bt="__reactEvents$"+ji,Dt="__reactListeners$"+ji,Kt="__reactHandles$"+ji,Si="__reactResources$"+ji,ui="__reactMarker$"+ji,Rr="__reactLoad$"+ji;function _n(o){delete o[Dn],delete o[xe],delete o[Dt],delete o[Kt]}function Xn(o){var l;if(l=o[Dn])return l;for(var f=o.parentNode;f;){if(l=f[je]||f[Dn]){if(f=l.alternate,l.child!==null||f!==null&&f.child!==null)for(o=cP(o);o!==null;){if(f=o[Dn])return f;o=cP(o)}return l}o=f,f=o.parentNode}return null}function is(o){if(o=o[Dn]||o[je]){var l=o.tag;if(l===5||l===6||l===13||l===31||l===26||l===27||l===3)return o}return null}function oo(o){var l=o.tag;if(l===5||l===26||l===27||l===6)return o.stateNode;throw Error(i(33))}function Ms(o){var l=o[Si];return l||(l=o[Si]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function Tn(o){o[ui]=!0}function vu(o){o[Rr]=void 0}var ec=new Set,Su={};function Gi(o,l){Pr(o,l),Pr(o+"Capture",l)}function Pr(o,l){for(Su[o]=l,o=0;o<l.length;o++)ec.add(l[o])}var xi=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Ba={},Jo={};function it(o){return Kr.call(Jo,o)?!0:Kr.call(Ba,o)?!1:xi.test(o)?Jo[o]=!0:(Ba[o]=!0,!1)}var ht=!1;function un(){var o=ht;return ht=!1,o}function dt(o,l,f){if(it(l))if(f===null)o.removeAttribute(l);else{switch(typeof f){case"undefined":case"function":case"symbol":o.removeAttribute(l);return;case"boolean":var p=l.toLowerCase().slice(0,5);if(p!=="data-"&&p!=="aria-"){o.removeAttribute(l);return}}o.setAttribute(l,f)}}function Ns(o,l,f){if(f===null)o.removeAttribute(l);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(l);return}o.setAttribute(l,f)}}function kn(o,l,f,p){if(p===null)o.removeAttribute(f);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":o.removeAttribute(f);return}o.setAttributeNS(l,f,p)}}function ti(o){switch(typeof o){case"bigint":case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function ea(o){var l=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function Re(o,l,f){var p=Object.getOwnPropertyDescriptor(o.constructor.prototype,l);if(!o.hasOwnProperty(l)&&typeof p<"u"&&typeof p.get=="function"&&typeof p.set=="function"){var O=p.get,b=p.set;return Object.defineProperty(o,l,{configurable:!0,get:function(){return O.call(this)},set:function(E){f=""+E,b.call(this,E)}}),Object.defineProperty(o,l,{enumerable:p.enumerable}),{getValue:function(){return f},setValue:function(E){f=""+E},stopTracking:function(){o._valueTracker=null,delete o[l]}}}}function Ue(o){if(!o._valueTracker){var l=ea(o)?"checked":"value";o._valueTracker=Re(o,l,""+o[l])}}function ft(o){if(!o)return!1;var l=o._valueTracker;if(!l)return!0;var f=l.getValue(),p="";return o&&(p=ea(o)?o.checked?"true":"false":o.value),o=p,o!==f?(l.setValue(o),!0):!1}var Qt=/[\n"\\]/g;function Lt(o){return o.replace(Qt,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function Fi(o,l,f,p,O,b,E,M){o.name="",E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?o.type=E:o.removeAttribute("type"),l!=null?E==="number"?(l===0&&o.value===""||o.value!=l)&&(o.value=""+ti(l)):o.value!==""+ti(l)&&(o.value=""+ti(l)):E!=="submit"&&E!=="reset"||o.removeAttribute("value"),l!=null?E==="number"&&o.value==l?za(o,ti(o.value)):za(o,ti(l)):f!=null?za(o,ti(f)):p!=null&&o.removeAttribute("value"),O==null&&b!=null&&(o.defaultChecked=!!b),O!=null&&(o.checked=O&&typeof O!="function"&&typeof O!="symbol"),M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?o.name=""+ti(M):o.removeAttribute("name")}function xu(o,l,f,p,O,b,E,M){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(o.type=b),l!=null||f!=null){if(!(b!=="submit"&&b!=="reset"||l!=null)){Ue(o);return}f=f!=null?""+ti(f):"",l=l!=null?""+ti(l):f,M||l===o.value||(o.value=l),o.defaultValue=l}p=p??O,p=typeof p!="function"&&typeof p!="symbol"&&!!p,o.checked=M?o.checked:!!p,o.defaultChecked=!!p,E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"&&(o.name=E),Ue(o)}function za(o,l){o.defaultValue!==""+l&&(o.defaultValue=""+l)}function ao(o,l,f,p){if(o=o.options,l){l={};for(var O=0;O<f.length;O++)l["$"+f[O]]=!0;for(f=0;f<o.length;f++)O=l.hasOwnProperty("$"+o[f].value),o[f].selected!==O&&(o[f].selected=O),O&&p&&(o[f].defaultSelected=!0)}else{for(f=""+ti(f),l=null,O=0;O<o.length;O++){if(o[O].value===f){o[O].selected=!0,p&&(o[O].defaultSelected=!0);return}l!==null||o[O].disabled||(l=o[O])}l!==null&&(l.selected=!0)}}function Xa(o,l,f){if(l!=null&&(l=""+ti(l),l!==o.value&&(o.value=l),f==null)){o.defaultValue!==l&&(o.defaultValue=l);return}o.defaultValue=f!=null?""+ti(f):""}function wu(o,l,f,p){if(l==null){if(p!=null){if(f!=null)throw Error(i(92));if(be(p)){if(1<p.length)throw Error(i(93));p=p[0]}f=p}f==null&&(f=""),l=f}f=ti(l),o.defaultValue=f,p=o.textContent,p===f&&p!==""&&p!==null&&(o.value=p),Ue(o)}function ye(o,l){if(l){var f=o.firstChild;if(f&&f===o.lastChild&&f.nodeType===3){f.nodeValue=l;return}}o.textContent=l}var Q=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Y(o,l,f){var p=l.indexOf("--")===0;f==null||typeof f=="boolean"||f===""?p?o.setProperty(l,""):l==="float"?o.cssFloat="":o[l]="":p?o.setProperty(l,f):typeof f!="number"||f===0||Q.has(l)?l==="float"?o.cssFloat=f:o[l]=(""+f).trim():o[l]=f+"px"}function Oe(o,l,f){if(l!=null&&typeof l!="object")throw Error(i(62));if(o=o.style,f!=null){for(var p in f)!f.hasOwnProperty(p)||l!=null&&l.hasOwnProperty(p)||(p.indexOf("--")===0?o.setProperty(p,""):p==="float"?o.cssFloat="":o[p]="",ht=!0);for(var O in l)p=l[O],l.hasOwnProperty(O)&&f[O]!==p&&(Y(o,O,p),ht=!0)}else for(var b in l)l.hasOwnProperty(b)&&Y(o,b,l[b])}function ge(o){if(o.indexOf("-")===-1)return!1;switch(o){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var We=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["maskType","mask-type"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),rt=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function pt(o){return rt.test(""+o)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":o}function Ut(){}var hr=null;function ni(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var Ln=null,Mr=null;function wi(o){var l=is(o);if(l&&(o=l.stateNode)){var f=o[xe]||null;e:switch(o=l.stateNode,l.type){case"input":if(Fi(o,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name),l=f.name,f.type==="radio"&&l!=null){for(f=o;f.parentNode;)f=f.parentNode;for(f=f.querySelectorAll('input[name="'+Lt(""+l)+'"][type="radio"]'),l=0;l<f.length;l++){var p=f[l];if(p!==o&&p.form===o.form){var O=p[xe]||null;if(!O)throw Error(i(90));Fi(p,O.value,O.defaultValue,O.defaultValue,O.checked,O.defaultChecked,O.type,O.name)}}for(l=0;l<f.length;l++)p=f[l],p.form===o.form&&ft(p)}break e;case"textarea":Xa(o,f.value,f.defaultValue);break e;case"select":l=f.value,l!=null&&ao(o,!!f.multiple,l,!1)}}}var Eu=!1;function Bk(o,l,f){if(Eu)return o(l,f);Eu=!0;try{var p=o(l);return p}finally{if(Eu=!1,(Ln!==null||Mr!==null)&&(pg(),Ln&&(l=Ln,o=Mr,Mr=Ln=null,wi(l),o)))for(l=0;l<o.length;l++)wi(o[l])}}function Qh(o,l){var f=o.stateNode;if(f===null)return null;var p=f[xe]||null;if(p===null)return null;f=p[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(p=!p.disabled)||(o=o.type,p=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!p;break e;default:o=!1}if(o)return null;if(f&&typeof f!="function")throw Error(i(231,l,typeof f));return f}var ta=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Yy=!1;if(ta)try{var $h={};Object.defineProperty($h,"passive",{get:function(){Yy=!0}}),window.addEventListener("test",$h,$h),window.removeEventListener("test",$h,$h)}catch{Yy=!1}var Ua=null,Gy=null,mm=null;function zk(){if(mm)return mm;var o,l=Gy,f=l.length,p,O="value"in Ua?Ua.value:Ua.textContent,b=O.length;for(o=0;o<f&&l[o]===O[o];o++);var E=f-o;for(p=1;p<=E&&l[f-p]===O[b-p];p++);return mm=O.slice(o,1<p?1-p:void 0)}function gm(o){var l=o.keyCode;return"charCode"in o?(o=o.charCode,o===0&&l===13&&(o=13)):o=l,o===10&&(o=13),32<=o||o===13?o:0}function Om(){return!0}function Xk(){return!1}function Hi(o){function l(f,p,O,b,E){this._reactName=f,this._targetInst=O,this.type=p,this.nativeEvent=b,this.target=E,this.currentTarget=null;for(var M in o)o.hasOwnProperty(M)&&(f=o[M],this[M]=f?f(b):b[M]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Om:Xk,this.isPropagationStopped=Xk,this}return N(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var f=this.nativeEvent;f&&(f.preventDefault?f.preventDefault():typeof f.returnValue!="unknown"&&(f.returnValue=!1),this.isDefaultPrevented=Om)},stopPropagation:function(){var f=this.nativeEvent;f&&(f.stopPropagation?f.stopPropagation():typeof f.cancelBubble!="unknown"&&(f.cancelBubble=!0),this.isPropagationStopped=Om)},persist:function(){},isPersistent:Om}),l}var Za={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},bm=Hi(Za),Dh=N({},Za,{view:0,detail:0}),qZ=Hi(Dh),Fy,Hy,Lh,ym=N({},Dh,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ky,button:0,buttons:0,relatedTarget:function(o){return o.relatedTarget===void 0?o.fromElement===o.srcElement?o.toElement:o.fromElement:o.relatedTarget},movementX:function(o){return"movementX"in o?o.movementX:(o!==Lh&&(Lh&&o.type==="mousemove"?(Fy=o.screenX-Lh.screenX,Hy=o.screenY-Lh.screenY):Hy=Fy=0,Lh=o),Fy)},movementY:function(o){return"movementY"in o?o.movementY:Hy}}),Uk=Hi(ym),YZ=N({},ym,{dataTransfer:0}),GZ=Hi(YZ),FZ=N({},Dh,{relatedTarget:0}),Wy=Hi(FZ),HZ=N({},Za,{animationName:0,elapsedTime:0,pseudoElement:0}),WZ=Hi(HZ),KZ=N({},Za,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),JZ=Hi(KZ),eV=N({},Za,{data:0}),Zk=Hi(eV),tV={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},nV={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},iV={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function rV(o){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(o):(o=iV[o])?!!l[o]:!1}function Ky(){return rV}var sV=N({},Dh,{key:function(o){if(o.key){var l=tV[o.key]||o.key;if(l!=="Unidentified")return l}return o.type==="keypress"?(o=gm(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?nV[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ky,charCode:function(o){return o.type==="keypress"?gm(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?gm(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),oV=Hi(sV),aV=N({},ym,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Vk=Hi(aV),lV=N({},Za,{submitter:0}),cV=Hi(lV),uV=N({},Dh,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ky}),fV=Hi(uV),hV=N({},Za,{propertyName:0,elapsedTime:0,pseudoElement:0}),dV=Hi(hV),pV=N({},ym,{deltaX:function(o){return"deltaX"in o?o.deltaX:"wheelDeltaX"in o?-o.wheelDeltaX:0},deltaY:function(o){return"deltaY"in o?o.deltaY:"wheelDeltaY"in o?-o.wheelDeltaY:"wheelDelta"in o?-o.wheelDelta:0},deltaZ:0,deltaMode:0}),mV=Hi(pV),gV=N({},Za,{newState:0,oldState:0,source:0}),OV=Hi(gV),bV=[9,13,27,32],Jy=ta&&"CompositionEvent"in window,Ih=null;ta&&"documentMode"in document&&(Ih=document.documentMode);var yV=ta&&"TextEvent"in window&&!Ih,qk=ta&&(!Jy||Ih&&8<Ih&&11>=Ih),Yk=" ",Gk=!1;function Fk(o,l){switch(o){case"keyup":return bV.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hk(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var _u=!1;function vV(o,l){switch(o){case"compositionend":return Hk(l);case"keypress":return l.which!==32?null:(Gk=!0,Yk);case"textInput":return o=l.data,o===Yk&&Gk?null:o;default:return null}}function SV(o,l){if(_u)return o==="compositionend"||!Jy&&Fk(o,l)?(o=zk(),mm=Gy=Ua=null,_u=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return qk&&l.locale!=="ko"?null:l.data;default:return null}}var xV={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Wk(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l==="input"?!!xV[o.type]:l==="textarea"}function Kk(o,l,f,p){Ln?Mr?Mr.push(p):Mr=[p]:Ln=p,l=vg(l,"onChange"),0<l.length&&(f=new bm("onChange","change",null,f,p),o.push({event:f,listeners:l}))}var jh=null,Bh=null;function wV(o){jR(o,0)}function vm(o){var l=oo(o);if(ft(l))return o}function Jk(o,l){if(o==="change")return l}var eC=!1;if(ta){var e0;if(ta){var t0="oninput"in document;if(!t0){var tC=document.createElement("div");tC.setAttribute("oninput","return;"),t0=typeof tC.oninput=="function"}e0=t0}else e0=!1;eC=e0&&(!document.documentMode||9<document.documentMode)}function nC(){jh&&(jh.detachEvent("onpropertychange",iC),Bh=jh=null)}function iC(o){if(o.propertyName==="value"&&vm(Bh)){var l=[];Kk(l,Bh,o,ni(o)),Bk(wV,l)}}function EV(o,l,f){o==="focusin"?(nC(),jh=l,Bh=f,jh.attachEvent("onpropertychange",iC)):o==="focusout"&&nC()}function _V(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return vm(Bh)}function TV(o,l){if(o==="click")return vm(l)}function kV(o,l){if(o==="input"||o==="change")return vm(l)}function CV(o,l){return o===l&&(o!==0||1/o===1/l)||o!==o&&l!==l}var Nr=typeof Object.is=="function"?Object.is:CV;function zh(o,l){if(Nr(o,l))return!0;if(typeof o!="object"||o===null||typeof l!="object"||l===null)return!1;var f=Object.keys(o),p=Object.keys(l);if(f.length!==p.length)return!1;for(p=0;p<f.length;p++){var O=f[p];if(!Kr.call(l,O)||!Nr(o[O],l[O]))return!1}return!0}function n0(o){if(o=o||(typeof document<"u"?document:void 0),typeof o>"u")return null;try{return o.activeElement||o.body}catch{return o.body}}function rC(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function sC(o,l){var f=rC(o);o=0;for(var p;f;){if(f.nodeType===3){if(p=o+f.textContent.length,o<=l&&p>=l)return{node:f,offset:l-o};o=p}e:{for(;f;){if(f.nextSibling){f=f.nextSibling;break e}f=f.parentNode}f=void 0}f=rC(f)}}function oC(o,l){return o&&l?o===l?!0:o&&o.nodeType===3?!1:l&&l.nodeType===3?oC(o,l.parentNode):"contains"in o?o.contains(l):o.compareDocumentPosition?!!(o.compareDocumentPosition(l)&16):!1:!1}function aC(o){o=o!=null&&o.ownerDocument!=null&&o.ownerDocument.defaultView!=null?o.ownerDocument.defaultView:window;for(var l=n0(o.document);l instanceof o.HTMLIFrameElement;){try{var f=typeof l.contentWindow.location.href=="string"}catch{f=!1}if(f)o=l.contentWindow;else break;l=n0(o.document)}return l}function i0(o){var l=o&&o.nodeName&&o.nodeName.toLowerCase();return l&&(l==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||l==="textarea"||o.contentEditable==="true")}var AV=ta&&"documentMode"in document&&11>=document.documentMode,Tu=null,r0=null,Xh=null,s0=!1;function lC(o,l,f){var p=f.window===f?f.document:f.nodeType===9?f:f.ownerDocument;s0||Tu==null||Tu!==n0(p)||(p=Tu,"selectionStart"in p&&i0(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),Xh&&zh(Xh,p)||(Xh=p,p=vg(r0,"onSelect"),0<p.length&&(l=new bm("onSelect","select",null,l,f),o.push({event:l,listeners:p}),l.target=Tu)))}function tc(o,l){var f={};return f[o.toLowerCase()]=l.toLowerCase(),f["Webkit"+o]="webkit"+l,f["Moz"+o]="moz"+l,f}var ku={animationend:tc("Animation","AnimationEnd"),animationiteration:tc("Animation","AnimationIteration"),animationstart:tc("Animation","AnimationStart"),transitionrun:tc("Transition","TransitionRun"),transitionstart:tc("Transition","TransitionStart"),transitioncancel:tc("Transition","TransitionCancel"),transitionend:tc("Transition","TransitionEnd")},o0={},cC={};ta&&(cC=document.createElement("div").style,"AnimationEvent"in window||(delete ku.animationend.animation,delete ku.animationiteration.animation,delete ku.animationstart.animation),"TransitionEvent"in window||delete ku.transitionend.transition);function nc(o){if(o0[o])return o0[o];if(!ku[o])return o;var l=ku[o],f;for(f in l)if(l.hasOwnProperty(f)&&f in cC)return o0[o]=l[f];return o}var uC=nc("animationend"),fC=nc("animationiteration"),hC=nc("animationstart"),RV=nc("transitionrun"),PV=nc("transitionstart"),MV=nc("transitioncancel"),dC=nc("transitionend"),pC=new Map,a0="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");a0.push("scrollEnd");function Qs(o,l){pC.set(o,l),Gi(l,[o])}var NV=0;function na(o,l){if(o.name!=null&&o.name!=="auto")return o.name;if(l.autoName!==null)return l.autoName;o=Is.identifierPrefix;var f=NV++;return o="_"+o+"t_"+f.toString(32)+"_",l.autoName=o}function mC(o){if(o==null||typeof o=="string")return o;var l=null,f=Yu;if(f!==null)for(var p=0;p<f.length;p++){var O=o[f[p]];if(O!=null){if(O==="none")return"none";l=l==null?O:l+(" "+O)}}return l??o.default}function ia(o,l){return o=mC(o),l=mC(l),l==null?o==="auto"?null:o:l==="auto"?null:l}var Sm=typeof reportError=="function"?reportError:function(o){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof o=="object"&&o!==null&&typeof o.message=="string"?String(o.message):String(o),error:o});if(!window.dispatchEvent(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",o);return}console.error(o)},rs=[],Cu=0,l0=0;function xm(){for(var o=Cu,l=l0=Cu=0;l<o;){var f=rs[l];rs[l++]=null;var p=rs[l];rs[l++]=null;var O=rs[l];rs[l++]=null;var b=rs[l];if(rs[l++]=null,p!==null&&O!==null){var E=p.pending;E===null?O.next=O:(O.next=E.next,E.next=O),p.pending=O}b!==0&&gC(f,O,b)}}function wm(o,l,f,p){rs[Cu++]=o,rs[Cu++]=l,rs[Cu++]=f,rs[Cu++]=p,l0|=p,o.lanes|=p,o=o.alternate,o!==null&&(o.lanes|=p)}function c0(o,l,f,p){return wm(o,l,f,p),Em(o)}function ic(o,l){return wm(o,null,null,l),Em(o)}function gC(o,l,f){o.lanes|=f;var p=o.alternate;p!==null&&(p.lanes|=f);for(var O=!1,b=o.return;b!==null;)b.childLanes|=f,p=b.alternate,p!==null&&(p.childLanes|=f),b.tag===22&&(o=b.stateNode,o===null||o._visibility&1||(O=!0)),o=b,b=b.return;return o.tag===3?(b=o.stateNode,O&&l!==null&&(O=31-Ce(f),o=b.hiddenUpdates,p=o[O],p===null?o[O]=[l]:p.push(l),l.lane=f|536870912),b):null}function Em(o){if(50<ud)throw ud=0,dg=null,Error(i(185));for(var l=o.return;l!==null;)o=l,l=o.return;return o.tag===3?o.stateNode:null}var Au={};function QV(o,l,f,p){this.tag=o,this.key=f,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function dr(o,l,f,p){return new QV(o,l,f,p)}function u0(o){return o=o.prototype,!(!o||!o.isReactComponent)}function ra(o,l){var f=o.alternate;return f===null?(f=dr(o.tag,l,o.key,o.mode),f.elementType=o.elementType,f.type=o.type,f.stateNode=o.stateNode,f.alternate=o,o.alternate=f):(f.pendingProps=l,f.type=o.type,f.flags=0,f.subtreeFlags=0,f.deletions=null),f.flags=o.flags&1206910976,f.childLanes=o.childLanes,f.lanes=o.lanes,f.child=o.child,f.memoizedProps=o.memoizedProps,f.memoizedState=o.memoizedState,f.updateQueue=o.updateQueue,l=o.dependencies,f.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},f.sibling=o.sibling,f.index=o.index,f.ref=o.ref,f.refCleanup=o.refCleanup,f}function OC(o,l){o.flags&=1206910978;var f=o.alternate;return f===null?(o.childLanes=0,o.lanes=l,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=f.childLanes,o.lanes=f.lanes,o.child=f.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=f.memoizedProps,o.memoizedState=f.memoizedState,o.updateQueue=f.updateQueue,o.type=f.type,l=f.dependencies,o.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),o}function _m(o,l,f,p,O,b){var E=0;if(p=o,typeof p=="function")u0(p)&&(E=1);else if(typeof p=="string")E=lq(o,f,zn.current)?26:o==="html"||o==="head"||o==="body"?27:5;else e:switch(p){case Te:return o=dr(31,f,l,O),o.elementType=Te,o.lanes=b,o;case V:return rc(f.children,O,b,l);case X:E=8,O|=24;break;case ee:return o=dr(12,f,l,O|2),o.elementType=ee,o.lanes=b,o;case oe:return o=dr(13,f,l,O),o.elementType=oe,o.lanes=b,o;case K:return o=dr(19,f,l,O),o.elementType=K,o.lanes=b,o;case ze:case I:return o=O|32,o=dr(30,f,l,o),o.elementType=I,o.lanes=b,o.stateNode={autoName:null,paired:null,clones:null,ref:null},o;default:if(typeof p=="object"&&p!==null)switch(p.$$typeof){case re:E=10;break e;case le:E=9;break e;case G:E=11;break e;case me:E=14;break e;case fe:E=16,p=null;break e}E=29,f=Error(i(130,o===null?"null":typeof o,"")),p=null}return l=dr(E,f,l,O),l.elementType=o,l.type=p,l.lanes=b,l}function rc(o,l,f,p){return o=dr(7,o,p,l),o.lanes=f,o}function f0(o,l,f){return o=dr(6,o,null,l),o.lanes=f,o}function bC(o){var l=dr(18,null,null,0);return l.stateNode=o,l}function h0(o,l,f){return l=dr(4,o.children!==null?o.children:[],o.key,l),l.lanes=f,l.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},l}var yC=new WeakMap;function ss(o,l){if(typeof o=="object"&&o!==null){var f=yC.get(o);return f!==void 0?f:(l={value:o,source:l,stack:As(l)},yC.set(o,l),l)}return{value:o,source:l,stack:As(l)}}var Ru=[],Pu=0,Tm=null,Uh=0,os=[],as=0,Va=null,lo=1,co="";function sa(o,l){Ru[Pu++]=Uh,Ru[Pu++]=Tm,Tm=o,Uh=l}function vC(o,l,f){os[as++]=lo,os[as++]=co,os[as++]=Va,Va=o;var p=lo;o=co;var O=32-Ce(p)-1;p&=~(1<<O),f+=1;var b=32-Ce(l)+O;if(30<b){var E=O-O%5;b=(p&(1<<E)-1).toString(32),p>>=E,O-=E,lo=1<<32-Ce(l)+O|f<<O|p,co=b+o}else lo=1<<b|f<<O|p,co=o}function km(o){o.return!==null&&(sa(o,1),vC(o,1,0))}function d0(o){for(;o===Tm;)Tm=Ru[--Pu],Ru[Pu]=null,Uh=Ru[--Pu],Ru[Pu]=null;for(;o===Va;)Va=os[--as],os[as]=null,co=os[--as],os[as]=null,lo=os[--as],os[as]=null}function SC(o,l){os[as++]=lo,os[as++]=co,os[as++]=Va,lo=l.id,co=l.overflow,Va=o}var fi=null,fn=null,yt=!1,qa=null,ls=!1,p0=Error(i(519));function Ya(o){var l=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Zh(ss(l,o)),p0}function xC(o){var l=o.stateNode,f=o.type,p=o.memoizedProps;switch(l[Dn]=o,l[xe]=p,f){case"dialog":xt("cancel",l),xt("close",l);break;case"iframe":case"object":case"embed":xt("load",l);break;case"video":case"audio":for(f=0;f<hd.length;f++)xt(hd[f],l);break;case"source":xt("error",l);break;case"img":case"image":case"link":xt("error",l),xt("load",l);break;case"details":xt("toggle",l);break;case"input":xt("invalid",l),xu(l,p.value,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name,!0);break;case"select":xt("invalid",l);break;case"textarea":xt("invalid",l),wu(l,p.value,p.defaultValue,p.children)}f=p.children,typeof f!="string"&&typeof f!="number"&&typeof f!="bigint"||l.textContent===""+f||p.suppressHydrationWarning===!0||UR(l.textContent,f)?(p.popover!=null&&(xt("beforetoggle",l),xt("toggle",l)),p.onScroll!=null&&xt("scroll",l),p.onScrollEnd!=null&&xt("scrollend",l),p.onClick!=null&&(l.onclick=Ut),l=!0):l=!1,l||Ya(o,!0)}function Cm(o){for(fi=o.return;fi;)switch(fi.tag){case 5:case 31:case 13:ls=!1;return;case 27:case 3:ls=!0;return;default:fi=fi.return}}function Mu(o){if(o!==fi)return!1;if(!yt)return Cm(o),yt=!0,!1;var l=o.tag,f;if((f=l!==3&&l!==27)&&((f=l===5)&&(f=o.type,f=!(f!=="form"&&f!=="button")||Zv(o.type,o.memoizedProps)),f=!f),f&&fn&&Ya(o),Cm(o),l===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(i(317));fn=lP(o)}else if(l===31){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(i(317));fn=lP(o)}else l===27?(l=fn,cl(o.type)?(o=Jv,Jv=null,fn=o):fn=l):fn=fi?us(o.stateNode.nextSibling):null;return!0}function sc(){fn=fi=null,yt=!1}function m0(){var o=qa;return o!==null&&(gr===null?gr=o:gr.push.apply(gr,o),qa=null),o}function Zh(o){qa===null?qa=[o]:qa.push(o)}var g0=qe(null),oc=null,oa=null;function Ga(o,l,f){Xe(g0,l._currentValue),l._currentValue=f}function aa(o){o._currentValue=g0.current,He(g0)}function Am(o,l,f){for(;o!==null;){var p=o.alternate;if((o.childLanes&l)!==l?(o.childLanes|=l,p!==null&&(p.childLanes|=l)):p!==null&&(p.childLanes&l)!==l&&(p.childLanes|=l),o===f)break;o=o.return}}function O0(o,l,f,p){var O=o.child;for(O!==null&&(O.return=o);O!==null;){var b=O.dependencies;if(b!==null){var E=O.child;b=b.firstContext;e:for(;b!==null;){var M=b;b=O;for(var j=0;j<l.length;j++)if(M.context===l[j]){b.lanes|=f,M=b.alternate,M!==null&&(M.lanes|=f),Am(b.return,f,o),p||(E=null);break e}b=M.next}}else if(O.tag===18){if(E=O.return,E===null)throw Error(i(341));E.lanes|=f,b=E.alternate,b!==null&&(b.lanes|=f),Am(E,f,o),E=null}else O.tag===13&&O.memoizedState!==null&&O.memoizedState.dehydrated===null?(O.lanes|=f,E=O.alternate,E!==null&&(E.lanes|=f),Am(O.return,f,o),E=O.child,E=E!==null?E.sibling:null):E=O.child;if(E!==null)E.return=O;else for(E=O;E!==null;){if(E===o){E=null;break}if(O=E.sibling,O!==null){O.return=E.return,E=O;break}E=E.return}O=E}}function ac(o,l,f,p){o=null;for(var O=l,b=!1;O!==null;){if(!b){if((O.flags&524288)!==0)b=!0;else if((O.flags&262144)!==0)break}if(O.tag===10){var E=O.alternate;if(E===null)throw Error(i(387));if(E=E.memoizedProps,E!==null){var M=O.type;Nr(O.pendingProps.value,E.value)||(o!==null?o.push(M):o=[M])}}else if(O===Ii.current){if(E=O.alternate,E===null)throw Error(i(387));E.memoizedState.memoizedState!==O.memoizedState.memoizedState&&(o!==null?o.push(rf):o=[rf])}O=O.return}return o!==null&&O0(l,o,f,p),l.flags|=262144,o!==null}function Rm(o){for(o=o.firstContext;o!==null;){if(!Nr(o.context._currentValue,o.memoizedValue))return!0;o=o.next}return!1}function lc(o){oc=o,oa=null,o=o.dependencies,o!==null&&(o.firstContext=null)}function Ei(o){return wC(oc,o)}function Pm(o,l){return oc===null&&lc(o),wC(o,l)}function wC(o,l){var f=l._currentValue;if(l={context:l,memoizedValue:f,next:null},oa===null){if(o===null)throw Error(i(308));oa=l,o.dependencies={lanes:0,firstContext:l},o.flags|=524288}else oa=oa.next=l;return f}var $V=typeof AbortController<"u"?AbortController:function(){var o=[],l=this.signal={aborted:!1,addEventListener:function(f,p){o.push(p)}};this.abort=function(){l.aborted=!0,o.forEach(function(f){return f()})}},DV=t.unstable_scheduleCallback,LV=t.unstable_NormalPriority,Un={$$typeof:re,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function b0(){return{controller:new $V,data:new Map,refCount:0}}function Vh(o){o.refCount--,o.refCount===0&&DV(LV,function(){o.controller.abort()})}function EC(o,l){if((o.pendingLanes&4194048)!==0){var f=o.transitionTypes;for(f===null&&(f=o.transitionTypes=[]),o=0;o<l.length;o++){var p=l[o];f.indexOf(p)===-1&&f.push(p)}}}var qh=null;function IV(o){var l=o.transitionTypes;return o.transitionTypes=null,l}var Yh=null,y0=0,cc=0,Nu=null;function jV(o,l){if(Yh===null){var f=Yh=[];y0=0,cc=$v(),Nu={status:"pending",value:void 0,then:function(p){f.push(p)}}}return y0++,l.then(_C,_C),l}function _C(){if(--y0===0&&(qh=null,Yh!==null)){Nu!==null&&(Nu.status="fulfilled");var o=Yh;Yh=null,cc=0,Nu=null;for(var l=0;l<o.length;l++)(0,o[l])()}}function BV(o,l){var f=[],p={status:"pending",value:null,reason:null,then:function(O){f.push(O)}};return o.then(function(){p.status="fulfilled",p.value=l;for(var O=0;O<f.length;O++)(0,f[O])(l)},function(O){for(p.status="rejected",p.reason=O,O=0;O<f.length;O++)(0,f[O])(void 0)}),p}var TC=Se.S;Se.S=function(o,l){if(bR=Qn(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&jV(o,l),qh!==null)for(var f=Wu;f!==null;)EC(f,qh),f=f.next;if(f=o.types,f!==null){for(var p=Wu;p!==null;)EC(p,f),p=p.next;if(cc!==0){p=qh,p===null&&(p=qh=[]);for(var O=0;O<f.length;O++){var b=f[O];p.indexOf(b)===-1&&p.push(b)}}}TC!==null&&TC(o,l)};var uc=qe(null);function v0(){var o=uc.current;return o!==null?o:sn.pooledCache}function Mm(o,l){l===null?Xe(uc,uc.current):Xe(uc,l.pool)}function kC(){var o=v0();return o===null?null:{parent:Un._currentValue,pool:o}}var Qu=Error(i(460)),S0=Error(i(474)),Nm=Error(i(542)),Qm={then:function(){}};function CC(o){return o=o.status,o==="fulfilled"||o==="rejected"}function AC(o,l,f){switch(f=o[f],f===void 0?o.push(l):f!==l&&(l.then(Ut,Ut),l=f),l.status){case"fulfilled":return l.value;case"rejected":throw o=l.reason,PC(o),o===void 0&&!("reason"in l)?Error(i(600)):o;default:if(typeof l.status=="string")l.then(Ut,Ut);else{if(o=sn,o!==null&&100<o.shellSuspendCounter)throw Error(i(482));o=l,o.status="pending",o.then(function(p){if(l.status==="pending"){var O=l;O.status="fulfilled",O.value=p}},function(p){if(l.status==="pending"){var O=l;O.status="rejected",O.reason=p}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw o=l.reason,PC(o),o}throw hc=l,Qu}}function fc(o){try{var l=o._init;return l(o._payload)}catch(f){throw f!==null&&typeof f=="object"&&typeof f.then=="function"?(hc=f,Qu):f}}var hc=null;function RC(){if(hc===null)throw Error(i(459));var o=hc;return hc=null,o}function PC(o){if(o===Qu||o===Nm)throw Error(i(483))}var $u=null,Gh=0;function $m(o){var l=Gh;return Gh+=1,$u===null&&($u=[]),AC($u,o,l)}function Fa(o,l){l=l.props.ref,o.ref=l!==void 0?l:null}function Dm(o,l){throw l.$$typeof===$?Error(i(525)):(o=Object.prototype.toString.call(l),Error(i(31,o==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":o)))}function MC(o){function l(H,q){if(o){var J=H.deletions;J===null?(H.deletions=[q],H.flags|=16):J.push(q)}}function f(H,q){if(!o)return null;for(;q!==null;)l(H,q),q=q.sibling;return null}function p(H){for(var q=new Map;H!==null;)H.key===null?q.set(H.index,H):q.set(H.key,H),H=H.sibling;return q}function O(H,q){return H=ra(H,q),H.index=0,H.sibling=null,H}function b(H,q,J){return H.index=J,o?(J=H.alternate,J!==null?(J=J.index,J<q?(H.flags|=2,q):J):(H.flags|=134217730,q)):(H.flags|=1048576,q)}function E(H){return o&&H.alternate===null&&(H.flags|=134217730),H}function M(H,q,J,de){return q===null||q.tag!==6?(q=f0(J,H.mode,de),q.return=H,q):(q=O(q,J),q.return=H,q)}function j(H,q,J,de){var Be=J.type;return Be===V?(H=ne(H,q,J.props.children,de,J.key),Fa(H,J),H):q!==null&&(q.elementType===Be||typeof Be=="object"&&Be!==null&&Be.$$typeof===fe&&fc(Be)===q.type)?(q=O(q,J.props),Fa(q,J),q.return=H,q):(q=_m(J.type,J.key,J.props,null,H.mode,de),Fa(q,J),q.return=H,q)}function W(H,q,J,de){return q===null||q.tag!==4||q.stateNode.containerInfo!==J.containerInfo||q.stateNode.implementation!==J.implementation?(q=h0(J,H.mode,de),q.return=H,q):(q=O(q,J.children||[]),q.return=H,q)}function ne(H,q,J,de,Be){return q===null||q.tag!==7?(q=rc(J,H.mode,de,Be),q.return=H,q):(q=O(q,J),q.return=H,q)}function pe(H,q,J){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return q=f0(""+q,H.mode,J),q.return=H,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case D:return J=_m(q.type,q.key,q.props,null,H.mode,J),Fa(J,q),J.return=H,J;case U:return q=h0(q,H.mode,J),q.return=H,q;case fe:return q=fc(q),pe(H,q,J)}if(be(q)||se(q))return q=rc(q,H.mode,J,null),q.return=H,q;if(typeof q.then=="function")return pe(H,$m(q),J);if(q.$$typeof===re)return pe(H,Pm(H,q),J);Dm(H,q)}return null}function F(H,q,J,de){var Be=q!==null?q.key:null;if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return Be!==null?null:M(H,q,""+J,de);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case D:return J.key===Be?j(H,q,J,de):null;case U:return J.key===Be?W(H,q,J,de):null;case fe:return J=fc(J),F(H,q,J,de)}if(be(J)||se(J))return Be!==null?null:ne(H,q,J,de,null);if(typeof J.then=="function")return F(H,q,$m(J),de);if(J.$$typeof===re)return F(H,q,Pm(H,J),de);Dm(H,J)}return null}function te(H,q,J,de,Be){if(typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint")return H=H.get(J)||null,M(q,H,""+de,Be);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case D:return H=H.get(de.key===null?J:de.key)||null,j(q,H,de,Be);case U:return H=H.get(de.key===null?J:de.key)||null,W(q,H,de,Be);case fe:return de=fc(de),te(H,q,J,de,Be)}if(be(de)||se(de))return H=H.get(J)||null,ne(q,H,de,Be,null);if(typeof de.then=="function")return te(H,q,J,$m(de),Be);if(de.$$typeof===re)return te(H,q,J,Pm(q,de),Be);Dm(q,de)}return null}function Me(H,q,J,de){for(var Be=null,Tt=null,Ke=q,st=q=0,qn=null;Ke!==null&&st<J.length;st++){Ke.index>st?(qn=Ke,Ke=null):qn=Ke.sibling;var Pt=F(H,Ke,J[st],de);if(Pt===null){Ke===null&&(Ke=qn);break}o&&Ke&&Pt.alternate===null&&l(H,Ke),q=b(Pt,q,st),Tt===null?Be=Pt:Tt.sibling=Pt,Tt=Pt,Ke=qn}if(st===J.length)return f(H,Ke),yt&&sa(H,st),Be;if(Ke===null){for(;st<J.length;st++)Ke=pe(H,J[st],de),Ke!==null&&(q=b(Ke,q,st),Tt===null?Be=Ke:Tt.sibling=Ke,Tt=Ke);return yt&&sa(H,st),Be}for(Ke=p(Ke);st<J.length;st++)qn=te(Ke,H,st,J[st],de),qn!==null&&(o&&(Pt=qn.alternate,Pt!==null&&Ke.delete(Pt.key===null?st:Pt.key)),q=b(qn,q,st),Tt===null?Be=qn:Tt.sibling=qn,Tt=qn);return o&&Ke.forEach(function(pl){return l(H,pl)}),yt&&sa(H,st),Be}function Ze(H,q,J,de){if(J==null)throw Error(i(151));for(var Be=null,Tt=null,Ke=q,st=q=0,qn=null,Pt=J.next();Ke!==null&&!Pt.done;st++,Pt=J.next()){Ke.index>st?(qn=Ke,Ke=null):qn=Ke.sibling;var pl=F(H,Ke,Pt.value,de);if(pl===null){Ke===null&&(Ke=qn);break}o&&Ke&&pl.alternate===null&&l(H,Ke),q=b(pl,q,st),Tt===null?Be=pl:Tt.sibling=pl,Tt=pl,Ke=qn}if(Pt.done)return f(H,Ke),yt&&sa(H,st),Be;if(Ke===null){for(;!Pt.done;st++,Pt=J.next())Pt=pe(H,Pt.value,de),Pt!==null&&(q=b(Pt,q,st),Tt===null?Be=Pt:Tt.sibling=Pt,Tt=Pt);return yt&&sa(H,st),Be}for(Ke=p(Ke);!Pt.done;st++,Pt=J.next())Pt=te(Ke,H,st,Pt.value,de),Pt!==null&&(o&&(qn=Pt.alternate,qn!==null&&Ke.delete(qn.key===null?st:qn.key)),q=b(Pt,q,st),Tt===null?Be=Pt:Tt.sibling=Pt,Tt=Pt);return o&&Ke.forEach(function(vq){return l(H,vq)}),yt&&sa(H,st),Be}function gt(H,q,J,de){if(typeof J=="object"&&J!==null&&J.type===V&&J.key===null&&J.props.ref===void 0&&(J=J.props.children),typeof J=="object"&&J!==null){switch(J.$$typeof){case D:e:{for(var Be=J.key;q!==null;){if(q.key===Be){if(Be=J.type,Be===V){if(q.tag===7){f(H,q.sibling),de=O(q,J.props.children),Fa(de,J),de.return=H,H=de;break e}}else if(q.elementType===Be||typeof Be=="object"&&Be!==null&&Be.$$typeof===fe&&fc(Be)===q.type){f(H,q.sibling),de=O(q,J.props),Fa(de,J),de.return=H,H=de;break e}f(H,q);break}else l(H,q);q=q.sibling}J.type===V?(de=rc(J.props.children,H.mode,de,J.key),Fa(de,J),de.return=H,H=de):(de=_m(J.type,J.key,J.props,null,H.mode,de),Fa(de,J),de.return=H,H=de)}return E(H);case U:e:{for(Be=J.key;q!==null;){if(q.key===Be)if(q.tag===4&&q.stateNode.containerInfo===J.containerInfo&&q.stateNode.implementation===J.implementation){f(H,q.sibling),de=O(q,J.children||[]),de.return=H,H=de;break e}else{f(H,q);break}else l(H,q);q=q.sibling}de=h0(J,H.mode,de),de.return=H,H=de}return E(H);case fe:return J=fc(J),gt(H,q,J,de)}if(be(J))return Me(H,q,J,de);if(se(J)){if(Be=se(J),typeof Be!="function")throw Error(i(150));return J=Be.call(J),Ze(H,q,J,de)}if(typeof J.then=="function")return gt(H,q,$m(J),de);if(J.$$typeof===re)return gt(H,q,Pm(H,J),de);Dm(H,J)}return typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint"?(J=""+J,q!==null&&q.tag===6?(f(H,q.sibling),de=O(q,J),de.return=H,H=de):(f(H,q),de=f0(J,H.mode,de),de.return=H,H=de),E(H)):f(H,q)}return function(H,q,J,de){try{Gh=0;var Be=gt(H,q,J,de);return $u=null,Be}catch(Ke){if(Ke===Qu||Ke===Nm)throw Ke;var Tt=dr(29,Ke,null,H.mode);return Tt.lanes=de,Tt.return=H,Tt}finally{}}}var dc=MC(!0),NC=MC(!1),Ha=!1;function x0(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function w0(o,l){o=o.updateQueue,l.updateQueue===o&&(l.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,callbacks:null})}function Wa(o){return{lane:o,tag:0,payload:null,callback:null,next:null}}function Ka(o,l,f){var p=o.updateQueue;if(p===null)return null;if(p=p.shared,(Bt&2)!==0){var O=p.pending;return O===null?l.next=l:(l.next=O.next,O.next=l),p.pending=l,l=Em(o),gC(o,null,f),l}return wm(o,p,l,f),Em(o)}function Fh(o,l,f){if(l=l.updateQueue,l!==null&&(l=l.shared,(f&4194048)!==0)){var p=l.lanes;p&=o.pendingLanes,f|=p,l.lanes=f,Ar(o,f)}}function E0(o,l){var f=o.updateQueue,p=o.alternate;if(p!==null&&(p=p.updateQueue,f===p)){var O=null,b=null;if(f=f.firstBaseUpdate,f!==null){do{var E={lane:f.lane,tag:f.tag,payload:f.payload,callback:null,next:null};b===null?O=b=E:b=b.next=E,f=f.next}while(f!==null);b===null?O=b=l:b=b.next=l}else O=b=l;f={baseState:p.baseState,firstBaseUpdate:O,lastBaseUpdate:b,shared:p.shared,callbacks:p.callbacks},o.updateQueue=f;return}o=f.lastBaseUpdate,o===null?f.firstBaseUpdate=l:o.next=l,f.lastBaseUpdate=l}var _0=!1;function Hh(){if(_0){var o=Nu;if(o!==null)throw o}}function Wh(o,l,f,p){_0=!1;var O=o.updateQueue;Ha=!1;var b=O.firstBaseUpdate,E=O.lastBaseUpdate,M=O.shared.pending;if(M!==null){O.shared.pending=null;var j=M,W=j.next;j.next=null,E===null?b=W:E.next=W,E=j;var ne=o.alternate;ne!==null&&(ne=ne.updateQueue,M=ne.lastBaseUpdate,M!==E&&(M===null?ne.firstBaseUpdate=W:M.next=W,ne.lastBaseUpdate=j))}if(b!==null){var pe=O.baseState;E=0,ne=W=j=null,M=b;do{var F=M.lane&-536870913,te=F!==M.lane;if(te?(_t&F)===F:(p&F)===F){F!==0&&F===cc&&(_0=!0),ne!==null&&(ne=ne.next={lane:0,tag:M.tag,payload:M.payload,callback:null,next:null});e:{var Me=o,Ze=M;F=l;var gt=f;switch(Ze.tag){case 1:if(Me=Ze.payload,typeof Me=="function"){pe=Me.call(gt,pe,F);break e}pe=Me;break e;case 3:Me.flags=Me.flags&-65537|128;case 0:if(Me=Ze.payload,F=typeof Me=="function"?Me.call(gt,pe,F):Me,F==null)break e;pe=N({},pe,F);break e;case 2:Ha=!0}}F=M.callback,F!==null&&(o.flags|=64,te&&(o.flags|=8192),te=O.callbacks,te===null?O.callbacks=[F]:te.push(F))}else te={lane:F,tag:M.tag,payload:M.payload,callback:M.callback,next:null},ne===null?(W=ne=te,j=pe):ne=ne.next=te,E|=F;if(M=M.next,M===null){if(M=O.shared.pending,M===null)break;te=M,M=te.next,te.next=null,O.lastBaseUpdate=te,O.shared.pending=null}}while(!0);ne===null&&(j=pe),O.baseState=j,O.firstBaseUpdate=W,O.lastBaseUpdate=ne,b===null&&(O.shared.lanes=0),sl|=E,o.lanes=E,o.memoizedState=pe}}function QC(o,l){if(typeof o!="function")throw Error(i(191,o));o.call(l)}function $C(o,l){var f=o.callbacks;if(f!==null)for(o.callbacks=null,o=0;o<f.length;o++)QC(f[o],l)}var Ja=qe(null),Lm=qe(0);function DC(o,l){o=ha,Xe(Lm,o),Xe(Ja,l),ha=o|l.baseLanes}function T0(){Xe(Lm,ha),Xe(Ja,Ja.current)}function k0(){ha=Lm.current,He(Ja),He(Lm)}var _i=qe(null),Bi=null;function el(o){var l=o.alternate;Xe(Ti,Ti.current&1),Xe(_i,o),Bi===null&&(l===null||Ja.current!==null||l.memoizedState!==null)&&(Bi=o)}function C0(o){Xe(Ti,Ti.current),Xe(_i,o),Bi===null&&(Bi=o)}function LC(o){o.tag===22?(Xe(Ti,Ti.current),Xe(_i,o),Bi===null&&(Bi=o)):tl()}function tl(){Xe(Ti,Ti.current),Xe(_i,_i.current)}function Qr(o){He(_i),Bi===o&&(Bi=null),He(Ti)}var Ti=qe(0);function Kh(o,l){Xe(_i,_i.current),Xe(Ti,l)}function A0(o){He(Ti),He(_i),Bi===o&&(Bi=null)}function Im(o){for(var l=o;l!==null;){if(l.tag===13){var f=l.memoizedState;if(f!==null&&(f=f.dehydrated,f===null||Wv(f)||Kv(f)))return l}else if(l.tag===19&&l.memoizedProps.revealOrder!=="independent"){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var la=0,mt=null,Jt=null,Zn=null,jm=!1,Du=!1,pc=!1,Bm=0,Jh=0,Lu=null,zV=0;function Cn(){throw Error(i(321))}function R0(o,l){if(l===null)return!1;for(var f=0;f<l.length&&f<o.length;f++)if(!Nr(o[f],l[f]))return!1;return!0}function P0(o,l,f,p,O,b){return la=b,mt=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,Se.H=o===null||o.memoizedState===null?vA:SA,pc=!1,b=f(p,O),pc=!1,Du&&(b=jC(l,f,p,O)),IC(o),b}function IC(o){Se.H=Ym;var l=Jt!==null&&Jt.next!==null;if(la=0,Zn=Jt=mt=null,jm=!1,Jh=0,Lu=null,l)throw Error(i(300));o===null||Vn||(o=o.dependencies,o!==null&&Rm(o)&&(Vn=!0))}function jC(o,l,f,p){mt=o;var O=0;do{if(Du&&(Lu=null),Jh=0,Du=!1,25<=O)throw Error(i(301));if(O+=1,Zn=Jt=null,o.updateQueue!=null){var b=o.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}Se.H=FV,b=l(f,p)}while(Du);return b}function XV(){var o=Se.H,l=o.useState()[0];return l=typeof l.then=="function"?ed(l):l,o=o.useState()[0],(Jt!==null?Jt.memoizedState:null)!==o&&(mt.flags|=1024),l}function M0(){var o=Bm!==0;return Bm=0,o}function N0(o,l,f){l.updateQueue=o.updateQueue,l.flags&=-2053,o.lanes&=~f}function Q0(o){if(jm){for(o=o.memoizedState;o!==null;){var l=o.queue;l!==null&&(l.pending=null),o=o.next}jm=!1}la=0,Zn=Jt=mt=null,Du=!1,Jh=Bm=0,Lu=null}function Wi(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Zn===null?mt.memoizedState=Zn=o:Zn=Zn.next=o,Zn}function In(){if(Jt===null){var o=mt.alternate;o=o!==null?o.memoizedState:null}else o=Jt.next;var l=Zn===null?mt.memoizedState:Zn.next;if(l!==null)Zn=l,Jt=o;else{if(o===null)throw mt.alternate===null?Error(i(467)):Error(i(310));Jt=o,o={memoizedState:Jt.memoizedState,baseState:Jt.baseState,baseQueue:Jt.baseQueue,queue:Jt.queue,next:null},Zn===null?mt.memoizedState=Zn=o:Zn=Zn.next=o}return Zn}function zm(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ed(o){var l=Jh;return Jh+=1,Lu===null&&(Lu=[]),o=AC(Lu,o,l),l=mt,(Zn===null?l.memoizedState:Zn.next)===null&&(l=l.alternate,Se.H=l===null||l.memoizedState===null?vA:SA),o}function Xm(o){if(o!==null&&typeof o=="object"){if(typeof o.then=="function")return ed(o);if(o.$$typeof===ie)return;if(o.$$typeof===re)return Ei(o)}throw Error(i(438,String(o)))}function $0(o){var l=null,f=mt.updateQueue;if(f!==null&&(l=f.memoCache),l==null){var p=mt.alternate;p!==null&&(p=p.updateQueue,p!==null&&(p=p.memoCache,p!=null&&(l={data:p.data.map(function(O){return O.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),f===null&&(f=zm(),mt.updateQueue=f),f.memoCache=l,f=l.data[l.index],f===void 0)for(f=l.data[l.index]=Array(o),p=0;p<o;p++)f[p]=tt;return l.index++,f}function ca(o,l){return typeof l=="function"?l(o):l}function Um(o){var l=In();return D0(l,Jt,o)}function D0(o,l,f){var p=o.queue;if(p===null)throw Error(i(311));p.lastRenderedReducer=f;var O=o.baseQueue,b=p.pending;if(b!==null){if(O!==null){var E=O.next;O.next=b.next,b.next=E}l.baseQueue=O=b,p.pending=null}if(b=o.baseState,O===null)o.memoizedState=b;else{l=O.next;var M=E=null,j=null,W=l,ne=!1;do{var pe=W.lane&-536870913;if(pe!==W.lane?(_t&pe)===pe:(la&pe)===pe){var F=W.revertLane;if(F===0)j!==null&&(j=j.next={lane:0,revertLane:0,gesture:null,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null}),pe===cc&&(ne=!0);else if((la&F)===F){W=W.next,F===cc&&(ne=!0);continue}else pe={lane:0,revertLane:W.revertLane,gesture:null,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null},j===null?(M=j=pe,E=b):j=j.next=pe,mt.lanes|=F,sl|=F;pe=W.action,pc&&f(b,pe),b=W.hasEagerState?W.eagerState:f(b,pe)}else F={lane:pe,revertLane:W.revertLane,gesture:W.gesture,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null},j===null?(M=j=F,E=b):j=j.next=F,mt.lanes|=pe,sl|=pe;W=W.next}while(W!==null&&W!==l);if(j===null?E=b:j.next=M,!Nr(b,o.memoizedState)&&(Vn=!0,ne&&(f=Nu,f!==null)))throw f;o.memoizedState=b,o.baseState=E,o.baseQueue=j,p.lastRenderedState=b}return O===null&&(p.lanes=0),[o.memoizedState,p.dispatch]}function L0(o){var l=In(),f=l.queue;if(f===null)throw Error(i(311));f.lastRenderedReducer=o;var p=f.dispatch,O=f.pending,b=l.memoizedState;if(O!==null){f.pending=null;var E=O=O.next;do b=o(b,E.action),E=E.next;while(E!==O);Nr(b,l.memoizedState)||(Vn=!0),l.memoizedState=b,l.baseQueue===null&&(l.baseState=b),f.lastRenderedState=b}return[b,p]}function BC(o,l,f){var p=mt,O=In(),b=yt;if(b){if(f===void 0)throw Error(i(407));f=f()}else f=l();var E=!Nr((Jt||O).memoizedState,f);if(E&&(O.memoizedState=f,Vn=!0),O=O.queue,B0(UC.bind(null,p,O,o),[o]),o=O.getSnapshot!==l||E||Zn!==null&&(Zn.memoizedState.tag&1)!==0,Iu(o?9:8,{destroy:void 0},XC.bind(null,p,O,f,l),null),o){if(p.flags|=2048,sn===null)throw Error(i(349));b||(la&127)!==0||zC(p,l,f)}return f}function zC(o,l,f){o.flags|=16384,o={getSnapshot:l,value:f},l=mt.updateQueue,l===null?(l=zm(),mt.updateQueue=l,l.stores=[o]):(f=l.stores,f===null?l.stores=[o]:f.push(o))}function XC(o,l,f,p){l.value=f,l.getSnapshot=p,ZC(l)&&VC(o)}function UC(o,l,f){return f(function(){ZC(l)&&VC(o)})}function ZC(o){var l=o.getSnapshot;o=o.value;try{var f=l();return!Nr(o,f)}catch{return!0}}function VC(o){var l=ic(o,2);l!==null&&Or(l,o,2)}function I0(o){var l=Wi();if(typeof o=="function"){var f=o;if(o=f(),pc){Le(!0);try{f()}finally{Le(!1)}}}return l.memoizedState=l.baseState=o,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ca,lastRenderedState:o},l}function qC(o,l,f,p){return o.baseState=f,D0(o,Jt,typeof p=="function"?p:ca)}function UV(o,l,f,p,O){if(qm(o))throw Error(i(485));if(o=l.action,o!==null){var b={payload:O,action:o,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(E){b.listeners.push(E)}};Se.T!==null?f(!0):b.isTransition=!1,p(b),f=l.pending,f===null?(b.next=l.pending=b,YC(l,b)):(b.next=f.next,l.pending=f.next=b)}}function YC(o,l){var f=l.action,p=l.payload,O=o.state;if(l.isTransition){var b=Se.T,E={};E.types=b!==null?b.types:null,Se.T=E;try{var M=f(O,p),j=Se.S;j!==null&&j(E,M),GC(o,l,M)}catch(W){j0(o,l,W)}finally{b!==null&&E.types!==null&&(b.types=E.types),Se.T=b}}else try{b=f(O,p),GC(o,l,b)}catch(W){j0(o,l,W)}}function GC(o,l,f){f!==null&&typeof f=="object"&&typeof f.then=="function"?f.then(function(p){FC(o,l,p)},function(p){return j0(o,l,p)}):FC(o,l,f)}function FC(o,l,f){l.status="fulfilled",l.value=f,HC(l),o.state=f,l=o.pending,l!==null&&(f=l.next,f===l?o.pending=null:(f=f.next,l.next=f,YC(o,f)))}function j0(o,l,f){var p=o.pending;if(o.pending=null,p!==null){p=p.next;do l.status="rejected",l.reason=f,HC(l),l=l.next;while(l!==p)}o.action=null}function HC(o){o=o.listeners;for(var l=0;l<o.length;l++)(0,o[l])()}function WC(o,l){return l}function KC(o,l){if(yt){var f=sn.formState;if(f!==null){e:{var p=mt;if(yt){if(fn){t:{for(var O=fn,b=ls;O.nodeType!==8;){if(!b){O=null;break t}if(O=us(O.nextSibling),O===null){O=null;break t}}b=O.data,O=b==="F!"||b==="F"?O:null}if(O){fn=us(O.nextSibling),p=O.data==="F!";break e}}Ya(p)}p=!1}p&&(l=f[0])}}return f=Wi(),f.memoizedState=f.baseState=l,p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:WC,lastRenderedState:l},f.queue=p,f=OA.bind(null,mt,p),p.dispatch=f,p=I0(!1),b=V0.bind(null,mt,!1,p.queue),p=Wi(),O={state:l,dispatch:null,action:o,pending:null},p.queue=O,f=UV.bind(null,mt,O,b,f),O.dispatch=f,p.memoizedState=o,[l,f,!1]}function JC(o){var l=In();return eA(l,Jt,o)}function eA(o,l,f){if(l=D0(o,l,WC)[0],o=Um(ca)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var p=ed(l)}catch(E){throw E===Qu?Nm:E}else p=l;l=In();var O=l.queue,b=O.dispatch;return f!==l.memoizedState&&(mt.flags|=2048,Iu(9,{destroy:void 0},ZV.bind(null,O,f),null)),[p,b,o]}function ZV(o,l){o.action=l}function tA(o){var l=In(),f=Jt;if(f!==null)return eA(l,f,o);In(),l=l.memoizedState,f=In();var p=f.queue.dispatch;return f.memoizedState=o,[l,p,!1]}function Iu(o,l,f,p){return o={tag:o,create:f,deps:p,inst:l,next:null},l=mt.updateQueue,l===null&&(l=zm(),mt.updateQueue=l),f=l.lastEffect,f===null?l.lastEffect=o.next=o:(p=f.next,f.next=o,o.next=p,l.lastEffect=o),o}function nA(){return In().memoizedState}function Zm(o,l,f,p){var O=Wi();mt.flags|=o,O.memoizedState=Iu(1|l,{destroy:void 0},f,p===void 0?null:p)}function Vm(o,l,f,p){var O=In();p=p===void 0?null:p;var b=O.memoizedState.inst;Jt!==null&&p!==null&&R0(p,Jt.memoizedState.deps)?O.memoizedState=Iu(l,b,f,p):(mt.flags|=o,O.memoizedState=Iu(1|l,b,f,p))}function iA(o,l){Zm(8390656,8,o,l)}function B0(o,l){Vm(2048,8,o,l)}function VV(o){mt.flags|=4;var l=mt.updateQueue;if(l===null)l=zm(),mt.updateQueue=l,l.events=[o];else{var f=l.events;f===null?l.events=[o]:f.push(o)}}function rA(o){var l=In().memoizedState;return VV({ref:l,nextImpl:o}),function(){if((Bt&2)!==0)throw Error(i(440));return l.impl.apply(void 0,arguments)}}function sA(o,l){return Vm(4,2,o,l)}function oA(o,l){return Vm(4,4,o,l)}function aA(o,l){if(typeof l=="function"){o=o();var f=l(o);return function(){typeof f=="function"?f():l(null)}}if(l!=null)return o=o(),l.current=o,function(){l.current=null}}function lA(o,l,f){f=f!=null?f.concat([o]):null,Vm(4,4,aA.bind(null,l,o),f)}function z0(){}function cA(o,l){var f=In();l=l===void 0?null:l;var p=f.memoizedState;return l!==null&&R0(l,p[1])?p[0]:(f.memoizedState=[o,l],o)}function uA(o,l){var f=In();l=l===void 0?null:l;var p=f.memoizedState;if(l!==null&&R0(l,p[1]))return p[0];if(p=o(),pc){Le(!0);try{o()}finally{Le(!1)}}return f.memoizedState=[p,l],p}function X0(o,l,f){return f===void 0||(la&1073741824)!==0&&(_t&261930)===0?o.memoizedState=l:(o.memoizedState=f,o=vR(),mt.lanes|=o,sl|=o,f)}function fA(o,l,f,p){return Nr(f,l)?f:Ja.current!==null?(o=X0(o,f,p),Nr(o,l)||(Vn=!0),o):(la&106)===0||(la&1073741824)!==0&&(_t&261930)===0?(Vn=!0,o.memoizedState=f):(o=vR(),mt.lanes|=o,sl|=o,l)}function hA(o,l,f,p,O){var b=Ee.p;Ee.p=b!==0&&8>b?b:8;var E=Se.T,M={};M.types=E!==null?E.types:null,Se.T=M,V0(o,!1,l,f);try{var j=O(),W=Se.S;if(W!==null&&W(M,j),j!==null&&typeof j=="object"&&typeof j.then=="function"){var ne=BV(j,p);td(o,l,ne,Ir(o))}else td(o,l,p,Ir(o))}catch(pe){td(o,l,{then:function(){},status:"rejected",reason:pe},Ir())}finally{Ee.p=b,E!==null&&M.types!==null&&(E.types=M.types),Se.T=E}}function qV(){}function U0(o,l,f,p){if(o.tag!==5)throw Error(i(476));var O=dA(o).queue;hA(o,O,l,Ie,f===null?qV:function(){return pA(o),f(p)})}function dA(o){var l=o.memoizedState;if(l!==null)return l;l={memoizedState:Ie,baseState:Ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ca,lastRenderedState:Ie},next:null};var f={};return l.next={memoizedState:f,baseState:f,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ca,lastRenderedState:f},next:null},o.memoizedState=l,o=o.alternate,o!==null&&(o.memoizedState=l),l}function pA(o){var l=dA(o);l.next===null&&(l=o.alternate.memoizedState),td(o,l.next.queue,{},Ir())}function Z0(){return Ei(rf)}function mA(){return In().memoizedState}function gA(){return In().memoizedState}function YV(o){for(var l=o.return;l!==null;){switch(l.tag){case 24:case 3:var f=Ir();o=Wa(f);var p=Ka(l,o,f);p!==null&&(Or(p,l,f),Fh(p,l,f)),l={cache:b0()},o.payload=l;return}l=l.return}}function GV(o,l,f){var p=Ir();f={lane:p,revertLane:0,gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null},qm(o)?bA(l,f):(f=c0(o,l,f,p),f!==null&&(Or(f,o,p),yA(f,l,p)))}function OA(o,l,f){var p=Ir();td(o,l,f,p)}function td(o,l,f,p){var O={lane:p,revertLane:0,gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null};if(qm(o))bA(l,O);else{var b=o.alternate;if(o.lanes===0&&(b===null||b.lanes===0)&&(b=l.lastRenderedReducer,b!==null))try{var E=l.lastRenderedState,M=b(E,f);if(O.hasEagerState=!0,O.eagerState=M,Nr(M,E))return wm(o,l,O,0),sn===null&&xm(),!1}catch{}finally{}if(f=c0(o,l,O,p),f!==null)return Or(f,o,p),yA(f,l,p),!0}return!1}function V0(o,l,f,p){if(p={lane:2,revertLane:$v(),gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},qm(o)){if(l)throw Error(i(479))}else l=c0(o,f,p,2),l!==null&&Or(l,o,2)}function qm(o){var l=o.alternate;return o===mt||l!==null&&l===mt}function bA(o,l){Du=jm=!0;var f=o.pending;f===null?l.next=l:(l.next=f.next,f.next=l),o.pending=l}function yA(o,l,f){if((f&4194048)!==0){var p=l.lanes;p&=o.pendingLanes,f|=p,l.lanes=f,Ar(o,f)}}var Ym={readContext:Ei,use:Xm,useCallback:Cn,useContext:Cn,useEffect:Cn,useImperativeHandle:Cn,useLayoutEffect:Cn,useInsertionEffect:Cn,useMemo:Cn,useReducer:Cn,useRef:Cn,useState:Cn,useDebugValue:Cn,useDeferredValue:Cn,useTransition:Cn,useSyncExternalStore:Cn,useId:Cn,useHostTransitionStatus:Cn,useFormState:Cn,useActionState:Cn,useOptimistic:Cn,useMemoCache:Cn,useCacheRefresh:Cn,useEffectEvent:Cn},vA={readContext:Ei,use:Xm,useCallback:function(o,l){return Wi().memoizedState=[o,l===void 0?null:l],o},useContext:Ei,useEffect:iA,useImperativeHandle:function(o,l,f){f=f!=null?f.concat([o]):null,Zm(4194308,4,aA.bind(null,l,o),f)},useLayoutEffect:function(o,l){return Zm(4194308,4,o,l)},useInsertionEffect:function(o,l){Zm(4,2,o,l)},useMemo:function(o,l){var f=Wi();l=l===void 0?null:l;var p=o();if(pc){Le(!0);try{o()}finally{Le(!1)}}return f.memoizedState=[p,l],p},useReducer:function(o,l,f){var p=Wi();if(f!==void 0){var O=f(l);if(pc){Le(!0);try{f(l)}finally{Le(!1)}}}else O=l;return p.memoizedState=p.baseState=O,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:O},p.queue=o,o=o.dispatch=GV.bind(null,mt,o),[p.memoizedState,o]},useRef:function(o){var l=Wi();return o={current:o},l.memoizedState=o},useState:function(o){o=I0(o);var l=o.queue,f=OA.bind(null,mt,l);return l.dispatch=f,[o.memoizedState,f]},useDebugValue:z0,useDeferredValue:function(o,l){var f=Wi();return X0(f,o,l)},useTransition:function(){var o=I0(!1);return o=hA.bind(null,mt,o.queue,!0,!1),Wi().memoizedState=o,[!1,o]},useSyncExternalStore:function(o,l,f){var p=mt,O=Wi();if(yt){if(f===void 0)throw Error(i(407));f=f()}else{if(f=l(),sn===null)throw Error(i(349));(_t&127)!==0||zC(p,l,f)}O.memoizedState=f;var b={value:f,getSnapshot:l};return O.queue=b,iA(UC.bind(null,p,b,o),[o]),p.flags|=2048,Iu(9,{destroy:void 0},XC.bind(null,p,b,f,l),null),f},useId:function(){var o=Wi(),l=sn.identifierPrefix;if(yt){var f=co,p=lo;f=(p&~(1<<32-Ce(p)-1)).toString(32)+f,l="_"+l+"R_"+f,f=Bm++,0<f&&(l+="H"+f.toString(32)),l+="_"}else f=zV++,l="_"+l+"r_"+f.toString(32)+"_";return o.memoizedState=l},useHostTransitionStatus:Z0,useFormState:KC,useActionState:KC,useOptimistic:function(o){var l=Wi();l.memoizedState=l.baseState=o;var f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=f,l=V0.bind(null,mt,!0,f),f.dispatch=l,[o,l]},useMemoCache:$0,useCacheRefresh:function(){return Wi().memoizedState=YV.bind(null,mt)},useEffectEvent:function(o){var l=Wi(),f={impl:o};return l.memoizedState=f,function(){if((Bt&2)!==0)throw Error(i(440));return f.impl.apply(void 0,arguments)}}},SA={readContext:Ei,use:Xm,useCallback:cA,useContext:Ei,useEffect:B0,useImperativeHandle:lA,useInsertionEffect:sA,useLayoutEffect:oA,useMemo:uA,useReducer:Um,useRef:nA,useState:function(){return Um(ca)},useDebugValue:z0,useDeferredValue:function(o,l){var f=In();return fA(f,Jt.memoizedState,o,l)},useTransition:function(){var o=Um(ca)[0],l=In().memoizedState;return[typeof o=="boolean"?o:ed(o),l]},useSyncExternalStore:BC,useId:mA,useHostTransitionStatus:Z0,useFormState:JC,useActionState:JC,useOptimistic:function(o,l){var f=In();return qC(f,Jt,o,l)},useMemoCache:$0,useCacheRefresh:gA,useEffectEvent:rA},FV={readContext:Ei,use:Xm,useCallback:cA,useContext:Ei,useEffect:B0,useImperativeHandle:lA,useInsertionEffect:sA,useLayoutEffect:oA,useMemo:uA,useReducer:L0,useRef:nA,useState:function(){return L0(ca)},useDebugValue:z0,useDeferredValue:function(o,l){var f=In();return Jt===null?X0(f,o,l):fA(f,Jt.memoizedState,o,l)},useTransition:function(){var o=L0(ca)[0],l=In().memoizedState;return[typeof o=="boolean"?o:ed(o),l]},useSyncExternalStore:BC,useId:mA,useHostTransitionStatus:Z0,useFormState:tA,useActionState:tA,useOptimistic:function(o,l){var f=In();return Jt!==null?qC(f,Jt,o,l):(f.baseState=o,[o,f.queue.dispatch])},useMemoCache:$0,useCacheRefresh:gA,useEffectEvent:rA};function q0(o,l,f,p){l=o.memoizedState,f=f(p,l),f=f==null?l:N({},l,f),o.memoizedState=f,o.lanes===0&&(o.updateQueue.baseState=f)}var Y0={enqueueSetState:function(o,l,f){o=o._reactInternals;var p=Ir(),O=Wa(p);O.payload=l,f!=null&&(O.callback=f),l=Ka(o,O,p),l!==null&&(Or(l,o,p),Fh(l,o,p))},enqueueReplaceState:function(o,l,f){o=o._reactInternals;var p=Ir(),O=Wa(p);O.tag=1,O.payload=l,f!=null&&(O.callback=f),l=Ka(o,O,p),l!==null&&(Or(l,o,p),Fh(l,o,p))},enqueueForceUpdate:function(o,l){o=o._reactInternals;var f=Ir(),p=Wa(f);p.tag=2,l!=null&&(p.callback=l),l=Ka(o,p,f),l!==null&&(Or(l,o,f),Fh(l,o,f))}};function xA(o,l,f,p,O,b,E){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(p,b,E):l.prototype&&l.prototype.isPureReactComponent?!zh(f,p)||!zh(O,b):!0}function wA(o,l,f,p){o=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(f,p),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(f,p),l.state!==o&&Y0.enqueueReplaceState(l,l.state,null)}function mc(o,l){var f=l;if("ref"in l){f={};for(var p in l)p!=="ref"&&(f[p]=l[p])}if(o=o.defaultProps){f===l&&(f=N({},f));for(var O in o)f[O]===void 0&&(f[O]=o[O])}return f}function EA(o){Sm(o)}function _A(o){console.error(o)}function TA(o){Sm(o)}function Gm(o,l){try{var f=o.onUncaughtError;f(l.value,{componentStack:l.stack})}catch(p){setTimeout(function(){throw p})}}function kA(o,l,f){try{var p=o.onCaughtError;p(f.value,{componentStack:f.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(O){setTimeout(function(){throw O})}}function G0(o,l,f){return f=Wa(f),f.tag=3,f.payload={element:null},f.callback=function(){Gm(o,l)},f}function CA(o){return o=Wa(o),o.tag=3,o}function AA(o,l,f,p){var O=f.type.getDerivedStateFromError;if(typeof O=="function"){var b=p.value;o.payload=function(){return O(b)},o.callback=function(){kA(l,f,p)}}var E=f.stateNode;E!==null&&typeof E.componentDidCatch=="function"&&(o.callback=function(){kA(l,f,p),typeof O!="function"&&(ol===null?ol=new Set([this]):ol.add(this));var M=p.stack;this.componentDidCatch(p.value,{componentStack:M!==null?M:""})})}function HV(o,l,f,p,O){if(f.flags|=32768,p!==null&&typeof p=="object"&&typeof p.then=="function"){if(l=f.alternate,l!==null&&ac(l,f,O,!0),f=_i.current,f!==null){switch(f.tag){case 31:case 13:case 19:return Bi===null?mg():f.alternate===null&&An===0&&(An=3),f.flags&=-257,f.flags|=65536,f.lanes=O,p===Qm?f.flags|=16384:(l=f.updateQueue,l===null?f.updateQueue=new Set([p]):l.add(p),Mv(o,p,O)),!1;case 22:return f.flags|=65536,p===Qm?f.flags|=16384:(l=f.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([p])},f.updateQueue=l):(f=l.retryQueue,f===null?l.retryQueue=new Set([p]):f.add(p)),Mv(o,p,O)),!1}throw Error(i(435,f.tag))}return Mv(o,p,O),mg(),!1}if(yt)return l=_i.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=O,p!==p0&&(o=Error(i(422),{cause:p}),Zh(ss(o,f)))):(p!==p0&&(l=Error(i(423),{cause:p}),Zh(ss(l,f))),o=o.current.alternate,o.flags|=65536,O&=-O,o.lanes|=O,p=ss(p,f),O=G0(o.stateNode,p,O),E0(o,O),An!==4&&(An=2)),!1;var b=Error(i(520),{cause:p});if(b=ss(b,f),cd===null?cd=[b]:cd.push(b),An!==4&&(An=2),l===null)return!0;p=ss(p,f),f=l;do{switch(f.tag){case 3:return f.flags|=65536,o=O&-O,f.lanes|=o,o=G0(f.stateNode,p,o),E0(f,o),!1;case 1:if(l=f.type,b=f.stateNode,(f.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(ol===null||!ol.has(b))))return f.flags|=65536,O&=-O,f.lanes|=O,O=CA(O),AA(O,o,f,p),E0(f,O),!1;break;case 22:if(f.memoizedState!==null)return f.flags|=65536,!1}f=f.return}while(f!==null);return!1}var F0=Error(i(461)),Vn=!1;function ii(o,l,f,p){l.child=o===null?NC(l,null,f,p):dc(l,o.child,f,p)}function RA(o,l,f,p,O){f=f.render;var b=l.ref;if("ref"in p){var E={};for(var M in p)M!=="ref"&&(E[M]=p[M])}else E=p;return lc(l),p=P0(o,l,f,E,b,O),M=M0(),o!==null&&!Vn?(N0(o,l,O),ua(o,l,O)):(yt&&M&&km(l),l.flags|=1,ii(o,l,p,O),l.child)}function PA(o,l,f,p,O){if(o===null){var b=f.type;return typeof b=="function"&&!u0(b)&&b.defaultProps===void 0&&f.compare===null?(l.tag=15,l.type=b,MA(o,l,b,p,O)):(o=_m(f.type,null,p,l,l.mode,O),o.ref=l.ref,o.return=l,l.child=o)}if(b=o.child,!iv(o,O)){var E=b.memoizedProps;if(f=f.compare,f=f!==null?f:zh,f(E,p)&&o.ref===l.ref)return ua(o,l,O)}return l.flags|=1,o=ra(b,p),o.ref=l.ref,o.return=l,l.child=o}function MA(o,l,f,p,O){if(o!==null){var b=o.memoizedProps;if(zh(b,p)&&o.ref===l.ref)if(Vn=!1,l.pendingProps=p=b,iv(o,O))(o.flags&131072)!==0&&(Vn=!0);else return l.lanes=o.lanes,ua(o,l,O)}return H0(o,l,f,p,O)}function NA(o,l,f,p){var O=p.children,b=o!==null?o.memoizedState:null;if(o===null&&l.stateNode===null&&(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),p.mode==="hidden"){if((l.flags&128)!==0){if(b=b!==null?b.baseLanes|f:f,o!==null){for(p=l.child=o.child,O=0;p!==null;)O=O|p.lanes|p.childLanes,p=p.sibling;p=O&~b}else p=0,l.child=null;return QA(o,l,b,f,p)}if((f&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},o!==null&&Mm(l,b!==null?b.cachePool:null),b!==null?DC(l,b):T0(),LC(l);else return p=l.lanes=536870912,QA(o,l,b!==null?b.baseLanes|f:f,f,p)}else b!==null?(Mm(l,b.cachePool),DC(l,b),tl(),l.memoizedState=null):(o!==null&&Mm(l,null),T0(),tl());return ii(o,l,O,f),l.child}function nd(o,l){return o!==null&&o.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function QA(o,l,f,p,O){var b=v0();return b=b===null?null:{parent:Un._currentValue,pool:b},l.memoizedState={baseLanes:f,cachePool:b},o!==null&&Mm(l,null),T0(),LC(l),o!==null&&ac(o,l,p,!0),l.childLanes=O,null}function Fm(o,l){return l=Hm({mode:l.mode,children:l.children},o.mode),l.ref=o.ref,o.child=l,l.return=o,l}function $A(o,l,f){return dc(l,o.child,null,f),o=Fm(l,l.pendingProps),o.flags|=2,Qr(l),l.memoizedState=null,o}function WV(o,l,f){var p=l.pendingProps,O=(l.flags&128)!==0;if(l.flags&=-129,o===null){if(yt){if(p.mode==="hidden")return o=Fm(l,p),l.lanes=536870912,o.memoizedState={baseLanes:0,cachePool:null},nd(null,o);if(C0(l),(o=fn)?(o=aP(o,ls),o=o!==null&&o.data==="&"?o:null,o!==null&&(l.memoizedState={dehydrated:o,treeContext:Va!==null?{id:lo,overflow:co}:null,retryLane:536870912,hydrationErrors:null},f=bC(o),f.return=l,l.child=f,fi=l,fn=null)):o=null,o===null)throw Ya(l);return l.lanes=536870912,null}return Fm(l,p)}var b=o.memoizedState;if(b!==null){var E=b.dehydrated;if(C0(l),O)if(l.flags&256)l.flags&=-257,l=$A(o,l,f);else if(l.memoizedState!==null)l.child=o.child,l.flags|=128,l=null;else throw Error(i(558));else if(Vn||ac(o,l,f,!1),O=(f&o.childLanes)!==0,Vn||O){if(Ja.current===null){if(p=sn,p!==null&&(E=Ia(p,f),E!==0&&E!==b.retryLane))throw b.retryLane=E,ic(o,E),Or(p,o,E),F0;mg()}l=$A(o,l,f)}else o=b.treeContext,fn=us(E.nextSibling),fi=l,yt=!0,qa=null,ls=!1,o!==null&&SC(l,o),l=Fm(l,p),l.flags|=134221824;return l}return o=ra(o.child,{mode:p.mode,children:p.children}),o.ref=l.ref,l.child=o,o.return=l,o}function ju(o,l){var f=l.ref;if(f===null)o!==null&&o.ref!==null&&(l.flags|=4194816);else{if(typeof f!="function"&&typeof f!="object")throw Error(i(284));(o===null||o.ref!==f)&&(l.flags|=4194816)}}function H0(o,l,f,p,O){return lc(l),f=P0(o,l,f,p,void 0,O),p=M0(),o!==null&&!Vn?(N0(o,l,O),ua(o,l,O)):(yt&&p&&km(l),l.flags|=1,ii(o,l,f,O),l.child)}function DA(o,l,f,p,O,b){return lc(l),l.updateQueue=null,f=jC(l,p,f,O),IC(o),p=M0(),o!==null&&!Vn?(N0(o,l,b),ua(o,l,b)):(yt&&p&&km(l),l.flags|=1,ii(o,l,f,b),l.child)}function LA(o,l,f,p,O){if(lc(l),l.stateNode===null){var b=Au,E=f.contextType;typeof E=="object"&&E!==null&&(b=Ei(E)),b=new f(p,b),l.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=Y0,l.stateNode=b,b._reactInternals=l,b=l.stateNode,b.props=p,b.state=l.memoizedState,b.refs={},x0(l),E=f.contextType,b.context=typeof E=="object"&&E!==null?Ei(E):Au,b.state=l.memoizedState,E=f.getDerivedStateFromProps,typeof E=="function"&&(q0(l,f,E,p),b.state=l.memoizedState),typeof f.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(E=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),E!==b.state&&Y0.enqueueReplaceState(b,b.state,null),Wh(l,p,b,O),Hh(),b.state=l.memoizedState),typeof b.componentDidMount=="function"&&(l.flags|=4194308),p=!0}else if(o===null){b=l.stateNode;var M=l.memoizedProps,j=mc(f,M);b.props=j;var W=b.context,ne=f.contextType;E=Au,typeof ne=="object"&&ne!==null&&(E=Ei(ne));var pe=f.getDerivedStateFromProps;ne=typeof pe=="function"||typeof b.getSnapshotBeforeUpdate=="function",M=l.pendingProps!==M,ne||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(M||W!==E)&&wA(l,b,p,E),Ha=!1;var F=l.memoizedState;b.state=F,Wh(l,p,b,O),Hh(),W=l.memoizedState,M||F!==W||Ha?(typeof pe=="function"&&(q0(l,f,pe,p),W=l.memoizedState),(j=Ha||xA(l,f,j,p,F,W,E))?(ne||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(l.flags|=4194308)):(typeof b.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=p,l.memoizedState=W),b.props=p,b.state=W,b.context=E,p=j):(typeof b.componentDidMount=="function"&&(l.flags|=4194308),p=!1)}else{b=l.stateNode,w0(o,l),E=l.memoizedProps,ne=mc(f,E),b.props=ne,pe=l.pendingProps,F=b.context,W=f.contextType,j=Au,typeof W=="object"&&W!==null&&(j=Ei(W)),M=f.getDerivedStateFromProps,(W=typeof M=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(E!==pe||F!==j)&&wA(l,b,p,j),Ha=!1,F=l.memoizedState,b.state=F,Wh(l,p,b,O),Hh();var te=l.memoizedState;E!==pe||F!==te||Ha||o!==null&&o.dependencies!==null&&Rm(o.dependencies)?(typeof M=="function"&&(q0(l,f,M,p),te=l.memoizedState),(ne=Ha||xA(l,f,ne,p,F,te,j)||o!==null&&o.dependencies!==null&&Rm(o.dependencies))?(W||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(p,te,j),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(p,te,j)),typeof b.componentDidUpdate=="function"&&(l.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof b.componentDidUpdate!="function"||E===o.memoizedProps&&F===o.memoizedState||(l.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||E===o.memoizedProps&&F===o.memoizedState||(l.flags|=1024),l.memoizedProps=p,l.memoizedState=te),b.props=p,b.state=te,b.context=j,p=ne):(typeof b.componentDidUpdate!="function"||E===o.memoizedProps&&F===o.memoizedState||(l.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||E===o.memoizedProps&&F===o.memoizedState||(l.flags|=1024),p=!1)}return b=p,ju(o,l),p=(l.flags&128)!==0,b||p?(b=l.stateNode,f=p&&typeof f.getDerivedStateFromError!="function"?null:b.render(),l.flags|=1,o!==null&&p?(l.child=dc(l,o.child,null,O),l.child=dc(l,null,f,O)):ii(o,l,f,O),l.memoizedState=b.state,o=l.child):o=ua(o,l,O),o}function IA(o,l,f,p){return sc(),l.flags|=256,ii(o,l,f,p),l.child}var W0={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function K0(o){return{baseLanes:o,cachePool:kC()}}function J0(o,l,f){return o=o!==null?o.childLanes&~f:0,l&&(o|=Lr),o}function jA(o,l,f){var p=l.pendingProps,O=!1,b=(l.flags&128)!==0,E;if((E=b)||(E=o!==null&&o.memoizedState===null?!1:(Ti.current&2)!==0),E&&(O=!0,l.flags&=-129),E=(l.flags&32)!==0,l.flags&=-33,o===null){if(yt){if(O?el(l):tl(),(o=fn)?(o=aP(o,ls),o=o!==null&&o.data!=="&"?o:null,o!==null&&(l.memoizedState={dehydrated:o,treeContext:Va!==null?{id:lo,overflow:co}:null,retryLane:536870912,hydrationErrors:null},f=bC(o),f.return=l,l.child=f,fi=l,fn=null)):o=null,o===null)throw Ya(l);return Kv(o)?l.lanes=32:l.lanes=536870912,null}return b=p.children,p=p.fallback,O?(tl(),O=l.mode,b=Hm({mode:"hidden",children:b},O),p=rc(p,O,f,null),b.return=l,p.return=l,b.sibling=p,l.child=b,p=l.child,p.memoizedState=K0(f),p.childLanes=J0(o,E,f),l.memoizedState=W0,nd(null,p)):(el(l),ev(l,b))}var M=o.memoizedState;if(M!==null){var j=M.dehydrated;if(j!==null)return KV(o,l,b,E,p,j,M,f)}return O?(tl(),O=p.fallback,b=l.mode,M=o.child,j=M.sibling,p=ra(M,{mode:"hidden",children:p.children}),p.subtreeFlags=M.subtreeFlags&1206910976,j!==null?O=ra(j,O):(O=rc(O,b,f,null),O.flags|=2),O.return=l,p.return=l,p.sibling=O,l.child=p,nd(null,p),p=l.child,O=o.child.memoizedState,O===null?O=K0(f):(b=O.cachePool,b!==null?(M=Un._currentValue,b=b.parent!==M?{parent:M,pool:M}:b):b=kC(),O={baseLanes:O.baseLanes|f,cachePool:b}),p.memoizedState=O,p.childLanes=J0(o,E,f),l.memoizedState=W0,nd(o.child,p)):(el(l),f=o.child,o=f.sibling,f=ra(f,{mode:"visible",children:p.children}),f.return=l,f.sibling=null,o!==null&&(E=l.deletions,E===null?(l.deletions=[o],l.flags|=16):E.push(o)),l.child=f,l.memoizedState=null,f)}function ev(o,l){return l=Hm({mode:"visible",children:l},o.mode),l.return=o,o.child=l}function Hm(o,l){return o=dr(22,o,null,l),o.lanes=0,o}function Wm(o,l,f){return dc(l,o.child,null,f),o=ev(l,l.pendingProps.children),o.flags|=2,l.memoizedState=null,o}function KV(o,l,f,p,O,b,E,M){if(f)return l.flags&256?(el(l),l.flags&=-257,Wm(o,l,M)):l.memoizedState!==null?(tl(),l.child=o.child,l.flags|=128,null):(tl(),b=O.fallback,E=l.mode,O=Hm({mode:"visible",children:O.children},E),b=rc(b,E,M,null),b.flags|=2,O.return=l,b.return=l,O.sibling=b,l.child=O,dc(l,o.child,null,M),O=l.child,O.memoizedState=K0(M),O.childLanes=J0(o,p,M),l.memoizedState=W0,nd(null,O));if(el(l),Kv(b)){if(p=b.nextSibling&&b.nextSibling.dataset,p)var j=p.dgst;return p=j,p!==""&&(O=Error(i(419)),O.stack="",O.digest=p,Zh({value:O,source:null,stack:null})),Wm(o,l,M)}if(Vn||ac(o,l,M,!1),p=(M&o.childLanes)!==0,Vn||p){if(Ja.current!==null)return Wm(o,l,M);if(p=sn,p!==null&&(O=Ia(p,M),O!==0&&O!==E.retryLane))throw E.retryLane=O,ic(o,O),Or(p,o,O),F0;return Wv(b)||mg(),Wm(o,l,M)}return Wv(b)?(l.flags|=192,l.child=o.child,null):(o=E.treeContext,fn=us(b.nextSibling),fi=l,yt=!0,qa=null,ls=!1,o!==null&&SC(l,o),l=ev(l,O.children),l.flags|=134221824,l)}function BA(o,l,f){o.lanes|=l;var p=o.alternate;p!==null&&(p.lanes|=l),Am(o.return,l,f)}function zA(o){for(var l=null;o!==null;){var f=o.alternate;f!==null&&Im(f)===null&&(l=o),o=o.sibling}return l}function Km(o,l,f,p,O,b){var E=o.memoizedState;E===null?o.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:p,tail:f,tailMode:O,treeForkCount:b}:(E.isBackwards=l,E.rendering=null,E.renderingStartTime=0,E.last=p,E.tail=f,E.tailMode=O,E.treeForkCount=b)}function tv(o){var l=o.child;for(o.child=null;l!==null;){var f=l.sibling;l.sibling=o.child,o.child=l,l=f}}function nv(o,l,f){var p=l.pendingProps,O=p.revealOrder,b=p.tail;p=p.children;var E=Ti.current;if(l.flags&128)return Kh(l,E),null;var M=(E&2)!==0;if(M?(E=E&1|2,l.flags|=128):E&=1,Kh(l,E),O==="backwards"&&o!==null?(tv(o),ii(o,l,p,f),tv(o)):ii(o,l,p,f),p=yt?Uh:0,!M&&o!==null&&(o.flags&128)!==0)e:for(o=l.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&BA(o,f,l);else if(o.tag===19)BA(o,f,l);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===l)break e;for(;o.sibling===null;){if(o.return===null||o.return===l)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}switch(O){case"backwards":f=zA(l.child),f===null?(O=l.child,l.child=null):(O=f.sibling,f.sibling=null,tv(l)),Km(l,!0,O,null,b,p);break;case"unstable_legacy-backwards":for(f=null,O=l.child,l.child=null;O!==null;){if(o=O.alternate,o!==null&&Im(o)===null){l.child=O;break}o=O.sibling,O.sibling=f,f=O,O=o}Km(l,!0,f,null,b,p);break;case"together":Km(l,!1,null,null,void 0,p);break;case"independent":l.memoizedState=null;break;default:f=zA(l.child),f===null?(O=l.child,l.child=null):(O=f.sibling,f.sibling=null),Km(l,!1,O,f,b,p)}return l.child}function XA(o,l,f){var p=l.pendingProps;return Ga(l,l.type,p.value),ii(o,l,p.children,f),l.child}function ua(o,l,f){if(o!==null&&(l.dependencies=o.dependencies),sl|=l.lanes,(f&l.childLanes)===0)if(o!==null){if(ac(o,l,f,!1),(f&l.childLanes)===0)return null}else return null;if(o!==null&&l.child!==o.child)throw Error(i(153));if(l.child!==null){for(o=l.child,f=ra(o,o.pendingProps),l.child=f,f.return=l;o.sibling!==null;)o=o.sibling,f=f.sibling=ra(o,o.pendingProps),f.return=l;f.sibling=null}return l.child}function iv(o,l){return(o.lanes&l)!==0?!0:(o=o.dependencies,!!(o!==null&&Rm(o)))}function JV(o,l,f){switch(l.tag){case 3:ci(l,l.stateNode.containerInfo),Ga(l,Un,o.memoizedState.cache),sc();break;case 27:case 5:qi(l);break;case 4:ci(l,l.stateNode.containerInfo);break;case 10:Ga(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,C0(l),null;break;case 13:var p=l.memoizedState;if(p!==null){if(p.dehydrated!==null)return el(l),l.flags|=128,null;p=ac(o,l,f,!1);var O=l.child.childLanes;return p||(f&O)!==0?jA(o,l,f):(el(l),o=ua(o,l,f),o!==null?o.sibling:null)}el(l);break;case 19:if(l.flags&128)return nv(o,l,f);if(O=(o.flags&128)!==0,p=(f&l.childLanes)!==0,p||(ac(o,l,f,!1),p=(f&l.childLanes)!==0),O){if(p)return nv(o,l,f);l.flags|=128}if(O=l.memoizedState,O!==null&&(O.rendering=null,O.tail=null,O.lastEffect=null),Kh(l,Ti.current),p)break;return null;case 22:return l.lanes=0,NA(o,l,f,l.pendingProps);case 24:Ga(l,Un,o.memoizedState.cache)}return ua(o,l,f)}function UA(o,l,f){if(o!==null)if(o.memoizedProps!==l.pendingProps)Vn=!0;else{if(!iv(o,f)&&(l.flags&128)===0)return Vn=!1,JV(o,l,f);Vn=(o.flags&131072)!==0}else Vn=!1,yt&&(l.flags&1048576)!==0&&vC(l,Uh,l.index);switch(l.lanes=0,l.tag){case 16:e:{var p=l.pendingProps;if(o=fc(l.elementType),l.type=o,typeof o=="function")u0(o)?(p=mc(o,p),l.tag=1,l=LA(null,l,o,p,f)):(l.tag=0,l=H0(null,l,o,p,f));else{if(o!=null){var O=o.$$typeof;if(O===G){l.tag=11,l=RA(null,l,o,p,f);break e}else if(O===me){l.tag=14,l=PA(null,l,o,p,f);break e}else if(O===re){l.tag=10,l.type=o,l=XA(null,l,f);break e}}throw l=_e(o)||o,Error(i(306,l,""))}}return l;case 0:return H0(o,l,l.type,l.pendingProps,f);case 1:return p=l.type,O=mc(p,l.pendingProps),LA(o,l,p,O,f);case 3:e:{if(ci(l,l.stateNode.containerInfo),o===null)throw Error(i(387));p=l.pendingProps;var b=l.memoizedState;O=b.element,w0(o,l),Wh(l,p,null,f);var E=l.memoizedState;if(p=E.cache,Ga(l,Un,p),p!==b.cache&&O0(l,[Un],f,!0),Hh(),p=E.element,b.isDehydrated)if(b={element:p,isDehydrated:!1,cache:E.cache},l.updateQueue.baseState=b,l.memoizedState=b,l.flags&256){l=IA(o,l,p,f);break e}else if(p!==O){O=ss(Error(i(424)),l),Zh(O),l=IA(o,l,p,f);break e}else{switch(o=l.stateNode.containerInfo,o.nodeType){case 9:o=o.body;break;default:o=o.nodeName==="HTML"?o.ownerDocument.body:o}for(fn=us(o.firstChild),fi=l,yt=!0,qa=null,ls=!0,f=NC(l,null,p,f),l.child=f;f;)f.flags=f.flags&-3|134221824,f=f.sibling}else{if(sc(),p===O){l=ua(o,l,f);break e}ii(o,l,p,f)}l=l.child}return l;case 26:return ju(o,l),o===null?(f=pP(l.type,null,l.pendingProps,null))?l.memoizedState=f:yt||(l.stateNode=YR(l.type,l.pendingProps,wn.current,l)):l.memoizedState=pP(l.type,o.memoizedProps,l.pendingProps,o.memoizedState),null;case 27:return qi(l),o===null&&yt&&(p=l.stateNode=uP(l.type,l.pendingProps,wn.current),fi=l,ls=!0,O=fn,cl(l.type)?(Jv=O,fn=us(p.firstChild)):fn=O),ii(o,l,l.pendingProps.children,f),ju(o,l),o===null&&(l.flags|=4194304),l.child;case 5:return o===null&&yt&&((O=p=fn)&&(p=Y4(p,l.type,l.pendingProps,ls),p!==null?(l.stateNode=p,fi=l,fn=us(p.firstChild),ls=!1,O=!0):O=!1),O||Ya(l)),qi(l),O=l.type,b=l.pendingProps,E=o!==null?o.memoizedProps:null,p=b.children,Zv(O,b)?p=null:E!==null&&Zv(O,E)&&(l.flags|=32),l.memoizedState!==null&&(O=P0(o,l,XV,null,null,f),rf._currentValue=O),ju(o,l),ii(o,l,p,f),l.child;case 6:return o===null&&yt&&((o=f=fn)&&(f=G4(f,l.pendingProps,ls),f!==null?(l.stateNode=f,fi=l,fn=null,o=!0):o=!1),o||Ya(l)),null;case 13:return jA(o,l,f);case 4:return ci(l,l.stateNode.containerInfo),p=l.pendingProps,o===null?l.child=dc(l,null,p,f):ii(o,l,p,f),l.child;case 11:return RA(o,l,l.type,l.pendingProps,f);case 7:return p=l.pendingProps,ju(o,l),ii(o,l,p,f),l.child;case 8:return ii(o,l,l.pendingProps.children,f),l.child;case 12:return ii(o,l,l.pendingProps.children,f),l.child;case 10:return XA(o,l,f);case 9:return O=l.type._context,p=l.pendingProps.children,lc(l),O=Ei(O),p=p(O),l.flags|=1,ii(o,l,p,f),l.child;case 14:return PA(o,l,l.type,l.pendingProps,f);case 15:return MA(o,l,l.type,l.pendingProps,f);case 19:return nv(o,l,f);case 31:return WV(o,l,f);case 22:return NA(o,l,f,l.pendingProps);case 24:return lc(l),p=Ei(Un),o===null?(O=v0(),O===null&&(O=sn,b=b0(),O.pooledCache=b,b.refCount++,b!==null&&(O.pooledCacheLanes|=f),O=b),l.memoizedState={parent:p,cache:O},x0(l),Ga(l,Un,O)):((o.lanes&f)!==0&&(w0(o,l),Wh(l,null,null,f),Hh()),O=o.memoizedState,b=l.memoizedState,O.parent!==p?(O={parent:p,cache:p},l.memoizedState=O,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=O),Ga(l,Un,p)):(p=b.cache,Ga(l,Un,p),p!==O.cache&&O0(l,[Un],f,!0))),ii(o,l,l.pendingProps.children,f),l.child;case 30:return l.stateNode===null&&(l.stateNode={autoName:null,paired:null,clones:null,ref:null}),p=l.pendingProps,p.name!=null&&p.name!=="auto"?l.flags|=o===null?18882560:18874368:yt&&km(l),o!==null&&o.memoizedProps.name!==p.name?l.flags|=4194816:ju(o,l),ii(o,l,p.children,f),l.child;case 29:throw l.pendingProps}throw Error(i(156,l.tag))}function fa(o){o.flags|=4}function rv(o,l,f,p,O){var b;if((b=(o.mode&32)!==0)&&(b=f===null?bP(l,p):bP(l,p)&&(p.src!==f.src||p.srcSet!==f.srcSet)),b){if(o.flags|=16777216,(O&335544128)===O)if(o.stateNode.complete)o.flags|=8192;else if(ER())o.flags|=8192;else throw hc=Qm,S0}else o.flags&=-16777217}function ZA(o,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)o.flags&=-16777217;else if(o.flags|=16777216,!yP(l))if(ER())o.flags|=8192;else throw hc=Qm,S0}function Jm(o,l){l!==null&&(o.flags|=4),o.flags&16384&&(l=o.tag!==22?Rs():536870912,o.lanes|=l,Zu|=l)}function id(o,l){if(!yt)switch(o.tailMode){case"visible":break;case"collapsed":for(var f=o.tail,p=null;f!==null;)f.alternate!==null&&(p=f),f=f.sibling;p===null?l||o.tail===null?o.tail=null:o.tail.sibling=null:p.sibling=null;break;default:for(l=o.tail,f=null;l!==null;)l.alternate!==null&&(f=l),l=l.sibling;f===null?o.tail=null:f.sibling=null}}function hn(o){var l=o.alternate!==null&&o.alternate.child===o.child,f=0,p=0;if(l)for(var O=o.child;O!==null;)f|=O.lanes|O.childLanes,p|=O.subtreeFlags&1206910976,p|=O.flags&1206910976,O.return=o,O=O.sibling;else for(O=o.child;O!==null;)f|=O.lanes|O.childLanes,p|=O.subtreeFlags,p|=O.flags,O.return=o,O=O.sibling;return o.subtreeFlags|=p,o.childLanes=f,l}function e4(o,l,f){var p=l.pendingProps;switch(d0(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return hn(l),null;case 1:return hn(l),null;case 3:return f=l.stateNode,p=null,o!==null&&(p=o.memoizedState.cache),l.memoizedState.cache!==p&&(l.flags|=2048),aa(Un),ei(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(o===null||o.child===null)&&(Mu(l)?fa(l):o===null||o.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,m0())),hn(l),null;case 26:var O=l.type,b=l.memoizedState;return o===null?(fa(l),b!==null?(hn(l),ZA(l,b)):(hn(l),rv(l,O,null,p,f))):b?b!==o.memoizedState?(fa(l),hn(l),ZA(l,b)):(hn(l),l.flags&=-16777217):(o=o.memoizedProps,o!==p&&fa(l),hn(l),rv(l,O,o,p,f)),null;case 27:if(En(l),f=wn.current,O=l.type,o!==null&&l.stateNode!=null)o.memoizedProps!==p&&fa(l);else{if(!p){if(l.stateNode===null)throw Error(i(166));return hn(l),l.subtreeFlags&=-33554433,null}o=zn.current,Mu(l)?xC(l):(o=uP(O,p,f),l.stateNode=o,fa(l))}return hn(l),l.subtreeFlags&=-33554433,null;case 5:if(En(l),O=l.type,o!==null&&l.stateNode!=null)o.memoizedProps!==p&&fa(l);else{if(!p){if(l.stateNode===null)throw Error(i(166));return hn(l),l.subtreeFlags&=-33554433,null}if(b=zn.current,Mu(l))xC(l);else{var E=pd(wn.current);switch(b){case 1:b=E.createElementNS("http://www.w3.org/2000/svg",O);break;case 2:b=E.createElementNS("http://www.w3.org/1998/Math/MathML",O);break;default:switch(O){case"svg":b=E.createElementNS("http://www.w3.org/2000/svg",O);break;case"math":b=E.createElementNS("http://www.w3.org/1998/Math/MathML",O);break;case"script":b=E.createElement("div"),b.innerHTML="<script><\/script>",b=b.removeChild(b.firstChild);break;case"select":b=typeof p.is=="string"?E.createElement("select",{is:p.is}):E.createElement("select"),p.multiple?b.multiple=!0:p.size&&(b.size=p.size);break;default:b=typeof p.is=="string"?E.createElement(O,{is:p.is}):E.createElement(O)}}b[Dn]=l,b[xe]=p;e:for(E=l.child;E!==null;){if(E.tag===5||E.tag===6)b.appendChild(E.stateNode);else if(E.tag!==4&&E.tag!==27&&E.child!==null){E.child.return=E,E=E.child;continue}if(E===l)break e;for(;E.sibling===null;){if(E.return===null||E.return===l)break e;E=E.return}E.sibling.return=E.return,E=E.sibling}l.stateNode=b;e:switch(Ci(b,O,p),O){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}p&&fa(l)}}return hn(l),l.subtreeFlags&=-33554433,rv(l,l.type,o===null?null:o.memoizedProps,l.pendingProps,f),null;case 6:if(o&&l.stateNode!=null)o.memoizedProps!==p&&fa(l);else{if(typeof p!="string"&&l.stateNode===null)throw Error(i(166));if(o=wn.current,Mu(l)){if(o=l.stateNode,f=l.memoizedProps,p=null,O=fi,O!==null)switch(O.tag){case 27:case 5:p=O.memoizedProps}o[Dn]=l,o=!!(o.nodeValue===f||p!==null&&p.suppressHydrationWarning===!0||UR(o.nodeValue,f)),o||Ya(l,!0)}else o=pd(o).createTextNode(p),o[Dn]=l,l.stateNode=o}return hn(l),null;case 31:if(f=l.memoizedState,o===null||o.memoizedState!==null){if(p=Mu(l),f!==null){if(o===null){if(!p)throw Error(i(318));if(o=l.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(i(557));o[Dn]=l}else sc(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;hn(l),o=!1}else f=m0(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=f),o=!0;if(!o)return l.flags&256?(Qr(l),l):(Qr(l),null);if((l.flags&128)!==0)throw Error(i(558))}return hn(l),null;case 13:if(p=l.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if(O=Mu(l),p!==null&&p.dehydrated!==null){if(o===null){if(!O)throw Error(i(318));if(O=l.memoizedState,O=O!==null?O.dehydrated:null,!O)throw Error(i(317));O[Dn]=l}else sc(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;hn(l),O=!1}else O=m0(),o!==null&&o.memoizedState!==null&&(o.memoizedState.hydrationErrors=O),O=!0;if(!O)return l.flags&256?(Qr(l),l):(Qr(l),null)}return Qr(l),(l.flags&128)!==0?(l.lanes=f,l):(f=p!==null,o=o!==null&&o.memoizedState!==null,f&&(p=l.child,O=null,p.alternate!==null&&p.alternate.memoizedState!==null&&p.alternate.memoizedState.cachePool!==null&&(O=p.alternate.memoizedState.cachePool.pool),b=null,p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(b=p.memoizedState.cachePool.pool),b!==O&&(p.flags|=2048)),f!==o&&f&&(l.child.flags|=8192),Jm(l,l.updateQueue),hn(l),null);case 4:return ei(),o===null&&jv(l.stateNode.containerInfo),l.flags|=67108864,hn(l),null;case 10:return aa(l.type),hn(l),null;case 19:if(A0(l),p=l.memoizedState,p===null)return hn(l),null;if(O=(l.flags&128)!==0,b=p.rendering,b===null)if(O)id(p,!1);else{if(An!==0||o!==null&&(o.flags&128)!==0)for(o=l.child;o!==null;){if(b=Im(o),b!==null){for(l.flags|=128,id(p,!1),o=b.updateQueue,l.updateQueue=o,Jm(l,o),l.subtreeFlags=0,o=f,f=l.child;f!==null;)OC(f,o),f=f.sibling;return Kh(l,Ti.current&1|2),yt&&sa(l,p.treeForkCount),l.child}o=o.sibling}p.tail!==null&&Qn()>fg&&(l.flags|=128,O=!0,id(p,!1),l.lanes=4194304)}else{if(!O)if(o=Im(b),o!==null){if(l.flags|=128,O=!0,o=o.updateQueue,l.updateQueue=o,Jm(l,o),id(p,!0),p.tail===null&&p.tailMode!=="collapsed"&&p.tailMode!=="visible"&&!b.alternate&&!yt)return hn(l),null}else 2*Qn()-p.renderingStartTime>fg&&f!==536870912&&(l.flags|=128,O=!0,id(p,!1),l.lanes=4194304);p.isBackwards?(b.sibling=l.child,l.child=b):(o=p.last,o!==null?o.sibling=b:l.child=b,p.last=b)}if(p.tail!==null){o=p.tail;e:{for(f=o;f!==null;){if(f.alternate!==null){f=!1;break e}f=f.sibling}f=!0}return p.rendering=o,p.tail=o.sibling,p.renderingStartTime=Qn(),o.sibling=null,b=Ti.current,b=O?b&1|2:b&1,p.tailMode==="visible"||p.tailMode==="collapsed"||!f||yt?Kh(l,b):(f=b,Xe(_i,l),Xe(Ti,f),Bi===null&&(Bi=l)),yt&&sa(l,p.treeForkCount),o}return hn(l),null;case 22:case 23:return Qr(l),k0(),p=l.memoizedState!==null,o!==null?o.memoizedState!==null!==p&&(l.flags|=8192):p&&(l.flags|=8192),p?(f&536870912)!==0&&(l.flags&128)===0&&(hn(l),l.subtreeFlags&6&&(l.flags|=8192)):hn(l),f=l.updateQueue,f!==null&&Jm(l,f.retryQueue),f=null,o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(f=o.memoizedState.cachePool.pool),p=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(p=l.memoizedState.cachePool.pool),p!==f&&(l.flags|=2048),o!==null&&He(uc),null;case 24:return f=null,o!==null&&(f=o.memoizedState.cache),l.memoizedState.cache!==f&&(l.flags|=2048),aa(Un),hn(l),null;case 25:return null;case 30:return l.flags|=33554432,hn(l),null}throw Error(i(156,l.tag))}function t4(o,l){switch(d0(l),l.tag){case 1:return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 3:return aa(Un),ei(),o=l.flags,(o&65536)!==0&&(o&128)===0?(l.flags=o&-65537|128,l):null;case 26:case 27:case 5:return En(l),null;case 31:if(l.memoizedState!==null){if(Qr(l),l.alternate===null)throw Error(i(340));sc()}return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 13:if(Qr(l),o=l.memoizedState,o!==null&&o.dehydrated!==null){if(l.alternate===null)throw Error(i(340));sc()}return o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 19:return A0(l),o=l.flags,o&65536?(l.flags=o&-65537|128,o=l.memoizedState,o!==null&&(o.rendering=null,o.tail=null),l.flags|=4,l):null;case 4:return ei(),null;case 10:return aa(l.type),null;case 22:case 23:return Qr(l),k0(),o!==null&&He(uc),o=l.flags,o&65536?(l.flags=o&-65537|128,l):null;case 24:return aa(Un),null;case 25:return null;default:return null}}function VA(o,l){switch(d0(l),l.tag){case 3:aa(Un),ei();break;case 26:case 27:case 5:En(l);break;case 4:ei();break;case 31:l.memoizedState!==null&&Qr(l);break;case 13:Qr(l);break;case 19:A0(l);break;case 10:aa(l.type);break;case 22:case 23:Qr(l),k0(),o!==null&&He(uc);break;case 24:aa(Un)}}function rd(o,l){try{var f=l.updateQueue,p=f!==null?f.lastEffect:null;if(p!==null){var O=p.next;f=O;do{if((f.tag&o)===o){p=void 0;var b=f.create,E=f.inst;p=b(),E.destroy=p}f=f.next}while(f!==O)}}catch(M){Gt(l,l.return,M)}}function nl(o,l,f){try{var p=l.updateQueue,O=p!==null?p.lastEffect:null;if(O!==null){var b=O.next;p=b;do{if((p.tag&o)===o){var E=p.inst,M=E.destroy;if(M!==void 0){E.destroy=void 0,O=l;var j=f,W=M;try{W()}catch(ne){Gt(O,j,ne)}}}p=p.next}while(p!==b)}}catch(ne){Gt(l,l.return,ne)}}function qA(o){var l=o.updateQueue;if(l!==null){var f=o.stateNode;try{$C(l,f)}catch(p){Gt(o,o.return,p)}}}function YA(o,l,f){f.props=mc(o.type,o.memoizedProps),f.state=o.memoizedState;try{f.componentWillUnmount()}catch(p){Gt(o,l,p)}}function uo(o,l){try{var f=o.ref;if(f!==null){switch(o.tag){case 26:case 27:case 5:var p=o.stateNode;break;case 30:var O=o.stateNode,b=na(o.memoizedProps,O);(O.ref===null||O.ref.name!==b)&&(O.ref=eP(b)),p=O.ref;break;case 7:if(o.stateNode===null){var E=new jr(o);m(o.child,!1,V4,E,void 0,void 0),o.stateNode=E}p=o.stateNode;break;default:p=o.stateNode}typeof f=="function"?o.refCleanup=f(p):f.current=p}}catch(M){Gt(o,l,M)}}function ki(o,l){var f=o.ref,p=o.refCleanup;if(f!==null)if(typeof p=="function")try{p()}catch(O){Gt(o,l,O)}finally{o.refCleanup=null,o=o.alternate,o!=null&&(o.refCleanup=null)}else if(typeof f=="function")try{f(null)}catch(O){Gt(o,l,O)}else f.current=null}function eg(o,l){if((o.tag===5||o.tag===27||o.tag===6)&&o.alternate===null&&l!==null)for(var f=0;f<l.length;f++)oP(o.stateNode,l[f])}function GA(o){for(var l=o.return;l!==null&&(ov(l)&&oP(o.stateNode,l.stateNode),!sv(l));)l=l.return}function sd(o){for(var l=o.return;l!==null&&(ov(l)&&q4(o.stateNode,l.stateNode),!sv(l));)l=l.return}function sv(o){return o.tag===5||o.tag===3||o.tag===27}function ov(o){return o&&o.tag===7&&o.stateNode!==null}function av(o){var l=o.type,f=o.memoizedProps,p=o.stateNode;try{e:switch(l){case"button":case"input":case"select":case"textarea":f.autoFocus&&p.focus();break e;case"img":f.src?p.src=f.src:f.srcSet&&(p.srcset=f.srcSet)}}catch(O){Gt(o,o.return,O)}}function lv(o,l,f){try{var p=o.stateNode;k4(p,o.type,f,l),p[xe]=l}catch(O){Gt(o,o.return,O)}}function FA(o){return o.tag===5||o.tag===3||o.tag===26||o.tag===27&&cl(o.type)||o.tag===4}function cv(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||FA(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.tag===27&&cl(o.type)||o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function uv(o,l,f,p){var O=o.tag;if(O===5||O===6)O=o.stateNode,l?(f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f).insertBefore(O,l):(l=f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f,l.appendChild(O),f=f._reactRootContainer,f!=null||l.onclick!==null||(l.onclick=Ut)),eg(o,p),ht=!0;else if(O!==4&&(O===27&&(eg(o,p),p=null,cl(o.type)&&(f=o.stateNode,l=null)),o=o.child,o!==null))for(uv(o,l,f,p),o=o.sibling;o!==null;)uv(o,l,f,p),o=o.sibling}function tg(o,l,f,p){var O=o.tag;if(O===5||O===6)O=o.stateNode,l?f.insertBefore(O,l):f.appendChild(O),eg(o,p),ht=!0;else if(O!==4&&(O===27&&(eg(o,p),p=null,cl(o.type)&&(f=o.stateNode)),o=o.child,o!==null))for(tg(o,l,f,p),o=o.sibling;o!==null;)tg(o,l,f,p),o=o.sibling}function HA(o){var l=o.stateNode,f=o.memoizedProps;try{for(var p=o.type,O=l.attributes;O.length;)l.removeAttributeNode(O[0]);Ci(l,p,f),l[Dn]=o,l[xe]=f}catch(b){Gt(o,o.return,b)}}var ng=!1,$r=null;function WA(o){(o.tag===30||(o.subtreeFlags&33554432)!==0)&&(ng=!0)}var fo=null;function KA(){var o=fo;return fo=null,o}var pr=0;function Bu(o,l,f,p,O){return pr=0,JA(o.child,l,f,p,O)}function JA(o,l,f,p,O){for(var b=!1;o!==null;){if(o.tag===5){var E=o.stateNode;if(p!==null){var M=Yv(E);p.push(M),M.view&&(b=!0)}else b||Yv(E).view&&(b=!0);ng=!0,KR(E,pr===0?l:l+"_"+pr,f),pr++}else(o.tag!==22||o.memoizedState===null)&&(o.tag===30&&O||JA(o.child,l,f,p,O)&&(b=!0));o=o.sibling}return b}function ho(o,l){for(;o!==null;)o.tag===5?JR(o.stateNode,o.memoizedProps):(o.tag!==22||o.memoizedState===null)&&(o.tag===30&&l||ho(o.child,l)),o=o.sibling}function ig(o){if((o.subtreeFlags&18874368)!==0)for(o=o.child;o!==null;){if((o.tag!==22||o.memoizedState===null)&&(ig(o),o.tag===30&&(o.flags&18874368)!==0&&o.stateNode.paired)){var l=o.memoizedProps;if(l.name==null||l.name==="auto")throw Error(i(544));var f=l.name;l=ia(l.default,l.share),l!=="none"&&(Bu(o,f,l,null,!1)||ho(o.child,!1))}o=o.sibling}}function fv(o,l){if(o.tag===30){var f=o.stateNode,p=o.memoizedProps,O=na(p,f),b=ia(p.default,f.paired?p.share:p.enter);b!=="none"?Bu(o,O,b,null,!1)?(ig(o),f.paired||l||Gu(o,p.onEnter)):ho(o.child,!1):ig(o)}else if((o.subtreeFlags&33554432)!==0)for(o=o.child;o!==null;)fv(o,l),o=o.sibling;else ig(o)}function hv(o){if($r!==null&&$r.size!==0){var l=$r;if((o.subtreeFlags&18874368)!==0)for(o=o.child;o!==null;){if(o.tag!==22||o.memoizedState===null){if(o.tag===30&&(o.flags&18874368)!==0){var f=o.memoizedProps,p=f.name;if(p!=null&&p!=="auto"){var O=l.get(p);if(O!==void 0){var b=ia(f.default,f.share);if(b!=="none"&&(Bu(o,p,b,null,!1)?(b=o.stateNode,O.paired=b,b.paired=O,Gu(o,f.onShare)):ho(o.child,!1)),l.delete(p),l.size===0)break}}}hv(o)}o=o.sibling}}}function dv(o){if(o.tag===30){var l=o.memoizedProps,f=na(l,o.stateNode),p=$r!==null?$r.get(f):void 0,O=ia(l.default,p!==void 0?l.share:l.exit);O!=="none"&&(Bu(o,f,O,null,!1)?p!==void 0?(O=o.stateNode,p.paired=O,O.paired=p,$r.delete(f),Gu(o,l.onShare)):Gu(o,l.onExit):ho(o.child,!1)),$r!==null&&hv(o)}else if((o.subtreeFlags&33554432)!==0)for(o=o.child;o!==null;)dv(o),o=o.sibling;else $r!==null&&hv(o)}function eR(o){for(o=o.child;o!==null;){if(o.tag===30){var l=o.memoizedProps,f=na(l,o.stateNode);l=ia(l.default,l.update),o.flags&=-5,l!=="none"&&Bu(o,f,l,o.memoizedState=[],!1)}else(o.subtreeFlags&33554432)!==0&&eR(o);o=o.sibling}}function pv(o){if((o.subtreeFlags&18874368)!==0)for(o=o.child;o!==null;){if(o.tag!==22||o.memoizedState===null){if(o.tag===30&&(o.flags&18874368)!==0){var l=o.stateNode;l.paired!==null&&(l.paired=null,ho(o.child,!1))}pv(o)}o=o.sibling}}function rg(o){if(o.tag===30)o.stateNode.paired=null,ho(o.child,!1),pv(o);else if((o.subtreeFlags&33554432)!==0)for(o=o.child;o!==null;)rg(o),o=o.sibling;else pv(o)}function tR(o){for(o=o.child;o!==null;)o.tag===30?ho(o.child,!1):(o.subtreeFlags&33554432)!==0&&tR(o),o=o.sibling}function mv(o,l,f,p,O,b,E){for(var M=!1;l!==null;){if(l.tag===5){var j=l.stateNode;if(b!==null&&pr<b.length){var W=b[pr],ne=Yv(j);(W.view||ne.view)&&(M=!0);var pe;if(pe=(o.flags&4)===0)if(ne.clip)pe=!0;else{pe=W.rect;var F=ne.rect;pe=pe.y!==F.y||pe.x!==F.x||pe.height!==F.height||pe.width!==F.width}pe&&(o.flags|=4),ne.abs?ne=!W.abs:(W=W.rect,ne=ne.rect,ne=W.height!==ne.height||W.width!==ne.width),ne&&(o.flags|=32)}else o.flags|=32;(o.flags&4)!==0&&KR(j,pr===0?f:f+"_"+pr,O),M&&(o.flags&4)!==0||(fo===null&&(fo=[]),fo.push(j,pr===0?p:p+"_"+pr,l.memoizedProps)),pr++}else(l.tag!==22||l.memoizedState===null)&&(l.tag===30&&E?o.flags|=l.flags&32:mv(o,l.child,f,p,O,b,E)&&(M=!0));l=l.sibling}return M}function nR(o,l){for(o=o.child;o!==null;){if(o.tag===30){var f=o.memoizedProps,p=o.stateNode,O=na(f,p),b=ia(f.default,f.update),E;E=o.memoizedState,o.memoizedState=null,p=o;var M=o.child;pr=0,O=mv(p,M,O,O,b,E,!1),(o.flags&4)!==0&&O&&Gu(o,f.onUpdate)}else(o.subtreeFlags&33554432)!==0&&nR(o);o=o.sibling}}var hi=!1,Zt=!1,po=!1,gv=!1,iR=typeof WeakSet=="function"?WeakSet:Set,di=null,mo=!1,od=!1,sg=!1,Ov=!1;function n4(o,l,f){if(o=o.containerInfo,Xv=sf,o=aC(o),i0(o)){if("selectionStart"in o)var p={start:o.selectionStart,end:o.selectionEnd};else e:{p=(p=o.ownerDocument)&&p.defaultView||window;var O=p.getSelection&&p.getSelection();if(O&&O.rangeCount!==0){p=O.anchorNode;var b=O.anchorOffset,E=O.focusNode;O=O.focusOffset;try{p.nodeType,E.nodeType}catch{p=null;break e}var M=0,j=-1,W=-1,ne=0,pe=0,F=o,te=null;t:for(;;){for(var Me;F!==p||b!==0&&F.nodeType!==3||(j=M+b),F!==E||O!==0&&F.nodeType!==3||(W=M+O),F.nodeType===3&&(M+=F.nodeValue.length),(Me=F.firstChild)!==null;)te=F,F=Me;for(;;){if(F===o)break t;if(te===p&&++ne===b&&(j=M),te===E&&++pe===O&&(W=M),(Me=F.nextSibling)!==null)break;F=te,te=F.parentNode}F=Me}p=j===-1||W===-1?null:{start:j,end:W}}else p=null}p=p||{start:0,end:0}}else p=null;for(Uv={focusedElem:o,selectionRange:p},sf=!1,f=(f&335544064)===f,di=l,l=f?9270:1024;di!==null;){if(o=di,f&&(p=o.deletions,p!==null))for(b=0;b<p.length;b++)f&&dv(p[b]);if(o.alternate===null&&(o.flags&2)!==0)f&&WA(o),og(f);else{if(o.tag===22){if(p=o.alternate,o.memoizedState!==null){p!==null&&p.memoizedState===null&&f&&dv(p),og(f);continue}else if(p!==null&&p.memoizedState!==null){f&&WA(o),og(f);continue}}p=o.child,(o.subtreeFlags&l)!==0&&p!==null?(p.return=o,di=p):(f&&eR(o),og(f))}}$r=null}function og(o){for(;di!==null;){var l=di,f=o,p=l.alternate,O=l.flags;switch(l.tag){case 0:case 11:case 15:break;case 1:if((O&1024)!==0&&p!==null){f=void 0,O=p.memoizedProps,p=p.memoizedState;var b=l.stateNode;try{var E=mc(l.type,O);f=b.getSnapshotBeforeUpdate(E,p),b.__reactInternalSnapshotBeforeUpdate=f}catch(M){Gt(l,l.return,M)}}break;case 3:if((O&1024)!==0){if(p=l.stateNode.containerInfo,f=p.nodeType,f===9)Hv(p);else if(f===1)switch(p.nodeName){case"HEAD":case"HTML":case"BODY":Hv(p);break;default:p.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:f&&p!==null&&(f=na(p.memoizedProps,p.stateNode),O=l.memoizedProps,O=ia(O.default,O.update),O!=="none"&&Bu(p,f,O,p.memoizedState=[],!0));break;default:if((O&1024)!==0)throw Error(i(163))}if(p=l.sibling,p!==null){p.return=l.return,di=p;break}di=l.return}}function rR(o,l,f){var p=f.flags;switch(f.tag){case 0:case 11:case 15:go(o,f),p&4&&rd(5,f);break;case 1:if(go(o,f),p&4)if(o=f.stateNode,l===null)try{o.componentDidMount()}catch(E){Gt(f,f.return,E)}else{var O=mc(f.type,l.memoizedProps);l=l.memoizedState;try{o.componentDidUpdate(O,l,o.__reactInternalSnapshotBeforeUpdate)}catch(E){Gt(f,f.return,E)}}p&64&&qA(f),p&512&&uo(f,f.return);break;case 3:if(go(o,f),p&64&&(o=f.updateQueue,o!==null)){if(l=null,f.child!==null)switch(f.child.tag){case 27:case 5:l=f.child.stateNode;break;case 1:l=f.child.stateNode}try{$C(o,l)}catch(E){Gt(f,f.return,E)}}break;case 27:l===null&&p&4&&HA(f);case 26:case 5:go(o,f),l===null&&p&4&&av(f),p&512&&uo(f,f.return);break;case 12:go(o,f);break;case 31:go(o,f),p&4&&lR(o,f);break;case 13:go(o,f),p&4&&cR(o,f),p&64&&(o=f.memoizedState,o!==null&&(o=o.dehydrated,o!==null&&(f=p4.bind(null,f),F4(o,f))));break;case 22:if(p=f.memoizedState!==null||hi,!p){var b=l!==null&&l.memoizedState!==null||Zt;l=hi,O=Zt,hi=p,(Zt=b)&&!O?(p=2,(f.subtreeFlags&8772)!==0&&(p|=1),Ls(o,f,p)):go(o,f),hi=l,Zt=O}break;case 30:go(o,f),p&512&&uo(f,f.return);break;case 7:p&512&&uo(f,f.return);default:go(o,f)}}function bv(o,l){for(o=o.child;o!==null;)sR(o,l),o=o.sibling}function sR(o,l){switch(o.tag){case 5:case 26:try{var f=o.stateNode;if(l){var p=f.style;typeof p.setProperty=="function"?p.setProperty("display","none","important"):p.display="none"}else{var O=o.stateNode,b=o.memoizedProps.style,E=b!=null&&b.hasOwnProperty("display")?b.display:null;O.style.display=E==null||typeof E=="boolean"?"":(""+E).trim()}}catch(j){Gt(o,o.return,j)}yv(o,l);break;case 6:try{o.stateNode.nodeValue=l?"":o.memoizedProps,ht=!0}catch(j){Gt(o,o.return,j)}break;case 18:try{var M=o.stateNode;l?WR(M,!0):WR(o.stateNode,!1)}catch(j){Gt(o,o.return,j)}break;case 22:case 23:o.memoizedState===null&&bv(o,l);break;default:bv(o,l)}}function yv(o,l){if(o.subtreeFlags&67108864)for(o=o.child;o!==null;){e:{var f=o,p=l;switch(f.tag){case 4:sR(f,p);break e;case 22:f.memoizedState===null&&yv(f,p);break e;default:yv(f,p)}}o=o.sibling}}function oR(o){var l=o.alternate;l!==null&&(o.alternate=null,oR(l)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(l=o.stateNode,l!==null&&_n(l)),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}var gn=null,mr=!1;function $s(o,l,f){for(f=f.child;f!==null;)aR(o,l,f),f=f.sibling}function aR(o,l,f){if(vt&&typeof vt.onCommitFiberUnmount=="function")try{vt.onCommitFiberUnmount(Xt,f)}catch{}switch(f.tag){case 26:Zt||ki(f,l),$s(o,l,f),f.memoizedState?f.memoizedState.count--:f.stateNode&&!Zt&&(f=f.stateNode,f.parentNode.removeChild(f));break;case 27:Zt||ki(f,l),sd(f);var p=gn,O=mr;cl(f.type)&&(gn=f.stateNode,mr=!1),$s(o,l,f),fP(f.stateNode,f.type,f.memoizedProps),gn=p,mr=O;break;case 5:Zt||ki(f,l),sd(f);case 6:if(f.tag===6&&sd(f),p=gn,O=mr,gn=null,$s(o,l,f),gn=p,mr=O,gn!==null)if(mr)try{(gn.nodeType===9?gn.body:gn.nodeName==="HTML"?gn.ownerDocument.body:gn).removeChild(f.stateNode),ht=!0}catch(b){Gt(f,l,b)}else try{gn.removeChild(f.stateNode),ht=!0}catch(b){Gt(f,l,b)}break;case 18:gn!==null&&(mr?(o=gn,HR(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,f.stateNode),of(o)):HR(gn,f.stateNode));break;case 4:p=gn,O=mr,gn=f.stateNode.containerInfo,mr=!0,$s(o,l,f),gn=p,mr=O;break;case 0:case 11:case 14:case 15:nl(2,f,l),Zt||nl(4,f,l),$s(o,l,f);break;case 1:Zt||(ki(f,l),p=f.stateNode,typeof p.componentWillUnmount=="function"&&YA(f,l,p)),$s(o,l,f);break;case 21:$s(o,l,f);break;case 22:Zt=(p=Zt)||f.memoizedState!==null,$s(o,l,f),Zt=p;break;case 30:ki(f,l),$s(o,l,f);break;case 7:Zt||ki(f,l),$s(o,l,f);break;default:$s(o,l,f)}}function lR(o,l){if(l.memoizedState===null&&(o=l.alternate,o!==null&&(o=o.memoizedState,o!==null))){o=o.dehydrated;try{of(o)}catch(f){Gt(l,l.return,f)}}}function cR(o,l){if(l.memoizedState===null&&(o=l.alternate,o!==null&&(o=o.memoizedState,o!==null&&(o=o.dehydrated,o!==null))))try{of(o)}catch(f){Gt(l,l.return,f)}}function i4(o){switch(o.tag){case 31:case 13:case 19:var l=o.stateNode;return l===null&&(l=o.stateNode=new iR),l;case 22:return o=o.stateNode,l=o._retryCache,l===null&&(l=o._retryCache=new iR),l;default:throw Error(i(435,o.tag))}}function ag(o,l){var f=i4(o);l.forEach(function(p){if(!f.has(p)){f.add(p);var O=m4.bind(null,o,p);p.then(O,O)}})}function Ki(o,l,f){var p=l.deletions;if(p!==null)for(var O=0;O<p.length;O++){var b=p[O],E=o,M=l,j=M;e:for(;j!==null;){switch(j.tag){case 27:if(cl(j.type)){gn=j.stateNode,mr=!1;break e}break;case 5:gn=j.stateNode,mr=!1;break e;case 3:case 4:gn=j.stateNode.containerInfo,mr=!0;break e}j=j.return}if(gn===null)throw Error(i(160));aR(E,M,b),gn=null,mr=!1,E=b.alternate,E!==null&&(E.return=null),b.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)uR(l,o,f),l=l.sibling}var Ds=null;function uR(o,l,f){var p=o.alternate,O=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:if(O&4&&(p=o.updateQueue,p=p!==null?p.events:null,p!==null))for(var b=0;b<p.length;b++){var E=p[b];E.ref.impl=E.nextImpl}Ki(l,o,f),Ji(o),O&4&&(nl(3,o,o.return),rd(3,o),nl(5,o,o.return));break;case 1:Ki(l,o,f),Ji(o),O&512&&(Zt||p===null||ki(p,p.return)),O&64&&hi&&(o=o.updateQueue,o!==null&&(l=o.callbacks,l!==null&&(f=o.shared.hiddenCallbacks,o.shared.hiddenCallbacks=f===null?l:f.concat(l))));break;case 26:if(b=Ds,Ki(l,o,f),Ji(o),O&512&&(Zt||p===null||ki(p,p.return)),O&4)if(O=p!==null?p.memoizedState:null,f=o.memoizedState,p===null)if(f===null)if(o.stateNode===null)if(hi)o.stateNode=YR(o.type,o.memoizedProps,l.containerInfo,o);else{e:{l=o.type,f=o.memoizedProps,O=b.ownerDocument||b;t:switch(l){case"title":p=O.getElementsByTagName("title")[0],(!p||p[ui]||p[Dn]||p.namespaceURI==="http://www.w3.org/2000/svg"||p.hasAttribute("itemprop"))&&(p=O.createElement(l),O.head.insertBefore(p,O.querySelector("head > title"))),Ci(p,l,f),p[Dn]=o,Tn(p),l=p;break e;case"link":if(b=OP("link","href",O).get(l+(f.href||""))){for(E=0;E<b.length;E++)if(p=b[E],p.getAttribute("href")===(f.href==null||f.href===""?null:f.href)&&p.getAttribute("rel")===(f.rel==null?null:f.rel)&&p.getAttribute("title")===(f.title==null?null:f.title)&&p.getAttribute("crossorigin")===(f.crossOrigin==null?null:f.crossOrigin)){b.splice(E,1);break t}}p=O.createElement(l),Ci(p,l,f),O.head.appendChild(p);break;case"meta":if(b=OP("meta","content",O).get(l+(f.content||""))){for(E=0;E<b.length;E++)if(p=b[E],p.getAttribute("content")===(f.content==null?null:""+f.content)&&p.getAttribute("name")===(f.name==null?null:f.name)&&p.getAttribute("property")===(f.property==null?null:f.property)&&p.getAttribute("http-equiv")===(f.httpEquiv==null?null:f.httpEquiv)&&p.getAttribute("charset")===(f.charSet==null?null:f.charSet)){b.splice(E,1);break t}}p=O.createElement(l),Ci(p,l,f),O.head.appendChild(p);break;default:throw Error(i(468,l))}p[Dn]=o,Tn(p),l=p}o.stateNode=l}else hi||iS(b,o.type,o.stateNode);else o.stateNode=gP(b,f,o.memoizedProps);else O!==f?(O===null?(l=p.stateNode,l===null||Zt||l.parentNode.removeChild(l)):O.count--,f===null?hi||iS(b,o.type,o.stateNode):gP(b,f,o.memoizedProps)):f===null&&o.stateNode!==null&&lv(o,o.memoizedProps,p.memoizedProps);break;case 27:Ki(l,o,f),Ji(o),O&512&&(Zt||p===null||ki(p,p.return)),p!==null&&O&4&&lv(o,o.memoizedProps,p.memoizedProps);break;case 5:if(b=po,po=!1,Ki(l,o,f),po=b,Ji(o),O&512&&(Zt||p===null||ki(p,p.return)),o.flags&32){l=o.stateNode;try{ye(l,""),ht=!0}catch(ne){Gt(o,o.return,ne)}}O&4&&o.stateNode!=null&&(l=o.memoizedProps,lv(o,l,p!==null?p.memoizedProps:l)),O&1024&&(gv=!0);break;case 6:if(Ki(l,o,f),Ji(o),O&4){if(o.stateNode===null)throw Error(i(162));l=o.memoizedProps,f=o.stateNode;try{f.nodeValue=l,ht=!0}catch(ne){Gt(o,o.return,ne)}}break;case 3:if(ht=!1,xg=null,b=Ds,Ds=md(l.containerInfo),Ki(l,o,f),Ds=b,Ji(o),O&4&&p!==null&&p.memoizedState.isDehydrated)try{of(l.containerInfo)}catch(ne){Gt(o,o.return,ne)}gv&&(gv=!1,fR(o)),ht=!1;break;case 4:O=po,po=hi,p=un(),b=Ds,Ds=md(o.stateNode.containerInfo),Ki(l,o,f),Ji(o),Ds=b,ht&&od&&(sg=!0),ht=p,po=O;break;case 12:Ki(l,o,f),Ji(o);break;case 31:Ki(l,o,f),Ji(o),O&4&&(l=o.updateQueue,l!==null&&(o.updateQueue=null,ag(o,l)));break;case 13:Ki(l,o,f),Ji(o),o.child.flags&8192&&o.memoizedState!==null!=(p!==null&&p.memoizedState!==null)&&(ug=Qn()),O&4&&(l=o.updateQueue,l!==null&&(o.updateQueue=null,ag(o,l)));break;case 22:b=o.memoizedState!==null,E=p!==null&&p.memoizedState!==null;var M=hi,j=Zt,W=po;hi=M||b,po=W||b,Zt=j||E,Ki(l,o,f),Zt=j,po=W,hi=M,Ji(o),O&8192&&(l=o.stateNode,l._visibility=b?l._visibility&-2:l._visibility|1,!b||p===null||E||hi||Zt||(l=E||Zt,f=hi,p=Zt,hi=b||hi,Zt=l,il(o,2),hi=f,Zt=p),!b&&po||bv(o,b)),O&4&&(l=o.updateQueue,l!==null&&(f=l.retryQueue,f!==null&&(l.retryQueue=null,ag(o,f))));break;case 19:Ki(l,o,f),Ji(o),O&4&&(l=o.updateQueue,l!==null&&(o.updateQueue=null,ag(o,l)));break;case 30:O&512&&(Zt||p===null||ki(p,p.return)),O=un(),b=od,E=(f&335544064)===f,M=o.memoizedProps,od=E&&ia(M.default,M.update)!=="none",Ki(l,o,f),Ji(o),E&&p!==null&&ht&&(o.flags|=4),od=b,ht=O;break;case 21:break;case 7:O&512&&(Zt||p===null||ki(p,p.return)),p&&p.stateNode!==null&&(p.stateNode._fragmentFiber=o);default:Ki(l,o,f),Ji(o)}}function Ji(o){var l=o.flags;if(l&2){try{for(var f,p=o.return;p!==null;){if(FA(p)){f=p;break}p=p.return}p=null;for(var O=o.return;O!==null;){if(ov(O)){var b=O.stateNode;p===null?p=[b]:p.push(b)}if(sv(O))break;O=O.return}var E=p;if(f==null)throw Error(i(160));switch(f.tag){case 27:var M=f.stateNode,j=cv(o);tg(o,j,M,E);break;case 5:var W=f.stateNode;f.flags&32&&(ye(W,""),f.flags&=-33);var ne=cv(o);tg(o,ne,W,E);break;case 3:case 4:var pe=f.stateNode.containerInfo,F=cv(o);uv(o,F,pe,E);break;default:throw Error(i(161))}}catch(te){Gt(o,o.return,te)}o.flags&=-3}l&4096&&(o.flags&=-4097)}function fR(o){if(o.subtreeFlags&1024)for(o=o.child;o!==null;){var l=o;fR(l),l.tag===5&&l.flags&1024&&(l=l.stateNode,sf=!0,l.reset(),sf=!1),o=o.sibling}}function zu(o,l){if(l.subtreeFlags&9270)for(l=l.child;l!==null;)hR(l,o),l=l.sibling;else nR(l)}function hR(o,l){var f=o.alternate;if(f===null)fv(o,!1);else switch(o.tag){case 3:if(Ov=mo=!1,KA(),zu(l,o),!mo&&!sg){if(o=fo,o!==null)for(var p=0;p<o.length;p+=3){f=o[p];var O=o[p+1];JR(f,o[p+2]),f=f.ownerDocument.documentElement,f!==null&&f.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+O+")"})}o=l.containerInfo,o=o.nodeType===9?o.documentElement:o.ownerDocument.documentElement,o!==null&&o.style.viewTransitionName===""&&(o.style.viewTransitionName="none",o.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),o.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),Ov=!0}fo=null;break;case 5:zu(l,o);break;case 4:p=mo,mo=!1,zu(l,o),mo&&(sg=!0),mo=p;break;case 22:o.memoizedState===null&&(f.memoizedState!==null?fv(o,!1):zu(l,o));break;case 30:p=mo,O=KA(),mo=!1,zu(l,o),mo&&(o.flags|=4);var b=o.memoizedProps,E=o.stateNode;l=na(b,E),E=na(f.memoizedProps,E);var M=ia(b.default,b.update);M==="none"?l=!1:(b=f.memoizedState,f.memoizedState=null,f=o.child,pr=0,l=mv(o,f,l,E,M,b,!0),pr!==(b===null?0:b.length)&&(o.flags|=32)),(o.flags&4)!==0&&l?(Gu(o,o.memoizedProps.onUpdate),fo=O):O!==null&&(O.push.apply(O,fo),fo=O),mo=(o.flags&32)!==0?!0:p;break;default:zu(l,o)}}function go(o,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)rR(o,l.alternate,l),l=l.sibling}function il(o,l){for(o=o.child;o!==null;){var f=o,p=l;switch(f.tag){case 0:case 11:case 14:case 15:nl(4,f,f.return),il(f,p);break;case 1:ki(f,f.return);var O=f.stateNode;typeof O.componentWillUnmount=="function"&&YA(f,f.return,O),il(f,p);break;case 27:(p&2)!==0&&fP(f.stateNode,f.type,f.memoizedProps);case 5:ki(f,f.return),f.tag!==5&&f.tag!==27||sd(f),il(f,p);break;case 6:sd(f);break;case 26:ki(f,f.return),O=f.stateNode,f.memoizedState!==null||O===null||Zt||O.parentNode.removeChild(O),il(f,p);break;case 22:f.memoizedState===null&&il(f,p);break;case 30:ki(f,f.return),il(f,p);break;case 7:ki(f,f.return);default:il(f,p)}o=o.sibling}}function Ls(o,l,f){for(f=(l.subtreeFlags&8772)!==0?f:f&-2,l=l.child;l!==null;){var p=l.alternate,O=o,b=l,E=b.flags,M=(f&1)!==0;switch(b.tag){case 0:case 11:case 15:Ls(O,b,f),rd(4,b);break;case 1:if(Ls(O,b,f),p=b,O=p.stateNode,typeof O.componentDidMount=="function")try{O.componentDidMount()}catch(ne){Gt(p,p.return,ne)}if(p=b,O=p.updateQueue,O!==null){var j=p.stateNode;try{var W=O.shared.hiddenCallbacks;if(W!==null)for(O.shared.hiddenCallbacks=null,O=0;O<W.length;O++)QC(W[O],j)}catch(ne){Gt(p,p.return,ne)}}M&&E&64&&qA(b),uo(b,b.return);break;case 27:(f&2)!==0&&HA(b);case 5:b.tag!==5&&b.tag!==27||GA(b),Ls(O,b,f),M&&p===null&&E&4&&av(b),uo(b,b.return);break;case 6:GA(b);break;case 26:j=b.stateNode,b.memoizedState!==null||j===null||hi||iS(md(j.ownerDocument),b.type,j),Ls(O,b,f),M&&p===null&&E&4&&av(b),uo(b,b.return);break;case 12:Ls(O,b,f);break;case 31:Ls(O,b,f),M&&E&4&&lR(O,b);break;case 13:Ls(O,b,f),M&&E&4&&cR(O,b);break;case 22:b.memoizedState===null&&Ls(O,b,f),uo(b,b.return);break;case 30:Ls(O,b,f),uo(b,b.return);break;case 7:uo(b,b.return);default:Ls(O,b,f)}l=l.sibling}}function vv(o,l){var f=null;o!==null&&o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(f=o.memoizedState.cachePool.pool),o=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(o=l.memoizedState.cachePool.pool),o!==f&&(o!=null&&o.refCount++,f!=null&&Vh(f))}function Sv(o,l){o=null,l.alternate!==null&&(o=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==o&&(l.refCount++,o!=null&&Vh(o))}function cs(o,l,f,p){var O=(f&335544064)===f;if(l.subtreeFlags&(O?10262:10256))for(l=l.child;l!==null;)dR(o,l,f,p),l=l.sibling;else O&&tR(l)}function dR(o,l,f,p){var O=(f&335544064)===f;O&&l.alternate===null&&l.return!==null&&l.return.alternate!==null&&rg(l);var b=l.flags;switch(l.tag){case 0:case 11:case 15:cs(o,l,f,p),b&2048&&rd(9,l);break;case 1:cs(o,l,f,p);break;case 3:cs(o,l,f,p),O&&Ov&&(o=o.containerInfo,o=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,o.style.viewTransitionName==="root"&&(o.style.viewTransitionName=""),o=o.ownerDocument.documentElement,o!==null&&o.style.viewTransitionName==="none"&&(o.style.viewTransitionName="")),b&2048&&(b=null,l.alternate!==null&&(b=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==b&&(l.refCount++,b!=null&&Vh(b)));break;case 12:if(b&2048){cs(o,l,f,p),b=l.stateNode;try{var E=l.memoizedProps,M=E.id,j=E.onPostCommit;typeof j=="function"&&j(M,l.alternate===null?"mount":"update",b.passiveEffectDuration,-0)}catch(W){Gt(l,l.return,W)}}else cs(o,l,f,p);break;case 31:cs(o,l,f,p);break;case 13:cs(o,l,f,p);break;case 23:break;case 22:E=l.stateNode,M=l.alternate,l.memoizedState!==null?(O&&M!==null&&M.memoizedState===null&&rg(M),E._visibility&2?cs(o,l,f,p):ad(o,l)):(O&&M!==null&&M.memoizedState!==null&&rg(l),E._visibility&2?cs(o,l,f,p):(E._visibility|=2,Xu(o,l,f,p,(l.subtreeFlags&10256)!==0||!1))),b&2048&&vv(M,l);break;case 24:cs(o,l,f,p),b&2048&&Sv(l.alternate,l);break;case 30:O&&(b=l.alternate,b!==null&&(ho(b.child,!0),ho(l.child,!0))),cs(o,l,f,p);break;default:cs(o,l,f,p)}}function Xu(o,l,f,p,O){for(O=O&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var b=o,E=l,M=f,j=p,W=E.flags;switch(E.tag){case 0:case 11:case 15:Xu(b,E,M,j,O),rd(8,E);break;case 23:break;case 22:var ne=E.stateNode;E.memoizedState!==null?ne._visibility&2?Xu(b,E,M,j,O):ad(b,E):(ne._visibility|=2,Xu(b,E,M,j,O)),O&&W&2048&&vv(E.alternate,E);break;case 24:Xu(b,E,M,j,O),O&&W&2048&&Sv(E.alternate,E);break;default:Xu(b,E,M,j,O)}l=l.sibling}}function ad(o,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var f=o,p=l,O=p.flags;switch(p.tag){case 22:ad(f,p),O&2048&&vv(p.alternate,p);break;case 24:ad(f,p),O&2048&&Sv(p.alternate,p);break;default:ad(f,p)}l=l.sibling}}var gc=8192;function Oc(o,l,f){if(o.subtreeFlags&gc)for(o=o.child;o!==null;)pR(o,l,f),o=o.sibling}function pR(o,l,f){switch(o.tag){case 26:Oc(o,l,f),o.flags&gc&&(o.memoizedState!==null?cq(f,Ds,o.memoizedState,o.memoizedProps):(o=o.stateNode,(l&335544128)===l&&SP(f,o)));break;case 5:Oc(o,l,f),o.flags&gc&&(o=o.stateNode,(l&335544128)===l&&SP(f,o));break;case 3:case 4:var p=Ds;Ds=md(o.stateNode.containerInfo),Oc(o,l,f),Ds=p;break;case 22:o.memoizedState===null&&(p=o.alternate,p!==null&&p.memoizedState!==null?(p=gc,gc=16777216,Oc(o,l,f),gc=p):Oc(o,l,f));break;case 30:if((o.flags&gc)!==0&&(p=o.memoizedProps.name,p!=null&&p!=="auto")){var O=o.stateNode;O.paired=null,$r===null&&($r=new Map),$r.set(p,O)}Oc(o,l,f);break;default:Oc(o,l,f)}}function mR(o){var l=o.alternate;if(l!==null&&(o=l.child,o!==null)){l.child=null;do l=o.sibling,o.sibling=null,o=l;while(o!==null)}}function ld(o){var l=o.deletions;if((o.flags&16)!==0){if(l!==null)for(var f=0;f<l.length;f++){var p=l[f];di=p,OR(p,o)}mR(o)}if(o.subtreeFlags&10256)for(o=o.child;o!==null;)gR(o),o=o.sibling}function gR(o){switch(o.tag){case 0:case 11:case 15:ld(o),o.flags&2048&&nl(9,o,o.return);break;case 3:ld(o);break;case 12:ld(o);break;case 22:var l=o.stateNode;o.memoizedState!==null&&l._visibility&2&&(o.return===null||o.return.tag!==13)?(l._visibility&=-3,lg(o)):ld(o);break;default:ld(o)}}function lg(o){var l=o.deletions;if((o.flags&16)!==0){if(l!==null)for(var f=0;f<l.length;f++){var p=l[f];di=p,OR(p,o)}mR(o)}for(o=o.child;o!==null;){switch(l=o,l.tag){case 0:case 11:case 15:nl(8,l,l.return),lg(l);break;case 22:f=l.stateNode,f._visibility&2&&(f._visibility&=-3,lg(l));break;default:lg(l)}o=o.sibling}}function OR(o,l){for(;di!==null;){var f=di;switch(f.tag){case 0:case 11:case 15:nl(8,f,l);break;case 23:case 22:if(f.memoizedState!==null&&f.memoizedState.cachePool!==null){var p=f.memoizedState.cachePool.pool;p!=null&&p.refCount++}break;case 24:Vh(f.memoizedState.cache)}if(p=f.child,p!==null)p.return=f,di=p;else e:for(f=o;di!==null;){p=di;var O=p.sibling,b=p.return;if(oR(p),p===f){di=null;break e}if(O!==null){O.return=b,di=O;break e}di=b}}}var r4={getCacheForType:function(o){var l=Ei(Un),f=l.data.get(o);return f===void 0&&(f=o(),l.data.set(o,f)),f},cacheSignal:function(){return Ei(Un).controller.signal}},s4=typeof WeakMap=="function"?WeakMap:Map,Bt=0,sn=null,St=null,_t=0,Yt=0,Dr=null,rl=!1,Uu=!1,xv=!1,ha=0,An=0,sl=0,bc=0,cg=0,Lr=0,Zu=0,cd=null,gr=null,wv=!1,ug=0,bR=0,fg=1/0,hg=null,ol=null,Sn=0,Is=null,yc=null,Oo=0,Ev=0,_v=null,yR=null,Vu=null,qu=null,Yu=null,ud=0,dg=null;function Ir(){return(Bt&2)!==0&&_t!==0?_t&-_t:Se.T!==null?$v():Jl()}function vR(){if(Lr===0)if((_t&536870912)===0||yt){var o=es;es<<=1,(es&3932160)===0&&(es=262144),Lr=o}else Lr=536870912;return o=_i.current,o!==null&&(o.flags|=32),Lr}function Gu(o,l){if(l!=null){var f=o.stateNode,p=f.ref;p===null&&(p=f.ref=eP(na(o.memoizedProps,f))),qu===null&&(qu=[]),qu.push(l.bind(null,p))}}function Or(o,l,f){(o===sn&&(Yt===2||Yt===9)||o.cancelPendingCommit!==null)&&(Fu(o,0),al(o,_t,Lr,!1)),Ko(o,f),((Bt&2)===0||o!==sn)&&(o===sn&&((Bt&2)===0&&(bc|=f),An===4&&al(o,_t,Lr,!1)),bo(o))}function SR(o,l,f){if((Bt&6)!==0)throw Error(i(327));var p=!f&&(l&127)===0&&(l&o.expiredLanes)===0||io(o,l),O=p?l4(o,l):kv(o,l,!0),b=p;do{if(O===0){Uu&&!p&&al(o,l,0,!1);break}else{if(f=o.current.alternate,b&&!o4(f)){O=kv(o,l,!1),b=!1;continue}if(O===2){if(b=l,o.errorRecoveryDisabledLanes&b)var E=0;else E=o.pendingLanes&-536870913,E=E!==0?E:E&536870912?536870912:0;if(E!==0){l=E;e:{var M=o;O=cd;var j=M.current.memoizedState.isDehydrated;if(j&&(Fu(M,E).flags|=256),E=kv(M,E,!1),E!==2&&E!==6){if(xv&&!j){M.errorRecoveryDisabledLanes|=b,bc|=b,O=4;break e}b=gr,gr=O,b!==null&&(gr===null?gr=b:gr.push.apply(gr,b))}O=E}if(b=!1,O!==2)continue}}if(O===1){Fu(o,0),al(o,l,0,!0);break}e:{switch(p=o,b=O,b){case 0:case 1:throw Error(i(345));case 4:if((l&4194048)!==l&&(l&62914560)!==l)break;case 6:al(p,l,Lr,!rl);break e;case 2:gr=null;break;case 3:case 5:break;default:throw Error(i(329))}if((l&62914560)===l&&(O=ug+300-Qn(),10<O)){if(al(p,l,Lr,!rl),ns(p,0,!0)!==0)break e;Oo=l,p.timeoutHandle=qv(xR.bind(null,p,f,gr,hg,wv,l,Lr,bc,Zu,rl,b,"Throttled",-0,0),O);break e}xR(p,f,gr,hg,wv,l,Lr,bc,Zu,rl,b,null,-0,0)}}break}while(!0);bo(o)}function xR(o,l,f,p,O,b,E,M,j,W,ne,pe,F,te){o.timeoutHandle=-1;var Me=l.subtreeFlags,Ze=(b&335544064)===b;if(pe=null,(Ze||Me&8192||(Me&16785408)===16785408)&&(pe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ut},$r=null,pR(l,b,pe),Ze&&(Me=pe,Ze=o.containerInfo,Ze=(Ze.nodeType===9?Ze:Ze.ownerDocument).__reactViewTransition,Ze!=null&&(Me.count++,Me.waitingForViewTransition=!0,Me=bd.bind(Me),Ze.finished.then(Me,Me))),Me=(b&62914560)===b?ug-Qn():(b&4194048)===b?bR-Qn():0,Me=uq(pe,Me),Me!==null)){Oo=b,o.cancelPendingCommit=Me(RR.bind(null,o,l,b,f,p,O,E,M,j,W,ne,pe,null,F,te)),al(o,b,E,!W);return}RR(o,l,b,f,p,O,E,M,j,W,ne,pe)}function o4(o){for(var l=o;;){var f=l.tag;if((f===0||f===11||f===15)&&l.flags&16384&&(f=l.updateQueue,f!==null&&(f=f.stores,f!==null)))for(var p=0;p<f.length;p++){var O=f[p],b=O.getSnapshot;O=O.value;try{if(!Nr(b(),O))return!1}catch{return!1}}if(f=l.child,l.subtreeFlags&16384&&f!==null)f.return=l,l=f;else{if(l===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function al(o,l,f,p){l=La(o,l),l&=~cg,l&=~bc,o.suspendedLanes|=l,o.pingedLanes&=~l,p&&(o.warmLanes|=l),p=o.expirationTimes;for(var O=l;0<O;){var b=31-Ce(O),E=1<<b;p[b]=-1,O&=~E}f!==0&&Ps(o,f,l)}function pg(){return(Bt&6)===0?(fd(0),!1):!0}function Tv(){if(St!==null){if(Yt===0)var o=St.return;else o=St,oa=oc=null,Q0(o),$u=null,Gh=0,o=St;for(;o!==null;)VA(o.alternate,o),o=o.return;St=null}}function Fu(o,l){var f=o.timeoutHandle;return f!==-1&&(o.timeoutHandle=-1,R4(f)),f=o.cancelPendingCommit,f!==null&&(o.cancelPendingCommit=null,f()),Oo=0,Tv(),sn=o,St=f=ra(o.current,null),_t=l,Yt=0,Dr=null,rl=!1,Uu=io(o,l),xv=!1,Zu=Lr=cg=bc=sl=An=0,gr=cd=null,wv=!1,ha=La(o,l),xm(),f}function wR(o,l){mt=null,Se.H=Ym,l===Qu||l===Nm?(l=RC(),Yt=3):l===S0?(l=RC(),Yt=4):Yt=l===F0?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,Dr=l,St===null&&(An=1,Gm(o,ss(l,o.current)))}function ER(){var o=_i.current;return o===null?!0:(_t&4194048)===_t?Bi===null:(_t&62914560)===_t||(_t&536870912)!==0?o===Bi:!1}function _R(){var o=Se.H;return Se.H=Ym,o===null?Ym:o}function TR(){var o=Se.A;return Se.A=r4,o}function mg(){An=4,rl||(_t&4194048)!==_t&&_i.current!==null||(Uu=!0),(sl&134217727)===0&&(bc&134217727)===0||sn===null||al(sn,_t,Lr,!1)}function kv(o,l,f){var p=Bt;Bt|=2;var O=_R(),b=TR();(sn!==o||_t!==l)&&(hg=null,Fu(o,l)),l=!1;var E=An;e:do try{if(Yt!==0&&St!==null){var M=St,j=Dr;switch(Yt){case 8:Tv(),E=6;break e;case 3:case 2:case 9:case 6:_i.current===null&&(l=!0);var W=Yt;if(Yt=0,Dr=null,Hu(o,M,j,W),f&&Uu){E=0;break e}break;default:W=Yt,Yt=0,Dr=null,Hu(o,M,j,W)}}a4(),E=An;break}catch(ne){wR(o,ne)}while(!0);return l&&o.shellSuspendCounter++,oa=oc=null,Bt=p,Se.H=O,Se.A=b,St===null&&(sn=null,_t=0,xm()),E}function a4(){for(;St!==null;)kR(St)}function l4(o,l){var f=Bt;Bt|=2;var p=_R(),O=TR();sn!==o||_t!==l?(hg=null,fg=Qn()+500,Fu(o,l)):Uu=io(o,l);e:do try{if(Yt!==0&&St!==null){l=St;var b=Dr;t:switch(Yt){case 1:Yt=0,Dr=null,Hu(o,l,b,1);break;case 2:case 9:if(CC(b)){Yt=0,Dr=null,CR(l);break}l=function(){Yt!==2&&Yt!==9||sn!==o||(Yt=7),bo(o)},b.then(l,l);break e;case 3:Yt=7;break e;case 4:Yt=5;break e;case 7:CC(b)?(Yt=0,Dr=null,CR(l)):(Yt=0,Dr=null,Hu(o,l,b,7));break;case 5:var E=null;switch(St.tag){case 26:E=St.memoizedState;case 5:case 27:var M=St;if(E?yP(E):M.stateNode.complete){Yt=0,Dr=null;var j=M.sibling;if(j!==null)St=j;else{var W=M.return;W!==null?(St=W,gg(W)):St=null}break t}}Yt=0,Dr=null,Hu(o,l,b,5);break;case 6:Yt=0,Dr=null,Hu(o,l,b,6);break;case 8:Tv(),An=6;break e;default:throw Error(i(462))}}c4();break}catch(ne){wR(o,ne)}while(!0);return oa=oc=null,Se.H=p,Se.A=O,Bt=f,St!==null?0:(sn=null,_t=0,xm(),An)}function c4(){for(;St!==null&&!eo();)kR(St)}function kR(o){var l=UA(o.alternate,o,ha);o.memoizedProps=o.pendingProps,l===null?gg(o):St=l}function CR(o){var l=o,f=l.alternate;switch(l.tag){case 15:case 0:l=DA(f,l,l.pendingProps,l.type,void 0,_t);break;case 11:l=DA(f,l,l.pendingProps,l.type.render,l.ref,_t);break;case 5:Q0(l);var p=l;p===fi&&(yt?(Cm(p),p.tag===5&&p.stateNode!=null&&(fn=p.stateNode)):(Cm(p),yt=!0));default:VA(f,l),l=St=OC(l,ha),l=UA(f,l,ha)}o.memoizedProps=o.pendingProps,l===null?gg(o):St=l}function Hu(o,l,f,p){oa=oc=null,Q0(l),$u=null,Gh=0;var O=l.return;try{if(HV(o,O,l,f,_t)){An=1,Gm(o,ss(f,o.current)),St=null;return}}catch(b){if(O!==null)throw St=O,b;An=1,Gm(o,ss(f,o.current)),St=null;return}l.flags&32768?(yt||p===1?o=!0:Uu||(_t&536870912)!==0?o=!1:(rl=o=!0,(p===2||p===9||p===3||p===6)&&(p=_i.current,p!==null&&p.tag===13&&(p.flags|=16384))),AR(l,o)):gg(l)}function gg(o){var l=o;do{if((l.flags&32768)!==0){AR(l,rl);return}o=l.return;var f=e4(l.alternate,l,ha);if(f!==null){St=f;return}if(l=l.sibling,l!==null){St=l;return}St=l=o}while(l!==null);An===0&&(An=5)}function AR(o,l){do{var f=t4(o.alternate,o);if(f!==null){f.flags&=32767,St=f;return}if(f=o.return,f!==null&&(f.flags|=32768,f.subtreeFlags=0,f.deletions=null),!l&&(o=o.sibling,o!==null)){St=o;return}St=o=f}while(o!==null);An=6,St=null}function RR(o,l,f,p,O,b,E,M,j,W,ne,pe){o.cancelPendingCommit=null;do Og();while(Sn!==0);if((Bt&6)!==0)throw Error(i(327));if(l!==null){if(l===o.current)throw Error(i(177));o===sn&&(St=sn=null,_t=0),yc=l,Is=o,Oo=f,_v=O,yR=p,u4(o,l,f,E,M,j,pe)}}function u4(o,l,f,p,O,b,E){var M=l.lanes|l.childLanes;if(Ev=M,M|=l0,pn(o,f,M,p,O,b),qu=null,(f&335544064)===f?(Yu=IV(o),p=10262):(Yu=null,p=10256),(l.subtreeFlags&p)!==0||(l.flags&p)!==0?(o.callbackNode=null,o.callbackPriority=0,g4($n,function(){return Pv(),null})):(o.callbackNode=null,o.callbackPriority=0),ng=!1,p=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||p){p=Se.T,Se.T=null,O=Ee.p,Ee.p=2,b=Bt,Bt|=4;try{n4(o,l,f)}finally{Bt=b,Ee.p=O,Se.T=p}}Sn=1,ng?Vu=D4(E,o.containerInfo,Yu,Cv,Av,h4,Rv,Pv,f4):(Cv(),Av(),Rv())}function f4(o){if(Sn!==0){var l=Is.onRecoverableError;l(o,{componentStack:null})}}function h4(){Sn===3&&(Sn=0,hR(yc,Is),Sn=4)}function Cv(){if(Sn===1){Sn=0;var o=Is,l=yc,f=Oo,p=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||p){p=Se.T,Se.T=null;var O=Ee.p;Ee.p=2;var b=Bt;Bt|=4;try{od=sg=!1,uR(l,o,f),f=Uv;var E=aC(o.containerInfo),M=f.focusedElem,j=f.selectionRange;if(E!==M&&M&&M.ownerDocument&&oC(M.ownerDocument.documentElement,M)){if(j!==null&&i0(M)){var W=j.start,ne=j.end;if(ne===void 0&&(ne=W),"selectionStart"in M)M.selectionStart=W,M.selectionEnd=Math.min(ne,M.value.length);else{var pe=M.ownerDocument||document,F=pe&&pe.defaultView||window;if(F.getSelection){var te=F.getSelection(),Me=M.textContent.length,Ze=Math.min(j.start,Me),gt=j.end===void 0?Ze:Math.min(j.end,Me);!te.extend&&Ze>gt&&(E=gt,gt=Ze,Ze=E);var H=sC(M,Ze),q=sC(M,gt);if(H&&q&&(te.rangeCount!==1||te.anchorNode!==H.node||te.anchorOffset!==H.offset||te.focusNode!==q.node||te.focusOffset!==q.offset)){var J=pe.createRange();J.setStart(H.node,H.offset),te.removeAllRanges(),Ze>gt?(te.addRange(J),te.extend(q.node,q.offset)):(J.setEnd(q.node,q.offset),te.addRange(J))}}}}for(pe=[],te=M;te=te.parentNode;)te.nodeType===1&&pe.push({element:te,left:te.scrollLeft,top:te.scrollTop});for(typeof M.focus=="function"&&M.focus(),M=0;M<pe.length;M++){var de=pe[M];de.element.scrollLeft=de.left,de.element.scrollTop=de.top}}sf=!!Xv,Uv=Xv=null}finally{Bt=b,Ee.p=O,Se.T=p}}o.current=l,Sn=2}}function Av(){if(Sn===2){Sn=0;var o=Is,l=yc,f=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||f){f=Se.T,Se.T=null;var p=Ee.p;Ee.p=2;var O=Bt;Bt|=4;try{rR(o,l.alternate,l)}finally{Bt=O,Ee.p=p,Se.T=f}}Sn=3}}function Rv(){if(Sn===4||Sn===3){Sn=0;var o=Vu;Vu=null,to();var l=Is,f=yc,p=Oo,O=yR,b=(p&335544064)===p?10262:10256;if((f.subtreeFlags&b)!==0||(f.flags&b)!==0?Sn=5:(Sn=0,yc=Is=null,PR(l,l.pendingLanes)),b=l.pendingLanes,b===0&&(ol=null),ja(p),f=f.stateNode,vt&&typeof vt.onCommitFiberRoot=="function")try{vt.onCommitFiberRoot(Xt,f,void 0,(f.current.flags&128)===128)}catch{}if(O!==null){f=Se.T,b=Ee.p,Ee.p=2,Se.T=null;try{for(var E=l.onRecoverableError,M=0;M<O.length;M++){var j=O[M];E(j.value,{componentStack:j.stack})}}finally{Se.T=f,Ee.p=b}}if(O=qu,E=Yu,Yu=null,O!==null&&(qu=null,E===null&&(E=[]),o!==null))for(j=0;j<O.length;j++)f=(0,O[j])(E),f!==void 0&&o.finished.finally(f);(Oo&3)!==0&&Og(),bo(l),b=l.pendingLanes,(p&261930)!==0&&(b&42)!==0?l===dg?ud++:(ud=0,dg=l):(ud=0,dg=null),fd(0)}}function PR(o,l){(o.pooledCacheLanes&=l)===0&&(l=o.pooledCache,l!=null&&(o.pooledCache=null,Vh(l)))}function Og(){return Vu!==null&&(Vu.skipTransition(),Vu=null),Cv(),Av(),Rv(),Pv()}function Pv(){if(Sn!==5)return!1;var o=Is,l=Ev;Ev=0;var f=ja(Oo),p=Se.T,O=Ee.p;try{Ee.p=32>f?32:f,Se.T=null,f=_v,_v=null;var b=Is,E=Oo;if(Sn=0,yc=Is=null,Oo=0,(Bt&6)!==0)throw Error(i(331));var M=Bt;if(Bt|=4,gR(b.current),dR(b,b.current,E,f),Bt=M,fd(0,!1),vt&&typeof vt.onPostCommitFiberRoot=="function")try{vt.onPostCommitFiberRoot(Xt,b)}catch{}return!0}finally{Ee.p=O,Se.T=p,PR(o,l)}}function MR(o,l,f){l=ss(f,l),l=G0(o.stateNode,l,2),o=Ka(o,l,2),o!==null&&(Ko(o,2),bo(o))}function Gt(o,l,f){if(o.tag===3)MR(o,o,f);else for(;l!==null;){if(l.tag===3){MR(l,o,f);break}else if(l.tag===1){var p=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(ol===null||!ol.has(p))){o=ss(f,o),f=CA(2),p=Ka(l,f,2),p!==null&&(AA(f,p,l,o),Ko(p,2),bo(p));break}}l=l.return}}function Mv(o,l,f){var p=o.pingCache;if(p===null){p=o.pingCache=new s4;var O=new Set;p.set(l,O)}else O=p.get(l),O===void 0&&(O=new Set,p.set(l,O));O.has(f)||(xv=!0,O.add(f),o=d4.bind(null,o,l,f),l.then(o,o))}function d4(o,l,f){var p=o.pingCache;p!==null&&p.delete(l),o.pingedLanes|=o.suspendedLanes&f,o.warmLanes&=~f,sn===o&&(_t&f)===f&&((An===4||An===3&&(_t&62914560)===_t&&300>Qn()-ug)&&(Bt&2)===0?Fu(o,0):cg|=f,Zu===_t&&(Zu=0)),bo(o)}function NR(o,l){l===0&&(l=Rs()),o=ic(o,l),o!==null&&(Ko(o,l),bo(o))}function p4(o){var l=o.memoizedState,f=0;l!==null&&(f=l.retryLane),NR(o,f)}function m4(o,l){var f=0;switch(o.tag){case 31:case 13:var p=o.stateNode,O=o.memoizedState;O!==null&&(f=O.retryLane);break;case 19:p=o.stateNode;break;case 22:p=o.stateNode._retryCache;break;default:throw Error(i(314))}p!==null&&p.delete(l),NR(o,f)}function g4(o,l){return ur(o,l)}var Wu=null,Ku=null,Nv=!1,bg=!1,Qv=!1,ll=0;function bo(o){o!==Ku&&o.next===null&&(Ku===null?Wu=Ku=o:Ku=Ku.next=o),bg=!0,Nv||(Nv=!0,b4())}function fd(o,l){if(!Qv&&bg){Qv=!0;do for(var f=!1,p=Wu;p!==null;){if(o!==0){var O=p.pendingLanes;if(O===0)var b=0;else{var E=p.suspendedLanes,M=p.pingedLanes;b=(1<<31-Ce(42|o)+1)-1,b&=O&~(E&~M),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(f=!0,LR(p,b))}else b=_t,b=ns(p,p===sn?b:0,p.cancelPendingCommit!==null||p.timeoutHandle!==-1),(b&3)===0||io(p,b)||(f=!0,LR(p,b));p=p.next}while(f);Qv=!1}}function O4(){QR()}function QR(){bg=Nv=!1;var o=0;ll!==0&&A4()&&(o=ll);for(var l=Qn(),f=null,p=Wu;p!==null;){var O=p.next,b=$R(p,l);b===0?(p.next=null,f===null?Wu=O:f.next=O,O===null&&(Ku=f)):(f=p,(o!==0||(b&3)!==0)&&(bg=!0)),p=O}Sn!==0&&Sn!==5||fd(o),ll!==0&&(ll=0)}function $R(o,l){for(var f=o.suspendedLanes,p=o.pingedLanes,O=o.expirationTimes,b=o.pendingLanes&-62914561;0<b;){var E=31-Ce(b),M=1<<E,j=O[E];j===-1?((M&f)===0||(M&p)!==0)&&(O[E]=Nh(M,l)):j<=l&&(o.expiredLanes|=M),b&=~M}if(l=sn,f=_t,f=ns(o,o===l?f:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),p=o.callbackNode,f===0||o===l&&(Yt===2||Yt===9)||o.cancelPendingCommit!==null)return p!==null&&p!==null&&Jr(p),o.callbackNode=null,o.callbackPriority=0;if((f&3)===0||io(o,f)){if(l=f&-f,l===o.callbackPriority)return l;switch(p!==null&&Jr(p),ja(f)){case 2:case 8:f=Yi;break;case 32:f=$n;break;case 268435456:f=he;break;default:f=$n}return p=DR.bind(null,o),f=ur(f,p),o.callbackPriority=l,o.callbackNode=f,l}return p!==null&&p!==null&&Jr(p),o.callbackPriority=2,o.callbackNode=null,2}function DR(o,l){if(Sn!==0&&Sn!==5)return o.callbackNode=null,o.callbackPriority=0,null;var f=o.callbackNode;if(Og()&&o.callbackNode!==f)return null;var p=_t;return p=ns(o,o===sn?p:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),p===0?null:(SR(o,p,l),$R(o,Qn()),o.callbackNode!=null&&o.callbackNode===f?DR.bind(null,o):null)}function LR(o,l){if(Og())return null;SR(o,l,!0)}function b4(){P4(function(){(Bt&6)!==0?ur(Cr,O4):QR()})}function $v(){if(ll===0){var o=cc;o===0&&(o=fr,fr<<=1,(fr&261888)===0&&(fr=256)),ll=o}return ll}function IR(o){return o==null||typeof o=="symbol"||typeof o=="boolean"?null:typeof o=="function"?o:pt(o)}function y4(o,l,f,p,O){if(l==="submit"&&f&&f.stateNode===O){var b=IR((O[xe]||null).action),E=p.submitter;E&&(l=(l=E[xe]||null)?IR(l.formAction):E.getAttribute("formAction"),l!==null&&(b=l,E=null));var M=new bm("action","action",null,p,O);o.push({event:M,listeners:[{instance:null,listener:function(){if(p.defaultPrevented){if(ll!==0){var j=new FormData(O,E);U0(f,{pending:!0,data:j,method:O.method,action:b},null,j)}}else typeof b=="function"&&(M.preventDefault(),j=new FormData(O,E),U0(f,{pending:!0,data:j,method:O.method,action:b},b,j))},currentTarget:O}]})}}for(var Dv=0;Dv<a0.length;Dv++){var Lv=a0[Dv],v4=Lv.toLowerCase(),S4=Lv[0].toUpperCase()+Lv.slice(1);Qs(v4,"on"+S4)}Qs(uC,"onAnimationEnd"),Qs(fC,"onAnimationIteration"),Qs(hC,"onAnimationStart"),Qs("dblclick","onDoubleClick"),Qs("focusin","onFocus"),Qs("focusout","onBlur"),Qs(RV,"onTransitionRun"),Qs(PV,"onTransitionStart"),Qs(MV,"onTransitionCancel"),Qs(dC,"onTransitionEnd"),Pr("onMouseEnter",["mouseout","mouseover"]),Pr("onMouseLeave",["mouseout","mouseover"]),Pr("onPointerEnter",["pointerout","pointerover"]),Pr("onPointerLeave",["pointerout","pointerover"]),Gi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Gi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Gi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Gi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Gi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Gi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var hd="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),x4=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(hd));function jR(o,l){l=(l&4)!==0;for(var f=0;f<o.length;f++){var p=o[f],O=p.event;p=p.listeners;e:{var b=void 0;if(l)for(var E=p.length-1;0<=E;E--){var M=p[E],j=M.instance,W=M.currentTarget;if(M=M.listener,j!==b&&O.isPropagationStopped())break e;b=M,O.currentTarget=W;try{b(O)}catch(ne){Sm(ne)}O.currentTarget=null,b=j}else for(E=0;E<p.length;E++){if(M=p[E],j=M.instance,W=M.currentTarget,M=M.listener,j!==b&&O.isPropagationStopped())break e;b=M,O.currentTarget=W;try{b(O)}catch(ne){Sm(ne)}O.currentTarget=null,b=j}}}}function xt(o,l){var f=l[bt];f===void 0&&(f=l[bt]=new Set);var p=o+"__bubble";f.has(p)||(BR(l,o,2,!1),f.add(p))}function Iv(o,l,f){var p=0;l&&(p|=4),BR(f,o,p,l)}var yg="_reactListening"+Math.random().toString(36).slice(2);function jv(o){if(!o[yg]){o[yg]=!0,ec.forEach(function(f){f!=="selectionchange"&&(x4.has(f)||Iv(f,!1,o),Iv(f,!0,o))});var l=o.nodeType===9?o:o.ownerDocument;l===null||l[yg]||(l[yg]=!0,Iv("selectionchange",!1,l))}}function BR(o,l,f,p){switch(AP(l)){case 2:var O=pq;break;case 8:O=mq;break;default:O=sS}f=O.bind(null,l,f,o),O=void 0,!Yy||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(O=!0),p?O!==void 0?o.addEventListener(l,f,{capture:!0,passive:O}):o.addEventListener(l,f,!0):O!==void 0?o.addEventListener(l,f,{passive:O}):o.addEventListener(l,f,!1)}function Bv(o,l,f,p,O){var b=p;if((l&1)===0&&(l&2)===0&&p!==null)e:for(;;){if(p===null)return;var E=p.tag;if(E===3||E===4){var M=p.stateNode.containerInfo;if(M===O)break;if(E===4)for(E=p.return;E!==null;){var j=E.tag;if((j===3||j===4)&&E.stateNode.containerInfo===O)return;E=E.return}for(;M!==null;){if(E=Xn(M),E===null)return;if(j=E.tag,j===5||j===6||j===26||j===27){p=b=E;continue e}M=M.parentNode}}p=p.return}Bk(function(){var W=b,ne=ni(f),pe=[];e:{var F=pC.get(o);if(F!==void 0){var te=bm,Me=o;switch(o){case"keypress":if(gm(f)===0)break e;case"keydown":case"keyup":te=oV;break;case"focusin":Me="focus",te=Wy;break;case"focusout":Me="blur",te=Wy;break;case"beforeblur":case"afterblur":te=Wy;break;case"click":if(f.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":te=Uk;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":te=GZ;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":te=fV;break;case uC:case fC:case hC:te=WZ;break;case dC:te=dV;break;case"scroll":case"scrollend":te=qZ;break;case"wheel":te=mV;break;case"copy":case"cut":case"paste":te=JZ;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":te=Vk;break;case"submit":te=cV;break;case"toggle":case"beforetoggle":te=OV}var Ze=(l&4)!==0,gt=!Ze&&(o==="scroll"||o==="scrollend"),H=Ze?F!==null?F+"Capture":null:F;Ze=[];for(var q=W,J;q!==null;){var de=q;if(J=de.stateNode,de=de.tag,de!==5&&de!==26&&de!==27||J===null||H===null||(de=Qh(q,H),de!=null&&Ze.push(dd(q,de,J))),gt)break;q=q.return}0<Ze.length&&(F=new te(F,Me,null,f,ne),pe.push({event:F,listeners:Ze}))}}if((l&7)===0){e:{if(te=o==="mouseover"||o==="pointerover",F=o==="mouseout"||o==="pointerout",te&&f!==hr&&(Me=f.relatedTarget||f.fromElement)&&(Xn(Me)||Me[je]))break e;(F||te)&&(Me=ne.window===ne?ne:(te=ne.ownerDocument)?te.defaultView||te.parentWindow:window,F?(te=f.relatedTarget||f.toElement,F=W,te=te?Xn(te):null,te!==null&&(gt=s(te),Ze=te.tag,te!==gt||Ze!==5&&Ze!==27&&Ze!==6)&&(te=null)):(F=null,te=W),F!==te&&(Ze=Uk,de="onMouseLeave",H="onMouseEnter",q="mouse",(o==="pointerout"||o==="pointerover")&&(Ze=Vk,de="onPointerLeave",H="onPointerEnter",q="pointer"),gt=F==null?Me:oo(F),J=te==null?Me:oo(te),Me=new Ze(de,q+"leave",F,f,ne),Me.target=gt,Me.relatedTarget=J,de=null,Xn(ne)===W&&(Ze=new Ze(H,q+"enter",te,f,ne),Ze.target=J,Ze.relatedTarget=gt,de=Ze),gt=de,Ze=F&&te?P(F,te,w4):null,F!==null&&zR(pe,Me,F,Ze,!1),te!==null&&gt!==null&&zR(pe,gt,te,Ze,!0)))}e:{if(F=W?oo(W):window,te=F.nodeName&&F.nodeName.toLowerCase(),te==="select"||te==="input"&&F.type==="file")var Be=Jk;else if(Wk(F))if(eC)Be=kV;else{Be=_V;var Tt=EV}else te=F.nodeName,!te||te.toLowerCase()!=="input"||F.type!=="checkbox"&&F.type!=="radio"?W&&ge(W.elementType)&&(Be=Jk):Be=TV;if(Be&&(Be=Be(o,W))){Kk(pe,Be,f,ne);break e}Tt&&Tt(o,F,W)}switch(Tt=W?oo(W):window,o){case"focusin":(Wk(Tt)||Tt.contentEditable==="true")&&(Tu=Tt,r0=W,Xh=null);break;case"focusout":Xh=r0=Tu=null;break;case"mousedown":s0=!0;break;case"contextmenu":case"mouseup":case"dragend":s0=!1,lC(pe,f,ne);break;case"selectionchange":if(AV)break;case"keydown":case"keyup":lC(pe,f,ne)}var Ke;if(Jy)e:{switch(o){case"compositionstart":var st="onCompositionStart";break e;case"compositionend":st="onCompositionEnd";break e;case"compositionupdate":st="onCompositionUpdate";break e}st=void 0}else _u?Fk(o,f)&&(st="onCompositionEnd"):o==="keydown"&&f.keyCode===229&&(st="onCompositionStart");st&&(qk&&f.locale!=="ko"&&(_u||st!=="onCompositionStart"?st==="onCompositionEnd"&&_u&&(Ke=zk()):(Ua=ne,Gy="value"in Ua?Ua.value:Ua.textContent,_u=!0)),Tt=vg(W,st),0<Tt.length&&(st=new Zk(st,o,null,f,ne),pe.push({event:st,listeners:Tt}),Ke?st.data=Ke:(Ke=Hk(f),Ke!==null&&(st.data=Ke)))),(Ke=yV?vV(o,f):SV(o,f))&&(st=vg(W,"onBeforeInput"),0<st.length&&(Tt=new Zk("onBeforeInput","beforeinput",null,f,ne),pe.push({event:Tt,listeners:st}),Tt.data=Ke)),y4(pe,o,W,f,ne)}jR(pe,l)})}function dd(o,l,f){return{instance:o,listener:l,currentTarget:f}}function vg(o,l){for(var f=l+"Capture",p=[];o!==null;){var O=o,b=O.stateNode;if(O=O.tag,O!==5&&O!==26&&O!==27||b===null||(O=Qh(o,f),O!=null&&p.unshift(dd(o,O,b)),O=Qh(o,l),O!=null&&p.push(dd(o,O,b))),o.tag===3)return p;o=o.return}return[]}function w4(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5&&o.tag!==27);return o||null}function zR(o,l,f,p,O){for(var b=l._reactName,E=[];f!==null&&f!==p;){var M=f,j=M.alternate,W=M.stateNode;if(M=M.tag,j!==null&&j===p)break;M!==5&&M!==26&&M!==27||W===null||(j=W,O?(W=Qh(f,b),W!=null&&E.unshift(dd(f,W,j))):O||(W=Qh(f,b),W!=null&&E.push(dd(f,W,j)))),f=f.return}E.length!==0&&o.push({event:l,listeners:E})}var E4=/\r\n?/g,_4=/\u0000|\uFFFD/g;function XR(o){return(typeof o=="string"?o:""+o).replace(E4,`
50
+ `).replace(_4,"")}function UR(o,l){return l=XR(l),XR(o)===l}function Ft(o,l,f,p,O,b){switch(f){case"children":if(typeof p=="string")l==="body"||l==="textarea"&&p===""||ye(o,p);else if(typeof p=="number"||typeof p=="bigint")l!=="body"&&ye(o,""+p);else return;break;case"className":Ns(o,"class",p);break;case"tabIndex":Ns(o,"tabindex",p);break;case"dir":case"role":case"viewBox":case"width":case"height":Ns(o,f,p);break;case"style":Oe(o,p,b);return;case"data":if(l!=="object"){Ns(o,"data",p);break}case"src":case"href":if(p===""&&(l!=="a"||f!=="href")){o.removeAttribute(f);break}if(p==null||typeof p=="function"||typeof p=="symbol"||typeof p=="boolean"){o.removeAttribute(f);break}p=pt(p),o.setAttribute(f,p);break;case"action":case"formAction":if(typeof p=="function"){o.setAttribute(f,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof b=="function"&&(f==="formAction"?(l!=="input"&&Ft(o,l,"name",O.name,O,null),Ft(o,l,"formEncType",O.formEncType,O,null),Ft(o,l,"formMethod",O.formMethod,O,null),Ft(o,l,"formTarget",O.formTarget,O,null)):(Ft(o,l,"encType",O.encType,O,null),Ft(o,l,"method",O.method,O,null),Ft(o,l,"target",O.target,O,null)));if(p==null||typeof p=="symbol"||typeof p=="boolean"){o.removeAttribute(f);break}p=pt(p),o.setAttribute(f,p);break;case"onClick":p!=null&&(o.onclick=Ut);return;case"onScroll":p!=null&&xt("scroll",o);return;case"onScrollEnd":p!=null&&xt("scrollend",o);return;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(i(61));if(f=p.__html,f!=null){if(O.children!=null)throw Error(i(60));(b!=null?b.__html:void 0)!==f&&(o.innerHTML=f)}}break;case"multiple":o.multiple=p&&typeof p!="function"&&typeof p!="symbol";break;case"muted":o.muted=p&&typeof p!="function"&&typeof p!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(p==null||typeof p=="function"||typeof p=="boolean"||typeof p=="symbol"){o.removeAttribute("xlink:href");break}f=pt(p),o.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",f);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":p!=null&&typeof p!="function"&&typeof p!="symbol"?o.setAttribute(f,p):o.removeAttribute(f);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":p&&typeof p!="function"&&typeof p!="symbol"?o.setAttribute(f,""):o.removeAttribute(f);break;case"capture":case"download":p===!0?o.setAttribute(f,""):p!==!1&&p!=null&&typeof p!="function"&&typeof p!="symbol"?o.setAttribute(f,p):o.removeAttribute(f);break;case"cols":case"rows":case"size":case"span":p!=null&&typeof p!="function"&&typeof p!="symbol"&&!isNaN(p)&&1<=p?o.setAttribute(f,p):o.removeAttribute(f);break;case"rowSpan":case"start":p==null||typeof p=="function"||typeof p=="symbol"||isNaN(p)?o.removeAttribute(f):o.setAttribute(f,p);break;case"popover":xt("beforetoggle",o),xt("toggle",o),dt(o,"popover",p);break;case"xlinkActuate":kn(o,"http://www.w3.org/1999/xlink","xlink:actuate",p);break;case"xlinkArcrole":kn(o,"http://www.w3.org/1999/xlink","xlink:arcrole",p);break;case"xlinkRole":kn(o,"http://www.w3.org/1999/xlink","xlink:role",p);break;case"xlinkShow":kn(o,"http://www.w3.org/1999/xlink","xlink:show",p);break;case"xlinkTitle":kn(o,"http://www.w3.org/1999/xlink","xlink:title",p);break;case"xlinkType":kn(o,"http://www.w3.org/1999/xlink","xlink:type",p);break;case"xmlBase":kn(o,"http://www.w3.org/XML/1998/namespace","xml:base",p);break;case"xmlLang":kn(o,"http://www.w3.org/XML/1998/namespace","xml:lang",p);break;case"xmlSpace":kn(o,"http://www.w3.org/XML/1998/namespace","xml:space",p);break;case"is":dt(o,"is",p);break;case"innerText":case"textContent":return;default:if(!(2<f.length)||f[0]!=="o"&&f[0]!=="O"||f[1]!=="n"&&f[1]!=="N")f=We.get(f)||f,dt(o,f,p);else return}ht=!0}function zv(o,l,f,p,O,b){switch(f){case"style":Oe(o,p,b);return;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(i(61));if(f=p.__html,f!=null){if(O.children!=null)throw Error(i(60));(b!=null?b.__html:void 0)!==f&&(o.innerHTML=f)}}break;case"children":if(typeof p=="string")ye(o,p);else if(typeof p=="number"||typeof p=="bigint")ye(o,""+p);else return;break;case"onScroll":p!=null&&xt("scroll",o);return;case"onScrollEnd":p!=null&&xt("scrollend",o);return;case"onClick":p!=null&&(o.onclick=Ut);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!Su.hasOwnProperty(f))e:{if(f[0]==="o"&&f[1]==="n"&&(O=f.endsWith("Capture"),b=f.slice(2,O?f.length-7:void 0),l=o[xe]||null,l=l!=null?l[f]:null,typeof l=="function"&&o.removeEventListener(b,l,O),typeof p=="function")){typeof l!="function"&&l!==null&&(f in o?o[f]=null:o.hasAttribute(f)&&o.removeAttribute(f)),o.addEventListener(b,p,O);break e}ht=!0,f in o?o[f]=p:p===!0?o.setAttribute(f,""):dt(o,f,p)}return}ht=!0}function Ci(o,l,f){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":xt("error",o),xt("load",o);var p=!1,O=!1,b;for(b in f)if(f.hasOwnProperty(b)){var E=f[b];if(E!=null)switch(b){case"src":p=!0;break;case"srcSet":O=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,l));default:Ft(o,l,b,E,f,null)}}O&&Ft(o,l,"srcSet",f.srcSet,f,null),p&&Ft(o,l,"src",f.src,f,null);return;case"input":xt("invalid",o);var M=b=E=O=null,j=null,W=null;for(p in f)if(f.hasOwnProperty(p)){var ne=f[p];if(ne!=null)switch(p){case"name":O=ne;break;case"type":E=ne;break;case"checked":j=ne;break;case"defaultChecked":W=ne;break;case"value":b=ne;break;case"defaultValue":M=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(i(137,l));break;default:Ft(o,l,p,ne,f,null)}}xu(o,b,M,j,W,E,O,!1);return;case"select":xt("invalid",o),p=E=b=null;for(O in f)if(f.hasOwnProperty(O)&&(M=f[O],M!=null))switch(O){case"value":b=M;break;case"defaultValue":E=M;break;case"multiple":p=M;default:Ft(o,l,O,M,f,null)}l=b,f=E,o.multiple=!!p,l!=null?ao(o,!!p,l,!1):f!=null&&ao(o,!!p,f,!0);return;case"textarea":xt("invalid",o),b=O=p=null;for(E in f)if(f.hasOwnProperty(E)&&(M=f[E],M!=null))switch(E){case"value":p=M;break;case"defaultValue":O=M;break;case"children":b=M;break;case"dangerouslySetInnerHTML":if(M!=null)throw Error(i(91));break;default:Ft(o,l,E,M,f,null)}wu(o,p,O,b);return;case"option":for(j in f)if(f.hasOwnProperty(j)&&(p=f[j],p!=null))switch(j){case"selected":o.selected=p&&typeof p!="function"&&typeof p!="symbol";break;default:Ft(o,l,j,p,f,null)}return;case"dialog":xt("beforetoggle",o),xt("toggle",o),xt("cancel",o),xt("close",o);break;case"iframe":case"object":xt("load",o);break;case"video":case"audio":for(p=0;p<hd.length;p++)xt(hd[p],o);break;case"image":xt("error",o),xt("load",o);break;case"details":xt("toggle",o);break;case"embed":case"source":case"link":xt("error",o),xt("load",o);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(W in f)if(f.hasOwnProperty(W)&&(p=f[W],p!=null))switch(W){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,l));default:Ft(o,l,W,p,f,null)}return;default:if(ge(l)){for(ne in f)f.hasOwnProperty(ne)&&(p=f[ne],p!==void 0&&zv(o,l,ne,p,f,void 0));return}}for(M in f)f.hasOwnProperty(M)&&(p=f[M],p!=null&&Ft(o,l,M,p,f,null))}var T4={};function k4(o,l,f,p){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var O=null,b=null,E=null,M=null,j=null,W=null,ne=null;for(te in f){var pe=f[te];if(f.hasOwnProperty(te)&&pe!=null)switch(te){case"checked":break;case"value":break;case"defaultValue":j=pe;default:p.hasOwnProperty(te)||Ft(o,l,te,null,p,pe)}}for(var F in p){var te=p[F];if(pe=f[F],p.hasOwnProperty(F)&&(te!=null||pe!=null))switch(F){case"type":te!==pe&&(ht=!0),b=te;break;case"name":te!==pe&&(ht=!0),O=te;break;case"checked":te!==pe&&(ht=!0),W=te;break;case"defaultChecked":te!==pe&&(ht=!0),ne=te;break;case"value":te!==pe&&(ht=!0),E=te;break;case"defaultValue":te!==pe&&(ht=!0),M=te;break;case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(i(137,l));break;default:te!==pe&&Ft(o,l,F,te,p,pe)}}Fi(o,E,M,j,W,ne,b,O);return;case"select":te=E=M=F=null;for(b in f)if(j=f[b],f.hasOwnProperty(b)&&j!=null)switch(b){case"value":break;case"multiple":te=j;default:p.hasOwnProperty(b)||Ft(o,l,b,null,p,j)}for(O in p)if(b=p[O],j=f[O],p.hasOwnProperty(O)&&(b!=null||j!=null))switch(O){case"value":b!==j&&(ht=!0),F=b;break;case"defaultValue":b!==j&&(ht=!0),M=b;break;case"multiple":b!==j&&(ht=!0),E=b;default:b!==j&&Ft(o,l,O,b,p,j)}l=M,f=E,p=te,F!=null?ao(o,!!f,F,!1):!!p!=!!f&&(l!=null?ao(o,!!f,l,!0):ao(o,!!f,f?[]:"",!1));return;case"textarea":te=F=null;for(M in f)if(O=f[M],f.hasOwnProperty(M)&&O!=null&&!p.hasOwnProperty(M))switch(M){case"value":break;case"children":break;default:Ft(o,l,M,null,p,O)}for(E in p)if(O=p[E],b=f[E],p.hasOwnProperty(E)&&(O!=null||b!=null))switch(E){case"value":O!==b&&(ht=!0),F=O;break;case"defaultValue":O!==b&&(ht=!0),te=O;break;case"children":break;case"dangerouslySetInnerHTML":if(O!=null)throw Error(i(91));break;default:O!==b&&Ft(o,l,E,O,p,b)}Xa(o,F,te);return;case"option":for(var Me in f)if(F=f[Me],f.hasOwnProperty(Me)&&F!=null&&!p.hasOwnProperty(Me))switch(Me){case"selected":o.selected=!1;break;default:Ft(o,l,Me,null,p,F)}for(j in p)if(F=p[j],te=f[j],p.hasOwnProperty(j)&&F!==te&&(F!=null||te!=null))switch(j){case"selected":F!==te&&(ht=!0),o.selected=F&&typeof F!="function"&&typeof F!="symbol";break;default:Ft(o,l,j,F,p,te)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ze in f)F=f[Ze],f.hasOwnProperty(Ze)&&F!=null&&!p.hasOwnProperty(Ze)&&Ft(o,l,Ze,null,p,F);for(W in p)if(F=p[W],te=f[W],p.hasOwnProperty(W)&&F!==te&&(F!=null||te!=null))switch(W){case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(i(137,l));break;default:Ft(o,l,W,F,p,te)}return;default:if(ge(l)){for(var gt in f)F=f[gt],f.hasOwnProperty(gt)&&F!==void 0&&!p.hasOwnProperty(gt)&&zv(o,l,gt,void 0,p,F);for(ne in p)F=p[ne],te=f[ne],!p.hasOwnProperty(ne)||F===te||F===void 0&&te===void 0||zv(o,l,ne,F,p,te);return}}for(var H in f)F=f[H],f.hasOwnProperty(H)&&F!=null&&!p.hasOwnProperty(H)&&Ft(o,l,H,null,p,F);for(pe in p)F=p[pe],te=f[pe],!p.hasOwnProperty(pe)||F===te||F==null&&te==null||Ft(o,l,pe,F,p,te)}function ZR(o){switch(o){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function C4(){if(typeof performance.getEntriesByType=="function"){for(var o=0,l=0,f=performance.getEntriesByType("resource"),p=0;p<f.length;p++){var O=f[p],b=O.transferSize,E=O.initiatorType,M=O.duration;if(b&&M&&ZR(E)){for(E=0,M=O.responseEnd,p+=1;p<f.length;p++){var j=f[p],W=j.startTime;if(W>M)break;var ne=j.transferSize,pe=j.initiatorType;ne&&ZR(pe)&&(j=j.responseEnd,E+=ne*(j<M?1:(M-W)/(j-W)))}if(--p,l+=8*(b+E)/(O.duration/1e3),o++,10<o)break}}if(0<o)return l/o/1e6}return navigator.connection&&(o=navigator.connection.downlink,typeof o=="number")?o:5}var Xv=null,Uv=null;function pd(o){return o.nodeType===9?o:o.ownerDocument}function VR(o){switch(o){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function qR(o,l){if(o===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return o===1&&l==="foreignObject"?0:o}function YR(o,l,f,p){return f=pd(f).createElement(o),f[Dn]=p,f[xe]=l,Ci(f,o,l),Tn(f),f}function Zv(o,l){return o==="textarea"||o==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.children=="bigint"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var Vv=null;function A4(){var o=window.event;return o&&o.type==="popstate"?o===Vv?!1:(Vv=o,!0):(Vv=null,!1)}var qv=typeof setTimeout=="function"?setTimeout:void 0,R4=typeof clearTimeout=="function"?clearTimeout:void 0,GR=typeof Promise=="function"?Promise:void 0,FR=typeof requestAnimationFrame=="function"?requestAnimationFrame:qv,P4=typeof queueMicrotask=="function"?queueMicrotask:typeof GR<"u"?function(o){return GR.resolve(null).then(o).catch(M4)}:qv;function M4(o){setTimeout(function(){throw o})}function cl(o){return o==="head"}function HR(o,l){var f=l,p=0;do{var O=f.nextSibling;if(o.removeChild(f),O&&O.nodeType===8)if(f=O.data,f==="/$"||f==="/&"){if(p===0){o.removeChild(O),of(l);return}p--}else if(f==="$"||f==="$?"||f==="$~"||f==="$!"||f==="&")p++;else if(f==="html")eS(o.ownerDocument.documentElement);else if(f==="head"){f=o.ownerDocument.head,eS(f);for(var b=f.firstChild;b;){var E=b.nextSibling,M=b.nodeName;b[ui]||M==="SCRIPT"||M==="STYLE"||M==="LINK"&&b.rel.toLowerCase()==="stylesheet"||f.removeChild(b),b=E}}else f==="body"&&eS(o.ownerDocument.body);f=O}while(f);of(l)}function WR(o,l){var f=o;o=0;do{var p=f.nextSibling;if(f.nodeType===1?l?(f._stashedDisplay=f.style.display,f.style.display="none"):(f.style.display=f._stashedDisplay||"",f.getAttribute("style")===""&&f.removeAttribute("style")):f.nodeType===3&&(l?(f._stashedText=f.nodeValue,f.nodeValue=""):f.nodeValue=f._stashedText||""),p&&p.nodeType===8)if(f=p.data,f==="/$"){if(o===0)break;o--}else f!=="$"&&f!=="$?"&&f!=="$~"&&f!=="$!"||o++;f=p}while(f)}function KR(o,l,f){if(l=CSS.escape(l)!==l?"r-"+btoa(l).replace(/=/g,""):l,o.style.viewTransitionName=l,f!=null&&(o.style.viewTransitionClass=f),f=getComputedStyle(o),f.display==="inline"){if(l=o.getClientRects(),l.length===1)var p=1;else for(var O=p=0;O<l.length;O++){var b=l[O];0<b.width&&0<b.height&&p++}p===1&&(o=o.style,o.display=l.length===1?"inline-block":"block",o.marginTop="-"+f.paddingTop,o.marginBottom="-"+f.paddingBottom)}}function JR(o,l){o=o.style,l=l.style;var f=l!=null?l.hasOwnProperty("viewTransitionName")?l.viewTransitionName:l.hasOwnProperty("view-transition-name")?l["view-transition-name"]:null:null;o.viewTransitionName=f==null||typeof f=="boolean"?"":(""+f).trim(),f=l!=null?l.hasOwnProperty("viewTransitionClass")?l.viewTransitionClass:l.hasOwnProperty("view-transition-class")?l["view-transition-class"]:null:null,o.viewTransitionClass=f==null||typeof f=="boolean"?"":(""+f).trim(),o.display==="inline-block"&&(l==null?o.display=o.margin="":(f=l.display,o.display=f==null||typeof f=="boolean"?"":f,f=l.margin,f!=null?o.margin=f:(f=l.hasOwnProperty("marginTop")?l.marginTop:l["margin-top"],o.marginTop=f==null||typeof f=="boolean"?"":f,l=l.hasOwnProperty("marginBottom")?l.marginBottom:l["margin-bottom"],o.marginBottom=l==null||typeof l=="boolean"?"":l)))}function N4(o,l,f){return f=f.ownerDocument.defaultView,{rect:o,abs:l.position==="absolute"||l.position==="fixed",clip:l.clipPath!=="none"||l.overflow!=="visible"||l.filter!=="none"||l.mask!=="none"||l.mask!=="none"||l.borderRadius!=="0px",view:0<=o.bottom&&0<=o.right&&o.top<=f.innerHeight&&o.left<=f.innerWidth}}function Yv(o){var l=o.getBoundingClientRect(),f=getComputedStyle(o);return N4(l,f,o)}function Q4(o){return o.documentElement.clientHeight}function $4(o){this.addEventListener("load",o),this.addEventListener("error",o)}function D4(o,l,f,p,O,b,E,M,j){var W=l.nodeType===9?l:l.ownerDocument;try{var ne=W.startViewTransition({update:function(){var F=W.defaultView,te=F.navigation&&F.navigation.transition,Me=W.fonts.status;p();var Ze=[];if(Me==="loaded"&&(Q4(W),W.fonts.status==="loading"&&Ze.push(W.fonts.ready)),Me=Ze.length,o!==null)for(var gt=o.suspenseyImages,H=0,q=0;q<gt.length;q++){var J=gt[q];if(!J.complete){var de=J.getBoundingClientRect();if(0<de.bottom&&0<de.right&&de.top<F.innerHeight&&de.left<F.innerWidth){if(H+=vP(J),H>wg){Ze.length=Me;break}J=new Promise($4.bind(J)),Ze.push(J)}}}if(0<Ze.length)return F=Promise.race([Promise.all(Ze),new Promise(function(Be){return setTimeout(Be,500)})]).then(O,O),(te?Promise.allSettled([te.finished,F]):F).then(b,b);if(O(),te)return te.finished.then(b,b);b()},types:f});W.__reactViewTransition=ne;var pe=[];return ne.ready.then(function(){for(var F=W.documentElement.getAnimations({subtree:!0}),te=0;te<F.length;te++){var Me=F[te],Ze=Me.effect,gt=Ze.pseudoElement;if(gt!=null&&gt.startsWith("::view-transition")){pe.push(Me),Me=Ze.getKeyframes();for(var H=gt=void 0,q=!0,J=0;J<Me.length;J++){var de=Me[J],Be=de.width;if(gt===void 0)gt=Be;else if(gt!==Be){q=!1;break}if(Be=de.height,H===void 0)H=Be;else if(H!==Be){q=!1;break}delete de.width,delete de.height,de.transform==="none"&&delete de.transform}q&&gt!==void 0&&H!==void 0&&(Ze.setKeyframes(Me),q=getComputedStyle(Ze.target,Ze.pseudoElement),q.width!==gt||q.height!==H)&&(q=Me[0],q.width=gt,q.height=H,q=Me[Me.length-1],q.width=gt,q.height=H,Ze.setKeyframes(Me))}}E()},function(F){W.__reactViewTransition===ne&&(W.__reactViewTransition=null);try{if(typeof F=="object"&&F!==null)switch(F.name){case"InvalidStateError":(F.message==="View transition was skipped because document visibility state is hidden."||F.message==="Skipping view transition because document visibility state has become hidden."||F.message==="Skipping view transition because viewport size changed."||F.message==="Transition was aborted because of invalid state")&&(F=null)}F!==null&&j(F)}finally{p(),O(),E()}}),ne.finished.finally(function(){for(var F=0;F<pe.length;F++)pe[F].cancel();W.__reactViewTransition===ne&&(W.__reactViewTransition=null),M()}),ne}catch{return p(),O(),E(),null}}function vc(o,l){this._scope=document.documentElement,this._selector="::view-transition-"+o+"("+l+")"}vc.prototype.animate=function(o,l){return l=typeof l=="number"?{duration:l}:N({},l),l.pseudoElement=this._selector,this._scope.animate(o,l)},vc.prototype.getAnimations=function(){for(var o=this._scope,l=this._selector,f=o.getAnimations({subtree:!0}),p=[],O=0;O<f.length;O++){var b=f[O].effect;b!==null&&b.target===o&&b.pseudoElement===l&&p.push(f[O])}return p},vc.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function eP(o){return{name:o,group:new vc("group",o),imagePair:new vc("image-pair",o),old:new vc("old",o),new:new vc("new",o)}}function jr(o){this._fragmentFiber=o,this._observers=this._eventListeners=null}jr.prototype.addEventListener=function(o,l,f){var p=null,O=null;if(!(f!=null&&typeof f!="boolean"&&(p=f.signal||null,p!==null&&p.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var b=this._eventListeners;if(nP(b,o,l,f)===-1){var E=this,M=l;f!=null&&typeof f!="boolean"&&f.once===!0&&(M=function(j){E.removeEventListener(o,l,f),typeof l=="function"?l.call(this,j):l.handleEvent(j)}),p!==null&&(O=E.removeEventListener.bind(E,o,l,f),p.addEventListener("abort",O,{once:!0}),O=p.removeEventListener.bind(p,"abort",O)),p=Ju(f),b.push({type:o,listener:l,optionsOrUseCapture:f,attachedListener:M,cleanup:O}),m(this._fragmentFiber.child,!1,L4,o,M,p)}this._eventListeners=b}};function L4(o,l,f,p){return x(o).addEventListener(l,f,p),!1}jr.prototype.removeEventListener=function(o,l,f){var p=this._eventListeners;if(p!==null&&(l=nP(p,o,l,f),l!==-1)){var O=p[l];f=O.attachedListener;var b=O.cleanup;O=Ju(O.optionsOrUseCapture),m(this._fragmentFiber.child,!1,I4,o,f,O),p.splice(l,1),b!==null&&b()}};function I4(o,l,f,p){return x(o).removeEventListener(l,f,p),!1}function Ju(o){return o!=null&&typeof o!="boolean"&&(o.once===!0||o.signal instanceof AbortSignal)?{capture:o.capture,passive:o.passive}:o}function tP(o){return o==null?"c=0":typeof o=="boolean"?"c="+(o?"1":"0"):"c="+(o.capture?"1":"0")}function nP(o,l,f,p){if(o.length===0)return-1;p=tP(p);for(var O=0;O<o.length;O++){var b=o[O];if(b.type===l&&b.listener===f&&tP(b.optionsOrUseCapture)===p)return O}return-1}jr.prototype.dispatchEvent=function(o){var l=g(this._fragmentFiber);if(l===null)return!0;l=x(l);var f=this._eventListeners;if(f!==null&&0<f.length||!o.bubbles){var p=l.nodeType===9?l.createComment(""):document.createTextNode("");if(f)for(var O=0;O<f.length;O++){var b=f[O];p.addEventListener(b.type,b.attachedListener,Ju(b.optionsOrUseCapture))}if(l.appendChild(p),o=p.dispatchEvent(o),f)for(O=0;O<f.length;O++)b=f[O],p.removeEventListener(b.type,b.attachedListener,Ju(b.optionsOrUseCapture));return l.removeChild(p),o}return l.dispatchEvent(o)},jr.prototype.focus=function(o){m(this._fragmentFiber.child,!0,iP,o,void 0,void 0)};function iP(o,l){return o.tag===6?!1:(o=x(o),H4(o,l))}jr.prototype.focusLast=function(o){var l=[];m(this._fragmentFiber.child,!0,Gv,l,void 0,void 0);for(var f=l.length-1;0<=f&&!iP(l[f],o);f--);};function Gv(o,l){return l.push(o),!1}jr.prototype.blur=function(){var o=g(this._fragmentFiber);o!==null&&(o=x(o),o=pd(o).activeElement,o!==null&&m(this._fragmentFiber.child,!1,j4,o,void 0,void 0))};function j4(o,l){return o.tag===6?!1:(o=x(o),o===l||o.contains(l)?(l.blur(),!0):!1)}jr.prototype.observeUsing=function(o){this._observers===null&&(this._observers=new Set),this._observers.add(o),m(this._fragmentFiber.child,!1,B4,o,void 0,void 0)};function B4(o,l){return o.tag===6||(o=x(o),l.observe(o)),!1}jr.prototype.unobserveUsing=function(o){var l=this._observers;if(l!==null&&l.has(o)){l.delete(o),m(this._fragmentFiber.child,!1,z4,o,void 0,void 0);for(var f=l=0;f<js.length;f++){var p=js[f];p.fragmentInstance===this&&p.observer===o?o.unobserve(p.instance):js[l++]=p}js.length=l}};function z4(o,l){return o.tag===6||(o=x(o),l.unobserve(o)),!1}var js=[],Fv=!1;function X4(o,l,f){js.push({fragmentInstance:o,observer:l,instance:f}),Fv||(Fv=!0,W4(function(){Fv=!1;var p=js;js=[];for(var O=0;O<p.length;O++){var b=p[O];b.observer.unobserve(b.instance)}}))}jr.prototype.getClientRects=function(){var o=[];return m(this._fragmentFiber.child,!1,U4,o,void 0,void 0),o};function U4(o,l){if(o.tag===6){o=o.stateNode;var f=o.ownerDocument.createRange();f.selectNodeContents(o),l.push.apply(l,f.getClientRects())}else o=x(o),l.push.apply(l,o.getClientRects());return!1}jr.prototype.getRootNode=function(o){var l=g(this._fragmentFiber);return l===null?this:x(l).getRootNode(o)},jr.prototype.compareDocumentPosition=function(o){var l=g(this._fragmentFiber);if(l===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var f=[];m(this._fragmentFiber.child,!1,Gv,f,void 0,void 0);var p=x(l);if(f.length===0){if(f=p,y(this._fragmentFiber)){e:{for(l=this._fragmentFiber.return;l!==null;){if(l.tag===4){l=l.stateNode.containerInfo;break e}if(l.tag===3||l.tag===5||l.tag===27)break;l=l.return}l=null}l!=null&&(f=l)}l=this._fragmentFiber;var O=p=f.compareDocumentPosition(o);return f===o?O=Node.DOCUMENT_POSITION_CONTAINS:p&Node.DOCUMENT_POSITION_CONTAINED_BY&&(f=v(l)[1],f===null?O=Node.DOCUMENT_POSITION_PRECEDING:(o=x(f).compareDocumentPosition(o),O=o===0||o&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),O|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}l=x(f[0]),O=x(f[f.length-1]);var b=y(this._fragmentFiber)?l.parentElement:p;if(b==null)return Node.DOCUMENT_POSITION_DISCONNECTED;p=b.compareDocumentPosition(l)&Node.DOCUMENT_POSITION_CONTAINED_BY,b=b.compareDocumentPosition(O)&Node.DOCUMENT_POSITION_CONTAINED_BY;var E=l.compareDocumentPosition(o),M=O.compareDocumentPosition(o),j=E&Node.DOCUMENT_POSITION_CONTAINED_BY||M&Node.DOCUMENT_POSITION_CONTAINED_BY;return M=p&&b&&E&Node.DOCUMENT_POSITION_FOLLOWING&&M&Node.DOCUMENT_POSITION_PRECEDING,l=p&&l===o||b&&O===o||j||M?Node.DOCUMENT_POSITION_CONTAINED_BY:!p&&l===o||!b&&O===o?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:E,l&Node.DOCUMENT_POSITION_DISCONNECTED||l&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||Z4(l,this._fragmentFiber,f[0],f[f.length-1],o)?l:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Z4(o,l,f,p,O){var b=Xn(O);if(o&Node.DOCUMENT_POSITION_CONTAINED_BY){if(f=!!b)e:{for(;b!==null;){if(b.tag===7&&(b===l||b.alternate===l)){f=!0;break e}b=b.return}f=!1}return f}if(o&Node.DOCUMENT_POSITION_CONTAINS){if(b===null)return b=O.ownerDocument,O===b||O===b.documentElement||O===b.body;e:{for(b=l,l=g(l);b!==null;){if(!(b.tag!==5&&b.tag!==3&&b.tag!==27||b!==l&&b.alternate!==l)){b=!0;break e}b=b.return}b=!1}return b}return o&Node.DOCUMENT_POSITION_PRECEDING?((l=!!b)&&!(l=b===f)&&(l=P(f,b,R),l===null?l=!1:(m(l,!0,k,b,f),b=w,w=null,l=b!==null)),l):o&Node.DOCUMENT_POSITION_FOLLOWING?((l=!!b)&&!(l=b===p)&&(l=P(p,b,R),l===null?l=!1:(m(l,!0,A,b,p),b=w,C=w=null,l=b!==null)),l):!1}function rP(o,l){var f=o.ownerDocument.createRange();f.selectNodeContents(o),o=f.getBoundingClientRect(),window.scrollTo(window.scrollX+o.left,l?window.scrollY+o.top:window.scrollY+o.bottom-window.innerHeight)}jr.prototype.scrollIntoView=function(o){if(typeof o=="object")throw Error(i(566));var l=[];m(this._fragmentFiber.child,!1,Gv,l,void 0,void 0);var f=o!==!1;if(l.length===0){var p=v(this._fragmentFiber);if(p=f?p[1]||p[0]||g(this._fragmentFiber):p[0]||p[1],p===null)return;if(p.tag===6){o=x(p),rP(o,f);return}if(p=x(p),p.nodeType!==9){if(p.nodeType===11){f="host"in p?p.host:null,f!==null&&f.scrollIntoView(o);return}p.scrollIntoView(o)}}for(p=f?l.length-1:0;p!==(f?-1:l.length);){var O=l[p];O.tag===6?(O=x(O),rP(O,f)):x(O).scrollIntoView(o),p+=f?-1:1}};function V4(o,l){return o=x(o),sP(o,l),!1}function sP(o,l){o.reactFragments==null&&(o.reactFragments=new Set),o.reactFragments.add(l)}function oP(o,l){var f=l._eventListeners;if(f!==null)for(var p=0;p<f.length;p++){var O=f[p];o.addEventListener(O.type,O.attachedListener,Ju(O.optionsOrUseCapture))}o.nodeType!==3&&(f=l._observers,f!==null&&f.forEach(function(b){for(var E=0,M=0;M<js.length;M++){var j=js[M];(j.fragmentInstance!==l||j.observer!==b||j.instance!==o)&&(js[E++]=j)}js.length=E,b.observe(o)}),sP(o,l))}function q4(o,l){var f=l._eventListeners;if(f!==null)for(var p=0;p<f.length;p++){var O=f[p];o.removeEventListener(O.type,O.attachedListener,Ju(O.optionsOrUseCapture))}o.nodeType!==3&&(f=l._observers,f!==null&&f.forEach(function(b){typeof b.rootMargin=="string"?X4(l,b,o):b.unobserve(o)}),o.reactFragments!=null&&o.reactFragments.delete(l))}function Hv(o){var l=o.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var f=l;switch(l=l.nextSibling,f.nodeName){case"HTML":case"HEAD":case"BODY":Hv(f),_n(f);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(f.rel.toLowerCase()==="stylesheet")continue}o.removeChild(f)}}function Y4(o,l,f,p){for(;o.nodeType===1;){var O=f;if(o.nodeName.toLowerCase()!==l.toLowerCase()){if(!p&&(o.nodeName!=="INPUT"||o.type!=="hidden"))break}else if(p){if(!o[ui])switch(l){case"meta":if(!o.hasAttribute("itemprop"))break;return o;case"link":if(b=o.getAttribute("rel"),b==="stylesheet"&&o.hasAttribute("data-precedence"))break;if(b!==O.rel||o.getAttribute("href")!==(O.href==null||O.href===""?null:O.href)||o.getAttribute("crossorigin")!==(O.crossOrigin==null?null:O.crossOrigin)||o.getAttribute("title")!==(O.title==null?null:O.title))break;return o;case"style":if(o.hasAttribute("data-precedence"))break;return o;case"script":if(b=o.getAttribute("src"),(b!==(O.src==null?null:O.src)||o.getAttribute("type")!==(O.type==null?null:O.type)||o.getAttribute("crossorigin")!==(O.crossOrigin==null?null:O.crossOrigin))&&b&&o.hasAttribute("async")&&!o.hasAttribute("itemprop"))break;return o;default:return o}}else if(l==="input"&&o.type==="hidden"){var b=O.name==null?null:""+O.name;if(O.type==="hidden"&&o.getAttribute("name")===b)return o}else return o;if(o=us(o.nextSibling),o===null)break}return null}function G4(o,l,f){if(l==="")return null;for(;o.nodeType!==3;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!f||(o=us(o.nextSibling),o===null))return null;return o}function aP(o,l){for(;o.nodeType!==8;)if((o.nodeType!==1||o.nodeName!=="INPUT"||o.type!=="hidden")&&!l||(o=us(o.nextSibling),o===null))return null;return o}function Wv(o){return o.data==="$?"||o.data==="$~"}function Kv(o){return o.data==="$!"||o.data==="$?"&&o.ownerDocument.readyState!=="loading"}function F4(o,l){var f=o.ownerDocument;if(o.data==="$~")o._reactRetry=l;else if(o.data!=="$?"||f.readyState!=="loading")l();else{var p=function(){l(),f.removeEventListener("DOMContentLoaded",p)};f.addEventListener("DOMContentLoaded",p),o._reactRetry=p}}function us(o){for(;o!=null;o=o.nextSibling){var l=o.nodeType;if(l===1||l===3)break;if(l===8){if(l=o.data,l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"||l==="F!"||l==="F")break;if(l==="/$"||l==="/&")return null}}return o}var Jv=null;function lP(o){o=o.nextSibling;for(var l=0;o;){if(o.nodeType===8){var f=o.data;if(f==="/$"||f==="/&"){if(l===0)return us(o.nextSibling);l--}else f!=="$"&&f!=="$!"&&f!=="$?"&&f!=="$~"&&f!=="&"||l++}o=o.nextSibling}return null}function cP(o){o=o.previousSibling;for(var l=0;o;){if(o.nodeType===8){var f=o.data;if(f==="$"||f==="$!"||f==="$?"||f==="$~"||f==="&"){if(l===0)return o;l--}else f!=="/$"&&f!=="/&"||l++}o=o.previousSibling}return null}function H4(o,l){function f(){p=!0}if(o.ownerDocument.activeElement===o)return!0;var p=!1;try{o.ownerDocument.addEventListener("focus",f,!0),(o.focus||HTMLElement.prototype.focus).call(o,l)}finally{o.ownerDocument.removeEventListener("focus",f,!0)}return p}function W4(o){FR(function(){FR(function(l){return o(l)})})}function uP(o,l,f){switch(l=pd(f),o){case"html":if(o=l.documentElement,!o)throw Error(i(452));return o;case"head":if(o=l.head,!o)throw Error(i(453));return o;case"body":if(o=l.body,!o)throw Error(i(454));return o;default:throw Error(i(451))}}function fP(o,l,f){for(var p in f){var O=f[p];f.hasOwnProperty(p)&&O!=null&&Ft(o,l,p,null,T4,O)}f.dangerouslySetInnerHTML!=null&&(o.textContent=""),o.onclick===Ut&&(o.onclick=null),_n(o)}function eS(o){for(var l=o.attributes;l.length;)o.removeAttributeNode(l[0]);_n(o)}var fs=new Map,hP=new Set;function md(o){if(typeof o.getRootNode=="function"){var l=o.getRootNode();if(l.nodeType===9||l.nodeType===11)return l}return o.nodeType===9?o:o.ownerDocument}var da=Ee.d;Ee.d={f:K4,r:J4,D:eq,C:tq,L:nq,m:iq,X:sq,S:rq,M:oq};function K4(){var o=da.f(),l=pg();return o||l}function J4(o){var l=is(o);l!==null&&l.tag===5&&l.type==="form"?pA(l):da.r(o)}var ef=typeof document>"u"?null:document;function dP(o,l,f){var p=ef;if(p&&typeof l=="string"&&l){var O=Lt(l);O='link[rel="'+o+'"][href="'+O+'"]',typeof f=="string"&&(O+='[crossorigin="'+f+'"]'),hP.has(O)||(hP.add(O),o={rel:o,crossOrigin:f,href:l},p.querySelector(O)===null&&(l=p.createElement("link"),Ci(l,"link",o),Tn(l),p.head.appendChild(l)))}}function eq(o){da.D(o),dP("dns-prefetch",o,null)}function tq(o,l){da.C(o,l),dP("preconnect",o,l)}function nq(o,l,f){da.L(o,l,f);var p=ef;if(p&&o&&l){var O='link[rel="preload"][as="'+Lt(l)+'"]';l==="image"&&f&&f.imageSrcSet?(O+='[imagesrcset="'+Lt(f.imageSrcSet)+'"]',typeof f.imageSizes=="string"&&(O+='[imagesizes="'+Lt(f.imageSizes)+'"]')):O+='[href="'+Lt(o)+'"]';var b=O;switch(l){case"style":b=tf(o);break;case"script":b=nf(o)}if(!(fs.has(b)||(o=N({rel:"preload",href:l==="image"&&f&&f.imageSrcSet?void 0:o,as:l},f),fs.set(b,o),p.querySelector(O)!==null||l==="style"&&p.querySelector(gd(b))||l==="script"&&p.querySelector(Od(b))))){var E=p.createElement("link");Ci(E,"link",o),l==="style"&&(E[Rr]=!0,E.onload=E.onerror=function(){vu(E)}),Tn(E),p.head.appendChild(E)}}}function iq(o,l){da.m(o,l);var f=ef;if(f&&o){var p=l&&typeof l.as=="string"?l.as:"script",O='link[rel="modulepreload"][as="'+Lt(p)+'"][href="'+Lt(o)+'"]',b=O;switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=nf(o)}if(!fs.has(b)&&(o=N({rel:"modulepreload",href:o},l),fs.set(b,o),f.querySelector(O)===null)){switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(f.querySelector(Od(b)))return}p=f.createElement("link"),Ci(p,"link",o),Tn(p),f.head.appendChild(p)}}}function rq(o,l,f){da.S(o,l,f);var p=ef;if(p&&o){var O=Ms(p).hoistableStyles,b=tf(o);l=l||"default";var E=O.get(b);if(!E){var M={loading:0,preload:null};if(E=p.querySelector(gd(b)))M.loading=5;else{o=N({rel:"stylesheet",href:o,"data-precedence":l},f),(f=fs.get(b))&&tS(o,f);var j=E=p.createElement("link");Tn(j),Ci(j,"link",o),j._p=new Promise(function(W,ne){j.onload=W,j.onerror=ne}),j.addEventListener("load",function(){M.loading|=1}),j.addEventListener("error",function(){M.loading|=2}),M.loading|=4,Sg(E,l,p)}E={type:"stylesheet",instance:E,count:1,state:M},O.set(b,E)}}}function sq(o,l){da.X(o,l);var f=ef;if(f&&o){var p=Ms(f).hoistableScripts,O=nf(o),b=p.get(O);b||(b=f.querySelector(Od(O)),b||(o=N({src:o,async:!0},l),(l=fs.get(O))&&nS(o,l),b=f.createElement("script"),Tn(b),Ci(b,"link",o),f.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},p.set(O,b))}}function oq(o,l){da.M(o,l);var f=ef;if(f&&o){var p=Ms(f).hoistableScripts,O=nf(o),b=p.get(O);b||(b=f.querySelector(Od(O)),b||(o=N({src:o,async:!0,type:"module"},l),(l=fs.get(O))&&nS(o,l),b=f.createElement("script"),Tn(b),Ci(b,"link",o),f.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},p.set(O,b))}}function pP(o,l,f,p){var O=(O=wn.current)?md(O):null;if(!O)throw Error(i(446));switch(o){case"meta":case"title":return null;case"style":return typeof f.precedence=="string"&&typeof f.href=="string"?(f=tf(f.href),l=Ms(O).hoistableStyles,p=l.get(f),p||(p={type:"style",instance:null,count:0,state:null},l.set(f,p)),p):{type:"void",instance:null,count:0,state:null};case"link":if(f.rel==="stylesheet"&&typeof f.href=="string"&&typeof f.precedence=="string"){o=tf(f.href);var b=Ms(O).hoistableStyles,E=b.get(o);if(E||(O=O.ownerDocument||O,E={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(o,E),(b=O.querySelector(gd(o)))?b._p||(E.instance=b,E.state.loading=5):(b=fs.get(o),b||(b={rel:"preload",as:"style",href:f.href,crossOrigin:f.crossOrigin,integrity:f.integrity,media:f.media,hrefLang:f.hrefLang,referrerPolicy:f.referrerPolicy},fs.set(o,b)),aq(O,o,b,E.state))),l&&p===null)throw Error(i(528,""));return E}if(l&&p!==null)throw Error(i(529,""));return null;case"script":return l=f.async,f=f.src,typeof f=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(f=nf(f),l=Ms(O).hoistableScripts,p=l.get(f),p||(p={type:"script",instance:null,count:0,state:null},l.set(f,p)),p):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,o))}}function tf(o){return'href="'+Lt(o)+'"'}function gd(o){return'link[rel="stylesheet"]['+o+"]"}function mP(o){return N({},o,{"data-precedence":o.precedence,precedence:null})}function aq(o,l,f,p){if(l=o.querySelector('link[rel="preload"][as="style"]['+l+"]")){if(l[Rr]!==!0){p.loading=1;return}}else l=o.createElement("link"),l[Rr]=!0,l.onload=l.onerror=vu.bind(null,l),Ci(l,"link",f),Tn(l),o.head.appendChild(l);p.preload=l,l.addEventListener("load",function(){return p.loading|=1}),l.addEventListener("error",function(){return p.loading|=2})}function nf(o){return'[src="'+Lt(o)+'"]'}function Od(o){return"script[async]"+o}function gP(o,l,f){if(l.count++,l.instance===null)switch(l.type){case"style":var p=o.querySelector('style[data-href~="'+Lt(f.href)+'"]');if(p)return l.instance=p,Tn(p),p;var O=N({},f,{"data-href":f.href,"data-precedence":f.precedence,href:null,precedence:null});return p=(o.ownerDocument||o).createElement("style"),Tn(p),Ci(p,"style",O),Sg(p,f.precedence,o),l.instance=p;case"stylesheet":O=tf(f.href);var b=o.querySelector(gd(O));if(b)return l.state.loading|=4,l.instance=b,Tn(b),b;p=mP(f),(O=fs.get(O))&&tS(p,O),b=(o.ownerDocument||o).createElement("link"),Tn(b);var E=b;return E._p=new Promise(function(M,j){E.onload=M,E.onerror=j}),Ci(b,"link",p),l.state.loading|=4,Sg(b,f.precedence,o),l.instance=b;case"script":return b=nf(f.src),(O=o.querySelector(Od(b)))?(l.instance=O,Tn(O),O):(p=f,(O=fs.get(b))&&(p=N({},f),nS(p,O)),o=o.ownerDocument||o,O=o.createElement("script"),Tn(O),Ci(O,"link",p),o.head.appendChild(O),l.instance=O);case"void":return null;default:throw Error(i(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(p=l.instance,l.state.loading|=4,Sg(p,f.precedence,o));return l.instance}function Sg(o,l,f){for(var p=f.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),O=p.length?p[p.length-1]:null,b=O,E=0;E<p.length;E++){var M=p[E];if(M.dataset.precedence===l)b=M;else if(b!==O)break}b?b.parentNode.insertBefore(o,b.nextSibling):(l=f.nodeType===9?f.head:f,l.insertBefore(o,l.firstChild))}function tS(o,l){o.crossOrigin==null&&(o.crossOrigin=l.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=l.referrerPolicy),o.title==null&&(o.title=l.title)}function nS(o,l){o.crossOrigin==null&&(o.crossOrigin=l.crossOrigin),o.referrerPolicy==null&&(o.referrerPolicy=l.referrerPolicy),o.integrity==null&&(o.integrity=l.integrity)}var xg=null;function OP(o,l,f){if(xg===null){var p=new Map,O=xg=new Map;O.set(f,p)}else O=xg,p=O.get(f),p||(p=new Map,O.set(f,p));if(p.has(o))return p;for(p.set(o,null),f=f.getElementsByTagName(o),O=0;O<f.length;O++){var b=f[O];if(!(b[ui]||b[Dn]||o==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var E=b.getAttribute(l)||"";E=o+E;var M=p.get(E);M?M.push(b):p.set(E,[b])}}return p}function iS(o,l,f){o=o.ownerDocument||o,o.head.insertBefore(f,l==="title"?o.querySelector("head > title"):null)}function lq(o,l,f){if(f===1||l.itemProp!=null)return!1;switch(o){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return o=l.disabled,typeof l.precedence=="string"&&o==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function bP(o,l){return o==="img"&&l.src!=null&&l.src!==""&&l.onLoad==null&&l.loading!=="lazy"}function yP(o){return!(o.type==="stylesheet"&&(o.state.loading&3)===0)}function vP(o){return(o.width||100)*(o.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function SP(o,l){typeof l.decode=="function"&&(o.imgCount++,l.complete||(o.imgBytes+=vP(l),o.suspenseyImages.push(l)),o=fq.bind(o),l.decode().then(o,o))}function cq(o,l,f,p){if(f.type==="stylesheet"&&(typeof p.media!="string"||matchMedia(p.media).matches!==!1)&&(f.state.loading&4)===0){if(f.instance===null){var O=tf(p.href),b=l.querySelector(gd(O));if(b){l=b._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(o.count++,o=bd.bind(o),l.then(o,o)),f.state.loading|=4,f.instance=b,Tn(b);return}b=l.ownerDocument||l,p=mP(p),(O=fs.get(O))&&tS(p,O),b=b.createElement("link"),Tn(b);var E=b;E._p=new Promise(function(M,j){E.onload=M,E.onerror=j}),Ci(b,"link",p),f.instance=b}o.stylesheets===null&&(o.stylesheets=new Map),o.stylesheets.set(f,l),(l=f.state.preload)&&(f.state.loading&3)===0&&(o.count++,f=bd.bind(o),l.addEventListener("load",f),l.addEventListener("error",f))}}var wg=0;function uq(o,l){return o.stylesheets&&o.count===0&&_g(o,o.stylesheets),0<o.count||0<o.imgCount?function(f){var p=setTimeout(function(){if(o.stylesheets&&_g(o,o.stylesheets),o.unsuspend){var b=o.unsuspend;o.unsuspend=null,b()}},6e4+l);0<o.imgBytes&&wg===0&&(wg=62500*C4());var O=setTimeout(function(){if(o.waitingForImages=!1,o.count===0&&(o.stylesheets&&_g(o,o.stylesheets),o.unsuspend)){var b=o.unsuspend;o.unsuspend=null,b()}},(o.imgBytes>wg?50:800)+l);return o.unsuspend=f,function(){o.unsuspend=null,clearTimeout(p),clearTimeout(O)}}:null}function xP(o){if(o.count===0&&(o.imgCount===0||!o.waitingForImages)){if(o.stylesheets)_g(o,o.stylesheets);else if(o.unsuspend){var l=o.unsuspend;o.unsuspend=null,l()}}}function bd(){this.count--,xP(this)}function fq(){this.imgCount--,xP(this)}var Eg=null;function _g(o,l){o.stylesheets=null,o.unsuspend!==null&&(o.count++,Eg=new Map,l.forEach(hq,o),Eg=null,bd.call(o))}function hq(o,l){if(!(l.state.loading&4)){var f=Eg.get(o);if(f)var p=f.get(null);else{f=new Map,Eg.set(o,f);for(var O=o.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<O.length;b++){var E=O[b];(E.nodeName==="LINK"||E.getAttribute("media")!=="not all")&&(f.set(E.dataset.precedence,E),p=E)}p&&f.set(null,p)}O=l.instance,E=O.getAttribute("data-precedence"),b=f.get(E)||p,b===p&&f.set(null,O),f.set(E,O),this.count++,p=bd.bind(this),O.addEventListener("load",p),O.addEventListener("error",p),b?b.parentNode.insertBefore(O,b.nextSibling):(o=o.nodeType===9?o.head:o,o.insertBefore(O,o.firstChild)),l.state.loading|=4}}var rf={$$typeof:re,Provider:null,Consumer:null,_currentValue:Ie,_currentValue2:Ie,_threadCount:0};function dq(o,l,f,p,O,b,E,M,j){this.tag=1,this.containerInfo=o,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ro(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ro(0),this.hiddenUpdates=ro(null),this.identifierPrefix=p,this.onUncaughtError=O,this.onCaughtError=b,this.onRecoverableError=E,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=j,this.transitionTypes=null,this.incompleteTransitions=new Map}function wP(o,l,f,p,O,b,E,M,j,W,ne,pe){return o=new dq(o,l,f,E,j,W,ne,pe,M),l=1,b===!0&&(l|=24),b=dr(3,null,null,l),o.current=b,b.stateNode=o,l=b0(),l.refCount++,o.pooledCache=l,l.refCount++,b.memoizedState={element:p,isDehydrated:f,cache:l},x0(b),o}function EP(o){return o?(o=Au,o):Au}function _P(o,l,f,p,O,b){O=EP(O),p.context===null?p.context=O:p.pendingContext=O,p=Wa(l),p.payload={element:f},b=b===void 0?null:b,b!==null&&(p.callback=b),f=Ka(o,p,l),f!==null&&(Or(f,o,l),Fh(f,o,l))}function TP(o,l){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var f=o.retryLane;o.retryLane=f!==0&&f<l?f:l}}function rS(o,l){TP(o,l),(o=o.alternate)&&TP(o,l)}function kP(o){if(o.tag===13||o.tag===31){var l=ic(o,67108864);l!==null&&Or(l,o,67108864),rS(o,67108864)}}function CP(o){if(o.tag===13||o.tag===31){var l=Ir();l=so(l);var f=ic(o,l);f!==null&&Or(f,o,l),rS(o,l)}}var sf=!0;function pq(o,l,f,p){var O=Se.T;Se.T=null;var b=Ee.p;try{Ee.p=2,sS(o,l,f,p)}finally{Ee.p=b,Se.T=O}}function mq(o,l,f,p){var O=Se.T;Se.T=null;var b=Ee.p;try{Ee.p=8,sS(o,l,f,p)}finally{Ee.p=b,Se.T=O}}function sS(o,l,f,p){if(sf){var O=oS(p);if(O===null)Bv(o,l,p,Tg,f),RP(o,p);else if(Oq(O,o,l,f,p))p.stopPropagation();else if(RP(o,p),l&4&&-1<gq.indexOf(o)){for(;O!==null;){var b=is(O);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var E=ts(b.pendingLanes);if(E!==0){var M=b;for(M.pendingLanes|=2,M.entangledLanes|=2;E;){var j=1<<31-Ce(E);M.entanglements[1]|=j,E&=~j}bo(b),(Bt&6)===0&&(fg=Qn()+500,fd(0))}}break;case 31:case 13:M=ic(b,2),M!==null&&Or(M,b,2),pg(),rS(b,2)}if(b=oS(p),b===null&&Bv(o,l,p,Tg,f),b===O)break;O=b}O!==null&&p.stopPropagation()}else Bv(o,l,p,null,f)}}function oS(o){return o=ni(o),aS(o)}var Tg=null;function aS(o){if(Tg=null,o=Xn(o),o!==null){var l=s(o);if(l===null)o=null;else{var f=l.tag;if(f===13){if(o=a(l),o!==null)return o;o=null}else if(f===31){if(o=c(l),o!==null)return o;o=null}else if(f===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;o=null}else l!==o&&(o=null)}}return Tg=o,null}function AP(o){switch(o){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"fullscreenerror":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Rt()){case Cr:return 2;case Yi:return 8;case $n:case Z:return 32;case he:return 268435456;default:return 32}default:return 32}}var lS=!1,ul=null,fl=null,hl=null,yd=new Map,vd=new Map,dl=[],gq="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function RP(o,l){switch(o){case"focusin":case"focusout":ul=null;break;case"dragenter":case"dragleave":fl=null;break;case"mouseover":case"mouseout":hl=null;break;case"pointerover":case"pointerout":yd.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":vd.delete(l.pointerId)}}function Sd(o,l,f,p,O,b){return o===null||o.nativeEvent!==b?(o={blockedOn:l,domEventName:f,eventSystemFlags:p,nativeEvent:b,targetContainers:[O]},l!==null&&(l=is(l),l!==null&&kP(l)),o):(o.eventSystemFlags|=p,l=o.targetContainers,O!==null&&l.indexOf(O)===-1&&l.push(O),o)}function Oq(o,l,f,p,O){switch(l){case"focusin":return ul=Sd(ul,o,l,f,p,O),!0;case"dragenter":return fl=Sd(fl,o,l,f,p,O),!0;case"mouseover":return hl=Sd(hl,o,l,f,p,O),!0;case"pointerover":var b=O.pointerId;return yd.set(b,Sd(yd.get(b)||null,o,l,f,p,O)),!0;case"gotpointercapture":return b=O.pointerId,vd.set(b,Sd(vd.get(b)||null,o,l,f,p,O)),!0}return!1}function PP(o){var l=Xn(o.target);if(l!==null){var f=s(l);if(f!==null){if(l=f.tag,l===13){if(l=a(f),l!==null){o.blockedOn=l,yu(o.priority,function(){CP(f)});return}}else if(l===31){if(l=c(f),l!==null){o.blockedOn=l,yu(o.priority,function(){CP(f)});return}}else if(l===3&&f.stateNode.current.memoizedState.isDehydrated){o.blockedOn=f.tag===3?f.stateNode.containerInfo:null;return}}}o.blockedOn=null}function kg(o){if(o.blockedOn!==null)return!1;for(var l=o.targetContainers;0<l.length;){var f=oS(o.nativeEvent);if(f===null){f=o.nativeEvent;var p=new f.constructor(f.type,f);hr=p,f.target.dispatchEvent(p),hr=null}else return l=is(f),l!==null&&kP(l),o.blockedOn=f,!1;l.shift()}return!0}function MP(o,l,f){kg(o)&&f.delete(l)}function bq(){lS=!1,ul!==null&&kg(ul)&&(ul=null),fl!==null&&kg(fl)&&(fl=null),hl!==null&&kg(hl)&&(hl=null),yd.forEach(MP),vd.forEach(MP)}function Cg(o,l){o.blockedOn===l&&(o.blockedOn=null,lS||(lS=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,bq)))}var Ag=null;function NP(o){Ag!==o&&(Ag=o,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Ag===o&&(Ag=null);for(var l=0;l<o.length;l+=3){var f=o[l],p=o[l+1],O=o[l+2];if(typeof p!="function"){if(aS(p||f)===null)continue;break}var b=is(f);b!==null&&(o.splice(l,3),l-=3,U0(b,{pending:!0,data:O,method:f.method,action:p},p,O))}}))}function of(o){function l(j){return Cg(j,o)}ul!==null&&Cg(ul,o),fl!==null&&Cg(fl,o),hl!==null&&Cg(hl,o),yd.forEach(l),vd.forEach(l);for(var f=0;f<dl.length;f++){var p=dl[f];p.blockedOn===o&&(p.blockedOn=null)}for(;0<dl.length&&(f=dl[0],f.blockedOn===null);)PP(f),f.blockedOn===null&&dl.shift();if(f=(o.ownerDocument||o).$$reactFormReplay,f!=null)for(p=0;p<f.length;p+=3){var O=f[p],b=f[p+1],E=O[xe]||null;if(typeof b=="function")E||NP(f);else if(E){var M=null;if(b&&b.hasAttribute("formAction")){if(O=b,E=b[xe]||null)M=E.formAction;else if(aS(O)!==null)continue}else M=E.action;typeof M=="function"?f[p+1]=M:(f.splice(p,3),p-=3),NP(f)}}}function QP(){function o(b){b.canIntercept&&b.info==="react-transition"&&b.intercept({handler:function(){return new Promise(function(E){return O=E})},focusReset:"manual",scroll:"manual"})}function l(){O!==null&&(O(),O=null),p||setTimeout(f,20)}function f(){if(!p&&!navigation.transition){var b=navigation.currentEntry;b&&b.url!=null&&navigation.navigate(b.url,{state:b.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var p=!1,O=null;return navigation.addEventListener("navigate",o),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(f,100),function(){p=!0,navigation.removeEventListener("navigate",o),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),O!==null&&(O(),O=null)}}}function cS(o){this._internalRoot=o}Rg.prototype.render=cS.prototype.render=function(o){var l=this._internalRoot;if(l===null)throw Error(i(409));var f=l.current,p=Ir();_P(f,p,o,l,null,null)},Rg.prototype.unmount=cS.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var l=o.containerInfo;_P(o.current,2,null,o,null,null),pg(),l[je]=null}};function Rg(o){this._internalRoot=o}Rg.prototype.unstable_scheduleHydration=function(o){if(o){var l=Jl();o={blockedOn:null,target:o,priority:l};for(var f=0;f<dl.length&&l!==0&&l<dl[f].priority;f++);dl.splice(f,0,o),f===0&&PP(o)}};var $P=e.version;if($P!=="19.3.0")throw Error(i(527,$P,"19.3.0"));Ee.findDOMNode=function(o){var l=o._reactInternals;if(l===void 0)throw typeof o.render=="function"?Error(i(188)):(o=Object.keys(o).join(","),Error(i(268,o)));return o=h(l),o=o!==null?d(o):null,o=o===null?null:o.stateNode,o};var yq={bundleType:0,version:"19.3.0",rendererPackageName:"react-dom",currentDispatcherRef:Se,reconcilerVersion:"19.3.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Pg=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Pg.isDisabled&&Pg.supportsFiber)try{Xt=Pg.inject(yq),vt=Pg}catch{}}return wd.createRoot=function(o,l){if(!r(o))throw Error(i(299));var f=!1,p="",O=EA,b=_A,E=TA;return l!=null&&(l.unstable_strictMode===!0&&(f=!0),l.identifierPrefix!==void 0&&(p=l.identifierPrefix),l.onUncaughtError!==void 0&&(O=l.onUncaughtError),l.onCaughtError!==void 0&&(b=l.onCaughtError),l.onRecoverableError!==void 0&&(E=l.onRecoverableError)),l=wP(o,1,!1,null,null,f,p,null,O,b,E,QP),o[je]=l.current,jv(o),new cS(l)},wd.hydrateRoot=function(o,l,f){if(!r(o))throw Error(i(299));var p=!1,O="",b=EA,E=_A,M=TA,j=null;return f!=null&&(f.unstable_strictMode===!0&&(p=!0),f.identifierPrefix!==void 0&&(O=f.identifierPrefix),f.onUncaughtError!==void 0&&(b=f.onUncaughtError),f.onCaughtError!==void 0&&(E=f.onCaughtError),f.onRecoverableError!==void 0&&(M=f.onRecoverableError),f.formState!==void 0&&(j=f.formState)),l=wP(o,1,!0,l,f??null,p,O,j,b,E,M,QP),l.context=EP(null),f=l.current,p=Ir(),p=so(p),O=Wa(p),O.callback=null,Ka(f,O,p),f=p,l.current.lanes=f,Ko(l,f),bo(l),o[je]=l.current,jv(o),new Rg(l)},wd.version="19.3.0",wd}var qP;function Mq(){if(qP)return dS.exports;qP=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),dS.exports=Pq(),dS.exports}var Nq=Mq();const x2=T.createContext(void 0),GE=t=>{const e=T.useContext(x2);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Qq=({client:t,children:e})=>(T.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),_.jsx(x2.Provider,{value:t,children:e})),$q={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)};var El,qE,c2,Dq=(c2=class{constructor(){Je(this,El,$q);Je(this,qE,!1)}setTimeoutProvider(t){Qe(this,El,t)}setTimeout(t,e){return z(this,El).setTimeout(t,e)}clearTimeout(t){z(this,El).clearTimeout(t)}setInterval(t,e){return z(this,El).setInterval(t,e)}clearInterval(t){z(this,El).clearInterval(t)}},El=new WeakMap,qE=new WeakMap,c2);const Rc=new Dq;function Lq(t){setTimeout(t,0)}const Iq=typeof window>"u"||"Deno"in globalThis;function nr(){}function jq(t,e){return typeof t=="function"?t(e):t}function w2(t){return typeof t=="number"&&t>=0&&t!==1/0}function E2(t,e){return Math.max(t+(e||0)-Date.now(),0)}function On(t,e){return typeof t=="function"?t(e):t}function YP(t,e){const{type:n="all",exact:i,fetchStatus:r,predicate:s,queryKey:a,stale:c}=t;if(a){if(i){if(e.queryHash!==FE(a,e.options))return!1}else if(!Ff(e.queryKey,a))return!1}if(n!=="all"){const u=e.isActive();if(n==="active"&&!u||n==="inactive"&&u)return!1}return!(typeof c=="boolean"&&e.isStale()!==c||r&&r!==e.state.fetchStatus||s&&!s(e))}function GP(t,e){const{exact:n,status:i,predicate:r,mutationKey:s}=t;if(s){if(!e.options.mutationKey)return!1;if(n){if(Fc(e.options.mutationKey)!==Fc(s))return!1}else if(!Ff(e.options.mutationKey,s))return!1}return!(i&&e.state.status!==i||r&&!r(e))}function FE(t,e){return((e==null?void 0:e.queryKeyHashFn)||Fc)(t)}function Fc(t){return JSON.stringify(t,(e,n)=>Mw(n)?Object.keys(n).sort().reduce((i,r)=>(i[r]=n[r],i),{}):n)}function Ff(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(Array.isArray(t)&&Array.isArray(e)){if(e.length>t.length)return!1;for(let i=0;i<e.length;i++)if(!Ff(t[i],e[i]))return!1;return!0}const n=Object.keys(e);for(const i of n)if(!Ff(t[i],e[i]))return!1;return!0}return!1}const Bq=Object.prototype.hasOwnProperty;function _2(t,e,n=0){if(t===e)return t;if(n>500)return e;const i=FP(t)&&FP(e);if(!i&&!(Mw(t)&&Mw(e)))return e;const r=(i?t:Object.keys(t)).length,s=i?e:Object.keys(e),a=s.length,c=i?new Array(a):{};let u=0;for(let h=0;h<a;h++){const d=i?h:s[h],m=t[d],g=e[d];if(m===g){c[d]=m,(i?h<r:Bq.call(t,d))&&u++;continue}if(m===null||g===null||typeof m!="object"||typeof g!="object"){c[d]=g;continue}const y=_2(m,g,n+1);c[d]=y,y===m&&u++}return r===a&&u===r?t:c}function RO(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}function FP(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Mw(t){if(!HP(t))return!1;const e=Object.getPrototypeOf(t),n=e==null?void 0:e.constructor;if(n===void 0)return!0;if(typeof n!="function")return!1;const i=n.prototype;return!(!HP(i)||!i.hasOwnProperty("isPrototypeOf")||e!==Object.prototype)}function HP(t){return Object.prototype.toString.call(t)==="[object Object]"}function zq(t){return new Promise(e=>{Rc.setTimeout(e,t)})}function Nw(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?_2(t,e):e}function Xq(t,e,n=0){const i=[...t,e];return n&&i.length>n?i.slice(1):i}function Uq(t,e,n=0){const i=[e,...t];return n&&i.length>n?i.slice(0,-1):i}const HE=Symbol();function T2(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===HE?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function WE(t,e){return typeof t=="function"?t(...e):!!t}function Zq(t,e,n){let i=!1,r;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(r??(r=e()),i||(i=!0,r.aborted?n():r.addEventListener("abort",n,{once:!0})),r)}),t}let Vq=()=>Iq;const KE=()=>Vq();var mh=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Dc,_l,Df,u2,qq=(u2=class extends mh{constructor(){super();Je(this,Dc);Je(this,_l);Je(this,Df);Qe(this,Df,e=>{if(typeof window<"u"&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){z(this,_l)||this.setEventListener(z(this,Df))}onUnsubscribe(){var e;this.hasListeners()||((e=z(this,_l))==null||e.call(this),Qe(this,_l,void 0))}setEventListener(e){var n;Qe(this,Df,e),(n=z(this,_l))==null||n.call(this),Qe(this,_l,e(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()}))}setFocused(e){z(this,Dc)!==e&&(Qe(this,Dc,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof z(this,Dc)=="boolean"?z(this,Dc):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Dc=new WeakMap,_l=new WeakMap,Df=new WeakMap,u2);const JE=new qq,Yq=Lq;function Gq(){let t=[],e=0,n=c=>{c()},i=c=>{c()},r=Yq;const s=c=>{e?t.push(c):r(()=>{n(c)})},a=()=>{const c=t;t=[],c.length&&r(()=>{i(()=>{c.forEach(u=>{n(u)})})})};return{batch:c=>{let u;e++;try{u=c()}finally{e--,e||a()}return u},batchCalls:c=>(...u)=>{s(()=>{c(...u)})},schedule:s,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{i=c},setScheduler:c=>{r=c}}}const oi=Gq();var Lf,Tl,If,f2,Fq=(f2=class extends mh{constructor(){super();Je(this,Lf,!0);Je(this,Tl);Je(this,If);Qe(this,If,e=>{if(typeof window<"u"&&window.addEventListener){const n=()=>e(!0),i=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",i)}}})}onSubscribe(){z(this,Tl)||this.setEventListener(z(this,If))}onUnsubscribe(){var e;this.hasListeners()||((e=z(this,Tl))==null||e.call(this),Qe(this,Tl,void 0))}setEventListener(e){var n;Qe(this,If,e),(n=z(this,Tl))==null||n.call(this),Qe(this,Tl,e(this.setOnline.bind(this)))}setOnline(e){z(this,Lf)!==e&&(Qe(this,Lf,e),this.listeners.forEach(n=>{n(e)}))}isOnline(){return z(this,Lf)}},Lf=new WeakMap,Tl=new WeakMap,If=new WeakMap,f2);const sb=new Fq;function Hq(t){return Math.min(1e3*2**t,3e4)}function k2(t){return(t??"online")==="online"?sb.isOnline():!0}var Qw=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function C2(t){let e=!1,n=0,i,r="pending",s,a;const c=new Promise((C,k)=>{s=C,a=k});c.catch(nr);const u=()=>r!=="pending",h=C=>{var k;if(!u()){const A=new Qw(C);S(A),(k=t.onCancel)==null||k.call(t,A)}},d=()=>{e=!0},m=()=>{e=!1},g=()=>JE.isFocused()&&(t.networkMode==="always"||sb.isOnline())&&t.canRun(),y=()=>k2(t.networkMode)&&t.canRun(),v=C=>{u()||(i==null||i(),r="resolved",s(C))},S=C=>{u()||(i==null||i(),r="rejected",a(C))},x=C=>new Promise(k=>{var A;i=R=>{(u()||C())&&k(R)},(A=t.onPause)==null||A.call(t)}).then(()=>{var k;i=void 0,u()||(k=t.onContinue)==null||k.call(t)}),w=()=>{if(u())return;let C;const k=n===0?t.initialPromise:void 0;try{C=k??t.fn()}catch(A){C=Promise.reject(A)}Promise.resolve(C).then(v).catch(A=>{var D;if(u())return;const R=t.retry??(KE()?0:3),P=t.retryDelay??Hq,N=typeof P=="function"?P(n,A):P,$=R===!0||typeof R=="number"&&n<R||typeof R=="function"&&R(n,A);if(e||!$){S(A);return}n++,(D=t.onFail)==null||D.call(t,n,A),zq(N).then(()=>g()?void 0:x(g)).then(()=>{e?S(A):w()})})};return{promise:c,status:()=>r,cancel:h,continue:()=>(i==null||i(),c),cancelRetry:d,continueRetry:m,canStart:y,start:()=>(y()?w():x(y).then(w),c)}}var Lc,h2,A2=(h2=class{constructor(){Je(this,Lc)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),w2(this.gcTime)&&Qe(this,Lc,Rc.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(KE()?1/0:3e5))}clearGcTimeout(){z(this,Lc)!==void 0&&(Rc.clearTimeout(z(this,Lc)),Qe(this,Lc,void 0))}},Lc=new WeakMap,h2);function Wq(t){return{onFetch:(e,n)=>{var d,m,g,y,v;const i=e.options,r=(g=(m=(d=e.fetchOptions)==null?void 0:d.meta)==null?void 0:m.fetchMore)==null?void 0:g.direction,s=((y=e.state.data)==null?void 0:y.pages)||[],a=((v=e.state.data)==null?void 0:v.pageParams)||[];let c={pages:[],pageParams:[]},u=0;const h=async()=>{let S=!1;const x=k=>{Zq(k,()=>e.signal,()=>S=!0)},w=T2(e.options,e.fetchOptions),C=async(k,A,R)=>{if(S)return Promise.reject(e.signal.reason);if(A==null&&k.pages.length)return Promise.resolve(k);const N=(()=>{const V={client:e.client,queryKey:e.queryKey,pageParam:A,direction:R?"backward":"forward",meta:e.options.meta};return x(V),V})(),$=await w(N),{maxPages:D}=e.options,U=R?Uq:Xq;return{pages:U(k.pages,$,D),pageParams:U(k.pageParams,A,D)}};if(r&&s.length){const k=r==="backward",A=k?Kq:WP,R={pages:s,pageParams:a};c=await C(R,A(i,R),k)}else{const k=t??s.length;do{const A=u===0?a[0]??i.initialPageParam:WP(i,c);if(u>0&&A==null)break;c=await C(c,A),u++}while(u<k)}return c};e.options.persister?e.fetchFn=()=>{var S,x;return(x=(S=e.options).persister)==null?void 0:x.call(S,h,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=h}}}function WP(t,{pages:e,pageParams:n}){const i=e.length-1;return e.length>0?t.getNextPageParam(e[i],e,n[i],n):void 0}function Kq(t,{pages:e,pageParams:n}){var i;return e.length>0?(i=t.getPreviousPageParam)==null?void 0:i.call(t,e[0],e,n[0],n):void 0}var jf,Ic,Bf,ds,jc,ri,Xp,Bc,Us,Oa,d2,Jq=(d2=class extends A2{constructor(e){super();Je(this,Us);Je(this,jf);Je(this,Ic);Je(this,Bf);Je(this,ds);Je(this,jc);Je(this,ri);Je(this,Xp);Je(this,Bc);Qe(this,Bc,!1),Qe(this,Xp,e.defaultOptions),this.setOptions(e.options),this.observers=[],Qe(this,jc,e.client),Qe(this,ds,z(this,jc).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,Qe(this,Ic,JP(this.options)),this.state=e.state??z(this,Ic),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return z(this,jf)}get promise(){var e;return(e=z(this,ri))==null?void 0:e.promise}setOptions(e){if(this.options={...z(this,Xp),...e},e!=null&&e._type&&Qe(this,jf,e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=JP(this.options);n.data!==void 0&&(this.setState(KP(n.data,n.dataUpdatedAt)),Qe(this,Ic,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&z(this,ds).remove(this)}setData(e,n){const i=Nw(this.state.data,e,this.options);return Ot(this,Us,Oa).call(this,{data:i,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),i}setState(e){Ot(this,Us,Oa).call(this,{type:"setState",state:e})}cancel(e){var i,r;const n=(i=z(this,ri))==null?void 0:i.promise;return(r=z(this,ri))==null||r.cancel(e),n?n.then(nr).catch(nr):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return z(this,Ic)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>On(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===HE||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>On(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!E2(this.state.dataUpdatedAt,e)}onFocus(){var e,n;(e=this.observers.find(i=>i.shouldFetchOnWindowFocus()))==null||e.refetch({cancelRefetch:!1}),(n=z(this,ri))==null||n.continue()}onOnline(){var e,n;(e=this.observers.find(i=>i.shouldFetchOnReconnect()))==null||e.refetch({cancelRefetch:!1}),(n=z(this,ri))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),z(this,ds).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){const n=this.observers.indexOf(e);n!==-1&&(this.observers.splice(n,1),this.observers.length||(z(this,ri)&&(z(this,Bc)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?z(this,ri).cancel({revert:!0}):z(this,ri).cancelRetry()),this.scheduleGc()),z(this,ds).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ot(this,Us,Oa).call(this,{type:"invalidate"})}async fetch(e,n){var h,d,m,g,y,v,S,x,w,C,k,A;if(this.state.fetchStatus!=="idle"&&((h=z(this,ri))==null?void 0:h.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(z(this,ri))return z(this,ri).continueRetry(),z(this,ri).promise}if(e&&this.setOptions(e),!this.options.queryFn){const R=this.observers.find(P=>P.options.queryFn);R&&this.setOptions(R.options)}const i=new AbortController,r=R=>{Object.defineProperty(R,"signal",{enumerable:!0,get:()=>(Qe(this,Bc,!0),i.signal)})},s=()=>{const R=T2(this.options,n),N=(()=>{const $={client:z(this,jc),queryKey:this.queryKey,meta:this.meta};return r($),$})();return Qe(this,Bc,!1),this.options.persister?this.options.persister(R,N,this):R(N)},c=(()=>{const R={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:z(this,jc),state:this.state,fetchFn:s};return r(R),R})();(d=z(this,jf)==="infinite"?Wq(this.options.pages):this.options.behavior)==null||d.onFetch(c,this),Qe(this,Bf,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((m=c.fetchOptions)==null?void 0:m.meta))&&Ot(this,Us,Oa).call(this,{type:"fetch",meta:(g=c.fetchOptions)==null?void 0:g.meta});const u=Qe(this,ri,C2({initialPromise:n==null?void 0:n.initialPromise,fn:c.fetchFn,onCancel:R=>{R instanceof Qw&&R.revert&&this.setState({...z(this,Bf),fetchStatus:"idle"}),i.abort()},onFail:(R,P)=>{Ot(this,Us,Oa).call(this,{type:"failed",failureCount:R,error:P})},onPause:()=>{Ot(this,Us,Oa).call(this,{type:"pause"})},onContinue:()=>{Ot(this,Us,Oa).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0}));try{const R=await u.start();if(R===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(R),(v=(y=z(this,ds).config).onSuccess)==null||v.call(y,R,this),(x=(S=z(this,ds).config).onSettled)==null||x.call(S,R,this.state.error,this),R}catch(R){if(R instanceof Qw){if(R.silent)return z(this,ri).promise;if(R.revert){if(this.state.data===void 0)throw R;return this.state.data}}throw Ot(this,Us,Oa).call(this,{type:"error",error:R}),(C=(w=z(this,ds).config).onError)==null||C.call(w,R,this),(A=(k=z(this,ds).config).onSettled)==null||A.call(k,this.state.data,R,this),R}finally{z(this,ri)===u&&Qe(this,ri,void 0),this.scheduleGc()}}},jf=new WeakMap,Ic=new WeakMap,Bf=new WeakMap,ds=new WeakMap,jc=new WeakMap,ri=new WeakMap,Xp=new WeakMap,Bc=new WeakMap,Us=new WeakSet,Oa=function(e){const n=i=>{switch(e.type){case"failed":return{...i,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...R2(i.data,this.options),fetchMeta:e.meta??null};case"success":const r={...i,...KP(e.data,e.dataUpdatedAt),dataUpdateCount:i.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Qe(this,Bf,e.manual?r:void 0),r;case"error":const s=e.error;return{...i,error:s,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...e.state}}};this.state=n(this.state),oi.batch(()=>{this.observers.slice().forEach(i=>{i.onQueryUpdate()}),z(this,ds).notify({query:this,type:"updated",action:e})})},d2);function R2(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:k2(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function KP(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function JP(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,i=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var er,At,Up,tr,zc,zf,Sa,Zp,Xf,Uf,Xc,Uc,kl,Zf,zt,zd,$w,Dw,Lw,Iw,jw,Bw,zw,Xw,p2,eY=(p2=class extends mh{constructor(e,n){super();Je(this,zt);Je(this,er);Je(this,At);Je(this,Up);Je(this,tr);Je(this,zc);Je(this,zf);Je(this,Sa);Je(this,Zp);Je(this,Xf);Je(this,Uf);Je(this,Xc);Je(this,Uc);Je(this,kl);Je(this,Zf,new Set);this.options=n,Qe(this,er,e),Qe(this,Sa,null),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(z(this,At).addObserver(this),eM(z(this,At),this.options)?Ot(this,zt,zd).call(this):this.updateResult(),Ot(this,zt,jw).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Uw(z(this,At),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Uw(z(this,At),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ot(this,zt,Bw).call(this),Ot(this,zt,zw).call(this),z(this,At).removeObserver(this)}setOptions(e){const n=this.options,i=z(this,At);if(this.options=z(this,er).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof On(this.options.enabled,z(this,At))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ot(this,zt,Xw).call(this),z(this,At).setOptions(this.options),n._defaulted&&!RO(this.options,n)&&z(this,er).getQueryCache().notify({type:"observerOptionsUpdated",query:z(this,At),observer:this});const r=this.hasListeners();r&&tM(z(this,At),i,this.options,n)&&Ot(this,zt,zd).call(this),this.updateResult(),r&&(z(this,At)!==i||On(this.options.enabled,z(this,At))!==On(n.enabled,z(this,At))||On(this.options.staleTime,z(this,At))!==On(n.staleTime,z(this,At)))&&Ot(this,zt,Dw).call(this);const s=Ot(this,zt,Lw).call(this);r&&(z(this,At)!==i||On(this.options.enabled,z(this,At))!==On(n.enabled,z(this,At))||s!==z(this,kl))&&Ot(this,zt,Iw).call(this,s)}getOptimisticResult(e){const n=z(this,er).getQueryCache().build(z(this,er),e),i=this.createResult(n,e);return RO(this.getCurrentResult(),i)||(Qe(this,tr,i),Qe(this,zf,this.options),Qe(this,zc,z(this,At).state)),i}getCurrentResult(){return z(this,tr)}trackResult(e,n){return new Proxy(e,{get:(i,r)=>(this.trackProp(r),n==null||n(r),Reflect.get(i,r))})}trackProp(e){z(this,Zf).add(e)}getCurrentQuery(){return z(this,At)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=z(this,er).defaultQueryOptions(e),i=z(this,er).getQueryCache().build(z(this,er),n);let r=()=>{},s;const a=new Promise(c=>{s=c,r=z(this,er).getQueryCache().subscribe(u=>{u.type==="updated"&&u.query.queryHash===i.queryHash&&i.state.data!==void 0&&(r(),c(this.createResult(i,n)))})});return Promise.race([i.fetch().then(()=>{const c=this.createResult(i,n);return s==null||s(c),c}).finally(()=>{r()}),a])}fetch(e){return Ot(this,zt,zd).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),z(this,tr)))}createResult(e,n){var P;const i=z(this,At),r=this.options,s=z(this,tr),a=z(this,zc),c=z(this,zf),u=e!==i?e.state:z(this,Up),{state:h}=e;let d={...h},m=!1,g;if(n._optimisticResults){const N=this.hasListeners(),$=!N&&eM(e,n),D=N&&tM(e,i,n,r);($||D)&&(d={...d,...R2(h.data,e.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:y,errorUpdatedAt:v,status:S}=d;g=d.data;let x=!1;if(n.placeholderData!==void 0&&g===void 0&&S==="pending"){let N;s!=null&&s.isPlaceholderData&&n.placeholderData===(c==null?void 0:c.placeholderData)?(N=s.data,x=!0):N=typeof n.placeholderData=="function"?n.placeholderData((P=z(this,Uf))==null?void 0:P.state.data,z(this,Uf)):n.placeholderData,N!==void 0&&(S="success",g=Nw(s==null?void 0:s.data,N,n),m=!0)}if(n.select&&g!==void 0&&!x)if(s&&g===(a==null?void 0:a.data)&&n.select===z(this,Zp))g=z(this,Xf);else try{Qe(this,Zp,n.select),g=n.select(g),g=Nw(s==null?void 0:s.data,g,n),Qe(this,Xf,g),Qe(this,Sa,null)}catch(N){Qe(this,Sa,N)}else g===void 0&&Qe(this,Sa,null);z(this,Sa)&&(y=z(this,Sa),g=z(this,Xf),v=Date.now(),S="error",m=!1);const w=d.fetchStatus==="fetching",C=S==="pending",k=S==="error",A=C&&w,R=g!==void 0;return{status:S,fetchStatus:d.fetchStatus,isPending:C,isSuccess:S==="success",isError:k,isInitialLoading:A,isLoading:A,data:g,dataUpdatedAt:d.dataUpdatedAt,error:y,errorUpdatedAt:v,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:d.dataUpdateCount>u.dataUpdateCount||d.errorUpdateCount>u.errorUpdateCount,isFetching:w,isRefetching:w&&!C,isLoadingError:k&&!R,isPaused:d.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:k&&R,isStale:e_(e,n),refetch:this.refetch,isEnabled:On(n.enabled,e)!==!1}}updateResult(){const e=z(this,tr),n=this.createResult(z(this,At),this.options);if(Qe(this,zc,z(this,At).state),Qe(this,zf,this.options),z(this,zc).data!==void 0&&Qe(this,Uf,z(this,At)),RO(n,e))return;Qe(this,tr,n);const r=(()=>{if(!e)return!0;const{notifyOnChangeProps:s}=this.options,a=typeof s=="function"?s():s;if(a==="all"||!a&&!z(this,Zf).size)return!0;const c=new Set(a??z(this,Zf));return this.options.throwOnError&&c.add("error"),Object.keys(z(this,tr)).some(u=>{const h=u;return z(this,tr)[h]!==e[h]&&c.has(h)})})();oi.batch(()=>{r&&this.listeners.forEach(s=>{s(z(this,tr))}),z(this,er).getQueryCache().notify({query:z(this,At),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ot(this,zt,jw).call(this)}},er=new WeakMap,At=new WeakMap,Up=new WeakMap,tr=new WeakMap,zc=new WeakMap,zf=new WeakMap,Sa=new WeakMap,Zp=new WeakMap,Xf=new WeakMap,Uf=new WeakMap,Xc=new WeakMap,Uc=new WeakMap,kl=new WeakMap,Zf=new WeakMap,zt=new WeakSet,zd=function(e){Ot(this,zt,Xw).call(this);let n=z(this,At).fetch(this.options,e);return e!=null&&e.throwOnError||(n=n.catch(nr)),n},$w=function(e){return!KE()&&On(this.options.enabled,z(this,At))!==!1&&w2(e)},Dw=function(){Ot(this,zt,Bw).call(this);const e=On(this.options.staleTime,z(this,At));if(z(this,tr).isStale||!Ot(this,zt,$w).call(this,e))return;const n=E2(z(this,tr).dataUpdatedAt,e)+1;Qe(this,Xc,Rc.setTimeout(()=>{z(this,tr).isStale||this.updateResult()},n))},Lw=function(){return On(this.options.refetchInterval,z(this,At))??!1},Iw=function(e){Ot(this,zt,zw).call(this),Qe(this,kl,e),!(z(this,kl)===0||!Ot(this,zt,$w).call(this,z(this,kl)))&&Qe(this,Uc,Rc.setInterval(()=>{(this.options.refetchIntervalInBackground||JE.isFocused())&&Ot(this,zt,zd).call(this)},z(this,kl)))},jw=function(){Ot(this,zt,Dw).call(this),Ot(this,zt,Iw).call(this,Ot(this,zt,Lw).call(this))},Bw=function(){z(this,Xc)!==void 0&&(Rc.clearTimeout(z(this,Xc)),Qe(this,Xc,void 0))},zw=function(){z(this,Uc)!==void 0&&(Rc.clearInterval(z(this,Uc)),Qe(this,Uc,void 0))},Xw=function(){const e=z(this,er).getQueryCache().build(z(this,er),this.options);if(e===z(this,At))return;const n=z(this,At);Qe(this,At,e),Qe(this,Up,e.state),this.hasListeners()&&(n==null||n.removeObserver(this),e.addObserver(this))},p2);function tY(t,e){return On(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&On(e.retryOnMount,t)===!1)}function eM(t,e){return tY(t,e)||t.state.data!==void 0&&Uw(t,e,e.refetchOnMount)}function Uw(t,e,n){if(On(e.enabled,t)!==!1&&On(e.staleTime,t)!=="static"){const i=On(n,t);return i==="always"||i!==!1&&e_(t,e)}return!1}function tM(t,e,n,i){return(t!==e||On(i.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&e_(t,n)}function e_(t,e){return On(e.enabled,t)!==!1&&t.isStaleByTime(On(e.staleTime,t))}var Vp,To,zi,Zc,ko,bl,m2,nY=(m2=class extends A2{constructor(e){super();Je(this,ko);Je(this,Vp);Je(this,To);Je(this,zi);Je(this,Zc);Qe(this,Vp,e.client),this.mutationId=e.mutationId,Qe(this,zi,e.mutationCache),Qe(this,To,[]),this.state=e.state||P2(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){z(this,To).includes(e)||(z(this,To).push(e),this.clearGcTimeout(),z(this,zi).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){Qe(this,To,z(this,To).filter(n=>n!==e)),this.scheduleGc(),z(this,zi).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){z(this,To).length||(this.state.status==="pending"?this.scheduleGc():z(this,zi).remove(this))}continue(){var e;return((e=z(this,Zc))==null?void 0:e.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(e){var c,u,h,d,m,g,y,v,S,x,w,C,k,A,R,P,N,$;const n=()=>{Ot(this,ko,bl).call(this,{type:"continue"})},i={client:z(this,Vp),meta:this.options.meta,mutationKey:this.options.mutationKey},r=Qe(this,Zc,C2({fn:()=>this.options.mutationFn?this.options.mutationFn(e,i):Promise.reject(new Error("No mutationFn found")),onFail:(D,U)=>{Ot(this,ko,bl).call(this,{type:"failed",failureCount:D,error:U})},onPause:()=>{Ot(this,ko,bl).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>z(this,zi).canRun(this)})),s=this.state.status==="pending",a=!r.canStart();try{if(s)n();else{Ot(this,ko,bl).call(this,{type:"pending",variables:e,isPaused:a}),z(this,zi).config.onMutate&&await z(this,zi).config.onMutate(e,this,i);const U=await((u=(c=this.options).onMutate)==null?void 0:u.call(c,e,i));U!==this.state.context&&Ot(this,ko,bl).call(this,{type:"pending",context:U,variables:e,isPaused:a})}const D=await r.start();return await((d=(h=z(this,zi).config).onSuccess)==null?void 0:d.call(h,D,e,this.state.context,this,i)),await((g=(m=this.options).onSuccess)==null?void 0:g.call(m,D,e,this.state.context,i)),await((v=(y=z(this,zi).config).onSettled)==null?void 0:v.call(y,D,null,this.state.variables,this.state.context,this,i)),await((x=(S=this.options).onSettled)==null?void 0:x.call(S,D,null,e,this.state.context,i)),Ot(this,ko,bl).call(this,{type:"success",data:D}),D}catch(D){try{await((C=(w=z(this,zi).config).onError)==null?void 0:C.call(w,D,e,this.state.context,this,i))}catch(U){Promise.reject(U)}try{await((A=(k=this.options).onError)==null?void 0:A.call(k,D,e,this.state.context,i))}catch(U){Promise.reject(U)}try{await((P=(R=z(this,zi).config).onSettled)==null?void 0:P.call(R,void 0,D,this.state.variables,this.state.context,this,i))}catch(U){Promise.reject(U)}try{await(($=(N=this.options).onSettled)==null?void 0:$.call(N,void 0,D,e,this.state.context,i))}catch(U){Promise.reject(U)}throw Ot(this,ko,bl).call(this,{type:"error",error:D}),D}finally{z(this,Zc)===r&&Qe(this,Zc,void 0),z(this,zi).runNext(this)}}},Vp=new WeakMap,To=new WeakMap,zi=new WeakMap,Zc=new WeakMap,ko=new WeakSet,bl=function(e){const n=i=>{switch(e.type){case"failed":return{...i,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...i,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:e.error,failureCount:i.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),oi.batch(()=>{z(this,To).forEach(i=>{i.onMutationUpdate(e)}),z(this,zi).notify({mutation:this,type:"updated",action:e})})},m2);function P2(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var xa,Zs,qp,g2,iY=(g2=class extends mh{constructor(e={}){super();Je(this,xa);Je(this,Zs);Je(this,qp);this.config=e,Qe(this,xa,new Set),Qe(this,Zs,new Map),Qe(this,qp,0)}build(e,n,i){const r=new nY({client:e,mutationCache:this,mutationId:++Mg(this,qp)._,options:e.defaultMutationOptions(n),state:i});return this.add(r),r}add(e){z(this,xa).add(e);const n=Ng(e);if(typeof n=="string"){const i=z(this,Zs).get(n);i?i.push(e):z(this,Zs).set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(z(this,xa).delete(e)){const n=Ng(e);if(typeof n=="string"){const i=z(this,Zs).get(n);if(i)if(i.length>1){const r=i.indexOf(e);r!==-1&&i.splice(r,1)}else i[0]===e&&z(this,Zs).delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){var i;const n=Ng(e);if(typeof n=="string"){const r=(i=z(this,Zs).get(n))==null?void 0:i.find(s=>s.state.status==="pending");return!r||r===e}else return!0}runNext(e){var i,r;const n=Ng(e);return typeof n=="string"?((r=(i=z(this,Zs).get(n))==null?void 0:i.find(s=>s!==e&&s.state.isPaused))==null?void 0:r.continue())??Promise.resolve():Promise.resolve()}clear(){oi.batch(()=>{z(this,xa).forEach(e=>{this.notify({type:"removed",mutation:e})}),z(this,xa).clear(),z(this,Zs).clear()})}getAll(){return Array.from(z(this,xa))}find(e){const n={exact:!0,...e};return this.getAll().find(i=>GP(n,i))}findAll(e={}){return this.getAll().filter(n=>GP(e,n))}notify(e){oi.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return oi.batch(()=>Promise.all(e.map(n=>n.continue().catch(nr))))}},xa=new WeakMap,Zs=new WeakMap,qp=new WeakMap,g2);function Ng(t){var e;return(e=t.options.scope)==null?void 0:e.id}var wa,Cl,Xi,Yp,jo,Xd,Zw,O2,rY=(O2=class extends mh{constructor(n,i){super();Je(this,jo);Je(this,wa);Je(this,Cl);Je(this,Xi);Je(this,Yp);Qe(this,wa,n),this.setOptions(i),this.bindMethods(),Ot(this,jo,Xd).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var r;const i=this.options;this.options=z(this,wa).defaultMutationOptions(n),RO(this.options,i)||z(this,wa).getMutationCache().notify({type:"observerOptionsUpdated",mutation:z(this,Xi),observer:this}),i!=null&&i.mutationKey&&this.options.mutationKey&&Fc(i.mutationKey)!==Fc(this.options.mutationKey)?this.reset():((r=z(this,Xi))==null?void 0:r.state.status)==="pending"&&z(this,Xi).setOptions(this.options)}onSubscribe(){this.listeners.size===1&&z(this,Xi)&&(z(this,Xi).addObserver(this),Ot(this,jo,Xd).call(this))}onUnsubscribe(){var n;this.hasListeners()||(n=z(this,Xi))==null||n.removeObserver(this)}onMutationUpdate(n){Ot(this,jo,Xd).call(this),Ot(this,jo,Zw).call(this,n)}getCurrentResult(){return z(this,Cl)}reset(){var n;(n=z(this,Xi))==null||n.removeObserver(this),Qe(this,Xi,void 0),Ot(this,jo,Xd).call(this),Ot(this,jo,Zw).call(this)}mutate(n,i){var r;return Qe(this,Yp,i),(r=z(this,Xi))==null||r.removeObserver(this),Qe(this,Xi,z(this,wa).getMutationCache().build(z(this,wa),this.options)),z(this,Xi).addObserver(this),z(this,Xi).execute(n)}},wa=new WeakMap,Cl=new WeakMap,Xi=new WeakMap,Yp=new WeakMap,jo=new WeakSet,Xd=function(){var i;const n=((i=z(this,Xi))==null?void 0:i.state)??P2();Qe(this,Cl,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Zw=function(n){oi.batch(()=>{var r,s,a,c;const i=z(this,Yp);if(i&&this.hasListeners()){const u=z(this,Cl).variables,h=z(this,Cl).context,d={client:z(this,wa),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(r=i.onSuccess)==null||r.call(i,n.data,u,h,d)}catch(m){Promise.reject(m)}try{(s=i.onSettled)==null||s.call(i,n.data,null,u,h,d)}catch(m){Promise.reject(m)}}else if((n==null?void 0:n.type)==="error"){try{(a=i.onError)==null||a.call(i,n.error,u,h,d)}catch(m){Promise.reject(m)}try{(c=i.onSettled)==null||c.call(i,void 0,n.error,u,h,d)}catch(m){Promise.reject(m)}}}this.listeners.forEach(u=>{u(z(this,Cl))})})},O2),Co,b2,sY=(b2=class extends mh{constructor(e={}){super();Je(this,Co);this.config=e,Qe(this,Co,new Map)}build(e,n,i){const r=n.queryKey,s=n.queryHash??FE(r,n);let a=this.get(s);return a||(a=new Jq({client:e,queryKey:r,queryHash:s,options:e.defaultQueryOptions(n),state:i,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){z(this,Co).has(e.queryHash)||(z(this,Co).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){z(this,Co).get(e.queryHash)===e&&(e.destroy(),z(this,Co).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){oi.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return z(this,Co).get(e)}getAll(){return[...z(this,Co).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(i=>YP(n,i))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(i=>YP(e,i)):n}notify(e){oi.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){oi.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){oi.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Co=new WeakMap,b2),xn,Al,Rl,Vf,qf,Pl,Yf,Gf,y2,oY=(y2=class{constructor(t={}){Je(this,xn);Je(this,Al);Je(this,Rl);Je(this,Vf);Je(this,qf);Je(this,Pl);Je(this,Yf);Je(this,Gf);Qe(this,xn,t.queryCache||new sY),Qe(this,Al,t.mutationCache||new iY),Qe(this,Rl,t.defaultOptions||{}),Qe(this,Vf,new Map),Qe(this,qf,new Map),Qe(this,Pl,0)}mount(){Mg(this,Pl)._++,z(this,Pl)===1&&(Qe(this,Yf,JE.subscribe(async t=>{t&&(await this.resumePausedMutations(),z(this,xn).onFocus())})),Qe(this,Gf,sb.subscribe(async t=>{t&&(await this.resumePausedMutations(),z(this,xn).onOnline())})))}unmount(){var t,e;Mg(this,Pl)._--,z(this,Pl)===0&&((t=z(this,Yf))==null||t.call(this),Qe(this,Yf,void 0),(e=z(this,Gf))==null||e.call(this),Qe(this,Gf,void 0))}isFetching(t){return z(this,xn).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return z(this,Al).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=z(this,xn).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=z(this,xn).build(this,e),i=n.state.data;return i===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(On(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(i))}getQueriesData(t){return z(this,xn).findAll(t).map(({queryKey:e,state:n})=>[e,n.data])}setQueryData(t,e,n){var a;const i=this.defaultQueryOptions({queryKey:t}),r=(a=z(this,xn).get(i.queryHash))==null?void 0:a.state.data,s=jq(e,r);if(s!==void 0)return z(this,xn).build(this,i).setData(s,{...n,manual:!0})}setQueriesData(t,e,n){return oi.batch(()=>z(this,xn).findAll(t).map(({queryKey:i})=>[i,this.setQueryData(i,e,n)]))}getQueryState(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=z(this,xn).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=z(this,xn);oi.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=z(this,xn);return oi.batch(()=>{const i=n.findAll(t),r=new Set(i);return i.forEach(s=>{s.reset()}),this.refetchQueries({type:"active",predicate:s=>r.has(s)},e)})}cancelQueries(t,e={}){const n={revert:!0,...e},i=oi.batch(()=>z(this,xn).findAll(t).map(r=>r.cancel(n)));return Promise.all(i).then(nr).catch(nr)}invalidateQueries(t,e={}){return oi.batch(()=>(z(this,xn).findAll(t).forEach(n=>{n.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},e)))}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},i=oi.batch(()=>z(this,xn).findAll(t).filter(r=>!r.isDisabled()&&!r.isStatic()).map(r=>{let s=r.fetch(void 0,n);return n.throwOnError||(s=s.catch(nr)),r.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(i).then(nr)}async query(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=z(this,xn).build(this,e),i=n.isStaleByTime(On(e.staleTime,n))?await n.fetch(e):n.state.data,r=e.select;return r?r(i):i}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=z(this,xn).build(this,e);return n.isStaleByTime(On(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(nr).catch(nr)}infiniteQuery(t){return t._type="infinite",this.query(t)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(nr).catch(nr)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return sb.isOnline()?z(this,Al).resumePausedMutations():Promise.resolve()}getQueryCache(){return z(this,xn)}getMutationCache(){return z(this,Al)}getDefaultOptions(){return z(this,Rl)}setDefaultOptions(t){Qe(this,Rl,t)}setQueryDefaults(t,e){z(this,Vf).set(Fc(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...z(this,Vf).values()],n={};return e.forEach(i=>{Ff(t,i.queryKey)&&Object.assign(n,i.defaultOptions)}),n}setMutationDefaults(t,e){z(this,qf).set(Fc(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...z(this,qf).values()],n={};return e.forEach(i=>{Ff(t,i.mutationKey)&&Object.assign(n,i.defaultOptions)}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...z(this,Rl).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=FE(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===HE&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...z(this,Rl).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){z(this,xn).clear(),z(this,Al).clear()}},xn=new WeakMap,Al=new WeakMap,Rl=new WeakMap,Vf=new WeakMap,qf=new WeakMap,Pl=new WeakMap,Yf=new WeakMap,Gf=new WeakMap,y2);const M2=T.createContext(!1),aY=()=>T.useContext(M2);M2.Provider;function lY(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}const cY=T.createContext(lY()),uY=()=>T.useContext(cY),fY=(t,e,n)=>{const i=n!=null&&n.state.error&&typeof t.throwOnError=="function"?WE(t.throwOnError,[n.state.error,n]):t.throwOnError;(t.suspense||i)&&(e.isReset()||(t.retryOnMount=!1))},hY=t=>{T.useEffect(()=>{t.clearReset()},[t])},dY=({result:t,errorResetBoundary:e,throwOnError:n,query:i,suspense:r})=>t.isError&&!e.isReset()&&!t.isFetching&&i&&(r&&t.data===void 0||WE(n,[t.error,i])),pY=t=>{if(t.suspense){const n=r=>r==="static"?r:Math.max(r??1e3,1e3),i=t.staleTime;t.staleTime=typeof i=="function"?(...r)=>n(i(...r)):n(i),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},mY=(t,e)=>(t==null?void 0:t.suspense)&&e.isPending,gY=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function OY(t,e,n){const i=aY(),r=uY(),s=GE(),a=s.defaultQueryOptions(t),c=s.getQueryCache().get(a.queryHash),u=t.subscribed!==!1;a._optimisticResults=i?"isRestoring":u?"optimistic":void 0,pY(a),fY(a,r,c),hY(r);const[h]=T.useState(()=>new e(s,a)),d=h.getOptimisticResult(a),m=!i&&u;if(T.useSyncExternalStore(T.useCallback(g=>{const y=m?h.subscribe(oi.batchCalls(g)):nr;return h.updateResult(),y},[h,m]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),T.useEffect(()=>{h.setOptions(a)},[a,h]),mY(a,d))throw gY(a,h,r);if(dY({result:d,errorResetBoundary:r,throwOnError:a.throwOnError,query:c,suspense:a.suspense}))throw d.error;return a.notifyOnChangeProps?d:h.trackResult(d)}function bY(t,e){return OY(t,eY)}function yY(t,e){const n=GE(),[i]=T.useState(()=>new rY(n,t));T.useEffect(()=>{i.setOptions(t)},[i,t]);const r=T.useSyncExternalStore(T.useCallback(a=>i.subscribe(oi.batchCalls(a)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),s=T.useCallback((...a)=>{i.mutate(a[0],a[1]).catch(nr)},[i]);if(r.error&&WE(i.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:s,mutateAsync:r.mutate}}var gh=S2(),vY=Object.defineProperty,Oh=(t,e)=>vY(t,"name",{value:e,configurable:!0}),N2=!!(typeof window<"u"&&window.document&&window.document.createElement);function at(t,e,{checkForDefaultPrevented:n=!0}={}){return Oh(function(r){if(t==null||t(r),n===!1||!r||!r.defaultPrevented)return e==null?void 0:e(r)},"handleEvent")}Oh(at,"composeEventHandlers");function SY(t){var e;if(!N2)throw new Error("Cannot access window outside of the DOM");return((e=t==null?void 0:t.ownerDocument)==null?void 0:e.defaultView)??window}Oh(SY,"getOwnerWindow");function Vw(t){if(!N2)throw new Error("Cannot access document outside of the DOM");return(t==null?void 0:t.ownerDocument)??document}Oh(Vw,"getOwnerDocument");function Q2(t,e=!1){const{activeElement:n}=Vw(t);if(!(n!=null&&n.nodeName))return null;if($2(n)&&n.contentDocument)return Q2(n.contentDocument.body,e);if(e){const i=n.getAttribute("aria-activedescendant");if(i){const r=Vw(n).getElementById(i);if(r)return r}}return n}Oh(Q2,"getActiveElement");function $2(t){return t.tagName==="IFRAME"}Oh($2,"isFrame");var xY=Object.defineProperty,ps=(t,e)=>xY(t,"name",{value:e,configurable:!0});function wY(t,e){const n=T.createContext(e);n.displayName=t+"Context";const i=ps(s=>{const{children:a,...c}=s,u=T.useMemo(()=>c,Object.values(c));return _.jsx(n.Provider,{value:u,children:a})},"Provider");i.displayName=t+"Provider";function r(s,a={}){const{optional:c=!1}=a,u=T.useContext(n);if(u)return u;if(e!==void 0)return e;if(!c)throw new Error(`\`${s}\` must be used within \`${t}\``)}return ps(r,"useContext"),[i,r]}ps(wY,"createContext");function Go(t,e=[]){let n=[];function i(s,a){const c=T.createContext(a);c.displayName=s+"Context";const u=n.length;n=[...n,a];const h=ps(m=>{var w;const{scope:g,children:y,...v}=m,S=((w=g==null?void 0:g[t])==null?void 0:w[u])||c,x=T.useMemo(()=>v,Object.values(v));return _.jsx(S.Provider,{value:x,children:y})},"Provider");h.displayName=s+"Provider";function d(m,g,y={}){var w;const{optional:v=!1}=y,S=((w=g==null?void 0:g[t])==null?void 0:w[u])||c,x=T.useContext(S);if(x)return x;if(a!==void 0)return a;if(!v)throw new Error(`\`${m}\` must be used within \`${s}\``)}return ps(d,"useContext"),[h,d]}ps(i,"createContext");const r=ps(()=>{const s=n.map(a=>T.createContext(a));return ps(function(c){const u=(c==null?void 0:c[t])||s;return T.useMemo(()=>({[`__scope${t}`]:{...c,[t]:u}}),[c,u])},"useScope")},"createScope");return r.scopeName=t,[i,D2(r,...e)]}ps(Go,"createContextScope");function D2(...t){const e=t[0];if(t.length===1)return e;const n=ps(()=>{const i=t.map(r=>({useScope:r(),scopeName:r.scopeName}));return ps(function(s){const a=i.reduce((c,{useScope:u,scopeName:h})=>{const m=u(s)[`__scope${h}`];return{...c,...m}},{});return T.useMemo(()=>({[`__scope${e.scopeName}`]:a}),[a])},"useComposedScopes")},"createScope");return n.scopeName=e.scopeName,n}ps(D2,"composeContextScopes");var EY=Object.defineProperty,t_=(t,e)=>EY(t,"name",{value:e,configurable:!0});function qw(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}t_(qw,"setRef");function L2(...t){return e=>{let n=!1;const i=t.map(r=>{const s=qw(r,e);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r<i.length;r++){const s=i[r];typeof s=="function"?s():qw(t[r],null)}}}}t_(L2,"composeRefs");function nn(...t){return T.useCallback(L2(...t),t)}t_(nn,"useComposedRefs");var _Y=Object.defineProperty,Hr=(t,e)=>_Y(t,"name",{value:e,configurable:!0});function Pa(t){const e=T.forwardRef((n,i)=>{let{children:r,...s}=n,a=null,c=!1;const u=[];r=U2(r),T.Children.forEach(r,g=>{var y;if(z2(g)){c=!0;const v=g;let S="child"in v.props?v.props.child:v.props.children;for(;n_(S)&&typeof ob=="function";)S=ob(S._payload);a=kY(v,S),u.push((y=a==null?void 0:a.props)==null?void 0:y.children)}else u.push(g)}),a?a=T.cloneElement(a,void 0,u):!c&&T.Children.count(r)===1&&T.isValidElement(r)&&(a=r);const h=a?B2(a):void 0,d=nn(i,h);if(!a){if(r||r===0)throw new Error(c?RY(t):AY(t));return r}const m=j2(s,a.props??{});return a.type!==T.Fragment&&(m.ref=i?d:h),T.cloneElement(a,m)});return e.displayName=`${t}.Slot`,e}Hr(Pa,"createSlot");var I2=Symbol.for("radix.slottable");function TY(t){const e=Hr(n=>"child"in n?n.children(n.child):n.children,"Slottable");return e.displayName=`${t}.Slottable`,e.__radixId=I2,e}Hr(TY,"createSlottable");var kY=Hr((t,e)=>"child"in t.props?T.isValidElement(e)?T.cloneElement(e,void 0,t.props.children(e.props.children)):null:T.isValidElement(e)?e:null,"getSlottableElementFromSlottable");function j2(t,e){const n={...e};for(const i in e){const r=t[i],s=e[i];/^on[A-Z]/.test(i)?r&&s?n[i]=(...c)=>{const u=s(...c);return r(...c),u}:r&&(n[i]=r):i==="style"?n[i]={...r,...s}:i==="className"?n[i]=[r,s].filter(Boolean).join(" "):i==="aria-describedby"&&(n[i]=Z2(s,r))}return{...t,...n}}Hr(j2,"mergeProps");function B2(t){var i,r;let e=(i=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(r=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}Hr(B2,"getElementRef");function z2(t){return T.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===I2}Hr(z2,"isSlottable");var CY=Symbol.for("react.lazy");function n_(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===CY&&"_payload"in t&&X2(t._payload)}Hr(n_,"isLazyComponent");function X2(t){return typeof t=="object"&&t!==null&&"then"in t}Hr(X2,"isPromiseLike");function U2(t){let e=t;for(;n_(e)&&typeof ob=="function";)e=ob(e._payload);return e}Hr(U2,"useUnwrappedLazy");function Z2(...t){const e=new Set;for(const n of t)if(typeof n=="string")for(const i of String(n).trim().split(/\s+/))i&&e.add(i);return e.size>0?Array.from(e).join(" "):void 0}Hr(Z2,"concatAriaDescribedby");var AY=Hr(t=>`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),RY=Hr(t=>`${t} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),ob=uu[" use ".trim().toString()],Kn=globalThis!=null&&globalThis.document?T.useLayoutEffect:()=>{},PY=Object.defineProperty,ai=(t,e)=>PY(t,"name",{value:e,configurable:!0});function ny(t){const e=t+"CollectionProvider",[n,i]=Go(e),[r,s]=n(e,{collectionRef:{current:null},itemMap:new Map}),a=ai(S=>{const{scope:x,children:w}=S,C=T.useRef(null),k=T.useRef(new Map).current;return _.jsx(r,{scope:x,itemMap:k,collectionRef:C,children:w})},"CollectionProvider");a.displayName=e;const c=t+"CollectionSlot",u=Pa(c),h=T.forwardRef((S,x)=>{const{scope:w,children:C}=S,k=s(c,w),A=nn(x,k.collectionRef);return _.jsx(u,{ref:A,children:C})});h.displayName=c;const d=t+"CollectionItemSlot",m="data-radix-collection-item",g=Pa(d),y=T.forwardRef((S,x)=>{const{scope:w,children:C,...k}=S,A=T.useRef(null),R=nn(x,A),P=s(d,w);return T.useEffect(()=>(P.itemMap.set(A,{ref:A,...k}),()=>void P.itemMap.delete(A))),_.jsx(g,{[m]:"",ref:R,children:C})});y.displayName=d;function v(S){const x=s(t+"CollectionConsumer",S);return T.useCallback(()=>{const C=x.collectionRef.current;if(!C)return[];const k=Array.from(C.querySelectorAll(`[${m}]`));return Array.from(x.itemMap.values()).sort((P,N)=>k.indexOf(P.ref.current)-k.indexOf(N.ref.current))},[x.collectionRef,x.itemMap])}return ai(v,"useCollection"),[{Provider:a,Slot:h,ItemSlot:y},v,i]}ai(ny,"createCollection");var nM=new WeakMap,jn,qr,Qg=(qr=class extends Map{constructor(n){super(n);Je(this,jn);Qe(this,jn,[...super.keys()]),nM.set(this,!0)}set(n,i){return nM.get(this)&&!this.has(n)&&z(this,jn).push(n),super.set(n,i),this}insert(n,i,r){const s=this.has(i),a=s?this.size:this.size+1,c=i_(n),u=c>=0?Math.min(c,a-1):Math.max(a+c,0);if(s?z(this,jn).indexOf(i)===u:u===this.size)return this.set(i,r),this;const h=z(this,jn).filter(m=>m!==i);h.splice(u,0,i);const d=h.map(m=>[m,m===i?r:this.get(m)]);this.clear();for(const[m,g]of d)this.set(m,g);return this}with(n,i,r){const s=new qr(this);return s.insert(n,i,r),s}before(n){const i=z(this,jn).indexOf(n)-1;if(!(i<0))return this.entryAt(i)}setBefore(n,i,r){const s=z(this,jn).indexOf(n);if(s===-1)return this;const a=z(this,jn).indexOf(i),c=a!==-1&&a<s?s-1:s;return this.insert(c,i,r)}after(n){let i=z(this,jn).indexOf(n);if(i=i===-1||i===this.size-1?-1:i+1,i!==-1)return this.entryAt(i)}setAfter(n,i,r){const s=z(this,jn).indexOf(n);if(s===-1)return this;const a=z(this,jn).indexOf(i),c=a!==-1&&a<=s?s:s+1;return this.insert(c,i,r)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return Qe(this,jn,[]),super.clear()}delete(n){const i=super.delete(n);return i&&z(this,jn).splice(z(this,jn).indexOf(n),1),i}deleteAt(n){const i=this.keyAt(n);return i!==void 0?this.delete(i):!1}at(n){const i=PO(z(this,jn),n);if(i!==void 0)return this.get(i)}entryAt(n){const i=PO(z(this,jn),n);if(i!==void 0)return[i,this.get(i)]}indexOf(n){return z(this,jn).indexOf(n)}keyAt(n){return PO(z(this,jn),n)}from(n,i){const r=this.indexOf(n);if(r===-1)return;let s=r+i;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.at(s)}keyFrom(n,i){const r=this.indexOf(n);if(r===-1)return;let s=r+i;return s<0&&(s=0),s>=this.size&&(s=this.size-1),this.keyAt(s)}find(n,i){let r=0;for(const s of this){if(Reflect.apply(n,i,[s,r,this]))return s;r++}}findIndex(n,i){let r=0;for(const s of this){if(Reflect.apply(n,i,[s,r,this]))return r;r++}return-1}filter(n,i){const r=[];let s=0;for(const a of this)Reflect.apply(n,i,[a,s,this])&&r.push(a),s++;return new qr(r)}map(n,i){const r=[];let s=0;for(const a of this)r.push([a[0],Reflect.apply(n,i,[a,s,this])]),s++;return new qr(r)}reduce(...n){const[i,r]=n,s=n.length>1;if(!s&&this.size===0)throw new TypeError("Reduce of empty OrderedDict with no initial value");let a=0,c=r;for(const u of this)a===0&&!s?c=u:c=Reflect.apply(i,this,[c,u,a,this]),a++;return c}reduceRight(...n){const[i,r]=n,s=n.length>1;if(!s&&this.size===0)throw new TypeError("Reduce of empty OrderedDict with no initial value");let a=r;for(let c=this.size-1;c>=0;c--){const u=this.entryAt(c);c===this.size-1&&!s?a=u:a=Reflect.apply(i,this,[a,u,c,this])}return a}sort(n){if(typeof n!="function")throw new TypeError("OrderedDict.sort requires a compare function");const i=[...this.entries()].sort(n);this.clear();for(const[r,s]of i)this.set(r,s);return this}toSorted(n){if(typeof n!="function")throw new TypeError("OrderedDict.toSorted requires a compare function");const i=[...this.entries()].sort(n);return new qr(i)}toReversed(){const n=new qr;for(let i=this.size-1;i>=0;i--){const r=this.keyAt(i),s=this.get(r);n.set(r,s)}return n}toSpliced(...n){const i=[...this.entries()];return i.splice(...n),new qr(i)}slice(n,i){const r=new qr;for(const s of z(this,jn).slice(n,i))r.set(s,this.get(s));return r}every(n,i){let r=0;for(const s of this){if(!Reflect.apply(n,i,[s,r,this]))return!1;r++}return!0}some(n,i){let r=0;for(const s of this){if(Reflect.apply(n,i,[s,r,this]))return!0;r++}return!1}},jn=new WeakMap,ai(qr,"OrderedDict"),qr);function PO(t,e){if("at"in Array.prototype)return Array.prototype.at.call(t,e);const n=V2(t,e);return n===-1?void 0:t[n]}ai(PO,"at");function V2(t,e){const n=t.length,i=i_(e),r=i>=0?i:n+i;return r<0||r>=n?-1:r}ai(V2,"toSafeIndex");function i_(t){return t!==t||t===0?0:Math.trunc(t)}ai(i_,"toSafeInteger");function MY(t){const e=t+"CollectionProvider",[n,i]=Go(e),[r,s]=n(e);r.displayName=t+"CollectionStableContextProvider";const[a,c]=n(e);a.displayName=t+"CollectionStatefulContextProvider";const u=ai(({state:P,...N})=>P?_.jsx(d,{...N,state:P}):_.jsx(h,{...N}),"CollectionProvider");u.displayName=e;const h=ai(P=>{const N=C();return _.jsx(d,{...P,state:N})},"CollectionInit");h.displayName=t+"CollectionInit";const d=ai(P=>{const{scope:N,children:$,state:D}=P,U=T.useRef(null),[V,X]=T.useState(null),ee=nn(U,X),[le,re]=D,G=T.useRef(new Qg),oe=T.useCallback(()=>{const K=G.current;return G2(K)||K.sort(MO),K},[]);return T.useEffect(()=>{if(!V)return;const K=F2(()=>{re(me=>{const fe=me.toSorted(MO);return fe.some(([ze],tt)=>me.keyAt(tt)!==ze)?fe:me})});return K.observe(V,{childList:!0,subtree:!0}),()=>{K.disconnect()}},[V,re]),_.jsx(r,{scope:N,collectionElementRef:ee,collectionElementRefObject:U,getCollection:oe,setCollection:re,registryRef:G,children:_.jsx(a,{scope:N,collectionElement:V,collection:le,children:$})})},"CollectionProviderImpl");d.displayName=t+"CollectionProviderImpl";const m=t+"CollectionSlot",g=Pa(m),y=T.forwardRef((P,N)=>{const{scope:$,children:D}=P,U=s(m,$),V=nn(N,U.collectionElementRef);return _.jsx(g,{ref:V,children:D})});y.displayName=m;const v=t+"CollectionItemSlot",S="data-radix-collection-item",x=Pa(v),w=T.forwardRef((P,N)=>{const{scope:$,children:D,...U}=P,V=T.useRef(null),X=s(v,$),{setCollection:ee,registryRef:le}=X,re=T.useRef(U);q2(re.current,U)||(re.current=U);const G=re.current,oe=T.useCallback(fe=>{const Te=le.current;fe?Te.set(fe,{...re.current,element:fe}):V.current&&Te.delete(V.current)},[le]),K=nn(N,oe,V);Kn(()=>{const fe=V.current,Te=le.current;fe&&Te.has(fe)&&Te.set(fe,{...G,element:fe})},[G,le]);const me=T.useRef(null);return T.useEffect(()=>{const fe=V.current,Te=me.current;((Te==null?void 0:Te.element)??null)===fe&&(!fe||(Te==null?void 0:Te.itemData)===G)||(me.current=fe?{element:fe,itemData:G}:null,ee(ze=>{const tt=new Qg(ze);return Te&&Te.element!==fe&&tt.delete(Te.element),fe&&tt.set(fe,{...G,element:fe}),tt.sort(MO)}))}),T.useEffect(()=>()=>{const fe=me.current;me.current=null,fe&&ee(Te=>{if(!Te.has(fe.element))return Te;const ze=new Qg(Te);return ze.delete(fe.element),ze})},[ee]),_.jsx(x,{[S]:"",ref:K,children:D})});w.displayName=v;function C(){return T.useState(new Qg)}ai(C,"useInitCollection");function k(P){const{collection:N}=c(t+"CollectionConsumer",P);return N}ai(k,"useCollection");function A(P){const{getCollection:N}=s(t+"CollectionConsumer",P);return N}return ai(A,"useGetCollection"),[{Provider:u,Slot:y,ItemSlot:w},{createCollectionScope:i,useCollection:k,useGetCollection:A,useInitCollection:C}]}ai(MY,"createCollection");function q2(t,e){if(t===e)return!0;if(typeof t!="object"||typeof e!="object"||t==null||e==null)return!1;const n=Object.keys(t),i=Object.keys(e);if(n.length!==i.length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(e,r)||t[r]!==e[r])return!1;return!0}ai(q2,"shallowEqual");function Y2(t,e){return!!(e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING)}ai(Y2,"isElementPreceding");function G2(t){let e;for(const n of t.keys()){if(e){const i=e.compareDocumentPosition(n);if(!(i&Node.DOCUMENT_POSITION_DISCONNECTED)&&i&Node.DOCUMENT_POSITION_PRECEDING)return!1}e=n}return!0}ai(G2,"isInDocumentOrder");function MO(t,e){return!t[1].element||!e[1].element?0:Y2(t[1].element,e[1].element)?-1:1}ai(MO,"sortByDocumentPosition");function F2(t){return new MutationObserver(n=>{for(const i of n)if(i.type==="childList"){t();return}})}ai(F2,"getChildListObserver");var NY=Object.defineProperty,QY=(t,e)=>NY(t,"name",{value:e,configurable:!0}),$Y=uu[" useId ".trim().toString()]||(()=>{}),DY=0;function Bo(t){const[e,n]=T.useState($Y());return Kn(()=>{t||n(i=>i??String(DY++))},[t]),t||(e?`radix-${e}`:"")}QY(Bo,"useId");var LY=Object.defineProperty,IY=(t,e)=>LY(t,"name",{value:e,configurable:!0}),jY=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],cn=jY.reduce((t,e)=>{const n=Pa(`Primitive.${e}`),i=T.forwardRef((r,s)=>{const{asChild:a,...c}=r,u=a?n:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),_.jsx(u,{...c,ref:s})});return i.displayName=`Primitive.${e}`,{...t,[e]:i}},{});function r_(t,e){t&&gh.flushSync(()=>t.dispatchEvent(e))}IY(r_,"dispatchDiscreteCustomEvent");var BY=Object.defineProperty,zY=(t,e)=>BY(t,"name",{value:e,configurable:!0}),iM=uu[" useInsertionEffect ".trim().toString()];function ws(t){const e=T.useRef(t);return typeof iM=="function"?iM(()=>{e.current=t}):Kn(()=>{e.current=t}),T.useMemo(()=>((...n)=>{var i;return(i=e.current)==null?void 0:i.call(e,...n)}),[])}zY(ws,"useCallbackRef");var XY=Object.defineProperty,UY=(t,e)=>XY(t,"name",{value:e,configurable:!0}),rM=uu[" useEffectEvent ".trim().toString()],sM=uu[" useInsertionEffect ".trim().toString()];function H2(t){if(typeof rM=="function")return rM(t);const e=T.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof sM=="function"?sM(()=>{e.current=t}):Kn(()=>{e.current=t}),T.useMemo(()=>((...n)=>{var i;return(i=e.current)==null?void 0:i.call(e,...n)}),[])}UY(H2,"useEffectEvent");var ZY=Object.defineProperty,Gp=(t,e)=>ZY(t,"name",{value:e,configurable:!0}),VY=uu[" useInsertionEffect ".trim().toString()]||Kn;function Hc({prop:t,defaultProp:e,onChange:n=Gp(()=>{},"onChange"),caller:i}){const[r,s,a]=W2({defaultProp:e,onChange:n}),c=t!==void 0,u=c?t:r,h=T.useCallback(d=>{var m;if(c){const g=K2(d)?d(t):d;g!==t&&((m=a.current)==null||m.call(a,g))}else s(d)},[c,t,s,a]);return[u,h]}Gp(Hc,"useControllableState");function W2({defaultProp:t,onChange:e}){const[n,i]=T.useState(t),r=T.useRef(n),s=T.useRef(e);return VY(()=>{s.current=e},[e]),T.useEffect(()=>{var a;r.current!==n&&((a=s.current)==null||a.call(s,n),r.current=n)},[n,r]),[n,i,s]}Gp(W2,"useUncontrolledState");function K2(t){return typeof t=="function"}Gp(K2,"isFunction");var oM=Symbol("RADIX:SYNC_STATE");function qY(t,e,n,i){const{prop:r,defaultProp:s,onChange:a,caller:c}=e,u=r!==void 0,h=H2(a),d=[{...n,state:s}];i&&d.push(i);const[m,g]=T.useReducer((x,w)=>{if(w.type===oM)return{...x,state:w.state};const C=t(x,w);return u&&!Object.is(C.state,x.state)&&h(C.state),C},...d),y=m.state,v=T.useRef(y);T.useEffect(()=>{v.current!==y&&(v.current=y,u||h(y))},[y,v,u]);const S=T.useMemo(()=>r!==void 0?{...m,state:r}:m,[m,r]);return T.useEffect(()=>{u&&!Object.is(r,m.state)&&g({type:oM,state:r})},[r,m.state,u]),[S,g]}Gp(qY,"useControllableStateReducer");var YY=Object.defineProperty,GY=(t,e)=>YY(t,"name",{value:e,configurable:!0}),FY={LTR:"ltr"},HY=T.createContext(void 0);function Fp(t){const e=T.useContext(HY);return t||e||FY.LTR}GY(Fp,"useDirection");var WY=Object.defineProperty,s_=(t,e)=>WY(t,"name",{value:e,configurable:!0}),OS=!1;function J2(){const[t,e]=T.useState(OS);return T.useEffect(()=>{OS||(OS=!0,e(!0))},[]),t}s_(J2,"useIsHydrated");var eI=uu[" useSyncExternalStore ".trim().toString()];function tI(){return()=>{}}s_(tI,"subscribe");function nI(){return eI(tI,()=>!0,()=>!1)}s_(nI,"useIsHydratedModern");var KY=typeof eI=="function"?nI:J2,JY=Object.defineProperty,fu=(t,e)=>JY(t,"name",{value:e,configurable:!0}),bS="rovingFocusGroup.onEntryFocus",e9={bubbles:!1,cancelable:!0},iy="RovingFocusGroup",[Yw,iI,t9]=ny(iy),[n9,ry]=Go(iy,[t9]),aM={Vertical:"vertical",Horizontal:"horizontal"},i9={RTL:"rtl"},[r9,s9]=n9(iy),rI=T.forwardRef(fu(function(e,n){return _.jsx(Yw.Provider,{scope:e.__scopeRovingFocusGroup,children:_.jsx(Yw.Slot,{scope:e.__scopeRovingFocusGroup,children:_.jsx(o9,{...e,ref:n})})})},"RovingFocusGroup")),o9=T.forwardRef(fu(function(e,n){const{__scopeRovingFocusGroup:i,orientation:r,loop:s=!1,dir:a,currentTabStopId:c,defaultCurrentTabStopId:u,onCurrentTabStopIdChange:h,onEntryFocus:d,preventScrollOnEntryFocus:m=!1,...g}=e,y=T.useRef(null),v=nn(n,y),S=Fp(a),[x,w]=Hc({prop:c,defaultProp:u??null,onChange:h,caller:iy}),[C,k]=T.useState(!1),A=ws(d),R=iI(i),P=T.useRef(!1),[N,$]=T.useState(0);return T.useEffect(()=>{const D=y.current;if(D)return D.addEventListener(bS,A),()=>D.removeEventListener(bS,A)},[A]),_.jsx(r9,{scope:i,orientation:r,dir:S,loop:s,currentTabStopId:x,onItemFocus:T.useCallback(D=>w(D),[w]),onItemShiftTab:T.useCallback(()=>k(!0),[]),onFocusableItemAdd:T.useCallback(()=>$(D=>D+1),[]),onFocusableItemRemove:T.useCallback(()=>$(D=>D-1),[]),children:_.jsx(cn.div,{tabIndex:C||N===0?-1:0,"data-orientation":r,...g,ref:v,style:{outline:"none",...e.style},onMouseDown:at(e.onMouseDown,()=>{P.current=!0}),onFocus:at(e.onFocus,D=>{const U=!P.current;if(D.target===D.currentTarget&&U&&!C){const V=new CustomEvent(bS,e9);if(D.currentTarget.dispatchEvent(V),!V.defaultPrevented){const X=R().filter(oe=>oe.focusable),ee=X.find(oe=>oe.active),le=X.find(oe=>oe.id===x),G=[ee,le,...X].filter(Boolean).map(oe=>oe.ref.current);o_(G,m)}}P.current=!1}),onBlur:at(e.onBlur,()=>k(!1))})})},"RovingFocusGroupImpl")),a9="RovingFocusGroupItem",sI=T.forwardRef(fu(function(e,n){const{__scopeRovingFocusGroup:i,focusable:r=!0,active:s=!1,tabStopId:a,children:c,...u}=e,h=Bo(),d=a||h,m=s9(a9,i),g=m.currentTabStopId===d,y=iI(i),{onFocusableItemAdd:v,onFocusableItemRemove:S,currentTabStopId:x}=m,w=KY();return Kn(()=>{if(!(!w||!r))return v(),()=>S()},[w,r,v,S]),T.useEffect(()=>{if(!(w||!r))return v(),()=>S()},[w,r,v,S]),_.jsx(Yw.ItemSlot,{scope:i,id:d,focusable:r,active:s,children:_.jsx(cn.span,{tabIndex:g?0:-1,"data-orientation":m.orientation,...u,ref:n,onMouseDown:at(e.onMouseDown,C=>{r?m.onItemFocus(d):C.preventDefault()}),onFocus:at(e.onFocus,()=>m.onItemFocus(d)),onKeyDown:at(e.onKeyDown,C=>{if(C.key==="Tab"&&C.shiftKey){m.onItemShiftTab();return}if(C.target!==C.currentTarget)return;const k=aI(C,m.orientation,m.dir);if(k!==void 0){if(C.metaKey||C.ctrlKey||C.altKey||C.shiftKey)return;C.preventDefault();let R=y().filter(P=>P.focusable).map(P=>P.ref.current);if(k==="last")R.reverse();else if(k==="prev"||k==="next"){k==="prev"&&R.reverse();const P=R.indexOf(C.currentTarget);R=m.loop?lI(R,P+1):R.slice(P+1)}setTimeout(()=>o_(R))}}),children:typeof c=="function"?c({isCurrentTabStop:g,hasTabStop:x!=null}):c})})},"RovingFocusGroupItem")),l9={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function oI(t,e){return e!==i9.RTL?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}fu(oI,"getDirectionAwareKey");function aI(t,e,n){const i=oI(t.key,n);if(!(e===aM.Vertical&&["ArrowLeft","ArrowRight"].includes(i))&&!(e===aM.Horizontal&&["ArrowUp","ArrowDown"].includes(i)))return l9[i]}fu(aI,"getFocusIntent");function o_(t,e=!1){const n=document.activeElement;for(const i of t)if(i===n||(i.focus({preventScroll:e}),document.activeElement!==n))return}fu(o_,"focusFirst");function lI(t,e){return t.map((n,i)=>t[(e+i)%t.length])}fu(lI,"wrapArray");var c9=Object.defineProperty,Ma=(t,e)=>c9(t,"name",{value:e,configurable:!0});function cI(t,e){return T.useReducer((n,i)=>e[n][i]??n,t)}Ma(cI,"useStateMachine");var hu=Ma(t=>{const{present:e,children:n}=t,i=uI(e),r=typeof n=="function"?n({present:i.isPresent}):T.Children.only(n),s=fI(i.ref,hI(r));return typeof n=="function"||i.isPresent?T.cloneElement(r,{ref:s}):null},"Presence");function uI(t){const[e,n]=T.useState(),i=T.useRef(null),r=T.useRef(t),s=T.useRef("none"),a=T.useRef(void 0),c=t?"mounted":"unmounted",[u,h]=cI(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return T.useEffect(()=>{u==="mounted"?(s.current=a.current??uf(i.current),a.current=void 0):s.current="none"},[u]),Kn(()=>{const d=i.current,m=r.current;if(m!==t){const y=s.current,v=uf(d);t?(a.current=v,h("MOUNT")):v==="none"||(d==null?void 0:d.display)==="none"?h("UNMOUNT"):h(m&&y!==v?"ANIMATION_OUT":"UNMOUNT"),r.current=t}},[t,h]),Kn(()=>{if(e){let d;const m=e.ownerDocument.defaultView??window,g=Ma(v=>{const x=uf(i.current).includes(CSS.escape(v.animationName));if(v.target===e&&x&&(h("ANIMATION_END"),!r.current)){const w=e.style.animationFillMode;e.style.animationFillMode="forwards",d=m.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=w)})}},"handleAnimationEnd"),y=Ma(v=>{v.target===e&&(s.current=uf(i.current))},"handleAnimationStart");return e.addEventListener("animationstart",y),e.addEventListener("animationcancel",g),e.addEventListener("animationend",g),()=>{m.clearTimeout(d),e.removeEventListener("animationstart",y),e.removeEventListener("animationcancel",g),e.removeEventListener("animationend",g)}}else h("ANIMATION_END")},[e,h]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:T.useCallback(d=>{if(d){const m=getComputedStyle(d);i.current=m,a.current=uf(m)}else i.current=null;n(d)},[])}}Ma(uI,"usePresence");function Gw(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}Ma(Gw,"setRef");function fI(...t){const e=T.useRef(t);return e.current=t,T.useCallback(n=>{const i=e.current;let r=!1;const s=i.map(a=>{const c=Gw(a,n);return!r&&typeof c=="function"&&(r=!0),c});if(r)return()=>{for(let a=0;a<s.length;a++){const c=s[a];typeof c=="function"?c():Gw(i[a],null)}}},[])}Ma(fI,"useStableComposedRefs");function uf(t){return(t==null?void 0:t.animationName)||"none"}Ma(uf,"getAnimationName");function hI(t){var i,r;let e=(i=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(r=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}Ma(hI,"getElementRef");var u9=Object.defineProperty,bh=(t,e)=>u9(t,"name",{value:e,configurable:!0}),dI={Automatic:"automatic",Manual:"manual"},a_="Tabs",[f9,dpe]=Go(a_,[ry]),pI=ry(),[h9,l_]=f9(a_),d9=T.forwardRef(bh(function(e,n){const{__scopeTabs:i,value:r,onValueChange:s,defaultValue:a,orientation:c="horizontal",dir:u,activationMode:h=dI.Automatic,...d}=e,m=Fp(u),[g,y]=Hc({prop:r,onChange:s,defaultProp:a??"",caller:a_});return _.jsx(h9,{scope:i,baseId:Bo(),value:g,onValueChange:y,orientation:c,dir:m,activationMode:h,children:_.jsx(cn.div,{dir:m,"data-orientation":c,...d,ref:n})})},"Tabs")),p9="TabsList",m9=T.forwardRef(bh(function(e,n){const{__scopeTabs:i,loop:r=!0,...s}=e,a=l_(p9,i),c=pI(i);return _.jsx(rI,{asChild:!0,...c,orientation:a.orientation,dir:a.dir,loop:r,children:_.jsx(cn.div,{role:"tablist","aria-orientation":a.orientation,...s,ref:n})})},"TabsList")),g9="TabsTrigger",$g=T.forwardRef(bh(function(e,n){const{__scopeTabs:i,value:r,disabled:s=!1,...a}=e,c=l_(g9,i),u=pI(i),h=c_(c.baseId,r),d=u_(c.baseId,r),m=r===c.value;return _.jsx(sI,{asChild:!0,...u,focusable:!s,active:m,children:_.jsx(cn.button,{type:"button",role:"tab","aria-selected":m,"aria-controls":d,"data-state":m?"active":"inactive","data-disabled":s?"":void 0,disabled:s,id:h,...a,ref:n,onMouseDown:at(e.onMouseDown,g=>{!s&&g.button===0&&g.ctrlKey===!1?(g.currentTarget.focus(),c.onValueChange(r)):g.preventDefault()}),onKeyDown:at(e.onKeyDown,g=>{s||g.target!==g.currentTarget||[" ","Enter"].includes(g.key)&&c.onValueChange(r)}),onFocus:at(e.onFocus,()=>{const g=c.activationMode!==dI.Manual;!m&&!s&&g&&c.onValueChange(r)})})})},"TabsTrigger")),O9="TabsContent",Dg=T.forwardRef(bh(function(e,n){const{__scopeTabs:i,value:r,forceMount:s,children:a,...c}=e,u=l_(O9,i),h=c_(u.baseId,r),d=u_(u.baseId,r),m=r===u.value,g=T.useRef(m);return T.useEffect(()=>{const y=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(y)},[]),_.jsx(hu,{present:s||m,children:({present:y})=>_.jsx(cn.div,{"data-state":m?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":h,hidden:!y,id:d,tabIndex:0,...c,ref:n,style:{...e.style,animationDuration:g.current?"0s":void 0},children:y&&a})})},"TabsContent"));function c_(t,e){return`${t}-trigger-${e}`}bh(c_,"makeTriggerId");function u_(t,e){return`${t}-content-${e}`}bh(u_,"makeContentId");const f_=T.createContext({});function Hp(t){const e=T.useRef(null);return e.current===null&&(e.current=t()),e.current}const b9=typeof window<"u",h_=b9?T.useLayoutEffect:T.useEffect,sy=T.createContext(null);function d_(t,e){t.indexOf(e)===-1&&t.push(e)}function Hf(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const Vo=(t,e,n)=>n>e?e:n<t?t:n;let oy=()=>{};const Il={},mI=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),gI=t=>typeof t=="object"&&t!==null,OI=t=>/^0[^.\s]+$/u.test(t);function bI(t){let e;return()=>(e===void 0&&(e=t()),e)}const vs=t=>t,Wp=(...t)=>t.reduce((e,n)=>i=>n(e(i))),Wf=(t,e,n)=>{const i=e-t;return i?(n-t)/i:1};class p_{constructor(){this.subscriptions=[]}add(e){return d_(this.subscriptions,e),()=>Hf(this.subscriptions,e)}notify(e,n,i){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,n,i);else for(let s=0;s<r;s++){const a=this.subscriptions[s];a&&a(e,n,i)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const _r=t=>t*1e3,ms=t=>t/1e3,yI=(t,e)=>e?t*(1e3/e):0,y9=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t},vI=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,v9=1e-7,S9=12;function x9(t,e,n,i,r){let s,a,c=0;do a=e+(n-e)/2,s=vI(a,i,r)-t,s>0?n=a:e=a;while(Math.abs(s)>v9&&++c<S9);return a}function Kp(t,e,n,i){if(t===e&&n===i)return vs;const r=s=>x9(s,0,1,t,n);return s=>s===0||s===1?s:vI(r(s),e,i)}const SI=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,m_=t=>e=>1-t(1-e),xI=Kp(.33,1.53,.69,.99),g_=m_(xI),wI=SI(g_),EI=t=>t>=1?1:(t*=2)<1?.5*g_(t):.5*(2-Math.pow(2,-10*(t-1))),O_=t=>1-Math.sin(Math.acos(t)),_I=m_(O_),TI=SI(O_),w9=Kp(.42,0,1,1),E9=Kp(0,0,.58,1),kI=Kp(.42,0,.58,1),CI=t=>Array.isArray(t)&&typeof t[0]!="number";function AI(t,e){return CI(t)?t[y9(0,t.length,e)]:t}const RI=t=>Array.isArray(t)&&typeof t[0]=="number",_9={linear:vs,easeIn:w9,easeInOut:kI,easeOut:E9,circIn:O_,circInOut:TI,circOut:_I,backIn:g_,backInOut:wI,backOut:xI,anticipate:EI},T9=t=>typeof t=="string",lM=t=>{if(RI(t)){oy(t.length===4);const[e,n,i,r]=t;return Kp(e,n,i,r)}else if(T9(t))return _9[t];return t},Lg=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function k9(t){let e=new Set,n=new Set,i=!1,r=!1;const s=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1};function c(h){s.has(h)&&(u.schedule(h),t()),h(a)}const u={schedule:(h,d=!1,m=!1)=>{const y=m&&i?e:n;return d&&s.add(h),y.add(h),h},cancel:h=>{n.delete(h),s.delete(h)},process:h=>{if(a=h,i){r=!0;return}i=!0;const d=e;e=n,n=d,e.forEach(c),e.clear(),i=!1,r&&(r=!1,u.process(h))}};return u}const C9=40;function PI(t,e){let n=!1,i=!0;const r={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,a=Lg.reduce((k,A)=>(k[A]=k9(s),k),{}),{setup:c,read:u,resolveKeyframes:h,preUpdate:d,update:m,preRender:g,render:y,postRender:v}=a,S=()=>{const k=Il.useManualTiming,A=k?r.timestamp:performance.now();n=!1,k||(r.delta=i?1e3/60:Math.max(Math.min(A-r.timestamp,C9),1)),r.timestamp=A,r.isProcessing=!0,c.process(r),u.process(r),h.process(r),d.process(r),m.process(r),g.process(r),y.process(r),v.process(r),r.isProcessing=!1,n&&e&&(i=!1,t(S))},x=()=>{n=!0,i=!0,r.isProcessing||t(S)};return{schedule:Lg.reduce((k,A)=>{const R=a[A];return k[A]=(P,N=!1,$=!1)=>(n||x(),R.schedule(P,N,$)),k},{}),cancel:k=>{for(let A=0;A<Lg.length;A++)a[Lg[A]].cancel(k)},state:r,steps:a}}const{schedule:an,cancel:jl,state:Pi,steps:yS}=PI(typeof requestAnimationFrame<"u"?requestAnimationFrame:vs,!0);let NO;function A9(){NO=void 0}const rr={now:()=>(NO===void 0&&rr.set(Pi.isProcessing||Il.useManualTiming?Pi.timestamp:performance.now()),NO),set:t=>{NO=t,queueMicrotask(A9)}},MI=t=>e=>typeof e=="string"&&e.startsWith(t),NI=MI("--"),R9=MI("var(--"),b_=t=>R9(t)?P9.test(t.split("/*")[0].trim()):!1,P9=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function cM(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const yh={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},up={...yh,transform:t=>Vo(0,1,t)},Ig={...yh,default:1},Fd=t=>Math.round(t*1e5)/1e5,y_=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function M9(t){return t==null}const N9=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,v_=(t,e)=>n=>!!(typeof n=="string"&&N9.test(n)&&n.startsWith(t)||e&&!M9(n)&&Object.prototype.hasOwnProperty.call(n,e)),QI=(t,e,n)=>i=>{if(typeof i!="string")return i;const[r,s,a,c]=i.match(y_);return{[t]:parseFloat(r),[e]:parseFloat(s),[n]:parseFloat(a),alpha:c!==void 0?parseFloat(c):1}},Q9=t=>Vo(0,255,t),vS={...yh,transform:t=>Math.round(Q9(t))},Pc={test:v_("rgb","red"),parse:QI("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+vS.transform(t)+", "+vS.transform(e)+", "+vS.transform(n)+", "+Fd(up.transform(i))+")"};function $9(t){let e="",n="",i="",r="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),r=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),r=t.substring(4,5),e+=e,n+=n,i+=i,r+=r),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}}const Fw={test:v_("#"),parse:$9,transform:Pc.transform},Jp=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),ba=Jp("deg"),zo=Jp("%"),Ve=Jp("px"),D9=Jp("vh"),L9=Jp("vw"),uM={...zo,parse:t=>zo.parse(t)/100,transform:t=>zo.transform(t*100)},bf={test:v_("hsl","hue"),parse:QI("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+zo.transform(Fd(e))+", "+zo.transform(Fd(n))+", "+Fd(up.transform(i))+")"},Fn={test:t=>Pc.test(t)||Fw.test(t)||bf.test(t),parse:t=>Pc.test(t)?Pc.parse(t):bf.test(t)?bf.parse(t):Fw.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?Pc.transform(t):bf.transform(t),getAnimatableNone:t=>{const e=Fn.parse(t);return e.alpha=0,Fn.transform(e)}},I9=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function j9(t){var e,n;return isNaN(t)&&typeof t=="string"&&(((e=t.match(y_))==null?void 0:e.length)||0)+(((n=t.match(I9))==null?void 0:n.length)||0)>0}const $I="number",DI="color",B9="var",z9="var(",fM="${}",X9=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Kf(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},r=[];let s=0;const c=e.replace(X9,u=>(Fn.test(u)?(i.color.push(s),r.push(DI),n.push(Fn.parse(u))):u.startsWith(z9)?(i.var.push(s),r.push(B9),n.push(u)):(i.number.push(s),r.push($I),n.push(parseFloat(u))),++s,fM)).split(fM);return{values:n,split:c,indexes:i,types:r}}function U9(t){return Kf(t).values}function LI({split:t,types:e}){const n=t.length;return i=>{let r="";for(let s=0;s<n;s++)if(r+=t[s],i[s]!==void 0){const a=e[s];a===$I?r+=Fd(i[s]):a===DI?r+=Fn.transform(i[s]):r+=i[s]}return r}}function Z9(t){return LI(Kf(t))}const V9=t=>typeof t=="number"?0:Fn.test(t)?Fn.getAnimatableNone(t):t,q9=(t,e)=>typeof t=="number"?e!=null&&e.trim().endsWith("/")?t:0:V9(t);function Y9(t){const e=Kf(t);return LI(e)(e.values.map((i,r)=>q9(i,e.split[r])))}const Ys={test:j9,parse:U9,createTransformer:Z9,getAnimatableNone:Y9};function SS(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function G9({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,e/=100,n/=100;let r=0,s=0,a=0;if(!e)r=s=a=n;else{const c=n<.5?n*(1+e):n+e-n*e,u=2*n-c;r=SS(u,c,t+1/3),s=SS(u,c,t),a=SS(u,c,t-1/3)}return{red:Math.round(r*255),green:Math.round(s*255),blue:Math.round(a*255),alpha:i}}function ab(t,e){return n=>n>0?e:t}const tn=(t,e,n)=>t+(e-t)*n,xS=(t,e,n)=>{const i=t*t,r=n*(e*e-i)+i;return r<0?0:Math.sqrt(r)},F9=[Fw,Pc,bf],H9=t=>F9.find(e=>e.test(t));function hM(t){const e=H9(t);if(!e)return!1;let n=e.parse(t);return e===bf&&(n=G9(n)),n}const dM=(t,e)=>{const n=hM(t),i=hM(e);if(!n||!i)return ab(t,e);const r={...n};return s=>(r.red=xS(n.red,i.red,s),r.green=xS(n.green,i.green,s),r.blue=xS(n.blue,i.blue,s),r.alpha=tn(n.alpha,i.alpha,s),Pc.transform(r))},Hw=new Set(["none","hidden"]);function W9(t,e){return Hw.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function K9(t,e){return n=>tn(t,e,n)}function S_(t){return typeof t=="number"?K9:typeof t=="string"?b_(t)?ab:Fn.test(t)?dM:tG:Array.isArray(t)?II:typeof t=="object"?Fn.test(t)?dM:J9:ab}function II(t,e){const n=[...t],i=n.length,r=t.map((s,a)=>S_(s)(s,e[a]));return s=>{for(let a=0;a<i;a++)n[a]=r[a](s);return n}}function J9(t,e){const n={...t,...e},i={};for(const r in n)t[r]!==void 0&&e[r]!==void 0&&(i[r]=S_(t[r])(t[r],e[r]));return r=>{for(const s in i)n[s]=i[s](r);return n}}function eG(t,e){const n=[],i={color:0,var:0,number:0};for(let r=0;r<e.values.length;r++){const s=e.types[r],a=t.indexes[s][i[s]],c=t.values[a]??0;n[r]=c,i[s]++}return n}const tG=(t,e)=>{const n=Ys.createTransformer(e),i=Kf(t),r=Kf(e);return i.indexes.var.length===r.indexes.var.length&&i.indexes.color.length===r.indexes.color.length&&i.indexes.number.length>=r.indexes.number.length?Hw.has(t)&&!r.values.length||Hw.has(e)&&!i.values.length?W9(t,e):Wp(II(eG(i,r),r.values),n):ab(t,e)};function jI(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?tn(t,e,n):S_(t)(t,e)}const nG=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>an.update(e,n),stop:()=>jl(e),now:()=>Pi.isProcessing?Pi.timestamp:rr.now()}},BI=(t,e,n=10)=>{let i="";const r=Math.max(Math.round(e/n),2);for(let s=0;s<r;s++)i+=Math.round(t(s/(r-1))*1e4)/1e4+", ";return`linear(${i.substring(0,i.length-2)})`},lb=2e4;function x_(t){let e=0;const n=50;let i=t.next(e);for(;!i.done&&e<lb;)e+=n,i=t.next(e);return e>=lb?1/0:e}function zI(t,e=100,n){const i=n({...t,keyframes:[0,e]}),r=Math.min(x_(i),lb);return{type:"keyframes",ease:s=>i.next(r*s).value/e,duration:ms(r)}}const Rn={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Ww(t,e){return t*Math.sqrt(1-e*e)}const iG=12;function rG(t,e,n){let i=n;for(let r=1;r<iG;r++)i=i-t(i)/e(i);return i}const wS=.001;function sG({duration:t=Rn.duration,bounce:e=Rn.bounce,velocity:n=Rn.velocity,mass:i=Rn.mass}){let r,s,a=1-e;a=Vo(Rn.minDamping,Rn.maxDamping,a),t=Vo(Rn.minDuration,Rn.maxDuration,ms(t)),a<1?(r=h=>{const d=h*a,m=d*t,g=d-n,y=Ww(h,a),v=Math.exp(-m);return wS-g/y*v},s=h=>{const m=h*a*t,g=m*n+n,y=Math.pow(a,2)*Math.pow(h,2)*t,v=Math.exp(-m),S=Ww(Math.pow(h,2),a);return(-r(h)+wS>0?-1:1)*((g-y)*v)/S}):(r=h=>{const d=Math.exp(-h*t),m=(h-n)*t+1;return-wS+d*m},s=h=>{const d=Math.exp(-h*t),m=(n-h)*(t*t);return d*m});const c=5/t,u=rG(r,s,c);if(t=_r(t),isNaN(u))return{stiffness:Rn.stiffness,damping:Rn.damping,duration:t};{const h=Math.pow(u,2)*i;return{stiffness:h,damping:a*2*Math.sqrt(i*h),duration:t}}}const oG=["duration","bounce"],aG=["stiffness","damping","mass"];function pM(t,e){return e.some(n=>t[n]!==void 0)}function lG(t){let e={velocity:Rn.velocity,stiffness:Rn.stiffness,damping:Rn.damping,mass:Rn.mass,isResolvedFromDuration:!1,...t};if(!pM(t,aG)&&pM(t,oG))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(n*1.2),r=i*i,s=2*Vo(.05,1,1-(t.bounce||0))*Math.sqrt(r);e={...e,mass:Rn.mass,stiffness:r,damping:s}}else{const n=sG({...t,velocity:0});e={...e,...n,mass:Rn.mass},e.isResolvedFromDuration=!0}return e}function fp(t=Rn.visualDuration,e=Rn.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:r}=n;const s=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],c={done:!1,value:s},{stiffness:u,damping:h,mass:d,duration:m,velocity:g,isResolvedFromDuration:y}=lG({...n,velocity:-ms(n.velocity||0)}),v=g||0,S=h/(2*Math.sqrt(u*d)),x=a-s,w=ms(Math.sqrt(u/d)),C=Math.abs(x)<5;i||(i=C?Rn.restSpeed.granular:Rn.restSpeed.default),r||(r=C?Rn.restDelta.granular:Rn.restDelta.default);let k,A,R,P,N,$;if(S<1)R=Ww(w,S),P=(v+S*w*x)/R,k=U=>{const V=Math.exp(-S*w*U);return a-V*(P*Math.sin(R*U)+x*Math.cos(R*U))},N=S*w*P+x*R,$=S*w*x-P*R,A=U=>Math.exp(-S*w*U)*(N*Math.sin(R*U)+$*Math.cos(R*U));else if(S===1){k=V=>a-Math.exp(-w*V)*(x+(v+w*x)*V);const U=v+w*x;A=V=>Math.exp(-w*V)*(w*U*V-v)}else{const U=w*Math.sqrt(S*S-1);k=le=>{const re=Math.exp(-S*w*le),G=Math.min(U*le,300);return a-re*((v+S*w*x)*Math.sinh(G)+U*x*Math.cosh(G))/U};const V=(v+S*w*x)/U,X=S*w*V-x*U,ee=S*w*x-V*U;A=le=>{const re=Math.exp(-S*w*le),G=Math.min(U*le,300);return re*(X*Math.sinh(G)+ee*Math.cosh(G))}}const D={calculatedDuration:y&&m||null,velocity:U=>_r(A(U)),next:U=>{if(!y&&S<1){const X=Math.exp(-S*w*U),ee=Math.sin(R*U),le=Math.cos(R*U),re=a-X*(P*ee+x*le),G=_r(X*(N*ee+$*le));return c.done=Math.abs(G)<=i&&Math.abs(a-re)<=r,c.value=c.done?a:re,c}const V=k(U);if(y)c.done=U>=m;else{const X=_r(A(U));c.done=Math.abs(X)<=i&&Math.abs(a-V)<=r}return c.value=c.done?a:V,c},toString:()=>{const U=Math.min(x_(D),lb),V=BI(X=>D.next(U*X).value,U,30);return U+"ms "+V},toTransition:()=>{}};return D}fp.applyToOptions=t=>{const e=zI(t,100,fp);return t.ease=e.ease,t.duration=_r(e.duration),t.type="keyframes",t};const cG=5;function XI(t,e,n){const i=Math.max(e-cG,0);return yI(n-t(i),e-i)}function Kw({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:s=500,modifyTarget:a,min:c,max:u,restDelta:h=.5,restSpeed:d}){const m=t[0],g={done:!1,value:m},y=$=>c!==void 0&&$<c||u!==void 0&&$>u,v=$=>c===void 0?u:u===void 0||Math.abs(c-$)<Math.abs(u-$)?c:u;let S=n*e;const x=m+S,w=a===void 0?x:a(x);w!==x&&(S=w-m);const C=$=>-S*Math.exp(-$/i),k=$=>w+C($),A=$=>{const D=C($),U=k($);g.done=Math.abs(D)<=h,g.value=g.done?w:U};let R,P;const N=$=>{y(g.value)&&(R=$,P=fp({keyframes:[g.value,v(g.value)],velocity:XI(k,$,g.value),damping:r,stiffness:s,restDelta:h,restSpeed:d}))};return N(0),{calculatedDuration:null,next:$=>{let D=!1;return!P&&R===void 0&&(D=!0,A($),N($)),R!==void 0&&$>=R?P.next($-R):(!D&&A($),g)}}}function uG(t,e,n){const i=[],r=n||Il.mix||jI,s=t.length-1;for(let a=0;a<s;a++){let c=r(t[a],t[a+1]);if(e){const u=Array.isArray(e)?e[a]||vs:e;c=Wp(u,c)}i.push(c)}return i}function fG(t,e,{clamp:n=!0,ease:i,mixer:r}={}){const s=t.length;if(oy(s===e.length),s===1)return()=>e[0];if(s===2&&e[0]===e[1])return()=>e[1];const a=t[0]===t[1];t[0]>t[s-1]&&(t=[...t].reverse(),e=[...e].reverse());const c=uG(e,i,r),u=c.length,h=d=>{if(a&&d<t[0])return e[0];let m=0;if(u>1)for(;m<t.length-2&&!(d<t[m+1]);m++);const g=Wf(t[m],t[m+1],d);return c[m](g)};return n?d=>h(Vo(t[0],t[s-1],d)):h}function UI(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const r=Wf(0,e,i);t.push(tn(n,1,r))}}function ZI(t){const e=[0];return UI(e,t.length-1),e}function hG(t,e){return t.map(n=>n*e)}function dG(t,e){return t.map(()=>e||kI).splice(0,t.length-1)}function Hd({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const r=CI(i)?i.map(lM):lM(i),s={done:!1,value:e[0]},a=hG(n&&n.length===e.length?n:ZI(e),t),c=fG(a,e,{ease:Array.isArray(r)?r:dG(e,r)});return{calculatedDuration:t,next:u=>(s.value=c(u),s.done=u>=t,s)}}const pG=t=>t!==null;function ay(t,{repeat:e,repeatType:n="loop"},i,r=1){const s=t.filter(pG),c=r<0||e&&n!=="loop"&&e%2===1?0:s.length-1;return!c||i===void 0?s[c]:i}const mG={decay:Kw,inertia:Kw,tween:Hd,keyframes:Hd,spring:fp};function VI(t){typeof t.type=="string"&&(t.type=mG[t.type])}class w_{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const gG=t=>t/100;class cb extends w_{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{var i,r;const{motionValue:n}=this.options;n&&n.updatedAt!==rr.now()&&this.tick(rr.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),(r=(i=this.options).onStop)==null||r.call(i))},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;VI(e);const{type:n=Hd,repeat:i=0,repeatDelay:r=0,repeatType:s,velocity:a=0}=e;let{keyframes:c}=e;const u=n||Hd;u!==Hd&&typeof c[0]!="number"&&(this.mixKeyframes=Wp(gG,jI(c[0],c[1])),c=[0,100]);const h=u({...e,keyframes:c});s==="mirror"&&(this.mirroredGenerator=u({...e,keyframes:[...c].reverse(),velocity:-a})),h.calculatedDuration===null&&(h.calculatedDuration=x_(h));const{calculatedDuration:d}=h;this.calculatedDuration=d,this.resolvedDuration=d+r,this.totalDuration=this.resolvedDuration*(i+1)-r,this.generator=h}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:i,totalDuration:r,mixKeyframes:s,mirroredGenerator:a,resolvedDuration:c,calculatedDuration:u}=this;if(this.startTime===null)return i.next(0);const{delay:h=0,keyframes:d,repeat:m,repeatType:g,repeatDelay:y,type:v,onUpdate:S,finalKeyframe:x}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const w=this.currentTime-h*(this.playbackSpeed>=0?1:-1),C=this.playbackSpeed>=0?w<0:w>r;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=r);let k=this.currentTime,A=i;if(m){const $=Math.min(this.currentTime,r)/c;let D=Math.floor($),U=$%1;!U&&$>=1&&(U=1),U===1&&D--,D=Math.min(D,m+1),!!(D%2)&&(g==="reverse"?(U=1-U,y&&(U-=y/c)):g==="mirror"&&(A=a)),k=Vo(0,1,U)*c}let R;C?(this.delayState.value=d[0],R=this.delayState):R=A.next(k),s&&!C&&(R.value=s(R.value));let{done:P}=R;!C&&u!==null&&(P=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const N=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return N&&v!==Kw&&(R.value=ay(d,this.options,x,this.speed)),S&&S(R.value),N&&this.finish(),R}then(e,n){return this.finished.then(e,n)}get duration(){return ms(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+ms(e)}get time(){return ms(this.currentTime)}set time(e){e=_r(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const n=this.generator.next(e).value;return XI(i=>this.generator.next(i).value,e,n)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;n&&this.driver&&this.updateTime(rr.now()),this.playbackSpeed=e,n&&this.driver&&(this.time=ms(this.currentTime))}play(){var r,s;if(this.isStopped)return;const{driver:e=nG,startTime:n}=this.options;this.driver||(this.driver=e(a=>this.tick(a))),(s=(r=this.options).onPlay)==null||s.call(r);const i=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=i):this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime||(this.startTime=n??i),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(rr.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,n;this.notifyFinished(),this.teardown(),this.state="finished",(n=(e=this.options).onComplete)==null||n.call(e)}cancel(){var e,n;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),(n=(e=this.options).onCancel)==null||n.call(e)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var n;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),(n=this.driver)==null||n.stop(),e.observe(this)}}function OG(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const Mc=t=>t*180/Math.PI,Jw=t=>{const e=Mc(Math.atan2(t[1],t[0]));return e1(e)},bG={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Jw,rotateZ:Jw,skewX:t=>Mc(Math.atan(t[1])),skewY:t=>Mc(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},e1=t=>(t=t%360,t<0&&(t+=360),t),mM=Jw,gM=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),OM=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),yG={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:gM,scaleY:OM,scale:t=>(gM(t)+OM(t))/2,rotateX:t=>e1(Mc(Math.atan2(t[6],t[5]))),rotateY:t=>e1(Mc(Math.atan2(-t[2],t[0]))),rotateZ:mM,rotate:mM,skewX:t=>Mc(Math.atan(t[4])),skewY:t=>Mc(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function t1(t){return t.includes("scale")?1:0}function n1(t,e){if(!t||t==="none")return t1(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,r;if(n)i=yG,r=n;else{const c=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=bG,r=c}if(!r)return t1(e);const s=i[e],a=r[1].split(",").map(SG);return typeof s=="function"?s(a):a[s]}const vG=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return n1(n,e)};function SG(t){return parseFloat(t.trim())}const vh=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Sh=new Set([...vh,"pathRotation"]),bM=t=>t===yh||t===Ve,xG=new Set(["x","y","z"]),wG=vh.filter(t=>!xG.has(t));function EG(t){const e=[];return wG.forEach(n=>{const i=t.getValue(n);i!==void 0&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}const Ml={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:i})=>{const r=t.max-t.min;return i==="border-box"?r:r-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:i})=>{const r=t.max-t.min;return i==="border-box"?r:r-parseFloat(e)-parseFloat(n)},top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>n1(e,"x"),y:(t,{transform:e})=>n1(e,"y")};Ml.translateX=Ml.x;Ml.translateY=Ml.y;const Vc=new Set;let i1=!1,r1=!1,s1=!1;function qI(){if(r1){const t=Array.from(Vc).filter(i=>i.needsMeasurement),e=new Set(t.map(i=>i.element)),n=new Map;e.forEach(i=>{const r=EG(i);r.length&&(n.set(i,r),i.render())}),t.forEach(i=>i.measureInitialState()),e.forEach(i=>{i.render();const r=n.get(i);r&&r.forEach(([s,a])=>{var c;(c=i.getValue(s))==null||c.set(a)})}),t.forEach(i=>i.measureEndState()),t.forEach(i=>{i.suspendedScrollY!==void 0&&window.scrollTo(0,i.suspendedScrollY)})}r1=!1,i1=!1,Vc.forEach(t=>t.complete(s1)),Vc.clear()}function YI(){Vc.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(r1=!0)})}function _G(){s1=!0,YI(),qI(),s1=!1}class E_{constructor(e,n,i,r,s,a=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=i,this.motionValue=r,this.element=s,this.isAsync=a}scheduleResolve(){this.state="scheduled",this.isAsync?(Vc.add(this),i1||(i1=!0,an.read(YI),an.resolveKeyframes(qI))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:i,motionValue:r}=this;if(e[0]===null){const s=r==null?void 0:r.get(),a=e[e.length-1];if(s!==void 0)e[0]=s;else if(i&&n){const c=i.readValue(n,a);c!=null&&(e[0]=c)}e[0]===void 0&&(e[0]=a),r&&s===void 0&&r.set(e[0])}OG(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),Vc.delete(this)}cancel(){this.state==="scheduled"&&(Vc.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const TG=t=>t.startsWith("--");function GI(t,e,n){TG(e)?t.style.setProperty(e,n):t.style[e]=n}const kG={};function FI(t,e){const n=bI(t);return()=>kG[e]??n()}const CG=FI(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),HI=FI(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Ud=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,yM={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ud([0,.65,.55,1]),circOut:Ud([.55,0,1,.45]),backIn:Ud([.31,.01,.66,-.59]),backOut:Ud([.33,1.53,.69,.99])};function WI(t,e){if(t)return typeof t=="function"?HI()?BI(t,e):"ease-out":RI(t)?Ud(t):Array.isArray(t)?t.map(n=>WI(n,e)||yM.easeOut):yM[t]}function AG(t,e,n,{delay:i=0,duration:r=300,repeat:s=0,repeatType:a="loop",ease:c="easeOut",times:u}={},h=void 0){const d={[e]:n};u&&(d.offset=u);const m=WI(c,r);Array.isArray(m)&&(d.easing=m);const g={delay:i,duration:r,easing:Array.isArray(m)?"linear":m,fill:"both",iterations:s+1,direction:a==="reverse"?"alternate":"normal"};return h&&(g.pseudoElement=h),t.animate(d,g)}function __(t){return typeof t=="function"&&"applyToOptions"in t}function RG({type:t,...e}){return __(t)&&HI()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class KI extends w_{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:i,keyframes:r,pseudoElement:s,allowFlatten:a=!1,finalKeyframe:c,onComplete:u}=e;this.isPseudoElement=!!s,this.allowFlatten=a,this.options=e,oy(typeof e.type!="string");const h=RG(e);this.animation=AG(n,i,r,h,s),h.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!s){const d=ay(r,this.options,c,this.speed);this.updateMotionValue&&this.updateMotionValue(d),GI(n,i,d),this.animation.cancel()}u==null||u(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,n;(n=(e=this.animation).finish)==null||n.call(e)}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var n,i,r;const e=(n=this.options)==null?void 0:n.element;!this.isPseudoElement&&(e!=null&&e.isConnected)&&((r=(i=this.animation).commitStyles)==null||r.call(i))}get duration(){var n,i;const e=((i=(n=this.animation.effect)==null?void 0:n.getComputedTiming)==null?void 0:i.call(n).duration)||0;return ms(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+ms(e)}get time(){return ms(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=_r(e),n&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:n,rangeEnd:i,observe:r}){var s;return this.allowFlatten&&((s=this.animation.effect)==null||s.updateTiming({easing:"linear"})),this.animation.onfinish=null,e&&CG()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),i&&(this.animation.rangeEnd=i),vs):r(this)}}const JI={anticipate:EI,backInOut:wI,circInOut:TI};function PG(t){return t in JI}function MG(t){typeof t.ease=="string"&&PG(t.ease)&&(t.ease=JI[t.ease])}const ES=10;class NG extends KI{constructor(e){MG(e),VI(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:i,onComplete:r,element:s,...a}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const c=new cb({...a,autoplay:!1}),u=Math.max(ES,rr.now()-this.startTime),h=Vo(0,ES,u-ES),d=c.sample(u).value,{name:m}=this.options;s&&m&&GI(s,m,d),n.setWithVelocity(c.sample(Math.max(0,u-h)).value,d,h),c.stop()}}const vM=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(Ys.test(t)||t==="0")&&!t.startsWith("url("));function QG(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function $G(t,e,n,i){const r=t[0];if(r===null)return!1;if(e==="display"||e==="visibility")return!0;const s=t[t.length-1],a=vM(r,e),c=vM(s,e);return!a||!c?!1:QG(t)||(n==="spring"||__(n))&&i}function o1(t){t.duration=0,t.type="keyframes"}const ej=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),DG=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function LG(t){for(let e=0;e<t.length;e++)if(typeof t[e]=="string"&&DG.test(t[e]))return!0;return!1}const IG=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),jG=bI(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function BG(t){var m;const{motionValue:e,name:n,repeatDelay:i,repeatType:r,damping:s,type:a,keyframes:c}=t,u=(m=e==null?void 0:e.owner)==null?void 0:m.current;if(!(u instanceof HTMLElement)&&!(u instanceof SVGElement))return!1;const{onUpdate:h,transformTemplate:d}=e.owner.getProps();return jG()&&n&&(ej.has(n)||IG.has(n)&&LG(c))&&(n!=="transform"||!d)&&!h&&!i&&r!=="mirror"&&s!==0&&a!=="inertia"}const zG=40;class XG extends w_{constructor({autoplay:e=!0,delay:n=0,type:i="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:a="loop",keyframes:c,name:u,motionValue:h,element:d,...m}){var v;super(),this.stop=()=>{var S,x;this._animation&&(this._animation.stop(),(S=this.stopTimeline)==null||S.call(this)),(x=this.keyframeResolver)==null||x.cancel()},this.createdAt=rr.now();const g={autoplay:e,delay:n,type:i,repeat:r,repeatDelay:s,repeatType:a,name:u,motionValue:h,element:d,...m},y=(d==null?void 0:d.KeyframeResolver)||E_;this.keyframeResolver=new y(c,(S,x,w)=>this.onKeyframesResolved(S,x,g,!w),u,h,d),(v=this.keyframeResolver)==null||v.scheduleResolve()}onKeyframesResolved(e,n,i,r){var w,C;this.keyframeResolver=void 0;const{name:s,type:a,velocity:c,delay:u,isHandoff:h,onUpdate:d}=i;this.resolvedAt=rr.now();let m=!0;$G(e,s,a,c)||(m=!1,(Il.instantAnimations||!u)&&(d==null||d(ay(e,i,n))),e[0]=e[e.length-1],o1(i),i.repeat=0);const y={startTime:r?this.resolvedAt?this.resolvedAt-this.createdAt>zG?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...i,keyframes:e},v=m&&!h&&BG(y),S=(C=(w=y.motionValue)==null?void 0:w.owner)==null?void 0:C.current;let x;if(v)try{x=new NG({...y,element:S})}catch{x=new cb(y)}else x=new cb(y);x.finished.then(()=>{this.notifyFinished()}).catch(vs),this.pendingTimeline&&(this.stopTimeline=x.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=x}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){var e;return this._animation||((e=this.keyframeResolver)==null||e.resume(),_G()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),(e=this.keyframeResolver)==null||e.cancel()}}class UG{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,n){for(let i=0;i<this.animations.length;i++)this.animations[i][e]=n}attachTimeline(e){const n=this.animations.map(i=>i.attachTimeline(e));return()=>{n.forEach((i,r)=>{i&&i(),this.animations[r].stop()})}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get state(){return this.getAll("state")}get startTime(){return this.getAll("startTime")}get duration(){return SM(this.animations,"duration")}get iterationDuration(){return SM(this.animations,"iterationDuration")}runAll(e){this.animations.forEach(n=>n[e]())}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}function SM(t,e){let n=0;for(let i=0;i<t.length;i++){const r=t[i][e];r!==null&&r>n&&(n=r)}return n}class ZG extends UG{then(e,n){return this.finished.finally(e).then(()=>{})}}function tj(t,e,n,i=0,r=1){const s=Array.from(t).sort((h,d)=>h.sortNodePosition(d)).indexOf(e),a=t.size,c=(a-1)*i;return typeof n=="function"?n(s,a):r===1?s*i:c-s*i}const xM=30,VG=t=>!isNaN(parseFloat(t));class qG{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=i=>{var s;const r=rr.now();if(this.updatedAt!==r&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(i),this.current!==this.prev&&((s=this.events.change)==null||s.notify(this.current),this.dependents))for(const a of this.dependents)a.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=rr.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=VG(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new p_);const i=this.events[e].add(n);return e==="change"?()=>{i(),an.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,n,i){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-i}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;(e=this.events.change)==null||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=rr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>xM)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,xM);return yI(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var e,n;(e=this.dependents)==null||e.clear(),(n=this.events.destroy)==null||n.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Wc(t,e){return new qG(t,e)}function T_(t,e){if(t!=null&&t.inherit&&e){const{inherit:n,...i}=t;return{...e,...i}}return t}function k_(t,e){const n=(t==null?void 0:t[e])??(t==null?void 0:t.default)??t;return n!==t?T_(n,t):n}const YG={type:"spring",stiffness:500,damping:25,restSpeed:10},GG=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),FG={type:"keyframes",duration:.8},HG={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},WG=(t,{keyframes:e})=>e.length>2?FG:Sh.has(t)?t.startsWith("scale")?GG(e[1]):YG:HG,KG=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function JG(t){for(const e in t)if(!KG.has(e))return!0;return!1}const C_=(t,e,n,i={},r,s)=>a=>{const c=k_(i,t)||{},u=c.delay||i.delay||0;let{elapsed:h=0}=i;h=h-_r(u);const d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...c,delay:-h,onUpdate:g=>{e.set(g),c.onUpdate&&c.onUpdate(g)},onComplete:()=>{a(),c.onComplete&&c.onComplete()},name:t,motionValue:e,element:s?void 0:r};JG(c)||Object.assign(d,WG(t,d)),d.duration&&(d.duration=_r(d.duration)),d.repeatDelay&&(d.repeatDelay=_r(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let m=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(o1(d),d.delay===0&&(m=!0)),(Il.instantAnimations||Il.skipAnimations||r!=null&&r.shouldSkipAnimations||c.skipAnimations)&&(m=!0,o1(d),d.delay=0),d.allowFlatten=!c.type&&!c.ease,m&&!s&&e.get()!==void 0){const g=ay(d.keyframes,c);if(g!==void 0){an.update(()=>{d.onUpdate(g),d.onComplete()});return}}return c.isSync?new cb(d):new XG(d)},eF=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function tF(t){const e=eF.exec(t);if(!e)return[,];const[,n,i,r]=e;return[`--${n??i}`,r]}function nj(t,e,n=1){const[i,r]=tF(t);if(!i)return;const s=window.getComputedStyle(e).getPropertyValue(i);if(s){const a=s.trim();return mI(a)?parseFloat(a):a}return b_(r)?nj(r,e,n+1):r}function wM(t){const e=[{},{}];return t==null||t.values.forEach((n,i)=>{e[0][i]=n.get(),e[1][i]=n.getVelocity()}),e}function A_(t,e,n,i){if(typeof e=="function"){const[r,s]=wM(i);e=e(n!==void 0?n:t.custom,r,s)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[r,s]=wM(i);e=e(n!==void 0?n:t.custom,r,s)}return e}function qc(t,e,n){const i=t.getProps();return A_(i,e,n!==void 0?n:i.custom,t)}const ij=new Set(["width","height","top","left","right","bottom",...vh]),a1=t=>Array.isArray(t);function nF(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Wc(n))}function iF(t){return a1(t)?t[t.length-1]||0:t}function rF(t,e){const n=qc(t,e);let{transitionEnd:i={},transition:r={},...s}=n||{};s={...s,...i};for(const a in s){const c=iF(s[a]);nF(t,a,c)}}const li=t=>!!(t&&t.getVelocity);function sF(t){return!!(li(t)&&t.add)}function l1(t,e){const n=t.getValue("willChange");if(sF(n))return n.add(e);if(!n&&Il.WillChange){const i=new Il.WillChange("auto");t.addValue("willChange",i),i.add(e)}}function R_(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const oF="framerAppearId",rj="data-"+R_(oF);function sj(t){return t.props[rj]}function aF({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,i}function P_(t,e,{delay:n=0,transitionOverride:i,type:r}={}){let{transition:s,transitionEnd:a,...c}=e;const u=t.getDefaultTransition();s=s?T_(s,u):u;const h=s==null?void 0:s.reduceMotion,d=s==null?void 0:s.skipAnimations;i&&(s=i);const m=[],g=r&&t.animationState&&t.animationState.getState()[r],y=s==null?void 0:s.path;y&&y.animateVisualElement(t,c,s,n,m);for(const v in c){const S=t.getValue(v,t.latestValues[v]??null),x=c[v];if(x===void 0||g&&aF(g,v))continue;const w={delay:n,...k_(s||{},v)};d&&(w.skipAnimations=!0);const C=S.get();if(C!==void 0&&!S.isAnimating()&&!Array.isArray(x)&&x===C&&!w.velocity){an.update(()=>S.set(x));continue}let k=!1;if(window.MotionHandoffAnimation){const P=sj(t);if(P){const N=window.MotionHandoffAnimation(P,v,an);N!==null&&(w.startTime=N,k=!0)}}l1(t,v);const A=h??t.shouldReduceMotion;S.start(C_(v,S,x,A&&ij.has(v)?{type:!1}:w,t,k));const R=S.animation;R&&m.push(R)}if(a){const v=()=>an.update(()=>{a&&rF(t,a)});m.length?Promise.all(m).then(v):v()}return m}function c1(t,e,n={}){var u;const i=qc(t,e,n.type==="exit"?(u=t.presenceContext)==null?void 0:u.custom:void 0);let{transition:r=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(r=n.transitionOverride);const s=i?()=>Promise.all(P_(t,i,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(h=0)=>{const{delayChildren:d=0,staggerChildren:m,staggerDirection:g}=r;return lF(t,e,h,d,m,g,n)}:()=>Promise.resolve(),{when:c}=r;if(c){const[h,d]=c==="beforeChildren"?[s,a]:[a,s];return h().then(()=>d())}else return Promise.all([s(),a(n.delay)])}function lF(t,e,n=0,i=0,r=0,s=1,a){const c=[];for(const u of t.variantChildren)u.notify("AnimationStart",e),c.push(c1(u,e,{...a,delay:n+(typeof i=="function"?0:i)+tj(t.variantChildren,u,i,r,s)}).then(()=>u.notify("AnimationComplete",e)));return Promise.all(c)}function cF(t,e,n={}){t.notify("AnimationStart",e);let i;if(Array.isArray(e)){const r=e.map(s=>c1(t,s,n));i=Promise.all(r)}else if(typeof e=="string")i=c1(t,e,n);else{const r=typeof e=="function"?qc(t,e,n.custom):e;i=Promise.all(P_(t,r,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}const uF={test:t=>t==="auto",parse:t=>t},oj=t=>e=>e.test(t),aj=[yh,Ve,zo,ba,L9,D9,uF],EM=t=>aj.find(oj(t));function fF(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||OI(t):!0}const hF=new Set(["brightness","contrast","saturate","opacity"]);function dF(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[i]=n.match(y_)||[];if(!i)return t;const r=n.replace(i,"");let s=hF.has(e)?1:0;return i!==n&&(s*=100),e+"("+s+r+")"}const pF=/\b([a-z-]*)\(.*?\)/gu,u1={...Ys,getAnimatableNone:t=>{const e=t.match(pF);return e?e.map(dF).join(" "):t}},f1={...Ys,getAnimatableNone:t=>{const e=Ys.parse(t);return Ys.createTransformer(t)(e.map(i=>typeof i=="number"?0:typeof i=="object"?{...i,alpha:1}:i))}},_M={...yh,transform:Math.round},mF={rotate:ba,pathRotation:ba,rotateX:ba,rotateY:ba,rotateZ:ba,scale:Ig,scaleX:Ig,scaleY:Ig,scaleZ:Ig,skew:ba,skewX:ba,skewY:ba,distance:Ve,translateX:Ve,translateY:Ve,translateZ:Ve,x:Ve,y:Ve,z:Ve,perspective:Ve,transformPerspective:Ve,opacity:up,originX:uM,originY:uM,originZ:Ve},ub={borderWidth:Ve,borderTopWidth:Ve,borderRightWidth:Ve,borderBottomWidth:Ve,borderLeftWidth:Ve,borderRadius:Ve,borderTopLeftRadius:Ve,borderTopRightRadius:Ve,borderBottomRightRadius:Ve,borderBottomLeftRadius:Ve,width:Ve,maxWidth:Ve,height:Ve,maxHeight:Ve,top:Ve,right:Ve,bottom:Ve,left:Ve,inset:Ve,insetBlock:Ve,insetBlockStart:Ve,insetBlockEnd:Ve,insetInline:Ve,insetInlineStart:Ve,insetInlineEnd:Ve,padding:Ve,paddingTop:Ve,paddingRight:Ve,paddingBottom:Ve,paddingLeft:Ve,paddingBlock:Ve,paddingBlockStart:Ve,paddingBlockEnd:Ve,paddingInline:Ve,paddingInlineStart:Ve,paddingInlineEnd:Ve,margin:Ve,marginTop:Ve,marginRight:Ve,marginBottom:Ve,marginLeft:Ve,marginBlock:Ve,marginBlockStart:Ve,marginBlockEnd:Ve,marginInline:Ve,marginInlineStart:Ve,marginInlineEnd:Ve,fontSize:Ve,backgroundPositionX:Ve,backgroundPositionY:Ve,...mF,zIndex:_M,fillOpacity:up,strokeOpacity:up,numOctaves:_M},gF={...ub,color:Fn,backgroundColor:Fn,outlineColor:Fn,fill:Fn,stroke:Fn,borderColor:Fn,borderTopColor:Fn,borderRightColor:Fn,borderBottomColor:Fn,borderLeftColor:Fn,filter:u1,WebkitFilter:u1,mask:f1,WebkitMask:f1},lj=t=>gF[t],OF=new Set([u1,f1]);function cj(t,e){let n=lj(t);return OF.has(n)||(n=Ys),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const bF=new Set(["auto","none","0"]);function yF(t,e,n){let i=0,r;for(;i<t.length&&!r;){const s=t[i];typeof s=="string"&&!bF.has(s)&&Kf(s).values.length&&(r=t[i]),i++}if(r&&n)for(const s of e)t[s]=cj(n,r)}class vF extends E_{constructor(e,n,i,r,s){super(e,n,i,r,s,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:i}=this;if(!n||!n.current)return;super.readKeyframes();for(let d=0;d<e.length;d++){let m=e[d];if(typeof m=="string"&&(m=m.trim(),b_(m))){const g=nj(m,n.current);g!==void 0&&(e[d]=g),d===e.length-1&&(this.finalKeyframe=m)}}if(this.resolveNoneKeyframes(),!ij.has(i)||e.length!==2)return;const[r,s]=e,a=EM(r),c=EM(s),u=cM(r),h=cM(s);if(u!==h&&Ml[i]){this.needsMeasurement=!0;return}if(a!==c)if(bM(a)&&bM(c))for(let d=0;d<e.length;d++){const m=e[d];typeof m=="string"&&(e[d]=parseFloat(m))}else Ml[i]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,i=[];for(let r=0;r<e.length;r++)(e[r]===null||fF(e[r]))&&i.push(r);i.length&&yF(e,i,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:i}=this;if(!e||!e.current)return;i==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Ml[i](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const r=n[n.length-1];r!==void 0&&e.getValue(i,r).jump(r,!1)}measureEndState(){var c;const{element:e,name:n,unresolvedKeyframes:i}=this;if(!e||!e.current)return;const r=e.getValue(n);r&&r.jump(this.measuredOrigin,!1);const s=i.length-1,a=i[s];i[s]=Ml[n](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),(c=this.removedTransforms)!=null&&c.length&&this.removedTransforms.forEach(([u,h])=>{e.getValue(u).set(h)}),this.resolveNoneKeyframes()}}const M_=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function N_(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let i=document;e&&(i=e.current);const r=(n==null?void 0:n[t])??i.querySelectorAll(t);return r?Array.from(r):[]}return Array.from(t).filter(i=>i!=null)}const h1=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function QO(t){return gI(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:Q_}=PI(queueMicrotask,!1),zs={x:!1,y:!1};function uj(){return zs.x||zs.y}function SF(t){return t==="x"||t==="y"?zs[t]?null:(zs[t]=!0,()=>{zs[t]=!1}):zs.x||zs.y?null:(zs.x=zs.y=!0,()=>{zs.x=zs.y=!1})}function fj(t,e){const n=N_(t),i=new AbortController,r={passive:!0,...e,signal:i.signal};return[n,r,()=>i.abort()]}function xF(t){return!(t.pointerType==="touch"||uj())}function wF(t,e,n={}){const[i,r,s]=fj(t,n);return i.forEach(a=>{let c=!1,u=!1,h;const d=()=>{a.removeEventListener("pointerleave",v)},m=x=>{h&&(h(x),h=void 0),d()},g=x=>{c=!1,window.removeEventListener("pointerup",g),window.removeEventListener("pointercancel",g),u&&(u=!1,m(x))},y=()=>{c=!0,window.addEventListener("pointerup",g,r),window.addEventListener("pointercancel",g,r)},v=x=>{if(x.pointerType!=="touch"){if(c){u=!0;return}m(x)}},S=x=>{if(!xF(x))return;u=!1;const w=e(a,x);typeof w=="function"&&(h=w,a.addEventListener("pointerleave",v,r))};a.addEventListener("pointerenter",S,r),a.addEventListener("pointerdown",y,r)}),s}const hj=(t,e)=>e?t===e?!0:hj(t,e.parentElement):!1,$_=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,EF=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function _F(t){return EF.has(t.tagName)||t.isContentEditable===!0}const TF=new Set(["INPUT","SELECT","TEXTAREA"]);function kF(t){return TF.has(t.tagName)||t.isContentEditable===!0}const $O=new WeakSet;function TM(t){return e=>{e.key==="Enter"&&t(e)}}function _S(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const CF=(t,e)=>{const n=t.currentTarget;if(!n)return;const i=TM(()=>{if($O.has(n))return;_S(n,"down");const r=TM(()=>{_S(n,"up")}),s=()=>_S(n,"cancel");n.addEventListener("keyup",r,e),n.addEventListener("blur",s,e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)};function kM(t){return $_(t)&&!uj()}const CM=new WeakSet;function AF(t,e,n={}){const[i,r,s]=fj(t,n),a=c=>{const u=c.currentTarget;if(!kM(c)||CM.has(c))return;$O.add(u),n.stopPropagation&&CM.add(c);const h=e(u,c),d={...r,capture:!0},m=(v,S)=>{window.removeEventListener("pointerup",g,d),window.removeEventListener("pointercancel",y,d),$O.has(u)&&$O.delete(u),kM(v)&&typeof h=="function"&&h(v,{success:S})},g=v=>{m(v,u===window||u===document||n.useGlobalTarget||hj(u,v.target))},y=v=>{m(v,!1)};window.addEventListener("pointerup",g,d),window.addEventListener("pointercancel",y,d)};return i.forEach(c=>{(n.useGlobalTarget?window:c).addEventListener("pointerdown",a,r),QO(c)&&(c.addEventListener("focus",h=>CF(h,r)),!_F(c)&&!c.hasAttribute("tabindex")&&(c.tabIndex=0))}),s}function ly(t){return gI(t)&&"ownerSVGElement"in t}const DO=new WeakMap;let yl;const dj=(t,e,n)=>(i,r)=>r&&r[0]?r[0][t+"Size"]:ly(i)&&"getBBox"in i?i.getBBox()[e]:i[n],RF=dj("inline","width","offsetWidth"),PF=dj("block","height","offsetHeight");function MF({target:t,borderBoxSize:e}){var n;(n=DO.get(t))==null||n.forEach(i=>{i(t,{get width(){return RF(t,e)},get height(){return PF(t,e)}})})}function NF(t){t.forEach(MF)}function QF(){typeof ResizeObserver>"u"||(yl=new ResizeObserver(NF))}function $F(t,e){yl||QF();const n=N_(t);return n.forEach(i=>{let r=DO.get(i);r||(r=new Set,DO.set(i,r)),r.add(e),yl==null||yl.observe(i)}),()=>{n.forEach(i=>{const r=DO.get(i);r==null||r.delete(e),r!=null&&r.size||yl==null||yl.unobserve(i)})}}const LO=new Set;let yf;function DF(){yf=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};LO.forEach(e=>e(t))},window.addEventListener("resize",yf)}function LF(t){return LO.add(t),yf||DF(),()=>{LO.delete(t),!LO.size&&typeof yf=="function"&&(window.removeEventListener("resize",yf),yf=void 0)}}function AM(t,e){return typeof t=="function"?LF(t):$F(t,e)}function pj(t){return ly(t)&&t.tagName==="svg"}const IF=[...aj,Fn,Ys],jF=t=>IF.find(oj(t)),RM=()=>({translate:0,scale:1,origin:0,originPoint:0}),vf=()=>({x:RM(),y:RM()}),PM=()=>({min:0,max:0}),Gn=()=>({x:PM(),y:PM()}),hp=new WeakMap;function cy(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function dp(t){return typeof t=="string"||Array.isArray(t)}const D_=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],L_=["initial",...D_];function uy(t){return cy(t.animate)||L_.some(e=>dp(t[e]))}function mj(t){return!!(uy(t)||t.variants)}function BF(t,e,n){for(const i in e){const r=e[i],s=n[i];if(li(r))t.addValue(i,r);else if(li(s))t.addValue(i,Wc(r,{owner:t}));else if(s!==r)if(t.hasValue(i)){const a=t.getValue(i);a.liveStyle===!0?a.jump(r):a.hasAnimated||a.set(r)}else{const a=t.getStaticValue(i);t.addValue(i,Wc(a!==void 0?a:r,{owner:t}))}}for(const i in n)e[i]===void 0&&t.removeValue(i);return e}const fb={current:null},I_={current:!1},zF=typeof window<"u";function gj(){if(I_.current=!0,!!zF)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>fb.current=t.matches;t.addEventListener("change",e),e()}else fb.current=!1}const MM=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let hb={};function Oj(t){hb=t}function XF(){return hb}class bj{scrapeMotionValuesFromProps(e,n,i){return{}}constructor({parent:e,props:n,presenceContext:i,reducedMotionConfig:r,skipAnimations:s,blockInitialAnimation:a,visualState:c},u={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=E_,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const y=rr.now();this.renderScheduledAt<y&&(this.renderScheduledAt=y,an.render(this.render,!1,!0))};const{latestValues:h,renderState:d}=c;this.latestValues=h,this.baseTarget={...h},this.initialValues=n.initial?{...h}:{},this.renderState=d,this.parent=e,this.props=n,this.presenceContext=i,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=s,this.options=u,this.blockInitialAnimation=!!a,this.isControllingVariants=uy(n),this.isVariantNode=mj(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:m,...g}=this.scrapeMotionValuesFromProps(n,{},this);for(const y in g){const v=g[y];h[y]!==void 0&&li(v)&&v.set(h[y])}}mount(e){var n,i;if(this.hasBeenMounted)for(const r in this.initialValues)(n=this.values.get(r))==null||n.jump(this.initialValues[r]),this.latestValues[r]=this.initialValues[r];this.current=e,hp.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,s)=>this.bindToMotionValue(s,r)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(I_.current||gj(),this.shouldReduceMotion=fb.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,(i=this.parent)==null||i.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var e;this.projection&&this.projection.unmount(),jl(this.notifyUpdate),jl(this.render),this.valueSubscriptions.forEach(n=>n()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),(e=this.parent)==null||e.removeChild(this);for(const n in this.events)this.events[n].clear();for(const n in this.features){const i=this.features[n];i&&(i.unmount(),i.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&ej.has(e)&&this.current instanceof HTMLElement){const{factory:a,keyframes:c,times:u,ease:h,duration:d}=n.accelerate,m=new KI({element:this.current,name:e,keyframes:c,times:u,ease:h,duration:_r(d)}),g=a(m);this.valueSubscriptions.set(e,()=>{g(),m.cancel()});return}const i=Sh.has(e);i&&this.onBindTransform&&this.onBindTransform();const r=n.on("change",a=>{this.latestValues[e]=a,this.props.onUpdate&&an.preRender(this.notifyUpdate),i&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let s;typeof window<"u"&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{r(),s&&s()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in hb){const n=hb[e];if(!n)continue;const{isEnabled:i,Feature:r}=n;if(!this.features[e]&&r&&i(this.props)&&(this.features[e]=new r(this)),this.features[e]){const s=this.features[e];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Gn()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let i=0;i<MM.length;i++){const r=MM[i];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const s="on"+r,a=e[s];a&&(this.propEventSubscriptions[r]=this.on(r,a))}this.prevMotionValues=BF(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const i=this.values.get(e);n!==i&&(i&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let i=this.values.get(e);return i===void 0&&n!==void 0&&(i=Wc(n===null?void 0:n,{owner:this}),this.addValue(e,i)),i}readValue(e,n){let i=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return i!=null&&(typeof i=="string"&&(mI(i)||OI(i))?i=parseFloat(i):!jF(i)&&Ys.test(n)&&(i=cj(e,n)),this.setBaseTarget(e,li(i)?i.get():i)),li(i)?i.get():i}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){var s;const{initial:n}=this.props;let i;if(typeof n=="string"||typeof n=="object"){const a=A_(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);a&&(i=a[e])}if(n&&i!==void 0)return i;const r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!li(r)?r:this.initialValues[e]!==void 0&&i===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new p_),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){Q_.render(this.render)}}class yj extends bj{constructor(){super(...arguments),this.KeyframeResolver=vF}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const i=e.style;return i?i[n]:void 0}removeValueFromRenderState(e,{vars:n,style:i}){delete n[e],delete i[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;li(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class Fl{constructor(e){this.isMounted=!1,this.node=e}update(){}}function vj({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function UF({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function ZF(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}function TS(t){return t===void 0||t===1}function d1({scale:t,scaleX:e,scaleY:n}){return!TS(t)||!TS(e)||!TS(n)}function Ec(t){return d1(t)||Sj(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Sj(t){return NM(t.x)||NM(t.y)}function NM(t){return t&&t!=="0%"}function db(t,e,n){const i=t-n,r=e*i;return n+r}function QM(t,e,n,i,r){return r!==void 0&&(t=db(t,r,i)),db(t,n,i)+e}function p1(t,e=0,n=1,i,r){t.min=QM(t.min,e,n,i,r),t.max=QM(t.max,e,n,i,r)}function xj(t,{x:e,y:n}){p1(t.x,e.translate,e.scale,e.originPoint),p1(t.y,n.translate,n.scale,n.originPoint)}const $M=.999999999999,DM=1.0000000000001;function VF(t,e,n,i=!1){var c;const r=n.length;if(!r)return;e.x=e.y=1;let s,a;for(let u=0;u<r;u++){s=n[u],a=s.projectionDelta;const{visualElement:h}=s.options;h&&h.props.style&&h.props.style.display==="contents"||(i&&s.options.layoutScroll&&s.scroll&&s!==s.root&&(Ao(t.x,-s.scroll.offset.x),Ao(t.y,-s.scroll.offset.y)),a&&(e.x*=a.x.scale,e.y*=a.y.scale,xj(t,a)),i&&Ec(s.latestValues)&&IO(t,s.latestValues,(c=s.layout)==null?void 0:c.layoutBox))}e.x<DM&&e.x>$M&&(e.x=1),e.y<DM&&e.y>$M&&(e.y=1)}function Ao(t,e){t.min+=e,t.max+=e}function LM(t,e,n,i,r=.5){const s=tn(t.min,t.max,r);p1(t,e,n,s,i)}function IM(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function IO(t,e,n){const i=n??t;LM(t.x,IM(e.x,i.x),e.scaleX,e.scale,e.originX),LM(t.y,IM(e.y,i.y),e.scaleY,e.scale,e.originY)}function wj(t,e){return vj(ZF(t.getBoundingClientRect(),e))}function qF(t,e,n){const i=wj(t,n),{scroll:r}=e;return r&&(Ao(i.x,r.offset.x),Ao(i.y,r.offset.y)),i}const YF={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},GF=vh.length;function FF(t,e,n){let i="",r=!0;for(let a=0;a<GF;a++){const c=vh[a],u=t[c];if(u===void 0)continue;let h=!0;if(typeof u=="number")h=u===(c.startsWith("scale")?1:0);else{const d=parseFloat(u);h=c.startsWith("scale")?d===1:d===0}if(!h||n){const d=h1(u,ub[c]);if(!h){r=!1;const m=YF[c]||c;i+=`${m}(${d}) `}n&&(e[c]=d)}}const s=t.pathRotation;return s&&(r=!1,i+=`rotate(${h1(s,ub.pathRotation)}) `),i=i.trim(),n?i=n(e,r?"":i):r&&(i="none"),i}function j_(t,e,n){const{style:i,vars:r,transformOrigin:s}=t;let a=!1,c=!1;for(const u in e){const h=e[u];if(Sh.has(u)){a=!0;continue}else if(NI(u)){r[u]=h;continue}else{const d=h1(h,ub[u]);u.startsWith("origin")?(c=!0,s[u]=d):i[u]=d}}if(e.transform||(a||n?i.transform=FF(e,t.transform,n):i.transform&&(i.transform="none")),c){const{originX:u="50%",originY:h="50%",originZ:d=0}=s;i.transformOrigin=`${u} ${h} ${d}`}}function Ej(t,{style:e,vars:n},i,r){const s=t.style;let a;for(a in e)s[a]=e[a];r==null||r.applyProjectionStyles(s,i);for(a in n)s.setProperty(a,n[a])}function jM(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Ed={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(Ve.test(t))t=parseFloat(t);else return t;const n=jM(t,e.target.x),i=jM(t,e.target.y);return`${n}% ${i}%`}},HF={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,r=Ys.parse(t);if(r.length>5)return i;const s=Ys.createTransformer(t),a=typeof r[0]!="number"?1:0,c=n.x.scale*e.x,u=n.y.scale*e.y;r[0+a]/=c,r[1+a]/=u;const h=tn(c,u,.5);return typeof r[2+a]=="number"&&(r[2+a]/=h),typeof r[3+a]=="number"&&(r[3+a]/=h),s(r)}},m1={borderRadius:{...Ed,applyTo:[...M_]},borderTopLeftRadius:Ed,borderTopRightRadius:Ed,borderBottomLeftRadius:Ed,borderBottomRightRadius:Ed,boxShadow:HF};function _j(t,{layout:e,layoutId:n}){return Sh.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!m1[t]||t==="opacity")}function B_(t,e,n){var a;const i=t.style,r=e==null?void 0:e.style,s={};if(!i)return s;for(const c in i)(li(i[c])||r&&li(r[c])||_j(c,t)||((a=n==null?void 0:n.getValue(c))==null?void 0:a.liveStyle)!==void 0)&&(s[c]=i[c]);return s}function WF(t){return window.getComputedStyle(t)}class Tj extends yj{constructor(){super(...arguments),this.type="html",this.renderInstance=Ej}mount(e){oy(!!e.style),super.mount(e)}readValueFromInstance(e,n){var i;if(Sh.has(n))return(i=this.projection)!=null&&i.isProjecting?t1(n):vG(e,n);{const r=WF(e),s=(NI(n)?r.getPropertyValue(n):r[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:n}){return wj(e,n)}build(e,n,i){j_(e,n,i.transformTemplate)}scrapeMotionValuesFromProps(e,n,i){return B_(e,n,i)}}function KF(t,e){return t in e}class JF extends bj{constructor(){super(...arguments),this.type="object"}readValueFromInstance(e,n){if(KF(n,e)){const i=e[n];if(typeof i=="string"||typeof i=="number")return i}}getBaseTargetFromProps(){}removeValueFromRenderState(e,n){delete n.output[e]}measureInstanceViewportBox(){return Gn()}build(e,n){Object.assign(e.output,n)}renderInstance(e,{output:n}){Object.assign(e,n)}sortInstanceNodePosition(){return 0}}const e7={offset:"stroke-dashoffset",array:"stroke-dasharray"},t7={offset:"strokeDashoffset",array:"strokeDasharray"};function n7(t,e,n=1,i=0,r=!0){t.pathLength=1;const s=r?e7:t7;t[s.offset]=`${-i}`,t[s.array]=`${e} ${n}`}const i7=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function kj(t,{attrX:e,attrY:n,attrScale:i,pathLength:r,pathSpacing:s=1,pathOffset:a=0,...c},u,h,d){if(j_(t,c,h),u){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:m,style:g}=t;m.transform&&(g.transform=m.transform,delete m.transform),(g.transform||m.transformOrigin)&&(g.transformOrigin=m.transformOrigin??"50% 50%",delete m.transformOrigin),g.transform&&(g.transformBox=(d==null?void 0:d.transformBox)??"fill-box",delete m.transformBox);for(const y of i7)m[y]!==void 0&&(g[y]=m[y],delete m[y]);e!==void 0&&(m.x=e),n!==void 0&&(m.y=n),i!==void 0&&(m.scale=i),r!==void 0&&n7(m,r,s,a,!1)}const Cj=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),Aj=t=>typeof t=="string"&&t.toLowerCase()==="svg";function r7(t,e,n,i){Ej(t,e,void 0,i);for(const r in e.attrs)t.setAttribute(Cj.has(r)?r:R_(r),e.attrs[r])}function Rj(t,e,n){const i=B_(t,e,n);for(const r in t)if(li(t[r])||li(e[r])){const s=vh.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;i[s]=t[r]}return i}class Pj extends yj{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Gn}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(Sh.has(n)){const i=lj(n);return i&&i.default||0}return n=Cj.has(n)?n:R_(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,i){return Rj(e,n,i)}build(e,n,i){kj(e,n,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(e,n,i,r){r7(e,n,i,r)}mount(e){this.isSVGTag=Aj(e.tagName),super.mount(e)}}const s7=L_.length;function Mj(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Mj(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<s7;n++){const i=L_[n],r=t.props[i];(dp(r)||r===!1)&&(e[i]=r)}return e}function Nj(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const o7=[...D_].reverse(),a7=D_.length;function l7(t){return e=>Promise.all(e.map(({animation:n,options:i})=>cF(t,n,i)))}function c7(t){let e=l7(t),n=BM(),i=!0,r=!1;const s=h=>(d,m)=>{var y;const g=qc(t,m,h==="exit"?(y=t.presenceContext)==null?void 0:y.custom:void 0);if(g){const{transition:v,transitionEnd:S,...x}=g;d={...d,...x,...S}}return d};function a(h){e=h(t)}function c(h){const{props:d}=t,m=Mj(t.parent)||{},g=[],y=new Set;let v={},S=1/0;for(let w=0;w<a7;w++){const C=o7[w],k=n[C],A=d[C]!==void 0?d[C]:m[C],R=dp(A),P=C===h?k.isActive:null;P===!1&&(S=w);let N=A===m[C]&&A!==d[C]&&R;if(N&&(i||r)&&t.manuallyAnimateOnMount&&(N=!1),k.protectedKeys={...v},!k.isActive&&P===null||!A&&!k.prevProp||cy(A)||typeof A=="boolean")continue;if(C==="exit"&&k.isActive&&P!==!0){k.prevResolvedValues&&(v={...v,...k.prevResolvedValues});continue}const $=u7(k.prevProp,A);let D=$||C===h&&k.isActive&&!N&&R||w>S&&R,U=!1;const V=Array.isArray(A)?A:[A];let X=V.reduce(s(C),{});P===!1&&(X={});const{prevResolvedValues:ee={}}=k,le={...ee,...X},re=K=>{D=!0,y.has(K)&&(U=!0,y.delete(K)),k.needsAnimating[K]=!0;const me=t.getValue(K);me&&(me.liveStyle=!1)};for(const K in le){const me=X[K],fe=ee[K];if(v.hasOwnProperty(K))continue;let Te=!1;a1(me)&&a1(fe)?Te=!Nj(me,fe)||$:Te=me!==fe,Te?me!=null?re(K):y.add(K):me!==void 0&&y.has(K)?re(K):k.protectedKeys[K]=!0}k.prevProp=A,k.prevResolvedValues=X,k.isActive&&(v={...v,...X}),(i||r)&&t.blockInitialAnimation&&(D=!1);const G=N&&$;D&&(!G||U)&&g.push(...V.map(K=>{const me={type:C};if(typeof K=="string"&&(i||r)&&!G&&t.manuallyAnimateOnMount&&t.parent){const{parent:fe}=t,Te=qc(fe,K);if(fe.enteringChildren&&Te){const{delayChildren:ze}=Te.transition||{};me.delay=tj(fe.enteringChildren,t,ze)}}return{animation:K,options:me}}))}if(y.size){const w={};if(typeof d.initial!="boolean"){const C=qc(t,Array.isArray(d.initial)?d.initial[0]:d.initial);C&&C.transition&&(w.transition=C.transition)}y.forEach(C=>{const k=t.getBaseTarget(C),A=t.getValue(C);A&&(A.liveStyle=!0),w[C]=k??null}),g.push({animation:w})}let x=!!g.length;return i&&(d.initial===!1||d.initial===d.animate)&&!t.manuallyAnimateOnMount&&(x=!1),i=!1,r=!1,x?e(g):Promise.resolve()}function u(h,d){var g;if(n[h].isActive===d)return Promise.resolve();(g=t.variantChildren)==null||g.forEach(y=>{var v;return(v=y.animationState)==null?void 0:v.setActive(h,d)}),n[h].isActive=d;const m=c(h);for(const y in n)n[y].protectedKeys={};return m}return{animateChanges:c,setActive:u,setAnimateFunction:a,getState:()=>n,reset:()=>{n=BM(),r=!0}}}function u7(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!Nj(e,t):!1}function Sc(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function BM(){return{animate:Sc(!0),whileInView:Sc(),whileHover:Sc(),whileTap:Sc(),whileDrag:Sc(),whileFocus:Sc(),exit:Sc()}}function g1(t,e){t.min=e.min,t.max=e.max}function Bs(t,e){g1(t.x,e.x),g1(t.y,e.y)}function zM(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const Qj=1e-4,f7=1-Qj,h7=1+Qj,$j=.01,d7=0-$j,p7=0+$j;function sr(t){return t.max-t.min}function m7(t,e,n){return Math.abs(t-e)<=n}function XM(t,e,n,i=.5){t.origin=i,t.originPoint=tn(e.min,e.max,t.origin),t.scale=sr(n)/sr(e),t.translate=tn(n.min,n.max,t.origin)-t.originPoint,(t.scale>=f7&&t.scale<=h7||isNaN(t.scale))&&(t.scale=1),(t.translate>=d7&&t.translate<=p7||isNaN(t.translate))&&(t.translate=0)}function Wd(t,e,n,i){XM(t.x,e.x,n.x,i?i.originX:void 0),XM(t.y,e.y,n.y,i?i.originY:void 0)}function UM(t,e,n,i=0){const r=i?tn(n.min,n.max,i):n.min;t.min=r+e.min,t.max=t.min+sr(e)}function g7(t,e,n,i){UM(t.x,e.x,n.x,i==null?void 0:i.x),UM(t.y,e.y,n.y,i==null?void 0:i.y)}function ZM(t,e,n,i=0){const r=i?tn(n.min,n.max,i):n.min;t.min=e.min-r,t.max=t.min+sr(e)}function pb(t,e,n,i){ZM(t.x,e.x,n.x,i==null?void 0:i.x),ZM(t.y,e.y,n.y,i==null?void 0:i.y)}function VM(t,e,n,i,r){return t-=e,t=db(t,1/n,i),r!==void 0&&(t=db(t,1/r,i)),t}function O7(t,e=0,n=1,i=.5,r,s=t,a=t){if(zo.test(e)&&(e=parseFloat(e),e=tn(a.min,a.max,e/100)-a.min),typeof e!="number")return;let c=tn(s.min,s.max,i);t===s&&(c-=e),t.min=VM(t.min,e,n,c,r),t.max=VM(t.max,e,n,c,r)}function qM(t,e,[n,i,r],s,a){O7(t,e[n],e[i],e[r],e.scale,s,a)}const b7=["x","scaleX","originX"],y7=["y","scaleY","originY"];function YM(t,e,n,i){qM(t.x,e,b7,n?n.x:void 0,i?i.x:void 0),qM(t.y,e,y7,n?n.y:void 0,i?i.y:void 0)}function GM(t){return t.translate===0&&t.scale===1}function Dj(t){return GM(t.x)&&GM(t.y)}function FM(t,e){return t.min===e.min&&t.max===e.max}function v7(t,e){return FM(t.x,e.x)&&FM(t.y,e.y)}function HM(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Lj(t,e){return HM(t.x,e.x)&&HM(t.y,e.y)}function WM(t){return sr(t.x)/sr(t.y)}function KM(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function _o(t){return[t("x"),t("y")]}function S7(t,e,n){let i="";const r=t.x.translate/e.x,s=t.y.translate/e.y,a=(n==null?void 0:n.z)||0;if((r||s||a)&&(i=`translate3d(${r}px, ${s}px, ${a}px) `),(e.x!==1||e.y!==1)&&(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:h,rotate:d,pathRotation:m,rotateX:g,rotateY:y,skewX:v,skewY:S}=n;h&&(i=`perspective(${h}px) ${i}`),d&&(i+=`rotate(${d}deg) `),m&&(i+=`rotate(${m}deg) `),g&&(i+=`rotateX(${g}deg) `),y&&(i+=`rotateY(${y}deg) `),v&&(i+=`skewX(${v}deg) `),S&&(i+=`skewY(${S}deg) `)}const c=t.x.scale*e.x,u=t.y.scale*e.y;return(c!==1||u!==1)&&(i+=`scale(${c}, ${u})`),i||"none"}const x7=M_.length,JM=t=>typeof t=="string"?parseFloat(t):t,eN=t=>typeof t=="number"||Ve.test(t);function w7(t,e,n,i,r,s){r?(t.opacity=tn(0,n.opacity??1,E7(i)),t.opacityExit=tn(e.opacity??1,0,_7(i))):s&&(t.opacity=tn(e.opacity??1,n.opacity??1,i));for(let a=0;a<x7;a++){const c=M_[a];let u=tN(e,c),h=tN(n,c);if(u===void 0&&h===void 0)continue;u||(u=0),h||(h=0),u===0||h===0||eN(u)===eN(h)?(t[c]=Math.max(tn(JM(u),JM(h),i),0),(zo.test(h)||zo.test(u))&&(t[c]+="%")):t[c]=h}(e.rotate||n.rotate)&&(t.rotate=tn(e.rotate||0,n.rotate||0,i))}function tN(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const E7=Ij(0,.5,_I),_7=Ij(.5,.95,vs);function Ij(t,e,n){return i=>i<t?0:i>e?1:n(Wf(t,e,i))}function jj(t,e,n){const i=li(t)?t:Wc(t);return i.start(C_("",i,e,n)),i.animation}function pp(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}const T7=(t,e)=>t.depth-e.depth;class k7{constructor(){this.children=[],this.isDirty=!1}add(e){d_(this.children,e),this.isDirty=!0}remove(e){Hf(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(T7),this.isDirty=!1,this.children.forEach(e)}}function C7(t,e){const n=rr.now(),i=({timestamp:r})=>{const s=r-n;s>=e&&(jl(i),t(s-e))};return an.setup(i,!0),()=>jl(i)}function jO(t){return li(t)?t.get():t}class A7{constructor(){this.members=[]}add(e){d_(this.members,e);for(let n=this.members.length-1;n>=0;n--){const i=this.members[n];if(i===e||i===this.lead||i===this.prevLead)continue;const r=i.instance;(!r||r.isConnected===!1)&&!i.snapshot&&(Hf(this.members,i),i.unmount())}e.scheduleRender()}remove(e){if(Hf(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){var n;for(let i=this.members.indexOf(e)-1;i>=0;i--){const r=this.members[i];if(r.isPresent!==!1&&((n=r.instance)==null?void 0:n.isConnected)!==!1)return this.promote(r),!0}return!1}promote(e,n){var r;const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.updateSnapshot(),e.scheduleRender();const{layoutDependency:s}=i.options,{layoutDependency:a}=e.options;(s===void 0||s!==a)&&(e.resumeFrom=i,n&&(i.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),(r=e.root)!=null&&r.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{var n,i,r,s,a;(i=(n=e.options).onExitComplete)==null||i.call(n),(a=(r=e.resumingFrom)==null?void 0:(s=r.options).onExitComplete)==null||a.call(s)})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){var e;(e=this.lead)!=null&&e.snapshot&&(this.lead.snapshot=void 0)}}const BO={hasAnimatedSinceResize:!0,hasEverUpdated:!1},kS=["","X","Y","Z"],R7=1e3;let P7=0;function CS(t,e,n,i){const{latestValues:r}=e;r[t]&&(n[t]=r[t],e.setStaticValue(t,0),i&&(i[t]=0))}function Bj(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=sj(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:r,layoutId:s}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",an,!(r||s))}const{parent:i}=t;i&&!i.hasCheckedOptimisedAppear&&Bj(i)}function zj({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(a={},c=e==null?void 0:e()){this.id=P7++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(Q7),this.nodes.forEach(B7),this.nodes.forEach(z7),this.nodes.forEach($7)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0;for(let u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new k7)}addEventListener(a,c){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new p_),this.eventHandlers.get(a).add(c)}notifyListeners(a,...c){const u=this.eventHandlers.get(a);u&&u.notify(...c)}hasListeners(a){return this.eventHandlers.has(a)}mount(a){if(this.instance)return;this.isSVG=ly(a)&&!pj(a),this.instance=a;const{layoutId:c,layout:u,visualElement:h}=this.options;if(h&&!h.current&&h.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(u||c)&&(this.isLayoutDirty=!0),t){let d,m=0;const g=()=>this.root.updateBlockedByResize=!1;an.read(()=>{m=window.innerWidth}),t(a,()=>{const y=window.innerWidth;y!==m&&(m=y,this.root.updateBlockedByResize=!0,d&&d(),d=C7(g,250),BO.hasAnimatedSinceResize&&(BO.hasAnimatedSinceResize=!1,this.nodes.forEach(rN)))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&h&&(c||u)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:m,hasRelativeLayoutChanged:g,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||h.getDefaultTransition()||q7,{onLayoutAnimationStart:S,onLayoutAnimationComplete:x}=h.getProps(),w=!this.targetLayout||!Lj(this.targetLayout,y),C=!m&&g;if(this.options.layoutRoot||this.resumeFrom||C||m&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const k={...k_(v,"layout"),onPlay:S,onComplete:x};(h.shouldReduceMotion||this.options.layoutRoot)&&(k.delay=0,k.type=!1),this.startAnimation(k),this.setAnimationOrigin(d,C,k.path)}else m||rN(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),jl(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(X7),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Bj(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const m=this.path[d];m.shouldResetTransform=!0,(typeof m.latestValues.x=="string"||typeof m.latestValues.y=="string")&&(m.isLayoutDirty=!0),m.updateScroll("snapshot"),m.options.layoutRoot&&m.willUpdate(!1)}const{layoutId:c,layout:u}=this.options;if(c===void 0&&!u)return;const h=this.getTransformTemplate();this.prevTransformTemplateValue=h?h(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const u=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),u&&this.nodes.forEach(L7),this.nodes.forEach(nN);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(iN);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(I7),this.nodes.forEach(j7),this.nodes.forEach(M7),this.nodes.forEach(N7)):this.nodes.forEach(iN),this.clearAllSnapshots();const c=rr.now();Pi.delta=Vo(0,1e3/60,c-Pi.timestamp),Pi.timestamp=c,Pi.isProcessing=!0,yS.update.process(Pi),yS.preRender.process(Pi),yS.render.process(Pi),Pi.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Q_.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(D7),this.sharedNodes.forEach(U7)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,an.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){an.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!sr(this.snapshot.measuredBox.x)&&!sr(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Gn()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:c}=this.options;c&&c.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let c=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(c=!1),c&&this.instance){const u=i(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!r)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,c=this.projectionDelta&&!Dj(this.projectionDelta),u=this.getTransformTemplate(),h=u?u(this.latestValues,""):void 0,d=h!==this.prevTransformTemplateValue;a&&this.instance&&(c||Ec(this.latestValues)||d)&&(r(this.instance,h),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const c=this.measurePageBox();let u=this.removeElementScroll(c);return a&&(u=this.removeTransform(u)),Y7(u),{animationId:this.root.animationId,measuredBox:c,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){var h;const{visualElement:a}=this.options;if(!a)return Gn();const c=a.measureViewportBox();if(!(((h=this.scroll)==null?void 0:h.wasRoot)||this.path.some(G7))){const{scroll:d}=this.root;d&&(Ao(c.x,d.offset.x),Ao(c.y,d.offset.y))}return c}removeElementScroll(a){var u;const c=Gn();if(Bs(c,a),(u=this.scroll)!=null&&u.wasRoot)return c;for(let h=0;h<this.path.length;h++){const d=this.path[h],{scroll:m,options:g}=d;d!==this.root&&m&&g.layoutScroll&&(m.wasRoot&&Bs(c,a),Ao(c.x,m.offset.x),Ao(c.y,m.offset.y))}return c}applyTransform(a,c=!1,u){var d,m;const h=u||Gn();Bs(h,a);for(let g=0;g<this.path.length;g++){const y=this.path[g];!c&&y.options.layoutScroll&&y.scroll&&y!==y.root&&(Ao(h.x,-y.scroll.offset.x),Ao(h.y,-y.scroll.offset.y)),Ec(y.latestValues)&&IO(h,y.latestValues,(d=y.layout)==null?void 0:d.layoutBox)}return Ec(this.latestValues)&&IO(h,this.latestValues,(m=this.layout)==null?void 0:m.layoutBox),h}removeTransform(a){var u;const c=Gn();Bs(c,a);for(let h=0;h<this.path.length;h++){const d=this.path[h];if(!Ec(d.latestValues))continue;let m;d.instance&&(d1(d.latestValues)&&d.updateSnapshot(),m=Gn(),Bs(m,d.measurePageBox())),YM(c,d.latestValues,(u=d.snapshot)==null?void 0:u.layoutBox,m)}return Ec(this.latestValues)&&YM(c,this.latestValues),c}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Pi.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var y;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==c;if(!(a||u&&this.isSharedProjectionDirty||this.isProjectionDirty||(y=this.parent)!=null&&y.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:m}=this.options;if(!this.layout||!(d||m))return;this.resolvedRelativeTargetAt=Pi.timestamp;const g=this.getClosestProjectingParent();g&&this.linkedParentVersion!==g.layoutVersion&&!g.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&g&&g.layout?this.createRelativeTarget(g,this.layout.layoutBox,g.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Gn(),this.targetWithTransforms=Gn()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),g7(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Bs(this.target,this.layout.layoutBox),xj(this.target,this.targetDelta)):Bs(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&g&&!!g.resumingFrom==!!this.resumingFrom&&!g.options.layoutScroll&&g.target&&this.animationProgress!==1?this.createRelativeTarget(g,this.target,g.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||d1(this.parent.latestValues)||Sj(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(a,c,u){this.relativeParent=a,this.linkedParentVersion=a.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Gn(),this.relativeTargetOrigin=Gn(),pb(this.relativeTargetOrigin,c,u,this.options.layoutAnchor||void 0),Bs(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var v;const a=this.getLead(),c=!!this.resumingFrom||this!==a;let u=!0;if((this.isProjectionDirty||(v=this.parent)!=null&&v.isProjectionDirty)&&(u=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===Pi.timestamp&&(u=!1),u)return;const{layout:h,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(h||d))return;Bs(this.layoutCorrected,this.layout.layoutBox);const m=this.treeScale.x,g=this.treeScale.y;VF(this.layoutCorrected,this.treeScale,this.path,c),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Gn());const{target:y}=a;if(!y){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(zM(this.prevProjectionDelta.x,this.projectionDelta.x),zM(this.prevProjectionDelta.y,this.projectionDelta.y)),Wd(this.projectionDelta,this.layoutCorrected,y,this.latestValues),(this.treeScale.x!==m||this.treeScale.y!==g||!KM(this.projectionDelta.x,this.prevProjectionDelta.x)||!KM(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",y))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var c;if((c=this.options.visualElement)==null||c.scheduleRender(),a){const u=this.getStack();u&&u.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=vf(),this.projectionDelta=vf(),this.projectionDeltaWithTransform=vf()}setAnimationOrigin(a,c=!1,u){const h=this.snapshot,d=h?h.latestValues:{},m={...this.latestValues},g=vf();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!c;const y=Gn(),v=h?h.source:void 0,S=this.layout?this.layout.source:void 0,x=v!==S,w=this.getStack(),C=!w||w.members.length<=1,k=!!(x&&!C&&this.options.crossfade===!0&&!this.path.some(V7));this.animationProgress=0;let A;const R=u==null?void 0:u.interpolateProjection(a);this.mixTargetDelta=P=>{const N=P/1e3,$=R==null?void 0:R(N);$?(g.x.translate=$.x,g.x.scale=tn(a.x.scale,1,N),g.x.origin=a.x.origin,g.x.originPoint=a.x.originPoint,g.y.translate=$.y,g.y.scale=tn(a.y.scale,1,N),g.y.origin=a.y.origin,g.y.originPoint=a.y.originPoint):(sN(g.x,a.x,N),sN(g.y,a.y,N)),this.setTargetDelta(g),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(pb(y,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Z7(this.relativeTarget,this.relativeTargetOrigin,y,N),A&&v7(this.relativeTarget,A)&&(this.isProjectionDirty=!1),A||(A=Gn()),Bs(A,this.relativeTarget)),x&&(this.animationValues=m,w7(m,d,this.latestValues,N,k,C)),$&&$.rotate!==void 0&&(this.animationValues||(this.animationValues=m),this.animationValues.pathRotation=$.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=N},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){var c,u,h;this.notifyListeners("animationStart"),(c=this.currentAnimation)==null||c.stop(),(h=(u=this.resumingFrom)==null?void 0:u.currentAnimation)==null||h.stop(),this.pendingAnimation&&(jl(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=an.update(()=>{BO.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Wc(0)),this.motionValue.jump(0,!1),this.currentAnimation=jj(this.motionValue,[0,1e3],{...a,velocity:0,isSync:!0,onUpdate:d=>{this.mixTargetDelta(d),a.onUpdate&&a.onUpdate(d)},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(R7),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:c,target:u,layout:h,latestValues:d}=a;if(!(!c||!u||!h)){if(this!==a&&this.layout&&h&&Xj(this.options.animationType,this.layout.layoutBox,h.layoutBox)){u=this.target||Gn();const m=sr(this.layout.layoutBox.x);u.x.min=a.target.x.min,u.x.max=u.x.min+m;const g=sr(this.layout.layoutBox.y);u.y.min=a.target.y.min,u.y.max=u.y.min+g}Bs(c,u),IO(c,d),Wd(this.projectionDeltaWithTransform,this.layoutCorrected,c,d)}}registerSharedNode(a,c){this.sharedNodes.has(a)||this.sharedNodes.set(a,new A7),this.sharedNodes.get(a).add(c);const h=c.options.initialPromotionConfig;c.promote({transition:h?h.transition:void 0,preserveFollowOpacity:h&&h.shouldPreserveFollowOpacity?h.shouldPreserveFollowOpacity(c):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var c;const{layoutId:a}=this.options;return a?((c=this.getStack())==null?void 0:c.lead)||this:this}getPrevLead(){var c;const{layoutId:a}=this.options;return a?(c=this.getStack())==null?void 0:c.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:c,preserveFollowOpacity:u}={}){const h=this.getStack();h&&h.promote(this,u),a&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let c=!1;const{latestValues:u}=a;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(c=!0),!c)return;const h={};u.z&&CS("z",a,h,this.animationValues);for(let d=0;d<kS.length;d++)CS(`rotate${kS[d]}`,a,h,this.animationValues),CS(`skew${kS[d]}`,a,h,this.animationValues);a.render();for(const d in h)a.setStaticValue(d,h[d]),this.animationValues&&(this.animationValues[d]=h[d]);a.scheduleRender()}applyProjectionStyles(a,c){if(!this.instance||this.isSVG)return;if(!this.isVisible){a.visibility="hidden";return}const u=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,a.visibility="",a.opacity="",a.pointerEvents=jO(c==null?void 0:c.pointerEvents)||"",a.transform=u?u(this.latestValues,""):"none";return}const h=this.getLead();if(!this.projectionDelta||!this.layout||!h.target){this.options.layoutId&&(a.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,a.pointerEvents=jO(c==null?void 0:c.pointerEvents)||""),this.hasProjected&&!Ec(this.latestValues)&&(a.transform=u?u({},""):"none",this.hasProjected=!1);return}a.visibility="";const d=h.animationValues||h.latestValues;this.applyTransformsToTarget();let m=S7(this.projectionDeltaWithTransform,this.treeScale,d);u&&(m=u(d,m)),a.transform=m;const{x:g,y}=this.projectionDelta;a.transformOrigin=`${g.origin*100}% ${y.origin*100}% 0`,h.animationValues?a.opacity=h===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:a.opacity=h===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const v in m1){if(d[v]===void 0)continue;const{correct:S,applyTo:x,isCSSVariable:w}=m1[v],C=m==="none"?d[v]:S(d[v],h);if(x){const k=x.length;for(let A=0;A<k;A++)a[x[A]]=C}else w?this.options.visualElement.renderState.vars[v]=C:a[v]=C}this.options.layoutId&&(a.pointerEvents=h===this?jO(c==null?void 0:c.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var c;return(c=a.currentAnimation)==null?void 0:c.stop()}),this.root.nodes.forEach(nN),this.root.sharedNodes.clear()}}}function M7(t){t.updateLayout()}function N7(t){var n;const e=((n=t.resumeFrom)==null?void 0:n.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:r}=t.layout,{animationType:s}=t.options,a=e.source!==t.layout.source;if(s==="size")_o(m=>{const g=a?e.measuredBox[m]:e.layoutBox[m],y=sr(g);g.min=i[m].min,g.max=g.min+y});else if(s==="x"||s==="y"){const m=s==="x"?"y":"x";g1(a?e.measuredBox[m]:e.layoutBox[m],i[m])}else Xj(s,e.layoutBox,i)&&_o(m=>{const g=a?e.measuredBox[m]:e.layoutBox[m],y=sr(i[m]);g.max=g.min+y,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[m].max=t.relativeTarget[m].min+y)});const c=vf();Wd(c,i,e.layoutBox);const u=vf();a?Wd(u,t.applyTransform(r,!0),e.measuredBox):Wd(u,i,e.layoutBox);const h=!Dj(c);let d=!1;if(!t.resumeFrom){const m=t.getClosestProjectingParent();if(m&&!m.resumeFrom){const{snapshot:g,layout:y}=m;if(g&&y){const v=t.options.layoutAnchor||void 0,S=Gn();pb(S,e.layoutBox,g.layoutBox,v);const x=Gn();pb(x,i,y.layoutBox,v),Lj(S,x)||(d=!0),m.options.layoutRoot&&(t.relativeTarget=x,t.relativeTargetOrigin=S,t.relativeParent=m)}}}t.notifyListeners("didUpdate",{layout:i,snapshot:e,delta:u,layoutDelta:c,hasLayoutChanged:h,hasRelativeLayoutChanged:d})}else if(t.isLead()){const{onExitComplete:i}=t.options;i&&i()}t.options.transition=void 0}function Q7(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function $7(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function D7(t){t.clearSnapshot()}function nN(t){t.clearMeasurements()}function L7(t){t.isLayoutDirty=!0,t.updateLayout()}function iN(t){t.isLayoutDirty=!1}function I7(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function j7(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function rN(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function B7(t){t.resolveTargetDelta()}function z7(t){t.calcProjection()}function X7(t){t.resetSkewAndRotation()}function U7(t){t.removeLeadSnapshot()}function sN(t,e,n){t.translate=tn(e.translate,0,n),t.scale=tn(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function oN(t,e,n,i){t.min=tn(e.min,n.min,i),t.max=tn(e.max,n.max,i)}function Z7(t,e,n,i){oN(t.x,e.x,n.x,i),oN(t.y,e.y,n.y,i)}function V7(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const q7={duration:.45,ease:[.4,0,.1,1]},aN=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),lN=aN("applewebkit/")&&!aN("chrome/")?Math.round:vs;function cN(t){t.min=lN(t.min),t.max=lN(t.max)}function Y7(t){cN(t.x),cN(t.y)}function Xj(t,e,n){return t==="position"||t==="preserve-aspect"&&!m7(WM(e),WM(n),.2)}function G7(t){var e;return t!==t.root&&((e=t.scroll)==null?void 0:e.wasRoot)}const F7=zj({attachResizeListener:(t,e)=>pp(t,"resize",e),measureScroll:()=>{var t,e;return{x:document.documentElement.scrollLeft||((t=document.body)==null?void 0:t.scrollLeft)||0,y:document.documentElement.scrollTop||((e=document.body)==null?void 0:e.scrollTop)||0}},checkIsScrollRoot:()=>!0}),AS={current:void 0},Uj=zj({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!AS.current){const t=new F7({});t.mount(window),t.setOptions({layoutScroll:!0}),AS.current=t}return AS.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Kc=T.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function uN(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function H7(...t){return e=>{let n=!1;const i=t.map(r=>{const s=uN(r,e);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r<i.length;r++){const s=i[r];typeof s=="function"?s():uN(t[r],null)}}}}function W7(...t){return T.useCallback(H7(...t),t)}class K7 extends T.Component{getSnapshotBeforeUpdate(e){const n=this.props.childRef.current;if(QO(n)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const i=n.offsetParent,r=QO(i)&&i.offsetWidth||0,s=QO(i)&&i.offsetHeight||0,a=getComputedStyle(n),c=this.props.sizeRef.current;c.height=parseFloat(a.height),c.width=parseFloat(a.width),c.top=n.offsetTop,c.left=n.offsetLeft,c.right=r-c.width-c.left,c.bottom=s-c.height-c.top,c.direction=a.direction}return null}componentDidUpdate(){}render(){return this.props.children}}function J7({children:t,isPresent:e,anchorX:n,anchorY:i,root:r,pop:s}){var g;const a=T.useId(),c=T.useRef(null),u=T.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:h}=T.useContext(Kc),d=s!==!1?((g=t.props)==null?void 0:g.ref)??(t==null?void 0:t.ref):void 0,m=W7(c,d);return T.useInsertionEffect(()=>{const{width:y,height:v,top:S,left:x,right:w,bottom:C,direction:k}=u.current;if(e||s===!1||!c.current||!y||!v)return;const A=k==="rtl",R=n==="left"?A?`right: ${w}`:`left: ${x}`:A?`left: ${x}`:`right: ${w}`,P=i==="bottom"?`bottom: ${C}`:`top: ${S}`;c.current.dataset.motionPopId=a;const N=document.createElement("style");h&&(N.nonce=h);const $=r??document.head;return $.appendChild(N),N.sheet&&N.sheet.insertRule(`
51
+ [data-motion-pop-id="${a}"] {
52
+ position: absolute !important;
53
+ width: ${y}px !important;
54
+ height: ${v}px !important;
55
+ ${R}px !important;
56
+ ${P}px !important;
57
+ }
58
+ `),()=>{var D;(D=c.current)==null||D.removeAttribute("data-motion-pop-id"),$.contains(N)&&$.removeChild(N)}},[e]),_.jsx(K7,{isPresent:e,childRef:c,sizeRef:u,pop:s,children:s===!1?t:T.cloneElement(t,{ref:m})})}const eH=({children:t,initial:e,isPresent:n,onExitComplete:i,custom:r,presenceAffectsLayout:s,mode:a,anchorX:c,anchorY:u,root:h})=>{const d=Hp(tH),m=T.useId(),g=T.useRef(n),y=T.useRef(i);h_(()=>{g.current=n,y.current=i});let v=!0,S=T.useMemo(()=>(v=!1,{id:m,initial:e,isPresent:n,custom:r,onExitComplete:x=>{d.set(x,!0);for(const w of d.values())if(!w)return;i&&i()},register:x=>(d.set(x,!1),()=>{var w;d.delete(x),!g.current&&!d.size&&((w=y.current)==null||w.call(y))})}),[n,d,i]);return s&&v&&(S={...S}),T.useMemo(()=>{d.forEach((x,w)=>d.set(w,!1))},[n]),T.useEffect(()=>{!n&&!d.size&&i&&i()},[n]),t=_.jsx(J7,{pop:a==="popLayout",isPresent:n,anchorX:c,anchorY:u,root:h,children:t}),_.jsx(sy.Provider,{value:S,children:t})};function tH(){return new Map}function Zj(t=!0){const e=T.useContext(sy);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:i,register:r}=e,s=T.useId();T.useEffect(()=>{if(t)return r(s)},[t]);const a=T.useCallback(()=>t&&i&&i(s),[s,i,t]);return!n&&i?[!1,a]:[!0]}const jg=t=>t.key||"";function fN(t){const e=[];return T.Children.forEach(t,n=>{T.isValidElement(n)&&e.push(n)}),e}const nH=({children:t,custom:e,initial:n=!0,onExitComplete:i,presenceAffectsLayout:r=!0,mode:s="sync",propagate:a=!1,anchorX:c="left",anchorY:u="top",root:h})=>{const[d,m]=Zj(a),g=T.useMemo(()=>fN(t),[t]),y=a&&!d?[]:g.map(jg),v=T.useRef(!0),S=T.useRef(g),x=Hp(()=>new Map),w=T.useRef(new Set),[C,k]=T.useState(g),[A,R]=T.useState(g);h_(()=>{v.current=!1,S.current=g;for(let $=0;$<A.length;$++){const D=jg(A[$]);y.includes(D)?(x.delete(D),w.current.delete(D)):x.get(D)!==!0&&x.set(D,!1)}},[A,y.length,y.join("-")]);const P=[];if(g!==C){let $=[...g];for(let D=0;D<A.length;D++){const U=A[D],V=jg(U);y.includes(V)||($.splice(D,0,U),P.push(U))}return s==="wait"&&P.length&&($=P),R(fN($)),k(g),null}const{forceRender:N}=T.useContext(f_);return _.jsx(_.Fragment,{children:A.map($=>{const D=jg($),U=a&&!d?!1:g===A||y.includes(D),V=()=>{if(w.current.has(D))return;if(x.has(D))w.current.add(D),x.set(D,!0);else return;let X=!0;x.forEach(ee=>{ee||(X=!1)}),X&&(N==null||N(),R(S.current),a&&(m==null||m()),i&&i())};return _.jsx(eH,{isPresent:U,initial:!v.current||n?void 0:!1,custom:e,presenceAffectsLayout:r,mode:s,root:h,onExitComplete:U?void 0:V,anchorX:c,anchorY:u,children:$},D)})})},Vj=T.createContext({strict:!1}),hN={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let dN=!1;function iH(){if(dN)return;const t={};for(const e in hN)t[e]={isEnabled:n=>hN[e].some(i=>!!n[i])};Oj(t),dN=!0}function qj(){return iH(),XF()}function rH(t){const e=qj();for(const n in t)e[n]={...e[n],...t[n]};Oj(e)}const sH=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function mb(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||sH.has(t)}let Yj=t=>!mb(t);function Gj(t){typeof t=="function"&&(Yj=e=>e.startsWith("on")?!mb(e):t(e))}try{Gj(require("@emotion/is-prop-valid").default)}catch{}function oH(t,e,n){const i={};for(const r in t)r==="values"&&typeof t.values=="object"||li(t[r])||(Yj(r)||n===!0&&mb(r)||!e&&!mb(r)||t.draggable&&r.startsWith("onDrag"))&&(i[r]=t[r]);return i}function aH({children:t,isValidProp:e,...n}){e&&Gj(e);const i=T.useContext(Kc);n={...i,...n},n.transition=T_(n.transition,i.transition),n.isStatic=Hp(()=>n.isStatic);const r=T.useMemo(()=>n,[JSON.stringify(n.transition),n.transformPagePoint,n.reducedMotion,n.skipAnimations]);return _.jsx(Kc.Provider,{value:r,children:t})}const fy=T.createContext({});function lH(t,e){if(uy(t)){const{initial:n,animate:i}=t;return{initial:n===!1||dp(n)?n:void 0,animate:dp(i)?i:void 0}}return t.inherit!==!1?e:{}}function cH(t){const{initial:e,animate:n}=lH(t,T.useContext(fy));return T.useMemo(()=>({initial:e,animate:n}),[pN(e),pN(n)])}function pN(t){return Array.isArray(t)?t.join(" "):t}const z_=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Fj(t,e,n){for(const i in e)!li(e[i])&&!_j(i,n)&&(t[i]=e[i])}function uH({transformTemplate:t},e){return T.useMemo(()=>{const n=z_();return j_(n,e,t),Object.assign({},n.vars,n.style)},[e])}function fH(t,e){const n=t.style||{},i={};return Fj(i,n,t),Object.assign(i,uH(t,e)),i}function hH(t,e){const n={},i=fH(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const Hj=()=>({...z_(),attrs:{}});function dH(t,e,n,i){const r=T.useMemo(()=>{const s=Hj();return kj(s,e,Aj(i),t.transformTemplate,t.style),{...s.attrs,style:{...s.style}}},[e]);if(t.style){const s={};Fj(s,t.style,t),r.style={...s,...r.style}}return r}const pH=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function X_(t){return typeof t!="string"||t.includes("-")?!1:!!(pH.indexOf(t)>-1||/[A-Z]/u.test(t))}function mH(t,e,n,{latestValues:i},r,s=!1,a){const u=(a??X_(t)?dH:hH)(e,i,r,t),h=oH(e,typeof t=="string",s),d=t!==T.Fragment?{...h,...u,ref:n}:{},{children:m}=e,g=T.useMemo(()=>li(m)?m.get():m,[m]);return T.createElement(t,{...d,children:g})}function gH({scrapeMotionValuesFromProps:t,createRenderState:e},n,i,r){return{latestValues:OH(n,i,r,t),renderState:e()}}function OH(t,e,n,i){const r={},s=i(t,{});for(const g in s)r[g]=jO(s[g]);let{initial:a,animate:c}=t;const u=uy(t),h=mj(t);e&&h&&!u&&t.inherit!==!1&&(a===void 0&&(a=e.initial),c===void 0&&(c=e.animate));let d=n?n.initial===!1:!1;d=d||a===!1;const m=d?c:a;if(m&&typeof m!="boolean"&&!cy(m)){const g=Array.isArray(m)?m:[m];for(let y=0;y<g.length;y++){const v=A_(t,g[y]);if(v){const{transitionEnd:S,transition:x,...w}=v;for(const C in w){let k=w[C];if(Array.isArray(k)){const A=d?k.length-1:0;k=k[A]}k!==null&&(r[C]=k)}for(const C in S)r[C]=S[C]}}}return r}const Wj=t=>(e,n)=>{const i=T.useContext(fy),r=T.useContext(sy),s=()=>gH(t,e,i,r);return n?s():Hp(s)},bH=Wj({scrapeMotionValuesFromProps:B_,createRenderState:z_}),yH=Wj({scrapeMotionValuesFromProps:Rj,createRenderState:Hj}),vH=Symbol.for("motionComponentSymbol");function SH(t,e,n){const i=T.useRef(n);T.useInsertionEffect(()=>{i.current=n});const r=T.useRef(null);return T.useCallback(s=>{var c;s&&((c=t.onMount)==null||c.call(t,s)),e&&(s?e.mount(s):e.unmount());const a=i.current;if(typeof a=="function")if(s){const u=a(s);typeof u=="function"&&(r.current=u)}else r.current?(r.current(),r.current=null):a(s);else a&&(a.current=s)},[e])}const Kj=T.createContext({});function ff(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function xH(t,e,n,i,r,s){var k,A;const{visualElement:a}=T.useContext(fy),c=T.useContext(Vj),u=T.useContext(sy),h=T.useContext(Kc),d=h.reducedMotion,m=h.skipAnimations,g=T.useRef(null),y=T.useRef(!1);i=i||c.renderer,!g.current&&i&&(g.current=i(t,{visualState:e,parent:a,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d,skipAnimations:m,isSVG:s}),y.current&&g.current&&(g.current.manuallyAnimateOnMount=!0));const v=g.current,S=T.useContext(Kj);v&&!v.projection&&r&&(v.type==="html"||v.type==="svg")&&wH(g.current,n,r,S);const x=T.useRef(!1);T.useInsertionEffect(()=>{v&&x.current&&v.update(n,u)});const w=n[rj],C=T.useRef(!!w&&typeof window<"u"&&!((k=window.MotionHandoffIsComplete)!=null&&k.call(window,w))&&((A=window.MotionHasOptimisedAnimation)==null?void 0:A.call(window,w)));return h_(()=>{y.current=!0,v&&(x.current=!0,window.MotionIsMounted=!0,v.updateFeatures(),v.scheduleRenderMicrotask(),C.current&&v.animationState&&v.animationState.animateChanges())}),T.useEffect(()=>{v&&(!C.current&&v.animationState&&v.animationState.animateChanges(),C.current&&(queueMicrotask(()=>{var R;(R=window.MotionHandoffMarkAsComplete)==null||R.call(window,w)}),C.current=!1),v.enteringChildren=void 0)}),v}function wH(t,e,n,i){const{layoutId:r,layout:s,drag:a,dragConstraints:c,layoutScroll:u,layoutRoot:h,layoutAnchor:d,layoutCrossfade:m}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:Jj(t.parent)),t.projection.setOptions({layoutId:r,layout:s,alwaysMeasureLayout:!!a||c&&ff(c),visualElement:t,animationType:typeof s=="string"?s:"both",initialPromotionConfig:i,crossfade:m,layoutScroll:u,layoutRoot:h,layoutAnchor:d})}function Jj(t){if(t)return t.options.allowProjection!==!1?t.projection:Jj(t.parent)}function RS(t,{forwardMotionProps:e=!1,type:n}={},i,r){i&&rH(i);const s=n?n==="svg":X_(t),a=s?yH:bH;function c(h,d){let m;const g={...T.useContext(Kc),...h,layoutId:EH(h)},{isStatic:y}=g,v=cH(h),S=a(h,y);if(!y&&typeof window<"u"){_H();const x=TH(g);m=x.MeasureLayout,v.visualElement=xH(t,S,g,r,x.ProjectionNode,s)}return _.jsxs(fy.Provider,{value:v,children:[m&&v.visualElement?_.jsx(m,{visualElement:v.visualElement,...g}):null,mH(t,h,SH(S,v.visualElement,d),S,y,e,s)]})}c.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const u=T.forwardRef(c);return u[vH]=t,u}function EH({layoutId:t}){const e=T.useContext(f_).id;return e&&t!==void 0?e+"-"+t:t}function _H(t,e){T.useContext(Vj).strict}function TH(t){const e=qj(),{drag:n,layout:i}=e;if(!n&&!i)return{};const r={...n,...i};return{MeasureLayout:n!=null&&n.isEnabled(t)||i!=null&&i.isEnabled(t)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function kH(t,e){if(typeof Proxy>"u")return RS;const n=new Map,i=(s,a)=>RS(s,a,t,e),r=(s,a)=>i(s,a);return new Proxy(r,{get:(s,a)=>a==="create"?i:(n.has(a)||n.set(a,RS(a,void 0,t,e)),n.get(a))})}const CH=(t,e)=>e.isSVG??X_(t)?new Pj(e):new Tj(e,{allowProjection:t!==T.Fragment});class AH extends Fl{constructor(e){super(e),e.animationState||(e.animationState=c7(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();cy(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}}let RH=0;class PH extends Fl{constructor(){super(...arguments),this.id=RH++,this.isExitComplete=!1}update(){var s;if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===i)return;if(e&&i===!1){if(this.isExitComplete){const{initial:a,custom:c}=this.node.getProps();if(typeof a=="string"||typeof a=="object"&&a!==null&&!Array.isArray(a)){const u=qc(this.node,a,c);if(u){const{transition:h,transitionEnd:d,...m}=u;for(const g in m)(s=this.node.getValue(g))==null||s.jump(m[g])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const r=this.node.animationState.setActive("exit",!e);n&&!e&&r.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const MH={animation:{Feature:AH},exit:{Feature:PH}};function em(t){return{point:{x:t.pageX,y:t.pageY}}}const NH=t=>e=>$_(e)&&t(e,em(e));function Kd(t,e,n,i){return pp(t,e,NH(n),i)}const eB=({current:t})=>t?t.ownerDocument.defaultView:null,mN=(t,e)=>Math.abs(t-e);function QH(t,e){const n=mN(t.x,e.x),i=mN(t.y,e.y);return Math.sqrt(n**2+i**2)}const gN=new Set(["auto","scroll"]);class tB{constructor(e,n,{transformPagePoint:i,contextWindow:r=window,dragSnapToOrigin:s=!1,distanceThreshold:a=3,element:c}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=v=>{this.handleScroll(v.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Bg(this.lastRawMoveEventInfo,this.transformPagePoint));const v=PS(this.lastMoveEventInfo,this.history),S=this.startEvent!==null,x=QH(v.offset,{x:0,y:0})>=this.distanceThreshold;if(!S&&!x)return;const{point:w}=v,{timestamp:C}=Pi;this.history.push({...w,timestamp:C});const{onStart:k,onMove:A}=this.handlers;S||(k&&k(this.lastMoveEvent,v),this.startEvent=this.lastMoveEvent),A&&A(this.lastMoveEvent,v)},this.handlePointerMove=(v,S)=>{this.lastMoveEvent=v,this.lastRawMoveEventInfo=S,this.lastMoveEventInfo=Bg(S,this.transformPagePoint),an.update(this.updatePoint,!0)},this.handlePointerUp=(v,S)=>{this.end();const{onEnd:x,onSessionEnd:w,resumeAnimation:C}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&C&&C(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const k=PS(v.type==="pointercancel"?this.lastMoveEventInfo:Bg(S,this.transformPagePoint),this.history);this.startEvent&&x&&x(v,k),w&&w(v,k)},!$_(e))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=i,this.distanceThreshold=a,this.contextWindow=r||window;const u=em(e),h=Bg(u,this.transformPagePoint),{point:d}=h,{timestamp:m}=Pi;this.history=[{...d,timestamp:m}];const{onSessionStart:g}=n;g&&g(e,PS(h,this.history));const y={passive:!0,capture:!0};this.removeListeners=Wp(Kd(this.contextWindow,"pointermove",this.handlePointerMove,y),Kd(this.contextWindow,"pointerup",this.handlePointerUp,y),Kd(this.contextWindow,"pointercancel",this.handlePointerUp,y)),c&&this.startScrollTracking(c)}startScrollTracking(e){let n=e.parentElement;for(;n;){const i=getComputedStyle(n);(gN.has(i.overflowX)||gN.has(i.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const n=this.scrollPositions.get(e);if(!n)return;const i=e===window,r=i?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},s={x:r.x-n.x,y:r.y-n.y};s.x===0&&s.y===0||(i?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=s.x,this.lastMoveEventInfo.point.y+=s.y):this.history.length>0&&(this.history[0].x-=s.x,this.history[0].y-=s.y),this.scrollPositions.set(e,r),an.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),jl(this.updatePoint)}}function Bg(t,e){return e?{point:e(t.point)}:t}function ON(t,e){return{x:t.x-e.x,y:t.y-e.y}}function PS({point:t},e){return{point:t,delta:ON(t,nB(e)),offset:ON(t,$H(e)),velocity:DH(e,.1)}}function $H(t){return t[0]}function nB(t){return t[t.length-1]}function DH(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const r=nB(t);for(;n>=0&&(i=t[n],!(r.timestamp-i.timestamp>_r(e)));)n--;if(!i)return{x:0,y:0};i===t[0]&&t.length>2&&r.timestamp-i.timestamp>_r(e)*2&&(i=t[1]);const s=ms(r.timestamp-i.timestamp);if(s===0)return{x:0,y:0};const a={x:(r.x-i.x)/s,y:(r.y-i.y)/s};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function LH(t,{min:e,max:n},i){return e!==void 0&&t<e?t=i?tn(e,t,i.min):Math.max(t,e):n!==void 0&&t>n&&(t=i?tn(n,t,i.max):Math.min(t,n)),t}function bN(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function IH(t,{top:e,left:n,bottom:i,right:r}){return{x:bN(t.x,n,r),y:bN(t.y,e,i)}}function yN(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}function jH(t,e){return{x:yN(t.x,e.x),y:yN(t.y,e.y)}}function BH(t,e){let n=.5;const i=sr(t),r=sr(e);return r>i?n=Wf(e.min,e.max-i,t.min):i>r&&(n=Wf(t.min,t.max-r,e.min)),Vo(0,1,n)}function zH(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const O1=.35;function XH(t=O1){return t===!1?t=0:t===!0&&(t=O1),{x:vN(t,"left","right"),y:vN(t,"top","bottom")}}function vN(t,e,n){return{min:SN(t,e),max:SN(t,n)}}function SN(t,e){return typeof t=="number"?t:t[e]||0}const UH=new WeakMap;class ZH{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Gn(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:i}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const s=m=>{n&&this.snapToCursor(em(m).point),this.stopAnimation()},a=(m,g)=>{const{drag:y,dragPropagation:v,onDragStart:S}=this.getProps();if(y&&!v&&(this.openDragLock&&this.openDragLock(),this.openDragLock=SF(y),!this.openDragLock))return;this.latestPointerEvent=m,this.latestPanInfo=g,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),_o(w=>{let C=this.getAxisMotionValue(w).get()||0;if(zo.test(C)){const{projection:k}=this.visualElement;if(k&&k.layout){const A=k.layout.layoutBox[w];A&&(C=sr(A)*(parseFloat(C)/100))}}this.originPoint[w]=C}),S&&an.update(()=>S(m,g),!1,!0),l1(this.visualElement,"transform");const{animationState:x}=this.visualElement;x&&x.setActive("whileDrag",!0)},c=(m,g)=>{this.latestPointerEvent=m,this.latestPanInfo=g;const{dragPropagation:y,dragDirectionLock:v,onDirectionLock:S,onDrag:x}=this.getProps();if(!y&&!this.openDragLock)return;const{offset:w}=g;if(v&&this.currentDirection===null){this.currentDirection=qH(w),this.currentDirection!==null&&S&&S(this.currentDirection);return}this.updateAxis("x",g.point,w),this.updateAxis("y",g.point,w),this.visualElement.render(),x&&an.update(()=>x(m,g),!1,!0)},u=(m,g)=>{this.latestPointerEvent=m,this.latestPanInfo=g,this.stop(m,g),this.latestPointerEvent=null,this.latestPanInfo=null},h=()=>{const{dragSnapToOrigin:m}=this.getProps();(m||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:d}=this.getProps();this.panSession=new tB(e,{onSessionStart:s,onStart:a,onMove:c,onSessionEnd:u,resumeAnimation:h},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:i,contextWindow:eB(this.visualElement),element:this.visualElement.current})}stop(e,n){const i=e||this.latestPointerEvent,r=n||this.latestPanInfo,s=this.isDragging;if(this.cancel(),!s||!r||!i)return;const{velocity:a}=r;this.startAnimation(a);const{onDragEnd:c}=this.getProps();c&&an.postRender(()=>c(i,r))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:i}=this.getProps();!i&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,n,i){const{drag:r}=this.getProps();if(!i||!zg(e,r,this.currentDirection))return;const s=this.getAxisMotionValue(e);let a=this.originPoint[e]+i[e];this.constraints&&this.constraints[e]&&(a=LH(a,this.constraints[e],this.elastic[e])),s.set(a)}resolveConstraints(){var s;const{dragConstraints:e,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,r=this.constraints;e&&ff(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&i?this.constraints=IH(i.layoutBox,e):this.constraints=!1,this.elastic=XH(n),r!==this.constraints&&!ff(e)&&i&&this.constraints&&!this.hasMutatedConstraints&&_o(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=zH(i.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!ff(e))return!1;const i=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());const s=qF(i,r.root,this.visualElement.getTransformPagePoint());let a=jH(r.layout.layoutBox,s);if(n){const c=n(UF(a));this.hasMutatedConstraints=!!c,c&&(a=vj(c))}return a}startAnimation(e){const{drag:n,dragMomentum:i,dragElastic:r,dragTransition:s,dragSnapToOrigin:a,onDragTransitionEnd:c}=this.getProps(),u=this.constraints||{},h=_o(d=>{if(!zg(d,n,this.currentDirection))return;let m=u&&u[d]||{};(a===!0||a===d)&&(m={min:0,max:0});const g=r?200:1e6,y=r?40:1e7,v={type:"inertia",velocity:i?e[d]:0,bounceStiffness:g,bounceDamping:y,timeConstant:750,restDelta:1,restSpeed:10,...s,...m};return this.startAxisValueAnimation(d,v)});return Promise.all(h).then(c)}startAxisValueAnimation(e,n){const i=this.getAxisMotionValue(e);return l1(this.visualElement,e),i.start(C_(e,i,0,n,this.visualElement,!1))}stopAnimation(){_o(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,r=this.visualElement.getProps()[n];return r||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){_o(n=>{const{drag:i}=this.getProps();if(!zg(n,i,this.currentDirection))return;const{projection:r}=this.visualElement,s=this.getAxisMotionValue(n);if(r&&r.layout){const{min:a,max:c}=r.layout.layoutBox[n],u=s.get()||0;s.set(e[n]-tn(a,c,.5)+u)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:i}=this.visualElement;if(!ff(n)||!i||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};_o(a=>{const c=this.getAxisMotionValue(a);if(c&&this.constraints!==!1){const u=c.get();r[a]=BH({min:u,max:u},this.constraints[a])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.constraints=!1,this.resolveConstraints(),_o(a=>{if(!zg(a,e,null))return;const c=this.getAxisMotionValue(a),{min:u,max:h}=this.constraints[a];c.set(tn(u,h,r[a]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;UH.set(this.visualElement,this);const e=this.visualElement.current,n=Kd(e,"pointerdown",h=>{const{drag:d,dragListener:m=!0}=this.getProps(),g=h.target,y=g!==e&&kF(g);d&&m&&!y&&this.start(h)});let i;const r=()=>{const{dragConstraints:h}=this.getProps();ff(h)&&h.current&&(this.constraints=this.resolveRefConstraints(),i||(i=VH(e,h.current,()=>this.scalePositionWithinConstraints())))},{projection:s}=this.visualElement,a=s.addEventListener("measure",r);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),an.read(r);const c=pp(window,"resize",()=>this.scalePositionWithinConstraints()),u=s.addEventListener("didUpdate",(({delta:h,hasLayoutChanged:d})=>{this.isDragging&&d&&(_o(m=>{const g=this.getAxisMotionValue(m);g&&(this.originPoint[m]+=h[m].translate,g.set(g.get()+h[m].translate))}),this.visualElement.render())}));return()=>{c(),n(),a(),u&&u(),i&&i()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:i=!1,dragPropagation:r=!1,dragConstraints:s=!1,dragElastic:a=O1,dragMomentum:c=!0}=e;return{...e,drag:n,dragDirectionLock:i,dragPropagation:r,dragConstraints:s,dragElastic:a,dragMomentum:c}}}function xN(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function VH(t,e,n){const i=AM(t,xN(n)),r=AM(e,xN(n));return()=>{i(),r()}}function zg(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function qH(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class YH extends Fl{constructor(e){super(e),this.removeGroupControls=vs,this.removeListeners=vs,this.controls=new ZH(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||vs}update(){const{dragControls:e}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const MS=t=>(e,n)=>{t&&an.update(()=>t(e,n),!1,!0)};class GH extends Fl{constructor(){super(...arguments),this.removePointerDownListener=vs}onPointerDown(e){this.session=new tB(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:eB(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:i,onPanEnd:r}=this.node.getProps();return{onSessionStart:MS(e),onStart:MS(n),onMove:MS(i),onEnd:(s,a)=>{delete this.session,r&&an.postRender(()=>r(s,a))}}}mount(){this.removePointerDownListener=Kd(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let NS=!1;class FH extends T.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:i,layoutId:r}=this.props,{projection:s}=e;s&&(n.group&&n.group.add(s),i&&i.register&&r&&i.register(s),NS&&s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),BO.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:i,drag:r,isPresent:s}=this.props,{projection:a}=i;return a&&(a.isPresent=s,e.layoutDependency!==n&&a.setOptions({...a.options,layoutDependency:n}),NS=!0,r||e.layoutDependency!==n||n===void 0||e.isPresent!==s?a.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?a.promote():a.relegate()||an.postRender(()=>{const c=a.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:e,layoutAnchor:n}=this.props,{projection:i}=e;i&&(i.options.layoutAnchor=n,i.root.didUpdate(),Q_.postRender(()=>{!i.currentAnimation&&i.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:i}=this.props,{projection:r}=e;NS=!0,r&&(r.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(r),i&&i.deregister&&i.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function iB(t){const[e,n]=Zj(),i=T.useContext(f_);return _.jsx(FH,{...t,layoutGroup:i,switchLayoutGroup:T.useContext(Kj),isPresent:e,safeToRemove:n})}const HH={pan:{Feature:GH},drag:{Feature:YH,ProjectionNode:Uj,MeasureLayout:iB}};function wN(t,e,n){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover",n==="Start");const r="onHover"+n,s=i[r];s&&an.postRender(()=>s(e,em(e)))}class WH extends Fl{mount(){const{current:e}=this.node;e&&(this.unmount=wF(e,(n,i)=>(wN(this.node,i,"Start"),r=>wN(this.node,r,"End"))))}unmount(){}}class KH extends Fl{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Wp(pp(this.node.current,"focus",()=>this.onFocus()),pp(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function EN(t,e,n){const{props:i}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&i.whileTap&&t.animationState.setActive("whileTap",n==="Start");const r="onTap"+(n==="End"?"":n),s=i[r];s&&an.postRender(()=>s(e,em(e)))}class JH extends Fl{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:n,propagate:i}=this.node.props;this.unmount=AF(e,(r,s)=>(EN(this.node,s,"Start"),(a,{success:c})=>EN(this.node,a,c?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:(i==null?void 0:i.tap)===!1})}unmount(){}}const b1=new WeakMap,QS=new WeakMap,e6=t=>{const e=b1.get(t.target);e&&e(t)},t6=t=>{t.forEach(e6)};function n6({root:t,...e}){const n=t||document;QS.has(n)||QS.set(n,{});const i=QS.get(n),r=JSON.stringify(e);return i[r]||(i[r]=new IntersectionObserver(t6,{root:t,...e})),i[r]}function i6(t,e,n){const i=n6(e);return b1.set(t,n),i.observe(t),()=>{b1.delete(t),i.unobserve(t)}}const r6={some:0,all:1};class s6 extends Fl{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var u;(u=this.stopObserver)==null||u.call(this);const{viewport:e={}}=this.node.getProps(),{root:n,margin:i,amount:r="some",once:s}=e,a={root:n?n.current:void 0,rootMargin:i,threshold:typeof r=="number"?r:r6[r]},c=h=>{const{isIntersecting:d}=h;if(this.isInView===d||(this.isInView=d,s&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:m,onViewportLeave:g}=this.node.getProps(),y=d?m:g;y&&y(h)};this.stopObserver=i6(this.node.current,a,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(o6(e,n))&&this.startObserver()}unmount(){var e;(e=this.stopObserver)==null||e.call(this),this.hasEnteredView=!1,this.isInView=!1}}function o6({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const a6={inView:{Feature:s6},tap:{Feature:JH},focus:{Feature:KH},hover:{Feature:WH}},l6={layout:{ProjectionNode:Uj,MeasureLayout:iB}},c6={...MH,...a6,...HH,...l6},u6=kH(c6,CH);function f6(t){return T.useEffect(()=>()=>t(),[])}function U_(){!I_.current&&gj();const[t]=T.useState(fb.current);return t}function h6(){const t=U_(),{reducedMotion:e}=T.useContext(Kc);return e==="never"?!1:e==="always"?!0:t}function Z_(t){return typeof t=="object"&&!Array.isArray(t)}function rB(t,e,n,i){return t==null?[]:typeof t=="string"&&Z_(e)?N_(t,n,i):t instanceof NodeList?Array.from(t):Array.isArray(t)?t.filter(r=>r!=null):[t]}function d6(t,e,n){return t*(e+1)+n*e}function _N(t,e,n,i){return typeof e=="number"?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):e==="<"?n:e.startsWith("<")?Math.max(0,n+parseFloat(e.slice(1))):i.get(e)??t}function p6(t,e,n){for(let i=0;i<t.length;i++){const r=t[i];r.at>e&&r.at<n&&(Hf(t,r),i--)}}function m6(t,e,n,i,r,s){p6(t,r,s);for(let a=0;a<e.length;a++)t.push({value:e[a],at:tn(r,s,i[a]),easing:AI(n,a)})}function g6(t,e,n=0){const i=e+1+e*n;for(let r=0;r<t.length;r++)t[r]=t[r]/i}function O6(t,e){return t.at===e.at?t.value===null?1:e.value===null?-1:0:t.at-e.at}const b6="easeInOut",y6=20;function v6(t,{defaultTransition:e={},...n}={},i,r){const s=e.duration||.3,a=new Map,c=new Map,u={},h=new Map;let d=0,m=0,g=0;for(let y=0;y<t.length;y++){const v=t[y];if(typeof v=="string"){h.set(v,m);continue}else if(!Array.isArray(v)){h.set(v.name,_N(m,v.at,d,h));continue}let[S,x,w={}]=v;w.at!==void 0&&(m=_N(m,w.at,d,h));let C=0;const k=(A,R,P,N=0,$=0)=>{const D=S6(A),{delay:U=0,times:V=ZI(D),type:X=e.type||"keyframes",repeat:ee,repeatType:le,repeatDelay:re=0,...G}=R;let{ease:oe=e.ease||"easeOut",duration:K}=R;const me=typeof U=="function"?U(N,$):U,fe=D.length,Te=__(X)?X:r==null?void 0:r[X||"keyframes"];if(fe<=2&&Te){let ie=100;if(fe===2&&E6(D)){const we=D[1]-D[0];ie=Math.abs(we)}const B={...e,...G};K!==void 0&&(B.duration=_r(K));const se=zI(B,ie,Te);oe=se.ease,K=se.duration}K??(K=s);const ze=m+me;V.length===1&&V[0]===0&&(V[1]=1);const tt=V.length-D.length;if(tt>0&&UI(V,tt),D.length===1&&D.unshift(null),ee&&ee<y6){const ie=K>0?re/K:0;K=d6(K,ee,re);const B=[...D],se=[...V];oe=Array.isArray(oe)?[...oe]:[oe];const we=[...oe],_e=le==="reverse"||le==="mirror";let be=B,Se=we;_e&&(be=[...B].reverse(),le==="reverse"&&(Se=[...we].reverse().map(Ee=>typeof Ee=="function"?m_(Ee):Ee)));for(let Ee=0;Ee<ee;Ee++){const Ie=_e&&Ee%2===0,Ye=Ie?be:B,Ge=Ie?Se:we,qe=(Ee+1)*(1+ie);ie>0&&(D.push(D[D.length-1]),V.push(qe),oe.push("linear")),D.push(...Ye);for(let He=0;He<Ye.length;He++)V.push(se[He]+qe),oe.push(He===0?"linear":AI(Ge,He-1))}g6(V,ee,ie)}const I=ze+K;m6(P,D,oe,V,ze,I),C=Math.max(me+K,C),g=Math.max(I,g)};if(li(S)){const A=TN(S,c);k(x,w,kN("default",A))}else{const A=rB(S,x,i,u),R=A.length;for(let P=0;P<R;P++){x=x,w=w;const N=A[P],$=TN(N,c);for(const D in x)k(x[D],x6(w,D),kN(D,$),P,R)}}d=m,m+=C}return c.forEach((y,v)=>{for(const S in y){const x=y[S];x.sort(O6);const w=[],C=[],k=[];for(let N=0;N<x.length;N++){const{at:$,value:D,easing:U}=x[N];w.push(D),C.push(Wf(0,g,$)),k.push(U||"easeOut")}C[0]!==0&&(C.unshift(0),w.unshift(w[0]),k.unshift(b6)),C[C.length-1]!==1&&(C.push(1),w.push(null)),a.has(v)||a.set(v,{keyframes:{},transition:{}});const A=a.get(v);A.keyframes[S]=w;const{type:R,...P}=e;A.transition[S]={...P,duration:g,ease:k,times:C,...n}}}),a}function TN(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function kN(t,e){return e[t]||(e[t]=[]),e[t]}function S6(t){return Array.isArray(t)?t:[t]}function x6(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const w6=t=>typeof t=="number",E6=t=>t.every(w6);function _6(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=ly(t)&&!pj(t)?new Pj(e):new Tj(e);n.mount(t),hp.set(t,n)}function T6(t){const e={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new JF(e);n.mount(t),hp.set(t,n)}function k6(t,e){return li(t)||typeof t=="number"||typeof t=="string"&&!Z_(e)}function sB(t,e,n,i){const r=[];if(k6(t,e))r.push(jj(t,Z_(e)&&e.default||e,n&&(n.default||n)));else{if(t==null)return r;const s=rB(t,e,i),a=s.length;for(let c=0;c<a;c++){const u=s[c],h=u instanceof Element?_6:T6;hp.has(u)||h(u);const d=hp.get(u),m={...n};"delay"in m&&typeof m.delay=="function"&&(m.delay=m.delay(c,a)),r.push(...P_(d,{...e,transition:m},{}))}}return r}function C6(t,e,n){const i=[],r=t.map(a=>{if(Array.isArray(a)&&typeof a[0]=="function"){const c=a[0],u=Wc(0);return u.on("change",c),a.length===1?[u,[0,1]]:a.length===2?[u,[0,1],a[1]]:[u,a[1],a[2]]}return a});return v6(r,e,n,{spring:fp}).forEach(({keyframes:a,transition:c},u)=>{i.push(...sB(u,a,c))}),i}function A6(t){return Array.isArray(t)&&t.some(Array.isArray)}function oB(t={}){const{scope:e,reduceMotion:n,skipAnimations:i}=t;function r(s,a,c){let u=[],h;const d={};if(n!==void 0&&(d.reduceMotion=n),i!==void 0&&(d.skipAnimations=i),A6(s)){const{onComplete:g,...y}=a||{};typeof g=="function"&&(h=g),u=C6(s,{...d,...y},e)}else{const{onComplete:g,...y}=c||{};typeof g=="function"&&(h=g),u=sB(s,a,{...d,...y},e)}const m=new ZG(u);return h&&m.finished.then(h),e&&(e.animations.push(m),m.finished.then(()=>{Hf(e.animations,m)})),m}return r}oB();function R6(){const t=Hp(()=>({current:null,animations:[]})),e=h6()??void 0,{skipAnimations:n}=T.useContext(Kc),i=T.useMemo(()=>oB({scope:t,reduceMotion:e,skipAnimations:n}),[t,e,n]);return f6(()=>{t.animations.forEach(r=>r.stop()),t.animations.length=0}),[t,i]}const CN=u6,aB="0123456789ABCDEFGHJKMNPQRSTVWXYZ",gb=32,P6=16,lB=10,AN=0xffffffffffff;var Nc;(function(t){t.Base32IncorrectEncoding="B32_ENC_INVALID",t.DecodeTimeInvalidCharacter="DEC_TIME_CHAR",t.DecodeTimeValueMalformed="DEC_TIME_MALFORMED",t.EncodeTimeNegative="ENC_TIME_NEG",t.EncodeTimeSizeExceeded="ENC_TIME_SIZE_EXCEED",t.EncodeTimeValueMalformed="ENC_TIME_MALFORMED",t.PRNGDetectFailure="PRNG_DETECT",t.ULIDInvalid="ULID_INVALID",t.Unexpected="UNEXPECTED",t.UUIDInvalid="UUID_INVALID"})(Nc||(Nc={}));class Zd extends Error{constructor(e,n){super(`${n} (${e})`),this.name="ULIDError",this.code=e}}function M6(t){const e=Math.floor(t()*gb)%gb;return aB.charAt(e)}function N6(t){const e=Q6(),n=e&&(e.crypto||e.msCrypto)||null;if(typeof(n==null?void 0:n.getRandomValues)=="function")return()=>{const i=new Uint8Array(1);return n.getRandomValues(i),i[0]/256};if(typeof(n==null?void 0:n.randomBytes)=="function")return()=>n.randomBytes(1).readUInt8()/256;throw new Zd(Nc.PRNGDetectFailure,"Failed to find a reliable PRNG")}function Q6(){return L6()?self:typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:null}function $6(t,e){let n="";for(;t>0;t--)n=M6(e)+n;return n}function D6(t,e=lB){if(isNaN(t))throw new Zd(Nc.EncodeTimeValueMalformed,`Time must be a number: ${t}`);if(t>AN)throw new Zd(Nc.EncodeTimeSizeExceeded,`Cannot encode a time larger than ${AN}: ${t}`);if(t<0)throw new Zd(Nc.EncodeTimeNegative,`Time must be positive: ${t}`);if(Number.isInteger(t)===!1)throw new Zd(Nc.EncodeTimeValueMalformed,`Time must be an integer: ${t}`);let n,i="";for(let r=e;r>0;r--)n=t%gb,i=aB.charAt(n)+i,t=(t-n)/gb;return i}function L6(){return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}function I6(t,e){const n=N6(),i=Date.now();return D6(i,lB)+$6(P6,n)}const j6={seq:42,at:"2026-10-13T09:00:00Z",node:{id:"3f9a0c7be21d44a8f6031c5d",user:"dana",host:"studio-mini",ip:"10.0.4.12",checkout:"~/github/kigster/agentic-workflow/agentilda",heartbeat_at:"2026-10-13T09:00:00Z",me:!0},repo:"github.com/kigster/agentilda",project:"agentilda",description:"A web-based software factory: spec, plan, build, review",run:{status:"running",started_at:"2026-10-13T09:00:00Z",up:2816200,down:202400,cost:14.8,agents_working:4},stations:[{key:"new",label:"New",agents:["leah-researcher"]},{key:"researched",label:"Researched",agents:["yoda-writer"]},{key:"ready_for_planning",label:"Planning",agents:["palpatine-planner"]},{key:"building",label:"Building",agents:["luke-backend","rey-frontend","r2d2-mechanic"]},{key:"building_ui",label:"Building UI",agents:["rey-frontend"]},{key:"in_review",label:"Review",agents:["hansolo-reviewer"]},{key:"pr",label:"Pull request",agents:[]}],plans:[{ordinal:"001.00",title:"Clean agent boundaries and transitions",slug:"clean-agent-boundaries",status:{key:"blocked",emoji:"⭕️",label:"Technical Block"},lane:"full",station:"building",up:125e4,down:90200,cost:8.5,started_at:"2026-10-13T09:00:00Z",elapsed:8040,cars:[{key:"001.00/luke-backend",agent:"luke-backend",role:"builder",round:1,rounds:2,model:"claude-opus-5-5",effort:"high",state:"stuck",phase:"calm",message:"Should Redis keys carry the checkout path?",history:["Should Redis keys carry the checkout path?"],up:374e3,down:26400,context:54100,context_limit:2e5,elapsed:229,remaining:971,held:!1,next_model:null},{key:"001.00/rey-frontend",agent:"rey-frontend",role:"builder",round:1,rounds:2,model:"claude-sonnet-5-5",effort:"high",state:"running",phase:"calm",message:"Running npm test: 52 of 465",history:["Running npm test: 52 of 465"],up:463700,down:32800,context:54100,context_limit:2e5,elapsed:229,remaining:971,held:!1,next_model:null}],pr:null,questions:[{id:"001.00/B1",number:1,heading:"B1 Redis key layout",body:"Should Redis keys carry the checkout path, or the remote URL plus the worktree name?",agent:"luke-backend",owner:"technical",answers:null,held:!1,asked_at:"2026-10-13T09:00:00Z"}],interrupted:null,claimed_by:"3f9a0c7be21d44a8f6031c5d"},{ordinal:"005.00",title:"Review state labels",slug:"review-state-labels",status:{key:"in_review",emoji:"👀",label:"In Review"},lane:"plan",station:"in_review",up:109e4,down:78800,cost:4.2,started_at:"2026-10-13T09:00:00Z",elapsed:5880,cars:[{key:"005.00/hansolo-reviewer",agent:"hansolo-reviewer",role:"builder",round:1,rounds:2,model:"claude-sonnet-5-5",effort:"high",state:"running",phase:"calm",message:"gh pr diff 44",history:["gh pr diff 44"],up:805800,down:56800,context:54100,context_limit:2e5,elapsed:229,remaining:971,held:!1,next_model:null}],pr:{number:44,url:"https://github.com/kigster/agentilda/pull/44",state:"open",ci:"pending",merged_at:null},questions:[],interrupted:null,claimed_by:"3f9a0c7be21d44a8f6031c5d"},{ordinal:"006.00",title:"Rename the trace directory",slug:"rename-trace-directory",status:{key:"building",emoji:"🟡",label:"Building"},lane:"quick",station:"building",up:476200,down:33400,cost:2.1,started_at:"2026-10-13T09:00:00Z",elapsed:365,cars:[{key:"006.00/r2d2-mechanic",agent:"r2d2-mechanic",role:"builder",round:1,rounds:2,model:"claude-sonnet-5-5",effort:"high",state:"running",phase:"calm",message:"Renaming TRACE_DIR callers",history:["Renaming TRACE_DIR callers"],up:476200,down:33400,context:54100,context_limit:2e5,elapsed:229,remaining:971,held:!1,next_model:null}],pr:null,questions:[{id:"006.00/B1",number:1,heading:"B1 Rebase",body:"The PR has a merge conflict in lib/agentilda/cli.rb. Should I rebase onto main?",agent:"r2d2-mechanic",owner:"technical",answers:["yes","no"],held:!1,asked_at:"2026-10-13T09:00:00Z"}],interrupted:null,claimed_by:"3f9a0c7be21d44a8f6031c5d"}],backlog:[{ordinal:"013.00",title:"Plain NNN plan numbers",status:{key:"new",emoji:"⚪️",label:"New"},lane:"full"},{ordinal:"012.00",title:"Linear two-way sync",status:{key:"product_blocked",emoji:"🅱️",label:"Product Block"},lane:"plan"}],models:[{id:"claude-opus-5-5",label:"Opus 5.5",rates:{in:5,out:25}},{id:"claude-sonnet-5-5",label:"Sonnet 5.5",rates:{in:3,out:15}},{id:"claude-haiku-5-5",label:"Haiku 5.5",rates:{in:1,out:5}}],autocompact:.4,log:[{at:"2026-10-13T09:00:00Z",source:"engine",level:"info",text:"started luke-backend on 001.00",plan:"001.00"}]},B6=[{seq:7,at:"2026-10-13T09:00:00Z",node:{id:"c07d5e1a99b2f3046e8a1d7b",user:"sam",host:"ci-runner-2",ip:"10.0.4.37",checkout:"/srv/checkouts/agentilda",heartbeat_at:"2026-10-13T09:00:00Z",me:!1},repo:"github.com/kigster/agentilda",project:"agentilda",description:"A web-based software factory: spec, plan, build, review",run:{status:"running",started_at:"2026-10-13T09:00:00Z",up:2816200,down:202400,cost:14.8,agents_working:4},stations:[{key:"new",label:"New",agents:["leah-researcher"]},{key:"researched",label:"Researched",agents:["yoda-writer"]},{key:"ready_for_planning",label:"Planning",agents:["palpatine-planner"]},{key:"building",label:"Building",agents:["luke-backend","rey-frontend","r2d2-mechanic"]},{key:"building_ui",label:"Building UI",agents:["rey-frontend"]},{key:"in_review",label:"Review",agents:["hansolo-reviewer"]},{key:"pr",label:"Pull request",agents:[]}],plans:[{ordinal:"010.00",title:"Cache agent registry lookups",slug:"review-state-labels",status:{key:"in_review",emoji:"👀",label:"In Review"},lane:"plan",station:"in_review",up:109e4,down:78800,cost:4.2,started_at:"2026-10-13T09:00:00Z",elapsed:5880,cars:[{key:"005.00/hansolo-reviewer",agent:"hansolo-reviewer",role:"builder",round:1,rounds:2,model:"claude-sonnet-5-5",effort:"high",state:"running",phase:"calm",message:"gh pr diff 44",history:["gh pr diff 44"],up:805800,down:56800,context:54100,context_limit:2e5,elapsed:229,remaining:971,held:!1,next_model:null}],pr:{number:44,url:"https://github.com/kigster/agentilda/pull/44",state:"open",ci:"pending",merged_at:null},questions:[],interrupted:null,claimed_by:"c07d5e1a99b2f3046e8a1d7b"}],backlog:[{ordinal:"013.00",title:"Plain NNN plan numbers",status:{key:"new",emoji:"⚪️",label:"New"},lane:"full"},{ordinal:"012.00",title:"Linear two-way sync",status:{key:"product_blocked",emoji:"🅱️",label:"Product Block"},lane:"plan"}],models:[{id:"claude-opus-5-5",label:"Opus 5.5",rates:{in:5,out:25}},{id:"claude-sonnet-5-5",label:"Sonnet 5.5",rates:{in:3,out:15}},{id:"claude-haiku-5-5",label:"Haiku 5.5",rates:{in:1,out:5}}],autocompact:.4,log:[]}],z6={me:j6,others:B6};class Ob extends Error{constructor(n,i){super(n);kt(this,"status");this.name="ApiError",this.status=i}}function cB(t=window.location.search){return new URLSearchParams(t).has("fixture")}function X6(){return structuredClone(z6)}async function uB(t){const e=await fetch(t,{headers:{Accept:"application/json"},credentials:"same-origin"});if(!e.ok)throw new Ob(`GET ${t} answered ${e.status}`,e.status);return await e.json()}const U6=()=>uB("/api/board");let zO=null;function y1(){return zO??(zO=uB("/api/session").catch(t=>{throw zO=null,t})),zO}function Z6(){zO=null}function V6(t){return{id:I6(),...t}}async function RN(t,e){return fetch("/api/commands",{method:"POST",credentials:"same-origin",headers:{"Content-Type":"application/json",Accept:"application/json","X-CSRF-Token":e},body:JSON.stringify(t)})}async function q6(t){let e=await RN(t,(await y1()).csrf);if(e.status===403){Z6();const n=await y1().catch(()=>{throw new Ob("POST /api/commands answered 403 and no new session could be fetched",403)});e=await RN(t,n.csrf)}if(e.status===202||e.status===422)return await e.json();throw new Ob(`POST /api/commands answered ${e.status}`,e.status)}async function Y6(t,e){const n=t.getReader();let i;for(;!(i=await n.read()).done;)e(i.value)}function G6(t){let e,n,i,r=!1;return function(a){e===void 0?(e=a,n=0,i=-1):e=H6(e,a);const c=e.length;let u=0;for(;n<c;){r&&(e[n]===10&&(u=++n),r=!1);let h=-1;for(;n<c&&h===-1;++n)switch(e[n]){case 58:i===-1&&(i=n-u);break;case 13:r=!0;case 10:h=n;break}if(h===-1)break;t(e.subarray(u,h),i),u=n,i=-1}u===c?e=void 0:u!==0&&(e=e.subarray(u),n-=u)}}function F6(t,e,n){let i=PN();const r=new TextDecoder;return function(a,c){if(a.length===0)n==null||n(i),i=PN();else if(c>0){const u=r.decode(a.subarray(0,c)),h=c+(a[c+1]===32?2:1),d=r.decode(a.subarray(h));switch(u){case"data":i.data=i.data?i.data+`
59
+ `+d:d;break;case"event":i.event=d;break;case"id":t(i.id=d);break;case"retry":const m=parseInt(d,10);isNaN(m)||e(i.retry=m);break}}}}function H6(t,e){const n=new Uint8Array(t.length+e.length);return n.set(t),n.set(e,t.length),n}function PN(){return{data:"",event:"",id:"",retry:void 0}}var W6=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n};const v1="text/event-stream",K6=1e3,MN="last-event-id";function J6(t,e){var{signal:n,headers:i,onopen:r,onmessage:s,onclose:a,onerror:c,openWhenHidden:u,fetch:h}=e,d=W6(e,["signal","headers","onopen","onmessage","onclose","onerror","openWhenHidden","fetch"]);return new Promise((m,g)=>{const y=Object.assign({},i);y.accept||(y.accept=v1);let v;function S(){v.abort(),document.hidden||R()}u||document.addEventListener("visibilitychange",S);let x=K6,w=0;function C(){document.removeEventListener("visibilitychange",S),window.clearTimeout(w),v.abort()}n==null||n.addEventListener("abort",()=>{C(),m()});const k=h??window.fetch,A=r??e8;async function R(){var P;v=new AbortController;try{const N=await k(t,Object.assign(Object.assign({},d),{headers:y,signal:v.signal}));await A(N),await Y6(N.body,G6(F6($=>{$?y[MN]=$:delete y[MN]},$=>{x=$},s))),a==null||a(),C(),m()}catch(N){if(!v.signal.aborted)try{const $=(P=c==null?void 0:c(N))!==null&&P!==void 0?P:x;window.clearTimeout(w),w=window.setTimeout(R,$)}catch($){C(),g($)}}}R()})}function e8(t){const e=t.headers.get("content-type");if(!(e!=null&&e.startsWith(v1)))throw new Error(`Expected content-type to be ${v1}, Actual: ${e}`)}const t8=4,n8=t=>Math.min(3e4,1e3*2**Math.max(0,t-1));class NN extends Error{}function i8(t,e="/api/events"){const n=new AbortController;let i=!1,r=0;return J6(e,{signal:n.signal,openWhenHidden:!0,headers:{Accept:"text/event-stream"},async onopen(s){if(!s.ok||!(s.headers.get("content-type")??"").includes("text/event-stream"))throw new NN(`GET ${e} answered ${s.status}`);r=0,t.onState("live"),i&&t.onReconnect(),i=!0},onmessage(s){s.data&&(s.event==="board"?t.onBoard(JSON.parse(s.data)):s.event==="reply"&&t.onReply(JSON.parse(s.data)))},onclose(){throw new NN("stream closed")},onerror(){return r+=1,t.onState(r>=t8?"offline":"reconnecting"),n8(r)}}).catch(()=>{}),()=>n.abort()}const $S=["board"];function r8(){return new oY({defaultOptions:{queries:{staleTime:1/0,refetchOnWindowFocus:!1,refetchOnReconnect:!1,retry:2},mutations:{retry:!1}}})}const s8=200,o8=t=>t.status!=="accepted";class a8{constructor(){kt(this,"waiters",new Map);kt(this,"early",new Map)}deliver(e){if(!o8(e))return;const n=this.waiters.get(e.id);if(n){this.waiters.delete(e.id),clearTimeout(n.timer),n.settle(e);return}this.early.set(e.id,e),this.early.size>s8&&this.early.delete(this.early.keys().next().value)}wait(e,n){const i=this.early.get(e);return i?(this.early.delete(e),Promise.resolve(i)):new Promise((r,s)=>{const a=setTimeout(()=>{this.waiters.delete(e),s(new Error(`No reply to command ${e} within ${Math.round(n/1e3)}s`))},n);this.waiters.set(e,{settle:r,timer:a})})}forget(e){const n=this.waiters.get(e);n&&clearTimeout(n.timer),this.waiters.delete(e)}clear(){for(const e of this.waiters.values())clearTimeout(e.timer);this.waiters.clear(),this.early.clear()}}const XO=new a8,QN=(t,e)=>t&&t.seq>=e.seq?t:e;function $N(t,e){if(!t)return e;const n=t.me&&e.me&&t.me.node.id===e.me.node.id?QN(t.me,e.me):e.me,i=new Map(t.others.map(s=>[s.node.id,s])),r=e.others.map(s=>QN(i.get(s.node.id),s));return n===t.me&&r.length===t.others.length&&r.every((s,a)=>s===t.others[a])?t:{me:n,others:r}}function l8(){const t=cB(),e=GE(),[n,i]=T.useState(t?"live":"reconnecting"),r=bY({queryKey:$S,queryFn:t?()=>Promise.resolve(X6()):U6,structuralSharing:(c,u)=>$N(c,u)});T.useEffect(()=>{if(!t)return i8({onBoard:c=>e.setQueryData($S,u=>$N(u,c)),onReply:c=>XO.deliver(c),onState:i,onReconnect:()=>void e.refetchQueries({queryKey:$S})})},[e,t]);const s=r.data;return{board:T.useMemo(()=>s!=null&&s.me?{me:s.me,others:s.others}:void 0,[s]),isLoading:r.isPending,waiting:!!s&&!s.me,error:r.error,connection:n,fixture:t}}const c8=6e4;async function u8(t,e=c8){const n=V6(t);if(cB())return{id:n.id,status:"done",reason:null,at:new Date().toISOString()};await y1();const i=XO.wait(n.id,e);try{const r=await q6(n);if(r.status==="refused")return XO.forget(n.id),r}catch(r){if(r instanceof Ob)throw XO.forget(n.id),r}return i}function f8(){return yY({mutationFn:t=>u8(t)})}const Jf=t=>t>=1e6?(t/1e6).toFixed(2)+"M":t>=1e3?(t/1e3).toFixed(1)+"k":String(t),fB=t=>{const e=Math.max(0,Math.floor(t));return e<60?`${e}s`:`${Math.floor(e/60)}m ${String(e%60).padStart(2,"0")}s`},Xg=t=>{const e=Math.max(0,Math.floor(t));return e<3600?fB(e):`${Math.floor(e/3600)}h ${String(Math.floor(e/60)%60).padStart(2,"0")}m`},h8=t=>"$"+t.toFixed(2),Ss=t=>t.endsWith(".00")?t.slice(0,-3):t,Es=t=>`${t.user}@${t.host}`,hB=(t,e)=>{if(!t||!e)return 0;const n=(Date.parse(e)-Date.parse(t))/1e3;return Number.isFinite(n)&&n>0?Math.floor(n):0},d8=t=>{const e=new Date(t);return Number.isNaN(e.getTime())?t:[e.getHours(),e.getMinutes(),e.getSeconds()].map(n=>String(n).padStart(2,"0")).join(":")},dB=(t,e)=>hB(t.node.heartbeat_at,e.at),V_={full:{label:"Full lane",color:"var(--lane-full)",bg:"var(--lane-full-bg)",from:"new",skip:[]},plan:{label:"Plan lane",color:"var(--lane-plan)",bg:"var(--lane-plan-bg)",from:"ready_for_planning",skip:[]},quick:{label:"Quick lane",color:"var(--lane-quick)",bg:"var(--lane-quick-bg)",from:"building",skip:["building_ui"]}};function DN(t,e){return Math.max(0,t.findIndex(n=>n.key===e))}function p8(t,e){const n=V_[t.lane],i=DN(e,t.station),r=DN(e,n.from),s=e.map((c,u)=>u<r?"off":n.skip.includes(c.key)?"skip":u<i?"done":u===i?"here":"ahead"),a=e.slice(0,-1).map((c,u)=>u<r?"off":u+1<=i?"done":"ahead");return{at:i,stops:s,segs:a,late:i>=e.length-2}}const Xo=t=>{var e;return((e=t.pr)==null?void 0:e.state)==="merged"},Ef=t=>{var e;return((e=t.pr)==null?void 0:e.state)==="approved"};function m8(t){if(Xo(t))return{color:"var(--merged)",bg:"color-mix(in srgb, var(--merged) 16%, var(--plate))"};if(Ef(t))return{color:"var(--go)",bg:"color-mix(in srgb, var(--go) 14%, var(--plate))"};const e=V_[t.lane];return{color:e.color,bg:e.bg}}const g8=(t,e)=>t.questions.find(n=>n.agent===e.agent);function O8(t,e){const n=g8(t,e);return n?{blocked:!0,label:"needs you",activity:n.body||n.heading}:e.state==="stuck"?{blocked:!0,label:"needs you",activity:e.message}:e.state==="failed"?{blocked:!0,label:"failed",activity:e.message}:{blocked:!1,label:"",activity:e.message}}const b8=(t,e)=>{var n;return((n=t.find(i=>i.id===e))==null?void 0:n.label)??e};function LN(t,e,n=!1){var u;const i=t.pr;if(n)return{cls:"is-gone",mark:"✅",say:`PR #${(i==null?void 0:i.number)??"?"} merged on GitHub, plan complete`,blocked:!1};if(i&&Xo(t))return{cls:"is-merged",mark:"✅",say:`PR #${i.number} merged on GitHub, plan complete`,blocked:!1};if(i&&Ef(t))return{cls:"is-done",mark:"✓",say:`reviewed, PR #${i.number} ready to merge`,blocked:!1};if(t.interrupted)return{cls:"is-blocked",mark:"⭕️",say:"needs a decision: keep or discard the interrupted agent's work",blocked:!0};const r=t.questions.find(h=>h.held);if(r)return{cls:"is-blocked is-held",mark:"⏸",say:`held blocked by you: ${r.body||r.heading}`,blocked:!0};const s=t.questions[0];if(s)return s.owner==="product"?{cls:"is-blocked",mark:"🅱️",say:`needs product decision: ${s.body||s.heading}`,blocked:!0}:{cls:"is-blocked",mark:"⭕️",say:`needs technical decision: ${s.body||s.heading}`,blocked:!0};const a=t.cars.find(h=>h.state==="stuck"||h.state==="failed");return a?{cls:"is-blocked",mark:"⭕️",say:`needs technical decision: ${a.message}`,blocked:!0}:{cls:"",mark:"🛠️",say:`working, at ${((u=e.find(h=>h.key===t.station))==null?void 0:u.label)??t.station}`,blocked:!1}}const y8=t=>t.questions.length>0||t.interrupted!==null,v8=t=>Ef(t)||Xo(t),pB=t=>`row-${t}`,S8=/^Running (.+): (\d+) of (\d+)$/;function x8(t){return t.flatMap(e=>e.cars.flatMap(n=>{const i=S8.exec(n.message);return i?[{plan:e,car:n,cmd:i[1],done:Number(i[2]),total:Number(i[3])}]:[]}))}const _d=t=>`tests:${t.car.key}`;function w8(t,e){return e.some(i=>i!==t&&i.plan.ordinal===t.plan.ordinal)?`${Ss(t.plan.ordinal)} tests, ${t.car.agent.split("-")[0]}`:`${Ss(t.plan.ordinal)} tests`}const hy=(t,e)=>`${t}:${e}`,E8=t=>t.state==="running"||t.state==="stuck";function _8({plan:t,car:e,models:n,open:i=!1,onOpen:r,modelSlot:s}){const a=O8(t,e),c=!r,u=["car",a.blocked&&"is-blocked",c&&"is-readonly"].filter(Boolean).join(" ");return _.jsxs("div",{className:u,"data-car":e.key,children:[_.jsxs("div",{className:"car-top",children:[c?_.jsx("span",{className:"car-agent",children:e.agent}):_.jsx("button",{type:"button",className:"car-open","aria-expanded":i,onClick:()=>r(t,e),children:e.agent}),a.label?_.jsx("span",{className:"car-model",children:a.label}):c||!s?_.jsx("span",{className:"car-model",children:b8(n,e.model)}):_.jsx("span",{className:"car-slot",children:s})]}),_.jsx("div",{className:"car-activity",title:a.blocked?a.activity:void 0,children:a.activity}),_.jsxs("div",{className:"car-stats",children:[_.jsxs("span",{title:"Tokens in",children:["↑ ",_.jsx("b",{children:Jf(e.up)})]}),_.jsxs("span",{title:"Tokens out",children:["↓ ",_.jsx("b",{children:Jf(e.down)})]}),_.jsx("span",{children:fB(e.elapsed)})]})]})}function T8({agent:t}){return _.jsxs("div",{className:"car is-queued is-blocked",children:[_.jsxs("div",{className:"car-top",children:[_.jsx("span",{className:"car-agent",children:t}),_.jsx("span",{className:"car-model",children:"interrupted"})]}),_.jsx("div",{className:"car-activity",children:"You interrupted it. Keep its work or discard it in Needs you."})]})}const k8={passing:{cls:"ci-pass",text:"CI passing"},pending:{cls:"ci-run",text:"CI running"},failing:{cls:"ci-fail",text:"CI failing"}},C8={open:{cls:"chip-progress",text:"review-in-progress"},approved:{cls:"chip-approved",text:"approved"},merged:{cls:"chip-merged",text:"merged"},rejected:{cls:"chip-rejected",text:"rejected"},closed:{cls:"",text:"closed"}};function IN({pr:t}){const e=t.state==="merged",n=!e&&t.ci?k8[t.ci]:null,i=C8[t.state];return _.jsxs("div",{className:"terminus",children:[_.jsxs("a",{className:`pr-link${e?" is-merged":""}`,href:t.url,target:"_blank",rel:"noopener noreferrer",children:["PR #",t.number,_.jsx("span",{className:"sr-only",children:" (opens GitHub in a new tab)"})]}),n&&_.jsx("span",{className:n.cls,children:n.text}),_.jsx("span",{className:`chip ${i.cls}`.trim(),children:i.text})]})}const A8=1e4,mB=1e3,R8=5*6e4,P8=(t,e)=>{const n=new Set(t);return n.delete(e),n};function jN(t,e=!1){const[n,i]=T.useState(new Set),[r,s]=T.useState(new Map),[a,c]=T.useState(new Map),[u,h]=T.useState(new Set),d=T.useRef(new Map),m=T.useRef(new Map),g=T.useCallback(v=>{const S=v.ordinal;i(x=>x.has(S)?P8(x,S):x),s(x=>x.has(S)?x:new Map(x).set(S,{plan:v,at:Date.now()}))},[]);T.useEffect(()=>{const v=x=>x.ordinal,S=new Set(t.map(v));for(const[x,w]of m.current)S.has(x)||(clearTimeout(d.current.get(x)),m.current.delete(x),g(w));for(const x of t){const w=v(x);!Xo(x)||m.current.has(w)||(m.current.set(w,x),d.current.set(w,setTimeout(()=>{i(C=>new Set(C).add(w)),d.current.set(w,setTimeout(()=>g(x),e?0:mB))},A8)))}c(x=>{const w=t.filter(k=>v8(k)&&!x.has(v(k))).map(v).sort();if(!w.length)return x;const C=new Map(x);for(const k of w)C.set(k,C.size+1);return C})},[t,g,e]),T.useEffect(()=>{const v=d.current,S=m.current;return()=>{for(const x of v.values())clearTimeout(x);v.clear(),S.clear()}},[]);const y=T.useCallback(v=>{h(S=>S.has(v)?S:new Set(S).add(v))},[]);return{retiring:n,gone:r,finishOrder:a,offBar:u,dropFromBar:y}}const Ug=t=>t;function q_({plan:t,stations:e,models:n,owner:i,faded:r=!1,retiring:s=!1,openCar:a,onOpenCar:c,renderModel:u}){var A;const h=V_[t.lane],d=p8(t,e),{color:m,bg:g}=m8(t),y=!!i,[v,S]=R6(),x=U_();T.useEffect(()=>{const R=v.current;if(!s||x||!R)return;const P=`${R.offsetHeight}px`;S(R,{opacity:[1,0,0],height:[P,P,"0px"],paddingTop:["18px","18px","0px"],paddingBottom:["20px","20px","0px"]},{duration:mB/1e3,times:[0,.6,1],ease:"easeInOut"})},[s,x,S,v]);const w=((A=e[d.at])==null?void 0:A.key)==="pr";let C;w&&t.pr?C=_.jsx(IN,{pr:t.pr}):t.interrupted&&!y?C=_.jsx(T8,{agent:t.interrupted.agent}):C=_.jsxs(_.Fragment,{children:[t.cars.map(R=>_.jsx(_8,{plan:t,car:R,models:n,open:a===R.key,onOpen:y?void 0:c,modelSlot:y||u==null?void 0:u(t,R)},R.key)),t.pr&&_.jsx(IN,{pr:t.pr})]});const k=["plan",r&&"is-theirs",s&&"is-retiring"].filter(Boolean).join(" ");return _.jsxs("article",{ref:v,className:k,id:y?void 0:pB(t.ordinal),"data-plan":t.ordinal,style:Ug({"--lane-color":m,"--lane-bg":g}),"aria-label":r&&i?`${Ss(t.ordinal)} ${t.title}, on ${Es(i)}, read only`:void 0,children:[_.jsxs("div",{className:"plan-head",children:[_.jsx("div",{className:"plan-id",children:Ss(t.ordinal)}),_.jsx("h3",{className:"plan-title",children:t.title}),_.jsxs("div",{className:"plan-meta",children:[_.jsx("span",{className:"lane",children:h.label}),i?_.jsxs("span",{children:["on ",Es(i)]}):_.jsxs(_.Fragment,{children:[_.jsxs("span",{title:"Tokens in",children:["↑ ",_.jsx("span",{children:Jf(t.up)})]}),_.jsxs("span",{title:"Tokens out",children:["↓ ",_.jsx("span",{children:Jf(t.down)})]})]})]})]}),_.jsxs("div",{className:"route",children:[_.jsxs("div",{className:"track","aria-hidden":"true",children:[d.segs.map((R,P)=>_.jsx("span",{className:`seg${R==="ahead"?"":` is-${R}`}`,style:Ug({"--i":P})},`seg-${P}`)),d.stops.map((R,P)=>_.jsx("span",{className:`stop${R==="ahead"?"":` is-${R}`}`,style:Ug({"--i":P})},`stop-${P}`))]}),_.jsx("div",{className:`cars${d.late?" is-late":""}`,style:Ug({"--col":d.at}),children:C})]})]})}function M8({stations:t}){return _.jsxs("div",{className:"stations",children:[_.jsx("span",{}),t.map(e=>_.jsxs("div",{className:"station-name",children:[e.label,_.jsx("span",{className:"station-agent",children:e.agents.map(n=>n.split("-")[0]).join(" + ")||" "})]},e.key))]})}function gB({stations:t,children:e}){return _.jsxs("div",{className:"board-inner",style:{"--stations":t.length},children:[_.jsx(M8,{stations:t}),e]})}function OB({name:t,facts:e}){return _.jsxs("div",{className:"machine-head",children:[_.jsx("h2",{children:t}),_.jsx("p",{children:e.map(n=>_.jsx("span",{children:n},n))})]})}const bB={retiring:new Set,gone:new Map},yB=(t,e)=>t.plans.filter(n=>!e.gone.has(hy(t.node.id,n.ordinal)));function N8({board:t,merged:e,retiring:n,gone:i,theirs:r=bB,...s}){const{me:a,others:c}=t,u=a.plans.filter(h=>!i.has(h.ordinal));return _.jsxs(gB,{stations:a.stations,children:[e&&_.jsx(OB,{name:Es(a.node),facts:[a.node.ip,`${u.length} plans`,"this machine"].filter(h=>h!==null)}),u.length===0&&!e&&_.jsx("p",{className:"board-empty",children:"No plans in this run yet. Add one from Action."}),u.map(h=>_.jsx(q_,{plan:h,stations:a.stations,models:a.models,retiring:n.has(h.ordinal),...s},h.ordinal)),e&&c.map(h=>_.jsx(Q8,{their:h,me:a,life:r},h.node.id))]})}function Q8({their:t,me:e,life:n}){const i=yB(t,n);return _.jsxs(_.Fragment,{children:[_.jsx(OB,{name:Es(t.node),facts:[t.node.ip,`${i.length} plans`,"read only",`last seen ${dB(t,e)}s ago`].filter(r=>r!==null)}),i.map(r=>_.jsx(q_,{plan:r,stations:t.stations,models:t.models,owner:t.node,faded:!0,retiring:n.retiring.has(hy(t.node.id,r.ordinal))},r.ordinal))]})}function $8({their:t,me:e,life:n=bB}){return _.jsxs(_.Fragment,{children:[_.jsxs("p",{className:"machine-note",children:["Read only. ",_.jsx("strong",{children:Es(t.node)}),t.node.ip?` (${t.node.ip})`:""," is working on these in ",t.node.checkout,"; this machine will not start them. Last seen ",dB(t,e),"s ago."]}),_.jsx(gB,{stations:t.stations,children:yB(t,n).map(i=>_.jsx(q_,{plan:i,stations:t.stations,models:t.models,owner:t.node,retiring:n.retiring.has(hy(t.node.id,i.ordinal))},i.ordinal))})]})}const D8=()=>window.matchMedia("(prefers-color-scheme: dark)").matches;function DS(){const t=document.documentElement.dataset.theme;return t==="light"||t==="dark"?t:D8()?"dark":"light"}function L8(){const[t,e]=T.useState(DS);T.useEffect(()=>{const i=window.matchMedia("(prefers-color-scheme: dark)"),r=()=>e(DS());return i.addEventListener("change",r),()=>i.removeEventListener("change",r)},[]);const n=T.useCallback(()=>{const i=DS()==="dark"?"light":"dark";document.documentElement.dataset.theme=i,e(i)},[]);return{theme:t,toggle:n}}const I8="/assets/logo-on-light-BciwqxcJ.png",j8="/assets/logo-on-dark-DI9gCdN4.png",B8=_.jsxs("svg",{viewBox:"0 0 24 24",width:"20",height:"20","aria-hidden":"true",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[_.jsx("circle",{cx:"12",cy:"12",r:"4"}),_.jsx("path",{d:"M12 2v2M12 20v2M4.9 4.9l1.4 1.4M17.7 17.7l1.4 1.4M2 12h2M20 12h2M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"})]}),z8=_.jsx("svg",{viewBox:"0 0 24 24",width:"20",height:"20","aria-hidden":"true",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinejoin:"round",children:_.jsx("path",{d:"M20 14.5A8 8 0 0 1 9.5 4a8 8 0 1 0 10.5 10.5z"})});function X8({snapshot:t,connection:e,fixture:n=!1,merged:i,onToggleMerged:r,actionMenu:s,stopAll:a,help:c}){const{theme:u,toggle:h}=L8(),{node:d,run:m}=t,g=Math.floor(hB(m.started_at,t.at)/60),y=t.project.toLowerCase()!=="agentilda",v=u==="dark"?"Switch to light theme":"Switch to dark theme";return _.jsxs("header",{className:"topbar",children:[_.jsxs("span",{className:"logo",title:"agentilda: the self-running software factory",children:[_.jsx("img",{className:"on-light",src:I8,alt:"agentilda",height:30}),_.jsx("img",{className:"on-dark",src:j8,alt:"agentilda",height:30})]}),_.jsxs("div",{className:"project",children:[y?_.jsx("h1",{className:"project-title",children:t.project}):_.jsx("h1",{className:"sr-only",children:"Agentilda control room"}),_.jsxs("p",{className:"project-meta",children:[t.description&&_.jsx("span",{children:t.description}),_.jsx("span",{className:"project-path",children:d.checkout}),_.jsxs("span",{className:"node",title:`Node ${d.id}, the first 96 bits of SHA-256("${Es(d)}").${d.ip?` IP ${d.ip}.`:""} Repository ${t.repo}`,children:["On ",_.jsx("strong",{children:Es(d)})]})]})]}),_.jsxs("span",{className:"topbar-stat",children:["Run ",_.jsxs("strong",{children:[g," min"]})]}),_.jsxs("span",{className:"topbar-stat",children:[_.jsx("strong",{children:m.agents_working})," agents working"]}),_.jsxs("span",{className:"topbar-stat",title:"Tokens in and out, all plans",children:["↑ ",_.jsx("strong",{children:Jf(m.up)}),"   ↓ ",_.jsx("strong",{children:Jf(m.down)})]}),_.jsxs("span",{className:"topbar-stat",children:[_.jsx("strong",{children:h8(m.cost)})," so far"]}),n&&_.jsx("span",{className:"sample",title:"Served from web/src/api/fixtures/board.json because the URL has ?fixture",children:"Fixture data"}),e!=="live"&&_.jsx("span",{className:`conn is-${e}`,role:"status",children:e==="offline"?"Offline, retrying":"Reconnecting…"}),_.jsx("span",{className:"topbar-spacer"}),_.jsx("button",{className:"btn btn-quiet",type:"button","aria-pressed":i,title:"Show every machine's plans on one board: ours first, theirs below and faded",onClick:r,children:"All machines"}),s,_.jsx("button",{className:"btn btn-quiet btn-icon",type:"button","aria-label":v,title:v,onClick:h,children:u==="dark"?B8:z8}),a,c]})}const U8=["debug","info","warn","error"],Z8=["engine","api"],BN=(t,e)=>{const n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n};function V8({lines:t}){const[e,n]=T.useState(new Set),[i,r]=T.useState(new Set(["debug"])),[s,a]=T.useState(""),[c,u]=T.useState(!0),h=T.useRef(null),d=T.useMemo(()=>[...new Set([...Z8,...t.map(y=>y.source)])],[t]),m=s.trim().toLowerCase(),g=t.filter(y=>!e.has(y.source)&&!i.has(y.level)&&(!m||y.text.toLowerCase().includes(m)));return T.useLayoutEffect(()=>{const y=h.current;c&&y&&(y.scrollTop=y.scrollHeight)}),T.useEffect(()=>{const y=h.current;if(!y)return;const v=()=>u(y.scrollHeight-y.scrollTop-y.clientHeight<24);return y.addEventListener("scroll",v),()=>y.removeEventListener("scroll",v)},[]),_.jsxs(_.Fragment,{children:[_.jsxs("div",{className:"log-tools",children:[_.jsxs("fieldset",{children:[_.jsx("legend",{children:"Show"}),d.map(y=>_.jsx("button",{className:"toggle",type:"button","aria-pressed":!e.has(y),onClick:()=>n(v=>BN(v,y)),children:y},y))]}),_.jsxs("fieldset",{children:[_.jsx("legend",{children:"Level"}),U8.map(y=>_.jsx("button",{className:"toggle",type:"button","aria-pressed":!i.has(y),onClick:()=>r(v=>BN(v,y)),children:y},y))]}),_.jsx("label",{className:"sr-only",htmlFor:"log-search",children:"Filter log lines"}),_.jsx("input",{className:"log-search",id:"log-search",type:"search",placeholder:"Filter, e.g. 001 or luke",value:s,onChange:y=>a(y.target.value)}),_.jsx("button",{className:"toggle log-follow",type:"button","aria-pressed":c,onClick:()=>u(y=>!y),children:"Follow"})]}),_.jsx("ol",{className:"log",ref:h,"aria-label":"Log lines, newest last",tabIndex:0,children:g.length?g.map((y,v)=>_.jsxs("li",{className:`is-${y.level}`,children:[_.jsx("time",{dateTime:y.at,children:d8(y.at)}),_.jsx("span",{className:"lvl",children:y.level}),_.jsx("span",{className:"src",children:y.source}),_.jsx("span",{className:"msg",children:y.text})]},`${y.at}-${v}`)):_.jsx("li",{className:"log-empty",children:"No lines match. Loosen the filters above."})}),_.jsx("p",{className:"log-path",children:"Tailing .agentilda/log/engine.log and .agentilda/log/api.log"})]})}const q8={duration:.3},Y8={duration:.45,ease:[.2,.7,.2,1]};function G8(t){const{plans:e,stations:n,others:i,gone:r,offBar:s,finishOrder:a,unblocking:c,onToggleUnblock:u,onShowPlan:h,onOpenMachine:d,onDropGone:m}=t,g=T.useRef(null),y=e.filter(D=>!r.has(D.ordinal)),v=[...y.map(D=>({plan:D,gone:!1,finished:Ef(D)||Xo(D)})),...[...r.values()].filter(D=>!s.has(D.plan.ordinal)).map(D=>({plan:D.plan,gone:!0,finished:!0}))],S=v.filter(D=>!D.finished).sort((D,U)=>D.plan.ordinal.localeCompare(U.plan.ordinal)),x=D=>a.get(D.plan.ordinal)??Number.MAX_SAFE_INTEGER,w=v.filter(D=>D.finished).sort((D,U)=>x(D)-x(U)||D.plan.ordinal.localeCompare(U.plan.ordinal)),C=T.useRef({gone:r,offBar:s,onDropGone:m});C.current={gone:r,offBar:s,onDropGone:m};const k=T.useCallback(()=>{const D=g.current;if(!D||D.scrollWidth<=D.clientWidth+1)return;const U=Date.now(),{gone:V,offBar:X,onDropGone:ee}=C.current,le=[...V.values()].filter(re=>!X.has(re.plan.ordinal)&&U-re.at>=R8).sort((re,G)=>re.at-G.at)[0];le&&ee(le.plan.ordinal)},[]);T.useEffect(k),T.useEffect(()=>{const D=setInterval(k,15e3);return()=>clearInterval(D)},[k]);const A=[...e.filter(D=>!r.has(D.ordinal)),...[...r.values()].map(D=>D.plan)],R=A.filter(Xo).length,P=A.filter(Ef).length,N=y.filter(D=>LN(D,n).blocked).length,$=({plan:D,gone:U})=>{const V=LN(D,n,U),X=V.blocked&&y8(D),ee=Ss(D.ordinal);return _.jsx(CN.li,{layout:"position",transition:Y8,exit:{opacity:0,transition:q8},children:_.jsxs("button",{type:"button",className:`pill ${V.cls}`.trim(),"data-plan":D.ordinal,title:`${ee} ${D.title}: ${V.say}`,"aria-label":`${ee} ${Xg(D.elapsed)}, ${V.say}`,"aria-expanded":X?c===D.ordinal:void 0,onClick:()=>X?u(D):h(D),children:[_.jsx("span",{className:"pill-mark","aria-hidden":"true",children:V.mark}),_.jsxs("span",{className:"pill-text",children:[_.jsx("span",{className:"pill-id",children:ee})," ",_.jsx("span",{className:"pill-time",children:Xg(D.elapsed)})]})]})},D.ordinal)};return _.jsxs("footer",{className:"statusbar","aria-labelledby":"statusbar-title",children:[_.jsx("h2",{id:"statusbar-title",children:"Plans"}),_.jsx("ol",{className:"pills",ref:g,children:_.jsxs(nH,{initial:!1,children:[S.map($),w.length>0&&_.jsx(CN.li,{layout:"position",className:"divider","aria-hidden":"true"},"divider"),w.map($)]})}),_.jsx("ol",{className:"pills pills-theirs","aria-label":"Plans on other machines, read only",children:i.flatMap(D=>D.plans.map(U=>{var G;const V=Xo(U),X=Ef(U),ee=((G=n.find(oe=>oe.key===U.station))==null?void 0:G.label)??U.station,le=Ss(U.ordinal),re=V?"merged on GitHub, complete":X?"reviewed, ready to merge":`at ${ee}`;return _.jsx("li",{children:_.jsxs("button",{type:"button",className:`pill${V?" is-gone":X?" is-done":""}`,title:`${le} ${U.title}: on ${Es(D.node)}, ${re}. Read only.`,"aria-label":`${le} ${Xg(U.elapsed)}, on ${Es(D.node)}, read only, ${re}`,onClick:()=>d(D.node.id),children:[_.jsx("span",{className:"pill-mark","aria-hidden":"true",children:V?"✅":X?"✓":"🖥️"}),_.jsxs("span",{className:"pill-text",children:[_.jsx("span",{className:"pill-id",children:le})," ",_.jsx("span",{className:"pill-time",children:Xg(U.elapsed)})]})]})},`${D.node.id}-${U.ordinal}`)}))}),_.jsxs("p",{className:"statusbar-sum",children:[R," merged, ",P," ready to merge, ",N," blocked"]})]})}function F8({run:t}){const e=t.total?Math.round(t.done/t.total*100):0;return _.jsxs(_.Fragment,{children:[_.jsxs("div",{className:"tests-head",children:[_.jsxs("h2",{children:[Ss(t.plan.ordinal)," ",t.plan.title,": tests"]}),_.jsxs("p",{children:[t.car.agent," ran ",_.jsx("code",{children:t.cmd}),". Still running."]})]}),_.jsxs("div",{className:"tests-stats","aria-live":"polite",children:[_.jsxs("div",{children:["Run",_.jsx("strong",{children:t.done})]}),_.jsxs("div",{children:["Of",_.jsx("strong",{children:t.total})]})]}),_.jsx("div",{className:"bar",role:"progressbar","aria-label":"Examples run","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":e,children:_.jsx("span",{className:"run",style:{width:`${e}%`}})})]})}function H8(t){const e=t.me.plans.filter(a=>!Xo(a)).map(a=>Ss(a.ordinal)),n=t.others.flatMap(a=>a.plans.filter(c=>!Xo(c)).map(c=>`${Ss(c.ordinal)} on ${Es(a.node)}`)),i=[t.me,...t.others].flatMap(a=>a.plans.filter(Xo).map(c=>Ss(c.ordinal))),s=[e.length?`${e.join(", ")} in this run`:"",n.join(", "),i.length?`${i.join(", ")} complete`:""].filter(Boolean);return s.length?`Not listed: ${s.join("; ")}.`:void 0}function W8(t,e){var r,s,a;if(!t)return[];const n=new Map(t.plans.map(c=>[c.ordinal,c])),i=[];for(const c of e.plans){const u=n.get(c.ordinal);if(!u)continue;const h=Ss(c.ordinal),d=c.pr;if(d&&d.state!==((r=u.pr)==null?void 0:r.state)&&d.state==="merged")i.push(`PR #${d.number} was merged on GitHub. ${h} is complete.`);else if(d&&d.state!==((s=u.pr)==null?void 0:s.state)&&d.state==="approved")i.push(`${h} was approved and is ready to merge.`);else if(c.station!==u.station){const m=((a=e.stations.find(g=>g.key===c.station))==null?void 0:a.label)??c.station;i.push(`${h} moved to ${m}.`)}}return i}function K8(t,e){const n=T.useRef(void 0);T.useEffect(()=>{if(!t)return;const i=W8(n.current,t);n.current=t,i.length&&e(i.join(" "))},[t,e])}const vB=T.createContext(null);function SB(){const t=T.useContext(vB);return{announce:t??(()=>{}),mounted:t!==null}}const mp=t=>`Refused: ${t.reason??"no reason given"}.`;function du(t){const{announce:e,mounted:n}=SB(),[i,r]=T.useState(null),[s,a]=T.useState(!1),c=T.useRef(!1),u=T.useCallback(async(h,d)=>{if(c.current)return null;c.current=!0,a(!0);let m;try{m=await t(h)}catch(y){m={id:"",status:"refused",reason:y instanceof Error?y.message:String(y),at:new Date().toISOString()}}c.current=!1;const g=m.status==="refused"?{tone:"refused",text:mp(m)}:{tone:"ok",text:typeof d=="string"?d:d(m)};return r(g),a(!1),e(g.text),m},[t,e]);return T.useMemo(()=>({send:u,outcome:i,pending:s,setOutcome:r,announced:n}),[u,i,s,n])}function J8({children:t}){const[e,n]=T.useState({text:"",n:0}),[i]=T.useState(()=>r=>n(s=>({text:r,n:s.n+1})));return _.jsxs(vB.Provider,{value:i,children:[t,_.jsx("p",{className:"sr-only","aria-live":"polite","data-testid":"announcer",children:_.jsx("span",{children:e.text},e.n)})]})}function pu({outcome:t,announced:e}){return _.jsx("p",{className:`feedback${(t==null?void 0:t.tone)==="refused"?" is-refused":""}`,"aria-live":e?void 0:"polite",children:(t==null?void 0:t.text)??""})}const eW={draft:"",inWords:!1,settled:null};class tW{constructor(){kt(this,"states",new Map);kt(this,"listeners",new Set);kt(this,"order",[]);kt(this,"subscribe",e=>(this.listeners.add(e),()=>this.listeners.delete(e)));kt(this,"get",e=>this.states.get(e)??eW);kt(this,"settledIds",()=>this.order)}update(e,n){const i={...this.get(e),...n};this.states.set(e,i),n.settled&&!this.order.includes(e)&&(this.order=[...this.order,e]);for(const r of this.listeners)r()}}const nW=new tW,iW=T.createContext(nW);function xB(){return T.useContext(iW)}function Y_(t){const e=xB();return[T.useSyncExternalStore(e.subscribe,()=>e.get(t)),i=>e.update(t,i)]}function wB(){const t=xB();return T.useSyncExternalStore(t.subscribe,t.settledIds).map(n=>({id:n,note:t.get(n).settled??""}))}function S1(){return S1=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)({}).hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},S1.apply(null,arguments)}function rW(t,e){if(t==null)return{};var n={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.indexOf(i)!==-1)continue;n[i]=t[i]}return n}let x1=[],EB=[];(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,1n,9,16,o,,x,1i,3,,i,,7,a,2,t,3,1k,,,7,2,2,2,3,9,,a,2,q,,2,3,1k,,,5,4,2,2,3,3,,u,2,3,,b,3,1k,,,8,,3,,3,k,2,m,6,,3,1k,,,7,2,2,2,3,7,3,a,2,u,,1n,5,3,3,,4,9,,14,5,1j,,,7,,3,,4,7,2,b,2,t,3,1k,,,7,,3,,4,7,2,b,2,f,,c,4,1j,2,,7,,3,,4,9,,a,2,t,3,1y,,4,6,,,,8,i,2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return!1;for(let e=0,n=x1.length;;){let i=e+n>>1;if(t<x1[i])n=i;else if(t>=EB[i])e=i+1;else return!0;if(e==n)return!1}}function zN(t){return t>=127462&&t<=127487}const XN=8205;function oW(t,e,n=!0,i=!0){return(n?_B:aW)(t,e,i)}function _B(t,e,n){if(e==t.length)return e;e&&TB(t.charCodeAt(e))&&kB(t.charCodeAt(e-1))&&e--;let i=LS(t,e);for(e+=UN(i);e<t.length;){let r=LS(t,e);if(i==XN||r==XN||n&&sW(r))e+=UN(r),i=r;else if(zN(r)){let s=0,a=e-2;for(;a>=0&&zN(LS(t,a));)s++,a-=2;if(s%2==0)break;e+=2}else break}return e}function aW(t,e,n){for(;e>1;){let i=_B(t,e-2,n);if(i<e)return i;e--}return 0}function LS(t,e){let n=t.charCodeAt(e);if(!kB(n)||e+1==t.length)return n;let i=t.charCodeAt(e+1);return TB(i)?(n-55296<<10)+(i-56320)+65536:n}function TB(t){return t>=56320&&t<57344}function kB(t){return t>=55296&&t<56320}function UN(t){return t<65536?1:2}class Nt{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,i){[e,n]=eh(this,e,n);let r=[];return this.decompose(0,e,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(n,this.length,r,1),Ro.from(r,this.length-(n-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){[e,n]=eh(this,e,n);let i=[];return this.decompose(e,n,i,0),Ro.from(i,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),r=new Jd(this),s=new Jd(e);for(let a=n,c=n;;){if(r.next(a),s.next(a),a=0,r.lineBreak!=s.lineBreak||r.done!=s.done||r.value!=s.value)return!1;if(c+=r.value.length,r.done||c>=i)return!0}}iter(e=1){return new Jd(this,e)}iterRange(e,n=this.length){return new CB(this,e,n)}iterLines(e,n){let i;if(e==null)i=this.iter();else{n==null&&(n=this.lines+1);let r=this.line(e).from;i=this.iterRange(r,Math.max(r,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new AB(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Nt.empty:e.length<=32?new Bn(e):Ro.from(Bn.split(e,[]))}}class Bn extends Nt{constructor(e,n=lW(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,i,r){for(let s=0;;s++){let a=this.text[s],c=r+a.length;if((n?i:c)>=e)return new cW(r,c,i,a);r=c+1,i++}}decompose(e,n,i,r){let s=e<=0&&n>=this.length?this:new Bn(ZN(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(r&1){let a=i.pop(),c=UO(s.text,a.text.slice(),0,s.length);if(c.length<=32)i.push(new Bn(c,a.length+s.length));else{let u=c.length>>1;i.push(new Bn(c.slice(0,u)),new Bn(c.slice(u)))}}else i.push(s)}replace(e,n,i){if(!(i instanceof Bn))return super.replace(e,n,i);[e,n]=eh(this,e,n);let r=UO(this.text,UO(i.text,ZN(this.text,0,e)),n),s=this.length+i.length-(n-e);return r.length<=32?new Bn(r,s):Ro.from(Bn.split(r,[]),s)}sliceString(e,n=this.length,i=`
60
+ `){[e,n]=eh(this,e,n);let r="";for(let s=0,a=0;s<=n&&a<this.text.length;a++){let c=this.text[a],u=s+c.length;s>e&&a&&(r+=i),e<u&&n>s&&(r+=c.slice(Math.max(0,e-s),n-s)),s=u+1}return r}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let i=[],r=-1;for(let s of e)i.push(s),r+=s.length+1,i.length==32&&(n.push(new Bn(i,r)),i=[],r=-1);return r>-1&&n.push(new Bn(i,r)),n}}class Ro extends Nt{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,n,i,r){for(let s=0;;s++){let a=this.children[s],c=r+a.length,u=i+a.lines-1;if((n?u:c)>=e)return a.lineInner(e,n,i,r);r=c+1,i=u+1}}decompose(e,n,i,r){for(let s=0,a=0;a<=n&&s<this.children.length;s++){let c=this.children[s],u=a+c.length;if(e<=u&&n>=a){let h=r&((a<=e?1:0)|(u>=n?2:0));a>=e&&u<=n&&!h?i.push(c):c.decompose(e-a,n-a,i,h)}a=u+1}}replace(e,n,i){if([e,n]=eh(this,e,n),i.lines<this.lines)for(let r=0,s=0;r<this.children.length;r++){let a=this.children[r],c=s+a.length;if(e>=s&&n<=c){let u=a.replace(e-s,n-s,i),h=this.lines-a.lines+u.lines;if(u.lines<h>>4&&u.lines>h>>6){let d=this.children.slice();return d[r]=u,new Ro(d,this.length-(n-e)+i.length)}return super.replace(s,c,u)}s=c+1}return super.replace(e,n,i)}sliceString(e,n=this.length,i=`
61
+ `){[e,n]=eh(this,e,n);let r="";for(let s=0,a=0;s<this.children.length&&a<=n;s++){let c=this.children[s],u=a+c.length;a>e&&s&&(r+=i),e<u&&n>a&&(r+=c.sliceString(e-a,n-a,i)),a=u+1}return r}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof Ro))return 0;let i=0,[r,s,a,c]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=n,s+=n){if(r==a||s==c)return i;let u=this.children[r],h=e.children[s];if(u!=h)return i+u.scanIdentical(h,n);i+=u.length+1}}static from(e,n=e.reduce((i,r)=>i+r.length+1,-1)){let i=0;for(let y of e)i+=y.lines;if(i<32){let y=[];for(let v of e)v.flatten(y);return new Bn(y,n)}let r=Math.max(32,i>>5),s=r<<1,a=r>>1,c=[],u=0,h=-1,d=[];function m(y){let v;if(y.lines>s&&y instanceof Ro)for(let S of y.children)m(S);else y.lines>a&&(u>a||!u)?(g(),c.push(y)):y instanceof Bn&&u&&(v=d[d.length-1])instanceof Bn&&y.lines+v.lines<=32?(u+=y.lines,h+=y.length+1,d[d.length-1]=new Bn(v.text.concat(y.text),v.length+1+y.length)):(u+y.lines>r&&g(),u+=y.lines,h+=y.length+1,d.push(y))}function g(){u!=0&&(c.push(d.length==1?d[0]:Ro.from(d,h)),h=-1,u=d.length=0)}for(let y of e)m(y);return g(),c.length==1?c[0]:new Ro(c,n)}}Nt.empty=new Bn([""],0);function lW(t){let e=-1;for(let n of t)e+=n.length+1;return e}function UO(t,e,n=0,i=1e9){for(let r=0,s=0,a=!0;s<t.length&&r<=i;s++){let c=t[s],u=r+c.length;u>=n&&(u>i&&(c=c.slice(0,i-r)),r<n&&(c=c.slice(n-r)),a?(e[e.length-1]+=c,a=!1):e.push(c)),r=u+1}return e}function ZN(t,e,n){return UO(t,[""],e,n)}class Jd{constructor(e,n=1){this.dir=n,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[n>0?1:(e instanceof Bn?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,r=this.nodes[i],s=this.offsets[i],a=s>>1,c=r instanceof Bn?r.text.length:r.children.length;if(a==(n>0?c:0)){if(i==0)return this.done=!0,this.value="",this;n>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(n>0?0:1)){if(this.offsets[i]+=n,e==0)return this.lineBreak=!0,this.value=`
62
+ `,this;e--}else if(r instanceof Bn){let u=r.text[a+(n<0?-1:0)];if(this.offsets[i]+=n,u.length>Math.max(0,e))return this.value=e==0?u:n>0?u.slice(e):u.slice(0,u.length-e),this;e-=u.length}else{let u=r.children[a+(n<0?-1:0)];e>u.length?(e-=u.length,this.offsets[i]+=n):(n<0&&this.offsets[i]--,this.nodes.push(u),this.offsets.push(n>0?1:(u instanceof Bn?u.text.length:u.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class CB{constructor(e,n,i){this.value="",this.done=!1,this.cursor=new Jd(e,n>i?-1:1),this.pos=n>i?e.length:0,this.from=Math.min(n,i),this.to=Math.max(n,i)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let i=n<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*n,this.value=r.length<=i?r:n<0?r.slice(r.length-i):r.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class AB{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:i,value:r}=this.inner.next(e);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Nt.prototype[Symbol.iterator]=function(){return this.iter()},Jd.prototype[Symbol.iterator]=CB.prototype[Symbol.iterator]=AB.prototype[Symbol.iterator]=function(){return this});let cW=class{constructor(e,n,i,r){this.from=e,this.to=n,this.number=i,this.text=r}get length(){return this.to-this.from}};function eh(t,e,n){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,n))]}function gi(t,e,n=!0,i=!0){return oW(t,e,n,i)}function uW(t){return t>=56320&&t<57344}function fW(t){return t>=55296&&t<56320}function vr(t,e){let n=t.charCodeAt(e);if(!fW(n)||e+1==t.length)return n;let i=t.charCodeAt(e+1);return uW(i)?(n-55296<<10)+(i-56320)+65536:n}function G_(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function Po(t){return t<65536?1:2}const w1=/\r\n?|\n/;var Qi=(function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t})(Qi||(Qi={}));class Uo{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;n<this.sections.length;n+=2)e+=this.sections[n];return e}get newLength(){let e=0;for(let n=0;n<this.sections.length;n+=2){let i=this.sections[n+1];e+=i<0?this.sections[n]:i}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let n=0,i=0,r=0;n<this.sections.length;){let s=this.sections[n++],a=this.sections[n++];a<0?(e(i,r,s),r+=s):r+=a,i+=s}}iterChangedRanges(e,n=!1){E1(this,e,n)}get invertedDesc(){let e=[];for(let n=0;n<this.sections.length;){let i=this.sections[n++],r=this.sections[n++];r<0?e.push(i,r):e.push(r,i)}return new Uo(e)}composeDesc(e){return this.empty?e:e.empty?this:RB(this,e)}mapDesc(e,n=!1){return e.empty?this:_1(this,e,n)}mapPos(e,n=-1,i=Qi.Simple){let r=0,s=0;for(let a=0;a<this.sections.length;){let c=this.sections[a++],u=this.sections[a++],h=r+c;if(u<0){if(h>e)return s+(e-r);s+=c}else{if(i!=Qi.Simple&&h>=e&&(i==Qi.TrackDel&&r<e&&h>e||i==Qi.TrackBefore&&r<e||i==Qi.TrackAfter&&h>e))return null;if(h>e||h==e&&n<0&&!c)return e==r||n<0?s:s+u;s+=u}r=h}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return s}touchesRange(e,n=e){for(let i=0,r=0;i<this.sections.length&&r<=n;){let s=this.sections[i++],a=this.sections[i++],c=r+s;if(a>=0&&r<=n&&c>=e)return r<e&&c>n?"cover":!0;r=c}return!1}toString(){let e="";for(let n=0;n<this.sections.length;){let i=this.sections[n++],r=this.sections[n++];e+=(e?" ":"")+i+(r>=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Uo(e)}static create(e){return new Uo(e)}}class si extends Uo{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return E1(this,(n,i,r,s,a)=>e=e.replace(r,r+(i-n),a),!1),e}mapDesc(e,n=!1){return _1(this,e,n,!0)}invert(e){let n=this.sections.slice(),i=[];for(let r=0,s=0;r<n.length;r+=2){let a=n[r],c=n[r+1];if(c>=0){n[r]=c,n[r+1]=a;let u=r>>1;for(;i.length<u;)i.push(Nt.empty);i.push(a?e.slice(s,s+a):Nt.empty)}s+=a}return new si(n,i)}compose(e){return this.empty?e:e.empty?this:RB(this,e,!0)}map(e,n=!1){return e.empty?this:_1(this,e,n,!0)}iterChanges(e,n=!1){E1(this,e,n)}get desc(){return Uo.create(this.sections)}filter(e){let n=[],i=[],r=[],s=new gp(this);e:for(let a=0,c=0;;){let u=a==e.length?1e9:e[a++];for(;c<u||c==u&&s.len==0;){if(s.done)break e;let d=Math.min(s.len,u-c);Ui(r,d,-1);let m=s.ins==-1?-1:s.off==0?s.ins:0;Ui(n,d,m),m>0&&Nl(i,n,s.text),s.forward(d),c+=d}let h=e[a++];for(;c<h;){if(s.done)break e;let d=Math.min(s.len,h-c);Ui(n,d,-1),Ui(r,d,s.ins==-1?-1:s.off==0?s.ins:0),s.forward(d),c+=d}}return{changes:new si(n,i),filtered:Uo.create(r)}}toJSON(){let e=[];for(let n=0;n<this.sections.length;n+=2){let i=this.sections[n],r=this.sections[n+1];r<0?e.push(i):r==0?e.push([i]):e.push([i].concat(this.inserted[n>>1].toJSON()))}return e}static of(e,n,i){let r=[],s=[],a=0,c=null;function u(d=!1){if(!d&&!r.length)return;a<n&&Ui(r,n-a,-1);let m=new si(r,s);c=c?c.compose(m.map(c)):m,r=[],s=[],a=0}function h(d){if(Array.isArray(d))for(let m of d)h(m);else if(d instanceof si){if(d.length!=n)throw new RangeError(`Mismatched change set length (got ${d.length}, expected ${n})`);u(),c=c?c.compose(d.map(c)):d}else{let{from:m,to:g=m,insert:y}=d;if(m>g||m<0||g>n)throw new RangeError(`Invalid change range ${m} to ${g} (in doc of length ${n})`);let v=y?typeof y=="string"?Nt.of(y.split(i||w1)):y:Nt.empty,S=v.length;if(m==g&&S==0)return;m<a&&u(),m>a&&Ui(r,m-a,-1),Ui(r,g-m,S),Nl(s,r,v),a=g}}return h(e),u(!c),c}static empty(e){return new si(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],i=[];for(let r=0;r<e.length;r++){let s=e[r];if(typeof s=="number")n.push(s,-1);else{if(!Array.isArray(s)||typeof s[0]!="number"||s.some((a,c)=>c&&typeof a!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)n.push(s[0],0);else{for(;i.length<r;)i.push(Nt.empty);i[r]=Nt.of(s.slice(1)),n.push(s[0],i[r].length)}}}return new si(n,i)}static createSet(e,n){return new si(e,n)}}function Ui(t,e,n,i=!1){if(e==0&&n<=0)return;let r=t.length-2;r>=0&&n<=0&&n==t[r+1]?t[r]+=e:r>=0&&e==0&&t[r]==0?t[r+1]+=n:i?(t[r]+=e,t[r+1]+=n):t.push(e,n)}function Nl(t,e,n){if(n.length==0)return;let i=e.length-2>>1;if(i<t.length)t[t.length-1]=t[t.length-1].append(n);else{for(;t.length<i;)t.push(Nt.empty);t.push(n)}}function E1(t,e,n){let i=t.inserted;for(let r=0,s=0,a=0;a<t.sections.length;){let c=t.sections[a++],u=t.sections[a++];if(u<0)r+=c,s+=c;else{let h=r,d=s,m=Nt.empty;for(;h+=c,d+=u,u&&i&&(m=m.append(i[a-2>>1])),!(n||a==t.sections.length||t.sections[a+1]<0);)c=t.sections[a++],u=t.sections[a++];e(r,h,s,d,m),r=h,s=d}}}function _1(t,e,n,i=!1){let r=[],s=i?[]:null,a=new gp(t),c=new gp(e);for(let u=-1;;){if(a.done&&c.len||c.done&&a.len)throw new Error("Mismatched change set lengths");if(a.ins==-1&&c.ins==-1){let h=Math.min(a.len,c.len);Ui(r,h,-1),a.forward(h),c.forward(h)}else if(c.ins>=0&&(a.ins<0||u==a.i||a.off==0&&(c.len<a.len||c.len==a.len&&!n))){let h=c.len;for(Ui(r,c.ins,-1);h;){let d=Math.min(a.len,h);a.ins>=0&&u<a.i&&a.len<=d&&(Ui(r,0,a.ins),s&&Nl(s,r,a.text),u=a.i),a.forward(d),h-=d}c.next()}else if(a.ins>=0){let h=0,d=a.len;for(;d;)if(c.ins==-1){let m=Math.min(d,c.len);h+=m,d-=m,c.forward(m)}else if(c.ins==0&&c.len<d)d-=c.len,c.next();else break;Ui(r,h,u<a.i?a.ins:0),s&&u<a.i&&Nl(s,r,a.text),u=a.i,a.forward(a.len-d)}else{if(a.done&&c.done)return s?si.createSet(r,s):Uo.create(r);throw new Error("Mismatched change set lengths")}}}function RB(t,e,n=!1){let i=[],r=n?[]:null,s=new gp(t),a=new gp(e);for(let c=!1;;){if(s.done&&a.done)return r?si.createSet(i,r):Uo.create(i);if(s.ins==0)Ui(i,s.len,0,c),s.next();else if(a.len==0&&!a.done)Ui(i,0,a.ins,c),r&&Nl(r,i,a.text),a.next();else{if(s.done||a.done)throw new Error("Mismatched change set lengths");{let u=Math.min(s.len2,a.len),h=i.length;if(s.ins==-1){let d=a.ins==-1?-1:a.off?0:a.ins;Ui(i,u,d,c),r&&d&&Nl(r,i,a.text)}else a.ins==-1?(Ui(i,s.off?0:s.len,u,c),r&&Nl(r,i,s.textBit(u))):(Ui(i,s.off?0:s.len,a.off?0:a.ins,c),r&&!a.off&&Nl(r,i,a.text));c=(s.ins>u||a.ins>=0&&a.len>u)&&(c||i.length>h),s.forward2(u),a.forward(u)}}}}class gp{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,n=this.i-2>>1;return n>=e.length?Nt.empty:e[n]}textBit(e){let{inserted:n}=this.set,i=this.i-2>>1;return i>=n.length&&!e?Nt.empty:n[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class xl{constructor(e,n,i,r){this.from=e,this.to=n,this.flags=i,this.goalColumn=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get undirectional(){return(this.flags&64)>0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}map(e,n=-1){let i,r;return this.empty?i=r=e.mapPos(this.from,n):(i=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),i==this.from&&r==this.to?this:new xl(i,r,this.flags,this.goalColumn)}extend(e,n=e,i=0){if(e<=this.anchor&&n>=this.anchor)return ce.range(e,n,void 0,void 0,i);let r=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return ce.range(this.anchor,r,void 0,void 0,i)}eq(e,n=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!n||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return ce.range(e.anchor,e.head)}static create(e,n,i,r){return new xl(e,n,i,r)}}class ce{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:ce.create(this.ranges.map(i=>i.map(e,n)),this.mainIndex)}eq(e,n=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let i=0;i<this.ranges.length;i++)if(!this.ranges[i].eq(e.ranges[i],n))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new ce([this.main],0)}addRange(e,n=!0){return ce.create([e].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(e,n=this.mainIndex){let i=this.ranges.slice();return i[n]=e,ce.create(i,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new ce(e.ranges.map(n=>xl.fromJSON(n)),e.main)}static single(e,n=e){return new ce([ce.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,r=0;r<e.length;r++){let s=e[r];if(s.empty?s.from<=i:s.from<i)return ce.normalized(e.slice(),n);i=s.to}return new ce(e,n)}static cursor(e,n=0,i,r){return xl.create(e,e,(n==0?0:n<0?8:16)|(i==null?7:Math.min(6,i)),r)}static range(e,n,i,r,s){let a=r==null?7:Math.min(6,r);return!s&&e!=n&&(s=n<e?1:-1),s&&(a|=s<0?8:16),n<e?xl.create(n,e,a|32,i):xl.create(e,n,a,i)}static undirectionalRange(e,n){return xl.create(e,n,64,void 0)}static normalized(e,n=0){let i=e[n];e.sort((r,s)=>r.from-s.from),n=e.indexOf(i);for(let r=1;r<e.length;r++){let s=e[r],a=e[r-1];if(s.empty?s.from<=a.to:s.from<a.to){let c=a.from,u=Math.max(s.to,a.to);r<=n&&n--,e.splice(--r,2,s.anchor>s.head?ce.range(u,c):ce.range(c,u))}}return new ce(e,n)}}function PB(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let F_=0;class De{constructor(e,n,i,r,s){this.combine=e,this.compareInput=n,this.compare=i,this.isStatic=r,this.id=F_++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new De(e.combine||(n=>n),e.compareInput||((n,i)=>n===i),e.compare||(e.combine?(n,i)=>n===i:H_),!!e.static,e.enables)}of(e){return new ZO([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new ZO(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new ZO(e,this,2,n)}from(e,n){return n||(n=i=>i),this.compute([e],i=>n(i.field(e)))}}function H_(t,e){return t==e||t.length==e.length&&t.every((n,i)=>n===e[i])}class ZO{constructor(e,n,i,r){this.dependencies=e,this.facet=n,this.type=i,this.value=r,this.id=F_++}dynamicSlot(e){var n;let i=this.value,r=this.facet.compareInput,s=this.id,a=e[s]>>1,c=this.type==2,u=!1,h=!1,d=[];for(let m of this.dependencies)m=="doc"?u=!0:m=="selection"?h=!0:(((n=e[m.id])!==null&&n!==void 0?n:1)&1)==0&&d.push(e[m.id]);return{create(m){return m.values[a]=i(m),1},update(m,g){if(u&&g.docChanged||h&&(g.docChanged||g.selection)||T1(m,d)){let y=i(m);if(c?!VN(y,m.values[a],r):!r(y,m.values[a]))return m.values[a]=y,1}return 0},reconfigure:(m,g)=>{let y,v=g.config.address[s];if(v!=null){let S=yb(g,v);if(this.dependencies.every(x=>x instanceof De?g.facet(x)===m.facet(x):x instanceof Li?g.field(x,!1)==m.field(x,!1):!0)||(c?VN(y=i(m),S,r):r(y=i(m),S)))return m.values[a]=S,0}else y=i(m);return m.values[a]=y,1}}}get extension(){return this}}function VN(t,e,n){if(t.length!=e.length)return!1;for(let i=0;i<t.length;i++)if(!n(t[i],e[i]))return!1;return!0}function T1(t,e){let n=!1;for(let i of e)ep(t,i)&1&&(n=!0);return n}function hW(t,e,n){let i=n.map(u=>t[u.id]),r=n.map(u=>u.type),s=i.filter(u=>!(u&1)),a=t[e.id]>>1;function c(u){let h=[];for(let d=0;d<i.length;d++){let m=yb(u,i[d]);if(r[d]==2)for(let g of m)h.push(g);else h.push(m)}return e.combine(h)}return{create(u){for(let h of i)ep(u,h);return u.values[a]=c(u),1},update(u,h){if(!T1(u,s))return 0;let d=c(u);return e.compare(d,u.values[a])?0:(u.values[a]=d,1)},reconfigure(u,h){let d=T1(u,i),m=h.config.facets[e.id],g=h.facet(e);if(m&&!d&&H_(n,m))return u.values[a]=g,0;let y=c(u);return e.compare(y,g)?(u.values[a]=g,0):(u.values[a]=y,1)}}}const Zg=De.define({static:!0});class Li{constructor(e,n,i,r,s){this.id=e,this.createF=n,this.updateF=i,this.compareF=r,this.spec=s,this.provides=void 0}static define(e){let n=new Li(F_++,e.create,e.update,e.compare||((i,r)=>i===r),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(Zg).find(i=>i.field==this);return((n==null?void 0:n.create)||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:i=>(i.values[n]=this.create(i),1),update:(i,r)=>{let s=i.values[n],a=this.updateF(s,r);return this.compareF(s,a)?0:(i.values[n]=a,1)},reconfigure:(i,r)=>{let s=i.facet(Zg),a=r.facet(Zg),c;return(c=s.find(u=>u.field==this))&&c!=a.find(u=>u.field==this)?(i.values[n]=c.create(i),1):r.config.address[this.id]!=null?(i.values[n]=r.field(this),0):(i.values[n]=this.create(i),1)}}}init(e){return[this,Zg.of({field:this,create:e})]}get extension(){return this}}const kc={lowest:4,low:3,default:2,high:1,highest:0};function Td(t){return e=>new MB(e,t)}const Fo={highest:Td(kc.highest),high:Td(kc.high),default:Td(kc.default),low:Td(kc.low),lowest:Td(kc.lowest)};class MB{constructor(e,n){this.inner=e,this.prec=n}get extension(){return this}}class dy{of(e){return new k1(this,e)}reconfigure(e){return dy.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class k1{constructor(e,n){this.compartment=e,this.inner=n}get extension(){return this}}class bb{constructor(e,n,i,r,s,a){for(this.base=e,this.compartments=n,this.dynamicSlots=i,this.address=r,this.staticValues=s,this.facets=a,this.statusTemplate=[];this.statusTemplate.length<i.length;)this.statusTemplate.push(0)}staticFacet(e){let n=this.address[e.id];return n==null?e.default:this.staticValues[n>>1]}static resolve(e,n,i){let r=[],s=Object.create(null),a=new Map;for(let g of dW(e,n,a))g instanceof Li?r.push(g):(s[g.facet.id]||(s[g.facet.id]=[])).push(g);let c=Object.create(null),u=[],h=[];for(let g of r)c[g.id]=h.length<<1,h.push(y=>g.slot(y));let d=i==null?void 0:i.config.facets;for(let g in s){let y=s[g],v=y[0].facet,S=d&&d[g]||[];if(y.every(x=>x.type==0))if(c[v.id]=u.length<<1|1,H_(S,y))u.push(i.facet(v));else{let x=v.combine(y.map(w=>w.value));u.push(i&&v.compare(x,i.facet(v))?i.facet(v):x)}else{for(let x of y)x.type==0?(c[x.id]=u.length<<1|1,u.push(x.value)):(c[x.id]=h.length<<1,h.push(w=>x.dynamicSlot(w)));c[v.id]=h.length<<1,h.push(x=>hW(x,v,y))}}let m=h.map(g=>g(c));return new bb(e,a,m,c,u,s)}}function dW(t,e,n){let i=[[],[],[],[],[]],r=new Map;function s(a,c){let u=r.get(a);if(u!=null){if(u<=c)return;let h=i[u].indexOf(a);h>-1&&i[u].splice(h,1),a instanceof k1&&n.delete(a.compartment)}if(r.set(a,c),Array.isArray(a))for(let h of a)s(h,c);else if(a instanceof k1){if(n.has(a.compartment))throw new RangeError("Duplicate use of compartment in extensions");let h=e.get(a.compartment)||a.inner;n.set(a.compartment,h),s(h,c)}else if(a instanceof MB)s(a.inner,a.prec);else if(a instanceof Li)i[c].push(a),a.provides&&s(a.provides,c);else if(a instanceof ZO)i[c].push(a),a.facet.extensions&&s(a.facet.extensions,kc.default);else{let h=a.extension;if(!h)throw new Error(`Unrecognized extension value in extension set (${a}).`);if(h==a)throw new Error(`Unrecognized extension value in extension set (${a}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(h,c)}}return s(t,kc.default),i.reduce((a,c)=>a.concat(c))}function ep(t,e){if(e&1)return 2;let n=e>>1,i=t.status[n];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;t.status[n]=4;let r=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|r}function yb(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const NB=De.define(),C1=De.define({combine:t=>t.some(e=>e),static:!0}),QB=De.define({combine:t=>t.length?t[0]:void 0,static:!0}),$B=De.define(),DB=De.define(),LB=De.define(),IB=De.define({combine:t=>t.length?t[0]:!1});class Ho{constructor(e,n){this.type=e,this.value=n}static define(){return new pW}}class pW{of(e){return new Ho(this,e)}}class mW{constructor(e){this.map=e}of(e){return new ut(this,e)}}class ut{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new ut(this.type,n)}is(e){return this.type==e}static define(e={}){return new mW(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let i=[];for(let r of e){let s=r.map(n);s&&i.push(s)}return i}}ut.reconfigure=ut.define();ut.appendConfig=ut.define();class Hn{constructor(e,n,i,r,s,a){this.startState=e,this.changes=n,this.selection=i,this.effects=r,this.annotations=s,this.scrollIntoView=a,this._doc=null,this._state=null,i&&PB(i,n.newLength),s.some(c=>c.type==Hn.time)||(this.annotations=s.concat(Hn.time.of(Date.now())))}static create(e,n,i,r,s,a){return new Hn(e,n,i,r,s,a)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(Hn.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}Hn.time=Ho.define();Hn.userEvent=Ho.define();Hn.addToHistory=Ho.define();Hn.remote=Ho.define();function gW(t,e){let n=[];for(let i=0,r=0;;){let s,a;if(i<t.length&&(r==e.length||e[r]>=t[i]))s=t[i++],a=t[i++];else if(r<e.length)s=e[r++],a=e[r++];else return n;!n.length||n[n.length-1]<s?n.push(s,a):n[n.length-1]<a&&(n[n.length-1]=a)}}function jB(t,e,n){var i;let r,s,a;return n?(r=e.changes,s=si.empty(e.changes.length),a=t.changes.compose(e.changes)):(r=e.changes.map(t.changes),s=t.changes.mapDesc(e.changes,!0),a=t.changes.compose(r)),{changes:a,selection:e.selection?e.selection.map(s):(i=t.selection)===null||i===void 0?void 0:i.map(r),effects:ut.mapEffects(t.effects,r).concat(ut.mapEffects(e.effects,s)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function A1(t,e,n){let i=e.selection,r=_f(e.annotations);return e.userEvent&&(r=r.concat(Hn.userEvent.of(e.userEvent))),{changes:e.changes instanceof si?e.changes:si.of(e.changes||[],n,t.facet(QB)),selection:i&&(i instanceof ce?i:ce.single(i.anchor,i.head)),effects:_f(e.effects),annotations:r,scrollIntoView:!!e.scrollIntoView}}function BB(t,e,n){let i=A1(t,e.length?e[0]:{},t.doc.length);e.length&&e[0].filter===!1&&(n=!1);for(let s=1;s<e.length;s++){e[s].filter===!1&&(n=!1);let a=!!e[s].sequential;i=jB(i,A1(t,e[s],a?i.changes.newLength:t.doc.length),a)}let r=Hn.create(t,i.changes,i.selection,i.effects,i.annotations,i.scrollIntoView);return bW(n?OW(r):r)}function OW(t){let e=t.startState,n=!0;for(let r of e.facet($B)){let s=r(t);if(s===!1){n=!1;break}Array.isArray(s)&&(n=n===!0?s:gW(n,s))}if(n!==!0){let r,s;if(n===!1)s=t.changes.invertedDesc,r=si.empty(e.doc.length);else{let a=t.changes.filter(n);r=a.changes,s=a.filtered.mapDesc(a.changes).invertedDesc}t=Hn.create(e,r,t.selection&&t.selection.map(s),ut.mapEffects(t.effects,s),t.annotations,t.scrollIntoView)}let i=e.facet(DB);for(let r=i.length-1;r>=0;r--){let s=i[r](t);s instanceof Hn?t=s:Array.isArray(s)&&s.length==1&&s[0]instanceof Hn?t=s[0]:t=BB(e,_f(s),!1)}return t}function bW(t){let e=t.startState,n=e.facet(LB),i=t;for(let r=n.length-1;r>=0;r--){let s=n[r](t);s&&Object.keys(s).length&&(i=jB(i,A1(e,s,t.changes.newLength),!0))}return i==t?t:Hn.create(e,t.changes,t.selection,i.effects,i.annotations,i.scrollIntoView)}const yW=[];function _f(t){return t==null?yW:Array.isArray(t)?t:[t]}var bn=(function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t})(bn||(bn={}));const vW=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let R1;try{R1=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function SW(t){if(R1)return R1.test(t);for(let e=0;e<t.length;e++){let n=t[e];if(/\w/.test(n)||n>"€"&&(n.toUpperCase()!=n.toLowerCase()||vW.test(n)))return!0}return!1}function xW(t){return e=>{if(!/\S/.test(e))return bn.Space;if(SW(e))return bn.Word;for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return bn.Word;return bn.Other}}class Ct{constructor(e,n,i,r,s,a){this.config=e,this.doc=n,this.selection=i,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=s,a&&(a._state=this);for(let c=0;c<this.config.dynamicSlots.length;c++)ep(this,c<<1);this.computeSlot=null}field(e,n=!0){let i=this.config.address[e.id];if(i==null){if(n)throw new RangeError("Field is not present in this state");return}return ep(this,i),yb(this,i)}update(...e){return BB(this,e,!0)}applyTransaction(e){let n=this.config,{base:i,compartments:r}=n;for(let c of e.effects)c.is(dy.reconfigure)?(n&&(r=new Map,n.compartments.forEach((u,h)=>r.set(h,u)),n=null),r.set(c.value.compartment,c.value.extension)):c.is(ut.reconfigure)?(n=null,i=c.value):c.is(ut.appendConfig)&&(n=null,i=_f(i).concat(c.value));let s;n?s=e.startState.values.slice():(n=bb.resolve(i,r,this),s=new Ct(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(u,h)=>h.reconfigure(u,this),null).values);let a=e.startState.facet(C1)?e.newSelection:e.newSelection.asSingle();new Ct(n,e.newDoc,a,s,(c,u)=>u.update(c,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:ce.cursor(n.from+e.length,-1)}))}changeByRange(e){let n=this.selection,i=e(n.ranges[0]),r=this.changes(i.changes),s=[i.range],a=_f(i.effects);for(let c=1;c<n.ranges.length;c++){let u=e(n.ranges[c]),h=this.changes(u.changes),d=h.map(r);for(let g=0;g<c;g++)s[g]=s[g].map(d);let m=r.mapDesc(h,!0);s.push(u.range.map(m)),r=r.compose(d),a=ut.mapEffects(a,d).concat(ut.mapEffects(_f(u.effects),m))}return{changes:r,selection:ce.create(s,n.mainIndex),effects:a}}changes(e=[]){return e instanceof si?e:si.of(e,this.doc.length,this.facet(Ct.lineSeparator))}toText(e){return Nt.of(e.split(this.facet(Ct.lineSeparator)||w1))}sliceDoc(e=0,n=this.doc.length){return this.doc.sliceString(e,n,this.lineBreak)}facet(e){let n=this.config.address[e.id];return n==null?e.default:(ep(this,n),yb(this,n))}toJSON(e){let n={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let i in e){let r=e[i];r instanceof Li&&this.config.address[r.id]!=null&&(n[i]=r.spec.toJSON(this.field(e[i]),this))}return n}static fromJSON(e,n={},i){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let r=[];if(i){for(let s in i)if(Object.prototype.hasOwnProperty.call(e,s)){let a=i[s],c=e[s];r.push(a.init(u=>a.spec.fromJSON(c,u)))}}return Ct.create({doc:e.doc,selection:ce.fromJSON(e.selection),extensions:n.extensions?r.concat([n.extensions]):r})}static create(e={}){let n=bb.resolve(e.extensions||[],new Map),i=e.doc instanceof Nt?e.doc:Nt.of((e.doc||"").split(n.staticFacet(Ct.lineSeparator)||w1)),r=e.selection?e.selection instanceof ce?e.selection:ce.single(e.selection.anchor,e.selection.head):ce.single(0);return PB(r,i.length),n.staticFacet(C1)||(r=r.asSingle()),new Ct(n,i,r,n.dynamicSlots.map(()=>null),(s,a)=>a.create(s),null)}get tabSize(){return this.facet(Ct.tabSize)}get lineBreak(){return this.facet(Ct.lineSeparator)||`
63
+ `}get readOnly(){return this.facet(IB)}phrase(e,...n){for(let i of this.facet(Ct.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(i,r)=>{if(r=="$")return"$";let s=+(r||1);return!s||s>n.length?i:n[s-1]})),e}languageDataAt(e,n,i=-1){let r=[];for(let s of this.facet(NB))for(let a of s(this,n,i))Object.prototype.hasOwnProperty.call(a,e)&&r.push(a[e]);return r}charCategorizer(e){let n=this.languageDataAt("wordChars",e);return xW(n.length?n[0]:"")}wordAt(e){let{text:n,from:i,length:r}=this.doc.lineAt(e),s=this.charCategorizer(e),a=e-i,c=e-i;for(;a>0;){let u=gi(n,a,!1);if(s(n.slice(u,a))!=bn.Word)break;a=u}for(;c<r;){let u=gi(n,c);if(s(n.slice(c,u))!=bn.Word)break;c=u}return a==c?null:ce.range(a+i,c+i)}}Ct.allowMultipleSelections=C1;Ct.tabSize=De.define({combine:t=>t.length?t[0]:4});Ct.lineSeparator=QB;Ct.readOnly=IB;Ct.phrases=De.define({compare(t,e){let n=Object.keys(t),i=Object.keys(e);return n.length==i.length&&n.every(r=>t[r]==e[r])}});Ct.languageData=NB;Ct.changeFilter=$B;Ct.transactionFilter=DB;Ct.transactionExtender=LB;dy.reconfigure=ut.define();function Wo(t,e,n={}){let i={};for(let r of t)for(let s of Object.keys(r)){let a=r[s],c=i[s];if(c===void 0)i[s]=a;else if(!(c===a||a===void 0))if(Object.hasOwnProperty.call(n,s))i[s]=n[s](c,a);else throw new Error("Config merge conflict for field "+s)}for(let r in e)i[r]===void 0&&(i[r]=e[r]);return i}class Bl{eq(e){return this==e}range(e,n=e){return P1.create(e,n,this)}}Bl.prototype.startSide=Bl.prototype.endSide=0;Bl.prototype.point=!1;Bl.prototype.mapMode=Qi.TrackDel;function W_(t,e){return t==e||t.constructor==e.constructor&&t.eq(e)}let P1=class zB{constructor(e,n,i){this.from=e,this.to=n,this.value=i}static create(e,n,i){return new zB(e,n,i)}};function M1(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class K_{constructor(e,n,i,r){this.from=e,this.to=n,this.value=i,this.maxPoint=r}get length(){return hf(this.to)}findIndex(e,n,i,r=0){let s=i?this.to:this.from;for(let a=r,c=s.length;;){if(a==c)return a;let u=a+c>>1,h=s[u]-e||(i?this.value[u].endSide:this.value[u].startSide)-n;if(u==a)return h>=0?a:c;h>=0?c=u:a=u+1}}between(e,n,i,r){for(let s=this.findIndex(n,-1e9,!0),a=this.findIndex(i,1e9,!1,s);s<a;s++)if(r(this.from[s]+e,this.to[s]+e,this.value[s])===!1)return!1}map(e,n,i,r,s){let a=[],c=[],u=[],h=-1,d=-1;e:for(let m=0;m<this.value.length;m++){let g=this.value[m],y=this.from[m]+e,v=this.to[m]+e,S,x;if(y==v){let w=n.mapPos(y,g.startSide,g.mapMode);if(w==null||(S=x=w,g.startSide!=g.endSide&&(x=n.mapPos(y,g.endSide),x<S)))continue}else if(S=n.mapPos(y,g.startSide),x=n.mapPos(v,g.endSide),S>x||S==x&&g.startSide>0&&g.endSide<=0)continue;if(!((x-S||g.endSide-g.startSide)<0))if(h<0&&(h=S),g.point&&(d=Math.max(d,x-S)),(S-i||g.startSide-r)>=0)a.push(g),c.push(S-h),u.push(x-h),i=x,r=g.endSide;else{if(S==x)for(let w=a.length;w>0;w--){if((S-(u[w-1]+h)||g.startSide-a[w-1].endSide)>=0){a.splice(w,0,g),c.splice(w,0,S-h),u.splice(w,0,x-h);continue e}if((S-(c[w-1]+h)||g.endSide-a[w-1].startSide)>0)break}s(S,x,g)}}return{mapped:a.length?new K_(c,u,a,d):null,pos:h}}}class wt{constructor(e,n,i,r){this.chunkPos=e,this.chunk=n,this.nextLayer=i,this.maxPoint=r}static create(e,n,i,r){return new wt(e,n,i,r)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:i=!1,filterFrom:r=0,filterTo:s=this.length}=e,a=e.filter;if(n.length==0&&!a)return this;if(i&&(n=n.slice().sort(M1)),this.isEmpty)return n.length?wt.of(n):this;let c=new XB(this,null,-1).goto(0),u=0,h=[],d=new Zo;for(;c.value||u<n.length;)if(u<n.length&&(c.from-n[u].from||c.startSide-n[u].value.startSide)>=0){let m=n[u++];d.addInner(m.from,m.to,m.value,!1)||h.push(m)}else c.rangeIndex==1&&c.chunkIndex<this.chunk.length&&(u==n.length||this.chunkEnd(c.chunkIndex)<n[u].from)&&(!a||r>this.chunkEnd(c.chunkIndex)||s<this.chunkPos[c.chunkIndex])&&d.addChunk(this.chunkPos[c.chunkIndex],this.chunk[c.chunkIndex])?c.nextChunk():((!a||r>c.to||s<c.from||a(c.from,c.to,c.value))&&(d.addInner(c.from,c.to,c.value,!1)||h.push(P1.create(c.from,c.to,c.value))),c.next());return d.finishInner(this.nextLayer.isEmpty&&!h.length?wt.empty:this.nextLayer.update({add:h,filter:a,filterFrom:r,filterTo:s}))}map(e){if(e.empty||this.isEmpty)return this;let n=[],i=[],r=-1,s,a=(u,h,d)=>{s||(s=new Zo),s.addRange(u,h,d,!1)};for(let u=0;u<this.chunk.length;u++){let h=this.chunkPos[u],d=this.chunk[u],m=e.touchesRange(h,h+d.length);if(m===!1)r=Math.max(r,d.maxPoint),n.push(d),i.push(e.mapPos(h));else if(m===!0){let[g,y]=n.length?[hf(i)+hf(n).length,hf(hf(n).value).endSide]:[-1,-1],{mapped:v,pos:S}=d.map(h,e,g,y,a);v&&(r=Math.max(r,v.maxPoint),n.push(v),i.push(S))}}let c=this.nextLayer.map(e);return s&&(c=s.finishInner(c)),n.length==0?c:new wt(i,n,c||wt.empty,r)}between(e,n,i){if(!this.isEmpty){for(let r=0;r<this.chunk.length;r++){let s=this.chunkPos[r],a=this.chunk[r];if(n>=s&&e<=s+a.length&&a.between(s,e-s,n-s,i)===!1)return}this.nextLayer.between(e,n,i)}}iter(e=0){return Op.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return Op.from(e).goto(n)}static compare(e,n,i,r,s=-1){let a=e.filter(m=>m.maxPoint>0||!m.isEmpty&&m.maxPoint>=s),c=n.filter(m=>m.maxPoint>0||!m.isEmpty&&m.maxPoint>=s),u=qN(a,c,i),h=new kd(a,u,s),d=new kd(c,u,s);i.iterGaps((m,g,y)=>YN(h,m,d,g,y,r)),i.empty&&i.length==0&&YN(h,0,d,0,0,r)}static eq(e,n,i=0,r){r==null&&(r=999999999);let s=e.filter(d=>!d.isEmpty&&n.indexOf(d)<0),a=n.filter(d=>!d.isEmpty&&e.indexOf(d)<0);if(s.length!=a.length)return!1;if(!s.length)return!0;let c=qN(s,a),u=new kd(s,c,0).goto(i),h=new kd(a,c,0).goto(i);for(;;){if(u.to!=h.to||!N1(u.active,h.active)||u.point&&(!h.point||!W_(u.point,h.point)))return!1;if(u.to>r)return!0;u.next(),h.next()}}static spans(e,n,i,r,s=-1){let a=new kd(e,null,s).goto(n),c=n,u=a.openStart;for(;;){let h=Math.min(a.to,i);if(a.point){let d=a.activeForPoint(a.to),m=a.pointFrom<n?d.length+1:a.point.startSide<0?d.length:Math.min(d.length,u);r.point(c,h,a.point,d,m,a.pointRank),u=Math.min(a.openEnd(h),d.length)}else h>c&&(r.span(c,h,a.active,u),u=a.openEnd(h));if(a.to>i)return u+(a.point&&a.to>i?1:0);c=a.to,a.next()}}static of(e,n=!1){let i=new Zo;for(let r of e instanceof P1?[e]:n?wW(e):e)i.add(r.from,r.to,r.value);return i.finish()}static join(e){if(!e.length)return wt.empty;let n=hf(e);for(let i=e.length-2;i>=0;i--)for(let r=e[i];r!=wt.empty;r=r.nextLayer)n=new wt(r.chunkPos,r.chunk,n,Math.max(r.maxPoint,n.maxPoint));return n}}wt.empty=new wt([],[],null,-1);function hf(t){return t[t.length-1]}function wW(t){if(t.length>1)for(let e=t[0],n=1;n<t.length;n++){let i=t[n];if(M1(e,i)>0)return t.slice().sort(M1);e=i}return t}wt.empty.nextLayer=wt.empty;class Zo{finishChunk(e){this.chunks.push(new K_(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,i){this.addRange(e,n,i,!0)}addRange(e,n,i,r){this.addInner(e,n,i,r)||(this.nextLayer||(this.nextLayer=new Zo)).addRange(e,n,i,r)}addInner(e,n,i,r){let s=e-this.lastTo||i.startSide-this.last.endSide;if(r&&s<=0&&(e-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return s<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=n,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let i=n.value.length-1;return this.last=n.value[i],this.lastFrom=n.from[i]+e,this.lastTo=n.to[i]+e,!0}finish(){return this.finishInner(wt.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=wt.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function qN(t,e,n){let i=new Map;for(let s of t)for(let a=0;a<s.chunk.length;a++)s.chunk[a].maxPoint<=0&&i.set(s.chunk[a],s.chunkPos[a]);let r=new Set;for(let s of e)for(let a=0;a<s.chunk.length;a++){let c=i.get(s.chunk[a]);c!=null&&(n?n.mapPos(c):c)==s.chunkPos[a]&&!(n!=null&&n.touchesRange(c,c+s.chunk[a].length))&&r.add(s.chunk[a])}return r}class XB{constructor(e,n,i,r=0){this.layer=e,this.skip=n,this.minPoint=i,this.rank=r}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,n=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,n,!1),this}gotoInner(e,n,i){for(;this.chunkIndex<this.layer.chunk.length;){let r=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(r)||this.layer.chunkEnd(this.chunkIndex)<e||r.maxPoint<this.minPoint))break;this.chunkIndex++,i=!1}if(this.chunkIndex<this.layer.chunk.length){let r=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],n,!0);(!i||this.rangeIndex<r)&&this.setRangeIndex(r)}this.next()}forward(e,n){(this.to-e||this.endSide-n)<0&&this.gotoInner(e,n,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],n=this.layer.chunk[this.chunkIndex],i=e+n.from[this.rangeIndex];if(this.from=i,this.to=e+n.to[this.rangeIndex],this.value=n.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class Op{constructor(e){this.heap=e}static from(e,n=null,i=-1){let r=[];for(let s=0;s<e.length;s++)for(let a=e[s];!a.isEmpty;a=a.nextLayer)a.maxPoint>=i&&r.push(new XB(a,n,i,s));return r.length==1?r[0]:new Op(r)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let i of this.heap)i.goto(e,n);for(let i=this.heap.length>>1;i>=0;i--)IS(this.heap,i);return this.next(),this}forward(e,n){for(let i of this.heap)i.forward(e,n);for(let i=this.heap.length>>1;i>=0;i--)IS(this.heap,i);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),IS(this.heap,0)}}}function IS(t,e){for(let n=t[e];;){let i=(e<<1)+1;if(i>=t.length)break;let r=t[i];if(i+1<t.length&&r.compare(t[i+1])>=0&&(r=t[i+1],i++),n.compare(r)<0)break;t[i]=n,t[e]=r,e=i}}class kd{constructor(e,n,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Op.from(e,n,i)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){Vg(this.active,e),Vg(this.activeTo,e),Vg(this.activeRank,e),this.minActive=GN(this.active,this.activeTo)}addActive(e){let n=0,{value:i,to:r,rank:s}=this.cursor;for(;n<this.activeRank.length&&(s-this.activeRank[n]||r-this.activeTo[n])>0;)n++;qg(this.active,n,i),qg(this.activeTo,n,r),qg(this.activeRank,n,s),e&&qg(e,n,this.cursor.from),this.minActive=GN(this.active,this.activeTo)}next(){let e=this.to,n=this.point;this.point=null;let i=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),i&&Vg(i,r)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let s=this.cursor.value;if(!s.point)this.addActive(i),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=s,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=s.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(i){this.openStart=0;for(let r=i.length-1;r>=0&&i[r]<e;r--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let n=[];for(let i=this.active.length-1;i>=0&&!(this.activeRank[i]<this.pointRank);i--)(this.activeTo[i]>e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&n.push(this.active[i]);return n.reverse()}openEnd(e){let n=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)n++;return n}}function YN(t,e,n,i,r,s){t.goto(e),n.goto(i);let a=i+r,c=i,u=i-e,h=!!s.boundChange;for(let d=!1;;){let m=t.to+u-n.to,g=m||t.endSide-n.endSide,y=g<0?t.to+u:n.to,v=Math.min(y,a);if(t.point||n.point?(t.point&&n.point&&W_(t.point,n.point)&&N1(t.activeForPoint(t.to),n.activeForPoint(n.to))||s.comparePoint(c,v,t.point,n.point),d=!1):(d&&(s.boundChange(c),d=!1),v>c&&!N1(t.active,n.active)&&s.compareRange(c,v,t.active,n.active),h&&v<a&&(m||t.openEnd(y)!=n.openEnd(y))&&(d=!0)),y>a)break;c=y,g<=0&&t.next(),g>=0&&n.next()}}function N1(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n]&&!W_(t[n],e[n]))return!1;return!0}function Vg(t,e){for(let n=e,i=t.length-1;n<i;n++)t[n]=t[n+1];t.pop()}function qg(t,e,n){for(let i=t.length-1;i>=e;i--)t[i+1]=t[i];t[e]=n}function GN(t,e){let n=-1,i=1e9;for(let r=0;r<e.length;r++)(e[r]-i||t[r].endSide-t[n].endSide)<0&&(n=r,i=e[r]);return n}function Gs(t,e,n=t.length){let i=0;for(let r=0;r<n&&r<t.length;)t.charCodeAt(r)==9?(i+=e-i%e,r++):(i++,r=gi(t,r));return i}function Q1(t,e,n,i){for(let r=0,s=0;;){if(s>=e)return r;if(r==t.length)break;s+=t.charCodeAt(r)==9?n-s%n:1,r=gi(t,r)}return i===!0?-1:t.length}const $1="ͼ",FN=typeof Symbol>"u"?"__"+$1:Symbol.for($1),D1=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),HN=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class zl{constructor(e,n){this.rules=[];let{finish:i}=n||{};function r(a){return/^@/.test(a)?[a]:a.split(/,\s*/)}function s(a,c,u,h){let d=[],m=/^@(\w+)\b/.exec(a[0]),g=m&&m[1]=="keyframes";if(m&&c==null)return u.push(a[0]+";");for(let y in c){let v=c[y];if(/&/.test(y))s(y.split(/,\s*/).map(S=>a.map(x=>S.replace(/&/,x))).reduce((S,x)=>S.concat(x)),v,u);else if(v&&typeof v=="object"){if(!m)throw new RangeError("The value of a property ("+y+") should be a primitive value.");s(r(y),v,d,g)}else v!=null&&d.push(y.replace(/_.*/,"").replace(/[A-Z]/g,S=>"-"+S.toLowerCase())+": "+v+";")}(d.length||g)&&u.push((i&&!m&&!h?a.map(i):a).join(", ")+" {"+d.join(" ")+"}")}for(let a in e)s(r(a),e[a],this.rules)}getRules(){return this.rules.join(`
64
+ `)}static newName(){let e=HN[FN]||1;return HN[FN]=e+1,$1+e.toString(36)}static mount(e,n,i){let r=e[D1],s=i&&i.nonce;r?s&&r.setNonce(s):r=new EW(e,s),r.mount(Array.isArray(n)?n:[n],e)}}let WN=new Map;class EW{constructor(e,n){let i=e.ownerDocument||e,r=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let s=WN.get(i);if(s)return e[D1]=s;this.sheet=new r.CSSStyleSheet,WN.set(i,this)}else this.styleTag=i.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);this.modules=[],e[D1]=this}mount(e,n){let i=this.sheet,r=0,s=0,a=!1;for(let c=0;c<e.length;c++){let u=e[c],h=this.modules.indexOf(u);if(h<s&&h>-1&&(this.modules.splice(h,1),a=!0,s--,h=-1),h==-1){if(this.modules.splice(s++,0,u),a=!0,i)for(let d=0;d<u.rules.length;d++)i.insertRule(u.rules[d],r++)}else{for(;s<h;)r+=this.modules[s++].rules.length;r+=u.rules.length,s++}}if(i)n.adoptedStyleSheets.indexOf(this.sheet)<0&&(n.adoptedStyleSheets=[this.sheet,...n.adoptedStyleSheets]);else{if(a){let u="";for(let h=0;h<this.modules.length;h++)u+=this.modules[h].getRules()+`
65
+ `;this.styleTag.textContent=u}let c=n.head||n;this.styleTag.parentNode!=c&&c.insertBefore(this.styleTag,c.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}var Xl={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},bp={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},_W=typeof navigator<"u"&&/Mac/.test(navigator.platform),TW=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Ni=0;Ni<10;Ni++)Xl[48+Ni]=Xl[96+Ni]=String(Ni);for(var Ni=1;Ni<=24;Ni++)Xl[Ni+111]="F"+Ni;for(var Ni=65;Ni<=90;Ni++)Xl[Ni]=String.fromCharCode(Ni+32),bp[Ni]=String.fromCharCode(Ni);for(var jS in Xl)bp.hasOwnProperty(jS)||(bp[jS]=Xl[jS]);function kW(t){var e=_W&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||TW&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?bp:Xl)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function en(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var r=n[i];typeof r=="string"?t.setAttribute(i,r):r!=null&&(t[i]=r)}e++}for(;e<arguments.length;e++)UB(t,arguments[e]);return t}function UB(t,e){if(typeof e=="string")t.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)t.appendChild(e);else if(Array.isArray(e))for(var n=0;n<e.length;n++)UB(t,e[n]);else throw new RangeError("Unsupported child node: "+e)}let ir=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},L1=typeof document<"u"?document:{documentElement:{style:{}}};const I1=/Edge\/(\d+)/.exec(ir.userAgent),ZB=/MSIE \d/.test(ir.userAgent),j1=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ir.userAgent),py=!!(ZB||j1||I1),KN=!py&&/gecko\/(\d+)/i.test(ir.userAgent),BS=!py&&/Chrome\/(\d+)/.exec(ir.userAgent),JN="webkitFontSmoothing"in L1.documentElement.style,B1=!py&&/Apple Computer/.test(ir.vendor),eQ=B1&&(/Mobile\/\w+/.test(ir.userAgent)||ir.maxTouchPoints>2);var $e={mac:eQ||/Mac/.test(ir.platform),windows:/Win/.test(ir.platform),linux:/Linux|X11/.test(ir.platform),ie:py,ie_version:ZB?L1.documentMode||6:j1?+j1[1]:I1?+I1[1]:0,gecko:KN,gecko_version:KN?+(/Firefox\/(\d+)/.exec(ir.userAgent)||[0,0])[1]:0,chrome:!!BS,chrome_version:BS?+BS[1]:0,ios:eQ,android:/Android\b/.test(ir.userAgent),webkit:JN,webkit_version:JN?+(/\bAppleWebKit\/(\d+)/.exec(ir.userAgent)||[0,0])[1]:0,safari:B1,safari_version:B1?+(/\bVersion\/(\d+(\.\d+)?)/.exec(ir.userAgent)||[0,0])[1]:0,tabSize:L1.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function J_(t,e){for(let n in t)n=="class"&&e.class?e.class+=" "+t.class:n=="style"&&e.style?e.style+=";"+t.style:e[n]=t[n];return e}const vb=Object.create(null);function eT(t,e,n){if(t==e)return!0;t||(t=vb),e||(e=vb);let i=Object.keys(t),r=Object.keys(e);if(i.length-0!=r.length-0)return!1;for(let s of i)if(s!=n&&(r.indexOf(s)==-1||t[s]!==e[s]))return!1;return!0}function CW(t,e){for(let n=t.attributes.length-1;n>=0;n--){let i=t.attributes[n].name;e[i]==null&&t.removeAttribute(i)}for(let n in e){let i=e[n];n=="style"?t.style.cssText=i:t.getAttribute(n)!=i&&t.setAttribute(n,i)}}function tQ(t,e,n){let i=!1;if(e)for(let r in e)n&&r in n||(i=!0,r=="style"?t.style.cssText="":t.removeAttribute(r));if(n)for(let r in n)e&&e[r]==n[r]||(i=!0,r=="style"?t.style.cssText=n[r]:t.setAttribute(r,n[r]));return i}function AW(t){let e=Object.create(null);for(let n=0;n<t.attributes.length;n++){let i=t.attributes[n];e[i.name]=i.value}return e}class Hs{eq(e){return!1}updateDOM(e,n,i){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,n,i){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var $i=(function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t})($i||($i={}));class et extends Bl{constructor(e,n,i,r){super(),this.startSide=e,this.endSide=n,this.widget=i,this.spec=r}get heightRelevant(){return!1}static mark(e){return new tm(e)}static widget(e){let n=Math.max(-1e4,Math.min(1e4,e.side||0)),i=!!e.block;return n+=i&&!e.inlineOrder?n>0?3e8:-4e8:n>0?1e8:-1e8,new Jc(e,n,n,i,e.widget||null,!1)}static replace(e){let n=!!e.block,i,r;if(e.isBlockGap)i=-5e8,r=4e8;else{let{start:s,end:a}=VB(e,n);i=(s?n?-3e8:-1:5e8)-1,r=(a?n?2e8:1:-6e8)+1}return new Jc(e,i,r,n,e.widget||null,!0)}static line(e){return new nm(e)}static set(e,n=!1){return wt.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}et.none=wt.empty;class tm extends et{constructor(e){let{start:n,end:i}=VB(e);super(n?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.attrs=e.class&&e.attributes?J_(e.attributes,{class:e.class}):e.class?{class:e.class}:e.attributes||vb}eq(e){return this==e||e instanceof tm&&this.tagName==e.tagName&&eT(this.attrs,e.attrs)}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}tm.prototype.point=!1;class nm extends et{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof nm&&this.spec.class==e.spec.class&&eT(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}nm.prototype.mapMode=Qi.TrackBefore;nm.prototype.point=!0;class Jc extends et{constructor(e,n,i,r,s,a){super(n,i,s,e),this.block=r,this.isReplace=a,this.mapMode=r?n<=0?Qi.TrackBefore:Qi.TrackAfter:Qi.TrackDel}get type(){return this.startSide!=this.endSide?$i.WidgetRange:this.startSide<=0?$i.WidgetBefore:$i.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Jc&&RW(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}Jc.prototype.point=!0;function VB(t,e=!1){let{inclusiveStart:n,inclusiveEnd:i}=t;return n==null&&(n=t.inclusive),i==null&&(i=t.inclusive),{start:n??e,end:i??e}}function RW(t,e){return t==e||!!(t&&e&&t.compare(e))}function Tf(t,e,n,i=0){let r=n.length-1;r>=0&&n[r]+i>=t?n[r]=Math.max(n[r],e):n.push(t,e)}class yp extends Bl{constructor(e,n,i){super(),this.tagName=e,this.attributes=n,this.rank=i}eq(e){return e==this||e instanceof yp&&this.tagName==e.tagName&&eT(this.attributes,e.attributes)}static create(e){return new yp(e.tagName,e.attributes||vb,e.rank==null?50:Math.max(0,Math.min(e.rank,100)))}static set(e,n=!1){return wt.of(e,n)}}yp.prototype.startSide=yp.prototype.endSide=-1;const bi=t=>t.nodeType==1,th=t=>t.nodeType==3;function vp(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function z1(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function tp(t,e){if(!e.anchorNode)return!1;try{return z1(t,e.anchorNode)}catch{return!1}}function np(t){return th(t)?xp(t,0,t.nodeValue.length).getClientRects():bi(t)?t.getClientRects():[]}function ip(t,e,n,i){return n?nQ(t,e,n,i,-1)||nQ(t,e,n,i,1):!1}function Ul(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function Sb(t){return bi(t)&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function nQ(t,e,n,i,r){for(;;){if(t==n&&e==i)return!0;if(e==(r<0?0:Na(t))){if(t.nodeName=="DIV")return!1;let s=t.parentNode;if(!s||!bi(s))return!1;e=Ul(t)+(r<0?0:1),t=s}else if(bi(t)){if(t=t.childNodes[e+(r<0?-1:0)],bi(t)&&(t.nodeName=="IMG"||t.nodeName=="BR"||t.contentEditable=="false"))return!1;e=r<0?Na(t):0}else return!1}}function Na(t){return th(t)?t.nodeValue.length:t.childNodes.length}function Sp(t,e){let{left:n,right:i}=t;if(n==i)return t;let r=e?n:i;return{left:r,right:r,top:t.top,bottom:t.bottom}}function PW(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function qB(t,e){let n=e.width/t.offsetWidth,i=e.height/t.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(i>.995&&i<1.005||!isFinite(i)||Math.abs(e.height-t.offsetHeight)<1)&&(i=1),{scaleX:n,scaleY:i}}function MW(t,e,n,i,r,s,a,c){let u=t.ownerDocument,h=u.defaultView||window;for(let d=t,m=!1;d&&!m;)if(bi(d)){let g,y=d==u.body,v=1,S=1;if(y)g=PW(h);else{if(/^(fixed|sticky)$/.test(getComputedStyle(d).position)&&(m=!0),d.scrollHeight<=d.clientHeight&&d.scrollWidth<=d.clientWidth){d=d.assignedSlot||d.parentNode;continue}let C=d.getBoundingClientRect();({scaleX:v,scaleY:S}=qB(d,C)),g={left:C.left,right:C.left+d.clientWidth*v,top:C.top,bottom:C.top+d.clientHeight*S}}let x=0,w=0;if(r=="nearest")e.top<g.top+a?(w=e.top-(g.top+a),n>0&&e.bottom>g.bottom+w&&(w=e.bottom-g.bottom+a)):e.bottom>g.bottom-a&&(w=e.bottom-g.bottom+a,n<0&&e.top-w<g.top&&(w=e.top-(g.top+a)));else{let C=e.bottom-e.top,k=g.bottom-g.top;w=(r=="center"&&C<=k?e.top+C/2-k/2:r=="start"||r=="center"&&n<0?e.top-a:e.bottom-k+a)-g.top}if(i=="nearest"?e.left<g.left+s?(x=e.left-(g.left+s),n>0&&e.right>g.right+x&&(x=e.right-g.right+s)):e.right>g.right-s&&(x=e.right-g.right+s,n<0&&e.left<g.left+x&&(x=e.left-(g.left+s))):x=(i=="center"?e.left+(e.right-e.left)/2-(g.right-g.left)/2:i=="start"==c?e.left-s:e.right-(g.right-g.left)+s)-g.left,x||w)if(y)h.scrollBy(x,w);else{let C=0,k=0;if(w){let A=d.scrollTop;d.scrollTop+=w/S,k=(d.scrollTop-A)*S}if(x){let A=d.scrollLeft;d.scrollLeft+=x/v,C=(d.scrollLeft-A)*v}e={left:e.left-C,top:e.top-k,right:e.right-C,bottom:e.bottom-k},C&&Math.abs(C-x)<1&&(i="nearest"),k&&Math.abs(k-w)<1&&(r="nearest")}if(y)break;(e.top<g.top||e.bottom>g.bottom||e.left<g.left||e.right>g.right)&&(e={left:Math.max(e.left,g.left),right:Math.min(e.right,g.right),top:Math.max(e.top,g.top),bottom:Math.min(e.bottom,g.bottom)}),d=d.assignedSlot||d.parentNode}else if(d.nodeType==11)d=d.host;else break}function YB(t,e=!0){let n=t.ownerDocument,i=null,r=null;for(let s=t.parentNode;s&&!(s==n.body||(!e||i)&&r);)if(bi(s))!r&&s.scrollHeight>s.clientHeight&&(r=s),e&&!i&&s.scrollWidth>s.clientWidth&&(i=s),s=s.assignedSlot||s.parentNode;else if(s.nodeType==11)s=s.host;else break;return{x:i,y:r}}class NW{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:i}=e;this.set(n,Math.min(e.anchorOffset,n?Na(n):0),i,Math.min(e.focusOffset,i?Na(i):0))}set(e,n,i,r){this.anchorNode=e,this.anchorOffset=n,this.focusNode=i,this.focusOffset=r}}function GB(t){let e=[];for(let n=t;n;n=n.nodeType==11?n.host:n.parentNode)bi(n)&&e.push({node:n,left:n.scrollLeft,top:n.scrollTop});return e}function FB(t,e=!0){for(let{node:n,left:i,top:r}of t)e&&n.scrollTop!=r&&(n.scrollTop=r),n.scrollLeft!=i&&(n.scrollLeft=i)}let _c=null;$e.safari&&$e.safari_version>=26&&(_c=!1);function HB(t){if(t.setActive)return t.setActive();if(_c)return t.focus(_c);let e=GB(t);t.focus(_c==null?{get preventScroll(){return _c={preventScroll:!0},!0}}:void 0),_c||(_c=!1,FB(e))}let iQ;function xp(t,e,n=e){let i=iQ||(iQ=document.createRange());return i.setEnd(t,n),i.setStart(t,e),i}function kf(t,e,n,i){let r={key:e,code:e,keyCode:n,which:n,cancelable:!0};i&&({altKey:r.altKey,ctrlKey:r.ctrlKey,shiftKey:r.shiftKey,metaKey:r.metaKey}=i);let s=new KeyboardEvent("keydown",r);s.synthetic=!0,t.dispatchEvent(s);let a=new KeyboardEvent("keyup",r);return a.synthetic=!0,t.dispatchEvent(a),s.defaultPrevented||a.defaultPrevented}function QW(t){for(;t;){if(t&&(t.nodeType==9||t.nodeType==11&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}function $W(t,e){let n=e.focusNode,i=e.focusOffset;if(!n||e.anchorNode!=n||e.anchorOffset!=i)return!1;for(i=Math.min(i,Na(n));;)if(i){if(!bi(n))return!1;let r=n.childNodes[i-1];r.contentEditable=="false"?i--:(n=r,i=Na(n))}else{if(n==t)return!0;i=Ul(n),n=n.parentNode}}function WB(t){return t instanceof Window?t.pageYOffset>Math.max(0,t.document.documentElement.scrollHeight-t.innerHeight-4):t.scrollTop>Math.max(1,t.scrollHeight-t.clientHeight-4)}function KB(t,e){for(let n=t,i=e;;){if(th(n)&&i>0)return{node:n,offset:i};if(bi(n)&&i>0){if(n.contentEditable=="false")return null;n=n.childNodes[i-1],i=Na(n)}else if(n.parentNode&&!Sb(n))i=Ul(n),n=n.parentNode;else return null}}function JB(t,e){for(let n=t,i=e;;){if(th(n)&&i<n.nodeValue.length)return{node:n,offset:i};if(bi(n)&&i<n.childNodes.length){if(n.contentEditable=="false")return null;n=n.childNodes[i],i=0}else if(n.parentNode&&!Sb(n))i=Ul(n)+1,n=n.parentNode;else return null}}class qs{constructor(e,n,i=!0){this.node=e,this.offset=n,this.precise=i}static before(e,n){return new qs(e.parentNode,Ul(e),n)}static after(e,n){return new qs(e.parentNode,Ul(e)+1,n)}}var ln=(function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t})(ln||(ln={}));const eu=ln.LTR,tT=ln.RTL;function ez(t){let e=[];for(let n=0;n<t.length;n++)e.push(1<<+t[n]);return e}const DW=ez("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),LW=ez("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),X1=Object.create(null),yo=[];for(let t of["()","[]","{}"]){let e=t.charCodeAt(0),n=t.charCodeAt(1);X1[e]=n,X1[n]=-e}function tz(t){return t<=247?DW[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?LW[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8204?256:64336<=t&&t<=65023?4:1}const IW=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class Qo{get dir(){return this.level%2?tT:eu}constructor(e,n,i){this.from=e,this.to=n,this.level=i}side(e,n){return this.dir==n==e?this.to:this.from}forward(e,n){return e==(this.dir==n)}static find(e,n,i,r){let s=-1;for(let a=0;a<e.length;a++){let c=e[a];if(c.from<=n&&c.to>=n){if(c.level==i)return a;(s<0||(r!=0?r<0?c.from<n:c.to>n:e[s].level>c.level))&&(s=a)}}if(s<0)throw new RangeError("Index out of range");return s}}function nz(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++){let i=t[n],r=e[n];if(i.from!=r.from||i.to!=r.to||i.direction!=r.direction||!nz(i.inner,r.inner))return!1}return!0}const on=[];function jW(t,e,n,i,r){for(let s=0;s<=i.length;s++){let a=s?i[s-1].to:e,c=s<i.length?i[s].from:n,u=s?256:r;for(let h=a,d=u,m=u;h<c;h++){let g=tz(t.charCodeAt(h));g==512?g=d:g==8&&m==4&&(g=16),on[h]=g==4?2:g,g&7&&(m=g),d=g}for(let h=a,d=u,m=u;h<c;h++){let g=on[h];if(g==128)h<c-1&&d==on[h+1]&&d&24?g=on[h]=d:on[h]=256;else if(g==64){let y=h+1;for(;y<c&&on[y]==64;)y++;let v=h&&d==8||y<n&&on[y]==8?m==1?1:8:256;for(let S=h;S<y;S++)on[S]=v;h=y-1}else g==8&&m==1&&(on[h]=1);d=g,g&7&&(m=g)}}}function BW(t,e,n,i,r){let s=r==1?2:1;for(let a=0,c=0,u=0;a<=i.length;a++){let h=a?i[a-1].to:e,d=a<i.length?i[a].from:n;for(let m=h,g,y,v;m<d;m++)if(y=X1[g=t.charCodeAt(m)])if(y<0){for(let S=c-3;S>=0;S-=3)if(yo[S+1]==-y){let x=yo[S+2],w=x&2?r:x&4?x&1?s:r:0;w&&(on[m]=on[yo[S]]=w),c=S;break}}else{if(yo.length==189)break;yo[c++]=m,yo[c++]=g,yo[c++]=u}else if((v=on[m])==2||v==1){let S=v==r;u=S?0:1;for(let x=c-3;x>=0;x-=3){let w=yo[x+2];if(w&2)break;if(S)yo[x+2]|=2;else{if(w&4)break;yo[x+2]|=4}}}}}function zW(t,e,n,i){for(let r=0,s=i;r<=n.length;r++){let a=r?n[r-1].to:t,c=r<n.length?n[r].from:e;for(let u=a;u<c;){let h=on[u];if(h==256){let d=u+1;for(;;)if(d==c){if(r==n.length)break;d=n[r++].to,c=r<n.length?n[r].from:e}else if(on[d]==256)d++;else break;let m=s==1,g=(d<e?on[d]:i)==1,y=m==g?m?1:2:i;for(let v=d,S=r,x=S?n[S-1].to:t;v>u;)v==x&&(v=n[--S].from,x=S?n[S-1].to:t),on[--v]=y;u=d}else s=h,u++}}}function U1(t,e,n,i,r,s,a){let c=i%2?2:1;if(i%2==r%2)for(let u=e,h=0;u<n;){let d=!0,m=!1;if(h==s.length||u<s[h].from){let S=on[u];S!=c&&(d=!1,m=S==16)}let g=!d&&c==1?[]:null,y=d?i:i+1,v=u;e:for(;;)if(h<s.length&&v==s[h].from){if(m)break e;let S=s[h];if(!d)for(let x=S.to,w=h+1;;){if(x==n)break e;if(w<s.length&&s[w].from==x)x=s[w++].to;else{if(on[x]==c)break e;break}}if(h++,g)g.push(S);else{S.from>u&&a.push(new Qo(u,S.from,y));let x=S.direction==eu!=!(y%2);Z1(t,x?i+1:i,r,S.inner,S.from,S.to,a),u=S.to}v=S.to}else{if(v==n||(d?on[v]!=c:on[v]==c))break;v++}g?U1(t,u,v,i+1,r,g,a):u<v&&a.push(new Qo(u,v,y)),u=v}else for(let u=n,h=s.length;u>e;){let d=!0,m=!1;if(!h||u>s[h-1].to){let S=on[u-1];S!=c&&(d=!1,m=S==16)}let g=!d&&c==1?[]:null,y=d?i:i+1,v=u;e:for(;;)if(h&&v==s[h-1].to){if(m)break e;let S=s[--h];if(!d)for(let x=S.from,w=h;;){if(x==e)break e;if(w&&s[w-1].to==x)x=s[--w].from;else{if(on[x-1]==c)break e;break}}if(g)g.push(S);else{S.to<u&&a.push(new Qo(S.to,u,y));let x=S.direction==eu!=!(y%2);Z1(t,x?i+1:i,r,S.inner,S.from,S.to,a),u=S.from}v=S.from}else{if(v==e||(d?on[v-1]!=c:on[v-1]==c))break;v--}g?U1(t,v,u,i+1,r,g,a):v<u&&a.push(new Qo(v,u,y)),u=v}}function Z1(t,e,n,i,r,s,a){let c=e%2?2:1;jW(t,r,s,i,c),BW(t,r,s,i,c),zW(r,s,i,c),U1(t,r,s,e,n,i,a)}function XW(t,e,n){if(!t)return[new Qo(0,0,e==tT?1:0)];if(e==eu&&!n.length&&!IW.test(t))return iz(t.length);if(n.length)for(;t.length>on.length;)on[on.length]=256;let i=[],r=e==eu?0:1;return Z1(t,r,r,n,0,t.length,i),i}function iz(t){return[new Qo(0,t,0)]}let rz="";function UW(t,e,n,i,r){var s;if(!t.length)return null;let a=i.head-t.from,c;if(i.head==t.from&&i.assoc<0){if(!r)return null;a=e[c=0].side(!1,n)}else if(i.head==t.to&&i.assoc>0){if(r)return null;a=e[c=e.length-1].side(!0,n)}else c=Qo.find(e,a,(s=i.bidiLevel)!==null&&s!==void 0?s:-1,i.assoc);let u=e[c],h=u.side(r,n);if(a==h){let g=c+=r?1:-1;if(g<0||g>=e.length)return null;u=e[c=g],a=u.side(!r,n),h=u.side(r,n)}let d=gi(t.text,a,u.forward(r,n));(d<u.from||d>u.to)&&(d=h),rz=t.text.slice(Math.min(a,d),Math.max(a,d));let m=c==(r?e.length-1:0)?null:e[c+(r?1:-1)];if(d==h){if(!m)return r?ce.cursor(t.to,1):ce.cursor(t.from,-1);if(m.level+(r?0:1)<u.level)return ce.cursor(m.side(!r,n)+t.from,m.forward(r,n)?1:-1,m.level)}return ce.cursor(d+t.from,u.forward(r,n)?-1:1,u.level)}function ZW(t,e,n){for(let i=e;i<n;i++){let r=tz(t.charCodeAt(i));if(r==1)return eu;if(r==2||r==4)return tT}return eu}const sz=De.define(),oz=De.define(),az=De.define(),lz=De.define(),V1=De.define(),cz=De.define(),uz=De.define(),nT=De.define(),iT=De.define(),fz=De.define({combine:t=>t.some(e=>e)}),hz=De.define({combine:t=>t.some(e=>e)}),dz=De.define();class Cf{constructor(e,n,i,r,s,a=!1){this.range=e,this.y=n,this.x=i,this.yMargin=r,this.xMargin=s,this.isSnapshot=a}map(e){return e.empty?this:new Cf(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Cf(ce.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const Yg=ut.define({map:(t,e)=>t.map(e)}),pz=ut.define();function wr(t,e,n){let i=t.facet(lz);i.length?i[0](e):window.onerror&&window.onerror(String(e),n,void 0,void 0,e)||(n?console.error(n+":",e):console.error(e))}const Ea=De.define({combine:t=>t.length?t[0]:!0});let VW=0;const Sf=De.define({combine(t){return t.filter((e,n)=>{for(let i=0;i<n;i++)if(t[i].plugin==e.plugin)return!1;return!0})}});class Mn{constructor(e,n,i,r,s){this.id=e,this.create=n,this.domEventHandlers=i,this.domEventObservers=r,this.baseExtensions=s(this),this.extension=this.baseExtensions.concat(Sf.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(Sf.of({plugin:this,arg:e}))}static define(e,n){const{eventHandlers:i,eventObservers:r,provide:s,decorations:a}=n||{};return new Mn(VW++,e,i,r,c=>{let u=[];return a&&u.push(my.of(h=>{let d=h.plugin(c);return d?a(d):et.none})),s&&u.push(s(c)),u})}static fromClass(e,n){return Mn.define((i,r)=>new e(i,r),n)}}class zS{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(i){if(wr(n.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(n){wr(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(i){wr(e.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const mz=De.define(),rT=De.define(),my=De.define(),gz=De.define(),sT=De.define(),im=De.define(),Oz=De.define();function rQ(t,e){let n=t.state.facet(Oz);if(!n.length)return n;let i=n.map(s=>s instanceof Function?s(t):s),r=[];return wt.spans(i,e.from,e.to,{point(){},span(s,a,c,u){let h=s-e.from,d=a-e.from,m=r;for(let g=c.length-1;g>=0;g--,u--){let y=c[g].spec.bidiIsolate,v;if(y==null&&(y=ZW(e.text,h,d)),u>0&&m.length&&(v=m[m.length-1]).to==h&&v.direction==y)v.to=d,m=v.inner;else{let S={from:h,to:d,direction:y,inner:[]};m.push(S),m=S.inner}}}}),r}const bz=De.define();function oT(t){let e=0,n=0,i=0,r=0;for(let s of t.state.facet(bz)){let a=s(t);a&&(a.left!=null&&(e=Math.max(e,a.left)),a.right!=null&&(n=Math.max(n,a.right)),a.top!=null&&(i=Math.max(i,a.top)),a.bottom!=null&&(r=Math.max(r,a.bottom)))}return{left:e,right:n,top:i,bottom:r}}const Vd=De.define();class gs{constructor(e,n,i,r){this.fromA=e,this.toA=n,this.fromB=i,this.toB=r}join(e){return new gs(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,i=this;for(;n>0;n--){let r=e[n-1];if(!(r.fromA>i.toA)){if(r.toA<i.fromA)break;i=i.join(r),e.splice(n-1,1)}}return e.splice(n,0,i),e}static extendWithRanges(e,n){if(n.length==0)return e;let i=[];for(let r=0,s=0,a=0;;){let c=r<e.length?e[r].fromB:1e9,u=s<n.length?n[s]:1e9,h=Math.min(c,u);if(h==1e9)break;let d=h+a,m=h,g=d;for(;;)if(s<n.length&&n[s]<=m){let y=n[s+1];s+=2,m=Math.max(m,y);for(let v=r;v<e.length&&e[v].fromB<=m;v++)a=e[v].toA-e[v].toB;g=Math.max(g,y+a)}else if(r<e.length&&e[r].fromB<=m){let y=e[r++];m=Math.max(m,y.toB),g=Math.max(g,y.toA),a=y.toA-y.toB}else break;i.push(new gs(d,g,h,m))}return i}}class xb{constructor(e,n,i){this.view=e,this.state=n,this.transactions=i,this.flags=0,this.startState=e.state,this.changes=si.empty(this.startState.doc.length);for(let s of i)this.changes=this.changes.compose(s.changes);let r=[];this.changes.iterChangedRanges((s,a,c,u)=>r.push(new gs(s,a,c,u))),this.changedRanges=r}static create(e,n,i){return new xb(e,n,i)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}const qW=[];class Pn{constructor(e,n,i=0){this.dom=e,this.length=n,this.flags=i,this.parent=null,e.cmTile=this}get breakAfter(){return this.flags&1}get children(){return qW}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(e){if(this.flags|=2,this.flags&4){this.flags&=-5;let n=this.domAttrs;n&&CW(this.dom,n)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:"")+(this.breakAfter?"#":"")}destroy(){this.parent=null}setDOM(e){this.dom=e,e.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e,n=this.posAtStart){let i=n;for(let r of this.children){if(r==e)return i;i+=r.length+r.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,n,i){return null}domPosFor(e,n){let i=Ul(this.dom),r=this.length?e>0:n>0;return new qs(this.parent.dom,i+(r?1:0),e==0||e==this.length)}markDirty(e){this.flags&=-3,e&&(this.flags|=4),this.parent&&this.parent.flags&2&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let e=this;e;e=e.parent)if(e instanceof Oy)return e;return null}static get(e){return e.cmTile}}class gy extends Pn{constructor(e){super(e,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(e){this.children.push(e),e.parent=this}sync(e){if(this.flags&2)return;super.sync(e);let n=this.dom,i=null,r,s=(e==null?void 0:e.node)==n?e:null,a=0;for(let c of this.children){if(c.sync(e),a+=c.length+c.breakAfter,r=i?i.nextSibling:n.firstChild,s&&r!=c.dom&&(s.written=!0),c.dom.parentNode==n)for(;r&&r!=c.dom;)r=sQ(r);else n.insertBefore(c.dom,r);i=c.dom}for(r=i?i.nextSibling:n.firstChild,s&&r&&(s.written=!0);r;)r=sQ(r);this.length=a}}function sQ(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class Oy extends gy{constructor(e,n){super(n),this.view=e}owns(e){for(;e;e=e.parent)if(e==this)return!0;return!1}isBlock(){return!0}nearest(e){for(;;){if(!e)return null;let n=Pn.get(e);if(n&&this.owns(n))return n;e=e.parentNode}}blockTiles(e){for(let n=[],i=this,r=0,s=0;;)if(r==i.children.length){if(!n.length)return;i=i.parent,i.breakAfter&&s++,r=n.pop()}else{let a=i.children[r++];if(a instanceof ka)n.push(r),i=a,r=0;else{let c=s+a.length,u=e(a,s);if(u!==void 0)return u;s=c+a.breakAfter}}}resolveBlock(e,n){let i,r=-1,s,a=-1;if(this.blockTiles((c,u)=>{let h=u+c.length;if(e>=u&&e<=h){if(c.isWidget()&&n>=-1&&n<=1){if(c.flags&32)return!0;c.flags&16&&(i=void 0)}(u<e||e==h&&(n<-1?c.length:c.covers(1)))&&(!i||!c.isWidget()&&i.isWidget())&&(i=c,r=e-u),(h>e||e==u&&(n>1?c.length:c.covers(-1)))&&(!s||!c.isWidget()&&s.isWidget())&&(s=c,a=e-u)}}),!i&&!s)throw new Error("No tile at position "+e);return i&&n<0||!s?{tile:i,offset:r}:{tile:s,offset:a}}}class ka extends gy{constructor(e,n){super(e),this.wrapper=n}isBlock(){return!0}covers(e){return this.children.length?e<0?this.children[0].covers(-1):this.lastChild.covers(1):!1}get domAttrs(){return this.wrapper.attributes}static of(e,n){let i=new ka(n||document.createElement(e.tagName),e);return n||(i.flags|=4),i}}class nh extends gy{constructor(e,n){super(e),this.attrs=n}isLine(){return!0}static start(e,n,i){let r=new nh(n||document.createElement("div"),e);return(!n||!i)&&(r.flags|=4),r}get domAttrs(){return this.attrs}resolveInline(e,n,i=!1){let r=null,s=-1,a=null,c=-1;function u(d,m){for(let g=0,y=0;g<d.children.length&&y<=m;g++){let v=d.children[g],S=y+v.length;S>=m&&(v.isComposite()?u(v,m-y):(!a||i&&a.isHidden&&(n>0&&!(a.flags&32)||i&&GW(a,v)))&&(S>m||v.flags&32&&n<=1)?(a=v,c=m-y):(y<m||v.flags&16&&!(i&&v.isHidden)&&n>=-1)&&(r=v,s=m-y)),y=S}}u(this,e);let h=(n<0?r:a)||r||a;return h?{tile:h,offset:h==r?s:c}:null}coordsIn(e,n,i){let r=this.resolveInline(e,n,!0);return r?r.tile.coordsIn(Math.max(0,r.offset),n,i):YW(this)}domIn(e,n){let i=this.resolveInline(e,n);if(i){let{tile:r,offset:s}=i;if(this.dom.contains(r.dom))return r.isText()?new qs(r.dom,Math.min(r.dom.nodeValue.length,s)):r.domPosFor(s,r.flags&16?1:r.flags&32?-1:n);let a=i.tile.parent,c=!1;for(let u of a.children){if(c)return new qs(u.dom,0);u==i.tile&&(c=!0)}}return new qs(this.dom,0)}}function YW(t){let e=t.dom.lastChild;if(!e)return t.dom.getBoundingClientRect();let n=np(e);return n[n.length-1]||null}function GW(t,e){let n=t.coordsIn(0,1),i=e.coordsIn(0,1);return n&&i&&i.top<n.bottom}class xr extends gy{constructor(e,n){super(e),this.mark=n}get domAttrs(){return this.mark.attrs}static of(e,n){let i=new xr(n||document.createElement(e.tagName),e);return n||(i.flags|=4),i}}class Qc extends Pn{constructor(e,n){super(e,n.length),this.text=n}sync(e){this.flags&2||(super.sync(e),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text))}isText(){return!0}toString(){return JSON.stringify(this.text)}coordsIn(e,n,i){let r=this.dom.nodeValue.length;e>r&&(e=r);let s=e,a=e,c=0;e==0&&n<0||e==r&&n>=0?$e.chrome||$e.gecko||(e?(s--,c=1):a<r&&(a++,c=-1)):n<0?s--:a<r&&a++;let u=xp(this.dom,s,a).getClientRects();if(!u.length)return null;let h=u[(c?c<0:n>=0)?0:u.length-1];return $e.safari&&!c&&h.width==0&&(h=Array.prototype.find.call(u,d=>d.width)||h),i==null?h:Sp(h,(c?c>0:n<0)==i)}static of(e,n){let i=new Qc(n||document.createTextNode(e),e);return n||(i.flags|=2),i}}class tu extends Pn{constructor(e,n,i,r){super(e,n,r),this.widget=i}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(e){return this.flags&48?!1:(this.flags&(e<0?64:128))>0}coordsIn(e,n){return this.coordsInWidget(e,n,!1)}coordsInWidget(e,n,i){let r=this.widget.coordsAt(this.dom,e,n);if(r)return r;if(i)return Sp(this.dom.getBoundingClientRect(),this.length?e==0:n<=0);{let s=this.dom.getClientRects(),a=null;if(!s.length)return null;let c=this.flags&16?!0:this.flags&32?!1:e>0;for(let u=c?s.length-1:0;a=s[u],!(e>0?u==0:u==s.length-1||a.top<a.bottom);u+=c?-1:1);return Sp(a,!c)}}get overrideDOMText(){if(!this.length)return Nt.empty;let{root:e}=this;if(!e)return Nt.empty;let n=this.posAtStart;return e.view.state.doc.slice(n,n+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(e,n,i,r,s){return s||(s=e.toDOM(n),e.editable||(s.contentEditable="false")),new tu(s,i,e,r)}}class wb extends Pn{constructor(e){let n=document.createElement("img");n.className="cm-widgetBuffer",n.setAttribute("aria-hidden","true"),super(n,0,e)}get isHidden(){return!0}get overrideDOMText(){return Nt.empty}coordsIn(e,n,i){let r=this.dom.getBoundingClientRect();return i==null?r:Sp(r,n>0==i)}}class FW{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,n,i){let{tile:r,index:s,beforeBreak:a,parents:c}=this;for(;e||n>0;)if(r.isComposite())if(a){if(!e)break;i&&i.break(),e--,a=!1}else if(s==r.children.length){if(!e&&!c.length)break;i&&i.leave(r),a=!!r.breakAfter,{tile:r,index:s}=c.pop(),s++}else{let u=r.children[s],h=u.breakAfter;(n>0?u.length<=e:u.length<e)&&(!i||i.skip(u,0,u.length)!==!1||!u.isComposite)?(a=!!h,s++,e-=u.length):(c.push({tile:r,index:s}),r=u,s=0,i&&u.isComposite()&&i.enter(u))}else{let u=r.length;if(s<u&&e){let h=Math.min(e,u-s);i&&i.skip(r,s,s+h),e-=h,s+=h}if(s==u)a=!!r.breakAfter,{tile:r,index:s}=c.pop(),s++;else if(!e)break}return this.tile=r,this.index=s,this.beforeBreak=a,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}}class HW{constructor(e,n,i,r){this.from=e,this.to=n,this.wrapper=i,this.rank=r}}class WW{constructor(e,n,i){this.cache=e,this.root=n,this.blockWrappers=i,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(e,n,i,r){var s;this.flushBuffer();let a=this.ensureMarks(n,i),c=a.lastChild;if(c&&c.isText()&&!(c.flags&8)&&c.length+e.length<512){this.cache.reused.set(c,2);let u=a.children[a.children.length-1]=new Qc(c.dom,c.text+e);u.parent=a}else a.append(r||Qc.of(e,(s=this.cache.find(Qc))===null||s===void 0?void 0:s.dom));this.pos+=e.length,this.afterWidget=null}addComposition(e,n){let i=this.curLine;i.dom!=n.line.dom&&(i.setDOM(this.cache.reused.has(n.line)?XS(n.line.dom):n.line.dom),this.cache.reused.set(n.line,2));let r=i;for(let c=n.marks.length-1;c>=0;c--){let u=n.marks[c],h=r.lastChild;if(h instanceof xr&&h.mark.eq(u.mark))h.dom!=u.dom&&h.setDOM(XS(u.dom)),r=h;else{let{dom:d}=u;this.cache.reused.get(u)&&Pn.get(u.dom)&&(d=XS(u.dom));let m=xr.of(u.mark,d);r.append(m),r=m}this.cache.reused.set(u,2)}let s=Pn.get(e.text);s&&this.cache.reused.set(s,2);let a=new Qc(e.text,e.text.nodeValue);a.flags|=8,this.pos=e.range.toB,r.append(a)}addInlineWidget(e,n,i){let r=this.afterWidget&&e.flags&48&&(this.afterWidget.flags&48)==(e.flags&48);r||this.flushBuffer();let s=this.ensureMarks(n,i);!r&&!(e.flags&16)&&s.append(this.getBuffer(1)),s.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,n,i){this.flushBuffer(),this.ensureMarks(n,i).append(e),this.pos+=e.length,this.afterWidget=null}addBlockWidget(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}continueWidget(e){let n=this.afterWidget||this.lastBlock;n.length+=e,this.pos+=e}addLineStart(e,n){var i;e||(e=yz);let r=nh.start(e,n||((i=this.cache.find(nh))===null||i===void 0?void 0:i.dom),!!n);this.getBlockPos().append(this.lastBlock=this.curLine=r)}addLine(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(e){this.blockPosCovered()||this.addLineStart(e)}ensureLine(e){this.curLine||this.addLineStart(e)}ensureMarks(e,n){var i;let r=this.curLine;for(let s=e.length-1;s>=0;s--){let a=e[s],c;if(n>0&&(c=r.lastChild)&&c instanceof xr&&c.mark.eq(a))r=c,n--;else{let u=xr.of(a,(i=this.cache.find(xr,h=>h.mark.eq(a)))===null||i===void 0?void 0:i.dom);r.append(u),r=u,n=0}}return r}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;(!e||!oQ(this.curLine,!1)||e.dom.nodeName!="BR"&&e.isWidget()&&!($e.ios&&oQ(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(US,0,32)||new tu(US.toDOM(),0,US,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let e=this.wrappers.length-1;e>=0;e--)this.wrappers[e].to<this.pos&&this.wrappers.splice(e,1);for(let e=this.blockWrappers;e.value&&e.from<=this.pos;e.next())if(e.to>=this.pos){let n=e.rank*102+e.value.rank,i=new HW(e.from,e.to,e.value,n),r=this.wrappers.length;for(;r>0&&(this.wrappers[r-1].rank-i.rank||this.wrappers[r-1].to-i.to)<0;)r--;this.wrappers.splice(r,0,i)}this.wrapperPos=this.pos}getBlockPos(){var e;this.updateBlockWrappers();let n=this.root;for(let i of this.wrappers){let r=n.lastChild;if(i.from<this.pos&&r instanceof ka&&r.wrapper.eq(i.wrapper))n=r;else{let s=ka.of(i.wrapper,(e=this.cache.find(ka,a=>a.wrapper.eq(i.wrapper)))===null||e===void 0?void 0:e.dom);n.append(s),n=s}}return n}blockPosCovered(){let e=this.lastBlock;return e!=null&&!e.breakAfter&&(!e.isWidget()||(e.flags&160)>0)}getBuffer(e){let n=2|(e<0?16:32),i=this.cache.find(wb,void 0,1);return i&&(i.flags=n),i||new wb(n)}flushBuffer(){this.afterWidget&&!(this.afterWidget.flags&32)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}}class KW{constructor(e){this.skipCount=0,this.text="",this.textOff=0,this.cursor=e.iter()}skip(e){this.textOff+e<=this.text.length?this.textOff+=e:(this.skipCount+=e-(this.text.length-this.textOff),this.text="",this.textOff=0)}next(e){if(this.textOff==this.text.length){let{value:r,lineBreak:s,done:a}=this.cursor.next(this.skipCount);if(this.skipCount=0,a)throw new Error("Ran out of text content when drawing inline views");this.text=r;let c=this.textOff=Math.min(e,r.length);return s?null:r.slice(0,c)}let n=Math.min(this.text.length,this.textOff+e),i=this.text.slice(this.textOff,n);return this.textOff=n,i}}const Eb=[tu,nh,Qc,xr,wb,ka,Oy];for(let t=0;t<Eb.length;t++)Eb[t].bucket=t;class JW{constructor(e){this.view=e,this.buckets=Eb.map(()=>[]),this.index=Eb.map(()=>0),this.reused=new Map}add(e){let n=e.constructor.bucket,i=this.buckets[n];i.length<6?i.push(e):i[this.index[n]=(this.index[n]+1)%6]=e}find(e,n,i=2){let r=e.bucket,s=this.buckets[r],a=this.index[r];for(let c=0;c<s.length;c++){let u=(c+a)%s.length,h=s[u];if((!n||n(h))&&!this.reused.has(h))return s.splice(u,1),u<a&&this.index[r]--,this.reused.set(h,i),h}return null}findWidget(e,n,i){let r=this.buckets[0];if(r.length)for(let s=0,a=0;;s++){if(s==r.length){if(a)return null;a=1,s=0}let c=r[s];if(!this.reused.has(c)&&(a==0?c.widget.compare(e):c.widget.constructor==e.constructor&&e.updateDOM(c.dom,this.view,c.widget)))return r.splice(s,1),s<this.index[0]&&this.index[0]--,c.widget==e&&c.length==n&&(c.flags&497)==i?(this.reused.set(c,1),c):(this.reused.set(c,2),new tu(c.dom,n,e,c.flags&-498|i))}}reuse(e){return this.reused.set(e,1),e}maybeReuse(e,n=2){if(!this.reused.has(e))return this.reused.set(e,n),e.dom}clear(){for(let e=0;e<this.buckets.length;e++)this.buckets[e].length=this.index[e]=0}}class eK{constructor(e,n,i,r,s){this.view=e,this.decorations=r,this.disallowBlockEffectsFor=s,this.openWidget=!1,this.openMarks=0,this.cache=new JW(e),this.text=new KW(e.state.doc),this.builder=new WW(this.cache,new Oy(e,e.contentDOM),wt.iter(i)),this.cache.reused.set(n,2),this.old=new FW(n),this.reuseWalker={skip:(a,c,u)=>{if(this.cache.add(a),a.isComposite())return!1},enter:a=>this.cache.add(a),leave:()=>{},break:()=>{}}}run(e,n){let i=n&&this.getCompositionContext(n.text);for(let r=0,s=0,a=0;;){let c=a<e.length?e[a++]:null,u=c?c.fromA:this.old.root.length;if(u>r){let h=u-r;this.preserve(h,!a,!c),r=u,s+=h}if(!c)break;n&&c.fromA<=n.range.fromA&&c.toA>=n.range.toA?(this.forward(c.fromA,n.range.fromA,n.range.fromA<n.range.toA?1:-1),this.emit(s,n.range.fromB),this.builder.flushBuffer(),this.cache.clear(),this.builder.addComposition(n,i),this.text.skip(n.range.toB-n.range.fromB),this.forward(n.range.fromA,c.toA),this.emit(n.range.toB,c.toB)):(this.forward(c.fromA,c.toA),this.emit(s,c.toB)),s=c.toB,r=c.toA}return this.builder.curLine&&this.builder.endLine(),this.builder.root}preserve(e,n,i){let r=iK(this.old),s=this.openMarks;this.old.advance(e,i?1:-1,{skip:(a,c,u)=>{if(a.isWidget())if(this.openWidget)this.builder.continueWidget(u-c);else{let h=u>0||c<a.length?tu.of(a.widget,this.view,u-c,a.flags&496,this.cache.maybeReuse(a)):this.cache.reuse(a);h.flags&256?(h.flags&=-2,this.builder.addBlockWidget(h)):(this.builder.ensureLine(null),this.builder.addInlineWidget(h,r,s),s=r.length)}else if(a.isText())this.builder.ensureLine(null),!c&&u==a.length&&!this.cache.reused.has(a)?this.builder.addText(a.text,r,s,this.cache.reuse(a)):(this.cache.add(a),this.builder.addText(a.text.slice(c,u),r,s)),s=r.length;else if(a.isLine())a.flags&=-2,this.cache.reused.set(a,1),this.builder.addLine(a);else if(a instanceof wb)this.cache.add(a);else if(a instanceof xr)this.builder.ensureLine(null),this.builder.addMark(a,r,s),this.cache.reused.set(a,1),s=r.length;else return!1;this.openWidget=!1},enter:a=>{a.isLine()?this.builder.addLineStart(a.attrs,this.cache.maybeReuse(a)):(this.cache.add(a),a instanceof xr&&r.unshift(a.mark)),this.openWidget=!1},leave:a=>{a.isLine()?r.length&&(r.length=s=0):a instanceof xr&&(r.shift(),s=Math.min(s,r.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,n){let i=null,r=this.builder,s=-1,a=wt.spans(this.decorations,e,n,{point:(c,u,h,d,m,g)=>{if(h instanceof Jc){if(this.disallowBlockEffectsFor[g]){if(h.block)throw new RangeError("Block decorations may not be specified via plugins");if(u>this.view.state.doc.lineAt(c).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}if(s=d.length,m>d.length)r.continueWidget(u-c);else{let y=h.widget||(h.block?ih.block:ih.inline),v=tK(h),S=this.cache.findWidget(y,u-c,v)||tu.of(y,this.view,u-c,v);h.block?(h.startSide>0&&r.addLineStartIfNotCovered(i),r.addBlockWidget(S)):(r.ensureLine(i),r.addInlineWidget(S,d,m))}i=null}else i=nK(i,h);u>c&&this.text.skip(u-c)},span:(c,u,h,d)=>{for(let m=c;m<u;){let g=this.text.next(Math.min(512,u-m));g==null?(r.addLineStartIfNotCovered(i),r.addBreak(),m++):(r.ensureLine(i),r.addText(g,h,m==c?d:h.length),m+=g.length),i=null}s=h.length}});s>-1&&(this.openWidget=a>s),this.openWidget||r.addLineStartIfNotCovered(i),this.openMarks=a}forward(e,n,i=1){n-e<=10?this.old.advance(n-e,i,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(n-e-10,-1),this.old.advance(5,i,this.reuseWalker))}getCompositionContext(e){let n=[],i=null;for(let r=e.parentNode;;r=r.parentNode){let s=Pn.get(r);if(r==this.view.contentDOM)break;s instanceof xr?n.push(s):s!=null&&s.isLine()?i=s:s instanceof ka||(r.nodeName=="DIV"&&!i?i=new nh(r,yz):i||n.push(xr.of(new tm({tagName:r.nodeName.toLowerCase(),attributes:AW(r)}),r)))}return i?{line:i,marks:n}:null}}function oQ(t,e){let n=i=>{for(let r of i.children)if((e?r.isText():r.length)||n(r))return!0;return!1};return n(t)}function tK(t){let e=t.isReplace?(t.startSide<0?64:0)|(t.endSide>0?128:0):t.startSide>0?32:16;return t.block&&(e|=256),e}const yz={class:"cm-line"};function nK(t,e){let n=e.spec.attributes,i=e.spec.class;return!n&&!i||(t||(t={class:"cm-line"}),n&&J_(n,t),i&&(t.class+=" "+i)),t}function iK(t){let e=[];for(let n=t.parents.length;n>1;n--){let i=n==t.parents.length?t.tile:t.parents[n].tile;i instanceof xr&&e.push(i.mark)}return e}function XS(t){let e=Pn.get(t);return e&&e.setDOM(t.cloneNode()),t}class ih extends Hs{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}ih.inline=new ih("span");ih.block=new ih("div");const US=new class extends Hs{toDOM(){return document.createElement("br")}get isHidden(){return!0}get editable(){return!0}};class aQ{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=et.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new Oy(e,e.contentDOM),this.updateInner([new gs(0,0,0,e.state.doc.length)],null)}update(e){var n;let i=e.changedRanges;this.minWidth>0&&i.length&&(i.every(({fromA:d,toA:m})=>m<this.minWidthFrom||d>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let r=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?r=this.domChanged.newSel.head:!hK(e.changes,this.hasComposition)&&!e.selectionSet&&(r=e.state.selection.main.head));let s=r>-1?sK(this.view,e.changes,r):null;if(this.domChanged=null,this.hasComposition){let{from:d,to:m}=this.hasComposition;i=new gs(d,m,e.changes.mapPos(d,-1),e.changes.mapPos(m,1)).addToSet(i.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,($e.ie||$e.chrome)&&!s&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let a=this.decorations,c=this.blockWrappers;this.updateDeco();let u=lK(a,this.decorations,e.changes);u.length&&(i=gs.extendWithRanges(i,u));let h=uK(c,this.blockWrappers,e.changes);return h.length&&(i=gs.extendWithRanges(i,h)),s&&!i.some(d=>d.fromA<=s.range.fromA&&d.toA>=s.range.toA)&&(i=s.range.addToSet(i.slice())),this.tile.flags&2&&i.length==0?!1:(this.updateInner(i,s),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n){this.view.viewState.mustMeasureContent=!0;let{observer:i}=this.view;i.ignore(()=>{if(n||e.length){let a=this.tile,c=new eK(this.view,a,this.blockWrappers,this.decorations,this.dynamicDecorationMap);n&&Pn.get(n.text)&&c.cache.reused.set(Pn.get(n.text),2),this.tile=c.run(e,n),q1(a,c.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let s=$e.chrome||$e.ios?{node:i.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(s),s&&(s.written||i.selectionRange.focusNode!=s.node||!this.tile.dom.contains(s.node))&&(this.forceSelection=!0),this.tile.dom.style.height=""});let r=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let s of this.tile.children)s.isWidget()&&s.widget instanceof ZS&&r.push(s.dom);i.updateGaps(r)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let n of e.transactions)for(let i of n.effects)i.is(pz)&&(this.editContextFormatting=i.value)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let{dom:i}=this.tile,r=this.view.root.activeElement,s=r==i,a=!s&&!(this.view.state.facet(Ea)||i.tabIndex>-1)&&tp(i,this.view.observer.selectionRange)&&!(r&&i.contains(r));if(!(s||n||a))return;let c=this.forceSelection;this.forceSelection=!1;let u=this.view.state.selection.main,h,d;if(u.empty?d=h=this.inlineDOMNearPos(u.anchor,u.assoc||1):(d=this.inlineDOMNearPos(u.head,u.head==u.from?1:-1),h=this.inlineDOMNearPos(u.anchor,u.anchor==u.from?1:-1)),$e.gecko&&u.empty&&!this.hasComposition&&rK(h)){let g=document.createTextNode("");this.view.observer.ignore(()=>h.node.insertBefore(g,h.node.childNodes[h.offset]||null)),h=d=new qs(g,0),c=!0}let m=this.view.observer.selectionRange;(c||!m.focusNode||(!ip(h.node,h.offset,m.anchorNode,m.anchorOffset)||!ip(d.node,d.offset,m.focusNode,m.focusOffset))&&!this.suppressWidgetCursorChange(m,u))&&(this.view.observer.ignore(()=>{$e.android&&$e.chrome&&i.contains(m.focusNode)&&fK(m.focusNode,i)&&(i.blur(),i.focus({preventScroll:!0}));let g=vp(this.view.root);if(g)if(u.empty){if($e.gecko){let y=oK(h.node,h.offset);if(y&&y!=3){let v=(y==1?KB:JB)(h.node,h.offset);v&&(h=new qs(v.node,v.offset))}}g.collapse(h.node,h.offset),u.bidiLevel!=null&&g.caretBidiLevel!==void 0&&(g.caretBidiLevel=u.bidiLevel)}else if(g.extend){g.collapse(h.node,h.offset);try{g.extend(d.node,d.offset)}catch{}}else{let y=document.createRange();u.anchor>u.head&&([h,d]=[d,h]),y.setEnd(d.node,d.offset),y.setStart(h.node,h.offset),g.removeAllRanges(),g.addRange(y)}a&&this.view.root.activeElement==i&&(i.blur(),r&&r.focus())}),this.view.observer.setSelectionRange(h,d)),this.impreciseAnchor=h.precise?null:new qs(m.anchorNode,m.anchorOffset),this.impreciseHead=d.precise?null:new qs(m.focusNode,m.focusOffset)}suppressWidgetCursorChange(e,n){return this.hasComposition&&n.empty&&ip(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==n.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,i=vp(e.root),{anchorNode:r,anchorOffset:s}=e.observer.selectionRange;if(!i||!n.empty||!n.assoc||!i.modify)return;let a=this.lineAt(n.head,n.assoc);if(!a)return;let c=a.posAtStart;if(n.head==c||n.head==c+a.length)return;let u=this.coordsAt(n.head,-1),h=this.coordsAt(n.head,1);if(!u||!h||u.bottom>h.top)return;let d=this.domAtPos(n.head+n.assoc,n.assoc);i.collapse(d.node,d.offset),i.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let m=e.observer.selectionRange;e.docView.posFromDOM(m.anchorNode,m.anchorOffset)!=n.from&&i.collapse(r,s)}posFromDOM(e,n){let i=this.tile.nearest(e);if(!i)return this.tile.dom.compareDocumentPosition(e)&2?0:this.view.state.doc.length;let r=i.posAtStart;if(i.isComposite()){let s;if(e==i.dom)s=i.dom.childNodes[n];else{let a=Na(e)==0?0:n==0?-1:1;for(;;){let c=e.parentNode;if(c==i.dom)break;a==0&&c.firstChild!=c.lastChild&&(e==c.firstChild?a=-1:a=1),e=c}a<0?s=e:s=e.nextSibling}if(s==i.dom.firstChild)return r;for(;s&&!Pn.get(s);)s=s.nextSibling;if(!s)return r+i.length;for(let a=0,c=r;;a++){let u=i.children[a];if(u.dom==s)return c;c+=u.length+u.breakAfter}}else return i.isText()?e==i.dom?r+n:r+(n?i.length:0):r}domAtPos(e,n){let{tile:i,offset:r}=this.tile.resolveBlock(e,n);return i.isWidget()?i.domPosFor(r,n):i.domIn(r,n)}inlineDOMNearPos(e,n){let i,r=-1,s=!1,a,c=-1,u=!1;return this.tile.blockTiles((h,d)=>{if(h.isWidget()){if(h.flags&32&&d>=e)return!0;h.flags&16&&(s=!0)}else{let m=d+h.length;if(d<=e&&(i=h,r=e-d,s=m<e),m>=e&&!a&&(a=h,c=e-d,u=d>e),d>e&&a)return!0}}),!i&&!a?this.domAtPos(e,n):(s&&a?i=null:u&&i&&(a=null),i&&n<0||!a?i.domIn(r,n):a.domIn(c,n))}coordsAt(e,n,i){let{tile:r,offset:s}=this.tile.resolveBlock(e,n);return r.isWidget()?r.widget instanceof ZS?null:r.coordsInWidget(s,n,!0):r.coordsIn(s,n,i)}lineAt(e,n){let{tile:i}=this.tile.resolveBlock(e,n);return i.isLine()?i:null}coordsForChar(e){let{tile:n,offset:i}=this.tile.resolveBlock(e,1);if(!n.isLine())return null;function r(s,a){if(s.isComposite())for(let c of s.children){if(c.length>=a){let u=r(c,a);if(u)return u}if(a-=c.length,a<0)break}else if(s.isText()&&a<s.length){let c=gi(s.text,a);if(c==a)return null;let u=xp(s.dom,a,c).getClientRects();for(let h=0;h<u.length;h++){let d=u[h];if(h==u.length-1||d.top<d.bottom&&d.left<d.right)return d}}return null}return r(n,i)}measureVisibleLineHeights(e){let n=[],{from:i,to:r}=e,s=this.view.contentDOM.clientWidth,a=s>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,c=-1,u=this.view.textDirection==ln.LTR,h=0,d=(m,g,y)=>{for(let v=0;v<m.children.length&&!(g>r);v++){let S=m.children[v],x=g+S.length,w=S.dom.getBoundingClientRect(),{height:C}=w;if(y&&!v&&(h+=w.top-y.top),S instanceof ka)x>i&&d(S,g,w);else if(g>=i&&(h>0&&n.push(-h),n.push(C+h),h=0,a)){let k=S.dom.lastChild,A=k?np(k):[];if(A.length){let R=A[A.length-1],P=u?R.right-w.left:w.right-R.left;P>c&&(c=P,this.minWidth=s,this.minWidthFrom=g,this.minWidthTo=x)}}y&&v==m.children.length-1&&(h+=y.bottom-w.bottom),g=x+S.breakAfter}};return d(this.tile,0,null),n}textDirectionAt(e){let{tile:n}=this.tile.resolveBlock(e,1);return getComputedStyle(n.dom).direction=="rtl"?ln.RTL:ln.LTR}measureTextSize(){let e=this.tile.blockTiles(a=>{if(a.isLine()&&a.children.length&&a.length<=20){let c=0,u;for(let h of a.children){if(!h.isText()||/[^ -~]/.test(h.text))return;let d=np(h.dom);if(d.length!=1)return;c+=d[0].width,u=d[0].height}if(c)return{lineHeight:a.dom.getBoundingClientRect().height,charWidth:c/a.length,textHeight:u}}});if(e)return e;let n=document.createElement("div"),i,r,s;return n.className="cm-line",n.style.width="99999px",n.style.position="absolute",n.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.tile.dom.appendChild(n);let a=np(n.firstChild)[0];i=n.getBoundingClientRect().height,r=a&&a.width?a.width/27:7,s=a&&a.height?a.height:i,n.remove()}),{lineHeight:i,charWidth:r,textHeight:s}}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let i=0,r=0;;r++){let s=r==n.viewports.length?null:n.viewports[r],a=s?s.from-1:this.view.state.doc.length;if(a>i){let c=(n.lineBlockAt(a).bottom-n.lineBlockAt(i).top)/this.view.scaleY;e.push(et.replace({widget:new ZS(c),block:!0,inclusive:!0,isBlockGap:!0}).range(i,a))}if(!s)break;i=s.to+1}return et.set(e)}updateDeco(){let e=1,n=this.view.state.facet(my).map(s=>(this.dynamicDecorationMap[e++]=typeof s=="function")?s(this.view):s),i=!1,r=this.view.state.facet(sT).map((s,a)=>{let c=typeof s=="function";return c&&(i=!0),c?s(this.view):s});for(r.length&&(this.dynamicDecorationMap[e++]=i,n.push(wt.join(r))),this.decorations=[this.editContextFormatting,...n,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;this.blockWrappers=this.view.state.facet(gz).map(s=>typeof s=="function"?s(this.view):s)}scrollIntoView(e){if(e.isSnapshot){let h=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=h.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let h of this.view.state.facet(dz))try{if(h(this.view,e.range,e))return!0}catch(d){wr(this.view.state,d,"scroll handler")}let{range:n}=e,i=this.coordsAt(n.head,n.assoc||(n.head>n.anchor?-1:1)),r;if(!i)return;!n.empty&&(r=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(i={left:Math.min(i.left,r.left),top:Math.min(i.top,r.top),right:Math.max(i.right,r.right),bottom:Math.max(i.bottom,r.bottom)});let s=oT(this.view),a={left:i.left-s.left,top:i.top-s.top,right:i.right+s.right,bottom:i.bottom+s.bottom},{offsetWidth:c,offsetHeight:u}=this.view.scrollDOM;if(MW(this.view.scrollDOM,a,n.head<n.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,c),-c),Math.max(Math.min(e.yMargin,u),-u),this.view.textDirection==ln.LTR),window.visualViewport&&window.innerHeight-window.visualViewport.height>1&&(i.top>window.visualViewport.offsetTop+window.visualViewport.height||i.bottom<window.visualViewport.offsetTop)){let h=this.view.docView.lineAt(n.head,1);if(h){let d=GB(h.dom);h.dom.scrollIntoView({block:"nearest"}),FB(d,!1)}}}lineHasWidget(e){let n=i=>i.isWidget()||i.children.some(n);return n(this.tile.resolveBlock(e,1).tile)}destroy(){q1(this.tile)}}function q1(t,e){let n=e==null?void 0:e.get(t);if(n!=1){n==null&&t.destroy();for(let i of t.children)q1(i,e)}}function rK(t){return bi(t.node)&&t.node.firstChild&&(t.offset==0||t.node.childNodes[t.offset-1].contentEditable=="false")&&(t.offset==t.node.childNodes.length||t.node.childNodes[t.offset].contentEditable=="false")}function vz(t,e){let n=t.observer.selectionRange;if(!n.focusNode)return null;let i=KB(n.focusNode,n.focusOffset),r=JB(n.focusNode,n.focusOffset),s=i||r;if(r&&i&&r.node!=i.node){let c=Pn.get(r.node);if(!c||c.isText()&&c.text!=r.node.nodeValue)s=r;else if(t.docView.lastCompositionAfterCursor){let u=Pn.get(i.node);!u||u.isText()&&u.text!=i.node.nodeValue||(s=r)}}if(t.docView.lastCompositionAfterCursor=s!=i,!s)return null;let a=e-s.offset;return{from:a,to:a+s.node.nodeValue.length,node:s.node}}function sK(t,e,n){let i=vz(t,n);if(!i)return null;let{node:r,from:s,to:a}=i,c=r.nodeValue;if(/[\n\r]/.test(c)||t.state.doc.sliceString(i.from,i.to)!=c)return null;let u=e.invertedDesc;return{range:new gs(u.mapPos(s),u.mapPos(a),s,a),text:r}}function oK(t,e){return bi(t)?(e&&t.childNodes[e-1].contentEditable=="false"?1:0)|(e<t.childNodes.length&&t.childNodes[e].contentEditable=="false"?2:0):0}let aK=class{constructor(){this.changes=[]}compareRange(e,n){Tf(e,n,this.changes)}comparePoint(e,n){Tf(e,n,this.changes)}boundChange(e){Tf(e,e,this.changes)}};function lK(t,e,n){let i=new aK;return wt.compare(t,e,n,i),i.changes}class cK{constructor(){this.changes=[]}compareRange(e,n){Tf(e,n,this.changes)}comparePoint(){}boundChange(e){Tf(e,e,this.changes)}}function uK(t,e,n){let i=new cK;return wt.compare(t,e,n,i),i.changes}function fK(t,e){for(let n=t;n&&n!=e;n=n.assignedSlot||n.parentNode)if(bi(n)&&n.contentEditable=="false")return!0;return!1}function hK(t,e){let n=!1;return e&&t.iterChangedRanges((i,r)=>{i<e.to&&r>e.from&&(n=!0)}),n}class ZS extends Hs{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}function dK(t,e,n=1){let i=t.charCategorizer(e),r=t.doc.lineAt(e),s=e-r.from;if(r.length==0)return ce.cursor(e);s==0?n=1:s==r.length&&(n=-1);let a=s,c=s;n<0?a=gi(r.text,s,!1):c=gi(r.text,s);let u=i(r.text.slice(a,c));for(;a>0;){let h=gi(r.text,a,!1);if(i(r.text.slice(h,a))!=u)break;a=h}for(;c<r.length;){let h=gi(r.text,c);if(i(r.text.slice(c,h))!=u)break;c=h}return ce.undirectionalRange(a+r.from,c+r.from)}function pK(t,e,n,i,r){let s=Math.round((i-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&n.height>t.defaultLineHeight*1.5){let c=t.viewState.heightOracle.textHeight,u=Math.floor((r-n.top-(t.defaultLineHeight-c)*.5)/c);s+=u*t.viewState.heightOracle.lineLength}let a=t.state.sliceDoc(n.from,n.to);return n.from+Q1(a,s,t.state.tabSize)}function Y1(t,e,n){let i=t.lineBlockAt(e);if(Array.isArray(i.type)){let r;for(let s of i.type){if(s.from>e)break;if(!(s.to<e)){if(s.from<e&&s.to>e)return s;(!r||s.type==$i.Text&&(r.type!=s.type||(n<0?s.from<e:s.to>e)))&&(r=s)}}return r||i}return i}function mK(t,e,n,i){let r=Y1(t,e.head,e.assoc||-1),s=!i||r.type!=$i.Text||!(t.lineWrapping||r.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>r.from?e.head-1:e.head);if(s){let a=t.dom.getBoundingClientRect(),c=t.textDirectionAt(r.from),u=t.posAtCoords({x:n==(c==ln.LTR)?a.right-1:a.left+1,y:(s.top+s.bottom)/2});if(u!=null)return ce.cursor(u,n?-1:1)}return ce.cursor(n?r.to:r.from,n?-1:1)}function lQ(t,e,n,i){let r=t.state.doc.lineAt(e.head),s=t.bidiSpans(r),a=t.textDirectionAt(r.from);for(let c=e,u=null;;){let h=UW(r,s,a,c,n),d=rz;if(!h){if(r.number==(n?t.state.doc.lines:1))return c;d=`
66
+ `,r=t.state.doc.line(r.number+(n?1:-1)),s=t.bidiSpans(r),h=n?ce.cursor(r.from,-1):ce.cursor(r.to,1)}if(u){if(!u(d))return c}else{if(!i)return h;u=i(d)}c=h}}function gK(t,e,n){let i=t.state.charCategorizer(e),r=i(n);return s=>{let a=i(s);return r==bn.Space&&(r=a),r==a}}function OK(t,e,n,i){let r=e.head,s=n?1:-1;if(r==(n?t.state.doc.length:0))return ce.cursor(r,e.assoc);let a=e.goalColumn,c,u=t.contentDOM.getBoundingClientRect(),h=t.coordsAtPos(r,e.assoc||((e.empty?n:e.head==e.from)?1:-1)),d=t.documentTop;if(h)a==null&&(a=h.left-u.left),c=s<0?h.top:h.bottom;else{let v=t.viewState.lineBlockAt(r);a==null&&(a=Math.min(u.right-u.left,t.defaultCharacterWidth*(r-v.from))),c=(s<0?v.top:v.bottom)+d}let m=u.left+a,g=t.viewState.heightOracle.textHeight>>1,y=i??g;for(let v=0;;v+=g){let S=c+(y+v)*s,x=G1(t,{x:m,y:S},!1,s);if(n?S>u.bottom:S<u.top)return ce.cursor(x.pos,x.assoc);let w=t.coordsAtPos(x.pos,x.assoc),C=w?(w.top+w.bottom)/2:0;if(!w||(n?C>c:C<c))return ce.cursor(x.pos,x.assoc,void 0,a)}}function rp(t,e,n){for(;;){let i=0;for(let r of t)r.between(e-1,e+1,(s,a,c)=>{if(e>s&&e<a){let u=i||n||(e-s<a-e?-1:1);e=u<0?s:a,i=u}});if(!i)return e}}function Sz(t,e){let n=null;for(let i=0;i<e.ranges.length;i++){let r=e.ranges[i],s=null;if(r.empty){let a=rp(t,r.from,0);a!=r.from&&(s=ce.cursor(a,-1))}else{let a=rp(t,r.from,-1),c=rp(t,r.to,1);(a!=r.from||c!=r.to)&&(r.undirectional?s=ce.undirectionalRange(r.from,r.to):s=ce.range(r.from==r.anchor?a:c,r.from==r.head?a:c))}s&&(n||(n=e.ranges.slice()),n[i]=s)}return n?ce.create(n,e.mainIndex):e}function VS(t,e,n){let i=rp(t.state.facet(im).map(r=>r(t)),n.from,e.head>n.from?-1:1);return i==n.from?n:ce.cursor(i,i<n.from?1:-1)}class Mo{constructor(e,n){this.pos=e,this.assoc=n}}function G1(t,e,n,i){let r=t.contentDOM.getBoundingClientRect(),s=r.top+t.viewState.paddingTop,{x:a,y:c}=e,u=c-s,h;for(;;){if(u<0)return new Mo(0,1);if(u>t.viewState.docHeight)return new Mo(t.state.doc.length,-1);if(h=t.elementAtHeight(u),i==null)break;if(h.type==$i.Text){if(i<0?h.to<t.viewport.from:h.from>t.viewport.to)break;let g=t.docView.coordsAt(i<0?h.from:h.to,i>0?-1:1);if(g&&(i<0?g.top<=u+s:g.bottom>=u+s))break}let m=t.viewState.heightOracle.textHeight/2;u=i>0?h.bottom+m:h.top-m}if(t.viewport.from>=h.to||t.viewport.to<=h.from){if(n)return null;if(h.type==$i.Text){let m=pK(t,r,h,a,c);return new Mo(m,m==h.from?1:-1)}}if(h.type!=$i.Text)return u<(h.top+h.bottom)/2?new Mo(h.from,1):new Mo(h.to,-1);let d=t.docView.lineAt(h.from,2);return(!d||d.length!=h.length)&&(d=t.docView.lineAt(h.from,-2)),new bK(t,a,c,t.textDirectionAt(h.from)).scanTile(d,h.from)}class bK{constructor(e,n,i,r){this.view=e,this.x=n,this.y=i,this.baseDir=r,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to<e)&&(this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(e,n){let{line:i,spans:r}=this.bidiSpansAt(e);return r[Qo.find(r,e-i.from,-1,n)].level==this.baseDir}dirAt(e,n){let{line:i,spans:r}=this.bidiSpansAt(e);return r[Qo.find(r,e-i.from,-1,n)].dir}bidiIn(e,n){let{spans:i,line:r}=this.bidiSpansAt(e);return i.length>1||i.length&&(i[0].level!=this.baseDir||i[0].to+r.from<n)}scan(e,n,i=!1){let r=0,s=e.length-1,a=new Set,c=this.bidiIn(e[0],e[s]),u,h,d=-1,m=1e9,g;e:for(;r<s;){let v=s-r,S=r+s>>1;t:if(a.has(S)){for(let C=1;C<v;C++){let k=S+C;if(k>=s&&(k-=v),!a.has(k)){S=k;break t}}break e}a.add(S);let x=n(S),w=0;if(x)for(let C=0;C<x.length;C++){let k=x[C];if(!(k.width==0&&x.length>1))if(k.bottom<this.y)(!u||u.bottom<k.bottom)&&(u=k),w=1;else if(k.top>this.y)(!h||h.top>k.top)&&(h=k),w=-1;else{let A=k.left>this.x?this.x-k.left:k.right<this.x?this.x-k.right:0,R=Math.abs(A);R<m&&(d=S,m=R,g=k),A&&(w=A<0==(this.baseDir==ln.LTR)?-1:1)}}w==-1&&(!c||this.baseDirAt(e[S],1))?s=S:w==1&&(!c||this.baseDirAt(e[S+1],-1))&&(r=S+1)}if(!g){if(!h&&!u)return{i:0,after:!1};let v=u&&(!h||this.y-u.bottom<h.top-this.y)?u:h;return this.y=(v.top+v.bottom)/2,this.scan(e,n,!0)}if(m&&!i){let{top:v,bottom:S}=g;if(u&&u.bottom>(v+v+S)/3)return this.y=u.bottom-1,this.scan(e,n,!0);if(h&&h.top<(v+S+S)/3)return this.y=h.top+1,this.scan(e,n,!0)}let y=(c?this.dirAt(e[d],1):this.baseDir)==ln.LTR;return{i:d,after:this.x>(g.left+g.right)/2==y}}scanText(e,n){let i=[];for(let s=0;s<e.length;s=gi(e.text,s))i.push(n+s);i.push(n+e.length);let r=this.scan(i,s=>{let a=i[s]-n,c=i[s+1]-n;return xp(e.dom,a,c).getClientRects()});return r.after?new Mo(i[r.i+1],-1):new Mo(i[r.i],1)}scanTile(e,n){if(!e.length)return new Mo(n,1);if(e.children.length==1){let c=e.children[0];if(c.isText())return this.scanText(c,n);if(c.isComposite())return this.scanTile(c,n)}let i=[n];for(let c=0,u=n;c<e.children.length;c++)i.push(u+=e.children[c].length);let r=this.scan(i,c=>{let u=e.children[c];return u.flags&48?null:(bi(u.dom)?u.dom:xp(u.dom,0,u.length)).getClientRects()}),s=e.children[r.i],a=i[r.i];return s.isText()?this.scanText(s,a):s.isComposite()?this.scanTile(s,a):r.after?new Mo(i[r.i+1],-1):new Mo(a,1)}}const df="￿";class yK{constructor(e,n){this.points=e,this.view=n,this.text="",this.lineSeparator=n.state.facet(Ct.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=df}readRange(e,n){if(!e)return this;let i=e.parentNode;for(let r=e;;){this.findPointBefore(i,r);let s=this.text.length;this.readNode(r);let a=Pn.get(r),c=r.nextSibling;if(c==n){a!=null&&a.breakAfter&&!c&&i!=this.view.contentDOM&&this.lineBreak();break}let u=Pn.get(c);(a&&u?a.breakAfter:(a?a.breakAfter:Sb(r))||Sb(c)&&(r.nodeName!="BR"||a!=null&&a.isWidget())&&this.text.length>s)&&!SK(c,n)&&this.lineBreak(),r=c}return this.findPointBefore(i,n),this}readTextNode(e){let n=e.nodeValue;for(let i of this.points)i.node==e&&(i.pos=this.text.length+Math.min(i.offset,n.length));for(let i=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let s=-1,a=1,c;if(this.lineSeparator?(s=n.indexOf(this.lineSeparator,i),a=this.lineSeparator.length):(c=r.exec(n))&&(s=c.index,a=c[0].length),this.append(n.slice(i,s<0?n.length:s)),s<0)break;if(this.lineBreak(),a>1)for(let u of this.points)u.node==e&&u.pos>this.text.length&&(u.pos-=a-1);i=s+a}}readNode(e){let n=Pn.get(e),i=n&&n.overrideDOMText;if(i!=null){this.findPointInside(e,i.length);for(let r=i.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.value)}else th(e)?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():bi(e)&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==n&&(i.pos=this.text.length)}findPointInside(e,n){for(let i of this.points)(th(e)?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+(vK(e,i.node,i.offset)?n:0))}}function vK(t,e,n){for(;;){if(!e||n<Na(e))return!1;if(e==t)return!0;n=Ul(e)+1,e=e.parentNode}}function SK(t,e){let n;for(;!(t==e||!t);t=t.nextSibling){let i=Pn.get(t);if(!(i!=null&&i.isWidget()))return!1;i&&(n||(n=[])).push(i)}if(n)for(let i of n){let r=i.overrideDOMText;if(r!=null&&r.length)return!1}return!0}class cQ{constructor(e,n){this.node=e,this.offset=n,this.pos=-1}}class xK{constructor(e,n,i,r){this.typeOver=r,this.bounds=null,this.text="",this.domChanged=n>-1;let{impreciseHead:s,impreciseAnchor:a}=e.docView,c=e.state.selection;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=xz(e.docView.tile,n,i,0))){let u=s||a?[]:EK(e),h=new yK(u,e);h.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=h.text,this.newSel=_K(u,this.bounds.from)}else{let u=e.observer.selectionRange,h=s&&s.node==u.focusNode&&s.offset==u.focusOffset||!z1(e.contentDOM,u.focusNode)?c.main.head:e.docView.posFromDOM(u.focusNode,u.focusOffset),d=a&&a.node==u.anchorNode&&a.offset==u.anchorOffset||!z1(e.contentDOM,u.anchorNode)?c.main.anchor:e.docView.posFromDOM(u.anchorNode,u.anchorOffset),m=e.viewport;if(($e.ios||$e.chrome)&&h!=d&&Math.min(h,d)<=c.main.from&&Math.max(h,d)>=c.main.to&&(m.from>0||m.to<e.state.doc.length)){let g=Math.min(h,d),y=Math.max(h,d),v=m.from-g,S=m.to-y;(v==0||v==1||g==0)&&(S==0||S==-1||y==e.state.doc.length)&&(h=0,d=e.state.doc.length)}if(e.inputState.composing>-1&&c.ranges.length>1)this.newSel=c.replaceRange(ce.range(d,h));else if(e.lineWrapping&&d==h&&!(c.main.empty&&c.main.head==h)&&e.inputState.lastTouchTime>Date.now()-100){let g=e.coordsAtPos(h,-1),y=0;g&&(y=e.inputState.lastTouchY<=g.bottom?-1:1),this.newSel=ce.create([ce.cursor(h,y)])}else this.newSel=ce.single(d,h)}}}function xz(t,e,n,i){if(t.isComposite()){let r=-1,s=-1,a=-1,c=-1;for(let u=0,h=i,d=i;u<t.children.length;u++){let m=t.children[u],g=h+m.length;if(h<e&&g>n)return xz(m,e,n,h);if(g>=e&&r==-1&&(r=u,s=h),h>n&&m.dom.parentNode==t.dom){a=u,c=d;break}d=g,h=g+m.breakAfter}return{from:s,to:c<0?i+t.length:c,startDOM:(r?t.children[r-1].dom.nextSibling:null)||t.dom.firstChild,endDOM:a<t.children.length&&a>=0?t.children[a].dom:null}}else return t.isText()?{from:i,to:i+t.length,startDOM:t.dom,endDOM:t.dom.nextSibling}:null}function wz(t,e){let n,{newSel:i}=e,{state:r}=t,s=r.selection.main,a=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:c,to:u}=e.bounds,h=s.from,d=null;(a===8||$e.android&&e.text.length<u-c)&&(h=s.to,d="end");let m=r.doc.sliceString(c,u,df),g,y;!s.empty&&s.from>=c&&s.to<=u&&(e.typeOver||m!=e.text)&&m.slice(0,s.from-c)==e.text.slice(0,s.from-c)&&m.slice(s.to-c)==e.text.slice(g=e.text.length-(m.length-(s.to-c)))?n={from:s.from,to:s.to,insert:Nt.of(e.text.slice(s.from-c,g).split(df))}:(y=Ez(m,e.text,h-c,d))&&($e.chrome&&a==13&&y.toB==y.from+2&&e.text.slice(y.from,y.toB)==df+df&&y.toB--,n={from:c+y.from,to:c+y.toA,insert:Nt.of(e.text.slice(y.from,y.toB).split(df))})}else i&&(!t.hasFocus&&r.facet(Ea)||F1(i,s))&&(i=null);if(!n&&!i)return!1;if(($e.mac||$e.android)&&n&&n.from==n.to&&n.from==s.head-1&&/^\. ?$/.test(n.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(i&&n.insert.length==2&&(i=ce.single(i.main.anchor-1,i.main.head-1)),n={from:n.from,to:n.to,insert:Nt.of([n.insert.toString().replace("."," ")])}):r.doc.lineAt(s.from).to<s.to&&t.docView.lineHasWidget(s.to)&&t.inputState.insertingTextAt>Date.now()-50?n={from:s.from,to:s.to,insert:r.toText(t.inputState.insertingText)}:$e.chrome&&n&&n.from==n.to&&n.from==s.head&&n.insert.toString()==`
67
+ `&&t.lineWrapping&&(i&&(i=ce.single(i.main.anchor-1,i.main.head-1)),n={from:s.from,to:s.to,insert:Nt.of([" "])}),n)return aT(t,n,i,a);if(i&&!F1(i,s)){let c=!1,u="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(c=!0),u=t.inputState.lastSelectionOrigin,u=="select.pointer"&&(i=Sz(r.facet(im).map(h=>h(t)),i))),t.dispatch({selection:i,scrollIntoView:c,userEvent:u}),!0}else return!1}function aT(t,e,n,i=-1){if($e.ios&&t.inputState.flushIOSKey(e))return!0;let r=t.state.selection.main;if($e.android&&(e.to==r.to&&(e.from==r.from||e.from==r.from-1&&t.state.sliceDoc(e.from,r.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&kf(t.contentDOM,"Enter",13)||(e.from==r.from-1&&e.to==r.to&&e.insert.length==0||i==8&&e.insert.length<e.to-e.from&&e.to>r.head)&&kf(t.contentDOM,"Backspace",8)||e.from==r.from&&e.to==r.to+1&&e.insert.length==0&&kf(t.contentDOM,"Delete",46)))return!0;let s=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let a,c=()=>a||(a=wK(t,e,n));return t.state.facet(cz).some(u=>u(t,e.from,e.to,s,c))||t.dispatch(c()),!0}function wK(t,e,n){let i,r=t.state,s=r.selection.main,a=-1;if(e.from==e.to&&e.from<s.from||e.from>s.to){let u=e.from<s.from?-1:1,h=u<0?s.from:s.to,d=rp(r.facet(im).map(m=>m(t)),h,u);e.from==d&&(a=d)}if(a>-1)i={changes:e,selection:ce.cursor(e.from+e.insert.length,-1)};else if(e.from>=s.from&&e.to<=s.to&&e.to-e.from>=(s.to-s.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let u=s.from<e.from?r.sliceDoc(s.from,e.from):"",h=s.to>e.to?r.sliceDoc(e.to,s.to):"";i=r.replaceSelection(t.state.toText(u+e.insert.sliceString(0,void 0,t.state.lineBreak)+h))}else{let u=r.changes(e),h=n&&n.main.to<=u.newLength?n.main:void 0;if(r.selection.ranges.length>1&&(t.inputState.composing>=0||t.inputState.compositionPendingChange)&&e.to<=s.to+10&&e.to>=s.to-10){let d=t.state.sliceDoc(e.from,e.to),m,g=n&&vz(t,n.main.head);if(g){let v=e.insert.length-(e.to-e.from);m={from:g.from,to:g.to-v}}else m=t.state.doc.lineAt(s.head);let y=s.to-e.to;i=r.changeByRange(v=>{if(v.from==s.from&&v.to==s.to)return{changes:u,range:h||v.map(u)};let S=v.to-y,x=S-d.length;if(t.state.sliceDoc(x,S)!=d||S>=m.from&&x<=m.to)return{range:v};let w=r.changes({from:x,to:S,insert:e.insert}),C=v.to-s.to;return{changes:w,range:h?ce.range(Math.max(0,h.anchor+C),Math.max(0,h.head+C)):v.map(w)}})}else i={changes:u,selection:h&&r.selection.replaceRange(h)}}let c="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,c+=".compose",t.inputState.compositionFirstChange&&(c+=".start",t.inputState.compositionFirstChange=!1)),r.update(i,{userEvent:c,scrollIntoView:!0})}function Ez(t,e,n,i){let r=Math.min(t.length,e.length),s=0;for(;s<r&&t.charCodeAt(s)==e.charCodeAt(s);)s++;if(s==r&&t.length==e.length)return null;let a=t.length,c=e.length;for(;a>0&&c>0&&t.charCodeAt(a-1)==e.charCodeAt(c-1);)a--,c--;if(i=="end"){let u=Math.max(0,s-Math.min(a,c));n-=a+u-s}if(a<s&&t.length<e.length){let u=n<=s&&n>=a?s-n:0;s-=u,c=s+(c-a),a=s}else if(c<s){let u=n<=s&&n>=c?s-n:0;s-=u,a=s+(a-c),c=s}return{from:s,toA:a,toB:c}}function EK(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:s}=t.observer.selectionRange;return n&&(e.push(new cQ(n,i)),(r!=n||s!=i)&&e.push(new cQ(r,s))),e}function _K(t,e){if(t.length==0)return null;let n=t[0].pos,i=t.length==2?t[1].pos:n;return n<0||i<0?null:n==i?ce.create([ce.cursor(i+e,-1)]):ce.single(n+e,i+e)}function F1(t,e){return e.head==t.main.head&&e.anchor==t.main.anchor}class TK{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.touchActive=!1,this.lastTouchTime=0,this.lastTouchX=0,this.lastTouchY=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.lastWheelEvent=0,this.pendingIOSKey=void 0,this.lastIOSMomentumScroll=0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,$e.safari&&e.contentDOM.addEventListener("input",()=>null),$e.gecko&&XK(e.contentDOM.ownerDocument)}handleEvent(e){!$K(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,n){let i=this.handlers[e];if(i){for(let r of i.observers)r(this.view,n);for(let r of i.handlers){if(n.defaultPrevented)break;if(r(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=CK(e),i=this.handlers,r=this.view.contentDOM;for(let s in n)if(s!="scroll"){let a=!n[s].handlers.length,c=i[s];c&&a!=!c.handlers.length&&(r.removeEventListener(s,this.handleEvent),c=null),c||r.addEventListener(s,this.handleEvent,{passive:a})}for(let s in i)s!="scroll"&&!n[s]&&r.removeEventListener(s,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&Tz.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),$e.android&&$e.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;if($e.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&(_z.some(n=>n.keyCode==e.keyCode)&&!e.ctrlKey||AK.indexOf(e.key)>-1&&e.ctrlKey)){let n={ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey,shiftKey:e.shiftKey};n.shiftKey&&$e.ios&&!/^(off|none)$/.test(this.view.contentDOM.autocapitalize)&&kK(this.view.win)&&(n.shiftKey=!1);let i=this.pendingIOSKey={key:e.key,keyCode:e.keyCode,mods:n};return setTimeout(()=>{this.pendingIOSKey==i&&this.flushIOSKey()},50),!0}return e.keyCode!=229&&this.view.observer.forceFlush(),!1}flushIOSKey(e){let n=this.pendingIOSKey;return!n||this.view.observer.pendingRecords().length||n.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,kf(this.view.contentDOM,n.key,n.keyCode,n.mods))}ignoreDuringComposition(e){return!/^key/.test(e.type)||e.synthetic?!1:this.composing>0?!0:$e.safari&&!$e.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function kK(t){return t.visualViewport?t.visualViewport.height*t.visualViewport.scale/t.document.documentElement.clientHeight<.85:!1}function uQ(t,e){return(n,i)=>{try{return e.call(t,i,n)}catch(r){wr(n.state,r)}}}function CK(t){let e=Object.create(null);function n(i){return e[i]||(e[i]={observers:[],handlers:[]})}for(let i of t){let r=i.spec,s=r&&r.plugin.domEventHandlers,a=r&&r.plugin.domEventObservers;if(s)for(let c in s){let u=s[c];u&&n(c).handlers.push(uQ(i.value,u))}if(a)for(let c in a){let u=a[c];u&&n(c).observers.push(uQ(i.value,u))}}for(let i in Fs)n(i).handlers.push(Fs[i]);for(let i in lr)n(i).observers.push(lr[i]);return e}const _z=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],AK="dthko",Tz=[16,17,18,20,91,92,224,225],Gg=6;function Fg(t){return Math.max(0,t)*.7+8}function RK(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class PK{constructor(e,n,i,r){this.view=e,this.startEvent=n,this.style=i,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParents=YB(e.contentDOM),this.atoms=e.state.facet(im).map(a=>a(e));let s=e.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(Ct.allowMultipleSelections)&&MK(e,n),this.dragging=QK(e,n)&&Az(n)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&RK(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let n=0,i=0,r=0,s=0,a=this.view.win.innerWidth,c=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:a}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:s,bottom:c}=this.scrollParents.y.getBoundingClientRect());let u=oT(this.view);e.clientX-u.left<=r+Gg?n=-Fg(r-e.clientX):e.clientX+u.right>=a-Gg&&(n=Fg(e.clientX-a)),e.clientY-u.top<=s+Gg?i=-Fg(s-e.clientY):e.clientY+u.bottom>=c-Gg&&(i=Fg(e.clientY-c)),this.setScrollSpeed(n,i)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:n}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),n&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=n,n=0),(e||n)&&this.view.win.scrollBy(e,n),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:n}=this,i=Sz(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!i.eq(n.state.selection,this.dragging===!1))&&this.view.dispatch({selection:i,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(n=>n.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function MK(t,e){let n=t.state.facet(sz);return n.length?n[0](e):$e.mac?e.metaKey:e.ctrlKey}function NK(t,e){let n=t.state.facet(oz);return n.length?n[0](e):$e.mac?!e.altKey:!e.ctrlKey}function QK(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let i=vp(t.root);if(!i||i.rangeCount==0)return!0;let r=i.getRangeAt(0).getClientRects();for(let s=0;s<r.length;s++){let a=r[s];if(a.left<=e.clientX&&a.right>=e.clientX&&a.top<=e.clientY&&a.bottom>=e.clientY)return!0}return!1}function $K(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,i;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(i=Pn.get(n))&&i.isWidget()&&!i.isHidden&&i.widget.ignoreEvent(e))return!1;return!0}const Fs=Object.create(null),lr=Object.create(null),kz=$e.ie&&$e.ie_version<15||$e.ios&&$e.webkit_version<604;function DK(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),Cz(t,n.value)},50)}function by(t,e,n){for(let i of t.facet(e))n=i(n,t);return n}function Cz(t,e){e=by(t.state,nT,e);let{state:n}=t,i,r=1,s=n.toText(e),a=s.lines==n.selection.ranges.length;if(H1!=null&&n.selection.ranges.every(u=>u.empty)&&H1==s.toString()){let u=-1;i=n.changeByRange(h=>{let d=n.doc.lineAt(h.from);if(d.from==u)return{range:h};u=d.from;let m=n.toText((a?s.line(r++).text:e)+n.lineBreak);return{changes:{from:d.from,insert:m},range:ce.cursor(h.from+m.length,-1)}})}else a?i=n.changeByRange(u=>{let h=s.line(r++);return{changes:{from:u.from,to:u.to,insert:h.text},range:ce.cursor(u.from+h.length,-1)}}):i=n.replaceSelection(s);t.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}lr.scroll=t=>{let e=t.inputState;e.lastScrollTop=t.scrollDOM.scrollTop,e.lastScrollLeft=t.scrollDOM.scrollLeft,$e.ios&&!e.touchActive&&(e.lastIOSMomentumScroll=Date.now())};lr.wheel=lr.mousewheel=t=>{t.inputState.lastWheelEvent=Date.now()};Fs.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&t.inputState.tabFocusMode!=0&&(t.inputState.tabFocusMode=Date.now()+2e3),!1);lr.touchstart=(t,e)=>{let n=t.inputState,i=e.targetTouches[0];n.touchActive=!0,n.lastTouchTime=Date.now(),i&&(n.lastTouchX=i.clientX,n.lastTouchY=i.clientY),n.setSelectionOrigin("select.pointer")};lr.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};lr.touchend=(t,e)=>{t.inputState.touchActive=!1};Fs.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let i of t.state.facet(az))if(n=i(t,e),n)break;if(!n&&e.button==0&&(n=IK(t,e)),n){let i=!t.hasFocus;t.inputState.startMouseSelection(new PK(t,e,n,i)),i&&t.observer.ignore(()=>{HB(t.contentDOM);let s=t.root.activeElement;s&&!s.contains(t.contentDOM)&&s.blur()});let r=t.inputState.mouseSelection;if(r)return r.start(e),r.dragging===!1}else t.inputState.setSelectionOrigin("select.pointer");return!1};function fQ(t,e,n,i){if(i==1)return ce.cursor(e,n);if(i==2)return dK(t.state,e,n);{let r=t.docView.lineAt(e,n),s=t.state.doc.lineAt(r?r.posAtEnd:e),a=r?r.posAtStart:s.from,c=r?r.posAtEnd:s.to;return c<t.state.doc.length&&c==s.to&&c++,ce.undirectionalRange(a,c)}}const LK=$e.ie&&$e.ie_version<=11;let hQ=null,dQ=0,pQ=0;function Az(t){if(!LK)return t.detail;let e=hQ,n=pQ;return hQ=t,pQ=Date.now(),dQ=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(dQ+1)%3:1}function IK(t,e){let n=t.posAndSideAtCoords({x:e.clientX,y:e.clientY},!1),i=Az(e),r=t.state.selection;return{update(s){s.docChanged&&(n.pos=s.changes.mapPos(n.pos),r=r.map(s.changes))},get(s,a,c){let u=t.posAndSideAtCoords({x:s.clientX,y:s.clientY},!1),h,d=fQ(t,u.pos,u.assoc,i);if(n.pos!=u.pos&&!a){let m=fQ(t,n.pos,n.assoc,i),g=Math.min(m.from,d.from),y=Math.max(m.to,d.to);d=g<d.from?ce.range(g,y,d.assoc):ce.range(y,g,d.assoc)}return a?r.replaceRange(r.main.extend(d.from,d.to,d.assoc)):c&&i==1&&r.ranges.length>1&&(h=jK(r,u.pos))?h:c?r.addRange(d):ce.create([d])}}}function jK(t,e){for(let n=0;n<t.ranges.length;n++){let{from:i,to:r}=t.ranges[n];if(i<=e&&r>=e)return ce.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}Fs.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let r=t.docView.tile.nearest(e.target);if(r&&r.isWidget()){let s=r.posAtStart,a=s+r.length;(s>=n.to||a<=n.from)&&(n=ce.undirectionalRange(s,a))}}let{inputState:i}=t;return i.mouseSelection&&(i.mouseSelection.dragging=!0),i.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",by(t.state,iT,t.state.sliceDoc(n.from,n.to))),e.dataTransfer.effectAllowed="copyMove"),!1};Fs.dragend=t=>(t.inputState.draggedContent=null,!1);function mQ(t,e,n,i){if(n=by(t.state,nT,n),!n)return;let r=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:s}=t.inputState,a=i&&s&&NK(t,e)?{from:s.from,to:s.to}:null,c={from:r,insert:n},u=t.state.changes(a?[a,c]:c);t.focus(),t.dispatch({changes:u,selection:{anchor:u.mapPos(r,-1),head:u.mapPos(r,1)},userEvent:a?"move.drop":"input.drop"}),t.inputState.draggedContent=null}Fs.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let i=Array(n.length),r=0,s=()=>{++r==n.length&&mQ(t,e,i.filter(a=>a!=null).join(t.state.lineBreak),!1)};for(let a=0;a<n.length;a++){let c=new FileReader;c.onerror=s,c.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(c.result)||(i[a]=c.result),s()},c.readAsText(n[a])}return!0}else{let i=e.dataTransfer.getData("Text");if(i)return mQ(t,e,i,!0),!0}return!1};Fs.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=kz?null:e.clipboardData;return n?(Cz(t,n.getData("text/plain")||n.getData("text/uri-list")),!0):(DK(t),!1)};function BK(t,e){let n=t.dom.parentNode;if(!n)return;let i=n.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=e,i.focus(),i.selectionEnd=e.length,i.selectionStart=0,setTimeout(()=>{i.remove(),t.focus()},50)}function zK(t){let e=[],n=[],i=!1;for(let r of t.selection.ranges)r.empty||(e.push(t.sliceDoc(r.from,r.to)),n.push(r));if(!e.length){let r=-1;for(let{from:s}of t.selection.ranges){let a=t.doc.lineAt(s);a.number>r&&(e.push(a.text),n.push({from:a.from,to:Math.min(t.doc.length,a.to+1)})),r=a.number}i=!0}return{text:by(t,iT,e.join(t.lineBreak)),ranges:n,linewise:i}}let H1=null;Fs.copy=Fs.cut=(t,e)=>{if(!tp(t.contentDOM,t.observer.selectionRange))return!1;let{text:n,ranges:i,linewise:r}=zK(t.state);if(!n&&!r)return!1;H1=r?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"});let s=kz?null:e.clipboardData;return s?(s.clearData(),s.setData("text/plain",n),!0):(BK(t,n),!1)};const Rz=Ho.define();function Pz(t,e){let n=[];for(let i of t.facet(uz)){let r=i(t,e);r&&n.push(r)}return n.length?t.update({effects:n,annotations:Rz.of(!0)}):null}function Mz(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=Pz(t.state,e);n?t.dispatch(n):t.update([])}},10)}lr.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),Mz(t)};lr.blur=t=>{t.observer.clearSelectionRange(),Mz(t)};lr.compositionstart=lr.compositionupdate=(t,e)=>{if(!t.observer.editContext&&(t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0)){let{main:n}=t.state.selection;!n.empty&&t.lineBlockAt(n.from).from!=t.lineBlockAt(n.to).from&&!t.state.readOnly&&t.dispatch({changes:t.state.selection.ranges.filter(i=>!i.empty).map(i=>({from:i.from,to:i.to})),userEvent:"input"}),t.inputState.composing=0}};lr.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,$e.chrome&&$e.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50))};lr.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};Fs.beforeinput=(t,e)=>{var n,i;if((e.inputType=="insertText"||e.inputType=="insertCompositionText")&&(t.inputState.insertingText=e.data,t.inputState.insertingTextAt=Date.now()),e.inputType=="insertReplacementText"&&t.observer.editContext){let s=(n=e.dataTransfer)===null||n===void 0?void 0:n.getData("text/plain"),a=e.getTargetRanges();if(s&&a.length){let c=a[0],u=t.posAtDOM(c.startContainer,c.startOffset),h=t.posAtDOM(c.endContainer,c.endOffset);return aT(t,{from:u,to:h,insert:t.state.toText(s)},null),!0}}let r;if($e.chrome&&$e.android&&(r=_z.find(s=>s.inputType==e.inputType))&&(t.observer.delayAndroidKey(r.key,r.keyCode),r.key=="Backspace"||r.key=="Delete")){let s=((i=window.visualViewport)===null||i===void 0?void 0:i.height)||0;setTimeout(()=>{var a;(((a=window.visualViewport)===null||a===void 0?void 0:a.height)||0)>s+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return $e.ios&&e.inputType=="deleteContentForward"&&t.observer.flushSoon(),$e.safari&&e.inputType=="insertText"&&t.inputState.composing>=0&&setTimeout(()=>lr.compositionend(t,e),20),!1};const gQ=new Set;function XK(t){gQ.has(t)||(gQ.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const OQ=["pre-wrap","normal","pre-line","break-spaces"];let rh=!1;function bQ(){rh=!1}class UK{constructor(e){this.lineWrapping=e,this.doc=Nt.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,n){let i=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((n-e-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return OQ.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let i=0;i<e.length;i++){let r=e[i];r<0?i++:this.heightSamples[Math.floor(r*10)]||(n=!0,this.heightSamples[Math.floor(r*10)]=!0)}return n}refresh(e,n,i,r,s,a){let c=OQ.indexOf(e)>-1,u=Math.abs(n-this.lineHeight)>.3||this.lineWrapping!=c;if(this.lineWrapping=c,this.lineHeight=n,this.charWidth=i,this.textHeight=r,this.lineLength=s,u){this.heightSamples={};for(let h=0;h<a.length;h++){let d=a[h];d<0?h++:this.heightSamples[Math.floor(d*10)]=!0}}return u}}class ZK{constructor(e,n){this.from=e,this.heights=n,this.index=0}get more(){return this.index<this.heights.length}}class Vs{constructor(e,n,i,r,s){this.from=e,this.length=n,this.top=i,this.height=r,this._content=s}get type(){return typeof this._content=="number"?$i.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof Jc?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new Vs(this.from,this.length+e.length,this.top,this.height+e.height,n)}}var dn=(function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t})(dn||(dn={}));const VO=.001;class ar{constructor(e,n,i=2){this.length=e,this.height=n,this.flags=i}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>VO&&(rh=!0),this.height=e)}replace(e,n,i){return ar.of(i)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,i,r){let s=this,a=i.doc;for(let c=r.length-1;c>=0;c--){let{fromA:u,toA:h,fromB:d,toB:m}=r[c],g=s.lineAt(u,dn.ByPosNoHeight,i.setDoc(n),0,0),y=g.to>=h?g:s.lineAt(h,dn.ByPosNoHeight,i,0,0);for(m+=y.to-h,h=y.to;c>0&&g.from<=r[c-1].toA;)u=r[c-1].fromA,d=r[c-1].fromB,c--,u<g.from&&(g=s.lineAt(u,dn.ByPosNoHeight,i,0,0));d+=g.from-u,u=g.from;let v=lT.build(i.setDoc(a),e,d,m);s=_b(s,s.replace(u,h,v))}return s.updateHeight(i,0)}static empty(){return new Zr(0,0,0)}static of(e){if(e.length==1)return e[0];let n=0,i=e.length,r=0,s=0;for(;;)if(n==i)if(r>s*2){let c=e[n-1];c.break?e.splice(--n,1,c.left,null,c.right):e.splice(--n,1,c.left,c.right),i+=1+c.break,r-=c.size}else if(s>r*2){let c=e[i];c.break?e.splice(i,1,c.left,null,c.right):e.splice(i,1,c.left,c.right),i+=2+c.break,s-=c.size}else break;else if(r<s){let c=e[n++];c&&(r+=c.size)}else{let c=e[--i];c&&(s+=c.size)}let a=!1;return e[n-1]==null?(a=!0,n--):e[n]==null&&(a=!0,i++),new qK(ar.of(e.slice(0,n)),a,ar.of(e.slice(i)))}}function _b(t,e){return t==e?t:(t.constructor!=e.constructor&&(rh=!0),e)}ar.prototype.size=1;const VK=et.replace({});class Nz extends ar{constructor(e,n,i){super(e,n),this.deco=i,this.spaceAbove=0}mainBlock(e,n){return new Vs(n,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(e,n,i,r){return this.spaceAbove&&e<i+this.spaceAbove?new Vs(r,0,i,this.spaceAbove,VK):this.mainBlock(i,r)}lineAt(e,n,i,r,s){let a=this.mainBlock(r,s);return this.spaceAbove?this.blockAt(0,i,r,s).join(a):a}forEachLine(e,n,i,r,s,a){e<=s+this.length&&n>=s&&a(this.lineAt(0,dn.ByPos,i,r,s))}setMeasuredHeight(e){let n=e.heights[e.index++];n<0?(this.spaceAbove=-n,n=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(n)}updateHeight(e,n=0,i=!1,r){return r&&r.from<=n&&r.more&&this.setMeasuredHeight(r),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Zr extends Nz{constructor(e,n,i){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=i}mainBlock(e,n){return new Vs(n,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(e,n,i){let r=i[0];return i.length==1&&(r instanceof Zr||r instanceof Mi&&r.flags&4)&&Math.abs(this.length-r.length)<10?(r instanceof Mi?r=new Zr(r.length,this.height,this.spaceAbove):r.height=this.height,this.outdated||(r.outdated=!1),r):ar.of(i)}updateHeight(e,n=0,i=!1,r){return r&&r.from<=n&&r.more?this.setMeasuredHeight(r):(i||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Mi extends ar{constructor(e){super(e,0)}heightMetrics(e,n){let i=e.doc.lineAt(n).number,r=e.doc.lineAt(n+this.length).number,s=r-i+1,a,c=0;if(e.lineWrapping){let u=Math.min(this.height,e.lineHeight*s);a=u/s,this.length>s+1&&(c=(this.height-u)/(this.length-s-1))}else a=this.height/s;return{firstLine:i,lastLine:r,perLine:a,perChar:c}}blockAt(e,n,i,r){let{firstLine:s,lastLine:a,perLine:c,perChar:u}=this.heightMetrics(n,r);if(n.lineWrapping){let h=r+(e<n.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-i)/this.height))*this.length)),d=n.doc.lineAt(h),m=c+d.length*u,g=Math.max(i,e-m/2);return new Vs(d.from,d.length,g,m,0)}else{let h=Math.max(0,Math.min(a-s,Math.floor((e-i)/c))),{from:d,length:m}=n.doc.line(s+h);return new Vs(d,m,i+c*h,c,0)}}lineAt(e,n,i,r,s){if(n==dn.ByHeight)return this.blockAt(e,i,r,s);if(n==dn.ByPosNoHeight){let{from:y,to:v}=i.doc.lineAt(e);return new Vs(y,v-y,0,0,0)}let{firstLine:a,perLine:c,perChar:u}=this.heightMetrics(i,s),h=i.doc.lineAt(e),d=c+h.length*u,m=h.number-a,g=r+c*m+u*(h.from-s-m);return new Vs(h.from,h.length,Math.max(r,Math.min(g,r+this.height-d)),d,0)}forEachLine(e,n,i,r,s,a){e=Math.max(e,s),n=Math.min(n,s+this.length);let{firstLine:c,perLine:u,perChar:h}=this.heightMetrics(i,s);for(let d=e,m=r;d<=n;){let g=i.doc.lineAt(d);if(d==e){let v=g.number-c;m+=u*v+h*(e-s-v)}let y=u+h*g.length;a(new Vs(g.from,g.length,m,y,0)),m+=y,d=g.to+1}}replace(e,n,i){let r=this.length-n;if(r>0){let s=i[i.length-1];s instanceof Mi?i[i.length-1]=new Mi(s.length+r):i.push(null,new Mi(r-1))}if(e>0){let s=i[0];s instanceof Mi?i[0]=new Mi(e+s.length):i.unshift(new Mi(e-1),null)}return ar.of(i)}decomposeLeft(e,n){n.push(new Mi(e-1),null)}decomposeRight(e,n){n.push(null,new Mi(this.length-e-1))}updateHeight(e,n=0,i=!1,r){let s=n+this.length;if(r&&r.from<=n+this.length&&r.more){let a=[],c=Math.max(n,r.from),u=-1;for(r.from>n&&a.push(new Mi(r.from-n-1).updateHeight(e,n));c<=s&&r.more;){let d=e.doc.lineAt(c).length;a.length&&a.push(null);let m=r.heights[r.index++],g=0;m<0&&(g=-m,m=r.heights[r.index++]),u==-1?u=m:Math.abs(m-u)>=VO&&(u=-2);let y=new Zr(d,m,g);y.outdated=!1,a.push(y),c+=d+1}c<=s&&a.push(null,new Mi(s-c).updateHeight(e,c));let h=ar.of(a);return(u<0||Math.abs(h.height-this.height)>=VO||Math.abs(u-this.heightMetrics(e,n).perLine)>=VO)&&(rh=!0),_b(this,h)}else(i||this.outdated)&&(this.setHeight(e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class qK extends ar{constructor(e,n,i){super(e.length+(n?1:0)+i.length,e.height+i.height,(n?1:0)|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return this.flags&1}blockAt(e,n,i,r){let s=i+this.left.height;return e<s?this.left.blockAt(e,n,i,r):this.right.blockAt(e,n,s,r+this.left.length+this.break)}lineAt(e,n,i,r,s){let a=r+this.left.height,c=s+this.left.length+this.break,u=n==dn.ByHeight?e<a:e<c,h=u?this.left.lineAt(e,n,i,r,s):this.right.lineAt(e,n,i,a,c);if(this.break||(u?h.to<c:h.from>c))return h;let d=n==dn.ByPosNoHeight?dn.ByPosNoHeight:dn.ByPos;return u?h.join(this.right.lineAt(c,d,i,a,c)):this.left.lineAt(c,d,i,r,s).join(h)}forEachLine(e,n,i,r,s,a){let c=r+this.left.height,u=s+this.left.length+this.break;if(this.break)e<u&&this.left.forEachLine(e,n,i,r,s,a),n>=u&&this.right.forEachLine(e,n,i,c,u,a);else{let h=this.lineAt(u,dn.ByPos,i,r,s);e<h.from&&this.left.forEachLine(e,Math.min(n,h.from-1),i,r,s,a),h.to>=e&&h.from<=n&&a(h),n>h.to&&this.right.forEachLine(Math.max(e,h.to+1),n,i,c,u,a)}}replace(e,n,i){let r=this.left.length+this.break;if(n<r)return this.balanced(this.left.replace(e,n,i),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-r,n-r,i));let s=[];e>0&&this.decomposeLeft(e,s);let a=s.length;for(let c of i)s.push(c);if(e>0&&yQ(s,a-1),n<this.length){let c=s.length;this.decomposeRight(n,s),yQ(s,c)}return ar.of(s)}decomposeLeft(e,n){let i=this.left.length;if(e<=i)return this.left.decomposeLeft(e,n);n.push(this.left),this.break&&(i++,e>=i&&n.push(null)),e>i&&this.right.decomposeLeft(e-i,n)}decomposeRight(e,n){let i=this.left.length,r=i+this.break;if(e>=r)return this.right.decomposeRight(e-r,n);e<i&&this.left.decomposeRight(e,n),this.break&&e<r&&n.push(null),n.push(this.right)}balanced(e,n){return e.size>2*n.size||n.size>2*e.size?ar.of(this.break?[e,null,n]:[e,n]):(this.left=_b(this.left,e),this.right=_b(this.right,n),this.setHeight(e.height+n.height),this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,i=!1,r){let{left:s,right:a}=this,c=n+s.length+this.break,u=null;return r&&r.from<=n+s.length&&r.more?u=s=s.updateHeight(e,n,i,r):s.updateHeight(e,n,i),r&&r.from<=c+a.length&&r.more?u=a=a.updateHeight(e,c,i,r):a.updateHeight(e,c,i),u?this.balanced(s,a):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function yQ(t,e){let n,i;t[e]==null&&(n=t[e-1])instanceof Mi&&(i=t[e+1])instanceof Mi&&t.splice(e-1,3,new Mi(n.length+1+i.length))}const YK=5;class lT{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let i=Math.min(n,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof Zr?r.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new Zr(i-this.pos,-1,0)),this.writtenTo=i,n>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,i){if(e<n||i.heightRelevant){let r=i.widget?i.widget.estimatedHeight:0,s=i.widget?i.widget.lineBreaks:0;r<0&&(r=this.oracle.lineHeight);let a=n-e;i.block?this.addBlock(new Nz(a,r,i)):(a||s||r>=YK)&&this.addLineDeco(r,s,a)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new Zr(this.pos-e,-1,0)),this.writtenTo=this.pos}blankContent(e,n){let i=new Mi(n-e);return this.oracle.doc.lineAt(e).to==n&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Zr)return e;let n=new Zr(0,-1,0);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,i){let r=this.ensureLine();r.length+=i,r.collapsed+=i,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=n,this.writtenTo=this.pos=this.pos+i}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof Zr)&&!this.isCovered?this.nodes.push(new Zr(0,-1,0)):(this.writtenTo<this.pos||n==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let i=e;for(let r of this.nodes)r instanceof Zr&&r.updateHeight(this.oracle,i),i+=r?r.length:1;return this.nodes}static build(e,n,i,r){let s=new lT(i,e);return wt.spans(n,i,r,s,0),s.finish(i)}}function GK(t,e,n){let i=new FK;return wt.compare(t,e,n,i,0),i.changes}class FK{constructor(){this.changes=[]}compareRange(){}comparePoint(e,n,i,r){(e<n||i&&i.heightRelevant||r&&r.heightRelevant)&&Tf(e,n,this.changes,5)}}function HK(t,e){let n=t.getBoundingClientRect(),i=t.ownerDocument,r=i.defaultView||window,s=Math.max(0,n.left),a=Math.min(r.innerWidth,n.right),c=Math.max(0,n.top),u=Math.min(r.innerHeight,n.bottom);for(let h=t.parentNode;h&&h!=i.body;)if(bi(h)){let d=window.getComputedStyle(h);if((h.scrollHeight>h.clientHeight||h.scrollWidth>h.clientWidth)&&d.overflow!="visible"){let m=h.getBoundingClientRect();s=Math.max(s,m.left),a=Math.min(a,m.right),c=Math.max(c,m.top),u=Math.min(h==t.parentNode?r.innerHeight:u,m.bottom)}h=d.position=="absolute"||d.position=="fixed"?h.offsetParent:h.parentNode}else if(h.nodeType==11)h=h.host;else break;return{left:s-n.left,right:Math.max(s,a)-n.left,top:c-(n.top+e),bottom:Math.max(c,u)-(n.top+e)}}function WK(t){let e=t.getBoundingClientRect(),n=t.ownerDocument.defaultView||window;return e.left<n.innerWidth&&e.right>0&&e.top<n.innerHeight&&e.bottom>0}function KK(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class qS{constructor(e,n,i,r){this.from=e,this.to=n,this.size=i,this.displaySize=r}static same(e,n){if(e.length!=n.length)return!1;for(let i=0;i<e.length;i++){let r=e[i],s=n[i];if(r.from!=s.from||r.to!=s.to||r.size!=s.size)return!1}return!0}draw(e,n){return et.replace({widget:new JK(this.displaySize*(n?e.scaleY:e.scaleX),n)}).range(this.from,this.to)}}class JK extends Hs{constructor(e,n){super(),this.size=e,this.vertical=n}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class vQ{constructor(e,n){this.view=e,this.state=n,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scaleX=1,this.scaleY=1,this.scrollOffset=0,this.scrolledToBottom=!1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=SQ,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=ln.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let i=n.facet(rT).some(r=>typeof r!="function"&&r.class=="cm-lineWrapping");this.heightOracle=new UK(i),this.stateDeco=xQ(n),this.heightMap=ar.empty().applyChanges(this.stateDeco,Nt.empty,this.heightOracle.setDoc(n.doc),[new gs(0,0,0,n.doc.length)]);for(let r=0;r<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());r++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=et.set(this.lineGaps.map(r=>r.draw(this,!1))),this.scrollParent=e.scrollDOM,this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let i=0;i<=1;i++){let r=i?n.head:n.anchor;if(!e.some(({from:s,to:a})=>r>=s&&r<=a)){let{from:s,to:a}=this.lineBlockAt(r);e.push(new Hg(s,a))}}return this.viewports=e.sort((i,r)=>i.from-r.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?SQ:new cT(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(qd(e,this.scaler))})}update(e,n=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=xQ(this.state);let r=e.changedRanges,s=gs.extendWithRanges(r,GK(i,this.stateDeco,e?e.changes:si.empty(this.state.doc.length))),a=this.heightMap.height,c=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollOffset);bQ(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),(this.heightMap.height!=a||rh)&&(e.flags|=2),c?(this.scrollAnchorPos=e.changes.mapPos(c.from,-1),this.scrollAnchorHeight=c.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=a);let u=s.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.head<u.from||n.range.head>u.to)||!this.viewportIsAppropriate(u))&&(u=this.getViewport(0,n));let h=u.from!=this.viewport.from||u.to!=this.viewport.to;this.viewport=u,e.flags|=this.updateForViewport(),(h||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(hz)&&(this.mustEnforceCursorAssoc=!0)}measure(){let{view:e}=this,n=e.contentDOM,i=window.getComputedStyle(n),r=this.heightOracle,s=i.whiteSpace;this.defaultTextDirection=i.direction=="rtl"?ln.RTL:ln.LTR;let a=this.heightOracle.mustRefreshForWrapping(s)||this.mustMeasureContent==="refresh",c=n.getBoundingClientRect(),u=a||this.mustMeasureContent||this.contentDOMHeight!=c.height;this.contentDOMHeight=c.height,this.mustMeasureContent=!1;let h=0,d=0;if(c.width&&c.height){let{scaleX:R,scaleY:P}=qB(n,c);(R>.005&&Math.abs(this.scaleX-R)>.005||P>.005&&Math.abs(this.scaleY-P)>.005)&&(this.scaleX=R,this.scaleY=P,h|=16,a=u=!0)}let m=(parseInt(i.paddingTop)||0)*this.scaleY,g=(parseInt(i.paddingBottom)||0)*this.scaleY;(this.paddingTop!=m||this.paddingBottom!=g)&&(this.paddingTop=m,this.paddingBottom=g,h|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(u=!0),this.editorWidth=e.scrollDOM.clientWidth,h|=16);let y=YB(this.view.contentDOM,!1).y;y!=this.scrollParent&&(this.scrollParent=y,this.scrollAnchorHeight=-1,this.scrollOffset=0);let v=this.getScrollOffset();this.scrollOffset!=v&&(this.scrollAnchorHeight=-1,this.scrollOffset=v),this.scrolledToBottom=WB(this.scrollParent||e.win);let S=(this.printing?KK:HK)(n,this.paddingTop),x=S.top-this.pixelViewport.top,w=S.bottom-this.pixelViewport.bottom;this.pixelViewport=S;let C=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(C!=this.inView&&(this.inView=C,C&&(u=!0)),!this.inView&&!this.scrollTarget&&!WK(e.dom))return 0;let k=c.width;if((this.contentDOMWidth!=k||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=c.width,this.editorHeight=e.scrollDOM.clientHeight,h|=16),u){let R=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(R)&&(a=!0),a||r.lineWrapping&&Math.abs(k-this.contentDOMWidth)>r.charWidth){let{lineHeight:P,charWidth:N,textHeight:$}=e.docView.measureTextSize();a=P>0&&r.refresh(s,P,N,$,Math.max(5,k/N),R),a&&(e.docView.minWidth=0,h|=16)}x>0&&w>0?d=Math.max(x,w):x<0&&w<0&&(d=Math.min(x,w)),bQ();for(let P of this.viewports){let N=P.from==this.viewport.from?R:e.docView.measureVisibleLineHeights(P);this.heightMap=(a?ar.empty().applyChanges(this.stateDeco,Nt.empty,this.heightOracle,[new gs(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,a,new ZK(P.from,N))}rh&&(h|=2)}let A=!this.viewportIsAppropriate(this.viewport,d)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return A&&(h&2&&(h|=this.updateScaler()),this.viewport=this.getViewport(d,this.scrollTarget),h|=this.updateForViewport()),(h&2||A)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(a?[]:this.lineGaps,e)),h|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),h}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,s=this.heightOracle,{visibleTop:a,visibleBottom:c}=this,u=new Hg(r.lineAt(a-i*1e3,dn.ByHeight,s,0,0).from,r.lineAt(c+(1-i)*1e3,dn.ByHeight,s,0,0).to);if(n){let{head:h}=n.range;if(h<u.from||h>u.to){let d=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),m=r.lineAt(h,dn.ByPos,s,0,0),g;n.y=="center"?g=(m.top+m.bottom)/2-d/2:n.y=="start"||n.y=="nearest"&&h<u.from?g=m.top:g=m.bottom-d,u=new Hg(r.lineAt(g-1e3/2,dn.ByHeight,s,0,0).from,r.lineAt(g+d+1e3/2,dn.ByHeight,s,0,0).to)}}return u}mapViewport(e,n){let i=n.mapPos(e.from,-1),r=n.mapPos(e.to,1);return new Hg(this.heightMap.lineAt(i,dn.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,dn.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:n},i=0){if(!this.inView)return!0;let{top:r}=this.heightMap.lineAt(e,dn.ByPos,this.heightOracle,0,0),{bottom:s}=this.heightMap.lineAt(n,dn.ByPos,this.heightOracle,0,0),{visibleTop:a,visibleBottom:c}=this;return(e==0||r<=a-Math.max(10,Math.min(-i,250)))&&(n==this.state.doc.length||s>=c+Math.max(10,Math.min(i,250)))&&r>a-2*1e3&&s<c+2*1e3}mapLineGaps(e,n){if(!e.length||n.empty)return e;let i=[];for(let r of e)n.touchesRange(r.from,r.to)||i.push(new qS(n.mapPos(r.from),n.mapPos(r.to),r.size,r.displaySize));return i}ensureLineGaps(e,n){let i=this.heightOracle.lineWrapping,r=i?1e4:2e3,s=r>>1,a=r<<1;if(this.defaultTextDirection!=ln.LTR&&!i)return[];let c=[],u=(d,m,g,y)=>{if(m-d<s)return;let v=this.state.selection.main,S=[v.from];v.empty||S.push(v.to);for(let w of S)if(w>d&&w<m){u(d,w-10,g,y),u(w+10,m,g,y);return}let x=tJ(e,w=>w.from>=g.from&&w.to<=g.to&&Math.abs(w.from-d)<s&&Math.abs(w.to-m)<s&&!S.some(C=>w.from<C&&w.to>C));if(!x){if(m<g.to&&n&&i&&n.visibleRanges.some(k=>k.from<=m&&k.to>=m)){let k=n.moveToLineBoundary(ce.cursor(m),!1,!0).head;k>d&&(m=k)}let w=this.gapSize(g,d,m,y),C=i||w<2e6?w:2e6;x=new qS(d,m,w,C)}c.push(x)},h=d=>{if(d.length<a||d.type!=$i.Text)return;let m=eJ(d.from,d.to,this.stateDeco);if(m.total<a)return;let g=this.scrollTarget?this.scrollTarget.range.head:null,y,v;if(i){let S=r/this.heightOracle.lineLength*this.heightOracle.lineHeight,x,w;if(g!=null){let C=Kg(m,g),k=((this.visibleBottom-this.visibleTop)/2+S)/d.height;x=C-k,w=C+k}else x=(this.visibleTop-d.top-S)/d.height,w=(this.visibleBottom-d.top+S)/d.height;y=Wg(m,x),v=Wg(m,w)}else{let S=m.total*this.heightOracle.charWidth,x=r*this.heightOracle.charWidth,w=0;if(S>2e6)for(let P of e)P.from>=d.from&&P.from<d.to&&P.size!=P.displaySize&&P.from*this.heightOracle.charWidth+w<this.pixelViewport.left&&(w=P.size-P.displaySize);let C=this.pixelViewport.left+w,k=this.pixelViewport.right+w,A,R;if(g!=null){let P=Kg(m,g),N=((k-C)/2+x)/S;A=P-N,R=P+N}else A=(C-x)/S,R=(k+x)/S;y=Wg(m,A),v=Wg(m,R)}y>d.from&&u(d.from,y,d,m),v<d.to&&u(v,d.to,d,m)};for(let d of this.viewportLines)Array.isArray(d.type)?d.type.forEach(h):h(d);return c}gapSize(e,n,i,r){let s=Kg(r,i)-Kg(r,n);return this.heightOracle.lineWrapping?e.height*s:r.total*this.heightOracle.charWidth*s}updateLineGaps(e){qS.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=et.set(e.map(n=>n.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let n=this.stateDeco;this.lineGaps.length&&(n=n.concat(this.lineGapDeco));let i=[];wt.spans(n,this.viewport.from,this.viewport.to,{span(s,a){i.push({from:s,to:a})},point(){}},20);let r=0;if(i.length!=this.visibleRanges.length)r=12;else for(let s=0;s<i.length&&!(r&8);s++){let a=this.visibleRanges[s],c=i[s];(a.from!=c.from||a.to!=c.to)&&(r|=4,e&&e.mapPos(a.from,-1)==c.from&&e.mapPos(a.to,1)==c.to||(r|=8))}return this.visibleRanges=i,r}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||qd(this.heightMap.lineAt(e,dn.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(n=>n.top<=e&&n.bottom>=e)||qd(this.heightMap.lineAt(this.scaler.fromDOM(e),dn.ByHeight,this.heightOracle,0,0),this.scaler)}getScrollOffset(){return this.scrollParent==this.view.scrollDOM?this.scrollParent.scrollTop*this.scaleY:(this.scrollParent?this.scrollParent.getBoundingClientRect().top:0)-this.view.contentDOM.getBoundingClientRect().top}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return qd(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class Hg{constructor(e,n){this.from=e,this.to=n}}function eJ(t,e,n){let i=[],r=t,s=0;return wt.spans(n,t,e,{span(){},point(a,c){a>r&&(i.push({from:r,to:a}),s+=a-r),r=c}},20),r<e&&(i.push({from:r,to:e}),s+=e-r),{total:s,ranges:i}}function Wg({total:t,ranges:e},n){if(n<=0)return e[0].from;if(n>=1)return e[e.length-1].to;let i=Math.floor(t*n);for(let r=0;;r++){let{from:s,to:a}=e[r],c=a-s;if(i<=c)return s+i;i-=c}}function Kg(t,e){let n=0;for(let{from:i,to:r}of t.ranges){if(e<=r){n+=e-i;break}n+=r-i}return n/t.total}function tJ(t,e){for(let n of t)if(e(n))return n}const SQ={toDOM(t){return t},fromDOM(t){return t},scale:1,eq(t){return t==this}};function xQ(t){let e=t.facet(my).filter(i=>typeof i!="function"),n=t.facet(sT).filter(i=>typeof i!="function");return n.length&&e.push(wt.join(n)),e}class cT{constructor(e,n,i){let r=0,s=0,a=0;this.viewports=i.map(({from:c,to:u})=>{let h=n.lineAt(c,dn.ByPos,e,0,0).top,d=n.lineAt(u,dn.ByPos,e,0,0).bottom;return r+=d-h,{from:c,to:u,top:h,bottom:d,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(n.height-r);for(let c of this.viewports)c.domTop=a+(c.top-s)*this.scale,a=c.domBottom=c.domTop+(c.bottom-c.top),s=c.bottom}toDOM(e){for(let n=0,i=0,r=0;;n++){let s=n<this.viewports.length?this.viewports[n]:null;if(!s||e<s.top)return r+(e-i)*this.scale;if(e<=s.bottom)return s.domTop+(e-s.top);i=s.bottom,r=s.domBottom}}fromDOM(e){for(let n=0,i=0,r=0;;n++){let s=n<this.viewports.length?this.viewports[n]:null;if(!s||e<s.domTop)return i+(e-r)/this.scale;if(e<=s.domBottom)return s.top+(e-s.domTop);i=s.bottom,r=s.domBottom}}eq(e){return e instanceof cT?this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((n,i)=>n.from==e.viewports[i].from&&n.to==e.viewports[i].to):!1}}function qd(t,e){if(e.scale==1)return t;let n=e.toDOM(t.top),i=e.toDOM(t.bottom);return new Vs(t.from,t.length,n,i-n,Array.isArray(t._content)?t._content.map(r=>qd(r,e)):t._content)}const Jg=De.define({combine:t=>t.join(" ")}),W1=De.define({combine:t=>t.indexOf(!0)>-1}),K1=zl.newName(),Qz=zl.newName(),$z=zl.newName(),Dz={"&light":"."+Qz,"&dark":"."+$z};function J1(t,e,n){return new zl(e,{finish(i){return/&/.test(i)?i.replace(/&\w*/,r=>{if(r=="&")return t;if(!n||!n[r])throw new RangeError(`Unsupported selector: ${r}`);return n[r]}):t+" "+i}})}const nJ=J1("."+K1,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{userSelect:"none",position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-selectionHandle":{backgroundColor:"currentColor",width:"1.5px"},".cm-selectionHandle-start::before, .cm-selectionHandle-end::before":{content:'""',backgroundColor:"inherit",borderRadius:"50%",width:"8px",height:"8px",position:"absolute",left:"-3.25px"},".cm-selectionHandle-start::before":{top:"-8px"},".cm-selectionHandle-end::before":{bottom:"-8px"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},".cm-panels-top":{top:"0"},".cm-panels-bottom":{bottom:"0"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"baseline",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{background:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 0) no-repeat",backgroundSize:".4em",backgroundPosition:"calc(min(50%, 0px)) center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},Dz),iJ={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},YS=$e.ie&&$e.ie_version<=11;class rJ{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new NW,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let i of n)this.queue.push(i);($e.ie&&$e.ie_version<=11||$e.ios&&e.composing)&&n.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&$e.android&&e.constructor.EDIT_CONTEXT!==!1&&!($e.chrome&&$e.chrome_version<126)&&(this.editContext=new oJ(e),e.state.facet(Ea)&&(e.contentDOM.editContext=this.editContext.editContext)),YS&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(n=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,i)=>n!=e[i]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,r=this.selectionRange;if(i.state.facet(Ea)?i.root.activeElement!=this.dom:!tp(this.dom,r))return;let s=r.anchorNode&&i.docView.tile.nearest(r.anchorNode);if(s&&s.isWidget()&&s.widget.ignoreEvent(e)){n||(this.selectionChanged=!1);return}($e.ie&&$e.ie_version<=11||$e.android&&$e.chrome)&&!i.state.selection.main.empty&&r.focusNode&&ip(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=vp(e.root);if(!n)return!1;let i=$e.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&sJ(this.view,n)||n;if(!i||this.selectionRange.eq(i))return!1;let r=tp(this.dom,i);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&$W(this.dom,i)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(i),r&&(this.selectionChanged=!0),!0)}setSelectionRange(e,n){this.selectionRange.set(e.node,e.offset,n.node,n.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,n=null;for(let i=this.dom;i;)if(bi(i))!n&&e<this.scrollTargets.length&&this.scrollTargets[e]==i?e++:n||(n=this.scrollTargets.slice(0,e)),n&&n.push(i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;if(e<this.scrollTargets.length&&!n&&(n=this.scrollTargets.slice(0,e)),n){for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);for(let i of this.scrollTargets=n)i.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,iJ),YS&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),YS&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,n){var i;if(!this.delayedAndroidKey){let r=()=>{let s=this.delayedAndroidKey;s&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=s.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&s.force&&kf(this.dom,s.key,s.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(r)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange<Date.now()-50||!!(!((i=this.delayedAndroidKey)===null||i===void 0)&&i.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,i=-1,r=!1;for(let s of e){let a=this.readMutation(s);a&&(a.typeOver&&(r=!0),n==-1?{from:n,to:i}=a:(n=Math.min(a.from,n),i=Math.max(a.to,i)))}return{from:n,to:i,typeOver:r}}readChange(){let{from:e,to:n,typeOver:i}=this.processRecords(),r=this.selectionChanged&&tp(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new xK(this.view,e,n,i);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.selectionChanged,i=this.readChange();if(!i)return this.view.requestMeasure(),!1;let r=this.view.state,s=wz(this.view,i);return this.view.state==r&&(i.domChanged||n)&&this.view.update([]),s}readMutation(e){let n=this.view.docView.tile.nearest(e.target);if(!n||n.isWidget())return null;if(n.markDirty(e.type=="attributes"),e.type=="childList"){let i=wQ(n,e.previousSibling||e.target.previousSibling,-1),r=wQ(n,e.nextSibling||e.target.nextSibling,1);return{from:i?n.posAfter(i):n.posAtStart,to:r?n.posBefore(r):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(Ea)!=e.state.facet(Ea)&&(e.view.contentDOM.editContext=e.state.facet(Ea)?this.editContext.editContext:null))}destroy(){var e,n,i;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(i=this.resizeScroll)===null||i===void 0||i.disconnect();for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function wQ(t,e,n){for(;e;){let i=Pn.get(e);if(i&&i.parent==t)return i;let r=e.parentNode;e=r!=t.dom?r:n>0?e.nextSibling:e.previousSibling}return null}function EQ(t,e){let n=e.startContainer,i=e.startOffset,r=e.endContainer,s=e.endOffset,a=t.docView.domAtPos(t.state.selection.main.anchor,1);return ip(a.node,a.offset,r,s)&&([n,i,r,s]=[r,s,n,i]),{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:s}}function sJ(t,e){if(e.getComposedRanges){let r=e.getComposedRanges(t.root)[0];if(r)return EQ(t,r)}let n=null;function i(r){r.preventDefault(),r.stopImmediatePropagation(),n=r.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",i,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",i,!0),n?EQ(t,n):null}class oJ{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let n=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=i=>{let r=e.state.selection.main,{anchor:s,head:a}=r,c=this.toEditorPos(i.updateRangeStart),u=this.toEditorPos(i.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:i.updateRangeStart,editorBase:c,drifted:!1});let h=u-c>i.text.length;c==this.from&&s<this.from?c=s:u==this.to&&s>this.to&&(u=s);let d=Ez(e.state.sliceDoc(c,u),i.text,(h?r.from:r.to)-c,h?"end":null);if(!d){let g=ce.single(this.toEditorPos(i.selectionStart),this.toEditorPos(i.selectionEnd));F1(g,r)||e.dispatch({selection:g,userEvent:"select"});return}let m={from:d.from+c,to:d.toA+c,insert:Nt.of(i.text.slice(d.from,d.toB).split(`
68
+ `))};if(($e.mac||$e.android)&&m.from==a-1&&/^\. ?$/.test(i.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(m={from:c,to:u,insert:Nt.of([i.text.replace("."," ")])}),this.pendingContextChange=m,!e.state.readOnly){let g=this.to-this.from+(m.to-m.from+m.insert.length);aT(e,m,ce.single(this.toEditorPos(i.selectionStart,g),this.toEditorPos(i.selectionEnd,g)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),m.from<m.to&&!m.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(n.text.slice(Math.max(0,i.updateRangeStart-1),Math.min(n.text.length,i.updateRangeStart+1)))&&this.handlers.compositionend(i)},this.handlers.characterboundsupdate=i=>{let r=[],s=null;for(let a=this.toEditorPos(i.rangeStart),c=this.toEditorPos(i.rangeEnd);a<c;a++){let u=e.coordsForChar(a);s=u&&new DOMRect(u.left,u.top,u.right-u.left,u.bottom-u.top)||s||new DOMRect,r.push(s)}n.updateCharacterBounds(i.rangeStart,r)},this.handlers.textformatupdate=i=>{let r=[];for(let s of i.getTextFormats()){let a=s.underlineStyle,c=s.underlineThickness;if(!/none/i.test(a)&&!/none/i.test(c)){let u=this.toEditorPos(s.rangeStart),h=this.toEditorPos(s.rangeEnd);if(u<h){let d=`text-decoration: underline ${/^[a-z]/.test(a)?a+" ":a=="Dashed"?"dashed ":a=="Squiggle"?"wavy ":""}${/thin/i.test(c)?1:2}px`;r.push(et.mark({attributes:{style:d}}).range(u,h))}}}e.dispatch({effects:pz.of(et.set(r))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:i}=this.composing;this.composing=null,i&&this.reset(e.state)}};for(let i in this.handlers)n.addEventListener(i,this.handlers[i]);this.measureReq={read:i=>{let r=vp(i.root);r&&r.rangeCount&&this.editContext.updateSelectionBounds(r.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let n=0,i=!1,r=this.pendingContextChange;return e.changes.iterChanges((s,a,c,u,h)=>{if(i)return;let d=h.length-(a-s);if(r&&a>=r.to)if(r.from==s&&r.to==a&&r.insert.eq(h)){r=this.pendingContextChange=null,n+=d,this.to+=d;return}else r=null,this.revertPending(e.state);if(s+=n,a+=n,a<=this.from)this.from+=d,this.to+=d;else if(s<this.to){if(s<this.from||a>this.to||this.to-this.from+h.length>3e4){i=!0;return}this.editContext.updateText(this.toContextPos(s),this.toContextPos(a),h.toString()),this.to+=d}n+=d}),r&&!i&&this.revertPending(e.state),!i}update(e){let n=this.pendingContextChange,i=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(i.from,i.to)&&e.transactions.some(r=>!r.isUserEvent("input.type")&&r.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||n)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:n}=e.selection.main;this.from=Math.max(0,n-1e4),this.to=Math.min(e.doc.length,n+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let n=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(n.from),this.toContextPos(n.from+n.insert.length),e.doc.sliceString(n.from,n.to))}setSelection(e){let{main:n}=e.selection,i=this.toContextPos(Math.max(this.from,Math.min(this.to,n.anchor))),r=this.toContextPos(n.head);(this.editContext.selectionStart!=i||this.editContext.selectionEnd!=r)&&this.editContext.updateSelection(i,r)}rangeIsValid(e){let{head:n}=e.selection.main;return!(this.from>0&&n-this.from<500||this.to<e.doc.length&&this.to-n<500||this.to-this.from>1e4*3)}toEditorPos(e,n=this.to-this.from){e=Math.min(e,n);let i=this.composing;return i&&i.drifted?i.editorBase+(e-i.contextBase):e+this.from}toContextPos(e){let n=this.composing;return n&&n.drifted?n.contextBase+(e-n.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class Ae{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var n;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.clearAnnouncement=-1,this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:i}=e;this.dispatchTransactions=e.dispatchTransactions||i&&(r=>r.forEach(s=>i(s,this)))||(r=>this.update(r)),this.dispatch=this.dispatch.bind(this),this._root=e.root||QW(e.parent)||document,this.viewState=new vQ(this,e.state||Ct.create(e)),e.scrollTo&&e.scrollTo.is(Yg)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Sf).map(r=>new zS(r));for(let r of this.plugins)r.update(this);this.observer=new rJ(this),this.inputState=new TK(this),this.inputState.ensureHandlers(this.plugins),this.docView=new aQ(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((n=document.fonts)===null||n===void 0)&&n.ready&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent="refresh",this.requestMeasure()})}dispatch(...e){let n=e.length==1&&e[0]instanceof Hn?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,i=!1,r,s=this.state;for(let g of e){if(g.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=g.state}if(this.destroyed){this.viewState.state=s;return}let a=this.hasFocus,c=0,u=null;e.some(g=>g.annotation(Rz))?(this.inputState.notifiedFocused=a,c=1):a!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=a,u=Pz(s,a),u||(c=1));let h=this.observer.delayedAndroidKey,d=null;if(h?(this.observer.clearDelayedAndroidKey(),d=this.observer.readChange(),(d&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(d=null)):this.observer.clear(),s.facet(Ct.phrases)!=this.state.facet(Ct.phrases))return this.setState(s);r=xb.create(this,s,e),r.flags|=c;let m=this.viewState.scrollTarget;try{this.updateState=2;for(let g of e){if(m&&(m=m.map(g.changes)),g.scrollIntoView){let{main:y}=g.state.selection,{x:v,y:S}=this.state.facet(Ae.cursorScrollMargin);m=new Cf(y.empty?y:ce.cursor(y.head,y.head>y.anchor?-1:1),"nearest","nearest",S,v)}for(let y of g.effects)y.is(Yg)&&(m=y.value.clip(this.state))}this.viewState.update(r,m),this.bidiCache=Tb.update(this.bidiCache,r.changes),r.empty||(this.updatePlugins(r),this.inputState.update(r)),n=this.docView.update(r),this.state.facet(Vd)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(g=>g.isUserEvent("select.pointer")))}finally{this.updateState=0}if(r.startState.facet(Jg)!=r.state.facet(Jg)&&(this.viewState.mustMeasureContent=!0),(n||i||m||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!r.empty)for(let g of this.state.facet(V1))try{g(r)}catch(y){wr(this.state,y,"update listener")}(u||d)&&Promise.resolve().then(()=>{u&&this.state==u.startState&&this.dispatch(u),d&&!wz(this,d)&&h.force&&kf(this.contentDOM,h.key,h.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let i of this.plugins)i.destroy(this);this.viewState=new vQ(this,e),this.plugins=e.facet(Sf).map(i=>new zS(i)),this.pluginMap.clear();for(let i of this.plugins)i.update(this);this.docView.destroy(),this.docView=new aQ(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(Sf),i=e.state.facet(Sf);if(n!=i){let r=[];for(let s of i){let a=n.indexOf(s);if(a<0)r.push(new zS(s));else{let c=this.plugins[a];c.mustUpdate=e,r.push(c)}}for(let s of this.plugins)s.mustUpdate!=e&&s.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let r of this.plugins)r.mustUpdate=e;for(let r=0;r<this.plugins.length;r++)this.plugins[r].update(this);n!=i&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let n=e.value;if(n&&n.docViewUpdate)try{n.docViewUpdate(this)}catch(i){wr(this.state,i,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,i=this.viewState.scrollParent,r=this.viewState.getScrollOffset(),{scrollAnchorPos:s,scrollAnchorHeight:a,scaleY:c}=this.viewState;Math.abs(r-this.viewState.scrollOffset)>1&&(a=-1),this.viewState.scrollAnchorHeight=-1;try{for(let u=0;;u++){if(a<0){if(WB(i||this.win))s=-1,a=this.viewState.heightMap.height/this.viewState.scaleY;else{let v=this.viewState.scrollAnchorAt(r);s=v.from,a=v.top}c=this.viewState.scaleY}this.updateState=1;let h=this.viewState.measure();if(!h&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(u>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let d=[];h&4||([this.measureRequests,d]=[d,this.measureRequests]);let m=d.map(v=>{try{return v.read(this)}catch(S){return wr(this.state,S),_Q}}),g=xb.create(this,this.state,[]),y=!1;g.flags|=h,n?n.flags|=h:n=g,this.updateState=2,g.empty||(this.updatePlugins(g),this.inputState.update(g),this.updateAttrs(),y=this.docView.update(g),y&&this.docViewUpdate());for(let v=0;v<d.length;v++)if(m[v]!=_Q)try{let S=d[v];S.write&&S.write(m[v],this)}catch(S){wr(this.state,S)}if(y&&this.docView.updateSelection(!0),!g.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,a=-1;continue}else{let S=(s<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(s).top)/this.viewState.scaleY-a/c;if((S>1||S<-1)&&!($e.ios&&this.inputState.lastIOSMomentumScroll>Date.now()-100)&&(i==this.scrollDOM||this.hasFocus||Math.max(this.inputState.lastWheelEvent,this.inputState.lastTouchTime)>Date.now()-100)){r=r+S,i?s<0?i.scrollTop=i.scrollHeight:i.scrollTop+=S:this.win.scrollBy(0,S),a=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let u of this.state.facet(V1))u(n)}get themeClasses(){return K1+" "+(this.state.facet(W1)?$z:Qz)+" "+this.state.facet(Jg)}updateAttrs(){let e=TQ(this,mz,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(Ea)?"true":"false",class:"cm-content",style:`${$e.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),TQ(this,rT,n);let i=this.observer.ignore(()=>{let r=tQ(this.contentDOM,this.contentAttrs,n),s=tQ(this.dom,this.editorAttrs,e);return r||s});return this.editorAttrs=e,this.contentAttrs=n,i}showAnnouncements(e){let n=!0;for(let i of e)for(let r of i.effects)if(r.is(Ae.announce)){n&&(this.announceDOM.textContent="",this.win.clearTimeout(this.clearAnnouncement),this.clearAnnouncement=this.win.setTimeout(()=>{this.announceDOM.textContent=" "},200),n=!1);let s=this.announceDOM.appendChild(document.createElement("div"));s.textContent=r.value}}mountStyles(){this.styleModules=this.state.facet(Vd);let e=this.state.facet(Ae.cspNonce);zl.mount(this.root,this.styleModules.concat(nJ).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;n<this.measureRequests.length;n++)if(this.measureRequests[n].key===e.key){this.measureRequests[n]=e;return}}this.measureRequests.push(e)}}plugin(e){let n=this.pluginMap.get(e);return(n===void 0||n&&n.plugin!=e)&&this.pluginMap.set(e,n=this.plugins.find(i=>i.plugin==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,i){return VS(this,e,lQ(this,e,n,i))}moveByGroup(e,n){return VS(this,e,lQ(this,e,n,i=>gK(this,e.head,i)))}visualLineSide(e,n){return n?ce.cursor(e.to,1):ce.cursor(e.from,-1)}moveToLineBoundary(e,n,i=!0){return mK(this,e,n,i)}moveVertically(e,n,i){return VS(this,e,OK(this,e,n,i))}domAtPos(e,n=1){return this.docView.domAtPos(e,n)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){this.readMeasured();let i=G1(this,e,n);return i&&i.pos}posAndSideAtCoords(e,n=!0){return this.readMeasured(),G1(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let i=this.state.doc.lineAt(e),r=this.bidiSpans(i),s=r[Qo.find(r,e-i.from,-1,n)];return i.length&&(e==i.from&&n<0||e==i.to&&n>0)&&s.dir!=this.textDirectionAt(i.from)&&(e==i.to?(e=i.from+s.from,n=1):(e=i.from+s.to,n=-1)),this.docView.coordsAt(e,n,s.dir==ln.RTL)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(fz)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>aJ)return iz(e.length);let n=this.textDirectionAt(e.from),i;for(let s of this.bidiCache)if(s.from==e.from&&s.dir==n&&(s.fresh||nz(s.isolates,i=rQ(this,e))))return s.order;i||(i=rQ(this,e));let r=XW(e.text,n,i);return this.bidiCache.push(new Tb(e.from,e.to,n,i,!0,r)),r}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||$e.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{HB(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.win.clearTimeout(this.clearAnnouncement),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){var i,r,s,a;return Yg.of(new Cf(typeof e=="number"?ce.cursor(e):e,(i=n.y)!==null&&i!==void 0?i:"nearest",(r=n.x)!==null&&r!==void 0?r:"nearest",(s=n.yMargin)!==null&&s!==void 0?s:5,(a=n.xMargin)!==null&&a!==void 0?a:5))}scrollSnapshot(){let{scrollTop:e,scrollLeft:n}=this.scrollDOM,i=this.viewState.scrollAnchorAt(e);return Yg.of(new Cf(ce.cursor(i.from),"start","start",i.top-e,n,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return Mn.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Mn.define(()=>({}),{eventObservers:e})}static theme(e,n){let i=zl.newName(),r=[Jg.of(i),Vd.of(J1(`.${i}`,e))];return n&&n.dark&&r.push(W1.of(!0)),r}static baseTheme(e){return Fo.lowest(Vd.of(J1("."+K1,e,Dz)))}static findFromDOM(e){var n;let i=e.querySelector(".cm-content"),r=i&&Pn.get(i)||Pn.get(e);return((n=r==null?void 0:r.root)===null||n===void 0?void 0:n.view)||null}}Ae.styleModule=Vd;Ae.inputHandler=cz;Ae.clipboardInputFilter=nT;Ae.clipboardOutputFilter=iT;Ae.scrollHandler=dz;Ae.focusChangeEffect=uz;Ae.perLineTextDirection=fz;Ae.exceptionSink=lz;Ae.updateListener=V1;Ae.editable=Ea;Ae.mouseSelectionStyle=az;Ae.dragMovesSelection=oz;Ae.clickAddsSelectionRange=sz;Ae.decorations=my;Ae.blockWrappers=gz;Ae.outerDecorations=sT;Ae.atomicRanges=im;Ae.bidiIsolatedRanges=Oz;Ae.cursorScrollMargin=De.define({combine:t=>{let e=5,n=5;for(let i of t)typeof i=="number"?e=n=i:{x:e,y:n}=i;return{x:e,y:n}}});Ae.scrollMargins=bz;Ae.darkTheme=W1;Ae.cspNonce=De.define({combine:t=>t.length?t[0]:""});Ae.contentAttributes=rT;Ae.editorAttributes=mz;Ae.lineWrapping=Ae.contentAttributes.of({class:"cm-lineWrapping"});Ae.announce=ut.define();const aJ=4096,_Q={};class Tb{constructor(e,n,i,r,s,a){this.from=e,this.to=n,this.dir=i,this.isolates=r,this.fresh=s,this.order=a}static update(e,n){if(n.empty&&!e.some(s=>s.fresh))return e;let i=[],r=e.length?e[e.length-1].dir:ln.LTR;for(let s=Math.max(0,e.length-10);s<e.length;s++){let a=e[s];a.dir==r&&!n.touchesRange(a.from,a.to)&&i.push(new Tb(n.mapPos(a.from,1),n.mapPos(a.to,-1),a.dir,a.isolates,!1,a.order))}return i}}function TQ(t,e,n){for(let i=t.state.facet(e),r=i.length-1;r>=0;r--){let s=i[r],a=typeof s=="function"?s(t):s;a&&J_(a,n)}return n}const lJ=$e.mac?"mac":$e.windows?"win":$e.linux?"linux":"key";function cJ(t,e){const n=t.split(/-(?!$)/);let i=n[n.length-1];i=="Space"&&(i=" ");let r,s,a,c;for(let u=0;u<n.length-1;++u){const h=n[u];if(/^(cmd|meta|m)$/i.test(h))c=!0;else if(/^a(lt)?$/i.test(h))r=!0;else if(/^(c|ctrl|control)$/i.test(h))s=!0;else if(/^s(hift)?$/i.test(h))a=!0;else if(/^mod$/i.test(h))e=="mac"?c=!0:s=!0;else throw new Error("Unrecognized modifier name: "+h)}return r&&(i="Alt-"+i),s&&(i="Ctrl-"+i),c&&(i="Meta-"+i),a&&(i="Shift-"+i),i}function eO(t,e,n){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n!==!1&&e.shiftKey&&(t="Shift-"+t),t}const uJ=Fo.default(Ae.domEventHandlers({keydown(t,e){return Iz(Lz(e.state),t,e,"editor")}})),mu=De.define({enables:uJ}),kQ=new WeakMap;function Lz(t){let e=t.facet(mu),n=kQ.get(e);return n||kQ.set(e,n=dJ(e.reduce((i,r)=>i.concat(r),[]))),n}function fJ(t,e,n){return Iz(Lz(t.state),e,t,n)}let wl=null;const hJ=4e3;function dJ(t,e=lJ){let n=Object.create(null),i=Object.create(null),r=(a,c)=>{let u=i[a];if(u==null)i[a]=c;else if(u!=c)throw new Error("Key binding "+a+" is used both as a regular binding and as a multi-stroke prefix")},s=(a,c,u,h,d)=>{var m,g;let y=n[a]||(n[a]=Object.create(null)),v=c.split(/ (?!$)/).map(w=>cJ(w,e));for(let w=1;w<v.length;w++){let C=v.slice(0,w).join(" ");r(C,!0),y[C]||(y[C]={preventDefault:!0,stopPropagation:!1,run:[k=>{let A=wl={view:k,prefix:C,scope:a};return setTimeout(()=>{wl==A&&(wl=null)},hJ),!0}]})}let S=v.join(" ");r(S,!1);let x=y[S]||(y[S]={preventDefault:!1,stopPropagation:!1,run:((g=(m=y._any)===null||m===void 0?void 0:m.run)===null||g===void 0?void 0:g.slice())||[]});u&&x.run.push(u),h&&(x.preventDefault=!0),d&&(x.stopPropagation=!0)};for(let a of t){let c=a.scope?a.scope.split(" "):["editor"];if(a.any)for(let h of c){let d=n[h]||(n[h]=Object.create(null));d._any||(d._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:m}=a;for(let g in d)d[g].run.push(y=>m(y,eE))}let u=a[e]||a.key;if(u)for(let h of c)s(h,u,a.run,a.preventDefault,a.stopPropagation),a.shift&&s(h,"Shift-"+u,a.shift,a.preventDefault,a.stopPropagation)}return n}let eE=null;function Iz(t,e,n,i){eE=e;let r=kW(e),s=vr(r,0),a=Po(s)==r.length&&r!=" ",c="",u=!1,h=!1,d=!1;wl&&wl.view==n&&wl.scope==i&&(c=wl.prefix+" ",Tz.indexOf(e.keyCode)<0&&(h=!0,wl=null));let m=new Set,g=x=>{if(x){for(let w of x.run)if(!m.has(w)&&(m.add(w),w(n)))return x.stopPropagation&&(d=!0),!0;x.preventDefault&&(x.stopPropagation&&(d=!0),h=!0)}return!1},y=t[i],v,S;return y&&(g(y[c+eO(r,e,!a)])?u=!0:a&&(e.altKey||e.metaKey||e.ctrlKey)&&!($e.windows&&e.ctrlKey&&e.altKey)&&!($e.mac&&e.altKey&&!(e.ctrlKey||e.metaKey))&&(v=Xl[e.keyCode])&&v!=r?(g(y[c+eO(v,e,!0)])||e.shiftKey&&(S=bp[e.keyCode])!=r&&S!=v&&g(y[c+eO(S,e,!1)]))&&(u=!0):a&&e.shiftKey&&g(y[c+eO(r,e,!0)])&&(u=!0),!u&&g(y._any)&&(u=!0)),h&&(u=!0),u&&d&&e.stopPropagation(),eE=null,u}class Yc{constructor(e,n,i,r,s){this.className=e,this.left=n,this.top=i,this.width=r,this.height=s}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,n){return n.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,n,i){if(i.empty){let r=e.coordsAtPos(i.head,i.assoc||1);if(!r)return[];let s=jz(e);return[new Yc(n,r.left-s.left,r.top-s.top,null,r.bottom-r.top)]}else return pJ(e,n,i)}}function jz(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==ln.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function CQ(t,e,n,i){let r=t.coordsAtPos(e,n*2);if(!r)return i;let s=t.dom.getBoundingClientRect(),a=(r.top+r.bottom)/2,c=t.posAtCoords({x:s.left+1,y:a}),u=t.posAtCoords({x:s.right-1,y:a});return c==null||u==null?i:{from:Math.max(i.from,Math.min(c,u)),to:Math.min(i.to,Math.max(c,u))}}function pJ(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let i=Math.max(n.from,t.viewport.from),r=Math.min(n.to,t.viewport.to),s=t.textDirection==ln.LTR,a=t.contentDOM,c=a.getBoundingClientRect(),u=jz(t),h=a.querySelector(".cm-line"),d=h&&window.getComputedStyle(h),m=c.left+(d?parseInt(d.paddingLeft)+Math.min(0,parseInt(d.textIndent)):0),g=c.right-(d?parseInt(d.paddingRight):0),y=Y1(t,i,1),v=Y1(t,r,-1),S=y.type==$i.Text?y:null,x=v.type==$i.Text?v:null;if(S&&(t.lineWrapping||y.widgetLineBreaks)&&(S=CQ(t,i,1,S)),x&&(t.lineWrapping||v.widgetLineBreaks)&&(x=CQ(t,r,-1,x)),S&&x&&S.from==x.from&&S.to==x.to)return C(k(n.from,n.to,S));{let R=S?k(n.from,null,S):A(y,!1),P=x?k(null,n.to,x):A(v,!0),N=[];return(S||y).to<(x||v).from-(S&&x?1:0)||y.widgetLineBreaks>1&&R.bottom+t.defaultLineHeight/2<P.top?N.push(w(m,R.bottom,g,P.top)):R.bottom<P.top&&t.elementAtHeight((R.bottom+P.top)/2).type==$i.Text&&(R.bottom=P.top=(R.bottom+P.top)/2),C(R).concat(N).concat(C(P))}function w(R,P,N,$){return new Yc(e,R-u.left,P-u.top,Math.max(0,N-R),$-P)}function C({top:R,bottom:P,horizontal:N}){let $=[];for(let D=0;D<N.length;D+=2)$.push(w(N[D],R,N[D+1],P));return $}function k(R,P,N){let $=1e9,D=-1e9,U=[];function V(le,re,G,oe,K){let me=t.coordsAtPos(le,le==N.to?-2:2),fe=t.coordsAtPos(G,G==N.from?2:-2);!me||!fe||($=Math.min(me.top,fe.top,$),D=Math.max(me.bottom,fe.bottom,D),K==ln.LTR?U.push(s&&re?m:me.left,s&&oe?g:fe.right):U.push(!s&&oe?m:fe.left,!s&&re?g:me.right))}let X=R??N.from,ee=P??N.to;for(let le of t.visibleRanges)if(le.to>X&&le.from<ee)for(let re=Math.max(le.from,X),G=Math.min(le.to,ee);;){let oe=t.state.doc.lineAt(re);for(let K of t.bidiSpans(oe)){let me=K.from+oe.from,fe=K.to+oe.from;if(me>=G)break;fe>re&&V(Math.max(me,re),R==null&&me<=X,Math.min(fe,G),P==null&&fe>=ee,K.dir)}if(re=oe.to+1,re>=G)break}return U.length==0&&V(X,R==null,ee,P==null,t.textDirection),{top:$,bottom:D,horizontal:U}}function A(R,P){let N=c.top+(P?R.top:R.bottom);return{top:N,bottom:N,horizontal:[]}}}function mJ(t,e){return t.constructor==e.constructor&&t.eq(e)}class gJ{constructor(e,n){this.view=e,this.layer=n,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,e)}update(e){e.startState.facet(qO)!=e.state.facet(qO)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let n=0,i=e.facet(qO);for(;n<i.length&&i[n]!=this.layer;)n++;this.dom.style.zIndex=String((this.layer.above?150:-1)-n)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:n}=this.view;(e!=this.scaleX||n!=this.scaleY)&&(this.scaleX=e,this.scaleY=n,this.dom.style.transform=`scale(${1/e}, ${1/n})`)}draw(e){if(e.length!=this.drawn.length||e.some((n,i)=>!mJ(n,this.drawn[i]))){let n=this.dom.firstChild,i=0;for(let r of e)r.update&&n&&r.constructor&&this.drawn[i].constructor&&r.update(n,this.drawn[i])?(n=n.nextSibling,i++):this.dom.insertBefore(r.draw(),n);for(;n;){let r=n.nextSibling;n.remove(),n=r}this.drawn=e,$e.webkit&&(this.dom.style.display=this.dom.firstChild?"":"none")}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const qO=De.define();function Bz(t){return[Mn.define(e=>new gJ(e,t)),qO.of(t)]}const tE=!$e.ios,sh=De.define({combine(t){return Wo(t,{cursorBlinkRate:1200,drawRangeCursor:!0,iosSelectionHandles:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function OJ(t={}){return[sh.of(t),bJ,yJ,SJ,hz.of(!0)]}function zz(t){return t.startState.facet(sh)!=t.state.facet(sh)}const bJ=Bz({above:!0,markers(t){let{state:e}=t,n=e.facet(sh),i=[];for(let r of e.selection.ranges){let s=r==e.selection.main;if(r.empty||n.drawRangeCursor&&!(s&&$e.ios&&n.iosSelectionHandles)){let a=s?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",c=r.empty?r:ce.cursor(r.head,r.assoc);for(let u of Yc.forRange(t,a,c))i.push(u)}}return i},update(t,e){t.transactions.some(i=>i.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=zz(t);return n&&AQ(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){AQ(e.state,t)},class:"cm-cursorLayer"});function AQ(t,e){e.style.animationDuration=t.facet(sh).cursorBlinkRate+"ms"}const yJ=Bz({above:!1,markers(t){let e=[],{main:n,ranges:i}=t.state.selection;for(let r of i)if(!r.empty&&(tE||r!=n))for(let s of Yc.forRange(t,"cm-selectionBackground",r))e.push(s);if($e.ios&&!n.empty&&t.state.facet(sh).iosSelectionHandles){for(let r of Yc.forRange(t,"cm-selectionHandle cm-selectionHandle-start",ce.cursor(n.from,1)))e.push(r);for(let r of Yc.forRange(t,"cm-selectionHandle cm-selectionHandle-end",ce.cursor(n.to,1)))e.push(r)}return e},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||zz(t)},class:"cm-selectionLayer"}),vJ=$e.gecko&&$e.gecko_version==153?"#ffffff01":"transparent",SJ=Fo.highest(Ae.theme({".cm-line":{...tE?{"& ::selection, &::selection":{backgroundColor:`${vJ} !important`}}:{},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important",...tE?{"&::selection, & ::selection":{backgroundColor:"Highlight !important"}}:{}}}})),Xz=ut.define({map(t,e){return t==null?null:e.mapPos(t)}}),Yd=Li.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,i)=>i.is(Xz)?i.value:n,t)}}),xJ=Mn.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field(Yd);n==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(Yd)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(Yd),n=e!=null&&t.coordsAtPos(e);if(!n)return null;let i=t.scrollDOM.getBoundingClientRect();return{left:n.left-i.left+t.scrollDOM.scrollLeft*t.scaleX,top:n.top-i.top+t.scrollDOM.scrollTop*t.scaleY,height:n.bottom-n.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:n}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/n+"px",this.cursor.style.height=t.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(Yd)!=t&&this.view.dispatch({effects:Xz.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function wJ(){return[Yd,xJ]}function RQ(t,e,n,i,r){e.lastIndex=0;for(let s=t.iterRange(n,i),a=n,c;!s.next().done;a+=s.value.length)if(!s.lineBreak)for(;c=e.exec(s.value);)r(a+c.index,c)}function EJ(t,e){let n=t.visibleRanges;if(n.length==1&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let i=[];for(let{from:r,to:s}of n)r=Math.max(t.state.doc.lineAt(r).from,r-e),s=Math.min(t.state.doc.lineAt(s).to,s+e),i.length&&i[i.length-1].to>=r?i[i.length-1].to=s:i.push({from:r,to:s});return i}class _J{constructor(e){const{regexp:n,decoration:i,decorate:r,boundary:s,maxLength:a=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,r)this.addMatch=(c,u,h,d)=>r(d,h,h+c[0].length,c,u);else if(typeof i=="function")this.addMatch=(c,u,h,d)=>{let m=i(c,u,h);m&&d(h,h+c[0].length,m)};else if(i)this.addMatch=(c,u,h,d)=>d(h,h+c[0].length,i);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=s,this.maxLength=a}createDeco(e){let n=new Zo,i=n.add.bind(n);for(let{from:r,to:s}of EJ(e,this.maxLength))RQ(e.state.doc,this.regexp,r,s,(a,c)=>this.addMatch(c,e,a,i));return n.finish()}updateDeco(e,n){let i=1e9,r=-1;return e.docChanged&&e.changes.iterChanges((s,a,c,u)=>{u>=e.view.viewport.from&&c<=e.view.viewport.to&&(i=Math.min(c,i),r=Math.max(u,r))}),e.viewportMoved||r-i>1e3?this.createDeco(e.view):r>-1?this.updateRange(e.view,n.map(e.changes),i,r):n}updateRange(e,n,i,r){for(let s of e.visibleRanges){let a=Math.max(s.from,i),c=Math.min(s.to,r);if(c>=a){let u=e.state.doc.lineAt(a),h=u.to<c?e.state.doc.lineAt(c):u,d=Math.max(s.from,u.from),m=Math.min(s.to,h.to);if(this.boundary){for(;a>u.from;a--)if(this.boundary.test(u.text[a-1-u.from])){d=a;break}for(;c<h.to;c++)if(this.boundary.test(h.text[c-h.from])){m=c;break}}let g=[],y,v=(S,x,w)=>g.push(w.range(S,x));if(u==h)for(this.regexp.lastIndex=d-u.from;(y=this.regexp.exec(u.text))&&y.index<m-u.from;)this.addMatch(y,e,y.index+u.from,v);else RQ(e.state.doc,this.regexp,d,m,(S,x)=>this.addMatch(x,e,S,v));n=n.update({filterFrom:d,filterTo:m,filter:(S,x)=>S<d||x>m,add:g})}}return n}}const nE=/x/.unicode!=null?"gu":"g",TJ=new RegExp(`[\0-\b
69
+ --Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,nE),kJ={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let GS=null;function CJ(){var t;if(GS==null&&typeof document<"u"&&document.body){let e=document.body.style;GS=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return GS||!1}const YO=De.define({combine(t){let e=Wo(t,{render:null,specialChars:TJ,addSpecialChars:null});return(e.replaceTabs=!CJ())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,nE)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,nE)),e}});function AJ(t={}){return[YO.of(t),RJ()]}let PQ=null;function RJ(){return PQ||(PQ=Mn.fromClass(class{constructor(t){this.view=t,this.decorations=et.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(YO)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new _J({regexp:t.specialChars,decoration:(e,n,i)=>{let{doc:r}=n.state,s=vr(e[0],0);if(s==9){let a=r.lineAt(i),c=n.state.tabSize,u=Gs(a.text,c,i-a.from);return et.replace({widget:new QJ((c-u%c)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[s]||(this.decorationCache[s]=et.replace({widget:new NJ(t,s)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(YO);t.startState.facet(YO)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const PJ="•";function MJ(t){return t>=32?PJ:t==10?"␤":String.fromCharCode(9216+t)}class NJ extends Hs{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=MJ(this.code),i=e.state.phrase("Control character")+" "+(kJ[this.code]||"0x"+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,i,n);if(r)return r;let s=document.createElement("span");return s.textContent=n,s.title=i,s.setAttribute("aria-label",i),s.className="cm-specialChar",s}ignoreEvent(){return!1}}class QJ extends Hs{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function $J(){return LJ}const DJ=et.line({class:"cm-activeLine"}),LJ=Mn.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let i of t.state.selection.ranges){let r=t.lineBlockAt(i.head);r.from>e&&(n.push(DJ.range(r.from)),e=r.from)}return et.set(n)}},{decorations:t=>t.decorations});class IJ extends Hs{constructor(e){super(),this.content=e}toDOM(e){let n=document.createElement("span");return n.className="cm-placeholder",n.style.pointerEvents="none",n.appendChild(typeof this.content=="string"?document.createTextNode(this.content):typeof this.content=="function"?this.content(e):this.content.cloneNode(!0)),n.setAttribute("aria-hidden","true"),n}coordsAt(e){let n=e.firstChild?np(e.firstChild):[];if(!n.length)return null;let i=window.getComputedStyle(e.parentNode),r=Sp(n[0],i.direction!="rtl"),s=parseInt(i.lineHeight);return r.bottom-r.top>s*1.5?{left:r.left,right:r.right,top:r.top,bottom:r.top+s}:r}ignoreEvent(){return!1}}function jJ(t){let e=Mn.fromClass(class{constructor(n){this.view=n,this.placeholder=t?et.set([et.widget({widget:new IJ(t),side:1}).range(0)]):et.none}get decorations(){return this.view.state.doc.length?et.none:this.placeholder}},{decorations:n=>n.decorations});return typeof t=="string"?[e,Ae.contentAttributes.of({"aria-placeholder":t})]:e}const iE=2e3;function BJ(t,e,n){let i=Math.min(e.line,n.line),r=Math.max(e.line,n.line),s=[];if(e.off>iE||n.off>iE||e.col<0||n.col<0){let a=Math.min(e.off,n.off),c=Math.max(e.off,n.off);for(let u=i;u<=r;u++){let h=t.doc.line(u);h.length<=c&&s.push(ce.range(h.from+a,h.to+c))}}else{let a=Math.min(e.col,n.col),c=Math.max(e.col,n.col);for(let u=i;u<=r;u++){let h=t.doc.line(u),d=Q1(h.text,a,t.tabSize,!0);if(d<0)s.push(ce.cursor(h.to));else{let m=Q1(h.text,c,t.tabSize);s.push(ce.range(h.from+d,h.from+m))}}}return s}function zJ(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function MQ(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),i=t.state.doc.lineAt(n),r=n-i.from,s=r>iE?-1:r==i.length?zJ(t,e.clientX):Gs(i.text,t.state.tabSize,n-i.from);return{line:i.number,col:s,off:r}}function XJ(t,e){let n=MQ(t,e),i=t.state.selection;return n?{update(r){if(r.docChanged){let s=r.changes.mapPos(r.startState.doc.line(n.line).from),a=r.state.doc.lineAt(s);n={line:a.number,col:n.col,off:Math.min(n.off,a.length)},i=i.map(r.changes)}},get(r,s,a){let c=MQ(t,r);if(!c)return i;let u=BJ(t.state,n,c);return u.length?a?ce.create(u.concat(i.ranges)):ce.create(u):i}}:null}function UJ(t){let e=(n=>n.altKey&&n.button==0);return Ae.mouseSelectionStyle.of((n,i)=>e(i)?XJ(n,i):null)}const ZJ={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},VJ={style:"cursor: crosshair"};function qJ(t={}){let[e,n]=ZJ[t.key||"Alt"],i=Mn.fromClass(class{constructor(r){this.view=r,this.isDown=!1}set(r){this.isDown!=r&&(this.isDown=r,this.view.update([]))}},{eventObservers:{keydown(r){this.set(r.keyCode==e||n(r))},keyup(r){(r.keyCode==e||!n(r))&&this.set(!1)},mousemove(r){this.set(n(r))}}});return[i,Ae.contentAttributes.of(r=>{var s;return!((s=r.plugin(i))===null||s===void 0)&&s.isDown?VJ:null})]}const tO="-10000px";class Uz{constructor(e,n,i,r){this.facet=n,this.createTooltipView=i,this.removeTooltipView=r,this.input=e.state.facet(n),this.tooltips=this.input.filter(a=>a);let s=null;this.tooltipViews=this.tooltips.map(a=>s=i(a,s))}update(e,n){var i;let r=e.state.facet(this.facet),s=r.filter(u=>u);if(r===this.input){for(let u of this.tooltipViews)u.update&&u.update(e);return!1}let a=[],c=n?[]:null;for(let u=0;u<s.length;u++){let h=s[u],d=-1;if(h){for(let m=0;m<this.tooltips.length;m++){let g=this.tooltips[m];g&&g.create==h.create&&(d=m)}if(d<0)a[u]=this.createTooltipView(h,u?a[u-1]:null),c&&(c[u]=!!h.above);else{let m=a[u]=this.tooltipViews[d];c&&(c[u]=n[d]),m.update&&m.update(e)}}}for(let u of this.tooltipViews)a.indexOf(u)<0&&(this.removeTooltipView(u),(i=u.destroy)===null||i===void 0||i.call(u));return n&&(c.forEach((u,h)=>n[h]=u),n.length=c.length),this.input=r,this.tooltips=s,this.tooltipViews=a,!0}}function Zz(t){let e=t.dom.ownerDocument.documentElement,n=e.clientWidth,i=getComputedStyle(e);if(!/stable/.test(i.scrollbarGutter||""))return{left:0,right:n};let r=e.getBoundingClientRect(),s=t.win.scrollX;return{left:Math.max(0,r.left+s-parseFloat(i.marginLeft)),right:Math.min(n,r.right+s+parseFloat(i.marginRight))}}function YJ(t){let{left:e,right:n}=Zz(t);return{top:0,left:e,right:n,bottom:t.dom.ownerDocument.documentElement.clientHeight}}const FS=De.define({combine:t=>{var e,n,i;return{position:$e.ios?"absolute":((e=t.find(r=>r.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(r=>r.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((i=t.find(r=>r.tooltipSpace))===null||i===void 0?void 0:i.tooltipSpace)||YJ}}}),NQ=new WeakMap,uT=Mn.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(FS);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new Uz(t,fT,(n,i)=>this.createTooltip(n,i),n=>{this.resizeObserver&&this.resizeObserver.unobserve(n.dom),n.dom.remove()}),this.above=this.manager.tooltips.map(n=>!!n.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,i=t.state.facet(FS);if(i.position!=this.position&&!this.madeAbsolute){this.position=i.position;for(let r of this.manager.tooltipViews)r.dom.style.position=this.position;n=!0}if(i.parent!=this.parent){this.parent&&this.container.remove(),this.parent=i.parent,this.createContainer();for(let r of this.manager.tooltipViews)this.container.appendChild(r.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t,e){let n=t.create(this.view),i=e?e.dom:null;if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let r=document.createElement("div");r.className="cm-tooltip-arrow",n.dom.appendChild(r)}return n.dom.style.position=this.position,n.dom.style.top=tO,n.dom.style.left="0px",this.container.insertBefore(n.dom,i),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var t,e,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let i of this.manager.tooltipViews)i.dom.remove(),(t=i.destroy)===null||t===void 0||t.call(i);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(n=this.intersectionObserver)===null||n===void 0||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=1,e=1,n=!1,i=0;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:a}=this.manager.tooltipViews[0];if($e.safari){let c=a.getBoundingClientRect();n=Math.abs(c.top+1e4)>1||Math.abs(c.left)>1}else n=!!a.offsetParent&&a.offsetParent!=this.container.ownerDocument.body}if(n||this.position=="absolute")if(this.parent){let a=this.parent.getBoundingClientRect();a.width&&a.height&&(t=a.width/this.parent.offsetWidth,e=a.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:e}=this.view.viewState);else i=Zz(this.view).left;let r=this.view.scrollDOM.getBoundingClientRect(),s=oT(this.view);return{visible:{left:r.left+s.left,top:r.top+s.top,right:r.right-s.right,bottom:r.bottom-s.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((a,c)=>{let u=this.manager.tooltipViews[c];return u.getCoords?u.getCoords(a.pos):this.view.coordsAtPos(a.pos)}),size:this.manager.tooltipViews.map(({dom:a})=>a.getBoundingClientRect()),space:this.view.state.facet(FS).tooltipSpace(this.view),scaleX:t,scaleY:e,makeAbsolute:n,fixedLeft:i}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let c of this.manager.tooltipViews)c.dom.style.position="absolute"}let{visible:n,space:i,scaleX:r,scaleY:s}=t,a=[];for(let c=0;c<this.manager.tooltips.length;c++){let u=this.manager.tooltips[c],h=this.manager.tooltipViews[c],{dom:d}=h,m=t.pos[c],g=t.size[c];if(!m||u.clip!==!1&&(m.bottom<=Math.max(n.top,i.top)||m.top>=Math.min(n.bottom,i.bottom)||m.right<Math.max(n.left,i.left)-.1||m.left>Math.min(n.right,i.right)+.1)){d.style.top=tO;continue}let y=u.arrow?h.dom.querySelector(".cm-tooltip-arrow"):null,v=y?7:0,S=g.right-g.left,x=(e=NQ.get(h))!==null&&e!==void 0?e:g.bottom-g.top,w=h.offset||FJ,C=this.view.textDirection==ln.LTR,k=g.width>i.right-i.left?C?i.left:i.right-g.width:C?Math.max(i.left,Math.min(m.left-(y?14:0)+w.x,i.right-S)):Math.min(Math.max(i.left,m.left-S+(y?14:0)-w.x),i.right-S),A=this.above[c];!u.strictSide&&(A?m.top-x-v-w.y<i.top:m.bottom+x+v+w.y>i.bottom)&&A==i.bottom-m.bottom>m.top-i.top&&(A=this.above[c]=!A);let R=(A?m.top-i.top:i.bottom-m.bottom)-v;if(R<x&&h.resize!==!1){if(R<this.view.defaultLineHeight){d.style.top=tO;continue}NQ.set(h,x),d.style.height=(x=R)/s+"px"}else d.style.height&&(d.style.height="");let P=A?m.top-x-v-w.y:m.bottom+v+w.y,N=k+S;if(h.overlap!==!0)for(let $ of a)$.left<N&&$.right>k&&$.top<P+x&&$.bottom>P&&(P=A?$.top-x-2-v:$.bottom+v+2);if(this.position=="absolute"?(d.style.top=(P-t.parent.top)/s+"px",QQ(d,(k-t.parent.left)/r)):(d.style.top=P/s+"px",QQ(d,(k-t.fixedLeft)/r)),y){let $=m.left+(C?w.x:-w.x)-(k+14-7);y.style.left=$/r+"px"}h.overlap!==!0&&a.push({left:k,top:P,right:N,bottom:P+x}),d.classList.toggle("cm-tooltip-above",A),d.classList.toggle("cm-tooltip-below",!A),h.positioned&&h.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=tO}},{eventObservers:{scroll(){this.maybeMeasure()}}});function QQ(t,e){let n=parseInt(t.style.left,10);(isNaN(n)||Math.abs(e-n)>1)&&(t.style.left=e+"px")}const GJ=Ae.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),FJ={x:0,y:0},fT=De.define({enables:[uT,GJ]}),kb=De.define({combine:t=>t.reduce((e,n)=>e.concat(n),[])});class yy{static create(e){return new yy(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new Uz(e,kb,(n,i)=>this.createHostedView(n,i),n=>n.dom.remove())}createHostedView(e,n){let i=e.create(this.view);return i.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(i.dom,n?n.dom.nextSibling:this.dom.firstChild),this.mounted&&i.mount&&i.mount(this.view),i}mount(e){for(let n of this.manager.tooltipViews)n.mount&&n.mount(e);this.mounted=!0}positioned(e){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let n of this.manager.tooltipViews)(e=n.destroy)===null||e===void 0||e.call(n)}passProp(e){let n;for(let i of this.manager.tooltipViews){let r=i[e];if(r!==void 0){if(n===void 0)n=r;else if(n!==r)return}}return n}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const HJ=fT.compute([kb],t=>{let e=t.facet(kb);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.map(n=>{var i;return(i=n.end)!==null&&i!==void 0?i:n.pos})),create:yy.create,above:e[0].above,arrow:e.some(n=>n.arrow)}}),Vz=De.define();class WJ{constructor(e,n,i,r,s,a){this.view=e,this.source=n,this.field=i,this.locked=r,this.setHover=s,this.hoverTime=a,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(e){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:e,lastMove:n}=this,i=e.docView.tile.nearest(n.target);if(!i)return;let r,s=1;if(i.isWidget())r=i.posAtStart;else{if(r=e.posAtCoords(n),r==null)return;let a=e.coordsAtPos(r);if(!a||n.y<a.top||n.y>a.bottom||n.x<a.left-e.defaultCharacterWidth||n.x>a.right+e.defaultCharacterWidth)return;let c=e.bidiSpans(e.state.doc.lineAt(r)).find(h=>h.from<=r&&h.to>=r),u=c&&c.dir==ln.RTL?-1:1;s=n.x<a.left?-u:u}this.activateHover(e,r,s)}activateHover(e,n,i,r){let s=this.source(e,n,i),a=c=>{if(c&&!(Array.isArray(c)&&!c.length)){let u=Array.isArray(c)?c:[c];r&&this.locked.set(u,r),e.dispatch({effects:this.setHover.of(u)})}};if(s&&"then"in s){let c=this.pending={pos:n};s.then(u=>{this.pending==c&&(this.pending=null,a(u))},u=>wr(e.state,u,"hover tooltip"))}else a(s)}get tooltip(){let e=this.view.plugin(uT),n=e?e.manager.tooltips.findIndex(i=>i.create==yy.create):-1;return n>-1?e.manager.tooltipViews[n]:null}mousemove(e){var n,i;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:r,tooltip:s}=this;if(r.length&&!this.locked.has(r)&&s&&!KJ(s.dom,e)||this.pending){let{pos:a}=r[0]||this.pending,c=(i=(n=r[0])===null||n===void 0?void 0:n.end)!==null&&i!==void 0?i:a;(a==c?this.view.posAtCoords(this.lastMove)!=a:!JJ(this.view,a,c,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:n}=this;if(n.length&&!this.locked.has(n)){let{tooltip:i}=this;i&&i.dom.contains(e.relatedTarget)?this.watchTooltipLeave(i.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let n=i=>{e.removeEventListener("mouseleave",n);let{active:r}=this;r.length&&!this.locked.has(r)&&!this.view.dom.contains(i.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",n)}destroy(){clearTimeout(this.hoverTimeout),clearTimeout(this.restartTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const nO=4;function KJ(t,e){let{left:n,right:i,top:r,bottom:s}=t.getBoundingClientRect(),a;if(a=t.querySelector(".cm-tooltip-arrow")){let c=a.getBoundingClientRect();r=Math.min(c.top,r),s=Math.max(c.bottom,s)}return e.clientX>=n-nO&&e.clientX<=i+nO&&e.clientY>=r-nO&&e.clientY<=s+nO}function JJ(t,e,n,i,r,s){let a=t.scrollDOM.getBoundingClientRect(),c=t.documentTop+t.documentPadding.top+t.contentHeight;if(a.left>i||a.right<i||a.top>r||Math.min(a.bottom,c)<r)return!1;let u=t.posAtCoords({x:i,y:r},!1);return u>=e&&u<=n}function eee(t,e={}){let n=ut.define(),i=new WeakMap,r=Li.define({create(){return[]},update(a,c){let u=i.get(a);if(a.length&&(e.hideOnChange&&(c.docChanged||c.selection)?a=[]:u&&u(c)?a=[]:e.hideOn&&(a=a.filter(h=>!e.hideOn(c,h)))),c.docChanged&&a.length){let h=[];for(let d of a){let m=c.changes.mapPos(d.pos,-1,Qi.TrackDel);if(m!=null){let g=Object.assign(Object.create(null),d);g.pos=m,g.end!=null&&(g.end=c.changes.mapPos(g.end)),h.push(g)}}a=h}for(let h of c.effects)h.is(n)&&(a=h.value,u=void 0),(h.is(nee)&&!h.value||h.value==r)&&(a=[]);return a.length&&u&&i.set(a,u),a},provide:a=>kb.from(a)});const s=Mn.define(a=>new WJ(a,t,r,i,n,e.hoverTime||300));return{active:r,extension:[r,s,Vz.of(s),HJ]}}function tee(t,e,n,i={}){var r;let s=t.state.facet(Vz).map(a=>t.plugin(a)).filter(a=>!!a);if(i.tooltip&&i.tooltip.active){let a=s.find(c=>c.field==i.tooltip.active);a&&(s=[a])}for(let a of s)a.activateHover(t,e,n,(r=i.until)!==null&&r!==void 0?r:(()=>!1))}function qz(t,e){let n=t.plugin(uT);if(!n)return null;let i=n.manager.tooltips.indexOf(e);return i<0?null:n.manager.tooltipViews[i]}const nee=ut.define(),$Q=De.define({combine(t){let e,n;for(let i of t)e=e||i.topContainer,n=n||i.bottomContainer;return{topContainer:e,bottomContainer:n}}});function vy(t,e){let n=t.plugin(Yz),i=n?n.specs.indexOf(e):-1;return i>-1?n.panels[i]:null}const Yz=Mn.fromClass(class{constructor(t){this.input=t.state.facet(wp),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet($Q);this.top=new iO(t,!0,e.topContainer),this.bottom=new iO(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet($Q);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new iO(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new iO(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(wp);if(n!=this.input){let i=n.filter(u=>u),r=[],s=[],a=[],c=[];for(let u of i){let h=this.specs.indexOf(u),d;h<0?(d=u(t.view),c.push(d)):(d=this.panels[h],d.update&&d.update(t)),r.push(d),(d.top?s:a).push(d)}this.specs=i,this.panels=r,this.top.sync(s),this.bottom.sync(a);for(let u of c)u.dom.classList.add("cm-panel"),u.mount&&u.mount()}else for(let i of this.panels)i.update&&i.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>Ae.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class iO{constructor(e,n,i){this.view=e,this.top=n,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=DQ(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=DQ(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function DQ(t){let e=t.nextSibling;return t.remove(),e}const wp=De.define({enables:Yz});function iee(t,e){let n,i=new Promise(a=>n=a),r=a=>see(a,e,n);t.state.field(GO,!1)?t.dispatch({effects:Gz.of(r)}):t.dispatch({effects:ut.appendConfig.of(GO.init(()=>[r]))});let s=Fz.of(r);return{close:s,result:i.then(a=>((t.win.queueMicrotask||(u=>t.win.setTimeout(u,10)))(()=>{t.state.field(GO).indexOf(r)>-1&&t.dispatch({effects:s})}),a))}}function ree(t,e){let n=t.state.field(GO,!1)||[];for(let i of n){let r=vy(t,i);if(r&&r.dom.classList.contains(e))return r}return null}const GO=Li.define({create(){return[]},update(t,e){for(let n of e.effects)n.is(Gz)?t=[n.value].concat(t):n.is(Fz)&&(t=t.filter(i=>i!=n.value));return t},provide:t=>wp.computeN([t],e=>e.field(t))}),Gz=ut.define(),Fz=ut.define();function see(t,e,n){let i=e.content?e.content(t,()=>a(null)):null;if(!i){if(i=en("form"),e.input){let c=en("input",e.input);/^(text|password|number|email|tel|url)$/.test(c.type)&&c.classList.add("cm-textfield"),c.name||(c.name="input"),i.appendChild(en("label",(e.label||"")+": ",c))}else i.appendChild(document.createTextNode(e.label||""));i.appendChild(document.createTextNode(" ")),i.appendChild(en("button",{class:"cm-button",type:"submit"},e.submitLabel||"OK"))}let r=i.nodeName=="FORM"?[i]:i.querySelectorAll("form");for(let c=0;c<r.length;c++){let u=r[c];u.addEventListener("keydown",h=>{h.keyCode==27?(h.preventDefault(),a(null)):h.keyCode==13&&(h.preventDefault(),a(u))}),u.addEventListener("submit",h=>{h.preventDefault(),a(u)})}let s=en("div",i,en("button",{onclick:()=>a(null),"aria-label":t.state.phrase("close"),class:"cm-dialog-close",type:"button"},["×"]));e.class&&(s.className=e.class),s.classList.add("cm-dialog");function a(c){s.contains(s.ownerDocument.activeElement)&&t.focus(),n(c)}return{dom:s,top:e.top,mount:()=>{if(e.focus){let c;typeof e.focus=="string"?c=i.querySelector(e.focus):c=i.querySelector("input")||i.querySelector("button"),c&&"select"in c?c.select():c&&"focus"in c&&c.focus()}}}}class Qa extends Bl{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}Qa.prototype.elementClass="";Qa.prototype.toDOM=void 0;Qa.prototype.mapMode=Qi.TrackBefore;Qa.prototype.startSide=Qa.prototype.endSide=-1;Qa.prototype.point=!0;const FO=De.define(),oee=De.define(),aee={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>wt.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},sp=De.define();function lee(t){return[Hz(),sp.of({...aee,...t})]}const LQ=De.define({combine:t=>t.some(e=>e)});function Hz(t){return[cee]}const cee=Mn.fromClass(class{constructor(t){this.view=t,this.domAfter=null,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(sp).map(e=>new jQ(t,e)),this.fixed=!t.state.facet(LQ);for(let e of this.gutters)e.config.side=="after"?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,i=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(i<(n.to-n.from)*.8)}if(t.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(LQ)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=wt.iter(this.view.state.facet(FO),this.view.viewport.from),i=[],r=this.gutters.map(s=>new uee(s,this.view.viewport,-this.view.documentPadding.top));for(let s of this.view.viewportLineBlocks)if(i.length&&(i=[]),Array.isArray(s.type)){let a=!0;for(let c of s.type)if(c.type==$i.Text&&a){rE(n,i,c.from);for(let u of r)u.line(this.view,c,i);a=!1}else if(c.widget)for(let u of r)u.widget(this.view,c)}else if(s.type==$i.Text){rE(n,i,s.from);for(let a of r)a.line(this.view,s,i)}else if(s.widget)for(let a of r)a.widget(this.view,s);for(let s of r)s.finish();t&&(this.view.scrollDOM.insertBefore(this.dom,e),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(t){let e=t.startState.facet(sp),n=t.state.facet(sp),i=t.docChanged||t.heightChanged||t.viewportChanged||!wt.eq(t.startState.facet(FO),t.state.facet(FO),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let r of this.gutters)r.update(t)&&(i=!0);else{i=!0;let r=[];for(let s of n){let a=e.indexOf(s);a<0?r.push(new jQ(this.view,s)):(this.gutters[a].update(t),r.push(this.gutters[a]))}for(let s of this.gutters)s.dom.remove(),r.indexOf(s)<0&&s.destroy();for(let s of r)s.config.side=="after"?this.getDOMAfter().appendChild(s.dom):this.dom.appendChild(s.dom);this.gutters=r}return i}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:t=>Ae.scrollMargins.of(e=>{let n=e.plugin(t);if(!n||n.gutters.length==0||!n.fixed)return null;let i=n.dom.offsetWidth*e.scaleX,r=n.domAfter?n.domAfter.offsetWidth*e.scaleX:0;return e.textDirection==ln.LTR?{left:i,right:r}:{right:i,left:r}})});function IQ(t){return Array.isArray(t)?t:[t]}function rE(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class uee{constructor(e,n,i){this.gutter=e,this.height=i,this.i=0,this.cursor=wt.iter(e.markers,n.from)}addElement(e,n,i){let{gutter:r}=this,s=(n.top-this.height)/e.scaleY,a=n.height/e.scaleY;if(this.i==r.elements.length){let c=new Wz(e,a,s,i);r.elements.push(c),r.dom.appendChild(c.dom)}else r.elements[this.i].update(e,a,s,i);this.height=n.bottom,this.i++}line(e,n,i){let r=[];rE(this.cursor,r,n.from),i.length&&(r=r.concat(i));let s=this.gutter.config.lineMarker(e,n,r);s&&r.unshift(s);let a=this.gutter;r.length==0&&!a.config.renderEmptyElements||this.addElement(e,n,r)}widget(e,n){let i=this.gutter.config.widgetMarker(e,n.widget,n),r=i?[i]:null;for(let s of e.state.facet(oee)){let a=s(e,n.widget,n);a&&(r||(r=[])).push(a)}r&&this.addElement(e,n,r)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class jQ{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in n.domEventHandlers)this.dom.addEventListener(i,r=>{let s=r.target,a;if(s!=this.dom&&this.dom.contains(s)){for(;s.parentNode!=this.dom;)s=s.parentNode;let u=s.getBoundingClientRect();a=(u.top+u.bottom)/2}else a=r.clientY;let c=e.lineBlockAtHeight(a-e.documentTop);n.domEventHandlers[i](e,c,r)&&r.preventDefault()});this.markers=IQ(n.markers(e)),n.initialSpacer&&(this.spacer=new Wz(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=IQ(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let r=this.config.updateSpacer(this.spacer.markers[0],e);r!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[r])}let i=e.view.viewport;return!wt.eq(this.markers,n,i.from,i.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class Wz{constructor(e,n,i,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,i,r)}update(e,n,i,r){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),fee(this.markers,r)||this.setMarkers(e,r)}setMarkers(e,n){let i="cm-gutterElement",r=this.dom.firstChild;for(let s=0,a=0;;){let c=a,u=s<n.length?n[s++]:null,h=!1;if(u){let d=u.elementClass;d&&(i+=" "+d);for(let m=a;m<this.markers.length;m++)if(this.markers[m].compare(u)){c=m,h=!0;break}}else c=this.markers.length;for(;a<c;){let d=this.markers[a++];if(d.toDOM){d.destroy(r);let m=r.nextSibling;r.remove(),r=m}}if(!u)break;u.toDOM&&(h?r=r.nextSibling:this.dom.insertBefore(u.toDOM(e),r)),h&&a++}this.dom.className=i,this.markers=n}destroy(){this.setMarkers(null,[])}}function fee(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].compare(e[n]))return!1;return!0}const hee=De.define(),dee=De.define(),xf=De.define({combine(t){return Wo(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,n){let i=Object.assign({},e);for(let r in n){let s=i[r],a=n[r];i[r]=s?(c,u,h)=>s(c,u,h)||a(c,u,h):a}return i}})}});class HS extends Qa{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function WS(t,e){return t.state.facet(xf).formatNumber(e,t.state)}const pee=sp.compute([xf],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(hee)},lineMarker(e,n,i){return i.some(r=>r.toDOM)?null:new HS(WS(e,e.state.doc.lineAt(n.from).number))},widgetMarker:(e,n,i)=>{for(let r of e.state.facet(dee)){let s=r(e,n,i);if(s)return s}return null},lineMarkerChange:e=>e.startState.facet(xf)!=e.state.facet(xf),initialSpacer(e){return new HS(WS(e,BQ(e.state.doc.lines)))},updateSpacer(e,n){let i=WS(n.view,BQ(n.view.state.doc.lines));return i==e.number?e:new HS(i)},domEventHandlers:t.facet(xf).domEventHandlers,side:"before"}));function mee(t={}){return[xf.of(t),Hz(),pee]}function BQ(t){let e=9;for(;e<t;)e=e*10+9;return e}const gee=new class extends Qa{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},Oee=FO.compute(["selection"],t=>{let e=[],n=-1;for(let i of t.selection.ranges){let r=t.doc.lineAt(i.head).from;r>n&&(n=r,e.push(gee.range(r)))}return wt.of(e)});function bee(){return Oee}const Kz=1024;let yee=0;class Os{constructor(e,n){this.from=e,this.to=n}}class lt{constructor(e={}){this.id=yee++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Jn.match(e)),n=>{let i=e(n);return i===void 0?null:[this,i]}}}lt.closedBy=new lt({deserialize:t=>t.split(" ")});lt.openedBy=new lt({deserialize:t=>t.split(" ")});lt.group=new lt({deserialize:t=>t.split(" ")});lt.isolate=new lt({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});lt.contextHash=new lt({perNode:!0});lt.lookAhead=new lt({perNode:!0});lt.mounted=new lt({perNode:!0});class Af{constructor(e,n,i,r=!1){this.tree=e,this.overlay=n,this.parser=i,this.bracketed=r}static get(e){return e&&e.props&&e.props[lt.mounted.id]}}const vee=Object.create(null);class Jn{constructor(e,n,i,r=0){this.name=e,this.props=n,this.id=i,this.flags=r}static define(e){let n=e.props&&e.props.length?Object.create(null):vee,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),r=new Jn(e.name||"",n,e.id,i);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(r)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[s[0].id]=s[1]}}return r}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(lt.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let i in e)for(let r of i.split(" "))n[r]=e[i];return i=>{for(let r=i.prop(lt.group),s=-1;s<(r?r.length:0);s++){let a=n[s<0?i.name:r[s]];if(a)return a}}}}Jn.none=new Jn("",Object.create(null),0,8);class xh{constructor(e){this.types=e;for(let n=0;n<e.length;n++)if(e[n].id!=n)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let n=[];for(let i of this.types){let r=null;for(let s of e){let a=s(i);if(a){r||(r=Object.assign({},i.props));let c=a[1],u=a[0];u.combine&&u.id in r&&(c=u.combine(r[u.id],c)),r[u.id]=c}}n.push(r?new Jn(i.name,r,i.id,i.flags):i)}return new xh(n)}}const rO=new WeakMap,zQ=new WeakMap;var It;(function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays",t[t.EnterBracketed=16]="EnterBracketed"})(It||(It={}));class Et{constructor(e,n,i,r,s){if(this.type=e,this.children=n,this.positions=i,this.length=r,this.props=null,s&&s.length){this.props=Object.create(null);for(let[a,c]of s)this.props[typeof a=="number"?a:a.id]=c}}toString(){let e=Af.get(this);if(e&&!e.overlay)return e.tree.toString();let n="";for(let i of this.children){let r=i.toString();r&&(n&&(n+=","),n+=r)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(n.length?"("+n+")":""):n}cursor(e=0){return new Cb(this.topNode,e)}cursorAt(e,n=0,i=0){let r=rO.get(this)||this.topNode,s=new Cb(r);return s.moveTo(e,n),rO.set(this,s._tree),s}get topNode(){return new Zi(this,0,0,null)}resolve(e,n=0){let i=Ep(rO.get(this)||this.topNode,e,n,!1);return rO.set(this,i),i}resolveInner(e,n=0){let i=Ep(zQ.get(this)||this.topNode,e,n,!0);return zQ.set(this,i),i}resolveStack(e,n=0){return wee(this,e,n)}iterate(e){let{enter:n,leave:i,from:r=0,to:s=this.length}=e,a=e.mode||0,c=(a&It.IncludeAnonymous)>0;for(let u=this.cursor(a|It.IncludeAnonymous);;){let h=!1;if(u.from<=s&&u.to>=r&&(!c&&u.type.isAnonymous||n(u)!==!1)){if(u.firstChild())continue;h=!0}for(;h&&i&&(c||!u.type.isAnonymous)&&i(u),!u.nextSibling();){if(!u.parent())return;h=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:pT(Jn.none,this.children,this.positions,0,this.children.length,0,this.length,(n,i,r)=>new Et(this.type,n,i,r,this.propValues),e.makeTree||((n,i,r)=>new Et(Jn.none,n,i,r)))}static build(e){return Eee(e)}}Et.empty=new Et(Jn.none,[],[],0);class hT{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new hT(this.buffer,this.index)}}class Zl{constructor(e,n,i){this.buffer=e,this.length=n,this.set=i}get type(){return Jn.none}toString(){let e=[];for(let n=0;n<this.buffer.length;)e.push(this.childString(n)),n=this.buffer[n+3];return e.join(",")}childString(e){let n=this.buffer[e],i=this.buffer[e+3],r=this.set.types[n],s=r.name;if(/\W/.test(s)&&!r.isError&&(s=JSON.stringify(s)),e+=4,i==e)return s;let a=[];for(;e<i;)a.push(this.childString(e)),e=this.buffer[e+3];return s+"("+a.join(",")+")"}findChild(e,n,i,r,s){let{buffer:a}=this,c=-1;for(let u=e;u!=n&&!(Jz(s,r,a[u+1],a[u+2])&&(c=u,i>0));u=a[u+3]);return c}slice(e,n,i){let r=this.buffer,s=new Uint16Array(n-e),a=0;for(let c=e,u=0;c<n;){s[u++]=r[c++],s[u++]=r[c++]-i;let h=s[u++]=r[c++]-i;s[u++]=r[c++]-e,a=Math.max(a,h)}return new Zl(s,a,this.set)}}function Jz(t,e,n,i){switch(t){case-2:return n<e;case-1:return i>=e&&n<e;case 0:return n<e&&i>e;case 1:return n<=e&&i>e;case 2:return i>e;case 4:return!0}}function Ep(t,e,n,i){for(var r;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to<e);){let a=!i&&t instanceof Zi&&t.index<0?null:t.parent;if(!a)return t;t=a}let s=i?0:It.IgnoreOverlays;if(i)for(let a=t,c=a.parent;c;a=c,c=a.parent)a instanceof Zi&&a.index<0&&((r=c.enter(e,n,s))===null||r===void 0?void 0:r.from)!=a.from&&(t=c);for(;;){let a=t.enter(e,n,s);if(!a)return t;t=a}}class e5{cursor(e=0){return new Cb(this,e)}getChild(e,n=null,i=null){let r=XQ(this,e,n,i);return r.length?r[0]:null}getChildren(e,n=null,i=null){return XQ(this,e,n,i)}resolve(e,n=0){return Ep(this,e,n,!1)}resolveInner(e,n=0){return Ep(this,e,n,!0)}matchContext(e){return sE(this.parent,e)}enterUnfinishedNodesBefore(e){let n=this.childBefore(e),i=this;for(;n;){let r=n.lastChild;if(!r||r.to!=n.to)break;r.type.isError&&r.from==r.to?(i=n,n=r.prevSibling):n=r}return i}get node(){return this}get next(){return this.parent}}class Zi extends e5{constructor(e,n,i,r){super(),this._tree=e,this.from=n,this.index=i,this._parent=r}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,n,i,r,s=0){for(let a=this;;){for(let{children:c,positions:u}=a._tree,h=n>0?c.length:-1;e!=h;e+=n){let d=c[e],m=u[e]+a.from,g;if(!(!(s&It.EnterBracketed&&d instanceof Et&&(g=Af.get(d))&&!g.overlay&&g.bracketed&&i>=m&&i<=m+d.length)&&!Jz(r,i,m,m+d.length))){if(d instanceof Zl){if(s&It.ExcludeBuffers)continue;let y=d.findChild(0,d.buffer.length,n,i-m,r);if(y>-1)return new $o(new See(a,d,e,m),null,y)}else if(s&It.IncludeAnonymous||!d.type.isAnonymous||dT(d)){let y;if(!(s&It.IgnoreMounts)&&(y=Af.get(d))&&!y.overlay)return new Zi(y.tree,m,e,a);let v=new Zi(d,m,e,a);return s&It.IncludeAnonymous||!v.type.isAnonymous?v:v.nextChild(n<0?d.children.length-1:0,n,i,r,s)}}}if(s&It.IncludeAnonymous||!a.type.isAnonymous||(a.index>=0?e=a.index+n:e=n<0?-1:a._parent._tree.children.length,a=a._parent,!a))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(e,n,i=0){let r;if(!(i&It.IgnoreOverlays)&&(r=Af.get(this._tree))&&r.overlay){let s=e-this.from,a=i&It.EnterBracketed&&r.bracketed;for(let{from:c,to:u}of r.overlay)if((n>0||a?c<=s:c<s)&&(n<0||a?u>=s:u>s))return new Zi(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function XQ(t,e,n,i){let r=t.cursor(),s=[];if(!r.firstChild())return s;if(n!=null){for(let a=!1;!a;)if(a=r.type.is(n),!r.nextSibling())return s}for(;;){if(i!=null&&r.type.is(i))return s;if(r.type.is(e)&&s.push(r.node),!r.nextSibling())return i==null?s:[]}}function sE(t,e,n=e.length-1){for(let i=t;n>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[n]&&e[n]!=i.name)return!1;n--}}return!0}class See{constructor(e,n,i,r){this.parent=e,this.buffer=n,this.index=i,this.start=r}}class $o extends e5{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,i){super(),this.context=e,this._parent=n,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,n,i){let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],e,n-this.context.start,i);return s<0?null:new $o(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(e,n,i=0){if(i&It.ExcludeBuffers)return null;let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return s<0?null:new $o(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new $o(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new $o(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:i}=this.context,r=this.index+4,s=i.buffer[this.index+3];if(s>r){let a=i.buffer[this.index+1];e.push(i.slice(r,s,a)),n.push(0)}return new Et(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function t5(t){if(!t.length)return null;let e=0,n=t[0];for(let s=1;s<t.length;s++){let a=t[s];(a.from>n.from||a.to<n.to)&&(n=a,e=s)}let i=n instanceof Zi&&n.index<0?null:n.parent,r=t.slice();return i?r[e]=i:r.splice(e,1),new xee(r,n)}class xee{constructor(e,n){this.heads=e,this.node=n}get next(){return t5(this.heads)}}function wee(t,e,n){let i=t.resolveInner(e,n),r=null;for(let s=i instanceof Zi?i:i.context.parent;s;s=s.parent)if(s.index<0){let a=s.parent;(r||(r=[i])).push(a.resolve(e,n)),s=a}else{let a=Af.get(s.tree);if(a&&a.overlay&&a.overlay[0].from<=e&&a.overlay[a.overlay.length-1].to>=e){let c=new Zi(a.tree,a.overlay[0].from+s.from,-1,s);(r||(r=[i])).push(Ep(c,e,n,!1))}}return r?t5(r):i}class Cb{get name(){return this.type.name}constructor(e,n=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=n&~It.EnterBracketed,e instanceof Zi)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:i,buffer:r}=this.buffer;return this.type=n||r.set.types[r.buffer[e]],this.from=i+r.buffer[e+1],this.to=i+r.buffer[e+2],!0}yield(e){return e?e instanceof Zi?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,i,this.mode));let{buffer:r}=this.buffer,s=r.findChild(this.index+4,r.buffer[this.index+3],e,n-this.buffer.start,i);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,i=this.mode){return this.buffer?i&It.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&It.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&It.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,i=this.stack.length-1;if(e<0){let r=i<0?0:this.stack[i]+4;if(this.index!=r)return this.yieldBuf(n.findChild(r,this.index,-1,0,4))}else{let r=n.buffer[this.index+3];if(r<(i<0?n.buffer.length:n.buffer[this.stack[i]+3]))return this.yieldBuf(r)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,i,{buffer:r}=this;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(let s=0;s<this.index;s++)if(r.buffer.buffer[s+3]<this.index)return!1;({index:n,parent:i}=r)}else({index:n,_parent:i}=this._tree);for(;i;{index:n,_parent:i}=i)if(n>-1)for(let s=n+e,a=e<0?-1:i._tree.children.length;s!=a;s+=e){let c=i._tree.children[s];if(this.mode&It.IncludeAnonymous||c instanceof Zl||!c.type.isAnonymous||dT(c))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,n););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,n=null,i=0;if(e&&e.context==this.buffer)e:for(let r=this.index,s=this.stack.length;s>=0;){for(let a=e;a;a=a._parent)if(a.index==r){if(r==this.index)return a;n=a,i=s+1;break e}r=this.stack[--s]}for(let r=i;r<this.stack.length;r++)n=new $o(this.buffer,n,this.stack[r]);return this.bufferNode=new $o(this.buffer,n,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,n){for(let i=0;;){let r=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){i++;continue}this.type.isAnonymous||(r=!0)}for(;;){if(r&&n&&n(this),r=this.type.isAnonymous,!i)return;if(this.nextSibling())break;this.parent(),i--,r=!0}}}matchContext(e){if(!this.buffer)return sE(this.node.parent,e);let{buffer:n}=this.buffer,{types:i}=n.set;for(let r=e.length-1,s=this.stack.length-1;r>=0;s--){if(s<0)return sE(this._tree,e,r);let a=i[n.buffer[this.stack[s]]];if(!a.isAnonymous){if(e[r]&&e[r]!=a.name)return!1;r--}}return!0}}function dT(t){return t.children.some(e=>e instanceof Zl||!e.type.isAnonymous||dT(e))}function Eee(t){var e;let{buffer:n,nodeSet:i,maxBufferLength:r=Kz,reused:s=[],minRepeatType:a=i.types.length}=t,c=Array.isArray(n)?new hT(n,n.length):n,u=i.types,h=0,d=0;function m(R,P,N,$,D,U){let{id:V,start:X,end:ee,size:le}=c,re=d,G=h;if(le<0)if(c.next(),le==-1){let Te=s[V];N.push(Te),$.push(X-R);return}else if(le==-3){h=V;return}else if(le==-4){d=V;return}else throw new RangeError(`Unrecognized record size: ${le}`);let oe=u[V],K,me,fe=X-R;if(ee-X<=r&&(me=x(c.pos-P,D))){let Te=new Uint16Array(me.size-me.skip),ze=c.pos-me.size,tt=Te.length;for(;c.pos>ze;)tt=w(me.start,Te,tt);K=new Zl(Te,ee-me.start,i),fe=me.start-R}else{let Te=c.pos-le;c.next();let ze=[],tt=[],I=V>=a?V:-1,ie=0,B=ee;for(;c.pos>Te;)I>=0&&c.id==I&&c.size>=0?(c.end<=B-r&&(v(ze,tt,X,ie,c.end,B,I,re,G),ie=ze.length,B=c.end),c.next()):U>2500?g(X,Te,ze,tt):m(X,Te,ze,tt,I,U+1);if(I>=0&&ie>0&&ie<ze.length&&v(ze,tt,X,ie,X,B,I,re,G),ze.reverse(),tt.reverse(),I>-1&&ie>0){let se=y(oe,G);K=pT(oe,ze,tt,0,ze.length,0,ee-X,se,se)}else K=S(oe,ze,tt,ee-X,re-ee,G)}N.push(K),$.push(fe)}function g(R,P,N,$){let D=[],U=0,V=-1;for(;c.pos>P;){let{id:X,start:ee,end:le,size:re}=c;if(re>4)c.next();else{if(V>-1&&ee<V)break;V<0&&(V=le-r),D.push(X,ee,le),U++,c.next()}}if(U){let X=new Uint16Array(U*4),ee=D[D.length-2];for(let le=D.length-3,re=0;le>=0;le-=3)X[re++]=D[le],X[re++]=D[le+1]-ee,X[re++]=D[le+2]-ee,X[re++]=re;N.push(new Zl(X,D[2]-ee,i)),$.push(ee-R)}}function y(R,P){return(N,$,D)=>{let U=0,V=N.length-1,X,ee;if(V>=0&&(X=N[V])instanceof Et){if(!V&&X.type==R&&X.length==D)return X;(ee=X.prop(lt.lookAhead))&&(U=$[V]+X.length+ee)}return S(R,N,$,D,U,P)}}function v(R,P,N,$,D,U,V,X,ee){let le=[],re=[];for(;R.length>$;)le.push(R.pop()),re.push(P.pop()+N-D);R.push(S(i.types[V],le,re,U-D,X-U,ee)),P.push(D-N)}function S(R,P,N,$,D,U,V){if(U){let X=[lt.contextHash,U];V=V?[X].concat(V):[X]}if(D>25){let X=[lt.lookAhead,D];V=V?[X].concat(V):[X]}return new Et(R,P,N,$,V)}function x(R,P){let N=c.fork(),$=0,D=0,U=0,V=N.end-r,X={size:0,start:0,skip:0};e:for(let ee=N.pos-R;N.pos>ee;){let le=N.size;if(N.id==P&&le>=0){X.size=$,X.start=D,X.skip=U,U+=4,$+=4,N.next();continue}let re=N.pos-le;if(le<0||re<ee||N.start<V)break;let G=N.id>=a?4:0,oe=N.start;for(N.next();N.pos>re;){if(N.size<0)if(N.size==-3||N.size==-4)G+=4;else break e;else N.id>=a&&(G+=4);N.next()}D=oe,$+=le,U+=G}return(P<0||$==R)&&(X.size=$,X.start=D,X.skip=U),X.size>4?X:void 0}function w(R,P,N){let{id:$,start:D,end:U,size:V}=c;if(c.next(),V>=0&&$<a){let X=N;if(V>4){let ee=c.pos-(V-4);for(;c.pos>ee;)N=w(R,P,N)}P[--N]=X,P[--N]=U-R,P[--N]=D-R,P[--N]=$}else V==-3?h=$:V==-4&&(d=$);return N}let C=[],k=[];for(;c.pos>0;)m(t.start||0,t.bufferStart||0,C,k,-1,0);let A=(e=t.length)!==null&&e!==void 0?e:C.length?k[0]+C[0].length:0;return new Et(u[t.topID],C.reverse(),k.reverse(),A)}const UQ=new WeakMap;function HO(t,e){if(!t.isAnonymous||e instanceof Zl||e.type!=t)return 1;let n=UQ.get(e);if(n==null){n=1;for(let i of e.children){if(i.type!=t||!(i instanceof Et)){n=1;break}n+=HO(t,i)}UQ.set(e,n)}return n}function pT(t,e,n,i,r,s,a,c,u){let h=0;for(let v=i;v<r;v++)h+=HO(t,e[v]);let d=Math.ceil(h*1.5/8),m=[],g=[];function y(v,S,x,w,C){for(let k=x;k<w;){let A=k,R=S[k],P=HO(t,v[k]);for(k++;k<w;k++){let N=HO(t,v[k]);if(P+N>=d)break;P+=N}if(k==A+1){if(P>d){let N=v[A];y(N.children,N.positions,0,N.children.length,S[A]+C);continue}m.push(v[A])}else{let N=S[k-1]+v[k-1].length-R;m.push(pT(t,v,S,A,k,R,N,null,u))}g.push(R+C-s)}}return y(e,n,i,r,0),(c||u)(m,g,a)}class n5{constructor(){this.map=new WeakMap}setBuffer(e,n,i){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(n,i)}getBuffer(e,n){let i=this.map.get(e);return i&&i.get(n)}set(e,n){e instanceof $o?this.setBuffer(e.context.buffer,e.index,n):e instanceof Zi&&this.map.set(e.tree,n)}get(e){return e instanceof $o?this.getBuffer(e.context.buffer,e.index):e instanceof Zi?this.map.get(e.tree):void 0}cursorSet(e,n){e.buffer?this.setBuffer(e.buffer.buffer,e.index,n):this.map.set(e.tree,n)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class Ca{constructor(e,n,i,r,s=!1,a=!1){this.from=e,this.to=n,this.tree=i,this.offset=r,this.open=(s?1:0)|(a?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],i=!1){let r=[new Ca(0,e.length,e,0,!1,i)];for(let s of n)s.to>e.length&&r.push(s);return r}static applyChanges(e,n,i=128){if(!n.length)return e;let r=[],s=1,a=e.length?e[0]:null;for(let c=0,u=0,h=0;;c++){let d=c<n.length?n[c]:null,m=d?d.fromA:1e9;if(m-u>=i)for(;a&&a.from<m;){let g=a;if(u>=g.from||m<=g.to||h){let y=Math.max(g.from,u)-h,v=Math.min(g.to,m)-h;g=y>=v?null:new Ca(y,v,g.tree,g.offset+h,c>0,!!d)}if(g&&r.push(g),a.to>m)break;a=s<e.length?e[s++]:null}if(!d)break;u=d.toA,h=d.toA-d.toB}return r}}class Sy{startParse(e,n,i){return typeof e=="string"&&(e=new _ee(e)),i=i?i.length?i.map(r=>new Os(r.from,r.to)):[new Os(0,0)]:[new Os(0,e.length)],this.createParse(e,n||[],i)}parse(e,n,i){let r=this.startParse(e,n,i);for(;;){let s=r.advance();if(s)return s}}}class _ee{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}function i5(t){return(e,n,i,r)=>new kee(e,t,n,i,r)}class ZQ{constructor(e,n,i,r,s,a){this.parser=e,this.parse=n,this.overlay=i,this.bracketed=r,this.target=s,this.from=a}}function VQ(t){if(!t.length||t.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(t))}class Tee{constructor(e,n,i,r,s,a,c,u){this.parser=e,this.predicate=n,this.mounts=i,this.index=r,this.start=s,this.bracketed=a,this.target=c,this.prev=u,this.depth=0,this.ranges=[]}}const oE=new lt({perNode:!0});class kee{constructor(e,n,i,r,s){this.nest=n,this.input=i,this.fragments=r,this.ranges=s,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let i=this.baseParse.advance();if(!i)return null;if(this.baseParse=null,this.baseTree=i,this.startInner(),this.stoppedAt!=null)for(let r of this.inner)r.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let i=this.baseTree;return this.stoppedAt!=null&&(i=new Et(i.type,i.children,i.positions,i.length,i.propValues.concat([[oE,this.stoppedAt]]))),i}let e=this.inner[this.innerDone],n=e.parse.advance();if(n){this.innerDone++;let i=Object.assign(Object.create(null),e.target.props);i[lt.mounted.id]=new Af(n,e.overlay,e.parser,e.bracketed),e.target.props=i}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let n=this.innerDone;n<this.inner.length;n++)this.inner[n].from<e&&(e=Math.min(e,this.inner[n].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let n=this.innerDone;n<this.inner.length;n++)this.inner[n].parse.stopAt(e)}startInner(){let e=new Ree(this.fragments),n=null,i=null,r=new Cb(new Zi(this.baseTree,this.ranges[0].from,0,null),It.IncludeAnonymous|It.IgnoreMounts);e:for(let s,a;;){let c=!0,u;if(this.stoppedAt!=null&&r.from>=this.stoppedAt)c=!1;else if(e.hasNode(r)){if(n){let h=n.mounts.find(d=>d.frag.from<=r.from&&d.frag.to>=r.to&&d.mount.overlay);if(h)for(let d of h.mount.overlay){let m=d.from+h.pos,g=d.to+h.pos;m>=r.from&&g<=r.to&&!n.ranges.some(y=>y.from<g&&y.to>m)&&n.ranges.push({from:m,to:g})}}c=!1}else if(i&&(a=Cee(i.ranges,r.from,r.to)))c=a!=2;else if(!r.type.isAnonymous&&(s=this.nest(r,this.input))&&(r.from<r.to||!s.overlay)){r.tree||(Aee(r),n&&n.depth++,i&&i.depth++);let h=e.findMounts(r.from,s.parser);if(typeof s.overlay=="function")n=new Tee(s.parser,s.overlay,h,this.inner.length,r.from,!!s.bracketed,r.tree,n);else{let d=GQ(this.ranges,s.overlay||(r.from<r.to?[new Os(r.from,r.to)]:[]));d.length&&VQ(d),(d.length||!s.overlay)&&this.inner.push(new ZQ(s.parser,d.length?s.parser.startParse(this.input,FQ(h,d),d):s.parser.startParse(""),s.overlay?s.overlay.map(m=>new Os(m.from-r.from,m.to-r.from)):null,!!s.bracketed,r.tree,d.length?d[0].from:r.from)),s.overlay?d.length&&(i={ranges:d,depth:0,prev:i}):c=!1}}else if(n&&(u=n.predicate(r))&&(u===!0&&(u=new Os(r.from,r.to)),u.from<u.to)){let h=n.ranges.length-1;h>=0&&n.ranges[h].to==u.from?n.ranges[h]={from:n.ranges[h].from,to:u.to}:n.ranges.push(u)}if(c&&r.firstChild())n&&n.depth++,i&&i.depth++;else for(;!r.nextSibling();){if(!r.parent())break e;if(n&&!--n.depth){let h=GQ(this.ranges,n.ranges);h.length&&(VQ(h),this.inner.splice(n.index,0,new ZQ(n.parser,n.parser.startParse(this.input,FQ(n.mounts,h),h),n.ranges.map(d=>new Os(d.from-n.start,d.to-n.start)),n.bracketed,n.target,h[0].from))),n=n.prev}i&&!--i.depth&&(i=i.prev)}}}}function Cee(t,e,n){for(let i of t){if(i.from>=n)break;if(i.to>e)return i.from<=e&&i.to>=n?2:1}return 0}function qQ(t,e,n,i,r,s){if(e<n){let a=t.buffer[e+1];i.push(t.slice(e,n,a)),r.push(a-s)}}function Aee(t){let{node:e}=t,n=[],i=e.context.buffer;do n.push(t.index),t.parent();while(!t.tree);let r=t.tree,s=r.children.indexOf(i),a=r.children[s],c=a.buffer,u=[s];function h(d,m,g,y,v,S){let x=n[S],w=[],C=[];qQ(a,d,x,w,C,y);let k=c[x+1],A=c[x+2];u.push(w.length);let R=S?h(x+4,c[x+3],a.set.types[c[x]],k,A-k,S-1):e.toTree();return w.push(R),C.push(k-y),qQ(a,c[x+3],m,w,C,y),new Et(g,w,C,v)}r.children[s]=h(0,c.length,Jn.none,0,a.length,n.length-1);for(let d of u){let m=t.tree.children[d],g=t.tree.positions[d];t.yield(new Zi(m,g+t.from,d,t._tree))}}class YQ{constructor(e,n){this.offset=n,this.done=!1,this.cursor=e.cursor(It.IncludeAnonymous|It.IgnoreMounts|It.ExcludeBuffers)}moveTo(e){let{cursor:n}=this,i=e-this.offset;for(;!this.done&&n.from<i;)if(!(n.to>=i&&n.enter(i,1,It.IncludeAnonymous|It.IgnoreOverlays|It.ExcludeBuffers)))if(n.to<=i)n.next(!1)||(this.done=!0);else break}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let n=this.cursor.tree;;){if(n==e.tree)return!0;if(n.children.length&&n.positions[0]==0&&n.children[0]instanceof Et)n=n.children[0];else break}return!1}}let Ree=class{constructor(e){var n;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let i=this.curFrag=e[0];this.curTo=(n=i.tree.prop(oE))!==null&&n!==void 0?n:i.to,this.inner=new YQ(i.tree,-i.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let n=this.curFrag=this.fragments[this.fragI];this.curTo=(e=n.tree.prop(oE))!==null&&e!==void 0?e:n.to,this.inner=new YQ(n.tree,-n.offset)}}findMounts(e,n){var i;let r=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let s=this.inner.cursor.node;s;s=s.parent){let a=(i=s.tree)===null||i===void 0?void 0:i.prop(lt.mounted);if(a&&a.parser==n)for(let c=this.fragI;c<this.fragments.length;c++){let u=this.fragments[c];if(u.from>=s.to)break;u.tree==this.curFrag.tree&&r.push({frag:u,pos:s.from-u.offset,mount:a})}}}return r}};function GQ(t,e){let n=null,i=e;for(let r=1,s=0;r<t.length;r++){let a=t[r-1].to,c=t[r].from;for(;s<i.length;s++){let u=i[s];if(u.from>=c)break;u.to<=a||(n||(i=n=e.slice()),u.from<a?(n[s]=new Os(u.from,a),u.to>c&&n.splice(s+1,0,new Os(c,u.to))):u.to>c?n[s--]=new Os(c,u.to):n.splice(s--,1))}}return i}function Pee(t,e,n,i){let r=0,s=0,a=!1,c=!1,u=-1e9,h=[];for(;;){let d=r==t.length?1e9:a?t[r].to:t[r].from,m=s==e.length?1e9:c?e[s].to:e[s].from;if(a!=c){let g=Math.max(u,n),y=Math.min(d,m,i);g<y&&h.push(new Os(g,y))}if(u=Math.min(d,m),u==1e9)break;d==u&&(a?(a=!1,r++):a=!0),m==u&&(c?(c=!1,s++):c=!0)}return h}function FQ(t,e){let n=[];for(let{pos:i,mount:r,frag:s}of t){let a=i+(r.overlay?r.overlay[0].from:0),c=a+r.tree.length,u=Math.max(s.from,a),h=Math.min(s.to,c);if(r.overlay){let d=r.overlay.map(g=>new Os(g.from+i,g.to+i)),m=Pee(e,d,u,h);for(let g=0,y=u;;g++){let v=g==m.length,S=v?h:m[g].from;if(S>y&&n.push(new Ca(y,S,r.tree,-a,s.from>=y||s.openStart,s.to<=S||s.openEnd)),v)break;y=m[g].to}}else n.push(new Ca(u,h,r.tree,-a,s.from>=a||s.openStart,s.to<=c||s.openEnd))}return n}let Mee=0;class Yr{constructor(e,n,i,r){this.name=e,this.set=n,this.base=i,this.modified=r,this.id=Mee++}toString(){let{name:e}=this;for(let n of this.modified)n.name&&(e=`${n.name}(${e})`);return e}static define(e,n){let i=typeof e=="string"?e:"?";if(e instanceof Yr&&(n=e),n!=null&&n.base)throw new Error("Can not derive from a modified tag");let r=new Yr(i,[],null,[]);if(r.set.push(r),n)for(let s of n.set)r.set.push(s);return r}static defineModifier(e){let n=new Ab(e);return i=>i.modified.indexOf(n)>-1?i:Ab.get(i.base||i,i.modified.concat(n).sort((r,s)=>r.id-s.id))}}let Nee=0;class Ab{constructor(e){this.name=e,this.instances=[],this.id=Nee++}static get(e,n){if(!n.length)return e;let i=n[0].instances.find(c=>c.base==e&&Qee(n,c.modified));if(i)return i;let r=[],s=new Yr(e.name,r,e,n);for(let c of n)c.instances.push(s);let a=$ee(n);for(let c of e.set)if(!c.modified.length)for(let u of a)r.push(Ab.get(c,u));return s}}function Qee(t,e){return t.length==e.length&&t.every((n,i)=>n==e[i])}function $ee(t){let e=[[]];for(let n=0;n<t.length;n++)for(let i=0,r=e.length;i<r;i++)e.push(e[i].concat(t[n]));return e.sort((n,i)=>i.length-n.length)}function wh(t){let e=Object.create(null);for(let n in t){let i=t[n];Array.isArray(i)||(i=[i]);for(let r of n.split(" "))if(r){let s=[],a=2,c=r;for(let m=0;;){if(c=="..."&&m>0&&m+3==r.length){a=1;break}let g=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(c);if(!g)throw new RangeError("Invalid path: "+r);if(s.push(g[0]=="*"?"":g[0][0]=='"'?JSON.parse(g[0]):g[0]),m+=g[0].length,m==r.length)break;let y=r[m++];if(m==r.length&&y=="!"){a=0;break}if(y!="/")throw new RangeError("Invalid path: "+r);c=r.slice(m)}let u=s.length-1,h=s[u];if(!h)throw new RangeError("Invalid path: "+r);let d=new _p(i,a,u>0?s.slice(0,u):null);e[h]=d.sort(e[h])}}return r5.add(e)}const r5=new lt({combine(t,e){let n,i,r;for(;t||e;){if(!t||e&&t.depth<=e.depth?(r=e,e=e.next):(r=t,t=t.next),n&&n.mode==r.mode&&!r.context&&!n.context)continue;let s=new _p(r.tags,r.mode,r.context);n?n.next=s:i=s,n=s}return i}});class _p{constructor(e,n,i,r){this.tags=e,this.mode=n,this.context=i,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}_p.empty=new _p([],2,null);function s5(t,e){let n=Object.create(null);for(let s of t)if(!Array.isArray(s.tag))n[s.tag.id]=s.class;else for(let a of s.tag)n[a.id]=s.class;let{scope:i,all:r=null}=e||{};return{style:s=>{let a=r;for(let c of s)for(let u of c.set){let h=n[u.id];if(h){a=a?a+" "+h:h;break}}return a},scope:i}}function Dee(t,e){let n=null;for(let i of t){let r=i.style(e);r&&(n=n?n+" "+r:r)}return n}function Lee(t,e,n,i=0,r=t.length){let s=new Iee(i,Array.isArray(e)?e:[e],n);s.highlightRange(t.cursor(),i,r,"",s.highlighters),s.flush(r)}class Iee{constructor(e,n,i){this.at=e,this.highlighters=n,this.span=i,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,i,r,s){let{type:a,from:c,to:u}=e;if(c>=i||u<=n)return;a.isTop&&(s=this.highlighters.filter(y=>!y.scope||y.scope(a)));let h=r,d=jee(e)||_p.empty,m=Dee(s,d.tags);if(m&&(h&&(h+=" "),h+=m,d.mode==1&&(r+=(r?" ":"")+m)),this.startSpan(Math.max(n,c),h),d.opaque)return;let g=e.tree&&e.tree.prop(lt.mounted);if(g&&g.overlay){let y=e.node.enter(g.overlay[0].from+c,1),v=this.highlighters.filter(x=>!x.scope||x.scope(g.tree.type)),S=e.firstChild();for(let x=0,w=c;;x++){let C=x<g.overlay.length?g.overlay[x]:null,k=C?C.from+c:u,A=Math.max(n,w),R=Math.min(i,k);if(A<R&&S)for(;e.from<R&&(this.highlightRange(e,A,R,r,s),this.startSpan(Math.min(R,e.to),h),!(e.to>=k||!e.nextSibling())););if(!C||k>i)break;w=C.to+c,w>n&&(this.highlightRange(y.cursor(),Math.max(n,C.from+c),Math.min(i,w),"",v),this.startSpan(Math.min(i,w),h))}S&&e.parent()}else if(e.firstChild()){g&&(r="");do if(!(e.to<=n)){if(e.from>=i)break;this.highlightRange(e,n,i,r,s),this.startSpan(Math.min(i,e.to),h)}while(e.nextSibling());e.parent()}}}function jee(t){let e=t.type.prop(r5);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const Ne=Yr.define,sO=Ne(),vl=Ne(),HQ=Ne(vl),WQ=Ne(vl),Sl=Ne(),oO=Ne(Sl),KS=Ne(Sl),wo=Ne(),xc=Ne(wo),vo=Ne(),So=Ne(),aE=Ne(),Cd=Ne(aE),aO=Ne(),L={comment:sO,lineComment:Ne(sO),blockComment:Ne(sO),docComment:Ne(sO),name:vl,variableName:Ne(vl),typeName:HQ,tagName:Ne(HQ),propertyName:WQ,attributeName:Ne(WQ),className:Ne(vl),labelName:Ne(vl),namespace:Ne(vl),macroName:Ne(vl),literal:Sl,string:oO,docString:Ne(oO),character:Ne(oO),attributeValue:Ne(oO),number:KS,integer:Ne(KS),float:Ne(KS),bool:Ne(Sl),regexp:Ne(Sl),escape:Ne(Sl),color:Ne(Sl),url:Ne(Sl),keyword:vo,self:Ne(vo),null:Ne(vo),atom:Ne(vo),unit:Ne(vo),modifier:Ne(vo),operatorKeyword:Ne(vo),controlKeyword:Ne(vo),definitionKeyword:Ne(vo),moduleKeyword:Ne(vo),operator:So,derefOperator:Ne(So),arithmeticOperator:Ne(So),logicOperator:Ne(So),bitwiseOperator:Ne(So),compareOperator:Ne(So),updateOperator:Ne(So),definitionOperator:Ne(So),typeOperator:Ne(So),controlOperator:Ne(So),punctuation:aE,separator:Ne(aE),bracket:Cd,angleBracket:Ne(Cd),squareBracket:Ne(Cd),paren:Ne(Cd),brace:Ne(Cd),content:wo,heading:xc,heading1:Ne(xc),heading2:Ne(xc),heading3:Ne(xc),heading4:Ne(xc),heading5:Ne(xc),heading6:Ne(xc),contentSeparator:Ne(wo),list:Ne(wo),quote:Ne(wo),emphasis:Ne(wo),strong:Ne(wo),link:Ne(wo),monospace:Ne(wo),strikethrough:Ne(wo),inserted:Ne(),deleted:Ne(),changed:Ne(),invalid:Ne(),meta:aO,documentMeta:Ne(aO),annotation:Ne(aO),processingInstruction:Ne(aO),definition:Yr.defineModifier("definition"),constant:Yr.defineModifier("constant"),function:Yr.defineModifier("function"),standard:Yr.defineModifier("standard"),local:Yr.defineModifier("local"),special:Yr.defineModifier("special")};for(let t in L){let e=L[t];e instanceof Yr&&(e.name=t)}s5([{tag:L.link,class:"tok-link"},{tag:L.heading,class:"tok-heading"},{tag:L.emphasis,class:"tok-emphasis"},{tag:L.strong,class:"tok-strong"},{tag:L.keyword,class:"tok-keyword"},{tag:L.atom,class:"tok-atom"},{tag:L.bool,class:"tok-bool"},{tag:L.url,class:"tok-url"},{tag:L.labelName,class:"tok-labelName"},{tag:L.inserted,class:"tok-inserted"},{tag:L.deleted,class:"tok-deleted"},{tag:L.literal,class:"tok-literal"},{tag:L.string,class:"tok-string"},{tag:L.number,class:"tok-number"},{tag:[L.regexp,L.escape,L.special(L.string)],class:"tok-string2"},{tag:L.variableName,class:"tok-variableName"},{tag:L.local(L.variableName),class:"tok-variableName tok-local"},{tag:L.definition(L.variableName),class:"tok-variableName tok-definition"},{tag:L.special(L.variableName),class:"tok-variableName2"},{tag:L.definition(L.propertyName),class:"tok-propertyName tok-definition"},{tag:L.typeName,class:"tok-typeName"},{tag:L.namespace,class:"tok-namespace"},{tag:L.className,class:"tok-className"},{tag:L.macroName,class:"tok-macroName"},{tag:L.propertyName,class:"tok-propertyName"},{tag:L.operator,class:"tok-operator"},{tag:L.comment,class:"tok-comment"},{tag:L.meta,class:"tok-meta"},{tag:L.invalid,class:"tok-invalid"},{tag:L.punctuation,class:"tok-punctuation"}]);function KQ(t,e,n,i=0,r=0){e==null&&(e=t.search(/[^\s\u00a0]/),e==-1&&(e=t.length));let s=r;for(let a=i;a<e;a++)t.charCodeAt(a)==9?s+=n-s%n:s++;return s}class o5{constructor(e,n,i,r){this.string=e,this.tabSize=n,this.indentUnit=i,this.overrideIndent=r,this.pos=0,this.start=0,this.lastColumnPos=0,this.lastColumnValue=0}eol(){return this.pos>=this.string.length}sol(){return this.pos==0}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)}eat(e){let n=this.string.charAt(this.pos),i;if(typeof e=="string"?i=n==e:i=n&&(e instanceof RegExp?e.test(n):e(n)),i)return++this.pos,n}eatWhile(e){let n=this.pos;for(;this.eat(e););return this.pos>n}eatSpace(){let e=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e}skipToEnd(){this.pos=this.string.length}skipTo(e){let n=this.string.indexOf(e,this.pos);if(n>-1)return this.pos=n,!0}backUp(e){this.pos-=e}column(){return this.lastColumnPos<this.start&&(this.lastColumnValue=KQ(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue}indentation(){var e;return(e=this.overrideIndent)!==null&&e!==void 0?e:KQ(this.string,null,this.tabSize)}match(e,n,i){if(typeof e=="string"){let r=a=>i?a.toLowerCase():a,s=this.string.substr(this.pos,e.length);return r(s)==r(e)?(n!==!1&&(this.pos+=e.length),!0):null}else{let r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&n!==!1&&(this.pos+=r[0].length),r)}}current(){return this.string.slice(this.start,this.pos)}}var JS;const Ql=new lt;function xy(t){return De.define({combine:t?e=>e.concat(t):void 0})}const mT=new lt;class Gr{constructor(e,n,i=[],r=""){this.data=e,this.name=r,Ct.prototype.hasOwnProperty("tree")||Object.defineProperty(Ct.prototype,"tree",{get(){return rn(this)}}),this.parser=n,this.extension=[Vl.of(this),Ct.languageData.of((s,a,c)=>{let u=JQ(s,a,c),h=u.type.prop(Ql);if(!h)return[];let d=s.facet(h),m=u.type.prop(mT);if(m){let g=u.resolve(a-u.from,c);for(let y of m)if(y.test(g,s)){let v=s.facet(y.facet);return y.type=="replace"?v:v.concat(d)}}return d})].concat(i)}isActiveAt(e,n,i=-1){return JQ(e,n,i).type.prop(Ql)==this.data}findRegions(e){let n=e.facet(Vl);if((n==null?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let i=[],r=(s,a)=>{if(s.prop(Ql)==this.data){i.push({from:a,to:a+s.length});return}let c=s.prop(lt.mounted);if(c){if(c.tree.prop(Ql)==this.data){if(c.overlay)for(let u of c.overlay)i.push({from:u.from+a,to:u.to+a});else i.push({from:a,to:a+s.length});return}else if(c.overlay){let u=i.length;if(r(c.tree,c.overlay[0].from+a),i.length>u)return}}for(let u=0;u<s.children.length;u++){let h=s.children[u];h instanceof Et&&r(h,s.positions[u]+a)}};return r(rn(e),0),i}get allowsNesting(){return!0}}Gr.setState=ut.define();function JQ(t,e,n){let i=t.facet(Vl),r=rn(t).topNode;if(!i||i.allowsNesting)for(let s=r;s;s=s.enter(e,n,It.ExcludeBuffers|It.EnterBracketed))s.type.isTop&&(r=s);return r}class oh extends Gr{constructor(e,n,i){super(e,n,[],i),this.parser=n}static define(e){let n=xy(e.languageData);return new oh(n,e.parser.configure({props:[Ql.add(i=>i.isTop?n:void 0)]}),e.name)}configure(e,n){return new oh(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function rn(t){let e=t.field(Gr.state,!1);return e?e.tree:Et.empty}class Bee{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,n){let i=this.cursorPos-this.string.length;return e<i||n>=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-i,n-i)}}let Ad=null;class nu{constructor(e,n,i=[],r,s,a,c,u){this.parser=e,this.state=n,this.fragments=i,this.tree=r,this.treeLen=s,this.viewport=a,this.skipped=c,this.scheduleOn=u,this.parse=null,this.tempSkipped=[]}static create(e,n,i){return new nu(e,n,[],Et.empty,0,i,[],null)}startParse(){return this.parser.startParse(new Bee(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=Et.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var i;if(typeof e=="number"){let r=Date.now()+e;e=()=>Date.now()>r}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n<this.state.doc.length&&this.parse.stopAt(n);;){let r=this.parse.advance();if(r)if(this.fragments=this.withoutTempSkipped(Ca.addTree(r,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(i=this.parse.stoppedAt)!==null&&i!==void 0?i:this.state.doc.length,this.tree=r,this.parse=null,this.treeLen<(n??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,n;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(Ca.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=Ad;Ad=this;try{return e()}finally{Ad=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=e$(e,n.from,n.to);return e}changes(e,n){let{fragments:i,tree:r,treeLen:s,viewport:a,skipped:c}=this;if(this.takeTree(),!e.empty){let u=[];if(e.iterChangedRanges((h,d,m,g)=>u.push({fromA:h,toA:d,fromB:m,toB:g})),i=Ca.applyChanges(i,u),r=Et.empty,s=0,a={from:e.mapPos(a.from,-1),to:e.mapPos(a.to,1)},this.skipped.length){c=[];for(let h of this.skipped){let d=e.mapPos(h.from,1),m=e.mapPos(h.to,-1);d<m&&c.push({from:d,to:m})}}}return new nu(this.parser,n,i,r,s,a,c,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let n=this.skipped.length;for(let i=0;i<this.skipped.length;i++){let{from:r,to:s}=this.skipped[i];r<e.to&&s>e.from&&(this.fragments=e$(this.fragments,r,s),this.skipped.splice(i--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends Sy{createParse(n,i,r){let s=r[0].from,a=r[r.length-1].to;return{parsedPos:s,advance(){let u=Ad;if(u){for(let h of r)u.tempSkipped.push(h);e&&(u.scheduleOn=u.scheduleOn?Promise.all([u.scheduleOn,e]):e)}return this.parsedPos=a,new Et(Jn.none,[],[],a-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return Ad}}function e$(t,e,n){return Ca.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class ah{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,i)||n.takeTree(),new ah(n)}static init(e){let n=Math.min(3e3,e.doc.length),i=nu.create(e.facet(Vl).parser,e,{from:0,to:n});return i.work(20,n)||i.takeTree(),new ah(i)}}Gr.state=Li.define({create:ah.init,update(t,e){for(let n of e.effects)if(n.is(Gr.setState))return n.value;return e.startState.facet(Vl)!=e.state.facet(Vl)?ah.init(e.state):t.apply(e)}});let a5=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(a5=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const ex=typeof navigator<"u"&&(!((JS=navigator.scheduling)===null||JS===void 0)&&JS.isInputPending)?()=>navigator.scheduling.isInputPending():null,zee=Mn.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(Gr.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(Gr.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=a5(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEnd<n&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=n+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:i,viewport:{to:r}}=this.view,s=i.field(Gr.state);if(s.tree==s.context.tree&&s.context.isDone(r+1e5))return;let a=Date.now()+Math.min(this.chunkBudget,100,e&&!ex?Math.max(25,e.timeRemaining()-5):1e9),c=s.context.treeLen<r&&i.doc.length>r+1e3,u=s.context.work(()=>ex&&ex()||Date.now()>a,r+(c?0:1e5));this.chunkBudget-=Date.now()-n,(u||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:Gr.setState.of(new ah(s.context))})),this.chunkBudget>0&&!(u&&!c)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>wr(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Vl=De.define({combine(t){return t.length?t[0]:null},enables:t=>[Gr.state,zee,Ae.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class lh{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}class ae{constructor(e,n,i,r,s,a=void 0){this.name=e,this.alias=n,this.extensions=i,this.filename=r,this.loadFunc=s,this.support=a,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then(e=>this.support=e,e=>{throw this.loading=null,e}))}static of(e){let{load:n,support:i}=e;if(!n){if(!i)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");n=()=>Promise.resolve(i)}return new ae(e.name,(e.alias||[]).concat(e.name).map(r=>r.toLowerCase()),e.extensions||[],e.filename,n,i)}static matchFilename(e,n){for(let r of e)if(r.filename&&r.filename.test(n))return r;let i=/\.([^.]+)$/.exec(n);if(i){for(let r of e)if(r.extensions.indexOf(i[1])>-1)return r}return null}static matchLanguageName(e,n,i=!0){n=n.toLowerCase();for(let r of e)if(r.alias.some(s=>s==n))return r;if(i)for(let r of e)for(let s of r.alias){let a=n.indexOf(s);if(a>-1&&(s.length>2||!/\w/.test(n[a-1])&&!/\w/.test(n[a+s.length])))return r}return null}}const Xee=De.define(),Eh=De.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function iu(t){let e=t.facet(Eh);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function Tp(t,e){let n="",i=t.tabSize,r=t.facet(Eh)[0];if(r==" "){for(;e>=i;)n+=" ",e-=i;r=" "}for(let s=0;s<e;s++)n+=r;return n}function gT(t,e){t instanceof Ct&&(t=new wy(t));for(let i of t.state.facet(Xee)){let r=i(t,e);if(r!==void 0)return r}let n=rn(t.state);return n.length>=e?Uee(t,n,e):null}class wy{constructor(e,n={}){this.state=e,this.options=n,this.unit=iu(e)}lineAt(e,n=1){let i=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:s}=this.options;return r!=null&&r>=i.from&&r<=i.to?s&&r==e?{text:"",from:e}:(n<0?r<e:r<=e)?{text:i.text.slice(r-i.from),from:r}:{text:i.text.slice(0,r-i.from),from:i.from}:i}textAfterPos(e,n=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:i,from:r}=this.lineAt(e,n);return i.slice(e-r,Math.min(i.length,e+100-r))}column(e,n=1){let{text:i,from:r}=this.lineAt(e,n),s=this.countColumn(i,e-r),a=this.options.overrideIndentation?this.options.overrideIndentation(r):-1;return a>-1&&(s+=a-this.countColumn(i,i.search(/\S|$/))),s}countColumn(e,n=e.length){return Gs(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:i,from:r}=this.lineAt(e,n),s=this.options.overrideIndentation;if(s){let a=s(r);if(a>-1)return a}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const _h=new lt;function Uee(t,e,n){let i=e.resolveStack(n),r=e.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(r!=i.node){let s=[];for(let a=r;a&&!(a.from<i.node.from||a.to>i.node.to||a.from==i.node.from&&a.type==i.node.type);a=a.parent)s.push(a);for(let a=s.length-1;a>=0;a--)i={node:s[a],next:i}}return l5(i,t,n)}function l5(t,e,n){for(let i=t;i;i=i.next){let r=Vee(i.node);if(r)return r(OT.create(e,n,i))}return 0}function Zee(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function Vee(t){let e=t.type.prop(_h);if(e)return e;let n=t.firstChild,i;if(n&&(i=n.type.prop(lt.closedBy))){let r=t.lastChild,s=r&&i.indexOf(r.name)>-1;return a=>c5(a,!0,1,void 0,s&&!Zee(a)?r.from:void 0)}return t.parent==null?qee:null}function qee(){return 0}class OT extends wy{constructor(e,n,i){super(e.state,e.options),this.base=e,this.pos=n,this.context=i}get node(){return this.context.node}static create(e,n,i){return new OT(e,n,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let i=e.resolve(n.from);for(;i.parent&&i.parent.from==i.from;)i=i.parent;if(Yee(i,e))break;n=this.state.doc.lineAt(i.from)}return this.lineIndent(n.from)}continue(){return l5(this.context.next,this.base,this.pos)}}function Yee(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function Gee(t){let e=t.node,n=e.childAfter(e.from),i=e.lastChild;if(!n)return null;let r=t.options.simulateBreak,s=t.state.doc.lineAt(n.from),a=r==null||r<=s.from?s.to:Math.min(s.to,r);for(let c=n.to;;){let u=e.childAfter(c);if(!u||u==i)return null;if(!u.type.isSkipped){if(u.from>=a)return null;let h=/^ */.exec(s.text.slice(n.to-s.from))[0].length;return{from:n.from,to:n.to+h}}c=u.to}}function Fee({closing:t,align:e=!0,units:n=1}){return i=>c5(i,e,n,t)}function c5(t,e,n,i,r){let s=t.textAfter,a=s.match(/^\s*/)[0].length,c=i&&s.slice(a,a+i.length)==i||r==t.pos+a,u=e?Gee(t):null;return u?c?t.column(u.from):t.column(u.to):t.baseIndent+(c?0:t.unit*n)}const Hee=t=>t.baseIndent;function WO({except:t,units:e=1}={}){return n=>{let i=t&&t.test(n.textAfter);return n.baseIndent+(i?0:e*n.unit)}}const Wee=200;function Kee(){return Ct.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:i}=t.newSelection.main,r=n.lineAt(i);if(i>r.from+Wee)return t;let s=n.sliceString(r.from,i);if(!e.some(h=>h.test(s)))return t;let{state:a}=t,c=-1,u=[];for(let{head:h}of a.selection.ranges){let d=a.doc.lineAt(h);if(d.from==c)continue;c=d.from;let m=gT(a,d.from);if(m==null)continue;let g=/^\s*/.exec(d.text)[0],y=Tp(a,m);g!=y&&u.push({from:d.from,to:d.from+g.length,insert:y})}return u.length?[t,{changes:u,sequential:!0}]:t})}const u5=De.define(),Th=new lt;function f5(t){let e=t.firstChild,n=t.lastChild;return e&&e.to<n.from?{from:e.to,to:n.type.isError?t.to:n.from}:null}function Jee(t,e,n){let i=rn(t);if(i.length<n)return null;let r=i.resolveStack(n,1),s=null;for(let a=r;a;a=a.next){let c=a.node;if(c.to<=n||c.from>n)continue;if(s&&c.from<e)break;let u=c.type.prop(Th);if(u&&(c.to<i.length-50||i.length==t.doc.length||!ete(c))){let h=u(c,t);h&&h.from<=n&&h.from>=e&&h.to>n&&(s=h)}}return s}function ete(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function Rb(t,e,n){for(let i of t.facet(u5)){let r=i(t,e,n);if(r)return r}return Jee(t,e,n)}function h5(t,e){let n=e.mapPos(t.from,1),i=e.mapPos(t.to,-1);return n>=i?void 0:{from:n,to:i}}const Ey=ut.define({map:h5}),rm=ut.define({map:h5});function d5(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(i=>i.from<=n&&i.to>=n)||e.push(t.lineBlockAt(n));return e}const ru=Li.define({create(){return et.none},update(t,e){e.isUserEvent("delete")&&e.changes.iterChangedRanges((i,r)=>t=t$(t,i,r)),t=t.map(e.changes);let n=[];for(let i of e.effects)i.is(Ey)&&!tte(t,i.value.from,i.value.to)?n.push(i.value):i.is(rm)&&(t=t.update({filter:(r,s)=>i.value.from!=r||i.value.to!=s,filterFrom:i.value.from,filterTo:i.value.to}));if(n.length){let{preparePlaceholder:i}=e.state.facet(g5),r=n.map(s=>(i?et.replace({widget:new lte(i(e.state,s))}):n$).range(s.from,s.to));t=t.update({add:r})}return e.selection&&(t=t$(t,e.selection.main.head)),t},provide:t=>Ae.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(i,r)=>{n.push(i,r)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n<t.length;){let i=t[n++],r=t[n++];if(typeof i!="number"||typeof r!="number")throw new RangeError("Invalid JSON for fold state");e.push(n$.range(i,r))}return et.set(e,!0)}});function t$(t,e,n=e){let i=!1;return t.between(e,n,(r,s)=>{r<n&&s>e&&(i=!0)}),i?t.update({filterFrom:e,filterTo:n,filter:(r,s)=>r>=n||s<=e}):t}function Pb(t,e,n){var i;let r=null;return(i=t.field(ru,!1))===null||i===void 0||i.between(e,n,(s,a)=>{(!r||r.from>s)&&(r={from:s,to:a})}),r}function tte(t,e,n){let i=!1;return t.between(e,e,(r,s)=>{r==e&&s==n&&(i=!0)}),i}function p5(t,e){return t.field(ru,!1)?e:e.concat(ut.appendConfig.of(O5()))}const nte=t=>{for(let e of d5(t)){let n=Rb(t.state,e.from,e.to);if(n)return t.dispatch({effects:p5(t.state,[Ey.of(n),m5(t,n)])}),!0}return!1},ite=t=>{if(!t.state.field(ru,!1))return!1;let e=[];for(let n of d5(t)){let i=Pb(t.state,n.from,n.to);i&&e.push(rm.of(i),m5(t,i,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function m5(t,e,n=!0){let i=t.state.doc.lineAt(e.from).number,r=t.state.doc.lineAt(e.to).number;return Ae.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${i} ${t.state.phrase("to")} ${r}.`)}const rte=t=>{let{state:e}=t,n=[];for(let i=0;i<e.doc.length;){let r=t.lineBlockAt(i),s=Rb(e,r.from,r.to);s&&n.push(Ey.of(s)),i=(s?t.lineBlockAt(s.to):r).to+1}return n.length&&t.dispatch({effects:p5(t.state,n)}),!!n.length},ste=t=>{let e=t.state.field(ru,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(i,r)=>{n.push(rm.of({from:i,to:r}))}),t.dispatch({effects:n}),!0},ote=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:nte},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:ite},{key:"Ctrl-Alt-[",run:rte},{key:"Ctrl-Alt-]",run:ste}],ate={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},g5=De.define({combine(t){return Wo(t,ate)}});function O5(t){return[ru,fte]}function b5(t,e){let{state:n}=t,i=n.facet(g5),r=a=>{let c=t.lineBlockAt(t.posAtDOM(a.target)),u=Pb(t.state,c.from,c.to);u&&t.dispatch({effects:rm.of(u)}),a.preventDefault()};if(i.placeholderDOM)return i.placeholderDOM(t,r,e);let s=document.createElement("span");return s.textContent=i.placeholderText,s.setAttribute("aria-label",n.phrase("folded code")),s.title=n.phrase("unfold"),s.className="cm-foldPlaceholder",s.onclick=r,s}const n$=et.replace({widget:new class extends Hs{toDOM(t){return b5(t,null)}}});class lte extends Hs{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return b5(e,this.value)}}const cte={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class tx extends Qa{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}}function ute(t={}){let e={...cte,...t},n=new tx(e,!0),i=new tx(e,!1),r=Mn.fromClass(class{constructor(a){this.from=a.viewport.from,this.markers=this.buildMarkers(a)}update(a){(a.docChanged||a.viewportChanged||a.startState.facet(Vl)!=a.state.facet(Vl)||a.startState.field(ru,!1)!=a.state.field(ru,!1)||rn(a.startState)!=rn(a.state)||e.foldingChanged(a))&&(this.markers=this.buildMarkers(a.view))}buildMarkers(a){let c=new Zo;for(let u of a.viewportLineBlocks){let h=Pb(a.state,u.from,u.to)?i:Rb(a.state,u.from,u.to)?n:null;h&&c.add(u.from,u.from,h)}return c.finish()}}),{domEventHandlers:s}=e;return[r,lee({class:"cm-foldGutter",markers(a){var c;return((c=a.plugin(r))===null||c===void 0?void 0:c.markers)||wt.empty},initialSpacer(){return new tx(e,!1)},domEventHandlers:{...s,click:(a,c,u)=>{if(s.click&&s.click(a,c,u))return!0;let h=Pb(a.state,c.from,c.to);if(h)return a.dispatch({effects:rm.of(h)}),!0;let d=Rb(a.state,c.from,c.to);return d?(a.dispatch({effects:Ey.of(d)}),!0):!1}}}),O5()]}const fte=Ae.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class kh{constructor(e,n){this.specs=e;let i;function r(c){let u=zl.newName();return(i||(i=Object.create(null)))["."+u]=c,u}const s=typeof n.all=="string"?n.all:n.all?r(n.all):void 0,a=n.scope;this.scope=a instanceof Gr?c=>c.prop(Ql)==a.data:a?c=>c==a:void 0,this.style=s5(e.map(c=>({tag:c.tag,class:c.class||r(Object.assign({},c,{tag:null}))})),{all:s}).style,this.module=i?new zl(i):null,this.themeType=n.themeType}static define(e,n){return new kh(e,n||{})}}const lE=De.define(),y5=De.define({combine(t){return t.length?[t[0]]:null}});function nx(t){let e=t.facet(lE);return e.length?e:t.facet(y5)}function bT(t,e){let n=[dte],i;return t instanceof kh&&(t.module&&n.push(Ae.styleModule.of(t.module)),i=t.themeType),e!=null&&e.fallback?n.push(y5.of(t)):i?n.push(lE.computeN([Ae.darkTheme],r=>r.facet(Ae.darkTheme)==(i=="dark")?[t]:[])):n.push(lE.of(t)),n}class hte{constructor(e){this.markCache=Object.create(null),this.tree=rn(e.state),this.decorations=this.buildDeco(e,nx(e.state)),this.decoratedTo=e.viewport.to}update(e){let n=rn(e.state),i=nx(e.state),r=i!=nx(e.startState),{viewport:s}=e.view,a=e.changes.mapPos(this.decoratedTo,1);n.length<s.to&&!r&&n.type==this.tree.type&&a>=s.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=a):(n!=this.tree||e.viewportChanged||r)&&(this.tree=n,this.decorations=this.buildDeco(e.view,i),this.decoratedTo=s.to)}buildDeco(e,n){if(!n||!this.tree.length)return et.none;let i=new Zo;for(let{from:r,to:s}of e.visibleRanges)Lee(this.tree,n,(a,c,u)=>{i.add(a,c,this.markCache[u]||(this.markCache[u]=et.mark({class:u})))},r,s);return i.finish()}}const dte=Fo.high(Mn.fromClass(hte,{decorations:t=>t.decorations})),pte=kh.define([{tag:L.meta,color:"#404740"},{tag:L.link,textDecoration:"underline"},{tag:L.heading,textDecoration:"underline",fontWeight:"bold"},{tag:L.emphasis,fontStyle:"italic"},{tag:L.strong,fontWeight:"bold"},{tag:L.strikethrough,textDecoration:"line-through"},{tag:L.keyword,color:"#708"},{tag:[L.atom,L.bool,L.url,L.contentSeparator,L.labelName],color:"#219"},{tag:[L.literal,L.inserted],color:"#164"},{tag:[L.string,L.deleted],color:"#a11"},{tag:[L.regexp,L.escape,L.special(L.string)],color:"#e40"},{tag:L.definition(L.variableName),color:"#00f"},{tag:L.local(L.variableName),color:"#30a"},{tag:[L.typeName,L.namespace],color:"#085"},{tag:L.className,color:"#167"},{tag:[L.special(L.variableName),L.macroName],color:"#256"},{tag:L.definition(L.propertyName),color:"#00c"},{tag:L.comment,color:"#940"},{tag:L.invalid,color:"#f00"}]),mte=Ae.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),v5=1e4,S5="()[]{}",x5=De.define({combine(t){return Wo(t,{afterCursor:!0,brackets:S5,maxScanDistance:v5,renderMatch:bte})}}),gte=et.mark({class:"cm-matchingBracket"}),Ote=et.mark({class:"cm-nonmatchingBracket"});function bte(t){let e=[],n=t.matched?gte:Ote;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}function i$(t){let e=[],n=t.facet(x5);for(let i of t.selection.ranges){if(!i.empty)continue;let r=Do(t,i.head,-1,n)||i.head>0&&Do(t,i.head-1,1,n)||n.afterCursor&&(Do(t,i.head,1,n)||i.head<t.doc.length&&Do(t,i.head+1,-1,n));r&&(e=e.concat(n.renderMatch(r,t)))}return et.set(e,!0)}const yte=Mn.fromClass(class{constructor(t){this.paused=!1,this.decorations=i$(t.state)}update(t){(t.docChanged||t.selectionSet||this.paused)&&(t.view.composing?(this.decorations=this.decorations.map(t.changes),this.paused=!0):(this.decorations=i$(t.state),this.paused=!1))}},{decorations:t=>t.decorations}),vte=[yte,mte];function Ste(t={}){return[x5.of(t),vte]}const w5=new lt;function cE(t,e,n){let i=t.prop(e<0?lt.openedBy:lt.closedBy);if(i)return i;if(t.name.length==1){let r=n.indexOf(t.name);if(r>-1&&r%2==(e<0?1:0))return[n[r+e]]}return null}function uE(t){let e=t.type.prop(w5);return e?e(t.node):t}function Do(t,e,n,i={}){let r=i.maxScanDistance||v5,s=i.brackets||S5,a=rn(t),c=a.resolveInner(e,n);for(let u=c;u;u=u.parent){let h=cE(u.type,n,s);if(h&&u.from<u.to){let d=uE(u);if(d&&(n>0?e>=d.from&&e<d.to:e>d.from&&e<=d.to))return xte(t,e,n,u,d,h,s)}}return wte(t,e,n,a,c.type,r,s)}function xte(t,e,n,i,r,s,a){let c=i.parent,u={from:r.from,to:r.to},h=0,d=c==null?void 0:c.cursor();if(d&&(n<0?d.childBefore(i.from):d.childAfter(i.to)))do if(n<0?d.to<=i.from:d.from>=i.to){if(h==0&&s.indexOf(d.type.name)>-1&&d.from<d.to){let m=uE(d);return{start:u,end:m?{from:m.from,to:m.to}:void 0,matched:!0}}else if(cE(d.type,n,a))h++;else if(cE(d.type,-n,a)){if(h==0){let m=uE(d);return{start:u,end:m&&m.from<m.to?{from:m.from,to:m.to}:void 0,matched:!1}}h--}}while(n<0?d.prevSibling():d.nextSibling());return{start:u,matched:!1}}function wte(t,e,n,i,r,s,a){if(n<0?!e:e==t.doc.length)return null;let c=n<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),u=a.indexOf(c);if(u<0||u%2==0!=n>0)return null;let h={from:n<0?e-1:e,to:n>0?e+1:e},d=t.doc.iterRange(e,n>0?t.doc.length:0),m=0;for(let g=0;!d.next().done&&g<=s;){let y=d.value;n<0&&(g+=y.length);let v=e+g*n;for(let S=n>0?0:y.length-1,x=n>0?y.length:-1;S!=x;S+=n){let w=a.indexOf(y[S]);if(!(w<0||i.resolveInner(v+S,1).type!=r))if(w%2==0==n>0)m++;else{if(m==1)return{start:h,end:{from:v+S,to:v+S+1},matched:w>>1==u>>1};m--}}n>0&&(g+=y.length)}return d.done?{start:h,matched:!1}:null}function Ete(t){return{name:t.name||"",token:t.token,blankLine:t.blankLine||(()=>{}),startState:t.startState||(()=>!0),copyState:t.copyState||_te,indent:t.indent||(()=>null),languageData:t.languageData||{},tokenTable:t.tokenTable||ST,mergeTokens:t.mergeTokens!==!1}}function _te(t){if(typeof t!="object")return t;let e={};for(let n in t){let i=t[n];e[n]=i instanceof Array?i.slice():i}return e}const r$=new WeakMap;class yT extends Gr{constructor(e){let n=xy(e.languageData),i=Ete(e),r,s=new class extends Sy{createParse(a,c,u){return new kte(r,a,c,u)}};super(n,s,[],e.name),this.topNode=Rte(n,this),r=this,this.streamParser=i,this.stateAfter=new lt({perNode:!0}),this.tokenTable=e.tokenTable?new k5(i.tokenTable):Ate}static define(e){return new yT(e)}getIndent(e){let n,{overrideIndentation:i}=e.options;i&&(n=r$.get(e.state),n!=null&&n<e.pos-1e4&&(n=void 0));let r=vT(this,e.node.tree,e.node.from,e.node.from,n??e.pos),s,a;if(r?(a=r.state,s=r.pos+1):(a=this.streamParser.startState(e.unit),s=e.node.from),e.pos-s>1e4)return null;for(;s<e.pos;){let u=e.state.doc.lineAt(s),h=Math.min(e.pos,u.to);if(u.length){let d=i?i(u.from):-1,m=new o5(u.text,e.state.tabSize,e.unit,d<0?void 0:d);for(;m.pos<h-u.from;)_5(this.streamParser.token,m,a)}else this.streamParser.blankLine(a,e.unit);if(h==e.pos)break;s=u.to+1}let c=e.lineAt(e.pos);return i&&n==null&&r$.set(e.state,c.from),this.streamParser.indent(a,/^\s*(.*)/.exec(c.text)[1],e)}get allowsNesting(){return!1}}function vT(t,e,n,i,r){let s=n>=i&&n+e.length<=r&&e.prop(t.stateAfter);if(s)return{state:t.streamParser.copyState(s),pos:n+e.length};for(let a=e.children.length-1;a>=0;a--){let c=e.children[a],u=n+e.positions[a],h=c instanceof Et&&u<r&&vT(t,c,u,i,r);if(h)return h}return null}function E5(t,e,n,i,r){if(r&&n<=0&&i>=e.length)return e;!r&&n==0&&e.type==t.topNode&&(r=!0);for(let s=e.children.length-1;s>=0;s--){let a=e.positions[s],c=e.children[s],u;if(a<i&&c instanceof Et){if(!(u=E5(t,c,n-a,i-a,r)))break;return r?new Et(e.type,e.children.slice(0,s).concat(u),e.positions.slice(0,s+1),a+u.length):u}}return null}function Tte(t,e,n,i,r){for(let s of e){let a=s.from+(s.openStart?25:0),c=s.to-(s.openEnd?25:0),u=a<=n&&c>n&&vT(t,s.tree,0-s.offset,n,c),h;if(u&&u.pos<=i&&(h=E5(t,s.tree,n+s.offset,u.pos+s.offset,!1)))return{state:u.state,tree:h}}return{state:t.streamParser.startState(r?iu(r):4),tree:Et.empty}}let kte=class{constructor(e,n,i,r){this.lang=e,this.input=n,this.fragments=i,this.ranges=r,this.stoppedAt=null,this.chunks=[],this.chunkPos=[],this.chunk=[],this.chunkReused=void 0,this.rangeIndex=0,this.to=r[r.length-1].to;let s=nu.get(),a=r[0].from,{state:c,tree:u}=Tte(e,i,a,this.to,s==null?void 0:s.state);this.state=c,this.parsedPos=this.chunkStart=a+u.length;for(let h=0;h<u.children.length;h++)this.chunks.push(u.children[h]),this.chunkPos.push(u.positions[h]);s&&this.parsedPos<s.viewport.from-1e5&&r.some(h=>h.from<=s.viewport.from&&h.to>=s.viewport.from)&&(this.state=this.lang.streamParser.startState(iu(s.state)),s.skipUntilInView(this.parsedPos,s.viewport.from),this.parsedPos=s.viewport.from),this.moveRangeIndex()}advance(){let e=nu.get(),n=this.stoppedAt==null?this.to:Math.min(this.to,this.stoppedAt),i=Math.min(n,this.chunkStart+512);for(e&&(i=Math.min(i,e.viewport.to));this.parsedPos<i;)this.parseLine(e);return this.chunkStart<this.parsedPos&&this.finishChunk(),this.parsedPos>=n?this.finish():e&&this.parsedPos>=e.viewport.to?(e.skipUntilInView(this.parsedPos,n),this.finish()):null}stopAt(e){this.stoppedAt=e}lineAfter(e){let n=this.input.chunk(e);if(this.input.lineChunks)n==`
70
+ `&&(n="");else{let i=n.indexOf(`
71
+ `);i>-1&&(n=n.slice(0,i))}return e+n.length<=this.to?n:n.slice(0,this.to-e)}nextLine(){let e=this.parsedPos,n=this.lineAfter(e),i=e+n.length;for(let r=this.rangeIndex;;){let s=this.ranges[r].to;if(s>=i||(n=n.slice(0,s-(i-n.length)),r++,r==this.ranges.length))break;let a=this.ranges[r].from,c=this.lineAfter(a);n+=c,i=a+c.length}return{line:n,end:i}}skipGapsTo(e,n,i){for(;;){let r=this.ranges[this.rangeIndex].to,s=e+n;if(i>0?r>s:r>=s)break;let a=this.ranges[++this.rangeIndex].from;n+=a-r}return n}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to<this.parsedPos;)this.rangeIndex++}emitToken(e,n,i,r){let s=4;if(this.ranges.length>1){r=this.skipGapsTo(n,r,1),n+=r;let c=this.chunk.length;r=this.skipGapsTo(i,r,-1),i+=r,s+=this.chunk.length-c}let a=this.chunk.length-4;return this.lang.streamParser.mergeTokens&&s==4&&a>=0&&this.chunk[a]==e&&this.chunk[a+2]==n?this.chunk[a+2]=i:this.chunk.push(e,n,i,s),r}parseLine(e){let{line:n,end:i}=this.nextLine(),r=0,{streamParser:s}=this.lang,a=new o5(n,e?e.state.tabSize:4,e?iu(e.state):2);if(a.eol())s.blankLine(this.state,a.indentUnit);else for(;!a.eol();){let c=_5(s.token,a,this.state);if(c&&(r=this.emitToken(this.lang.tokenTable.resolve(c),this.parsedPos+a.start,this.parsedPos+a.pos,r)),a.start>1e4)break}this.parsedPos=i,this.moveRangeIndex(),this.parsedPos<this.to&&this.parsedPos++}finishChunk(){let e=Et.build({buffer:this.chunk,start:this.chunkStart,length:this.parsedPos-this.chunkStart,nodeSet:Cte,topID:0,maxBufferLength:512,reused:this.chunkReused});e=new Et(e.type,e.children,e.positions,e.length,[[this.lang.stateAfter,this.lang.streamParser.copyState(this.state)]]),this.chunks.push(e),this.chunkPos.push(this.chunkStart-this.ranges[0].from),this.chunk=[],this.chunkReused=void 0,this.chunkStart=this.parsedPos}finish(){return new Et(this.lang.topNode,this.chunks,this.chunkPos,this.parsedPos-this.ranges[0].from).balance()}};function _5(t,e,n){e.start=e.pos;for(let i=0;i<10;i++){let r=t(e,n);if(e.pos>e.start)return r}throw new Error("Stream parser failed to advance stream.")}const ST=Object.create(null),kp=[Jn.none],Cte=new xh(kp),s$=[],o$=Object.create(null),T5=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])T5[t]=C5(ST,e);class k5{constructor(e){this.extra=e,this.table=Object.assign(Object.create(null),T5)}resolve(e){return e?this.table[e]||(this.table[e]=C5(this.extra,e)):0}}const Ate=new k5(ST);function ix(t,e){s$.indexOf(t)>-1||(s$.push(t),console.warn(e))}function C5(t,e){let n=[];for(let c of e.split(" ")){let u=[];for(let h of c.split(".")){let d=t[h]||L[h];d?typeof d=="function"?u.length?u=u.map(d):ix(h,`Modifier ${h} used at start of tag`):u.length?ix(h,`Tag ${h} used as modifier`):u=Array.isArray(d)?d:[d]:ix(h,`Unknown highlighting tag ${h}`)}for(let h of u)n.push(h)}if(!n.length)return 0;let i=e.replace(/ /g,"_"),r=i+" "+n.map(c=>c.id),s=o$[r];if(s)return s.id;let a=o$[r]=Jn.define({id:kp.length,name:i,props:[wh({[i]:n})]});return kp.push(a),a.id}function Rte(t,e){let n=Jn.define({id:kp.length,name:"Document",props:[Ql.add(()=>t),_h.add(()=>i=>e.getIndent(i))],top:!0});return kp.push(n),n}ln.RTL,ln.LTR;const Pte=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),i=wT(t.state,n.from);return i.line?Mte(t):i.block?Qte(t):!1};function xT(t,e){return({state:n,dispatch:i})=>{if(n.readOnly)return!1;let r=t(e,n);return r?(i(n.update(r)),!0):!1}}const Mte=xT(Lte,0),Nte=xT(A5,0),Qte=xT((t,e)=>A5(t,e,Dte(e)),0);function wT(t,e){let n=t.languageDataAt("commentTokens",e,1);return n.length?n[0]:{}}const Rd=50;function $te(t,{open:e,close:n},i,r){let s=t.sliceDoc(i-Rd,i),a=t.sliceDoc(r,r+Rd),c=/\s*$/.exec(s)[0].length,u=/^\s*/.exec(a)[0].length,h=s.length-c;if(s.slice(h-e.length,h)==e&&a.slice(u,u+n.length)==n)return{open:{pos:i-c,margin:c&&1},close:{pos:r+u,margin:u&&1}};let d,m;r-i<=2*Rd?d=m=t.sliceDoc(i,r):(d=t.sliceDoc(i,i+Rd),m=t.sliceDoc(r-Rd,r));let g=/^\s*/.exec(d)[0].length,y=/\s*$/.exec(m)[0].length,v=m.length-y-n.length;return d.slice(g,g+e.length)==e&&m.slice(v,v+n.length)==n?{open:{pos:i+g+e.length,margin:/\s/.test(d.charAt(g+e.length))?1:0},close:{pos:r-y-n.length,margin:/\s/.test(m.charAt(v-1))?1:0}}:null}function Dte(t){let e=[];for(let n of t.selection.ranges){let i=t.doc.lineAt(n.from),r=n.to<=i.to?i:t.doc.lineAt(n.to);r.from>i.from&&r.from==n.to&&(r=n.to==i.to+1?i:t.doc.lineAt(n.to-1));let s=e.length-1;s>=0&&e[s].to>i.from?e[s].to=r.to:e.push({from:i.from+/^\s*/.exec(i.text)[0].length,to:r.to})}return e}function A5(t,e,n=e.selection.ranges){let i=n.map(s=>wT(e,s.from).block);if(!i.every(s=>s))return null;let r=n.map((s,a)=>$te(e,i[a],s.from,s.to));if(t!=2&&!r.every(s=>s))return{changes:e.changes(n.map((s,a)=>r[a]?[]:[{from:s.from,insert:i[a].open+" "},{from:s.to,insert:" "+i[a].close}]))};if(t!=1&&r.some(s=>s)){let s=[];for(let a=0,c;a<r.length;a++)if(c=r[a]){let u=i[a],{open:h,close:d}=c;s.push({from:h.pos-u.open.length,to:h.pos+h.margin},{from:d.pos-d.margin,to:d.pos+u.close.length})}return{changes:s}}return null}function Lte(t,e,n=e.selection.ranges){let i=[],r=-1;e:for(let{from:s,to:a}of n){let c=i.length,u=1e9,h;for(let d=s;d<=a;){let m=e.doc.lineAt(d);if(h==null&&(h=wT(e,m.from).line,!h))continue e;if(m.from>r&&(s==a||a>m.from)){r=m.from;let g=/^\s*/.exec(m.text)[0].length,y=g==m.length,v=m.text.slice(g,g+h.length)==h?g:-1;g<m.text.length&&g<u&&(u=g),i.push({line:m,comment:v,token:h,indent:g,empty:y,single:!1})}d=m.to+1}if(u<1e9)for(let d=c;d<i.length;d++)i[d].indent<i[d].line.text.length&&(i[d].indent=u);i.length==c+1&&(i[c].single=!0)}if(t!=2&&i.some(s=>s.comment<0&&(!s.empty||s.single))){let s=[];for(let{line:c,token:u,indent:h,empty:d,single:m}of i)(m||!d)&&s.push({from:c.from+h,insert:u+" "});let a=e.changes(s);return{changes:a,selection:e.selection.map(a,1)}}else if(t!=1&&i.some(s=>s.comment>=0)){let s=[];for(let{line:a,comment:c,token:u}of i)if(c>=0){let h=a.from+c,d=h+u.length;a.text[d-a.from]==" "&&d++,s.push({from:h,to:d})}return{changes:s}}return null}const fE=Ho.define(),Ite=Ho.define(),jte=De.define(),R5=De.define({combine(t){return Wo(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(i,r)=>e(i,r)||n(i,r)})}}),P5=Li.define({create(){return Lo.empty},update(t,e){let n=e.state.facet(R5),i=e.annotation(fE);if(i){let u=Er.fromTransaction(e,i.selection),h=i.side,d=h==0?t.undone:t.done;return u?d=Mb(d,d.length,n.minDepth,u):d=Q5(d,e.startState.selection),new Lo(h==0?i.rest:d,h==0?d:i.rest)}let r=e.annotation(Ite);if((r=="full"||r=="before")&&(t=t.isolate()),e.annotation(Hn.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let s=Er.fromTransaction(e),a=e.annotation(Hn.time),c=e.annotation(Hn.userEvent);return s?t=t.addChanges(s,a,c,n,e):e.selection&&(t=t.addSelection(e.startState.selection,a,c,n.newGroupDelay)),(r=="full"||r=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new Lo(t.done.map(Er.fromJSON),t.undone.map(Er.fromJSON))}});function Bte(t={}){return[P5,R5.of(t),Ae.domEventHandlers({beforeinput(e,n){let i=e.inputType=="historyUndo"?M5:e.inputType=="historyRedo"?hE:null;return i?(e.preventDefault(),i(n)):!1}})]}function _y(t,e){return function({state:n,dispatch:i}){if(!e&&n.readOnly)return!1;let r=n.field(P5,!1);if(!r)return!1;let s=r.pop(t,n,e);return s?(i(s),!0):!1}}const M5=_y(0,!1),hE=_y(1,!1),zte=_y(0,!0),Xte=_y(1,!0);class Er{constructor(e,n,i,r,s){this.changes=e,this.effects=n,this.mapped=i,this.startSelection=r,this.selectionsAfter=s}setSelAfter(e){return new Er(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,i;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(i=this.startSelection)===null||i===void 0?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(r=>r.toJSON())}}static fromJSON(e){return new Er(e.changes&&si.fromJSON(e.changes),[],e.mapped&&Uo.fromJSON(e.mapped),e.startSelection&&ce.fromJSON(e.startSelection),e.selectionsAfter.map(ce.fromJSON))}static fromTransaction(e,n){let i=bs;for(let r of e.startState.facet(jte)){let s=r(e);s.length&&(i=i.concat(s))}return!i.length&&e.changes.empty?null:new Er(e.changes.invert(e.startState.doc),i,void 0,n||e.startState.selection,bs)}static selection(e){return new Er(void 0,bs,void 0,void 0,e)}}function Mb(t,e,n,i){let r=e+1>n+20?e-n-1:0,s=t.slice(r,e);return s.push(i),s}function Ute(t,e){let n=[],i=!1;return t.iterChangedRanges((r,s)=>n.push(r,s)),e.iterChangedRanges((r,s,a,c)=>{for(let u=0;u<n.length;){let h=n[u++],d=n[u++];c>=h&&a<=d&&(i=!0)}}),i}function Zte(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,i)=>n.empty!=e.ranges[i].empty).length===0}function N5(t,e){return t.length?e.length?t.concat(e):t:e}const bs=[],Vte=200;function Q5(t,e){if(t.length){let n=t[t.length-1],i=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-Vte));return i.length&&i[i.length-1].eq(e)?t:(i.push(e),Mb(t,t.length-1,1e9,n.setSelAfter(i)))}else return[Er.selection([e])]}function qte(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function rx(t,e){if(!t.length)return t;let n=t.length,i=bs;for(;n;){let r=Yte(t[n-1],e,i);if(r.changes&&!r.changes.empty||r.effects.length){let s=t.slice(0,n);return s[n-1]=r,s}else e=r.mapped,n--,i=r.selectionsAfter}return i.length?[Er.selection(i)]:bs}function Yte(t,e,n){let i=N5(t.selectionsAfter.length?t.selectionsAfter.map(c=>c.map(e)):bs,n);if(!t.changes)return Er.selection(i);let r=t.changes.map(e),s=e.mapDesc(t.changes,!0),a=t.mapped?t.mapped.composeDesc(s):s;return new Er(r,ut.mapEffects(t.effects,e),a,t.startSelection.map(s),i)}const Gte=/^(input\.type|delete)($|\.)/;class Lo{constructor(e,n,i=0,r=void 0){this.done=e,this.undone=n,this.prevTime=i,this.prevUserEvent=r}isolate(){return this.prevTime?new Lo(this.done,this.undone):this}addChanges(e,n,i,r,s){let a=this.done,c=a[a.length-1];return c&&c.changes&&!c.changes.empty&&e.changes&&(!i||Gte.test(i))&&(!c.selectionsAfter.length&&n-this.prevTime<r.newGroupDelay&&r.joinToEvent(s,Ute(c.changes,e.changes))||i=="input.type.compose")?a=Mb(a,a.length-1,r.minDepth,new Er(e.changes.compose(c.changes),N5(ut.mapEffects(e.effects,c.changes),c.effects),c.mapped,c.startSelection,bs)):a=Mb(a,a.length,r.minDepth,e),new Lo(a,bs,n,i)}addSelection(e,n,i,r){let s=this.done.length?this.done[this.done.length-1].selectionsAfter:bs;return s.length>0&&n-this.prevTime<r&&i==this.prevUserEvent&&i&&/^select($|\.)/.test(i)&&Zte(s[s.length-1],e)?this:new Lo(Q5(this.done,e),this.undone,n,i)}addMapping(e){return new Lo(rx(this.done,e),rx(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,n,i){let r=e==0?this.done:this.undone;if(r.length==0)return null;let s=r[r.length-1],a=s.selectionsAfter[0]||(s.startSelection?s.startSelection.map(s.changes.invertedDesc,1):n.selection);if(i&&s.selectionsAfter.length)return n.update({selection:s.selectionsAfter[s.selectionsAfter.length-1],annotations:fE.of({side:e,rest:qte(r),selection:a}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(s.changes){let c=r.length==1?bs:r.slice(0,r.length-1);return s.mapped&&(c=rx(c,s.mapped)),n.update({changes:s.changes,selection:s.startSelection,effects:s.effects,annotations:fE.of({side:e,rest:c,selection:a}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}Lo.empty=new Lo(bs,bs);const Fte=[{key:"Mod-z",run:M5,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:hE,preventDefault:!0},{linux:"Ctrl-Shift-z",run:hE,preventDefault:!0},{key:"Mod-u",run:zte,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:Xte,preventDefault:!0}];function Ch(t,e){return ce.create(t.ranges.map(e),t.mainIndex)}function Ws(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function Ks({state:t,dispatch:e},n){let i=Ch(t.selection,n);return i.eq(t.selection,!0)?!1:(e(Ws(t,i)),!0)}function Ty(t,e){return ce.cursor(e?t.to:t.from)}function $5(t,e){return Ks(t,n=>n.empty?t.moveByChar(n,e):Ty(n,e))}function Vi(t){return t.textDirectionAt(t.state.selection.main.head)==ln.LTR}const D5=t=>$5(t,!Vi(t)),L5=t=>$5(t,Vi(t));function I5(t,e){return Ks(t,n=>n.empty?t.moveByGroup(n,e):Ty(n,e))}const Hte=t=>I5(t,!Vi(t)),Wte=t=>I5(t,Vi(t));function Kte(t,e,n){if(e.type.prop(n))return!0;let i=e.to-e.from;return i&&(i>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function ky(t,e,n){let i=rn(t).resolveInner(e.head),r=n?lt.closedBy:lt.openedBy;for(let u=e.head;;){let h=n?i.childAfter(u):i.childBefore(u);if(!h)break;Kte(t,h,r)?i=h:u=n?h.to:h.from}let s=i.type.prop(r),a,c;return s&&(a=n?Do(t,i.from,1):Do(t,i.to,-1))&&a.matched?c=n?a.end.to:a.end.from:c=n?i.to:i.from,ce.cursor(c,n?-1:1)}const Jte=t=>Ks(t,e=>ky(t.state,e,!Vi(t))),ene=t=>Ks(t,e=>ky(t.state,e,Vi(t)));function j5(t,e){return Ks(t,n=>{if(!n.empty)return Ty(n,e);let i=t.moveVertically(n,e);return i.head!=n.head?i:t.moveToLineBoundary(n,e)})}const B5=t=>j5(t,!1),z5=t=>j5(t,!0);function X5(t){let e=t.scrollDOM.clientHeight<t.scrollDOM.scrollHeight-2,n=0,i=0,r;if(e){for(let s of t.state.facet(Ae.scrollMargins)){let a=s(t);a!=null&&a.top&&(n=Math.max(a==null?void 0:a.top,n)),a!=null&&a.bottom&&(i=Math.max(a==null?void 0:a.bottom,i))}r=t.scrollDOM.clientHeight-n-i}else r=(t.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:i,selfScroll:e,height:Math.max(t.defaultLineHeight,r-5)}}function U5(t,e){let n=X5(t),{state:i}=t,r=Ch(i.selection,a=>a.empty?t.moveVertically(a,e,n.height):Ty(a,e));if(r.eq(i.selection))return!1;let s;if(n.selfScroll){let a=t.coordsAtPos(i.selection.main.head),c=t.scrollDOM.getBoundingClientRect(),u=c.top+n.marginTop,h=c.bottom-n.marginBottom;a&&a.top>u&&a.bottom<h&&(s=Ae.scrollIntoView(r.main.head,{y:"start",yMargin:a.top-u}))}return t.dispatch(Ws(i,r),{effects:s}),!0}const a$=t=>U5(t,!1),dE=t=>U5(t,!0);function Hl(t,e,n){let i=t.lineBlockAt(e.head),r=t.moveToLineBoundary(e,n);if(r.head==e.head&&r.head!=(n?i.to:i.from)&&(r=t.moveToLineBoundary(e,n,!1)),!n&&r.head==i.from&&i.length){let s=/^\s*/.exec(t.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;s&&e.head!=i.from+s&&(r=ce.cursor(i.from+s))}return r}const tne=t=>Ks(t,e=>Hl(t,e,!0)),nne=t=>Ks(t,e=>Hl(t,e,!1)),ine=t=>Ks(t,e=>Hl(t,e,!Vi(t))),rne=t=>Ks(t,e=>Hl(t,e,Vi(t))),sne=t=>Ks(t,e=>t.moveToLineBoundary(e,!1,!1)),one=t=>Ks(t,e=>t.moveToLineBoundary(e,!0,!1));function ane(t,e,n){let i=!1,r=Ch(t.selection,s=>{let a=Do(t,s.head,-1)||Do(t,s.head,1)||s.head>0&&Do(t,s.head-1,1)||s.head<t.doc.length&&Do(t,s.head+1,-1);if(!a||!a.end)return s;i=!0;let c=a.start.from==s.head?a.end.to:a.end.from;return ce.cursor(c)});return i?(e(Ws(t,r)),!0):!1}const lne=({state:t,dispatch:e})=>ane(t,e);function _s(t,e,n){let i=Ch(t.state.selection,r=>{r.undirectional&&r.head>=r.anchor!=e&&(r=ce.range(r.head,r.anchor));let s=n(r);return ce.range(r.anchor,s.head,s.goalColumn,s.bidiLevel||void 0,s.assoc)});return i.eq(t.state.selection)?!1:(t.dispatch(Ws(t.state,i)),!0)}function Z5(t,e){return _s(t,e,n=>t.moveByChar(n,e))}const V5=t=>Z5(t,!Vi(t)),q5=t=>Z5(t,Vi(t));function Y5(t,e){return _s(t,e,n=>t.moveByGroup(n,e))}const cne=t=>Y5(t,!Vi(t)),une=t=>Y5(t,Vi(t)),fne=t=>{let e=!Vi(t);return _s(t,e,n=>ky(t.state,n,e))},hne=t=>{let e=Vi(t);return _s(t,e,n=>ky(t.state,n,e))};function G5(t,e){return _s(t,e,n=>t.moveVertically(n,e))}const F5=t=>G5(t,!1),H5=t=>G5(t,!0);function W5(t,e){return _s(t,e,n=>t.moveVertically(n,e,X5(t).height))}const l$=t=>W5(t,!1),c$=t=>W5(t,!0),dne=t=>_s(t,!0,e=>Hl(t,e,!0)),pne=t=>_s(t,!1,e=>Hl(t,e,!1)),mne=t=>{let e=!Vi(t);return _s(t,e,n=>Hl(t,n,e))},gne=t=>{let e=Vi(t);return _s(t,e,n=>Hl(t,n,e))},One=t=>_s(t,!1,e=>ce.cursor(t.lineBlockAt(e.head).from)),bne=t=>_s(t,!0,e=>ce.cursor(t.lineBlockAt(e.head).to)),u$=({state:t,dispatch:e})=>(e(Ws(t,{anchor:0})),!0),f$=({state:t,dispatch:e})=>(e(Ws(t,{anchor:t.doc.length})),!0),h$=({state:t,dispatch:e})=>(e(Ws(t,{anchor:t.selection.main.anchor,head:0})),!0),d$=({state:t,dispatch:e})=>(e(Ws(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),yne=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),vne=({state:t,dispatch:e})=>{let n=Cy(t).map(({from:i,to:r})=>ce.undirectionalRange(i,Math.min(r+1,t.doc.length)));return e(t.update({selection:ce.create(n),userEvent:"select"})),!0},Sne=({state:t,dispatch:e})=>{let n=Ch(t.selection,i=>{let r=rn(t),s=r.resolveStack(i.from,1);if(i.empty){let a=r.resolveStack(i.from,-1);a.node.from>=s.node.from&&a.node.to<=s.node.to&&(s=a)}for(let a=s;a;a=a.next){let{node:c}=a;if((c.from<i.from&&c.to>=i.to||c.to>i.to&&c.from<=i.from)&&a.next)return ce.undirectionalRange(c.from,c.to)}return i});return n.eq(t.selection)?!1:(e(Ws(t,n)),!0)};function K5(t,e){let{state:n}=t,i=n.selection,r=n.selection.ranges.slice();for(let s of n.selection.ranges){let a=n.doc.lineAt(s.head);if(e?a.to<t.state.doc.length:a.from>0)for(let c=s;;){let u=t.moveVertically(c,e);if(u.head<a.from||u.head>a.to){r.some(h=>h.head==u.head)||r.push(u);break}else{if(u.head==c.head)break;c=u}}}return r.length==i.ranges.length?!1:(t.dispatch(Ws(n,ce.create(r,r.length-1))),!0)}const xne=t=>K5(t,!1),wne=t=>K5(t,!0),Ene=({state:t,dispatch:e})=>{let n=t.selection,i=null;return n.ranges.length>1?i=ce.create([n.main]):n.main.empty||(i=ce.create([ce.cursor(n.main.head)])),i?(e(Ws(t,i)),!0):!1};function sm(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:i}=t,r=i.changeByRange(s=>{let{from:a,to:c}=s;if(a==c){let u=e(s);u<a?(n="delete.backward",u=lO(t,u,!1)):u>a&&(n="delete.forward",u=lO(t,u,!0)),a=Math.min(a,u),c=Math.max(c,u)}else a=lO(t,a,!1),c=lO(t,c,!0);return a==c?{range:s}:{changes:{from:a,to:c},range:ce.cursor(a,a<s.head?-1:1)}});return r.changes.empty?!1:(t.dispatch(i.update(r,{scrollIntoView:!0,userEvent:n,effects:n=="delete.selection"?Ae.announce.of(i.phrase("Selection deleted")):void 0})),!0)}function lO(t,e,n){if(t instanceof Ae)for(let i of t.state.facet(Ae.atomicRanges).map(r=>r(t)))i.between(e,e,(r,s)=>{r<e&&s>e&&(e=n?s:r)});return e}const J5=(t,e,n)=>sm(t,i=>{let r=i.from,{state:s}=t,a=s.doc.lineAt(r),c,u;if(n&&!e&&r>a.from&&r<a.from+200&&!/[^ \t]/.test(c=a.text.slice(0,r-a.from))){if(c[c.length-1]==" ")return r-1;let h=Gs(c,s.tabSize),d=h%iu(s)||iu(s);for(let m=0;m<d&&c[c.length-1-m]==" ";m++)r--;u=r}else u=gi(a.text,r-a.from,e,e)+a.from,u==r&&a.number!=(e?s.doc.lines:1)?u+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(a.text.slice(u-a.from,r-a.from))&&(u=gi(a.text,u-a.from,!1,!1)+a.from);return u}),pE=t=>J5(t,!1,!0),eX=t=>J5(t,!0,!1),tX=(t,e)=>sm(t,n=>{let i=n.head,{state:r}=t,s=r.doc.lineAt(i),a=r.charCategorizer(i);for(let c=null;;){if(i==(e?s.to:s.from)){i==n.head&&s.number!=(e?r.doc.lines:1)&&(i+=e?1:-1);break}let u=gi(s.text,i-s.from,e)+s.from,h=s.text.slice(Math.min(i,u)-s.from,Math.max(i,u)-s.from),d=a(h);if(c!=null&&d!=c)break;(h!=" "||i!=n.head)&&(c=d),i=u}return i}),nX=t=>tX(t,!1),_ne=t=>tX(t,!0),Tne=t=>sm(t,e=>{let n=t.lineBlockAt(e.head).to;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),kne=t=>sm(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),Cne=t=>sm(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),Ane=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(i=>({changes:{from:i.from,to:i.to,insert:Nt.of(["",""])},range:ce.cursor(i.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},Rne=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(i=>{if(!i.empty||i.from==0||i.from==t.doc.length)return{range:i};let r=i.from,s=t.doc.lineAt(r),a=r==s.from?r-1:gi(s.text,r-s.from,!1)+s.from,c=r==s.to?r+1:gi(s.text,r-s.from,!0)+s.from;return{changes:{from:a,to:c,insert:t.doc.slice(r,c).append(t.doc.slice(a,r))},range:ce.cursor(c)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function Cy(t){let e=[],n=-1;for(let i of t.selection.ranges){let r=t.doc.lineAt(i.from),s=t.doc.lineAt(i.to);if(!i.empty&&i.to==s.from&&(s=t.doc.lineAt(i.to-1)),n>=r.number){let a=e[e.length-1];a.to=s.to,a.ranges.push(i)}else e.push({from:r.from,to:s.to,ranges:[i]});n=s.number+1}return e}function iX(t,e,n){if(t.readOnly)return!1;let i=[],r=[];for(let s of Cy(t)){if(n?s.to==t.doc.length:s.from==0)continue;let a=t.doc.lineAt(n?s.to+1:s.from-1),c=a.length+1;if(n){i.push({from:s.to,to:a.to},{from:s.from,insert:a.text+t.lineBreak});for(let u of s.ranges)r.push(ce.range(Math.min(t.doc.length,u.anchor+c),Math.min(t.doc.length,u.head+c)))}else{i.push({from:a.from,to:s.from},{from:s.to,insert:t.lineBreak+a.text});for(let u of s.ranges)r.push(ce.range(u.anchor-c,u.head-c))}}return i.length?(e(t.update({changes:i,scrollIntoView:!0,selection:ce.create(r,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const Pne=({state:t,dispatch:e})=>iX(t,e,!1),Mne=({state:t,dispatch:e})=>iX(t,e,!0);function rX(t,e,n){if(t.readOnly)return!1;let i=[];for(let s of Cy(t))n?i.push({from:s.from,insert:t.doc.slice(s.from,s.to)+t.lineBreak}):i.push({from:s.to,insert:t.lineBreak+t.doc.slice(s.from,s.to)});let r=t.changes(i);return e(t.update({changes:r,selection:t.selection.map(r,n?1:-1),scrollIntoView:!0,userEvent:"input.copyline"})),!0}const Nne=({state:t,dispatch:e})=>rX(t,e,!1),Qne=({state:t,dispatch:e})=>rX(t,e,!0),$ne=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(Cy(e).map(({from:r,to:s})=>(r>0?r--:s<e.doc.length&&s++,{from:r,to:s}))),i=Ch(e.selection,r=>{let s;if(t.lineWrapping){let a=t.lineBlockAt(r.head),c=t.coordsAtPos(r.head,r.assoc||1);c&&(s=a.bottom+t.documentTop-c.bottom+t.defaultLineHeight/2)}return t.moveVertically(r,!0,s)}).map(n);return t.dispatch({changes:n,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0};function Dne(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=rn(t).resolveInner(e),i=n.childBefore(e),r=n.childAfter(e),s;return i&&r&&i.to<=e&&r.from>=e&&(s=i.type.prop(lt.closedBy))&&s.indexOf(r.name)>-1&&t.doc.lineAt(i.to).from==t.doc.lineAt(r.from).from&&!/\S/.test(t.sliceDoc(i.to,r.from))?{from:i.to,to:r.from}:null}const p$=sX(!1),Lne=sX(!0);function sX(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let i=e.changeByRange(r=>{let{from:s,to:a}=r,c=e.doc.lineAt(s),u=!t&&s==a&&Dne(e,s);t&&(s=a=(a<=c.to?c:e.doc.lineAt(a)).to);let h=new wy(e,{simulateBreak:s,simulateDoubleBreak:!!u}),d=gT(h,s);for(d==null&&(d=Gs(/^\s*/.exec(e.doc.lineAt(s).text)[0],e.tabSize));a<c.to&&/\s/.test(c.text[a-c.from]);)a++;u?{from:s,to:a}=u:s>c.from&&s<c.from+100&&!/\S/.test(c.text.slice(0,s))&&(s=c.from);let m=["",Tp(e,d)];return u&&m.push(Tp(e,h.lineIndent(c.from,-1))),{changes:{from:s,to:a,insert:Nt.of(m)},range:ce.cursor(s+1+m[1].length)}});return n(e.update(i,{scrollIntoView:!0,userEvent:"input"})),!0}}function ET(t,e){let n=-1;return t.changeByRange(i=>{let r=[];for(let a=i.from;a<=i.to;){let c=t.doc.lineAt(a);c.number>n&&(i.empty||i.to>c.from)&&(e(c,r,i),n=c.number),a=c.to+1}let s=t.changes(r);return{changes:r,range:ce.range(s.mapPos(i.anchor,1),s.mapPos(i.head,1))}})}const Ine=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),i=new wy(t,{overrideIndentation:s=>{let a=n[s];return a??-1}}),r=ET(t,(s,a,c)=>{let u=gT(i,s.from);if(u==null)return;/\S/.test(s.text)||(u=0);let h=/^\s*/.exec(s.text)[0],d=Tp(t,u);(h!=d||c.from<s.from+h.length)&&(n[s.from]=u,a.push({from:s.from,to:s.from+h.length,insert:d}))});return r.changes.empty||e(t.update(r,{userEvent:"indent"})),!0},oX=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(ET(t,(n,i)=>{i.push({from:n.from,insert:t.facet(Eh)})}),{userEvent:"input.indent"})),!0),aX=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(ET(t,(n,i)=>{let r=/^\s*/.exec(n.text)[0];if(!r)return;let s=Gs(r,t.tabSize),a=0,c=Tp(t,Math.max(0,s-iu(t)));for(;a<r.length&&a<c.length&&r.charCodeAt(a)==c.charCodeAt(a);)a++;i.push({from:n.from+a,to:n.from+r.length,insert:c.slice(a)})}),{userEvent:"delete.dedent"})),!0),jne=t=>(t.setTabFocusMode(),!0),Bne=[{key:"Ctrl-b",run:D5,shift:V5,preventDefault:!0},{key:"Ctrl-f",run:L5,shift:q5},{key:"Ctrl-p",run:B5,shift:F5},{key:"Ctrl-n",run:z5,shift:H5},{key:"Ctrl-a",run:sne,shift:One},{key:"Ctrl-e",run:one,shift:bne},{key:"Ctrl-d",run:eX},{key:"Ctrl-h",run:pE},{key:"Ctrl-k",run:Tne},{key:"Ctrl-Alt-h",run:nX},{key:"Ctrl-o",run:Ane},{key:"Ctrl-t",run:Rne},{key:"Ctrl-v",run:dE}],zne=[{key:"ArrowLeft",run:D5,shift:V5,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:Hte,shift:cne,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:ine,shift:mne,preventDefault:!0},{key:"ArrowRight",run:L5,shift:q5,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:Wte,shift:une,preventDefault:!0},{mac:"Cmd-ArrowRight",run:rne,shift:gne,preventDefault:!0},{key:"ArrowUp",run:B5,shift:F5,preventDefault:!0},{mac:"Cmd-ArrowUp",run:u$,shift:h$},{mac:"Ctrl-ArrowUp",run:a$,shift:l$},{key:"ArrowDown",run:z5,shift:H5,preventDefault:!0},{mac:"Cmd-ArrowDown",run:f$,shift:d$},{mac:"Ctrl-ArrowDown",run:dE,shift:c$},{key:"PageUp",run:a$,shift:l$},{key:"PageDown",run:dE,shift:c$},{key:"Home",run:nne,shift:pne,preventDefault:!0},{key:"Mod-Home",run:u$,shift:h$},{key:"End",run:tne,shift:dne,preventDefault:!0},{key:"Mod-End",run:f$,shift:d$},{key:"Enter",run:p$,shift:p$},{key:"Mod-a",run:yne},{key:"Backspace",run:pE,shift:pE,preventDefault:!0},{key:"Delete",run:eX,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:nX,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:_ne,preventDefault:!0},{mac:"Mod-Backspace",run:kne,preventDefault:!0},{mac:"Mod-Delete",run:Cne,preventDefault:!0}].concat(Bne.map(t=>({mac:t.key,run:t.run,shift:t.shift}))),Xne=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:Jte,shift:fne},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:ene,shift:hne},{key:"Alt-ArrowUp",run:Pne},{key:"Shift-Alt-ArrowUp",run:Nne},{key:"Alt-ArrowDown",run:Mne},{key:"Shift-Alt-ArrowDown",run:Qne},{key:"Mod-Alt-ArrowUp",run:xne},{key:"Mod-Alt-ArrowDown",run:wne},{key:"Escape",run:Ene},{key:"Mod-Enter",run:Lne},{key:"Alt-l",mac:"Ctrl-l",run:vne},{key:"Mod-i",run:Sne,preventDefault:!0},{key:"Mod-[",run:aX},{key:"Mod-]",run:oX},{key:"Mod-Alt-\\",run:Ine},{key:"Shift-Mod-k",run:$ne},{key:"Shift-Mod-\\",run:lne},{key:"Mod-/",run:Pte},{key:"Alt-A",mac:"Ctrl-A",run:Nte},{key:"Ctrl-m",mac:"Shift-Alt-m",run:jne}].concat(zne),Une={key:"Tab",run:oX,shift:aX},m$=typeof String.prototype.normalize=="function"?t=>t.normalize("NFKD"):t=>t;class ch{constructor(e,n,i=0,r=e.length,s,a){this.test=a,this.value={from:0,to:0,precise:!1},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(i,r),this.bufferStart=i,this.normalize=s?c=>s(m$(c)):m$,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return vr(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let n=G_(e),i=this.bufferStart+this.bufferPos;this.bufferPos+=Po(e);let r=this.normalize(n);if(r.length)for(let s=0,a=i,c=!0;;s++){let u=r.charCodeAt(s),h=this.match(u,a,c,this.bufferPos+this.bufferStart,s==r.length-1);if(h)return this.value=h,this;if(s==r.length-1)break;c&&s<n.length&&n.charCodeAt(s)==u?a++:c=!1}}}match(e,n,i,r,s){let a=null;for(let c=0;c<this.matches.length;){let u=this.matches[c],h=!1;this.query.charCodeAt(u.index)==e&&(u.index==this.query.length-1?a={from:u.from,to:r,precise:s&&u.precise}:(u.index++,h=!0)),h?c++:this.matches.splice(c,1)}return this.query.charCodeAt(0)==e&&(this.query.length==1?a={from:n,to:r,precise:i&&s}:this.matches.push({from:n,index:1,precise:i})),a&&this.test&&!this.test(a.from,a.to,this.buffer,this.bufferStart)&&(a=null),a}}typeof Symbol<"u"&&(ch.prototype[Symbol.iterator]=function(){return this});const lX={from:-1,to:-1,match:/.*/.exec(""),precise:!0},_T="gm"+(/x/.unicode==null?"":"u");class cX{constructor(e,n,i,r=0,s=e.length){if(this.text=e,this.to=s,this.curLine="",this.done=!1,this.value=lX,/\\[sWDnr]|\n|\r|\[\^/.test(n))return new uX(e,n,i,r,s);this.re=new RegExp(n,_T+(i!=null&&i.ignoreCase?"i":"")),this.test=i==null?void 0:i.test,this.iter=e.iter();let a=e.lineAt(r);this.curLineStart=a.from,this.matchPos=Nb(e,r),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let i=this.curLineStart+n.index,r=i+n[0].length;if(this.matchPos=Nb(this.text,r+(i==r?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(i<r||i>this.value.to)&&(!this.test||this.test(i,r,n)))return this.value={from:i,to:r,precise:!0,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}}const sx=new WeakMap;class Rf{constructor(e,n){this.from=e,this.text=n}get to(){return this.from+this.text.length}static get(e,n,i){let r=sx.get(e);if(!r||r.from>=i||r.to<=n){let c=new Rf(n,e.sliceString(n,i));return sx.set(e,c),c}if(r.from==n&&r.to==i)return r;let{text:s,from:a}=r;return a>n&&(s=e.sliceString(n,a)+s,a=n),r.to<i&&(s+=e.sliceString(r.to,i)),sx.set(e,new Rf(a,s)),new Rf(n,s.slice(n-a,i-a))}}class uX{constructor(e,n,i,r,s){this.text=e,this.to=s,this.done=!1,this.value=lX,this.matchPos=Nb(e,r),this.re=new RegExp(n,_T+(i!=null&&i.ignoreCase?"i":"")),this.test=i==null?void 0:i.test,this.flat=Rf.get(e,r,this.chunkEnd(r+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let i=this.flat.from+n.index,r=i+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,r,n)))return this.value={from:i,to:r,precise:!0,match:n},this.matchPos=Nb(this.text,r+(i==r?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Rf.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(cX.prototype[Symbol.iterator]=uX.prototype[Symbol.iterator]=function(){return this});function Zne(t){try{return new RegExp(t,_T),!0}catch{return!1}}function Nb(t,e){if(e>=t.length)return e;let n=t.lineAt(e),i;for(;e<n.to&&(i=n.text.charCodeAt(e-n.from))>=56320&&i<57344;)e++;return e}const Vne=t=>{let e=ree(t,"cm-goto-line");if(e){let a=e.dom.querySelector("input[type=text]");return a&&a.select(),!0}let{state:n}=t,i=String(n.doc.lineAt(t.state.selection.main.head).number),{close:r,result:s}=iee(t,{class:"cm-goto-line",label:n.phrase("Go to line"),input:{type:"text",name:"line",value:i},focus:!0,submitLabel:n.phrase("go")});return s.then(a=>{let c=a&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(a.elements.line.value);if(!c){t.dispatch({effects:r});return}let u=n.doc.lineAt(n.selection.main.head),[,h,d,m,g]=c,y=m?+m.slice(1):0,v=d?+d:u.number;if(d&&g){let w=v/100;h&&(w=w*(h=="-"?-1:1)+u.number/n.doc.lines),v=Math.round(n.doc.lines*w)}else d&&h&&(v=v*(h=="-"?-1:1)+u.number);let S=n.doc.line(Math.max(1,Math.min(n.doc.lines,v))),x=ce.cursor(S.from+Math.max(0,Math.min(y,S.length)));t.dispatch({effects:[r,Ae.scrollIntoView(x.from,{y:"center"})],selection:x})}),!0},qne={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},Yne=De.define({combine(t){return Wo(t,qne,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function Gne(t){return[Jne,Kne]}const Fne=et.mark({class:"cm-selectionMatch"}),Hne=et.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function g$(t,e,n,i){return(n==0||t(e.sliceDoc(n-1,n))!=bn.Word)&&(i==e.doc.length||t(e.sliceDoc(i,i+1))!=bn.Word)}function Wne(t,e,n,i){return t(e.sliceDoc(n,n+1))==bn.Word&&t(e.sliceDoc(i-1,i))==bn.Word}const Kne=Mn.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(Yne),{state:n}=t,i=n.selection;if(i.ranges.length>1)return et.none;let r=i.main,s,a=null;if(r.empty){if(!e.highlightWordAroundCursor)return et.none;let u=n.wordAt(r.head);if(!u)return et.none;a=n.charCategorizer(r.head),s=n.sliceDoc(u.from,u.to)}else{let u=r.to-r.from;if(u<e.minSelectionLength||u>200)return et.none;if(e.wholeWords){if(s=n.sliceDoc(r.from,r.to),a=n.charCategorizer(r.head),!(g$(a,n,r.from,r.to)&&Wne(a,n,r.from,r.to)))return et.none}else if(s=n.sliceDoc(r.from,r.to),!s)return et.none}let c=[];for(let u of t.visibleRanges){let h=new ch(n.doc,s,u.from,u.to);for(;!h.next().done;){let{from:d,to:m}=h.value;if((!a||g$(a,n,d,m))&&(r.empty&&d<=r.from&&m>=r.to?c.push(Hne.range(d,m)):(d>=r.to||m<=r.from)&&c.push(Fne.range(d,m)),c.length>e.maxMatches))return et.none}}return et.set(c)}},{decorations:t=>t.decorations}),Jne=Ae.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),eie=({state:t,dispatch:e})=>{let{selection:n}=t,i=ce.create(n.ranges.map(r=>t.wordAt(r.head)||ce.cursor(r.head)),n.mainIndex);return i.eq(n)?!1:(e(t.update({selection:i})),!0)};function tie(t,e){let{main:n,ranges:i}=t.selection,r=t.wordAt(n.head),s=r&&r.from==n.from&&r.to==n.to;for(let a=!1,c=new ch(t.doc,e,i[i.length-1].to);;)if(c.next(),c.done){if(a)return null;c=new ch(t.doc,e,0,Math.max(0,i[i.length-1].from-1)),a=!0}else{if(a&&i.some(u=>u.from==c.value.from))continue;if(s){let u=t.wordAt(c.value.from);if(!u||u.from!=c.value.from||u.to!=c.value.to)continue}return c.value}}const nie=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(s=>s.from===s.to))return eie({state:t,dispatch:e});let i=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(s=>t.sliceDoc(s.from,s.to)!=i))return!1;let r=tie(t,i);return r?(e(t.update({selection:t.selection.addRange(ce.range(r.from,r.to),!1),effects:Ae.scrollIntoView(r.to)})),!0):!1},Ah=De.define({combine(t){return Wo(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new gie(e),scrollToMatch:e=>Ae.scrollIntoView(e)})}});class fX{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||Zne(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord,this.test=e.test}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,i)=>i=="n"?`
72
+ `:i=="r"?"\r":i=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new lie(this):new sie(this)}getCursor(e,n=0,i){let r=e.doc?e:Ct.create({doc:e});return i==null&&(i=r.doc.length),this.regexp?mf(this,r,n,i):pf(this,r,n,i)}}class hX{constructor(e){this.spec=e}}function iie(t,e,n){return(i,r,s,a)=>{if(n&&!n(i,r,s,a))return!1;let c=i>=a&&r<=a+s.length?s.slice(i-a,r-a):e.doc.sliceString(i,r);return t(c,e,i,r)}}function pf(t,e,n,i){let r;return t.wholeWord&&(r=rie(e.doc,e.charCategorizer(e.selection.main.head))),t.test&&(r=iie(t.test,e,r)),new ch(e.doc,t.unquoted,n,i,t.caseSensitive?void 0:s=>s.toLowerCase(),r)}function rie(t,e){return(n,i,r,s)=>((s>n||s+r.length<i)&&(s=Math.max(0,n-2),r=t.sliceString(s,Math.min(t.length,i+2))),(e(Qb(r,n-s))!=bn.Word||e($b(r,n-s))!=bn.Word)&&(e($b(r,i-s))!=bn.Word||e(Qb(r,i-s))!=bn.Word))}class sie extends hX{constructor(e){super(e)}nextMatch(e,n,i){let r=pf(this.spec,e,i,e.doc.length).nextOverlapping();if(r.done){let s=Math.min(e.doc.length,n+this.spec.unquoted.length);r=pf(this.spec,e,0,s).nextOverlapping()}return r.done||r.value.from==n&&r.value.to==i?null:r.value}prevMatchInRange(e,n,i){for(let r=i;;){let s=Math.max(n,r-1e4-this.spec.unquoted.length),a=pf(this.spec,e,s,r),c=null;for(;!a.nextOverlapping().done;)c=a.value;if(c)return c;if(s==n)return null;r-=1e4}}prevMatch(e,n,i){let r=this.prevMatchInRange(e,0,n);return r||(r=this.prevMatchInRange(e,Math.max(0,i-this.spec.unquoted.length),e.doc.length)),r&&(r.from!=n||r.to!=i)?r:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,n){let i=pf(this.spec,e,0,e.doc.length),r=[];for(;!i.next().done;){if(r.length>=n)return null;r.push(i.value)}return r}highlight(e,n,i,r){let s=pf(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!s.next().done;)r(s.value.from,s.value.to)}}function oie(t,e,n){return(i,r,s)=>(!n||n(i,r,s))&&t(s[0],e,i,r)}function mf(t,e,n,i){let r;return t.wholeWord&&(r=aie(e.charCategorizer(e.selection.main.head))),t.test&&(r=oie(t.test,e,r)),new cX(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:r},n,i)}function Qb(t,e){return t.slice(gi(t,e,!1),e)}function $b(t,e){return t.slice(e,gi(t,e))}function aie(t){return(e,n,i)=>!i[0].length||(t(Qb(i.input,i.index))!=bn.Word||t($b(i.input,i.index))!=bn.Word)&&(t($b(i.input,i.index+i[0].length))!=bn.Word||t(Qb(i.input,i.index+i[0].length))!=bn.Word)}class lie extends hX{nextMatch(e,n,i){let r=mf(this.spec,e,i,e.doc.length).next();return r.done&&(r=mf(this.spec,e,0,n).next()),r.done?null:r.value}prevMatchInRange(e,n,i){for(let r=1;;r++){let s=Math.max(n,i-r*1e4),a=mf(this.spec,e,s,i),c=null;for(;!a.next().done;)c=a.value;if(c&&(s==n||c.from>s+10))return c;if(s==n)return null}}prevMatch(e,n,i){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(n,i)=>{if(i=="&")return e.match[0];if(i=="$")return"$";for(let r=i.length;r>0;r--){let s=+i.slice(0,r);if(s>0&&s<e.match.length)return e.match[s]+i.slice(r)}return n})}matchAll(e,n){let i=mf(this.spec,e,0,e.doc.length),r=[];for(;!i.next().done;){if(r.length>=n)return null;r.push(i.value)}return r}highlight(e,n,i,r){let s=mf(this.spec,e,Math.max(0,n-250),Math.min(i+250,e.doc.length));for(;!s.next().done;)r(s.value.from,s.value.to)}}const Cp=ut.define(),TT=ut.define(),$l=Li.define({create(t){return new ox(mE(t).create(),null)},update(t,e){for(let n of e.effects)n.is(Cp)?t=new ox(n.value.create(),t.panel):n.is(TT)&&(t=new ox(t.query,n.value?kT:null));return t},provide:t=>wp.from(t,e=>e.panel)});class ox{constructor(e,n){this.query=e,this.panel=n}}const cie=et.mark({class:"cm-searchMatch"}),uie=et.mark({class:"cm-searchMatch cm-searchMatch-selected"}),fie=Mn.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field($l))}update(t){let e=t.state.field($l);(e!=t.startState.field($l)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return et.none;let{view:n}=this,i=new Zo;for(let r=0,s=n.visibleRanges,a=s.length;r<a;r++){let{from:c,to:u}=s[r];for(;r<a-1&&u>s[r+1].from-500;)u=s[++r].to;t.highlight(n.state,c,u,(h,d)=>{let m=n.state.selection.ranges.some(g=>g.from==h&&g.to==d);i.add(h,d,m?uie:cie)})}return i.finish()}},{decorations:t=>t.decorations});function om(t){return e=>{let n=e.state.field($l,!1);return n&&n.query.spec.valid?t(e,n):mX(e)}}const Db=om((t,{query:e})=>{let{to:n}=t.state.selection.main,i=e.nextMatch(t.state,n,n);if(!i)return!1;let r=ce.single(i.from,i.to),s=t.state.facet(Ah);return t.dispatch({selection:r,effects:[CT(t,i),s.scrollToMatch(r.main,t)],userEvent:"select.search"}),pX(t),!0}),Lb=om((t,{query:e})=>{let{state:n}=t,{from:i}=n.selection.main,r=e.prevMatch(n,i,i);if(!r)return!1;let s=ce.single(r.from,r.to),a=t.state.facet(Ah);return t.dispatch({selection:s,effects:[CT(t,r),a.scrollToMatch(s.main,t)],userEvent:"select.search"}),pX(t),!0}),hie=om((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:ce.create(n.map(i=>ce.range(i.from,i.to))),userEvent:"select.search.matches"}),!0)}),die=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:i,to:r}=n.main,s=[],a=0;for(let c=new ch(t.doc,t.sliceDoc(i,r));!c.next().done;){if(s.length>1e3)return!1;c.value.from==i&&(a=s.length),s.push(ce.range(c.value.from,c.value.to))}return e(t.update({selection:ce.create(s,a),userEvent:"select.search.matches"})),!0},O$=om((t,{query:e})=>{let{state:n}=t,{from:i,to:r}=n.selection.main;if(n.readOnly)return!1;let s=e.nextMatch(n,i,i);if(!s)return!1;let a=s,c=[],u,h,d=[];a.precise?a.from==i&&a.to==r&&(h=n.toText(e.getReplacement(a)),c.push({from:a.from,to:a.to,insert:h}),a=e.nextMatch(n,a.from,a.to),d.push(Ae.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(i).number)+"."))):a=e.nextMatch(n,a.from,a.to);let m=t.state.changes(c);return a&&(u=ce.single(a.from,a.to).map(m),d.push(CT(t,a)),d.push(n.facet(Ah).scrollToMatch(u.main,t))),t.dispatch({changes:m,selection:u,effects:d,userEvent:"input.replace"}),!0}),pie=om((t,{query:e})=>{if(t.state.readOnly)return!1;let n=[];for(let r of e.matchAll(t.state,1e9)){let{from:s,to:a,precise:c}=r;c&&n.push({from:s,to:a,insert:e.getReplacement(r)})}if(!n.length)return!1;let i=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:Ae.announce.of(i),userEvent:"input.replace.all"}),!0});function kT(t){return t.state.facet(Ah).createPanel(t)}function mE(t,e){var n,i,r,s,a;let c=t.selection.main,u=c.empty||c.to>c.from+100?"":t.sliceDoc(c.from,c.to);if(e&&!u)return e;let h=t.facet(Ah);return new fX({search:((n=e==null?void 0:e.literal)!==null&&n!==void 0?n:h.literal)?u:u.replace(/\n/g,"\\n"),caseSensitive:(i=e==null?void 0:e.caseSensitive)!==null&&i!==void 0?i:h.caseSensitive,literal:(r=e==null?void 0:e.literal)!==null&&r!==void 0?r:h.literal,regexp:(s=e==null?void 0:e.regexp)!==null&&s!==void 0?s:h.regexp,wholeWord:(a=e==null?void 0:e.wholeWord)!==null&&a!==void 0?a:h.wholeWord})}function dX(t){let e=vy(t,kT);return e&&e.dom.querySelector("[main-field]")}function pX(t){let e=dX(t);e&&e==t.root.activeElement&&e.select()}const mX=t=>{let e=t.state.field($l,!1);if(e&&e.panel){let n=dX(t);if(n&&n!=t.root.activeElement){let i=mE(t.state,e.query.spec);i.valid&&t.dispatch({effects:Cp.of(i)}),n.focus(),n.select()}}else t.dispatch({effects:[TT.of(!0),e?Cp.of(mE(t.state,e.query.spec)):ut.appendConfig.of(bie)]});return!0},gX=t=>{let e=t.state.field($l,!1);if(!e||!e.panel)return!1;let n=vy(t,kT);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:TT.of(!1)}),!0},mie=[{key:"Mod-f",run:mX,scope:"editor search-panel"},{key:"F3",run:Db,shift:Lb,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:Db,shift:Lb,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:gX,scope:"editor search-panel"},{key:"Mod-Shift-l",run:die},{key:"Mod-Alt-g",run:Vne},{key:"Mod-d",run:nie,preventDefault:!0}];class gie{constructor(e){this.view=e;let n=this.query=e.state.field($l).query.spec;this.commit=this.commit.bind(this),this.searchField=en("input",{value:n.search,placeholder:Br(e,"Find"),"aria-label":Br(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=en("input",{value:n.replace,placeholder:Br(e,"Replace"),"aria-label":Br(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=en("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=en("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=en("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function i(r,s,a){return en("button",{class:"cm-button",name:r,onclick:s,type:"button"},a)}this.dom=en("div",{onkeydown:r=>this.keydown(r),class:"cm-search"},[this.searchField,i("next",()=>Db(e),[Br(e,"next")]),i("prev",()=>Lb(e),[Br(e,"previous")]),i("select",()=>hie(e),[Br(e,"all")]),en("label",null,[this.caseField,Br(e,"match case")]),en("label",null,[this.reField,Br(e,"regexp")]),en("label",null,[this.wordField,Br(e,"by word")]),...e.state.readOnly?[]:[en("br"),this.replaceField,i("replace",()=>O$(e),[Br(e,"replace")]),i("replaceAll",()=>pie(e),[Br(e,"replace all")])],en("button",{name:"close",onclick:()=>gX(e),"aria-label":Br(e,"close"),type:"button"},["×"])])}commit(){let e=new fX({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:Cp.of(e)}))}keydown(e){fJ(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?Lb:Db)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),O$(this.view))}update(e){for(let n of e.transactions)for(let i of n.effects)i.is(Cp)&&!i.value.eq(this.query)&&this.setQuery(i.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(Ah).top}}function Br(t,e){return t.state.phrase(e)}const cO=30,uO=/[\s\.,:;?!]/;function CT(t,{from:e,to:n}){let i=t.state.doc.lineAt(e),r=t.state.doc.lineAt(n).to,s=Math.max(i.from,e-cO),a=Math.min(r,n+cO),c=t.state.sliceDoc(s,a);if(s!=i.from){for(let u=0;u<cO;u++)if(!uO.test(c[u+1])&&uO.test(c[u])){c=c.slice(u);break}}if(a!=r){for(let u=c.length-1;u>c.length-cO;u--)if(!uO.test(c[u-1])&&uO.test(c[u])){c=c.slice(0,u);break}}return Ae.announce.of(`${t.state.phrase("current match")}. ${c} ${t.state.phrase("on line")} ${i.number}.`)}const Oie=Ae.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),bie=[$l,Fo.low(fie),Oie];class AT{constructor(e,n,i,r){this.state=e,this.pos=n,this.explicit=i,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let n=rn(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),i=Math.max(n.from,this.pos-250),r=n.text.slice(i-n.from,this.pos-n.from),s=r.search(bX(e,!1));return s<0?null:{from:i+s,to:this.pos,text:r.slice(s)}}get aborted(){return this.abortListeners==null}addEventListener(e,n,i){e=="abort"&&this.abortListeners&&(this.abortListeners.push(n),i&&i.onDocChange&&(this.abortOnDocChange=!0))}}function b$(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function yie(t){let e=Object.create(null),n=Object.create(null);for(let{label:r}of t){e[r[0]]=!0;for(let s=1;s<r.length;s++)n[r[s]]=!0}let i=b$(e)+b$(n)+"*$";return[new RegExp("^"+i),new RegExp(i)]}function OX(t){let e=t.map(r=>typeof r=="string"?{label:r}:r),[n,i]=e.every(r=>/^\w+$/.test(r.label))?[/\w*$/,/\w+$/]:yie(e);return r=>{let s=r.matchBefore(i);return s||r.explicit?{from:s?s.from:r.pos,options:e,validFor:n}:null}}function vie(t,e){return n=>{for(let i=rn(n.state).resolveInner(n.pos,-1);i;i=i.parent){if(t.indexOf(i.name)>-1)return null;if(i.type.isTop)break}return e(n)}}class y${constructor(e,n,i,r){this.completion=e,this.source=n,this.match=i,this.score=r}}function Gc(t){return t.selection.main.from}function bX(t,e){var n;let{source:i}=t,r=e&&i[0]!="^",s=i[i.length-1]!="$";return!r&&!s?t:new RegExp(`${r?"^":""}(?:${i})${s?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const RT=Ho.define();function Sie(t,e,n,i){let{main:r}=t.selection,s=n-r.from,a=i-r.from;return{...t.changeByRange(c=>{if(c!=r&&n!=i&&t.sliceDoc(c.from+s,c.from+a)!=t.sliceDoc(n,i))return{range:c};let u=t.toText(e);return{changes:{from:c.from+s,to:i==r.from?c.to:c.from+a,insert:u},range:ce.cursor(c.from+s+u.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}const v$=new WeakMap;function xie(t){if(!Array.isArray(t))return t;let e=v$.get(t);return e||v$.set(t,e=OX(t)),e}const Ib=ut.define(),Ap=ut.define();class wie{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n<e.length;){let i=vr(e,n),r=Po(i);this.chars.push(i);let s=e.slice(n,n+r),a=s.toUpperCase();this.folded.push(vr(a==s?s.toLowerCase():a,0)),n+=r}this.astral=e.length!=this.chars.length}ret(e,n){return this.score=e,this.matched=n,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:n,folded:i,any:r,precise:s,byWord:a}=this;if(n.length==1){let C=vr(e,0),k=Po(C),A=k==e.length?0:-100;if(C!=n[0])if(C==i[0])A+=-200;else return null;return this.ret(A,[0,k])}let c=e.indexOf(this.pattern);if(c==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let u=n.length,h=0;if(c<0){for(let C=0,k=Math.min(e.length,200);C<k&&h<u;){let A=vr(e,C);(A==n[h]||A==i[h])&&(r[h++]=C),C+=Po(A)}if(h<u)return null}let d=0,m=0,g=!1,y=0,v=-1,S=-1,x=/[a-z]/.test(e),w=!0;for(let C=0,k=Math.min(e.length,200),A=0;C<k&&m<u;){let R=vr(e,C);c<0&&(d<u&&R==n[d]&&(s[d++]=C),y<u&&(R==n[y]||R==i[y]?(y==0&&(v=C),S=C+1,y++):y=0));let P,N=R<255?R>=48&&R<=57||R>=97&&R<=122?2:R>=65&&R<=90?1:0:(P=G_(R))!=P.toLowerCase()?1:P!=P.toUpperCase()?2:0;(!C||N==1&&x||A==0&&N!=0)&&(n[m]==R||i[m]==R&&(g=!0)?a[m++]=C:a.length&&(w=!1)),A=N,C+=Po(R)}return m==u&&a[0]==0&&w?this.result(-100+(g?-200:0),a,e):y==u&&v==0?this.ret(-200-e.length+(S==e.length?0:-100),[0,S]):c>-1?this.ret(-700-e.length,[c,c+this.pattern.length]):y==u?this.ret(-900-e.length,[v,S]):m==u?this.result(-100+(g?-200:0)+-700+(w?0:-1100),a,e):n.length==2?null:this.result((r[0]?-700:0)+-200+-1100,r,e)}result(e,n,i){let r=[],s=0;for(let a of n){let c=a+(this.astral?Po(vr(i,a)):1);s&&r[s-1]==a?r[s-1]=c:(r[s++]=a,r[s++]=c)}return this.ret(e-i.length,r)}}class Eie{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let n=e.slice(0,this.pattern.length),i=n==this.pattern?0:n.toLowerCase()==this.folded?-200:null;return i==null?null:(this.matched=[0,n.length],this.score=i+(e.length==this.pattern.length?0:-100),this)}}const mi=De.define({combine(t){return Wo(t,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:_ie,filterStrict:!1,compareCompletions:(e,n)=>(e.sortText||e.label).localeCompare(n.sortText||n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>i=>S$(e(i),n(i)),optionClass:(e,n)=>i=>S$(e(i),n(i)),addToOptions:(e,n)=>e.concat(n),filterStrict:(e,n)=>e||n})}});function S$(t,e){return t?e?t+" "+e:t:e}function _ie(t,e,n,i,r,s){let a=t.textDirection==ln.RTL,c=a,u=!1,h="top",d,m,g=e.left-r.left,y=r.right-e.right,v=i.right-i.left,S=i.bottom-i.top;if(c&&g<Math.min(v,y)?c=!1:!c&&y<Math.min(v,g)&&(c=!0),v<=(c?g:y))d=Math.max(r.top,Math.min(n.top,r.bottom-S))-e.top,m=Math.min(400,c?g:y);else{u=!0,m=Math.min(400,(a?e.right:r.right-e.left)-30);let C=r.bottom-e.bottom;C>=S||C>e.top?d=n.bottom-e.top:(h="bottom",d=e.bottom-n.top)}let x=(e.bottom-e.top)/s.offsetHeight,w=(e.right-e.left)/s.offsetWidth;return{style:`${h}: ${d/x}px; max-width: ${m/w}px`,class:"cm-completionInfo-"+(u?a?"left-narrow":"right-narrow":c?"left":"right")}}const PT=ut.define();function Tie(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let i=document.createElement("div");return i.classList.add("cm-completionIcon"),n.type&&i.classList.add(...n.type.split(/\s+/g).map(r=>"cm-completionIcon-"+r)),i.setAttribute("aria-hidden","true"),i},position:20}),e.push({render(n,i,r,s){let a=document.createElement("span");a.className="cm-completionLabel";let c=n.displayLabel||n.label,u=0;for(let h=0;h<s.length;){let d=s[h++],m=s[h++];d>u&&a.appendChild(document.createTextNode(c.slice(u,d)));let g=a.appendChild(document.createElement("span"));g.appendChild(document.createTextNode(c.slice(d,m))),g.className="cm-completionMatchedText",u=m}return u<c.length&&a.appendChild(document.createTextNode(c.slice(u))),a},position:50},{render(n){if(!n.detail)return null;let i=document.createElement("span");return i.className="cm-completionDetail",i.textContent=n.detail,i},position:80}),e.sort((n,i)=>n.position-i.position).map(n=>n.render)}function ax(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let r=Math.floor(e/n);return{from:r*n,to:(r+1)*n}}let i=Math.ceil((t-e)/n);return{from:t-i*n,to:t-(i-1)*n}}class kie{constructor(e,n,i){this.view=e,this.stateField=n,this.applyCompletion=i,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:u=>this.placeInfo(u),key:this},this.space=null,this.currentClass="";let r=e.state.field(n),{options:s,selected:a}=r.open,c=e.state.facet(mi);this.optionContent=Tie(c),this.optionClass=c.optionClass,this.tooltipClass=c.tooltipClass,this.range=ax(s.length,a,c.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",u=>{let{options:h}=e.state.field(n).open;for(let d=u.target,m;d&&d!=this.dom;d=d.parentNode)if(d.nodeName=="LI"&&(m=/-(\d+)$/.exec(d.id))&&+m[1]<h.length){this.applyCompletion(e,h[+m[1]]),u.preventDefault();return}if(u.target==this.list){let d=this.list.classList.contains("cm-completionListIncompleteTop")&&u.clientY<this.list.firstChild.getBoundingClientRect().top?this.range.from-1:this.list.classList.contains("cm-completionListIncompleteBottom")&&u.clientY>this.list.lastChild.getBoundingClientRect().bottom?this.range.to:null;d!=null&&(e.dispatch({effects:PT.of(d)}),u.preventDefault())}}),this.dom.addEventListener("focusout",u=>{let h=e.state.field(this.stateField,!1);h&&h.tooltip&&e.state.facet(mi).closeOnBlur&&u.relatedTarget!=e.contentDOM&&e.dispatch({effects:Ap.of(null)})}),this.showOptions(s,r.id)}mount(){this.updateSel()}showOptions(e,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let i=e.state.field(this.stateField),r=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),i!=r){let{options:s,selected:a,disabled:c}=i.open;(!r.open||r.open.options!=s)&&(this.range=ax(s.length,a,e.state.facet(mi).maxRenderedOptions),this.showOptions(s,i.id)),this.updateSel(),c!=((n=r.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!c)}}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let i of this.currentClass.split(" "))i&&this.dom.classList.remove(i);for(let i of n.split(" "))i&&this.dom.classList.add(i);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;(n.selected>-1&&n.selected<this.range.from||n.selected>=this.range.to)&&(this.range=ax(n.options.length,n.selected,this.view.state.facet(mi).maxRenderedOptions),this.showOptions(n.options,e.id));let i=this.updateSelectedOption(n.selected);if(i){this.destroyInfo();let{completion:r}=n.options[n.selected],{info:s}=r;if(!s)return;let a=typeof s=="string"?document.createTextNode(s):s(r);if(!a)return;"then"in a?a.then(c=>{c&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(c,r)}).catch(c=>wr(this.view.state,c,"completion info")):(this.addInfoPane(a,r),i.setAttribute("aria-describedby",this.info.id))}}addInfoPane(e,n){this.destroyInfo();let i=this.info=document.createElement("div");if(i.className="cm-tooltip cm-completionInfo",i.id="cm-completionInfo-"+Math.floor(Math.random()*65535).toString(16),e.nodeType!=null)i.appendChild(e),this.infoDestroy=null;else{let{dom:r,destroy:s}=e;i.appendChild(r),this.infoDestroy=s||null}this.dom.appendChild(i),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let i=this.list.firstChild,r=this.range.from;i;i=i.nextSibling,r++)i.nodeName!="LI"||!i.id?r--:r==e?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),n=i):i.hasAttribute("aria-selected")&&(i.removeAttribute("aria-selected"),i.removeAttribute("aria-describedby"));return n&&Aie(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),s=this.space;if(!s){let a=this.dom.ownerDocument.documentElement;s={left:0,top:0,right:a.clientWidth,bottom:a.clientHeight}}return r.top>Math.min(s.bottom,n.bottom)-10||r.bottom<Math.max(s.top,n.top)+10?null:this.view.state.facet(mi).positionInfo(this.view,n,r,i,s,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,n,i){const r=document.createElement("ul");r.id=n,r.setAttribute("role","listbox"),r.setAttribute("aria-expanded","true"),r.setAttribute("aria-label",this.view.state.phrase("Completions")),r.addEventListener("mousedown",a=>{a.target==r&&a.preventDefault()});let s=null;for(let a=i.from;a<i.to;a++){let{completion:c,match:u}=e[a],{section:h}=c;if(h){let g=typeof h=="string"?h:h.name;if(g!=s&&(a>i.from||i.from==0))if(s=g,typeof h!="string"&&h.header)r.appendChild(h.header(h));else{let y=r.appendChild(document.createElement("completion-section"));y.textContent=g}}const d=r.appendChild(document.createElement("li"));d.id=n+"-"+a,d.setAttribute("role","option");let m=this.optionClass(c);m&&(d.className=m);for(let g of this.optionContent){let y=g(c,this.view.state,this.view,u);y&&d.appendChild(y)}}return i.from&&r.classList.add("cm-completionListIncompleteTop"),i.to<e.length&&r.classList.add("cm-completionListIncompleteBottom"),r}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function Cie(t,e){return n=>new kie(n,t,e)}function Aie(t,e){let n=t.getBoundingClientRect(),i=e.getBoundingClientRect(),r=n.height/t.offsetHeight;i.top<n.top?t.scrollTop-=(n.top-i.top)/r:i.bottom>n.bottom&&(t.scrollTop+=(i.bottom-n.bottom)/r)}function x$(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function Rie(t,e){let n=[],i=null,r=null,s=d=>{n.push(d);let{section:m}=d.completion;if(m){i||(i=[]);let g=typeof m=="string"?m:m.name;i.some(y=>y.name==g)||i.push(typeof m=="string"?{name:g}:m)}},a=e.facet(mi);for(let d of t)if(d.hasResult()){let m=d.result.getMatch;if(d.result.filter===!1)for(let g of d.result.options)s(new y$(g,d.source,m?m(g):[],1e9-n.length));else{let g=e.sliceDoc(d.from,d.to),y,v=a.filterStrict?new Eie(g):new wie(g);for(let S of d.result.options)if(y=v.match(S.label)){let x=S.displayLabel?m?m(S,y.matched):[]:y.matched,w=y.score+(S.boost||0);if(s(new y$(S,d.source,x,w)),typeof S.section=="object"&&S.section.rank==="dynamic"){let{name:C}=S.section;r||(r=Object.create(null)),r[C]=Math.max(w,r[C]||-1e9)}}}}if(i){let d=Object.create(null),m=0,g=(y,v)=>(y.rank==="dynamic"&&v.rank==="dynamic"?r[v.name]-r[y.name]:0)||(typeof y.rank=="number"?y.rank:1e9)-(typeof v.rank=="number"?v.rank:1e9)||(y.name<v.name?-1:1);for(let y of i.sort(g))m-=1e5,d[y.name]=m;for(let y of n){let{section:v}=y.completion;v&&(y.score+=d[typeof v=="string"?v:v.name])}}let c=[],u=null,h=a.compareCompletions;for(let d of n.sort((m,g)=>g.score-m.score||h(m.completion,g.completion))){let m=d.completion;!u||u.label!=m.label||u.detail!=m.detail||u.type!=null&&m.type!=null&&u.type!=m.type||u.apply!=m.apply||u.boost!=m.boost?c.push(d):x$(d.completion)>x$(u)&&(c[c.length-1]=d),u=d.completion}return c}class wf{constructor(e,n,i,r,s,a){this.options=e,this.attrs=n,this.tooltip=i,this.timestamp=r,this.selected=s,this.disabled=a}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new wf(this.options,w$(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,i,r,s,a){if(r&&!a&&e.some(h=>h.isPending))return r.setDisabled();let c=Rie(e,n);if(!c.length)return r&&e.some(h=>h.isPending)?r.setDisabled():null;let u=n.facet(mi).selectOnOpen?0:-1;if(r&&r.selected!=u&&r.selected!=-1){let h=r.options[r.selected].completion;for(let d=0;d<c.length;d++)if(c[d].completion==h){u=d;break}}return new wf(c,w$(i,u),{pos:e.reduce((h,d)=>d.hasResult()?Math.min(h,d.from):h,1e8),create:Die,above:s.aboveCursor},r?r.timestamp:Date.now(),u,!1)}map(e){return new wf(this.options,this.attrs,{...this.tooltip,pos:e.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new wf(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class jb{constructor(e,n,i){this.active=e,this.id=n,this.open=i}static start(){return new jb(Qie,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,i=n.facet(mi),s=(i.override||n.languageDataAt("autocomplete",Gc(n)).map(xie)).map(u=>(this.active.find(d=>d.source==u)||new ys(u,this.active.some(d=>d.state!=0)?1:0)).update(e,i));s.length==this.active.length&&s.every((u,h)=>u==this.active[h])&&(s=this.active);let a=this.open,c=e.effects.some(u=>u.is(MT));a&&e.docChanged&&(a=a.map(e.changes)),e.selection||s.some(u=>u.hasResult()&&e.changes.touchesRange(u.from,u.to))||!Pie(s,this.active)||c?a=wf.build(s,n,this.id,a,i,c):a&&a.disabled&&!s.some(u=>u.isPending)&&(a=null),!a&&s.every(u=>!u.isPending)&&s.some(u=>u.hasResult())&&(s=s.map(u=>u.hasResult()?new ys(u.source,0):u));for(let u of e.effects)u.is(PT)&&(a=a&&a.setSelected(u.value,this.id));return s==this.active&&a==this.open?this:new jb(s,this.id,a)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?Mie:Nie}}function Pie(t,e){if(t==e)return!0;for(let n=0,i=0;;){for(;n<t.length&&!t[n].hasResult();)n++;for(;i<e.length&&!e[i].hasResult();)i++;let r=n==t.length,s=i==e.length;if(r||s)return r==s;if(t[n++].result!=e[i++].result)return!1}}const Mie={"aria-autocomplete":"list"},Nie={};function w$(t,e){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(n["aria-activedescendant"]=t+"-"+e),n}const Qie=[];function yX(t,e){if(t.isUserEvent("input.complete")){let i=t.annotation(RT);if(i&&e.activateOnCompletion(i))return 12}let n=t.isUserEvent("input.type");return n&&e.activateOnTyping?5:n?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class ys{constructor(e,n,i=!1){this.source=e,this.state=n,this.explicit=i}hasResult(){return!1}get isPending(){return this.state==1}update(e,n){let i=yX(e,n),r=this;(i&8||i&16&&this.touches(e))&&(r=new ys(r.source,0)),i&4&&r.state==0&&(r=new ys(this.source,1)),r=r.updateFor(e,i);for(let s of e.effects)if(s.is(Ib))r=new ys(r.source,1,s.value);else if(s.is(Ap))r=new ys(r.source,0);else if(s.is(MT))for(let a of s.value)a.source==r.source&&(r=a);return r}updateFor(e,n){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(Gc(e.state))}}class Pf extends ys{constructor(e,n,i,r,s,a){super(e,3,n),this.limit=i,this.result=r,this.from=s,this.to=a}hasResult(){return!0}updateFor(e,n){var i;if(!(n&3))return this.map(e.changes);let r=this.result;r.map&&!e.changes.empty&&(r=r.map(r,e.changes));let s=e.changes.mapPos(this.from),a=e.changes.mapPos(this.to,1),c=Gc(e.state);if(c>a||!r||n&2&&(Gc(e.startState)==this.from||c<this.limit))return new ys(this.source,n&4?1:0);let u=e.changes.mapPos(this.limit);return $ie(r.validFor,e.state,s,a)?new Pf(this.source,this.explicit,u,r,s,a):r.update&&(r=r.update(r,s,a,new AT(e.state,c,!1)))?new Pf(this.source,this.explicit,u,r,r.from,(i=r.to)!==null&&i!==void 0?i:Gc(e.state)):new ys(this.source,1,this.explicit)}map(e){if(e.empty)return this;let n=this.result.map?this.result.map(this.result,e):this.result;return n?new Pf(this.source,this.explicit,e.mapPos(this.limit),n,e.mapPos(this.from),e.mapPos(this.to,1)):new ys(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function $ie(t,e,n,i){if(!t)return!1;let r=e.sliceDoc(n,i);return typeof t=="function"?t(r,n,i,e):bX(t,!0).test(r)}const MT=ut.define({map(t,e){return t.map(n=>n.map(e))}}),Sr=Li.define({create(){return jb.start()},update(t,e){return t.update(e)},provide:t=>[fT.from(t,e=>e.tooltip),Ae.contentAttributes.from(t,e=>e.attrs)]});function NT(t,e){const n=e.completion.apply||e.completion.label;let i=t.state.field(Sr).active.find(r=>r.source==e.source);return i instanceof Pf?(typeof n=="string"?t.dispatch({...Sie(t.state,n,i.from,i.to),annotations:RT.of(e.completion)}):n(t,e.completion,i.from,i.to),!0):!1}const Die=Cie(Sr,NT);function fO(t,e="option"){return n=>{let i=n.state.field(Sr,!1);if(!i||!i.open||i.open.disabled||Date.now()-i.open.timestamp<n.state.facet(mi).interactionDelay)return!1;let r=1,s;e=="page"&&(s=qz(n,i.open.tooltip))&&(r=Math.max(2,Math.floor(s.dom.offsetHeight/s.dom.querySelector("li").offsetHeight)-1));let{length:a}=i.open.options,c=i.open.selected>-1?i.open.selected+r*(t?1:-1):t?0:a-1;return c<0?c=e=="page"?0:a-1:c>=a&&(c=e=="page"?a-1:0),n.dispatch({effects:PT.of(c)}),!0}}const Lie=t=>{let e=t.state.field(Sr,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<t.state.facet(mi).interactionDelay?!1:NT(t,e.open.options[e.open.selected])},lx=t=>t.state.field(Sr,!1)?(t.dispatch({effects:Ib.of(!0)}),!0):!1,Iie=t=>{let e=t.state.field(Sr,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:Ap.of(null)}),!0)};class jie{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const Bie=50,zie=1e3,Xie=Mn.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(Sr).active)e.isPending&&this.startQuery(e)}update(t){let e=t.state.field(Sr),n=t.state.facet(mi);if(!t.selectionSet&&!t.docChanged&&t.startState.field(Sr)==e)return;let i=t.transactions.some(s=>{let a=yX(s,n);return a&8||(s.selection||s.docChanged)&&!(a&3)});for(let s=0;s<this.running.length;s++){let a=this.running[s];if(i||a.context.abortOnDocChange&&t.docChanged||a.updates.length+t.transactions.length>Bie&&Date.now()-a.time>zie){for(let c of a.context.abortListeners)try{c()}catch(u){wr(this.view.state,u)}a.context.abortListeners=null,this.running.splice(s--,1)}else a.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(s=>s.effects.some(a=>a.is(Ib)))&&(this.pendingStart=!0);let r=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(s=>s.isPending&&!this.running.some(a=>a.active.source==s.source))?setTimeout(()=>this.startUpdate(),r):-1,this.composing!=0)for(let s of t.transactions)s.isUserEvent("input.type")?this.composing=2:this.composing==2&&s.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(Sr);for(let n of e.active)n.isPending&&!this.running.some(i=>i.active.source==n.source)&&this.startQuery(n);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(mi).updateSyncTime))}startQuery(t){let{state:e}=this.view,n=Gc(e),i=new AT(e,n,t.explicit,this.view),r=new jie(t,i);this.running.push(r),Promise.resolve(t.source(i)).then(s=>{r.context.aborted||(r.done=s||null,this.scheduleAccept())},s=>{this.view.dispatch({effects:Ap.of(null)}),wr(this.view.state,s)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(mi).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(mi),i=this.view.state.field(Sr);for(let r=0;r<this.running.length;r++){let s=this.running[r];if(s.done===void 0)continue;if(this.running.splice(r--,1),s.done){let c=Gc(s.updates.length?s.updates[0].startState:this.view.state),u=Math.min(c,s.done.from+(s.active.explicit?0:1)),h=new Pf(s.active.source,s.active.explicit,u,s.done,s.done.from,(t=s.done.to)!==null&&t!==void 0?t:c);for(let d of s.updates)h=h.update(d,n);if(h.hasResult()){e.push(h);continue}}let a=i.active.find(c=>c.source==s.active.source);if(a&&a.isPending)if(s.done==null){let c=new ys(s.active.source,0);for(let u of s.updates)c=c.update(u,n);c.isPending||e.push(c)}else this.startQuery(a)}(e.length||i.open&&i.open.disabled)&&this.view.dispatch({effects:MT.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(Sr,!1);if(e&&e.tooltip&&this.view.state.facet(mi).closeOnBlur){let n=e.open&&qz(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:Ap.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:Ib.of(!1)}),20),this.composing=0}}}),Uie=typeof navigator=="object"&&/Win/.test(navigator.platform),Zie=Fo.highest(Ae.domEventHandlers({keydown(t,e){let n=e.state.field(Sr,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||t.key.length>1||t.ctrlKey&&!(Uie&&t.altKey)||t.metaKey)return!1;let i=n.open.options[n.open.selected],r=n.active.find(a=>a.source==i.source),s=i.completion.commitCharacters||r.result.commitCharacters;return s&&s.indexOf(t.key)>-1&&NT(e,i),!1}})),vX=Ae.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center",cursor:"pointer"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class Vie{constructor(e,n,i,r){this.field=e,this.line=n,this.from=i,this.to=r}}class QT{constructor(e,n,i){this.field=e,this.from=n,this.to=i}map(e){let n=e.mapPos(this.from,-1,Qi.TrackDel),i=e.mapPos(this.to,1,Qi.TrackDel);return n==null||i==null?null:new QT(this.field,n,i)}}class $T{constructor(e,n){this.lines=e,this.fieldPositions=n}instantiate(e,n){let i=[],r=[n],s=e.doc.lineAt(n),a=/^\s*/.exec(s.text)[0];for(let u of this.lines){if(i.length){let h=a,d=/^\t*/.exec(u)[0].length;for(let m=0;m<d;m++)h+=e.facet(Eh);r.push(n+h.length-d),u=h+u.slice(d)}i.push(u),n+=u.length+1}let c=this.fieldPositions.map(u=>new QT(u.field,r[u.line]+u.from,r[u.line]+u.to));return{text:i,ranges:c}}static parse(e){let n=[],i=[],r=[],s;for(let a of e.split(/\r\n?|\n/)){for(;s=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(a);){let c=s[1]?+s[1]:null,u=s[2]||s[3]||"",h=-1;c===0&&(c=1e9);let d=u.replace(/\\[{}]/g,m=>m[1]);for(let m=0;m<n.length;m++)(c!=null?n[m].seq==c:d&&n[m].name==d)&&(h=m);if(h<0){let m=0;for(;m<n.length&&(c==null||n[m].seq!=null&&n[m].seq<c);)m++;n.splice(m,0,{seq:c,name:d}),h=m;for(let g of r)g.field>=h&&g.field++}for(let m of r)if(m.line==i.length&&m.from>s.index){let g=s[2]?3+(s[1]||"").length:2;m.from-=g,m.to-=g}r.push(new Vie(h,i.length,s.index,s.index+d.length)),a=a.slice(0,s.index)+u+a.slice(s.index+s[0].length)}a=a.replace(/\\([{}])/g,(c,u,h)=>{for(let d of r)d.line==i.length&&d.from>h&&(d.from--,d.to--);return u}),i.push(a)}return new $T(i,r)}}let qie=et.widget({widget:new class extends Hs{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),Yie=et.mark({class:"cm-snippetField"});class Rh{constructor(e,n){this.ranges=e,this.active=n,this.deco=et.set(e.map(i=>(i.from==i.to?qie:Yie).range(i.from,i.to)),!0)}map(e){let n=[];for(let i of this.ranges){let r=i.map(e);if(!r)return null;n.push(r)}return new Rh(n,this.active)}selectionInsideField(e){return e.ranges.every(n=>this.ranges.some(i=>i.field==this.active&&i.from<=n.from&&i.to>=n.to))}}const am=ut.define({map(t,e){return t&&t.map(e)}}),Gie=ut.define(),Rp=Li.define({create(){return null},update(t,e){for(let n of e.effects){if(n.is(am))return n.value;if(n.is(Gie)&&t)return new Rh(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>Ae.decorations.from(t,e=>e?e.deco:et.none)});function DT(t,e){return ce.create(t.filter(n=>n.field==e).map(n=>ce.range(n.from,n.to)))}function Fie(t){let e=$T.parse(t);return(n,i,r,s)=>{let{text:a,ranges:c}=e.instantiate(n.state,r),{main:u}=n.state.selection,h={changes:{from:r,to:s==u.from?u.to:s,insert:Nt.of(a)},scrollIntoView:!0,annotations:i?[RT.of(i),Hn.userEvent.of("input.complete")]:void 0};if(c.length&&(h.selection=DT(c,0)),c.some(d=>d.field>0)){let d=new Rh(c,0),m=h.effects=[am.of(d)];n.state.field(Rp,!1)===void 0&&m.push(ut.appendConfig.of([Rp,ere,tre,vX]))}n.dispatch(n.state.update(h))}}function SX(t){return({state:e,dispatch:n})=>{let i=e.field(Rp,!1);if(!i||t<0&&i.active==0)return!1;let r=i.active+t,s=t>0&&!i.ranges.some(a=>a.field==r+t);return n(e.update({selection:DT(i.ranges,r),effects:am.of(s?null:new Rh(i.ranges,r)),scrollIntoView:!0})),!0}}const Hie=({state:t,dispatch:e})=>t.field(Rp,!1)?(e(t.update({effects:am.of(null)})),!0):!1,Wie=SX(1),Kie=SX(-1),Jie=[{key:"Tab",run:Wie,shift:Kie},{key:"Escape",run:Hie}],E$=De.define({combine(t){return t.length?t[0]:Jie}}),ere=Fo.highest(mu.compute([E$],t=>t.facet(E$)));function br(t,e){return{...e,apply:Fie(t)}}const tre=Ae.domEventHandlers({mousedown(t,e){let n=e.state.field(Rp,!1),i;if(!n||(i=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let r=n.ranges.find(s=>s.from<=i&&s.to>=i);return!r||r.field==n.active?!1:(e.dispatch({selection:DT(n.ranges,r.field),effects:am.of(n.ranges.some(s=>s.field>r.field)?new Rh(n.ranges,r.field):null),scrollIntoView:!0}),!0)}}),Pp={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},$c=ut.define({map(t,e){let n=e.mapPos(t,-1,Qi.TrackAfter);return n??void 0}}),LT=new class extends Bl{};LT.startSide=1;LT.endSide=-1;const xX=Li.define({create(){return wt.empty},update(t,e){if(t=t.map(e.changes),e.selection){let n=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:i=>i>=n.from&&i<=n.to})}for(let n of e.effects)n.is($c)&&(t=t.update({add:[LT.range(n.value,n.value+1)]}));return t}});function nre(){return[rre,xX]}const cx="()[]{}<>«»»«[]{}";function wX(t){for(let e=0;e<cx.length;e+=2)if(cx.charCodeAt(e)==t)return cx.charAt(e+1);return G_(t<128?t:t+1)}function EX(t,e){return t.languageDataAt("closeBrackets",e)[0]||Pp}const ire=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),rre=Ae.inputHandler.of((t,e,n,i)=>{if((ire?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let r=t.state.selection.main;if(i.length>2||i.length==2&&Po(vr(i,0))==1||e!=r.from||n!=r.to)return!1;let s=are(t.state,i);return s?(t.dispatch(s),!0):!1}),sre=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=EX(t,t.selection.main.head).brackets||Pp.brackets,r=null,s=t.changeByRange(a=>{if(a.empty){let c=lre(t.doc,a.head);for(let u of i)if(u==c&&Ay(t.doc,a.head)==wX(vr(u,0)))return{changes:{from:a.head-u.length,to:a.head+u.length},range:ce.cursor(a.head-u.length)}}return{range:r=a}});return r||e(t.update(s,{scrollIntoView:!0,userEvent:"delete.backward"})),!r},ore=[{key:"Backspace",run:sre}];function are(t,e){let n=EX(t,t.selection.main.head),i=n.brackets||Pp.brackets;for(let r of i){let s=wX(vr(r,0));if(e==r)return s==r?fre(t,r,i.indexOf(r+r+r)>-1,n):cre(t,r,s,n.before||Pp.before);if(e==s&&_X(t,t.selection.main.from))return ure(t,r,s)}return null}function _X(t,e){let n=!1;return t.field(xX).between(0,t.doc.length,i=>{i==e&&(n=!0)}),n}function Ay(t,e){let n=t.sliceString(e,e+2);return n.slice(0,Po(vr(n,0)))}function lre(t,e){let n=t.sliceString(e-2,e);return Po(vr(n,0))==n.length?n:n.slice(1)}function cre(t,e,n,i){let r=null,s=t.changeByRange(a=>{if(!a.empty)return{changes:[{insert:e,from:a.from},{insert:n,from:a.to}],effects:$c.of(a.to+e.length),range:ce.range(a.anchor+e.length,a.head+e.length)};let c=Ay(t.doc,a.head);return!c||/\s/.test(c)||i.indexOf(c)>-1?{changes:{insert:e+n,from:a.head},effects:$c.of(a.head+e.length),range:ce.cursor(a.head+e.length)}:{range:r=a}});return r?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function ure(t,e,n){let i=null,r=t.changeByRange(s=>s.empty&&Ay(t.doc,s.head)==n?{changes:{from:s.head,to:s.head+n.length,insert:n},range:ce.cursor(s.head+n.length)}:i={range:s});return i?null:t.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function fre(t,e,n,i){let r=i.stringPrefixes||Pp.stringPrefixes,s=null,a=t.changeByRange(c=>{if(!c.empty)return{changes:[{insert:e,from:c.from},{insert:e,from:c.to}],effects:$c.of(c.to+e.length),range:ce.range(c.anchor+e.length,c.head+e.length)};let u=c.head,h=Ay(t.doc,u),d;if(h==e){if(_$(t,u))return{changes:{insert:e+e,from:u},effects:$c.of(u+e.length),range:ce.cursor(u+e.length)};if(_X(t,u)){let g=n&&t.sliceDoc(u,u+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:u,to:u+g.length,insert:g},range:ce.cursor(u+g.length)}}}else{if(n&&t.sliceDoc(u-2*e.length,u)==e+e&&(d=T$(t,u-2*e.length,r))>-1&&_$(t,d))return{changes:{insert:e+e+e+e,from:u},effects:$c.of(u+e.length),range:ce.cursor(u+e.length)};if(t.charCategorizer(u)(h)!=bn.Word&&T$(t,u,r)>-1&&!hre(t,u,e,r))return{changes:{insert:e+e,from:u},effects:$c.of(u+e.length),range:ce.cursor(u+e.length)}}return{range:s=c}});return s?null:t.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function _$(t,e){let n=rn(t).resolveInner(e+1);return n.parent&&n.from==e}function hre(t,e,n,i){let r=rn(t).resolveInner(e,-1),s=i.reduce((a,c)=>Math.max(a,c.length),0);for(let a=0;a<5;a++){let c=t.sliceDoc(r.from,Math.min(r.to,r.from+n.length+s)),u=c.indexOf(n);if(!u||u>-1&&i.indexOf(c.slice(0,u))>-1){let d=r.firstChild;for(;d&&d.from==r.from&&d.to-d.from>n.length+u;){if(t.sliceDoc(d.to-n.length,d.to)==n)return!1;d=d.firstChild}return!0}let h=r.to==e&&r.parent;if(!h)break;r=h}return!1}function T$(t,e,n){let i=t.charCategorizer(e);if(i(t.sliceDoc(e-1,e))!=bn.Word)return e;for(let r of n){let s=e-r.length;if(t.sliceDoc(s,e)==r&&i(t.sliceDoc(s-1,s))!=bn.Word)return s}return-1}function dre(t={}){return[Zie,Sr,mi.of(t),Xie,pre,vX]}const TX=[{key:"Ctrl-Space",run:lx},{mac:"Alt-`",run:lx},{mac:"Alt-i",run:lx},{key:"Escape",run:Iie},{key:"ArrowDown",run:fO(!0)},{key:"ArrowUp",run:fO(!1)},{key:"PageDown",run:fO(!0,"page")},{key:"PageUp",run:fO(!1,"page")},{key:"Enter",run:Lie}],pre=Fo.highest(mu.computeN([mi],t=>t.facet(mi).defaultKeymap?[TX]:[]));class k${constructor(e,n,i){this.from=e,this.to=n,this.diagnostic=i}}class Cc{constructor(e,n,i){this.diagnostics=e,this.panel=n,this.selected=i}static init(e,n,i){let r=i.facet(Mp).markerFilter;r&&(e=r(e,i));let s=e.slice().sort((y,v)=>y.from-v.from||y.to-v.to),a=new Zo,c=[],u=0,h=i.doc.iter(),d=0,m=i.doc.length;for(let y=0;;){let v=y==s.length?null:s[y];if(!v&&!c.length)break;let S,x;if(c.length)S=u,x=c.reduce((k,A)=>Math.min(k,A.to),v&&v.from>S?v.from:1e8);else{if(S=v.from,S>m)break;x=v.to,c.push(v),y++}for(;y<s.length;){let k=s[y];if(k.from==S&&(k.to>k.from||k.to==S))c.push(k),y++,x=Math.min(k.to,x);else{x=Math.min(k.from,x);break}}x=Math.min(x,m);let w=!1;if(c.some(k=>k.from==S&&(k.to==x||x==m))&&(w=S==x,!w&&x-S<10)){let k=S-(d+h.value.length);k>0&&(h.next(k),d=S);for(let A=S;;){if(A>=x){w=!0;break}if(!h.lineBreak&&d+h.value.length>A)break;A=d+h.value.length,d+=h.value.length,h.next()}}let C=kre(c);if(w)a.add(S,S,et.widget({widget:new wre(C),diagnostics:c.slice()}));else{let k=c.reduce((A,R)=>R.markClass?A+" "+R.markClass:A,"");a.add(S,x,et.mark({class:"cm-lintRange cm-lintRange-"+C+k,diagnostics:c.slice(),inclusiveEnd:c.some(A=>A.to>x)}))}if(u=x,u==m)break;for(let k=0;k<c.length;k++)c[k].to<=u&&c.splice(k--,1)}let g=a.finish();return new Cc(g,n,ql(g))}}function ql(t,e=null,n=0){let i=null;return t.between(n,1e9,(r,s,{spec:a})=>{if(!(e&&a.diagnostics.indexOf(e)<0))if(!i)i=new k$(r,s,e||a.diagnostics[0]);else{if(a.diagnostics.indexOf(i.diagnostic)<0)return!1;i=new k$(i.from,s,i.diagnostic)}}),i}function mre(t,e){let n=e.pos,i=e.end||n,r=t.state.facet(Mp).hideOn(t,n,i);if(r!=null)return r;let s=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(a=>a.is(kX))||t.changes.touchesRange(s.from,Math.max(s.to,i)))}function gre(t,e){return t.field(Fr,!1)?e:e.concat(ut.appendConfig.of(Cre))}const kX=ut.define(),IT=ut.define(),CX=ut.define(),Fr=Li.define({create(){return new Cc(et.none,null,null)},update(t,e){if(e.docChanged&&t.diagnostics.size){let n=t.diagnostics.map(e.changes),i=null,r=t.panel;if(t.selected){let s=e.changes.mapPos(t.selected.from,1);i=ql(n,t.selected.diagnostic,s)||ql(n,null,s)}!n.size&&r&&e.state.facet(Mp).autoPanel&&(r=null),t=new Cc(n,r,i)}for(let n of e.effects)if(n.is(kX)){let i=e.state.facet(Mp).autoPanel?n.value.length?Np.open:null:t.panel;t=Cc.init(n.value,i,e.state)}else n.is(IT)?t=new Cc(t.diagnostics,n.value?Np.open:null,t.selected):n.is(CX)&&(t=new Cc(t.diagnostics,t.panel,n.value));return t},provide:t=>[wp.from(t,e=>e.panel),Ae.decorations.from(t,e=>e.diagnostics)]}),Ore=et.mark({class:"cm-lintRange cm-lintRange-active"});function bre(t,e,n){let{diagnostics:i}=t.state.field(Fr),r,s=-1,a=-1;i.between(e-(n<0?1:0),e+(n>0?1:0),(u,h,{spec:d})=>{if(e>=u&&e<=h&&(u==h||(e>u||n>0)&&(e<h||n<0)))return r=d.diagnostics,s=u,a=h,!1});let c=t.state.facet(Mp).tooltipFilter;return r&&c&&(r=c(r,t.state)),r?{pos:s,end:a,above:!0,create(){return{dom:yre(t,r)}}}:null}function yre(t,e){return en("ul",{class:"cm-tooltip-lint"},e.map(n=>RX(t,n,!1)))}const vre=t=>{let e=t.state.field(Fr,!1);(!e||!e.panel)&&t.dispatch({effects:gre(t.state,[IT.of(!0)])});let n=vy(t,Np.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},C$=t=>{let e=t.state.field(Fr,!1);return!e||!e.panel?!1:(t.dispatch({effects:IT.of(!1)}),!0)},Sre=t=>{let e=t.state.field(Fr,!1);if(!e)return!1;let n=t.state.selection.main,i=ql(e.diagnostics,null,n.to+1);return!i&&(i=ql(e.diagnostics,null,0),!i||i.from==n.from&&i.to==n.to)?!1:(t.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0}),tee(t,i.from,1,{tooltip:PX,until:r=>r.docChanged||r.newSelection.main.head<i.from||r.newSelection.main.head>i.to}),!0)},xre=[{key:"Mod-Shift-m",run:vre,preventDefault:!0},{key:"F8",run:Sre}],Mp=De.define({combine(t){return{sources:t.map(e=>e.source).filter(e=>e!=null),...Wo(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{delay:Math.max,markerFilter:A$,tooltipFilter:A$,needsRefresh:(e,n)=>e?n?i=>e(i)||n(i):e:n,hideOn:(e,n)=>e?n?(i,r,s)=>e(i,r,s)||n(i,r,s):e:n,autoPanel:(e,n)=>e||n})}}});function A$(t,e){return t?e?(n,i)=>e(t(n,i),i):t:e}function AX(t){let e=[];if(t)e:for(let{name:n}of t){for(let i=0;i<n.length;i++){let r=n[i];if(/[a-zA-Z]/.test(r)&&!e.some(s=>s.toLowerCase()==r.toLowerCase())){e.push(r);continue e}}e.push("")}return e}function RX(t,e,n){var i;let r=n?AX(e.actions):[];return en("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},en("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),(i=e.actions)===null||i===void 0?void 0:i.map((s,a)=>{let c=!1,u=y=>{if(y.preventDefault(),c)return;c=!0;let v=ql(t.state.field(Fr).diagnostics,e);v&&s.apply(t,v.from,v.to)},{name:h}=s,d=r[a]?h.indexOf(r[a]):-1,m=d<0?h:[h.slice(0,d),en("u",h.slice(d,d+1)),h.slice(d+1)],g=s.markClass?" "+s.markClass:"";return en("button",{type:"button",class:"cm-diagnosticAction"+g,onclick:u,onmousedown:u,"aria-label":` Action: ${h}${d<0?"":` (access key "${r[a]})"`}.`},m)}),e.source&&en("div",{class:"cm-diagnosticSource"},e.source))}class wre extends Hs{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return en("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class R${constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=RX(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Np{constructor(e){this.view=e,this.items=[];let n=r=>{if(!(r.ctrlKey||r.altKey||r.metaKey)){if(r.keyCode==27)C$(this.view),this.view.focus();else if(r.keyCode==38||r.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(r.keyCode==40||r.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(r.keyCode==36)this.moveSelection(0);else if(r.keyCode==35)this.moveSelection(this.items.length-1);else if(r.keyCode==13)this.view.focus();else if(r.keyCode>=65&&r.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:s}=this.items[this.selectedIndex],a=AX(s.actions);for(let c=0;c<a.length;c++)if(a[c].toUpperCase().charCodeAt(0)==r.keyCode){let u=ql(this.view.state.field(Fr).diagnostics,s);u&&s.actions[c].apply(e,u.from,u.to)}}else return;r.preventDefault()}},i=r=>{for(let s=0;s<this.items.length;s++)this.items[s].dom.contains(r.target)&&this.moveSelection(s)};this.list=en("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:n,onclick:i}),this.dom=en("div",{class:"cm-panel-lint"},this.list,en("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>C$(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(Fr).selected;if(!e)return-1;for(let n=0;n<this.items.length;n++)if(this.items[n].diagnostic==e.diagnostic)return n;return-1}update(){let{diagnostics:e,selected:n}=this.view.state.field(Fr),i=0,r=!1,s=null,a=new Set;for(e.between(0,this.view.state.doc.length,(c,u,{spec:h})=>{for(let d of h.diagnostics){if(a.has(d))continue;a.add(d);let m=-1,g;for(let y=i;y<this.items.length;y++)if(this.items[y].diagnostic==d){m=y;break}m<0?(g=new R$(this.view,d),this.items.splice(i,0,g),r=!0):(g=this.items[m],m>i&&(this.items.splice(i,m-i),r=!0)),n&&g.diagnostic==n.diagnostic?g.dom.hasAttribute("aria-selected")||(g.dom.setAttribute("aria-selected","true"),s=g):g.dom.hasAttribute("aria-selected")&&g.dom.removeAttribute("aria-selected"),i++}});i<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)r=!0,this.items.pop();this.items.length==0&&(this.items.push(new R$(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),r=!0),s?(this.list.setAttribute("aria-activedescendant",s.id),this.view.requestMeasure({key:this,read:()=>({sel:s.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:c,panel:u})=>{let h=u.height/this.list.offsetHeight;c.top<u.top?this.list.scrollTop-=(u.top-c.top)/h:c.bottom>u.bottom&&(this.list.scrollTop+=(c.bottom-u.bottom)/h)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let e=this.list.firstChild;function n(){let i=e;e=i.nextSibling,i.remove()}for(let i of this.items)if(i.dom.parentNode==this.list){for(;e!=i.dom;)n();e=i.dom.nextSibling}else this.list.insertBefore(i.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(Fr),i=ql(n.diagnostics,this.items[e].diagnostic);i&&this.view.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:CX.of(i)})}static open(e){return new Np(e)}}function Ere(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`}function hO(t){return Ere(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${t}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const _re=Ae.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:hO("#f11")},".cm-lintRange-warning":{backgroundImage:hO("orange")},".cm-lintRange-info":{backgroundImage:hO("#999")},".cm-lintRange-hint":{backgroundImage:hO("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}},"&dark .cm-lintRange-active":{backgroundColor:"#86714a80"},"&dark .cm-panel.cm-panel-lint ul":{"& [aria-selected]":{backgroundColor:"#2e343e"}}});function Tre(t){return t=="error"?4:t=="warning"?3:t=="info"?2:1}function kre(t){let e="hint",n=1;for(let i of t){let r=Tre(i.severity);r>n&&(n=r,e=i.severity)}return e}const PX=eee(bre,{hideOn:mre}),Cre=[Fr,Ae.decorations.compute([Fr],t=>{let{selected:e,panel:n}=t.field(Fr);return!e||!n||e.from==e.to?et.none:et.set([Ore.range(e.from,e.to)])}),PX,_re];var P$=function(e){e===void 0&&(e={});var n=e,i=n.crosshairCursor,r=i===void 0?!1:i,s=[];e.closeBracketsKeymap!==!1&&(s=s.concat(ore)),e.defaultKeymap!==!1&&(s=s.concat(Xne)),e.searchKeymap!==!1&&(s=s.concat(mie)),e.historyKeymap!==!1&&(s=s.concat(Fte)),e.foldKeymap!==!1&&(s=s.concat(ote)),e.completionKeymap!==!1&&(s=s.concat(TX)),e.lintKeymap!==!1&&(s=s.concat(xre));var a=[];return e.lineNumbers!==!1&&a.push(mee()),e.highlightActiveLineGutter!==!1&&a.push(bee()),e.highlightSpecialChars!==!1&&a.push(AJ()),e.history!==!1&&a.push(Bte()),e.foldGutter!==!1&&a.push(ute()),e.drawSelection!==!1&&a.push(OJ()),e.dropCursor!==!1&&a.push(wJ()),e.allowMultipleSelections!==!1&&a.push(Ct.allowMultipleSelections.of(!0)),e.indentOnInput!==!1&&a.push(Kee()),e.syntaxHighlighting!==!1&&a.push(bT(pte,{fallback:!0})),e.bracketMatching!==!1&&a.push(Ste()),e.closeBrackets!==!1&&a.push(nre()),e.autocompletion!==!1&&a.push(dre()),e.rectangularSelection!==!1&&a.push(UJ()),r!==!1&&a.push(qJ()),e.highlightActiveLine!==!1&&a.push($J()),e.highlightSelectionMatches!==!1&&a.push(Gne()),e.tabSize&&typeof e.tabSize=="number"&&a.push(Eh.of(" ".repeat(e.tabSize))),a.concat([mu.of(s.flat())]).filter(Boolean)};const Are="#e5c07b",M$="#e06c75",Rre="#56b6c2",Pre="#ffffff",KO="#abb2bf",gE="#7d8799",Mre="#61afef",Nre="#98c379",N$="#d19a66",Qre="#c678dd",$re="#21252b",Q$="#2c313a",$$="#282c34",ux="#353a42",Dre="#3E4451",D$="#528bff",Lre=Ae.theme({"&":{color:KO,backgroundColor:$$},".cm-content":{caretColor:D$},".cm-cursor, .cm-dropCursor":{borderLeftColor:D$},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Dre},".cm-panels":{backgroundColor:$re,color:KO},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:$$,color:gE,border:"none"},".cm-activeLineGutter":{backgroundColor:Q$},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:ux},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:ux,borderBottomColor:ux},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Q$,color:KO}}},{dark:!0}),Ire=kh.define([{tag:L.keyword,color:Qre},{tag:[L.name,L.deleted,L.character,L.propertyName,L.macroName],color:M$},{tag:[L.function(L.variableName),L.labelName],color:Mre},{tag:[L.color,L.constant(L.name),L.standard(L.name)],color:N$},{tag:[L.definition(L.name),L.separator],color:KO},{tag:[L.typeName,L.className,L.number,L.changed,L.annotation,L.modifier,L.self,L.namespace],color:Are},{tag:[L.operator,L.operatorKeyword,L.url,L.escape,L.regexp,L.link,L.special(L.string)],color:Rre},{tag:[L.meta,L.comment],color:gE},{tag:L.strong,fontWeight:"bold"},{tag:L.emphasis,fontStyle:"italic"},{tag:L.strikethrough,textDecoration:"line-through"},{tag:L.link,color:gE,textDecoration:"underline"},{tag:L.heading,fontWeight:"bold",color:M$},{tag:[L.atom,L.bool,L.special(L.variableName)],color:N$},{tag:[L.processingInstruction,L.string,L.inserted],color:Nre},{tag:L.invalid,color:Pre}]),jre=[Lre,bT(Ire)];var Bre=Ae.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),zre=function(e){e===void 0&&(e={});var n=e,i=n.indentWithTab,r=i===void 0?!0:i,s=n.editable,a=s===void 0?!0:s,c=n.readOnly,u=c===void 0?!1:c,h=n.theme,d=h===void 0?"light":h,m=n.placeholder,g=m===void 0?"":m,y=n.basicSetup,v=y===void 0?!0:y,S=[];switch(r&&S.unshift(mu.of([Une])),v&&(typeof v=="boolean"?S.unshift(P$()):S.unshift(P$(v))),g&&S.unshift(jJ(g)),d){case"light":S.push(Bre);break;case"dark":S.push(jre);break;case"none":break;default:S.push(d);break}return a===!1&&S.push(Ae.editable.of(!1)),u&&S.push(Ct.readOnly.of(!0)),[...S]},Xre=t=>({line:t.state.doc.lineAt(t.state.selection.main.from),lineCount:t.state.doc.lines,lineBreak:t.state.lineBreak,length:t.state.doc.length,readOnly:t.state.readOnly,tabSize:t.state.tabSize,selection:t.state.selection,selectionAsSingle:t.state.selection.asSingle().main,ranges:t.state.selection.ranges,selectionCode:t.state.sliceDoc(t.state.selection.main.from,t.state.selection.main.to),selections:t.state.selection.ranges.map(e=>t.state.sliceDoc(e.from,e.to)),selectedText:t.state.selection.ranges.some(e=>!e.empty)});class Ure{constructor(e,n){this.timeLeftMS=void 0,this.timeoutMS=void 0,this.isCancelled=!1,this.isTimeExhausted=!1,this.callbacks=[],this.timeLeftMS=n,this.timeoutMS=n,this.callbacks.push(e)}tick(){if(!this.isCancelled&&!this.isTimeExhausted&&(this.timeLeftMS--,this.timeLeftMS<=0)){this.isTimeExhausted=!0;var e=this.callbacks.slice();this.callbacks.length=0,e.forEach(n=>{try{n()}catch(i){console.error("TimeoutLatch callback error:",i)}})}}cancel(){this.isCancelled=!0,this.callbacks.length=0}reset(){this.timeLeftMS=this.timeoutMS,this.isCancelled=!1,this.isTimeExhausted=!1}get isDone(){return this.isCancelled||this.isTimeExhausted}}class L${constructor(){this.interval=null,this.latches=new Set}add(e){this.latches.add(e),this.start()}remove(e){this.latches.delete(e),this.latches.size===0&&this.stop()}start(){this.interval===null&&(this.interval=setInterval(()=>{this.latches.forEach(e=>{e.tick(),e.isDone&&this.remove(e)})},1))}stop(){this.interval!==null&&(clearInterval(this.interval),this.interval=null)}}var fx=null,Zre=()=>typeof window>"u"?new L$:(fx||(fx=new L$),fx),Vre=Ae.theme({"& .cm-scroller":{height:"100% !important"}}),I$=null,hx=null;function qre(t,e,n,i,r,s){if(!t&&!e&&!n&&!i&&!r&&!s)return null;var a=JSON.stringify({height:t,minHeight:e,maxHeight:n,width:i,minWidth:r,maxWidth:s});return a===I$||(I$=a,hx=Ae.theme({"&":{height:t,minHeight:e,maxHeight:n,width:i,minWidth:r,maxWidth:s}})),hx}var j$=Ho.define(),Yre=200,Gre=[];function Fre(t){var e=t.value,n=t.selection,i=t.onChange,r=t.onStatistics,s=t.onCreateEditor,a=t.onUpdate,c=t.extensions,u=c===void 0?Gre:c,h=t.autoFocus,d=t.theme,m=d===void 0?"light":d,g=t.height,y=g===void 0?null:g,v=t.minHeight,S=v===void 0?null:v,x=t.maxHeight,w=x===void 0?null:x,C=t.width,k=C===void 0?null:C,A=t.minWidth,R=A===void 0?null:A,P=t.maxWidth,N=P===void 0?null:P,$=t.placeholder,D=$===void 0?"":$,U=t.editable,V=U===void 0?!0:U,X=t.readOnly,ee=X===void 0?!1:X,le=t.indentWithTab,re=le===void 0?!0:le,G=t.basicSetup,oe=G===void 0?!0:G,K=t.root,me=t.initialState,fe=T.useState(),Te=fe[0],ze=fe[1],tt=T.useState(),I=tt[0],ie=tt[1],B=T.useState(),se=B[0],we=B[1],_e=T.useState(()=>({current:null}))[0],be=T.useState(()=>({current:null}))[0],Se=qre(y,S,w,k,R,N),Ee=Ae.updateListener.of(Ge=>{if(Ge.docChanged&&typeof i=="function"&&!Ge.transactions.some(Xe=>Xe.annotation(j$))){_e.current?_e.current.reset():(_e.current=new Ure(()=>{if(be.current){var Xe=be.current;be.current=null,Xe()}_e.current=null},Yre),Zre().add(_e.current));var qe=Ge.state.doc,He=qe.toString();i(He,Ge)}r&&r(Xre(Ge))}),Ie=zre({theme:m,editable:V,readOnly:ee,placeholder:D,indentWithTab:re,basicSetup:oe}),Ye=[Ee,...Se?[Se]:[],Vre,...Ie];return a&&typeof a=="function"&&Ye.push(Ae.updateListener.of(a)),Ye=Ye.concat(u),T.useLayoutEffect(()=>{if(Te&&!se){var Ge={doc:e,selection:n,extensions:Ye},qe=me?Ct.fromJSON(me.json,Ge,me.fields):Ct.create(Ge);if(we(qe),!I){var He=new Ae({state:qe,parent:Te,root:K});ie(He),s&&s(He,qe)}}return()=>{I&&(we(void 0),ie(void 0))}},[Te,se]),T.useEffect(()=>{t.container&&ze(t.container)},[t.container]),T.useEffect(()=>()=>{I&&(I.destroy(),ie(void 0)),_e.current&&(_e.current.cancel(),_e.current=null)},[I]),T.useEffect(()=>{h&&I&&I.focus()},[h,I]),T.useEffect(()=>{I&&I.dispatch({effects:ut.reconfigure.of(Ye)})},[m,u,y,S,w,k,R,N,D,V,ee,re,oe,i,a]),T.useEffect(()=>{if(e!==void 0){var Ge=I?I.state.doc.toString():"";if(I&&e!==Ge){var qe=_e.current&&!_e.current.isDone,He=()=>{I&&e!==I.state.doc.toString()&&I.dispatch({changes:{from:0,to:I.state.doc.toString().length,insert:e||""},annotations:[j$.of(!0)]})};qe?be.current=He:He()}}},[e,I]),{state:se,setState:we,view:I,setView:ie,container:Te,setContainer:ze}}var Hre=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],MX=T.forwardRef((t,e)=>{var n=t.className,i=t.value,r=i===void 0?"":i,s=t.selection,a=t.extensions,c=a===void 0?[]:a,u=t.onChange,h=t.onStatistics,d=t.onCreateEditor,m=t.onUpdate,g=t.autoFocus,y=t.theme,v=y===void 0?"light":y,S=t.height,x=t.minHeight,w=t.maxHeight,C=t.width,k=t.minWidth,A=t.maxWidth,R=t.basicSetup,P=t.placeholder,N=t.indentWithTab,$=t.editable,D=t.readOnly,U=t.root,V=t.initialState,X=rW(t,Hre),ee=T.useRef(null),le=Fre({root:U,value:r,autoFocus:g,theme:v,height:S,minHeight:x,maxHeight:w,width:C,minWidth:k,maxWidth:A,basicSetup:R,placeholder:P,indentWithTab:N,editable:$,readOnly:D,selection:s,onChange:u,onStatistics:h,onCreateEditor:d,onUpdate:m,extensions:c,initialState:V}),re=le.state,G=le.view,oe=le.container,K=le.setContainer;T.useImperativeHandle(e,()=>({editor:ee.current,state:re,view:G}),[ee,oe,re,G]);var me=T.useCallback(Te=>{ee.current=Te,K(Te)},[K]);if(typeof r!="string")throw new Error("value must be typeof string but got "+typeof r);var fe=typeof v=="string"?"cm-theme-"+v:"cm-theme";return _.jsx("div",S1({ref:me,className:""+fe+(n?" "+n:"")},X))});MX.displayName="CodeMirror";class Bb{static create(e,n,i,r,s){let a=r+(r<<8)+e+(n<<4)|0;return new Bb(e,n,i,a,s,[],[])}constructor(e,n,i,r,s,a,c){this.type=e,this.value=n,this.from=i,this.hash=r,this.end=s,this.children=a,this.positions=c,this.hashProp=[[lt.contextHash,r]]}addChild(e,n){e.prop(lt.contextHash)!=this.hash&&(e=new Et(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(n)}toTree(e,n=this.end){let i=this.children.length-1;return i>=0&&(n=Math.max(n,this.positions[i]+this.children[i].length+this.from)),new Et(e.types[this.type],this.children,this.positions,n-this.from).balance({makeTree:(r,s,a)=>new Et(Jn.none,r,s,a,this.hashProp)})}}var ke;(function(t){t[t.Document=1]="Document",t[t.CodeBlock=2]="CodeBlock",t[t.FencedCode=3]="FencedCode",t[t.Blockquote=4]="Blockquote",t[t.HorizontalRule=5]="HorizontalRule",t[t.BulletList=6]="BulletList",t[t.OrderedList=7]="OrderedList",t[t.ListItem=8]="ListItem",t[t.ATXHeading1=9]="ATXHeading1",t[t.ATXHeading2=10]="ATXHeading2",t[t.ATXHeading3=11]="ATXHeading3",t[t.ATXHeading4=12]="ATXHeading4",t[t.ATXHeading5=13]="ATXHeading5",t[t.ATXHeading6=14]="ATXHeading6",t[t.SetextHeading1=15]="SetextHeading1",t[t.SetextHeading2=16]="SetextHeading2",t[t.HTMLBlock=17]="HTMLBlock",t[t.LinkReference=18]="LinkReference",t[t.Paragraph=19]="Paragraph",t[t.CommentBlock=20]="CommentBlock",t[t.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",t[t.Escape=22]="Escape",t[t.Entity=23]="Entity",t[t.HardBreak=24]="HardBreak",t[t.Emphasis=25]="Emphasis",t[t.StrongEmphasis=26]="StrongEmphasis",t[t.Link=27]="Link",t[t.Image=28]="Image",t[t.InlineCode=29]="InlineCode",t[t.HTMLTag=30]="HTMLTag",t[t.Comment=31]="Comment",t[t.ProcessingInstruction=32]="ProcessingInstruction",t[t.Autolink=33]="Autolink",t[t.HeaderMark=34]="HeaderMark",t[t.QuoteMark=35]="QuoteMark",t[t.ListMark=36]="ListMark",t[t.LinkMark=37]="LinkMark",t[t.EmphasisMark=38]="EmphasisMark",t[t.CodeMark=39]="CodeMark",t[t.CodeText=40]="CodeText",t[t.CodeInfo=41]="CodeInfo",t[t.LinkTitle=42]="LinkTitle",t[t.LinkLabel=43]="LinkLabel",t[t.URL=44]="URL"})(ke||(ke={}));class Wre{constructor(e,n){this.start=e,this.content=n,this.marks=[],this.parsers=[]}}class Kre{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return op(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,n=0,i=0){for(let r=n;r<e;r++)i+=this.text.charCodeAt(r)==9?4-i%4:1;return i}findColumn(e){let n=0;for(let i=0;n<this.text.length&&i<e;n++)i+=this.text.charCodeAt(n)==9?4-i%4:1;return n}scrub(){if(!this.baseIndent)return this.text;let e="";for(let n=0;n<this.basePos;n++)e+=" ";return e+this.text.slice(this.basePos)}}function B$(t,e,n){if(n.pos==n.text.length||t!=e.block&&n.indent>=e.stack[n.depth+1].value+n.baseIndent)return!0;if(n.indent>=n.baseIndent+4)return!1;let i=(t.type==ke.OrderedList?zT:BT)(n,e,!1);return i>0&&(t.type!=ke.BulletList||jT(n,e,!1)<0)&&n.text.charCodeAt(n.pos+i-1)==t.value}const NX={[ke.Blockquote](t,e,n){return n.next!=62?!1:(n.markers.push(Mt(ke.QuoteMark,e.lineStart+n.pos,e.lineStart+n.pos+1)),n.moveBase(n.pos+(Ts(n.text.charCodeAt(n.pos+1))?2:1)),t.end=e.lineStart+n.text.length,!0)},[ke.ListItem](t,e,n){return n.indent<n.baseIndent+t.value&&n.next>-1?!1:(n.moveBaseColumn(n.baseIndent+t.value),!0)},[ke.OrderedList]:B$,[ke.BulletList]:B$,[ke.Document](){return!0}};function Ts(t){return t==32||t==9||t==10||t==13}function op(t,e=0){for(;e<t.length&&Ts(t.charCodeAt(e));)e++;return e}function z$(t,e,n){for(;e>n&&Ts(t.charCodeAt(e-1));)e--;return e}function QX(t){if(t.next!=96&&t.next!=126)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;if(e<t.pos+3)return-1;if(t.next==96){for(let n=e;n<t.text.length;n++)if(t.text.charCodeAt(n)==96)return-1}return e}function $X(t){return t.next!=62?-1:t.text.charCodeAt(t.pos+1)==32?2:1}function jT(t,e,n){if(t.next!=42&&t.next!=45&&t.next!=95)return-1;let i=1;for(let r=t.pos+1;r<t.text.length;r++){let s=t.text.charCodeAt(r);if(s==t.next)i++;else if(!Ts(s))return-1}return n&&t.next==45&&IX(t)>-1&&t.depth==e.stack.length&&e.parser.leafBlockParsers.indexOf(XX.SetextHeading)>-1||i<3?-1:1}function DX(t,e){for(let n=t.stack.length-1;n>=0;n--)if(t.stack[n].type==e)return!0;return!1}function BT(t,e,n){return(t.next==45||t.next==43||t.next==42)&&(t.pos==t.text.length-1||Ts(t.text.charCodeAt(t.pos+1)))&&(!n||DX(e,ke.BulletList)||t.skipSpace(t.pos+2)<t.text.length)?1:-1}function zT(t,e,n){let i=t.pos,r=t.next;for(;r>=48&&r<=57;){i++;if(i==t.text.length)return-1;r=t.text.charCodeAt(i)}return i==t.pos||i>t.pos+9||r!=46&&r!=41||i<t.text.length-1&&!Ts(t.text.charCodeAt(i+1))||n&&!DX(e,ke.OrderedList)&&(t.skipSpace(i+1)==t.text.length||i>t.pos+1||t.next!=49)?-1:i+1-t.pos}function LX(t){if(t.next!=35)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==35;)e++;if(e<t.text.length&&t.text.charCodeAt(e)!=32)return-1;let n=e-t.pos;return n>6?-1:n}function IX(t){if(t.next!=45&&t.next!=61||t.indent>=t.baseIndent+4)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;let n=e;for(;e<t.text.length&&Ts(t.text.charCodeAt(e));)e++;return e==t.text.length?n:-1}const OE=/^[ \t]*$/,jX=/-->/,BX=/\?>/,bE=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,jX],[/^\s*<\?/,BX],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,OE],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,OE]];function zX(t,e,n){if(t.next!=60)return-1;let i=t.text.slice(t.pos);for(let r=0,s=bE.length-(n?1:0);r<s;r++)if(bE[r][0].test(i))return r;return-1}function X$(t,e){let n=t.countIndent(e,t.pos,t.indent),i=t.skipSpace(e),r=t.countIndent(i,e,n);return r>=n+5||i==t.text.length?n+1:r}function ml(t,e,n){let i=t.length-1;i>=0&&t[i].to==e&&t[i].type==ke.CodeText?t[i].to=n:t.push(Mt(ke.CodeText,e,n))}const dO={LinkReference:void 0,IndentedCode(t,e){let n=e.baseIndent+4;if(e.indent<n)return!1;let i=e.findColumn(n),r=t.lineStart+i,s=t.lineStart+e.text.length,a=[],c=[];for(ml(a,r,s);t.nextLine()&&e.depth>=t.stack.length;)if(e.pos==e.text.length){ml(c,t.lineStart-1,t.lineStart);for(let u of e.markers)c.push(u)}else{if(e.indent<n)break;{if(c.length){for(let h of c)h.type==ke.CodeText?ml(a,h.from,h.to):a.push(h);c=[]}ml(a,t.lineStart-1,t.lineStart);for(let h of e.markers)a.push(h);s=t.lineStart+e.text.length;let u=t.lineStart+e.findColumn(e.baseIndent+4);u<s&&ml(a,u,s)}}return c.length&&(c=c.filter(u=>u.type!=ke.CodeText),c.length&&(e.markers=c.concat(e.markers))),t.addNode(t.buffer.writeElements(a,-r).finish(ke.CodeBlock,s-r),r),!0},FencedCode(t,e){let n=QX(e);if(n<0)return!1;let i=t.lineStart+e.pos,r=e.next,s=n-e.pos,a=e.skipSpace(n),c=z$(e.text,e.text.length,a),u=[Mt(ke.CodeMark,i,i+s)];a<c&&u.push(Mt(ke.CodeInfo,t.lineStart+a,t.lineStart+c));for(let h=!0,d=!0,m=!1;t.nextLine()&&e.depth>=t.stack.length;h=!1){let g=e.pos;if(e.indent-e.baseIndent<4)for(;g<e.text.length&&e.text.charCodeAt(g)==r;)g++;if(g-e.pos>=s&&e.skipSpace(g)==e.text.length){for(let y of e.markers)u.push(y);d&&m&&ml(u,t.lineStart-1,t.lineStart),u.push(Mt(ke.CodeMark,t.lineStart+e.pos,t.lineStart+g)),t.nextLine();break}else{m=!0,h||(ml(u,t.lineStart-1,t.lineStart),d=!1);for(let S of e.markers)u.push(S);let y=t.lineStart+e.basePos,v=t.lineStart+e.text.length;y<v&&(ml(u,y,v),d=!1)}}return t.addNode(t.buffer.writeElements(u,-i).finish(ke.FencedCode,t.prevLineEnd()-i),i),!0},Blockquote(t,e){let n=$X(e);return n<0?!1:(t.startContext(ke.Blockquote,e.pos),t.addNode(ke.QuoteMark,t.lineStart+e.pos,t.lineStart+e.pos+1),e.moveBase(e.pos+n),null)},HorizontalRule(t,e){if(jT(e,t,!1)<0)return!1;let n=t.lineStart+e.pos;return t.nextLine(),t.addNode(ke.HorizontalRule,n),!0},BulletList(t,e){let n=BT(e,t,!1);if(n<0)return!1;t.block.type!=ke.BulletList&&t.startContext(ke.BulletList,e.basePos,e.next);let i=X$(e,e.pos+1);return t.startContext(ke.ListItem,e.basePos,i-e.baseIndent),t.addNode(ke.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+n),e.moveBaseColumn(i),null},OrderedList(t,e){let n=zT(e,t,!1);if(n<0)return!1;t.block.type!=ke.OrderedList&&t.startContext(ke.OrderedList,e.basePos,e.text.charCodeAt(e.pos+n-1));let i=X$(e,e.pos+n);return t.startContext(ke.ListItem,e.basePos,i-e.baseIndent),t.addNode(ke.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+n),e.moveBaseColumn(i),null},ATXHeading(t,e){let n=LX(e);if(n<0)return!1;let i=e.pos,r=t.lineStart+i,s=z$(e.text,e.text.length,i),a=s;for(;a>i&&e.text.charCodeAt(a-1)==e.next;)a--;(a==s||a==i||!Ts(e.text.charCodeAt(a-1)))&&(a=e.text.length);let c=t.buffer.write(ke.HeaderMark,0,n).writeElements(t.parser.parseInline(e.text.slice(i+n+1,a),r+n+1),-r);a<e.text.length&&c.write(ke.HeaderMark,a-i,s-i);let u=c.finish(ke.ATXHeading1-1+n,e.text.length-i);return t.nextLine(),t.addNode(u,r),!0},HTMLBlock(t,e){let n=zX(e,t,!1);if(n<0)return!1;let i=t.lineStart+e.pos,r=bE[n][1],s=[],a=r!=OE;for(;!r.test(e.text)&&t.nextLine();){if(e.depth<t.stack.length){a=!1;break}for(let h of e.markers)s.push(h)}a&&t.nextLine();let c=r==jX?ke.CommentBlock:r==BX?ke.ProcessingInstructionBlock:ke.HTMLBlock,u=t.prevLineEnd();return t.addNode(t.buffer.writeElements(s,-i).finish(c,u-i),i),!0},SetextHeading:void 0};class Jre{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,n,i){if(this.stage==-1)return!1;let r=i.content+`
73
+ `+n.scrub(),s=this.advance(r);return s>-1&&s<r.length?this.complete(e,i,s):!1}finish(e,n){return(this.stage==2||this.stage==3)&&op(n.content,this.pos)==n.content.length?this.complete(e,n,n.content.length):!1}complete(e,n,i){return e.addLeafElement(n,Mt(ke.LinkReference,this.start,this.start+i,this.elts)),!0}nextStage(e){return e?(this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0):(e===!1&&(this.stage=-1),!1)}advance(e){for(;;){if(this.stage==-1)return-1;if(this.stage==0){if(!this.nextStage(FX(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(Mt(ke.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(YX(e,op(e,this.pos),this.start)))return-1}else if(this.stage==2){let n=op(e,this.pos),i=0;if(n>this.pos){let r=GX(e,n,this.start);if(r){let s=dx(e,r.to-this.start);s>0&&(this.nextStage(r),i=s)}}return i||(i=dx(e,this.pos)),i>0&&i<e.length?i:-1}else return dx(e,this.pos)}}}function dx(t,e){for(;e<t.length;e++){let n=t.charCodeAt(e);if(n==10)break;if(!Ts(n))return-1}return e}class ese{nextLine(e,n,i){let r=n.depth<e.stack.length?-1:IX(n),s=n.next;if(r<0)return!1;let a=Mt(ke.HeaderMark,e.lineStart+n.pos,e.lineStart+r);return e.nextLine(),e.addLeafElement(i,Mt(s==61?ke.SetextHeading1:ke.SetextHeading2,i.start,e.prevLineEnd(),[...e.parser.parseInline(i.content,i.start),a])),!0}finish(){return!1}}const XX={LinkReference(t,e){return e.content.charCodeAt(0)==91?new Jre(e):null},SetextHeading(){return new ese}},tse=[(t,e)=>LX(e)>=0,(t,e)=>QX(e)>=0,(t,e)=>$X(e)>=0,(t,e)=>BT(e,t,!0)>=0,(t,e)=>zT(e,t,!0)>=0,(t,e)=>jT(e,t,!0)>=0,(t,e)=>zX(e,t,!0)>=0],nse={text:"",end:0};class ise{constructor(e,n,i,r){this.parser=e,this.input=n,this.ranges=r,this.line=new Kre,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=r[r.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=r[0].from,this.block=Bb.create(ke.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=i.length?new ose(i,n):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:e}=this;for(;;){for(let i=0;;){let r=e.depth<this.stack.length?this.stack[this.stack.length-1]:null;for(;i<e.markers.length&&(!r||e.markers[i].from<r.end);){let s=e.markers[i++];this.addNode(s.type,s.from,s.to)}if(!r)break;this.finishContext()}if(e.pos<e.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(e.basePos))return null;e:for(;;){for(let i of this.parser.blockParsers)if(i){let r=i(this,e);if(r!=!1){if(r==!0)return null;e.forward();continue e}}break}if(e.pos==e.text.length)return this.nextLine()?null:this.finish();let n=new Wre(this.lineStart+e.pos,e.text.slice(e.pos));for(let i of this.parser.leafBlockParsers)if(i){let r=i(this,n);r&&n.parsers.push(r)}e:for(;this.nextLine()&&e.pos!=e.text.length;){if(e.indent<e.baseIndent+4){for(let i of this.parser.endLeafBlock)if(i(this,e,n))break e}for(let i of n.parsers)if(i.nextLine(this,e,n))return null;n.content+=`
74
+ `+e.scrub();for(let i of e.markers)n.marks.push(i)}return this.finishLeaf(n),null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let n=this.fragments.takeNodes(this);return n?(this.absoluteLineStart+=n,this.lineStart=HX(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0):!1}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let n=nse;if(n.end=e,e>=this.to)n.text="";else if(n.text=this.lineChunkAt(e),n.end+=n.text.length,this.ranges.length>1){let i=this.absoluteLineStart,r=this.rangeI;for(;this.ranges[r].to<n.end;){r++;let s=this.ranges[r].from,a=this.lineChunkAt(s);n.end=s+a.length,n.text=n.text.slice(0,this.ranges[r-1].to-i)+a,i=n.end-n.text.length}}return n}readLine(){let{line:e}=this,{text:n,end:i}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=i,e.reset(n);e.depth<this.stack.length;e.depth++){let r=this.stack[e.depth],s=this.parser.skipContextMarkup[r.type];if(!s)throw new Error("Unhandled block context "+ke[r.type]);let a=this.line.markers.length;if(!s(r,this,e)){this.line.markers.length>a&&(r.end=this.line.markers[this.line.markers.length-1].to),e.forward();break}e.forward()}}lineChunkAt(e){let n=this.input.chunk(e),i;if(this.input.lineChunks)i=n==`
75
+ `?"":n;else{let r=n.indexOf(`
76
+ `);i=r<0?n:n.slice(0,r)}return e+i.length>this.to?i.slice(0,this.to-e):i}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,n,i=0){this.block=Bb.create(e,i,this.lineStart+n,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,n,i=0){this.startContext(this.parser.getNodeType(e),n,i)}addNode(e,n,i){typeof e=="number"&&(e=new Et(this.parser.nodeSet.types[e],uh,uh,(i??this.prevLineEnd())-n)),this.block.addChild(e,n-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,n){this.addNode(this.buffer.writeElements(vE(n.children,e.marks),-n.from).finish(n.type,n.to-n.from),n.from)}finishContext(){let e=this.stack.pop(),n=this.stack[this.stack.length-1];n.addChild(e.toTree(this.parser.nodeSet),e.from-n.from),this.block=n}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(e){return this.ranges.length>1?UX(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let i of e.parsers)if(i.finish(this,e))return;let n=vE(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(n,-e.start).finish(ke.Paragraph,e.content.length),e.start)}elt(e,n,i,r){return typeof e=="string"?Mt(this.parser.getNodeType(e),n,i,r):new qX(e,n)}get buffer(){return new VX(this.parser.nodeSet)}}function UX(t,e,n,i,r){let s=t[e].to,a=[],c=[],u=n.from+i;function h(d,m){for(;m?d>=s:d>s;){let g=t[e+1].from-s;i+=g,d+=g,e++,s=t[e].to}}for(let d=n.firstChild;d;d=d.nextSibling){h(d.from+i,!0);let m=d.from+i,g,y=r.get(d.tree);y?g=y:d.to+i>s?(g=UX(t,e,d,i,r),h(d.to+i,!1)):g=d.toTree(),a.push(g),c.push(m-u)}return h(n.to+i,!1),new Et(n.type,a,c,n.to+i-u,n.tree?n.tree.propValues:void 0)}class Ry extends Sy{constructor(e,n,i,r,s,a,c,u,h){super(),this.nodeSet=e,this.blockParsers=n,this.leafBlockParsers=i,this.blockNames=r,this.endLeafBlock=s,this.skipContextMarkup=a,this.inlineParsers=c,this.inlineNames=u,this.wrappers=h,this.nodeTypes=Object.create(null);for(let d of e.types)this.nodeTypes[d.name]=d.id}createParse(e,n,i){let r=new ise(this,e,n,i);for(let s of this.wrappers)r=s(r,e,n,i);return r}configure(e){let n=yE(e);if(!n)return this;let{nodeSet:i,skipContextMarkup:r}=this,s=this.blockParsers.slice(),a=this.leafBlockParsers.slice(),c=this.blockNames.slice(),u=this.inlineParsers.slice(),h=this.inlineNames.slice(),d=this.endLeafBlock.slice(),m=this.wrappers;if(Pd(n.defineNodes)){r=Object.assign({},r);let g=i.types.slice(),y;for(let v of n.defineNodes){let{name:S,block:x,composite:w,style:C}=typeof v=="string"?{name:v}:v;if(g.some(R=>R.name==S))continue;w&&(r[g.length]=(R,P,N)=>w(P,N,R.value));let k=g.length,A=w?["Block","BlockContext"]:x?k>=ke.ATXHeading1&&k<=ke.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;g.push(Jn.define({id:k,name:S,props:A&&[[lt.group,A]]})),C&&(y||(y={}),Array.isArray(C)||C instanceof Yr?y[S]=C:Object.assign(y,C))}i=new xh(g),y&&(i=i.extend(wh(y)))}if(Pd(n.props)&&(i=i.extend(...n.props)),Pd(n.remove))for(let g of n.remove){let y=this.blockNames.indexOf(g),v=this.inlineNames.indexOf(g);y>-1&&(s[y]=a[y]=void 0),v>-1&&(u[v]=void 0)}if(Pd(n.parseBlock))for(let g of n.parseBlock){let y=c.indexOf(g.name);if(y>-1)s[y]=g.parse,a[y]=g.leaf;else{let v=g.before?pO(c,g.before):g.after?pO(c,g.after)+1:c.length-1;s.splice(v,0,g.parse),a.splice(v,0,g.leaf),c.splice(v,0,g.name)}g.endLeaf&&d.push(g.endLeaf)}if(Pd(n.parseInline))for(let g of n.parseInline){let y=h.indexOf(g.name);if(y>-1)u[y]=g.parse;else{let v=g.before?pO(h,g.before):g.after?pO(h,g.after)+1:h.length-1;u.splice(v,0,g.parse),h.splice(v,0,g.name)}}return n.wrap&&(m=m.concat(n.wrap)),new Ry(i,s,a,c,d,r,u,h,m)}getNodeType(e){let n=this.nodeTypes[e];if(n==null)throw new RangeError(`Unknown node type '${e}'`);return n}parseInline(e,n){let i=new lm(this,e,n);e:for(let r=n;r<i.end;){let s=i.char(r);for(let a of this.inlineParsers)if(a){let c=a(i,s,r);if(c>=0){r=c;continue e}}r++}return i.resolveMarkers(0)}}function Pd(t){return t!=null&&t.length>0}function yE(t){if(!Array.isArray(t))return t;if(t.length==0)return null;let e=yE(t[0]);if(t.length==1)return e;let n=yE(t.slice(1));if(!n||!e)return e||n;let i=(a,c)=>(a||uh).concat(c||uh),r=e.wrap,s=n.wrap;return{props:i(e.props,n.props),defineNodes:i(e.defineNodes,n.defineNodes),parseBlock:i(e.parseBlock,n.parseBlock),parseInline:i(e.parseInline,n.parseInline),remove:i(e.remove,n.remove),wrap:r?s?(a,c,u,h)=>r(s(a,c,u,h),c,u,h):r:s}}function pO(t,e){let n=t.indexOf(e);if(n<0)throw new RangeError(`Position specified relative to unknown parser ${e}`);return n}let ZX=[Jn.none];for(let t=1,e;e=ke[t];t++)ZX[t]=Jn.define({id:t,name:e,props:t>=ke.Escape?[]:[[lt.group,t in NX?["Block","BlockContext"]:["Block","LeafBlock"]]],top:e=="Document"});const uh=[];class VX{constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,n,i,r=0){return this.content.push(e,n,i,4+r*4),this}writeElements(e,n=0){for(let i of e)i.writeTo(this,n);return this}finish(e,n){return Et.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:e,length:n})}}let Qp=class{constructor(e,n,i,r=uh){this.type=e,this.from=n,this.to=i,this.children=r}writeTo(e,n){let i=e.content.length;e.writeElements(this.children,n),e.content.push(this.type,this.from+n,this.to+n,e.content.length+4-i)}toTree(e){return new VX(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}};class qX{constructor(e,n){this.tree=e,this.from=n}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return uh}writeTo(e,n){e.nodes.push(this.tree),e.content.push(e.nodes.length-1,this.from+n,this.to+n,-1)}toTree(){return this.tree}}function Mt(t,e,n,i){return new Qp(t,e,n,i)}const XT={resolve:"Emphasis",mark:"EmphasisMark"},UT={resolve:"Emphasis",mark:"EmphasisMark"},Ac={},zb={};class Vr{constructor(e,n,i,r,s=i-n){this.type=e,this.from=n,this.to=i,this.side=r,this.size=s}}const U$="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~";let $p=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{$p=new RegExp("[\\p{S}|\\p{P}]","u")}catch{}const px={Escape(t,e,n){if(e!=92||n==t.end-1)return-1;let i=t.char(n+1);for(let r=0;r<U$.length;r++)if(U$.charCodeAt(r)==i)return t.append(Mt(ke.Escape,n,n+2));return-1},Entity(t,e,n){if(e!=38)return-1;let i=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(t.slice(n+1,n+31));return i?t.append(Mt(ke.Entity,n,n+1+i[0].length)):-1},InlineCode(t,e,n){if(e!=96||n&&t.char(n-1)==96)return-1;let i=n+1;for(;i<t.end&&t.char(i)==96;)i++;let r=i-n,s=0;for(;i<t.end;i++)if(t.char(i)==96){if(s++,s==r&&t.char(i+1)!=96)return t.append(Mt(ke.InlineCode,n,i+1,[Mt(ke.CodeMark,n,n+r),Mt(ke.CodeMark,i+1-r,i+1)]))}else s=0;return-1},HTMLTag(t,e,n){if(e!=60||n==t.end-1)return-1;let i=t.slice(n+1,t.end),r=/^(?:[a-z][-\w+.]+:[^\s>]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(i);if(r)return t.append(Mt(ke.Autolink,n,n+1+r[0].length,[Mt(ke.LinkMark,n,n+1),Mt(ke.URL,n+1,n+r[0].length),Mt(ke.LinkMark,n+r[0].length,n+1+r[0].length)]));let s=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(i);if(s)return t.append(Mt(ke.Comment,n,n+1+s[0].length));let a=/^\?[^]*?\?>/.exec(i);if(a)return t.append(Mt(ke.ProcessingInstruction,n,n+1+a[0].length));let c=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(i);return c?t.append(Mt(ke.HTMLTag,n,n+1+c[0].length)):-1},Emphasis(t,e,n){if(e!=95&&e!=42)return-1;let i=n+1;for(;t.char(i)==e;)i++;let r=t.slice(n-1,n),s=t.slice(i,i+1),a=$p.test(r),c=$p.test(s),u=/\s|^$/.test(r),h=/\s|^$/.test(s),d=!h&&(!c||u||a),m=!u&&(!a||h||c),g=d&&(e==42||!m||a),y=m&&(e==42||!d||c);return t.append(new Vr(e==95?XT:UT,n,i,(g?1:0)|(y?2:0)))},HardBreak(t,e,n){if(e==92&&t.char(n+1)==10)return t.append(Mt(ke.HardBreak,n,n+2));if(e==32){let i=n+1;for(;t.char(i)==32;)i++;if(t.char(i)==10&&i>=n+2)return t.append(Mt(ke.HardBreak,n,i+1))}return-1},Link(t,e,n){return e==91?t.append(new Vr(Ac,n,n+1,1)):-1},Image(t,e,n){return e==33&&t.char(n+1)==91?t.append(new Vr(zb,n,n+2,1)):-1},LinkEnd(t,e,n){if(e!=93)return-1;for(let i=t.parts.length-1;i>=0;i--){let r=t.parts[i];if(r instanceof Vr&&(r.type==Ac||r.type==zb)){if(!r.side||t.skipSpace(r.to)==n&&!/[(\[]/.test(t.slice(n+1,n+2)))return t.parts[i]=null,-1;let s=t.takeContent(i),a=t.parts[i]=rse(t,s,r.type==Ac?ke.Link:ke.Image,r.from,n+1);if(r.type==Ac)for(let c=0;c<i;c++){let u=t.parts[c];u instanceof Vr&&u.type==Ac&&(u.side=0)}return a.to}}return-1}};function rse(t,e,n,i,r){let{text:s}=t,a=t.char(r),c=r;if(e.unshift(Mt(ke.LinkMark,i,i+(n==ke.Image?2:1))),e.push(Mt(ke.LinkMark,r-1,r)),a==40){let u=t.skipSpace(r+1),h=YX(s,u-t.offset,t.offset),d;h&&(u=t.skipSpace(h.to),u!=h.to&&(d=GX(s,u-t.offset,t.offset),d&&(u=t.skipSpace(d.to)))),t.char(u)==41&&(e.push(Mt(ke.LinkMark,r,r+1)),c=u+1,h&&e.push(h),d&&e.push(d),e.push(Mt(ke.LinkMark,u,c)))}else if(a==91){let u=FX(s,r-t.offset,t.offset,!1);u&&(e.push(u),c=u.to)}return Mt(n,i,c,e)}function YX(t,e,n){if(t.charCodeAt(e)==60){for(let r=e+1;r<t.length;r++){let s=t.charCodeAt(r);if(s==62)return Mt(ke.URL,e+n,r+1+n);if(s==60||s==10)return!1}return null}else{let r=0,s=e;for(let a=!1;s<t.length;s++){let c=t.charCodeAt(s);if(Ts(c))break;if(a)a=!1;else if(c==40)r++;else if(c==41){if(!r)break;r--}else c==92&&(a=!0)}return s>e?Mt(ke.URL,e+n,s+n):s==t.length?null:!1}}function GX(t,e,n){let i=t.charCodeAt(e);if(i!=39&&i!=34&&i!=40)return!1;let r=i==40?41:i;for(let s=e+1,a=!1;s<t.length;s++){let c=t.charCodeAt(s);if(a)a=!1;else{if(c==r)return Mt(ke.LinkTitle,e+n,s+1+n);c==92&&(a=!0)}}return null}function FX(t,e,n,i){for(let r=!1,s=e+1,a=Math.min(t.length,s+999);s<a;s++){let c=t.charCodeAt(s);if(r)r=!1;else{if(c==93)return i?!1:Mt(ke.LinkLabel,e+n,s+1+n);if(i&&!Ts(c)&&(i=!1),c==91)return!1;c==92&&(r=!0)}}return null}class lm{constructor(e,n,i){this.parser=e,this.text=n,this.offset=i,this.parts=[]}char(e){return e>=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,n){return this.text.slice(e-this.offset,n-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,n,i,r,s){return this.append(new Vr(e,n,i,(r?1:0)|(s?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let n=this.parts[e];if(n instanceof Vr&&(n.type==Ac||n.type==zb))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let i=e;i<this.parts.length;i++){let r=this.parts[i];if(!(r instanceof Vr&&r.type.resolve&&r.side&2))continue;let s=r.type==XT||r.type==UT,a=r.to-r.from,c,u=i-1;for(;u>=e;u--){let S=this.parts[u];if(S instanceof Vr&&S.side&1&&S.type==r.type&&!(s&&(r.side&1||S.side&2)&&(S.size+r.size)%3==0&&(S.size%3||r.size%3))){c=S;break}}if(!c)continue;let h=r.type.resolve,d=[],m=c.from,g=r.to;if(s){let S=Math.min(2,c.to-c.from,a);m=c.to-S,g=r.from+S,h=S==1?"Emphasis":"StrongEmphasis"}c.type.mark&&d.push(this.elt(c.type.mark,m,c.to));for(let S=u+1;S<i;S++)this.parts[S]instanceof Qp&&d.push(this.parts[S]),this.parts[S]=null;r.type.mark&&d.push(this.elt(r.type.mark,r.from,g));let y=this.elt(h,m,g,d);this.parts[u]=s&&c.from!=m?new Vr(c.type,c.from,m,c.side,c.size):null,(this.parts[i]=s&&r.to!=g?new Vr(r.type,g,r.to,r.side,r.size):null)?this.parts.splice(i,0,y):this.parts[i]=y}let n=[];for(let i=e;i<this.parts.length;i++){let r=this.parts[i];r instanceof Qp&&n.push(r)}return n}findOpeningDelimiter(e){for(let n=this.parts.length-1;n>=0;n--){let i=this.parts[n];if(i instanceof Vr&&i.type==e&&i.side&1)return n}return null}takeContent(e){let n=this.resolveMarkers(e);return this.parts.length=e,n}getDelimiterAt(e){let n=this.parts[e];return n instanceof Vr?n:null}skipSpace(e){return op(this.text,e-this.offset)+this.offset}elt(e,n,i,r){return typeof e=="string"?Mt(this.parser.getNodeType(e),n,i,r):new qX(e,n)}}lm.linkStart=Ac;lm.imageStart=zb;lm.emphasisAsterisk=UT;lm.emphasisUnderscore=XT;function vE(t,e){if(!e.length)return t;if(!t.length)return e;let n=t.slice(),i=0;for(let r of e){for(;i<n.length&&n[i].to<r.to;)i++;if(i<n.length&&n[i].from<r.from){let s=n[i];s instanceof Qp&&(n[i]=new Qp(s.type,s.from,s.to,vE(s.children,[r])))}else n.splice(i++,0,r)}return n}const sse=[ke.CodeBlock,ke.ListItem,ke.OrderedList,ke.BulletList];let ose=class{constructor(e,n){this.fragments=e,this.input=n,this.i=0,this.fragment=null,this.fragmentEnd=-1,this.cursor=null,e.length&&(this.fragment=e[this.i++])}nextFragment(){this.fragment=this.i<this.fragments.length?this.fragments[this.i++]:null,this.cursor=null,this.fragmentEnd=-1}moveTo(e,n){for(;this.fragment&&this.fragment.to<=e;)this.nextFragment();if(!this.fragment||this.fragment.from>(e?e-1:0))return!1;if(this.fragmentEnd<0){let s=this.fragment.to;for(;s>0&&this.input.read(s-1,s)!=`
77
+ `;)s--;this.fragmentEnd=s?s-1:0}let i=this.cursor;i||(i=this.cursor=this.fragment.tree.cursor(),i.firstChild());let r=e+this.fragment.offset;for(;i.to<=r;)if(!i.parent())return!1;for(;;){if(i.from>=r)return this.fragment.from<=n;if(!i.childAfter(r))return!1}}matches(e){let n=this.cursor.tree;return n&&n.prop(lt.contextHash)==e}takeNodes(e){let n=this.cursor,i=this.fragment.offset,r=this.fragmentEnd-(this.fragment.openEnd?1:0),s=e.absoluteLineStart,a=s,c=e.block.children.length,u=a,h=c;for(;;){if(n.to-i>r||n.to-i>e.to){if(n.type.isAnonymous&&n.firstChild())continue;break}let d=HX(n.from-i,e.ranges);if(n.to-i<=e.ranges[e.rangeI].to)e.addNode(n.tree,d);else{let m=new Et(e.parser.nodeSet.types[ke.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(m,n.tree),e.addNode(m,d)}if(n.type.is("Block")&&(sse.indexOf(n.type.id)<0?(a=n.to-i,c=e.block.children.length):(a=u,c=h),u=n.to-i,h=e.block.children.length),!n.nextSibling())break}for(;e.block.children.length>c;)e.block.children.pop(),e.block.positions.pop();return a-s}};function HX(t,e){let n=t;for(let i=1;i<e.length;i++){let r=e[i-1].to,s=e[i].from;r<t&&(n-=s-r)}return n}const ase=wh({"Blockquote/...":L.quote,HorizontalRule:L.contentSeparator,"ATXHeading1/... SetextHeading1/...":L.heading1,"ATXHeading2/... SetextHeading2/...":L.heading2,"ATXHeading3/...":L.heading3,"ATXHeading4/...":L.heading4,"ATXHeading5/...":L.heading5,"ATXHeading6/...":L.heading6,"Comment CommentBlock":L.comment,Escape:L.escape,Entity:L.character,"Emphasis/...":L.emphasis,"StrongEmphasis/...":L.strong,"Link/... Image/...":L.link,"OrderedList/... BulletList/...":L.list,"BlockQuote/...":L.quote,"InlineCode CodeText":L.monospace,"URL Autolink":L.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":L.processingInstruction,"CodeInfo LinkLabel":L.labelName,LinkTitle:L.string,Paragraph:L.content}),lse=new Ry(new xh(ZX).extend(ase),Object.keys(dO).map(t=>dO[t]),Object.keys(dO).map(t=>XX[t]),Object.keys(dO),tse,NX,Object.keys(px).map(t=>px[t]),Object.keys(px),[]);function cse(t,e,n){let i=[];for(let r=t.firstChild,s=e;;r=r.nextSibling){let a=r?r.from:n;if(a>s&&i.push({from:s,to:a}),!r)break;s=r.to}return i}function use(t){let{codeParser:e,htmlParser:n}=t;return{wrap:i5((r,s)=>{let a=r.type.id;if(e&&(a==ke.CodeBlock||a==ke.FencedCode)){let c="";if(a==ke.FencedCode){let h=r.node.getChild(ke.CodeInfo);h&&(c=s.read(h.from,h.to))}let u=e(c);if(u)return{parser:u,overlay:h=>h.type.id==ke.CodeText,bracketed:a==ke.FencedCode}}else if(n&&(a==ke.HTMLBlock||a==ke.HTMLTag||a==ke.CommentBlock))return{parser:n,overlay:cse(r.node,r.from,r.to)};return null})}}const fse={resolve:"Strikethrough",mark:"StrikethroughMark"},hse={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":L.strikethrough}},{name:"StrikethroughMark",style:L.processingInstruction}],parseInline:[{name:"Strikethrough",parse(t,e,n){if(e!=126||t.char(n+1)!=126||t.char(n+2)==126)return-1;let i=t.slice(n-1,n),r=t.slice(n+2,n+3),s=/\s|^$/.test(i),a=/\s|^$/.test(r),c=$p.test(i),u=$p.test(r);return t.addDelimiter(fse,n,n+2,!a&&(!u||s||c),!s&&(!c||a||u))},after:"Emphasis"}]};function ap(t,e,n=0,i,r=0){let s=0,a=!0,c=-1,u=-1,h=!1,d=()=>{i.push(t.elt("TableCell",r+c,r+u,t.parser.parseInline(e.slice(c,u),r+c)))};for(let m=n;m<e.length;m++){let g=e.charCodeAt(m);g==124&&!h?((!a||c>-1)&&s++,a=!1,i&&(c>-1&&d(),i.push(t.elt("TableDelimiter",m+r,m+r+1))),c=u=-1):(h||g!=32&&g!=9)&&(c<0&&(c=m),u=m+1),h=!h&&g==92}return c>-1&&(s++,i&&d()),s}function Z$(t,e){for(let n=e;n<t.length;n++){let i=t.charCodeAt(n);if(i==124)return!0;i==92&&n++}return!1}const WX=/^[>\s]*\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/;class V${constructor(){this.rows=null}nextLine(e,n,i){if(this.rows==null){this.rows=!1;let r;if((n.next==45||n.next==58||n.next==124)&&WX.test(r=n.text.slice(n.pos))){let s=[];ap(e,i.content,0,s,i.start)==ap(e,r,0)&&(this.rows=[e.elt("TableHeader",i.start,i.start+i.content.length,s),e.elt("TableDelimiter",e.lineStart+n.pos,e.lineStart+n.text.length)])}}else if(this.rows){let r=[];ap(e,n.text,n.pos,r,e.lineStart),this.rows.push(e.elt("TableRow",e.lineStart+n.pos,e.lineStart+n.text.length,r))}return!1}finish(e,n){return this.rows?(e.addLeafElement(n,e.elt("Table",n.start,n.start+n.content.length,this.rows)),!0):!1}}const dse={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":L.heading}},"TableRow",{name:"TableCell",style:L.content},{name:"TableDelimiter",style:L.processingInstruction}],parseBlock:[{name:"Table",leaf(t,e){return Z$(e.content,0)?new V$:null},endLeaf(t,e,n){if(n.parsers.some(r=>r instanceof V$)||!Z$(e.text,e.basePos))return!1;let i=t.peekLine();return WX.test(i)&&ap(t,e.text,e.basePos)==ap(t,i,e.basePos)},before:"SetextHeading"}]};class pse{nextLine(){return!1}finish(e,n){return e.addLeafElement(n,e.elt("Task",n.start,n.start+n.content.length,[e.elt("TaskMarker",n.start,n.start+3),...e.parser.parseInline(n.content.slice(3),n.start+3)])),!0}}const mse={defineNodes:[{name:"Task",block:!0,style:L.list},{name:"TaskMarker",style:L.atom}],parseBlock:[{name:"TaskList",leaf(t,e){return/^\[[ xX]\][ \t]/.test(e.content)&&t.parentType().name=="ListItem"?new pse:null},after:"SetextHeading"}]},q$=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,Y$=/[\w-]+(\.[\w-]+)+(:\d+)?(\/[^\s<]*)?/gy,gse=/[\w-]+\.[\w-]+($|[/:])/,G$=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,F$=/\/[a-zA-Z\d@.]+/gy;function H$(t,e,n,i){let r=0;for(let s=e;s<n;s++)t[s]==i&&r++;return r}function Ose(t,e){Y$.lastIndex=e;let n=Y$.exec(t);if(!n||gse.exec(n[0])[0].indexOf("_")>-1)return-1;let i=e+n[0].length;for(;;){let r=t[i-1],s;if(/[?!.,:*_~]/.test(r)||r==")"&&H$(t,e,i,")")>H$(t,e,i,"("))i--;else if(r==";"&&(s=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(t.slice(e,i))))i=e+s.index;else break}return i}function W$(t,e){G$.lastIndex=e;let n=G$.exec(t);if(!n)return-1;let i=n[0][n[0].length-1];return i=="_"||i=="-"?-1:e+n[0].length-(i=="."?1:0)}const bse={parseInline:[{name:"Autolink",parse(t,e,n){let i=n-t.offset;if(i&&/\w/.test(t.text[i-1]))return-1;q$.lastIndex=i;let r=q$.exec(t.text),s=-1;if(!r)return-1;if(r[1]||r[2]){if(s=Ose(t.text,i+r[0].length),s>-1&&t.hasOpenLink){let a=/([^\[\]]|\[[^\]]*\])*/.exec(t.text.slice(i,s));s=i+a[0].length}}else r[3]?s=W$(t.text,i):(s=W$(t.text,i+r[0].length),s>-1&&r[0]=="xmpp:"&&(F$.lastIndex=s,r=F$.exec(t.text),r&&(s=r.index+r[0].length)));return s<0?-1:(t.addElement(t.elt("URL",n,s+t.offset)),s+t.offset)}}]},yse=[dse,mse,hse,bse];function KX(t,e,n){return(i,r,s)=>{if(r!=t||i.char(s+1)==t)return-1;let a=[i.elt(n,s,s+1)];for(let c=s+1;c<i.end;c++){let u=i.char(c);if(u==t)return i.addElement(i.elt(e,s,c+1,a.concat(i.elt(n,c,c+1))));if(u==92&&a.push(i.elt("Escape",c,c+++2)),Ts(u))break}return-1}}const vse={defineNodes:[{name:"Superscript",style:L.special(L.content)},{name:"SuperscriptMark",style:L.processingInstruction}],parseInline:[{name:"Superscript",parse:KX(94,"Superscript","SuperscriptMark")}]},Sse={defineNodes:[{name:"Subscript",style:L.special(L.content)},{name:"SubscriptMark",style:L.processingInstruction}],parseInline:[{name:"Subscript",parse:KX(126,"Subscript","SubscriptMark")}]},xse={defineNodes:[{name:"Emoji",style:L.character}],parseInline:[{name:"Emoji",parse(t,e,n){let i;return e!=58||!(i=/^[a-zA-Z_0-9]+:/.exec(t.slice(n+1,t.end)))?-1:t.addElement(t.elt("Emoji",n,n+1+i[0].length))}}]};var K$={};class Xb{constructor(e,n,i,r,s,a,c,u,h,d=0,m){this.p=e,this.stack=n,this.state=i,this.reducePos=r,this.pos=s,this.score=a,this.buffer=c,this.bufferBase=u,this.curContext=h,this.lookAhead=d,this.parent=m}toString(){return`[${this.stack.filter((e,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,i=0){let r=e.parser.context;return new Xb(e,[],n,i,i,0,[],0,r?new J$(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let i=e>>19,r=e&65535,{parser:s}=this.p,a=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),c=s.dynamicPrecedence(r);if(c&&(this.score+=c),i==0){r<s.minRepeatTerm&&this.reducePos<this.pos&&(this.reducePos=this.pos),this.pushState(s.getGoto(this.state,r,!0),this.reducePos),r<s.minRepeatTerm&&this.storeNode(r,this.reducePos,this.reducePos,a?8:4,!0),this.reduceContext(r,this.reducePos);return}let u=this.stack.length-(i-1)*3-(e&262144?6:0),h=u?this.stack[u-2]:this.p.ranges[0].from;r<s.minRepeatTerm&&h==this.reducePos&&this.reducePos<this.pos&&(this.reducePos=this.pos);let d=this.reducePos-h;d>=2e3&&!(!((n=this.p.parser.nodeSet.types[r])===null||n===void 0)&&n.isAnonymous)&&(h==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=d):this.p.lastBigReductionSize<d&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=h,this.p.lastBigReductionSize=d));let m=u?this.stack[u-1]:0,g=this.bufferBase+this.buffer.length-m;if(r<s.minRepeatTerm||e&131072){let y=s.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(r,h,y,g+4,!0)}if(e&262144)this.state=this.stack[u];else{let y=this.stack[u-3];this.state=s.getGoto(y,r,!0)}for(;this.stack.length>u;)this.stack.pop();this.reduceContext(r,h)}storeNode(e,n,i,r=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let a=this.buffer.length;if(a>0&&this.buffer[a-4]==0&&this.buffer[a-1]>-1){if(n==i)return;if(this.buffer[a-2]>=n){this.buffer[a-2]=i;return}}}if(!s||this.pos==i)this.buffer.push(e,n,i,r);else{let a=this.buffer.length;if(a>0&&(this.buffer[a-4]!=0||this.buffer[a-1]<0)){let c=!1;for(let u=a;u>0&&this.buffer[u-2]>i;u-=4)if(this.buffer[u-1]>=0){c=!0;break}if(c)for(;a>0&&this.buffer[a-2]>i;)this.buffer[a]=this.buffer[a-4],this.buffer[a+1]=this.buffer[a-3],this.buffer[a+2]=this.buffer[a-2],this.buffer[a+3]=this.buffer[a-1],a-=4,r>4&&(r-=4)}this.buffer[a]=e,this.buffer[a+1]=n,this.buffer[a+2]=i,this.buffer[a+3]=r}}shift(e,n,i,r){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let s=e,{parser:a}=this.p;this.pos=r;let c=a.stateFlag(s,1);!c&&(r>i||n<=a.maxNode)&&(this.reducePos=r),this.pushState(s,c?i:Math.min(i,this.reducePos)),this.shiftContext(n,i),n<=a.maxNode&&this.buffer.push(n,i,r,4)}else this.pos=r,this.shiftContext(n,i),n<=this.p.parser.maxNode&&this.buffer.push(n,i,r,4)}apply(e,n,i,r){e&65536?this.reduce(e):this.shift(e,n,i,r)}useNode(e,n,i){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let s=this.reducePos=this.pos=i+e.length;this.pushState(n,i),this.buffer.push(r,i,s,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(n&&e.buffer[n-4]==0&&(n-=4);n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let i=e.buffer.slice(n),r=e.bufferBase+n;for(;e&&r==e.bufferBase;)e=e.parent;return new Xb(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,r,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let i=e<=this.p.parser.maxNode;i&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,i?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new wse(this);;){let i=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(i==0)return!1;if((i&65536)==0)return!0;n.reduce(i)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let r=[];for(let s=0,a;s<n.length;s+=2)(a=n[s+1])!=this.state&&this.p.parser.hasAction(a,e)&&r.push(n[s],a);if(this.stack.length<120)for(let s=0;r.length<8&&s<n.length;s+=2){let a=n[s+1];r.some((c,u)=>u&1&&c==a)||r.push(n[s],a)}n=r}let i=[];for(let r=0;r<n.length&&i.length<4;r+=2){let s=n[r+1];if(s==this.state)continue;let a=this.split();a.pushState(s,this.pos),a.storeNode(0,a.pos,a.pos,4,!0),a.shiftContext(n[r],this.pos),a.reducePos=this.pos,a.score-=200,i.push(a)}return i}forceReduce(){let{parser:e}=this.p,n=e.stateSlot(this.state,5);if((n&65536)==0)return!1;if(!e.validAction(this.state,n)){let i=n>>19,r=n&65535,s=this.stack.length-i*3;if(s<0||e.getGoto(this.stack[s],r,!1)<0){let a=this.findForcedReduction();if(a==null)return!1;n=a}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],i=(r,s)=>{if(!n.includes(r))return n.push(r),e.allActions(r,a=>{if(!(a&393216))if(a&65536){let c=(a>>19)-s;if(c>1){let u=a&65535,h=this.stack.length-c*3;if(h>=0&&e.getGoto(this.stack[h],u,!1)>=0)return c<<19|65536|u}}else{let c=i(a,s+1);if(c!=null)return c}})};return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;n<this.stack.length;n+=3)if(this.stack[n]!=e.stack[n])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(n)))}reduceContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(n)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.storeNode(this.curContext.hash,this.reducePos,this.reducePos,-3,!0)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let n=new J$(this.curContext.tracker,e);n.hash!=this.curContext.hash&&this.emitContext(),this.curContext=n}}setLookAhead(e){return e<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class J${constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class wse{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,i=e>>19;i==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(i-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=r}}class Ub{constructor(e,n,i){this.stack=e,this.pos=n,this.index=i,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new Ub(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new Ub(this.stack,this.pos,this.index)}}function Gd(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let i=0,r=0;i<t.length;){let s=0;for(;;){let a=t.charCodeAt(i++),c=!1;if(a==126){s=65535;break}a>=92&&a--,a>=34&&a--;let u=a-32;if(u>=46&&(u-=46,c=!0),s+=u,c)break;s*=46}n?n[r++]=s:n=new e(s)}return n}class JO{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const eD=new JO;class Ese{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=eD,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let i=this.range,r=this.rangeIndex,s=this.pos+e;for(;s<i.from;){if(!r)return null;let a=this.ranges[--r];s-=i.from-a.to,i=a}for(;n<0?s>i.to:s>=i.to;){if(r==this.ranges.length-1)return null;let a=this.ranges[++r];s+=a.from-i.to,i=a}return s}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let n of this.ranges)if(n.to>e)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,i,r;if(n>=0&&n<this.chunk.length)i=this.pos+e,r=this.chunk.charCodeAt(n);else{let s=this.resolveOffset(e,1);if(s==null)return-1;if(i=s,i>=this.chunk2Pos&&i<this.chunk2Pos+this.chunk2.length)r=this.chunk2.charCodeAt(i-this.chunk2Pos);else{let a=this.rangeIndex,c=this.range;for(;c.to<=i;)c=this.ranges[++a];this.chunk2=this.input.chunk(this.chunk2Pos=i),i+this.chunk2.length>c.to&&(this.chunk2=this.chunk2.slice(0,c.to-i)),r=this.chunk2.charCodeAt(0)}}return i>=this.token.lookAhead&&(this.token.lookAhead=i+1),r}acceptToken(e,n=0){let i=n?this.resolveOffset(n,-1):this.pos;if(i==null||i<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=i}acceptTokenTo(e,n){this.token.value=e,this.token.end=n}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:n}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=n,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),n=this.pos+e.length;this.chunk=n>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=eD,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,n){if(e>=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let i="";for(let r of this.ranges){if(r.from>=n)break;r.to>e&&(i+=this.input.read(Math.max(r.from,e),Math.min(r.to,n)))}return i}}class Mf{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:i}=n.p;JX(this.data,e,n,this.id,i.data,i.tokenPrecTable)}}Mf.prototype.contextual=Mf.prototype.fallback=Mf.prototype.extend=!1;class Zb{constructor(e,n,i){this.precTable=n,this.elseToken=i,this.data=typeof e=="string"?Gd(e):e}token(e,n){let i=e.pos,r=0;for(;;){let s=e.next<0,a=e.resolveOffset(1,1);if(JX(this.data,e,n,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(s||r++,a==null)break;e.reset(a,e.token)}r&&(e.reset(i,e.token),e.acceptToken(this.elseToken,r))}}Zb.prototype.contextual=Mf.prototype.fallback=Mf.prototype.extend=!1;class Wr{constructor(e,n={}){this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function JX(t,e,n,i,r,s){let a=0,c=1<<i,{dialect:u}=n.p.parser;e:for(;(c&t[a])!=0;){let h=t[a+1];for(let y=a+3;y<h;y+=2)if((t[y+1]&c)>0){let v=t[y];if(u.allows(v)&&(e.token.value==-1||e.token.value==v||_se(v,e.token.value,r,s))){e.acceptToken(v);break}}let d=e.next,m=0,g=t[a+2];if(e.next<0&&g>m&&t[h+g*3-3]==65535){a=t[h+g*3-1];continue e}for(;m<g;){let y=m+g>>1,v=h+y+(y<<1),S=t[v],x=t[v+1]||65536;if(d<S)g=y;else if(d>=x)m=y+1;else{a=t[v+2],e.advance();continue e}}break}}function tD(t,e,n){for(let i=e,r;(r=t[i])!=65535;i++)if(r==n)return i-e;return-1}function _se(t,e,n,i){let r=tD(n,i,e);return r<0||tD(n,i,t)<r}const zr=typeof process<"u"&&K$&&/\bparse\b/.test(K$.LOG);let mx=null;function nD(t,e,n){let i=t.cursor(It.IncludeAnonymous);for(i.moveTo(e);;)if(!(n<0?i.childBefore(e):i.childAfter(e)))for(;;){if((n<0?i.to<e:i.from>e)&&!i.type.isError)return n<0?Math.max(0,Math.min(i.to-1,e-25)):Math.min(t.length,Math.max(i.from+1,e+25));if(n<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return n<0?0:t.length}}class Tse{constructor(e,n){this.fragments=e,this.minRepeat=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.lastRepeat=null,this.lastRepeatPos=-1,this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?nD(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?nD(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let n=this.trees.length-1;if(n<0)return this.nextFragment(),null;let i=this.trees[n],r=this.index[n];if(r==i.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let s=i.children[r],a=this.start[n]+i.positions[r];if(a>e)return this.nextStart=a,null;if(s instanceof Et){let c=a>this.lastRepeatPos&&s.type.id>=this.minRepeat;if(a==e||c){let u=a+s.length,h;if(a>=this.safeFrom&&u<=this.safeTo&&(!(h=s.prop(lt.lookAhead))||u+h<this.fragment.to)){if(c&&(this.lastRepeat=s,this.lastRepeatPos=a),a==e)return s}else if(a==e)return null}this.index[n]++,a+s.length>=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(a),this.index.push(0))}else this.index[n]++,this.nextStart=a+s.length}}}class kse{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(i=>new JO)}getActions(e){let n=0,i=null,{parser:r}=e.p,{tokenizers:s}=r,a=r.stateSlot(e.state,3),c=e.curContext?e.curContext.hash:0,u=0;for(let h=0;h<s.length;h++){if((1<<h&a)==0)continue;let d=s[h],m=this.tokens[h];if(!(i&&!d.fallback)&&((d.contextual||m.start!=e.pos||m.mask!=a||m.context!=c)&&(this.updateCachedToken(m,d,e),m.mask=a,m.context=c),m.lookAhead>m.end+25&&(u=Math.max(m.lookAhead,u)),m.value!=0)){let g=n;if(m.extended>-1&&(n=this.addActions(e,m.extended,m.end,n)),n=this.addActions(e,m.value,m.end,n),!d.extend&&(i=m,n>g))break}}for(;this.actions.length>n;)this.actions.pop();return u&&e.setLookAhead(u),!i&&e.pos==this.stream.end&&(i=new JO,i.value=e.p.parser.eofTerm,i.start=i.end=e.pos,n=this.addActions(e,i.value,i.end,n)),this.mainToken=i,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new JO,{pos:i,p:r}=e;return n.start=i,n.end=Math.min(i+1,r.stream.end),n.value=i==r.stream.end?r.parser.eofTerm:0,n}updateCachedToken(e,n,i){let r=this.stream.clipPos(i.pos);if(n.token(this.stream.reset(r,e),i),e.value>-1){let{parser:s}=i.p;for(let a=0;a<s.specialized.length;a++)if(s.specialized[a]==e.value){let c=s.specializers[a](this.stream.read(e.start,e.end),i);if(c>=0&&i.p.parser.dialect.allows(c>>1)){(c&1)==0?e.value=c>>1:e.extended=c>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,n,i,r){for(let s=0;s<r;s+=3)if(this.actions[s]==e)return r;return this.actions[r++]=e,this.actions[r++]=n,this.actions[r++]=i,r}addActions(e,n,i,r){let{state:s}=e,{parser:a}=e.p,{data:c}=a;for(let u=0;u<2;u++)for(let h=a.stateSlot(s,u?2:1);;h+=3){if(c[h]==65535)if(c[h+1]==1)h=va(c,h+2);else{r==0&&c[h+1]==2&&(r=this.putAction(va(c,h+2),n,i,r));break}c[h]==n&&(r=this.putAction(va(c,h+1),n,i,r))}return r}}class Cse{constructor(e,n,i,r){this.parser=e,this.input=n,this.ranges=r,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new Ese(n,r),this.tokens=new kse(e,this.stream),this.topTerm=e.top[1];let{from:s}=r[0];this.stacks=[Xb.start(this,e.top[0],s)],this.fragments=i.length&&this.stream.end-s>e.bufferLength*4?new Tse(i,e.minRepeatTerm):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,i=this.stacks=[],r,s;if(this.bigReductionCount>300&&e.length==1){let[a]=e;for(;a.forceReduce()&&a.stack.length&&a.stack[a.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;a<e.length;a++){let c=e[a];for(;;){if(this.tokens.mainToken=null,c.pos>n)i.push(c);else{if(this.advanceStack(c,i,e))continue;{r||(r=[],s=[]),r.push(c);let u=this.tokens.getMainToken(c);s.push(u.value,u.end)}}break}}if(!i.length){let a=r&&Rse(r);if(a)return zr&&console.log("Finish with "+this.stackID(a)),this.stackToTree(a);if(this.parser.strict)throw zr&&r&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&r){let a=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,s,i);if(a)return zr&&console.log("Force-finish "+this.stackID(a)),this.stackToTree(a.forceAll())}if(this.recovering){let a=this.recovering==1?1:this.recovering*3;if(i.length>a)for(i.sort((c,u)=>u.score-c.score);i.length>a;)i.pop();i.some(c=>c.reducePos>n)&&this.recovering--}else if(i.length>1){e:for(let a=0;a<i.length-1;a++){let c=i[a];for(let u=a+1;u<i.length;u++){let h=i[u];if(c.sameState(h)||c.buffer.length>500&&h.buffer.length>500)if((c.score-h.score||c.buffer.length-h.buffer.length)>0)i.splice(u--,1);else{i.splice(a--,1);continue e}}}i.length>12&&(i.sort((a,c)=>c.score-a.score),i.splice(12,i.length-12))}this.minStackPos=i[0].pos;for(let a=1;a<i.length;a++)i[a].pos<this.minStackPos&&(this.minStackPos=i[a].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}tryReuse(e,n,i,r){if(!i)return null;let s=e.curContext&&e.curContext.tracker.strict,a=s?e.curContext.hash:0;for(;i;){let c=this.parser.nodeSet.types[i.type.id]!=i.type?-1:this.parser.getGoto(e.state,i.type.id);if(c>-1&&i.length&&(!s||(i.prop(lt.contextHash)||0)==a))return e.useNode(i,c,n),i;if(i.children.length==0||i.positions[0]>0)break;let u=i.children[0];if(u instanceof Et&&(!r||u.type.id>=this.parser.minRepeatTerm))i=u;else break}return null}advanceStack(e,n,i){let r=e.pos,{parser:s}=this,a=zr?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let h=e.reducePos<r&&e.buffer.length&&e.buffer[e.buffer.length-2]<=e.reducePos&&this.fragments.lastRepeatPos==e.reducePos&&this.tryReuse(e,e.reducePos,this.fragments.lastRepeat,!0)||this.tryReuse(e,r,this.fragments.nodeAt(r),!1);if(h)return zr&&console.log(a+this.stackID(e)+` (via reuse of ${s.getName(h.type.id)})`),!0}let c=s.stateSlot(e.state,4);if(c>0)return e.reduce(c),zr&&console.log(a+this.stackID(e)+` (via always-reduce ${s.getName(c&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let u=this.tokens.getActions(e);for(let h=0;h<u.length;){let d=u[h++],m=u[h++],g=u[h++],y=h==u.length||!i,v=y?e:e.split(),S=this.tokens.mainToken;if(v.apply(d,m,S?S.start:v.pos,g),zr&&console.log(a+this.stackID(v)+` (via ${(d&65536)==0?"shift":`reduce of ${s.getName(d&65535)}`} for ${s.getName(m)} @ ${r}${v==e?"":", split"})`),y)return!0;v.pos>r?n.push(v):i.push(v)}return!1}advanceFully(e,n){let i=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>i)return iD(e,n),!0}}runRecovery(e,n,i){let r=null,s=!1;for(let a=0;a<e.length;a++){let c=e[a],u=n[a<<1],h=n[(a<<1)+1],d=zr?this.stackID(c)+" -> ":"";if(c.deadEnd&&(s||(s=!0,c.restart(),zr&&console.log(d+this.stackID(c)+" (restarted)"),this.advanceFully(c,i))))continue;let m=c.split(),g=d;for(let y=0;y<10&&m.forceReduce()&&(zr&&console.log(g+this.stackID(m)+" (via force-reduce)"),!this.advanceFully(m,i));y++)zr&&(g=this.stackID(m)+" -> ");for(let y of c.recoverByInsert(u))zr&&console.log(d+this.stackID(y)+" (via recover-insert)"),this.advanceFully(y,i);this.stream.end>c.pos?(h==c.pos&&(h++,u=0),c.recoverByDelete(u,h),zr&&console.log(d+this.stackID(c)+` (via recover-delete ${this.parser.getName(u)})`),iD(c,i)):(!r||r.score<m.score)&&(r=m)}return r}stackToTree(e){return e.close(),Et.build({buffer:Ub.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let n=(mx||(mx=new WeakMap)).get(e);return n||mx.set(e,n=String.fromCodePoint(this.nextStackID++)),n+e}}function iD(t,e){for(let n=0;n<e.length;n++){let i=e[n];if(i.pos==t.pos&&i.sameState(t)){e[n].score<t.score&&(e[n]=t);return}}e.push(t)}class Ase{constructor(e,n,i){this.source=e,this.flags=n,this.disabled=i}allows(e){return!this.disabled||this.disabled[e]==0}}const gx=t=>t;class eU{constructor(e){this.start=e.start,this.shift=e.shift||gx,this.reduce=e.reduce||gx,this.reuse=e.reuse||gx,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class fh extends Sy{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let c=0;c<e.repeatNodeCount;c++)n.push("");let i=Object.keys(e.topRules).map(c=>e.topRules[c][1]),r=[];for(let c=0;c<n.length;c++)r.push([]);function s(c,u,h){r[c].push([u,u.deserialize(String(h))])}if(e.nodeProps)for(let c of e.nodeProps){let u=c[0];typeof u=="string"&&(u=lt[u]);for(let h=1;h<c.length;){let d=c[h++];if(d>=0)s(d,u,c[h++]);else{let m=c[h+-d];for(let g=-d;g>0;g--)s(c[h++],u,m);h++}}}this.nodeSet=new xh(n.map((c,u)=>Jn.define({name:u>=this.minRepeatTerm?void 0:c,id:u,props:r[u],top:i.indexOf(u)>-1,error:u==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(u)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=Kz;let a=Gd(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let c=0;c<this.specializerSpecs.length;c++)this.specialized[c]=this.specializerSpecs[c].term;this.specializers=this.specializerSpecs.map(rD),this.states=Gd(e.states,Uint32Array),this.data=Gd(e.stateData),this.goto=Gd(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(c=>typeof c=="number"?new Mf(a,c):c),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,i){let r=new Cse(this,e,n,i);for(let s of this.wrappers)r=s(r,e,n,i);return r}getGoto(e,n,i=!1){let r=this.goto;if(n>=r[0])return-1;for(let s=r[n+1];;){let a=r[s++],c=a&1,u=r[s++];if(c&&i)return u;for(let h=s+(a>>1);s<h;s++)if(r[s]==e)return u;if(c)return-1}}hasAction(e,n){let i=this.data;for(let r=0;r<2;r++)for(let s=this.stateSlot(e,r?2:1),a;;s+=3){if((a=i[s])==65535)if(i[s+1]==1)a=i[s=va(i,s+2)];else{if(i[s+1]==2)return va(i,s+2);break}if(a==n||a==0)return va(i,s+1)}return 0}stateSlot(e,n){return this.states[e*6+n]}stateFlag(e,n){return(this.stateSlot(e,0)&n)>0}validAction(e,n){return!!this.allActions(e,i=>i==n?!0:null)}allActions(e,n){let i=this.stateSlot(e,4),r=i?n(i):void 0;for(let s=this.stateSlot(e,1);r==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=va(this.data,s+2);else break;r=n(va(this.data,s+1))}return r}nextStates(e){let n=[];for(let i=this.stateSlot(e,1);;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=va(this.data,i+2);else break;if((this.data[i+2]&1)==0){let r=this.data[i+1];n.some((s,a)=>a&1&&s==r)||n.push(this.data[i],r)}}return n}configure(e){let n=Object.assign(Object.create(fh.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let i=this.topRules[e.top];if(!i)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=i}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(i=>{let r=e.tokenizers.find(s=>s.from==i);return r?r.to:i})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((i,r)=>{let s=e.specializers.find(c=>c.from==i.external);if(!s)return i;let a=Object.assign(Object.assign({},i),{external:s.to});return n.specializers[r]=rD(a),a})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),i=n.map(()=>!1);if(e)for(let s of e.split(" ")){let a=n.indexOf(s);a>=0&&(i[a]=!0)}let r=null;for(let s=0;s<n.length;s++)if(!i[s])for(let a=this.dialects[n[s]],c;(c=this.data[a++])!=65535;)(r||(r=new Uint8Array(this.maxTerm+1)))[c]=1;return new Ase(e,i,r)}static deserialize(e){return new fh(e)}}function va(t,e){return t[e]|t[e+1]<<16}function Rse(t){let e=null;for(let n of t){let i=n.p.stoppedAt;(n.pos==n.p.stream.end||i!=null&&n.pos>i)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.score<n.score)&&(e=n)}return e}function rD(t){if(t.external){let e=t.extend?1:0;return(n,i)=>t.external(n,i)<<1|e}return t.get}const Pse=55,Mse=1,Nse=56,Qse=2,$se=57,Dse=3,sD=4,Lse=5,ZT=6,tU=7,nU=8,iU=9,rU=10,Ise=11,jse=12,Bse=13,Ox=58,zse=14,Xse=15,oD=59,sU=21,Use=23,oU=24,Zse=25,SE=27,aU=28,Vse=29,qse=32,Yse=35,Gse=37,Fse=38,Hse=0,Wse=1,Kse={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},Jse={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},aD={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function eoe(t){return t==45||t==46||t==58||t>=65&&t<=90||t==95||t>=97&&t<=122||t>=161}let lD=null,cD=null,uD=0;function xE(t,e){let n=t.pos+e;if(uD==n&&cD==t)return lD;let i=t.peek(e),r="";for(;eoe(i);)r+=String.fromCharCode(i),i=t.peek(++e);return cD=t,uD=n,lD=r?r.toLowerCase():i==toe||i==noe?void 0:null}const lU=60,Vb=62,VT=47,toe=63,noe=33,ioe=45;function fD(t,e){this.name=t,this.parent=e}const roe=[ZT,rU,tU,nU,iU],soe=new eU({start:null,shift(t,e,n,i){return roe.indexOf(e)>-1?new fD(xE(i,1)||"",t):t},reduce(t,e){return e==sU&&t?t.parent:t},reuse(t,e,n,i){let r=e.type.id;return r==ZT||r==Gse?new fD(xE(i,1)||"",t):t},strict:!1}),ooe=new Wr((t,e)=>{if(t.next!=lU){t.next<0&&e.context&&t.acceptToken(Ox);return}t.advance();let n=t.next==VT;n&&t.advance();let i=xE(t,0);if(i===void 0)return;if(!i)return t.acceptToken(n?Xse:zse);let r=e.context?e.context.name:null;if(n){if(i==r)return t.acceptToken(Ise);if(r&&Jse[r])return t.acceptToken(Ox,-2);if(e.dialectEnabled(Hse))return t.acceptToken(jse);for(let s=e.context;s;s=s.parent)if(s.name==i)return;t.acceptToken(Bse)}else{if(i=="script")return t.acceptToken(tU);if(i=="style")return t.acceptToken(nU);if(i=="textarea")return t.acceptToken(iU);if(Kse.hasOwnProperty(i))return t.acceptToken(rU);r&&aD[r]&&aD[r][i]?t.acceptToken(Ox,-1):t.acceptToken(ZT)}},{contextual:!0}),aoe=new Wr(t=>{for(let e=0,n=0;;n++){if(t.next<0){n&&t.acceptToken(oD);break}if(t.next==ioe)e++;else if(t.next==Vb&&e>=2){n>=3&&t.acceptToken(oD,-2);break}else e=0;t.advance()}});function loe(t){for(;t;t=t.parent)if(t.name=="svg"||t.name=="math")return!0;return!1}const coe=new Wr((t,e)=>{if(t.next==VT&&t.peek(1)==Vb){let n=e.dialectEnabled(Wse)||loe(e.context);t.acceptToken(n?Lse:sD,2)}else t.next==Vb&&t.acceptToken(sD,1)});function qT(t,e,n){let i=2+t.length;return new Wr(r=>{for(let s=0,a=0,c=0;;c++){if(r.next<0){c&&r.acceptToken(e);break}if(s==0&&r.next==lU||s==1&&r.next==VT||s>=2&&s<i&&r.next==t.charCodeAt(s-2))s++,a++;else if(s==i&&r.next==Vb){c>a?r.acceptToken(e,-a):r.acceptToken(n,-(a-2));break}else if((r.next==10||r.next==13)&&c){r.acceptToken(e,1);break}else s=a=0;r.advance()}})}const uoe=qT("script",Pse,Mse),foe=qT("style",Nse,Qse),hoe=qT("textarea",$se,Dse),doe=wh({"Text RawText IncompleteTag IncompleteCloseTag":L.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":L.angleBracket,TagName:L.tagName,"MismatchedCloseTag/TagName":[L.tagName,L.invalid],AttributeName:L.attributeName,"AttributeValue UnquotedAttributeValue":L.attributeValue,Is:L.definitionOperator,"EntityReference CharacterReference":L.character,Comment:L.blockComment,ProcessingInst:L.processingInstruction,DoctypeDecl:L.documentMeta}),poe=fh.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&rObO'#C|O&}ObO,59]OOOd'#Da'#DaO'VOdO'#DPO'bOdO,59]OOO`'#Db'#DbO'jO!rO,59]O'qQ#tO'#DSOOO`,59],59]OOOp'#Dc'#DcO'vO$fO,59pOOO`,59p,59pO(OQ#|O,59rO(TQ#|O,59sOOO`-E7X-E7XO(YQ&rO'#CtOOQW'#D['#D[O(hQ&rO1G.xOOOa1G.x1G.xOOO`1G/Z1G/ZO(sQ&rO1G/ROOOb1G/R1G/RO)OQ&rO1G/UOOOd1G/U1G/UO)ZQ&rO1G/XOOO`1G/X1G/XO)fQ&rO1G/ZOOOa-E7]-E7]O)qQ#tO'#CzOOO`1G.w1G.wOOOb-E7^-E7^O)vQ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aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:68,context:soe,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,22,31,34,37,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,30,33,36,38,"OpenTag"],["group",-10,14,15,18,19,20,21,40,41,42,43,"Entity",17,"Entity TextContent",-3,29,32,35,"TextContent Entity"],["isolate",-11,22,30,31,33,34,36,37,38,39,42,43,"ltr",-3,27,28,40,""]],propSources:[doe],skippedNodes:[0],repeatNodeCount:9,tokenData:"!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P-_!P!Q$q!Q![-_![!]Mz!]!^-_!^!_!$S!_!`!;x!`!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f%W-_%W%oMz%o%p-_%p&aMz&a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;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXjSaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[uoe,foe,hoe,coe,ooe,aoe,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function cU(t,e){let n=Object.create(null);for(let i of t.getChildren(oU)){let r=i.getChild(Zse),s=i.getChild(SE)||i.getChild(aU);r&&(n[e.read(r.from,r.to)]=s?s.type.id==SE?e.read(s.from+1,s.to-1):e.read(s.from,s.to):"")}return n}function hD(t,e){let n=t.getChild(Use);return n?e.read(n.from,n.to):" "}function bx(t,e,n){let i;for(let r of n)if(!r.attrs||r.attrs(i||(i=cU(t.node.parent.firstChild,e))))return{parser:r.parser,bracketed:!0};return null}function uU(t=[],e=[]){let n=[],i=[],r=[],s=[];for(let c of t)(c.tag=="script"?n:c.tag=="style"?i:c.tag=="textarea"?r:s).push(c);let a=e.length?Object.create(null):null;for(let c of e)(a[c.name]||(a[c.name]=[])).push(c);return i5((c,u)=>{let h=c.type.id;if(h==Vse)return bx(c,u,n);if(h==qse)return bx(c,u,i);if(h==Yse)return bx(c,u,r);if(h==sU&&s.length){let d=c.node,m=d.firstChild,g=m&&hD(m,u),y;if(g){for(let v of s)if(v.tag==g&&(!v.attrs||v.attrs(y||(y=cU(m,u))))){let S=d.lastChild,x=S.type.id==Fse?S.from:d.to;if(x>m.to)return{parser:v.parser,overlay:[{from:m.to,to:x}]}}}}if(a&&h==oU){let d=c.node,m;if(m=d.firstChild){let g=a[u.read(m.from,m.to)];if(g)for(let y of g){if(y.tagName&&y.tagName!=hD(d.parent,u))continue;let v=d.lastChild;if(v.type.id==SE){let S=v.from+1,x=v.lastChild,w=v.to-(x&&x.isError?0:1);if(w>S)return{parser:y.parser,overlay:[{from:S,to:w}],bracketed:!0}}else if(v.type.id==aU)return{parser:y.parser,overlay:[{from:v.from,to:v.to}]}}}}return null})}const moe=148,dD=1,goe=149,Ooe=150,fU=2,boe=151,yoe=3,voe=4,Soe=152,hU=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],xoe=58,woe=40,dU=95,Eoe=91,eb=45,_oe=46,Toe=35,koe=37,Coe=38,Aoe=92,Roe=10,Poe=42;function Dp(t){return t>=65&&t<=90||t>=97&&t<=122||t>=161}function YT(t){return t>=48&&t<=57}function pD(t){return YT(t)||t>=97&&t<=102||t>=65&&t<=70}const pU=(t,e,n)=>(i,r)=>{for(let s=!1,a=0,c=0;;c++){let{next:u}=i;if(Dp(u)||u==eb||u==dU||s&&YT(u))!s&&(u!=eb||c>0)&&(s=!0),a===c&&u==eb&&a++,i.advance();else if(u==Aoe&&i.peek(1)!=Roe){if(i.advance(),pD(i.next)){do i.advance();while(pD(i.next));i.next==32&&i.advance()}else i.next>-1&&i.advance();s=!0}else{s&&i.acceptToken(a>=2&&r.canShift(fU)?e:u==woe?n:t);break}}},Moe=new Wr(pU(goe,fU,Ooe),{contextual:!0}),Noe=new Wr(pU(boe,yoe,voe),{contextual:!0}),Qoe=new Wr(t=>{if(hU.includes(t.peek(-1))){let{next:e}=t;(Dp(e)||e==dU||e==Toe||e==_oe||e==Poe||e==Eoe||e==xoe&&Dp(t.peek(1))||e==eb||e==Coe)&&t.acceptToken(moe)}}),$oe=new Wr(t=>{if(!hU.includes(t.peek(-1))){let{next:e}=t;if(e==koe&&(t.advance(),t.acceptToken(dD)),Dp(e)){do t.advance();while(Dp(t.next)||YT(t.next));t.acceptToken(dD)}}});function mD(t){let e=t.length;return(e==4||e==5||e==7||e==9)&&/^#[a-f\d]+$/i.test(t)?Soe:-1}const Doe=wh({"AtKeyword import charset namespace keyframes media supports font-feature-values":L.definitionKeyword,"from to selector scope MatchFlag":L.keyword,NamespaceName:L.namespace,KeyframeName:L.labelName,KeyframeRangeName:L.operatorKeyword,TagName:L.tagName,ClassName:L.className,PseudoClassName:L.constant(L.className),IdName:L.labelName,"FeatureName PropertyName":L.propertyName,AttributeName:L.attributeName,NumberLiteral:L.number,KeywordQuery:L.keyword,UnaryQueryOp:L.operatorKeyword,"CallTag ValueName FontName":L.atom,VariableName:L.variableName,Callee:L.operatorKeyword,Unit:L.unit,"UniversalSelector NestingSelector":L.definitionOperator,"MatchOp CompareOp":L.compareOperator,"ChildOp SiblingOp, LogicOp":L.logicOperator,BinOp:L.arithmeticOperator,Important:L.modifier,Comment:L.blockComment,ColorLiteral:L.color,"ParenthesizedContent StringLiteral":L.string,":":L.punctuation,PseudoOp:L.derefOperator,"; , |":L.separator,"( )":L.paren,"[ ]":L.squareBracket,"{ }":L.brace}),Loe={__proto__:null,lang:44,"nth-child":44,"nth-last-child":44,"nth-of-type":44,"nth-last-of-type":44,dir:44,"host-context":44,if:88,url:158,"url-prefix":158,domain:158,regexp:158},Ioe={__proto__:null,or:102,and:102,not:112,only:112,layer:212},joe={__proto__:null,selector:118,style:124,layer:208},Boe={__proto__:null,"@import":204,"@media":216,"@charset":220,"@namespace":224,"@keyframes":230,"@supports":242,"@scope":246,"@font-feature-values":252},zoe={__proto__:null,to:249},Xoe=fh.deserialize({version:14,states:"MrQYQdOOO$TQdOOP$[O`OOO%XQaO'#CfOOQP'#Ce'#CeO%`QdO'#CgO%eQ`O'#CgO%jQaO'#FrO&eQdO'#CkO'XQaO'#CcO'cQdO'#CnOOQP'#ES'#ESOOQP'#ER'#ERO'nQdO'#ETO'yQdO'#E[O'yQdO'#E_OOQP'#Fr'#FrO)`QhO'#FQOOQS'#Fq'#FqOOQS'#FT'#FTQYQdOOO)gQdO'#EeO*vQhO'#EkO)gQdO'#EmO*}QdO'#EoO+YQdO'#ErO*[QhO'#ExO+bQdO'#EzO+mQdO'#E}O+rQaO'#CfO+yQ`O'#EbO,OQ`O'#GPO,ZQdO'#GPQOQ`OOP,eO&jO'#CaPOO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kdp%PR%P#[Q%]#p[&l%]&r'i'r'x(bQ&r%aQ'i&mQ'r&wQ'x'OR(b(VQ$[!mQ$^!nQ$`!oV%v$[$^$`Q&Q$iR'X&QQ&v%iS'q&v(WR(W'rQ&n%]R'j&nQ&j%YR'h&jQ!RXR#l!RQ&d${R'c&dQ#]oS%Q#]%RR%R#^Q'z'RR(]'zQ$m!yR&U$mQ&]$rR'_&]Q']&[R(R']Q#XlR$y#XQ$P!cR%f$P_cOPdp!S#[%P^XOPdp!S#[%PQ!_^Q!`_Q#h}Q#i!OQ#j!PQ#k!QQ$u#SQ%Y#oR'g&iR%^#pQ!reQ!{g[$X!m!n!o$[$^$`Q${#Zh%[#p%]%a&m&r&w'O'i'r'x(V(bQ%`#uQ%z$cS&b${&dQ&h%WQ'b&cR'|'T]$Z!m!n!o$[$^$`Q!caU!yf!r$gQ#RjQ#x!bS#|!c$PQ$R!dQ%d#}Q%e$OQ%i$SS&O$i&QQ&T$lR'o&uQ#{!bW%s$W%m&z'uQ&t%bQ'w&}Q(U'mR(d(ZQ%u$WQ&y%mQ't&zR(Y'uR%k$SR%Z#oQqPR#n!SQ!zfQ$f!rR%}$g",nodeNames:"⚠ Unit VariableName VariableName QueryCallee Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NamespacedTagSelector NamespaceName TagName NestingSelector ClassSelector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue AtKeyword ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery ColorLiteral CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector StyleQuery style ParenthesedQuery CallQuery ArgList PropertyName , PropertyName UnaryQuery ParenthesedQuery BinaryQuery ParenthesedQuery ParenthesedQuery StyleFeature PropertyName StyleRange PseudoQuery CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName NamespacedAttribute NamespaceName AttributeName MatchOp MatchFlag ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to FontFeatureStatement font-feature-values FontName AtRule Styles",maxTerm:176,nodeProps:[["isolate",-2,5,38,""],["openedBy",23,"(",30,"[",33,"{"],["closedBy",24,")",31,"]",34,"}"]],propSources:[Doe],skippedNodes:[0,5,130],repeatNodeCount:17,tokenData:"IO~R!bOX%ZX^&R^p%Zpq&Rqr)ers)vst+jtu/wuv%Zvw0qwx1Sxy2qyz3Sz{3X{|3r|}8e}!O8v!O!P9e!P!Q9|!Q![:u![!];p!]!^<l!^!_<}!_!`=y!`!a>^!a!b%Z!b!c?_!c!k%Z!k!lAl!l!u%Z!u!vAl!v!}%Z!}#OA}#O#P%Z#P#QB`#Q#R/w#R#]%Z#]#^Bq#^#g%Z#g#hAl#h#o%Z#o#pGU#p#qGg#q#rHO#r#sHa#s#y%Z#y#z&R#z$f%Z$f$g&R$g#BY%Z#BY#BZ&R#BZ$IS%Z$IS$I_&R$I_$I|%Z$I|$JO&R$JO$JT%Z$JT$JU&R$JU$KV%Z$KV$KW&R$KW&FU%Z&FU&FV&R&FV;'S%Z;'S;=`Hx<%lO%Z`%^SOy%jz;'S%j;'S;=`%{<%lO%j`%oS!r`Oy%jz;'S%j;'S;=`%{<%lO%j`&OP;=`<%l%j~&Wh$`~OX%jX^'r^p%jpq'rqy%jz#y%j#y#z'r#z$f%j$f$g'r$g#BY%j#BY#BZ'r#BZ$IS%j$IS$I_'r$I_$I|%j$I|$JO'r$JO$JT%j$JT$JU'r$JU$KV%j$KV$KW'r$KW&FU%j&FU&FV'r&FV;'S%j;'S;=`%{<%lO%j~'yh$`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>joe[t]||-1},{term:28,get:t=>Boe[t]||-1},{term:149,get:t=>zoe[t]||-1}],tokenPrec:2433});let yx=null;function vx(){if(!yx&&typeof document=="object"&&document.body){let{style:t}=document.body,e=[],n=new Set;for(let i in t)i!="cssText"&&i!="cssFloat"&&typeof t[i]=="string"&&(/[A-Z]/.test(i)&&(i=i.replace(/[A-Z]/g,r=>"-"+r.toLowerCase())),n.has(i)||(e.push(i),n.add(i)));yx=e.sort().map(i=>({type:"property",label:i,apply:i+": "}))}return yx||[]}const gD=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(t=>({type:"class",label:t})),OD=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(t=>({type:"keyword",label:t})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(t=>({type:"constant",label:t}))),Uoe=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(t=>({type:"type",label:t})),Zoe=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(t=>({type:"keyword",label:t})),pa=/^(\w[\w-]*|-\w[\w-]*|)$/,Voe=/^-(-[\w-]*)?$/;function qoe(t,e){var n;if((t.name=="("||t.type.isError)&&(t=t.parent||t),t.name!="ArgList")return!1;let i=(n=t.parent)===null||n===void 0?void 0:n.firstChild;return(i==null?void 0:i.name)!="Callee"?!1:e.sliceString(i.from,i.to)=="var"}const bD=new n5,Yoe=["Declaration"];function Goe(t){for(let e=t;;){if(e.type.isTop)return e;if(!(e=e.parent))return t}}function mU(t,e,n){if(e.to-e.from>4096){let i=bD.get(e);if(i)return i;let r=[],s=new Set,a=e.cursor(It.IncludeAnonymous);if(a.firstChild())do for(let c of mU(t,a.node,n))s.has(c.label)||(s.add(c.label),r.push(c));while(a.nextSibling());return bD.set(e,r),r}else{let i=[],r=new Set;return e.cursor().iterate(s=>{var a;if(n(s)&&s.matchContext(Yoe)&&((a=s.node.nextSibling)===null||a===void 0?void 0:a.name)==":"){let c=t.sliceString(s.from,s.to);r.has(c)||(r.add(c),i.push({label:c,type:"variable"}))}}),i}}const gU=t=>e=>{let{state:n,pos:i}=e,r=rn(n).resolveInner(i,-1),s=r.type.isError&&r.from==r.to-1&&n.doc.sliceString(r.from,r.to)=="-";if(r.name=="PropertyName"||(s||r.name=="TagName")&&/^(Block|Styles)$/.test(r.resolve(r.to).name))return{from:r.from,options:vx(),validFor:pa};if(r.name=="ValueName")return{from:r.from,options:OD,validFor:pa};if(r.name=="PseudoClassName")return{from:r.from,options:gD,validFor:pa};if(t(r)||(e.explicit||s)&&qoe(r,n.doc))return{from:t(r)||s?r.from:i,options:mU(n.doc,Goe(r),t),validFor:Voe};if(r.name=="TagName"){for(let{parent:u}=r;u;u=u.parent)if(u.name=="Block")return{from:r.from,options:vx(),validFor:pa};return{from:r.from,options:Uoe,validFor:pa}}if(r.name=="AtKeyword")return{from:r.from,options:Zoe,validFor:pa};if(!e.explicit)return null;let a=r.resolve(i),c=a.childBefore(i);return c&&c.name==":"&&a.name=="PseudoClassSelector"?{from:i,options:gD,validFor:pa}:c&&c.name==":"&&a.name=="Declaration"||a.name=="ArgList"?{from:i,options:OD,validFor:pa}:a.name=="Block"||a.name=="Styles"?{from:i,options:vx(),validFor:pa}:null},OU=gU(t=>t.name=="VariableName"),Lp=oh.define({name:"css",parser:Xoe.configure({props:[_h.add({Declaration:WO()}),Th.add({"Block KeyframeList":f5})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function bU(){return new lh(Lp,Lp.data.of({autocomplete:OU}))}const Foe=Object.freeze(Object.defineProperty({__proto__:null,css:bU,cssCompletionSource:OU,cssLanguage:Lp,defineCSSCompletionSource:gU},Symbol.toStringTag,{value:"Module"})),Hoe=317,Woe=318,yD=1,Koe=2,Joe=3,eae=4,tae=319,nae=321,iae=322,rae=5,sae=6,oae=0,wE=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],yU=125,aae=59,EE=47,lae=42,cae=43,uae=45,fae=60,hae=44,dae=63,pae=46,mae=91,gae=new eU({start:!1,shift(t,e){return e==rae||e==sae||e==nae?t:e==iae},strict:!1}),Oae=new Wr((t,e)=>{let{next:n}=t;(n==yU||n==-1||e.context)&&t.acceptToken(tae)},{contextual:!0,fallback:!0}),bae=new Wr((t,e)=>{let{next:n}=t,i;wE.indexOf(n)>-1||n==EE&&((i=t.peek(1))==EE||i==lae)||n!=yU&&n!=aae&&n!=-1&&!e.context&&t.acceptToken(Hoe)},{contextual:!0}),yae=new Wr((t,e)=>{t.next==mae&&!e.context&&t.acceptToken(Woe)},{contextual:!0}),vae=new Wr((t,e)=>{let{next:n}=t;if(n==cae||n==uae){if(t.advance(),n==t.next){t.advance();let i=!e.context&&e.canShift(yD);t.acceptToken(i?yD:Koe)}}else n==dae&&t.peek(1)==pae&&(t.advance(),t.advance(),(t.next<48||t.next>57)&&t.acceptToken(Joe))},{contextual:!0});function Sx(t,e){return t>=65&&t<=90||t>=97&&t<=122||t==95||t>=192||!e&&t>=48&&t<=57}const Sae=new Wr((t,e)=>{if(t.next!=fae||!e.dialectEnabled(oae)||(t.advance(),t.next==EE))return;let n=0;for(;wE.indexOf(t.next)>-1;)t.advance(),n++;if(Sx(t.next,!0)){for(t.advance(),n++;Sx(t.next,!1);)t.advance(),n++;for(;wE.indexOf(t.next)>-1;)t.advance(),n++;if(t.next==hae)return;for(let i=0;;i++){if(i==7){if(!Sx(t.next,!0))return;break}if(t.next!="extends".charCodeAt(i))break;t.advance(),n++}}t.acceptToken(eae,-n)}),xae=wh({"get set async static":L.modifier,"for while do if else switch try catch finally return throw break continue default case defer":L.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":L.operatorKeyword,"let var const using function class extends":L.definitionKeyword,"import export from":L.moduleKeyword,"with debugger new":L.keyword,TemplateString:L.special(L.string),super:L.atom,BooleanLiteral:L.bool,this:L.self,null:L.null,Star:L.modifier,VariableName:L.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":L.function(L.variableName),VariableDefinition:L.definition(L.variableName),Label:L.labelName,PropertyName:L.propertyName,PrivatePropertyName:L.special(L.propertyName),"CallExpression/MemberExpression/PropertyName":L.function(L.propertyName),"FunctionDeclaration/VariableDefinition":L.function(L.definition(L.variableName)),"ClassDeclaration/VariableDefinition":L.definition(L.className),"NewExpression/VariableName":L.className,PropertyDefinition:L.definition(L.propertyName),PrivatePropertyDefinition:L.definition(L.special(L.propertyName)),UpdateOp:L.updateOperator,"LineComment Hashbang":L.lineComment,BlockComment:L.blockComment,Number:L.number,String:L.string,Escape:L.escape,ArithOp:L.arithmeticOperator,LogicOp:L.logicOperator,BitOp:L.bitwiseOperator,CompareOp:L.compareOperator,RegExp:L.regexp,Equals:L.definitionOperator,Arrow:L.function(L.punctuation),": Spread":L.punctuation,"( )":L.paren,"[ ]":L.squareBracket,"{ }":L.brace,"InterpolationStart InterpolationEnd":L.special(L.brace),".":L.derefOperator,", ;":L.separator,"@":L.meta,TypeName:L.typeName,TypeDefinition:L.definition(L.typeName),"type enum interface implements namespace module declare":L.definitionKeyword,"abstract global Privacy readonly override":L.modifier,"is keyof unique infer asserts":L.operatorKeyword,JSXAttributeValue:L.attributeValue,JSXText:L.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":L.angleBracket,"JSXIdentifier JSXNameSpacedName":L.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":L.attributeName,"JSXBuiltin/JSXIdentifier":L.standard(L.tagName)}),wae={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:237,private:237,protected:237,readonly:239,instanceof:258,satisfies:261,import:294,keyof:351,unique:355,infer:361,asserts:397,is:399,abstract:419,implements:421,type:423,let:426,var:428,using:431,interface:437,enum:441,namespace:447,module:449,declare:453,global:457,defer:473,for:478,of:487,while:490,with:494,do:498,if:502,else:504,switch:508,case:514,try:520,catch:524,finally:528,return:532,throw:536,break:540,continue:544,debugger:548},Eae={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:403},_ae={__proto__:null,"<":193},Tae=fh.deserialize({version:14,states:"$GSQ%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Im'#ImO1XQ`O'#GtO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JsO6[Q!0MxO'#JtO6uQ`O'#F^O6zQ,UO'#FuOOQ!0Lf'#Fg'#FgO7VO7dO'#FgO9XQMhO'#F}O9`Q`O'#F|OOQ!0Lf'#Jt'#JtOOQ!0Lb'#Js'#JsO9eQ`O'#GxOOQ['#K`'#K`O9pQ`O'#IZO9uQ!0LrO'#I[OOQ['#Ja'#JaOOQ['#I`'#I`Q`QlOOQ`QlOOO9}Q!L^O'#DvO:UQlO'#EOO:]QlO'#EQO9kQ`O'#GtO:dQMhO'#CoO:rQ`O'#EnO:}Q`O'#EzO;hQMhO'#FfO;xQ`O'#GtOOQO'#Ka'#KaO;}Q`O'#KaO<]Q`O'#G|O<]Q`O'#G}O<]Q`O'#HPO9kQ`O'#HSO=SQ`O'#HVO>kQ`O'#CeO>{Q`O'#HdO?TQ`O'#HjO?TQ`O'#HlO`QlO'#HnO?TQ`O'#HpO?TQ`O'#HsO?YQ`O'#HyO?_Q!0LsO'#IPO%[QlO'#IRO?jQ!0LsO'#ITO?uQ!0LsO'#IVO9uQ!0LrO'#IXO@QQ!0MxO'#CiOASQpO'#DlQOQ`OOO%[QlO'#EQOAjQ`O'#ETO:dQMhO'#EnOAuQ`O'#EnOBQQ!bO'#FfOOQ['#C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$x*cQ/v*_Q2W,qQ2m-WQ4b/rQ6s2fQ7u4cQ9Y6tT=n'X+^V#aW%h*ZU#`W%h*ZS(V#W(_U([#Z+[/oS-]'X+^T.Q(U.VV'_!e%i*[Q$lfR)y$qT)n$l)oR4X/WT*`$x*cT*i${*ZQ0y+hQ1i,XQ3a.hQ5v1kQ6R1sQ7Z3eQ8t6UQ9e7YQ:`8sQ:r9dQ;]:bQ;e:tQ;p;^R;s;fnqOXst!Z#d%m&r&t&u&w,u,z2^2aQ&l!VR,j&itmOXst!U!V!Z#d%m&i&r&t&u&w,u,z2^2aR,q&oT%lm,qR1m,ZR,i&gQ&U|S,P&V&WR1`,QR+u&PT&p!W&sT&q!W&sT2`,z2a",nodeNames:"⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty VariableDefinition Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:381,context:gae,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,208,212,216,217,219,222,225,235,238,244,246,248,250,253,259,265,267,269,271,273,275,276,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,121,122,137,140,142,143,144,145,146,148,149,168,170,172,"Expression",-23,31,33,37,41,43,45,174,176,178,179,181,182,183,185,186,187,189,190,191,202,204,206,207,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,"<",38,"InterpolationStart",56,"[",60,"{",73,"(",161,"JSXStartCloseTag"],["closedBy",-2,24,169,">",40,"InterpolationEnd",50,"]",61,"}",74,")",166,"JSXEndTag"]],propS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15205}),GT=[br("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),br("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),br("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),br("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),br("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),br(`try {
78
+ \${}
79
+ } catch (\${error}) {
80
+ \${}
81
+ }`,{label:"try",detail:"/ catch block",type:"keyword"}),br("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),br(`if (\${}) {
82
+ \${}
83
+ } else {
84
+ \${}
85
+ }`,{label:"if",detail:"/ else block",type:"keyword"}),br(`class \${name} {
86
+ constructor(\${params}) {
87
+ \${}
88
+ }
89
+ }`,{label:"class",detail:"definition",type:"keyword"}),br('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),br('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],vU=GT.concat([br("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),br("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),br("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),vD=new n5,SU=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Md(t){return(e,n)=>{let i=e.node.getChild("VariableDefinition");return i&&n(i,t),!0}}const kae=["FunctionDeclaration"],Cae={FunctionDeclaration:Md("function"),ClassDeclaration:Md("class"),ClassExpression:()=>!0,EnumDeclaration:Md("constant"),TypeAliasDeclaration:Md("type"),NamespaceDeclaration:Md("namespace"),VariableDefinition(t,e){t.matchContext(kae)||e(t,"variable")},TypeDefinition(t,e){e(t,"type")},__proto__:null};function xU(t,e){let n=vD.get(e);if(n)return n;let i=[],r=!0;function s(a,c){let u=t.sliceString(a.from,a.to);i.push({label:u,type:c})}return e.cursor(It.IncludeAnonymous).iterate(a=>{if(r)r=!1;else if(a.name){let c=Cae[a.name];if(c&&c(a,s)||SU.has(a.name))return!1}else if(a.to-a.from>8192){for(let c of xU(t,a.node))i.push(c);return!1}}),vD.set(e,i),i}const qb=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,FT=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function wU(t){let e=rn(t.state).resolveInner(t.pos,-1);if(FT.indexOf(e.name)>-1)return null;let n=e.name=="VariableName"||e.to-e.from<20&&qb.test(t.state.sliceDoc(e.from,e.to));if(!n&&!t.explicit)return null;let i=[];for(let r=e;r;r=r.parent)SU.has(r.name)&&(i=i.concat(xU(t.state.doc,r)));return{options:i,from:n?e.from:t.pos,validFor:qb}}function xx(t,e,n){var i;let r=[];for(;;){let s=e.firstChild,a;if((s==null?void 0:s.name)=="VariableName")return r.push(t(s)),{path:r.reverse(),name:n};if((s==null?void 0:s.name)=="MemberExpression"&&((i=a=s.lastChild)===null||i===void 0?void 0:i.name)=="PropertyName")r.push(t(a)),e=s;else return null}}function EU(t){let e=i=>t.state.doc.sliceString(i.from,i.to),n=rn(t.state).resolveInner(t.pos,-1);return n.name=="PropertyName"?xx(e,n.parent,e(n)):(n.name=="."||n.name=="?.")&&n.parent.name=="MemberExpression"?xx(e,n.parent,""):FT.indexOf(n.name)>-1?null:n.name=="VariableName"||n.to-n.from<20&&qb.test(e(n))?{path:[],name:e(n)}:n.name=="MemberExpression"?xx(e,n,""):t.explicit?{path:[],name:""}:null}function Aae(t,e){let n=t,i=[],r=new Set;for(let s=0;;s++){for(let c of(Object.getOwnPropertyNames||Object.keys)(t)){if(!/^[a-zA-Z_$\xaa-\uffdc][\w$\xaa-\uffdc]*$/.test(c)||r.has(c))continue;r.add(c);let u;try{u=n[c]}catch{continue}i.push({label:c,type:typeof u=="function"?/^[A-Z]/.test(c)?"class":e?"function":"method":e?"variable":"property",boost:-s})}let a=Object.getPrototypeOf(t);if(!a)return i;t=a}}function Rae(t){let e=new Map;return n=>{let i=EU(n);if(!i)return null;let r=t;for(let a of i.path)if(r=r[a],!r)return null;let s=e.get(r);return s||e.set(r,s=Aae(r,!i.path.length)),{from:n.pos-i.name.length,options:s,validFor:qb}}}const xs=oh.define({name:"javascript",parser:Tae.configure({props:[_h.add({IfStatement:WO({except:/^\s*({|else\b)/}),TryStatement:WO({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:Hee,SwitchBody:t=>{let e=t.textAfter,n=/^\s*\}/.test(e),i=/^\s*(case|default)\b/.test(e);return t.baseIndent+(n?0:i?1:2)*t.unit},Block:Fee({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":WO({except:/^\s*{/}),JSXElement(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag"(t){return t.column(t.node.from)+t.unit}}),Th.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":f5,BlockComment(t){return{from:t.from+2,to:t.to-2}},JSXElement(t){let e=t.firstChild;if(!e||e.name=="JSXSelfClosingTag")return null;let n=t.lastChild;return{from:e.to,to:n.type.isError?t.to:n.from}},"JSXSelfClosingTag JSXOpenTag"(t){var e;let n=(e=t.firstChild)===null||e===void 0?void 0:e.nextSibling,i=t.lastChild;return!n||n.type.isError?null:{from:n.to,to:i.type.isError?t.to:i.from}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),_U={test:t=>/^JSX/.test(t.name),facet:xy({commentTokens:{block:{open:"{/*",close:"*/}"}}})},HT=xs.configure({dialect:"ts"},"typescript"),WT=xs.configure({dialect:"jsx",props:[mT.add(t=>t.isTop?[_U]:void 0)]}),KT=xs.configure({dialect:"jsx ts",props:[mT.add(t=>t.isTop?[_U]:void 0)]},"typescript");let TU=t=>({label:t,type:"keyword"});const kU="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(TU),Pae=kU.concat(["declare","implements","private","protected","public"].map(TU));function CU(t={}){let e=t.jsx?t.typescript?KT:WT:t.typescript?HT:xs,n=t.typescript?vU.concat(Pae):GT.concat(kU);return new lh(e,[xs.data.of({autocomplete:vie(FT,OX(n))}),xs.data.of({autocomplete:wU}),t.jsx?AU:[]])}function Mae(t){for(;;){if(t.name=="JSXOpenTag"||t.name=="JSXSelfClosingTag"||t.name=="JSXFragmentTag")return t;if(t.name=="JSXEscape"||!t.parent)return null;t=t.parent}}function SD(t,e,n=t.length){for(let i=e==null?void 0:e.firstChild;i;i=i.nextSibling)if(i.name=="JSXIdentifier"||i.name=="JSXBuiltin"||i.name=="JSXNamespacedName"||i.name=="JSXMemberExpression")return t.sliceString(i.from,Math.min(i.to,n));return""}const Nae=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),AU=Ae.inputHandler.of((t,e,n,i,r)=>{if((Nae?t.composing:t.compositionStarted)||t.state.readOnly||e!=n||i!=">"&&i!="/"||!xs.isActiveAt(t.state,e,-1))return!1;let s=r(),{state:a}=s,c=a.changeByRange(u=>{var h;let{head:d}=u,m=rn(a).resolveInner(d-1,-1),g;if(m.name=="JSXStartTag"&&(m=m.parent),!(a.doc.sliceString(d-1,d)!=i||m.name=="JSXAttributeValue"&&m.to>d)){if(i==">"&&m.name=="JSXFragmentTag")return{range:u,changes:{from:d,insert:"</>"}};if(i=="/"&&m.name=="JSXStartCloseTag"){let y=m.parent,v=y.parent;if(v&&y.from==d-2&&((g=SD(a.doc,v.firstChild,d))||((h=v.firstChild)===null||h===void 0?void 0:h.name)=="JSXFragmentTag")){let S=`${g}>`;return{range:ce.cursor(d+S.length,-1),changes:{from:d,insert:S}}}}else if(i==">"){let y=Mae(m);if(y&&y.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(a.doc.sliceString(d,d+2))&&(g=SD(a.doc,y,d)))return{range:u,changes:{from:d,insert:`</${g}>`}}}}return{range:u}});return c.changes.empty?!1:(t.dispatch([s,a.update(c,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});function Qae(t,e){return e||(e={parserOptions:{ecmaVersion:2019,sourceType:"module"},env:{browser:!0,node:!0,es6:!0,es2015:!0,es2017:!0,es2020:!0},rules:{}},t.getRules().forEach((n,i)=>{var r;!((r=n.meta.docs)===null||r===void 0)&&r.recommended&&(e.rules[i]=2)})),n=>{let{state:i}=n,r=[];for(let{from:s,to:a}of xs.findRegions(i)){let c=i.doc.lineAt(s),u={line:c.number-1,col:s-c.from,pos:s};for(let h of t.verify(i.sliceDoc(s,a),e))r.push($ae(h,i.doc,u))}return r}}function xD(t,e,n,i){return n.line(t+i.line).from+e+(t==1?i.col-1:-1)}function $ae(t,e,n){let i=xD(t.line,t.column,e,n),r={from:i,to:t.endLine!=null&&t.endColumn!=1?xD(t.endLine,t.endColumn,e,n):i,message:t.message,source:t.ruleId?"eslint:"+t.ruleId:"eslint",severity:t.severity==1?"warning":"error"};if(t.fix){let{range:s,text:a}=t.fix,c=s[0]+n.pos-i,u=s[1]+n.pos-i;r.actions=[{name:"fix",apply(h,d){h.dispatch({changes:{from:d+c,to:d+u,insert:a},scrollIntoView:!0})}}]}return r}const mO=Object.freeze(Object.defineProperty({__proto__:null,autoCloseTags:AU,completionPath:EU,esLint:Qae,javascript:CU,javascriptLanguage:xs,jsxLanguage:WT,localCompletionSource:wU,scopeCompletionSource:Rae,snippets:GT,tsxLanguage:KT,typescriptLanguage:HT,typescriptSnippets:vU},Symbol.toStringTag,{value:"Module"})),Nd=["_blank","_self","_top","_parent"],wx=["ascii","utf-8","utf-16","latin1","latin1"],Ex=["get","post","put","delete"],_x=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],Xr=["true","false"],Fe={},Dae={a:{attrs:{href:null,ping:null,type:null,media:null,target:Nd,hreflang:null}},abbr:Fe,address:Fe,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:Fe,aside:Fe,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:Fe,base:{attrs:{href:null,target:Nd}},bdi:Fe,bdo:Fe,blockquote:{attrs:{cite:null}},body:Fe,br:Fe,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:_x,formmethod:Ex,formnovalidate:["novalidate"],formtarget:Nd,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:Fe,center:Fe,cite:Fe,code:Fe,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:Fe,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:Fe,div:Fe,dl:Fe,dt:Fe,em:Fe,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:Fe,figure:Fe,footer:Fe,form:{attrs:{action:null,name:null,"accept-charset":wx,autocomplete:["on","off"],enctype:_x,method:Ex,novalidate:["novalidate"],target:Nd}},h1:Fe,h2:Fe,h3:Fe,h4:Fe,h5:Fe,h6:Fe,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:Fe,hgroup:Fe,hr:Fe,html:{attrs:{manifest:null}},i:Fe,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:_x,formmethod:Ex,formnovalidate:["novalidate"],formtarget:Nd,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:Fe,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:Fe,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:Fe,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:wx,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:Fe,noscript:Fe,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:Fe,param:{attrs:{name:null,value:null}},pre:Fe,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:Fe,rt:Fe,ruby:Fe,samp:Fe,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:wx}},section:Fe,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:Fe,source:{attrs:{src:null,type:null,media:null}},span:Fe,strong:Fe,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:Fe,summary:Fe,sup:Fe,table:Fe,tbody:Fe,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:Fe,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:Fe,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:Fe,time:{attrs:{datetime:null}},title:Fe,tr:Fe,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:Fe,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:Fe},RU={accesskey:null,class:null,contenteditable:Xr,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:Xr,autocorrect:Xr,autocapitalize:Xr,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":Xr,"aria-autocomplete":["inline","list","both","none"],"aria-busy":Xr,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":Xr,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":Xr,"aria-hidden":Xr,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":Xr,"aria-multiselectable":Xr,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":Xr,"aria-relevant":null,"aria-required":Xr,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},PU="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(t=>"on"+t);for(let t of PU)RU[t]=null;class Ip{constructor(e,n){this.tags={...Dae,...e},this.globalAttrs={...RU,...n},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}Ip.default=new Ip;function su(t,e,n=t.length){if(!e)return"";let i=e.firstChild,r=i&&i.getChild("TagName");return r?t.sliceString(r.from,Math.min(r.to,n)):""}function hh(t,e=!1){for(;t;t=t.parent)if(t.name=="Element")if(e)e=!1;else return t;return null}function MU(t,e,n){let i=n.tags[su(t,hh(e))];return(i==null?void 0:i.children)||n.allTags}function JT(t,e){let n=[];for(let i=hh(e);i&&!i.type.isTop;i=hh(i.parent)){let r=su(t,i);if(r&&i.lastChild.name=="CloseTag")break;r&&n.indexOf(r)<0&&(e.name=="EndTag"||e.from>=i.firstChild.to)&&n.push(r)}return n}const NU=/^[:\-\.\w\u00b7-\uffff]*$/;function wD(t,e,n,i,r){let s=/\s*>/.test(t.sliceDoc(r,r+5))?"":">",a=hh(n,n.name=="StartTag"||n.name=="TagName");return{from:i,to:r,options:MU(t.doc,a,e).map(c=>({label:c,type:"type"})).concat(JT(t.doc,n).map((c,u)=>({label:"/"+c,apply:"/"+c+s,type:"type",boost:99-u}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function ED(t,e,n,i){let r=/\s*>/.test(t.sliceDoc(i,i+5))?"":">";return{from:n,to:i,options:JT(t.doc,e).map((s,a)=>({label:s,apply:s+r,type:"type",boost:99-a})),validFor:NU}}function Lae(t,e,n,i){let r=[],s=0;for(let a of MU(t.doc,n,e))r.push({label:"<"+a,type:"type"});for(let a of JT(t.doc,n))r.push({label:"</"+a+">",type:"type",boost:99-s++});return{from:i,to:i,options:r,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function Iae(t,e,n,i,r){let s=hh(n),a=s?e.tags[su(t.doc,s)]:null,c=a&&a.attrs?Object.keys(a.attrs):[],u=a&&a.globalAttrs===!1?c:c.length?c.concat(e.globalAttrNames):e.globalAttrNames;return{from:i,to:r,options:u.map(h=>({label:h,type:"property"})),validFor:NU}}function jae(t,e,n,i,r){var s;let a=(s=n.parent)===null||s===void 0?void 0:s.getChild("AttributeName"),c=[],u;if(a){let h=t.sliceDoc(a.from,a.to),d=e.globalAttrs[h];if(!d){let m=hh(n),g=m?e.tags[su(t.doc,m)]:null;d=(g==null?void 0:g.attrs)&&g.attrs[h]}if(d){let m=t.sliceDoc(i,r).toLowerCase(),g='"',y='"';/^['"]/.test(m)?(u=m[0]=='"'?/^[^"]*$/:/^[^']*$/,g="",y=t.sliceDoc(r,r+1)==m[0]?"":m[0],m=m.slice(1),i++):u=/^[^\s<>='"]*$/;for(let v of d)c.push({label:v,apply:g+v+y,type:"constant"})}}return{from:i,to:r,options:c,validFor:u}}function QU(t,e){let{state:n,pos:i}=e,r=rn(n).resolveInner(i,-1),s=r.resolve(i);for(let a=i,c;s==r&&(c=r.childBefore(a));){let u=c.lastChild;if(!u||!u.type.isError||u.from<u.to)break;s=r=c,a=u.from}return r.name=="TagName"?r.parent&&/CloseTag$/.test(r.parent.name)?ED(n,r,r.from,i):wD(n,t,r,r.from,i):r.name=="StartTag"||r.name=="IncompleteTag"?wD(n,t,r,i,i):r.name=="StartCloseTag"||r.name=="IncompleteCloseTag"?ED(n,r,i,i):r.name=="OpenTag"||r.name=="SelfClosingTag"||r.name=="AttributeName"?Iae(n,t,r,r.name=="AttributeName"?r.from:i,i):r.name=="Is"||r.name=="AttributeValue"||r.name=="UnquotedAttributeValue"?jae(n,t,r,r.name=="Is"?i:r.from,i):e.explicit&&(s.name=="Element"||s.name=="Text"||s.name=="Document")?Lae(n,t,r,i):null}function $U(t){return QU(Ip.default,t)}function DU(t){let{extraTags:e,extraGlobalAttributes:n}=t,i=n||e?new Ip(e,n):Ip.default;return r=>QU(i,r)}const Bae=xs.parser.configure({top:"SingleExpression"}),LU=[{tag:"script",attrs:t=>t.type=="text/typescript"||t.lang=="ts",parser:HT.parser},{tag:"script",attrs:t=>t.type=="text/babel"||t.type=="text/jsx",parser:WT.parser},{tag:"script",attrs:t=>t.type=="text/typescript-jsx",parser:KT.parser},{tag:"script",attrs(t){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(t.type)},parser:Bae},{tag:"script",attrs(t){return!t.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(t.type)},parser:xs.parser},{tag:"style",attrs(t){return(!t.lang||t.lang=="css")&&(!t.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(t.type))},parser:Lp.parser}],IU=[{name:"style",parser:Lp.parser.configure({top:"Styles"})}].concat(PU.map(t=>({name:t,parser:xs.parser}))),jU=oh.define({name:"html",parser:poe.configure({props:[_h.add({Element(t){let e=/^(\s*)(<\/)?/.exec(t.textAfter);return t.node.to<=t.pos+e[0].length?t.continue():t.lineIndent(t.node.from)+(e[2]?0:t.unit)},"OpenTag CloseTag SelfClosingTag"(t){return t.column(t.node.from)+t.unit},Document(t){if(t.pos+/\s*/.exec(t.textAfter)[0].length<t.node.to)return t.continue();let e=null,n;for(let i=t.node;;){let r=i.lastChild;if(!r||r.name!="Element"||r.to!=i.to)break;e=i=r}return e&&!((n=e.lastChild)&&(n.name=="CloseTag"||n.name=="SelfClosingTag"))?t.lineIndent(e.from)+t.unit:null}}),Th.add({Element(t){let e=t.firstChild,n=t.lastChild;return!e||e.name!="OpenTag"?null:{from:e.to,to:n.name=="CloseTag"?n.from:t.to}}}),w5.add({"OpenTag CloseTag":t=>t.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),lp=jU.configure({wrap:uU(LU,IU)});function BU(t={}){let e="",n;t.matchClosingTags===!1&&(e="noMatch"),t.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(t.nestedLanguages&&t.nestedLanguages.length||t.nestedAttributes&&t.nestedAttributes.length)&&(n=uU((t.nestedLanguages||[]).concat(LU),(t.nestedAttributes||[]).concat(IU)));let i=n?jU.configure({wrap:n,dialect:e}):e?lp.configure({dialect:e}):lp;return new lh(i,[lp.data.of({autocomplete:DU(t)}),t.autoCloseTags!==!1?zU:[],CU().support,bU().support])}const _D=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" "));function zae(t,e,n){for(var i;;){if(((i=e.lastChild)===null||i===void 0?void 0:i.name)!="CloseTag")return!1;let r=e.parent;if(!r||su(t,r)!=n)return!0;e=r}}const zU=Ae.inputHandler.of((t,e,n,i,r)=>{if(t.composing||t.state.readOnly||e!=n||i!=">"&&i!="/"||!lp.isActiveAt(t.state,e,-1))return!1;let s=r(),{state:a}=s,c=a.changeByRange(u=>{var h;let d=a.doc.sliceString(u.from-1,u.to)==i,{head:m}=u,g=rn(a).resolveInner(m,-1),y;if(d&&i==">"&&g.name=="EndTag"){let v=g.parent;if((y=su(a.doc,v.parent,m))&&!_D.has(y)&&!zae(a.doc,v.parent,y)){let S=m+(a.doc.sliceString(m,m+1)===">"?1:0),x=`</${y}>`;return{range:u,changes:{from:m,to:S,insert:x}}}}else if(d&&i=="/"&&g.name=="IncompleteCloseTag"){let v=g.parent;if(g.from==m-2&&((h=v.lastChild)===null||h===void 0?void 0:h.name)!="CloseTag"&&(y=su(a.doc,v,m))&&!_D.has(y)){let S=m+(a.doc.sliceString(m,m+1)===">"?1:0),x=`${y}>`;return{range:ce.cursor(m+x.length,-1),changes:{from:m,to:S,insert:x}}}}return{range:u}});return c.changes.empty?!1:(t.dispatch([s,a.update(c,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),Xae=Object.freeze(Object.defineProperty({__proto__:null,autoCloseTags:zU,html:BU,htmlCompletionSource:$U,htmlCompletionSourceWith:DU,htmlLanguage:lp},Symbol.toStringTag,{value:"Module"})),XU=xy({commentTokens:{block:{open:"<!--",close:"-->"}}}),UU=new lt,ZU=lse.configure({props:[Th.add(t=>!t.is("Block")||t.is("Document")||_E(t)!=null||Uae(t)?void 0:(e,n)=>({from:n.doc.lineAt(e.from).to,to:e.to})),UU.add(_E),_h.add({Document:()=>null}),Ql.add({Document:XU})]});function _E(t){let e=/^(?:ATX|Setext)Heading(\d)$/.exec(t.name);return e?+e[1]:void 0}function Uae(t){return t.name=="OrderedList"||t.name=="BulletList"}function Zae(t,e){let n=t;for(;;){let i=n.nextSibling,r;if(!i||(r=_E(i.type))!=null&&r<=e)break;n=i}return n.to}const Vae=u5.of((t,e,n)=>{for(let i=rn(t).resolveInner(n,-1);i&&!(i.from<e);i=i.parent){let r=i.type.prop(UU);if(r==null)continue;let s=Zae(i,r);if(s>n)return{from:n,to:s}}return null});function ek(t){return new Gr(XU,t,[],"markdown")}const VU=ek(ZU),qae=ZU.configure([yse,Sse,vse,xse,{props:[Th.add({Table:(t,e)=>({from:e.doc.lineAt(t.from).to,to:t.to})})]}]),dh=ek(qae);function Yae(t,e){return n=>{if(n&&t){let i=null;if(n=/\S*/.exec(n)[0],typeof t=="function"?i=t(n):i=ae.matchLanguageName(t,n,!0),i instanceof ae)return i.support?i.support.language.parser:nu.getSkippingParser(i.load());if(i)return i.parser}return e?e.parser:null}}class Tx{constructor(e,n,i,r,s,a,c){this.node=e,this.from=n,this.to=i,this.spaceBefore=r,this.spaceAfter=s,this.type=a,this.item=c}blank(e,n=!0){let i=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){for(;i.length<e;)i+=" ";return i}else{for(let r=this.to-this.from-i.length-this.spaceAfter.length;r>0;r--)i+=" ";return i+(n?this.spaceAfter:"")}}marker(e,n){let i=this.node.name=="OrderedList"?String(+YU(this.item,e)[2]+n):"";return this.spaceBefore+i+this.type+this.spaceAfter}}function qU(t,e){let n=[],i=[];for(let r=t;r;r=r.parent){if(r.name=="FencedCode")return i;(r.name=="ListItem"||r.name=="Blockquote")&&n.push(r)}for(let r=n.length-1;r>=0;r--){let s=n[r],a,c=e.lineAt(s.from),u=s.from-c.from;if(s.name=="Blockquote"&&(a=/^ *>( ?)/.exec(c.text.slice(u))))i.push(new Tx(s,u,u+a[0].length,"",a[1],">",null));else if(s.name=="ListItem"&&s.parent.name=="OrderedList"&&(a=/^( *)\d+([.)])( *)/.exec(c.text.slice(u)))){let h=a[3],d=a[0].length;h.length>=4&&(h=h.slice(0,h.length-4),d-=4),i.push(new Tx(s.parent,u,u+d,a[1],h,a[2],s))}else if(s.name=="ListItem"&&s.parent.name=="BulletList"&&(a=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(c.text.slice(u)))){let h=a[4],d=a[0].length;h.length>4&&(h=h.slice(0,h.length-4),d-=4);let m=a[2];a[3]&&(m+=a[3].replace(/[xX]/," ")),i.push(new Tx(s.parent,u,u+d,a[1],h,m,s))}}return i}function YU(t,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(t.from,t.from+10))}function kx(t,e,n,i=0){for(let r=-1,s=t;;){if(s.name=="ListItem"){let c=YU(s,e),u=+c[2];if(r>=0){if(u!=r+1)return;n.push({from:s.from+c[1].length,to:s.from+c[0].length,insert:String(r+2+i)})}r=u}let a=s.nextSibling;if(!a)break;s=a}}function tk(t,e){let n=/^[ \t]*/.exec(t)[0].length;if(!n||e.facet(Eh)!=" ")return t;let i=Gs(t,4,n),r="";for(let s=i;s>0;)s>=4?(r+=" ",s-=4):(r+=" ",s--);return r+t.slice(n)}const GU=(t={})=>({state:e,dispatch:n})=>{let i=rn(e),{doc:r}=e,s=null,a=e.changeByRange(c=>{if(!c.empty||!dh.isActiveAt(e,c.from,-1)&&!dh.isActiveAt(e,c.from,1))return s={range:c};let u=c.from,h=r.lineAt(u),d=qU(i.resolveInner(u,-1),r);for(;d.length&&d[d.length-1].from>u-h.from;)d.pop();if(!d.length)return s={range:c};let m=d[d.length-1];if(m.to-m.spaceAfter.length>u-h.from)return s={range:c};let g=u>=m.to-m.spaceAfter.length&&!/\S/.test(h.text.slice(m.to));if(m.item&&g){if(m.item.from<h.from&&!/^[\s>]*$/.test(h.text.slice(0,m.to)))return s={range:c};let w=m.node.firstChild,C=m.node.getChild("ListItem","ListItem");if(w.to>=u||C&&C.to<u||h.from>0&&!/[^\s>]/.test(r.lineAt(h.from-1).text)||t.nonTightLists===!1){let k=d.length>1?d[d.length-2]:null,A,R="";k&&k.item?(A=h.from+k.from,R=k.marker(r,1)):A=h.from+(k?k.to:0);let P=[{from:A,to:u,insert:R}];return m.node.name=="OrderedList"&&kx(m.item,r,P,-2),k&&k.node.name=="OrderedList"&&kx(k.item,r,P),{range:ce.cursor(A+R.length),changes:P}}else{let k=kD(d,e,h);return{range:ce.cursor(u+k.length+1),changes:{from:h.from,insert:k+e.lineBreak}}}}if(m.node.name=="Blockquote"&&g&&h.from){let w=r.lineAt(h.from-1),C=/>\s*$/.exec(w.text);if(C&&C.index==m.from){let k=e.changes([{from:w.from+C.index,to:w.to},{from:h.from+m.from,to:h.to}]);return{range:c.map(k),changes:k}}}let y=[];m.node.name=="OrderedList"&&kx(m.item,r,y);let v=m.item&&m.item.from<h.from,S="";if(!v||/^[\s\d.)\-+*>]*/.exec(h.text)[0].length>=m.to)for(let w=0,C=d.length-1;w<=C;w++)S+=w==C&&!v?d[w].marker(r,1):d[w].blank(w<C?Gs(h.text,4,d[w+1].from)-S.length:null);let x=u;for(;x>h.from&&/\s/.test(h.text.charAt(x-h.from-1));)x--;return S=tk(S,e),Gae(m.node,e.doc)&&(S=kD(d,e,h)+e.lineBreak+S),y.push({from:x,to:u,insert:e.lineBreak+S}),{range:ce.cursor(x+S.length+1),changes:y}});return s?!1:(n(e.update(a,{scrollIntoView:!0,userEvent:"input"})),!0)},FU=GU();function TD(t){return t.name=="QuoteMark"||t.name=="ListMark"}function Gae(t,e){if(t.name!="OrderedList"&&t.name!="BulletList")return!1;let n=t.firstChild,i=t.getChild("ListItem","ListItem");if(!i)return!1;let r=e.lineAt(n.to),s=e.lineAt(i.from),a=/^[\s>]*$/.test(r.text);return r.number+(a?0:1)<s.number}function kD(t,e,n){let i="";for(let r=0,s=t.length-2;r<=s;r++)i+=t[r].blank(r<s?Gs(n.text,4,t[r+1].from)-i.length:null,r<s);return tk(i,e)}function Fae(t,e){let n=t.resolveInner(e,-1),i=e;TD(n)&&(i=n.from,n=n.parent);for(let r;r=n.childBefore(i);)if(TD(r))i=r.from;else if(r.name=="OrderedList"||r.name=="BulletList")n=r.lastChild,i=n.to;else break;return n}const HU=({state:t,dispatch:e})=>{let n=rn(t),i=null,r=t.changeByRange(s=>{let a=s.from,{doc:c}=t;if(s.empty&&dh.isActiveAt(t,s.from)){let u=c.lineAt(a),h=qU(Fae(n,a),c);if(h.length){let d=h[h.length-1],m=d.to-d.spaceAfter.length+(d.spaceAfter?1:0);if(a-u.from>m&&!/\S/.test(u.text.slice(m,a-u.from)))return{range:ce.cursor(u.from+m),changes:{from:u.from+m,to:a}};if(a-u.from==m&&(d.item&&u.from<=d.item.from||/^[\s>]*$/.test(u.text.slice(0,d.to)))){let g=u.from+d.from;if(d.item&&d.node.from<d.item.from&&/\S/.test(u.text.slice(d.from,d.to))){let y=d.blank(Gs(u.text,4,d.to)-Gs(u.text,4,d.from));return g==u.from&&(y=tk(y,t)),{range:ce.cursor(g+y.length),changes:{from:g,to:u.from+d.to,insert:y}}}if(g<a)return{range:ce.cursor(g),changes:{from:g,to:a}}}}}return i={range:s}});return i?!1:(e(t.update(r,{scrollIntoView:!0,userEvent:"delete"})),!0)},WU=[{key:"Enter",run:FU},{key:"Backspace",run:HU}],KU=BU({matchClosingTags:!1});function JU(t={}){let{codeLanguages:e,defaultCodeLanguage:n,addKeymap:i=!0,base:{parser:r}=VU,completeHTMLTags:s=!0,pasteURLAsLink:a=!0,htmlTagLanguage:c=KU}=t;if(!(r instanceof Ry))throw new RangeError("Base parser provided to `markdown` should be a Markdown parser");let u=t.extensions?[t.extensions]:[],h=[c.support,Vae],d;a&&h.push(e3),n instanceof lh?(h.push(n.support),d=n.language):n&&(d=n);let m=e||d?Yae(e,d):void 0;u.push(use({codeParser:m,htmlParser:c.language.parser})),i&&h.push(Fo.high(mu.of(WU)));let g=ek(r.configure(u));return s&&h.push(g.data.of({autocomplete:Hae})),new lh(g,h)}function Hae(t){let{state:e,pos:n}=t,i=/<[:\-\.\w\u00b7-\uffff]*$/.exec(e.sliceDoc(n-25,n));if(!i)return null;let r=rn(e).resolveInner(n,-1);for(;r&&!r.type.isTop;){if(r.name=="CodeBlock"||r.name=="FencedCode"||r.name=="ProcessingInstructionBlock"||r.name=="CommentBlock"||r.name=="Link"||r.name=="Image")return null;r=r.parent}return{from:n-i[0].length,to:n,options:Wae(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}let Cx=null;function Wae(){if(Cx)return Cx;let t=$U(new AT(Ct.create({extensions:KU}),0,!0));return Cx=t?t.options:[]}const Kae=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,e3=Ae.domEventHandlers({paste:(t,e)=>{var n;let{main:i}=e.state.selection;if(i.empty)return!1;let r=(n=t.clipboardData)===null||n===void 0?void 0:n.getData("text/plain");if(!r||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(r)||(/^www\./.test(r)&&(r="https://"+r),!dh.isActiveAt(e.state,i.from,1)))return!1;let s=rn(e.state),a=!1;return s.iterate({from:i.from,to:i.to,enter:c=>{(c.from>i.from||Kae.test(c.name))&&(a=!0)},leave:c=>{c.to<i.to&&(a=!0)}}),a?!1:(e.dispatch({changes:[{from:i.from,insert:"["},{from:i.to,insert:`](${r})`}],userEvent:"input.paste",scrollIntoView:!0}),!0)}}),Jae=Object.freeze(Object.defineProperty({__proto__:null,commonmarkLanguage:VU,deleteMarkupBackward:HU,insertNewlineContinueMarkup:FU,insertNewlineContinueMarkupCommand:GU,markdown:JU,markdownKeymap:WU,markdownLanguage:dh,pasteURLAsLink:e3},Symbol.toStringTag,{value:"Module"})),ele="modulepreload",tle=function(t){return"/"+t},CD={},ue=function(e,n,i){let r=Promise.resolve();if(n&&n.length>0){let a=function(h){return Promise.all(h.map(d=>Promise.resolve(d).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),u=(c==null?void 0:c.nonce)||(c==null?void 0:c.getAttribute("nonce"));r=a(n.map(h=>{if(h=tle(h),h in CD)return;CD[h]=!0;const d=h.endsWith(".css"),m=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${m}`))return;const g=document.createElement("link");if(g.rel=d?"stylesheet":ele,d||(g.as="script"),g.crossOrigin="",g.href=h,u&&g.setAttribute("nonce",u),document.head.appendChild(g),d)return new Promise((y,v)=>{g.addEventListener("load",y),g.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${h}`)))})}))}function s(a){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=a,window.dispatchEvent(c),!c.defaultPrevented)throw a}return r.then(a=>{for(const c of a||[])c.status==="rejected"&&s(c.reason);return e().catch(s)})};function ve(t){return new lh(yT.define(t))}function gl(t){return ue(()=>import("./index-CYxcbpRM.js"),[]).then(e=>e.sql({dialect:e[t]}))}const nle=[ae.of({name:"C",extensions:["c","h","ino"],load(){return ue(()=>import("./index-2xPC-eHt.js"),[]).then(t=>t.cpp())}}),ae.of({name:"C++",alias:["cpp"],extensions:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],load(){return ue(()=>import("./index-2xPC-eHt.js"),[]).then(t=>t.cpp())}}),ae.of({name:"CQL",alias:["cassandra"],extensions:["cql"],load(){return gl("Cassandra")}}),ae.of({name:"CSS",extensions:["css"],load(){return ue(()=>Promise.resolve().then(()=>Foe),void 0).then(t=>t.css())}}),ae.of({name:"Go",extensions:["go"],load(){return ue(()=>import("./index-8dNhRmiO.js"),[]).then(t=>t.go())}}),ae.of({name:"HTML",alias:["xhtml"],extensions:["html","htm","handlebars","hbs"],load(){return ue(()=>Promise.resolve().then(()=>Xae),void 0).then(t=>t.html())}}),ae.of({name:"Java",extensions:["java"],load(){return ue(()=>import("./index-Bp7W-ZTq.js"),[]).then(t=>t.java())}}),ae.of({name:"JavaScript",alias:["ecmascript","js","node"],extensions:["js","mjs","cjs"],load(){return ue(()=>Promise.resolve().then(()=>mO),void 0).then(t=>t.javascript())}}),ae.of({name:"Jinja",extensions:["j2","jinja","jinja2"],load(){return ue(()=>import("./index-popk9wbW.js"),[]).then(t=>t.jinja())}}),ae.of({name:"JSON",alias:["json5"],extensions:["json","map"],load(){return ue(()=>import("./index-DB4QwuYn.js"),[]).then(t=>t.json())}}),ae.of({name:"JSX",extensions:["jsx"],load(){return ue(()=>Promise.resolve().then(()=>mO),void 0).then(t=>t.javascript({jsx:!0}))}}),ae.of({name:"LESS",extensions:["less"],load(){return ue(()=>import("./index-DGLUuEXi.js"),[]).then(t=>t.less())}}),ae.of({name:"Liquid",extensions:["liquid"],load(){return ue(()=>import("./index-OR-odsl9.js"),[]).then(t=>t.liquid())}}),ae.of({name:"MariaDB SQL",load(){return gl("MariaSQL")}}),ae.of({name:"Markdown",extensions:["md","markdown","mkd"],load(){return ue(()=>Promise.resolve().then(()=>Jae),void 0).then(t=>t.markdown())}}),ae.of({name:"MS SQL",load(){return gl("MSSQL")}}),ae.of({name:"MySQL",load(){return gl("MySQL")}}),ae.of({name:"PHP",extensions:["php","php3","php4","php5","php7","phtml"],load(){return ue(()=>import("./index-BdR34cXC.js"),[]).then(t=>t.php())}}),ae.of({name:"PLSQL",extensions:["pls"],load(){return gl("PLSQL")}}),ae.of({name:"PostgreSQL",load(){return gl("PostgreSQL")}}),ae.of({name:"Python",extensions:["BUILD","bzl","py","pyw"],filename:/^(BUCK|BUILD)$/,load(){return ue(()=>import("./index-Byyxbh_z.js"),[]).then(t=>t.python())}}),ae.of({name:"Rust",extensions:["rs"],load(){return ue(()=>import("./index-B7-O9ujQ.js"),[]).then(t=>t.rust())}}),ae.of({name:"Sass",extensions:["sass"],load(){return ue(()=>import("./index-mRV4XhJZ.js"),[]).then(t=>t.sass({indented:!0}))}}),ae.of({name:"SCSS",extensions:["scss"],load(){return ue(()=>import("./index-mRV4XhJZ.js"),[]).then(t=>t.sass())}}),ae.of({name:"SQL",extensions:["sql"],load(){return gl("StandardSQL")}}),ae.of({name:"SQLite",load(){return gl("SQLite")}}),ae.of({name:"TSX",extensions:["tsx"],load(){return ue(()=>Promise.resolve().then(()=>mO),void 0).then(t=>t.javascript({jsx:!0,typescript:!0}))}}),ae.of({name:"TypeScript",alias:["ts"],extensions:["ts","mts","cts"],load(){return ue(()=>Promise.resolve().then(()=>mO),void 0).then(t=>t.javascript({typescript:!0}))}}),ae.of({name:"WebAssembly",extensions:["wat","wast"],load(){return ue(()=>import("./index-P3vSkiU-.js"),[]).then(t=>t.wast())}}),ae.of({name:"XML",alias:["rss","wsdl","xsd"],extensions:["xml","xsl","xsd","svg"],load(){return ue(()=>import("./index-C0VmkrO-.js"),[]).then(t=>t.xml())}}),ae.of({name:"YAML",alias:["yml"],extensions:["yaml","yml"],load(){return ue(()=>import("./index-uM88Njdj.js"),[]).then(t=>t.yaml())}}),ae.of({name:"APL",extensions:["dyalog","apl"],load(){return ue(()=>import("./apl-B4CMkyY2.js"),[]).then(t=>ve(t.apl))}}),ae.of({name:"PGP",alias:["asciiarmor"],extensions:["asc","pgp","sig"],load(){return ue(()=>import("./asciiarmor-Df11BRmG.js"),[]).then(t=>ve(t.asciiArmor))}}),ae.of({name:"ASN.1",extensions:["asn","asn1"],load(){return ue(()=>import("./asn1-EdZsLKOL.js"),[]).then(t=>ve(t.asn1({})))}}),ae.of({name:"Asterisk",filename:/^extensions\.conf$/i,load(){return ue(()=>import("./asterisk-B-8jnY81.js"),[]).then(t=>ve(t.asterisk))}}),ae.of({name:"Brainfuck",extensions:["b","bf"],load(){return ue(()=>import("./brainfuck-C4LP7Hcl.js"),[]).then(t=>ve(t.brainfuck))}}),ae.of({name:"Cobol",extensions:["cob","cpy"],load(){return ue(()=>import("./cobol-CWcv1MsR.js"),[]).then(t=>ve(t.cobol))}}),ae.of({name:"C#",alias:["csharp","cs"],extensions:["cs"],load(){return ue(()=>import("./clike-B9uivgTg.js"),[]).then(t=>ve(t.csharp))}}),ae.of({name:"Clojure",extensions:["clj","cljc","cljx"],load(){return ue(()=>import("./clojure-BMjYHr_A.js"),[]).then(t=>ve(t.clojure))}}),ae.of({name:"ClojureScript",extensions:["cljs"],load(){return ue(()=>import("./clojure-BMjYHr_A.js"),[]).then(t=>ve(t.clojure))}}),ae.of({name:"Closure Stylesheets (GSS)",extensions:["gss"],load(){return ue(()=>import("./css-BnMrqG3P.js"),[]).then(t=>ve(t.gss))}}),ae.of({name:"CMake",extensions:["cmake","cmake.in"],filename:/^CMakeLists\.txt$/,load(){return ue(()=>import("./cmake-BQqOBYOt.js"),[]).then(t=>ve(t.cmake))}}),ae.of({name:"CoffeeScript",alias:["coffee","coffee-script"],extensions:["coffee"],load(){return ue(()=>import("./coffeescript-S37ZYGWr.js"),[]).then(t=>ve(t.coffeeScript))}}),ae.of({name:"Common Lisp",alias:["lisp"],extensions:["cl","lisp","el"],load(){return ue(()=>import("./commonlisp-DBKNyK5s.js"),[]).then(t=>ve(t.commonLisp))}}),ae.of({name:"Cypher",extensions:["cyp","cypher"],load(){return ue(()=>import("./cypher-C_CwsFkJ.js"),[]).then(t=>ve(t.cypher))}}),ae.of({name:"Cython",extensions:["pyx","pxd","pxi"],load(){return ue(()=>import("./python-BuPzkPfP.js"),[]).then(t=>ve(t.cython))}}),ae.of({name:"Crystal",extensions:["cr"],load(){return ue(()=>import("./crystal-SjHAIU92.js"),[]).then(t=>ve(t.crystal))}}),ae.of({name:"D",extensions:["d"],load(){return ue(()=>import("./d-pRatUO7H.js"),[]).then(t=>ve(t.d))}}),ae.of({name:"Dart",extensions:["dart"],load(){return ue(()=>import("./clike-B9uivgTg.js"),[]).then(t=>ve(t.dart))}}),ae.of({name:"diff",extensions:["diff","patch"],load(){return ue(()=>import("./diff-DbItnlRl.js"),[]).then(t=>ve(t.diff))}}),ae.of({name:"Dockerfile",filename:/^Dockerfile$/,load(){return ue(()=>import("./dockerfile-BKs6k2Af.js"),__vite__mapDeps([0,1])).then(t=>ve(t.dockerFile))}}),ae.of({name:"DTD",extensions:["dtd"],load(){return ue(()=>import("./dtd-DF_7sFjM.js"),[]).then(t=>ve(t.dtd))}}),ae.of({name:"Dylan",extensions:["dylan","dyl","intr"],load(){return ue(()=>import("./dylan-DwRh75JA.js"),[]).then(t=>ve(t.dylan))}}),ae.of({name:"EBNF",load(){return ue(()=>import("./ebnf-CDyGwa7X.js"),[]).then(t=>ve(t.ebnf))}}),ae.of({name:"ECL",extensions:["ecl"],load(){return ue(()=>import("./ecl-Cabwm37j.js"),[]).then(t=>ve(t.ecl))}}),ae.of({name:"edn",extensions:["edn"],load(){return ue(()=>import("./clojure-BMjYHr_A.js"),[]).then(t=>ve(t.clojure))}}),ae.of({name:"Eiffel",extensions:["e"],load(){return ue(()=>import("./eiffel-CnydiIhH.js"),[]).then(t=>ve(t.eiffel))}}),ae.of({name:"Elm",extensions:["elm"],load(){return ue(()=>import("./elm-vLlmbW-K.js"),[]).then(t=>ve(t.elm))}}),ae.of({name:"Erlang",extensions:["erl"],load(){return ue(()=>import("./erlang-BNw1qcRV.js"),[]).then(t=>ve(t.erlang))}}),ae.of({name:"Esper",load(){return ue(()=>import("./sql-D0XecflT.js"),[]).then(t=>ve(t.esper))}}),ae.of({name:"Factor",extensions:["factor"],load(){return ue(()=>import("./factor-kuTfRLto.js"),__vite__mapDeps([2,1])).then(t=>ve(t.factor))}}),ae.of({name:"FCL",load(){return ue(()=>import("./fcl-Kvtd6kyn.js"),[]).then(t=>ve(t.fcl))}}),ae.of({name:"Forth",extensions:["forth","fth","4th"],load(){return ue(()=>import("./forth-Ffai-XNe.js"),[]).then(t=>ve(t.forth))}}),ae.of({name:"Fortran",extensions:["f","for","f77","f90","f95"],load(){return ue(()=>import("./fortran-DYz_wnZ1.js"),[]).then(t=>ve(t.fortran))}}),ae.of({name:"F#",alias:["fsharp"],extensions:["fs"],load(){return ue(()=>import("./mllike-CXdrOF99.js"),[]).then(t=>ve(t.fSharp))}}),ae.of({name:"Gas",extensions:["s"],load(){return ue(()=>import("./gas-Bneqetm1.js"),[]).then(t=>ve(t.gas))}}),ae.of({name:"Gherkin",extensions:["feature"],load(){return ue(()=>import("./gherkin-heZmZLOM.js"),[]).then(t=>ve(t.gherkin))}}),ae.of({name:"Groovy",extensions:["groovy","gradle"],filename:/^Jenkinsfile$/,load(){return ue(()=>import("./groovy-D9Dt4D0W.js"),[]).then(t=>ve(t.groovy))}}),ae.of({name:"Haskell",extensions:["hs"],load(){return ue(()=>import("./haskell-Cw1EW3IL.js"),[]).then(t=>ve(t.haskell))}}),ae.of({name:"Haxe",extensions:["hx"],load(){return ue(()=>import("./haxe-H-WmDvRZ.js"),[]).then(t=>ve(t.haxe))}}),ae.of({name:"HXML",extensions:["hxml"],load(){return ue(()=>import("./haxe-H-WmDvRZ.js"),[]).then(t=>ve(t.hxml))}}),ae.of({name:"HTTP",load(){return ue(()=>import("./http-DBlCnlav.js"),[]).then(t=>ve(t.http))}}),ae.of({name:"IDL",extensions:["pro"],load(){return ue(()=>import("./idl-BEugSyMb.js"),[]).then(t=>ve(t.idl))}}),ae.of({name:"JSON-LD",alias:["jsonld"],extensions:["jsonld"],load(){return ue(()=>import("./javascript-iXu5QeM3.js"),[]).then(t=>ve(t.jsonld))}}),ae.of({name:"Julia",extensions:["jl"],load(){return ue(()=>import("./julia-DuME0IfC.js"),[]).then(t=>ve(t.julia))}}),ae.of({name:"Kotlin",extensions:["kt","kts"],load(){return ue(()=>import("./clike-B9uivgTg.js"),[]).then(t=>ve(t.kotlin))}}),ae.of({name:"LiveScript",alias:["ls"],extensions:["ls"],load(){return ue(()=>import("./livescript-BwQOo05w.js"),[]).then(t=>ve(t.liveScript))}}),ae.of({name:"Lua",extensions:["lua"],load(){return ue(()=>import("./lua-VAEuO923.js"),[]).then(t=>ve(t.lua))}}),ae.of({name:"mIRC",extensions:["mrc"],load(){return ue(()=>import("./mirc-CjQqDB4T.js"),[]).then(t=>ve(t.mirc))}}),ae.of({name:"Mathematica",extensions:["m","nb","wl","wls"],load(){return ue(()=>import("./mathematica-DTrFuWx2.js"),[]).then(t=>ve(t.mathematica))}}),ae.of({name:"Modelica",extensions:["mo"],load(){return ue(()=>import("./modelica-Dc1JOy9r.js"),[]).then(t=>ve(t.modelica))}}),ae.of({name:"MUMPS",extensions:["mps"],load(){return ue(()=>import("./mumps-BT43cFF4.js"),[]).then(t=>ve(t.mumps))}}),ae.of({name:"Mbox",extensions:["mbox"],load(){return ue(()=>import("./mbox-CNhZ1qSd.js"),[]).then(t=>ve(t.mbox))}}),ae.of({name:"Nginx",filename:/nginx.*\.conf$/i,load(){return ue(()=>import("./nginx-DdIZxoE0.js"),[]).then(t=>ve(t.nginx))}}),ae.of({name:"NSIS",extensions:["nsh","nsi"],load(){return ue(()=>import("./nsis-LY0VT_u5.js"),__vite__mapDeps([3,1])).then(t=>ve(t.nsis))}}),ae.of({name:"NTriples",extensions:["nt","nq"],load(){return ue(()=>import("./ntriples-BfvgReVJ.js"),[]).then(t=>ve(t.ntriples))}}),ae.of({name:"Objective-C",alias:["objective-c","objc"],extensions:["m"],load(){return ue(()=>import("./clike-B9uivgTg.js"),[]).then(t=>ve(t.objectiveC))}}),ae.of({name:"Objective-C++",alias:["objective-c++","objc++"],extensions:["mm"],load(){return ue(()=>import("./clike-B9uivgTg.js"),[]).then(t=>ve(t.objectiveCpp))}}),ae.of({name:"OCaml",extensions:["ml","mli","mll","mly"],load(){return ue(()=>import("./mllike-CXdrOF99.js"),[]).then(t=>ve(t.oCaml))}}),ae.of({name:"Octave",extensions:["m"],load(){return ue(()=>import("./octave-Ck1zUtKM.js"),[]).then(t=>ve(t.octave))}}),ae.of({name:"Oz",extensions:["oz"],load(){return ue(()=>import("./oz-BzwKVEFT.js"),[]).then(t=>ve(t.oz))}}),ae.of({name:"Pascal",extensions:["p","pas"],load(){return ue(()=>import("./pascal--L3eBynH.js"),[]).then(t=>ve(t.pascal))}}),ae.of({name:"Perl",extensions:["pl","pm"],load(){return ue(()=>import("./perl-CdXCOZ3F.js"),[]).then(t=>ve(t.perl))}}),ae.of({name:"Pig",extensions:["pig"],load(){return ue(()=>import("./pig-CevX1Tat.js"),[]).then(t=>ve(t.pig))}}),ae.of({name:"PowerShell",extensions:["ps1","psd1","psm1"],load(){return ue(()=>import("./powershell-CFHJl5sT.js"),[]).then(t=>ve(t.powerShell))}}),ae.of({name:"Properties files",alias:["ini","properties"],extensions:["properties","ini","in"],load(){return ue(()=>import("./properties-C78fOPTZ.js"),[]).then(t=>ve(t.properties))}}),ae.of({name:"ProtoBuf",extensions:["proto"],load(){return ue(()=>import("./protobuf-ChK-085T.js"),[]).then(t=>ve(t.protobuf))}}),ae.of({name:"Pug",alias:["jade"],extensions:["pug","jade"],load(){return ue(()=>import("./pug-DeIclll2.js"),__vite__mapDeps([4,5])).then(t=>ve(t.pug))}}),ae.of({name:"Puppet",extensions:["pp"],load(){return ue(()=>import("./puppet-DMA9R1ak.js"),[]).then(t=>ve(t.puppet))}}),ae.of({name:"Q",extensions:["q"],load(){return ue(()=>import("./q-pXgVlZs6.js"),[]).then(t=>ve(t.q))}}),ae.of({name:"R",alias:["rscript"],extensions:["r","R"],load(){return ue(()=>import("./r-B6wPVr8A.js"),[]).then(t=>ve(t.r))}}),ae.of({name:"RPM Changes",load(){return ue(()=>import("./rpm-CTu-6PCP.js"),[]).then(t=>ve(t.rpmChanges))}}),ae.of({name:"RPM Spec",extensions:["spec"],load(){return ue(()=>import("./rpm-CTu-6PCP.js"),[]).then(t=>ve(t.rpmSpec))}}),ae.of({name:"Ruby",alias:["jruby","macruby","rake","rb","rbx"],extensions:["rb"],filename:/^(Gemfile|Rakefile)$/,load(){return ue(()=>import("./ruby-BK5aLJev.js"),[]).then(t=>ve(t.ruby))}}),ae.of({name:"SAS",extensions:["sas"],load(){return ue(()=>import("./sas-B4kiWyti.js"),[]).then(t=>ve(t.sas))}}),ae.of({name:"Scala",extensions:["scala"],load(){return ue(()=>import("./clike-B9uivgTg.js"),[]).then(t=>ve(t.scala))}}),ae.of({name:"Scheme",extensions:["scm","ss"],load(){return ue(()=>import("./scheme-C41bIUwD.js"),[]).then(t=>ve(t.scheme))}}),ae.of({name:"Shell",alias:["bash","sh","zsh"],extensions:["sh","ksh","bash"],filename:/^PKGBUILD$/,load(){return ue(()=>import("./shell-CjFT_Tl9.js"),[]).then(t=>ve(t.shell))}}),ae.of({name:"Sieve",extensions:["siv","sieve"],load(){return ue(()=>import("./sieve-C3Gn_uJK.js"),[]).then(t=>ve(t.sieve))}}),ae.of({name:"Smalltalk",extensions:["st"],load(){return ue(()=>import("./smalltalk-CnHTOXQT.js"),[]).then(t=>ve(t.smalltalk))}}),ae.of({name:"Solr",load(){return ue(()=>import("./solr-DehyRSwq.js"),[]).then(t=>ve(t.solr))}}),ae.of({name:"SML",extensions:["sml","sig","fun","smackspec"],load(){return ue(()=>import("./mllike-CXdrOF99.js"),[]).then(t=>ve(t.sml))}}),ae.of({name:"SPARQL",alias:["sparul"],extensions:["rq","sparql"],load(){return ue(()=>import("./sparql-DkYu6x3z.js"),[]).then(t=>ve(t.sparql))}}),ae.of({name:"Spreadsheet",alias:["excel","formula"],load(){return ue(()=>import("./spreadsheet-BCZA_wO0.js"),[]).then(t=>ve(t.spreadsheet))}}),ae.of({name:"Squirrel",extensions:["nut"],load(){return ue(()=>import("./clike-B9uivgTg.js"),[]).then(t=>ve(t.squirrel))}}),ae.of({name:"Stylus",extensions:["styl"],load(){return ue(()=>import("./stylus-B533Al4x.js"),[]).then(t=>ve(t.stylus))}}),ae.of({name:"Swift",extensions:["swift"],load(){return ue(()=>import("./swift-BzpIVaGY.js"),[]).then(t=>ve(t.swift))}}),ae.of({name:"sTeX",load(){return ue(()=>import("./stex-C3f8Ysf7.js"),[]).then(t=>ve(t.stex))}}),ae.of({name:"LaTeX",alias:["tex"],extensions:["text","ltx","tex"],load(){return ue(()=>import("./stex-C3f8Ysf7.js"),[]).then(t=>ve(t.stex))}}),ae.of({name:"SystemVerilog",extensions:["v","sv","svh"],load(){return ue(()=>import("./verilog-C6RDOZhf.js"),[]).then(t=>ve(t.verilog))}}),ae.of({name:"Tcl",extensions:["tcl"],load(){return ue(()=>import("./tcl-DVfN8rqt.js"),[]).then(t=>ve(t.tcl))}}),ae.of({name:"Textile",extensions:["textile"],load(){return ue(()=>import("./textile-CnDTJFAw.js"),[]).then(t=>ve(t.textile))}}),ae.of({name:"TiddlyWiki",load(){return ue(()=>import("./tiddlywiki-DO-Gjzrf.js"),[]).then(t=>ve(t.tiddlyWiki))}}),ae.of({name:"Tiki wiki",load(){return ue(()=>import("./tiki-DGYXhP31.js"),[]).then(t=>ve(t.tiki))}}),ae.of({name:"TOML",extensions:["toml"],load(){return ue(()=>import("./toml-Bm5Em-hy.js"),[]).then(t=>ve(t.toml))}}),ae.of({name:"Troff",extensions:["1","2","3","4","5","6","7","8","9"],load(){return ue(()=>import("./troff-wAsdV37c.js"),[]).then(t=>ve(t.troff))}}),ae.of({name:"TTCN",extensions:["ttcn","ttcn3","ttcnpp"],load(){return ue(()=>import("./ttcn-CfJYG6tj.js"),[]).then(t=>ve(t.ttcn))}}),ae.of({name:"TTCN_CFG",extensions:["cfg"],load(){return ue(()=>import("./ttcn-cfg-B9xdYoR4.js"),[]).then(t=>ve(t.ttcnCfg))}}),ae.of({name:"Turtle",extensions:["ttl"],load(){return ue(()=>import("./turtle-B1tBg_DP.js"),[]).then(t=>ve(t.turtle))}}),ae.of({name:"Web IDL",extensions:["webidl"],load(){return ue(()=>import("./webidl-ZXfAyPTL.js"),[]).then(t=>ve(t.webIDL))}}),ae.of({name:"VB.NET",extensions:["vb"],load(){return ue(()=>import("./vb-CmGdzxic.js"),[]).then(t=>ve(t.vb))}}),ae.of({name:"VBScript",extensions:["vbs"],load(){return ue(()=>import("./vbscript-BuJXcnF6.js"),[]).then(t=>ve(t.vbScript))}}),ae.of({name:"Velocity",extensions:["vtl"],load(){return ue(()=>import("./velocity-D8B20fx6.js"),[]).then(t=>ve(t.velocity))}}),ae.of({name:"Verilog",extensions:["v"],load(){return ue(()=>import("./verilog-C6RDOZhf.js"),[]).then(t=>ve(t.verilog))}}),ae.of({name:"VHDL",extensions:["vhd","vhdl"],load(){return ue(()=>import("./vhdl-lSbBsy5d.js"),[]).then(t=>ve(t.vhdl))}}),ae.of({name:"XQuery",extensions:["xy","xquery","xq","xqm","xqy"],load(){return ue(()=>import("./xquery-DzFWVndE.js"),[]).then(t=>ve(t.xQuery))}}),ae.of({name:"Yacas",extensions:["ys"],load(){return ue(()=>import("./yacas-BJ4BC0dw.js"),[]).then(t=>ve(t.yacas))}}),ae.of({name:"Z80",extensions:["z80"],load(){return ue(()=>import("./z80-Hz9HOZM7.js"),[]).then(t=>ve(t.z80))}}),ae.of({name:"MscGen",extensions:["mscgen","mscin","msc"],load(){return ue(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(t=>ve(t.mscgen))}}),ae.of({name:"Xù",extensions:["xu"],load(){return ue(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(t=>ve(t.xu))}}),ae.of({name:"MsGenny",extensions:["msgenny"],load(){return ue(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(t=>ve(t.msgenny))}}),ae.of({name:"Vue",extensions:["vue"],load(){return ue(()=>import("./index-DDI7zoAS.js"),[]).then(t=>t.vue())}}),ae.of({name:"Angular Template",load(){return ue(()=>import("./index-D0rmJN3h.js"),[]).then(t=>t.angular())}})];var ile=t=>{var e=t.theme,n=t.settings,i=n===void 0?{}:n,r=t.styles,s=r===void 0?[]:r,a={".cm-gutters":{}},c={};i.background&&(c.backgroundColor=i.background),i.backgroundImage&&(c.backgroundImage=i.backgroundImage),i.foreground&&(c.color=i.foreground),i.fontSize&&(c.fontSize=i.fontSize),(i.background||i.foreground)&&(a["&"]=c),i.fontFamily&&(a["&.cm-editor .cm-scroller"]={fontFamily:i.fontFamily}),i.gutterBackground&&(a[".cm-gutters"].backgroundColor=i.gutterBackground),i.gutterForeground&&(a[".cm-gutters"].color=i.gutterForeground),i.gutterBorder&&(a[".cm-gutters"].borderRightColor=i.gutterBorder),i.caret&&(a[".cm-content"]={caretColor:i.caret},a[".cm-cursor, .cm-dropCursor"]={borderLeftColor:i.caret});var u={};i.gutterActiveForeground&&(u.color=i.gutterActiveForeground),i.lineHighlight&&(a[".cm-activeLine"]={backgroundColor:i.lineHighlight},u.backgroundColor=i.lineHighlight),a[".cm-activeLineGutter"]=u,i.selection&&(a["&.cm-focused .cm-selectionBackground, & .cm-line::selection, & .cm-selectionLayer .cm-selectionBackground, .cm-content ::selection"]={background:i.selection+" !important"}),i.selectionMatch&&(a["& .cm-selectionMatch"]={backgroundColor:i.selectionMatch});var h=Ae.theme(a,{dark:e==="dark"}),d=kh.define(s),m=[h,bT(d)];return m};function nk(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var gu=nk();function t3(t){gu=t}var cp={exec:()=>null};function Vt(t,e=""){let n=typeof t=="string"?t:t.source;const i={replace:(r,s)=>{let a=typeof s=="string"?s:s.source;return a=a.replace(or.caret,"$1"),n=n.replace(r,a),i},getRegex:()=>new RegExp(n,e)};return i}var or={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},rle=/^(?:[ \t]*(?:\n|$))+/,sle=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ole=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,cm=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ale=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ik=/(?:[*+-]|\d{1,9}[.)])/,n3=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,i3=Vt(n3).replace(/bull/g,ik).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),lle=Vt(n3).replace(/bull/g,ik).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),rk=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,cle=/^[^\n]+/,sk=/(?!\s*\])(?:\\.|[^\[\]\\])+/,ule=Vt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",sk).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),fle=Vt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ik).getRegex(),Py="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ok=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,hle=Vt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ok).replace("tag",Py).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),r3=Vt(rk).replace("hr",cm).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Py).getRegex(),dle=Vt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",r3).getRegex(),ak={blockquote:dle,code:sle,def:ule,fences:ole,heading:ale,hr:cm,html:hle,lheading:i3,list:fle,newline:rle,paragraph:r3,table:cp,text:cle},AD=Vt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",cm).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Py).getRegex(),ple={...ak,lheading:lle,table:AD,paragraph:Vt(rk).replace("hr",cm).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",AD).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Py).getRegex()},mle={...ak,html:Vt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ok).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:cp,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Vt(rk).replace("hr",cm).replace("heading",` *#{1,6} *[^
90
+ ]`).replace("lheading",i3).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},gle=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ole=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,s3=/^( {2,}|\\)\n(?!\s*$)/,ble=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,My=/[\p{P}\p{S}]/u,lk=/[\s\p{P}\p{S}]/u,o3=/[^\s\p{P}\p{S}]/u,yle=Vt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,lk).getRegex(),a3=/(?!~)[\p{P}\p{S}]/u,vle=/(?!~)[\s\p{P}\p{S}]/u,Sle=/(?:[^\s\p{P}\p{S}]|~)/u,xle=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,l3=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,wle=Vt(l3,"u").replace(/punct/g,My).getRegex(),Ele=Vt(l3,"u").replace(/punct/g,a3).getRegex(),c3="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",_le=Vt(c3,"gu").replace(/notPunctSpace/g,o3).replace(/punctSpace/g,lk).replace(/punct/g,My).getRegex(),Tle=Vt(c3,"gu").replace(/notPunctSpace/g,Sle).replace(/punctSpace/g,vle).replace(/punct/g,a3).getRegex(),kle=Vt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,o3).replace(/punctSpace/g,lk).replace(/punct/g,My).getRegex(),Cle=Vt(/\\(punct)/,"gu").replace(/punct/g,My).getRegex(),Ale=Vt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Rle=Vt(ok).replace("(?:-->|$)","-->").getRegex(),Ple=Vt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Rle).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Yb=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Mle=Vt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Yb).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),u3=Vt(/^!?\[(label)\]\[(ref)\]/).replace("label",Yb).replace("ref",sk).getRegex(),f3=Vt(/^!?\[(ref)\](?:\[\])?/).replace("ref",sk).getRegex(),Nle=Vt("reflink|nolink(?!\\()","g").replace("reflink",u3).replace("nolink",f3).getRegex(),ck={_backpedal:cp,anyPunctuation:Cle,autolink:Ale,blockSkip:xle,br:s3,code:Ole,del:cp,emStrongLDelim:wle,emStrongRDelimAst:_le,emStrongRDelimUnd:kle,escape:gle,link:Mle,nolink:f3,punctuation:yle,reflink:u3,reflinkSearch:Nle,tag:Ple,text:ble,url:cp},Qle={...ck,link:Vt(/^!?\[(label)\]\((.*?)\)/).replace("label",Yb).getRegex(),reflink:Vt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Yb).getRegex()},TE={...ck,emStrongRDelimAst:Tle,emStrongLDelim:Ele,url:Vt(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},$le={...TE,br:Vt(s3).replace("{2,}","*").getRegex(),text:Vt(TE.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},gO={normal:ak,gfm:ple,pedantic:mle},Qd={normal:ck,gfm:TE,breaks:$le,pedantic:Qle},Dle={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},RD=t=>Dle[t];function Eo(t,e){if(e){if(or.escapeTest.test(t))return t.replace(or.escapeReplace,RD)}else if(or.escapeTestNoEncode.test(t))return t.replace(or.escapeReplaceNoEncode,RD);return t}function PD(t){try{t=encodeURI(t).replace(or.percentDecode,"%")}catch{return null}return t}function MD(t,e){var s;const n=t.replace(or.findPipe,(a,c,u)=>{let h=!1,d=c;for(;--d>=0&&u[d]==="\\";)h=!h;return h?"|":" |"}),i=n.split(or.splitPipe);let r=0;if(i[0].trim()||i.shift(),i.length>0&&!((s=i.at(-1))!=null&&s.trim())&&i.pop(),e)if(i.length>e)i.splice(e);else for(;i.length<e;)i.push("");for(;r<i.length;r++)i[r]=i[r].trim().replace(or.slashPipe,"|");return i}function $d(t,e,n){const i=t.length;if(i===0)return"";let r=0;for(;r<i&&t.charAt(i-r-1)===e;)r++;return t.slice(0,i-r)}function Lle(t,e){if(t.indexOf(e[1])===-1)return-1;let n=0;for(let i=0;i<t.length;i++)if(t[i]==="\\")i++;else if(t[i]===e[0])n++;else if(t[i]===e[1]&&(n--,n<0))return i;return n>0?-2:-1}function ND(t,e,n,i,r){const s=e.href,a=e.title||null,c=t[1].replace(r.other.outputLinkReplace,"$1");i.state.inLink=!0;const u={type:t[0].charAt(0)==="!"?"image":"link",raw:n,href:s,title:a,text:c,tokens:i.inlineTokens(c)};return i.state.inLink=!1,u}function Ile(t,e,n){const i=t.match(n.other.indentCodeCompensation);if(i===null)return e;const r=i[1];return e.split(`
91
+ `).map(s=>{const a=s.match(n.other.beginningSpace);if(a===null)return s;const[c]=a;return c.length>=r.length?s.slice(r.length):s}).join(`
92
+ `)}var Gb=class{constructor(t){kt(this,"options");kt(this,"rules");kt(this,"lexer");this.options=t||gu}space(t){const e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){const e=this.rules.block.code.exec(t);if(e){const n=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?n:$d(n,`
93
+ `)}}}fences(t){const e=this.rules.block.fences.exec(t);if(e){const n=e[0],i=Ile(n,e[3]||"",this.rules);return{type:"code",raw:n,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:i}}}heading(t){const e=this.rules.block.heading.exec(t);if(e){let n=e[2].trim();if(this.rules.other.endingHash.test(n)){const i=$d(n,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(n=i.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){const e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:$d(e[0],`
94
+ `)}}blockquote(t){const e=this.rules.block.blockquote.exec(t);if(e){let n=$d(e[0],`
95
+ `).split(`
96
+ `),i="",r="";const s=[];for(;n.length>0;){let a=!1;const c=[];let u;for(u=0;u<n.length;u++)if(this.rules.other.blockquoteStart.test(n[u]))c.push(n[u]),a=!0;else if(!a)c.push(n[u]);else break;n=n.slice(u);const h=c.join(`
97
+ `),d=h.replace(this.rules.other.blockquoteSetextReplace,`
98
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
99
+ ${h}`:h,r=r?`${r}
100
+ ${d}`:d;const m=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,s,!0),this.lexer.state.top=m,n.length===0)break;const g=s.at(-1);if((g==null?void 0:g.type)==="code")break;if((g==null?void 0:g.type)==="blockquote"){const y=g,v=y.raw+`
101
+ `+n.join(`
102
+ `),S=this.blockquote(v);s[s.length-1]=S,i=i.substring(0,i.length-y.raw.length)+S.raw,r=r.substring(0,r.length-y.text.length)+S.text;break}else if((g==null?void 0:g.type)==="list"){const y=g,v=y.raw+`
103
+ `+n.join(`
104
+ `),S=this.list(v);s[s.length-1]=S,i=i.substring(0,i.length-g.raw.length)+S.raw,r=r.substring(0,r.length-y.raw.length)+S.raw,n=v.substring(s.at(-1).raw.length).split(`
105
+ `);continue}}return{type:"blockquote",raw:i,tokens:s,text:r}}}list(t){let e=this.rules.block.list.exec(t);if(e){let n=e[1].trim();const i=n.length>1,r={type:"list",raw:"",ordered:i,start:i?+n.slice(0,-1):"",loose:!1,items:[]};n=i?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=i?n:"[*+-]");const s=this.rules.other.listItemRegex(n);let a=!1;for(;t;){let u=!1,h="",d="";if(!(e=s.exec(t))||this.rules.block.hr.test(t))break;h=e[0],t=t.substring(h.length);let m=e[2].split(`
106
+ `,1)[0].replace(this.rules.other.listReplaceTabs,w=>" ".repeat(3*w.length)),g=t.split(`
107
+ `,1)[0],y=!m.trim(),v=0;if(this.options.pedantic?(v=2,d=m.trimStart()):y?v=e[1].length+1:(v=e[2].search(this.rules.other.nonSpaceChar),v=v>4?1:v,d=m.slice(v),v+=e[1].length),y&&this.rules.other.blankLine.test(g)&&(h+=g+`
108
+ `,t=t.substring(g.length+1),u=!0),!u){const w=this.rules.other.nextBulletRegex(v),C=this.rules.other.hrRegex(v),k=this.rules.other.fencesBeginRegex(v),A=this.rules.other.headingBeginRegex(v),R=this.rules.other.htmlBeginRegex(v);for(;t;){const P=t.split(`
109
+ `,1)[0];let N;if(g=P,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),N=g):N=g.replace(this.rules.other.tabCharGlobal," "),k.test(g)||A.test(g)||R.test(g)||w.test(g)||C.test(g))break;if(N.search(this.rules.other.nonSpaceChar)>=v||!g.trim())d+=`
110
+ `+N.slice(v);else{if(y||m.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||k.test(m)||A.test(m)||C.test(m))break;d+=`
111
+ `+g}!y&&!g.trim()&&(y=!0),h+=P+`
112
+ `,t=t.substring(P.length+1),m=N.slice(v)}}r.loose||(a?r.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(a=!0));let S=null,x;this.options.gfm&&(S=this.rules.other.listIsTask.exec(d),S&&(x=S[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),r.items.push({type:"list_item",raw:h,task:!!S,checked:x,loose:!1,text:d,tokens:[]}),r.raw+=h}const c=r.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;r.raw=r.raw.trimEnd();for(let u=0;u<r.items.length;u++)if(this.lexer.state.top=!1,r.items[u].tokens=this.lexer.blockTokens(r.items[u].text,[]),!r.loose){const h=r.items[u].tokens.filter(m=>m.type==="space"),d=h.length>0&&h.some(m=>this.rules.other.anyLine.test(m.raw));r.loose=d}if(r.loose)for(let u=0;u<r.items.length;u++)r.items[u].loose=!0;return r}}html(t){const e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:e[0]}}def(t){const e=this.rules.block.def.exec(t);if(e){const n=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",r=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:n,raw:e[0],href:i,title:r}}}table(t){var a;const e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;const n=MD(e[1]),i=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),r=(a=e[3])!=null&&a.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
113
+ `):[],s={type:"table",raw:e[0],header:[],align:[],rows:[]};if(n.length===i.length){for(const c of i)this.rules.other.tableAlignRight.test(c)?s.align.push("right"):this.rules.other.tableAlignCenter.test(c)?s.align.push("center"):this.rules.other.tableAlignLeft.test(c)?s.align.push("left"):s.align.push(null);for(let c=0;c<n.length;c++)s.header.push({text:n[c],tokens:this.lexer.inline(n[c]),header:!0,align:s.align[c]});for(const c of r)s.rows.push(MD(c,s.header.length).map((u,h)=>({text:u,tokens:this.lexer.inline(u),header:!1,align:s.align[h]})));return s}}lheading(t){const e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:e[2].charAt(0)==="="?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){const e=this.rules.block.paragraph.exec(t);if(e){const n=e[1].charAt(e[1].length-1)===`
114
+ `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:n,tokens:this.lexer.inline(n)}}}text(t){const e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){const e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){const e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){const e=this.rules.inline.link.exec(t);if(e){const n=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;const s=$d(n.slice(0,-1),"\\");if((n.length-s.length)%2===0)return}else{const s=Lle(e[2],"()");if(s===-2)return;if(s>-1){const c=(e[0].indexOf("!")===0?5:4)+e[1].length+s;e[2]=e[2].substring(0,s),e[0]=e[0].substring(0,c).trim(),e[3]=""}}let i=e[2],r="";if(this.options.pedantic){const s=this.rules.other.pedanticHrefTitle.exec(i);s&&(i=s[1],r=s[3])}else r=e[3]?e[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?i=i.slice(1):i=i.slice(1,-1)),ND(e,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:r&&r.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){const i=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),r=e[i.toLowerCase()];if(!r){const s=n[0].charAt(0);return{type:"text",raw:s,text:s}}return ND(n,r,n[0],this.lexer,this.rules)}}emStrong(t,e,n=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!i||i[3]&&n.match(this.rules.other.unicodeAlphaNumeric))return;if(!(i[1]||i[2]||"")||!n||this.rules.inline.punctuation.exec(n)){const s=[...i[0]].length-1;let a,c,u=s,h=0;const d=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(d.lastIndex=0,e=e.slice(-1*t.length+s);(i=d.exec(e))!=null;){if(a=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!a)continue;if(c=[...a].length,i[3]||i[4]){u+=c;continue}else if((i[5]||i[6])&&s%3&&!((s+c)%3)){h+=c;continue}if(u-=c,u>0)continue;c=Math.min(c,c+u+h);const m=[...i[0]][0].length,g=t.slice(0,s+i.index+m+c);if(Math.min(s,c)%2){const v=g.slice(1,-1);return{type:"em",raw:g,text:v,tokens:this.lexer.inlineTokens(v)}}const y=g.slice(2,-2);return{type:"strong",raw:g,text:y,tokens:this.lexer.inlineTokens(y)}}}}codespan(t){const e=this.rules.inline.code.exec(t);if(e){let n=e[2].replace(this.rules.other.newLineCharGlobal," ");const i=this.rules.other.nonSpaceChar.test(n),r=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return i&&r&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:e[0],text:n}}}br(t){const e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){const e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){const e=this.rules.inline.autolink.exec(t);if(e){let n,i;return e[2]==="@"?(n=e[1],i="mailto:"+n):(n=e[1],i=n),{type:"link",raw:e[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}url(t){var n;let e;if(e=this.rules.inline.url.exec(t)){let i,r;if(e[2]==="@")i=e[0],r="mailto:"+i;else{let s;do s=e[0],e[0]=((n=this.rules.inline._backpedal.exec(e[0]))==null?void 0:n[0])??"";while(s!==e[0]);i=e[0],e[1]==="www."?r="http://"+e[0]:r=e[0]}return{type:"link",raw:e[0],text:i,href:r,tokens:[{type:"text",raw:i,text:i}]}}}inlineText(t){const e=this.rules.inline.text.exec(t);if(e){const n=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:n}}}},_a=class kE{constructor(e){kt(this,"tokens");kt(this,"options");kt(this,"state");kt(this,"tokenizer");kt(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=e||gu,this.options.tokenizer=this.options.tokenizer||new Gb,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const n={other:or,block:gO.normal,inline:Qd.normal};this.options.pedantic?(n.block=gO.pedantic,n.inline=Qd.pedantic):this.options.gfm&&(n.block=gO.gfm,this.options.breaks?n.inline=Qd.breaks:n.inline=Qd.gfm),this.tokenizer.rules=n}static get rules(){return{block:gO,inline:Qd}}static lex(e,n){return new kE(n).lex(e)}static lexInline(e,n){return new kE(n).inlineTokens(e)}lex(e){e=e.replace(or.carriageReturn,`
115
+ `),this.blockTokens(e,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){const i=this.inlineQueue[n];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,n=[],i=!1){var r,s,a;for(this.options.pedantic&&(e=e.replace(or.tabCharGlobal," ").replace(or.spaceLine,""));e;){let c;if((s=(r=this.options.extensions)==null?void 0:r.block)!=null&&s.some(h=>(c=h.call({lexer:this},e,n))?(e=e.substring(c.raw.length),n.push(c),!0):!1))continue;if(c=this.tokenizer.space(e)){e=e.substring(c.raw.length);const h=n.at(-1);c.raw.length===1&&h!==void 0?h.raw+=`
116
+ `:n.push(c);continue}if(c=this.tokenizer.code(e)){e=e.substring(c.raw.length);const h=n.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=`
117
+ `+c.raw,h.text+=`
118
+ `+c.text,this.inlineQueue.at(-1).src=h.text):n.push(c);continue}if(c=this.tokenizer.fences(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.heading(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.hr(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.blockquote(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.list(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.html(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.def(e)){e=e.substring(c.raw.length);const h=n.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=`
119
+ `+c.raw,h.text+=`
120
+ `+c.raw,this.inlineQueue.at(-1).src=h.text):this.tokens.links[c.tag]||(this.tokens.links[c.tag]={href:c.href,title:c.title});continue}if(c=this.tokenizer.table(e)){e=e.substring(c.raw.length),n.push(c);continue}if(c=this.tokenizer.lheading(e)){e=e.substring(c.raw.length),n.push(c);continue}let u=e;if((a=this.options.extensions)!=null&&a.startBlock){let h=1/0;const d=e.slice(1);let m;this.options.extensions.startBlock.forEach(g=>{m=g.call({lexer:this},d),typeof m=="number"&&m>=0&&(h=Math.min(h,m))}),h<1/0&&h>=0&&(u=e.substring(0,h+1))}if(this.state.top&&(c=this.tokenizer.paragraph(u))){const h=n.at(-1);i&&(h==null?void 0:h.type)==="paragraph"?(h.raw+=`
121
+ `+c.raw,h.text+=`
122
+ `+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):n.push(c),i=u.length!==e.length,e=e.substring(c.raw.length);continue}if(c=this.tokenizer.text(e)){e=e.substring(c.raw.length);const h=n.at(-1);(h==null?void 0:h.type)==="text"?(h.raw+=`
123
+ `+c.raw,h.text+=`
124
+ `+c.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):n.push(c);continue}if(e){const h="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return this.state.top=!0,n}inline(e,n=[]){return this.inlineQueue.push({src:e,tokens:n}),n}inlineTokens(e,n=[]){var c,u,h;let i=e,r=null;if(this.tokens.links){const d=Object.keys(this.tokens.links);if(d.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)d.includes(r[0].slice(r[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,r.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(r=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)i=i.slice(0,r.index)+"["+"a".repeat(r[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let s=!1,a="";for(;e;){s||(a=""),s=!1;let d;if((u=(c=this.options.extensions)==null?void 0:c.inline)!=null&&u.some(g=>(d=g.call({lexer:this},e,n))?(e=e.substring(d.raw.length),n.push(d),!0):!1))continue;if(d=this.tokenizer.escape(e)){e=e.substring(d.raw.length),n.push(d);continue}if(d=this.tokenizer.tag(e)){e=e.substring(d.raw.length),n.push(d);continue}if(d=this.tokenizer.link(e)){e=e.substring(d.raw.length),n.push(d);continue}if(d=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(d.raw.length);const g=n.at(-1);d.type==="text"&&(g==null?void 0:g.type)==="text"?(g.raw+=d.raw,g.text+=d.text):n.push(d);continue}if(d=this.tokenizer.emStrong(e,i,a)){e=e.substring(d.raw.length),n.push(d);continue}if(d=this.tokenizer.codespan(e)){e=e.substring(d.raw.length),n.push(d);continue}if(d=this.tokenizer.br(e)){e=e.substring(d.raw.length),n.push(d);continue}if(d=this.tokenizer.del(e)){e=e.substring(d.raw.length),n.push(d);continue}if(d=this.tokenizer.autolink(e)){e=e.substring(d.raw.length),n.push(d);continue}if(!this.state.inLink&&(d=this.tokenizer.url(e))){e=e.substring(d.raw.length),n.push(d);continue}let m=e;if((h=this.options.extensions)!=null&&h.startInline){let g=1/0;const y=e.slice(1);let v;this.options.extensions.startInline.forEach(S=>{v=S.call({lexer:this},y),typeof v=="number"&&v>=0&&(g=Math.min(g,v))}),g<1/0&&g>=0&&(m=e.substring(0,g+1))}if(d=this.tokenizer.inlineText(m)){e=e.substring(d.raw.length),d.raw.slice(-1)!=="_"&&(a=d.raw.slice(-1)),s=!0;const g=n.at(-1);(g==null?void 0:g.type)==="text"?(g.raw+=d.raw,g.text+=d.text):n.push(d);continue}if(e){const g="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(g);break}else throw new Error(g)}}return n}},Fb=class{constructor(t){kt(this,"options");kt(this,"parser");this.options=t||gu}space(t){return""}code({text:t,lang:e,escaped:n}){var s;const i=(s=(e||"").match(or.notSpaceStart))==null?void 0:s[0],r=t.replace(or.endingNewline,"")+`
125
+ `;return i?'<pre><code class="language-'+Eo(i)+'">'+(n?r:Eo(r,!0))+`</code></pre>
126
+ `:"<pre><code>"+(n?r:Eo(r,!0))+`</code></pre>
127
+ `}blockquote({tokens:t}){return`<blockquote>
128
+ ${this.parser.parse(t)}</blockquote>
129
+ `}html({text:t}){return t}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>
130
+ `}hr(t){return`<hr>
131
+ `}list(t){const e=t.ordered,n=t.start;let i="";for(let a=0;a<t.items.length;a++){const c=t.items[a];i+=this.listitem(c)}const r=e?"ol":"ul",s=e&&n!==1?' start="'+n+'"':"";return"<"+r+s+`>
132
+ `+i+"</"+r+`>
133
+ `}listitem(t){var n;let e="";if(t.task){const i=this.checkbox({checked:!!t.checked});t.loose?((n=t.tokens[0])==null?void 0:n.type)==="paragraph"?(t.tokens[0].text=i+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=i+" "+Eo(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:i+" ",text:i+" ",escaped:!0}):e+=i+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`<li>${e}</li>
134
+ `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
135
+ `}table(t){let e="",n="";for(let r=0;r<t.header.length;r++)n+=this.tablecell(t.header[r]);e+=this.tablerow({text:n});let i="";for(let r=0;r<t.rows.length;r++){const s=t.rows[r];n="";for(let a=0;a<s.length;a++)n+=this.tablecell(s[a]);i+=this.tablerow({text:n})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
136
+ <thead>
137
+ `+e+`</thead>
138
+ `+i+`</table>
139
+ `}tablerow({text:t}){return`<tr>
140
+ ${t}</tr>
141
+ `}tablecell(t){const e=this.parser.parseInline(t.tokens),n=t.header?"th":"td";return(t.align?`<${n} align="${t.align}">`:`<${n}>`)+e+`</${n}>
142
+ `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Eo(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:n}){const i=this.parser.parseInline(n),r=PD(t);if(r===null)return i;t=r;let s='<a href="'+t+'"';return e&&(s+=' title="'+Eo(e)+'"'),s+=">"+i+"</a>",s}image({href:t,title:e,text:n,tokens:i}){i&&(n=this.parser.parseInline(i,this.parser.textRenderer));const r=PD(t);if(r===null)return Eo(n);t=r;let s=`<img src="${t}" alt="${n}"`;return e&&(s+=` title="${Eo(e)}"`),s+=">",s}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Eo(t.text)}},uk=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},Ta=class CE{constructor(e){kt(this,"options");kt(this,"renderer");kt(this,"textRenderer");this.options=e||gu,this.options.renderer=this.options.renderer||new Fb,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new uk}static parse(e,n){return new CE(n).parse(e)}static parseInline(e,n){return new CE(n).parseInline(e)}parse(e,n=!0){var r,s;let i="";for(let a=0;a<e.length;a++){const c=e[a];if((s=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&s[c.type]){const h=c,d=this.options.extensions.renderers[h.type].call({parser:this},h);if(d!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(h.type)){i+=d||"";continue}}const u=c;switch(u.type){case"space":{i+=this.renderer.space(u);continue}case"hr":{i+=this.renderer.hr(u);continue}case"heading":{i+=this.renderer.heading(u);continue}case"code":{i+=this.renderer.code(u);continue}case"table":{i+=this.renderer.table(u);continue}case"blockquote":{i+=this.renderer.blockquote(u);continue}case"list":{i+=this.renderer.list(u);continue}case"html":{i+=this.renderer.html(u);continue}case"paragraph":{i+=this.renderer.paragraph(u);continue}case"text":{let h=u,d=this.renderer.text(h);for(;a+1<e.length&&e[a+1].type==="text";)h=e[++a],d+=`
143
+ `+this.renderer.text(h);n?i+=this.renderer.paragraph({type:"paragraph",raw:d,text:d,tokens:[{type:"text",raw:d,text:d,escaped:!0}]}):i+=d;continue}default:{const h='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return i}parseInline(e,n=this.renderer){var r,s;let i="";for(let a=0;a<e.length;a++){const c=e[a];if((s=(r=this.options.extensions)==null?void 0:r.renderers)!=null&&s[c.type]){const h=this.options.extensions.renderers[c.type].call({parser:this},c);if(h!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(c.type)){i+=h||"";continue}}const u=c;switch(u.type){case"escape":{i+=n.text(u);break}case"html":{i+=n.html(u);break}case"link":{i+=n.link(u);break}case"image":{i+=n.image(u);break}case"strong":{i+=n.strong(u);break}case"em":{i+=n.em(u);break}case"codespan":{i+=n.codespan(u);break}case"br":{i+=n.br(u);break}case"del":{i+=n.del(u);break}case"text":{i+=n.text(u);break}default:{const h='Token with "'+u.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return i}},Pw,tb=(Pw=class{constructor(t){kt(this,"options");kt(this,"block");this.options=t||gu}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}provideLexer(){return this.block?_a.lex:_a.lexInline}provideParser(){return this.block?Ta.parse:Ta.parseInline}},kt(Pw,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Pw),jle=class{constructor(...t){kt(this,"defaults",nk());kt(this,"options",this.setOptions);kt(this,"parse",this.parseMarkdown(!0));kt(this,"parseInline",this.parseMarkdown(!1));kt(this,"Parser",Ta);kt(this,"Renderer",Fb);kt(this,"TextRenderer",uk);kt(this,"Lexer",_a);kt(this,"Tokenizer",Gb);kt(this,"Hooks",tb);this.use(...t)}walkTokens(t,e){var i,r;let n=[];for(const s of t)switch(n=n.concat(e.call(this,s)),s.type){case"table":{const a=s;for(const c of a.header)n=n.concat(this.walkTokens(c.tokens,e));for(const c of a.rows)for(const u of c)n=n.concat(this.walkTokens(u.tokens,e));break}case"list":{const a=s;n=n.concat(this.walkTokens(a.items,e));break}default:{const a=s;(r=(i=this.defaults.extensions)==null?void 0:i.childTokens)!=null&&r[a.type]?this.defaults.extensions.childTokens[a.type].forEach(c=>{const u=a[c].flat(1/0);n=n.concat(this.walkTokens(u,e))}):a.tokens&&(n=n.concat(this.walkTokens(a.tokens,e)))}}return n}use(...t){const e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{const i={...n};if(i.async=this.defaults.async||i.async||!1,n.extensions&&(n.extensions.forEach(r=>{if(!r.name)throw new Error("extension name required");if("renderer"in r){const s=e.renderers[r.name];s?e.renderers[r.name]=function(...a){let c=r.renderer.apply(this,a);return c===!1&&(c=s.apply(this,a)),c}:e.renderers[r.name]=r.renderer}if("tokenizer"in r){if(!r.level||r.level!=="block"&&r.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const s=e[r.level];s?s.unshift(r.tokenizer):e[r.level]=[r.tokenizer],r.start&&(r.level==="block"?e.startBlock?e.startBlock.push(r.start):e.startBlock=[r.start]:r.level==="inline"&&(e.startInline?e.startInline.push(r.start):e.startInline=[r.start]))}"childTokens"in r&&r.childTokens&&(e.childTokens[r.name]=r.childTokens)}),i.extensions=e),n.renderer){const r=this.defaults.renderer||new Fb(this.defaults);for(const s in n.renderer){if(!(s in r))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;const a=s,c=n.renderer[a],u=r[a];r[a]=(...h)=>{let d=c.apply(r,h);return d===!1&&(d=u.apply(r,h)),d||""}}i.renderer=r}if(n.tokenizer){const r=this.defaults.tokenizer||new Gb(this.defaults);for(const s in n.tokenizer){if(!(s in r))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;const a=s,c=n.tokenizer[a],u=r[a];r[a]=(...h)=>{let d=c.apply(r,h);return d===!1&&(d=u.apply(r,h)),d}}i.tokenizer=r}if(n.hooks){const r=this.defaults.hooks||new tb;for(const s in n.hooks){if(!(s in r))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;const a=s,c=n.hooks[a],u=r[a];tb.passThroughHooks.has(s)?r[a]=h=>{if(this.defaults.async)return Promise.resolve(c.call(r,h)).then(m=>u.call(r,m));const d=c.call(r,h);return u.call(r,d)}:r[a]=(...h)=>{let d=c.apply(r,h);return d===!1&&(d=u.apply(r,h)),d}}i.hooks=r}if(n.walkTokens){const r=this.defaults.walkTokens,s=n.walkTokens;i.walkTokens=function(a){let c=[];return c.push(s.call(this,a)),r&&(c=c.concat(r.call(this,a))),c}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return _a.lex(t,e??this.defaults)}parser(t,e){return Ta.parse(t,e??this.defaults)}parseMarkdown(t){return(n,i)=>{const r={...i},s={...this.defaults,...r},a=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&r.async===!1)return a(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));s.hooks&&(s.hooks.options=s,s.hooks.block=t);const c=s.hooks?s.hooks.provideLexer():t?_a.lex:_a.lexInline,u=s.hooks?s.hooks.provideParser():t?Ta.parse:Ta.parseInline;if(s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(n):n).then(h=>c(h,s)).then(h=>s.hooks?s.hooks.processAllTokens(h):h).then(h=>s.walkTokens?Promise.all(this.walkTokens(h,s.walkTokens)).then(()=>h):h).then(h=>u(h,s)).then(h=>s.hooks?s.hooks.postprocess(h):h).catch(a);try{s.hooks&&(n=s.hooks.preprocess(n));let h=c(n,s);s.hooks&&(h=s.hooks.processAllTokens(h)),s.walkTokens&&this.walkTokens(h,s.walkTokens);let d=u(h,s);return s.hooks&&(d=s.hooks.postprocess(d)),d}catch(h){return a(h)}}}onError(t,e){return n=>{if(n.message+=`
144
+ Please report this to https://github.com/markedjs/marked.`,t){const i="<p>An error occurred:</p><pre>"+Eo(n.message+"",!0)+"</pre>";return e?Promise.resolve(i):i}if(e)return Promise.reject(n);throw n}}},ou=new jle;function Ht(t,e){return ou.parse(t,e)}Ht.options=Ht.setOptions=function(t){return ou.setOptions(t),Ht.defaults=ou.defaults,t3(Ht.defaults),Ht};Ht.getDefaults=nk;Ht.defaults=gu;Ht.use=function(...t){return ou.use(...t),Ht.defaults=ou.defaults,t3(Ht.defaults),Ht};Ht.walkTokens=function(t,e){return ou.walkTokens(t,e)};Ht.parseInline=ou.parseInline;Ht.Parser=Ta;Ht.parser=Ta.parse;Ht.Renderer=Fb;Ht.TextRenderer=uk;Ht.Lexer=_a;Ht.lexer=_a.lex;Ht.Tokenizer=Gb;Ht.Hooks=tb;Ht.parse=Ht;Ht.options;Ht.setOptions;Ht.use;Ht.walkTokens;Ht.parseInline;Ta.parse;_a.lex;/*! @license DOMPurify 3.4.17 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.17/LICENSE */function QD(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function Ble(t){if(Array.isArray(t))return t}function zle(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var i,r,s,a,c=[],u=!0,h=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(u=(i=s.call(n)).done)&&(c.push(i.value),c.length!==e);u=!0);}catch(d){h=!0,r=d}finally{try{if(!u&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(h)throw r}}return c}}function Xle(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
145
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */function Ule(t,e){return Ble(t)||zle(t,e)||Zle(t,e)||Xle()}function Zle(t,e){if(t){if(typeof t=="string")return QD(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?QD(t,e):void 0}}const h3=Object.entries,$D=Object.setPrototypeOf,Vle=Object.isFrozen,d3=Object.getPrototypeOf,p3=Object.getOwnPropertyDescriptor;let Oi=Object.freeze,Di=Object.seal,gf=Object.create,m3=typeof Reflect<"u"&&Reflect,AE=m3.apply,RE=m3.construct;Oi||(Oi=function(e){return e});Di||(Di=function(e){return e});AE||(AE=function(e,n){for(var i=arguments.length,r=new Array(i>2?i-2:0),s=2;s<i;s++)r[s-2]=arguments[s];return e.apply(n,r)});RE||(RE=function(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return new e(...i)});const ma=yn(Array.prototype.forEach),qle=yn(Array.prototype.lastIndexOf),DD=yn(Array.prototype.pop),Dd=yn(Array.prototype.push),Yle=yn(Array.prototype.slice),Gle=yn(Array.prototype.splice),Nf=Array.isArray,Ax=g3(Set),Rx=yn(Set.prototype.add),Ld=yn(Set.prototype.has),Tc=yn(String.prototype.toLowerCase),Px=yn(String.prototype.toString),LD=yn(String.prototype.match),Id=yn(String.prototype.replace),ID=yn(String.prototype.indexOf),Fle=yn(String.prototype.trim),Hle=yn(Number.prototype.toString),Wle=yn(Boolean.prototype.toString),jD=typeof BigInt>"u"?null:yn(BigInt.prototype.toString),BD=typeof Symbol>"u"?null:yn(Symbol.prototype.toString),yr=yn(Object.prototype.hasOwnProperty),jd=yn(Object.prototype.toString),Ri=yn(RegExp.prototype.test),ga=g3(TypeError);function yn(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return AE(t,e,i)}}function g3(t){return function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return RE(t,n)}}function $t(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Tc;if($D&&$D(t,null),!Nf(e))return t;let i=e.length;for(;i--;){let r=e[i];if(typeof r=="string"){const s=n(r);s!==r&&(Vle(e)||(e[i]=s),r=s)}t[r]=!0}return t}function Kle(t){for(let e=0;e<t.length;e++)yr(t,e)||(t[e]=null);return t}function Ur(t){const e=gf(null);for(const i of h3(t)){var n=Ule(i,2);const r=n[0],s=n[1];yr(t,r)&&(Nf(s)?e[r]=Kle(s):s&&typeof s=="object"&&s.constructor===Object?e[r]=Ur(s):e[r]=s)}return e}function Jle(t){switch(typeof t){case"string":return t;case"number":return Hle(t);case"boolean":return Wle(t);case"bigint":return jD?jD(t):"0";case"symbol":return BD?BD(t):"Symbol()";case"undefined":return jd(t);case"function":case"object":{if(t===null)return jd(t);const e=t,n=hs(e,"toString");if(typeof n=="function"){const i=n(e);return typeof i=="string"?i:jd(i)}return jd(t)}default:return jd(t)}}function hs(t,e){for(;t!==null;){const i=p3(t,e);if(i){if(i.get)return yn(i.get);if(typeof i.value=="function")return yn(i.value)}t=d3(t)}function n(){return null}return n}function ece(t,e){for(;t!==null;){const n=p3(t,e);if(n)return n.get?yn(n.get):null;t=d3(t)}return null}function tce(t){try{return Ri(t,""),!0}catch{return!1}}const zD=Oi(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Mx=Oi(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Nx=Oi(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),nce=Oi(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Qx=Oi(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),ice=Oi(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),XD=Oi(["#text"]),UD=Oi(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),$x=Oi(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),ZD=Oi(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),OO=Oi(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),rce=Di(/{{[\w\W]*|^[\w\W]*}}/g),sce=Di(/<%[\w\W]*|^[\w\W]*%>/g),oce=Di(/\${[\w\W]*/g),ace=Di(/^data-[\-\w.\u00B7-\uFFFF]+$/),lce=Di(/^aria-[\-\w]+$/),VD=Di(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),cce=Di(/^(?:\w+script|data):/i),uce=Di(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),fce=Di(/^html$/i),hce=Di(/^[a-z][.\w]*(-[.\w]+)+$/i),Dx=Di(/<[/\w!]/g),qD=Di(/<[/\w]/g),dce=Di(/<\/no(script|embed|frames)/i),YD=Di(/\/>/i),Yn={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},pce=Oi($t({},["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"])),mce=function(){return typeof window>"u"?null:window},gce=function(e,n){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let i=null;const r="data-tt-policy-suffix";n&&n.hasAttribute(r)&&(i=n.getAttribute(r));const s="dompurify"+(i?"#"+i:"");try{return e.createPolicy(s,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}},GD=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Ol=function(e,n,i,r){return yr(e,n)&&Nf(e[n])?$t(r.base?Ur(r.base):{},e[n],r.transform):i},Lx=function(e,n,i){const r=yr(e,n)?e[n]:void 0;return r&&typeof r=="object"?Ur(r):i()};function O3(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:mce();const e=ye=>O3(ye);if(e.version="3.4.17",e.removed=[],!t||!t.document||t.document.nodeType!==Yn.document||!t.Element)return e.isSupported=!1,e;let n=t.document;const i=n,r=i.currentScript;t.DocumentFragment;const s=t.HTMLTemplateElement,a=t.Node,c=t.Element,u=t.NodeFilter;t.NamedNodeMap===void 0&&(t.NamedNodeMap||t.MozNamedAttrMap),t.HTMLFormElement;const h=t.DOMParser,d=t.trustedTypes,m=c.prototype,g=hs(m,"cloneNode"),y=hs(m,"remove"),v=hs(m,"removeAttributeNode"),S=hs(m,"nextSibling"),x=hs(m,"childNodes"),w=hs(m,"parentNode"),C=hs(m,"shadowRoot"),k=hs(m,"attributes"),A=a&&a.prototype?hs(a.prototype,"nodeType"):null,R=a&&a.prototype?hs(a.prototype,"nodeName"):null,P=a&&a.prototype?hs(a.prototype,"ownerDocument"):null,N=function(Q){return A?A(Q):Q.nodeType},$=function(Q){return R?R(Q):Q.nodeName},D=ece(m,"namespaceURI"),U=function(Q){return D?D(Q):Q.namespaceURI};if(typeof s=="function"){const ye=n.createElement("template");ye.content&&ye.content.ownerDocument&&(n=ye.content.ownerDocument)}let V,X="",ee,le=!1,re=0;const G=function(){if(re>0)throw ga('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},oe=function(Q){G(),re++;try{return V.createHTML(Q)}finally{re--}},K=function(Q){G(),re++;try{return V.createScriptURL(Q)}finally{re--}},me=function(){return le||(ee=gce(d,r),le=!0),ee},fe=n,Te=fe.implementation,ze=fe.createNodeIterator,tt=fe.createDocumentFragment,I=fe.getElementsByTagName,ie=i.importNode;let B=GD();e.isSupported=typeof h3=="function"&&typeof w=="function"&&Te&&Te.createHTMLDocument!==void 0;const se=rce,we=sce,_e=oce,be=ace,Se=lce,Ee=cce,Ie=uce,Ye=hce;let Ge=VD,qe=null;const He=$t({},[...zD,...Mx,...Nx,...Qx,...XD]);let Xe=null;const zn=$t({},[...UD,...$x,...ZD,...OO]);let vn=Object.seal(gf(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),wn=null,Ii=null;const ci=Object.seal(gf(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ei=!0,qi=!0,En=!1,cr=!0,yi=!1,Nn=!0,vi=!1,ks=!1,Cs=null,As=null,Kr=!1,ur=!1,Jr=!1,eo=!1,to=!0,Qn=!1;const Rt="user-content-";let Cr=!0,Yi=!1,$n=null,Z={},he=null;const Pe=$t({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let ot=null;const Xt=$t({},["audio","video","img","source","image","track"]);let vt=null;const Le=$t({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ce="http://www.w3.org/1998/Math/MathML",nt="http://www.w3.org/2000/svg",jt="http://www.w3.org/1999/xhtml";let qt=jt,fr=!1,es=null;const no=$t({},[Ce,nt,jt],Px),ts=Oi(["mi","mo","mn","ms","mtext"]);let ns=$t({},ts);const io=Oi(["annotation-xml"]);let La=$t({},io);const Nh=$t({},["title","style","font","a","script"]);let Rs=null;const ro=["application/xhtml+xml","text/html"],Ko="text/html";let pn=null,Ps=null;const Ar=n.createElement("form"),Ia=function(Q){return Q instanceof RegExp||Q instanceof Function},so=function(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Ps&&Ps===Q)return;(!Q||typeof Q!="object")&&(Q={}),Q=Ur(Q),Rs=ro.indexOf(Q.PARSER_MEDIA_TYPE)===-1?Ko:Q.PARSER_MEDIA_TYPE,pn=Rs==="application/xhtml+xml"?Px:Tc,qe=Ol(Q,"ALLOWED_TAGS",He,{transform:pn}),Xe=Ol(Q,"ALLOWED_ATTR",zn,{transform:pn}),es=Ol(Q,"ALLOWED_NAMESPACES",no,{transform:Px}),vt=Ol(Q,"ADD_URI_SAFE_ATTR",Le,{transform:pn,base:Le}),ot=Ol(Q,"ADD_DATA_URI_TAGS",Xt,{transform:pn,base:Xt}),he=Ol(Q,"FORBID_CONTENTS",Pe,{transform:pn}),wn=Ol(Q,"FORBID_TAGS",Ur({}),{transform:pn}),Ii=Ol(Q,"FORBID_ATTR",Ur({}),{transform:pn}),Z=yr(Q,"USE_PROFILES")?Q.USE_PROFILES&&typeof Q.USE_PROFILES=="object"?Ur(Q.USE_PROFILES):Q.USE_PROFILES:!1,ei=Q.ALLOW_ARIA_ATTR!==!1,qi=Q.ALLOW_DATA_ATTR!==!1,En=Q.ALLOW_UNKNOWN_PROTOCOLS||!1,cr=Q.ALLOW_SELF_CLOSE_IN_ATTR!==!1,yi=Q.SAFE_FOR_TEMPLATES||!1,Nn=Q.SAFE_FOR_XML!==!1,vi=Q.WHOLE_DOCUMENT||!1,ur=Q.RETURN_DOM||!1,Jr=Q.RETURN_DOM_FRAGMENT||!1,eo=Q.RETURN_TRUSTED_TYPE||!1,Kr=Q.FORCE_BODY||!1,to=Q.SANITIZE_DOM!==!1,Qn=Q.SANITIZE_NAMED_PROPS||!1,Cr=Q.KEEP_CONTENT!==!1,Yi=Q.IN_PLACE||!1,Ge=tce(Q.ALLOWED_URI_REGEXP)?Q.ALLOWED_URI_REGEXP:VD,qt=typeof Q.NAMESPACE=="string"?Q.NAMESPACE:jt,ns=Lx(Q,"MATHML_TEXT_INTEGRATION_POINTS",()=>$t({},ts)),La=Lx(Q,"HTML_INTEGRATION_POINTS",()=>$t({},io));const Y=Lx(Q,"CUSTOM_ELEMENT_HANDLING",()=>gf(null));if(vn=gf(null),yr(Y,"tagNameCheck")&&Ia(Y.tagNameCheck)&&(vn.tagNameCheck=Y.tagNameCheck),yr(Y,"attributeNameCheck")&&Ia(Y.attributeNameCheck)&&(vn.attributeNameCheck=Y.attributeNameCheck),yr(Y,"allowCustomizedBuiltInElements")&&typeof Y.allowCustomizedBuiltInElements=="boolean"&&(vn.allowCustomizedBuiltInElements=Y.allowCustomizedBuiltInElements),Di(vn),yi&&(qi=!1),Jr&&(ur=!0),Z&&(qe=$t({},XD),Xe=gf(null),Z.html===!0&&($t(qe,zD),$t(Xe,UD)),Z.svg===!0&&($t(qe,Mx),$t(Xe,$x),$t(Xe,OO)),Z.svgFilters===!0&&($t(qe,Nx),$t(Xe,$x),$t(Xe,OO)),Z.mathMl===!0&&($t(qe,Qx),$t(Xe,ZD),$t(Xe,OO))),ci.tagCheck=null,ci.attributeCheck=null,yr(Q,"ADD_TAGS")&&(typeof Q.ADD_TAGS=="function"?ci.tagCheck=Q.ADD_TAGS:Nf(Q.ADD_TAGS)&&(qe===He&&(qe=Ur(qe)),$t(qe,Q.ADD_TAGS,pn))),yr(Q,"ADD_ATTR")&&(typeof Q.ADD_ATTR=="function"?ci.attributeCheck=Q.ADD_ATTR:Nf(Q.ADD_ATTR)&&(Xe===zn&&(Xe=Ur(Xe)),$t(Xe,Q.ADD_ATTR,pn))),yr(Q,"ADD_FORBID_CONTENTS")&&Nf(Q.ADD_FORBID_CONTENTS)&&(he===Pe&&(he=Ur(he)),$t(he,Q.ADD_FORBID_CONTENTS,pn)),Cr&&(qe["#text"]=!0),vi&&$t(qe,["html","head","body"]),qe.table&&($t(qe,["tbody"]),delete wn.tbody),Q.TRUSTED_TYPES_POLICY){if(typeof Q.TRUSTED_TYPES_POLICY.createHTML!="function")throw ga('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Q.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw ga('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const Oe=V;V=Q.TRUSTED_TYPES_POLICY;try{X=oe("")}catch(ge){throw V=Oe,ge}}else Q.TRUSTED_TYPES_POLICY===null?(V=void 0,X=""):(V===void 0&&(V=me()),V&&typeof X=="string"&&(X=oe("")));Oi&&Oi(Q),Ps=Q},ja=$t({},[...Mx,...Nx,...nce]),Jl=$t({},[...Qx,...ice]),yu=function(Q,Y,Oe){return Y.namespaceURI===jt?Q==="svg":Y.namespaceURI===Ce?Q==="svg"&&(Oe==="annotation-xml"||ns[Oe]):!!ja[Q]},ji=function(Q,Y,Oe){return Y.namespaceURI===jt?Q==="math":Y.namespaceURI===nt?Q==="math"&&La[Oe]:!!Jl[Q]},Dn=function(Q,Y,Oe){return Y.namespaceURI===nt&&!La[Oe]||Y.namespaceURI===Ce&&!ns[Oe]?!1:!Jl[Q]&&(Nh[Q]||!ja[Q])},xe=function(Q){const Y=U(Q),Oe=Tc($(Q)),ge=w(Q);let We,rt;return ge&&N(ge)===Yn.element?(We={namespaceURI:U(ge)},rt=Tc($(ge))):(We={namespaceURI:qt},rt="template"),es[Y]?Y===nt?yu(Oe,We,rt):Y===Ce?ji(Oe,We,rt):Y===jt?Dn(Oe,We,rt):!!(Rs==="application/xhtml+xml"&&es[Y]):!1},je=function(Q){Dd(e.removed,{element:Q});try{w(Q).removeChild(Q)}catch{if(y(Q),!w(Q))throw ga("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},bt=function(Q,Y,Oe){try{v(Q,Y)}catch{try{Q.removeAttribute(Oe)}catch{}}},Dt=function(Q){Rr(Q);const Y=x(Q);Y&&ma(Yle(Y),ge=>{try{y(ge)}catch{}});const Oe=N(Q)===Yn.element?k(Q):null;if(Oe)for(let ge=Oe.length-1;ge>=0;--ge){const We=Oe[ge],rt=We&&We.name;typeof rt=="string"&&bt(Q,We,rt)}},Kt=function(Q,Y,Oe){if(!Oe)try{Oe=Y.getAttributeNode(Q)}catch{Oe=null}Dd(e.removed,{attribute:Oe||null,from:Y});try{Oe?v(Y,Oe):Y.removeAttribute(Q)}catch{try{Y.removeAttribute(Q)}catch{}}if(Q==="is")if(ur||Jr)try{je(Y)}catch{}else try{Y.setAttribute(Q,"")}catch{}},Si=function(Q){const Y=k(Q);if(Y)for(let Oe=Y.length-1;Oe>=0;--Oe){const ge=Y[Oe],We=ge&&ge.name;typeof We!="string"||Xe[pn(We)]||bt(Q,ge,We)}},ui=function(Q,Y){let Oe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const ge=[Q];for(;ge.length>0;){const We=ge.pop();if(Y(We)===!1)continue;if(Oe&&N(We)===Yn.element){const pt=C(We);ht(pt)&&ge.push(pt)}const rt=x(We);if(rt)for(let pt=rt.length-1;pt>=0;--pt)ge.push(rt[pt])}},Rr=function(Q){ui(Q,Y=>{N(Y)===Yn.element&&Si(Y)})},_n=function(Q){const Y=[];return ui(Q,Oe=>{Y.push(Oe)},!0),Y},Xn=function(Q,Y){const Oe=Ax();ma(_n(Q),ge=>{N(ge)===Yn.element&&Rx(Oe,ge)}),ma(Y,ge=>{N(ge)===Yn.element&&!Ld(Oe,ge)&&Si(ge)})},is=function(Q,Y){let Oe=!1;return ma(e.removed,ge=>{ge.element&&(Oe=Oe||ge.element===Q,Rr(ge.element))}),Xn(Q,Y),Oe},oo=8,Ms=function(Q,Y){const Oe=$n;let ge=null;const We=()=>(ge||(ge=Ax(),ma(Y,rt=>{Rx(ge,rt)})),ge);for(let rt=0;;rt++){const pt=_n(Q),Ut=[Q];let hr=!1;if(ma(pt,ni=>{N(ni)===Yn.documentFragment?Dd(Ut,ni):!hr&&!Ld(Oe,ni)&&(hr=Ld(We(),ni))}),!hr)return;if(rt>=oo)throw ga("the tree kept changing during in-place sanitization; refusing to return it");ma(Ut,(ni,Ln)=>{Tn(ni,Ln>0,Q,We())})}},Tn=function(Q,Y,Oe,ge){const We=Pr(Q);let rt;for(;rt=We.nextNode();)!Ld(ge,rt)||Ld($n,rt)||(Y&&dt(B.uponSanitizeShadowNode,rt,null),Ue(rt,Oe),ao(rt,Oe),ht(rt.content)&&Xa(rt.content))},vu=function(Q){$n&&Rx($n,Q)},ec=function(Q,Y){return Nn?Q==="patchsrc"?!0:Q==="for"&&Y!=="label"&&Y!=="output":!1},Su=function(Q){Nn&&ui(Q,Y=>{const Oe=N(Y);if(Oe===Yn.processingInstruction||Oe===Yn.comment&&Ri(qD,Y.data)){try{y(Y)}catch{}return!1}if(Oe===Yn.element){const ge=Y,We=pn($(Y));try{ge.hasAttribute&&ge.hasAttribute("patchsrc")&&ge.removeAttribute("patchsrc"),ge.hasAttribute&&ge.hasAttribute("for")&&ec("for",We)&&ge.removeAttribute("for")}catch{}}return!0})},Gi=function(Q){let Y=null,Oe=null;if(Kr)Q="<remove></remove>"+Q;else{const rt=LD(Q,/^[\r\n\t ]+/);Oe=rt&&rt[0]}Rs==="application/xhtml+xml"&&qt===jt&&(Q='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Q+"</body></html>");const ge=V?oe(Q):Q;if(qt===jt)try{Y=new h().parseFromString(ge,Rs)}catch{}if(!Y||!Y.documentElement){Y=Te.createDocument(qt,"template",null);try{Y.documentElement.innerHTML=fr?X:ge}catch{}}const We=Y.body||Y.documentElement;return Q&&Oe&&We.insertBefore(n.createTextNode(Oe),We.childNodes[0]||null),qt===jt?I.call(Y,vi?"html":"body")[0]:vi?Y.documentElement:We},Pr=function(Q){const Y=P?P(Q):Q.ownerDocument;return ze.call(Y||Q,Q,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},xi=function(Q){return Q=Id(Q,se," "),Q=Id(Q,we," "),Q=Id(Q,_e," "),Q},Ba=function(Q){var Y;Jo(Q);const Oe=(Y=Q.querySelectorAll)===null||Y===void 0?void 0:Y.call(Q,"template");Oe&&ma(Oe,ge=>{ht(ge.content)&&Ba(ge.content)})},Jo=function(Q){Q.normalize();const Y=P?P(Q):Q.ownerDocument,Oe=ze.call(Y||Q,Q,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null);let ge=Oe.nextNode();for(;ge;)ge.data=xi(ge.data),ge=Oe.nextNode()},it=function(Q){const Y=R?R(Q):null;return typeof Y!="string"||pn(Y)!=="form"?!1:typeof Q.nodeName!="string"||typeof Q.textContent!="string"||typeof Q.removeChild!="function"||Q.attributes!==k(Q)||typeof Q.removeAttribute!="function"||typeof Q.removeAttributeNode!="function"||typeof Q.getAttributeNode!="function"||typeof Q.setAttribute!="function"||typeof Q.namespaceURI!="string"||typeof Q.insertBefore!="function"||typeof Q.hasChildNodes!="function"||Q.nodeType!==A(Q)||Q.childNodes!==x(Q)},ht=function(Q){if(!A||typeof Q!="object"||Q===null)return!1;try{return A(Q)===Yn.documentFragment}catch{return!1}},un=function(Q){if(!A||typeof Q!="object"||Q===null)return!1;try{return typeof A(Q)=="number"}catch{return!1}};function dt(ye,Q,Y){ye.length!==0&&ma(ye,Oe=>{Oe.call(e,Q,Y,Ps)})}const Ns=function(Q,Y){return!!(Nn&&Q.hasChildNodes()&&!un(Q.firstElementChild)&&Ri(Dx,Q.textContent)&&Ri(Dx,Q.innerHTML)||Nn&&pce[Y]&&N(Q)===Yn.element&&U(Q)===jt&&(un(Q.firstElementChild)||typeof Q.textContent=="string"&&Ri(Dx,Q.textContent))||Q.nodeType===Yn.processingInstruction||Nn&&Q.nodeType===Yn.comment&&Ri(qD,Q.data))},kn=function(Q,Y){if(Q instanceof RegExp)return Ri(Q,Y);if(Q instanceof Function){for(var Oe=arguments.length,ge=new Array(Oe>2?Oe-2:0),We=2;We<Oe;We++)ge[We-2]=arguments[We];return!!Q(Y,...ge)}return!1},ti=function(Q,Y,Oe){if(!wn[Y]&&Lt(Y)&&kn(vn.tagNameCheck,Y))return!1;if(Cr&&!he[Y]&&!he[Tc(Y)]){const ge=w(Q),We=x(Q);if(We&&ge){const rt=We.length;for(let pt=rt-1;pt>=0;--pt){const Ut=Q===Oe?g(We[pt],!0):We[pt];ge.insertBefore(Ut,S(Q))}}}return je(Q),!0},ea=function(Q,Y,Oe,ge){return Q.length===0?Y:Y===Oe||Y===ge?Ur(Y):Y},Re=function(Q,Y){return Q===Y||w(Q)!==null?!1:(Yi&&Rr(Q),!0)},Ue=function(Q,Y){if(vu(Q),dt(B.beforeSanitizeElements,Q,null),Re(Q,Y))return!0;if(it(Q))return je(Q),!0;const Oe=pn($(Q));if(qe=ea(B.uponSanitizeElement,qe,He,Cs),dt(B.uponSanitizeElement,Q,{tagName:Oe,allowedTags:qe}),Re(Q,Y))return!0;if(Ns(Q,Oe))return je(Q),!0;if(wn[Oe]||!(ci.tagCheck instanceof Function&&ci.tagCheck(Oe))&&!qe[Oe]){const ge=ti(Q,Oe,Y);return ge===!1&&(dt(B.afterSanitizeElements,Q,null),Re(Q,Y))?!0:ge}if(N(Q)===Yn.element&&!xe(Q)||(Oe==="noscript"||Oe==="noembed"||Oe==="noframes")&&Ri(dce,Q.innerHTML))return je(Q),!0;if(yi&&Q.nodeType===Yn.text){const ge=xi(Q.textContent);Q.textContent!==ge&&(Dd(e.removed,{element:Q.cloneNode()}),Q.textContent=ge)}return dt(B.afterSanitizeElements,Q,null),Re(Q,Y)},ft=function(Q,Y,Oe){if(Ii[Y]||ec(Y,Q)||to&&(Y==="id"||Y==="name")&&(Oe in n||Oe in Ar))return!1;const ge=Xe[Y]||ci.attributeCheck instanceof Function&&ci.attributeCheck(Y,Q);return qi&&Ri(be,Y)||ei&&Ri(Se,Y)?!0:ge?vt[Y]||Ri(Ge,Id(Oe,Ie,""))||(Y==="src"||Y==="xlink:href"||Y==="href")&&Q!=="script"&&ID(Oe,"data:")===0&&ot[Q]||En&&!Ri(Ee,Id(Oe,Ie,""))?!0:!Oe:Lt(Q)&&kn(vn.tagNameCheck,Q)&&kn(vn.attributeNameCheck,Y,Q)||Y==="is"&&vn.allowCustomizedBuiltInElements&&kn(vn.tagNameCheck,Oe)},Qt=$t({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Lt=function(Q){return!Qt[Tc(Q)]&&Ri(Ye,Q)},Fi=function(Q,Y,Oe,ge){if(V&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!Oe)switch(d.getAttributeType(Q,Y)){case"TrustedHTML":return oe(ge);case"TrustedScriptURL":return K(ge)}return ge},xu=function(Q,Y,Oe,ge){try{return Oe?Q.setAttributeNS(Oe,Y,ge):Q.setAttribute(Y,ge),it(Q)?(je(Q),!1):!0}catch{return Kt(Y,Q),!1}},za=function(Q,Y){return Nn&&Ri(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Y)?!0:Tc(Q)==="attributename"&&LD(Y,"href")!==null},ao=function(Q,Y){if(dt(B.beforeSanitizeAttributes,Q,null),Re(Q,Y))return;const Oe=Q.attributes;if(!Oe||it(Q))return;Xe=ea(B.uponSanitizeAttribute,Xe,zn,As);const ge={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Xe,forceKeepAttr:void 0};let We=Oe.length;const rt=pn(Q.nodeName);for(;We--;){const pt=Oe[We],Ut=pt.name,hr=pt.namespaceURI,ni=pt.value,Ln=pn(Ut),Mr=ni;let wi=Ut==="value"?Mr:Fle(Mr),Eu=!1;if(ge.attrName=Ln,ge.attrValue=wi,ge.keepAttr=!0,ge.forceKeepAttr=void 0,dt(B.uponSanitizeAttribute,Q,ge),wi=ge.attrValue,Qn&&(Ln==="id"||Ln==="name")&&ID(wi,Rt)!==0&&(Kt(Ut,Q,pt),wi=Rt+wi,Eu=!0),za(Ut,wi)){Kt(Ut,Q,pt);continue}if(!ge.forceKeepAttr){if(!ge.keepAttr){Kt(Ut,Q,pt);continue}if(!cr&&Ri(YD,wi)){Kt(Ut,Q,pt);continue}if(yi&&(wi=xi(wi)),!ft(rt,Ln,wi)){Kt(Ut,Q,pt);continue}wi=Fi(rt,Ln,hr,wi),wi!==Mr&&xu(Q,Ut,hr,wi)&&Eu&&DD(e.removed)}}dt(B.afterSanitizeAttributes,Q,null),Re(Q,Y)},Xa=function(Q){let Y=null;const Oe=Pr(Q);for(dt(B.beforeSanitizeShadowDOM,Q,null);Y=Oe.nextNode();)if(dt(B.uponSanitizeShadowNode,Y,null),Ue(Y,Q),ao(Y,Q),ht(Y.content)&&Xa(Y.content),N(Y)===Yn.element){const ge=C(Y);ht(ge)&&(wu(ge),Xa(ge))}yi&&Jo(Q),dt(B.afterSanitizeShadowDOM,Q,null)},wu=function(Q){const Y=[{node:Q,shadow:null}];for(;Y.length>0;){const Oe=Y.pop();if(Oe.shadow){Xa(Oe.shadow);continue}const ge=Oe.node,We=N(ge)===Yn.element,rt=x(ge);if(rt)for(let pt=rt.length-1;pt>=0;--pt)Y.push({node:rt[pt],shadow:null});if(We){const pt=R?R(ge):null;if(typeof pt=="string"&&pn(pt)==="template"){const Ut=ge.content;ht(Ut)&&Y.push({node:Ut,shadow:null})}}if(We){const pt=C(ge);ht(pt)&&Y.push({node:null,shadow:pt},{node:pt,shadow:null})}}};return e.sanitize=function(ye){let Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Y=null,Oe=null,ge=null,We=null;if(fr=!ye,fr&&(ye="<!-->"),typeof ye!="string"&&!un(ye)&&(ye=Jle(ye),typeof ye!="string"))throw ga("dirty is not a string, aborting");if(!e.isSupported)return ye;ks?(qe=Cs,Xe=As):so(Q),(B.uponSanitizeElement.length>0||B.uponSanitizeAttribute.length>0)&&(qe=Ur(qe)),B.uponSanitizeAttribute.length>0&&(Xe=Ur(Xe)),e.removed=[];const rt=Yi&&typeof ye!="string"&&un(ye);let pt=[];const Ut=$n;if(rt){Su(ye);const Ln=$(ye);if(typeof Ln=="string"){const Mr=pn(Ln);if(!qe[Mr]||wn[Mr])throw Dt(ye),ga("root node is forbidden and cannot be sanitized in-place")}if(it(ye))throw Dt(ye),ga("root node is clobbered and cannot be sanitized in-place");pt=_n(ye),$n=Ax()}else if(un(ye))Y=Gi("<!---->"),Oe=Y.ownerDocument.importNode(ye,!0),Oe.nodeType===Yn.element&&Oe.nodeName==="BODY"||Oe.nodeName==="HTML"?Y=Oe:Y.appendChild(Oe),wu(Y);else{if(!ur&&!yi&&!vi&&ye.indexOf("<")===-1)return V&&eo?oe(ye):ye;if(Y=Gi(ye),!Y)return ur?null:eo?X:""}Y&&Kr&&je(Y.firstChild);const hr=rt?ye:Y;try{rt&&wu(ye);const Ln=Pr(hr);for(;ge=Ln.nextNode();)Ue(ge,hr),ao(ge,hr),ht(ge.content)&&Xa(ge.content);rt&&Ms(ye,pt)}catch(Ln){throw rt&&(Dt(ye),is(ye,pt)),Ln}finally{$n=Ut}if(rt){if(is(ye,pt))throw ga("a node selected for removal could not be safely returned; refusing to sanitize in place");return yi&&Ba(ye),ye}if(ur){if(yi&&Ba(Y),Jr)for(We=tt.call(Y.ownerDocument);Y.firstChild;)We.appendChild(Y.firstChild);else We=Y;return(Xe.shadowroot||Xe.shadowrootmode)&&(We=ie.call(i,We,!0)),We}let ni=vi?Y.outerHTML:Y.innerHTML;return vi&&qe["!doctype"]&&Y.ownerDocument&&Y.ownerDocument.doctype&&Y.ownerDocument.doctype.name&&Ri(fce,Y.ownerDocument.doctype.name)&&(ni="<!DOCTYPE "+Y.ownerDocument.doctype.name+`>
146
+ `+ni),yi&&(ni=xi(ni)),V&&eo?oe(ni):ni},e.setConfig=function(){let ye=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};so(ye),ks=!0,Cs=qe,As=Xe},e.clearConfig=function(){Ps=null,ks=!1,Cs=null,As=null,V=ee,X=""},e.isValidAttribute=function(ye,Q,Y){Ps||so({});const Oe=pn(ye),ge=pn(Q);return typeof Y=="string"&&(za(Q,Y)||!cr&&Ri(YD,Y))?!1:ft(Oe,ge,Y)},e.addHook=function(ye,Q){typeof Q=="function"&&yr(B,ye)&&Dd(B[ye],Q)},e.removeHook=function(ye,Q){if(yr(B,ye)){if(Q!==void 0){const Y=qle(B[ye],Q);return Y===-1?void 0:Gle(B[ye],Y,1)[0]}return DD(B[ye])}},e.removeHooks=function(ye){yr(B,ye)&&(B[ye]=[])},e.removeAllHooks=function(){B=GD()},e}var Oce=O3(),Ix,FD;function bce(){if(FD)return Ix;FD=1;function t(Z){return Z instanceof Map?Z.clear=Z.delete=Z.set=function(){throw new Error("map is read-only")}:Z instanceof Set&&(Z.add=Z.clear=Z.delete=function(){throw new Error("set is read-only")}),Object.freeze(Z),Object.getOwnPropertyNames(Z).forEach(he=>{const Pe=Z[he],ot=typeof Pe;(ot==="object"||ot==="function")&&!Object.isFrozen(Pe)&&t(Pe)}),Z}class e{constructor(he){he.data===void 0&&(he.data={}),this.data=he.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(Z){return Z.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function i(Z,...he){const Pe=Object.create(null);for(const ot in Z)Pe[ot]=Z[ot];return he.forEach(function(ot){for(const Xt in ot)Pe[Xt]=ot[Xt]}),Pe}const r="</span>",s=Z=>!!Z.scope,a=(Z,{prefix:he})=>{if(Z.startsWith("language:"))return Z.replace("language:","language-");if(Z.includes(".")){const Pe=Z.split(".");return[`${he}${Pe.shift()}`,...Pe.map((ot,Xt)=>`${ot}${"_".repeat(Xt+1)}`)].join(" ")}return`${he}${Z}`};class c{constructor(he,Pe){this.buffer="",this.classPrefix=Pe.classPrefix,he.walk(this)}addText(he){this.buffer+=n(he)}openNode(he){if(!s(he))return;const Pe=a(he.scope,{prefix:this.classPrefix});this.span(Pe)}closeNode(he){s(he)&&(this.buffer+=r)}value(){return this.buffer}span(he){this.buffer+=`<span class="${he}">`}}const u=(Z={})=>{const he={children:[]};return Object.assign(he,Z),he};class h{constructor(){this.rootNode=u(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(he){this.top.children.push(he)}openNode(he){const Pe=u({scope:he});this.add(Pe),this.stack.push(Pe)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(he){return this.constructor._walk(he,this.rootNode)}static _walk(he,Pe){return typeof Pe=="string"?he.addText(Pe):Pe.children&&(he.openNode(Pe),Pe.children.forEach(ot=>this._walk(he,ot)),he.closeNode(Pe)),he}static _collapse(he){typeof he!="string"&&he.children&&(he.children.every(Pe=>typeof Pe=="string")?he.children=[he.children.join("")]:he.children.forEach(Pe=>{h._collapse(Pe)}))}}class d extends h{constructor(he){super(),this.options=he}addText(he){he!==""&&this.add(he)}startScope(he){this.openNode(he)}endScope(){this.closeNode()}__addSublanguage(he,Pe){const ot=he.root;Pe&&(ot.scope=`language:${Pe}`),this.add(ot)}toHTML(){return new c(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function m(Z){return Z?typeof Z=="string"?Z:Z.source:null}function g(Z){return S("(?=",Z,")")}function y(Z){return S("(?:",Z,")*")}function v(Z){return S("(?:",Z,")?")}function S(...Z){return Z.map(Pe=>m(Pe)).join("")}function x(Z){const he=Z[Z.length-1];return typeof he=="object"&&he.constructor===Object?(Z.splice(Z.length-1,1),he):{}}function w(...Z){return"("+(x(Z).capture?"":"?:")+Z.map(ot=>m(ot)).join("|")+")"}function C(Z){return new RegExp(Z.toString()+"|").exec("").length-1}function k(Z,he){const Pe=Z&&Z.exec(he);return Pe&&Pe.index===0}const A=new RegExp(w(/\[(?:[^\\\]]|\\.)*\]/,/\(\?<(?![=!])[^>]+>/,/\(\?'[^']+'/,/\(\??/,/\\([1-9][0-9]*)/,/\\./));function R(Z,{joinWith:he}){let Pe=0;return Z.map(ot=>{Pe+=1;const Xt=Pe;let vt=m(ot),Le="";for(;vt.length>0;){const Ce=A.exec(vt);if(!Ce){Le+=vt;break}Le+=vt.substring(0,Ce.index),vt=vt.substring(Ce.index+Ce[0].length),Ce[0][0]==="\\"&&Ce[1]?Le+="\\"+String(Number(Ce[1])+Xt):(Le+=Ce[0],(Ce[0]==="("||/^\(\?[<']/.test(Ce[0]))&&Pe++)}return Le}).map(ot=>`(${ot})`).join(he)}const P=/\b\B/,N="[a-zA-Z]\\w*",$="[a-zA-Z_]\\w*",D="\\b\\d+(\\.\\d+)?",U="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",V="\\b(0b[01]+)",X="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",ee=(Z={})=>{const he=/^#![ ]*\//;return Z.binary&&(Z.begin=S(he,/.*\b/,Z.binary,/\b.*/)),i({scope:"meta",begin:he,end:/$/,relevance:0,"on:begin":(Pe,ot)=>{Pe.index!==0&&ot.ignoreMatch()}},Z)},le={begin:"\\\\[\\s\\S]",relevance:0},re={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[le]},G={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[le]},oe={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},K=function(Z,he,Pe={}){const ot=i({scope:"comment",begin:Z,end:he,contains:[]},Pe);ot.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const Xt=w("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return ot.contains.push({begin:S(/[ ]+/,"(",Xt,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),ot},me=K("//","$"),fe=K("/\\*","\\*/"),Te=K("#","$"),ze={scope:"number",begin:D,relevance:0},tt={scope:"number",begin:U,relevance:0},I={scope:"number",begin:V,relevance:0},ie={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[le,{begin:/\[/,end:/\]/,relevance:0,contains:[le]}]},B={scope:"title",begin:N,relevance:0},se={scope:"title",begin:$,relevance:0},we={begin:"\\.\\s*"+$,relevance:0};var be=Object.freeze({__proto__:null,APOS_STRING_MODE:re,BACKSLASH_ESCAPE:le,BINARY_NUMBER_MODE:I,BINARY_NUMBER_RE:V,COMMENT:K,C_BLOCK_COMMENT_MODE:fe,C_LINE_COMMENT_MODE:me,C_NUMBER_MODE:tt,C_NUMBER_RE:U,END_SAME_AS_BEGIN:function(Z){return Object.assign(Z,{"on:begin":(he,Pe)=>{Pe.data._beginMatch=he[1]},"on:end":(he,Pe)=>{Pe.data._beginMatch!==he[1]&&Pe.ignoreMatch()}})},HASH_COMMENT_MODE:Te,IDENT_RE:N,MATCH_NOTHING_RE:P,METHOD_GUARD:we,NUMBER_MODE:ze,NUMBER_RE:D,PHRASAL_WORDS_MODE:oe,QUOTE_STRING_MODE:G,REGEXP_MODE:ie,RE_STARTERS_RE:X,SHEBANG:ee,TITLE_MODE:B,UNDERSCORE_IDENT_RE:$,UNDERSCORE_TITLE_MODE:se});function Se(Z,he){Z.input[Z.index-1]==="."&&he.ignoreMatch()}function Ee(Z,he){Z.className!==void 0&&(Z.scope=Z.className,delete Z.className)}function Ie(Z,he){he&&Z.beginKeywords&&(Z.begin="\\b("+Z.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",Z.__beforeBegin=Se,Z.keywords=Z.keywords||Z.beginKeywords,delete Z.beginKeywords,Z.relevance===void 0&&(Z.relevance=0))}function Ye(Z,he){Array.isArray(Z.illegal)&&(Z.illegal=w(...Z.illegal))}function Ge(Z,he){if(Z.match){if(Z.begin||Z.end)throw new Error("begin & end are not supported with match");Z.begin=Z.match,delete Z.match}}function qe(Z,he){Z.relevance===void 0&&(Z.relevance=1)}const He=(Z,he)=>{if(!Z.beforeMatch)return;if(Z.starts)throw new Error("beforeMatch cannot be used with starts");const Pe=Object.assign({},Z);Object.keys(Z).forEach(ot=>{delete Z[ot]}),Z.keywords=Pe.keywords,Z.begin=S(Pe.beforeMatch,g(Pe.begin)),Z.starts={relevance:0,contains:[Object.assign(Pe,{endsParent:!0})]},Z.relevance=0,delete Pe.beforeMatch},Xe=["of","and","for","in","not","or","if","then","parent","list","value"],zn="keyword";function vn(Z,he,Pe=zn){const ot=Object.create(null);return typeof Z=="string"?Xt(Pe,Z.split(" ")):Array.isArray(Z)?Xt(Pe,Z):Object.keys(Z).forEach(function(vt){Object.assign(ot,vn(Z[vt],he,vt))}),ot;function Xt(vt,Le){he&&(Le=Le.map(Ce=>Ce.toLowerCase())),Le.forEach(function(Ce){const nt=Ce.split("|");ot[nt[0]]=[vt,wn(nt[0],nt[1])]})}}function wn(Z,he){return he?Number(he):Ii(Z)?0:1}function Ii(Z){return Xe.includes(Z.toLowerCase())}const ci={},ei=Z=>{console.error(Z)},qi=(Z,...he)=>{console.log(`WARN: ${Z}`,...he)},En=(Z,he)=>{ci[`${Z}/${he}`]||(console.log(`Deprecated as of ${Z}. ${he}`),ci[`${Z}/${he}`]=!0)},cr=new Error;function yi(Z,he,{key:Pe}){let ot=0;const Xt=Z[Pe],vt={},Le={};for(let Ce=1;Ce<=he.length;Ce++)Le[Ce+ot]=Xt[Ce],vt[Ce+ot]=!0,ot+=C(he[Ce-1]);Z[Pe]=Le,Z[Pe]._emit=vt,Z[Pe]._multi=!0}function Nn(Z){if(Array.isArray(Z.begin)){if(Z.skip||Z.excludeBegin||Z.returnBegin)throw ei("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),cr;if(typeof Z.beginScope!="object"||Z.beginScope===null)throw ei("beginScope must be object"),cr;yi(Z,Z.begin,{key:"beginScope"}),Z.begin=R(Z.begin,{joinWith:""})}}function vi(Z){if(Array.isArray(Z.end)){if(Z.skip||Z.excludeEnd||Z.returnEnd)throw ei("skip, excludeEnd, returnEnd not compatible with endScope: {}"),cr;if(typeof Z.endScope!="object"||Z.endScope===null)throw ei("endScope must be object"),cr;yi(Z,Z.end,{key:"endScope"}),Z.end=R(Z.end,{joinWith:""})}}function ks(Z){Z.scope&&typeof Z.scope=="object"&&Z.scope!==null&&(Z.beginScope=Z.scope,delete Z.scope)}function Cs(Z){ks(Z),typeof Z.beginScope=="string"&&(Z.beginScope={_wrap:Z.beginScope}),typeof Z.endScope=="string"&&(Z.endScope={_wrap:Z.endScope}),Nn(Z),vi(Z)}function As(Z){function he(Le,Ce){return new RegExp(m(Le),"m"+(Z.case_insensitive?"i":"")+(Z.unicodeRegex?"u":"")+(Ce?"g":""))}class Pe{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(Ce,nt){nt.position=this.position++,this.matchIndexes[this.matchAt]=nt,this.regexes.push([nt,Ce]),this.matchAt+=C(Ce)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const Ce=this.regexes.map(nt=>nt[1]);this.matcherRe=he(R(Ce,{joinWith:"|"}),!0),this.lastIndex=0}exec(Ce){this.matcherRe.lastIndex=this.lastIndex;const nt=this.matcherRe.exec(Ce);if(!nt)return null;const jt=nt.findIndex((fr,es)=>es>0&&fr!==void 0),qt=this.matchIndexes[jt];return nt.splice(0,jt),Object.assign(nt,qt)}}class ot{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(Ce){if(this.multiRegexes[Ce])return this.multiRegexes[Ce];const nt=new Pe;return this.rules.slice(Ce).forEach(([jt,qt])=>nt.addRule(jt,qt)),nt.compile(),this.multiRegexes[Ce]=nt,nt}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(Ce,nt){this.rules.push([Ce,nt]),nt.type==="begin"&&this.count++}exec(Ce){const nt=this.getMatcher(this.regexIndex);nt.lastIndex=this.lastIndex;let jt=nt.exec(Ce);if(this.resumingScanAtSamePosition()&&!(jt&&jt.index===this.lastIndex)){const qt=this.getMatcher(0);qt.lastIndex=this.lastIndex+1,jt=qt.exec(Ce)}return jt&&(this.regexIndex+=jt.position+1,this.regexIndex===this.count&&this.considerAll()),jt}}function Xt(Le){const Ce=new ot;return Le.contains.forEach(nt=>Ce.addRule(nt.begin,{rule:nt,type:"begin"})),Le.terminatorEnd&&Ce.addRule(Le.terminatorEnd,{type:"end"}),Le.illegal&&Ce.addRule(Le.illegal,{type:"illegal"}),Ce}function vt(Le,Ce){const nt=Le;if(Le.isCompiled)return nt;[Ee,Ge,Cs,He].forEach(qt=>qt(Le,Ce)),Z.compilerExtensions.forEach(qt=>qt(Le,Ce)),Le.__beforeBegin=null,[Ie,Ye,qe].forEach(qt=>qt(Le,Ce)),Le.isCompiled=!0;let jt=null;return typeof Le.keywords=="object"&&Le.keywords.$pattern&&(Le.keywords=Object.assign({},Le.keywords),jt=Le.keywords.$pattern,delete Le.keywords.$pattern),jt=jt||/\w+/,Le.keywords&&(Le.keywords=vn(Le.keywords,Z.case_insensitive)),nt.keywordPatternRe=he(jt,!0),Ce&&(Le.begin||(Le.begin=/\B|\b/),nt.beginRe=he(nt.begin),!Le.end&&!Le.endsWithParent&&(Le.end=/\B|\b/),Le.end&&(nt.endRe=he(nt.end)),nt.terminatorEnd=m(nt.end)||"",Le.endsWithParent&&Ce.terminatorEnd&&(nt.terminatorEnd+=(Le.end?"|":"")+Ce.terminatorEnd)),Le.illegal&&(nt.illegalRe=he(Le.illegal)),Le.contains||(Le.contains=[]),Le.contains=[].concat(...Le.contains.map(function(qt){return ur(qt==="self"?Le:qt)})),Le.contains.forEach(function(qt){vt(qt,nt)}),Le.starts&&vt(Le.starts,Ce),nt.matcher=Xt(nt),nt}if(Z.compilerExtensions||(Z.compilerExtensions=[]),Z.contains&&Z.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return Z.classNameAliases=i(Z.classNameAliases||{}),vt(Z)}function Kr(Z){return Z?Z.endsWithParent||Kr(Z.starts):!1}function ur(Z){return Z.variants&&!Z.cachedVariants&&(Z.cachedVariants=Z.variants.map(function(he){return i(Z,{variants:null},he)})),Z.cachedVariants?Z.cachedVariants:Kr(Z)?i(Z,{starts:Z.starts?i(Z.starts):null}):Object.isFrozen(Z)?i(Z):Z}var Jr="11.12.0";class eo extends Error{constructor(he,Pe){super(he),this.name="HTMLInjectionError",this.html=Pe}}const to=n,Qn=i,Rt=Symbol("nomatch"),Cr=7,Yi=function(Z){const he=Object.create(null),Pe=Object.create(null),ot=[];let Xt=!0;const vt="Could not find the language '{}', did you forget to load/include a language module?",Le={disableAutodetect:!0,name:"Plain text",contains:[]};let Ce={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:d};function nt(xe){return Ce.noHighlightRe.test(xe)}function jt(xe){let je=xe.className+" ";je+=xe.parentNode?xe.parentNode.className:"";const bt=Ce.languageDetectRe.exec(je);if(bt){const Dt=Ar(bt[1]);return Dt||(qi(vt.replace("{}",bt[1])),qi("Falling back to no-highlight mode for this block.",xe)),Dt?bt[1]:"no-highlight"}return je.split(/\s+/).find(Dt=>nt(Dt)||Ar(Dt))}function qt(xe,je,bt){let Dt="",Kt="";typeof je=="object"?(Dt=xe,bt=je.ignoreIllegals,Kt=je.language):(En("10.7.0","highlight(lang, code, ...args) has been deprecated."),En("10.7.0",`Please use highlight(code, options) instead.
147
+ https://github.com/highlightjs/highlight.js/issues/2277`),Kt=xe,Dt=je),bt===void 0&&(bt=!0);const Si={code:Dt,language:Kt};ji("before:highlight",Si);const ui=Si.result?Si.result:fr(Si.language,Si.code,bt);return ui.code=Si.code,ji("after:highlight",ui),ui}function fr(xe,je,bt,Dt){const Kt=Object.create(null);function Si(Re,Ue){return Re.keywords[Ue]}function ui(){if(!it.keywords){un.addText(dt);return}let Re=0;it.keywordPatternRe.lastIndex=0;let Ue=it.keywordPatternRe.exec(dt),ft="";for(;Ue;){ft+=dt.substring(Re,Ue.index);const Qt=xi.case_insensitive?Ue[0].toLowerCase():Ue[0],Lt=Si(it,Qt);if(Lt){const[Fi,xu]=Lt;if(un.addText(ft),ft="",Kt[Qt]=(Kt[Qt]||0)+1,Kt[Qt]<=Cr&&(Ns+=xu),Fi.startsWith("_"))ft+=Ue[0];else{const za=xi.classNameAliases[Fi]||Fi;Xn(Ue[0],za)}}else ft+=Ue[0];Re=it.keywordPatternRe.lastIndex,Ue=it.keywordPatternRe.exec(dt)}ft+=dt.substring(Re),un.addText(ft)}function Rr(){if(dt==="")return;let Re=null;if(typeof it.subLanguage=="string"){if(!he[it.subLanguage]){un.addText(dt);return}Re=fr(it.subLanguage,dt,!0,ht[it.subLanguage]),ht[it.subLanguage]=Re._top}else Re=no(dt,it.subLanguage.length?it.subLanguage:null);it.relevance>0&&(Ns+=Re.relevance),un.__addSublanguage(Re._emitter,Re.language)}function _n(){it.subLanguage!=null?Rr():ui(),dt=""}function Xn(Re,Ue){Re!==""&&(un.startScope(Ue),un.addText(Re),un.endScope())}function is(Re,Ue){let ft=1;const Qt=Ue.length-1;for(;ft<=Qt;){if(!Re._emit[ft]){ft++;continue}const Lt=xi.classNameAliases[Re[ft]]||Re[ft],Fi=Ue[ft];Lt?Xn(Fi,Lt):(dt=Fi,ui(),dt=""),ft++}}function oo(Re,Ue){return Re.scope&&typeof Re.scope=="string"&&un.openNode(xi.classNameAliases[Re.scope]||Re.scope),Re.beginScope&&(Re.beginScope._wrap?(Xn(dt,xi.classNameAliases[Re.beginScope._wrap]||Re.beginScope._wrap),dt=""):Re.beginScope._multi&&(is(Re.beginScope,Ue),dt="")),it=Object.create(Re,{parent:{value:it}}),it}function Ms(Re,Ue,ft){let Qt=k(Re.endRe,ft);if(Qt){if(Re["on:end"]){const Lt=new e(Re);Re["on:end"](Ue,Lt),Lt.isMatchIgnored&&(Qt=!1)}if(Qt){for(;Re.endsParent&&Re.parent;)Re=Re.parent;return Re}}if(Re.endsWithParent)return Ms(Re.parent,Ue,ft)}function Tn(Re){return it.matcher.regexIndex===0?(dt+=Re[0],1):(ea=!0,0)}function vu(Re){const Ue=Re[0],ft=Re.rule,Qt=new e(ft),Lt=[ft.__beforeBegin,ft["on:begin"]];for(const Fi of Lt)if(Fi&&(Fi(Re,Qt),Qt.isMatchIgnored))return Tn(Ue);return ft.skip?dt+=Ue:(ft.excludeBegin&&(dt+=Ue),_n(),!ft.returnBegin&&!ft.excludeBegin&&(dt=Ue)),oo(ft,Re),ft.returnBegin?0:Ue.length}function ec(Re){const Ue=Re[0],ft=je.substring(Re.index),Qt=Ms(it,Re,ft);if(!Qt)return Rt;const Lt=it;it.endScope&&it.endScope._wrap?(_n(),Xn(Ue,it.endScope._wrap)):it.endScope&&it.endScope._multi?(_n(),is(it.endScope,Re)):Lt.skip?dt+=Ue:(Lt.returnEnd||Lt.excludeEnd||(dt+=Ue),_n(),Lt.excludeEnd&&(dt=Ue));do it.scope&&un.closeNode(),!it.skip&&!it.subLanguage&&(Ns+=it.relevance),it=it.parent;while(it!==Qt.parent);return Qt.starts&&oo(Qt.starts,Re),Lt.returnEnd?0:Ue.length}function Su(){const Re=[];for(let Ue=it;Ue!==xi;Ue=Ue.parent)Ue.scope&&Re.unshift(Ue.scope);Re.forEach(Ue=>un.openNode(Ue))}let Gi={};function Pr(Re,Ue){const ft=Ue&&Ue[0];if(dt+=Re,ft==null)return _n(),0;if(Gi.type==="begin"&&Ue.type==="end"&&Gi.index===Ue.index&&ft===""){if(dt+=je.slice(Ue.index,Ue.index+1),!Xt){const Qt=new Error(`0 width match regex (${xe})`);throw Qt.languageName=xe,Qt.badRule=Gi.rule,Qt}return 1}if(Gi=Ue,Ue.type==="begin")return vu(Ue);if(Ue.type==="illegal"&&!bt){const Qt=new Error('Illegal lexeme "'+ft+'" for mode "'+(it.scope||"<unnamed>")+'"');throw Qt.mode=it,Qt}else if(Ue.type==="end"){const Qt=ec(Ue);if(Qt!==Rt)return Qt}if(Ue.type==="illegal"&&ft==="")return Ue.index===je.length||(dt+=`
148
+ `),1;if(ti>1e5&&ti>Ue.index*3)throw new Error("potential infinite loop, way more iterations than matches");return dt+=ft,ft.length}const xi=Ar(xe);if(!xi)throw ei(vt.replace("{}",xe)),new Error('Unknown language: "'+xe+'"');const Ba=As(xi);let Jo="",it=Dt||Ba;const ht={},un=new Ce.__emitter(Ce);Su();let dt="",Ns=0,kn=0,ti=0,ea=!1;try{if(xi.__emitTokens)xi.__emitTokens(je,un);else{for(it.matcher.considerAll();;){ti++,ea?ea=!1:it.matcher.considerAll(),it.matcher.lastIndex=kn;const Re=it.matcher.exec(je);if(!Re)break;const Ue=je.substring(kn,Re.index),ft=Pr(Ue,Re);kn=Re.index+ft}Pr(je.substring(kn))}return un.finalize(),Jo=un.toHTML(),{language:xe,value:Jo,relevance:Ns,illegal:!1,_emitter:un,_top:it}}catch(Re){if(Re.message&&Re.message.includes("Illegal"))return{language:xe,value:to(je),illegal:!0,relevance:0,_illegalBy:{message:Re.message,index:kn,context:je.slice(kn-100,kn+100),mode:Re.mode,resultSoFar:Jo},_emitter:un};if(Xt)return{language:xe,value:to(je),illegal:!1,relevance:0,errorRaised:Re,_emitter:un,_top:it};throw Re}}function es(xe){const je={value:to(xe),illegal:!1,relevance:0,_top:Le,_emitter:new Ce.__emitter(Ce)};return je._emitter.addText(xe),je}function no(xe,je){je=je||Ce.languages||Object.keys(he);const bt=es(xe),Dt=je.filter(Ar).filter(so).map(_n=>fr(_n,xe,!1));Dt.unshift(bt);const Kt=Dt.sort((_n,Xn)=>{if(_n.relevance!==Xn.relevance)return Xn.relevance-_n.relevance;if(_n.language&&Xn.language){if(Ar(_n.language).supersetOf===Xn.language)return 1;if(Ar(Xn.language).supersetOf===_n.language)return-1}return 0}),[Si,ui]=Kt,Rr=Si;return Rr.secondBest=ui,Rr}function ts(xe,je,bt){const Dt=je&&Pe[je]||bt;xe.classList.add("hljs"),xe.classList.add(`language-${Dt}`)}function ns(xe){let je=null;const bt=jt(xe);if(nt(bt))return;if(ji("before:highlightElement",{el:xe,language:bt}),xe.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",xe);return}if(xe.children.length>0&&(Ce.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(xe)),Ce.throwUnescapedHTML))throw new eo("One of your code blocks includes unescaped HTML.",xe.innerHTML);je=xe;const Dt=je.textContent,Kt=bt?qt(Dt,{language:bt,ignoreIllegals:!0}):no(Dt);xe.innerHTML=Kt.value,xe.dataset.highlighted="yes",ts(xe,bt,Kt.language),xe.result={language:Kt.language,re:Kt.relevance,relevance:Kt.relevance},Kt.secondBest&&(xe.secondBest={language:Kt.secondBest.language,relevance:Kt.secondBest.relevance}),ji("after:highlightElement",{el:xe,result:Kt,text:Dt})}function io(xe){Ce=Qn(Ce,xe)}const La=()=>{ro(),En("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Nh(){ro(),En("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Rs=!1;function ro(){function xe(){ro()}if(document.readyState==="loading"){Rs||window.addEventListener("DOMContentLoaded",xe,!1),Rs=!0;return}document.querySelectorAll(Ce.cssSelector).forEach(ns)}function Ko(xe,je){let bt=null;try{bt=je(Z)}catch(Dt){if(ei("Language definition for '{}' could not be registered.".replace("{}",xe)),Xt)ei(Dt);else throw Dt;bt=Le}bt.name||(bt.name=xe),he[xe]=bt,bt.rawDefinition=je.bind(null,Z),bt.aliases&&Ia(bt.aliases,{languageName:xe})}function pn(xe){delete he[xe];for(const je of Object.keys(Pe))Pe[je]===xe&&delete Pe[je]}function Ps(){return Object.keys(he)}function Ar(xe){return xe=(xe||"").toLowerCase(),he[xe]||he[Pe[xe]]}function Ia(xe,{languageName:je}){typeof xe=="string"&&(xe=[xe]),xe.forEach(bt=>{Pe[bt.toLowerCase()]=je})}function so(xe){const je=Ar(xe);return je&&!je.disableAutodetect}function ja(xe){xe["before:highlightBlock"]&&!xe["before:highlightElement"]&&(xe["before:highlightElement"]=je=>{xe["before:highlightBlock"](Object.assign({block:je.el},je))}),xe["after:highlightBlock"]&&!xe["after:highlightElement"]&&(xe["after:highlightElement"]=je=>{xe["after:highlightBlock"](Object.assign({block:je.el},je))})}function Jl(xe){ja(xe),ot.push(xe)}function yu(xe){const je=ot.indexOf(xe);je!==-1&&ot.splice(je,1)}function ji(xe,je){const bt=xe;ot.forEach(function(Dt){Dt[bt]&&Dt[bt](je)})}function Dn(xe){return En("10.7.0","highlightBlock will be removed entirely in v12.0"),En("10.7.0","Please use highlightElement now."),ns(xe)}Object.assign(Z,{highlight:qt,highlightAuto:no,highlightAll:ro,highlightElement:ns,highlightBlock:Dn,configure:io,initHighlighting:La,initHighlightingOnLoad:Nh,registerLanguage:Ko,unregisterLanguage:pn,listLanguages:Ps,getLanguage:Ar,registerAliases:Ia,autoDetection:so,inherit:Qn,addPlugin:Jl,removePlugin:yu}),Z.debugMode=function(){Xt=!1},Z.safeMode=function(){Xt=!0},Z.versionString=Jr,Z.regex={concat:S,lookahead:g,either:w,optional:v,anyNumberOfTimes:y};for(const xe in be)typeof be[xe]=="object"&&t(be[xe]);return Object.assign(Z,be),Z},$n=Yi({});return $n.newInstance=()=>Yi({}),Ix=$n,$n.HighlightJS=$n,$n.default=$n,Ix}var jx,HD;function yce(){if(HD)return jx;HD=1;function t(e){const n=e.regex,i=n.concat(/[\p{L}_]/u,n.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),r=/[\p{L}0-9._:-]+/u,s={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},a={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},c=e.inherit(a,{begin:/\(/,end:/\)/}),u=e.inherit(e.APOS_STRING_MODE,{className:"string"}),h=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),d={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:r,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[s]},{begin:/'/,end:/'/,contains:[s]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[a,h,u,c,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[a,c,h,u]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},s,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[h]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[d],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:"css"}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[d],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:"javascript"}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:n.concat(/</,n.lookahead(n.concat(i,n.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:i,relevance:0,starts:d}]},{className:"tag",begin:n.concat(/<\//,n.lookahead(n.concat(i,/>/))),contains:[{className:"name",begin:i,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}return jx=t,jx}var Bx,WD;function vce(){if(WD)return Bx;WD=1;function t(e){const n=e.regex,i={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[i]}]};Object.assign(i,{className:"variable",variants:[{begin:n.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},r]});const s={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},a=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),c={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},u={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,i,s]};s.contains.push(u);const h={match:/\\"/},d={className:"string",begin:/'/,end:/'/},m={match:/\\'/},g={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,i]},y=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],v=e.SHEBANG({binary:`(${y.join("|")})`,relevance:10}),S={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},x=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],w=["true","false"],C={match:/(\/[a-z._-]+)+/},k=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],A=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],R=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],P=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:x,literal:w,built_in:[...k,...A,"set","shopt",...R,...P]},contains:[v,e.SHEBANG(),S,g,a,c,C,u,h,d,m,i]}}return Bx=t,Bx}var zx,KD;function Sce(){if(KD)return zx;KD=1;function t(e){const n=e.regex,i=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",c="("+r+"|"+n.optional(s)+"[a-zA-Z_]\\w*"+n.optional("<[^<>]+>")+")",u=n.concat(/\batomic_/,n.either("bool","char","schar","uchar","short","ushort","int","uint","long","ulong","llong","ullong","char16_t","char32_t","wchar_t","int_least8_t","uint_least8_t","int_least16_t","uint_least16_t","int_least32_t","uint_least32_t","int_least64_t","uint_least64_t","int_fast8_t","uint_fast8_t","int_fast16_t","uint_fast16_t","int_fast32_t","uint_fast32_t","int_fast64_t","uint_fast64_t","intptr_t","uintptr_t","size_t","ptrdiff_t","intmax_t","uintmax_t"),/\b/),h={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:u}]},m={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\\s"]{0,16})\(/,end:/\)([^()\\\s"]{0,16})"/})]},g={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},y={scope:"meta",begin:/#\s*include\b/,end:/$/,keywords:{keyword:"include"},contains:[{begin:/\\\n/},m,{scope:"string",begin:/<.*?>/},i,e.C_BLOCK_COMMENT_MODE]},v={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(m,{className:"string"}),i,e.C_BLOCK_COMMENT_MODE]},S=[y,v],x={className:"title",begin:n.optional(s)+e.IDENT_RE,relevance:0},w=n.optional(s)+e.IDENT_RE+"\\s*\\(",C=12,R={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},P=[...S,h,i,e.C_BLOCK_COMMENT_MODE,g,m],N={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:R,contains:P.concat([{begin:/\(/,end:/\)/,keywords:R,contains:P.concat(["self"]),relevance:0}]),relevance:0},$={begin:"("+c+"[\\*&\\s]+){1,"+C+"}"+w,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:R,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:R,relevance:0},{begin:w,returnBegin:!0,contains:[e.inherit(x,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:R,relevance:0,contains:[i,e.C_BLOCK_COMMENT_MODE,m,g,h,{begin:/\(/,end:/\)/,keywords:R,relevance:0,contains:["self",i,e.C_BLOCK_COMMENT_MODE,m,g,h]}]},h,i,e.C_BLOCK_COMMENT_MODE,...S]};return{name:"C",aliases:["h"],keywords:R,disableAutodetect:!0,illegal:"</",contains:[].concat(N,$,P,[...S,{begin:e.IDENT_RE+"::",keywords:R},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:v,strings:m,keywords:R}}}return zx=t,zx}var Xx,JD;function xce(){if(JD)return Xx;JD=1;function t(e){const n=e.regex,i=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",c="(?!struct)("+r+"|"+n.optional(s)+"[a-zA-Z_]\\w*"+n.optional("<[^<>]+>")+")",u={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},d={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\\s"]{0,16})\(/,end:/\)([^()\\\s"]{0,16})"/})]},m={className:"number",variants:[{begin:"[+-]?(?:(?:\\b[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|\\b[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|\\b0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},g={scope:"meta",begin:/#\s*include\b/,end:/$/,keywords:{keyword:"include"},contains:[{begin:/\\\n/},d,{scope:"string",begin:/<.*?>/},i,e.C_BLOCK_COMMENT_MODE]},y={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(d,{className:"string"}),i,e.C_BLOCK_COMMENT_MODE]},v=[g,y],S={className:"title",begin:n.optional(s)+e.IDENT_RE,relevance:0},x=n.optional(s)+e.IDENT_RE+"\\s*\\(",w=12,C=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],k=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],A=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],R=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],$={type:k,keyword:C,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:A},D={className:"function.dispatch",relevance:0,keywords:{_hint:R},begin:n.concat(/\b/,`(?!${C.join("|")})`,e.IDENT_RE,n.lookahead(/(<[^<>]+>|)\s*\(/))},U=[D,...v,u,i,e.C_BLOCK_COMMENT_MODE,m,d],V={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:$,contains:U.concat([{begin:/\(/,end:/\)/,keywords:$,contains:U.concat(["self"]),relevance:0}]),relevance:0},X={className:"function",begin:"("+c+"[\\*&\\s]+){1,"+w+"}"+x,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:$,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:$,relevance:0},{begin:x,returnBegin:!0,contains:[S],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[d,m]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:$,relevance:0,contains:[i,e.C_BLOCK_COMMENT_MODE,d,m,u,{begin:/\(/,end:/\)/,keywords:$,relevance:0,contains:["self",i,e.C_BLOCK_COMMENT_MODE,d,m,u]}]},u,i,e.C_BLOCK_COMMENT_MODE,...v]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:$,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(V,X,D,U,[...v,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:$,contains:["self",u]},{begin:e.IDENT_RE+"::",keywords:$},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}return Xx=t,Xx}var Ux,eL;function wce(){if(eL)return Ux;eL=1;function t(e){const n=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],i=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],r=["default","false","null","true"],s=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],a=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],c={keyword:s.concat(a),built_in:n,literal:r},u=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),h="\\d(_*\\d)*",d="([uU][lL]?|[lL][uU]?)?",g={className:"number",variants:[{begin:"\\b0[bB]_*[01](_*[01])*"+d},{begin:"(-?)\\b0[xX]_*[a-fA-F0-9](_*[a-fA-F0-9])*"+d},{begin:"(-?)(\\b"+h+"(\\.("+h+")?)?|\\."+h+")([eE][-+]?"+h+")?"+"([fFdDmM]|[uU][lL]?|[lL][uU]?)?"}],relevance:0},y={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},v={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},S=e.inherit(v,{illegal:/\n/}),x={className:"subst",begin:/\{/,end:/\}/,keywords:c},w=e.inherit(x,{illegal:/\n/}),C={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,w]},k={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},x]},A=e.inherit(k,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},w]});x.contains=[k,C,v,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,g,e.C_BLOCK_COMMENT_MODE],w.contains=[A,C,S,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,g,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const R={variants:[y,k,C,v,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},P={begin:"<",end:">",contains:[{beginKeywords:"in out"},u]},N=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",$={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:c,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},R,g,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},u,P,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[u,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[u,P,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+N+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:c,contains:[{beginKeywords:i.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,P],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,relevance:0,contains:[R,g,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},$]}}return Ux=t,Ux}var Zx,tL;function Ece(){if(tL)return Zx;tL=1;const t=h=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:h.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},UNICODE_RANGE:{scope:"number",begin:/\b[Uu]\+[0-9A-Fa-f][0-9A-Fa-f?]{0,5}(-[0-9A-Fa-f][0-9A-Fa-f]{0,5})?/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[h.APOS_STRING_MODE,h.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:h.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),e=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],n=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],i=[...e,...n],r=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),s=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),a=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),c=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","corner-bottom-left-shape","corner-bottom-right-shape","corner-shape","corner-top-left-shape","corner-top-right-shape","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","unicode-range","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function u(h){const d=h.regex,m=t(h),g={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},y="and or not only",v=/@-?\w[\w]*(-\w+)*/,S="[a-zA-Z-][a-zA-Z0-9_-]*",x=[h.APOS_STRING_MODE,h.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[m.BLOCK_COMMENT,g,m.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+S,relevance:0},m.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+s.join("|")+")"},{begin:":(:)?("+a.join("|")+")"}]},m.CSS_VARIABLE,{className:"attribute",begin:"\\b("+c.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[m.BLOCK_COMMENT,m.HEXCOLOR,m.IMPORTANT,m.CSS_NUMBER_MODE,m.UNICODE_RANGE,...x,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...x,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},m.FUNCTION_DISPATCH]},{begin:d.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:v},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:y,attribute:r.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...x,m.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+i.join("|")+")\\b"}]}}return Zx=u,Zx}var Vx,nL;function _ce(){if(nL)return Vx;nL=1;function t(e){const n=e.regex,i={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},r={match:/^ {0,3}([-*_])[ \t]*(?:\1[ \t]*){2,}$/},s={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},a={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},c={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},u=/[A-Za-z][A-Za-z0-9+.-]*/,h={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:n.concat(/\[.+?\]\(/,u,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},d={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},m={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},g=e.inherit(d,{contains:[]}),y=e.inherit(m,{contains:[]});d.contains.push(y),m.contains.push(g);let v=[i,h];return[d,m,g,y].forEach(C=>{C.contains=C.contains.concat(v)}),v=v.concat(d,m),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:v},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:v}]}]},i,a,r,d,m,{className:"quote",begin:"^>\\s+",contains:v,end:"$"},s,h,c,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}return Vx=t,Vx}var qx,iL;function Tce(){if(iL)return qx;iL=1;function t(e){const n=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:n.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^@@ +-\d+ +\+\d+,\d+ +@@/,/^@@ +-\d+,\d+ +\+\d+ +@@/,/^@@ +-\d+ +\+\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:n.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}return qx=t,qx}var Yx,rL;function kce(){if(rL)return Yx;rL=1;function t(e){const n=e.regex,i="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=n.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),s=n.concat(r,/(::\w+)*/),c={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},u={className:"doctag",begin:"@[A-Za-z]+"},h={begin:"#<",end:">"},d=[e.COMMENT("#","$",{contains:[u]}),e.COMMENT("^=begin","^=end",{contains:[u],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],m={className:"subst",begin:/#\{/,end:/\}/,keywords:c},g={className:"string",contains:[e.BACKSLASH_ESCAPE,m],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:n.concat(/<<[-~]?'?/,n.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,m]})]}]},y="[1-9](_?[0-9])*|0",v="[0-9](_?[0-9])*",S={className:"number",relevance:0,variants:[{begin:`\\b(${y})(\\.(${v}))?([eE][+-]?(${v})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},x={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:c}]},N=[g,{variants:[{match:[/class\s+/,s,/\s+<\s+/,s]},{match:[/\b(class|module)\s+/,s]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:c},{match:[/(include|extend)\s+/,s],scope:{2:"title.class"},keywords:c},{relevance:0,match:[s,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:r,scope:"title.class"},{match:[/def/,/\s+/,i],scope:{1:"keyword",3:"title.function"},contains:[x]},{begin:"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[g,{begin:i}],relevance:0},S,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:c},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,m],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(h,d),relevance:0}].concat(h,d);m.contains=N,x.contains=N;const V=[{begin:/^\s*=>/,starts:{end:"$",contains:N}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:c,contains:N}}];return d.unshift(h),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:c,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(V).concat(d).concat(N)}}return Yx=t,Yx}var Gx,sL;function Cce(){if(sL)return Gx;sL=1;function t(e){const a={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:a,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\b0[bB](_?[01])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:a,illegal:/["']/}]}]}}return Gx=t,Gx}var Fx,oL;function Ace(){if(oL)return Fx;oL=1;function t(e){const n=e.regex,i=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:n.concat(i,n.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}return Fx=t,Fx}var Hx,aL;function Rce(){if(aL)return Hx;aL=1;function t(e){const n=e.regex,i={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},r=e.COMMENT();r.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const s={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},a={className:"literal",begin:/\bon|off|true|false|yes|no\b/},c={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},u={begin:/\[/,end:/\]/,contains:[r,a,s,c,i,"self"],relevance:0},h=/[A-Za-z0-9_-]+/,d=/"(\\"|[^"])*"/,m=/'[^']*'/,g=n.either(h,d,m),y=n.concat(g,"(\\s*\\.\\s*",g,")*",n.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[r,{className:"section",begin:/\[+/,end:/\]+/},{begin:y,className:"attr",starts:{end:/$/,contains:[r,u,a,s,c,i]}}]}}return Hx=t,Hx}var Wx,lL;function Pce(){if(lL)return Wx;lL=1;var t="[0-9](_*[0-9])*",e=`\\.(${t})`,n="[0-9a-fA-F](_*[0-9a-fA-F])*",i={className:"number",variants:[{begin:`(\\b(${t})((${e})|\\.)?|(${e}))[eE][+-]?(${t})[fFdD]?\\b`},{begin:`\\b(${t})((${e})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${e})[fFdD]?\\b`},{begin:`\\b(${t})[fFdD]\\b`},{begin:`\\b0[xX]((${n})\\.?|(${n})?\\.(${n}))[pP][+-]?(${t})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${n})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function r(a,c,u){return u===-1?"":a.replace(c,h=>r(a,c,u-1))}function s(a){const c=a.regex,u="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",h="(?:(?:\\s*\\[\\s*])+)?",d=u+"<@@@>"+h,g="(?:"+("\\?(?:\\s+(?:extends|super)\\s+"+d+")?")+"|"+d+")",y=r("(?:\\s*<\\s*"+g+"(?:\\s*,\\s*"+g+")*\\s*>)?",/<@@@>/g,2),C={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},k={className:"meta",begin:"@"+u,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},A={className:"params",begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:[a.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:C,illegal:/<\/|#/,contains:[a.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[a.BACKSLASH_ESCAPE]},a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,u],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{beginKeywords:"new throw return else yield assert",relevance:0},{begin:[u,c.concat(y,h,/\s+/),u,h,/\s*/,/=(?!=)/],className:{1:"type",3:"variable",6:"operator"}},{begin:[/record/,/\s+/,u],className:{1:"keyword",3:"title.class"},contains:[A,a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]},{begin:[u,c.concat(y,h,/\s+/),u,/\s*(?=\()/],className:{1:"type",3:"title.function"},keywords:C,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:[k,a.APOS_STRING_MODE,a.QUOTE_STRING_MODE,i,a.C_BLOCK_COMMENT_MODE]},a.C_LINE_COMMENT_MODE,a.C_BLOCK_COMMENT_MODE]},i,k]}}return Wx=s,Wx}var Kx,cL;function Mce(){if(cL)return Kx;cL=1;const t="[A-Za-z$_][0-9A-Za-z$_]*",e=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],n=["true","false","null","undefined","NaN","Infinity"],i=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],r=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],s=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],a=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","self","global"],c=[].concat(s,i,r);function u(h){const d=h.regex,m=(se,{after:we})=>{const _e="</"+se[0].slice(1);return se.input.indexOf(_e,we)!==-1},g=t,y={begin:"<>",end:"</>"},v=/<[A-Za-z0-9\\._:-]+\s*\/>/,S={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(se,we)=>{const _e=se[0].length+se.index,be=se.input[_e];if(be==="<"||be===","){we.ignoreMatch();return}be===">"&&(m(se,{after:_e})||we.ignoreMatch());let Se;const Ee=se.input.substring(_e);if(Se=Ee.match(/^\s*=/)){we.ignoreMatch();return}if((Se=Ee.match(/^\s+extends\s+/))&&Se.index===0){we.ignoreMatch();return}}},x={$pattern:t,keyword:e,literal:n,built_in:c,"variable.language":a},w="[0-9](_?[0-9])*",C=`\\.(${w})`,k="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",A={className:"number",variants:[{begin:`(\\b(${k})((${C})|\\.)?|(${C}))[eE][+-]?(${w})\\b`},{begin:`\\b(${k})\\b((${C})\\b|\\.)?|(${C})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},R={className:"subst",begin:"\\$\\{",end:"\\}",keywords:x,contains:[]},P={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[h.BACKSLASH_ESCAPE,R],subLanguage:"xml"}},N={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[h.BACKSLASH_ESCAPE,R],subLanguage:"css"}},$={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[h.BACKSLASH_ESCAPE,R],subLanguage:"graphql"}},D={className:"string",begin:"`",end:"`",contains:[h.BACKSLASH_ESCAPE,R]},V={className:"comment",variants:[h.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:g+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),h.C_BLOCK_COMMENT_MODE,h.C_LINE_COMMENT_MODE]},X=[h.APOS_STRING_MODE,h.QUOTE_STRING_MODE,P,N,$,D,{match:/\$\d+/},A];R.contains=X.concat({begin:/\{/,end:/\}/,keywords:x,contains:["self"].concat(X)});const ee=[].concat(V,R.contains),le=ee.concat([{begin:/(\s*)\(/,end:/\)/,keywords:x,contains:["self"].concat(ee)}]),re={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:x,contains:le},G={variants:[{match:[/class/,/\s+/,g,/\s+/,/extends/,/\s+/,d.concat(g,"(",d.concat(/\./,g),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,g],scope:{1:"keyword",3:"title.class"}}]},oe={relevance:0,match:d.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...i,...r]}},K={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},me={variants:[{match:[/function/,/\s+/,g,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[re],illegal:/%/},fe={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function Te(se){return d.concat("(?!",se.join("|"),")")}const ze={match:d.concat(/\b/,Te([...s,"super","import","await"].map(se=>`${se}\\s*\\(`)),g,d.lookahead(/\s*\(/)),className:"title.function",relevance:0},tt={begin:d.concat(/\./,d.lookahead(d.concat(g,/(?![0-9A-Za-z$_(])/))),end:g,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},I={match:[/get|set/,/\s+/,g,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},re]},ie="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+h.UNDERSCORE_IDENT_RE+")\\s*=>",B={match:[/const|var|let/,/\s+/,g,/\s*/,/=\s*/,/(async\s*)?/,d.lookahead(ie)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[re]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:x,exports:{PARAMS_CONTAINS:le,CLASS_REFERENCE:oe},illegal:/#(?![$_A-Za-z])/,contains:[h.SHEBANG({label:"shebang",binary:"node",relevance:5}),K,h.APOS_STRING_MODE,h.QUOTE_STRING_MODE,P,N,$,D,V,{match:/\$\d+/},A,oe,{scope:"attr",match:g+d.lookahead(":"),relevance:0},B,{begin:"("+h.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[V,h.REGEXP_MODE,{className:"function",begin:ie,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:h.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:x,contains:le}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:y.begin,end:y.end},{match:v},{begin:S.begin,"on:begin":S.isTrulyOpeningTag,end:S.end}],subLanguage:"xml",contains:[{begin:S.begin,end:S.end,skip:!0,contains:["self"]}]}]},me,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+h.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[re,h.inherit(h.TITLE_MODE,{begin:g,className:"title.function"})]},{match:/\.\.\./,relevance:0},tt,{match:"\\$"+g,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[re]},ze,fe,G,I,{match:/\$[(.]/}]}}return Kx=u,Kx}var Jx,uL;function Nce(){if(uL)return Jx;uL=1;const e={scope:"number",match:"([-+]?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)|NaN|[-+]?Infinity",relevance:0};function n(i){const r={className:"attr",begin:/(("(\\.|[^\\"\r\n])*")|('(\\.|[^\\'\r\n])*'))(?=\s*:)/,relevance:1.01},s={match:/[{}[\],:]/,className:"punctuation",relevance:0},a=["true","false","null"],c={scope:"literal",beginKeywords:a.join(" ")};return{name:"JSON",aliases:["jsonc","json5"],keywords:{literal:a},contains:[r,s,i.APOS_STRING_MODE,i.QUOTE_STRING_MODE,c,e,i.C_LINE_COMMENT_MODE,i.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}return Jx=n,Jx}var ew,fL;function Qce(){if(fL)return ew;fL=1;var t="[0-9](_*[0-9])*",e=`\\.(${t})`,n="[0-9a-fA-F](_*[0-9a-fA-F])*",i={className:"number",variants:[{begin:`(\\b(${t})((${e})|\\.)?|(${e}))[eE][+-]?(${t})[fFdD]?\\b`},{begin:`\\b(${t})((${e})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${e})[fFdD]?\\b`},{begin:`\\b(${t})[fFdD]\\b`},{begin:`\\b0[xX]((${n})\\.?|(${n})?\\.(${n}))[pP][+-]?(${t})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${n})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function r(s){const a={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},c={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},u={className:"symbol",begin:s.UNDERSCORE_IDENT_RE+"@"},h={className:"subst",begin:/\$\{/,end:/\}/,contains:[s.C_NUMBER_MODE]},d={className:"variable",begin:"\\$"+s.UNDERSCORE_IDENT_RE},m={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[d,h]},{begin:"'",end:"'",illegal:/\n/,contains:[s.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[s.BACKSLASH_ESCAPE,d,h]}]};h.contains.push(m);const g={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+s.UNDERSCORE_IDENT_RE+")?"},y={className:"meta",begin:"@"+s.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[s.inherit(m,{className:"string"}),"self"]}]},v=i,S=s.COMMENT("/\\*","\\*/",{contains:[s.C_BLOCK_COMMENT_MODE]}),x={variants:[{className:"type",begin:s.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},w=x;return w.variants[1].contains=[x],x.variants[1].contains=[w],{name:"Kotlin",aliases:["kt","kts","ktm","ktx"],keywords:a,contains:[s.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),s.C_LINE_COMMENT_MODE,S,c,u,g,y,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:a,relevance:5,contains:[{begin:s.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[s.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:a,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[x,s.C_LINE_COMMENT_MODE,S],relevance:0},s.C_LINE_COMMENT_MODE,S,g,y,m,s.C_NUMBER_MODE]},S]},{begin:[/class|interface|trait/,/\s+/,s.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},s.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},g,y]},m,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
149
+ `},v]}}return ew=r,ew}var tw,hL;function $ce(){if(hL)return tw;hL=1;const t=d=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:d.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},UNICODE_RANGE:{scope:"number",begin:/\b[Uu]\+[0-9A-Fa-f][0-9A-Fa-f?]{0,5}(-[0-9A-Fa-f][0-9A-Fa-f]{0,5})?/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[d.APOS_STRING_MODE,d.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:d.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),e=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],n=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],i=[...e,...n],r=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),s=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),a=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),c=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","corner-bottom-left-shape","corner-bottom-right-shape","corner-shape","corner-top-left-shape","corner-top-right-shape","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","unicode-range","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),u=s.concat(a).sort().reverse();function h(d){const m=t(d),g=u,y="and or not only",v="[\\w-]+",S="("+v+"|@\\{"+v+"\\})",x=[],w=[],C=function(ee){return{className:"string",begin:"~?"+ee+".*?"+ee}},k=function(ee,le,re){return{className:ee,begin:le,relevance:re}},A={$pattern:/[a-z-]+/,keyword:y,attribute:r.join(" ")},R={begin:"\\(",end:"\\)",contains:w,keywords:A,relevance:0};w.push(d.C_LINE_COMMENT_MODE,d.C_BLOCK_COMMENT_MODE,C("'"),C('"'),m.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},m.UNICODE_RANGE,m.HEXCOLOR,R,k("variable","@@?"+v,10),k("variable","@\\{"+v+"\\}"),k("built_in","~?`[^`]*?`"),{className:"attribute",begin:v+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},m.IMPORTANT,{beginKeywords:"and not"},m.FUNCTION_DISPATCH);const P=w.concat({begin:/\{/,end:/\}/,contains:x}),N={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(w)},$={begin:S+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},m.CSS_VARIABLE,{className:"attribute",begin:"\\b("+c.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:w}}]},D={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:A,returnEnd:!0,contains:w,relevance:0}},U={className:"variable",variants:[{begin:"@"+v+"\\s*:",relevance:15},{begin:"@"+v}],starts:{end:"[;}]",returnEnd:!0,contains:P}},V={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:S,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[d.C_LINE_COMMENT_MODE,d.C_BLOCK_COMMENT_MODE,N,k("keyword","all\\b"),k("variable","@\\{"+v+"\\}"),{begin:"\\b("+i.join("|")+")\\b",className:"selector-tag"},m.CSS_NUMBER_MODE,k("selector-tag",S,0),k("selector-id","#"+S),k("selector-class","\\."+S,0),k("selector-tag","&",0),m.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+s.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+a.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:P},{begin:"!important"},m.FUNCTION_DISPATCH]},X={begin:v+`:(:)?(${g.join("|")})`,returnBegin:!0,contains:[V]};return x.push(d.C_LINE_COMMENT_MODE,d.C_BLOCK_COMMENT_MODE,D,U,X,$,V,N,m.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:x}}return tw=h,tw}var nw,dL;function Dce(){if(dL)return nw;dL=1;function t(e){const n="\\[=*\\[",i="\\]=*\\]",r={begin:n,end:i,contains:["self"]},s=[e.COMMENT("--(?!"+n+")","$"),e.COMMENT("--"+n,i,{contains:[r],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local global not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:s.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:s}].concat(s)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:n,end:i,contains:[r],relevance:5}])}}return nw=t,nw}var iw,pL;function Lce(){if(pL)return iw;pL=1;function t(e){const n={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},i={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n]},r={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[n,i]},s={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},a={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},c={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[n]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,n,i,r,s,a,c]}}return iw=t,iw}var rw,mL;function Ice(){if(mL)return rw;mL=1;function t(e){const n=e.regex,i=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],r=/[dualxmsipngr]{0,12}/,s={$pattern:/[\w.]+/,keyword:i.join(" ")},a={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:s},c={begin:/->\{/,end:/\}/},u={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},h={scope:"variable",variants:[{begin:/\$\d/},{begin:n.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[u]},d={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},m=[e.BACKSLASH_ESCAPE,a,h],g=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],y=(x,w,C="\\1")=>{const k=C==="\\1"?C:n.concat(C,w);return n.concat(n.concat("(?:",x,")"),w,/(?:\\.|[^\\\/])*?/,k,/(?:\\.|[^\\\/])*?/,C,r)},v=(x,w,C)=>n.concat(n.concat("(?:",x,")"),w,/(?:\\.|[^\\\/])*?/,C,r),S=[h,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),c,{className:"string",contains:m,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},d,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:y("s|tr|y",n.either(...g,{capture:!0}))},{begin:y("s|tr|y","\\(","\\)")},{begin:y("s|tr|y","\\[","\\]")},{begin:y("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:v("(?:m|qr)?",/\//,/\//)},{begin:v("m|qr",n.either(...g,{capture:!0}),/\1/)},{begin:v("m|qr",/\(/,/\)/)},{begin:v("m|qr",/\[/,/\]/)},{begin:v("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,u]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,u,d]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return a.contains=S,c.contains=S,{name:"Perl",aliases:["pl","pm"],keywords:s,contains:S}}return rw=t,rw}var sw,gL;function jce(){if(gL)return sw;gL=1;function t(e){const n={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},i=/[a-zA-Z@][a-zA-Z0-9_]*/,u={"variable.language":["this","super"],$pattern:i,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},h={$pattern:i,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:u,illegal:"</",contains:[n,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+h.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:h,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}return sw=t,sw}var ow,OL;function Bce(){if(OL)return ow;OL=1;function t(e){const n=e.regex,i=/(?![A-Za-z0-9])(?![$])/,r=n.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,i),s=n.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,i),a=n.concat(/[A-Z]+/,i),c={scope:"variable",match:"\\$+"+r},u={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},h={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},d=e.inherit(e.APOS_STRING_MODE,{illegal:null}),m=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(h)}),g={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(h),"on:begin":(re,G)=>{G.data._beginMatch=re[1]||re[2]},"on:end":(re,G)=>{G.data._beginMatch!==re[1]&&G.ignoreMatch()}},y=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),v=`[
150
+ ]`,S={scope:"string",variants:[m,d,g,y]},x={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},w=["false","null","true"],C=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],k=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],R={keyword:C,literal:(re=>{const G=[];return re.forEach(oe=>{G.push(oe),oe.toLowerCase()===oe?G.push(oe.toUpperCase()):G.push(oe.toLowerCase())}),G})(w),built_in:k},P=re=>re.map(G=>G.replace(/\|\d+$/,"")),N={variants:[{match:[/new/,n.concat(v,"+"),n.concat("(?!",P(k).join("\\b|"),"\\b)"),s],scope:{1:"keyword",4:"title.class"}}]},$=n.concat(r,"\\b(?!\\()"),D={variants:[{match:[n.concat(/::/,n.lookahead(/(?!class\b)/)),$],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[s,n.concat(/::/,n.lookahead(/(?!class\b)/)),$],scope:{1:"title.class",3:"variable.constant"}},{match:[s,n.concat("::",n.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[s,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},U={scope:"attr",match:n.concat(r,n.lookahead(":"),n.lookahead(/(?!::)/))},V={relevance:0,begin:/\(/,end:/\)/,keywords:R,contains:[U,c,D,e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE,e.HASH_COMMENT_MODE,S,x,N]},X={relevance:0,match:[/\b/,n.concat("(?!fn\\b|function\\b|",P(C).join("\\b|"),"|",P(k).join("\\b|"),"\\b)"),r,n.concat(v,"*"),n.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[V]};V.contains.push(X);const ee=[U,D,e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE,e.HASH_COMMENT_MODE,S,x,N],le={begin:n.concat(/#\[\s*\\?/,n.either(s,a)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:w,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:w,keyword:["new","array"]},contains:["self",...ee]},...ee,{scope:"meta",variants:[{match:s},{match:a}]}]};return{case_insensitive:!1,keywords:R,contains:[le,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},u,{scope:"variable.language",match:/\$this\b/},c,X,D,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},N,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:R,contains:["self",le,c,D,e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE,e.HASH_COMMENT_MODE,S,x]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},S,x]}}return ow=t,ow}var aw,bL;function zce(){if(bL)return aw;bL=1;function t(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}return aw=t,aw}var lw,yL;function Xce(){if(yL)return lw;yL=1;function t(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}return lw=t,lw}var cw,vL;function Uce(){if(vL)return cw;vL=1;function t(e){const n=e.regex,i=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),r=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","lazy","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],u={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","aiter","all","anext","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozendict","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","sentinel","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},h={className:"meta",begin:/^(>>>|\.\.\.) /},d={className:"subst",begin:/\{/,end:/\}/,keywords:u,illegal:/#/},m={begin:/\{\{/,relevance:0},g={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,h],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,h],relevance:10},{begin:/([fFtT][rR]|[rR][fFtT]|[fFtT])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,h,m,d]},{begin:/([fFtT][rR]|[rR][fFtT]|[fFtT])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,h,m,d]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fFtT][rR]|[rR][fFtT]|[fFtT])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,m,d]},{begin:/([fFtT][rR]|[rR][fFtT]|[fFtT])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,m,d]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},y="[0-9](_?[0-9])*",v=`(\\b(${y}))?\\.(${y})|\\b(${y})\\.`,S=`\\b|${r.join("|")}`,x={className:"number",relevance:0,variants:[{begin:`(\\b(${y})|(${v}))[eE][+-]?(${y})[jJ]?(?=${S})`},{begin:`(${v})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${S})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${S})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${S})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${S})`},{begin:`\\b(${y})[jJ](?=${S})`}]},w={className:"comment",begin:n.lookahead(/# type:/),end:/$/,keywords:u,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},C={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:u,contains:["self",h,x,g,e.HASH_COMMENT_MODE]}]};return d.contains=[g,x,h],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:u,illegal:/(<\/|\?)|=>/,contains:[h,x,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},g,w,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,i],scope:{1:"keyword",3:"title.function"},contains:[C]},{variants:[{match:[/\bclass/,/\s+/,i,/\s*/,/\(\s*/,i,/\s*\)/]},{match:[/\bclass/,/\s+/,i]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[x,C,g]}]}}return cw=t,cw}var uw,SL;function Zce(){if(SL)return uw;SL=1;function t(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}return uw=t,uw}var fw,xL;function Vce(){if(xL)return fw;xL=1;function t(e){const n=e.regex,i=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=n.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),s=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,a=n.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:i,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:n.lookahead(n.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:i},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[s,r]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,r]},{scope:{1:"punctuation",2:"number"},match:[a,r]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,r]}]},{scope:{3:"operator"},match:[i,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:s},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:a},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}return fw=t,fw}var hw,wL;function qce(){if(wL)return hw;wL=1;function t(e){const n=e.regex,i=/(r#)?/,r=n.concat(i,e.UNDERSCORE_IDENT_RE),s=n.concat(i,e.IDENT_RE),a={scope:"title.function.invoke",relevance:0,begin:n.concat(/\b/,/(?!(?:let|for|while|if|else|match)\b)/,s,n.lookahead(/\s*\(/))},c="([ui](8|16|32|64|128|size)|f(16|32|64|128))?",u=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","raw","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],h=["true","false","Some","None","Ok","Err"],d=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],m=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f16","f32","f64","f128","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:m,keyword:u,literal:h,built_in:d},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{scope:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|"|\\|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{scope:"number",variants:[{begin:"\\b0b([01_]+)"+c},{begin:"\\b0o([0-7_]+)"+c},{begin:"\\b0x([A-Fa-f0-9_]+)"+c},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+c}],relevance:0},{begin:[/\bsafe/,/\s+/,/extern/],scope:{1:"keyword",3:"keyword"}},{begin:[/fn/,/\s+/,r],scope:{1:"keyword",3:"title.function"}},{scope:"meta",begin:"#!?\\[",end:"\\]",contains:[{scope:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,r],scope:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,r,/\s+/,/in/],scope:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,r],scope:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,r],scope:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:d,type:m}},{scope:"punctuation",begin:"->"},a]}}return hw=t,hw}var dw,EL;function Yce(){if(EL)return dw;EL=1;const t=h=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:h.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},UNICODE_RANGE:{scope:"number",begin:/\b[Uu]\+[0-9A-Fa-f][0-9A-Fa-f?]{0,5}(-[0-9A-Fa-f][0-9A-Fa-f]{0,5})?/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[h.APOS_STRING_MODE,h.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:h.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),e=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],n=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],i=[...e,...n],r=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),s=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),a=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),c=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","corner-bottom-left-shape","corner-bottom-right-shape","corner-shape","corner-top-left-shape","corner-top-right-shape","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","unicode-range","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function u(h){const d=t(h),m=a,g=s,y="@[a-z-]+",v="and or not only",x={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[h.C_LINE_COMMENT_MODE,h.C_BLOCK_COMMENT_MODE,d.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},d.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+i.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+g.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+m.join("|")+")"},x,{begin:/\(/,end:/\)/,contains:[d.CSS_NUMBER_MODE]},d.CSS_VARIABLE,{className:"attribute",begin:"\\b("+c.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[d.BLOCK_COMMENT,x,d.HEXCOLOR,d.CSS_NUMBER_MODE,d.UNICODE_RANGE,h.QUOTE_STRING_MODE,h.APOS_STRING_MODE,d.IMPORTANT,d.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:y,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:v,attribute:r.join(" ")},contains:[{begin:y,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},x,h.QUOTE_STRING_MODE,h.APOS_STRING_MODE,d.HEXCOLOR,d.CSS_NUMBER_MODE]},d.FUNCTION_DISPATCH]}}return dw=u,dw}var pw,_L;function Gce(){if(_L)return pw;_L=1;function t(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[./~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}return pw=t,pw}var mw,TL;function Fce(){if(TL)return mw;TL=1;function t(e){const n=e.regex,i=e.COMMENT("--","$"),r={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},s={begin:/"/,end:/"/,contains:[{match:/""/}]},a=["true","false","unknown"],c=["double precision","large object","with timezone","without timezone"],u=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],h=["add","asc","collation","desc","final","first","last","view"],d=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],m=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],g=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],y=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],v=m,S=[...d,...h].filter(P=>!m.includes(P)),x={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},w={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},C={match:n.concat(/\b/,n.either(...v),/\s*\(/),relevance:0,keywords:{built_in:v}};function k(P){return n.concat(/\b/,n.either(...P.map(N=>N.replace(/\s+/,"\\s+"))),/\b/)}const A={scope:"keyword",match:k(y),relevance:0};function R(P,{exceptions:N,when:$}={}){const D=$;return N=N||[],P.map(U=>U.match(/\|\d+$/)||N.includes(U)?U:D(U)?`${U}|0`:U)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:R(S,{when:P=>P.length<3}),literal:a,type:u,built_in:g},contains:[{scope:"type",match:k(c)},A,C,x,r,s,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,i,w]}}return mw=t,mw}var gw,kL;function Hce(){if(kL)return gw;kL=1;function t($){return $?typeof $=="string"?$:$.source:null}function e($){return n("(?=",$,")")}function n(...$){return $.map(U=>t(U)).join("")}function i($){const D=$[$.length-1];return typeof D=="object"&&D.constructor===Object?($.splice($.length-1,1),D):{}}function r(...$){return"("+(i($).capture?"":"?:")+$.map(V=>t(V)).join("|")+")"}new RegExp(r(/\[(?:[^\\\]]|\\.)*\]/,/\(\?<(?![=!])[^>]+>/,/\(\?'[^']+'/,/\(\??/,/\\([1-9][0-9]*)/,/\\./));const s=$=>n(/\b/,$,/\w$/.test($)?/\b/:/\B/),a=["Protocol","Type"].map(s),c=["init","self"].map(s),u=["Any","Self"],h=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],d=["false","nil","true"],m=["assignment","associativity","higherThan","left","lowerThan","none","right"],g=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],y=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],v=r(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),S=r(v,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),x=n(v,S,"*"),w=r(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),C=r(w,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),k=n(w,C,"*"),A=n(/[A-Z]/,C,"*"),R=["attached","autoclosure",n(/convention\(/,r("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",n(/objc\(/,k,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],P=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function N($){const D={match:/\s+/,relevance:0},U=$.COMMENT("/\\*","\\*/",{contains:["self"]}),V=[$.C_LINE_COMMENT_MODE,U],X={match:[/\./,r(...a,...c)],className:{2:"keyword"}},ee={match:n(/\./,r(...h)),relevance:0},le=h.filter(Rt=>typeof Rt=="string").concat(["_|0"]),re=h.filter(Rt=>typeof Rt!="string").concat(u).map(s),G={variants:[{className:"keyword",match:r(...re,...c)}]},oe={$pattern:r(/\b\w+/,/#\w+/),keyword:le.concat(g),literal:d},K=[X,ee,G],me={match:n(/\./,r(...y)),relevance:0},fe={className:"built_in",match:n(/\b/,r(...y),/(?=\()/)},Te=[me,fe],ze={match:/->/,relevance:0},tt={className:"operator",relevance:0,variants:[{match:x},{match:`\\.(\\.|${S})+`}]},I=[ze,tt],ie="([0-9]_*)+",B="([0-9a-fA-F]_*)+",se={className:"number",relevance:0,variants:[{match:`\\b(${ie})(\\.(${ie}))?([eE][+-]?(${ie}))?\\b`},{match:`\\b0x(${B})(\\.(${B}))?([pP][+-]?(${ie}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},we=(Rt="")=>({className:"subst",variants:[{match:n(/\\/,Rt,/[0\\tnr"']/)},{match:n(/\\/,Rt,/u\{[0-9a-fA-F]{1,8}\}/)}]}),_e=(Rt="")=>({className:"subst",match:n(/\\/,Rt,/[\t ]*(?:[\r\n]|\r\n)/)}),be=(Rt="")=>({className:"subst",label:"interpol",begin:n(/\\/,Rt,/\(/),end:/\)/}),Se=(Rt="")=>({begin:n(Rt,/"""/),end:n(/"""/,Rt),contains:[we(Rt),_e(Rt),be(Rt)]}),Ee=(Rt="")=>({begin:n(Rt,/"/),end:n(/"/,Rt),contains:[we(Rt),be(Rt)]}),Ie={className:"string",variants:[Se(),Se("#"),Se("##"),Se("###"),Ee(),Ee("#"),Ee("##"),Ee("###")]},Ye=[$.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[$.BACKSLASH_ESCAPE]}],Ge={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:Ye},qe=Rt=>{const Cr=n(Rt,/\//),Yi=n(/\//,Rt);return{begin:Cr,end:Yi,contains:[...Ye,{scope:"comment",begin:`#(?!.*${Yi})`,end:/$/}]}},He={scope:"regexp",variants:[qe("###"),qe("##"),qe("#"),Ge]},Xe={match:n(/`/,k,/`/)},zn={className:"variable",match:/\$\d+/},vn={className:"variable",match:`\\$${C}+`},wn=[Xe,zn,vn],Ii={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:P,contains:[...I,se,Ie]}]}},ci={scope:"keyword",match:n(/@/,r(...R),e(r(/\(/,/\s+/)))},ei={scope:"meta",match:n(/@/,k)},qi=[Ii,ci,ei],En={match:e(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:n(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,C,"+")},{className:"type",match:A,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:n(/\s+&\s+/,e(A)),relevance:0}]},cr={begin:/</,end:/>/,keywords:oe,contains:[...V,...K,...qi,ze,En]};En.contains.push(cr);const yi={match:n(k,/\s*:/),keywords:"_|0",relevance:0},Nn={begin:/\(/,end:/\)/,relevance:0,keywords:oe,contains:["self",yi,...V,He,...K,...Te,...I,se,Ie,...wn,...qi,En]},vi={begin:/</,end:/>/,keywords:"repeat each",contains:[...V,En]},ks={begin:r(e(n(k,/\s*:/)),e(n(k,/\s+/,k,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:k}]},Cs={begin:/\(/,end:/\)/,keywords:oe,contains:[ks,...V,...K,...I,se,Ie,...qi,En,Nn],endsParent:!0,illegal:/["']/},As={match:[/(func|macro)/,/\s+/,r(Xe.match,k,x)],className:{1:"keyword",3:"title.function"},contains:[vi,Cs,D],illegal:[/\[/,/%/]},Kr={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[vi,Cs,D],illegal:/\[|%/},ur={match:[/operator/,/\s+/,x],className:{1:"keyword",3:"title"}},Jr={begin:[/precedencegroup/,/\s+/,A],className:{1:"keyword",3:"title"},contains:[En],keywords:[...m,...d],end:/}/},eo={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},to={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Qn={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,k,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:oe,contains:[vi,...K,{begin:/:/,end:/\{/,keywords:oe,contains:[{scope:"title.class.inherited",match:A},...K],relevance:0}]};for(const Rt of Ie.variants){const Cr=Rt.contains.find($n=>$n.label==="interpol");Cr.keywords=oe;const Yi=[...K,...Te,...I,se,Ie,...wn];Cr.contains=[...Yi,{begin:/\(/,end:/\)/,contains:["self",...Yi]}]}return{name:"Swift",keywords:oe,contains:[...V,As,Kr,eo,to,Qn,ur,Jr,{beginKeywords:"import",end:/$/,contains:[...V],relevance:0},He,...K,...Te,...I,se,Ie,...wn,...qi,En,Nn]}}return gw=N,gw}var Ow,CL;function Wce(){if(CL)return Ow;CL=1;function t(e){const n="true false yes no null",i="[\\w#;/?:@&=+$,.~*'()[\\]]+",r={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},s={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},a={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},c={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,s]},u=e.inherit(c,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),y={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},v={end:",",endsWithParent:!0,excludeEnd:!0,keywords:n,relevance:0},S={begin:/\{/,end:/\}/,contains:[v],illegal:"\\n",relevance:0},x={begin:"\\[",end:"\\]",contains:[v],illegal:"\\n",relevance:0},w=[r,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+i},{className:"type",begin:"!<"+i+">"},{className:"type",begin:"!"+i},{className:"type",begin:"!!"+i},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:n,keywords:{literal:n}},y,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},S,x,a,c],C=[...w];return C.pop(),C.push(u),v.contains=C,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:w}}return Ow=t,Ow}var bw,AL;function Kce(){if(AL)return bw;AL=1;const t="[A-Za-z$_][0-9A-Za-z$_]*",e=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],n=["true","false","null","undefined","NaN","Infinity"],i=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],r=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],s=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],a=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","self","global"],c=[].concat(s,i,r);function u(d){const m=d.regex,g=(we,{after:_e})=>{const be="</"+we[0].slice(1);return we.input.indexOf(be,_e)!==-1},y=t,v={begin:"<>",end:"</>"},S=/<[A-Za-z0-9\\._:-]+\s*\/>/,x={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(we,_e)=>{const be=we[0].length+we.index,Se=we.input[be];if(Se==="<"||Se===","){_e.ignoreMatch();return}Se===">"&&(g(we,{after:be})||_e.ignoreMatch());let Ee;const Ie=we.input.substring(be);if(Ee=Ie.match(/^\s*=/)){_e.ignoreMatch();return}if((Ee=Ie.match(/^\s+extends\s+/))&&Ee.index===0){_e.ignoreMatch();return}}},w={$pattern:t,keyword:e,literal:n,built_in:c,"variable.language":a},C="[0-9](_?[0-9])*",k=`\\.(${C})`,A="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",R={className:"number",variants:[{begin:`(\\b(${A})((${k})|\\.)?|(${k}))[eE][+-]?(${C})\\b`},{begin:`\\b(${A})\\b((${k})\\b|\\.)?|(${k})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},P={className:"subst",begin:"\\$\\{",end:"\\}",keywords:w,contains:[]},N={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[d.BACKSLASH_ESCAPE,P],subLanguage:"xml"}},$={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[d.BACKSLASH_ESCAPE,P],subLanguage:"css"}},D={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[d.BACKSLASH_ESCAPE,P],subLanguage:"graphql"}},U={className:"string",begin:"`",end:"`",contains:[d.BACKSLASH_ESCAPE,P]},X={className:"comment",variants:[d.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:y+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),d.C_BLOCK_COMMENT_MODE,d.C_LINE_COMMENT_MODE]},ee=[d.APOS_STRING_MODE,d.QUOTE_STRING_MODE,N,$,D,U,{match:/\$\d+/},R];P.contains=ee.concat({begin:/\{/,end:/\}/,keywords:w,contains:["self"].concat(ee)});const le=[].concat(X,P.contains),re=le.concat([{begin:/(\s*)\(/,end:/\)/,keywords:w,contains:["self"].concat(le)}]),G={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:w,contains:re},oe={variants:[{match:[/class/,/\s+/,y,/\s+/,/extends/,/\s+/,m.concat(y,"(",m.concat(/\./,y),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,y],scope:{1:"keyword",3:"title.class"}}]},K={relevance:0,match:m.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...i,...r]}},me={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},fe={variants:[{match:[/function/,/\s+/,y,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[G],illegal:/%/},Te={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function ze(we){return m.concat("(?!",we.join("|"),")")}const tt={match:m.concat(/\b/,ze([...s,"super","import","await"].map(we=>`${we}\\s*\\(`)),y,m.lookahead(/\s*\(/)),className:"title.function",relevance:0},I={begin:m.concat(/\./,m.lookahead(m.concat(y,/(?![0-9A-Za-z$_(])/))),end:y,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},ie={match:[/get|set/,/\s+/,y,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},G]},B="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+d.UNDERSCORE_IDENT_RE+")\\s*=>",se={match:[/const|var|let/,/\s+/,y,/\s*/,/=\s*/,/(async\s*)?/,m.lookahead(B)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[G]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:w,exports:{PARAMS_CONTAINS:re,CLASS_REFERENCE:K},illegal:/#(?![$_A-Za-z])/,contains:[d.SHEBANG({label:"shebang",binary:"node",relevance:5}),me,d.APOS_STRING_MODE,d.QUOTE_STRING_MODE,N,$,D,U,X,{match:/\$\d+/},R,K,{scope:"attr",match:y+m.lookahead(":"),relevance:0},se,{begin:"("+d.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[X,d.REGEXP_MODE,{className:"function",begin:B,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:d.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:w,contains:re}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:v.begin,end:v.end},{match:S},{begin:x.begin,"on:begin":x.isTrulyOpeningTag,end:x.end}],subLanguage:"xml",contains:[{begin:x.begin,end:x.end,skip:!0,contains:["self"]}]}]},fe,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+d.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[G,d.inherit(d.TITLE_MODE,{begin:y,className:"title.function"})]},{match:/\.\.\./,relevance:0},I,{match:"\\$"+y,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[G]},tt,Te,oe,ie,{match:/\$[(.]/}]}}function h(d){const m=d.regex,g=u(d),y=t,v=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],S={begin:[/namespace/,/\s+/,d.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},x={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:v},contains:[g.exports.CLASS_REFERENCE]},w={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},C=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],k={$pattern:t,keyword:e.concat(C),literal:n,built_in:c.concat(v),"variable.language":a},A={className:"meta",begin:"@"+y},R=(D,U,V)=>{const X=D.contains.findIndex(ee=>ee.label===U);if(X===-1)throw new Error("can not find mode to replace");D.contains.splice(X,1,V)};Object.assign(g.keywords,k),g.exports.PARAMS_CONTAINS.push(A);const P=g.contains.find(D=>D.scope==="attr"),N=Object.assign({},P,{match:m.concat(y,m.lookahead(/\s*\?:/))});g.exports.PARAMS_CONTAINS.push([g.exports.CLASS_REFERENCE,P,N]),g.contains=g.contains.concat([A,S,x,N]),R(g,"shebang",d.SHEBANG()),R(g,"use_strict",w);const $=g.contains.find(D=>D.label==="func.def");return $.relevance=0,Object.assign(g,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),g}return bw=h,bw}var yw,RL;function Jce(){if(RL)return yw;RL=1;function t(e){const n=e.regex,i={className:"string",begin:/"(""|[^/n])"C\b/},r={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},s=/\d{1,2}\/\d{1,2}\/\d{4}/,a=/\d{4}-\d{1,2}-\d{1,2}/,c=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,u=/\d{1,2}(:\d{1,2}){1,2}/,h={className:"literal",variants:[{begin:n.concat(/# */,n.either(a,s),/ *#/)},{begin:n.concat(/# */,u,/ *#/)},{begin:n.concat(/# */,c,/ *#/)},{begin:n.concat(/# */,n.either(a,s),/ +/,n.either(c,u),/ *#/)}]},d={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},m={className:"label",begin:/^\w+:/},g=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),y=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[i,r,h,d,m,g,y,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[y]}]}}return yw=t,yw}var vw,PL;function eue(){if(PL)return vw;PL=1;function t(e){e.regex;const n=e.COMMENT(/\(;/,/;\)/);n.contains.push("self");const i=e.COMMENT(/;;/,/$/),r=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],s={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},a={className:"variable",begin:/\$[\w_]+/},c={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},u={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},h={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},d={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:r},contains:[i,n,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},a,c,s,e.QUOTE_STRING_MODE,h,d,u]}}return vw=t,vw}var Sw,ML;function tue(){if(ML)return Sw;ML=1;var t=bce();return t.registerLanguage("xml",yce()),t.registerLanguage("bash",vce()),t.registerLanguage("c",Sce()),t.registerLanguage("cpp",xce()),t.registerLanguage("csharp",wce()),t.registerLanguage("css",Ece()),t.registerLanguage("markdown",_ce()),t.registerLanguage("diff",Tce()),t.registerLanguage("ruby",kce()),t.registerLanguage("go",Cce()),t.registerLanguage("graphql",Ace()),t.registerLanguage("ini",Rce()),t.registerLanguage("java",Pce()),t.registerLanguage("javascript",Mce()),t.registerLanguage("json",Nce()),t.registerLanguage("kotlin",Qce()),t.registerLanguage("less",$ce()),t.registerLanguage("lua",Dce()),t.registerLanguage("makefile",Lce()),t.registerLanguage("perl",Ice()),t.registerLanguage("objectivec",jce()),t.registerLanguage("php",Bce()),t.registerLanguage("php-template",zce()),t.registerLanguage("plaintext",Xce()),t.registerLanguage("python",Uce()),t.registerLanguage("python-repl",Zce()),t.registerLanguage("r",Vce()),t.registerLanguage("rust",qce()),t.registerLanguage("scss",Yce()),t.registerLanguage("shell",Gce()),t.registerLanguage("sql",Fce()),t.registerLanguage("swift",Hce()),t.registerLanguage("yaml",Wce()),t.registerLanguage("typescript",Kce()),t.registerLanguage("vbnet",Jce()),t.registerLanguage("wasm",eue()),t.HighlightJS=t,t.default=t,Sw=t,Sw}var nue=tue();const NL=v2(nue);function fk(t){var r;const e=Ht.parse(t,{async:!1,gfm:!0}),n=Oce.sanitize(e,{RETURN_DOM_FRAGMENT:!0});for(const s of n.querySelectorAll("a"))s.target="_blank",s.rel="noopener noreferrer";for(const s of n.querySelectorAll("pre code")){const a=(r=[...s.classList].find(c=>c.startsWith("language-")))==null?void 0:r.slice(9);a&&NL.getLanguage(a)&&(s.innerHTML=NL.highlight(s.textContent??"",{language:a,ignoreIllegals:!0}).value,s.classList.add("hljs"))}const i=document.createElement("div");return i.append(n),i.innerHTML}const b3="(prefers-color-scheme: dark)";function iue(){const t=document.documentElement.dataset.theme;return t?t==="dark":window.matchMedia(b3).matches}function rue(t){const e=window.matchMedia(b3);e.addEventListener("change",t);const n=new MutationObserver(t);return n.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>{e.removeEventListener("change",t),n.disconnect()}}const sue=()=>T.useSyncExternalStore(rue,iue,()=>!1),oue=t=>ile({theme:t?"dark":"light",settings:{background:"var(--editor-bg)",foreground:"var(--gb-fg)",caret:"var(--ink)",selection:"color-mix(in srgb, var(--focus) 30%, transparent)",selectionMatch:"color-mix(in srgb, var(--focus) 18%, transparent)",lineHighlight:"transparent",fontFamily:"var(--mono)"},styles:[{tag:[L.keyword,L.list],color:"var(--gb-red)"},{tag:[L.string,L.regexp,L.link,L.url],color:"var(--gb-green)"},{tag:[L.heading],color:"var(--gb-yellow)",fontWeight:"700"},{tag:[L.number,L.bool,L.atom],color:"var(--gb-purple)"},{tag:[L.comment,L.quote,L.meta,L.processingInstruction],color:"var(--gb-gray)",fontStyle:"italic"},{tag:[L.typeName,L.className],color:"var(--gb-yellow)"},{tag:[L.variableName,L.propertyName,L.attributeName],color:"var(--gb-blue)"},{tag:[L.monospace,L.function(L.variableName)],color:"var(--gb-orange)"},{tag:[L.strong],fontWeight:"700"},{tag:[L.emphasis],fontStyle:"italic"},{tag:[L.labelName],color:"var(--gb-aqua)"}]});function y3({value:t,onChange:e,onSubmit:n,label:i,placeholder:r,height:s,resizable:a=!1,preview:c=!0,previewLabel:u="Preview of your answer",invalid:h=!1,autoFocus:d=!1}){const m=sue(),[g,y]=T.useState(!1),v=T.useId(),S=T.useMemo(()=>oue(m),[m]),x=T.useRef(n);T.useEffect(()=>{x.current=n},[n]);const w=T.useMemo(()=>[JU({base:dh,codeLanguages:nle}),Ae.lineWrapping,Ae.contentAttributes.of({"aria-label":i,"aria-multiline":"true",...h?{"aria-invalid":"true"}:{}}),Fo.highest(mu.of([{key:"Mod-Enter",run:()=>{var k;return(k=x.current)==null||k.call(x),!0}}]))],[i,h]),C=s?{"--md-height":s}:void 0;return _.jsxs("div",{className:"md-pane",style:C,children:[c&&_.jsxs("div",{className:"md-modes",role:"group","aria-label":"Answer view",children:[_.jsx("button",{type:"button",className:"btn md-mode","aria-pressed":!g,onClick:()=>y(!1),children:"Edit"}),_.jsx("button",{type:"button",className:"btn md-mode","aria-pressed":g,onClick:()=>y(!0),children:"Preview"})]}),g?t.trim()?_.jsx("div",{id:v,className:"md-preview",tabIndex:0,"aria-label":u,dangerouslySetInnerHTML:{__html:fk(t)}}):_.jsx("div",{id:v,className:"md-preview",tabIndex:0,"aria-label":u,children:_.jsx("p",{className:"md-empty",children:"Nothing to preview yet."})}):_.jsx("div",{className:`md${a?" is-resizable":""}${h?" is-invalid":""}`,children:_.jsx(MX,{value:t,onChange:e,theme:S,extensions:w,placeholder:r,autoFocus:d,height:"100%",basicSetup:{lineNumbers:!1,foldGutter:!1,highlightActiveLine:!1,highlightActiveLineGutter:!1}})})]})}const bO=t=>t>=1e6?`${(t/1e6).toFixed(2)}M`:t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t),aue=t=>t<60?`${t}s`:`${Math.floor(t/60)}m ${String(t%60).padStart(2,"0")}s`,Of=(t,e)=>{var n;return((n=t.find(i=>i.id===e))==null?void 0:n.label)??e},v3=()=>/Mac|iPhone|iPad/.test(navigator.platform||navigator.userAgent),Ny=()=>v3()?"⌘ Enter":"Ctrl Enter",Hb=()=>v3()?"Meta+Enter":"Control+Enter",S3=t=>t.key==="Enter"&&(t.metaKey||t.ctrlKey),QL=t=>`B${t.number}`,lue=new Set(["🅱️","⭕️"]);function x3(t){return t.flatMap(e=>[...e.questions.map(n=>({kind:"question",id:n.id,plan:e,question:n})),...e.interrupted?[{kind:"interrupt",id:`${e.ordinal}/interrupt`,plan:e,interrupted:e.interrupted}]:[]])}const $L=t=>t.agent??"the agent";function w3(t,e,n,i){var w;const[r,s]=Y_(e.id),a=du(n),[c,u]=T.useState(!1),[h,d]=T.useState(null),m={plan:t.ordinal,agent:e.agent},g=async(C,k)=>{const A=await a.send({...m,kind:"answer",payload:{question:QL(e),text:C}},k);return A&&A.status!=="refused"&&(s({settled:k,draft:""}),i==null||i(C)),A},y=async()=>{const C=r.draft.trim();return C?(await g(C,`Answer sent to ${$L(e)}.`),!0):(u(!0),!1)},v=C=>g(C,`Answered ${C.toLowerCase()} to ${$L(e)}.`),S=h??e.held;return{state:r,update:s,command:a,invalid:c,isHeld:S,answer:y,choose:v,toggleHold:async()=>{const C=!S,k=await a.send({...m,kind:C?"hold_blocked":"release_hold",payload:{question:QL(e)}},C?`${t.ordinal} held blocked. Its red pill in the status bar brings it back.`:`${t.ordinal} no longer held.`);return!k||k.status==="refused"?!1:(d(C),C)},setDraft:C=>{u(!1),s({draft:C})},yesNo:!!((w=e.answers)!=null&&w.length)&&!r.inWords}}const cue=500,uue=t=>t.charAt(0).toUpperCase()+t.slice(1);function fue({held:t,onClick:e,disabled:n}){return _.jsx("button",{type:"button",className:"btn btn-quiet","aria-pressed":t,disabled:n,onClick:e,title:t?"Let the agent's question go back to waiting normally":"Keep this agent blocked until you answer; nothing else unblocks it",children:t?"Release hold":"Hold blocked"})}function E3({answers:t,onChoose:e,onWords:n,disabled:i,children:r}){return _.jsxs("div",{className:"ask-actions ask-choices",children:[t.map(s=>_.jsx("button",{type:"button",className:"btn btn-choice",disabled:i,onClick:()=>e(s),children:uue(s)},s)),_.jsx("button",{type:"button",className:"btn btn-quiet btn-words",onClick:n,children:"Answer in words"}),r]})}function _3({id:t,value:e,onChange:n,onSend:i,invalid:r,label:s="Your answer"}){const a=c=>{S3(c)&&(c.preventDefault(),i())};return _.jsxs(_.Fragment,{children:[_.jsx("label",{className:"sr-only",htmlFor:t,children:s}),_.jsx("textarea",{id:t,value:e,onChange:c=>n(c.target.value),onKeyDown:a,"aria-invalid":r||void 0,placeholder:r?"Type an answer first":`Your answer. ${Ny()} sends it.`})]})}function T3({plan:t,agent:e,held:n}){return _.jsxs("p",{className:"ask-who",children:[t.ordinal," — ",e??"agent",n&&_.jsxs(_.Fragment,{children:[" ",_.jsx("span",{className:"ask-held",children:"held blocked"})]})]})}function hue(t){const[e,n]=T.useState(!1),[i,r]=T.useState(!1),s=T.useRef(t);return T.useEffect(()=>{s.current=t},[t]),T.useEffect(()=>{if(!e)return;const a=setTimeout(()=>{var c;r(!0),(c=s.current)==null||c.call(s)},cue);return()=>clearTimeout(a)},[e]),{leaving:e,gone:i,leave:()=>n(!0)}}function due({plan:t,question:e,variant:n,onCommand:i,onLeft:r}){var x;const s=w3(t,e,i),{leaving:a,gone:c,leave:u}=hue(r),[h,d]=T.useState(!1),m=s.command.pending,g=async()=>{await s.toggleHold()&&(d(!0),u())};if(c)return null;if(s.state.settled||h){const w=h?`Held blocked. ${t.ordinal} stays red in the status bar; click it to answer.`:s.state.settled;return _.jsx("div",{className:`ask is-done${a?" is-leaving":""}`,"data-ask":e.id,children:_.jsx("p",{className:"ask-done",children:w})})}const y=_.jsx(fue,{held:s.isHeld,onClick:g,disabled:m}),v=_.jsx("div",{className:"ask-text",dangerouslySetInnerHTML:{__html:fk(e.body)}});let S;return s.yesNo?S=_.jsx(E3,{answers:e.answers??[],onChoose:s.choose,onWords:()=>s.update({inWords:!0}),disabled:m,children:y}):n==="widget"?S=_.jsxs("div",{className:"unblock-answer",children:[_.jsx(y3,{value:s.state.draft,onChange:s.setDraft,onSubmit:s.answer,label:"Your answer",invalid:s.invalid,placeholder:s.invalid?"Type an answer first":`Your answer, in Markdown. ${Ny()} sends it.`,height:"180px",resizable:!0,autoFocus:!e.held}),_.jsxs("div",{className:"unblock-buttons",children:[_.jsx("button",{type:"button",className:"btn btn-primary","aria-keyshortcuts":Hb(),disabled:m,onClick:s.answer,children:"Send answer"}),y]})]}):S=_.jsxs(_.Fragment,{children:[_.jsx(_3,{id:`a-${e.id}`,value:s.state.draft,onChange:s.setDraft,onSend:s.answer,invalid:s.invalid}),_.jsxs("div",{className:"ask-actions",children:[_.jsx("button",{type:"button",className:"btn btn-primary","aria-keyshortcuts":Hb(),disabled:m,onClick:s.answer,children:"Send answer"}),y]})]}),_.jsxs("div",{className:`ask${s.isHeld?" is-held":""}`,"data-ask":e.id,children:[_.jsx(T3,{plan:t,agent:e.agent,held:s.isHeld}),v,S,_.jsx(pu,{outcome:((x=s.command.outcome)==null?void 0:x.tone)==="refused"?s.command.outcome:null,announced:s.command.announced})]})}const pue=t=>{const e=Math.round((Date.now()-Date.parse(t))/6e4);return new Intl.RelativeTimeFormat("en",{numeric:"auto"}).format(-Math.max(0,e),"minute")};function mue({ask:t,onCommand:e,variant:n}){var S;const{plan:i,interrupted:r}=t,[s,a]=Y_(t.id),c=du(e),[u,h]=T.useState(!1),d=T.useRef(null),m=T.useRef(null);T.useEffect(()=>{var x;u&&((x=d.current)==null||x.focus())},[u]),T.useEffect(()=>{var x;n==="widget"&&((x=m.current)==null||x.focus())},[n]);const g=i.cars.map(x=>x.agent).filter(x=>x!==r.agent),y=async(x,w)=>{const C=await c.send({kind:x,plan:i.ordinal,agent:x==="resume"?r.agent:null,payload:{}},w);C&&C.status!=="refused"&&a({settled:w})};if(s.settled)return _.jsx("div",{className:"ask is-done","data-ask":t.id,children:_.jsx("p",{className:"ask-done",children:s.settled})});const v=c.pending;return _.jsxs("div",{className:"ask","data-ask":t.id,children:[_.jsx(T3,{plan:i,agent:r.agent}),_.jsxs("p",{className:"ask-text",children:["You interrupted ",r.agent," ",pue(r.at),".",r.note?` Its resume note says: ${r.note}`:""]}),u?_.jsxs("div",{className:"ask-confirm",role:"group","aria-label":`Discard work on ${i.ordinal}?`,children:[_.jsxs("p",{children:["Discard the work on ",i.ordinal,"?"," ",g.length?`It also stops ${g.join(" and ")}, resets the plan's worktree and sends the plan back one state.`:"It resets the plan's worktree and sends the plan back one state."]}),_.jsxs("div",{className:"ask-actions",children:[_.jsx("button",{type:"button",className:"btn btn-quiet",ref:d,onClick:()=>h(!1),children:"Cancel"}),_.jsx("button",{type:"button",className:"btn btn-alarm",disabled:v,onClick:()=>y("discard",`Discarded ${r.agent}'s work. It starts again.`),children:"Discard work"})]})]}):_.jsxs("div",{className:"ask-actions",children:[_.jsx("button",{type:"button",className:"btn btn-primary",ref:m,disabled:v,onClick:()=>y("resume",`Kept ${r.agent}'s work. It resumes from its note.`),children:"Keep work and resume"}),_.jsx("button",{type:"button",className:"btn btn-alarm",onClick:()=>h(!0),children:"Discard work"})]}),_.jsx(pu,{outcome:((S=c.outcome)==null?void 0:S.tone)==="refused"?c.outcome:null,announced:c.announced})]})}function PE({ask:t,variant:e,onCommand:n,onLeft:i}){return t.kind==="question"?_.jsx(due,{plan:t.plan,question:t.question,variant:e,onCommand:n,onLeft:i}):_.jsx(mue,{ask:t,onCommand:n,variant:e})}function gue({plans:t,onCommand:e}){const n=wB(),i=new Set(n.map(c=>c.id)),r=x3(t),s=r.filter(c=>!i.has(c.id)&&!(c.kind==="question"&&c.question.held)),a=n.map(c=>r.find(u=>u.id===c.id)??c);return _.jsxs("aside",{className:"rail","aria-labelledby":"rail-title",children:[_.jsxs("h2",{id:"rail-title",children:["Needs you ",s.length?_.jsxs("span",{children:["(",s.length,")"]}):null]}),_.jsx("p",{className:"rail-sub",children:"Questions and interrupted agents wait here until you act."}),_.jsx("div",{className:"asks",tabIndex:0,"aria-label":"Requests waiting on you",children:s.length+a.length===0?_.jsx("p",{className:"empty",children:"Nothing waiting on you. Agents will ask here."}):_.jsxs(_.Fragment,{children:[s.map(c=>_.jsx(PE,{ask:c,variant:"rail",onCommand:e},c.id)),a.map(c=>"kind"in c?_.jsx(PE,{ask:c,variant:"rail",onCommand:e},c.id):_.jsx("div",{className:"ask is-done","data-ask":c.id,children:_.jsx("p",{className:"ask-done",children:c.note})},c.id))]})})]})}function Oue({plan:t,onCommand:e,onClose:n}){const i=wB(),r=t?x3([t]).find(a=>!i.some(c=>c.id===a.id)):void 0;if(T.useEffect(()=>{t&&!r&&n()},[t,r,n]),!t||!r)return null;const s=a=>{a.key==="Escape"&&(a.preventDefault(),n())};return _.jsxs("section",{className:"unblock",role:"region","aria-labelledby":"unblock-title",onKeyDown:s,children:[_.jsxs("div",{className:"unblock-head",children:[_.jsxs("h2",{id:"unblock-title",children:["Unblock ",t.ordinal,": ",t.title]}),_.jsx("button",{type:"button",className:"btn btn-quiet",onClick:n,children:"Hide"})]}),_.jsx("div",{className:"unblock-body",children:_.jsx(PE,{ask:r,variant:"widget",onCommand:e,onLeft:n},r.id)})]})}var bue=Object.defineProperty,yue=(t,e)=>bue(t,"name",{value:e,configurable:!0});function ME(t,[e,n]){return Math.min(n,Math.max(e,t))}yue(ME,"clamp");var vue=Object.defineProperty,pi=(t,e)=>vue(t,"name",{value:e,configurable:!0}),NE="dismissableLayer.update",Sue="dismissableLayer.pointerDownOutside",xue="dismissableLayer.focusOutside",DL,k3=T.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),hk=T.forwardRef(pi(function(e,n){const{disableOutsidePointerEvents:i=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:c,onInteractOutside:u,onDismiss:h,...d}=e,m=T.useContext(k3),[g,y]=T.useState(null),v=(g==null?void 0:g.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,S]=T.useState({}),x=nn(n,y),w=Array.from(m.layers),[C]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),k=C?w.indexOf(C):-1,A=g?w.indexOf(g):-1,R=m.layersWithOutsidePointerEventsDisabled.size>0,P=A>=k,N=T.useRef(!1),$=A3(X=>{a==null||a(X),u==null||u(X),X.defaultPrevented||h==null||h()},{ownerDocument:v,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:N,dismissableSurfaces:m.dismissableSurfaces,shouldHandlePointerDownOutside:T.useCallback(X=>{if(!(X instanceof Node))return!1;const ee=[...m.branches].some(le=>le.contains(X));return P&&!ee},[m.branches,P])}),D=R3(X=>{if(r&&N.current)return;const ee=X.target;[...m.branches].some(re=>re.contains(ee))||(c==null||c(X),u==null||u(X),X.defaultPrevented||h==null||h())},v),U=g?A===w.length-1:!1,V=ws(X=>{X.key==="Escape"&&(s==null||s(X),!X.defaultPrevented&&h&&(X.preventDefault(),h()))});return T.useEffect(()=>{if(U)return v.addEventListener("keydown",V,{capture:!0}),()=>v.removeEventListener("keydown",V,{capture:!0})},[v,U,V]),T.useEffect(()=>{if(g)return i&&(m.layersWithOutsidePointerEventsDisabled.size===0&&(DL=v.body.style.pointerEvents,v.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(g)),m.layers.add(g),QE(),()=>{i&&(m.layersWithOutsidePointerEventsDisabled.delete(g),m.layersWithOutsidePointerEventsDisabled.size===0&&(v.body.style.pointerEvents=DL))}},[g,v,i,m]),T.useEffect(()=>()=>{g&&(m.layers.delete(g),m.layersWithOutsidePointerEventsDisabled.delete(g),QE())},[g,m]),T.useEffect(()=>{const X=pi(()=>S({}),"handleUpdate");return document.addEventListener(NE,X),()=>document.removeEventListener(NE,X)},[]),_.jsx(cn.div,{...d,ref:x,style:{pointerEvents:R?P?"auto":"none":void 0,...e.style},onFocusCapture:at(e.onFocusCapture,D.onFocusCapture),onBlurCapture:at(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:at(e.onPointerDownCapture,$.onPointerDownCapture)})},"DismissableLayer"));function C3(){const t=T.useContext(k3),[e,n]=T.useState(null);return T.useEffect(()=>{if(e)return t.dismissableSurfaces.add(e),()=>{t.dismissableSurfaces.delete(e)}},[e,t.dismissableSurfaces]),n}pi(C3,"useDismissableLayerSurface");var wue=pi(()=>!0,"IS_TRUE");function A3(t,e){const{ownerDocument:n=globalThis==null?void 0:globalThis.document,deferPointerDownOutside:i=!1,isDeferredPointerDownOutsideRef:r,dismissableSurfaces:s,shouldHandlePointerDownOutside:a=wue}=e,c=ws(t),u=T.useRef(!1),h=T.useRef(!1),d=T.useRef(new Map),m=T.useRef(()=>{});return T.useEffect(()=>{function g(){h.current=!1,r.current=!1,d.current.clear()}pi(g,"resetOutsideInteraction");function y(){return Array.from(d.current.values()).some(Boolean)}pi(y,"isOutsideInteractionIntercepted");function v(k){if(!h.current)return;const A=k.target;A instanceof Node&&[...s].some(P=>P.contains(A))||d.current.set(k.type,!0),k.type==="click"&&window.setTimeout(()=>{h.current&&m.current()},0)}pi(v,"handleInteractionCapture");function S(k){h.current&&d.current.set(k.type,!1)}pi(S,"handleInteractionBubble");const x=pi(k=>{if(k.target&&!u.current){let A=function(){n.removeEventListener("click",m.current);const P=y();g(),P||dk(Sue,c,R,{discrete:!0})};if(pi(A,"handleAndDispatchPointerDownOutsideEvent"),!a(k.target)){n.removeEventListener("click",m.current),g(),u.current=!1;return}const R={originalEvent:k};h.current=!0,r.current=i&&k.button===0,d.current.clear(),!i||k.button!==0?A():(n.removeEventListener("click",m.current),m.current=A,n.addEventListener("click",m.current,{once:!0}))}else n.removeEventListener("click",m.current),g();u.current=!1},"handlePointerDown"),w=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const k of w)n.addEventListener(k,v,!0),n.addEventListener(k,S);const C=window.setTimeout(()=>{n.addEventListener("pointerdown",x)},0);return()=>{window.clearTimeout(C),n.removeEventListener("pointerdown",x),n.removeEventListener("click",m.current);for(const k of w)n.removeEventListener(k,v,!0),n.removeEventListener(k,S)}},[n,c,i,r,s,a]),{onPointerDownCapture:pi(()=>u.current=!0,"onPointerDownCapture")}}pi(A3,"usePointerDownOutside");function R3(t,e=globalThis==null?void 0:globalThis.document){const n=ws(t),i=T.useRef(!1);return T.useEffect(()=>{const r=pi(s=>{s.target&&!i.current&&dk(xue,n,{originalEvent:s},{discrete:!1})},"handleFocus");return e.addEventListener("focusin",r),()=>e.removeEventListener("focusin",r)},[e,n]),{onFocusCapture:pi(()=>i.current=!0,"onFocusCapture"),onBlurCapture:pi(()=>i.current=!1,"onBlurCapture")}}pi(R3,"useFocusOutside");function QE(){const t=new CustomEvent(NE);document.dispatchEvent(t)}pi(QE,"dispatchUpdate");function dk(t,e,n,{discrete:i}){const r=n.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&r.addEventListener(t,e,{once:!0}),i?r_(r,s):r.dispatchEvent(s)}pi(dk,"handleAndDispatchCustomEvent");var Eue=Object.defineProperty,pk=(t,e)=>Eue(t,"name",{value:e,configurable:!0}),yO=0,xo=null;function _ue(t){return um(),t.children}pk(_ue,"FocusGuards");function um(){T.useEffect(()=>{xo||(xo={start:$E(),end:$E()});const{start:t,end:e}=xo;return document.body.firstElementChild!==t&&document.body.insertAdjacentElement("afterbegin",t),document.body.lastElementChild!==e&&document.body.insertAdjacentElement("beforeend",e),yO++,()=>{yO===1&&(xo==null||xo.start.remove(),xo==null||xo.end.remove(),xo=null),yO=Math.max(0,yO-1)}},[])}pk(um,"useFocusGuards");function $E(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}pk($E,"createFocusGuard");var Tue=Object.defineProperty,Wn=(t,e)=>Tue(t,"name",{value:e,configurable:!0}),xw="focusScope.autoFocusOnMount",ww="focusScope.autoFocusOnUnmount",LL={bubbles:!1,cancelable:!0},mk=T.forwardRef(Wn(function(e,n){const{loop:i=!1,trapped:r=!1,branches:s,onMountAutoFocus:a,onUnmountAutoFocus:c,...u}=e,[h,d]=T.useState(null),m=ws(a),g=ws(c),y=T.useRef(null),v=nn(n,d),S=T.useRef(s);T.useEffect(()=>{S.current=s});const x=T.useCallback(k=>{var A;return k?h!=null&&h.contains(k)?!0:!!((A=S.current)!=null&&A.some(R=>R.contains(k))):!1},[h]),w=T.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;T.useEffect(()=>{if(r){let k=function(N){if(w.paused||!h)return;const $=N.target;x($)?y.current=$:ya(y.current,{select:!0})},A=function(N){if(w.paused||!h)return;const $=N.relatedTarget;$!==null&&(x($)||ya(y.current,{select:!0}))},R=function(N){if(document.activeElement===document.body)for(const D of N)D.removedNodes.length>0&&ya(h)};Wn(k,"handleFocusIn"),Wn(A,"handleFocusOut"),Wn(R,"handleMutations"),document.addEventListener("focusin",k),document.addEventListener("focusout",A);const P=new MutationObserver(R);return h&&P.observe(h,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",A),P.disconnect()}}},[r,h,w.paused,x]),T.useEffect(()=>{if(h){IL.add(w);const k=document.activeElement;if(!h.contains(k)){const R=new CustomEvent(xw,LL);h.addEventListener(xw,m),h.dispatchEvent(R),R.defaultPrevented||(N3(I3(bk(h)),{select:!0}),document.activeElement===k&&ya(h))}return()=>{h.removeEventListener(xw,m);const R=h.ownerDocument,P=CustomEvent;setTimeout(()=>{const N=new P(ww,LL);h.addEventListener(ww,g),h.dispatchEvent(N),N.defaultPrevented||ya(k??R.body,{select:!0}),h.removeEventListener(ww,g),IL.remove(w)},0)}}},[h,m,g,w]);const C=T.useCallback(k=>{if(!i&&!r||w.paused)return;const A=k.key==="Tab"&&!k.altKey&&!k.ctrlKey&&!k.metaKey,R=document.activeElement;if(A&&R){const P=k.currentTarget,[N,$]=Q3(P);N&&$?!k.shiftKey&&R===$?(k.preventDefault(),i&&ya(N,{select:!0})):k.shiftKey&&R===N&&(k.preventDefault(),i&&ya($,{select:!0})):R===P&&k.preventDefault()}},[i,r,w.paused]);return _.jsx(cn.div,{tabIndex:-1,...u,ref:v,onKeyDown:C})},"FocusScope")),P3=T.createContext(null);function gk({registry:t,children:e}){return t?_.jsx(P3.Provider,{value:t,children:e}):e}Wn(gk,"FocusScopeBranchProvider");function Ok(){const[t,e]=T.useState([]),n=T.useMemo(()=>({add:Wn(i=>e(r=>r.includes(i)?r:[...r,i]),"add"),remove:Wn(i=>e(r=>r.filter(s=>s!==i)),"remove")}),[]);return{nodes:t,registry:n}}Wn(Ok,"useFocusScopeBranchRegistry");function M3(t){const e=T.useContext(P3);T.useEffect(()=>{if(!(!t||!e))return e.add(t),()=>e.remove(t)},[t,e])}Wn(M3,"useFocusScopeBranch");function N3(t,{select:e=!1}={}){const n=document.activeElement;for(const i of t)if(ya(i,{select:e}),document.activeElement!==n)return}Wn(N3,"focusFirst");function Q3(t){const e=bk(t),n=DE(e,t),i=DE(e.reverse(),t);return[n,i]}Wn(Q3,"getTabbableEdges");function bk(t){const e=[],i=t.ownerDocument.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:Wn(r=>{const s=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||s?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;i.nextNode();)e.push(i.currentNode);return e}Wn(bk,"getTabbableCandidates");function DE(t,e){const n=typeof e.checkVisibility=="function"&&e.checkVisibility({checkVisibilityCSS:!0});for(const i of t)if(!(n?!i.checkVisibility({checkVisibilityCSS:!0}):$3(i,{upTo:e})))return i}Wn(DE,"findVisible");function $3(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}Wn($3,"isHidden");function D3(t){return t.tagName==="INPUT"&&typeof t.select=="function"}Wn(D3,"isSelectableInput");function ya(t,{select:e=!1}={}){if(t&&t.focus){const i=(t.ownerDocument??document).activeElement;t.focus({preventScroll:!0}),t!==i&&D3(t)&&e&&t.select()}}Wn(ya,"focus");var IL=L3();function L3(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=LE(t,e),t.unshift(e)},remove(e){var n;t=LE(t,e),(n=t[0])==null||n.resume()}}}Wn(L3,"createFocusScopesStack");function LE(t,e){const n=[...t],i=n.indexOf(e);return i!==-1&&n.splice(i,1),n}Wn(LE,"arrayRemove");function I3(t){return t.filter(e=>e.tagName!=="A")}Wn(I3,"removeLinks");const kue=["top","right","bottom","left"],Yl=Math.min,Aa=Math.max,Wb=Math.round,vO=Math.floor,Ra=t=>({x:t,y:t}),Cue={left:"right",right:"left",bottom:"top",top:"bottom"};function j3(t,e,n){return Aa(t,Yl(e,n))}function $a(t,e){return typeof t=="function"?t(e):t}function Gl(t){return t.split("-")[0]}function Ph(t){return t.split("-")[1]}function yk(t){return t==="x"?"y":"x"}function vk(t){return t==="y"?"height":"width"}function Io(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function Sk(t){return yk(Io(t))}function Aue(t,e,n){n===void 0&&(n=!1);const i=Ph(t),r=Sk(t),s=vk(r);let a=r==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(a=Kb(a)),[a,Kb(a)]}function Rue(t){const e=Kb(t);return[IE(t),e,IE(e)]}function IE(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const jL=["left","right"],BL=["right","left"],Pue=["top","bottom"],Mue=["bottom","top"];function Nue(t,e,n){switch(t){case"top":case"bottom":return n?e?BL:jL:e?jL:BL;case"left":case"right":return e?Pue:Mue;default:return[]}}function Que(t,e,n,i){const r=Ph(t);let s=Nue(Gl(t),n==="start",i);return r&&(s=s.map(a=>a+"-"+r),e&&(s=s.concat(s.map(IE)))),s}function Kb(t){const e=Gl(t);return Cue[e]+t.slice(e.length)}function $ue(t){var e,n,i,r;return{top:(e=t.top)!=null?e:0,right:(n=t.right)!=null?n:0,bottom:(i=t.bottom)!=null?i:0,left:(r=t.left)!=null?r:0}}function B3(t){return typeof t!="number"?$ue(t):{top:t,right:t,bottom:t,left:t}}function Jb(t){const{x:e,y:n,width:i,height:r}=t;return{width:i,height:r,top:n,left:e,right:e+i,bottom:n+r,x:e,y:n}}function zL(t,e,n){let{reference:i,floating:r}=t;const s=Io(e),a=Sk(e),c=vk(a),u=Gl(e),h=s==="y",d=i.x+i.width/2-r.width/2,m=i.y+i.height/2-r.height/2,g=i[c]/2-r[c]/2;let y;switch(u){case"top":y={x:d,y:i.y-r.height};break;case"bottom":y={x:d,y:i.y+i.height};break;case"right":y={x:i.x+i.width,y:m};break;case"left":y={x:i.x-r.width,y:m};break;default:y={x:i.x,y:i.y}}const v=Ph(e);return v&&(y[a]+=g*(v==="end"?1:-1)*(n&&h?-1:1)),y}async function Due(t,e){var n;e===void 0&&(e={});const{x:i,y:r,platform:s,rects:a,elements:c,strategy:u}=t,{boundary:h="clippingAncestors",rootBoundary:d="viewport",elementContext:m="floating",altBoundary:g=!1,padding:y=0}=$a(e,t),v=B3(y),x=c[g?m==="floating"?"reference":"floating":m],w=Jb(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(x)))==null||n?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:h,rootBoundary:d,strategy:u})),C=m==="floating"?{x:i,y:r,width:a.floating.width,height:a.floating.height}:a.reference,k=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),A=await(s.isElement==null?void 0:s.isElement(k))&&await(s.getScale==null?void 0:s.getScale(k))||{x:1,y:1},R=Jb(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:C,offsetParent:k,strategy:u}):C);return{top:(w.top-R.top+v.top)/A.y,bottom:(R.bottom-w.bottom+v.bottom)/A.y,left:(w.left-R.left+v.left)/A.x,right:(R.right-w.right+v.right)/A.x}}const Lue=50,Iue=async(t,e,n)=>{const{placement:i="bottom",strategy:r="absolute",middleware:s=[],platform:a}=n,c=a.detectOverflow?a:{...a,detectOverflow:Due},u=await(a.isRTL==null?void 0:a.isRTL(e));let h=await a.getElementRects({reference:t,floating:e,strategy:r}),{x:d,y:m}=zL(h,i,u),g=i,y=0;const v={};for(let S=0;S<s.length;S++){const x=s[S];if(!x)continue;const{name:w,fn:C}=x,{x:k,y:A,data:R,reset:P}=await C({x:d,y:m,initialPlacement:i,placement:g,strategy:r,middlewareData:v,rects:h,platform:c,elements:{reference:t,floating:e}});d=k??d,m=A??m,v[w]={...v[w],...R},P&&y<Lue&&(y++,typeof P=="object"&&(P.placement&&(g=P.placement),P.rects&&(h=P.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:r}):P.rects),{x:d,y:m}=zL(h,g,u)),S=-1)}return{x:d,y:m,placement:g,strategy:r,middlewareData:v}},jue=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:i,placement:r,rects:s,platform:a,elements:c,middlewareData:u}=e,{element:h,padding:d=0}=$a(t,e)||{};if(h==null)return{};const m=B3(d),g={x:n,y:i},y=Sk(r),v=vk(y),S=await a.getDimensions(h),x=y==="y",w=x?"top":"left",C=x?"bottom":"right",k=x?"clientHeight":"clientWidth",A=s.reference[v]+s.reference[y]-g[y]-s.floating[v],R=g[y]-s.reference[y],P=await(a.getOffsetParent==null?void 0:a.getOffsetParent(h));let N=P?P[k]:0;(!N||!await(a.isElement==null?void 0:a.isElement(P)))&&(N=c.floating[k]||s.floating[v]);const $=A/2-R/2,D=N/2-S[v]/2-1,U=Yl(m[w],D),V=Yl(m[C],D),X=N-S[v]-V,ee=N/2-S[v]/2+$,le=j3(U,ee,X),re=!u.arrow&&Ph(r)!=null&&ee!==le&&s.reference[v]/2-(ee<U?U:V)-S[v]/2<0,G=re?ee<U?ee-U:ee-X:0;return{[y]:g[y]+G,data:{[y]:le,centerOffset:ee-le-G,...re&&{alignmentOffset:G}},reset:re}}}),Bue=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,i;const{placement:r,middlewareData:s,rects:a,initialPlacement:c,platform:u,elements:h}=e,{mainAxis:d=!0,crossAxis:m=!0,fallbackPlacements:g,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:S=!0,...x}=$a(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const w=Gl(r),C=Io(c),k=Gl(c)===c,A=await(u.isRTL==null?void 0:u.isRTL(h.floating)),R=g||(k||!S?[Kb(c)]:Rue(c)),P=v!=="none";!g&&P&&R.push(...Que(c,S,v,A));const N=[c,...R],$=await u.detectOverflow(e,x),D=[];let U=((i=s.flip)==null?void 0:i.overflows)||[];if(d&&D.push($[w]),m){const le=Aue(r,a,A);D.push($[le[0]],$[le[1]])}if(U=[...U,{placement:r,overflows:D}],!D.every(le=>le<=0)){var V,X;const le=(((V=s.flip)==null?void 0:V.index)||0)+1,re=N[le];if(re&&(!(m==="alignment"?C!==Io(re):!1)||U.every(K=>Io(K.placement)===C?K.overflows[0]>0:!0)))return{data:{index:le,overflows:U},reset:{placement:re}};let G=(X=U.filter(oe=>oe.overflows[0]<=0).sort((oe,K)=>oe.overflows[1]-K.overflows[1])[0])==null?void 0:X.placement;if(!G)switch(y){case"bestFit":{var ee;const oe=(ee=U.filter(K=>{if(P){const me=Io(K.placement);return me===C||me==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(me=>me>0).reduce((me,fe)=>me+fe,0)]).sort((K,me)=>K[1]-me[1])[0])==null?void 0:ee[0];oe&&(G=oe);break}case"initialPlacement":G=c;break}if(r!==G)return{reset:{placement:G}}}return{}}}};function XL(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function UL(t){return kue.some(e=>t[e]>=0)}const zue=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:i}=e,{strategy:r="referenceHidden",...s}=$a(t,e);switch(r){case"referenceHidden":{const a=await i.detectOverflow(e,{...s,elementContext:"reference"}),c=XL(a,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:UL(c)}}}case"escaped":{const a=await i.detectOverflow(e,{...s,altBoundary:!0}),c=XL(a,n.floating);return{data:{escapedOffsets:c,escaped:UL(c)}}}default:return{}}}}},z3=new Set(["left","top"]);async function Xue(t,e){const{placement:n,platform:i,elements:r}=t,s=await(i.isRTL==null?void 0:i.isRTL(r.floating)),a=Gl(n),c=Ph(n),u=Io(n)==="y",h=z3.has(a)?-1:1,d=s&&u?-1:1,m=$a(e,t);let{mainAxis:g,crossAxis:y,alignmentAxis:v}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof v=="number"&&(y=c==="end"?v*-1:v),u?{x:y*d,y:g*h}:{x:g*h,y:y*d}}const Uue=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,i;const{x:r,y:s,placement:a,middlewareData:c}=e,u=await Xue(e,t);return a===((n=c.offset)==null?void 0:n.placement)&&(i=c.arrow)!=null&&i.alignmentOffset?{}:{x:r+u.x,y:s+u.y,data:{...u,placement:a}}}}},Zue=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:i,placement:r,platform:s}=e,{mainAxis:a=!0,crossAxis:c=!1,limiter:u={fn:C=>{let{x:k,y:A}=C;return{x:k,y:A}}},...h}=$a(t,e),d={x:n,y:i},m=await s.detectOverflow(e,h),g=Io(r),y=yk(g);let v=d[y],S=d[g];const x=(C,k)=>j3(k+m[C==="y"?"top":"left"],k,k-m[C==="y"?"bottom":"right"]);a&&(v=x(y,v)),c&&(S=x(g,S));const w=u.fn({...e,[y]:v,[g]:S});return{...w,data:{x:w.x-n,y:w.y-i,enabled:{[y]:a,[g]:c}}}}}},Vue=function(t){return t===void 0&&(t={}),{options:t,fn(e){var n,i;const{x:r,y:s,placement:a,rects:c,middlewareData:u}=e,{offset:h=0,mainAxis:d=!0,crossAxis:m=!0}=$a(t,e),g={x:r,y:s},y=Io(a),v=yk(y);let S=g[v],x=g[y];const w=$a(h,e),C=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:(n=w.mainAxis)!=null?n:0,crossAxis:(i=w.crossAxis)!=null?i:0};if(d){const R=v==="y"?"height":"width",P=c.reference[v]-c.floating[R]+C.mainAxis,N=c.reference[v]+c.reference[R]-C.mainAxis;S<P?S=P:S>N&&(S=N)}if(m){var k,A;const R=v==="y"?"width":"height",P=z3.has(Gl(a)),N=c.reference[y]-c.floating[R]+(P&&((k=u.offset)==null?void 0:k[y])||0)+(P?0:C.crossAxis),$=c.reference[y]+c.reference[R]+(P?0:((A=u.offset)==null?void 0:A[y])||0)-(P?C.crossAxis:0);x<N?x=N:x>$&&(x=$)}return{[v]:S,[y]:x}}}},que=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:i,platform:r,elements:s}=e,{apply:a=()=>{},...c}=$a(t,e),u=await r.detectOverflow(e,c),h=Gl(n),d=Ph(n),m=Io(n)==="y",{width:g,height:y}=i.floating;let v,S;h==="top"||h==="bottom"?(v=h,S=d===(await(r.isRTL==null?void 0:r.isRTL(s.floating))?"start":"end")?"left":"right"):(S=h,v=d==="end"?"top":"bottom");const x=y-u.top-u.bottom,w=g-u.left-u.right,C=Yl(y-u[v],x),k=Yl(g-u[S],w),A=e.middlewareData.shift,R=!A;let P=C,N=k;A!=null&&A.enabled.x&&(N=w),A!=null&&A.enabled.y&&(P=x),R&&!d&&(m?N=g-2*Aa(u.left,u.right):P=y-2*Aa(u.top,u.bottom)),await a({...e,availableWidth:N,availableHeight:P});const $=await r.getDimensions(s.floating);return g!==$.width||y!==$.height?{reset:{rects:!0}}:{}}}};function Qy(){return typeof window<"u"}function Mh(t){return X3(t)?(t.nodeName||"").toLowerCase():"#document"}function Tr(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Da(t){var e;return(e=(X3(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function X3(t){return Qy()?t instanceof Node||t instanceof Tr(t).Node:!1}function qo(t){return Qy()?t instanceof Element||t instanceof Tr(t).Element:!1}function Wl(t){return Qy()?t instanceof HTMLElement||t instanceof Tr(t).HTMLElement:!1}function ZL(t){return!Qy()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Tr(t).ShadowRoot}function $y(t){const{overflow:e,overflowX:n,overflowY:i,display:r}=Yo(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&r!=="inline"&&r!=="contents"}function Yue(t){return/^(table|td|th)$/.test(Mh(t))}function Dy(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const Gue=/transform|translate|scale|rotate|perspective|filter/,Fue=/paint|layout|strict|content/,wc=t=>!!t&&t!=="none";let Ew;function xk(t){const e=qo(t)?Yo(t):t;return wc(e.transform)||wc(e.translate)||wc(e.scale)||wc(e.rotate)||wc(e.perspective)||!wk()&&(wc(e.backdropFilter)||wc(e.filter))||Gue.test(e.willChange||"")||Fue.test(e.contain||"")}function Hue(t){let e=au(t);for(;Wl(e)&&!jp(e);){if(xk(e))return e;if(Dy(e))return null;e=au(e)}return null}function wk(){return Ew==null&&(Ew=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Ew}function jp(t){return/^(html|body|#document)$/.test(Mh(t))}function Yo(t){return Tr(t).getComputedStyle(t)}function Ly(t){return qo(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function au(t){if(Mh(t)==="html")return t;const e=t.assignedSlot||t.parentNode||ZL(t)&&t.host||Da(t);return ZL(e)?e.host:e}function U3(t){const e=au(t);return jp(e)?(t.ownerDocument||t).body:Wl(e)&&$y(e)?e:U3(e)}function Bp(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=U3(t),s=r===((i=t.ownerDocument)==null?void 0:i.body),a=Tr(r);if(s){const c=jE(a);return e.concat(a,a.visualViewport||[],$y(r)?r:[],c&&n?Bp(c):[])}else return e.concat(r,Bp(r,[],n))}function jE(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Z3(t){const e=Yo(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const r=Wl(t),s=r?t.offsetWidth:n,a=r?t.offsetHeight:i,c=Wb(n)!==s||Wb(i)!==a;return c&&(n=s,i=a),{width:n,height:i,$:c}}function Ek(t){return qo(t)?t:t.contextElement}function Qf(t){const e=Ek(t);if(!Wl(e))return Ra(1);const n=e.getBoundingClientRect(),{width:i,height:r,$:s}=Z3(e);let a=(s?Wb(n.width):n.width)/i,c=(s?Wb(n.height):n.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!c||!Number.isFinite(c))&&(c=1),{x:a,y:c}}const Wue=Ra(0);function V3(t){const e=Tr(t);return!wk()||!e.visualViewport?Wue:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Kue(t,e,n){return e===void 0&&(e=!1),!!n&&e&&n===Tr(t)}function lu(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),s=Ek(t);let a=Ra(1);e&&(i?qo(i)&&(a=Qf(i)):a=Qf(t));const c=Kue(s,n,i)?V3(s):Ra(0);let u=(r.left+c.x)/a.x,h=(r.top+c.y)/a.y,d=r.width/a.x,m=r.height/a.y;if(s&&i){const g=Tr(s),y=qo(i)?Tr(i):i;let v=g,S=jE(v);for(;S&&y!==v;){const x=Qf(S),w=S.getBoundingClientRect(),C=Yo(S),k=w.left+(S.clientLeft+parseFloat(C.paddingLeft))*x.x,A=w.top+(S.clientTop+parseFloat(C.paddingTop))*x.y;u*=x.x,h*=x.y,d*=x.x,m*=x.y,u+=k,h+=A,v=Tr(S),S=jE(v)}}return Jb({width:d,height:m,x:u,y:h})}function Iy(t,e){const n=Ly(t).scrollLeft;return e?e.left+n:lu(Da(t)).left+n}function q3(t,e){const n=t.getBoundingClientRect(),i=n.left+e.scrollLeft-Iy(t,n),r=n.top+e.scrollTop;return{x:i,y:r}}function Jue(t){let{elements:e,rect:n,offsetParent:i,strategy:r}=t;const s=r==="fixed",a=Da(i),c=e?Dy(e.floating):!1;if(i===a||c&&s)return n;let u={scrollLeft:0,scrollTop:0},h=Ra(1);const d=Ra(0),m=Wl(i);if((m||!s)&&((Mh(i)!=="body"||$y(a))&&(u=Ly(i)),m)){const y=lu(i);h=Qf(i),d.x=y.x+i.clientLeft,d.y=y.y+i.clientTop}const g=a&&!m&&!s?q3(a,u):Ra(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-u.scrollLeft*h.x+d.x+g.x,y:n.y*h.y-u.scrollTop*h.y+d.y+g.y}}function efe(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function tfe(t){const e=Ly(t),n=t.ownerDocument.body,i=Aa(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),r=Aa(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-e.scrollLeft+Iy(t);const a=-e.scrollTop;return Yo(n).direction==="rtl"&&(s+=Aa(t.clientWidth,n.clientWidth)-i),{width:i,height:r,x:s,y:a}}const nfe=25;function ife(t,e,n){n===void 0&&(n="viewport");const i=n==="layoutViewport",r=Tr(t),s=Da(t),a=r.visualViewport;let c=s.clientWidth,u=s.clientHeight,h=0,d=0;if(a){const g=!wk()||e==="fixed";i?g||(h=-a.offsetLeft,d=-a.offsetTop):(c=a.width,u=a.height,g&&(h=a.offsetLeft,d=a.offsetTop))}if(Iy(s)<=0){const g=s.ownerDocument,y=g.body,v=getComputedStyle(y),S=g.compatMode==="CSS1Compat"&&parseFloat(v.marginLeft)+parseFloat(v.marginRight)||0,x=Math.abs(s.clientWidth-y.clientWidth-S),w=getComputedStyle(s).scrollbarGutter==="stable both-edges"?x/2:x;w<=nfe&&(c-=w)}return{width:c,height:u,x:h,y:d}}function rfe(t,e){const n=lu(t,!0,e==="fixed"),i=n.top+t.clientTop,r=n.left+t.clientLeft,s=Qf(t),a=t.clientWidth*s.x,c=t.clientHeight*s.y,u=r*s.x,h=i*s.y;return{width:a,height:c,x:u,y:h}}function VL(t,e,n){let i;if(e==="viewport"||e==="layoutViewport")i=ife(t,n,e);else if(e==="document")i=tfe(Da(t));else if(qo(e))i=rfe(e,n);else{const r=V3(t);i={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return Jb(i)}function sfe(t,e){const n=e.get(t);if(n)return n;let i=Bp(t,[],!1).filter(c=>qo(c)&&Mh(c)!=="body"),r=null;const s=Yo(t).position==="fixed";let a=s?au(t):t;for(;qo(a)&&!jp(a);){const c=Yo(a),u=xk(a),h=r?r.position:s?"fixed":"";!u&&(h==="fixed"||h==="absolute"&&c.position==="static")?i=i.filter(m=>m!==a):r=c,a=au(a)}return e.set(t,i),i}function ofe(t){let{element:e,boundary:n,rootBoundary:i,strategy:r}=t;const a=[...n==="clippingAncestors"?Dy(e)?[]:sfe(e,this._c):[].concat(n),i],c=VL(e,a[0],r);let u=c.top,h=c.right,d=c.bottom,m=c.left;for(let g=1;g<a.length;g++){const y=VL(e,a[g],r);u=Aa(y.top,u),h=Yl(y.right,h),d=Yl(y.bottom,d),m=Aa(y.left,m)}return{width:h-m,height:d-u,x:m,y:u}}function afe(t){const{width:e,height:n}=Z3(t);return{width:e,height:n}}function lfe(t,e,n){const i=Wl(e),r=Da(e),s=n==="fixed",a=lu(t,!0,s,e);let c={scrollLeft:0,scrollTop:0};const u=Ra(0);if((i||!s)&&((Mh(e)!=="body"||$y(r))&&(c=Ly(e)),i)){const g=lu(e,!0,s,e);u.x=g.x+e.clientLeft,u.y=g.y+e.clientTop}!i&&r&&(u.x=Iy(r));const h=r&&!i&&!s?q3(r,c):Ra(0),d=a.left+c.scrollLeft-u.x-h.x,m=a.top+c.scrollTop-u.y-h.y;return{x:d,y:m,width:a.width,height:a.height}}function _w(t){return Yo(t).position==="static"}function qL(t,e){if(!Wl(t)||Yo(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Da(t)===n&&(n=n.ownerDocument.body),n}function Y3(t,e){const n=Tr(t);if(Dy(t))return n;if(!Wl(t)){let r=au(t);for(;r&&!jp(r);){if(qo(r)&&!_w(r))return r;r=au(r)}return n}let i=qL(t,e);for(;i&&Yue(i)&&_w(i);)i=qL(i,e);return i&&jp(i)&&_w(i)&&!xk(i)?n:i||Hue(t)||n}const cfe=async function(t){const e=this.getOffsetParent||Y3,n=this.getDimensions,i=await n(t.floating);return{reference:lfe(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function ufe(t){return Yo(t).direction==="rtl"}const ffe={convertOffsetParentRelativeRectToViewportRelativeRect:Jue,getDocumentElement:Da,getClippingRect:ofe,getOffsetParent:Y3,getElementRects:cfe,getClientRects:efe,getDimensions:afe,getScale:Qf,isElement:qo,isRTL:ufe};function G3(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function hfe(t,e,n){let i=null,r;const s=Da(t);function a(){var d;clearTimeout(r),(d=i)==null||d.disconnect(),i=null}function c(d,m){d===void 0&&(d=!1),m===void 0&&(m=1),a();const g=t.getBoundingClientRect(),{left:y,top:v,width:S,height:x}=g;if(d||e(),!S||!x)return;const w=vO(v),C=vO(s.clientWidth-(y+S)),k=vO(s.clientHeight-(v+x)),A=vO(y),P={rootMargin:-w+"px "+-C+"px "+-k+"px "+-A+"px",threshold:Aa(0,Yl(1,m))||1};let N=!0;function $(D){const U=D[0].intersectionRatio;if(!G3(g,t.getBoundingClientRect()))return c();if(U!==m){if(!N)return c();U?c(!1,U):r=setTimeout(()=>{c(!1,1e-7)},1e3)}N=!1}try{i=new IntersectionObserver($,{...P,root:s.ownerDocument})}catch{i=new IntersectionObserver($,P)}i.observe(t)}const u=Tr(t),h=()=>c(n);return u.addEventListener("resize",h),c(!0),()=>{u.removeEventListener("resize",h),a()}}function dfe(t,e,n,i){i===void 0&&(i={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:u=!1}=i,h=Ek(t),d=r||s?[...h?Bp(h):[],...e?Bp(e):[]]:[];d.forEach(w=>{r&&w.addEventListener("scroll",n),s&&w.addEventListener("resize",n)});const m=h&&c?hfe(h,n,s):null;let g=-1,y=null;a&&(y=new ResizeObserver(w=>{let[C]=w;C&&C.target===h&&y&&e&&(y.unobserve(e),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var k;(k=y)==null||k.observe(e)})),n()}),h&&!u&&y.observe(h),e&&y.observe(e));let v,S=u?lu(t):null;u&&x();function x(){const w=lu(t);S&&!G3(S,w)&&n(),S=w,v=requestAnimationFrame(x)}return n(),()=>{var w;d.forEach(C=>{r&&C.removeEventListener("scroll",n),s&&C.removeEventListener("resize",n)}),m==null||m(),(w=y)==null||w.disconnect(),y=null,u&&cancelAnimationFrame(v)}}const pfe=Uue,mfe=Zue,gfe=Bue,Ofe=que,bfe=zue,YL=jue,yfe=Vue,vfe=(t,e,n)=>{const i=new Map,r=n??{},s={...ffe,...r.platform,_c:i};return Iue(t,e,{...r,platform:s})};var Sfe=typeof document<"u",xfe=function(){},nb=Sfe?T.useLayoutEffect:xfe;function ey(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,i,r;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(i=n;i--!==0;)if(!ey(t[i],e[i]))return!1;return!0}if(r=Object.keys(t),n=r.length,n!==Object.keys(e).length)return!1;for(i=n;i--!==0;)if(!{}.hasOwnProperty.call(e,r[i]))return!1;for(i=n;i--!==0;){const s=r[i];if(!(s==="_owner"&&t.$$typeof)&&!ey(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function F3(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function GL(t,e){const n=F3(t);return Math.round(e*n)/n}function Tw(t){const e=T.useRef(t);return nb(()=>{e.current=t}),e}function wfe(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:i=[],platform:r,elements:{reference:s,floating:a}={},transform:c=!0,whileElementsMounted:u,open:h}=t,[d,m]=T.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[g,y]=T.useState(i);ey(g,i)||y(i);const[v,S]=T.useState(null),[x,w]=T.useState(null),C=T.useCallback(K=>{K!==P.current&&(P.current=K,S(K))},[]),k=T.useCallback(K=>{K!==N.current&&(N.current=K,w(K))},[]),A=s||v,R=a||x,P=T.useRef(null),N=T.useRef(null),$=T.useRef(d),D=u!=null,U=Tw(u),V=Tw(r),X=Tw(h),ee=T.useCallback(()=>{if(!P.current||!N.current)return;const K={placement:e,strategy:n,middleware:g};V.current&&(K.platform=V.current),vfe(P.current,N.current,K).then(me=>{const fe={...me,isPositioned:X.current!==!1};le.current&&!ey($.current,fe)&&($.current=fe,gh.flushSync(()=>{m(fe)}))})},[g,e,n,V,X]);nb(()=>{h===!1&&$.current.isPositioned&&($.current.isPositioned=!1,m(K=>({...K,isPositioned:!1})))},[h]);const le=T.useRef(!1);nb(()=>(le.current=!0,()=>{le.current=!1}),[]),nb(()=>{if(A&&(P.current=A),R&&(N.current=R),A&&R){if(U.current)return U.current(A,R,ee);ee()}},[A,R,ee,U,D]);const re=T.useMemo(()=>({reference:P,floating:N,setReference:C,setFloating:k}),[C,k]),G=T.useMemo(()=>({reference:A,floating:R}),[A,R]),oe=T.useMemo(()=>{const K={position:n,left:0,top:0};if(!G.floating)return K;const me=GL(G.floating,d.x),fe=GL(G.floating,d.y);return c?{...K,transform:"translate("+me+"px, "+fe+"px)",...F3(G.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:me,top:fe}},[n,c,G.floating,d.x,d.y]);return T.useMemo(()=>({...d,update:ee,refs:re,elements:G,floatingStyles:oe}),[d,ee,re,G,oe])}const Efe=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:i,padding:r}=typeof t=="function"?t(n):t;return i&&e(i)?i.current!=null?YL({element:i.current,padding:r}).fn(n):{}:i?YL({element:i,padding:r}).fn(n):{}}}},_fe=(t,e)=>{const n=pfe(t);return{name:n.name,fn:n.fn,options:[t,e]}},Tfe=(t,e)=>{const n=mfe(t);return{name:n.name,fn:n.fn,options:[t,e]}},kfe=(t,e)=>({fn:yfe(t).fn,options:[t,e]}),Cfe=(t,e)=>{const n=gfe(t);return{name:n.name,fn:n.fn,options:[t,e]}},Afe=(t,e)=>{const n=Ofe(t);return{name:n.name,fn:n.fn,options:[t,e]}},Rfe=(t,e)=>{const n=bfe(t);return{name:n.name,fn:n.fn,options:[t,e]}},Pfe=(t,e)=>{const n=Efe(t);return{name:n.name,fn:n.fn,options:[t,e]}};var Mfe=Object.defineProperty,Nfe=(t,e)=>Mfe(t,"name",{value:e,configurable:!0});function H3(t){const[e,n]=T.useState(void 0);return Kn(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});let i=0;const r=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const a=s[0];window.cancelAnimationFrame(i),i=window.requestAnimationFrame(()=>{let c,u;if("borderBoxSize"in a){const h=a.borderBoxSize,d=Array.isArray(h)?h[0]:h;c=d.inlineSize,u=d.blockSize}else c=t.offsetWidth,u=t.offsetHeight;n({width:c,height:u})})});return r.observe(t,{box:"border-box"}),()=>{window.cancelAnimationFrame(i),r.unobserve(t)}}else n(void 0)},[t]),e}Nfe(H3,"useSize");var Qfe=Object.defineProperty,Dl=(t,e)=>Qfe(t,"name",{value:e,configurable:!0}),FL={Partial:"partial"},HL={Optimized:"optimized",Always:"always"},W3="Popper",[K3,jy]=Go(W3),[$fe,J3]=K3(W3),eZ=Dl(t=>{const{__scopePopper:e,children:n}=t,[i,r]=T.useState(null),[s,a]=T.useState(void 0);return _.jsx($fe,{scope:e,anchor:i,onAnchorChange:r,placementState:s,setPlacementState:a,children:n})},"Popper"),Dfe="PopperAnchor",tZ=T.forwardRef(Dl(function(e,n){const{__scopePopper:i,virtualRef:r,...s}=e,a=J3(Dfe,i),c=T.useRef(null),u=a.onAnchorChange,h=T.useCallback(S=>{c.current=S,S&&u(S)},[u]),d=nn(n,h),m=T.useRef(null);T.useEffect(()=>{if(!r)return;const S=m.current;m.current=r.current,S!==m.current&&u(m.current)});const g=a.placementState&&By(a.placementState),y=g==null?void 0:g[0],v=g==null?void 0:g[1];return r?null:_.jsx(cn.div,{"data-radix-popper-side":y,"data-radix-popper-align":v,...s,ref:d})},"PopperAnchor")),nZ="PopperContent",[Lfe,xpe]=K3(nZ),iZ=T.forwardRef(Dl(function(e,n){var _e,be,Se,Ee,Ie,Ye,Ge;const{__scopePopper:i,side:r="bottom",sideOffset:s=0,align:a="center",alignOffset:c=0,arrowPadding:u=0,avoidCollisions:h=!0,collisionBoundary:d=[],collisionPadding:m=0,sticky:g=FL.Partial,hideWhenDetached:y=!1,updatePositionStrategy:v=HL.Optimized,onPlaced:S,...x}=e,w=J3(nZ,i),[C,k]=T.useState(null),A=nn(n,k),[R,P]=T.useState(null),N=H3(R),$=(N==null?void 0:N.width)??0,D=(N==null?void 0:N.height)??0,U=r+(a!=="center"?"-"+a:""),V=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},X=Array.isArray(d)?d:[d],ee=X.length>0,le={padding:V,boundary:X.filter(rZ),altBoundary:ee},{refs:re,floatingStyles:G,placement:oe,isPositioned:K,middlewareData:me}=wfe({strategy:"fixed",placement:U,whileElementsMounted:Dl((...qe)=>dfe(...qe,{animationFrame:v===HL.Always}),"whileElementsMounted"),elements:{reference:w.anchor},middleware:[_fe({mainAxis:s+D,alignmentAxis:c}),h&&Tfe({mainAxis:!0,crossAxis:!1,...g===FL.Partial?{limiter:kfe()}:{},...le}),h&&Cfe({...le}),Afe({...le,apply:Dl(({elements:qe,rects:He,availableWidth:Xe,availableHeight:zn})=>{const{width:vn,height:wn}=He.reference,Ii=qe.floating.style;Ii.setProperty("--radix-popper-available-width",`${Xe}px`),Ii.setProperty("--radix-popper-available-height",`${zn}px`),Ii.setProperty("--radix-popper-anchor-width",`${vn}px`),Ii.setProperty("--radix-popper-anchor-height",`${wn}px`)},"apply")}),R&&Pfe({element:R,padding:u}),Ife({arrowWidth:$,arrowHeight:D}),y&&Rfe(ee?{strategy:"referenceHidden",...le}:{strategy:"referenceHidden",padding:le.padding,altBoundary:le.altBoundary})]}),fe=w.setPlacementState;Kn(()=>(fe(oe),()=>{fe(void 0)}),[oe,fe]);const[Te,ze]=By(oe),tt=ws(S);Kn(()=>{K&&(tt==null||tt())},[K,tt]);const I=(_e=me.arrow)==null?void 0:_e.x,ie=(be=me.arrow)==null?void 0:be.y,B=((Se=me.arrow)==null?void 0:Se.centerOffset)!==0,[se,we]=T.useState();return Kn(()=>{C&&we(window.getComputedStyle(C).zIndex)},[C]),_.jsx("div",{ref:re.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:K?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:se,"--radix-popper-transform-origin":[(Ee=me.transformOrigin)==null?void 0:Ee.x,(Ie=me.transformOrigin)==null?void 0:Ie.y].join(" "),...((Ye=me.hide)==null?void 0:Ye.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:_.jsx(Lfe,{scope:i,placedSide:Te,placedAlign:ze,onArrowChange:P,arrowX:I,arrowY:ie,shouldHideArrow:B,children:_.jsx(cn.div,{"data-side":Te,"data-align":ze,...x,ref:A,style:{...x.style,animation:K?(Ge=x.style)==null?void 0:Ge.animation:"none"}})})})},"PopperContent"));function rZ(t){return t!==null}Dl(rZ,"isNotNull");var Ife=Dl(t=>({name:"transformOrigin",options:t,fn(e){var x,w,C;const{placement:n,rects:i,middlewareData:r}=e,a=((x=r.arrow)==null?void 0:x.centerOffset)!==0,c=a?0:t.arrowWidth,u=a?0:t.arrowHeight,[h,d]=By(n),m={start:"0%",center:"50%",end:"100%"}[d],g=(((w=r.arrow)==null?void 0:w.x)??0)+c/2,y=(((C=r.arrow)==null?void 0:C.y)??0)+u/2;let v="",S="";return h==="bottom"?(v=a?m:`${g}px`,S=`${-u}px`):h==="top"?(v=a?m:`${g}px`,S=`${i.floating.height+u}px`):h==="right"?(v=`${-u}px`,S=a?m:`${y}px`):h==="left"&&(v=`${i.floating.width+u}px`,S=a?m:`${y}px`),{data:{x:v,y:S}}}}),"transformOrigin");function By(t){const[e,n="center"]=t.split("-");return[e,n]}Dl(By,"getSideAndAlignFromPlacement");var jfe=Object.defineProperty,Bfe=(t,e)=>jfe(t,"name",{value:e,configurable:!0}),_k=T.forwardRef(Bfe(function(e,n){var u;const{container:i,...r}=e,[s,a]=T.useState(!1);Kn(()=>a(!0),[]);const c=i||s&&((u=globalThis==null?void 0:globalThis.document)==null?void 0:u.body);return c?gh.createPortal(_.jsx(cn.div,{...r,ref:n}),c):null},"Portal")),zfe=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Xfe=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},af=new WeakMap,SO=new WeakMap,xO={},kw=0,sZ=function(t){return t&&(t.host||sZ(t.parentNode))},Ufe=function(t,e){return e.map(function(n){if(t.contains(n))return n;var i=sZ(n);return i&&t.contains(i)?i:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},Zfe=function(t,e,n,i){var r=Ufe(e,Array.isArray(t)?t:[t]);xO[n]||(xO[n]=new WeakMap);var s=xO[n],a=[],c=new Set,u=new Set(r),h=function(m){!m||c.has(m)||(c.add(m),h(m.parentNode))};r.forEach(h);var d=function(m){!m||u.has(m)||Array.prototype.forEach.call(m.children,function(g){if(c.has(g))d(g);else try{var y=g.getAttribute(i),v=y!==null&&y!=="false",S=(af.get(g)||0)+1,x=(s.get(g)||0)+1;af.set(g,S),s.set(g,x),a.push(g),S===1&&v&&SO.set(g,!0),x===1&&g.setAttribute(n,"true"),v||g.setAttribute(i,"true")}catch(w){console.error("aria-hidden: cannot operate on ",g,w)}})};return d(e),c.clear(),kw++,function(){a.forEach(function(m){var g=af.get(m)-1,y=s.get(m)-1;af.set(m,g),s.set(m,y),g||(SO.has(m)||m.removeAttribute(i),SO.delete(m)),y||m.removeAttribute(n)}),kw--,kw||(af=new WeakMap,af=new WeakMap,SO=new WeakMap,xO={})}},Tk=function(t,e,n){n===void 0&&(n="data-aria-hidden");var i=Array.from(Array.isArray(t)?t:[t]),r=Xfe(t);return r?(i.push.apply(i,Array.from(r.querySelectorAll("[aria-live], script"))),Zfe(i,r,n,"aria-hidden")):function(){return null}},No=function(){return No=Object.assign||function(e){for(var n,i=1,r=arguments.length;i<r;i++){n=arguments[i];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},No.apply(this,arguments)};function oZ(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]]);return n}function Vfe(t,e,n){if(n||arguments.length===2)for(var i=0,r=e.length,s;i<r;i++)(s||!(i in e))&&(s||(s=Array.prototype.slice.call(e,0,i)),s[i]=e[i]);return t.concat(s||Array.prototype.slice.call(e))}var ib="right-scroll-bar-position",rb="width-before-scroll-bar",qfe="with-scroll-bars-hidden",Yfe="--removed-body-scroll-bar-size";function Cw(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function Gfe(t,e){var n=T.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(i){var r=n.value;r!==i&&(n.value=i,n.callback(i,r))}}}})[0];return n.callback=e,n.facade}var Ffe=typeof window<"u"?T.useLayoutEffect:T.useEffect,WL=new WeakMap;function Hfe(t,e){var n=Gfe(null,function(i){return t.forEach(function(r){return Cw(r,i)})});return Ffe(function(){var i=WL.get(n);if(i){var r=new Set(i),s=new Set(t),a=n.current;r.forEach(function(c){s.has(c)||Cw(c,null)}),s.forEach(function(c){r.has(c)||Cw(c,a)})}WL.set(n,t)},[t]),n}function Wfe(t){return t}function Kfe(t,e){e===void 0&&(e=Wfe);var n=[],i=!1,r={read:function(){if(i)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(s){var a=e(s,i);return n.push(a),function(){n=n.filter(function(c){return c!==a})}},assignSyncMedium:function(s){for(i=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(c){return s(c)},filter:function(){return n}}},assignMedium:function(s){i=!0;var a=[];if(n.length){var c=n;n=[],c.forEach(s),a=n}var u=function(){var d=a;a=[],d.forEach(s)},h=function(){return Promise.resolve().then(u)};h(),n={push:function(d){a.push(d),h()},filter:function(d){return a=a.filter(d),n}}}};return r}function Jfe(t){t===void 0&&(t={});var e=Kfe(null);return e.options=No({async:!0,ssr:!1},t),e}var aZ=function(t){var e=t.sideCar,n=oZ(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=e.read();if(!i)throw new Error("Sidecar medium not found");return T.createElement(i,No({},n))};aZ.isSideCarExport=!0;function ehe(t,e){return t.useMedium(e),aZ}var lZ=Jfe(),Aw=function(){},zy=T.forwardRef(function(t,e){var n=T.useRef(null),i=T.useState({onScrollCapture:Aw,onWheelCapture:Aw,onTouchMoveCapture:Aw}),r=i[0],s=i[1],a=t.forwardProps,c=t.children,u=t.className,h=t.removeScrollBar,d=t.enabled,m=t.shards,g=t.sideCar,y=t.noRelative,v=t.noIsolation,S=t.inert,x=t.allowPinchZoom,w=t.as,C=w===void 0?"div":w,k=t.gapMode,A=oZ(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),R=g,P=Hfe([n,e]),N=No(No({},A),r);return T.createElement(T.Fragment,null,d&&T.createElement(R,{sideCar:lZ,removeScrollBar:h,shards:m,noRelative:y,noIsolation:v,inert:S,setCallbacks:s,allowPinchZoom:!!x,lockRef:n,gapMode:k}),a?T.cloneElement(T.Children.only(c),No(No({},N),{ref:P})):T.createElement(C,No({},N,{className:u,ref:P}),c))});zy.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};zy.classNames={fullWidth:rb,zeroRight:ib};var the=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function nhe(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=the();return e&&t.setAttribute("nonce",e),t}function ihe(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function rhe(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var she=function(){var t=0,e=null;return{add:function(n){t==0&&(e=nhe())&&(ihe(e,n),rhe(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},ohe=function(){var t=she();return function(e,n){T.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},cZ=function(){var t=ohe(),e=function(n){var i=n.styles,r=n.dynamic;return t(i,r),null};return e},ahe={left:0,top:0,right:0,gap:0},Rw=function(t){return parseInt(t||"",10)||0},lhe=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],i=e[t==="padding"?"paddingTop":"marginTop"],r=e[t==="padding"?"paddingRight":"marginRight"];return[Rw(n),Rw(i),Rw(r)]},che=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return ahe;var e=lhe(t),n=document.documentElement.clientWidth,i=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,i-n+e[2]-e[0])}},uhe=cZ(),$f="data-scroll-locked",fhe=function(t,e,n,i){var r=t.left,s=t.top,a=t.right,c=t.gap;return n===void 0&&(n="margin"),`
151
+ .`.concat(qfe,` {
152
+ overflow: hidden `).concat(i,`;
153
+ padding-right: `).concat(c,"px ").concat(i,`;
154
+ }
155
+ body[`).concat($f,`] {
156
+ overflow: hidden `).concat(i,`;
157
+ overscroll-behavior: contain;
158
+ `).concat([e&&"position: relative ".concat(i,";"),n==="margin"&&`
159
+ padding-left: `.concat(r,`px;
160
+ padding-top: `).concat(s,`px;
161
+ padding-right: `).concat(a,`px;
162
+ margin-left:0;
163
+ margin-top:0;
164
+ margin-right: `).concat(c,"px ").concat(i,`;
165
+ `),n==="padding"&&"padding-right: ".concat(c,"px ").concat(i,";")].filter(Boolean).join(""),`
166
+ }
167
+
168
+ .`).concat(ib,` {
169
+ right: `).concat(c,"px ").concat(i,`;
170
+ }
171
+
172
+ .`).concat(rb,` {
173
+ margin-right: `).concat(c,"px ").concat(i,`;
174
+ }
175
+
176
+ .`).concat(ib," .").concat(ib,` {
177
+ right: 0 `).concat(i,`;
178
+ }
179
+
180
+ .`).concat(rb," .").concat(rb,` {
181
+ margin-right: 0 `).concat(i,`;
182
+ }
183
+
184
+ body[`).concat($f,`] {
185
+ `).concat(Yfe,": ").concat(c,`px;
186
+ }
187
+ `)},KL=function(){var t=parseInt(document.body.getAttribute($f)||"0",10);return isFinite(t)?t:0},hhe=function(){T.useEffect(function(){return document.body.setAttribute($f,(KL()+1).toString()),function(){var t=KL()-1;t<=0?document.body.removeAttribute($f):document.body.setAttribute($f,t.toString())}},[])},dhe=function(t){var e=t.noRelative,n=t.noImportant,i=t.gapMode,r=i===void 0?"margin":i;hhe();var s=T.useMemo(function(){return che(r)},[r]);return T.createElement(uhe,{styles:fhe(s,!e,r,n?"":"!important")})},BE=!1;if(typeof window<"u")try{var wO=Object.defineProperty({},"passive",{get:function(){return BE=!0,!0}});window.addEventListener("test",wO,wO),window.removeEventListener("test",wO,wO)}catch{BE=!1}var lf=BE?{passive:!1}:!1,phe=function(t){return t.tagName==="TEXTAREA"},uZ=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!phe(t)&&n[e]==="visible")},mhe=function(t){return uZ(t,"overflowY")},ghe=function(t){return uZ(t,"overflowX")},JL=function(t,e){var n=e.ownerDocument,i=e;do{typeof ShadowRoot<"u"&&i instanceof ShadowRoot&&(i=i.host);var r=fZ(t,i);if(r){var s=hZ(t,i),a=s[1],c=s[2];if(a>c)return!0}i=i.parentNode}while(i&&i!==n.body);return!1},Ohe=function(t){var e=t.scrollTop,n=t.scrollHeight,i=t.clientHeight;return[e,n,i]},bhe=function(t){var e=t.scrollLeft,n=t.scrollWidth,i=t.clientWidth;return[e,n,i]},fZ=function(t,e){return t==="v"?mhe(e):ghe(e)},hZ=function(t,e){return t==="v"?Ohe(e):bhe(e)},yhe=function(t,e){return t==="h"&&e==="rtl"?-1:1},vhe=function(t,e,n,i,r){var s=yhe(t,window.getComputedStyle(e).direction),a=s*i,c=n.target,u=e.contains(c),h=!1,d=a>0,m=0,g=0;do{if(!c)break;var y=hZ(t,c),v=y[0],S=y[1],x=y[2],w=S-x-s*v;(v||w)&&fZ(t,c)&&(m+=w,g+=v);var C=c.parentNode;c=C&&C.nodeType===Node.DOCUMENT_FRAGMENT_NODE?C.host:C}while(!u&&c!==document.body||u&&(e.contains(c)||e===c));return(d&&Math.abs(m)<1||!d&&Math.abs(g)<1)&&(h=!0),h},EO=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},e2=function(t){return[t.deltaX,t.deltaY]},t2=function(t){return t&&"current"in t?t.current:t},She=function(t,e){return t[0]===e[0]&&t[1]===e[1]},xhe=function(t){return`
188
+ .block-interactivity-`.concat(t,` {pointer-events: none;}
189
+ .allow-interactivity-`).concat(t,` {pointer-events: all;}
190
+ `)},whe=0,cf=[];function Ehe(t){var e=T.useRef([]),n=T.useRef([0,0]),i=T.useRef(),r=T.useState(whe++)[0],s=T.useState(cZ)[0],a=T.useRef(t);T.useEffect(function(){a.current=t},[t]),T.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(r));var S=Vfe([t.lockRef.current],(t.shards||[]).map(t2),!0).filter(Boolean);return S.forEach(function(x){return x.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),S.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(r))})}}},[t.inert,t.lockRef.current,t.shards]);var c=T.useCallback(function(S,x){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!a.current.allowPinchZoom;var w=EO(S),C=n.current,k="deltaX"in S?S.deltaX:C[0]-w[0],A="deltaY"in S?S.deltaY:C[1]-w[1],R,P=S.target,N=Math.abs(k)>Math.abs(A)?"h":"v";if("touches"in S&&N==="h"&&P.type==="range")return!1;var $=window.getSelection(),D=$&&$.anchorNode,U=D?D===P||D.contains(P):!1;if(U)return!1;var V=JL(N,P);if(!V)return!0;if(V?R=N:(R=N==="v"?"h":"v",V=JL(N,P)),!V)return!1;if(!i.current&&"changedTouches"in S&&(k||A)&&(i.current=R),!R)return!0;var X=i.current||R;return vhe(X,x,S,X==="h"?k:A)},[]),u=T.useCallback(function(S){var x=S;if(!(!cf.length||cf[cf.length-1]!==s)){var w="deltaY"in x?e2(x):EO(x),C=e.current.filter(function(R){return R.name===x.type&&(R.target===x.target||x.target===R.shadowParent)&&She(R.delta,w)})[0];if(C&&C.should){x.cancelable&&x.preventDefault();return}if(!C){var k=(a.current.shards||[]).map(t2).filter(Boolean).filter(function(R){return R.contains(x.target)}),A=k.length>0?c(x,k[0]):!a.current.noIsolation;A&&x.cancelable&&x.preventDefault()}}},[]),h=T.useCallback(function(S,x,w,C){var k={name:S,delta:x,target:w,should:C,shadowParent:_he(w)};e.current.push(k),setTimeout(function(){e.current=e.current.filter(function(A){return A!==k})},1)},[]),d=T.useCallback(function(S){n.current=EO(S),i.current=void 0},[]),m=T.useCallback(function(S){h(S.type,e2(S),S.target,c(S,t.lockRef.current))},[]),g=T.useCallback(function(S){h(S.type,EO(S),S.target,c(S,t.lockRef.current))},[]);T.useEffect(function(){return cf.push(s),t.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:g}),document.addEventListener("wheel",u,lf),document.addEventListener("touchmove",u,lf),document.addEventListener("touchstart",d,lf),function(){cf=cf.filter(function(S){return S!==s}),document.removeEventListener("wheel",u,lf),document.removeEventListener("touchmove",u,lf),document.removeEventListener("touchstart",d,lf)}},[]);var y=t.removeScrollBar,v=t.inert;return T.createElement(T.Fragment,null,v?T.createElement(s,{styles:xhe(r)}):null,y?T.createElement(dhe,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function _he(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const The=ehe(lZ,Ehe);var Xy=T.forwardRef(function(t,e){return T.createElement(zy,No({},t,{ref:e,sideCar:The}))});Xy.classNames=zy.classNames;var khe=Object.defineProperty,Wt=(t,e)=>khe(t,"name",{value:e,configurable:!0}),n2={ItemAligned:"item-aligned",Popper:"popper"},Che={RTL:"rtl"},Ahe=[" ","Enter","ArrowUp","ArrowDown"],Rhe=[" ","Enter"],ph="Select",[Uy,kk,Phe]=ny(ph),[Ou,wpe]=Go(ph,[Phe,jy]),Ck=jy(),[Mhe,Kl]=Ou(ph),[Nhe,Qhe]=Ou(ph);function dZ(t){const{__scopeSelect:e,children:n,open:i,defaultOpen:r,onOpenChange:s,value:a,defaultValue:c,onValueChange:u,dir:h,name:d,autoComplete:m,disabled:g,required:y,form:v,internal_do_not_use_render:S}=t,x=Ck(e),[w,C]=T.useState(null),[k,A]=T.useState(null),[R,P]=T.useState(!1),N=Fp(h),[$,D]=Hc({prop:i,defaultProp:r??!1,onChange:s,caller:ph}),[U,V]=Hc({prop:a,defaultProp:c,onChange:u,caller:ph}),X=T.useRef(null),ee=T.useRef(!1),[le,re]=T.useState(null),G=Wt(B=>{re({value:B,hasConsumerStoppedPropagation:ee.current}),V(B)},"handleUserSelect"),oe=T.useRef(U);T.useEffect(()=>{const B=v?w==null?void 0:w.ownerDocument.getElementById(v):w==null?void 0:w.form;if(B instanceof HTMLFormElement){const se=Wt(()=>V(oe.current),"reset");return B.addEventListener("reset",se),()=>B.removeEventListener("reset",se)}},[v,w,V]);const K=w?!!v||!!w.closest("form"):!0,[me,fe]=T.useState(new Set),Te=Bo(),ze=Array.from(me).map(B=>B.props.value).join(";"),tt=T.useCallback(B=>{fe(se=>new Set(se).add(B))},[]),I=T.useCallback(B=>{fe(se=>{const we=new Set(se);return we.delete(B),we})},[]),ie={required:y,trigger:w,onTriggerChange:C,valueNode:k,onValueNodeChange:A,valueNodeHasChildren:R,onValueNodeHasChildrenChange:P,contentId:Te,value:U,onValueChange:V,hasConsumerStoppedPropagationRef:ee,userSelection:le,onUserSelect:G,open:$,onOpenChange:D,dir:N,triggerPointerDownPosRef:X,disabled:g,name:d,autoComplete:m,form:v,nativeOptions:me,nativeSelectKey:ze,isFormControl:K};return _.jsx(eZ,{...x,children:_.jsx(Mhe,{scope:e,...ie,children:_.jsx(Uy.Provider,{scope:e,children:_.jsx(Nhe,{scope:e,onNativeOptionAdd:tt,onNativeOptionRemove:I,children:gZ(S)?S(ie):n})})})})}Wt(dZ,"SelectProvider");var $he=Wt(t=>{const{__scopeSelect:e,children:n,...i}=t;return _.jsx(dZ,{__scopeSelect:e,...i,internal_do_not_use_render:({isFormControl:r})=>_.jsxs(_.Fragment,{children:[n,r?_.jsx(ode,{__scopeSelect:e}):null]})})},"Select"),Dhe="SelectTrigger",Lhe=T.forwardRef(Wt(function(e,n){const{__scopeSelect:i,disabled:r=!1,...s}=e,a=Ck(i),c=Kl(Dhe,i),u=c.disabled||r,h=nn(n,c.onTriggerChange),d=kk(i),m=T.useRef("touch"),[g,y,v]=Ak(x=>{const w=d().filter(A=>!A.disabled),C=w.find(A=>A.value===c.value),k=Rk(w,x,C);k!==void 0&&c.onUserSelect(k.value)}),S=Wt(x=>{u||(c.onOpenChange(!0),v()),x&&(c.triggerPointerDownPosRef.current={x:Math.round(x.pageX),y:Math.round(x.pageY)})},"handleOpen");return _.jsx(tZ,{asChild:!0,...a,children:_.jsx(cn.button,{type:"button",role:"combobox","aria-controls":c.open?c.contentId:void 0,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":"none",dir:c.dir,"data-state":c.open?"open":"closed",disabled:u,"data-disabled":u?"":void 0,"data-placeholder":fm(c.value)?"":void 0,...s,ref:h,onClick:at(s.onClick,x=>{x.currentTarget.focus(),m.current!=="mouse"&&S(x)}),onPointerDown:at(s.onPointerDown,x=>{m.current=x.pointerType;const w=x.target;w.hasPointerCapture(x.pointerId)&&w.releasePointerCapture(x.pointerId),x.button===0&&x.ctrlKey===!1&&x.pointerType==="mouse"&&(S(x),x.preventDefault())}),onKeyDown:at(s.onKeyDown,x=>{const w=g.current!=="";!(x.ctrlKey||x.altKey||x.metaKey)&&x.key.length===1&&(c.hasConsumerStoppedPropagationRef.current=x.isPropagationStopped(),y(x.key)),!(w&&x.key===" ")&&Ahe.includes(x.key)&&(S(),x.preventDefault())})})})},"SelectTrigger")),Ihe="SelectValue",jhe=T.forwardRef(Wt(function(e,n){const{__scopeSelect:i,className:r,style:s,children:a,placeholder:c="",...u}=e,h=Kl(Ihe,i),{onValueNodeHasChildrenChange:d}=h,m=a!==void 0,g=nn(n,h.onValueNodeChange);Kn(()=>{d(m)},[d,m]);const y=fm(h.value);return _.jsx(cn.span,{...u,asChild:y?!1:u.asChild,ref:g,style:{pointerEvents:"none"},children:_.jsx(T.Fragment,{children:y?c:a},y?"placeholder":"value")})},"SelectValue")),Bhe=T.forwardRef(Wt(function(e,n){const{__scopeSelect:i,children:r,...s}=e;return _.jsx(cn.span,{"aria-hidden":!0,...s,ref:n,children:r||"▼"})},"SelectIcon")),zhe="SelectPortal",[Xhe,Uhe]=Ou(zhe,{forceMount:void 0}),Zhe=Wt(t=>{const{__scopeSelect:e,forceMount:n,...i}=t;return _.jsx(Xhe,{scope:t.__scopeSelect,forceMount:n,children:_.jsx(_k,{asChild:!0,...i})})},"SelectPortal"),cu="SelectContent",Vhe=T.forwardRef(Wt(function(e,n){const i=Uhe(cu,e.__scopeSelect),{forceMount:r=i.forceMount,...s}=e,a=Kl(cu,e.__scopeSelect),[c,u]=T.useState();return Kn(()=>{u(new DocumentFragment)},[]),_.jsx(hu,{present:r||a.open,children:({present:h})=>h?_.jsx(Ghe,{...s,ref:n}):_.jsx(qhe,{...s,fragment:c})})},"SelectContent")),qhe=T.forwardRef(Wt(function(e,n){const{__scopeSelect:i,children:r,fragment:s}=e;return s?gh.createPortal(_.jsx(pZ,{scope:i,children:_.jsx(Uy.Slot,{scope:i,children:_.jsx("div",{ref:n,children:r})})}),s):null},"SelectContentFragment")),Xs=10,[pZ,Zy]=Ou(cu),Yhe=Pa("SelectContent.RemoveScroll"),Ghe=T.forwardRef(Wt(function(e,n){const{__scopeSelect:i}=e,{position:r=n2.ItemAligned,onCloseAutoFocus:s,onEscapeKeyDown:a,onPointerDownOutside:c,side:u,sideOffset:h,align:d,alignOffset:m,arrowPadding:g,collisionBoundary:y,collisionPadding:v,sticky:S,hideWhenDetached:x,avoidCollisions:w,...C}=e,k=Kl(cu,i),[A,R]=T.useState(null),[P,N]=T.useState(null),$=nn(n,R),[D,U]=T.useState(null),[V,X]=T.useState(null),ee=kk(i),[le,re]=T.useState(!1),G=T.useRef(!1),oe=T.useRef(!1),K=T.useRef(!1);T.useEffect(()=>{if(A)return Tk(A)},[A]),um();const me=T.useCallback(be=>{const[Se,...Ee]=ee().map(Ge=>Ge.ref.current),[Ie]=Ee.slice(-1),Ye=document.activeElement;for(const Ge of be)if(Ge===Ye||(Ge==null||Ge.scrollIntoView({block:"nearest"}),Ge===Se&&P&&(P.scrollTop=0),Ge===Ie&&P&&(P.scrollTop=P.scrollHeight),Ge==null||Ge.focus(),document.activeElement!==Ye))return},[ee,P]),fe=T.useCallback(()=>me([D,A]),[me,D,A]);T.useEffect(()=>{le&&fe()},[le,fe]);const{onOpenChange:Te,triggerPointerDownPosRef:ze}=k;T.useEffect(()=>{if(A){let be={x:0,y:0};const Se=Wt(Ie=>{var Ye,Ge;be={x:Math.abs(Math.round(Ie.pageX)-(((Ye=ze.current)==null?void 0:Ye.x)??0)),y:Math.abs(Math.round(Ie.pageY)-(((Ge=ze.current)==null?void 0:Ge.y)??0))}},"handlePointerMove"),Ee=Wt(Ie=>{be.x<=10&&be.y<=10?Ie.preventDefault():Ie.composedPath().includes(A)||Te(!1),document.removeEventListener("pointermove",Se),ze.current=null},"handlePointerUp");return ze.current!==null&&(document.addEventListener("pointermove",Se),document.addEventListener("pointerup",Ee,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Se),document.removeEventListener("pointerup",Ee,{capture:!0})}}},[A,Te,ze]),T.useEffect(()=>{const be=Wt(()=>Te(!1),"close");return window.addEventListener("blur",be),window.addEventListener("resize",be),()=>{window.removeEventListener("blur",be),window.removeEventListener("resize",be)}},[Te]);const[tt,I]=Ak(be=>{const Se=ee().filter(Ye=>!Ye.disabled),Ee=Se.find(Ye=>Ye.ref.current===document.activeElement),Ie=Rk(Se,be,Ee);Ie&&setTimeout(()=>{var Ye;return(Ye=Ie.ref.current)==null?void 0:Ye.focus()})}),ie=T.useCallback((be,Se,Ee)=>{const Ie=!oe.current;Ie&&(oe.current=!0);const Ye=!G.current&&!Ee;k.value!==void 0&&k.value===Se||Ye?(U(be),Ye&&(G.current=!0)):Ie&&U(be)},[k.value]),B=T.useCallback(()=>A==null?void 0:A.focus(),[A]),se=T.useCallback((be,Se,Ee)=>{if(!be)return;const Ie=!K.current;Ie&&(K.current=!0);const Ye=!G.current&&!Ee;(k.value!==void 0&&k.value===Se||Ye||Ie)&&X(be)},[k.value]),we=r===n2.Popper?i2:Fhe,_e=we===i2?{side:u,sideOffset:h,align:d,alignOffset:m,arrowPadding:g,collisionBoundary:y,collisionPadding:v,sticky:S,hideWhenDetached:x,avoidCollisions:w}:{};return _.jsx(pZ,{scope:i,content:A,viewport:P,onViewportChange:N,itemRefCallback:ie,selectedItem:D,onItemLeave:B,itemTextRefCallback:se,focusSelectedItem:fe,selectedItemText:V,position:r,isPositioned:le,searchRef:tt,children:_.jsx(Xy,{as:Yhe,allowPinchZoom:!0,children:_.jsx(mk,{asChild:!0,trapped:k.open,onMountAutoFocus:be=>{be.preventDefault()},onUnmountAutoFocus:at(s,be=>{var Se;(Se=k.trigger)==null||Se.focus({preventScroll:!0}),be.preventDefault()}),children:_.jsx(hk,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:be=>be.preventDefault(),onDismiss:()=>k.onOpenChange(!1),children:_.jsx(we,{role:"listbox",id:k.contentId,"data-state":k.open?"open":"closed",dir:k.dir,onContextMenu:be=>be.preventDefault(),...C,..._e,onPlaced:()=>re(!0),ref:$,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:at(C.onKeyDown,be=>{const Se=be.ctrlKey||be.altKey||be.metaKey;if(be.key==="Tab"&&be.preventDefault(),!Se&&be.key.length===1&&I(be.key),["ArrowUp","ArrowDown","Home","End"].includes(be.key)){let Ie=ee().filter(Ye=>!Ye.disabled).map(Ye=>Ye.ref.current);if(["ArrowUp","End"].includes(be.key)&&(Ie=Ie.slice().reverse()),["ArrowUp","ArrowDown"].includes(be.key)){const Ye=be.target,Ge=Ie.indexOf(Ye);Ie=Ie.slice(Ge+1)}setTimeout(()=>me(Ie)),be.preventDefault()}})})})})})})},"SelectContentImpl")),Fhe=T.forwardRef(Wt(function(e,n){const{__scopeSelect:i,onPlaced:r,...s}=e,a=Kl(cu,i),c=Zy(cu,i),[u,h]=T.useState(null),[d,m]=T.useState(null),g=nn(n,m),y=kk(i),v=T.useRef(!1),S=T.useRef(!0),{viewport:x,selectedItem:w,selectedItemText:C,focusSelectedItem:k}=c,A=T.useCallback(()=>{if(a.trigger&&a.valueNode&&u&&d&&x&&w&&C){const $=a.trigger.getBoundingClientRect(),D=d.getBoundingClientRect(),U=a.valueNode.getBoundingClientRect(),V=C.getBoundingClientRect();if(a.dir!==Che.RTL){const Ee=V.left-D.left,Ie=U.left-Ee,Ye=$.left-Ie,Ge=$.width+Ye,qe=Math.max(Ge,D.width),He=window.innerWidth-Xs,Xe=ME(Ie,[Xs,Math.max(Xs,He-qe)]);u.style.minWidth=Ge+"px",u.style.left=Xe+"px"}else{const Ee=D.right-V.right,Ie=window.innerWidth-U.right-Ee,Ye=window.innerWidth-$.right-Ie,Ge=$.width+Ye,qe=Math.max(Ge,D.width),He=window.innerWidth-Xs,Xe=ME(Ie,[Xs,Math.max(Xs,He-qe)]);u.style.minWidth=Ge+"px",u.style.right=Xe+"px"}const X=y(),ee=window.innerHeight-Xs*2,le=x.scrollHeight,re=window.getComputedStyle(d),G=parseInt(re.borderTopWidth,10),oe=parseInt(re.paddingTop,10),K=parseInt(re.borderBottomWidth,10),me=parseInt(re.paddingBottom,10),fe=G+oe+le+me+K,Te=Math.min(w.offsetHeight*5,fe),ze=window.getComputedStyle(x),tt=parseInt(ze.paddingTop,10),I=parseInt(ze.paddingBottom,10),ie=$.top+$.height/2-Xs,B=ee-ie,se=w.offsetHeight/2,we=w.offsetTop+se,_e=G+oe+we,be=fe-_e;if(_e<=ie){const Ee=X.length>0&&w===X[X.length-1].ref.current;u.style.bottom="0px";const Ie=d.clientHeight-x.offsetTop-x.offsetHeight,Ye=Math.max(B,se+(Ee?I:0)+Ie+K),Ge=_e+Ye;u.style.height=Ge+"px"}else{const Ee=X.length>0&&w===X[0].ref.current;u.style.top="0px";const Ye=Math.max(ie,G+x.offsetTop+(Ee?tt:0)+se)+be;u.style.height=Ye+"px",x.scrollTop=_e-ie+x.offsetTop}u.style.margin=`${Xs}px 0`,u.style.minHeight=Te+"px",u.style.maxHeight=ee+"px",r==null||r(),requestAnimationFrame(()=>v.current=!0)}},[y,a.trigger,a.valueNode,u,d,x,w,C,a.dir,r]);Kn(()=>A(),[A]);const[R,P]=T.useState();Kn(()=>{d&&P(window.getComputedStyle(d).zIndex)},[d]);const N=T.useCallback($=>{$&&S.current===!0&&(A(),k==null||k(),S.current=!1)},[A,k]);return _.jsx(Hhe,{scope:i,contentWrapper:u,shouldExpandOnScrollRef:v,onScrollButtonChange:N,children:_.jsx("div",{ref:h,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:R},children:_.jsx(cn.div,{...s,ref:g,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}})})})},"SelectItemAlignedPosition")),i2=T.forwardRef(Wt(function(e,n){const{__scopeSelect:i,align:r="start",collisionPadding:s=Xs,...a}=e,c=Ck(i);return _.jsx(iZ,{...c,...a,ref:n,align:r,collisionPadding:s,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})},"SelectPopperPosition")),[Hhe,Whe]=Ou(cu,{}),r2="SelectViewport",Khe=T.forwardRef(Wt(function(e,n){const{__scopeSelect:i,nonce:r,...s}=e,a=Zy(r2,i),c=Whe(r2,i),u=nn(n,a.onViewportChange),h=T.useRef(0);return _.jsxs(_.Fragment,{children:[_.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),_.jsx(Uy.Slot,{scope:i,children:_.jsx(cn.div,{"data-radix-select-viewport":"",role:"presentation",...s,ref:u,style:{position:"relative",flex:1,overflow:"hidden auto",...s.style},onScroll:at(s.onScroll,d=>{const m=d.currentTarget,{contentWrapper:g,shouldExpandOnScrollRef:y}=c;if(y!=null&&y.current&&g){const v=Math.abs(h.current-m.scrollTop);if(v>0){const S=window.innerHeight-Xs*2,x=parseFloat(g.style.minHeight),w=parseFloat(g.style.height),C=Math.max(x,w);if(C<S){const k=C+v,A=Math.min(S,k),R=k-A;g.style.height=A+"px",g.style.bottom==="0px"&&(m.scrollTop=R>0?R:0,g.style.justifyContent="flex-end")}}}h.current=m.scrollTop})})})]})},"SelectViewport")),Jhe="SelectGroup",[Epe,_pe]=Ou(Jhe),zE="SelectItem",[ede,mZ]=Ou(zE),tde=T.forwardRef(Wt(function(e,n){const{__scopeSelect:i,value:r,disabled:s=!1,textValue:a,...c}=e,u=Kl(zE,i),h=Zy(zE,i),d=u.value===r,[m,g]=T.useState(a??""),[y,v]=T.useState(!1),S=ws(A=>{var R;return(R=h.itemRefCallback)==null?void 0:R.call(h,A,r,s)}),x=nn(n,S),w=Bo(),C=T.useRef("touch");function k(A){u.hasConsumerStoppedPropagationRef.current=A.isPropagationStopped(),u.onUserSelect(r),u.onOpenChange(!1)}return Wt(k,"handleSelect"),_.jsx(ede,{scope:i,value:r,disabled:s,textId:w,isSelected:d,onItemTextChange:T.useCallback(A=>{g(R=>R||((A==null?void 0:A.textContent)??"").trim())},[]),children:_.jsx(Uy.ItemSlot,{scope:i,value:r,disabled:s,textValue:m,children:_.jsx(cn.div,{role:"option","aria-labelledby":w,"data-highlighted":y?"":void 0,"aria-selected":d&&y,"data-state":d?"checked":"unchecked","aria-disabled":s||void 0,"data-disabled":s?"":void 0,tabIndex:s?void 0:-1,...c,ref:x,onFocus:at(c.onFocus,()=>v(!0)),onBlur:at(c.onBlur,()=>v(!1)),onClick:at(c.onClick,A=>{s||C.current!=="mouse"&&k(A)}),onPointerUp:at(c.onPointerUp,A=>{s||C.current==="mouse"&&k(A)}),onPointerDown:at(c.onPointerDown,A=>{C.current=A.pointerType}),onPointerMove:at(c.onPointerMove,A=>{var R;C.current=A.pointerType,s?(R=h.onItemLeave)==null||R.call(h):C.current==="mouse"&&A.currentTarget.focus({preventScroll:!0})}),onPointerLeave:at(c.onPointerLeave,A=>{var R;A.currentTarget===document.activeElement&&((R=h.onItemLeave)==null||R.call(h))}),onKeyDown:at(c.onKeyDown,A=>{var P;s||A.target!==A.currentTarget||((P=h.searchRef)==null?void 0:P.current)!==""&&A.key===" "||(Rhe.includes(A.key)&&k(A),A.key===" "&&A.preventDefault())})})})})},"SelectItem")),_O="SelectItemText",nde=T.forwardRef(Wt(function(e,n){const{__scopeSelect:i,className:r,style:s,...a}=e,c=Kl(_O,i),u=Zy(_O,i),h=mZ(_O,i),d=Qhe(_O,i),[m,g]=T.useState(null),y=ws(k=>{var A;return(A=u.itemTextRefCallback)==null?void 0:A.call(u,k,h.value,h.disabled)}),v=nn(n,g,h.onItemTextChange,y),S=m==null?void 0:m.textContent,x=T.useMemo(()=>_.jsx("option",{value:h.value,disabled:h.disabled,children:S},h.value),[h.disabled,h.value,S]),{onNativeOptionAdd:w,onNativeOptionRemove:C}=d;return Kn(()=>(w(x),()=>C(x)),[w,C,x]),_.jsxs(_.Fragment,{children:[_.jsx(cn.span,{id:h.textId,...a,ref:v}),h.isSelected&&c.valueNode&&!c.valueNodeHasChildren&&!fm(c.value)?gh.createPortal(a.children,c.valueNode):null]})},"SelectItemText")),ide="SelectItemIndicator",rde=T.forwardRef(Wt(function(e,n){const{__scopeSelect:i,...r}=e;return mZ(ide,i).isSelected?_.jsx(cn.span,{"aria-hidden":!0,...r,ref:n}):null},"SelectItemIndicator")),sde="SelectBubbleInput",ode=T.forwardRef(Wt(function({__scopeSelect:e,...n},i){const r=Kl(sde,e),{value:s,onValueChange:a,required:c,disabled:u,name:h,autoComplete:d,form:m,userSelection:g}=r,{nativeOptions:y,nativeSelectKey:v}=r,S=T.useRef(null),x=nn(i,S),w=s??"",C=T.useRef(w),k=T.useRef(g),A=T.useRef(!1),R=Array.from(y).some(P=>(P.props.value??"")==="");return T.useEffect(()=>{const P=S.current;if(!P)return;const N=window.HTMLSelectElement.prototype,D=Object.getOwnPropertyDescriptor(N,"value").set,U=g!==null&&g!==k.current;k.current=g;const V=C.current!==w;C.current=w;const X=U&&V;if(U&&!V&&g.value!==w&&!g.hasConsumerStoppedPropagation&&D){A.current=!0;try{D.call(P,g.value),P.dispatchEvent(new Event("change",{bubbles:!0}))}finally{A.current=!1,D.call(P,w)}return}const ee=X&&!g.hasConsumerStoppedPropagation;if(V&&D){const le=new Event("change",{bubbles:ee});D.call(P,w),P.dispatchEvent(le)}},[w,g]),_.jsxs(cn.select,{"aria-hidden":!0,required:c,tabIndex:-1,name:h,autoComplete:d,disabled:u,form:m,onChange:P=>{A.current||a(P.target.value)},...n,style:{...zfe,...n.style},ref:x,defaultValue:w,children:[fm(s)&&!R?_.jsx("option",{value:""}):null,Array.from(y)]},v)},"SelectBubbleInput"));function gZ(t){return typeof t=="function"}Wt(gZ,"isFunction");function fm(t){return t===""||t===void 0}Wt(fm,"shouldShowPlaceholder");function Ak(t){const e=ws(t),n=T.useRef(""),i=T.useRef(0),r=T.useCallback(a=>{const c=n.current+a;e(c);function u(h){n.current=h,window.clearTimeout(i.current),h!==""&&(i.current=window.setTimeout(()=>u(""),1e3))}Wt(u,"updateSearch"),u(c)},[e]),s=T.useCallback(()=>{n.current="",window.clearTimeout(i.current)},[]);return T.useEffect(()=>()=>window.clearTimeout(i.current),[]),[n,r,s]}Wt(Ak,"useTypeaheadSearch");function Rk(t,e,n){const r=e.length>1&&Array.from(e).every(h=>h===e[0])?e[0]:e,s=n?t.indexOf(n):-1;let a=OZ(t,Math.max(s,0));r.length===1&&(a=a.filter(h=>h!==n));const u=a.find(h=>h.textValue.toLowerCase().startsWith(r.toLowerCase()));return u!==n?u:void 0}Wt(Rk,"findNextItem");function OZ(t,e){return t.map((n,i)=>t[(e+i)%t.length])}Wt(OZ,"wrapArray");function bZ({plan:t,car:e,models:n,mode:i,onCommand:r,labelledBy:s,onOutcome:a}){const c=du(r),[u,h]=T.useState(null),[d,m]=T.useState(e.key);d!==e.key?(m(e.key),h(null)):u!==null&&u===e.model&&h(null);const g=i==="next"?u??e.model:e.model,y=x=>n.findIndex(w=>w.id===x),v=async x=>{if(i==="now"){if(x===e.model)return;const R=`Switching from ${Of(n,e.model)} to ${Of(n,x)}; it runs /compact first.`,P=await c.send({kind:"switch_model",plan:t,agent:e.agent,payload:{model:x}},R);if(!P)return;a==null||a(P.status==="refused"?mp(P):R,P.status==="refused");return}const w=x===e.model,C=w?`Staying on ${Of(n,e.model)}.`:`${y(x)<y(e.model)?"Upgrade":"Downgrade"} to ${Of(n,x)} queued; it applies from the next round.`,k=u;h(w?null:x);const A=await c.send({kind:"set_model",plan:t,agent:e.agent,payload:{model:x}},C);if(!A){h(k);return}A.status==="refused"&&h(k),a==null||a(A.status==="refused"?mp(A):C,A.status==="refused")},S=i==="next"&&u!==null;return _.jsxs($he,{value:g,onValueChange:v,disabled:c.pending,children:[_.jsxs(Lhe,{className:`model-trigger${i==="now"?" is-field":""}${S?" is-changed":""}`,"aria-label":s?void 0:`Model for ${e.agent}${S?`, ${Of(n,g)} from its next round`:""}`,"aria-labelledby":s,title:i==="next"?"Model for its next round":void 0,children:[_.jsx(jhe,{}),_.jsx(Bhe,{"aria-hidden":"true",children:"▾"})]}),_.jsx(Zhe,{children:_.jsx(Vhe,{className:"model-content",position:"popper",sideOffset:4,children:_.jsx(Khe,{children:n.map(x=>_.jsxs(tde,{value:x.id,className:"model-item",children:[_.jsx(rde,{className:"model-check",children:"✓"}),_.jsx(nde,{children:x.label})]},x.id))})})})]})}var ade=Object.defineProperty,mn=(t,e)=>ade(t,"name",{value:e,configurable:!0}),lde=["Enter"," "],cde=["ArrowDown","PageUp","Home"],yZ=["ArrowUp","PageDown","End"],ude=[...cde,...yZ],Vy="Menu",[XE,fde,hde]=ny(Vy),[bu,vZ]=Go(Vy,[hde,jy,ry]),Pk=jy(),SZ=ry(),[dde,hm]=bu(Vy),[pde,Mk]=bu(Vy),mde=mn(t=>{const{__scopeMenu:e,open:n=!1,children:i,dir:r,onOpenChange:s,modal:a=!0}=t,c=Pk(e),[u,h]=T.useState(null),d=T.useRef(!1),m=ws(s),g=Fp(r);return T.useEffect(()=>{const y=mn(()=>{d.current=!0,document.addEventListener("pointerdown",v,{capture:!0,once:!0}),document.addEventListener("pointermove",v,{capture:!0,once:!0})},"handleKeyDown"),v=mn(()=>d.current=!1,"handlePointer");return document.addEventListener("keydown",y,{capture:!0}),()=>{document.removeEventListener("keydown",y,{capture:!0}),document.removeEventListener("pointerdown",v,{capture:!0}),document.removeEventListener("pointermove",v,{capture:!0})}},[]),T.useEffect(()=>{if(!n)return;const y=mn(()=>m(!1),"handleBlur");return window.addEventListener("blur",y),()=>window.removeEventListener("blur",y)},[n,m]),_.jsx(eZ,{...c,children:_.jsx(dde,{scope:e,open:n,onOpenChange:m,content:u,onContentChange:h,children:_.jsx(pde,{scope:e,onClose:T.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:d,dir:g,modal:a,children:i})})})},"Menu"),gde=T.forwardRef(mn(function(e,n){const{__scopeMenu:i,...r}=e,s=Pk(i);return _.jsx(tZ,{...s,...r,ref:n})},"MenuAnchor")),xZ="MenuPortal",[Ode,bde]=bu(xZ,{forceMount:void 0}),yde=mn(t=>{const{__scopeMenu:e,forceMount:n,children:i,container:r}=t,s=hm(xZ,e);return _.jsx(Ode,{scope:e,forceMount:n,children:_.jsx(hu,{present:n||s.open,children:_.jsx(_k,{asChild:!0,container:r,children:i})})})},"MenuPortal"),Ll="MenuContent",[vde,wZ]=bu(Ll),Sde=T.forwardRef(mn(function(e,n){const i=bde(Ll,e.__scopeMenu),{forceMount:r=i.forceMount,...s}=e,a=hm(Ll,e.__scopeMenu),c=Mk(Ll,e.__scopeMenu);return _.jsx(XE.Provider,{scope:e.__scopeMenu,children:_.jsx(hu,{present:r||a.open,children:_.jsx(XE.Slot,{scope:e.__scopeMenu,children:c.modal?_.jsx(xde,{...s,ref:n}):_.jsx(wde,{...s,ref:n})})})})},"MenuContent")),xde=T.forwardRef(mn(function(e,n){const i=hm(Ll,e.__scopeMenu),r=T.useRef(null),s=nn(n,r);return T.useEffect(()=>{const a=r.current;if(a)return Tk(a)},[]),_.jsx(EZ,{...e,ref:s,trapFocus:i.open,disableOutsidePointerEvents:i.open,disableOutsideScroll:!0,onFocusOutside:at(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>i.onOpenChange(!1)})},"MenuRootContentModal")),wde=T.forwardRef(mn(function(e,n){const i=hm(Ll,e.__scopeMenu);return _.jsx(EZ,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>i.onOpenChange(!1)})},"MenuRootContentNonModal")),Ede=Pa("MenuContent.ScrollLock"),EZ=T.forwardRef(mn(function(e,n){const{__scopeMenu:i,loop:r=!1,trapFocus:s,onOpenAutoFocus:a,onCloseAutoFocus:c,disableOutsidePointerEvents:u,onEntryFocus:h,onEscapeKeyDown:d,onPointerDownOutside:m,onFocusOutside:g,onInteractOutside:y,onDismiss:v,disableOutsideScroll:S,...x}=e,w=hm(Ll,i),C=Mk(Ll,i),k=Pk(i),A=SZ(i),R=fde(i),[P,N]=T.useState(null),$=T.useRef(null),[D,U]=T.useState(null);M3(D);const{nodes:V,registry:X}=Ok(),ee=!!(s||S),le=nn(n,$,w.onContentChange,U),re=T.useRef(0),G=T.useRef(""),oe=T.useRef(0),K=T.useRef(null),me=T.useRef("right"),fe=T.useRef(0),Te=T.useMemo(()=>S?[$,...V.map(B=>({current:B}))]:[],[$,V,S]),ze=S?Xy:T.Fragment,tt=S?{as:Ede,allowPinchZoom:!0,shards:Te}:void 0,I=mn(B=>{var Ge,qe;const se=G.current+B,we=R().filter(He=>!He.disabled),_e=document.activeElement,be=(Ge=we.find(He=>He.ref.current===_e))==null?void 0:Ge.textValue,Se=we.map(He=>He.textValue),Ee=AZ(Se,se,be),Ie=(qe=we.find(He=>He.textValue===Ee))==null?void 0:qe.ref.current;function Ye(He){G.current=He,window.clearTimeout(re.current),He!==""&&(re.current=window.setTimeout(()=>Ye(""),1e3))}mn(Ye,"updateSearch"),Ye(se),Ie&&setTimeout(()=>Ie.focus())},"handleTypeaheadSearch");T.useEffect(()=>()=>window.clearTimeout(re.current),[]),um();const ie=T.useCallback(B=>{var we,_e;return me.current===((we=K.current)==null?void 0:we.side)&&PZ(B,(_e=K.current)==null?void 0:_e.area)},[]);return _.jsx(vde,{scope:i,searchRef:G,onItemEnter:T.useCallback(B=>{ie(B)&&B.preventDefault()},[ie]),onItemLeave:T.useCallback(B=>{var se;ie(B)||((se=$.current)==null||se.focus(),N(null))},[ie]),onTriggerLeave:T.useCallback(B=>{ie(B)&&B.preventDefault()},[ie]),pointerGraceTimerRef:oe,onPointerGraceIntentChange:T.useCallback(B=>{K.current=B},[]),children:_.jsx(gk,{registry:ee?X:null,children:_.jsx(ze,{...tt,children:_.jsx(mk,{asChild:!0,trapped:s,branches:V,onMountAutoFocus:at(a,B=>{var se;B.preventDefault(),(se=$.current)==null||se.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:_.jsx(hk,{asChild:!0,disableOutsidePointerEvents:u,onEscapeKeyDown:d,onPointerDownOutside:m,onFocusOutside:g,onInteractOutside:y,onDismiss:v,children:_.jsx(rI,{asChild:!0,...A,dir:C.dir,orientation:"vertical",loop:r,currentTabStopId:P,onCurrentTabStopIdChange:N,onEntryFocus:at(h,B=>{C.isUsingKeyboardRef.current||B.preventDefault()}),preventScrollOnEntryFocus:!0,children:_.jsx(iZ,{role:"menu","aria-orientation":"vertical","data-state":_Z(w.open),"data-radix-menu-content":"",dir:C.dir,...k,...x,ref:le,style:{outline:"none",...x.style},onKeyDown:at(x.onKeyDown,B=>{const we=B.target.closest("[data-radix-menu-content]")===B.currentTarget,_e=B.ctrlKey||B.altKey||B.metaKey,be=B.key.length===1;we&&(B.key==="Tab"&&B.preventDefault(),!_e&&be&&I(B.key));const Se=$.current;if(B.target!==Se||!ude.includes(B.key))return;B.preventDefault();const Ie=R().filter(Ye=>!Ye.disabled).map(Ye=>Ye.ref.current);yZ.includes(B.key)&&Ie.reverse(),kZ(Ie)}),onBlur:at(e.onBlur,B=>{B.currentTarget.contains(B.target)||(window.clearTimeout(re.current),G.current="")}),onPointerMove:at(e.onPointerMove,ty(B=>{const se=B.target,we=fe.current!==B.clientX;if(B.currentTarget.contains(se)&&we){const _e=B.clientX>fe.current?"right":"left";me.current=_e,fe.current=B.clientX}}))})})})})})})})},"MenuContentImpl")),UE="MenuItem",s2="menu.itemSelect",_de=T.forwardRef(mn(function(e,n){const{disabled:i=!1,onSelect:r,...s}=e,a=T.useRef(null),c=Mk(UE,e.__scopeMenu),u=wZ(UE,e.__scopeMenu),h=nn(n,a),d=T.useRef(!1),m=mn(()=>{const g=a.current;if(!i&&g){const y=new CustomEvent(s2,{bubbles:!0,cancelable:!0});g.addEventListener(s2,v=>r==null?void 0:r(v),{once:!0}),r_(g,y),y.defaultPrevented?d.current=!1:c.onClose()}},"handleSelect");return _.jsx(Tde,{...s,ref:h,disabled:i,onClick:at(e.onClick,m),onPointerDown:g=>{var y;(y=e.onPointerDown)==null||y.call(e,g),d.current=!0},onPointerUp:at(e.onPointerUp,g=>{var y;d.current||(y=g.currentTarget)==null||y.click()}),onKeyDown:at(e.onKeyDown,g=>{i||g.target!==g.currentTarget||u.searchRef.current!==""&&g.key===" "||lde.includes(g.key)&&(g.currentTarget.click(),g.preventDefault())})})},"MenuItem")),Tde=T.forwardRef(mn(function(e,n){const{__scopeMenu:i,disabled:r=!1,textValue:s,...a}=e,c=wZ(UE,i),u=SZ(i),h=T.useRef(null),d=nn(n,h),[m,g]=T.useState(!1),[y,v]=T.useState("");return T.useEffect(()=>{const S=h.current;S&&v((S.textContent??"").trim())},[a.children]),_.jsx(XE.ItemSlot,{scope:i,disabled:r,textValue:s??y,children:_.jsx(sI,{asChild:!0,...u,focusable:!r,children:_.jsx(cn.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:d,onPointerMove:at(e.onPointerMove,ty(S=>{r?c.onItemLeave(S):(c.onItemEnter(S),S.defaultPrevented||S.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:at(e.onPointerLeave,ty(S=>c.onItemLeave(S))),onFocus:at(e.onFocus,()=>g(!0)),onBlur:at(e.onBlur,()=>g(!1))})})})},"MenuItemImpl")),kde="MenuRadioGroup",[Tpe,kpe]=bu(kde,{value:void 0,onValueChange:mn(()=>{},"onValueChange")}),Cde="MenuItemIndicator",[Cpe,Ape]=bu(Cde,{checked:!1}),Ade="MenuSub",[Rpe,Ppe]=bu(Ade);function _Z(t){return t?"open":"closed"}mn(_Z,"getOpenState");function TZ(t){return t==="indeterminate"}mn(TZ,"isIndeterminate");function Rde(t){return TZ(t)?"indeterminate":t?"checked":"unchecked"}mn(Rde,"getCheckedState");function kZ(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}mn(kZ,"focusFirst");function CZ(t,e){return t.map((n,i)=>t[(e+i)%t.length])}mn(CZ,"wrapArray");function AZ(t,e,n){const r=e.length>1&&Array.from(e).every(h=>h===e[0])?e[0]:e,s=n?t.indexOf(n):-1;let a=CZ(t,Math.max(s,0));r.length===1&&(a=a.filter(h=>h!==n));const u=a.find(h=>h.toLowerCase().startsWith(r.toLowerCase()));return u!==n?u:void 0}mn(AZ,"getNextMatch");function RZ(t,e){const{x:n,y:i}=t;let r=!1;for(let s=0,a=e.length-1;s<e.length;a=s++){const c=e[s],u=e[a],h=c.x,d=c.y,m=u.x,g=u.y;d>i!=g>i&&n<(m-h)*(i-d)/(g-d)+h&&(r=!r)}return r}mn(RZ,"isPointInPolygon");function PZ(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return RZ(n,e)}mn(PZ,"isPointerInGraceArea");function ty(t){return e=>e.pointerType==="mouse"?t(e):void 0}mn(ty,"whenMouse");var Pde=Object.defineProperty,dm=(t,e)=>Pde(t,"name",{value:e,configurable:!0}),Nk="DropdownMenu",[Mde,Mpe]=Go(Nk,[vZ]),pm=vZ(),[Nde,MZ]=Mde(Nk),NZ=dm(t=>{const{__scopeDropdownMenu:e,children:n,dir:i,open:r,defaultOpen:s,onOpenChange:a,modal:c=!0}=t,u=pm(e),h=T.useRef(null),[d,m]=Hc({prop:r,defaultProp:s??!1,onChange:a,caller:Nk});return _.jsx(Nde,{scope:e,triggerId:Bo(),triggerRef:h,contentId:Bo(),open:d,onOpenChange:m,onOpenToggle:T.useCallback(()=>m(g=>!g),[m]),modal:c,children:_.jsx(mde,{...u,open:d,onOpenChange:m,dir:i,modal:c,children:n})})},"DropdownMenu"),Qde="DropdownMenuTrigger",QZ=T.forwardRef(dm(function(e,n){const{__scopeDropdownMenu:i,disabled:r=!1,...s}=e,a=MZ(Qde,i),c=pm(i),u=nn(n,a.triggerRef);return _.jsx(gde,{asChild:!0,...c,children:_.jsx(cn.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...s,ref:u,onPointerDown:at(e.onPointerDown,h=>{!r&&h.button===0&&h.ctrlKey===!1&&(a.onOpenToggle(),a.open||h.preventDefault())}),onKeyDown:at(e.onKeyDown,h=>{r||(["Enter"," "].includes(h.key)&&a.onOpenToggle(),h.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(h.key)&&h.preventDefault())})})})},"DropdownMenuTrigger")),$Z=dm(t=>{const{__scopeDropdownMenu:e,...n}=t,i=pm(e);return _.jsx(yde,{...i,...n})},"DropdownMenuPortal"),$de="DropdownMenuContent",DZ=T.forwardRef(dm(function(e,n){const{__scopeDropdownMenu:i,...r}=e,s=MZ($de,i),a=pm(i),c=T.useRef(!1);return _.jsx(Sde,{id:s.contentId,"aria-labelledby":s.triggerId,...a,...r,ref:n,onCloseAutoFocus:at(e.onCloseAutoFocus,u=>{var h;c.current||(h=s.triggerRef.current)==null||h.focus(),c.current=!1,u.preventDefault()}),onInteractOutside:at(e.onInteractOutside,u=>{const h=u.detail.originalEvent,d=h.button===0&&h.ctrlKey===!0,m=h.button===2||d;(!s.modal||m)&&(c.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})},"DropdownMenuContent")),LZ=T.forwardRef(dm(function(e,n){const{__scopeDropdownMenu:i,...r}=e,s=pm(i);return _.jsx(_de,{...s,...r,ref:n})},"DropdownMenuItem"));function TO({title:t,sub:e,onSelect:n,danger:i=!1}){return _.jsxs(LZ,{className:`menu-item${i?" menu-danger":""}`,onSelect:n,children:[_.jsx("span",{className:"menu-title",children:t}),_.jsx("span",{className:"menu-sub",children:e})]})}function Dde({contextUsed:t,onAction:e,disabled:n=!1}){const i=t===null?"":`; ${Math.round(t*100)}% of its context used`;return _.jsxs(NZ,{children:[_.jsxs(QZ,{className:"btn",disabled:n,children:["Action ",_.jsx("span",{"aria-hidden":"true",children:"▾"})]}),_.jsx($Z,{children:_.jsxs(DZ,{className:"menu is-up",side:"top",align:"end",sideOffset:6,children:[_.jsx(TO,{title:"Hold for now",sub:"Pause after its current step until you send more",onSelect:()=>e("hold")}),_.jsx(TO,{title:"Wrap up",sub:"Finish the current step, leave a note, then stop",onSelect:()=>e("wrap_up")}),_.jsx(TO,{title:"Compact",sub:`Run /compact now${i}`,onSelect:()=>e("compact")}),_.jsx(TO,{title:"Stop agent",sub:"Stop now; it gets 60 seconds to leave a resume note",onSelect:()=>e("stop"),danger:!0})]})})]})}const ZE=(t,e)=>t.reduce((n,i)=>i===e?n+1:n,0);function Lde(t,e,n){return[{text:n,base:ZE(e,n)+ZE(t.map(i=>i.text),n)},...t]}function o2(t,e){return t.filter(n=>ZE(e,n.text)<=n.base)}const a2={hold:"Asked to hold for now.",wrap_up:"Asked to wrap up.",stop:"Asked to stop."},l2=t=>t.status==="done"?"Compacted its context.":"Asked to compact its context; it runs /compact at its next step.";function Ide({plan:t,question:e,onCommand:n,onAnswered:i}){var s;const r=w3(t,e,n,i);return _.jsxs("div",{className:"d-block",children:[_.jsx("p",{children:_.jsx("strong",{children:"Blocked on your answer."})}),_.jsx("div",{className:"ask-text",dangerouslySetInnerHTML:{__html:fk(e.body)}}),r.yesNo?_.jsx(E3,{answers:e.answers??[],onChoose:r.choose,onWords:()=>r.update({inWords:!0}),disabled:r.command.pending}):_.jsxs(_.Fragment,{children:[_.jsx(_3,{id:`d-${e.id}`,value:r.state.draft,onChange:r.setDraft,onSend:r.answer,invalid:r.invalid}),_.jsx("div",{className:"ask-actions",children:_.jsx("button",{type:"button",className:"btn btn-primary","aria-keyshortcuts":Hb(),disabled:r.command.pending,onClick:r.answer,children:"Send answer"})})]}),_.jsx(pu,{outcome:((s=r.command.outcome)==null?void 0:s.tone)==="refused"?r.command.outcome:null,announced:r.command.announced})]})}function jde({plan:t,car:e,models:n,autocompact:i,onCommand:r,onClose:s}){const a={title:T.useId(),model:T.useId(),message:T.useId()},c=du(r),[u,h]=T.useState({key:e.key,lines:[]}),d=T.useRef(e.history);T.useEffect(()=>{d.current=e.history},[e.history]);const[m,g]=T.useState(""),[y,v]=T.useState(null),S=T.useRef(null),x=T.useRef(null);T.useEffect(()=>{var X;(X=S.current)==null||X.focus()},[e.key]);const w=o2(u.key===e.key?u.lines:[],e.history).map(X=>X.text);T.useEffect(()=>{h(X=>{const ee=o2(X.lines,e.history);return ee.length===X.lines.length?X:{...X,lines:ee}})},[e.history]);const C=X=>h(ee=>({key:e.key,lines:Lde(ee.key===e.key?ee.lines:[],d.current,X)})),k=X=>C(`you: ${X}`),A=(X,ee)=>{ee?v({tone:"refused",text:X}):(v(null),k(X))},R=t.questions.find(X=>X.agent===e.agent),[P]=Y_((R==null?void 0:R.id)??""),N=e.state==="stuck"&&R&&!P.settled,$=e.context!==null&&e.context_limit?e.context/e.context_limit:null,D=async X=>{const ee=await c.send({kind:X,plan:t.ordinal,agent:e.agent,payload:{}},X==="compact"?l2:a2[X]);ee&&A(ee.status==="refused"?mp(ee):X==="compact"?l2(ee):a2[X],ee.status==="refused")},U=async X=>{var re;X==null||X.preventDefault();const ee=m.trim();if(!ee){(re=x.current)==null||re.focus();return}const le=await c.send({kind:"message",plan:t.ordinal,agent:e.agent,payload:{text:ee}},`Message sent to ${e.agent}.`);if(le){if(le.status==="refused"){A(mp(le),!0);return}A(ee,!1),g("")}},V=X=>{X.key==="Escape"&&(X.target.closest('[role="menu"], [role="listbox"]')||s())};return _.jsxs("aside",{className:"drawer","aria-labelledby":a.title,onKeyDown:V,children:[_.jsxs("div",{className:"drawer-head",children:[_.jsxs("div",{children:[_.jsx("h2",{id:a.title,children:e.agent}),_.jsxs("p",{className:"drawer-meta",children:[t.ordinal," ",t.title,". Model ",Of(n,e.model),"."]})]}),_.jsx("button",{type:"button",className:"btn btn-quiet",ref:S,onClick:s,children:"Close"})]}),_.jsxs("div",{className:"d-model",children:[_.jsx("label",{id:a.model,children:"Model"}),_.jsx(bZ,{plan:t.ordinal,car:e,models:n,mode:"now",onCommand:r,labelledBy:a.model,onOutcome:A}),_.jsx("p",{className:"d-model-help",children:"Switches this agent now, then runs /compact."})]}),_.jsxs("div",{className:"drawer-stats",children:[_.jsxs("div",{children:["Tokens in",_.jsx("strong",{children:bO(e.up)})]}),_.jsxs("div",{children:["Tokens out",_.jsx("strong",{children:bO(e.down)})]}),_.jsxs("div",{children:["Elapsed",_.jsx("strong",{children:aue(e.elapsed)})]})]}),_.jsxs("div",{className:"d-context",children:[$===null?_.jsxs("p",{children:["Context ",_.jsx("strong",{children:"not reported"})," by this adapter."]}):_.jsxs("p",{children:["Context ",_.jsxs("strong",{children:[Math.round($*100),"%"]})," ",_.jsxs("span",{children:["of ",bO(e.context_limit??0),", ",bO(e.context??0)," used. Autocompacts at ",Math.round(i*100),"%."]})]}),_.jsxs("div",{className:"d-ctx-bar","aria-hidden":"true",children:[_.jsx("i",{style:{width:`${Math.min(1,$??0)*100}%`}}),_.jsx("b",{title:"Autocompacts here",style:{left:`${i*100}%`}})]})]}),N&&_.jsx(Ide,{plan:t,question:R,onCommand:r,onAnswered:X=>C(`You answered: ${X}`)}),_.jsx("ol",{className:"transcript","aria-live":"polite","aria-label":`Transcript of ${e.agent}`,children:[...w,...e.history].map((X,ee)=>_.jsx("li",{children:X},ee))}),_.jsxs("form",{className:"composer",onSubmit:U,children:[_.jsxs("label",{htmlFor:a.message,children:["Message ",e.agent]}),_.jsx("textarea",{id:a.message,ref:x,value:m,onChange:X=>g(X.target.value),onKeyDown:X=>{S3(X)&&(X.preventDefault(),U())},placeholder:`It reads this at its next step. ${Ny()} sends it.`}),_.jsxs("div",{className:"composer-actions",children:[_.jsx("button",{type:"submit",className:"btn btn-primary","aria-keyshortcuts":Hb(),disabled:c.pending,children:"Send message"}),_.jsx(Dde,{contextUsed:$,onAction:D,disabled:c.pending})]}),_.jsx(pu,{outcome:y,announced:c.announced})]})]})}var Bde=Object.defineProperty,kr=(t,e)=>Bde(t,"name",{value:e,configurable:!0}),Qk="Dialog",[IZ,Npe]=Go(Qk),[zde,Js]=IZ(Qk),$k=kr(t=>{const{__scopeDialog:e,children:n,open:i,defaultOpen:r,onOpenChange:s,modal:a=!0}=t,c=T.useRef(null),u=T.useRef(null),{nodes:h,registry:d}=Ok(),[m,g]=Hc({prop:i,defaultProp:r??!1,onChange:s,caller:Qk}),[y,v]=T.useState(0),[S,x]=T.useState(0);return _.jsx(zde,{scope:e,triggerRef:c,contentRef:u,contentId:Bo(),titleId:Bo(),descriptionId:Bo(),titlePresent:y>0,descriptionPresent:S>0,setTitleCount:v,setDescriptionCount:x,open:m,onOpenChange:g,onOpenToggle:T.useCallback(()=>g(w=>!w),[g]),modal:a,branchNodes:h,branchRegistry:d,children:n})},"Dialog"),Xde="DialogTrigger",jZ=T.forwardRef(kr(function(e,n){const{__scopeDialog:i,...r}=e,s=Js(Xde,i),a=nn(n,s.triggerRef);return _.jsx(cn.button,{type:"button","aria-haspopup":"dialog","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":qy(s.open),...r,ref:a,onClick:at(e.onClick,s.onOpenToggle)})},"DialogTrigger")),BZ="DialogPortal",[Ude,zZ]=IZ(BZ,{forceMount:void 0}),Zde=kr(t=>{const{__scopeDialog:e,forceMount:n,children:i,container:r}=t,s=Js(BZ,e);return _.jsx(Ude,{scope:e,forceMount:n,children:T.Children.map(i,a=>_.jsx(hu,{present:n||s.open,children:_.jsx(_k,{asChild:!0,container:r,children:a})}))})},"DialogPortal"),VE="DialogOverlay",Vde=T.forwardRef(kr(function(e,n){const i=zZ(VE,e.__scopeDialog),{forceMount:r=i.forceMount,...s}=e,a=Js(VE,e.__scopeDialog);return a.modal?_.jsx(hu,{present:r||a.open,children:_.jsx(Yde,{...s,ref:n})}):null},"DialogOverlay")),qde=Pa("DialogOverlay.RemoveScroll"),Yde=T.forwardRef(kr(function(e,n){const{__scopeDialog:i,...r}=e,s=Js(VE,i),a=C3(),c=nn(n,a);return _.jsx(Xy,{as:qde,allowPinchZoom:!0,shards:T.useMemo(()=>[s.contentRef,...s.branchNodes.map(u=>({current:u}))],[s.contentRef,s.branchNodes]),children:_.jsx(cn.div,{"data-state":qy(s.open),...r,ref:c,style:{pointerEvents:"auto",...r.style}})})},"DialogOverlayImpl")),zp="DialogContent",Gde=T.forwardRef(kr(function(e,n){const i=zZ(zp,e.__scopeDialog),{forceMount:r=i.forceMount,...s}=e,a=Js(zp,e.__scopeDialog);return _.jsx(hu,{present:r||a.open,children:a.modal?_.jsx(Fde,{...s,ref:n}):_.jsx(Hde,{...s,ref:n})})},"DialogContent")),Fde=T.forwardRef(kr(function(e,n){const i=Js(zp,e.__scopeDialog),r=T.useRef(null),s=nn(n,i.contentRef,r);return T.useEffect(()=>{const a=r.current;if(a)return Tk(a)},[]),_.jsx(XZ,{...e,ref:s,trapFocus:i.open,disableOutsidePointerEvents:i.open,onCloseAutoFocus:at(e.onCloseAutoFocus,a=>{var c;a.preventDefault(),(c=i.triggerRef.current)==null||c.focus()}),onPointerDownOutside:at(e.onPointerDownOutside,a=>{const c=a.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0;(c.button===2||u)&&a.preventDefault()}),onFocusOutside:at(e.onFocusOutside,a=>a.preventDefault())})},"DialogContentModal")),Hde=T.forwardRef(kr(function(e,n){const i=Js(zp,e.__scopeDialog),r=T.useRef(!1),s=T.useRef(!1);return _.jsx(XZ,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var c,u;(c=e.onCloseAutoFocus)==null||c.call(e,a),a.defaultPrevented||(r.current||(u=i.triggerRef.current)==null||u.focus(),a.preventDefault()),r.current=!1,s.current=!1},onInteractOutside:a=>{var h,d;(h=e.onInteractOutside)==null||h.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(s.current=!0));const c=a.target;((d=i.triggerRef.current)==null?void 0:d.contains(c))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&s.current&&a.preventDefault()}})},"DialogContentNonModal")),XZ=T.forwardRef(kr(function(e,n){const{__scopeDialog:i,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:a,"aria-describedby":c,children:u,...h}=e,d=Js(zp,i);return um(),_.jsx(gk,{registry:d.branchRegistry,children:_.jsx(mk,{asChild:!0,loop:!0,trapped:r,branches:d.branchNodes,onMountAutoFocus:s,onUnmountAutoFocus:a,children:_.jsx(hk,{role:"dialog",id:d.contentId,"aria-labelledby":d.titlePresent?d.titleId:void 0,"aria-describedby":d.descriptionPresent?UZ(c,d.descriptionId):c,"data-state":qy(d.open),...h,ref:n,deferPointerDownOutside:!0,onDismiss:()=>d.onOpenChange(!1),children:u})})})},"DialogContentImpl")),Wde=T.forwardRef(kr(function(e,n){const{__scopeDialog:i,...r}=e,s=Js("DialogTitle",i),{setTitleCount:a}=s;return Kn(()=>(a(c=>c+1),()=>a(c=>c-1)),[a]),_.jsx(cn.h2,{id:s.titleId,...r,ref:n})},"DialogTitle")),Dk=T.forwardRef(kr(function(e,n){const{__scopeDialog:i,...r}=e,s=Js("DialogDescription",i),{setDescriptionCount:a}=s;return Kn(()=>(a(c=>c+1),()=>a(c=>c-1)),[a]),_.jsx(cn.p,{id:s.descriptionId,...r,ref:n})},"DialogDescription")),Kde="DialogClose",Lk=T.forwardRef(kr(function(e,n){const{__scopeDialog:i,...r}=e,s=Js(Kde,i);return _.jsx(cn.button,{type:"button",...r,ref:n,onClick:at(e.onClick,()=>s.onOpenChange(!1))})},"DialogClose"));function UZ(...t){const e=new Set;for(const n of t)if(typeof n=="string")for(const i of String(n).trim().split(/\s+/))i&&e.add(i);return e.size>0?Array.from(e).join(" "):void 0}kr(UZ,"concatAriaDescribedby");function qy(t){return t?"open":"closed"}kr(qy,"getState");function ZZ({open:t,onOpenChange:e}){const[n,i]=T.useState(!1);return[t??n,r=>{i(r),e==null||e(r)}]}function Ik({className:t,title:e,description:n,children:i,onOpenAutoFocus:r}){return _.jsxs(Zde,{children:[_.jsx(Vde,{className:"dialog-overlay"}),_.jsxs(Gde,{className:`start ${t}`,onOpenAutoFocus:r,children:[_.jsxs("div",{className:"start-head",children:[_.jsx(Wde,{asChild:!0,children:_.jsx("h2",{children:e})}),n]}),i]})]})}function Jde({agents:t,plans:e,onCommand:n,...i}){var h;const[r,s]=ZZ(i),a=du(n),c=T.useRef(null),u=async()=>{const d=await a.send({kind:"stop_all",plan:null,agent:null,payload:{}},`Stopping ${t} agents on this machine.`);d&&d.status!=="refused"&&s(!1)};return _.jsxs($k,{open:r,onOpenChange:d=>{d&&a.setOutcome(null),s(d)},children:[_.jsx(jZ,{className:"btn btn-alarm",title:"Stops every agent on this machine. Other machines keep running.",children:"Stop All Local"}),_.jsxs(Ik,{className:"confirm",title:"Stop all local agents?",onOpenAutoFocus:d=>{var m;d.preventDefault(),(m=c.current)==null||m.focus()},children:[_.jsxs("div",{className:"help-body",children:[_.jsxs(Dk,{children:["Are you sure you want to shut down ",t," agents currently working on ",e," plans? This only affects this machine."]}),_.jsx(pu,{outcome:((h=a.outcome)==null?void 0:h.tone)==="refused"?a.outcome:null,announced:a.announced})]}),_.jsxs("div",{className:"help-foot",children:[_.jsx(Lk,{className:"btn btn-quiet",ref:c,children:"Cancel"}),_.jsx("button",{type:"button",className:"btn btn-alarm",disabled:a.pending,onClick:u,children:"Stop them"})]})]})]})}function epe(t){const[e,n]=ZZ(t);return _.jsxs($k,{open:e,onOpenChange:n,children:[_.jsx(jZ,{className:"btn btn-quiet help-pill","aria-label":"How this works",children:"?"}),_.jsxs(Ik,{className:"help",title:"How this works",description:_.jsx(Dk,{asChild:!0,children:_.jsx("p",{children:"Draft copy, to be replaced by the author's."})}),children:[_.jsxs("div",{className:"help-body",children:[_.jsxs("p",{children:[_.jsx("strong",{children:"This is a distributed software factory."})," Every machine that runs agentilda on this repository and points at the same Redis works on the same set of plans, side by side."]}),_.jsxs("p",{children:[_.jsxs("strong",{children:["You join by sharing ",_.jsx("code",{children:"$REDIS_URL"}),"."]})," There is no other mechanism: no invitation, no accounts. Anyone who connects to that Redis from a clone of the same GitHub repository is in, and shows up here as a machine of their own."]}),_.jsxs("p",{children:[_.jsx("strong",{children:"Nobody can be kept out or kicked out."})," This is not a policy enforcement system. It assumes everyone around is friendly: other machines are shown read only, and a plan one machine is working on is left alone by the rest, by agreement, not by force."]}),_.jsxs("p",{children:[_.jsx("strong",{children:"Stop All Local"})," stops the agents on this machine only. The other machines keep running."]})]}),_.jsx("div",{className:"help-foot",children:_.jsx(Lk,{className:"btn btn-primary",children:"Got it"})})]})]})}const tpe={lane:"full",research:!1,frontend:"auto",depth:"auto"},Bd={lane:{full:"Complex feature engaging all agents; costs the most in tokens.",plan:"A spec you already trust: skip research and go straight to the plan.",quick:"A small task for a junior engineer, not a feature. Cheapest and fastest."},research:{true:"Yes adds a research section to the spec. It takes more time, but provides additional context when needed.",false:"No sends the spec straight to the copywriter, with no additional research. For when you know what you are doing.",skipped:"The plan and quick lanes skip research, so there is nothing to choose."},frontend:{auto:"Plans UI work automatically, when it improves the final result.",true:"A full-stack feature with a front-end component.",false:"A back-end-only feature or task."},depth:{auto:"Maps to the model's effort; the default comes from the plan.",fast:"Low effort.",medium:"High effort.",deep:"xHigh effort."}};function kO({name:t,legend:e,options:n,value:i,onChange:r,help:s,disabled:a=!1}){const c=T.useId();return _.jsxs("fieldset",{"aria-describedby":`${c}-help`,children:[_.jsx("legend",{children:e}),_.jsx("div",{className:"choice",children:n.map(([u,h,d])=>_.jsxs("label",{children:[_.jsx("input",{type:"radio",name:`${c}-${t}`,value:u,checked:i===u,disabled:a,onChange:()=>r(u)}),_.jsxs("span",{children:[d&&_.jsx("i",{className:"dot",style:{background:d}}),h]})]},u))}),_.jsx("p",{className:"choice-help",id:`${c}-help`,children:s})]})}function npe({value:t,onChange:e}){const n=t.lane!=="full",i=r=>e({...t,...r});return _.jsxs("div",{className:"fm-form",children:[_.jsx("span",{className:"lbl",children:"Every plan from this idea starts with these settings. You can change them per plan."}),_.jsxs("div",{className:"fm-row",children:[_.jsx(kO,{name:"lane",legend:"Lane",value:t.lane,help:Bd.lane[t.lane],onChange:r=>i({lane:r}),options:[["full","Full","var(--lane-full)"],["plan","Plan","var(--lane-plan)"],["quick","Quick","var(--lane-quick)"]]}),_.jsx(kO,{name:"research",legend:"Research?",value:n?"false":String(t.research),disabled:n,help:n?Bd.research.skipped:Bd.research[t.research?"true":"false"],onChange:r=>i({research:r==="true"}),options:[["true","Yes"],["false","No"]]}),_.jsx(kO,{name:"frontend",legend:"Front end",value:t.frontend,help:Bd.frontend[t.frontend],onChange:r=>i({frontend:r}),options:[["auto","Plan decides"],["true","Yes"],["false","No"]]}),_.jsx(kO,{name:"depth",legend:"Depth",value:t.depth,help:Bd.depth[t.depth],onChange:r=>i({depth:r}),options:[["auto","Default"],["fast","Fast"],["medium","Medium"],["deep","Deep"]]})]})]})}const ipe="Write it in Markdown, as much or as little as you like. A short idea becomes one plan; a long one goes to palpatine-planner, who breaks it into plans for you to check.";function rpe({open:t,onOpenChange:e,onCommand:n}){var m;const[i,r]=T.useState(""),[s,a]=T.useState(tpe),[c,u]=T.useState(!1),h=du(n),d=async()=>{if(!i.trim()){u(!0);return}const g={...s,research:s.lane==="full"&&s.research},y=await h.send({kind:"create_plans",plan:null,agent:null,payload:{idea:i.trim(),frontmatter:g}},"Idea sent. Its plans join this run as they are created.");y&&y.status!=="refused"&&(r(""),e(!1))};return _.jsx($k,{open:t,onOpenChange:e,children:_.jsxs(Ik,{className:"idea",title:"What is the product or feature you'd like to build?",description:_.jsx(Dk,{asChild:!0,children:_.jsx("p",{children:c?"Write the idea first. A sentence is enough.":ipe})}),children:[_.jsxs("div",{className:"start-body",children:[_.jsx(npe,{value:s,onChange:a}),_.jsx(y3,{value:i,onChange:g=>{u(!1),r(g)},onSubmit:d,label:"Your idea, in Markdown",previewLabel:"Preview of your idea",invalid:c,autoFocus:!0,height:"min(52vh, 460px)",placeholder:`# A household budget app
191
+
192
+ Families track shared spending...
193
+
194
+ ## Accounts
195
+ - Import bank statements
196
+
197
+ ${Ny()} sends it.`}),_.jsx(pu,{outcome:((m=h.outcome)==null?void 0:m.tone)==="refused"?h.outcome:null,announced:h.announced})]}),_.jsxs("div",{className:"start-foot",children:[_.jsx("span",{className:"grow",children:"This creates the plans and adds them to this run."}),_.jsx(Lk,{className:"btn btn-quiet",children:"Cancel"}),_.jsx("button",{type:"button",className:"btn btn-primary",disabled:h.pending,onClick:d,children:"Break it into plans"})]})]})})}function CO({title:t,sub:e,onSelect:n,className:i=""}){return _.jsxs(LZ,{className:`menu-item ${i}`,onSelect:n,children:[_.jsx("span",{className:"menu-title",children:t}),e&&_.jsx("span",{className:"menu-sub",children:e})]})}function spe({backlog:t,onCommand:e,note:n,ideaOpen:i,onIdeaOpenChange:r}){const[s,a]=T.useState(!1),[c,u]=T.useState("main"),[h,d]=T.useState(""),[m,g]=T.useState(!1),y=i??m,v=P=>{g(P),r==null||r(P)},S=du(e),x=T.useRef(null),w=P=>{a(P),P||(u("main"),d(""))},C=h.trim().toLowerCase(),k=t.filter(P=>!C||`${P.ordinal} ${P.title}`.toLowerCase().includes(C)),A=async P=>{await S.send({kind:"add_plan",plan:P,agent:null,payload:{ordinal:P}},`${P} added to this run.`)},R=P=>{var N,$;P.key==="Escape"||P.key==="Tab"||(P.stopPropagation(),P.key==="ArrowDown"&&(P.preventDefault(),($=(N=P.currentTarget.parentElement)==null?void 0:N.querySelector('[role="menuitem"]:not(.menu-back)'))==null||$.focus()))};return _.jsxs(_.Fragment,{children:[_.jsxs(NZ,{open:s,onOpenChange:w,children:[_.jsxs(QZ,{className:"btn",children:["Action ",_.jsx("span",{"aria-hidden":"true",children:"▾"})]}),_.jsx($Z,{children:_.jsx(DZ,{className:"menu",align:"end",sideOffset:6,loop:!0,children:c==="main"?_.jsxs(_.Fragment,{children:[_.jsx(CO,{title:"New idea",sub:"Describe it here; plans are created for you",onSelect:()=>v(!0)}),_.jsx(CO,{title:"Choose an existing plan",sub:"Add a plan from .plans to this run",onSelect:P=>{P.preventDefault(),u("plans"),setTimeout(()=>{var N;return(N=x.current)==null?void 0:N.focus()})}})]}):_.jsxs(_.Fragment,{children:[_.jsx(CO,{title:"← Back",className:"menu-back",onSelect:P=>{P.preventDefault(),u("main"),d("")}}),_.jsx("input",{ref:x,className:"menu-filter",type:"search","aria-label":"Filter plans",placeholder:"Filter, e.g. 012 or linear",value:h,onChange:P=>d(P.target.value),onKeyDown:R}),k.map(P=>{const N=lue.has(P.status.emoji);return _.jsx(CO,{title:`${P.ordinal} ${P.title}`,sub:`${P.status.label}, ${P.lane}${N?`, blocked ${P.status.emoji}`:""}`,onSelect:()=>void A(P.ordinal)},P.ordinal)}),t.length===0&&_.jsx("p",{className:"menu-note",children:"Nothing to add: every open plan is already being worked on."}),t.length>0&&k.length===0&&_.jsxs("p",{className:"menu-note",children:["No plan matches “",h,"”."]}),n&&_.jsx("p",{className:"menu-note",children:n})]})})})]}),_.jsx(pu,{outcome:S.outcome,announced:S.announced}),_.jsx(rpe,{open:y,onOpenChange:v,onCommand:e})]})}const VZ="agentilda-merged",AO=t=>`node:${t}`;function ope(){try{return localStorage.getItem(VZ)==="1"}catch{return!1}}function ape(t){try{localStorage.setItem(VZ,t?"1":"0")}catch{}}function lpe({board:t,connection:e,fixture:n}){var ie;const{me:i,others:r}=t,{announce:s}=SB(),a=U_()??!1,c=f8(),u=T.useCallback(B=>c.mutateAsync(B),[c]),h=jN(i.plans,a),d=T.useMemo(()=>r.flatMap(B=>B.plans.map(se=>({...se,ordinal:hy(B.node.id,se.ordinal)}))),[r]),m=jN(d,a);K8(i,s);const[g,y]=T.useState("board"),[v,S]=T.useState(ope),[x,w]=T.useState(null),[C,k]=T.useState(null),[A,R]=T.useState(null),[P,N]=T.useState(()=>window.location.hash==="#start"),$=T.useRef(!1),D=T.useMemo(()=>x8(i.plans),[i.plans]),V=["board","logs",...D.map(_d),...r.map(B=>AO(B.node.id))].includes(g)?g:"board",X=((ie=i.log.at(-1))==null?void 0:ie.at)??null;T.useEffect(()=>{(V==="logs"||A===null)&&R(X??"")},[V,X,A]);const ee=A===null?0:i.log.filter(B=>(B.level==="warn"||B.level==="error")&&B.at>A).length,le=T.useCallback(B=>{S(B),ape(B),B&&y("board"),s(B?"Showing every machine's plans. Theirs are below ours, read only.":"Showing this machine's plans only.")},[s]),re=x&&i.plans.find(B=>B.ordinal===x.plan),G=re?re.cars.find(B=>B.agent===(x==null?void 0:x.agent)):void 0,oe=C?i.plans.find(B=>B.ordinal===C)??null:null,K=T.useCallback((B,se)=>w({plan:B.ordinal,agent:se.agent}),[]),me=T.useCallback(()=>{var se;const B=x;w(null),B&&((se=document.querySelector(`[data-car="${B.plan}/${B.agent}"] .car-open`))==null||se.focus())},[x]),fe=T.useCallback(B=>{var _e;if(C===B.ordinal){k(null);return}k(B.ordinal);const se=B.questions[0],we=se?se.body||se.heading:`you interrupted ${((_e=B.interrupted)==null?void 0:_e.agent)??"its agent"}`;s(`${Ss(B.ordinal)} needs you: ${we}`)},[C,s]),Te=T.useCallback(()=>{var se;const B=C;k(null),B&&((se=document.querySelector(`.pill[data-plan="${B}"]`))==null||se.focus())},[C]),ze=T.useCallback(B=>{var _e;gh.flushSync(()=>y("board"));const se=document.getElementById(pB(B.ordinal));se==null||se.scrollIntoView({behavior:a?"auto":"smooth",block:"center"});const we=B.cars.find(be=>be.state==="stuck"||be.state==="failed");if(we){K(B,we);return}(_e=se==null?void 0:se.querySelector(".car-open, .pr-link"))==null||_e.focus({preventScroll:!0})},[a,K]),tt=T.useCallback((B,se)=>_.jsx(bZ,{plan:B.ordinal,car:se,models:i.models,mode:"next",onCommand:u}),[i.models,u]),I=i.plans.map(B=>B.cars.filter(E8).length).filter(B=>B>0);return _.jsxs(_.Fragment,{children:[_.jsx(X8,{snapshot:i,connection:e,fixture:n,merged:v,onToggleMerged:()=>le(!v),actionMenu:_.jsx(spe,{backlog:i.backlog,onCommand:u,note:H8(t),ideaOpen:P,onIdeaOpenChange:N}),stopAll:_.jsx(Jde,{agents:I.reduce((B,se)=>B+se,0),plans:I.length,onCommand:u}),help:_.jsx(epe,{})}),_.jsxs(d9,{className:"tabs-root",value:V,onValueChange:y,children:[_.jsxs(m9,{className:"tabs","aria-label":"Views",children:[_.jsx($g,{className:"tab",value:"board",children:"Board"}),_.jsxs($g,{className:"tab",value:"logs",children:["Logs",_.jsx("span",{className:"tab-count",title:"Warnings and errors since you last looked",children:ee||""})]}),D.map(B=>_.jsxs($g,{className:"tab",value:_d(B),title:`${B.car.agent} ran ${B.cmd}`,children:[w8(B,D),_.jsxs("span",{className:"run-chip",children:[B.done," of ",B.total]})]},_d(B))),r.map(B=>{const se=AO(B.node.id),we=()=>{$.current=V===se};return _.jsx($g,{className:"tab tab-machine",value:se,title:`Read only: what ${Es(B.node)} is working on. Press again to see every machine.`,onPointerDown:we,onKeyDown:_e=>(_e.key==="Enter"||_e.key===" ")&&we(),onClick:()=>{$.current&&le(!0),$.current=!1},children:Es(B.node)},se)})]}),_.jsx(Oue,{plan:oe,onCommand:u,onClose:Te}),_.jsxs("main",{className:"layout",children:[_.jsx(Dg,{value:"board",className:"board",forceMount:!0,hidden:V!=="board",children:_.jsx(N8,{board:t,merged:v,retiring:h.retiring,gone:h.gone,theirs:m,openCar:re&&G?G.key:null,onOpenCar:K,renderModel:tt})}),r.map(B=>_.jsx(Dg,{value:AO(B.node.id),className:"board",children:_.jsx($8,{their:B,me:i,life:m})},B.node.id)),_.jsx(Dg,{value:"logs",className:"logs",forceMount:!0,hidden:V!=="logs",children:_.jsx(V8,{lines:i.log})}),D.map(B=>_.jsx(Dg,{value:_d(B),className:"tests",children:_.jsx(F8,{run:B})},_d(B))),re&&G?_.jsx(jde,{plan:re,car:G,models:i.models,autocompact:i.autocompact,onCommand:u,onClose:me}):_.jsx(gue,{plans:i.plans,onCommand:u})]})]}),_.jsx(G8,{plans:i.plans,stations:i.stations,others:r,gone:h.gone,offBar:h.offBar,finishOrder:h.finishOrder,unblocking:C,onToggleUnblock:fe,onShowPlan:ze,onOpenMachine:B=>y(AO(B)),onDropGone:h.dropFromBar})]})}function cpe(){const{board:t,waiting:e,error:n,connection:i,fixture:r}=l8();return _.jsx(aH,{reducedMotion:"user",children:_.jsx(J8,{children:t?_.jsx(lpe,{board:t,connection:i,fixture:r}):n?_.jsxs("main",{className:"loading is-error",role:"alert",children:["Could not load the board: ",n.message,". Is tilda run (or tilda web --demo) running?"]}):_.jsx("main",{className:"loading","aria-busy":"true",children:e?"Waiting for the engine to publish…":"Connecting to the engine…"})})})}const upe="/assets/favicon-C8pAuqqr.png",jk=document.querySelector("link[rel~='icon']")??document.head.appendChild(document.createElement("link"));jk.rel="icon";jk.type="image/png";jk.href=upe;Nq.createRoot(document.getElementById("root")).render(_.jsx(T.StrictMode,{children:_.jsx(Qq,{client:r8(),children:_.jsx(cpe,{})})}));export{eU as C,Wr as E,It as I,oh as L,n5 as N,lh as a,vie as b,WO as c,OX as d,fh as e,Th as f,rn as g,Zb as h,_h as i,Hee as j,Fee as k,f5 as l,br as m,Ae as n,ce as o,BU as p,i5 as q,gU as r,wh as s,L as t,w5 as u,xs as v};
198
+ //# sourceMappingURL=index-CI74IkWP.js.map