@cursor/bdk 0.2.6 → 0.2.7

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 (335) hide show
  1. package/dist/bin/agent-serve.js +52 -57
  2. package/dist/channels/github/github-channel.d.ts.map +1 -1
  3. package/dist/channels/github/github-channel.js +34 -8
  4. package/dist/channels/github/types.d.ts +6 -0
  5. package/dist/channels/github/types.d.ts.map +1 -1
  6. package/dist/channels/slack/dispatch.d.ts.map +1 -1
  7. package/dist/channels/slack/dispatch.js +37 -29
  8. package/dist/channels/slack/external-policy.d.ts.map +1 -1
  9. package/dist/channels/slack/external-policy.js +6 -6
  10. package/dist/channels/slack/inbound.d.ts +5 -0
  11. package/dist/channels/slack/inbound.d.ts.map +1 -1
  12. package/dist/channels/slack/inbound.js +13 -0
  13. package/dist/channels/slack/index.d.ts +3 -0
  14. package/dist/channels/slack/index.d.ts.map +1 -1
  15. package/dist/channels/slack/index.js +3 -0
  16. package/dist/channels/slack/log.d.ts +1 -1
  17. package/dist/channels/slack/log.js +1 -1
  18. package/dist/channels/slack/self-identity.d.ts +15 -0
  19. package/dist/channels/slack/self-identity.d.ts.map +1 -0
  20. package/dist/channels/slack/self-identity.js +48 -0
  21. package/dist/channels/slack/sender-name.d.ts +17 -0
  22. package/dist/channels/slack/sender-name.d.ts.map +1 -0
  23. package/dist/channels/slack/sender-name.js +87 -0
  24. package/dist/channels/slack/setup.js +1 -1
  25. package/dist/channels/slack/user-info.d.ts +15 -0
  26. package/dist/channels/slack/user-info.d.ts.map +1 -0
  27. package/dist/channels/slack/user-info.js +57 -0
  28. package/dist/docs/404.html +2 -2
  29. package/dist/docs/assets/{app.CJLKDVza.js → app.oyjtOr3W.js} +4 -4
  30. package/dist/docs/assets/chunks/@localSearchIndexroot.C25zYVuc.js +1 -0
  31. package/dist/docs/assets/chunks/{VPLocalSearchBox.BW9mrQmq.js → VPLocalSearchBox.D0P6J_UJ.js} +1 -1
  32. package/dist/docs/assets/chunks/{arc.D8ZOvM1m.js → arc.B0LY1J1h.js} +1 -1
  33. package/dist/docs/assets/chunks/{architectureDiagram-Q4EWVU46.CXEKhLW-.js → architectureDiagram-Q4EWVU46.dPduLUxY.js} +1 -1
  34. package/dist/docs/assets/chunks/{baseUniq.BJkVKblr.js → baseUniq.B_Ohm21h.js} +1 -1
  35. package/dist/docs/assets/chunks/{blockDiagram-DXYQGD6D.DQDbHxor.js → blockDiagram-DXYQGD6D.B4zcanaJ.js} +1 -1
  36. package/dist/docs/assets/chunks/{c4Diagram-AHTNJAMY.ByMD6LYM.js → c4Diagram-AHTNJAMY.D9Iw21nx.js} +1 -1
  37. package/dist/docs/assets/chunks/channel.CRUyWDV-.js +1 -0
  38. package/dist/docs/assets/chunks/{chunk-4BX2VUAB.Dtq1aVI9.js → chunk-4BX2VUAB.DDVwRShI.js} +1 -1
  39. package/dist/docs/assets/chunks/{chunk-4TB4RGXK.BL_XrkoQ.js → chunk-4TB4RGXK.DsYcdn1i.js} +1 -1
  40. package/dist/docs/assets/chunks/{chunk-55IACEB6.BDPXu94_.js → chunk-55IACEB6.BzzQvcYp.js} +1 -1
  41. package/dist/docs/assets/chunks/{chunk-EDXVE4YY.DhGOQj4k.js → chunk-EDXVE4YY.BMiXZ7FX.js} +1 -1
  42. package/dist/docs/assets/chunks/{chunk-FMBD7UC4.DSF5nr8v.js → chunk-FMBD7UC4.D_mBcLoc.js} +1 -1
  43. package/dist/docs/assets/chunks/{chunk-OYMX7WX6.Day7wayw.js → chunk-OYMX7WX6.CMVjWVMx.js} +1 -1
  44. package/dist/docs/assets/chunks/{chunk-QZHKN3VN.CpBEC0zA.js → chunk-QZHKN3VN.BG-FrPv9.js} +1 -1
  45. package/dist/docs/assets/chunks/{chunk-YZCP3GAM.X_7rY1rx.js → chunk-YZCP3GAM.CkFE1ap3.js} +1 -1
  46. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.CG_UObcQ.js +1 -0
  47. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.CG_UObcQ.js +1 -0
  48. package/dist/docs/assets/chunks/clone.NYSZ9qZN.js +1 -0
  49. package/dist/docs/assets/chunks/{cose-bilkent-S5V4N54A.BVRmi2ko.js → cose-bilkent-S5V4N54A.BVNnCTvY.js} +1 -1
  50. package/dist/docs/assets/chunks/{dagre-KV5264BT.Dei9oslB.js → dagre-KV5264BT.CDN5PR9l.js} +1 -1
  51. package/dist/docs/assets/chunks/{diagram-5BDNPKRD._M-efGt7.js → diagram-5BDNPKRD.DQRUlT-i.js} +1 -1
  52. package/dist/docs/assets/chunks/{diagram-G4DWMVQ6.D1Vmhfsj.js → diagram-G4DWMVQ6.CoeblYQT.js} +1 -1
  53. package/dist/docs/assets/chunks/{diagram-MMDJMWI5.cE1bmvAC.js → diagram-MMDJMWI5.DW3ymjl0.js} +1 -1
  54. package/dist/docs/assets/chunks/{diagram-TYMM5635.DkXAfznP.js → diagram-TYMM5635.BP0uN4Jw.js} +1 -1
  55. package/dist/docs/assets/chunks/{erDiagram-SMLLAGMA.DH_pSwPg.js → erDiagram-SMLLAGMA.DVFUWEn4.js} +1 -1
  56. package/dist/docs/assets/chunks/{flowDiagram-DWJPFMVM.kAWVN9j1.js → flowDiagram-DWJPFMVM.HU-eHspv.js} +1 -1
  57. package/dist/docs/assets/chunks/{ganttDiagram-T4ZO3ILL.8r0w49-p.js → ganttDiagram-T4ZO3ILL.DHNhXijY.js} +1 -1
  58. package/dist/docs/assets/chunks/{gitGraphDiagram-UUTBAWPF.BDa7Bi1i.js → gitGraphDiagram-UUTBAWPF.DkISXcO3.js} +1 -1
  59. package/dist/docs/assets/chunks/{graph.BMPXHz_B.js → graph.CCV0fuRR.js} +1 -1
  60. package/dist/docs/assets/chunks/{infoDiagram-42DDH7IO.BmlcqewS.js → infoDiagram-42DDH7IO.bgILzOoc.js} +1 -1
  61. package/dist/docs/assets/chunks/{ishikawaDiagram-UXIWVN3A.CVSEQSul.js → ishikawaDiagram-UXIWVN3A.CuryXC0F.js} +1 -1
  62. package/dist/docs/assets/chunks/{journeyDiagram-VCZTEJTY.BpeWJ5n-.js → journeyDiagram-VCZTEJTY.BL1Pr-wu.js} +1 -1
  63. package/dist/docs/assets/chunks/{kanban-definition-6JOO6SKY.DHbDXuxB.js → kanban-definition-6JOO6SKY.BbGjvk4l.js} +1 -1
  64. package/dist/docs/assets/chunks/{layout.CzrCDgkP.js → layout.C4PfdldS.js} +1 -1
  65. package/dist/docs/assets/chunks/{linear.HwBsflwN.js → linear.C3xD1T6X.js} +1 -1
  66. package/dist/docs/assets/chunks/{min.DqGHolT3.js → min.CzgRAQ9c.js} +1 -1
  67. package/dist/docs/assets/chunks/{mindmap-definition-QFDTVHPH.ZYGlOawh.js → mindmap-definition-QFDTVHPH.CA9rSWum.js} +1 -1
  68. package/dist/docs/assets/chunks/{pieDiagram-DEJITSTG.C2KRXlNR.js → pieDiagram-DEJITSTG.B8MprgJu.js} +1 -1
  69. package/dist/docs/assets/chunks/{quadrantDiagram-34T5L4WZ.CHj3Qefp.js → quadrantDiagram-34T5L4WZ.DndDwbKT.js} +1 -1
  70. package/dist/docs/assets/chunks/{requirementDiagram-MS252O5E.B1L4Tf7k.js → requirementDiagram-MS252O5E.Zhfgwlnn.js} +1 -1
  71. package/dist/docs/assets/chunks/{sankeyDiagram-XADWPNL6.dNR2yi1B.js → sankeyDiagram-XADWPNL6.B6RRm6N5.js} +1 -1
  72. package/dist/docs/assets/chunks/{sequenceDiagram-FGHM5R23.BrvQ3C6m.js → sequenceDiagram-FGHM5R23.Bfmz-1PN.js} +1 -1
  73. package/dist/docs/assets/chunks/{stateDiagram-FHFEXIEX.BtehEykA.js → stateDiagram-FHFEXIEX.gbrdNqgj.js} +1 -1
  74. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.DOOmulfQ.js +1 -0
  75. package/dist/docs/assets/chunks/{theme.BDHBZUkP.js → theme.gpWjytMh.js} +2 -2
  76. package/dist/docs/assets/chunks/{timeline-definition-GMOUNBTQ.Bn7nhqEN.js → timeline-definition-GMOUNBTQ.Bl1l7M1f.js} +1 -1
  77. package/dist/docs/assets/chunks/{vennDiagram-DHZGUBPP.DKhc38sz.js → vennDiagram-DHZGUBPP.Dfle4U0d.js} +1 -1
  78. package/dist/docs/assets/chunks/{wardley-RL74JXVD.DOXQ0w8J.js → wardley-RL74JXVD.BJrCW6xc.js} +1 -1
  79. package/dist/docs/assets/chunks/{wardleyDiagram-NUSXRM2D.Bbq5B2Ic.js → wardleyDiagram-NUSXRM2D.CM_4lmvZ.js} +1 -1
  80. package/dist/docs/assets/chunks/{xychartDiagram-5P7HB3ND.B77HE1K8.js → xychartDiagram-5P7HB3ND.CHT5X28R.js} +1 -1
  81. package/dist/docs/assets/{reference_cli.md.BsgDqYPh.js → reference_cli.md.GwugN3n-.js} +5 -5
  82. package/dist/docs/assets/reference_cli.md.GwugN3n-.lean.js +1 -0
  83. package/dist/docs/assets/{reference_skills.md.ClkMoQsV.js → reference_skills.md.C0guGcH0.js} +3 -3
  84. package/dist/docs/building-with-agents.html +35 -35
  85. package/dist/docs/deployment.html +35 -35
  86. package/dist/docs/evals.html +35 -35
  87. package/dist/docs/guides/agent-to-agent.html +35 -35
  88. package/dist/docs/guides/bitbucket.html +35 -35
  89. package/dist/docs/guides/cloud-agents.html +35 -35
  90. package/dist/docs/guides/convert-automation.html +35 -35
  91. package/dist/docs/guides/github.html +35 -35
  92. package/dist/docs/guides/gitlab.html +35 -35
  93. package/dist/docs/guides/grokbot-agents.html +35 -35
  94. package/dist/docs/guides/hooks.html +35 -35
  95. package/dist/docs/guides/improve.html +35 -35
  96. package/dist/docs/guides/jev.html +35 -35
  97. package/dist/docs/guides/mcp-oauth.html +35 -35
  98. package/dist/docs/guides/opentelemetry.html +35 -35
  99. package/dist/docs/guides/slack.html +35 -35
  100. package/dist/docs/guides/webhooks.html +35 -35
  101. package/dist/docs/hashmap.json +1 -1
  102. package/dist/docs/hillclimbing.html +35 -35
  103. package/dist/docs/index.html +35 -35
  104. package/dist/docs/llms-full.txt +20 -9
  105. package/dist/docs/quickstart.html +35 -35
  106. package/dist/docs/reference/agent-config.html +35 -35
  107. package/dist/docs/reference/artifacts.html +35 -35
  108. package/dist/docs/reference/channels.html +35 -35
  109. package/dist/docs/reference/cli.html +39 -39
  110. package/dist/docs/reference/cli.md +20 -9
  111. package/dist/docs/reference/connections.html +35 -35
  112. package/dist/docs/reference/evals.html +35 -35
  113. package/dist/docs/reference/extensions.html +35 -35
  114. package/dist/docs/reference/hooks.html +35 -35
  115. package/dist/docs/reference/http-api.html +35 -35
  116. package/dist/docs/reference/instructions.html +35 -35
  117. package/dist/docs/reference/playground.html +35 -35
  118. package/dist/docs/reference/project-layout.html +35 -35
  119. package/dist/docs/reference/prompt.html +35 -35
  120. package/dist/docs/reference/schedules.html +35 -35
  121. package/dist/docs/reference/sessions.html +35 -35
  122. package/dist/docs/reference/skills.html +38 -38
  123. package/dist/docs/reference/subagents.html +35 -35
  124. package/dist/docs/reference/tools.html +35 -35
  125. package/dist/docs/templates/agentic-owners.html +35 -35
  126. package/dist/docs/templates/grokbot-agents.html +35 -35
  127. package/dist/docs/templates/security-reviewer.html +35 -35
  128. package/dist/docs/templates/thermo-quality-review.html +35 -35
  129. package/dist/docs/templates/thermo-review.html +35 -35
  130. package/dist/docs/templates/triage.html +35 -35
  131. package/dist/docs/troubleshooting.html +35 -35
  132. package/dist/extensions/cursor-cloud-agents/extension.d.ts +14 -0
  133. package/dist/extensions/cursor-cloud-agents/extension.d.ts.map +1 -1
  134. package/dist/extensions/cursor-cloud-agents/extension.js +5 -0
  135. package/dist/extensions/cursor-cloud-agents/lib/watch.d.ts +17 -0
  136. package/dist/extensions/cursor-cloud-agents/lib/watch.d.ts.map +1 -0
  137. package/dist/extensions/cursor-cloud-agents/lib/watch.js +99 -0
  138. package/dist/extensions/cursor-cloud-agents/reminders/cloud-agent-stop-watch.d.ts +19 -0
  139. package/dist/extensions/cursor-cloud-agents/reminders/cloud-agent-stop-watch.d.ts.map +1 -0
  140. package/dist/extensions/cursor-cloud-agents/reminders/cloud-agent-stop-watch.js +71 -0
  141. package/dist/extensions/cursor-cloud-agents/skills/handoff.md +9 -5
  142. package/dist/extensions/cursor-cloud-agents/tools/cancel.d.ts.map +1 -1
  143. package/dist/extensions/cursor-cloud-agents/tools/cancel.js +3 -1
  144. package/dist/extensions/cursor-cloud-agents/tools/launch.d.ts.map +1 -1
  145. package/dist/extensions/cursor-cloud-agents/tools/launch.js +3 -2
  146. package/dist/extensions.d.ts +1 -1
  147. package/dist/extensions.js +1 -1
  148. package/dist/files-backends/cursor-hosted.d.ts +22 -83
  149. package/dist/files-backends/cursor-hosted.d.ts.map +1 -1
  150. package/dist/files-backends/cursor-hosted.js +46 -160
  151. package/dist/files.d.ts +9 -32
  152. package/dist/files.d.ts.map +1 -1
  153. package/dist/files.js +7 -32
  154. package/dist/internal/artifacts-store.d.ts +13 -25
  155. package/dist/internal/artifacts-store.d.ts.map +1 -1
  156. package/dist/internal/artifacts-store.js +25 -46
  157. package/dist/internal/cli-ax.d.ts +10 -17
  158. package/dist/internal/cli-ax.d.ts.map +1 -1
  159. package/dist/internal/cli-ax.js +87 -155
  160. package/dist/internal/cli-bitbucket.js +5 -5
  161. package/dist/internal/cli-deploy.d.ts +4 -1
  162. package/dist/internal/cli-deploy.d.ts.map +1 -1
  163. package/dist/internal/cli-deploy.js +117 -20
  164. package/dist/internal/cli-github.js +13 -13
  165. package/dist/internal/cli-gitlab.js +5 -5
  166. package/dist/internal/continuation-identity.d.ts +2 -0
  167. package/dist/internal/continuation-identity.d.ts.map +1 -1
  168. package/dist/internal/continuation-identity.js +4 -0
  169. package/dist/internal/conversation-mirror.d.ts +9 -38
  170. package/dist/internal/conversation-mirror.d.ts.map +1 -1
  171. package/dist/internal/conversation-mirror.js +62 -68
  172. package/dist/internal/cursor/account-mcp.d.ts +1 -1
  173. package/dist/internal/cursor/account-mcp.js +1 -1
  174. package/dist/internal/cursor/backend-client.js +1 -1
  175. package/dist/internal/cursor/github-credentials.js +3 -3
  176. package/dist/internal/cursor/hosted-bound-secrets.d.ts +6 -2
  177. package/dist/internal/cursor/hosted-bound-secrets.d.ts.map +1 -1
  178. package/dist/internal/cursor/hosted-bound-secrets.js +13 -2
  179. package/dist/internal/cursor/hosted-store-secrets.d.ts +13 -37
  180. package/dist/internal/cursor/hosted-store-secrets.d.ts.map +1 -1
  181. package/dist/internal/cursor/hosted-store-secrets.js +13 -37
  182. package/dist/internal/cursor/store-api-client.d.ts +17 -39
  183. package/dist/internal/cursor/store-api-client.d.ts.map +1 -1
  184. package/dist/internal/cursor/store-api-client.js +15 -37
  185. package/dist/internal/cursor-deployment-relay.js +3 -3
  186. package/dist/internal/cursor-event-relay.js +1 -1
  187. package/dist/internal/cursor-relay-core.d.ts +1 -1
  188. package/dist/internal/cursor-relay-core.d.ts.map +1 -1
  189. package/dist/internal/deploy-client.d.ts +55 -63
  190. package/dist/internal/deploy-client.d.ts.map +1 -1
  191. package/dist/internal/deploy-client.js +48 -28
  192. package/dist/internal/discovery/agent.d.ts +1 -1
  193. package/dist/internal/discovery/agent.d.ts.map +1 -1
  194. package/dist/internal/discovery/agent.js +4 -0
  195. package/dist/internal/discovery/extensions.d.ts +2 -1
  196. package/dist/internal/discovery/extensions.d.ts.map +1 -1
  197. package/dist/internal/discovery/extensions.js +11 -1
  198. package/dist/internal/discovery/project.d.ts.map +1 -1
  199. package/dist/internal/discovery/project.js +1 -0
  200. package/dist/internal/distribution.d.ts +2 -2
  201. package/dist/internal/distribution.d.ts.map +1 -1
  202. package/dist/internal/distribution.js +2 -2
  203. package/dist/internal/docs-site.js +3 -3
  204. package/dist/internal/eval-run-store.js +8 -8
  205. package/dist/internal/framework-file-storage.d.ts +10 -34
  206. package/dist/internal/framework-file-storage.d.ts.map +1 -1
  207. package/dist/internal/framework-file-storage.js +12 -39
  208. package/dist/internal/framework-storage-selection.d.ts +10 -46
  209. package/dist/internal/framework-storage-selection.d.ts.map +1 -1
  210. package/dist/internal/framework-storage-selection.js +15 -64
  211. package/dist/internal/github-fanout.js +2 -2
  212. package/dist/internal/handleAgentServeTrigger.d.ts +5 -8
  213. package/dist/internal/handleAgentServeTrigger.d.ts.map +1 -1
  214. package/dist/internal/handleAgentServeTrigger.js +5 -8
  215. package/dist/internal/host-files.js +6 -9
  216. package/dist/internal/host-platforms.js +5 -5
  217. package/dist/internal/hosted-catch.d.ts +3 -2
  218. package/dist/internal/hosted-catch.d.ts.map +1 -1
  219. package/dist/internal/hosted-catch.js +27 -9
  220. package/dist/internal/hosted-delivery-protocol.d.ts +31 -8
  221. package/dist/internal/hosted-delivery-protocol.d.ts.map +1 -1
  222. package/dist/internal/hosted-delivery-protocol.js +102 -1
  223. package/dist/internal/hosted-delivery.d.ts.map +1 -1
  224. package/dist/internal/hosted-delivery.js +32 -12
  225. package/dist/internal/hosted-execution-diag.d.ts +13 -24
  226. package/dist/internal/hosted-execution-diag.d.ts.map +1 -1
  227. package/dist/internal/hosted-execution-diag.js +11 -20
  228. package/dist/internal/hosted-execution-flush.d.ts +22 -10
  229. package/dist/internal/hosted-execution-flush.d.ts.map +1 -1
  230. package/dist/internal/hosted-execution-flush.js +45 -9
  231. package/dist/internal/hosted-managed-automation.js +5 -5
  232. package/dist/internal/hosting.d.ts +5 -10
  233. package/dist/internal/hosting.d.ts.map +1 -1
  234. package/dist/internal/hosting.js +5 -10
  235. package/dist/internal/legacy-command-guard.d.ts +1 -4
  236. package/dist/internal/legacy-command-guard.d.ts.map +1 -1
  237. package/dist/internal/legacy-command-guard.js +2 -11
  238. package/dist/internal/listen-port.js +1 -1
  239. package/dist/internal/local-control-plane.js +6 -6
  240. package/dist/internal/logs-client.d.ts +20 -1
  241. package/dist/internal/logs-client.d.ts.map +1 -1
  242. package/dist/internal/logs-client.js +89 -1
  243. package/dist/internal/mcp-endpoint.js +1 -1
  244. package/dist/internal/otel/collector.js +1 -1
  245. package/dist/internal/otel/runtime.js +13 -13
  246. package/dist/internal/platform-schedule-sync.js +2 -2
  247. package/dist/internal/playground/toolchain.js +6 -6
  248. package/dist/internal/process-memory-telemetry.js +2 -2
  249. package/dist/internal/reminder-runner.d.ts +8 -3
  250. package/dist/internal/reminder-runner.d.ts.map +1 -1
  251. package/dist/internal/reminder-runner.js +51 -52
  252. package/dist/internal/resolve-prod-target.d.ts +1 -12
  253. package/dist/internal/resolve-prod-target.d.ts.map +1 -1
  254. package/dist/internal/resolve-prod-target.js +2 -32
  255. package/dist/internal/resolved-connections.js +8 -8
  256. package/dist/internal/run-client.d.ts +4 -3
  257. package/dist/internal/run-client.d.ts.map +1 -1
  258. package/dist/internal/run-client.js +98 -61
  259. package/dist/internal/runtime-dispatch-runner.d.ts +1 -0
  260. package/dist/internal/runtime-dispatch-runner.d.ts.map +1 -1
  261. package/dist/internal/runtime-dispatch-runner.js +7 -1
  262. package/dist/internal/schedule-runner.js +1 -1
  263. package/dist/internal/sdk-runner.d.ts +4 -0
  264. package/dist/internal/sdk-runner.d.ts.map +1 -1
  265. package/dist/internal/sdk-runner.js +37 -22
  266. package/dist/internal/server.d.ts +2 -0
  267. package/dist/internal/server.d.ts.map +1 -1
  268. package/dist/internal/server.js +39 -38
  269. package/dist/internal/session-engine.d.ts +31 -44
  270. package/dist/internal/session-engine.d.ts.map +1 -1
  271. package/dist/internal/session-engine.js +67 -83
  272. package/dist/internal/session-run-log.d.ts +10 -24
  273. package/dist/internal/session-run-log.d.ts.map +1 -1
  274. package/dist/internal/session-run-log.js +13 -27
  275. package/dist/internal/sessions-client.d.ts.map +1 -1
  276. package/dist/internal/sessions-client.js +6 -3
  277. package/dist/internal/skills-sync.d.ts +3 -5
  278. package/dist/internal/skills-sync.d.ts.map +1 -1
  279. package/dist/internal/skills-sync.js +3 -5
  280. package/dist/internal/start-log-store.d.ts +7 -18
  281. package/dist/internal/start-log-store.d.ts.map +1 -1
  282. package/dist/internal/start-log-store.js +47 -24
  283. package/dist/internal/storage-coordinator.d.ts +7 -10
  284. package/dist/internal/storage-coordinator.d.ts.map +1 -1
  285. package/dist/internal/storage-coordinator.js +18 -20
  286. package/dist/internal/storage-roles.d.ts +5 -0
  287. package/dist/internal/storage-roles.d.ts.map +1 -1
  288. package/dist/internal/store-api-protocol.d.ts +12 -33
  289. package/dist/internal/store-api-protocol.d.ts.map +1 -1
  290. package/dist/internal/store-api-protocol.js +6 -22
  291. package/dist/internal/store-mirror.d.ts +4 -5
  292. package/dist/internal/store-mirror.d.ts.map +1 -1
  293. package/dist/internal/store-mirror.js +6 -8
  294. package/dist/internal/turn-lease-store.d.ts +12 -5
  295. package/dist/internal/turn-lease-store.d.ts.map +1 -1
  296. package/dist/internal/turn-lease-store.js +61 -8
  297. package/dist/internal/v2-hosting.d.ts +4 -7
  298. package/dist/internal/v2-hosting.d.ts.map +1 -1
  299. package/dist/internal/v2-hosting.js +4 -7
  300. package/dist/internal/workspace-sync.d.ts +3 -6
  301. package/dist/internal/workspace-sync.d.ts.map +1 -1
  302. package/dist/internal/workspace-sync.js +3 -6
  303. package/dist/internal/workspace.d.ts +10 -16
  304. package/dist/internal/workspace.d.ts.map +1 -1
  305. package/dist/internal/workspace.js +9 -14
  306. package/dist/memory.d.ts +17 -43
  307. package/dist/memory.d.ts.map +1 -1
  308. package/dist/memory.js +34 -80
  309. package/dist/playground/assets/index-DPKLl4C_.css +1 -0
  310. package/dist/playground/assets/index-MijLHTbB.js +71 -0
  311. package/dist/playground/index.html +2 -2
  312. package/dist/storage-backends/cursor-hosted-v2.d.ts +8 -36
  313. package/dist/storage-backends/cursor-hosted-v2.d.ts.map +1 -1
  314. package/dist/storage-backends/cursor-hosted-v2.js +9 -37
  315. package/dist/storage-backends/cursor-hosted.d.ts +17 -30
  316. package/dist/storage-backends/cursor-hosted.d.ts.map +1 -1
  317. package/dist/storage-backends/cursor-hosted.js +14 -27
  318. package/dist/storage-protocol.d.ts +13 -38
  319. package/dist/storage-protocol.d.ts.map +1 -1
  320. package/dist/storage-protocol.js +14 -39
  321. package/dist/types.d.ts +29 -30
  322. package/dist/types.d.ts.map +1 -1
  323. package/docs/reference/cli.md +20 -9
  324. package/package.json +1 -1
  325. package/templates/pr-autofixer/bot/instructions.md +3 -3
  326. package/dist/docs/assets/chunks/@localSearchIndexroot.Bq-pxRXm.js +0 -1
  327. package/dist/docs/assets/chunks/channel.DCU8W1RP.js +0 -1
  328. package/dist/docs/assets/chunks/classDiagram-6PBFFD2Q.DwpXsM06.js +0 -1
  329. package/dist/docs/assets/chunks/classDiagram-v2-HSJHXN6E.DwpXsM06.js +0 -1
  330. package/dist/docs/assets/chunks/clone.DH6Mx2zB.js +0 -1
  331. package/dist/docs/assets/chunks/stateDiagram-v2-QKLJ7IA2.kzD0-U89.js +0 -1
  332. package/dist/docs/assets/reference_cli.md.BsgDqYPh.lean.js +0 -1
  333. package/dist/playground/assets/index-6BbTPnaT.css +0 -1
  334. package/dist/playground/assets/index-CI7FAmOP.js +0 -71
  335. /package/dist/docs/assets/{reference_skills.md.ClkMoQsV.lean.js → reference_skills.md.C0guGcH0.lean.js} +0 -0
@@ -0,0 +1,71 @@
1
+ function Nj(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const a=Object.getOwnPropertyDescriptor(r,s);a&&Object.defineProperty(e,s,a.get?a:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const a of s)if(a.type==="childList")for(const l of a.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(s){if(s.ep)return;s.ep=!0;const a=n(s);fetch(s.href,a)}})();function Vc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Oj(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if(typeof t=="function"){var n=function r(){var s=!1;try{s=this instanceof r}catch{}return s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return e[r]}})}),n}var ub={exports:{}},Bu={};var pw;function Ij(){if(pw)return Bu;pw=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,s,a){var l=null;if(a!==void 0&&(l=""+a),s.key!==void 0&&(l=""+s.key),"key"in s){a={};for(var c in s)c!=="key"&&(a[c]=s[c])}else a=s;return s=a.ref,{$$typeof:e,type:r,key:l,ref:s!==void 0?s:null,props:a}}return Bu.Fragment=t,Bu.jsx=n,Bu.jsxs=n,Bu}var hw;function Mj(){return hw||(hw=1,ub.exports=Ij()),ub.exports}var g=Mj(),cb={exports:{}},_t={};var mw;function Dj(){if(mw)return _t;mw=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),b=Symbol.iterator;function y(z){return z===null||typeof z!="object"?null:(z=b&&z[b]||z["@@iterator"],typeof z=="function"?z:null)}var k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,C={};function E(z,V,L){this.props=z,this.context=V,this.refs=C,this.updater=L||k}E.prototype.isReactComponent={},E.prototype.setState=function(z,V){if(typeof z!="object"&&typeof z!="function"&&z!=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,z,V,"setState")},E.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function T(){}T.prototype=E.prototype;function R(z,V,L){this.props=z,this.context=V,this.refs=C,this.updater=L||k}var _=R.prototype=new T;_.constructor=R,S(_,E.prototype),_.isPureReactComponent=!0;var D=Array.isArray;function A(){}var I={H:null,A:null,T:null,S:null},P=Object.prototype.hasOwnProperty;function $(z,V,L){var Z=L.ref;return{$$typeof:e,type:z,key:V,ref:Z!==void 0?Z:null,props:L}}function O(z,V){return $(z.type,V,z.props)}function Y(z){return typeof z=="object"&&z!==null&&z.$$typeof===e}function U(z){var V={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(L){return V[L]})}var B=/\/+/g;function j(z,V){return typeof z=="object"&&z!==null&&z.key!=null?U(""+z.key):V.toString(36)}function q(z){switch(z.status){case"fulfilled":return z.value;case"rejected":throw z.reason;default:switch(typeof z.status=="string"?z.then(A,A):(z.status="pending",z.then(function(V){z.status==="pending"&&(z.status="fulfilled",z.value=V)},function(V){z.status==="pending"&&(z.status="rejected",z.reason=V)})),z.status){case"fulfilled":return z.value;case"rejected":throw z.reason}}throw z}function H(z,V,L,Z,re){var ie=typeof z;(ie==="undefined"||ie==="boolean")&&(z=null);var ae=!1;if(z===null)ae=!0;else switch(ie){case"bigint":case"string":case"number":ae=!0;break;case"object":switch(z.$$typeof){case e:case t:ae=!0;break;case h:return ae=z._init,H(ae(z._payload),V,L,Z,re)}}if(ae)return re=re(z),ae=Z===""?"."+j(z,0):Z,D(re)?(L="",ae!=null&&(L=ae.replace(B,"$&/")+"/"),H(re,V,L,"",function(Ee){return Ee})):re!=null&&(Y(re)&&(re=O(re,L+(re.key==null||z&&z.key===re.key?"":(""+re.key).replace(B,"$&/")+"/")+ae)),V.push(re)),1;ae=0;var le=Z===""?".":Z+":";if(D(z))for(var ce=0;ce<z.length;ce++)Z=z[ce],ie=le+j(Z,ce),ae+=H(Z,V,L,ie,re);else if(ce=y(z),typeof ce=="function")for(z=ce.call(z),ce=0;!(Z=z.next()).done;)Z=Z.value,ie=le+j(Z,ce++),ae+=H(Z,V,L,ie,re);else if(ie==="object"){if(typeof z.then=="function")return H(q(z),V,L,Z,re);throw V=String(z),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return ae}function W(z,V,L){if(z==null)return z;var Z=[],re=0;return H(z,Z,"","",function(ie){return V.call(L,ie,re++)}),Z}function F(z){if(z._status===-1){var V=z._result;V=V(),V.then(function(L){(z._status===0||z._status===-1)&&(z._status=1,z._result=L)},function(L){(z._status===0||z._status===-1)&&(z._status=2,z._result=L)}),z._status===-1&&(z._status=0,z._result=V)}if(z._status===1)return z._result.default;throw z._result}var K=typeof reportError=="function"?reportError:function(z){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof z=="object"&&z!==null&&typeof z.message=="string"?String(z.message):String(z),error:z});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",z);return}console.error(z)},N={map:W,forEach:function(z,V,L){W(z,function(){V.apply(this,arguments)},L)},count:function(z){var V=0;return W(z,function(){V++}),V},toArray:function(z){return W(z,function(V){return V})||[]},only:function(z){if(!Y(z))throw Error("React.Children.only expected to receive a single React element child.");return z}};return _t.Activity=m,_t.Children=N,_t.Component=E,_t.Fragment=n,_t.Profiler=s,_t.PureComponent=R,_t.StrictMode=r,_t.Suspense=f,_t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,_t.__COMPILER_RUNTIME={__proto__:null,c:function(z){return I.H.useMemoCache(z)}},_t.cache=function(z){return function(){return z.apply(null,arguments)}},_t.cacheSignal=function(){return null},_t.cloneElement=function(z,V,L){if(z==null)throw Error("The argument must be a React element, but you passed "+z+".");var Z=S({},z.props),re=z.key;if(V!=null)for(ie in V.key!==void 0&&(re=""+V.key),V)!P.call(V,ie)||ie==="key"||ie==="__self"||ie==="__source"||ie==="ref"&&V.ref===void 0||(Z[ie]=V[ie]);var ie=arguments.length-2;if(ie===1)Z.children=L;else if(1<ie){for(var ae=Array(ie),le=0;le<ie;le++)ae[le]=arguments[le+2];Z.children=ae}return $(z.type,re,Z)},_t.createContext=function(z){return z={$$typeof:l,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null},z.Provider=z,z.Consumer={$$typeof:a,_context:z},z},_t.createElement=function(z,V,L){var Z,re={},ie=null;if(V!=null)for(Z in V.key!==void 0&&(ie=""+V.key),V)P.call(V,Z)&&Z!=="key"&&Z!=="__self"&&Z!=="__source"&&(re[Z]=V[Z]);var ae=arguments.length-2;if(ae===1)re.children=L;else if(1<ae){for(var le=Array(ae),ce=0;ce<ae;ce++)le[ce]=arguments[ce+2];re.children=le}if(z&&z.defaultProps)for(Z in ae=z.defaultProps,ae)re[Z]===void 0&&(re[Z]=ae[Z]);return $(z,ie,re)},_t.createRef=function(){return{current:null}},_t.forwardRef=function(z){return{$$typeof:c,render:z}},_t.isValidElement=Y,_t.lazy=function(z){return{$$typeof:h,_payload:{_status:-1,_result:z},_init:F}},_t.memo=function(z,V){return{$$typeof:d,type:z,compare:V===void 0?null:V}},_t.startTransition=function(z){var V=I.T,L={};I.T=L;try{var Z=z(),re=I.S;re!==null&&re(L,Z),typeof Z=="object"&&Z!==null&&typeof Z.then=="function"&&Z.then(A,K)}catch(ie){K(ie)}finally{V!==null&&L.types!==null&&(V.types=L.types),I.T=V}},_t.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},_t.use=function(z){return I.H.use(z)},_t.useActionState=function(z,V,L){return I.H.useActionState(z,V,L)},_t.useCallback=function(z,V){return I.H.useCallback(z,V)},_t.useContext=function(z){return I.H.useContext(z)},_t.useDebugValue=function(){},_t.useDeferredValue=function(z,V){return I.H.useDeferredValue(z,V)},_t.useEffect=function(z,V){return I.H.useEffect(z,V)},_t.useEffectEvent=function(z){return I.H.useEffectEvent(z)},_t.useId=function(){return I.H.useId()},_t.useImperativeHandle=function(z,V,L){return I.H.useImperativeHandle(z,V,L)},_t.useInsertionEffect=function(z,V){return I.H.useInsertionEffect(z,V)},_t.useLayoutEffect=function(z,V){return I.H.useLayoutEffect(z,V)},_t.useMemo=function(z,V){return I.H.useMemo(z,V)},_t.useOptimistic=function(z,V){return I.H.useOptimistic(z,V)},_t.useReducer=function(z,V,L){return I.H.useReducer(z,V,L)},_t.useRef=function(z){return I.H.useRef(z)},_t.useState=function(z){return I.H.useState(z)},_t.useSyncExternalStore=function(z,V,L){return I.H.useSyncExternalStore(z,V,L)},_t.useTransition=function(){return I.H.useTransition()},_t.version="19.2.6",_t}var gw;function Gc(){return gw||(gw=1,cb.exports=Dj()),cb.exports}var v=Gc();const sc=Vc(v),jv=Nj({__proto__:null,default:sc},[v]);var fb={exports:{}},Fu={},db={exports:{}},pb={};var bw;function Lj(){return bw||(bw=1,(function(e){function t(H,W){var F=H.length;H.push(W);e:for(;0<F;){var K=F-1>>>1,N=H[K];if(0<s(N,W))H[K]=W,H[F]=N,F=K;else break e}}function n(H){return H.length===0?null:H[0]}function r(H){if(H.length===0)return null;var W=H[0],F=H.pop();if(F!==W){H[0]=F;e:for(var K=0,N=H.length,z=N>>>1;K<z;){var V=2*(K+1)-1,L=H[V],Z=V+1,re=H[Z];if(0>s(L,F))Z<N&&0>s(re,L)?(H[K]=re,H[Z]=F,K=Z):(H[K]=L,H[V]=F,K=V);else if(Z<N&&0>s(re,F))H[K]=re,H[Z]=F,K=Z;else break e}}return W}function s(H,W){var F=H.sortIndex-W.sortIndex;return F!==0?F:H.id-W.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var f=[],d=[],h=1,m=null,b=3,y=!1,k=!1,S=!1,C=!1,E=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;function _(H){for(var W=n(d);W!==null;){if(W.callback===null)r(d);else if(W.startTime<=H)r(d),W.sortIndex=W.expirationTime,t(f,W);else break;W=n(d)}}function D(H){if(S=!1,_(H),!k)if(n(f)!==null)k=!0,A||(A=!0,U());else{var W=n(d);W!==null&&q(D,W.startTime-H)}}var A=!1,I=-1,P=5,$=-1;function O(){return C?!0:!(e.unstable_now()-$<P)}function Y(){if(C=!1,A){var H=e.unstable_now();$=H;var W=!0;try{e:{k=!1,S&&(S=!1,T(I),I=-1),y=!0;var F=b;try{t:{for(_(H),m=n(f);m!==null&&!(m.expirationTime>H&&O());){var K=m.callback;if(typeof K=="function"){m.callback=null,b=m.priorityLevel;var N=K(m.expirationTime<=H);if(H=e.unstable_now(),typeof N=="function"){m.callback=N,_(H),W=!0;break t}m===n(f)&&r(f),_(H)}else r(f);m=n(f)}if(m!==null)W=!0;else{var z=n(d);z!==null&&q(D,z.startTime-H),W=!1}}break e}finally{m=null,b=F,y=!1}W=void 0}}finally{W?U():A=!1}}}var U;if(typeof R=="function")U=function(){R(Y)};else if(typeof MessageChannel<"u"){var B=new MessageChannel,j=B.port2;B.port1.onmessage=Y,U=function(){j.postMessage(null)}}else U=function(){E(Y,0)};function q(H,W){I=E(function(){H(e.unstable_now())},W)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(H){H.callback=null},e.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<H?Math.floor(1e3/H):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(H){switch(b){case 1:case 2:case 3:var W=3;break;default:W=b}var F=b;b=W;try{return H()}finally{b=F}},e.unstable_requestPaint=function(){C=!0},e.unstable_runWithPriority=function(H,W){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var F=b;b=H;try{return W()}finally{b=F}},e.unstable_scheduleCallback=function(H,W,F){var K=e.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?K+F:K):F=K,H){case 1:var N=-1;break;case 2:N=250;break;case 5:N=1073741823;break;case 4:N=1e4;break;default:N=5e3}return N=F+N,H={id:h++,callback:W,priorityLevel:H,startTime:F,expirationTime:N,sortIndex:-1},F>K?(H.sortIndex=F,t(d,H),n(f)===null&&H===n(d)&&(S?(T(I),I=-1):S=!0,q(D,F-K))):(H.sortIndex=N,t(f,H),k||y||(k=!0,A||(A=!0,U()))),H},e.unstable_shouldYield=O,e.unstable_wrapCallback=function(H){var W=b;return function(){var F=b;b=W;try{return H.apply(this,arguments)}finally{b=F}}}})(pb)),pb}var yw;function jj(){return yw||(yw=1,db.exports=Lj()),db.exports}var hb={exports:{}},cr={};var vw;function zj(){if(vw)return cr;vw=1;var e=Gc();function t(f){var d="https://react.dev/errors/"+f;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)d+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+f+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},s=Symbol.for("react.portal");function a(f,d,h){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:m==null?null:""+m,children:f,containerInfo:d,implementation:h}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(f,d){if(f==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return cr.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,cr.createPortal=function(f,d){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(t(299));return a(f,d,null,h)},cr.flushSync=function(f){var d=l.T,h=r.p;try{if(l.T=null,r.p=2,f)return f()}finally{l.T=d,r.p=h,r.d.f()}},cr.preconnect=function(f,d){typeof f=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,r.d.C(f,d))},cr.prefetchDNS=function(f){typeof f=="string"&&r.d.D(f)},cr.preinit=function(f,d){if(typeof f=="string"&&d&&typeof d.as=="string"){var h=d.as,m=c(h,d.crossOrigin),b=typeof d.integrity=="string"?d.integrity:void 0,y=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;h==="style"?r.d.S(f,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:m,integrity:b,fetchPriority:y}):h==="script"&&r.d.X(f,{crossOrigin:m,integrity:b,fetchPriority:y,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},cr.preinitModule=function(f,d){if(typeof f=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var h=c(d.as,d.crossOrigin);r.d.M(f,{crossOrigin:h,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&r.d.M(f)},cr.preload=function(f,d){if(typeof f=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var h=d.as,m=c(h,d.crossOrigin);r.d.L(f,h,{crossOrigin:m,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},cr.preloadModule=function(f,d){if(typeof f=="string")if(d){var h=c(d.as,d.crossOrigin);r.d.m(f,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:h,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else r.d.m(f)},cr.requestFormReset=function(f){r.d.r(f)},cr.unstable_batchedUpdates=function(f,d){return f(d)},cr.useFormState=function(f,d,h){return l.H.useFormState(f,d,h)},cr.useFormStatus=function(){return l.H.useHostTransitionStatus()},cr.version="19.2.6",cr}var xw;function WR(){if(xw)return hb.exports;xw=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),hb.exports=zj(),hb.exports}var kw;function Pj(){if(kw)return Fu;kw=1;var e=jj(),t=Gc(),n=WR();function r(i){var o="https://react.dev/errors/"+i;if(1<arguments.length){o+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)o+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+i+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function a(i){var o=i,u=i;if(i.alternate)for(;o.return;)o=o.return;else{i=o;do o=i,(o.flags&4098)!==0&&(u=o.return),i=o.return;while(i)}return o.tag===3?u:null}function l(i){if(i.tag===13){var o=i.memoizedState;if(o===null&&(i=i.alternate,i!==null&&(o=i.memoizedState)),o!==null)return o.dehydrated}return null}function c(i){if(i.tag===31){var o=i.memoizedState;if(o===null&&(i=i.alternate,i!==null&&(o=i.memoizedState)),o!==null)return o.dehydrated}return null}function f(i){if(a(i)!==i)throw Error(r(188))}function d(i){var o=i.alternate;if(!o){if(o=a(i),o===null)throw Error(r(188));return o!==i?null:i}for(var u=i,p=o;;){var x=u.return;if(x===null)break;var w=x.alternate;if(w===null){if(p=x.return,p!==null){u=p;continue}break}if(x.child===w.child){for(w=x.child;w;){if(w===u)return f(x),i;if(w===p)return f(x),o;w=w.sibling}throw Error(r(188))}if(u.return!==p.return)u=x,p=w;else{for(var M=!1,G=x.child;G;){if(G===u){M=!0,u=x,p=w;break}if(G===p){M=!0,p=x,u=w;break}G=G.sibling}if(!M){for(G=w.child;G;){if(G===u){M=!0,u=w,p=x;break}if(G===p){M=!0,p=w,u=x;break}G=G.sibling}if(!M)throw Error(r(189))}}if(u.alternate!==p)throw Error(r(190))}if(u.tag!==3)throw Error(r(188));return u.stateNode.current===u?i:o}function h(i){var o=i.tag;if(o===5||o===26||o===27||o===6)return i;for(i=i.child;i!==null;){if(o=h(i),o!==null)return o;i=i.sibling}return null}var m=Object.assign,b=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),k=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),R=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),$=Symbol.for("react.activity"),O=Symbol.for("react.memo_cache_sentinel"),Y=Symbol.iterator;function U(i){return i===null||typeof i!="object"?null:(i=Y&&i[Y]||i["@@iterator"],typeof i=="function"?i:null)}var B=Symbol.for("react.client.reference");function j(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===B?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case S:return"Fragment";case E:return"Profiler";case C:return"StrictMode";case D:return"Suspense";case A:return"SuspenseList";case $:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case k:return"Portal";case R:return i.displayName||"Context";case T:return(i._context.displayName||"Context")+".Consumer";case _:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case I:return o=i.displayName||null,o!==null?o:j(i.type)||"Memo";case P:o=i._payload,i=i._init;try{return j(i(o))}catch{}}return null}var q=Array.isArray,H=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F={pending:!1,data:null,method:null,action:null},K=[],N=-1;function z(i){return{current:i}}function V(i){0>N||(i.current=K[N],K[N]=null,N--)}function L(i,o){N++,K[N]=i.current,i.current=o}var Z=z(null),re=z(null),ie=z(null),ae=z(null);function le(i,o){switch(L(ie,o),L(re,i),L(Z,null),o.nodeType){case 9:case 11:i=(i=o.documentElement)&&(i=i.namespaceURI)?j1(i):0;break;default:if(i=o.tagName,o=o.namespaceURI)o=j1(o),i=z1(o,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}V(Z),L(Z,i)}function ce(){V(Z),V(re),V(ie)}function Ee(i){i.memoizedState!==null&&L(ae,i);var o=Z.current,u=z1(o,i.type);o!==u&&(L(re,i),L(Z,u))}function be(i){re.current===i&&(V(Z),V(re)),ae.current===i&&(V(ae),ju._currentValue=F)}var ue,ge;function Se(i){if(ue===void 0)try{throw Error()}catch(u){var o=u.stack.trim().match(/\n( *(at )?)/);ue=o&&o[1]||"",ge=-1<u.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+ue+i+ge}var Ae=!1;function ke(i,o){if(!i||Ae)return"";Ae=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var p={DetermineComponentFrameRoot:function(){try{if(o){var Oe=function(){throw Error()};if(Object.defineProperty(Oe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Oe,[])}catch(ve){var he=ve}Reflect.construct(i,[],Oe)}else{try{Oe.call()}catch(ve){he=ve}i.call(Oe.prototype)}}else{try{throw Error()}catch(ve){he=ve}(Oe=i())&&typeof Oe.catch=="function"&&Oe.catch(function(){})}}catch(ve){if(ve&&he&&typeof ve.stack=="string")return[ve.stack,he.stack]}return[null,null]}};p.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var x=Object.getOwnPropertyDescriptor(p.DetermineComponentFrameRoot,"name");x&&x.configurable&&Object.defineProperty(p.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var w=p.DetermineComponentFrameRoot(),M=w[0],G=w[1];if(M&&G){var J=M.split(`
4
+ `),pe=G.split(`
5
+ `);for(x=p=0;p<J.length&&!J[p].includes("DetermineComponentFrameRoot");)p++;for(;x<pe.length&&!pe[x].includes("DetermineComponentFrameRoot");)x++;if(p===J.length||x===pe.length)for(p=J.length-1,x=pe.length-1;1<=p&&0<=x&&J[p]!==pe[x];)x--;for(;1<=p&&0<=x;p--,x--)if(J[p]!==pe[x]){if(p!==1||x!==1)do if(p--,x--,0>x||J[p]!==pe[x]){var Te=`
6
+ `+J[p].replace(" at new "," at ");return i.displayName&&Te.includes("<anonymous>")&&(Te=Te.replace("<anonymous>",i.displayName)),Te}while(1<=p&&0<=x);break}}}finally{Ae=!1,Error.prepareStackTrace=u}return(u=i?i.displayName||i.name:"")?Se(u):""}function xe(i,o){switch(i.tag){case 26:case 27:case 5:return Se(i.type);case 16:return Se("Lazy");case 13:return i.child!==o&&o!==null?Se("Suspense Fallback"):Se("Suspense");case 19:return Se("SuspenseList");case 0:case 15:return ke(i.type,!1);case 11:return ke(i.type.render,!1);case 1:return ke(i.type,!0);case 31:return Se("Activity");default:return""}}function Ce(i){try{var o="",u=null;do o+=xe(i,u),u=i,i=i.return;while(i);return o}catch(p){return`
7
+ Error generating stack: `+p.message+`
8
+ `+p.stack}}var Me=Object.prototype.hasOwnProperty,ze=e.unstable_scheduleCallback,Fe=e.unstable_cancelCallback,ye=e.unstable_shouldYield,_e=e.unstable_requestPaint,ee=e.unstable_now,fe=e.unstable_getCurrentPriorityLevel,Q=e.unstable_ImmediatePriority,ne=e.unstable_UserBlockingPriority,we=e.unstable_NormalPriority,Pe=e.unstable_LowPriority,Ye=e.unstable_IdlePriority,Ze=e.log,bt=e.unstable_setDisableYieldValue,Je=null,vt=null;function kt(i){if(typeof Ze=="function"&&bt(i),vt&&typeof vt.setStrictMode=="function")try{vt.setStrictMode(Je,i)}catch{}}var nt=Math.clz32?Math.clz32:it,rt=Math.log,ct=Math.LN2;function it(i){return i>>>=0,i===0?32:31-(rt(i)/ct|0)|0}var ft=256,Lt=262144,Pt=4194304;function At(i){var o=i&42;if(o!==0)return o;switch(i&-i){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 i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function X(i,o,u){var p=i.pendingLanes;if(p===0)return 0;var x=0,w=i.suspendedLanes,M=i.pingedLanes;i=i.warmLanes;var G=p&134217727;return G!==0?(p=G&~w,p!==0?x=At(p):(M&=G,M!==0?x=At(M):u||(u=G&~i,u!==0&&(x=At(u))))):(G=p&~w,G!==0?x=At(G):M!==0?x=At(M):u||(u=p&~i,u!==0&&(x=At(u)))),x===0?0:o!==0&&o!==x&&(o&w)===0&&(w=x&-x,u=o&-o,w>=u||w===32&&(u&4194048)!==0)?o:x}function me(i,o){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&o)===0}function Le(i,o){switch(i){case 1:case 2:case 4:case 8:case 64:return o+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 o+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 Xe(){var i=Pt;return Pt<<=1,(Pt&62914560)===0&&(Pt=4194304),i}function Rt(i){for(var o=[],u=0;31>u;u++)o.push(i);return o}function lt(i,o){i.pendingLanes|=o,o!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function He(i,o,u,p,x,w){var M=i.pendingLanes;i.pendingLanes=u,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=u,i.entangledLanes&=u,i.errorRecoveryDisabledLanes&=u,i.shellSuspendCounter=0;var G=i.entanglements,J=i.expirationTimes,pe=i.hiddenUpdates;for(u=M&~u;0<u;){var Te=31-nt(u),Oe=1<<Te;G[Te]=0,J[Te]=-1;var he=pe[Te];if(he!==null)for(pe[Te]=null,Te=0;Te<he.length;Te++){var ve=he[Te];ve!==null&&(ve.lane&=-536870913)}u&=~Oe}p!==0&&qe(i,p,0),w!==0&&x===0&&i.tag!==0&&(i.suspendedLanes|=w&~(M&~o))}function qe(i,o,u){i.pendingLanes|=o,i.suspendedLanes&=~o;var p=31-nt(o);i.entangledLanes|=o,i.entanglements[p]=i.entanglements[p]|1073741824|u&261930}function De(i,o){var u=i.entangledLanes|=o;for(i=i.entanglements;u;){var p=31-nt(u),x=1<<p;x&o|i[p]&o&&(i[p]|=o),u&=~x}}function je(i,o){var u=o&-o;return u=(u&42)!==0?1:Ie(u),(u&(i.suspendedLanes|o))!==0?0:u}function Ie(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=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:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function We(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function dt(){var i=W.p;return i!==0?i:(i=window.event,i===void 0?32:ow(i.type))}function Et(i,o){var u=W.p;try{return W.p=i,o()}finally{W.p=u}}var Ne=Math.random().toString(36).slice(2),Tt="__reactFiber$"+Ne,Qt="__reactProps$"+Ne,rn="__reactContainer$"+Ne,Rn="__reactEvents$"+Ne,Yn="__reactListeners$"+Ne,Br="__reactHandles$"+Ne,Bn="__reactResources$"+Ne,ri="__reactMarker$"+Ne;function Fr(i){delete i[Tt],delete i[Qt],delete i[Rn],delete i[Yn],delete i[Br]}function tr(i){var o=i[Tt];if(o)return o;for(var u=i.parentNode;u;){if(o=u[rn]||u[Tt]){if(u=o.alternate,o.child!==null||u!==null&&u.child!==null)for(i=H1(i);i!==null;){if(u=i[Tt])return u;i=H1(i)}return o}i=u,u=i.parentNode}return null}function Qi(i){if(i=i[Tt]||i[rn]){var o=i.tag;if(o===5||o===6||o===13||o===31||o===26||o===27||o===3)return i}return null}function zs(i){var o=i.tag;if(o===5||o===26||o===27||o===6)return i.stateNode;throw Error(r(33))}function Ps(i){var o=i[Bn];return o||(o=i[Bn]={hoistableStyles:new Map,hoistableScripts:new Map}),o}function Fn(i){i[ri]=!0}var gf=new Set,Io={};function Ji(i,o){$e(i,o),$e(i+"Capture",o)}function $e(i,o){for(Io[i]=o,i=0;i<o.length;i++)gf.add(o[i])}var at=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]*$"),jt={},on={};function Mn(i){return Me.call(on,i)?!0:Me.call(jt,i)?!1:at.test(i)?on[i]=!0:(jt[i]=!0,!1)}function ur(i,o,u){if(Mn(o))if(u===null)i.removeAttribute(o);else{switch(typeof u){case"undefined":case"function":case"symbol":i.removeAttribute(o);return;case"boolean":var p=o.toLowerCase().slice(0,5);if(p!=="data-"&&p!=="aria-"){i.removeAttribute(o);return}}i.setAttribute(o,""+u)}}function Ur(i,o,u){if(u===null)i.removeAttribute(o);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(o);return}i.setAttribute(o,""+u)}}function Cr(i,o,u,p){if(p===null)i.removeAttribute(u);else{switch(typeof p){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(u);return}i.setAttributeNS(o,u,""+p)}}function kn(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function qr(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function bf(i,o,u){var p=Object.getOwnPropertyDescriptor(i.constructor.prototype,o);if(!i.hasOwnProperty(o)&&typeof p<"u"&&typeof p.get=="function"&&typeof p.set=="function"){var x=p.get,w=p.set;return Object.defineProperty(i,o,{configurable:!0,get:function(){return x.call(this)},set:function(M){u=""+M,w.call(this,M)}}),Object.defineProperty(i,o,{enumerable:p.enumerable}),{getValue:function(){return u},setValue:function(M){u=""+M},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function Ea(i){if(!i._valueTracker){var o=qr(i)?"checked":"value";i._valueTracker=bf(i,o,""+i[o])}}function Yl(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var u=o.getValue(),p="";return i&&(p=qr(i)?i.checked?"true":"false":i.value),i=p,i!==u?(o.setValue(i),!0):!1}function Ta(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var lm=/[\n"\\]/g;function Rr(i){return i.replace(lm,function(o){return"\\"+o.charCodeAt(0).toString(16)+" "})}function Xl(i,o,u,p,x,w,M,G){i.name="",M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?i.type=M:i.removeAttribute("type"),o!=null?M==="number"?(o===0&&i.value===""||i.value!=o)&&(i.value=""+kn(o)):i.value!==""+kn(o)&&(i.value=""+kn(o)):M!=="submit"&&M!=="reset"||i.removeAttribute("value"),o!=null?Ca(i,M,kn(o)):u!=null?Ca(i,M,kn(u)):p!=null&&i.removeAttribute("value"),x==null&&w!=null&&(i.defaultChecked=!!w),x!=null&&(i.checked=x&&typeof x!="function"&&typeof x!="symbol"),G!=null&&typeof G!="function"&&typeof G!="symbol"&&typeof G!="boolean"?i.name=""+kn(G):i.removeAttribute("name")}function Mo(i,o,u,p,x,w,M,G){if(w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(i.type=w),o!=null||u!=null){if(!(w!=="submit"&&w!=="reset"||o!=null)){Ea(i);return}u=u!=null?""+kn(u):"",o=o!=null?""+kn(o):u,G||o===i.value||(i.value=o),i.defaultValue=o}p=p??x,p=typeof p!="function"&&typeof p!="symbol"&&!!p,i.checked=G?i.checked:!!p,i.defaultChecked=!!p,M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"&&(i.name=M),Ea(i)}function Ca(i,o,u){o==="number"&&Ta(i.ownerDocument)===i||i.defaultValue===""+u||(i.defaultValue=""+u)}function nr(i,o,u,p){if(i=i.options,o){o={};for(var x=0;x<u.length;x++)o["$"+u[x]]=!0;for(u=0;u<i.length;u++)x=o.hasOwnProperty("$"+i[u].value),i[u].selected!==x&&(i[u].selected=x),x&&p&&(i[u].defaultSelected=!0)}else{for(u=""+kn(u),o=null,x=0;x<i.length;x++){if(i[x].value===u){i[x].selected=!0,p&&(i[x].defaultSelected=!0);return}o!==null||i[x].disabled||(o=i[x])}o!==null&&(o.selected=!0)}}function yf(i,o,u){if(o!=null&&(o=""+kn(o),o!==i.value&&(i.value=o),u==null)){i.defaultValue!==o&&(i.defaultValue=o);return}i.defaultValue=u!=null?""+kn(u):""}function Ra(i,o,u,p){if(o==null){if(p!=null){if(u!=null)throw Error(r(92));if(q(p)){if(1<p.length)throw Error(r(93));p=p[0]}u=p}u==null&&(u=""),o=u}u=kn(o),i.defaultValue=u,p=i.textContent,p===u&&p!==""&&p!==null&&(i.value=p),Ea(i)}function St(i,o){if(o){var u=i.firstChild;if(u&&u===i.lastChild&&u.nodeType===3){u.nodeValue=o;return}}i.textContent=o}var vf=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 Un(i,o,u){var p=o.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?p?i.setProperty(o,""):o==="float"?i.cssFloat="":i[o]="":p?i.setProperty(o,u):typeof u!="number"||u===0||vf.has(o)?o==="float"?i.cssFloat=u:i[o]=(""+u).trim():i[o]=u+"px"}function an(i,o,u){if(o!=null&&typeof o!="object")throw Error(r(62));if(i=i.style,u!=null){for(var p in u)!u.hasOwnProperty(p)||o!=null&&o.hasOwnProperty(p)||(p.indexOf("--")===0?i.setProperty(p,""):p==="float"?i.cssFloat="":i[p]="");for(var x in o)p=o[x],o.hasOwnProperty(x)&&u[x]!==p&&Un(i,x,p)}else for(var w in o)o.hasOwnProperty(w)&&Un(i,w,o[w])}function $s(i){if(i.indexOf("-")===-1)return!1;switch(i){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 es=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"],["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"]]),Zl=/^[\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 Bs(i){return Zl.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function Ge(){}var st=null;function Nt(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Ht=null,_n=null;function ii(i){var o=Qi(i);if(o&&(i=o.stateNode)){var u=i[Qt]||null;e:switch(i=o.stateNode,o.type){case"input":if(Xl(i,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),o=u.name,u.type==="radio"&&o!=null){for(u=i;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+Rr(""+o)+'"][type="radio"]'),o=0;o<u.length;o++){var p=u[o];if(p!==i&&p.form===i.form){var x=p[Qt]||null;if(!x)throw Error(r(90));Xl(p,x.value,x.defaultValue,x.defaultValue,x.checked,x.defaultChecked,x.type,x.name)}}for(o=0;o<u.length;o++)p=u[o],p.form===i.form&&Yl(p)}break e;case"textarea":yf(i,u.value,u.defaultValue);break e;case"select":o=u.value,o!=null&&nr(i,!!u.multiple,o,!1)}}}var Ql=!1;function xf(i,o,u){if(Ql)return i(o,u);Ql=!0;try{var p=i(o);return p}finally{if(Ql=!1,(Ht!==null||_n!==null)&&(ad(),Ht&&(o=Ht,i=_n,_n=Ht=null,ii(o),i)))for(o=0;o<i.length;o++)ii(i[o])}}function Jl(i,o){var u=i.stateNode;if(u===null)return null;var p=u[Qt]||null;if(p===null)return null;u=p[o];e:switch(o){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)||(i=i.type,p=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!p;break e;default:i=!1}if(i)return null;if(u&&typeof u!="function")throw Error(r(231,o,typeof u));return u}var ts=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),um=!1;if(ts)try{var eu={};Object.defineProperty(eu,"passive",{get:function(){um=!0}}),window.addEventListener("test",eu,eu),window.removeEventListener("test",eu,eu)}catch{um=!1}var Fs=null,cm=null,kf=null;function z0(){if(kf)return kf;var i,o=cm,u=o.length,p,x="value"in Fs?Fs.value:Fs.textContent,w=x.length;for(i=0;i<u&&o[i]===x[i];i++);var M=u-i;for(p=1;p<=M&&o[u-p]===x[w-p];p++);return kf=x.slice(i,1<p?1-p:void 0)}function Sf(i){var o=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&o===13&&(i=13)):i=o,i===10&&(i=13),32<=i||i===13?i:0}function wf(){return!0}function P0(){return!1}function _r(i){function o(u,p,x,w,M){this._reactName=u,this._targetInst=x,this.type=p,this.nativeEvent=w,this.target=M,this.currentTarget=null;for(var G in i)i.hasOwnProperty(G)&&(u=i[G],this[G]=u?u(w):w[G]);return this.isDefaultPrevented=(w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1)?wf:P0,this.isPropagationStopped=P0,this}return m(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=wf)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=wf)},persist:function(){},isPersistent:wf}),o}var Do={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ef=_r(Do),tu=m({},Do,{view:0,detail:0}),_2=_r(tu),fm,dm,nu,Tf=m({},tu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:hm,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==nu&&(nu&&i.type==="mousemove"?(fm=i.screenX-nu.screenX,dm=i.screenY-nu.screenY):dm=fm=0,nu=i),fm)},movementY:function(i){return"movementY"in i?i.movementY:dm}}),$0=_r(Tf),A2=m({},Tf,{dataTransfer:0}),N2=_r(A2),O2=m({},tu,{relatedTarget:0}),pm=_r(O2),I2=m({},Do,{animationName:0,elapsedTime:0,pseudoElement:0}),M2=_r(I2),D2=m({},Do,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),L2=_r(D2),j2=m({},Do,{data:0}),B0=_r(j2),z2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},P2={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"},$2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function B2(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=$2[i])?!!o[i]:!1}function hm(){return B2}var F2=m({},tu,{key:function(i){if(i.key){var o=z2[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=Sf(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?P2[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:hm,charCode:function(i){return i.type==="keypress"?Sf(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Sf(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),U2=_r(F2),q2=m({},Tf,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),F0=_r(q2),H2=m({},tu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:hm}),V2=_r(H2),G2=m({},Do,{propertyName:0,elapsedTime:0,pseudoElement:0}),W2=_r(G2),K2=m({},Tf,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),Y2=_r(K2),X2=m({},Do,{newState:0,oldState:0}),Z2=_r(X2),Q2=[9,13,27,32],mm=ts&&"CompositionEvent"in window,ru=null;ts&&"documentMode"in document&&(ru=document.documentMode);var J2=ts&&"TextEvent"in window&&!ru,U0=ts&&(!mm||ru&&8<ru&&11>=ru),q0=" ",H0=!1;function V0(i,o){switch(i){case"keyup":return Q2.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function G0(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var _a=!1;function eL(i,o){switch(i){case"compositionend":return G0(o);case"keypress":return o.which!==32?null:(H0=!0,q0);case"textInput":return i=o.data,i===q0&&H0?null:i;default:return null}}function tL(i,o){if(_a)return i==="compositionend"||!mm&&V0(i,o)?(i=z0(),kf=cm=Fs=null,_a=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return U0&&o.locale!=="ko"?null:o.data;default:return null}}var nL={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 W0(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!nL[i.type]:o==="textarea"}function K0(i,o,u,p){Ht?_n?_n.push(p):_n=[p]:Ht=p,o=hd(o,"onChange"),0<o.length&&(u=new Ef("onChange","change",null,u,p),i.push({event:u,listeners:o}))}var iu=null,su=null;function rL(i){N1(i,0)}function Cf(i){var o=zs(i);if(Yl(o))return i}function Y0(i,o){if(i==="change")return o}var X0=!1;if(ts){var gm;if(ts){var bm="oninput"in document;if(!bm){var Z0=document.createElement("div");Z0.setAttribute("oninput","return;"),bm=typeof Z0.oninput=="function"}gm=bm}else gm=!1;X0=gm&&(!document.documentMode||9<document.documentMode)}function Q0(){iu&&(iu.detachEvent("onpropertychange",J0),su=iu=null)}function J0(i){if(i.propertyName==="value"&&Cf(su)){var o=[];K0(o,su,i,Nt(i)),xf(rL,o)}}function iL(i,o,u){i==="focusin"?(Q0(),iu=o,su=u,iu.attachEvent("onpropertychange",J0)):i==="focusout"&&Q0()}function sL(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Cf(su)}function oL(i,o){if(i==="click")return Cf(o)}function aL(i,o){if(i==="input"||i==="change")return Cf(o)}function lL(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var Hr=typeof Object.is=="function"?Object.is:lL;function ou(i,o){if(Hr(i,o))return!0;if(typeof i!="object"||i===null||typeof o!="object"||o===null)return!1;var u=Object.keys(i),p=Object.keys(o);if(u.length!==p.length)return!1;for(p=0;p<u.length;p++){var x=u[p];if(!Me.call(o,x)||!Hr(i[x],o[x]))return!1}return!0}function ek(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function tk(i,o){var u=ek(i);i=0;for(var p;u;){if(u.nodeType===3){if(p=i+u.textContent.length,i<=o&&p>=o)return{node:u,offset:o-i};i=p}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=ek(u)}}function nk(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?nk(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function rk(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var o=Ta(i.document);o instanceof i.HTMLIFrameElement;){try{var u=typeof o.contentWindow.location.href=="string"}catch{u=!1}if(u)i=o.contentWindow;else break;o=Ta(i.document)}return o}function ym(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o&&(o==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||o==="textarea"||i.contentEditable==="true")}var uL=ts&&"documentMode"in document&&11>=document.documentMode,Aa=null,vm=null,au=null,xm=!1;function ik(i,o,u){var p=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;xm||Aa==null||Aa!==Ta(p)||(p=Aa,"selectionStart"in p&&ym(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}),au&&ou(au,p)||(au=p,p=hd(vm,"onSelect"),0<p.length&&(o=new Ef("onSelect","select",null,o,u),i.push({event:o,listeners:p}),o.target=Aa)))}function Lo(i,o){var u={};return u[i.toLowerCase()]=o.toLowerCase(),u["Webkit"+i]="webkit"+o,u["Moz"+i]="moz"+o,u}var Na={animationend:Lo("Animation","AnimationEnd"),animationiteration:Lo("Animation","AnimationIteration"),animationstart:Lo("Animation","AnimationStart"),transitionrun:Lo("Transition","TransitionRun"),transitionstart:Lo("Transition","TransitionStart"),transitioncancel:Lo("Transition","TransitionCancel"),transitionend:Lo("Transition","TransitionEnd")},km={},sk={};ts&&(sk=document.createElement("div").style,"AnimationEvent"in window||(delete Na.animationend.animation,delete Na.animationiteration.animation,delete Na.animationstart.animation),"TransitionEvent"in window||delete Na.transitionend.transition);function jo(i){if(km[i])return km[i];if(!Na[i])return i;var o=Na[i],u;for(u in o)if(o.hasOwnProperty(u)&&u in sk)return km[i]=o[u];return i}var ok=jo("animationend"),ak=jo("animationiteration"),lk=jo("animationstart"),cL=jo("transitionrun"),fL=jo("transitionstart"),dL=jo("transitioncancel"),uk=jo("transitionend"),ck=new Map,Sm="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error 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(" ");Sm.push("scrollEnd");function ki(i,o){ck.set(i,o),Ji(o,[i])}var Rf=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var o=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(o))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},si=[],Oa=0,wm=0;function _f(){for(var i=Oa,o=wm=Oa=0;o<i;){var u=si[o];si[o++]=null;var p=si[o];si[o++]=null;var x=si[o];si[o++]=null;var w=si[o];if(si[o++]=null,p!==null&&x!==null){var M=p.pending;M===null?x.next=x:(x.next=M.next,M.next=x),p.pending=x}w!==0&&fk(u,x,w)}}function Af(i,o,u,p){si[Oa++]=i,si[Oa++]=o,si[Oa++]=u,si[Oa++]=p,wm|=p,i.lanes|=p,i=i.alternate,i!==null&&(i.lanes|=p)}function Em(i,o,u,p){return Af(i,o,u,p),Nf(i)}function zo(i,o){return Af(i,null,null,o),Nf(i)}function fk(i,o,u){i.lanes|=u;var p=i.alternate;p!==null&&(p.lanes|=u);for(var x=!1,w=i.return;w!==null;)w.childLanes|=u,p=w.alternate,p!==null&&(p.childLanes|=u),w.tag===22&&(i=w.stateNode,i===null||i._visibility&1||(x=!0)),i=w,w=w.return;return i.tag===3?(w=i.stateNode,x&&o!==null&&(x=31-nt(u),i=w.hiddenUpdates,p=i[x],p===null?i[x]=[o]:p.push(o),o.lane=u|536870912),w):null}function Nf(i){if(50<Au)throw Au=0,Mg=null,Error(r(185));for(var o=i.return;o!==null;)i=o,o=i.return;return i.tag===3?i.stateNode:null}var Ia={};function pL(i,o,u,p){this.tag=i,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=o,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 Vr(i,o,u,p){return new pL(i,o,u,p)}function Tm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function ns(i,o){var u=i.alternate;return u===null?(u=Vr(i.tag,o,i.key,i.mode),u.elementType=i.elementType,u.type=i.type,u.stateNode=i.stateNode,u.alternate=i,i.alternate=u):(u.pendingProps=o,u.type=i.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=i.flags&65011712,u.childLanes=i.childLanes,u.lanes=i.lanes,u.child=i.child,u.memoizedProps=i.memoizedProps,u.memoizedState=i.memoizedState,u.updateQueue=i.updateQueue,o=i.dependencies,u.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},u.sibling=i.sibling,u.index=i.index,u.ref=i.ref,u.refCleanup=i.refCleanup,u}function dk(i,o){i.flags&=65011714;var u=i.alternate;return u===null?(i.childLanes=0,i.lanes=o,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=u.childLanes,i.lanes=u.lanes,i.child=u.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=u.memoizedProps,i.memoizedState=u.memoizedState,i.updateQueue=u.updateQueue,i.type=u.type,o=u.dependencies,i.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),i}function Of(i,o,u,p,x,w){var M=0;if(p=i,typeof i=="function")Tm(i)&&(M=1);else if(typeof i=="string")M=yj(i,u,Z.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case $:return i=Vr(31,u,o,x),i.elementType=$,i.lanes=w,i;case S:return Po(u.children,x,w,o);case C:M=8,x|=24;break;case E:return i=Vr(12,u,o,x|2),i.elementType=E,i.lanes=w,i;case D:return i=Vr(13,u,o,x),i.elementType=D,i.lanes=w,i;case A:return i=Vr(19,u,o,x),i.elementType=A,i.lanes=w,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case R:M=10;break e;case T:M=9;break e;case _:M=11;break e;case I:M=14;break e;case P:M=16,p=null;break e}M=29,u=Error(r(130,i===null?"null":typeof i,"")),p=null}return o=Vr(M,u,o,x),o.elementType=i,o.type=p,o.lanes=w,o}function Po(i,o,u,p){return i=Vr(7,i,p,o),i.lanes=u,i}function Cm(i,o,u){return i=Vr(6,i,null,o),i.lanes=u,i}function pk(i){var o=Vr(18,null,null,0);return o.stateNode=i,o}function Rm(i,o,u){return o=Vr(4,i.children!==null?i.children:[],i.key,o),o.lanes=u,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}var hk=new WeakMap;function oi(i,o){if(typeof i=="object"&&i!==null){var u=hk.get(i);return u!==void 0?u:(o={value:i,source:o,stack:Ce(o)},hk.set(i,o),o)}return{value:i,source:o,stack:Ce(o)}}var Ma=[],Da=0,If=null,lu=0,ai=[],li=0,Us=null,ji=1,zi="";function rs(i,o){Ma[Da++]=lu,Ma[Da++]=If,If=i,lu=o}function mk(i,o,u){ai[li++]=ji,ai[li++]=zi,ai[li++]=Us,Us=i;var p=ji;i=zi;var x=32-nt(p)-1;p&=~(1<<x),u+=1;var w=32-nt(o)+x;if(30<w){var M=x-x%5;w=(p&(1<<M)-1).toString(32),p>>=M,x-=M,ji=1<<32-nt(o)+x|u<<x|p,zi=w+i}else ji=1<<w|u<<x|p,zi=i}function _m(i){i.return!==null&&(rs(i,1),mk(i,1,0))}function Am(i){for(;i===If;)If=Ma[--Da],Ma[Da]=null,lu=Ma[--Da],Ma[Da]=null;for(;i===Us;)Us=ai[--li],ai[li]=null,zi=ai[--li],ai[li]=null,ji=ai[--li],ai[li]=null}function gk(i,o){ai[li++]=ji,ai[li++]=zi,ai[li++]=Us,ji=o.id,zi=o.overflow,Us=i}var rr=null,En=null,Kt=!1,qs=null,ui=!1,Nm=Error(r(519));function Hs(i){var o=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw uu(oi(o,i)),Nm}function bk(i){var o=i.stateNode,u=i.type,p=i.memoizedProps;switch(o[Tt]=i,o[Qt]=p,u){case"dialog":Bt("cancel",o),Bt("close",o);break;case"iframe":case"object":case"embed":Bt("load",o);break;case"video":case"audio":for(u=0;u<Ou.length;u++)Bt(Ou[u],o);break;case"source":Bt("error",o);break;case"img":case"image":case"link":Bt("error",o),Bt("load",o);break;case"details":Bt("toggle",o);break;case"input":Bt("invalid",o),Mo(o,p.value,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name,!0);break;case"select":Bt("invalid",o);break;case"textarea":Bt("invalid",o),Ra(o,p.value,p.defaultValue,p.children)}u=p.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||o.textContent===""+u||p.suppressHydrationWarning===!0||D1(o.textContent,u)?(p.popover!=null&&(Bt("beforetoggle",o),Bt("toggle",o)),p.onScroll!=null&&Bt("scroll",o),p.onScrollEnd!=null&&Bt("scrollend",o),p.onClick!=null&&(o.onclick=Ge),o=!0):o=!1,o||Hs(i,!0)}function yk(i){for(rr=i.return;rr;)switch(rr.tag){case 5:case 31:case 13:ui=!1;return;case 27:case 3:ui=!0;return;default:rr=rr.return}}function La(i){if(i!==rr)return!1;if(!Kt)return yk(i),Kt=!0,!1;var o=i.tag,u;if((u=o!==3&&o!==27)&&((u=o===5)&&(u=i.type,u=!(u!=="form"&&u!=="button")||Kg(i.type,i.memoizedProps)),u=!u),u&&En&&Hs(i),yk(i),o===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));En=q1(i)}else if(o===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(317));En=q1(i)}else o===27?(o=En,io(i.type)?(i=Jg,Jg=null,En=i):En=o):En=rr?fi(i.stateNode.nextSibling):null;return!0}function $o(){En=rr=null,Kt=!1}function Om(){var i=qs;return i!==null&&(Ir===null?Ir=i:Ir.push.apply(Ir,i),qs=null),i}function uu(i){qs===null?qs=[i]:qs.push(i)}var Im=z(null),Bo=null,is=null;function Vs(i,o,u){L(Im,o._currentValue),o._currentValue=u}function ss(i){i._currentValue=Im.current,V(Im)}function Mm(i,o,u){for(;i!==null;){var p=i.alternate;if((i.childLanes&o)!==o?(i.childLanes|=o,p!==null&&(p.childLanes|=o)):p!==null&&(p.childLanes&o)!==o&&(p.childLanes|=o),i===u)break;i=i.return}}function Dm(i,o,u,p){var x=i.child;for(x!==null&&(x.return=i);x!==null;){var w=x.dependencies;if(w!==null){var M=x.child;w=w.firstContext;e:for(;w!==null;){var G=w;w=x;for(var J=0;J<o.length;J++)if(G.context===o[J]){w.lanes|=u,G=w.alternate,G!==null&&(G.lanes|=u),Mm(w.return,u,i),p||(M=null);break e}w=G.next}}else if(x.tag===18){if(M=x.return,M===null)throw Error(r(341));M.lanes|=u,w=M.alternate,w!==null&&(w.lanes|=u),Mm(M,u,i),M=null}else M=x.child;if(M!==null)M.return=x;else for(M=x;M!==null;){if(M===i){M=null;break}if(x=M.sibling,x!==null){x.return=M.return,M=x;break}M=M.return}x=M}}function ja(i,o,u,p){i=null;for(var x=o,w=!1;x!==null;){if(!w){if((x.flags&524288)!==0)w=!0;else if((x.flags&262144)!==0)break}if(x.tag===10){var M=x.alternate;if(M===null)throw Error(r(387));if(M=M.memoizedProps,M!==null){var G=x.type;Hr(x.pendingProps.value,M.value)||(i!==null?i.push(G):i=[G])}}else if(x===ae.current){if(M=x.alternate,M===null)throw Error(r(387));M.memoizedState.memoizedState!==x.memoizedState.memoizedState&&(i!==null?i.push(ju):i=[ju])}x=x.return}i!==null&&Dm(o,i,u,p),o.flags|=262144}function Mf(i){for(i=i.firstContext;i!==null;){if(!Hr(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Fo(i){Bo=i,is=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function ir(i){return vk(Bo,i)}function Df(i,o){return Bo===null&&Fo(i),vk(i,o)}function vk(i,o){var u=o._currentValue;if(o={context:o,memoizedValue:u,next:null},is===null){if(i===null)throw Error(r(308));is=o,i.dependencies={lanes:0,firstContext:o},i.flags|=524288}else is=is.next=o;return u}var hL=typeof AbortController<"u"?AbortController:function(){var i=[],o=this.signal={aborted:!1,addEventListener:function(u,p){i.push(p)}};this.abort=function(){o.aborted=!0,i.forEach(function(u){return u()})}},mL=e.unstable_scheduleCallback,gL=e.unstable_NormalPriority,qn={$$typeof:R,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Lm(){return{controller:new hL,data:new Map,refCount:0}}function cu(i){i.refCount--,i.refCount===0&&mL(gL,function(){i.controller.abort()})}var fu=null,jm=0,za=0,Pa=null;function bL(i,o){if(fu===null){var u=fu=[];jm=0,za=$g(),Pa={status:"pending",value:void 0,then:function(p){u.push(p)}}}return jm++,o.then(xk,xk),o}function xk(){if(--jm===0&&fu!==null){Pa!==null&&(Pa.status="fulfilled");var i=fu;fu=null,za=0,Pa=null;for(var o=0;o<i.length;o++)(0,i[o])()}}function yL(i,o){var u=[],p={status:"pending",value:null,reason:null,then:function(x){u.push(x)}};return i.then(function(){p.status="fulfilled",p.value=o;for(var x=0;x<u.length;x++)(0,u[x])(o)},function(x){for(p.status="rejected",p.reason=x,x=0;x<u.length;x++)(0,u[x])(void 0)}),p}var kk=H.S;H.S=function(i,o){i1=ee(),typeof o=="object"&&o!==null&&typeof o.then=="function"&&bL(i,o),kk!==null&&kk(i,o)};var Uo=z(null);function zm(){var i=Uo.current;return i!==null?i:bn.pooledCache}function Lf(i,o){o===null?L(Uo,Uo.current):L(Uo,o.pool)}function Sk(){var i=zm();return i===null?null:{parent:qn._currentValue,pool:i}}var $a=Error(r(460)),Pm=Error(r(474)),jf=Error(r(542)),zf={then:function(){}};function wk(i){return i=i.status,i==="fulfilled"||i==="rejected"}function Ek(i,o,u){switch(u=i[u],u===void 0?i.push(o):u!==o&&(o.then(Ge,Ge),o=u),o.status){case"fulfilled":return o.value;case"rejected":throw i=o.reason,Ck(i),i;default:if(typeof o.status=="string")o.then(Ge,Ge);else{if(i=bn,i!==null&&100<i.shellSuspendCounter)throw Error(r(482));i=o,i.status="pending",i.then(function(p){if(o.status==="pending"){var x=o;x.status="fulfilled",x.value=p}},function(p){if(o.status==="pending"){var x=o;x.status="rejected",x.reason=p}})}switch(o.status){case"fulfilled":return o.value;case"rejected":throw i=o.reason,Ck(i),i}throw Ho=o,$a}}function qo(i){try{var o=i._init;return o(i._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(Ho=u,$a):u}}var Ho=null;function Tk(){if(Ho===null)throw Error(r(459));var i=Ho;return Ho=null,i}function Ck(i){if(i===$a||i===jf)throw Error(r(483))}var Ba=null,du=0;function Pf(i){var o=du;return du+=1,Ba===null&&(Ba=[]),Ek(Ba,i,o)}function pu(i,o){o=o.props.ref,i.ref=o!==void 0?o:null}function $f(i,o){throw o.$$typeof===b?Error(r(525)):(i=Object.prototype.toString.call(o),Error(r(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i)))}function Rk(i){function o(oe,se){if(i){var de=oe.deletions;de===null?(oe.deletions=[se],oe.flags|=16):de.push(se)}}function u(oe,se){if(!i)return null;for(;se!==null;)o(oe,se),se=se.sibling;return null}function p(oe){for(var se=new Map;oe!==null;)oe.key!==null?se.set(oe.key,oe):se.set(oe.index,oe),oe=oe.sibling;return se}function x(oe,se){return oe=ns(oe,se),oe.index=0,oe.sibling=null,oe}function w(oe,se,de){return oe.index=de,i?(de=oe.alternate,de!==null?(de=de.index,de<se?(oe.flags|=67108866,se):de):(oe.flags|=67108866,se)):(oe.flags|=1048576,se)}function M(oe){return i&&oe.alternate===null&&(oe.flags|=67108866),oe}function G(oe,se,de,Re){return se===null||se.tag!==6?(se=Cm(de,oe.mode,Re),se.return=oe,se):(se=x(se,de),se.return=oe,se)}function J(oe,se,de,Re){var ut=de.type;return ut===S?Te(oe,se,de.props.children,Re,de.key):se!==null&&(se.elementType===ut||typeof ut=="object"&&ut!==null&&ut.$$typeof===P&&qo(ut)===se.type)?(se=x(se,de.props),pu(se,de),se.return=oe,se):(se=Of(de.type,de.key,de.props,null,oe.mode,Re),pu(se,de),se.return=oe,se)}function pe(oe,se,de,Re){return se===null||se.tag!==4||se.stateNode.containerInfo!==de.containerInfo||se.stateNode.implementation!==de.implementation?(se=Rm(de,oe.mode,Re),se.return=oe,se):(se=x(se,de.children||[]),se.return=oe,se)}function Te(oe,se,de,Re,ut){return se===null||se.tag!==7?(se=Po(de,oe.mode,Re,ut),se.return=oe,se):(se=x(se,de),se.return=oe,se)}function Oe(oe,se,de){if(typeof se=="string"&&se!==""||typeof se=="number"||typeof se=="bigint")return se=Cm(""+se,oe.mode,de),se.return=oe,se;if(typeof se=="object"&&se!==null){switch(se.$$typeof){case y:return de=Of(se.type,se.key,se.props,null,oe.mode,de),pu(de,se),de.return=oe,de;case k:return se=Rm(se,oe.mode,de),se.return=oe,se;case P:return se=qo(se),Oe(oe,se,de)}if(q(se)||U(se))return se=Po(se,oe.mode,de,null),se.return=oe,se;if(typeof se.then=="function")return Oe(oe,Pf(se),de);if(se.$$typeof===R)return Oe(oe,Df(oe,se),de);$f(oe,se)}return null}function he(oe,se,de,Re){var ut=se!==null?se.key:null;if(typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint")return ut!==null?null:G(oe,se,""+de,Re);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case y:return de.key===ut?J(oe,se,de,Re):null;case k:return de.key===ut?pe(oe,se,de,Re):null;case P:return de=qo(de),he(oe,se,de,Re)}if(q(de)||U(de))return ut!==null?null:Te(oe,se,de,Re,null);if(typeof de.then=="function")return he(oe,se,Pf(de),Re);if(de.$$typeof===R)return he(oe,se,Df(oe,de),Re);$f(oe,de)}return null}function ve(oe,se,de,Re,ut){if(typeof Re=="string"&&Re!==""||typeof Re=="number"||typeof Re=="bigint")return oe=oe.get(de)||null,G(se,oe,""+Re,ut);if(typeof Re=="object"&&Re!==null){switch(Re.$$typeof){case y:return oe=oe.get(Re.key===null?de:Re.key)||null,J(se,oe,Re,ut);case k:return oe=oe.get(Re.key===null?de:Re.key)||null,pe(se,oe,Re,ut);case P:return Re=qo(Re),ve(oe,se,de,Re,ut)}if(q(Re)||U(Re))return oe=oe.get(de)||null,Te(se,oe,Re,ut,null);if(typeof Re.then=="function")return ve(oe,se,de,Pf(Re),ut);if(Re.$$typeof===R)return ve(oe,se,de,Df(se,Re),ut);$f(se,Re)}return null}function et(oe,se,de,Re){for(var ut=null,Jt=null,ot=se,It=se=0,Gt=null;ot!==null&&It<de.length;It++){ot.index>It?(Gt=ot,ot=null):Gt=ot.sibling;var en=he(oe,ot,de[It],Re);if(en===null){ot===null&&(ot=Gt);break}i&&ot&&en.alternate===null&&o(oe,ot),se=w(en,se,It),Jt===null?ut=en:Jt.sibling=en,Jt=en,ot=Gt}if(It===de.length)return u(oe,ot),Kt&&rs(oe,It),ut;if(ot===null){for(;It<de.length;It++)ot=Oe(oe,de[It],Re),ot!==null&&(se=w(ot,se,It),Jt===null?ut=ot:Jt.sibling=ot,Jt=ot);return Kt&&rs(oe,It),ut}for(ot=p(ot);It<de.length;It++)Gt=ve(ot,oe,It,de[It],Re),Gt!==null&&(i&&Gt.alternate!==null&&ot.delete(Gt.key===null?It:Gt.key),se=w(Gt,se,It),Jt===null?ut=Gt:Jt.sibling=Gt,Jt=Gt);return i&&ot.forEach(function(uo){return o(oe,uo)}),Kt&&rs(oe,It),ut}function xt(oe,se,de,Re){if(de==null)throw Error(r(151));for(var ut=null,Jt=null,ot=se,It=se=0,Gt=null,en=de.next();ot!==null&&!en.done;It++,en=de.next()){ot.index>It?(Gt=ot,ot=null):Gt=ot.sibling;var uo=he(oe,ot,en.value,Re);if(uo===null){ot===null&&(ot=Gt);break}i&&ot&&uo.alternate===null&&o(oe,ot),se=w(uo,se,It),Jt===null?ut=uo:Jt.sibling=uo,Jt=uo,ot=Gt}if(en.done)return u(oe,ot),Kt&&rs(oe,It),ut;if(ot===null){for(;!en.done;It++,en=de.next())en=Oe(oe,en.value,Re),en!==null&&(se=w(en,se,It),Jt===null?ut=en:Jt.sibling=en,Jt=en);return Kt&&rs(oe,It),ut}for(ot=p(ot);!en.done;It++,en=de.next())en=ve(ot,oe,It,en.value,Re),en!==null&&(i&&en.alternate!==null&&ot.delete(en.key===null?It:en.key),se=w(en,se,It),Jt===null?ut=en:Jt.sibling=en,Jt=en);return i&&ot.forEach(function(Aj){return o(oe,Aj)}),Kt&&rs(oe,It),ut}function dn(oe,se,de,Re){if(typeof de=="object"&&de!==null&&de.type===S&&de.key===null&&(de=de.props.children),typeof de=="object"&&de!==null){switch(de.$$typeof){case y:e:{for(var ut=de.key;se!==null;){if(se.key===ut){if(ut=de.type,ut===S){if(se.tag===7){u(oe,se.sibling),Re=x(se,de.props.children),Re.return=oe,oe=Re;break e}}else if(se.elementType===ut||typeof ut=="object"&&ut!==null&&ut.$$typeof===P&&qo(ut)===se.type){u(oe,se.sibling),Re=x(se,de.props),pu(Re,de),Re.return=oe,oe=Re;break e}u(oe,se);break}else o(oe,se);se=se.sibling}de.type===S?(Re=Po(de.props.children,oe.mode,Re,de.key),Re.return=oe,oe=Re):(Re=Of(de.type,de.key,de.props,null,oe.mode,Re),pu(Re,de),Re.return=oe,oe=Re)}return M(oe);case k:e:{for(ut=de.key;se!==null;){if(se.key===ut)if(se.tag===4&&se.stateNode.containerInfo===de.containerInfo&&se.stateNode.implementation===de.implementation){u(oe,se.sibling),Re=x(se,de.children||[]),Re.return=oe,oe=Re;break e}else{u(oe,se);break}else o(oe,se);se=se.sibling}Re=Rm(de,oe.mode,Re),Re.return=oe,oe=Re}return M(oe);case P:return de=qo(de),dn(oe,se,de,Re)}if(q(de))return et(oe,se,de,Re);if(U(de)){if(ut=U(de),typeof ut!="function")throw Error(r(150));return de=ut.call(de),xt(oe,se,de,Re)}if(typeof de.then=="function")return dn(oe,se,Pf(de),Re);if(de.$$typeof===R)return dn(oe,se,Df(oe,de),Re);$f(oe,de)}return typeof de=="string"&&de!==""||typeof de=="number"||typeof de=="bigint"?(de=""+de,se!==null&&se.tag===6?(u(oe,se.sibling),Re=x(se,de),Re.return=oe,oe=Re):(u(oe,se),Re=Cm(de,oe.mode,Re),Re.return=oe,oe=Re),M(oe)):u(oe,se)}return function(oe,se,de,Re){try{du=0;var ut=dn(oe,se,de,Re);return Ba=null,ut}catch(ot){if(ot===$a||ot===jf)throw ot;var Jt=Vr(29,ot,null,oe.mode);return Jt.lanes=Re,Jt.return=oe,Jt}}}var Vo=Rk(!0),_k=Rk(!1),Gs=!1;function $m(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Bm(i,o){i=i.updateQueue,o.updateQueue===i&&(o.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function Ws(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Ks(i,o,u){var p=i.updateQueue;if(p===null)return null;if(p=p.shared,(nn&2)!==0){var x=p.pending;return x===null?o.next=o:(o.next=x.next,x.next=o),p.pending=o,o=Nf(i),fk(i,null,u),o}return Af(i,p,o,u),Nf(i)}function hu(i,o,u){if(o=o.updateQueue,o!==null&&(o=o.shared,(u&4194048)!==0)){var p=o.lanes;p&=i.pendingLanes,u|=p,o.lanes=u,De(i,u)}}function Fm(i,o){var u=i.updateQueue,p=i.alternate;if(p!==null&&(p=p.updateQueue,u===p)){var x=null,w=null;if(u=u.firstBaseUpdate,u!==null){do{var M={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};w===null?x=w=M:w=w.next=M,u=u.next}while(u!==null);w===null?x=w=o:w=w.next=o}else x=w=o;u={baseState:p.baseState,firstBaseUpdate:x,lastBaseUpdate:w,shared:p.shared,callbacks:p.callbacks},i.updateQueue=u;return}i=u.lastBaseUpdate,i===null?u.firstBaseUpdate=o:i.next=o,u.lastBaseUpdate=o}var Um=!1;function mu(){if(Um){var i=Pa;if(i!==null)throw i}}function gu(i,o,u,p){Um=!1;var x=i.updateQueue;Gs=!1;var w=x.firstBaseUpdate,M=x.lastBaseUpdate,G=x.shared.pending;if(G!==null){x.shared.pending=null;var J=G,pe=J.next;J.next=null,M===null?w=pe:M.next=pe,M=J;var Te=i.alternate;Te!==null&&(Te=Te.updateQueue,G=Te.lastBaseUpdate,G!==M&&(G===null?Te.firstBaseUpdate=pe:G.next=pe,Te.lastBaseUpdate=J))}if(w!==null){var Oe=x.baseState;M=0,Te=pe=J=null,G=w;do{var he=G.lane&-536870913,ve=he!==G.lane;if(ve?(Vt&he)===he:(p&he)===he){he!==0&&he===za&&(Um=!0),Te!==null&&(Te=Te.next={lane:0,tag:G.tag,payload:G.payload,callback:null,next:null});e:{var et=i,xt=G;he=o;var dn=u;switch(xt.tag){case 1:if(et=xt.payload,typeof et=="function"){Oe=et.call(dn,Oe,he);break e}Oe=et;break e;case 3:et.flags=et.flags&-65537|128;case 0:if(et=xt.payload,he=typeof et=="function"?et.call(dn,Oe,he):et,he==null)break e;Oe=m({},Oe,he);break e;case 2:Gs=!0}}he=G.callback,he!==null&&(i.flags|=64,ve&&(i.flags|=8192),ve=x.callbacks,ve===null?x.callbacks=[he]:ve.push(he))}else ve={lane:he,tag:G.tag,payload:G.payload,callback:G.callback,next:null},Te===null?(pe=Te=ve,J=Oe):Te=Te.next=ve,M|=he;if(G=G.next,G===null){if(G=x.shared.pending,G===null)break;ve=G,G=ve.next,ve.next=null,x.lastBaseUpdate=ve,x.shared.pending=null}}while(!0);Te===null&&(J=Oe),x.baseState=J,x.firstBaseUpdate=pe,x.lastBaseUpdate=Te,w===null&&(x.shared.lanes=0),Js|=M,i.lanes=M,i.memoizedState=Oe}}function Ak(i,o){if(typeof i!="function")throw Error(r(191,i));i.call(o)}function Nk(i,o){var u=i.callbacks;if(u!==null)for(i.callbacks=null,i=0;i<u.length;i++)Ak(u[i],o)}var Fa=z(null),Bf=z(0);function Ok(i,o){i=hs,L(Bf,i),L(Fa,o),hs=i|o.baseLanes}function qm(){L(Bf,hs),L(Fa,Fa.current)}function Hm(){hs=Bf.current,V(Fa),V(Bf)}var Gr=z(null),ci=null;function Ys(i){var o=i.alternate;L(Dn,Dn.current&1),L(Gr,i),ci===null&&(o===null||Fa.current!==null||o.memoizedState!==null)&&(ci=i)}function Vm(i){L(Dn,Dn.current),L(Gr,i),ci===null&&(ci=i)}function Ik(i){i.tag===22?(L(Dn,Dn.current),L(Gr,i),ci===null&&(ci=i)):Xs()}function Xs(){L(Dn,Dn.current),L(Gr,Gr.current)}function Wr(i){V(Gr),ci===i&&(ci=null),V(Dn)}var Dn=z(0);function Ff(i){for(var o=i;o!==null;){if(o.tag===13){var u=o.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||Zg(u)||Qg(u)))return o}else if(o.tag===19&&(o.memoizedProps.revealOrder==="forwards"||o.memoizedProps.revealOrder==="backwards"||o.memoizedProps.revealOrder==="unstable_legacy-backwards"||o.memoizedProps.revealOrder==="together")){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var os=0,Ot=null,cn=null,Hn=null,Uf=!1,Ua=!1,Go=!1,qf=0,bu=0,qa=null,vL=0;function On(){throw Error(r(321))}function Gm(i,o){if(o===null)return!1;for(var u=0;u<o.length&&u<i.length;u++)if(!Hr(i[u],o[u]))return!1;return!0}function Wm(i,o,u,p,x,w){return os=w,Ot=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,H.H=i===null||i.memoizedState===null?mS:lg,Go=!1,w=u(p,x),Go=!1,Ua&&(w=Dk(o,u,p,x)),Mk(i),w}function Mk(i){H.H=xu;var o=cn!==null&&cn.next!==null;if(os=0,Hn=cn=Ot=null,Uf=!1,bu=0,qa=null,o)throw Error(r(300));i===null||Vn||(i=i.dependencies,i!==null&&Mf(i)&&(Vn=!0))}function Dk(i,o,u,p){Ot=i;var x=0;do{if(Ua&&(qa=null),bu=0,Ua=!1,25<=x)throw Error(r(301));if(x+=1,Hn=cn=null,i.updateQueue!=null){var w=i.updateQueue;w.lastEffect=null,w.events=null,w.stores=null,w.memoCache!=null&&(w.memoCache.index=0)}H.H=gS,w=o(u,p)}while(Ua);return w}function xL(){var i=H.H,o=i.useState()[0];return o=typeof o.then=="function"?yu(o):o,i=i.useState()[0],(cn!==null?cn.memoizedState:null)!==i&&(Ot.flags|=1024),o}function Km(){var i=qf!==0;return qf=0,i}function Ym(i,o,u){o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~u}function Xm(i){if(Uf){for(i=i.memoizedState;i!==null;){var o=i.queue;o!==null&&(o.pending=null),i=i.next}Uf=!1}os=0,Hn=cn=Ot=null,Ua=!1,bu=qf=0,qa=null}function vr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Hn===null?Ot.memoizedState=Hn=i:Hn=Hn.next=i,Hn}function Ln(){if(cn===null){var i=Ot.alternate;i=i!==null?i.memoizedState:null}else i=cn.next;var o=Hn===null?Ot.memoizedState:Hn.next;if(o!==null)Hn=o,cn=i;else{if(i===null)throw Ot.alternate===null?Error(r(467)):Error(r(310));cn=i,i={memoizedState:cn.memoizedState,baseState:cn.baseState,baseQueue:cn.baseQueue,queue:cn.queue,next:null},Hn===null?Ot.memoizedState=Hn=i:Hn=Hn.next=i}return Hn}function Hf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function yu(i){var o=bu;return bu+=1,qa===null&&(qa=[]),i=Ek(qa,i,o),o=Ot,(Hn===null?o.memoizedState:Hn.next)===null&&(o=o.alternate,H.H=o===null||o.memoizedState===null?mS:lg),i}function Vf(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return yu(i);if(i.$$typeof===R)return ir(i)}throw Error(r(438,String(i)))}function Zm(i){var o=null,u=Ot.updateQueue;if(u!==null&&(o=u.memoCache),o==null){var p=Ot.alternate;p!==null&&(p=p.updateQueue,p!==null&&(p=p.memoCache,p!=null&&(o={data:p.data.map(function(x){return x.slice()}),index:0})))}if(o==null&&(o={data:[],index:0}),u===null&&(u=Hf(),Ot.updateQueue=u),u.memoCache=o,u=o.data[o.index],u===void 0)for(u=o.data[o.index]=Array(i),p=0;p<i;p++)u[p]=O;return o.index++,u}function as(i,o){return typeof o=="function"?o(i):o}function Gf(i){var o=Ln();return Qm(o,cn,i)}function Qm(i,o,u){var p=i.queue;if(p===null)throw Error(r(311));p.lastRenderedReducer=u;var x=i.baseQueue,w=p.pending;if(w!==null){if(x!==null){var M=x.next;x.next=w.next,w.next=M}o.baseQueue=x=w,p.pending=null}if(w=i.baseState,x===null)i.memoizedState=w;else{o=x.next;var G=M=null,J=null,pe=o,Te=!1;do{var Oe=pe.lane&-536870913;if(Oe!==pe.lane?(Vt&Oe)===Oe:(os&Oe)===Oe){var he=pe.revertLane;if(he===0)J!==null&&(J=J.next={lane:0,revertLane:0,gesture:null,action:pe.action,hasEagerState:pe.hasEagerState,eagerState:pe.eagerState,next:null}),Oe===za&&(Te=!0);else if((os&he)===he){pe=pe.next,he===za&&(Te=!0);continue}else Oe={lane:0,revertLane:pe.revertLane,gesture:null,action:pe.action,hasEagerState:pe.hasEagerState,eagerState:pe.eagerState,next:null},J===null?(G=J=Oe,M=w):J=J.next=Oe,Ot.lanes|=he,Js|=he;Oe=pe.action,Go&&u(w,Oe),w=pe.hasEagerState?pe.eagerState:u(w,Oe)}else he={lane:Oe,revertLane:pe.revertLane,gesture:pe.gesture,action:pe.action,hasEagerState:pe.hasEagerState,eagerState:pe.eagerState,next:null},J===null?(G=J=he,M=w):J=J.next=he,Ot.lanes|=Oe,Js|=Oe;pe=pe.next}while(pe!==null&&pe!==o);if(J===null?M=w:J.next=G,!Hr(w,i.memoizedState)&&(Vn=!0,Te&&(u=Pa,u!==null)))throw u;i.memoizedState=w,i.baseState=M,i.baseQueue=J,p.lastRenderedState=w}return x===null&&(p.lanes=0),[i.memoizedState,p.dispatch]}function Jm(i){var o=Ln(),u=o.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=i;var p=u.dispatch,x=u.pending,w=o.memoizedState;if(x!==null){u.pending=null;var M=x=x.next;do w=i(w,M.action),M=M.next;while(M!==x);Hr(w,o.memoizedState)||(Vn=!0),o.memoizedState=w,o.baseQueue===null&&(o.baseState=w),u.lastRenderedState=w}return[w,p]}function Lk(i,o,u){var p=Ot,x=Ln(),w=Kt;if(w){if(u===void 0)throw Error(r(407));u=u()}else u=o();var M=!Hr((cn||x).memoizedState,u);if(M&&(x.memoizedState=u,Vn=!0),x=x.queue,ng(Pk.bind(null,p,x,i),[i]),x.getSnapshot!==o||M||Hn!==null&&Hn.memoizedState.tag&1){if(p.flags|=2048,Ha(9,{destroy:void 0},zk.bind(null,p,x,u,o),null),bn===null)throw Error(r(349));w||(os&127)!==0||jk(p,o,u)}return u}function jk(i,o,u){i.flags|=16384,i={getSnapshot:o,value:u},o=Ot.updateQueue,o===null?(o=Hf(),Ot.updateQueue=o,o.stores=[i]):(u=o.stores,u===null?o.stores=[i]:u.push(i))}function zk(i,o,u,p){o.value=u,o.getSnapshot=p,$k(o)&&Bk(i)}function Pk(i,o,u){return u(function(){$k(o)&&Bk(i)})}function $k(i){var o=i.getSnapshot;i=i.value;try{var u=o();return!Hr(i,u)}catch{return!0}}function Bk(i){var o=zo(i,2);o!==null&&Mr(o,i,2)}function eg(i){var o=vr();if(typeof i=="function"){var u=i;if(i=u(),Go){kt(!0);try{u()}finally{kt(!1)}}}return o.memoizedState=o.baseState=i,o.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:as,lastRenderedState:i},o}function Fk(i,o,u,p){return i.baseState=u,Qm(i,cn,typeof p=="function"?p:as)}function kL(i,o,u,p,x){if(Yf(i))throw Error(r(485));if(i=o.action,i!==null){var w={payload:x,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(M){w.listeners.push(M)}};H.T!==null?u(!0):w.isTransition=!1,p(w),u=o.pending,u===null?(w.next=o.pending=w,Uk(o,w)):(w.next=u.next,o.pending=u.next=w)}}function Uk(i,o){var u=o.action,p=o.payload,x=i.state;if(o.isTransition){var w=H.T,M={};H.T=M;try{var G=u(x,p),J=H.S;J!==null&&J(M,G),qk(i,o,G)}catch(pe){tg(i,o,pe)}finally{w!==null&&M.types!==null&&(w.types=M.types),H.T=w}}else try{w=u(x,p),qk(i,o,w)}catch(pe){tg(i,o,pe)}}function qk(i,o,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(p){Hk(i,o,p)},function(p){return tg(i,o,p)}):Hk(i,o,u)}function Hk(i,o,u){o.status="fulfilled",o.value=u,Vk(o),i.state=u,o=i.pending,o!==null&&(u=o.next,u===o?i.pending=null:(u=u.next,o.next=u,Uk(i,u)))}function tg(i,o,u){var p=i.pending;if(i.pending=null,p!==null){p=p.next;do o.status="rejected",o.reason=u,Vk(o),o=o.next;while(o!==p)}i.action=null}function Vk(i){i=i.listeners;for(var o=0;o<i.length;o++)(0,i[o])()}function Gk(i,o){return o}function Wk(i,o){if(Kt){var u=bn.formState;if(u!==null){e:{var p=Ot;if(Kt){if(En){t:{for(var x=En,w=ui;x.nodeType!==8;){if(!w){x=null;break t}if(x=fi(x.nextSibling),x===null){x=null;break t}}w=x.data,x=w==="F!"||w==="F"?x:null}if(x){En=fi(x.nextSibling),p=x.data==="F!";break e}}Hs(p)}p=!1}p&&(o=u[0])}}return u=vr(),u.memoizedState=u.baseState=o,p={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gk,lastRenderedState:o},u.queue=p,u=dS.bind(null,Ot,p),p.dispatch=u,p=eg(!1),w=ag.bind(null,Ot,!1,p.queue),p=vr(),x={state:o,dispatch:null,action:i,pending:null},p.queue=x,u=kL.bind(null,Ot,x,w,u),x.dispatch=u,p.memoizedState=i,[o,u,!1]}function Kk(i){var o=Ln();return Yk(o,cn,i)}function Yk(i,o,u){if(o=Qm(i,o,Gk)[0],i=Gf(as)[0],typeof o=="object"&&o!==null&&typeof o.then=="function")try{var p=yu(o)}catch(M){throw M===$a?jf:M}else p=o;o=Ln();var x=o.queue,w=x.dispatch;return u!==o.memoizedState&&(Ot.flags|=2048,Ha(9,{destroy:void 0},SL.bind(null,x,u),null)),[p,w,i]}function SL(i,o){i.action=o}function Xk(i){var o=Ln(),u=cn;if(u!==null)return Yk(o,u,i);Ln(),o=o.memoizedState,u=Ln();var p=u.queue.dispatch;return u.memoizedState=i,[o,p,!1]}function Ha(i,o,u,p){return i={tag:i,create:u,deps:p,inst:o,next:null},o=Ot.updateQueue,o===null&&(o=Hf(),Ot.updateQueue=o),u=o.lastEffect,u===null?o.lastEffect=i.next=i:(p=u.next,u.next=i,i.next=p,o.lastEffect=i),i}function Zk(){return Ln().memoizedState}function Wf(i,o,u,p){var x=vr();Ot.flags|=i,x.memoizedState=Ha(1|o,{destroy:void 0},u,p===void 0?null:p)}function Kf(i,o,u,p){var x=Ln();p=p===void 0?null:p;var w=x.memoizedState.inst;cn!==null&&p!==null&&Gm(p,cn.memoizedState.deps)?x.memoizedState=Ha(o,w,u,p):(Ot.flags|=i,x.memoizedState=Ha(1|o,w,u,p))}function Qk(i,o){Wf(8390656,8,i,o)}function ng(i,o){Kf(2048,8,i,o)}function wL(i){Ot.flags|=4;var o=Ot.updateQueue;if(o===null)o=Hf(),Ot.updateQueue=o,o.events=[i];else{var u=o.events;u===null?o.events=[i]:u.push(i)}}function Jk(i){var o=Ln().memoizedState;return wL({ref:o,nextImpl:i}),function(){if((nn&2)!==0)throw Error(r(440));return o.impl.apply(void 0,arguments)}}function eS(i,o){return Kf(4,2,i,o)}function tS(i,o){return Kf(4,4,i,o)}function nS(i,o){if(typeof o=="function"){i=i();var u=o(i);return function(){typeof u=="function"?u():o(null)}}if(o!=null)return i=i(),o.current=i,function(){o.current=null}}function rS(i,o,u){u=u!=null?u.concat([i]):null,Kf(4,4,nS.bind(null,o,i),u)}function rg(){}function iS(i,o){var u=Ln();o=o===void 0?null:o;var p=u.memoizedState;return o!==null&&Gm(o,p[1])?p[0]:(u.memoizedState=[i,o],i)}function sS(i,o){var u=Ln();o=o===void 0?null:o;var p=u.memoizedState;if(o!==null&&Gm(o,p[1]))return p[0];if(p=i(),Go){kt(!0);try{i()}finally{kt(!1)}}return u.memoizedState=[p,o],p}function ig(i,o,u){return u===void 0||(os&1073741824)!==0&&(Vt&261930)===0?i.memoizedState=o:(i.memoizedState=u,i=o1(),Ot.lanes|=i,Js|=i,u)}function oS(i,o,u,p){return Hr(u,o)?u:Fa.current!==null?(i=ig(i,u,p),Hr(i,o)||(Vn=!0),i):(os&42)===0||(os&1073741824)!==0&&(Vt&261930)===0?(Vn=!0,i.memoizedState=u):(i=o1(),Ot.lanes|=i,Js|=i,o)}function aS(i,o,u,p,x){var w=W.p;W.p=w!==0&&8>w?w:8;var M=H.T,G={};H.T=G,ag(i,!1,o,u);try{var J=x(),pe=H.S;if(pe!==null&&pe(G,J),J!==null&&typeof J=="object"&&typeof J.then=="function"){var Te=yL(J,p);vu(i,o,Te,Xr(i))}else vu(i,o,p,Xr(i))}catch(Oe){vu(i,o,{then:function(){},status:"rejected",reason:Oe},Xr())}finally{W.p=w,M!==null&&G.types!==null&&(M.types=G.types),H.T=M}}function EL(){}function sg(i,o,u,p){if(i.tag!==5)throw Error(r(476));var x=lS(i).queue;aS(i,x,o,F,u===null?EL:function(){return uS(i),u(p)})}function lS(i){var o=i.memoizedState;if(o!==null)return o;o={memoizedState:F,baseState:F,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:as,lastRenderedState:F},next:null};var u={};return o.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:as,lastRenderedState:u},next:null},i.memoizedState=o,i=i.alternate,i!==null&&(i.memoizedState=o),o}function uS(i){var o=lS(i);o.next===null&&(o=i.alternate.memoizedState),vu(i,o.next.queue,{},Xr())}function og(){return ir(ju)}function cS(){return Ln().memoizedState}function fS(){return Ln().memoizedState}function TL(i){for(var o=i.return;o!==null;){switch(o.tag){case 24:case 3:var u=Xr();i=Ws(u);var p=Ks(o,i,u);p!==null&&(Mr(p,o,u),hu(p,o,u)),o={cache:Lm()},i.payload=o;return}o=o.return}}function CL(i,o,u){var p=Xr();u={lane:p,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Yf(i)?pS(o,u):(u=Em(i,o,u,p),u!==null&&(Mr(u,i,p),hS(u,o,p)))}function dS(i,o,u){var p=Xr();vu(i,o,u,p)}function vu(i,o,u,p){var x={lane:p,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(Yf(i))pS(o,x);else{var w=i.alternate;if(i.lanes===0&&(w===null||w.lanes===0)&&(w=o.lastRenderedReducer,w!==null))try{var M=o.lastRenderedState,G=w(M,u);if(x.hasEagerState=!0,x.eagerState=G,Hr(G,M))return Af(i,o,x,0),bn===null&&_f(),!1}catch{}if(u=Em(i,o,x,p),u!==null)return Mr(u,i,p),hS(u,o,p),!0}return!1}function ag(i,o,u,p){if(p={lane:2,revertLane:$g(),gesture:null,action:p,hasEagerState:!1,eagerState:null,next:null},Yf(i)){if(o)throw Error(r(479))}else o=Em(i,u,p,2),o!==null&&Mr(o,i,2)}function Yf(i){var o=i.alternate;return i===Ot||o!==null&&o===Ot}function pS(i,o){Ua=Uf=!0;var u=i.pending;u===null?o.next=o:(o.next=u.next,u.next=o),i.pending=o}function hS(i,o,u){if((u&4194048)!==0){var p=o.lanes;p&=i.pendingLanes,u|=p,o.lanes=u,De(i,u)}}var xu={readContext:ir,use:Vf,useCallback:On,useContext:On,useEffect:On,useImperativeHandle:On,useLayoutEffect:On,useInsertionEffect:On,useMemo:On,useReducer:On,useRef:On,useState:On,useDebugValue:On,useDeferredValue:On,useTransition:On,useSyncExternalStore:On,useId:On,useHostTransitionStatus:On,useFormState:On,useActionState:On,useOptimistic:On,useMemoCache:On,useCacheRefresh:On};xu.useEffectEvent=On;var mS={readContext:ir,use:Vf,useCallback:function(i,o){return vr().memoizedState=[i,o===void 0?null:o],i},useContext:ir,useEffect:Qk,useImperativeHandle:function(i,o,u){u=u!=null?u.concat([i]):null,Wf(4194308,4,nS.bind(null,o,i),u)},useLayoutEffect:function(i,o){return Wf(4194308,4,i,o)},useInsertionEffect:function(i,o){Wf(4,2,i,o)},useMemo:function(i,o){var u=vr();o=o===void 0?null:o;var p=i();if(Go){kt(!0);try{i()}finally{kt(!1)}}return u.memoizedState=[p,o],p},useReducer:function(i,o,u){var p=vr();if(u!==void 0){var x=u(o);if(Go){kt(!0);try{u(o)}finally{kt(!1)}}}else x=o;return p.memoizedState=p.baseState=x,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:x},p.queue=i,i=i.dispatch=CL.bind(null,Ot,i),[p.memoizedState,i]},useRef:function(i){var o=vr();return i={current:i},o.memoizedState=i},useState:function(i){i=eg(i);var o=i.queue,u=dS.bind(null,Ot,o);return o.dispatch=u,[i.memoizedState,u]},useDebugValue:rg,useDeferredValue:function(i,o){var u=vr();return ig(u,i,o)},useTransition:function(){var i=eg(!1);return i=aS.bind(null,Ot,i.queue,!0,!1),vr().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,o,u){var p=Ot,x=vr();if(Kt){if(u===void 0)throw Error(r(407));u=u()}else{if(u=o(),bn===null)throw Error(r(349));(Vt&127)!==0||jk(p,o,u)}x.memoizedState=u;var w={value:u,getSnapshot:o};return x.queue=w,Qk(Pk.bind(null,p,w,i),[i]),p.flags|=2048,Ha(9,{destroy:void 0},zk.bind(null,p,w,u,o),null),u},useId:function(){var i=vr(),o=bn.identifierPrefix;if(Kt){var u=zi,p=ji;u=(p&~(1<<32-nt(p)-1)).toString(32)+u,o="_"+o+"R_"+u,u=qf++,0<u&&(o+="H"+u.toString(32)),o+="_"}else u=vL++,o="_"+o+"r_"+u.toString(32)+"_";return i.memoizedState=o},useHostTransitionStatus:og,useFormState:Wk,useActionState:Wk,useOptimistic:function(i){var o=vr();o.memoizedState=o.baseState=i;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return o.queue=u,o=ag.bind(null,Ot,!0,u),u.dispatch=o,[i,o]},useMemoCache:Zm,useCacheRefresh:function(){return vr().memoizedState=TL.bind(null,Ot)},useEffectEvent:function(i){var o=vr(),u={impl:i};return o.memoizedState=u,function(){if((nn&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}},lg={readContext:ir,use:Vf,useCallback:iS,useContext:ir,useEffect:ng,useImperativeHandle:rS,useInsertionEffect:eS,useLayoutEffect:tS,useMemo:sS,useReducer:Gf,useRef:Zk,useState:function(){return Gf(as)},useDebugValue:rg,useDeferredValue:function(i,o){var u=Ln();return oS(u,cn.memoizedState,i,o)},useTransition:function(){var i=Gf(as)[0],o=Ln().memoizedState;return[typeof i=="boolean"?i:yu(i),o]},useSyncExternalStore:Lk,useId:cS,useHostTransitionStatus:og,useFormState:Kk,useActionState:Kk,useOptimistic:function(i,o){var u=Ln();return Fk(u,cn,i,o)},useMemoCache:Zm,useCacheRefresh:fS};lg.useEffectEvent=Jk;var gS={readContext:ir,use:Vf,useCallback:iS,useContext:ir,useEffect:ng,useImperativeHandle:rS,useInsertionEffect:eS,useLayoutEffect:tS,useMemo:sS,useReducer:Jm,useRef:Zk,useState:function(){return Jm(as)},useDebugValue:rg,useDeferredValue:function(i,o){var u=Ln();return cn===null?ig(u,i,o):oS(u,cn.memoizedState,i,o)},useTransition:function(){var i=Jm(as)[0],o=Ln().memoizedState;return[typeof i=="boolean"?i:yu(i),o]},useSyncExternalStore:Lk,useId:cS,useHostTransitionStatus:og,useFormState:Xk,useActionState:Xk,useOptimistic:function(i,o){var u=Ln();return cn!==null?Fk(u,cn,i,o):(u.baseState=i,[i,u.queue.dispatch])},useMemoCache:Zm,useCacheRefresh:fS};gS.useEffectEvent=Jk;function ug(i,o,u,p){o=i.memoizedState,u=u(p,o),u=u==null?o:m({},o,u),i.memoizedState=u,i.lanes===0&&(i.updateQueue.baseState=u)}var cg={enqueueSetState:function(i,o,u){i=i._reactInternals;var p=Xr(),x=Ws(p);x.payload=o,u!=null&&(x.callback=u),o=Ks(i,x,p),o!==null&&(Mr(o,i,p),hu(o,i,p))},enqueueReplaceState:function(i,o,u){i=i._reactInternals;var p=Xr(),x=Ws(p);x.tag=1,x.payload=o,u!=null&&(x.callback=u),o=Ks(i,x,p),o!==null&&(Mr(o,i,p),hu(o,i,p))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var u=Xr(),p=Ws(u);p.tag=2,o!=null&&(p.callback=o),o=Ks(i,p,u),o!==null&&(Mr(o,i,u),hu(o,i,u))}};function bS(i,o,u,p,x,w,M){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(p,w,M):o.prototype&&o.prototype.isPureReactComponent?!ou(u,p)||!ou(x,w):!0}function yS(i,o,u,p){i=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(u,p),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(u,p),o.state!==i&&cg.enqueueReplaceState(o,o.state,null)}function Wo(i,o){var u=o;if("ref"in o){u={};for(var p in o)p!=="ref"&&(u[p]=o[p])}if(i=i.defaultProps){u===o&&(u=m({},u));for(var x in i)u[x]===void 0&&(u[x]=i[x])}return u}function vS(i){Rf(i)}function xS(i){console.error(i)}function kS(i){Rf(i)}function Xf(i,o){try{var u=i.onUncaughtError;u(o.value,{componentStack:o.stack})}catch(p){setTimeout(function(){throw p})}}function SS(i,o,u){try{var p=i.onCaughtError;p(u.value,{componentStack:u.stack,errorBoundary:o.tag===1?o.stateNode:null})}catch(x){setTimeout(function(){throw x})}}function fg(i,o,u){return u=Ws(u),u.tag=3,u.payload={element:null},u.callback=function(){Xf(i,o)},u}function wS(i){return i=Ws(i),i.tag=3,i}function ES(i,o,u,p){var x=u.type.getDerivedStateFromError;if(typeof x=="function"){var w=p.value;i.payload=function(){return x(w)},i.callback=function(){SS(o,u,p)}}var M=u.stateNode;M!==null&&typeof M.componentDidCatch=="function"&&(i.callback=function(){SS(o,u,p),typeof x!="function"&&(eo===null?eo=new Set([this]):eo.add(this));var G=p.stack;this.componentDidCatch(p.value,{componentStack:G!==null?G:""})})}function RL(i,o,u,p,x){if(u.flags|=32768,p!==null&&typeof p=="object"&&typeof p.then=="function"){if(o=u.alternate,o!==null&&ja(o,u,x,!0),u=Gr.current,u!==null){switch(u.tag){case 31:case 13:return ci===null?ld():u.alternate===null&&In===0&&(In=3),u.flags&=-257,u.flags|=65536,u.lanes=x,p===zf?u.flags|=16384:(o=u.updateQueue,o===null?u.updateQueue=new Set([p]):o.add(p),jg(i,p,x)),!1;case 22:return u.flags|=65536,p===zf?u.flags|=16384:(o=u.updateQueue,o===null?(o={transitions:null,markerInstances:null,retryQueue:new Set([p])},u.updateQueue=o):(u=o.retryQueue,u===null?o.retryQueue=new Set([p]):u.add(p)),jg(i,p,x)),!1}throw Error(r(435,u.tag))}return jg(i,p,x),ld(),!1}if(Kt)return o=Gr.current,o!==null?((o.flags&65536)===0&&(o.flags|=256),o.flags|=65536,o.lanes=x,p!==Nm&&(i=Error(r(422),{cause:p}),uu(oi(i,u)))):(p!==Nm&&(o=Error(r(423),{cause:p}),uu(oi(o,u))),i=i.current.alternate,i.flags|=65536,x&=-x,i.lanes|=x,p=oi(p,u),x=fg(i.stateNode,p,x),Fm(i,x),In!==4&&(In=2)),!1;var w=Error(r(520),{cause:p});if(w=oi(w,u),_u===null?_u=[w]:_u.push(w),In!==4&&(In=2),o===null)return!0;p=oi(p,u),u=o;do{switch(u.tag){case 3:return u.flags|=65536,i=x&-x,u.lanes|=i,i=fg(u.stateNode,p,i),Fm(u,i),!1;case 1:if(o=u.type,w=u.stateNode,(u.flags&128)===0&&(typeof o.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(eo===null||!eo.has(w))))return u.flags|=65536,x&=-x,u.lanes|=x,x=wS(x),ES(x,i,u,p),Fm(u,x),!1}u=u.return}while(u!==null);return!1}var dg=Error(r(461)),Vn=!1;function sr(i,o,u,p){o.child=i===null?_k(o,null,u,p):Vo(o,i.child,u,p)}function TS(i,o,u,p,x){u=u.render;var w=o.ref;if("ref"in p){var M={};for(var G in p)G!=="ref"&&(M[G]=p[G])}else M=p;return Fo(o),p=Wm(i,o,u,M,w,x),G=Km(),i!==null&&!Vn?(Ym(i,o,x),ls(i,o,x)):(Kt&&G&&_m(o),o.flags|=1,sr(i,o,p,x),o.child)}function CS(i,o,u,p,x){if(i===null){var w=u.type;return typeof w=="function"&&!Tm(w)&&w.defaultProps===void 0&&u.compare===null?(o.tag=15,o.type=w,RS(i,o,w,p,x)):(i=Of(u.type,null,p,o,o.mode,x),i.ref=o.ref,i.return=o,o.child=i)}if(w=i.child,!xg(i,x)){var M=w.memoizedProps;if(u=u.compare,u=u!==null?u:ou,u(M,p)&&i.ref===o.ref)return ls(i,o,x)}return o.flags|=1,i=ns(w,p),i.ref=o.ref,i.return=o,o.child=i}function RS(i,o,u,p,x){if(i!==null){var w=i.memoizedProps;if(ou(w,p)&&i.ref===o.ref)if(Vn=!1,o.pendingProps=p=w,xg(i,x))(i.flags&131072)!==0&&(Vn=!0);else return o.lanes=i.lanes,ls(i,o,x)}return pg(i,o,u,p,x)}function _S(i,o,u,p){var x=p.children,w=i!==null?i.memoizedState:null;if(i===null&&o.stateNode===null&&(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),p.mode==="hidden"){if((o.flags&128)!==0){if(w=w!==null?w.baseLanes|u:u,i!==null){for(p=o.child=i.child,x=0;p!==null;)x=x|p.lanes|p.childLanes,p=p.sibling;p=x&~w}else p=0,o.child=null;return AS(i,o,w,u,p)}if((u&536870912)!==0)o.memoizedState={baseLanes:0,cachePool:null},i!==null&&Lf(o,w!==null?w.cachePool:null),w!==null?Ok(o,w):qm(),Ik(o);else return p=o.lanes=536870912,AS(i,o,w!==null?w.baseLanes|u:u,u,p)}else w!==null?(Lf(o,w.cachePool),Ok(o,w),Xs(),o.memoizedState=null):(i!==null&&Lf(o,null),qm(),Xs());return sr(i,o,x,u),o.child}function ku(i,o){return i!==null&&i.tag===22||o.stateNode!==null||(o.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.sibling}function AS(i,o,u,p,x){var w=zm();return w=w===null?null:{parent:qn._currentValue,pool:w},o.memoizedState={baseLanes:u,cachePool:w},i!==null&&Lf(o,null),qm(),Ik(o),i!==null&&ja(i,o,p,!0),o.childLanes=x,null}function Zf(i,o){return o=Jf({mode:o.mode,children:o.children},i.mode),o.ref=i.ref,i.child=o,o.return=i,o}function NS(i,o,u){return Vo(o,i.child,null,u),i=Zf(o,o.pendingProps),i.flags|=2,Wr(o),o.memoizedState=null,i}function _L(i,o,u){var p=o.pendingProps,x=(o.flags&128)!==0;if(o.flags&=-129,i===null){if(Kt){if(p.mode==="hidden")return i=Zf(o,p),o.lanes=536870912,ku(null,i);if(Vm(o),(i=En)?(i=U1(i,ui),i=i!==null&&i.data==="&"?i:null,i!==null&&(o.memoizedState={dehydrated:i,treeContext:Us!==null?{id:ji,overflow:zi}:null,retryLane:536870912,hydrationErrors:null},u=pk(i),u.return=o,o.child=u,rr=o,En=null)):i=null,i===null)throw Hs(o);return o.lanes=536870912,null}return Zf(o,p)}var w=i.memoizedState;if(w!==null){var M=w.dehydrated;if(Vm(o),x)if(o.flags&256)o.flags&=-257,o=NS(i,o,u);else if(o.memoizedState!==null)o.child=i.child,o.flags|=128,o=null;else throw Error(r(558));else if(Vn||ja(i,o,u,!1),x=(u&i.childLanes)!==0,Vn||x){if(p=bn,p!==null&&(M=je(p,u),M!==0&&M!==w.retryLane))throw w.retryLane=M,zo(i,M),Mr(p,i,M),dg;ld(),o=NS(i,o,u)}else i=w.treeContext,En=fi(M.nextSibling),rr=o,Kt=!0,qs=null,ui=!1,i!==null&&gk(o,i),o=Zf(o,p),o.flags|=4096;return o}return i=ns(i.child,{mode:p.mode,children:p.children}),i.ref=o.ref,o.child=i,i.return=o,i}function Qf(i,o){var u=o.ref;if(u===null)i!==null&&i.ref!==null&&(o.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(r(284));(i===null||i.ref!==u)&&(o.flags|=4194816)}}function pg(i,o,u,p,x){return Fo(o),u=Wm(i,o,u,p,void 0,x),p=Km(),i!==null&&!Vn?(Ym(i,o,x),ls(i,o,x)):(Kt&&p&&_m(o),o.flags|=1,sr(i,o,u,x),o.child)}function OS(i,o,u,p,x,w){return Fo(o),o.updateQueue=null,u=Dk(o,p,u,x),Mk(i),p=Km(),i!==null&&!Vn?(Ym(i,o,w),ls(i,o,w)):(Kt&&p&&_m(o),o.flags|=1,sr(i,o,u,w),o.child)}function IS(i,o,u,p,x){if(Fo(o),o.stateNode===null){var w=Ia,M=u.contextType;typeof M=="object"&&M!==null&&(w=ir(M)),w=new u(p,w),o.memoizedState=w.state!==null&&w.state!==void 0?w.state:null,w.updater=cg,o.stateNode=w,w._reactInternals=o,w=o.stateNode,w.props=p,w.state=o.memoizedState,w.refs={},$m(o),M=u.contextType,w.context=typeof M=="object"&&M!==null?ir(M):Ia,w.state=o.memoizedState,M=u.getDerivedStateFromProps,typeof M=="function"&&(ug(o,u,M,p),w.state=o.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof w.getSnapshotBeforeUpdate=="function"||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(M=w.state,typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount(),M!==w.state&&cg.enqueueReplaceState(w,w.state,null),gu(o,p,w,x),mu(),w.state=o.memoizedState),typeof w.componentDidMount=="function"&&(o.flags|=4194308),p=!0}else if(i===null){w=o.stateNode;var G=o.memoizedProps,J=Wo(u,G);w.props=J;var pe=w.context,Te=u.contextType;M=Ia,typeof Te=="object"&&Te!==null&&(M=ir(Te));var Oe=u.getDerivedStateFromProps;Te=typeof Oe=="function"||typeof w.getSnapshotBeforeUpdate=="function",G=o.pendingProps!==G,Te||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(G||pe!==M)&&yS(o,w,p,M),Gs=!1;var he=o.memoizedState;w.state=he,gu(o,p,w,x),mu(),pe=o.memoizedState,G||he!==pe||Gs?(typeof Oe=="function"&&(ug(o,u,Oe,p),pe=o.memoizedState),(J=Gs||bS(o,u,J,p,he,pe,M))?(Te||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount()),typeof w.componentDidMount=="function"&&(o.flags|=4194308)):(typeof w.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=p,o.memoizedState=pe),w.props=p,w.state=pe,w.context=M,p=J):(typeof w.componentDidMount=="function"&&(o.flags|=4194308),p=!1)}else{w=o.stateNode,Bm(i,o),M=o.memoizedProps,Te=Wo(u,M),w.props=Te,Oe=o.pendingProps,he=w.context,pe=u.contextType,J=Ia,typeof pe=="object"&&pe!==null&&(J=ir(pe)),G=u.getDerivedStateFromProps,(pe=typeof G=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(M!==Oe||he!==J)&&yS(o,w,p,J),Gs=!1,he=o.memoizedState,w.state=he,gu(o,p,w,x),mu();var ve=o.memoizedState;M!==Oe||he!==ve||Gs||i!==null&&i.dependencies!==null&&Mf(i.dependencies)?(typeof G=="function"&&(ug(o,u,G,p),ve=o.memoizedState),(Te=Gs||bS(o,u,Te,p,he,ve,J)||i!==null&&i.dependencies!==null&&Mf(i.dependencies))?(pe||typeof w.UNSAFE_componentWillUpdate!="function"&&typeof w.componentWillUpdate!="function"||(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(p,ve,J),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(p,ve,J)),typeof w.componentDidUpdate=="function"&&(o.flags|=4),typeof w.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof w.componentDidUpdate!="function"||M===i.memoizedProps&&he===i.memoizedState||(o.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&he===i.memoizedState||(o.flags|=1024),o.memoizedProps=p,o.memoizedState=ve),w.props=p,w.state=ve,w.context=J,p=Te):(typeof w.componentDidUpdate!="function"||M===i.memoizedProps&&he===i.memoizedState||(o.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||M===i.memoizedProps&&he===i.memoizedState||(o.flags|=1024),p=!1)}return w=p,Qf(i,o),p=(o.flags&128)!==0,w||p?(w=o.stateNode,u=p&&typeof u.getDerivedStateFromError!="function"?null:w.render(),o.flags|=1,i!==null&&p?(o.child=Vo(o,i.child,null,x),o.child=Vo(o,null,u,x)):sr(i,o,u,x),o.memoizedState=w.state,i=o.child):i=ls(i,o,x),i}function MS(i,o,u,p){return $o(),o.flags|=256,sr(i,o,u,p),o.child}var hg={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function mg(i){return{baseLanes:i,cachePool:Sk()}}function gg(i,o,u){return i=i!==null?i.childLanes&~u:0,o&&(i|=Yr),i}function DS(i,o,u){var p=o.pendingProps,x=!1,w=(o.flags&128)!==0,M;if((M=w)||(M=i!==null&&i.memoizedState===null?!1:(Dn.current&2)!==0),M&&(x=!0,o.flags&=-129),M=(o.flags&32)!==0,o.flags&=-33,i===null){if(Kt){if(x?Ys(o):Xs(),(i=En)?(i=U1(i,ui),i=i!==null&&i.data!=="&"?i:null,i!==null&&(o.memoizedState={dehydrated:i,treeContext:Us!==null?{id:ji,overflow:zi}:null,retryLane:536870912,hydrationErrors:null},u=pk(i),u.return=o,o.child=u,rr=o,En=null)):i=null,i===null)throw Hs(o);return Qg(i)?o.lanes=32:o.lanes=536870912,null}var G=p.children;return p=p.fallback,x?(Xs(),x=o.mode,G=Jf({mode:"hidden",children:G},x),p=Po(p,x,u,null),G.return=o,p.return=o,G.sibling=p,o.child=G,p=o.child,p.memoizedState=mg(u),p.childLanes=gg(i,M,u),o.memoizedState=hg,ku(null,p)):(Ys(o),bg(o,G))}var J=i.memoizedState;if(J!==null&&(G=J.dehydrated,G!==null)){if(w)o.flags&256?(Ys(o),o.flags&=-257,o=yg(i,o,u)):o.memoizedState!==null?(Xs(),o.child=i.child,o.flags|=128,o=null):(Xs(),G=p.fallback,x=o.mode,p=Jf({mode:"visible",children:p.children},x),G=Po(G,x,u,null),G.flags|=2,p.return=o,G.return=o,p.sibling=G,o.child=p,Vo(o,i.child,null,u),p=o.child,p.memoizedState=mg(u),p.childLanes=gg(i,M,u),o.memoizedState=hg,o=ku(null,p));else if(Ys(o),Qg(G)){if(M=G.nextSibling&&G.nextSibling.dataset,M)var pe=M.dgst;M=pe,p=Error(r(419)),p.stack="",p.digest=M,uu({value:p,source:null,stack:null}),o=yg(i,o,u)}else if(Vn||ja(i,o,u,!1),M=(u&i.childLanes)!==0,Vn||M){if(M=bn,M!==null&&(p=je(M,u),p!==0&&p!==J.retryLane))throw J.retryLane=p,zo(i,p),Mr(M,i,p),dg;Zg(G)||ld(),o=yg(i,o,u)}else Zg(G)?(o.flags|=192,o.child=i.child,o=null):(i=J.treeContext,En=fi(G.nextSibling),rr=o,Kt=!0,qs=null,ui=!1,i!==null&&gk(o,i),o=bg(o,p.children),o.flags|=4096);return o}return x?(Xs(),G=p.fallback,x=o.mode,J=i.child,pe=J.sibling,p=ns(J,{mode:"hidden",children:p.children}),p.subtreeFlags=J.subtreeFlags&65011712,pe!==null?G=ns(pe,G):(G=Po(G,x,u,null),G.flags|=2),G.return=o,p.return=o,p.sibling=G,o.child=p,ku(null,p),p=o.child,G=i.child.memoizedState,G===null?G=mg(u):(x=G.cachePool,x!==null?(J=qn._currentValue,x=x.parent!==J?{parent:J,pool:J}:x):x=Sk(),G={baseLanes:G.baseLanes|u,cachePool:x}),p.memoizedState=G,p.childLanes=gg(i,M,u),o.memoizedState=hg,ku(i.child,p)):(Ys(o),u=i.child,i=u.sibling,u=ns(u,{mode:"visible",children:p.children}),u.return=o,u.sibling=null,i!==null&&(M=o.deletions,M===null?(o.deletions=[i],o.flags|=16):M.push(i)),o.child=u,o.memoizedState=null,u)}function bg(i,o){return o=Jf({mode:"visible",children:o},i.mode),o.return=i,i.child=o}function Jf(i,o){return i=Vr(22,i,null,o),i.lanes=0,i}function yg(i,o,u){return Vo(o,i.child,null,u),i=bg(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function LS(i,o,u){i.lanes|=o;var p=i.alternate;p!==null&&(p.lanes|=o),Mm(i.return,o,u)}function vg(i,o,u,p,x,w){var M=i.memoizedState;M===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:p,tail:u,tailMode:x,treeForkCount:w}:(M.isBackwards=o,M.rendering=null,M.renderingStartTime=0,M.last=p,M.tail=u,M.tailMode=x,M.treeForkCount=w)}function jS(i,o,u){var p=o.pendingProps,x=p.revealOrder,w=p.tail;p=p.children;var M=Dn.current,G=(M&2)!==0;if(G?(M=M&1|2,o.flags|=128):M&=1,L(Dn,M),sr(i,o,p,u),p=Kt?lu:0,!G&&i!==null&&(i.flags&128)!==0)e:for(i=o.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&LS(i,u,o);else if(i.tag===19)LS(i,u,o);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===o)break e;for(;i.sibling===null;){if(i.return===null||i.return===o)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(x){case"forwards":for(u=o.child,x=null;u!==null;)i=u.alternate,i!==null&&Ff(i)===null&&(x=u),u=u.sibling;u=x,u===null?(x=o.child,o.child=null):(x=u.sibling,u.sibling=null),vg(o,!1,x,u,w,p);break;case"backwards":case"unstable_legacy-backwards":for(u=null,x=o.child,o.child=null;x!==null;){if(i=x.alternate,i!==null&&Ff(i)===null){o.child=x;break}i=x.sibling,x.sibling=u,u=x,x=i}vg(o,!0,u,null,w,p);break;case"together":vg(o,!1,null,null,void 0,p);break;default:o.memoizedState=null}return o.child}function ls(i,o,u){if(i!==null&&(o.dependencies=i.dependencies),Js|=o.lanes,(u&o.childLanes)===0)if(i!==null){if(ja(i,o,u,!1),(u&o.childLanes)===0)return null}else return null;if(i!==null&&o.child!==i.child)throw Error(r(153));if(o.child!==null){for(i=o.child,u=ns(i,i.pendingProps),o.child=u,u.return=o;i.sibling!==null;)i=i.sibling,u=u.sibling=ns(i,i.pendingProps),u.return=o;u.sibling=null}return o.child}function xg(i,o){return(i.lanes&o)!==0?!0:(i=i.dependencies,!!(i!==null&&Mf(i)))}function AL(i,o,u){switch(o.tag){case 3:le(o,o.stateNode.containerInfo),Vs(o,qn,i.memoizedState.cache),$o();break;case 27:case 5:Ee(o);break;case 4:le(o,o.stateNode.containerInfo);break;case 10:Vs(o,o.type,o.memoizedProps.value);break;case 31:if(o.memoizedState!==null)return o.flags|=128,Vm(o),null;break;case 13:var p=o.memoizedState;if(p!==null)return p.dehydrated!==null?(Ys(o),o.flags|=128,null):(u&o.child.childLanes)!==0?DS(i,o,u):(Ys(o),i=ls(i,o,u),i!==null?i.sibling:null);Ys(o);break;case 19:var x=(i.flags&128)!==0;if(p=(u&o.childLanes)!==0,p||(ja(i,o,u,!1),p=(u&o.childLanes)!==0),x){if(p)return jS(i,o,u);o.flags|=128}if(x=o.memoizedState,x!==null&&(x.rendering=null,x.tail=null,x.lastEffect=null),L(Dn,Dn.current),p)break;return null;case 22:return o.lanes=0,_S(i,o,u,o.pendingProps);case 24:Vs(o,qn,i.memoizedState.cache)}return ls(i,o,u)}function zS(i,o,u){if(i!==null)if(i.memoizedProps!==o.pendingProps)Vn=!0;else{if(!xg(i,u)&&(o.flags&128)===0)return Vn=!1,AL(i,o,u);Vn=(i.flags&131072)!==0}else Vn=!1,Kt&&(o.flags&1048576)!==0&&mk(o,lu,o.index);switch(o.lanes=0,o.tag){case 16:e:{var p=o.pendingProps;if(i=qo(o.elementType),o.type=i,typeof i=="function")Tm(i)?(p=Wo(i,p),o.tag=1,o=IS(null,o,i,p,u)):(o.tag=0,o=pg(null,o,i,p,u));else{if(i!=null){var x=i.$$typeof;if(x===_){o.tag=11,o=TS(null,o,i,p,u);break e}else if(x===I){o.tag=14,o=CS(null,o,i,p,u);break e}}throw o=j(i)||i,Error(r(306,o,""))}}return o;case 0:return pg(i,o,o.type,o.pendingProps,u);case 1:return p=o.type,x=Wo(p,o.pendingProps),IS(i,o,p,x,u);case 3:e:{if(le(o,o.stateNode.containerInfo),i===null)throw Error(r(387));p=o.pendingProps;var w=o.memoizedState;x=w.element,Bm(i,o),gu(o,p,null,u);var M=o.memoizedState;if(p=M.cache,Vs(o,qn,p),p!==w.cache&&Dm(o,[qn],u,!0),mu(),p=M.element,w.isDehydrated)if(w={element:p,isDehydrated:!1,cache:M.cache},o.updateQueue.baseState=w,o.memoizedState=w,o.flags&256){o=MS(i,o,p,u);break e}else if(p!==x){x=oi(Error(r(424)),o),uu(x),o=MS(i,o,p,u);break e}else for(i=o.stateNode.containerInfo,i.nodeType===9?i=i.body:i=i.nodeName==="HTML"?i.ownerDocument.body:i,En=fi(i.firstChild),rr=o,Kt=!0,qs=null,ui=!0,u=_k(o,null,p,u),o.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if($o(),p===x){o=ls(i,o,u);break e}sr(i,o,p,u)}o=o.child}return o;case 26:return Qf(i,o),i===null?(u=K1(o.type,null,o.pendingProps,null))?o.memoizedState=u:Kt||(u=o.type,i=o.pendingProps,p=md(ie.current).createElement(u),p[Tt]=o,p[Qt]=i,or(p,u,i),Fn(p),o.stateNode=p):o.memoizedState=K1(o.type,i.memoizedProps,o.pendingProps,i.memoizedState),null;case 27:return Ee(o),i===null&&Kt&&(p=o.stateNode=V1(o.type,o.pendingProps,ie.current),rr=o,ui=!0,x=En,io(o.type)?(Jg=x,En=fi(p.firstChild)):En=x),sr(i,o,o.pendingProps.children,u),Qf(i,o),i===null&&(o.flags|=4194304),o.child;case 5:return i===null&&Kt&&((x=p=En)&&(p=sj(p,o.type,o.pendingProps,ui),p!==null?(o.stateNode=p,rr=o,En=fi(p.firstChild),ui=!1,x=!0):x=!1),x||Hs(o)),Ee(o),x=o.type,w=o.pendingProps,M=i!==null?i.memoizedProps:null,p=w.children,Kg(x,w)?p=null:M!==null&&Kg(x,M)&&(o.flags|=32),o.memoizedState!==null&&(x=Wm(i,o,xL,null,null,u),ju._currentValue=x),Qf(i,o),sr(i,o,p,u),o.child;case 6:return i===null&&Kt&&((i=u=En)&&(u=oj(u,o.pendingProps,ui),u!==null?(o.stateNode=u,rr=o,En=null,i=!0):i=!1),i||Hs(o)),null;case 13:return DS(i,o,u);case 4:return le(o,o.stateNode.containerInfo),p=o.pendingProps,i===null?o.child=Vo(o,null,p,u):sr(i,o,p,u),o.child;case 11:return TS(i,o,o.type,o.pendingProps,u);case 7:return sr(i,o,o.pendingProps,u),o.child;case 8:return sr(i,o,o.pendingProps.children,u),o.child;case 12:return sr(i,o,o.pendingProps.children,u),o.child;case 10:return p=o.pendingProps,Vs(o,o.type,p.value),sr(i,o,p.children,u),o.child;case 9:return x=o.type._context,p=o.pendingProps.children,Fo(o),x=ir(x),p=p(x),o.flags|=1,sr(i,o,p,u),o.child;case 14:return CS(i,o,o.type,o.pendingProps,u);case 15:return RS(i,o,o.type,o.pendingProps,u);case 19:return jS(i,o,u);case 31:return _L(i,o,u);case 22:return _S(i,o,u,o.pendingProps);case 24:return Fo(o),p=ir(qn),i===null?(x=zm(),x===null&&(x=bn,w=Lm(),x.pooledCache=w,w.refCount++,w!==null&&(x.pooledCacheLanes|=u),x=w),o.memoizedState={parent:p,cache:x},$m(o),Vs(o,qn,x)):((i.lanes&u)!==0&&(Bm(i,o),gu(o,null,null,u),mu()),x=i.memoizedState,w=o.memoizedState,x.parent!==p?(x={parent:p,cache:p},o.memoizedState=x,o.lanes===0&&(o.memoizedState=o.updateQueue.baseState=x),Vs(o,qn,p)):(p=w.cache,Vs(o,qn,p),p!==x.cache&&Dm(o,[qn],u,!0))),sr(i,o,o.pendingProps.children,u),o.child;case 29:throw o.pendingProps}throw Error(r(156,o.tag))}function us(i){i.flags|=4}function kg(i,o,u,p,x){if((o=(i.mode&32)!==0)&&(o=!1),o){if(i.flags|=16777216,(x&335544128)===x)if(i.stateNode.complete)i.flags|=8192;else if(c1())i.flags|=8192;else throw Ho=zf,Pm}else i.flags&=-16777217}function PS(i,o){if(o.type!=="stylesheet"||(o.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!J1(o))if(c1())i.flags|=8192;else throw Ho=zf,Pm}function ed(i,o){o!==null&&(i.flags|=4),i.flags&16384&&(o=i.tag!==22?Xe():536870912,i.lanes|=o,Ka|=o)}function Su(i,o){if(!Kt)switch(i.tailMode){case"hidden":o=i.tail;for(var u=null;o!==null;)o.alternate!==null&&(u=o),o=o.sibling;u===null?i.tail=null:u.sibling=null;break;case"collapsed":u=i.tail;for(var p=null;u!==null;)u.alternate!==null&&(p=u),u=u.sibling;p===null?o||i.tail===null?i.tail=null:i.tail.sibling=null:p.sibling=null}}function Tn(i){var o=i.alternate!==null&&i.alternate.child===i.child,u=0,p=0;if(o)for(var x=i.child;x!==null;)u|=x.lanes|x.childLanes,p|=x.subtreeFlags&65011712,p|=x.flags&65011712,x.return=i,x=x.sibling;else for(x=i.child;x!==null;)u|=x.lanes|x.childLanes,p|=x.subtreeFlags,p|=x.flags,x.return=i,x=x.sibling;return i.subtreeFlags|=p,i.childLanes=u,o}function NL(i,o,u){var p=o.pendingProps;switch(Am(o),o.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Tn(o),null;case 1:return Tn(o),null;case 3:return u=o.stateNode,p=null,i!==null&&(p=i.memoizedState.cache),o.memoizedState.cache!==p&&(o.flags|=2048),ss(qn),ce(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(i===null||i.child===null)&&(La(o)?us(o):i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,Om())),Tn(o),null;case 26:var x=o.type,w=o.memoizedState;return i===null?(us(o),w!==null?(Tn(o),PS(o,w)):(Tn(o),kg(o,x,null,p,u))):w?w!==i.memoizedState?(us(o),Tn(o),PS(o,w)):(Tn(o),o.flags&=-16777217):(i=i.memoizedProps,i!==p&&us(o),Tn(o),kg(o,x,i,p,u)),null;case 27:if(be(o),u=ie.current,x=o.type,i!==null&&o.stateNode!=null)i.memoizedProps!==p&&us(o);else{if(!p){if(o.stateNode===null)throw Error(r(166));return Tn(o),null}i=Z.current,La(o)?bk(o):(i=V1(x,p,u),o.stateNode=i,us(o))}return Tn(o),null;case 5:if(be(o),x=o.type,i!==null&&o.stateNode!=null)i.memoizedProps!==p&&us(o);else{if(!p){if(o.stateNode===null)throw Error(r(166));return Tn(o),null}if(w=Z.current,La(o))bk(o);else{var M=md(ie.current);switch(w){case 1:w=M.createElementNS("http://www.w3.org/2000/svg",x);break;case 2:w=M.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;default:switch(x){case"svg":w=M.createElementNS("http://www.w3.org/2000/svg",x);break;case"math":w=M.createElementNS("http://www.w3.org/1998/Math/MathML",x);break;case"script":w=M.createElement("div"),w.innerHTML="<script><\/script>",w=w.removeChild(w.firstChild);break;case"select":w=typeof p.is=="string"?M.createElement("select",{is:p.is}):M.createElement("select"),p.multiple?w.multiple=!0:p.size&&(w.size=p.size);break;default:w=typeof p.is=="string"?M.createElement(x,{is:p.is}):M.createElement(x)}}w[Tt]=o,w[Qt]=p;e:for(M=o.child;M!==null;){if(M.tag===5||M.tag===6)w.appendChild(M.stateNode);else if(M.tag!==4&&M.tag!==27&&M.child!==null){M.child.return=M,M=M.child;continue}if(M===o)break e;for(;M.sibling===null;){if(M.return===null||M.return===o)break e;M=M.return}M.sibling.return=M.return,M=M.sibling}o.stateNode=w;e:switch(or(w,x,p),x){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}p&&us(o)}}return Tn(o),kg(o,o.type,i===null?null:i.memoizedProps,o.pendingProps,u),null;case 6:if(i&&o.stateNode!=null)i.memoizedProps!==p&&us(o);else{if(typeof p!="string"&&o.stateNode===null)throw Error(r(166));if(i=ie.current,La(o)){if(i=o.stateNode,u=o.memoizedProps,p=null,x=rr,x!==null)switch(x.tag){case 27:case 5:p=x.memoizedProps}i[Tt]=o,i=!!(i.nodeValue===u||p!==null&&p.suppressHydrationWarning===!0||D1(i.nodeValue,u)),i||Hs(o,!0)}else i=md(i).createTextNode(p),i[Tt]=o,o.stateNode=i}return Tn(o),null;case 31:if(u=o.memoizedState,i===null||i.memoizedState!==null){if(p=La(o),u!==null){if(i===null){if(!p)throw Error(r(318));if(i=o.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(r(557));i[Tt]=o}else $o(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Tn(o),i=!1}else u=Om(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=u),i=!0;if(!i)return o.flags&256?(Wr(o),o):(Wr(o),null);if((o.flags&128)!==0)throw Error(r(558))}return Tn(o),null;case 13:if(p=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(x=La(o),p!==null&&p.dehydrated!==null){if(i===null){if(!x)throw Error(r(318));if(x=o.memoizedState,x=x!==null?x.dehydrated:null,!x)throw Error(r(317));x[Tt]=o}else $o(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Tn(o),x=!1}else x=Om(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=x),x=!0;if(!x)return o.flags&256?(Wr(o),o):(Wr(o),null)}return Wr(o),(o.flags&128)!==0?(o.lanes=u,o):(u=p!==null,i=i!==null&&i.memoizedState!==null,u&&(p=o.child,x=null,p.alternate!==null&&p.alternate.memoizedState!==null&&p.alternate.memoizedState.cachePool!==null&&(x=p.alternate.memoizedState.cachePool.pool),w=null,p.memoizedState!==null&&p.memoizedState.cachePool!==null&&(w=p.memoizedState.cachePool.pool),w!==x&&(p.flags|=2048)),u!==i&&u&&(o.child.flags|=8192),ed(o,o.updateQueue),Tn(o),null);case 4:return ce(),i===null&&qg(o.stateNode.containerInfo),Tn(o),null;case 10:return ss(o.type),Tn(o),null;case 19:if(V(Dn),p=o.memoizedState,p===null)return Tn(o),null;if(x=(o.flags&128)!==0,w=p.rendering,w===null)if(x)Su(p,!1);else{if(In!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(w=Ff(i),w!==null){for(o.flags|=128,Su(p,!1),i=w.updateQueue,o.updateQueue=i,ed(o,i),o.subtreeFlags=0,i=u,u=o.child;u!==null;)dk(u,i),u=u.sibling;return L(Dn,Dn.current&1|2),Kt&&rs(o,p.treeForkCount),o.child}i=i.sibling}p.tail!==null&&ee()>sd&&(o.flags|=128,x=!0,Su(p,!1),o.lanes=4194304)}else{if(!x)if(i=Ff(w),i!==null){if(o.flags|=128,x=!0,i=i.updateQueue,o.updateQueue=i,ed(o,i),Su(p,!0),p.tail===null&&p.tailMode==="hidden"&&!w.alternate&&!Kt)return Tn(o),null}else 2*ee()-p.renderingStartTime>sd&&u!==536870912&&(o.flags|=128,x=!0,Su(p,!1),o.lanes=4194304);p.isBackwards?(w.sibling=o.child,o.child=w):(i=p.last,i!==null?i.sibling=w:o.child=w,p.last=w)}return p.tail!==null?(i=p.tail,p.rendering=i,p.tail=i.sibling,p.renderingStartTime=ee(),i.sibling=null,u=Dn.current,L(Dn,x?u&1|2:u&1),Kt&&rs(o,p.treeForkCount),i):(Tn(o),null);case 22:case 23:return Wr(o),Hm(),p=o.memoizedState!==null,i!==null?i.memoizedState!==null!==p&&(o.flags|=8192):p&&(o.flags|=8192),p?(u&536870912)!==0&&(o.flags&128)===0&&(Tn(o),o.subtreeFlags&6&&(o.flags|=8192)):Tn(o),u=o.updateQueue,u!==null&&ed(o,u.retryQueue),u=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),p=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(p=o.memoizedState.cachePool.pool),p!==u&&(o.flags|=2048),i!==null&&V(Uo),null;case 24:return u=null,i!==null&&(u=i.memoizedState.cache),o.memoizedState.cache!==u&&(o.flags|=2048),ss(qn),Tn(o),null;case 25:return null;case 30:return null}throw Error(r(156,o.tag))}function OL(i,o){switch(Am(o),o.tag){case 1:return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return ss(qn),ce(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 26:case 27:case 5:return be(o),null;case 31:if(o.memoizedState!==null){if(Wr(o),o.alternate===null)throw Error(r(340));$o()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 13:if(Wr(o),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(r(340));$o()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return V(Dn),null;case 4:return ce(),null;case 10:return ss(o.type),null;case 22:case 23:return Wr(o),Hm(),i!==null&&V(Uo),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 24:return ss(qn),null;case 25:return null;default:return null}}function $S(i,o){switch(Am(o),o.tag){case 3:ss(qn),ce();break;case 26:case 27:case 5:be(o);break;case 4:ce();break;case 31:o.memoizedState!==null&&Wr(o);break;case 13:Wr(o);break;case 19:V(Dn);break;case 10:ss(o.type);break;case 22:case 23:Wr(o),Hm(),i!==null&&V(Uo);break;case 24:ss(qn)}}function wu(i,o){try{var u=o.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var x=p.next;u=x;do{if((u.tag&i)===i){p=void 0;var w=u.create,M=u.inst;p=w(),M.destroy=p}u=u.next}while(u!==x)}}catch(G){un(o,o.return,G)}}function Zs(i,o,u){try{var p=o.updateQueue,x=p!==null?p.lastEffect:null;if(x!==null){var w=x.next;p=w;do{if((p.tag&i)===i){var M=p.inst,G=M.destroy;if(G!==void 0){M.destroy=void 0,x=o;var J=u,pe=G;try{pe()}catch(Te){un(x,J,Te)}}}p=p.next}while(p!==w)}}catch(Te){un(o,o.return,Te)}}function BS(i){var o=i.updateQueue;if(o!==null){var u=i.stateNode;try{Nk(o,u)}catch(p){un(i,i.return,p)}}}function FS(i,o,u){u.props=Wo(i.type,i.memoizedProps),u.state=i.memoizedState;try{u.componentWillUnmount()}catch(p){un(i,o,p)}}function Eu(i,o){try{var u=i.ref;if(u!==null){switch(i.tag){case 26:case 27:case 5:var p=i.stateNode;break;case 30:p=i.stateNode;break;default:p=i.stateNode}typeof u=="function"?i.refCleanup=u(p):u.current=p}}catch(x){un(i,o,x)}}function Pi(i,o){var u=i.ref,p=i.refCleanup;if(u!==null)if(typeof p=="function")try{p()}catch(x){un(i,o,x)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(x){un(i,o,x)}else u.current=null}function US(i){var o=i.type,u=i.memoizedProps,p=i.stateNode;try{e:switch(o){case"button":case"input":case"select":case"textarea":u.autoFocus&&p.focus();break e;case"img":u.src?p.src=u.src:u.srcSet&&(p.srcset=u.srcSet)}}catch(x){un(i,i.return,x)}}function Sg(i,o,u){try{var p=i.stateNode;JL(p,i.type,u,o),p[Qt]=o}catch(x){un(i,i.return,x)}}function qS(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&io(i.type)||i.tag===4}function wg(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||qS(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&io(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Eg(i,o,u){var p=i.tag;if(p===5||p===6)i=i.stateNode,o?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(i,o):(o=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,o.appendChild(i),u=u._reactRootContainer,u!=null||o.onclick!==null||(o.onclick=Ge));else if(p!==4&&(p===27&&io(i.type)&&(u=i.stateNode,o=null),i=i.child,i!==null))for(Eg(i,o,u),i=i.sibling;i!==null;)Eg(i,o,u),i=i.sibling}function td(i,o,u){var p=i.tag;if(p===5||p===6)i=i.stateNode,o?u.insertBefore(i,o):u.appendChild(i);else if(p!==4&&(p===27&&io(i.type)&&(u=i.stateNode),i=i.child,i!==null))for(td(i,o,u),i=i.sibling;i!==null;)td(i,o,u),i=i.sibling}function HS(i){var o=i.stateNode,u=i.memoizedProps;try{for(var p=i.type,x=o.attributes;x.length;)o.removeAttributeNode(x[0]);or(o,p,u),o[Tt]=i,o[Qt]=u}catch(w){un(i,i.return,w)}}var cs=!1,Gn=!1,Tg=!1,VS=typeof WeakSet=="function"?WeakSet:Set,Jn=null;function IL(i,o){if(i=i.containerInfo,Gg=Sd,i=rk(i),ym(i)){if("selectionStart"in i)var u={start:i.selectionStart,end:i.selectionEnd};else e:{u=(u=i.ownerDocument)&&u.defaultView||window;var p=u.getSelection&&u.getSelection();if(p&&p.rangeCount!==0){u=p.anchorNode;var x=p.anchorOffset,w=p.focusNode;p=p.focusOffset;try{u.nodeType,w.nodeType}catch{u=null;break e}var M=0,G=-1,J=-1,pe=0,Te=0,Oe=i,he=null;t:for(;;){for(var ve;Oe!==u||x!==0&&Oe.nodeType!==3||(G=M+x),Oe!==w||p!==0&&Oe.nodeType!==3||(J=M+p),Oe.nodeType===3&&(M+=Oe.nodeValue.length),(ve=Oe.firstChild)!==null;)he=Oe,Oe=ve;for(;;){if(Oe===i)break t;if(he===u&&++pe===x&&(G=M),he===w&&++Te===p&&(J=M),(ve=Oe.nextSibling)!==null)break;Oe=he,he=Oe.parentNode}Oe=ve}u=G===-1||J===-1?null:{start:G,end:J}}else u=null}u=u||{start:0,end:0}}else u=null;for(Wg={focusedElem:i,selectionRange:u},Sd=!1,Jn=o;Jn!==null;)if(o=Jn,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,Jn=i;else for(;Jn!==null;){switch(o=Jn,w=o.alternate,i=o.flags,o.tag){case 0:if((i&4)!==0&&(i=o.updateQueue,i=i!==null?i.events:null,i!==null))for(u=0;u<i.length;u++)x=i[u],x.ref.impl=x.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&w!==null){i=void 0,u=o,x=w.memoizedProps,w=w.memoizedState,p=u.stateNode;try{var et=Wo(u.type,x);i=p.getSnapshotBeforeUpdate(et,w),p.__reactInternalSnapshotBeforeUpdate=i}catch(xt){un(u,u.return,xt)}}break;case 3:if((i&1024)!==0){if(i=o.stateNode.containerInfo,u=i.nodeType,u===9)Xg(i);else if(u===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":Xg(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(r(163))}if(i=o.sibling,i!==null){i.return=o.return,Jn=i;break}Jn=o.return}}function GS(i,o,u){var p=u.flags;switch(u.tag){case 0:case 11:case 15:ds(i,u),p&4&&wu(5,u);break;case 1:if(ds(i,u),p&4)if(i=u.stateNode,o===null)try{i.componentDidMount()}catch(M){un(u,u.return,M)}else{var x=Wo(u.type,o.memoizedProps);o=o.memoizedState;try{i.componentDidUpdate(x,o,i.__reactInternalSnapshotBeforeUpdate)}catch(M){un(u,u.return,M)}}p&64&&BS(u),p&512&&Eu(u,u.return);break;case 3:if(ds(i,u),p&64&&(i=u.updateQueue,i!==null)){if(o=null,u.child!==null)switch(u.child.tag){case 27:case 5:o=u.child.stateNode;break;case 1:o=u.child.stateNode}try{Nk(i,o)}catch(M){un(u,u.return,M)}}break;case 27:o===null&&p&4&&HS(u);case 26:case 5:ds(i,u),o===null&&p&4&&US(u),p&512&&Eu(u,u.return);break;case 12:ds(i,u);break;case 31:ds(i,u),p&4&&YS(i,u);break;case 13:ds(i,u),p&4&&XS(i,u),p&64&&(i=u.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(u=FL.bind(null,u),aj(i,u))));break;case 22:if(p=u.memoizedState!==null||cs,!p){o=o!==null&&o.memoizedState!==null||Gn,x=cs;var w=Gn;cs=p,(Gn=o)&&!w?ps(i,u,(u.subtreeFlags&8772)!==0):ds(i,u),cs=x,Gn=w}break;case 30:break;default:ds(i,u)}}function WS(i){var o=i.alternate;o!==null&&(i.alternate=null,WS(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&Fr(o)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var Cn=null,Ar=!1;function fs(i,o,u){for(u=u.child;u!==null;)KS(i,o,u),u=u.sibling}function KS(i,o,u){if(vt&&typeof vt.onCommitFiberUnmount=="function")try{vt.onCommitFiberUnmount(Je,u)}catch{}switch(u.tag){case 26:Gn||Pi(u,o),fs(i,o,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:Gn||Pi(u,o);var p=Cn,x=Ar;io(u.type)&&(Cn=u.stateNode,Ar=!1),fs(i,o,u),Mu(u.stateNode),Cn=p,Ar=x;break;case 5:Gn||Pi(u,o);case 6:if(p=Cn,x=Ar,Cn=null,fs(i,o,u),Cn=p,Ar=x,Cn!==null)if(Ar)try{(Cn.nodeType===9?Cn.body:Cn.nodeName==="HTML"?Cn.ownerDocument.body:Cn).removeChild(u.stateNode)}catch(w){un(u,o,w)}else try{Cn.removeChild(u.stateNode)}catch(w){un(u,o,w)}break;case 18:Cn!==null&&(Ar?(i=Cn,B1(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,u.stateNode),nl(i)):B1(Cn,u.stateNode));break;case 4:p=Cn,x=Ar,Cn=u.stateNode.containerInfo,Ar=!0,fs(i,o,u),Cn=p,Ar=x;break;case 0:case 11:case 14:case 15:Zs(2,u,o),Gn||Zs(4,u,o),fs(i,o,u);break;case 1:Gn||(Pi(u,o),p=u.stateNode,typeof p.componentWillUnmount=="function"&&FS(u,o,p)),fs(i,o,u);break;case 21:fs(i,o,u);break;case 22:Gn=(p=Gn)||u.memoizedState!==null,fs(i,o,u),Gn=p;break;default:fs(i,o,u)}}function YS(i,o){if(o.memoizedState===null&&(i=o.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{nl(i)}catch(u){un(o,o.return,u)}}}function XS(i,o){if(o.memoizedState===null&&(i=o.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{nl(i)}catch(u){un(o,o.return,u)}}function ML(i){switch(i.tag){case 31:case 13:case 19:var o=i.stateNode;return o===null&&(o=i.stateNode=new VS),o;case 22:return i=i.stateNode,o=i._retryCache,o===null&&(o=i._retryCache=new VS),o;default:throw Error(r(435,i.tag))}}function nd(i,o){var u=ML(i);o.forEach(function(p){if(!u.has(p)){u.add(p);var x=UL.bind(null,i,p);p.then(x,x)}})}function Nr(i,o){var u=o.deletions;if(u!==null)for(var p=0;p<u.length;p++){var x=u[p],w=i,M=o,G=M;e:for(;G!==null;){switch(G.tag){case 27:if(io(G.type)){Cn=G.stateNode,Ar=!1;break e}break;case 5:Cn=G.stateNode,Ar=!1;break e;case 3:case 4:Cn=G.stateNode.containerInfo,Ar=!0;break e}G=G.return}if(Cn===null)throw Error(r(160));KS(w,M,x),Cn=null,Ar=!1,w=x.alternate,w!==null&&(w.return=null),x.return=null}if(o.subtreeFlags&13886)for(o=o.child;o!==null;)ZS(o,i),o=o.sibling}var Si=null;function ZS(i,o){var u=i.alternate,p=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:Nr(o,i),Or(i),p&4&&(Zs(3,i,i.return),wu(3,i),Zs(5,i,i.return));break;case 1:Nr(o,i),Or(i),p&512&&(Gn||u===null||Pi(u,u.return)),p&64&&cs&&(i=i.updateQueue,i!==null&&(p=i.callbacks,p!==null&&(u=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=u===null?p:u.concat(p))));break;case 26:var x=Si;if(Nr(o,i),Or(i),p&512&&(Gn||u===null||Pi(u,u.return)),p&4){var w=u!==null?u.memoizedState:null;if(p=i.memoizedState,u===null)if(p===null)if(i.stateNode===null){e:{p=i.type,u=i.memoizedProps,x=x.ownerDocument||x;t:switch(p){case"title":w=x.getElementsByTagName("title")[0],(!w||w[ri]||w[Tt]||w.namespaceURI==="http://www.w3.org/2000/svg"||w.hasAttribute("itemprop"))&&(w=x.createElement(p),x.head.insertBefore(w,x.querySelector("head > title"))),or(w,p,u),w[Tt]=i,Fn(w),p=w;break e;case"link":var M=Z1("link","href",x).get(p+(u.href||""));if(M){for(var G=0;G<M.length;G++)if(w=M[G],w.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&w.getAttribute("rel")===(u.rel==null?null:u.rel)&&w.getAttribute("title")===(u.title==null?null:u.title)&&w.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){M.splice(G,1);break t}}w=x.createElement(p),or(w,p,u),x.head.appendChild(w);break;case"meta":if(M=Z1("meta","content",x).get(p+(u.content||""))){for(G=0;G<M.length;G++)if(w=M[G],w.getAttribute("content")===(u.content==null?null:""+u.content)&&w.getAttribute("name")===(u.name==null?null:u.name)&&w.getAttribute("property")===(u.property==null?null:u.property)&&w.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&w.getAttribute("charset")===(u.charSet==null?null:u.charSet)){M.splice(G,1);break t}}w=x.createElement(p),or(w,p,u),x.head.appendChild(w);break;default:throw Error(r(468,p))}w[Tt]=i,Fn(w),p=w}i.stateNode=p}else Q1(x,i.type,i.stateNode);else i.stateNode=X1(x,p,i.memoizedProps);else w!==p?(w===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):w.count--,p===null?Q1(x,i.type,i.stateNode):X1(x,p,i.memoizedProps)):p===null&&i.stateNode!==null&&Sg(i,i.memoizedProps,u.memoizedProps)}break;case 27:Nr(o,i),Or(i),p&512&&(Gn||u===null||Pi(u,u.return)),u!==null&&p&4&&Sg(i,i.memoizedProps,u.memoizedProps);break;case 5:if(Nr(o,i),Or(i),p&512&&(Gn||u===null||Pi(u,u.return)),i.flags&32){x=i.stateNode;try{St(x,"")}catch(et){un(i,i.return,et)}}p&4&&i.stateNode!=null&&(x=i.memoizedProps,Sg(i,x,u!==null?u.memoizedProps:x)),p&1024&&(Tg=!0);break;case 6:if(Nr(o,i),Or(i),p&4){if(i.stateNode===null)throw Error(r(162));p=i.memoizedProps,u=i.stateNode;try{u.nodeValue=p}catch(et){un(i,i.return,et)}}break;case 3:if(yd=null,x=Si,Si=gd(o.containerInfo),Nr(o,i),Si=x,Or(i),p&4&&u!==null&&u.memoizedState.isDehydrated)try{nl(o.containerInfo)}catch(et){un(i,i.return,et)}Tg&&(Tg=!1,QS(i));break;case 4:p=Si,Si=gd(i.stateNode.containerInfo),Nr(o,i),Or(i),Si=p;break;case 12:Nr(o,i),Or(i);break;case 31:Nr(o,i),Or(i),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,nd(i,p)));break;case 13:Nr(o,i),Or(i),i.child.flags&8192&&i.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(id=ee()),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,nd(i,p)));break;case 22:x=i.memoizedState!==null;var J=u!==null&&u.memoizedState!==null,pe=cs,Te=Gn;if(cs=pe||x,Gn=Te||J,Nr(o,i),Gn=Te,cs=pe,Or(i),p&8192)e:for(o=i.stateNode,o._visibility=x?o._visibility&-2:o._visibility|1,x&&(u===null||J||cs||Gn||Ko(i)),u=null,o=i;;){if(o.tag===5||o.tag===26){if(u===null){J=u=o;try{if(w=J.stateNode,x)M=w.style,typeof M.setProperty=="function"?M.setProperty("display","none","important"):M.display="none";else{G=J.stateNode;var Oe=J.memoizedProps.style,he=Oe!=null&&Oe.hasOwnProperty("display")?Oe.display:null;G.style.display=he==null||typeof he=="boolean"?"":(""+he).trim()}}catch(et){un(J,J.return,et)}}}else if(o.tag===6){if(u===null){J=o;try{J.stateNode.nodeValue=x?"":J.memoizedProps}catch(et){un(J,J.return,et)}}}else if(o.tag===18){if(u===null){J=o;try{var ve=J.stateNode;x?F1(ve,!0):F1(J.stateNode,!1)}catch(et){un(J,J.return,et)}}}else if((o.tag!==22&&o.tag!==23||o.memoizedState===null||o===i)&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break e;for(;o.sibling===null;){if(o.return===null||o.return===i)break e;u===o&&(u=null),o=o.return}u===o&&(u=null),o.sibling.return=o.return,o=o.sibling}p&4&&(p=i.updateQueue,p!==null&&(u=p.retryQueue,u!==null&&(p.retryQueue=null,nd(i,u))));break;case 19:Nr(o,i),Or(i),p&4&&(p=i.updateQueue,p!==null&&(i.updateQueue=null,nd(i,p)));break;case 30:break;case 21:break;default:Nr(o,i),Or(i)}}function Or(i){var o=i.flags;if(o&2){try{for(var u,p=i.return;p!==null;){if(qS(p)){u=p;break}p=p.return}if(u==null)throw Error(r(160));switch(u.tag){case 27:var x=u.stateNode,w=wg(i);td(i,w,x);break;case 5:var M=u.stateNode;u.flags&32&&(St(M,""),u.flags&=-33);var G=wg(i);td(i,G,M);break;case 3:case 4:var J=u.stateNode.containerInfo,pe=wg(i);Eg(i,pe,J);break;default:throw Error(r(161))}}catch(Te){un(i,i.return,Te)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function QS(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var o=i;QS(o),o.tag===5&&o.flags&1024&&o.stateNode.reset(),i=i.sibling}}function ds(i,o){if(o.subtreeFlags&8772)for(o=o.child;o!==null;)GS(i,o.alternate,o),o=o.sibling}function Ko(i){for(i=i.child;i!==null;){var o=i;switch(o.tag){case 0:case 11:case 14:case 15:Zs(4,o,o.return),Ko(o);break;case 1:Pi(o,o.return);var u=o.stateNode;typeof u.componentWillUnmount=="function"&&FS(o,o.return,u),Ko(o);break;case 27:Mu(o.stateNode);case 26:case 5:Pi(o,o.return),Ko(o);break;case 22:o.memoizedState===null&&Ko(o);break;case 30:Ko(o);break;default:Ko(o)}i=i.sibling}}function ps(i,o,u){for(u=u&&(o.subtreeFlags&8772)!==0,o=o.child;o!==null;){var p=o.alternate,x=i,w=o,M=w.flags;switch(w.tag){case 0:case 11:case 15:ps(x,w,u),wu(4,w);break;case 1:if(ps(x,w,u),p=w,x=p.stateNode,typeof x.componentDidMount=="function")try{x.componentDidMount()}catch(pe){un(p,p.return,pe)}if(p=w,x=p.updateQueue,x!==null){var G=p.stateNode;try{var J=x.shared.hiddenCallbacks;if(J!==null)for(x.shared.hiddenCallbacks=null,x=0;x<J.length;x++)Ak(J[x],G)}catch(pe){un(p,p.return,pe)}}u&&M&64&&BS(w),Eu(w,w.return);break;case 27:HS(w);case 26:case 5:ps(x,w,u),u&&p===null&&M&4&&US(w),Eu(w,w.return);break;case 12:ps(x,w,u);break;case 31:ps(x,w,u),u&&M&4&&YS(x,w);break;case 13:ps(x,w,u),u&&M&4&&XS(x,w);break;case 22:w.memoizedState===null&&ps(x,w,u),Eu(w,w.return);break;case 30:break;default:ps(x,w,u)}o=o.sibling}}function Cg(i,o){var u=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),i=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(i=o.memoizedState.cachePool.pool),i!==u&&(i!=null&&i.refCount++,u!=null&&cu(u))}function Rg(i,o){i=null,o.alternate!==null&&(i=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==i&&(o.refCount++,i!=null&&cu(i))}function wi(i,o,u,p){if(o.subtreeFlags&10256)for(o=o.child;o!==null;)JS(i,o,u,p),o=o.sibling}function JS(i,o,u,p){var x=o.flags;switch(o.tag){case 0:case 11:case 15:wi(i,o,u,p),x&2048&&wu(9,o);break;case 1:wi(i,o,u,p);break;case 3:wi(i,o,u,p),x&2048&&(i=null,o.alternate!==null&&(i=o.alternate.memoizedState.cache),o=o.memoizedState.cache,o!==i&&(o.refCount++,i!=null&&cu(i)));break;case 12:if(x&2048){wi(i,o,u,p),i=o.stateNode;try{var w=o.memoizedProps,M=w.id,G=w.onPostCommit;typeof G=="function"&&G(M,o.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(J){un(o,o.return,J)}}else wi(i,o,u,p);break;case 31:wi(i,o,u,p);break;case 13:wi(i,o,u,p);break;case 23:break;case 22:w=o.stateNode,M=o.alternate,o.memoizedState!==null?w._visibility&2?wi(i,o,u,p):Tu(i,o):w._visibility&2?wi(i,o,u,p):(w._visibility|=2,Va(i,o,u,p,(o.subtreeFlags&10256)!==0||!1)),x&2048&&Cg(M,o);break;case 24:wi(i,o,u,p),x&2048&&Rg(o.alternate,o);break;default:wi(i,o,u,p)}}function Va(i,o,u,p,x){for(x=x&&((o.subtreeFlags&10256)!==0||!1),o=o.child;o!==null;){var w=i,M=o,G=u,J=p,pe=M.flags;switch(M.tag){case 0:case 11:case 15:Va(w,M,G,J,x),wu(8,M);break;case 23:break;case 22:var Te=M.stateNode;M.memoizedState!==null?Te._visibility&2?Va(w,M,G,J,x):Tu(w,M):(Te._visibility|=2,Va(w,M,G,J,x)),x&&pe&2048&&Cg(M.alternate,M);break;case 24:Va(w,M,G,J,x),x&&pe&2048&&Rg(M.alternate,M);break;default:Va(w,M,G,J,x)}o=o.sibling}}function Tu(i,o){if(o.subtreeFlags&10256)for(o=o.child;o!==null;){var u=i,p=o,x=p.flags;switch(p.tag){case 22:Tu(u,p),x&2048&&Cg(p.alternate,p);break;case 24:Tu(u,p),x&2048&&Rg(p.alternate,p);break;default:Tu(u,p)}o=o.sibling}}var Cu=8192;function Ga(i,o,u){if(i.subtreeFlags&Cu)for(i=i.child;i!==null;)e1(i,o,u),i=i.sibling}function e1(i,o,u){switch(i.tag){case 26:Ga(i,o,u),i.flags&Cu&&i.memoizedState!==null&&vj(u,Si,i.memoizedState,i.memoizedProps);break;case 5:Ga(i,o,u);break;case 3:case 4:var p=Si;Si=gd(i.stateNode.containerInfo),Ga(i,o,u),Si=p;break;case 22:i.memoizedState===null&&(p=i.alternate,p!==null&&p.memoizedState!==null?(p=Cu,Cu=16777216,Ga(i,o,u),Cu=p):Ga(i,o,u));break;default:Ga(i,o,u)}}function t1(i){var o=i.alternate;if(o!==null&&(i=o.child,i!==null)){o.child=null;do o=i.sibling,i.sibling=null,i=o;while(i!==null)}}function Ru(i){var o=i.deletions;if((i.flags&16)!==0){if(o!==null)for(var u=0;u<o.length;u++){var p=o[u];Jn=p,r1(p,i)}t1(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)n1(i),i=i.sibling}function n1(i){switch(i.tag){case 0:case 11:case 15:Ru(i),i.flags&2048&&Zs(9,i,i.return);break;case 3:Ru(i);break;case 12:Ru(i);break;case 22:var o=i.stateNode;i.memoizedState!==null&&o._visibility&2&&(i.return===null||i.return.tag!==13)?(o._visibility&=-3,rd(i)):Ru(i);break;default:Ru(i)}}function rd(i){var o=i.deletions;if((i.flags&16)!==0){if(o!==null)for(var u=0;u<o.length;u++){var p=o[u];Jn=p,r1(p,i)}t1(i)}for(i=i.child;i!==null;){switch(o=i,o.tag){case 0:case 11:case 15:Zs(8,o,o.return),rd(o);break;case 22:u=o.stateNode,u._visibility&2&&(u._visibility&=-3,rd(o));break;default:rd(o)}i=i.sibling}}function r1(i,o){for(;Jn!==null;){var u=Jn;switch(u.tag){case 0:case 11:case 15:Zs(8,u,o);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var p=u.memoizedState.cachePool.pool;p!=null&&p.refCount++}break;case 24:cu(u.memoizedState.cache)}if(p=u.child,p!==null)p.return=u,Jn=p;else e:for(u=i;Jn!==null;){p=Jn;var x=p.sibling,w=p.return;if(WS(p),p===u){Jn=null;break e}if(x!==null){x.return=w,Jn=x;break e}Jn=w}}}var DL={getCacheForType:function(i){var o=ir(qn),u=o.data.get(i);return u===void 0&&(u=i(),o.data.set(i,u)),u},cacheSignal:function(){return ir(qn).controller.signal}},LL=typeof WeakMap=="function"?WeakMap:Map,nn=0,bn=null,$t=null,Vt=0,ln=0,Kr=null,Qs=!1,Wa=!1,_g=!1,hs=0,In=0,Js=0,Yo=0,Ag=0,Yr=0,Ka=0,_u=null,Ir=null,Ng=!1,id=0,i1=0,sd=1/0,od=null,eo=null,Xn=0,to=null,Ya=null,ms=0,Og=0,Ig=null,s1=null,Au=0,Mg=null;function Xr(){return(nn&2)!==0&&Vt!==0?Vt&-Vt:H.T!==null?$g():dt()}function o1(){if(Yr===0)if((Vt&536870912)===0||Kt){var i=Lt;Lt<<=1,(Lt&3932160)===0&&(Lt=262144),Yr=i}else Yr=536870912;return i=Gr.current,i!==null&&(i.flags|=32),Yr}function Mr(i,o,u){(i===bn&&(ln===2||ln===9)||i.cancelPendingCommit!==null)&&(Xa(i,0),no(i,Vt,Yr,!1)),lt(i,u),((nn&2)===0||i!==bn)&&(i===bn&&((nn&2)===0&&(Yo|=u),In===4&&no(i,Vt,Yr,!1)),$i(i))}function a1(i,o,u){if((nn&6)!==0)throw Error(r(327));var p=!u&&(o&127)===0&&(o&i.expiredLanes)===0||me(i,o),x=p?PL(i,o):Lg(i,o,!0),w=p;do{if(x===0){Wa&&!p&&no(i,o,0,!1);break}else{if(u=i.current.alternate,w&&!jL(u)){x=Lg(i,o,!1),w=!1;continue}if(x===2){if(w=o,i.errorRecoveryDisabledLanes&w)var M=0;else M=i.pendingLanes&-536870913,M=M!==0?M:M&536870912?536870912:0;if(M!==0){o=M;e:{var G=i;x=_u;var J=G.current.memoizedState.isDehydrated;if(J&&(Xa(G,M).flags|=256),M=Lg(G,M,!1),M!==2){if(_g&&!J){G.errorRecoveryDisabledLanes|=w,Yo|=w,x=4;break e}w=Ir,Ir=x,w!==null&&(Ir===null?Ir=w:Ir.push.apply(Ir,w))}x=M}if(w=!1,x!==2)continue}}if(x===1){Xa(i,0),no(i,o,0,!0);break}e:{switch(p=i,w=x,w){case 0:case 1:throw Error(r(345));case 4:if((o&4194048)!==o)break;case 6:no(p,o,Yr,!Qs);break e;case 2:Ir=null;break;case 3:case 5:break;default:throw Error(r(329))}if((o&62914560)===o&&(x=id+300-ee(),10<x)){if(no(p,o,Yr,!Qs),X(p,0,!0)!==0)break e;ms=o,p.timeoutHandle=P1(l1.bind(null,p,u,Ir,od,Ng,o,Yr,Yo,Ka,Qs,w,"Throttled",-0,0),x);break e}l1(p,u,Ir,od,Ng,o,Yr,Yo,Ka,Qs,w,null,-0,0)}}break}while(!0);$i(i)}function l1(i,o,u,p,x,w,M,G,J,pe,Te,Oe,he,ve){if(i.timeoutHandle=-1,Oe=o.subtreeFlags,Oe&8192||(Oe&16785408)===16785408){Oe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ge},e1(o,w,Oe);var et=(w&62914560)===w?id-ee():(w&4194048)===w?i1-ee():0;if(et=xj(Oe,et),et!==null){ms=w,i.cancelPendingCommit=et(g1.bind(null,i,o,w,u,p,x,M,G,J,Te,Oe,null,he,ve)),no(i,w,M,!pe);return}}g1(i,o,w,u,p,x,M,G,J)}function jL(i){for(var o=i;;){var u=o.tag;if((u===0||u===11||u===15)&&o.flags&16384&&(u=o.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var p=0;p<u.length;p++){var x=u[p],w=x.getSnapshot;x=x.value;try{if(!Hr(w(),x))return!1}catch{return!1}}if(u=o.child,o.subtreeFlags&16384&&u!==null)u.return=o,o=u;else{if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function no(i,o,u,p){o&=~Ag,o&=~Yo,i.suspendedLanes|=o,i.pingedLanes&=~o,p&&(i.warmLanes|=o),p=i.expirationTimes;for(var x=o;0<x;){var w=31-nt(x),M=1<<w;p[w]=-1,x&=~M}u!==0&&qe(i,u,o)}function ad(){return(nn&6)===0?(Nu(0),!1):!0}function Dg(){if($t!==null){if(ln===0)var i=$t.return;else i=$t,is=Bo=null,Xm(i),Ba=null,du=0,i=$t;for(;i!==null;)$S(i.alternate,i),i=i.return;$t=null}}function Xa(i,o){var u=i.timeoutHandle;u!==-1&&(i.timeoutHandle=-1,nj(u)),u=i.cancelPendingCommit,u!==null&&(i.cancelPendingCommit=null,u()),ms=0,Dg(),bn=i,$t=u=ns(i.current,null),Vt=o,ln=0,Kr=null,Qs=!1,Wa=me(i,o),_g=!1,Ka=Yr=Ag=Yo=Js=In=0,Ir=_u=null,Ng=!1,(o&8)!==0&&(o|=o&32);var p=i.entangledLanes;if(p!==0)for(i=i.entanglements,p&=o;0<p;){var x=31-nt(p),w=1<<x;o|=i[x],p&=~w}return hs=o,_f(),u}function u1(i,o){Ot=null,H.H=xu,o===$a||o===jf?(o=Tk(),ln=3):o===Pm?(o=Tk(),ln=4):ln=o===dg?8:o!==null&&typeof o=="object"&&typeof o.then=="function"?6:1,Kr=o,$t===null&&(In=1,Xf(i,oi(o,i.current)))}function c1(){var i=Gr.current;return i===null?!0:(Vt&4194048)===Vt?ci===null:(Vt&62914560)===Vt||(Vt&536870912)!==0?i===ci:!1}function f1(){var i=H.H;return H.H=xu,i===null?xu:i}function d1(){var i=H.A;return H.A=DL,i}function ld(){In=4,Qs||(Vt&4194048)!==Vt&&Gr.current!==null||(Wa=!0),(Js&134217727)===0&&(Yo&134217727)===0||bn===null||no(bn,Vt,Yr,!1)}function Lg(i,o,u){var p=nn;nn|=2;var x=f1(),w=d1();(bn!==i||Vt!==o)&&(od=null,Xa(i,o)),o=!1;var M=In;e:do try{if(ln!==0&&$t!==null){var G=$t,J=Kr;switch(ln){case 8:Dg(),M=6;break e;case 3:case 2:case 9:case 6:Gr.current===null&&(o=!0);var pe=ln;if(ln=0,Kr=null,Za(i,G,J,pe),u&&Wa){M=0;break e}break;default:pe=ln,ln=0,Kr=null,Za(i,G,J,pe)}}zL(),M=In;break}catch(Te){u1(i,Te)}while(!0);return o&&i.shellSuspendCounter++,is=Bo=null,nn=p,H.H=x,H.A=w,$t===null&&(bn=null,Vt=0,_f()),M}function zL(){for(;$t!==null;)p1($t)}function PL(i,o){var u=nn;nn|=2;var p=f1(),x=d1();bn!==i||Vt!==o?(od=null,sd=ee()+500,Xa(i,o)):Wa=me(i,o);e:do try{if(ln!==0&&$t!==null){o=$t;var w=Kr;t:switch(ln){case 1:ln=0,Kr=null,Za(i,o,w,1);break;case 2:case 9:if(wk(w)){ln=0,Kr=null,h1(o);break}o=function(){ln!==2&&ln!==9||bn!==i||(ln=7),$i(i)},w.then(o,o);break e;case 3:ln=7;break e;case 4:ln=5;break e;case 7:wk(w)?(ln=0,Kr=null,h1(o)):(ln=0,Kr=null,Za(i,o,w,7));break;case 5:var M=null;switch($t.tag){case 26:M=$t.memoizedState;case 5:case 27:var G=$t;if(M?J1(M):G.stateNode.complete){ln=0,Kr=null;var J=G.sibling;if(J!==null)$t=J;else{var pe=G.return;pe!==null?($t=pe,ud(pe)):$t=null}break t}}ln=0,Kr=null,Za(i,o,w,5);break;case 6:ln=0,Kr=null,Za(i,o,w,6);break;case 8:Dg(),In=6;break e;default:throw Error(r(462))}}$L();break}catch(Te){u1(i,Te)}while(!0);return is=Bo=null,H.H=p,H.A=x,nn=u,$t!==null?0:(bn=null,Vt=0,_f(),In)}function $L(){for(;$t!==null&&!ye();)p1($t)}function p1(i){var o=zS(i.alternate,i,hs);i.memoizedProps=i.pendingProps,o===null?ud(i):$t=o}function h1(i){var o=i,u=o.alternate;switch(o.tag){case 15:case 0:o=OS(u,o,o.pendingProps,o.type,void 0,Vt);break;case 11:o=OS(u,o,o.pendingProps,o.type.render,o.ref,Vt);break;case 5:Xm(o);default:$S(u,o),o=$t=dk(o,hs),o=zS(u,o,hs)}i.memoizedProps=i.pendingProps,o===null?ud(i):$t=o}function Za(i,o,u,p){is=Bo=null,Xm(o),Ba=null,du=0;var x=o.return;try{if(RL(i,x,o,u,Vt)){In=1,Xf(i,oi(u,i.current)),$t=null;return}}catch(w){if(x!==null)throw $t=x,w;In=1,Xf(i,oi(u,i.current)),$t=null;return}o.flags&32768?(Kt||p===1?i=!0:Wa||(Vt&536870912)!==0?i=!1:(Qs=i=!0,(p===2||p===9||p===3||p===6)&&(p=Gr.current,p!==null&&p.tag===13&&(p.flags|=16384))),m1(o,i)):ud(o)}function ud(i){var o=i;do{if((o.flags&32768)!==0){m1(o,Qs);return}i=o.return;var u=NL(o.alternate,o,hs);if(u!==null){$t=u;return}if(o=o.sibling,o!==null){$t=o;return}$t=o=i}while(o!==null);In===0&&(In=5)}function m1(i,o){do{var u=OL(i.alternate,i);if(u!==null){u.flags&=32767,$t=u;return}if(u=i.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!o&&(i=i.sibling,i!==null)){$t=i;return}$t=i=u}while(i!==null);In=6,$t=null}function g1(i,o,u,p,x,w,M,G,J){i.cancelPendingCommit=null;do cd();while(Xn!==0);if((nn&6)!==0)throw Error(r(327));if(o!==null){if(o===i.current)throw Error(r(177));if(w=o.lanes|o.childLanes,w|=wm,He(i,u,w,M,G,J),i===bn&&($t=bn=null,Vt=0),Ya=o,to=i,ms=u,Og=w,Ig=x,s1=p,(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,qL(we,function(){return k1(),null})):(i.callbackNode=null,i.callbackPriority=0),p=(o.flags&13878)!==0,(o.subtreeFlags&13878)!==0||p){p=H.T,H.T=null,x=W.p,W.p=2,M=nn,nn|=4;try{IL(i,o,u)}finally{nn=M,W.p=x,H.T=p}}Xn=1,b1(),y1(),v1()}}function b1(){if(Xn===1){Xn=0;var i=to,o=Ya,u=(o.flags&13878)!==0;if((o.subtreeFlags&13878)!==0||u){u=H.T,H.T=null;var p=W.p;W.p=2;var x=nn;nn|=4;try{ZS(o,i);var w=Wg,M=rk(i.containerInfo),G=w.focusedElem,J=w.selectionRange;if(M!==G&&G&&G.ownerDocument&&nk(G.ownerDocument.documentElement,G)){if(J!==null&&ym(G)){var pe=J.start,Te=J.end;if(Te===void 0&&(Te=pe),"selectionStart"in G)G.selectionStart=pe,G.selectionEnd=Math.min(Te,G.value.length);else{var Oe=G.ownerDocument||document,he=Oe&&Oe.defaultView||window;if(he.getSelection){var ve=he.getSelection(),et=G.textContent.length,xt=Math.min(J.start,et),dn=J.end===void 0?xt:Math.min(J.end,et);!ve.extend&&xt>dn&&(M=dn,dn=xt,xt=M);var oe=tk(G,xt),se=tk(G,dn);if(oe&&se&&(ve.rangeCount!==1||ve.anchorNode!==oe.node||ve.anchorOffset!==oe.offset||ve.focusNode!==se.node||ve.focusOffset!==se.offset)){var de=Oe.createRange();de.setStart(oe.node,oe.offset),ve.removeAllRanges(),xt>dn?(ve.addRange(de),ve.extend(se.node,se.offset)):(de.setEnd(se.node,se.offset),ve.addRange(de))}}}}for(Oe=[],ve=G;ve=ve.parentNode;)ve.nodeType===1&&Oe.push({element:ve,left:ve.scrollLeft,top:ve.scrollTop});for(typeof G.focus=="function"&&G.focus(),G=0;G<Oe.length;G++){var Re=Oe[G];Re.element.scrollLeft=Re.left,Re.element.scrollTop=Re.top}}Sd=!!Gg,Wg=Gg=null}finally{nn=x,W.p=p,H.T=u}}i.current=o,Xn=2}}function y1(){if(Xn===2){Xn=0;var i=to,o=Ya,u=(o.flags&8772)!==0;if((o.subtreeFlags&8772)!==0||u){u=H.T,H.T=null;var p=W.p;W.p=2;var x=nn;nn|=4;try{GS(i,o.alternate,o)}finally{nn=x,W.p=p,H.T=u}}Xn=3}}function v1(){if(Xn===4||Xn===3){Xn=0,_e();var i=to,o=Ya,u=ms,p=s1;(o.subtreeFlags&10256)!==0||(o.flags&10256)!==0?Xn=5:(Xn=0,Ya=to=null,x1(i,i.pendingLanes));var x=i.pendingLanes;if(x===0&&(eo=null),We(u),o=o.stateNode,vt&&typeof vt.onCommitFiberRoot=="function")try{vt.onCommitFiberRoot(Je,o,void 0,(o.current.flags&128)===128)}catch{}if(p!==null){o=H.T,x=W.p,W.p=2,H.T=null;try{for(var w=i.onRecoverableError,M=0;M<p.length;M++){var G=p[M];w(G.value,{componentStack:G.stack})}}finally{H.T=o,W.p=x}}(ms&3)!==0&&cd(),$i(i),x=i.pendingLanes,(u&261930)!==0&&(x&42)!==0?i===Mg?Au++:(Au=0,Mg=i):Au=0,Nu(0)}}function x1(i,o){(i.pooledCacheLanes&=o)===0&&(o=i.pooledCache,o!=null&&(i.pooledCache=null,cu(o)))}function cd(){return b1(),y1(),v1(),k1()}function k1(){if(Xn!==5)return!1;var i=to,o=Og;Og=0;var u=We(ms),p=H.T,x=W.p;try{W.p=32>u?32:u,H.T=null,u=Ig,Ig=null;var w=to,M=ms;if(Xn=0,Ya=to=null,ms=0,(nn&6)!==0)throw Error(r(331));var G=nn;if(nn|=4,n1(w.current),JS(w,w.current,M,u),nn=G,Nu(0,!1),vt&&typeof vt.onPostCommitFiberRoot=="function")try{vt.onPostCommitFiberRoot(Je,w)}catch{}return!0}finally{W.p=x,H.T=p,x1(i,o)}}function S1(i,o,u){o=oi(u,o),o=fg(i.stateNode,o,2),i=Ks(i,o,2),i!==null&&(lt(i,2),$i(i))}function un(i,o,u){if(i.tag===3)S1(i,i,u);else for(;o!==null;){if(o.tag===3){S1(o,i,u);break}else if(o.tag===1){var p=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(eo===null||!eo.has(p))){i=oi(u,i),u=wS(2),p=Ks(o,u,2),p!==null&&(ES(u,p,o,i),lt(p,2),$i(p));break}}o=o.return}}function jg(i,o,u){var p=i.pingCache;if(p===null){p=i.pingCache=new LL;var x=new Set;p.set(o,x)}else x=p.get(o),x===void 0&&(x=new Set,p.set(o,x));x.has(u)||(_g=!0,x.add(u),i=BL.bind(null,i,o,u),o.then(i,i))}function BL(i,o,u){var p=i.pingCache;p!==null&&p.delete(o),i.pingedLanes|=i.suspendedLanes&u,i.warmLanes&=~u,bn===i&&(Vt&u)===u&&(In===4||In===3&&(Vt&62914560)===Vt&&300>ee()-id?(nn&2)===0&&Xa(i,0):Ag|=u,Ka===Vt&&(Ka=0)),$i(i)}function w1(i,o){o===0&&(o=Xe()),i=zo(i,o),i!==null&&(lt(i,o),$i(i))}function FL(i){var o=i.memoizedState,u=0;o!==null&&(u=o.retryLane),w1(i,u)}function UL(i,o){var u=0;switch(i.tag){case 31:case 13:var p=i.stateNode,x=i.memoizedState;x!==null&&(u=x.retryLane);break;case 19:p=i.stateNode;break;case 22:p=i.stateNode._retryCache;break;default:throw Error(r(314))}p!==null&&p.delete(o),w1(i,u)}function qL(i,o){return ze(i,o)}var fd=null,Qa=null,zg=!1,dd=!1,Pg=!1,ro=0;function $i(i){i!==Qa&&i.next===null&&(Qa===null?fd=Qa=i:Qa=Qa.next=i),dd=!0,zg||(zg=!0,VL())}function Nu(i,o){if(!Pg&&dd){Pg=!0;do for(var u=!1,p=fd;p!==null;){if(i!==0){var x=p.pendingLanes;if(x===0)var w=0;else{var M=p.suspendedLanes,G=p.pingedLanes;w=(1<<31-nt(42|i)+1)-1,w&=x&~(M&~G),w=w&201326741?w&201326741|1:w?w|2:0}w!==0&&(u=!0,R1(p,w))}else w=Vt,w=X(p,p===bn?w:0,p.cancelPendingCommit!==null||p.timeoutHandle!==-1),(w&3)===0||me(p,w)||(u=!0,R1(p,w));p=p.next}while(u);Pg=!1}}function HL(){E1()}function E1(){dd=zg=!1;var i=0;ro!==0&&tj()&&(i=ro);for(var o=ee(),u=null,p=fd;p!==null;){var x=p.next,w=T1(p,o);w===0?(p.next=null,u===null?fd=x:u.next=x,x===null&&(Qa=u)):(u=p,(i!==0||(w&3)!==0)&&(dd=!0)),p=x}Xn!==0&&Xn!==5||Nu(i),ro!==0&&(ro=0)}function T1(i,o){for(var u=i.suspendedLanes,p=i.pingedLanes,x=i.expirationTimes,w=i.pendingLanes&-62914561;0<w;){var M=31-nt(w),G=1<<M,J=x[M];J===-1?((G&u)===0||(G&p)!==0)&&(x[M]=Le(G,o)):J<=o&&(i.expiredLanes|=G),w&=~G}if(o=bn,u=Vt,u=X(i,i===o?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),p=i.callbackNode,u===0||i===o&&(ln===2||ln===9)||i.cancelPendingCommit!==null)return p!==null&&p!==null&&Fe(p),i.callbackNode=null,i.callbackPriority=0;if((u&3)===0||me(i,u)){if(o=u&-u,o===i.callbackPriority)return o;switch(p!==null&&Fe(p),We(u)){case 2:case 8:u=ne;break;case 32:u=we;break;case 268435456:u=Ye;break;default:u=we}return p=C1.bind(null,i),u=ze(u,p),i.callbackPriority=o,i.callbackNode=u,o}return p!==null&&p!==null&&Fe(p),i.callbackPriority=2,i.callbackNode=null,2}function C1(i,o){if(Xn!==0&&Xn!==5)return i.callbackNode=null,i.callbackPriority=0,null;var u=i.callbackNode;if(cd()&&i.callbackNode!==u)return null;var p=Vt;return p=X(i,i===bn?p:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),p===0?null:(a1(i,p,o),T1(i,ee()),i.callbackNode!=null&&i.callbackNode===u?C1.bind(null,i):null)}function R1(i,o){if(cd())return null;a1(i,o,!0)}function VL(){rj(function(){(nn&6)!==0?ze(Q,HL):E1()})}function $g(){if(ro===0){var i=za;i===0&&(i=ft,ft<<=1,(ft&261888)===0&&(ft=256)),ro=i}return ro}function _1(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:Bs(""+i)}function A1(i,o){var u=o.ownerDocument.createElement("input");return u.name=o.name,u.value=o.value,i.id&&u.setAttribute("form",i.id),o.parentNode.insertBefore(u,o),i=new FormData(i),u.parentNode.removeChild(u),i}function GL(i,o,u,p,x){if(o==="submit"&&u&&u.stateNode===x){var w=_1((x[Qt]||null).action),M=p.submitter;M&&(o=(o=M[Qt]||null)?_1(o.formAction):M.getAttribute("formAction"),o!==null&&(w=o,M=null));var G=new Ef("action","action",null,p,x);i.push({event:G,listeners:[{instance:null,listener:function(){if(p.defaultPrevented){if(ro!==0){var J=M?A1(x,M):new FormData(x);sg(u,{pending:!0,data:J,method:x.method,action:w},null,J)}}else typeof w=="function"&&(G.preventDefault(),J=M?A1(x,M):new FormData(x),sg(u,{pending:!0,data:J,method:x.method,action:w},w,J))},currentTarget:x}]})}}for(var Bg=0;Bg<Sm.length;Bg++){var Fg=Sm[Bg],WL=Fg.toLowerCase(),KL=Fg[0].toUpperCase()+Fg.slice(1);ki(WL,"on"+KL)}ki(ok,"onAnimationEnd"),ki(ak,"onAnimationIteration"),ki(lk,"onAnimationStart"),ki("dblclick","onDoubleClick"),ki("focusin","onFocus"),ki("focusout","onBlur"),ki(cL,"onTransitionRun"),ki(fL,"onTransitionStart"),ki(dL,"onTransitionCancel"),ki(uk,"onTransitionEnd"),$e("onMouseEnter",["mouseout","mouseover"]),$e("onMouseLeave",["mouseout","mouseover"]),$e("onPointerEnter",["pointerout","pointerover"]),$e("onPointerLeave",["pointerout","pointerover"]),Ji("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ji("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ji("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ji("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ji("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ji("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ou="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(" "),YL=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ou));function N1(i,o){o=(o&4)!==0;for(var u=0;u<i.length;u++){var p=i[u],x=p.event;p=p.listeners;e:{var w=void 0;if(o)for(var M=p.length-1;0<=M;M--){var G=p[M],J=G.instance,pe=G.currentTarget;if(G=G.listener,J!==w&&x.isPropagationStopped())break e;w=G,x.currentTarget=pe;try{w(x)}catch(Te){Rf(Te)}x.currentTarget=null,w=J}else for(M=0;M<p.length;M++){if(G=p[M],J=G.instance,pe=G.currentTarget,G=G.listener,J!==w&&x.isPropagationStopped())break e;w=G,x.currentTarget=pe;try{w(x)}catch(Te){Rf(Te)}x.currentTarget=null,w=J}}}}function Bt(i,o){var u=o[Rn];u===void 0&&(u=o[Rn]=new Set);var p=i+"__bubble";u.has(p)||(O1(o,i,2,!1),u.add(p))}function Ug(i,o,u){var p=0;o&&(p|=4),O1(u,i,p,o)}var pd="_reactListening"+Math.random().toString(36).slice(2);function qg(i){if(!i[pd]){i[pd]=!0,gf.forEach(function(u){u!=="selectionchange"&&(YL.has(u)||Ug(u,!1,i),Ug(u,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[pd]||(o[pd]=!0,Ug("selectionchange",!1,o))}}function O1(i,o,u,p){switch(ow(o)){case 2:var x=wj;break;case 8:x=Ej;break;default:x=ib}u=x.bind(null,o,u,i),x=void 0,!um||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(x=!0),p?x!==void 0?i.addEventListener(o,u,{capture:!0,passive:x}):i.addEventListener(o,u,!0):x!==void 0?i.addEventListener(o,u,{passive:x}):i.addEventListener(o,u,!1)}function Hg(i,o,u,p,x){var w=p;if((o&1)===0&&(o&2)===0&&p!==null)e:for(;;){if(p===null)return;var M=p.tag;if(M===3||M===4){var G=p.stateNode.containerInfo;if(G===x)break;if(M===4)for(M=p.return;M!==null;){var J=M.tag;if((J===3||J===4)&&M.stateNode.containerInfo===x)return;M=M.return}for(;G!==null;){if(M=tr(G),M===null)return;if(J=M.tag,J===5||J===6||J===26||J===27){p=w=M;continue e}G=G.parentNode}}p=p.return}xf(function(){var pe=w,Te=Nt(u),Oe=[];e:{var he=ck.get(i);if(he!==void 0){var ve=Ef,et=i;switch(i){case"keypress":if(Sf(u)===0)break e;case"keydown":case"keyup":ve=U2;break;case"focusin":et="focus",ve=pm;break;case"focusout":et="blur",ve=pm;break;case"beforeblur":case"afterblur":ve=pm;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ve=$0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ve=N2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ve=V2;break;case ok:case ak:case lk:ve=M2;break;case uk:ve=W2;break;case"scroll":case"scrollend":ve=_2;break;case"wheel":ve=Y2;break;case"copy":case"cut":case"paste":ve=L2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ve=F0;break;case"toggle":case"beforetoggle":ve=Z2}var xt=(o&4)!==0,dn=!xt&&(i==="scroll"||i==="scrollend"),oe=xt?he!==null?he+"Capture":null:he;xt=[];for(var se=pe,de;se!==null;){var Re=se;if(de=Re.stateNode,Re=Re.tag,Re!==5&&Re!==26&&Re!==27||de===null||oe===null||(Re=Jl(se,oe),Re!=null&&xt.push(Iu(se,Re,de))),dn)break;se=se.return}0<xt.length&&(he=new ve(he,et,null,u,Te),Oe.push({event:he,listeners:xt}))}}if((o&7)===0){e:{if(he=i==="mouseover"||i==="pointerover",ve=i==="mouseout"||i==="pointerout",he&&u!==st&&(et=u.relatedTarget||u.fromElement)&&(tr(et)||et[rn]))break e;if((ve||he)&&(he=Te.window===Te?Te:(he=Te.ownerDocument)?he.defaultView||he.parentWindow:window,ve?(et=u.relatedTarget||u.toElement,ve=pe,et=et?tr(et):null,et!==null&&(dn=a(et),xt=et.tag,et!==dn||xt!==5&&xt!==27&&xt!==6)&&(et=null)):(ve=null,et=pe),ve!==et)){if(xt=$0,Re="onMouseLeave",oe="onMouseEnter",se="mouse",(i==="pointerout"||i==="pointerover")&&(xt=F0,Re="onPointerLeave",oe="onPointerEnter",se="pointer"),dn=ve==null?he:zs(ve),de=et==null?he:zs(et),he=new xt(Re,se+"leave",ve,u,Te),he.target=dn,he.relatedTarget=de,Re=null,tr(Te)===pe&&(xt=new xt(oe,se+"enter",et,u,Te),xt.target=de,xt.relatedTarget=dn,Re=xt),dn=Re,ve&&et)t:{for(xt=XL,oe=ve,se=et,de=0,Re=oe;Re;Re=xt(Re))de++;Re=0;for(var ut=se;ut;ut=xt(ut))Re++;for(;0<de-Re;)oe=xt(oe),de--;for(;0<Re-de;)se=xt(se),Re--;for(;de--;){if(oe===se||se!==null&&oe===se.alternate){xt=oe;break t}oe=xt(oe),se=xt(se)}xt=null}else xt=null;ve!==null&&I1(Oe,he,ve,xt,!1),et!==null&&dn!==null&&I1(Oe,dn,et,xt,!0)}}e:{if(he=pe?zs(pe):window,ve=he.nodeName&&he.nodeName.toLowerCase(),ve==="select"||ve==="input"&&he.type==="file")var Jt=Y0;else if(W0(he))if(X0)Jt=aL;else{Jt=sL;var ot=iL}else ve=he.nodeName,!ve||ve.toLowerCase()!=="input"||he.type!=="checkbox"&&he.type!=="radio"?pe&&$s(pe.elementType)&&(Jt=Y0):Jt=oL;if(Jt&&(Jt=Jt(i,pe))){K0(Oe,Jt,u,Te);break e}ot&&ot(i,he,pe),i==="focusout"&&pe&&he.type==="number"&&pe.memoizedProps.value!=null&&Ca(he,"number",he.value)}switch(ot=pe?zs(pe):window,i){case"focusin":(W0(ot)||ot.contentEditable==="true")&&(Aa=ot,vm=pe,au=null);break;case"focusout":au=vm=Aa=null;break;case"mousedown":xm=!0;break;case"contextmenu":case"mouseup":case"dragend":xm=!1,ik(Oe,u,Te);break;case"selectionchange":if(uL)break;case"keydown":case"keyup":ik(Oe,u,Te)}var It;if(mm)e:{switch(i){case"compositionstart":var Gt="onCompositionStart";break e;case"compositionend":Gt="onCompositionEnd";break e;case"compositionupdate":Gt="onCompositionUpdate";break e}Gt=void 0}else _a?V0(i,u)&&(Gt="onCompositionEnd"):i==="keydown"&&u.keyCode===229&&(Gt="onCompositionStart");Gt&&(U0&&u.locale!=="ko"&&(_a||Gt!=="onCompositionStart"?Gt==="onCompositionEnd"&&_a&&(It=z0()):(Fs=Te,cm="value"in Fs?Fs.value:Fs.textContent,_a=!0)),ot=hd(pe,Gt),0<ot.length&&(Gt=new B0(Gt,i,null,u,Te),Oe.push({event:Gt,listeners:ot}),It?Gt.data=It:(It=G0(u),It!==null&&(Gt.data=It)))),(It=J2?eL(i,u):tL(i,u))&&(Gt=hd(pe,"onBeforeInput"),0<Gt.length&&(ot=new B0("onBeforeInput","beforeinput",null,u,Te),Oe.push({event:ot,listeners:Gt}),ot.data=It)),GL(Oe,i,pe,u,Te)}N1(Oe,o)})}function Iu(i,o,u){return{instance:i,listener:o,currentTarget:u}}function hd(i,o){for(var u=o+"Capture",p=[];i!==null;){var x=i,w=x.stateNode;if(x=x.tag,x!==5&&x!==26&&x!==27||w===null||(x=Jl(i,u),x!=null&&p.unshift(Iu(i,x,w)),x=Jl(i,o),x!=null&&p.push(Iu(i,x,w))),i.tag===3)return p;i=i.return}return[]}function XL(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function I1(i,o,u,p,x){for(var w=o._reactName,M=[];u!==null&&u!==p;){var G=u,J=G.alternate,pe=G.stateNode;if(G=G.tag,J!==null&&J===p)break;G!==5&&G!==26&&G!==27||pe===null||(J=pe,x?(pe=Jl(u,w),pe!=null&&M.unshift(Iu(u,pe,J))):x||(pe=Jl(u,w),pe!=null&&M.push(Iu(u,pe,J)))),u=u.return}M.length!==0&&i.push({event:o,listeners:M})}var ZL=/\r\n?/g,QL=/\u0000|\uFFFD/g;function M1(i){return(typeof i=="string"?i:""+i).replace(ZL,`
9
+ `).replace(QL,"")}function D1(i,o){return o=M1(o),M1(i)===o}function fn(i,o,u,p,x,w){switch(u){case"children":typeof p=="string"?o==="body"||o==="textarea"&&p===""||St(i,p):(typeof p=="number"||typeof p=="bigint")&&o!=="body"&&St(i,""+p);break;case"className":Ur(i,"class",p);break;case"tabIndex":Ur(i,"tabindex",p);break;case"dir":case"role":case"viewBox":case"width":case"height":Ur(i,u,p);break;case"style":an(i,p,w);break;case"data":if(o!=="object"){Ur(i,"data",p);break}case"src":case"href":if(p===""&&(o!=="a"||u!=="href")){i.removeAttribute(u);break}if(p==null||typeof p=="function"||typeof p=="symbol"||typeof p=="boolean"){i.removeAttribute(u);break}p=Bs(""+p),i.setAttribute(u,p);break;case"action":case"formAction":if(typeof p=="function"){i.setAttribute(u,"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 w=="function"&&(u==="formAction"?(o!=="input"&&fn(i,o,"name",x.name,x,null),fn(i,o,"formEncType",x.formEncType,x,null),fn(i,o,"formMethod",x.formMethod,x,null),fn(i,o,"formTarget",x.formTarget,x,null)):(fn(i,o,"encType",x.encType,x,null),fn(i,o,"method",x.method,x,null),fn(i,o,"target",x.target,x,null)));if(p==null||typeof p=="symbol"||typeof p=="boolean"){i.removeAttribute(u);break}p=Bs(""+p),i.setAttribute(u,p);break;case"onClick":p!=null&&(i.onclick=Ge);break;case"onScroll":p!=null&&Bt("scroll",i);break;case"onScrollEnd":p!=null&&Bt("scrollend",i);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(u=p.__html,u!=null){if(x.children!=null)throw Error(r(60));i.innerHTML=u}}break;case"multiple":i.multiple=p&&typeof p!="function"&&typeof p!="symbol";break;case"muted":i.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"){i.removeAttribute("xlink:href");break}u=Bs(""+p),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);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"?i.setAttribute(u,""+p):i.removeAttribute(u);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":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"?i.setAttribute(u,""):i.removeAttribute(u);break;case"capture":case"download":p===!0?i.setAttribute(u,""):p!==!1&&p!=null&&typeof p!="function"&&typeof p!="symbol"?i.setAttribute(u,p):i.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":p!=null&&typeof p!="function"&&typeof p!="symbol"&&!isNaN(p)&&1<=p?i.setAttribute(u,p):i.removeAttribute(u);break;case"rowSpan":case"start":p==null||typeof p=="function"||typeof p=="symbol"||isNaN(p)?i.removeAttribute(u):i.setAttribute(u,p);break;case"popover":Bt("beforetoggle",i),Bt("toggle",i),ur(i,"popover",p);break;case"xlinkActuate":Cr(i,"http://www.w3.org/1999/xlink","xlink:actuate",p);break;case"xlinkArcrole":Cr(i,"http://www.w3.org/1999/xlink","xlink:arcrole",p);break;case"xlinkRole":Cr(i,"http://www.w3.org/1999/xlink","xlink:role",p);break;case"xlinkShow":Cr(i,"http://www.w3.org/1999/xlink","xlink:show",p);break;case"xlinkTitle":Cr(i,"http://www.w3.org/1999/xlink","xlink:title",p);break;case"xlinkType":Cr(i,"http://www.w3.org/1999/xlink","xlink:type",p);break;case"xmlBase":Cr(i,"http://www.w3.org/XML/1998/namespace","xml:base",p);break;case"xmlLang":Cr(i,"http://www.w3.org/XML/1998/namespace","xml:lang",p);break;case"xmlSpace":Cr(i,"http://www.w3.org/XML/1998/namespace","xml:space",p);break;case"is":ur(i,"is",p);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=es.get(u)||u,ur(i,u,p))}}function Vg(i,o,u,p,x,w){switch(u){case"style":an(i,p,w);break;case"dangerouslySetInnerHTML":if(p!=null){if(typeof p!="object"||!("__html"in p))throw Error(r(61));if(u=p.__html,u!=null){if(x.children!=null)throw Error(r(60));i.innerHTML=u}}break;case"children":typeof p=="string"?St(i,p):(typeof p=="number"||typeof p=="bigint")&&St(i,""+p);break;case"onScroll":p!=null&&Bt("scroll",i);break;case"onScrollEnd":p!=null&&Bt("scrollend",i);break;case"onClick":p!=null&&(i.onclick=Ge);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Io.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(x=u.endsWith("Capture"),o=u.slice(2,x?u.length-7:void 0),w=i[Qt]||null,w=w!=null?w[u]:null,typeof w=="function"&&i.removeEventListener(o,w,x),typeof p=="function")){typeof w!="function"&&w!==null&&(u in i?i[u]=null:i.hasAttribute(u)&&i.removeAttribute(u)),i.addEventListener(o,p,x);break e}u in i?i[u]=p:p===!0?i.setAttribute(u,""):ur(i,u,p)}}}function or(i,o,u){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Bt("error",i),Bt("load",i);var p=!1,x=!1,w;for(w in u)if(u.hasOwnProperty(w)){var M=u[w];if(M!=null)switch(w){case"src":p=!0;break;case"srcSet":x=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:fn(i,o,w,M,u,null)}}x&&fn(i,o,"srcSet",u.srcSet,u,null),p&&fn(i,o,"src",u.src,u,null);return;case"input":Bt("invalid",i);var G=w=M=x=null,J=null,pe=null;for(p in u)if(u.hasOwnProperty(p)){var Te=u[p];if(Te!=null)switch(p){case"name":x=Te;break;case"type":M=Te;break;case"checked":J=Te;break;case"defaultChecked":pe=Te;break;case"value":w=Te;break;case"defaultValue":G=Te;break;case"children":case"dangerouslySetInnerHTML":if(Te!=null)throw Error(r(137,o));break;default:fn(i,o,p,Te,u,null)}}Mo(i,w,G,J,pe,M,x,!1);return;case"select":Bt("invalid",i),p=M=w=null;for(x in u)if(u.hasOwnProperty(x)&&(G=u[x],G!=null))switch(x){case"value":w=G;break;case"defaultValue":M=G;break;case"multiple":p=G;default:fn(i,o,x,G,u,null)}o=w,u=M,i.multiple=!!p,o!=null?nr(i,!!p,o,!1):u!=null&&nr(i,!!p,u,!0);return;case"textarea":Bt("invalid",i),w=x=p=null;for(M in u)if(u.hasOwnProperty(M)&&(G=u[M],G!=null))switch(M){case"value":p=G;break;case"defaultValue":x=G;break;case"children":w=G;break;case"dangerouslySetInnerHTML":if(G!=null)throw Error(r(91));break;default:fn(i,o,M,G,u,null)}Ra(i,p,x,w);return;case"option":for(J in u)u.hasOwnProperty(J)&&(p=u[J],p!=null)&&(J==="selected"?i.selected=p&&typeof p!="function"&&typeof p!="symbol":fn(i,o,J,p,u,null));return;case"dialog":Bt("beforetoggle",i),Bt("toggle",i),Bt("cancel",i),Bt("close",i);break;case"iframe":case"object":Bt("load",i);break;case"video":case"audio":for(p=0;p<Ou.length;p++)Bt(Ou[p],i);break;case"image":Bt("error",i),Bt("load",i);break;case"details":Bt("toggle",i);break;case"embed":case"source":case"link":Bt("error",i),Bt("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(pe in u)if(u.hasOwnProperty(pe)&&(p=u[pe],p!=null))switch(pe){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,o));default:fn(i,o,pe,p,u,null)}return;default:if($s(o)){for(Te in u)u.hasOwnProperty(Te)&&(p=u[Te],p!==void 0&&Vg(i,o,Te,p,u,void 0));return}}for(G in u)u.hasOwnProperty(G)&&(p=u[G],p!=null&&fn(i,o,G,p,u,null))}function JL(i,o,u,p){switch(o){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var x=null,w=null,M=null,G=null,J=null,pe=null,Te=null;for(ve in u){var Oe=u[ve];if(u.hasOwnProperty(ve)&&Oe!=null)switch(ve){case"checked":break;case"value":break;case"defaultValue":J=Oe;default:p.hasOwnProperty(ve)||fn(i,o,ve,null,p,Oe)}}for(var he in p){var ve=p[he];if(Oe=u[he],p.hasOwnProperty(he)&&(ve!=null||Oe!=null))switch(he){case"type":w=ve;break;case"name":x=ve;break;case"checked":pe=ve;break;case"defaultChecked":Te=ve;break;case"value":M=ve;break;case"defaultValue":G=ve;break;case"children":case"dangerouslySetInnerHTML":if(ve!=null)throw Error(r(137,o));break;default:ve!==Oe&&fn(i,o,he,ve,p,Oe)}}Xl(i,M,G,J,pe,Te,w,x);return;case"select":ve=M=G=he=null;for(w in u)if(J=u[w],u.hasOwnProperty(w)&&J!=null)switch(w){case"value":break;case"multiple":ve=J;default:p.hasOwnProperty(w)||fn(i,o,w,null,p,J)}for(x in p)if(w=p[x],J=u[x],p.hasOwnProperty(x)&&(w!=null||J!=null))switch(x){case"value":he=w;break;case"defaultValue":G=w;break;case"multiple":M=w;default:w!==J&&fn(i,o,x,w,p,J)}o=G,u=M,p=ve,he!=null?nr(i,!!u,he,!1):!!p!=!!u&&(o!=null?nr(i,!!u,o,!0):nr(i,!!u,u?[]:"",!1));return;case"textarea":ve=he=null;for(G in u)if(x=u[G],u.hasOwnProperty(G)&&x!=null&&!p.hasOwnProperty(G))switch(G){case"value":break;case"children":break;default:fn(i,o,G,null,p,x)}for(M in p)if(x=p[M],w=u[M],p.hasOwnProperty(M)&&(x!=null||w!=null))switch(M){case"value":he=x;break;case"defaultValue":ve=x;break;case"children":break;case"dangerouslySetInnerHTML":if(x!=null)throw Error(r(91));break;default:x!==w&&fn(i,o,M,x,p,w)}yf(i,he,ve);return;case"option":for(var et in u)he=u[et],u.hasOwnProperty(et)&&he!=null&&!p.hasOwnProperty(et)&&(et==="selected"?i.selected=!1:fn(i,o,et,null,p,he));for(J in p)he=p[J],ve=u[J],p.hasOwnProperty(J)&&he!==ve&&(he!=null||ve!=null)&&(J==="selected"?i.selected=he&&typeof he!="function"&&typeof he!="symbol":fn(i,o,J,he,p,ve));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 xt in u)he=u[xt],u.hasOwnProperty(xt)&&he!=null&&!p.hasOwnProperty(xt)&&fn(i,o,xt,null,p,he);for(pe in p)if(he=p[pe],ve=u[pe],p.hasOwnProperty(pe)&&he!==ve&&(he!=null||ve!=null))switch(pe){case"children":case"dangerouslySetInnerHTML":if(he!=null)throw Error(r(137,o));break;default:fn(i,o,pe,he,p,ve)}return;default:if($s(o)){for(var dn in u)he=u[dn],u.hasOwnProperty(dn)&&he!==void 0&&!p.hasOwnProperty(dn)&&Vg(i,o,dn,void 0,p,he);for(Te in p)he=p[Te],ve=u[Te],!p.hasOwnProperty(Te)||he===ve||he===void 0&&ve===void 0||Vg(i,o,Te,he,p,ve);return}}for(var oe in u)he=u[oe],u.hasOwnProperty(oe)&&he!=null&&!p.hasOwnProperty(oe)&&fn(i,o,oe,null,p,he);for(Oe in p)he=p[Oe],ve=u[Oe],!p.hasOwnProperty(Oe)||he===ve||he==null&&ve==null||fn(i,o,Oe,he,p,ve)}function L1(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function ej(){if(typeof performance.getEntriesByType=="function"){for(var i=0,o=0,u=performance.getEntriesByType("resource"),p=0;p<u.length;p++){var x=u[p],w=x.transferSize,M=x.initiatorType,G=x.duration;if(w&&G&&L1(M)){for(M=0,G=x.responseEnd,p+=1;p<u.length;p++){var J=u[p],pe=J.startTime;if(pe>G)break;var Te=J.transferSize,Oe=J.initiatorType;Te&&L1(Oe)&&(J=J.responseEnd,M+=Te*(J<G?1:(G-pe)/(J-pe)))}if(--p,o+=8*(w+M)/(x.duration/1e3),i++,10<i)break}}if(0<i)return o/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var Gg=null,Wg=null;function md(i){return i.nodeType===9?i:i.ownerDocument}function j1(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function z1(i,o){if(i===0)switch(o){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&o==="foreignObject"?0:i}function Kg(i,o){return i==="textarea"||i==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.children=="bigint"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var Yg=null;function tj(){var i=window.event;return i&&i.type==="popstate"?i===Yg?!1:(Yg=i,!0):(Yg=null,!1)}var P1=typeof setTimeout=="function"?setTimeout:void 0,nj=typeof clearTimeout=="function"?clearTimeout:void 0,$1=typeof Promise=="function"?Promise:void 0,rj=typeof queueMicrotask=="function"?queueMicrotask:typeof $1<"u"?function(i){return $1.resolve(null).then(i).catch(ij)}:P1;function ij(i){setTimeout(function(){throw i})}function io(i){return i==="head"}function B1(i,o){var u=o,p=0;do{var x=u.nextSibling;if(i.removeChild(u),x&&x.nodeType===8)if(u=x.data,u==="/$"||u==="/&"){if(p===0){i.removeChild(x),nl(o);return}p--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")p++;else if(u==="html")Mu(i.ownerDocument.documentElement);else if(u==="head"){u=i.ownerDocument.head,Mu(u);for(var w=u.firstChild;w;){var M=w.nextSibling,G=w.nodeName;w[ri]||G==="SCRIPT"||G==="STYLE"||G==="LINK"&&w.rel.toLowerCase()==="stylesheet"||u.removeChild(w),w=M}}else u==="body"&&Mu(i.ownerDocument.body);u=x}while(u);nl(o)}function F1(i,o){var u=i;i=0;do{var p=u.nextSibling;if(u.nodeType===1?o?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(o?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),p&&p.nodeType===8)if(u=p.data,u==="/$"){if(i===0)break;i--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||i++;u=p}while(u)}function Xg(i){var o=i.firstChild;for(o&&o.nodeType===10&&(o=o.nextSibling);o;){var u=o;switch(o=o.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":Xg(u),Fr(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}i.removeChild(u)}}function sj(i,o,u,p){for(;i.nodeType===1;){var x=u;if(i.nodeName.toLowerCase()!==o.toLowerCase()){if(!p&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(p){if(!i[ri])switch(o){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(w=i.getAttribute("rel"),w==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(w!==x.rel||i.getAttribute("href")!==(x.href==null||x.href===""?null:x.href)||i.getAttribute("crossorigin")!==(x.crossOrigin==null?null:x.crossOrigin)||i.getAttribute("title")!==(x.title==null?null:x.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(w=i.getAttribute("src"),(w!==(x.src==null?null:x.src)||i.getAttribute("type")!==(x.type==null?null:x.type)||i.getAttribute("crossorigin")!==(x.crossOrigin==null?null:x.crossOrigin))&&w&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(o==="input"&&i.type==="hidden"){var w=x.name==null?null:""+x.name;if(x.type==="hidden"&&i.getAttribute("name")===w)return i}else return i;if(i=fi(i.nextSibling),i===null)break}return null}function oj(i,o,u){if(o==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!u||(i=fi(i.nextSibling),i===null))return null;return i}function U1(i,o){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!o||(i=fi(i.nextSibling),i===null))return null;return i}function Zg(i){return i.data==="$?"||i.data==="$~"}function Qg(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function aj(i,o){var u=i.ownerDocument;if(i.data==="$~")i._reactRetry=o;else if(i.data!=="$?"||u.readyState!=="loading")o();else{var p=function(){o(),u.removeEventListener("DOMContentLoaded",p)};u.addEventListener("DOMContentLoaded",p),i._reactRetry=p}}function fi(i){for(;i!=null;i=i.nextSibling){var o=i.nodeType;if(o===1||o===3)break;if(o===8){if(o=i.data,o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"||o==="F!"||o==="F")break;if(o==="/$"||o==="/&")return null}}return i}var Jg=null;function q1(i){i=i.nextSibling;for(var o=0;i;){if(i.nodeType===8){var u=i.data;if(u==="/$"||u==="/&"){if(o===0)return fi(i.nextSibling);o--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||o++}i=i.nextSibling}return null}function H1(i){i=i.previousSibling;for(var o=0;i;){if(i.nodeType===8){var u=i.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(o===0)return i;o--}else u!=="/$"&&u!=="/&"||o++}i=i.previousSibling}return null}function V1(i,o,u){switch(o=md(u),i){case"html":if(i=o.documentElement,!i)throw Error(r(452));return i;case"head":if(i=o.head,!i)throw Error(r(453));return i;case"body":if(i=o.body,!i)throw Error(r(454));return i;default:throw Error(r(451))}}function Mu(i){for(var o=i.attributes;o.length;)i.removeAttributeNode(o[0]);Fr(i)}var di=new Map,G1=new Set;function gd(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var gs=W.d;W.d={f:lj,r:uj,D:cj,C:fj,L:dj,m:pj,X:mj,S:hj,M:gj};function lj(){var i=gs.f(),o=ad();return i||o}function uj(i){var o=Qi(i);o!==null&&o.tag===5&&o.type==="form"?uS(o):gs.r(i)}var Ja=typeof document>"u"?null:document;function W1(i,o,u){var p=Ja;if(p&&typeof o=="string"&&o){var x=Rr(o);x='link[rel="'+i+'"][href="'+x+'"]',typeof u=="string"&&(x+='[crossorigin="'+u+'"]'),G1.has(x)||(G1.add(x),i={rel:i,crossOrigin:u,href:o},p.querySelector(x)===null&&(o=p.createElement("link"),or(o,"link",i),Fn(o),p.head.appendChild(o)))}}function cj(i){gs.D(i),W1("dns-prefetch",i,null)}function fj(i,o){gs.C(i,o),W1("preconnect",i,o)}function dj(i,o,u){gs.L(i,o,u);var p=Ja;if(p&&i&&o){var x='link[rel="preload"][as="'+Rr(o)+'"]';o==="image"&&u&&u.imageSrcSet?(x+='[imagesrcset="'+Rr(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(x+='[imagesizes="'+Rr(u.imageSizes)+'"]')):x+='[href="'+Rr(i)+'"]';var w=x;switch(o){case"style":w=el(i);break;case"script":w=tl(i)}di.has(w)||(i=m({rel:"preload",href:o==="image"&&u&&u.imageSrcSet?void 0:i,as:o},u),di.set(w,i),p.querySelector(x)!==null||o==="style"&&p.querySelector(Du(w))||o==="script"&&p.querySelector(Lu(w))||(o=p.createElement("link"),or(o,"link",i),Fn(o),p.head.appendChild(o)))}}function pj(i,o){gs.m(i,o);var u=Ja;if(u&&i){var p=o&&typeof o.as=="string"?o.as:"script",x='link[rel="modulepreload"][as="'+Rr(p)+'"][href="'+Rr(i)+'"]',w=x;switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":w=tl(i)}if(!di.has(w)&&(i=m({rel:"modulepreload",href:i},o),di.set(w,i),u.querySelector(x)===null)){switch(p){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(Lu(w)))return}p=u.createElement("link"),or(p,"link",i),Fn(p),u.head.appendChild(p)}}}function hj(i,o,u){gs.S(i,o,u);var p=Ja;if(p&&i){var x=Ps(p).hoistableStyles,w=el(i);o=o||"default";var M=x.get(w);if(!M){var G={loading:0,preload:null};if(M=p.querySelector(Du(w)))G.loading=5;else{i=m({rel:"stylesheet",href:i,"data-precedence":o},u),(u=di.get(w))&&eb(i,u);var J=M=p.createElement("link");Fn(J),or(J,"link",i),J._p=new Promise(function(pe,Te){J.onload=pe,J.onerror=Te}),J.addEventListener("load",function(){G.loading|=1}),J.addEventListener("error",function(){G.loading|=2}),G.loading|=4,bd(M,o,p)}M={type:"stylesheet",instance:M,count:1,state:G},x.set(w,M)}}}function mj(i,o){gs.X(i,o);var u=Ja;if(u&&i){var p=Ps(u).hoistableScripts,x=tl(i),w=p.get(x);w||(w=u.querySelector(Lu(x)),w||(i=m({src:i,async:!0},o),(o=di.get(x))&&tb(i,o),w=u.createElement("script"),Fn(w),or(w,"link",i),u.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},p.set(x,w))}}function gj(i,o){gs.M(i,o);var u=Ja;if(u&&i){var p=Ps(u).hoistableScripts,x=tl(i),w=p.get(x);w||(w=u.querySelector(Lu(x)),w||(i=m({src:i,async:!0,type:"module"},o),(o=di.get(x))&&tb(i,o),w=u.createElement("script"),Fn(w),or(w,"link",i),u.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},p.set(x,w))}}function K1(i,o,u,p){var x=(x=ie.current)?gd(x):null;if(!x)throw Error(r(446));switch(i){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(o=el(u.href),u=Ps(x).hoistableStyles,p=u.get(o),p||(p={type:"style",instance:null,count:0,state:null},u.set(o,p)),p):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){i=el(u.href);var w=Ps(x).hoistableStyles,M=w.get(i);if(M||(x=x.ownerDocument||x,M={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},w.set(i,M),(w=x.querySelector(Du(i)))&&!w._p&&(M.instance=w,M.state.loading=5),di.has(i)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},di.set(i,u),w||bj(x,i,u,M.state))),o&&p===null)throw Error(r(528,""));return M}if(o&&p!==null)throw Error(r(529,""));return null;case"script":return o=u.async,u=u.src,typeof u=="string"&&o&&typeof o!="function"&&typeof o!="symbol"?(o=tl(u),u=Ps(x).hoistableScripts,p=u.get(o),p||(p={type:"script",instance:null,count:0,state:null},u.set(o,p)),p):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,i))}}function el(i){return'href="'+Rr(i)+'"'}function Du(i){return'link[rel="stylesheet"]['+i+"]"}function Y1(i){return m({},i,{"data-precedence":i.precedence,precedence:null})}function bj(i,o,u,p){i.querySelector('link[rel="preload"][as="style"]['+o+"]")?p.loading=1:(o=i.createElement("link"),p.preload=o,o.addEventListener("load",function(){return p.loading|=1}),o.addEventListener("error",function(){return p.loading|=2}),or(o,"link",u),Fn(o),i.head.appendChild(o))}function tl(i){return'[src="'+Rr(i)+'"]'}function Lu(i){return"script[async]"+i}function X1(i,o,u){if(o.count++,o.instance===null)switch(o.type){case"style":var p=i.querySelector('style[data-href~="'+Rr(u.href)+'"]');if(p)return o.instance=p,Fn(p),p;var x=m({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return p=(i.ownerDocument||i).createElement("style"),Fn(p),or(p,"style",x),bd(p,u.precedence,i),o.instance=p;case"stylesheet":x=el(u.href);var w=i.querySelector(Du(x));if(w)return o.state.loading|=4,o.instance=w,Fn(w),w;p=Y1(u),(x=di.get(x))&&eb(p,x),w=(i.ownerDocument||i).createElement("link"),Fn(w);var M=w;return M._p=new Promise(function(G,J){M.onload=G,M.onerror=J}),or(w,"link",p),o.state.loading|=4,bd(w,u.precedence,i),o.instance=w;case"script":return w=tl(u.src),(x=i.querySelector(Lu(w)))?(o.instance=x,Fn(x),x):(p=u,(x=di.get(w))&&(p=m({},u),tb(p,x)),i=i.ownerDocument||i,x=i.createElement("script"),Fn(x),or(x,"link",p),i.head.appendChild(x),o.instance=x);case"void":return null;default:throw Error(r(443,o.type))}else o.type==="stylesheet"&&(o.state.loading&4)===0&&(p=o.instance,o.state.loading|=4,bd(p,u.precedence,i));return o.instance}function bd(i,o,u){for(var p=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),x=p.length?p[p.length-1]:null,w=x,M=0;M<p.length;M++){var G=p[M];if(G.dataset.precedence===o)w=G;else if(w!==x)break}w?w.parentNode.insertBefore(i,w.nextSibling):(o=u.nodeType===9?u.head:u,o.insertBefore(i,o.firstChild))}function eb(i,o){i.crossOrigin==null&&(i.crossOrigin=o.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=o.referrerPolicy),i.title==null&&(i.title=o.title)}function tb(i,o){i.crossOrigin==null&&(i.crossOrigin=o.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=o.referrerPolicy),i.integrity==null&&(i.integrity=o.integrity)}var yd=null;function Z1(i,o,u){if(yd===null){var p=new Map,x=yd=new Map;x.set(u,p)}else x=yd,p=x.get(u),p||(p=new Map,x.set(u,p));if(p.has(i))return p;for(p.set(i,null),u=u.getElementsByTagName(i),x=0;x<u.length;x++){var w=u[x];if(!(w[ri]||w[Tt]||i==="link"&&w.getAttribute("rel")==="stylesheet")&&w.namespaceURI!=="http://www.w3.org/2000/svg"){var M=w.getAttribute(o)||"";M=i+M;var G=p.get(M);G?G.push(w):p.set(M,[w])}}return p}function Q1(i,o,u){i=i.ownerDocument||i,i.head.insertBefore(u,o==="title"?i.querySelector("head > title"):null)}function yj(i,o,u){if(u===1||o.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof o.precedence!="string"||typeof o.href!="string"||o.href==="")break;return!0;case"link":if(typeof o.rel!="string"||typeof o.href!="string"||o.href===""||o.onLoad||o.onError)break;return o.rel==="stylesheet"?(i=o.disabled,typeof o.precedence=="string"&&i==null):!0;case"script":if(o.async&&typeof o.async!="function"&&typeof o.async!="symbol"&&!o.onLoad&&!o.onError&&o.src&&typeof o.src=="string")return!0}return!1}function J1(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function vj(i,o,u,p){if(u.type==="stylesheet"&&(typeof p.media!="string"||matchMedia(p.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var x=el(p.href),w=o.querySelector(Du(x));if(w){o=w._p,o!==null&&typeof o=="object"&&typeof o.then=="function"&&(i.count++,i=vd.bind(i),o.then(i,i)),u.state.loading|=4,u.instance=w,Fn(w);return}w=o.ownerDocument||o,p=Y1(p),(x=di.get(x))&&eb(p,x),w=w.createElement("link"),Fn(w);var M=w;M._p=new Promise(function(G,J){M.onload=G,M.onerror=J}),or(w,"link",p),u.instance=w}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(u,o),(o=u.state.preload)&&(u.state.loading&3)===0&&(i.count++,u=vd.bind(i),o.addEventListener("load",u),o.addEventListener("error",u))}}var nb=0;function xj(i,o){return i.stylesheets&&i.count===0&&kd(i,i.stylesheets),0<i.count||0<i.imgCount?function(u){var p=setTimeout(function(){if(i.stylesheets&&kd(i,i.stylesheets),i.unsuspend){var w=i.unsuspend;i.unsuspend=null,w()}},6e4+o);0<i.imgBytes&&nb===0&&(nb=62500*ej());var x=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&kd(i,i.stylesheets),i.unsuspend)){var w=i.unsuspend;i.unsuspend=null,w()}},(i.imgBytes>nb?50:800)+o);return i.unsuspend=u,function(){i.unsuspend=null,clearTimeout(p),clearTimeout(x)}}:null}function vd(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)kd(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var xd=null;function kd(i,o){i.stylesheets=null,i.unsuspend!==null&&(i.count++,xd=new Map,o.forEach(kj,i),xd=null,vd.call(i))}function kj(i,o){if(!(o.state.loading&4)){var u=xd.get(i);if(u)var p=u.get(null);else{u=new Map,xd.set(i,u);for(var x=i.querySelectorAll("link[data-precedence],style[data-precedence]"),w=0;w<x.length;w++){var M=x[w];(M.nodeName==="LINK"||M.getAttribute("media")!=="not all")&&(u.set(M.dataset.precedence,M),p=M)}p&&u.set(null,p)}x=o.instance,M=x.getAttribute("data-precedence"),w=u.get(M)||p,w===p&&u.set(null,x),u.set(M,x),this.count++,p=vd.bind(this),x.addEventListener("load",p),x.addEventListener("error",p),w?w.parentNode.insertBefore(x,w.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(x,i.firstChild)),o.state.loading|=4}}var ju={$$typeof:R,Provider:null,Consumer:null,_currentValue:F,_currentValue2:F,_threadCount:0};function Sj(i,o,u,p,x,w,M,G,J){this.tag=1,this.containerInfo=i,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=Rt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Rt(0),this.hiddenUpdates=Rt(null),this.identifierPrefix=p,this.onUncaughtError=x,this.onCaughtError=w,this.onRecoverableError=M,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=J,this.incompleteTransitions=new Map}function ew(i,o,u,p,x,w,M,G,J,pe,Te,Oe){return i=new Sj(i,o,u,M,J,pe,Te,Oe,G),o=1,w===!0&&(o|=24),w=Vr(3,null,null,o),i.current=w,w.stateNode=i,o=Lm(),o.refCount++,i.pooledCache=o,o.refCount++,w.memoizedState={element:p,isDehydrated:u,cache:o},$m(w),i}function tw(i){return i?(i=Ia,i):Ia}function nw(i,o,u,p,x,w){x=tw(x),p.context===null?p.context=x:p.pendingContext=x,p=Ws(o),p.payload={element:u},w=w===void 0?null:w,w!==null&&(p.callback=w),u=Ks(i,p,o),u!==null&&(Mr(u,i,o),hu(u,i,o))}function rw(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var u=i.retryLane;i.retryLane=u!==0&&u<o?u:o}}function rb(i,o){rw(i,o),(i=i.alternate)&&rw(i,o)}function iw(i){if(i.tag===13||i.tag===31){var o=zo(i,67108864);o!==null&&Mr(o,i,67108864),rb(i,67108864)}}function sw(i){if(i.tag===13||i.tag===31){var o=Xr();o=Ie(o);var u=zo(i,o);u!==null&&Mr(u,i,o),rb(i,o)}}var Sd=!0;function wj(i,o,u,p){var x=H.T;H.T=null;var w=W.p;try{W.p=2,ib(i,o,u,p)}finally{W.p=w,H.T=x}}function Ej(i,o,u,p){var x=H.T;H.T=null;var w=W.p;try{W.p=8,ib(i,o,u,p)}finally{W.p=w,H.T=x}}function ib(i,o,u,p){if(Sd){var x=sb(p);if(x===null)Hg(i,o,p,wd,u),aw(i,p);else if(Cj(x,i,o,u,p))p.stopPropagation();else if(aw(i,p),o&4&&-1<Tj.indexOf(i)){for(;x!==null;){var w=Qi(x);if(w!==null)switch(w.tag){case 3:if(w=w.stateNode,w.current.memoizedState.isDehydrated){var M=At(w.pendingLanes);if(M!==0){var G=w;for(G.pendingLanes|=2,G.entangledLanes|=2;M;){var J=1<<31-nt(M);G.entanglements[1]|=J,M&=~J}$i(w),(nn&6)===0&&(sd=ee()+500,Nu(0))}}break;case 31:case 13:G=zo(w,2),G!==null&&Mr(G,w,2),ad(),rb(w,2)}if(w=sb(p),w===null&&Hg(i,o,p,wd,u),w===x)break;x=w}x!==null&&p.stopPropagation()}else Hg(i,o,p,null,u)}}function sb(i){return i=Nt(i),ob(i)}var wd=null;function ob(i){if(wd=null,i=tr(i),i!==null){var o=a(i);if(o===null)i=null;else{var u=o.tag;if(u===13){if(i=l(o),i!==null)return i;i=null}else if(u===31){if(i=c(o),i!==null)return i;i=null}else if(u===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null)}}return wd=i,null}function ow(i){switch(i){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"resize":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"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"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(fe()){case Q:return 2;case ne:return 8;case we:case Pe:return 32;case Ye:return 268435456;default:return 32}default:return 32}}var ab=!1,so=null,oo=null,ao=null,zu=new Map,Pu=new Map,lo=[],Tj="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 aw(i,o){switch(i){case"focusin":case"focusout":so=null;break;case"dragenter":case"dragleave":oo=null;break;case"mouseover":case"mouseout":ao=null;break;case"pointerover":case"pointerout":zu.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pu.delete(o.pointerId)}}function $u(i,o,u,p,x,w){return i===null||i.nativeEvent!==w?(i={blockedOn:o,domEventName:u,eventSystemFlags:p,nativeEvent:w,targetContainers:[x]},o!==null&&(o=Qi(o),o!==null&&iw(o)),i):(i.eventSystemFlags|=p,o=i.targetContainers,x!==null&&o.indexOf(x)===-1&&o.push(x),i)}function Cj(i,o,u,p,x){switch(o){case"focusin":return so=$u(so,i,o,u,p,x),!0;case"dragenter":return oo=$u(oo,i,o,u,p,x),!0;case"mouseover":return ao=$u(ao,i,o,u,p,x),!0;case"pointerover":var w=x.pointerId;return zu.set(w,$u(zu.get(w)||null,i,o,u,p,x)),!0;case"gotpointercapture":return w=x.pointerId,Pu.set(w,$u(Pu.get(w)||null,i,o,u,p,x)),!0}return!1}function lw(i){var o=tr(i.target);if(o!==null){var u=a(o);if(u!==null){if(o=u.tag,o===13){if(o=l(u),o!==null){i.blockedOn=o,Et(i.priority,function(){sw(u)});return}}else if(o===31){if(o=c(u),o!==null){i.blockedOn=o,Et(i.priority,function(){sw(u)});return}}else if(o===3&&u.stateNode.current.memoizedState.isDehydrated){i.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Ed(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var u=sb(i.nativeEvent);if(u===null){u=i.nativeEvent;var p=new u.constructor(u.type,u);st=p,u.target.dispatchEvent(p),st=null}else return o=Qi(u),o!==null&&iw(o),i.blockedOn=u,!1;o.shift()}return!0}function uw(i,o,u){Ed(i)&&u.delete(o)}function Rj(){ab=!1,so!==null&&Ed(so)&&(so=null),oo!==null&&Ed(oo)&&(oo=null),ao!==null&&Ed(ao)&&(ao=null),zu.forEach(uw),Pu.forEach(uw)}function Td(i,o){i.blockedOn===o&&(i.blockedOn=null,ab||(ab=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Rj)))}var Cd=null;function cw(i){Cd!==i&&(Cd=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Cd===i&&(Cd=null);for(var o=0;o<i.length;o+=3){var u=i[o],p=i[o+1],x=i[o+2];if(typeof p!="function"){if(ob(p||u)===null)continue;break}var w=Qi(u);w!==null&&(i.splice(o,3),o-=3,sg(w,{pending:!0,data:x,method:u.method,action:p},p,x))}}))}function nl(i){function o(J){return Td(J,i)}so!==null&&Td(so,i),oo!==null&&Td(oo,i),ao!==null&&Td(ao,i),zu.forEach(o),Pu.forEach(o);for(var u=0;u<lo.length;u++){var p=lo[u];p.blockedOn===i&&(p.blockedOn=null)}for(;0<lo.length&&(u=lo[0],u.blockedOn===null);)lw(u),u.blockedOn===null&&lo.shift();if(u=(i.ownerDocument||i).$$reactFormReplay,u!=null)for(p=0;p<u.length;p+=3){var x=u[p],w=u[p+1],M=x[Qt]||null;if(typeof w=="function")M||cw(u);else if(M){var G=null;if(w&&w.hasAttribute("formAction")){if(x=w,M=w[Qt]||null)G=M.formAction;else if(ob(x)!==null)continue}else G=M.action;typeof G=="function"?u[p+1]=G:(u.splice(p,3),p-=3),cw(u)}}}function fw(){function i(w){w.canIntercept&&w.info==="react-transition"&&w.intercept({handler:function(){return new Promise(function(M){return x=M})},focusReset:"manual",scroll:"manual"})}function o(){x!==null&&(x(),x=null),p||setTimeout(u,20)}function u(){if(!p&&!navigation.transition){var w=navigation.currentEntry;w&&w.url!=null&&navigation.navigate(w.url,{state:w.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var p=!1,x=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",o),navigation.addEventListener("navigateerror",o),setTimeout(u,100),function(){p=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",o),navigation.removeEventListener("navigateerror",o),x!==null&&(x(),x=null)}}}function lb(i){this._internalRoot=i}Rd.prototype.render=lb.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(r(409));var u=o.current,p=Xr();nw(u,p,i,o,null,null)},Rd.prototype.unmount=lb.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;nw(i.current,2,null,i,null,null),ad(),o[rn]=null}};function Rd(i){this._internalRoot=i}Rd.prototype.unstable_scheduleHydration=function(i){if(i){var o=dt();i={blockedOn:null,target:i,priority:o};for(var u=0;u<lo.length&&o!==0&&o<lo[u].priority;u++);lo.splice(u,0,i),u===0&&lw(i)}};var dw=t.version;if(dw!=="19.2.6")throw Error(r(527,dw,"19.2.6"));W.findDOMNode=function(i){var o=i._reactInternals;if(o===void 0)throw typeof i.render=="function"?Error(r(188)):(i=Object.keys(i).join(","),Error(r(268,i)));return i=d(o),i=i!==null?h(i):null,i=i===null?null:i.stateNode,i};var _j={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:H,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var _d=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!_d.isDisabled&&_d.supportsFiber)try{Je=_d.inject(_j),vt=_d}catch{}}return Fu.createRoot=function(i,o){if(!s(i))throw Error(r(299));var u=!1,p="",x=vS,w=xS,M=kS;return o!=null&&(o.unstable_strictMode===!0&&(u=!0),o.identifierPrefix!==void 0&&(p=o.identifierPrefix),o.onUncaughtError!==void 0&&(x=o.onUncaughtError),o.onCaughtError!==void 0&&(w=o.onCaughtError),o.onRecoverableError!==void 0&&(M=o.onRecoverableError)),o=ew(i,1,!1,null,null,u,p,null,x,w,M,fw),i[rn]=o.current,qg(i),new lb(o)},Fu.hydrateRoot=function(i,o,u){if(!s(i))throw Error(r(299));var p=!1,x="",w=vS,M=xS,G=kS,J=null;return u!=null&&(u.unstable_strictMode===!0&&(p=!0),u.identifierPrefix!==void 0&&(x=u.identifierPrefix),u.onUncaughtError!==void 0&&(w=u.onUncaughtError),u.onCaughtError!==void 0&&(M=u.onCaughtError),u.onRecoverableError!==void 0&&(G=u.onRecoverableError),u.formState!==void 0&&(J=u.formState)),o=ew(i,1,!0,o,u??null,p,x,J,w,M,G,fw),o.context=tw(null),u=o.current,p=Xr(),p=Ie(p),x=Ws(p),x.callback=null,Ks(u,x,p),u=p,o.current.lanes=u,lt(o,u),$i(o),i[rn]=o.current,qg(i),new Rd(o)},Fu.version="19.2.6",Fu}var Sw;function $j(){if(Sw)return fb.exports;Sw=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),fb.exports=Pj(),fb.exports}var Bj=$j(),Uu={},ww;function Fj(){if(ww)return Uu;ww=1,Object.defineProperty(Uu,"__esModule",{value:!0}),Uu.styleq=void 0;var e=new WeakMap,t="$$css";function n(s){var a,l,c;return s!=null&&(a=s.disableCache===!0,l=s.disableMix===!0,c=s.transform),function(){for(var d=[],h="",m=null,b="",y=a?null:e,k=new Array(arguments.length),S=0;S<arguments.length;S++)k[S]=arguments[S];for(;k.length>0;){var C=k.pop();if(!(C==null||C===!1)){if(Array.isArray(C)){for(var E=0;E<C.length;E++)k.push(C[E]);continue}var T=c!=null?c(C):C;if(T.$$css!=null){var R="";if(y!=null&&y.has(T)){var _=y.get(T);_!=null&&(R=_[0],b=_[2],d.push.apply(d,_[1]),y=_[3])}else{var D=[];for(var A in T){var I=T[A];if(A===t){var P=T[A];P!==!0&&(b=b?P+"; "+b:P);continue}typeof I=="string"||I===null?d.includes(A)||(d.push(A),y!=null&&D.push(A),typeof I=="string"&&(R+=R?" "+I:I)):console.error("styleq: ".concat(A," typeof ").concat(String(I),' is not "string" or "null".'))}if(y!=null){var $=new WeakMap;y.set(T,[R,D,b,$]),y=$}}R&&(h=h?R+" "+h:R)}else if(l)m==null&&(m={}),m=Object.assign({},T,m);else{var O=null;for(var Y in T){var U=T[Y];U!==void 0&&(d.includes(Y)||(U!=null&&(m==null&&(m={}),O==null&&(O={}),O[Y]=U),d.push(Y),y=null))}O!=null&&(m=Object.assign(O,m))}}}var B=[h,m,b];return B}}var r=Uu.styleq=n();return r.factory=n,Uu}var Uj=Fj();function zt(...e){const[t,n,r]=Uj.styleq(e),s={};return t!=null&&t!==""&&(s.className=t),n!=null&&Object.keys(n).length>0&&(s.style=n),r!=null&&r!==""&&(s["data-style-src"]=r),s}function KR(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=KR(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function qj(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=KR(e))&&(r&&(r+=" "),r+=t);return r}function sn(...e){return qj(e)}function Yt({rootClass:e,stylexStyles:t,className:n,style:r}){const s=zt(t);return{className:sn(e,s.className,n),style:{...s.style,...r}}}const Hj={"--cursor-easing-out-quint":"var(--cursor-easing-out-quint)"},Ci={base:{k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kOIVth:"ui-11twubx",khDVqt:"ui-uxw1ft",kMv6JI:"ui-1acoasx",krdFHd:"ui-1bi1pm6",kfmiAY:"ui-4ao1vk",kT0f0o:"ui-cwn6ta",kVL7Gh:"ui-42qtjs",kGuDYH:"ui-1wm8ruf",kLWn49:"ui-spwq11",khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",$$css:!0},sizeSm:{kLKAdn:"ui-exx8yu",kwRFfy:"ui-1hcev8z",kGO01o:"ui-18d9i69",kZCmMZ:"ui-149t747",$$css:!0},sizeMd:{kLKAdn:"ui-493x5y",kwRFfy:"ui-1tlft3r",kGO01o:"ui-b6dno7",kZCmMZ:"ui-tw3t59",$$css:!0},pill:{krdFHd:"ui-inloh",kfmiAY:"ui-zbf5sq",kT0f0o:"ui-jpqjuy",kVL7Gh:"ui-mzb00y",$$css:!0},pillSizeSm:{kLKAdn:"ui-493x5y",kwRFfy:"ui-196pc8s",kGO01o:"ui-b6dno7",kZCmMZ:"ui-22095l",$$css:!0},pillSizeMd:{kLKAdn:"ui-5pb957",kwRFfy:"ui-19bzwdx",kGO01o:"ui-1mmyrcj",kZCmMZ:"ui-v853mj",$$css:!0},variantAccent:{kMwMTN:"ui-kbann2",kWkggS:"ui-gsjhps",$$css:!0},variantNeutral:{kMwMTN:"ui-19aaqeu",kWkggS:"ui-i07v4r",$$css:!0},variantSuccess:{kMwMTN:"ui-1w5rjie",kWkggS:"ui-18wk26n",$$css:!0},variantWarn:{kMwMTN:"ui-1izesbo",kWkggS:"ui-t9f1jb",$$css:!0},variantDanger:{kMwMTN:"ui-1jh5svw",kWkggS:"ui-qhj6il",$$css:!0}};function Vj({pill:e,size:t,variant:n}){return[Ci.base,t==="sm"?Ci.sizeSm:Ci.sizeMd,e?[Ci.pill,t==="sm"?Ci.pillSizeSm:Ci.pillSizeMd]:null,Gj(n)]}function Gj(e){switch(e){case"accent":return Ci.variantAccent;case"neutral":return Ci.variantNeutral;case"success":return Ci.variantSuccess;case"warn":return Ci.variantWarn;case"danger":return Ci.variantDanger}}function vo({children:e,variant:t="neutral",size:n="md",pill:r=!1,as:s="span",className:a,style:l,...c}){const f=Yt({rootClass:"ui-status-badge",stylexStyles:Vj({pill:r,size:n,variant:t}),className:a,style:l});return g.jsx(s,{className:f.className,style:f.style,"data-variant":t,"data-size":n,"data-pill":r||void 0,...c,children:e})}function Wj(e,t){return function(r,...s){const a=new URL(e);return a.searchParams.set("code",r.toString()),s.forEach(l=>a.searchParams.append("args[]",l)),`${t} error #${r}; visit ${a} for the full message.`}}const Nn=Wj("https://base-ui.com/production-error","Base UI"),Ew={};function zr(e,t){const n=v.useRef(Ew);return n.current===Ew&&(n.current=e(t)),n}function xo(e,t,n,r){const s=zr(YR).current;return Yj(s,e,t,n,r)&&XR(s,[e,t,n,r]),s.callback}function Kj(e){const t=zr(YR).current;return Xj(t,e)&&XR(t,e),t.callback}function YR(){return{callback:null,cleanup:null,refs:[]}}function Yj(e,t,n,r,s){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==s}function Xj(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function XR(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let s=0;s<t.length;s+=1){const a=t[s];if(a!=null)switch(typeof a){case"function":{const l=a(n);typeof l=="function"&&(r[s]=l);break}case"object":{a.current=n;break}}}e.cleanup=()=>{for(let s=0;s<t.length;s+=1){const a=t[s];if(a!=null)switch(typeof a){case"function":{const l=r[s];typeof l=="function"?l():a(null);break}case"object":{a.current=null;break}}}}}}}const Zj=parseInt(v.version,10);function zv(e){return Zj>=e}function Tw(e){if(!v.isValidElement(e))return null;const t=e,n=t.props;return(zv(19)?n?.ref:t.ref)??null}function Oy(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Zn(){}const ko=Object.freeze([]),$n=Object.freeze({});function Qj(e,t){const n={};for(const r in e){const s=e[r];if(t?.hasOwnProperty(r)){const a=t[r](s);a!=null&&Object.assign(n,a);continue}s===!0?n[`data-${r.toLowerCase()}`]="":s&&(n[`data-${r.toLowerCase()}`]=s.toString())}return n}function Jj(e,t){return typeof e=="function"?e(t):e}function ZR(e,t){return typeof e=="function"?e(t):e}const Pv={};function Wi(e,t,n,r,s){if(!n&&!r&&!s&&!e)return Tp(t);let a=Tp(e);return t&&(a=oc(a,t)),n&&(a=oc(a,n)),r&&(a=oc(a,r)),s&&(a=oc(a,s)),a}function ez(e){if(e.length===0)return Pv;if(e.length===1)return Tp(e[0]);let t=Tp(e[0]);for(let n=1;n<e.length;n+=1)t=oc(t,e[n]);return t}function Tp(e){return $v(e)?{...JR(e,Pv)}:tz(e)}function oc(e,t){return $v(t)?JR(t,e):nz(e,t)}function tz(e){const t={...e};for(const n in t){const r=t[n];QR(n,r)&&(t[n]=e_(r))}return t}function nz(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=Oy(e.style,r);break}case"className":{e[n]=t_(e.className,r);break}default:QR(n,r)?e[n]=rz(e[n],r):e[n]=r}}return e}function QR(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),s=e.charCodeAt(2);return n===111&&r===110&&s>=65&&s<=90&&(typeof t=="function"||typeof t>"u")}function $v(e){return typeof e=="function"}function JR(e,t){return $v(e)?e(t):e??Pv}function rz(e,t){return t?e?(...n)=>{const r=n[0];if(n_(r)){const a=r;Cp(a);const l=t(...n);return a.baseUIHandlerPrevented||e?.(...n),l}const s=t(...n);return e?.(...n),s}:e_(t):e}function e_(e){return e&&((...t)=>{const n=t[0];return n_(n)&&Cp(n),e(...t)})}function Cp(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function t_(e,t){return t?e?t+" "+e:t:e}function n_(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function gn(e,t,n={}){const r=t.render,s=iz(t,n);if(n.enabled===!1)return null;const a=n.state??$n;return az(e,r,s,a)}function iz(e,t={}){const{className:n,style:r,render:s}=e,{state:a=$n,ref:l,props:c,stateAttributesMapping:f,enabled:d=!0}=t,h=d?Jj(n,a):void 0,m=d?ZR(r,a):void 0,b=d?Qj(a,f):$n,y=d&&c?sz(c):void 0,k=d?Oy(b,y)??{}:$n;return typeof document<"u"&&(d?Array.isArray(l)?k.ref=Kj([k.ref,Tw(s),...l]):k.ref=xo(k.ref,Tw(s),l):xo(null,null)),d?(h!==void 0&&(k.className=t_(k.className,h)),m!==void 0&&(k.style=Oy(k.style,m)),k):$n}function sz(e){return Array.isArray(e)?ez(e):Wi(void 0,e)}const oz=Symbol.for("react.lazy");function az(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const s=Wi(n,t.props);s.ref=n.ref;let a=t;return a?.$$typeof===oz&&(a=v.Children.toArray(t)[0]),v.cloneElement(a,s)}if(e&&typeof e=="string")return lz(e,n);throw new Error(Nn(8))}function lz(e,t){return e==="button"?v.createElement("button",{type:"button",...t,key:t.key}):e==="img"?v.createElement("img",{alt:"",...t,key:t.key}):v.createElement(e,t)}let sa=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const uz={[sa.startingStyle]:""},cz={[sa.endingStyle]:""},To={transitionStatus(e){return e==="starting"?uz:e==="ending"?cz:null}};let Bv=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=sa.startingStyle]="startingStyle",e[e.endingStyle=sa.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),Rp=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const fz={[Rp.popupOpen]:""},dz={[Rp.popupOpen]:"",[Rp.pressed]:""},pz={[Bv.open]:""},hz={[Bv.closed]:""},mz={[Bv.anchorHidden]:""},r_={open(e){return e?fz:null}},gz={open(e){return e?dz:null}},Wc={open(e){return e?pz:hz},anchorHidden(e){return e?mz:null}};function ph(){return typeof window<"u"}function Qn(e){return hh(e)?(e.nodeName||"").toLowerCase():"#document"}function vn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Is(e){var t;return(t=(hh(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function hh(e){return ph()?e instanceof Node||e instanceof vn(e).Node:!1}function gt(e){return ph()?e instanceof Element||e instanceof vn(e).Element:!1}function Ft(e){return ph()?e instanceof HTMLElement||e instanceof vn(e).HTMLElement:!1}function So(e){return!ph()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof vn(e).ShadowRoot}function ma(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=Tr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&s!=="inline"&&s!=="contents"}function bz(e){return/^(table|td|th)$/.test(Qn(e))}function mh(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const yz=/transform|translate|scale|rotate|perspective|filter/,vz=/paint|layout|strict|content/,Xo=e=>!!e&&e!=="none";let mb;function Fv(e){const t=gt(e)?Tr(e):e;return Xo(t.transform)||Xo(t.translate)||Xo(t.scale)||Xo(t.rotate)||Xo(t.perspective)||!gh()&&(Xo(t.backdropFilter)||Xo(t.filter))||yz.test(t.willChange||"")||vz.test(t.contain||"")}function xz(e){let t=As(e);for(;Ft(t)&&!Ai(t);){if(Fv(t))return t;if(mh(t))return null;t=As(t)}return null}function gh(){return mb==null&&(mb=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),mb}function Ai(e){return/^(html|body|#document)$/.test(Qn(e))}function Tr(e){return vn(e).getComputedStyle(e)}function bh(e){return gt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function As(e){if(Qn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||So(e)&&e.host||Is(e);return So(t)?t.host:t}function i_(e){const t=As(e);return Ai(t)?(e.ownerDocument||e).body:Ft(t)&&ma(t)?t:i_(t)}function bo(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=i_(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),l=vn(s);if(a){const c=Iy(l);return t.concat(l,l.visualViewport||[],ma(s)?s:[],c&&n?bo(c):[])}else return t.concat(s,bo(s,[],n))}function Iy(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const Uv={...jv},gb=Uv.useInsertionEffect,kz=gb&&gb!==Uv.useLayoutEffect?gb:e=>e();function Ke(e){const t=zr(Sz).current;return t.next=e,kz(t.effect),t.trampoline}function Sz(){const e={next:void 0,callback:wz,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function wz(){}const Ez=()=>{},Ve=typeof document<"u"?v.useLayoutEffect:Ez,s_=v.createContext(void 0);function o_(e=!1){const t=v.useContext(s_);if(t===void 0&&!e)throw new Error(Nn(16));return t}function Tz(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:s=0,isNativeButton:a}=e,l=r&&t!==!1,c=r&&t===!1;return{props:v.useMemo(()=>{const d={onKeyDown(h){n&&t&&h.key!=="Tab"&&h.preventDefault()}};return r||(d.tabIndex=s,!a&&n&&(d.tabIndex=t?s:-1)),(a&&(t||l)||!a&&n)&&(d["aria-disabled"]=n),a&&(!t||c)&&(d.disabled=n),d},[r,n,t,l,c,a,s])}}function $l(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:s=!0,composite:a}=e,l=v.useRef(null),c=o_(!0),f=a??c!==void 0,{props:d}=Tz({focusableWhenDisabled:n,disabled:t,composite:f,tabIndex:r,isNativeButton:s}),h=v.useCallback(()=>{const y=l.current;bb(y)&&f&&t&&d.disabled===void 0&&y.disabled&&(y.disabled=!1)},[t,d.disabled,f]);Ve(h,[h]);const m=v.useCallback((y={})=>{const{onClick:k,onMouseDown:S,onKeyUp:C,onKeyDown:E,onPointerDown:T,...R}=y;return Wi({onClick(_){if(t){_.preventDefault();return}k?.(_)},onMouseDown(_){t||S?.(_)},onKeyDown(_){if(t||(Cp(_),E?.(_),_.baseUIHandlerPrevented))return;const D=_.target===_.currentTarget,A=_.currentTarget,I=bb(A),P=!s&&Cz(A),$=D&&(s?I:!P),O=_.key==="Enter",Y=_.key===" ",U=A.getAttribute("role"),B=U?.startsWith("menuitem")||U==="option"||U==="gridcell";if(D&&f&&Y){if(_.defaultPrevented&&B)return;_.preventDefault(),P||s&&I?(A.click(),_.preventBaseUIHandler()):$&&(k?.(_),_.preventBaseUIHandler());return}$&&(!s&&(Y||O)&&_.preventDefault(),!s&&O&&k?.(_))},onKeyUp(_){if(!t){if(Cp(_),C?.(_),_.target===_.currentTarget&&s&&f&&bb(_.currentTarget)&&_.key===" "){_.preventDefault();return}_.baseUIHandlerPrevented||_.target===_.currentTarget&&!s&&!f&&_.key===" "&&k?.(_)}},onPointerDown(_){if(t){_.preventDefault();return}T?.(_)}},s?{type:"button"}:{role:"button"},d,R)},[t,d,f,s]),b=Ke(y=>{l.current=y,h()});return{getButtonProps:m,buttonRef:b}}function bb(e){return Ft(e)&&e.tagName==="BUTTON"}function Cz(e){return!!(e?.tagName==="A"&&e?.href)}const Oi="none",Bl="trigger-press",Sr="trigger-hover",gp="trigger-focus",qv="outside-press",yb="item-press",yh="focus-out",Hv="escape-key",Cw="list-navigation",Rz="cancel-open",a_="disabled",Rw="missing",_w="initial",_p="imperative-action",_z="window-resize";function Ct(e,t,n,r){let s=!1,a=!1;const l=r??$n;return{reason:e,event:t??new Event("base-ui"),cancel(){s=!0},allowPropagation(){a=!0},get isCanceled(){return s},get isPropagationAllowed(){return a},trigger:n,...l}}let Aw=0;function Az(e,t="mui"){const[n,r]=v.useState(e),s=e||n;return v.useEffect(()=>{n==null&&(Aw+=1,r(`${t}-${Aw}`))},[n,t]),s}const Nw=Uv.useId;function Kc(e,t){if(Nw!==void 0){const n=Nw();return e??(t?`${t}-${n}`:n)}return Az(e,t)}function Fl(e){return Kc(e,"base-ui")}const Nz=[];function Vv(e){v.useEffect(e,Nz)}const qu=0;class Ii{static create(){return new Ii}currentId=qu;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=qu,n()},t)}isStarted(){return this.currentId!==qu}clear=()=>{this.currentId!==qu&&(clearTimeout(this.currentId),this.currentId=qu)};disposeEffect=()=>this.clear}function yi(){const e=zr(Ii.create).current;return Vv(e.disposeEffect),e}function Oz(){return typeof navigator>"u"?{userAgent:"",platform:"",maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??0}}const{userAgent:Iz,platform:Mz,maxTouchPoints:Dz}=Oz(),vh=Iz.toLowerCase(),Ec=Mz.toLowerCase(),xh=/^i(os$|p)/.test(Ec)||Ec==="macintel"&&Dz>1,Ow="android",My=Ec===Ow||vh.includes(Ow),l_=!xh&&Ec.startsWith("mac");Ec.startsWith("win");const Lz=l_||xh,Co=typeof CSS<"u"&&!!CSS.supports?.("-webkit-backdrop-filter:none");!Co&&vh.includes("firefox");!Co&&vh.includes("chrom");const jz=Lz,Gv=/jsdom|happydom/.test(vh);function qi(e){e.preventDefault(),e.stopPropagation()}function zz(e){return"nativeEvent"in e}function Wv(e){return e.pointerType===""&&e.isTrusted?!0:My&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function u_(e){return Gv?!1:!My&&e.width===0&&e.height===0||My&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function oa(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function Pz(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const Dy="data-base-ui-focusable",c_="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",kh="ArrowLeft",Sh="ArrowRight",f_="ArrowUp",Kv="ArrowDown";function pr(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function ht(e,t){if(!e||!t)return!1;const n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&So(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function gr(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Ap(e,t){if(!gt(e))return!1;const n=e;if(t.hasElement(n))return!n.hasAttribute("data-trigger-disabled");for(const[,r]of t.entries())if(ht(r,n))return!r.hasAttribute("data-trigger-disabled");return!1}function vb(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function $z(e){return e.matches("html,body")}function wh(e){return Ft(e)&&e.matches(c_)}function Bz(e){return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${c_}`)!=null}function Ly(e){return e?e.getAttribute("role")==="combobox"&&wh(e):!1}function Fz(e){if(!e||Gv)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Np(e){return e?e.hasAttribute(Dy)?e:e.querySelector(`[${Dy}]`)||e:null}function Uz(e,t){return t!=null&&!oa(t)?0:typeof e=="function"?e():e}function Op(e,t,n){const r=Uz(e,n);return typeof r=="number"?r:r?.[t]}function Iw(e){return typeof e=="function"?e():e}function d_(e,t){return t||e==="click"||e==="mousedown"}function qz(e){return e?.includes("mouse")&&e!=="mousedown"}const Hz=v.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Ii,currentIdRef:{current:null},currentContextRef:{current:null}});function Vz(e,t){e.current=t.current}function Gz(e,t={open:!1}){const{open:n}=t,r="rootStore"in e?e.rootStore:e,s=r.useState("floatingId"),a=v.useContext(Hz),{currentIdRef:l,delayRef:c,timeoutMs:f,initialDelayRef:d,currentContextRef:h,hasProvider:m,timeout:b}=a,[y,k]=v.useState(!1),S=v.useRef(n),C=v.useRef(!1);return Ve(()=>{S.current=n},[n]),Ve(()=>()=>{C.current=!0},[]),Ve(()=>{function E(){C.current||k(!1),h.current?.setIsInstantPhase(!1),l.current=null,h.current=null,c.current=d.current,b.clear()}if(l.current&&!n&&l.current===s){if(k(!1),f){const T=s;return b.start(f,()=>{r.select("open")||l.current&&l.current!==T||E()}),()=>{(S.current||l.current!==T)&&b.clear()}}E()}},[n,s,l,c,f,d,h,b,r]),Ve(()=>{if(!n)return;const E=h.current,T=l.current;b.clear(),h.current={onOpenChange:r.setOpen,setIsInstantPhase:k},l.current=s,c.current={open:0,close:Op(d.current,"close")},T!==null&&T!==s?(k(!0),E?.setIsInstantPhase(!0),E?.onOpenChange(!1,Ct(Oi))):(k(!1),E?.setIsInstantPhase(!1))},[n,s,r,l,c,d,h,b]),Ve(()=>()=>{if(l.current===s){if(h.current=null,!S.current)return;l.current=null,Vz(c,d),b.clear()}},[h,l,c,s,d,b]),v.useMemo(()=>({hasProvider:m,delayRef:c,isInstantPhase:y}),[m,c,y])}function Dt(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Ki(...e){return()=>{for(let t=0;t<e.length;t+=1){const n=e[t];n&&n()}}}function An(e){const t=zr(Wz,e).current;return t.next=e,Ve(t.effect),t}function Wz(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const Ad=null;class Kz{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=t=>{this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let s=0;s<n.length;s+=1)n[s]?.(t)};request(t){const n=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,!this.isScheduled&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const Nd=new Kz;class Lr{static create(){return new Lr}static request(t){return Nd.request(t)}static cancel(t){return Nd.cancel(t)}currentId=Ad;request(t){this.cancel(),this.currentId=Nd.request(()=>{this.currentId=Ad,t()})}cancel=()=>{this.currentId!==Ad&&(Nd.cancel(this.currentId),this.currentId=Ad)};disposeEffect=()=>this.cancel}function Tl(){const e=zr(Lr.create).current;return Vv(e.disposeEffect),e}function Wt(e){return e?.ownerDocument||document}const p_={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},h_={...p_,position:"fixed",top:0,left:0},Yz={...p_,position:"absolute"},Ip=v.forwardRef(function(t,n){const[r,s]=v.useState();Ve(()=>{jz&&Co&&s("button")},[]);const a={tabIndex:0,role:r};return g.jsx("span",{...t,ref:n,style:h_,"aria-hidden":r?void 0:!0,...a,"data-base-ui-focus-guard":""})}),Xz=["top","right","bottom","left"],Cl=Math.min,Cs=Math.max,Rl=Math.round,ml=Math.floor,Rs=e=>({x:e,y:e}),Zz={left:"right",right:"left",bottom:"top",top:"bottom"};function m_(e,t,n){return Cs(e,Cl(t,n))}function Ns(e,t){return typeof e=="function"?e(t):e}function ti(e){return e.split("-")[0]}function Ro(e){return e.split("-")[1]}function Yv(e){return e==="x"?"y":"x"}function Xv(e){return e==="y"?"height":"width"}function gi(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Zv(e){return Yv(gi(e))}function Qz(e,t,n){n===void 0&&(n=!1);const r=Ro(e),s=Zv(e),a=Xv(s);let l=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(l=Mp(l)),[l,Mp(l)]}function Jz(e){const t=Mp(e);return[jy(e),t,jy(t)]}function jy(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Mw=["left","right"],Dw=["right","left"],eP=["top","bottom"],tP=["bottom","top"];function nP(e,t,n){switch(e){case"top":case"bottom":return n?t?Dw:Mw:t?Mw:Dw;case"left":case"right":return t?eP:tP;default:return[]}}function rP(e,t,n,r){const s=Ro(e);let a=nP(ti(e),n==="start",r);return s&&(a=a.map(l=>l+"-"+s),t&&(a=a.concat(a.map(jy)))),a}function Mp(e){const t=ti(e);return Zz[t]+e.slice(t.length)}function iP(e){var t,n,r,s;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(r=e.bottom)!=null?r:0,left:(s=e.left)!=null?s:0}}function g_(e){return typeof e!="number"?iP(e):{top:e,right:e,bottom:e,left:e}}function Tc(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function cc(e,t){return t<0||t>=e.length}function bp(e,t){return ws(e.current,{disabledIndices:t})}function zy(e,t){return ws(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function ws(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:s=1}={}){let a=t;do a+=n?-s:s;while(a>=0&&a<=e.length-1&&Dp(e,a,r));return a}function Dp(e,t,n){if(typeof n=="function"?n(t):n?.includes(t)??!1)return!0;const s=e[t];return s?Eh(s)?!n&&(s.hasAttribute("disabled")||s.getAttribute("aria-disabled")==="true"):!0:!1}function sP(e){return e.visibility==="hidden"||e.visibility==="collapse"}function Eh(e,t=e?Tr(e):null){return!e||!e.isConnected||!t||sP(t)?!1:typeof e.checkVisibility=="function"?e.checkVisibility():t.display!=="none"&&t.display!=="contents"}const oP='a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]';function aP(e){const t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;const n=e.getRootNode();return So(n)?n.host:null}function Py(e){for(const t of Array.from(e.children))if(Qn(t)==="summary")return t;return null}function lP(e,t){const n=Py(t);return!!n&&(e===n||ht(n,e))}function b_(e){const t=e?Qn(e):"";return e!=null&&e.matches(oP)&&(t!=="summary"||e.parentElement!=null&&Qn(e.parentElement)==="details"&&Py(e.parentElement)===e)&&(t!=="details"||Py(e)==null)&&(t!=="input"||e.type!=="hidden")}function y_(e){if(!b_(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let t=e;t;t=aP(t)){const n=t!==e,r=Qn(t)==="slot";if(t.hasAttribute("inert")||n&&Qn(t)==="details"&&!t.open&&!lP(e,t)||t.hasAttribute("hidden")||!r&&!uP(t,n))return!1}return!0}function uP(e,t){const n=Tr(e);return t?n.display!=="none":Eh(e,n)}function v_(e){const t=e.tabIndex;if(t<0){const n=Qn(e);if(n==="details"||n==="audio"||n==="video"||Ft(e)&&e.isContentEditable)return 0}return t}function xb(e){if(Qn(e)!=="input")return null;const t=e;return t.type==="radio"&&t.name!==""?t:null}function cP(e,t){const n=xb(e);if(!n)return!0;const r=t.find(s=>{const a=xb(s);return a?.name===n.name&&a.form===n.form&&a.checked});return r?r===n:t.find(s=>{const a=xb(s);return a?.name===n.name&&a.form===n.form})===n}function x_(e){if(Ft(e)&&Qn(e)==="slot"){const t=e.assignedElements({flatten:!0});if(t.length>0)return t}return Ft(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function k_(e,t){x_(e).forEach(n=>{b_(n)&&t.push(n),k_(n,t)})}function S_(e,t,n){x_(e).forEach(r=>{Ft(r)&&r.matches(t)&&n.push(r),S_(r,t,n)})}function Qv(e){return y_(e)&&v_(e)>=0}function w_(e){const t=[];return k_(e,t),t.filter(y_)}function Th(e){const t=w_(e);return t.filter(n=>v_(n)>=0&&cP(n,t))}function E_(e,t){const n=Th(e),r=n.length;if(r===0)return;const s=pr(Wt(e)),a=n.indexOf(s),l=a===-1?t===1?0:r-1:a+t;return n[l]}function T_(e){return E_(Wt(e).body,1)||e}function C_(e){return E_(Wt(e).body,-1)||e}function fc(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!ht(n,r)}function fP(e){Th(e).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Lw(e){const t=[];S_(e,"[data-tabindex]",t),t.forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function wo(e,t,n=!0){return e.filter(s=>s.parentId===t).flatMap(s=>[...!n||s.context?.open?[s]:[],...wo(e,s.id,n)])}function jw(e,t){let n=[],r=e.find(s=>s.id===t)?.parentId;for(;r;){const s=e.find(a=>a.id===r);r=s?.parentId,s&&(n=n.concat(s))}return n}function Cc(e){return`data-base-ui-${e}`}let Od=0;function yp(e,t={}){const{preventScroll:n=!1,sync:r=!1,shouldFocus:s}=t;cancelAnimationFrame(Od);function a(){s&&!s()||e?.focus({preventScroll:n})}if(r)return a(),Zn;const l=requestAnimationFrame(a);return Od=l,()=>{Od===l&&(cancelAnimationFrame(l),Od=0)}}const kb={inert:new WeakMap,"aria-hidden":new WeakMap},zw="data-base-ui-inert",$y={inert:new WeakSet,"aria-hidden":new WeakSet};let Hu=new WeakMap,Sb=0;function dP(e){return $y[e]}function R_(e){return e?So(e)?e.host:R_(e.parentNode):null}const Pw=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=R_(n);return e.contains(r)?r:null}).filter(n=>n!=null),$w=e=>{const t=new Set;return e.forEach(n=>{let r=n;for(;r&&!t.has(r);)t.add(r),r=r.parentNode}),t},Bw=(e,t,n)=>{const r=[],s=a=>{!a||n.has(a)||Array.from(a.children).forEach(l=>{Qn(l)!=="script"&&(t.has(l)?s(l):r.push(l))})};return s(e),r};function pP(e,t,n,r,{mark:s=!0}){let a=null;r?a="inert":n&&(a="aria-hidden");let l=null,c=null;const f=Pw(t,e),d=s?Bw(t,$w(f),new Set(f)):[],h=[],m=[];if(a){const b=kb[a],y=dP(a);c=y,l=b;const k=Pw(t,Array.from(t.querySelectorAll("[aria-live]"))),S=f.concat(k);Bw(t,$w(S),new Set(S)).forEach(E=>{const T=E.getAttribute(a),R=T!==null&&T!=="false",_=(b.get(E)||0)+1;b.set(E,_),h.push(E),_===1&&R&&y.add(E),R||E.setAttribute(a,a==="inert"?"":"true")})}return s&&d.forEach(b=>{const y=(Hu.get(b)||0)+1;Hu.set(b,y),m.push(b),y===1&&b.setAttribute(zw,"")}),Sb+=1,()=>{l&&h.forEach(b=>{const k=(l.get(b)||0)-1;l.set(b,k),k||(!c?.has(b)&&a&&b.removeAttribute(a),c?.delete(b))}),s&&m.forEach(b=>{const y=(Hu.get(b)||0)-1;Hu.set(b,y),y||b.removeAttribute(zw)}),Sb-=1,Sb||(kb.inert=new WeakMap,kb["aria-hidden"]=new WeakMap,$y.inert=new WeakSet,$y["aria-hidden"]=new WeakSet,Hu=new WeakMap)}}function Fw(e,t={}){const{ariaHidden:n=!1,inert:r=!1,mark:s=!0}=t,a=Wt(e[0]).body;return pP(e,a,n,r,{mark:s})}var Di=WR();const hP={style:{transition:"none"}},mP="data-base-ui-click-trigger",gP={fallbackAxisSide:"none"},__={fallbackAxisSide:"end"},bP={clipPath:"inset(50%)",position:"fixed",top:0,left:0},A_=v.createContext(null),N_=()=>v.useContext(A_),yP=Cc("portal");function O_(e={}){const{ref:t,container:n,componentProps:r=$n,elementProps:s}=e,a=Kc(),c=N_()?.portalNode,[f,d]=v.useState(null),[h,m]=v.useState(null),b=Ke(C=>{C!==null&&m(C)}),y=v.useRef(null);Ve(()=>{if(n===null){y.current&&(y.current=null,m(null),d(null));return}if(a==null)return;const C=(n&&(hh(n)?n:n.current))??c??document.body;if(C==null){y.current&&(y.current=null,m(null),d(null));return}y.current!==C&&(y.current=C,m(null),d(C))},[n,c,a]);const k=gn("div",r,{ref:[t,b],props:[{id:a,[yP]:""},s]});return{portalNode:h,portalSubtree:f&&k?Di.createPortal(k,f):null}}const vP=v.forwardRef(function(t,n){const{render:r,className:s,style:a,children:l,container:c,renderGuards:f,...d}=t,{portalNode:h,portalSubtree:m}=O_({container:c,ref:n,componentProps:t,elementProps:d}),b=v.useRef(null),y=v.useRef(null),k=v.useRef(null),S=v.useRef(null),[C,E]=v.useState(null),T=v.useRef(!1),R=C?.modal,_=C?.open,D=typeof f=="boolean"?f:!!C&&!C.modal&&C.open&&!!h;v.useEffect(()=>{if(!h||R)return;function I(P){h&&P.relatedTarget&&fc(P)&&(P.type==="focusin"?T.current&&(Lw(h),T.current=!1):(fP(h),T.current=!0))}return Ki(Dt(h,"focusin",I,!0),Dt(h,"focusout",I,!0))},[h,R]),Ve(()=>{!h||_!==!0||!T.current||(Lw(h),T.current=!1)},[_,h]);const A=v.useMemo(()=>({beforeOutsideRef:b,afterOutsideRef:y,beforeInsideRef:k,afterInsideRef:S,portalNode:h,setFocusManagerState:E}),[h]);return g.jsxs(v.Fragment,{children:[m,g.jsxs(A_.Provider,{value:A,children:[D&&h&&g.jsx(Ip,{"data-type":"outside",ref:b,onFocus:I=>{if(fc(I,h))k.current?.focus();else{const P=C?C.domReference:null;C_(P)?.focus()}}}),D&&h&&g.jsx("span",{"aria-owns":h.id,style:bP}),h&&Di.createPortal(l,h),D&&h&&g.jsx(Ip,{"data-type":"outside",ref:y,onFocus:I=>{if(fc(I,h))S.current?.focus();else{const P=C?C.domReference:null;T_(P)?.focus(),C?.closeOnFocusOut&&C?.onOpenChange(!1,Ct(yh,I.nativeEvent))}}})]})]})});function I_(){const e=new Map;return{emit(t,n){e.get(t)?.forEach(r=>r(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}class xP{nodesRef={current:[]};events=I_();addNode(t){this.nodesRef.current.push(t)}removeNode(t){const n=this.nodesRef.current.findIndex(r=>r===t);n!==-1&&this.nodesRef.current.splice(n,1)}}const M_=v.createContext(null),D_=v.createContext(null),Ul=()=>v.useContext(M_)?.id||null,ga=e=>{const t=v.useContext(D_);return e??t};function kP(e){const t=Kc(),n=ga(e),r=Ul();return Ve(()=>{if(!t)return;const s={id:t,parentId:r};return n?.addNode(s),()=>{n?.removeNode(s)}},[n,t,r]),t}function SP(e){const{children:t,id:n}=e,r=Ul();return g.jsx(M_.Provider,{value:v.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function wP(e){const{children:t,externalTree:n}=e,r=zr(()=>n??new xP).current;return g.jsx(D_.Provider,{value:r,children:t})}function vs(e){return e==null?e:"current"in e?e.current:e}function EP(e,t){const n=vn(gr(e));return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const Uw=20;let mo=[];function Jv(){mo=mo.filter(e=>e.deref()?.isConnected)}function qw(e){Jv(),e&&Qn(e)!=="body"&&(mo.push(new WeakRef(e)),mo.length>Uw&&(mo=mo.slice(-Uw)))}function Hw(){return Jv(),mo[mo.length-1]?.deref()}function TP(e){return e?Qv(e)?e:Th(e)[0]||e:null}function Vw(e){if(e.hasAttribute("tabindex")&&!e.hasAttribute("data-tabindex")||!e.getAttribute("role")?.includes("dialog"))return;const n=w_(e).filter(s=>{const a=s.getAttribute("data-tabindex")||"";return Qv(s)||s.hasAttribute("data-tabindex")&&!a.startsWith("-")}),r=e.getAttribute("tabindex");n.length===0?r!=="0"&&(e.setAttribute("tabindex","0"),e.setAttribute("data-tabindex","0")):(r!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function CP(e){const{context:t,children:n,disabled:r=!1,initialFocus:s=!0,returnFocus:a=!0,restoreFocus:l=!1,modal:c=!0,closeOnFocusOut:f=!0,openInteractionType:d="",nextFocusableElement:h,previousFocusableElement:m,beforeContentFocusGuardRef:b,externalTree:y,getInsideElements:k}=e,S="rootStore"in t?t.rootStore:t,C=S.useState("open"),E=S.useState("domReferenceElement"),T=S.useState("floatingElement"),{events:R,dataRef:_}=S.context,D=Ke(()=>_.current.floatingContext?.nodeId),A=s===!1,I=Ly(E)&&A,P=An(s),$=An(a),O=An(d),Y=An(C),U=ga(y),B=N_(),j=v.useRef(!1),q=v.useRef(!1),H=v.useRef(!1),W=v.useRef(null),F=v.useRef(""),K=v.useRef(""),N=v.useRef(null),z=v.useRef(null),V=xo(N,b,B?.beforeInsideRef),L=xo(z,B?.afterInsideRef),Z=yi(),re=yi(),ie=Tl(),ae=B!=null,le=Np(T),ce=Ke((ue=le)=>ue?Th(ue):[]),Ee=Ke(()=>k?.().filter(ue=>ue!=null)??[]);v.useEffect(()=>{if(r||!c)return;function ue(Se){Se.key==="Tab"&&ht(le,pr(Wt(le)))&&ce().length===0&&!I&&qi(Se)}const ge=Wt(le);return Dt(ge,"keydown",ue)},[r,le,c,I,ce]),v.useEffect(()=>{if(r||!C)return;const ue=Wt(le);function ge(){H.current=!1}function Se(ke){const xe=gr(ke),Ce=Ee(),Me=ht(T,xe)||ht(E,xe)||ht(B?.portalNode,xe)||Ce.some(ze=>ze===xe||ht(ze,xe));H.current=!Me,K.current=ke.pointerType||"keyboard",xe?.closest(`[${mP}]`)&&(q.current=!0,re.start(0,()=>{q.current=!1}))}function Ae(){K.current="keyboard"}return Ki(Dt(ue,"pointerdown",Se,!0),Dt(ue,"pointerup",ge,!0),Dt(ue,"pointercancel",ge,!0),Dt(ue,"keydown",Ae,!0),ge)},[r,T,E,le,C,B,re,Ee]),v.useEffect(()=>{if(r||!f)return;const ue=Wt(le);function ge(){q.current=!0,re.start(0,()=>{q.current=!1})}function Se(Ce){const Me=gr(Ce);Qv(Me)&&(W.current=Me)}function Ae(Ce){const Me=Ce.relatedTarget,ze=Ce.currentTarget,Fe=gr(Ce);c&&Me==null&&Fe!=null&&ht(T,Fe)&&qw(Fe),queueMicrotask(()=>{const ye=D(),_e=S.context.triggerElements,ee=Ee(),fe=Me?.hasAttribute(Cc("focus-guard"))&&[N.current,z.current,B?.beforeInsideRef.current,B?.afterInsideRef.current,B?.beforeOutsideRef.current,B?.afterOutsideRef.current,vs(m),vs(h)].includes(Me),Q=!(ht(E,Me)||ht(T,Me)||ht(Me,T)||ht(B?.portalNode,Me)||ee.some(ne=>ne===Me||ht(ne,Me))||Me!=null&&_e.hasElement(Me)||_e.hasMatchingElement(ne=>ht(ne,Me))||fe||U&&(wo(U.nodesRef.current,ye).find(ne=>ht(ne.context?.elements.floating,Me)||ht(ne.context?.elements.domReference,Me))||jw(U.nodesRef.current,ye).find(ne=>[ne.context?.elements.floating,Np(ne.context?.elements.floating)].includes(Me)||ne.context?.elements.domReference===Me)));if(ze===E&&le&&Vw(le),l&&ze!==E&&!Eh(Fe)&&pr(ue)===ue.body){if(Ft(le)&&(le.focus(),l==="popup")){ie.request(()=>{le.focus()});return}const ne=ce(),we=W.current,Pe=(we&&ne.includes(we)?we:null)||ne[ne.length-1]||le;Ft(Pe)&&Pe.focus()}if(_.current.insideReactTree){_.current.insideReactTree=!1;return}(I||!c)&&Me&&Q&&!q.current&&(I||Me!==Hw())&&(j.current=!0,S.setOpen(!1,Ct(yh,Ce)))})}function ke(){H.current||(_.current.insideReactTree=!0,Z.start(0,()=>{_.current.insideReactTree=!1}))}const xe=Ft(E)?E:null;if(!(!T&&!xe))return Ki(xe&&Dt(xe,"focusout",Ae),xe&&Dt(xe,"pointerdown",ge),T&&Dt(T,"focusin",Se),T&&Dt(T,"focusout",Ae),T&&B&&Dt(T,"focusout",ke,!0))},[r,E,T,le,c,U,B,S,f,l,ce,I,D,_,Z,re,ie,h,m,Ee]),v.useEffect(()=>{if(r||!T||!C)return;const ue=Array.from(B?.portalNode?.querySelectorAll(`[${Cc("portal")}]`)||[]),Se=(U?jw(U.nodesRef.current,D()):[]).find(ze=>Ly(ze.context?.elements.domReference||null))?.context?.elements.domReference,ke=[...[T,...ue,N.current,z.current,B?.beforeOutsideRef.current,B?.afterOutsideRef.current,...Ee()],Se,vs(m),vs(h),I?E:null].filter(ze=>ze!=null),xe=Fw(ke,{ariaHidden:c||I,mark:!1}),Ce=[T,...ue].filter(ze=>ze!=null),Me=Fw(Ce);return()=>{Me(),xe()}},[C,r,E,T,c,B,I,U,D,h,m,Ee]),Ve(()=>{if(!C||r||!Ft(le))return;const ue=Wt(le),ge=pr(ue);queueMicrotask(()=>{const Se=P.current,Ae=typeof Se=="function"?Se(O.current||""):Se;if(Ae===void 0||Ae===!1||ht(le,ge))return;let xe=null;const Ce=()=>(xe==null&&(xe=ce(le)),xe[0]||le);let Me;Ae===!0||Ae===null?Me=Ce():Me=vs(Ae),Me=Me||Ce();const ze=ht(le,pr(ue));yp(Me,{preventScroll:Me===le,shouldFocus(){if(!Y.current)return!1;if(ze)return!0;const Fe=pr(ue);return!(Fe!==Me&&ht(le,Fe))}})})},[r,C,le,ce,P,O,Y]),Ve(()=>{if(r||!le)return;const ue=Wt(le),ge=pr(ue),Se=O.current==null;qw(ge);function Ae(xe){if(xe.open||(F.current=EP(xe.nativeEvent,K.current)),xe.reason===Sr&&xe.nativeEvent.type==="mouseleave"&&(j.current=!0),xe.reason===qv)if(xe.nested)j.current=!1;else if(Wv(xe.nativeEvent)||u_(xe.nativeEvent))j.current=!1;else{let Ce=!1;Wt(le).createElement("div").focus({get preventScroll(){return Ce=!0,!1}}),Ce?j.current=!1:j.current=!0}}R.on("openchange",Ae);function ke(){const xe=$.current;let Ce=typeof xe=="function"?xe(F.current):xe;if(Ce===void 0||Ce===!1)return null;Ce===null&&(Ce=!0);const Me=E?.isConnected?E:null,ze=ge?.isConnected&&Qn(ge)!=="body"?ge:null;let Fe=Se?ze||Me:Me||ze;return Fe||(Fe=Hw()||null),typeof Ce=="boolean"?Fe:vs(Ce)||Fe||null}return()=>{R.off("openchange",Ae);const xe=pr(ue),Ce=Ee(),Me=ht(T,xe)||Ce.some(ye=>ye===xe||ht(ye,xe))||U&&wo(U.nodesRef.current,D(),!1).some(ye=>ht(ye.context?.elements.floating,xe)),ze=$.current,Fe=ke();queueMicrotask(()=>{const ye=TP(Fe),_e=typeof ze!="boolean";ze&&!j.current&&Ft(ye)&&(!(!_e&&ye!==xe&&xe!==ue.body)||Me)&&ye.focus({preventScroll:!0}),j.current=!1})}},[r,T,le,$,O,R,U,E,D,Ee]),Ve(()=>{if(!Co||C||!T)return;const ue=pr(Wt(T));!Ft(ue)||!wh(ue)||ht(T,ue)&&ue.blur()},[C,T]),Ve(()=>{if(!(r||!B))return B.setFocusManagerState({modal:c,closeOnFocusOut:f,open:C,onOpenChange:S.setOpen,domReference:E}),()=>{B.setFocusManagerState(null)}},[r,B,c,C,S,f,E]),Ve(()=>{if(!(r||!le))return Vw(le),()=>{queueMicrotask(Jv)}},[r,le]);const be=!r&&(c?!I:!0)&&(ae||c);return g.jsxs(v.Fragment,{children:[be&&g.jsx(Ip,{"data-type":"inside",ref:V,onFocus:ue=>{if(c){const ge=ce();yp(ge[ge.length-1])}else B?.portalNode&&(j.current=!1,fc(ue,B.portalNode)?T_(E)?.focus():vs(m??B.beforeOutsideRef)?.focus())}}),n,be&&g.jsx(Ip,{"data-type":"inside",ref:L,onFocus:ue=>{c?yp(ce()[0]):B?.portalNode&&(f&&(j.current=!0),fc(ue,B.portalNode)?C_(E)?.focus():vs(h??B.afterOutsideRef)?.focus())}})]})}function RP(e,t={}){const{enabled:n=!0,event:r="click",toggle:s=!0,ignoreMouse:a=!1,stickIfOpen:l=!0,touchOpenDelay:c=0,reason:f=Bl}=t,d="rootStore"in e?e.rootStore:e,h=d.context.dataRef,m=v.useRef(void 0),b=Tl(),y=yi(),k=v.useMemo(()=>{function S(E,T,R,_){const D=Ct(f,T,R);E&&_==="touch"&&c>0?y.start(c,()=>{d.setOpen(!0,D)}):d.setOpen(E,D)}function C(E,T,R){const _=h.current.openEvent,D=d.select("domReferenceElement")!==T;return E&&D||!E||!s?!0:_&&l?!R(_.type):!1}return{onPointerDown(E){m.current=E.pointerType},onMouseDown(E){const T=m.current,R=E.nativeEvent,_=d.select("open");if(E.button!==0||r==="click"||oa(T,!0)&&a)return;const D=C(_,E.currentTarget,P=>P==="click"||P==="mousedown"),A=gr(R);if(wh(A)){S(D,R,A,T);return}const I=E.currentTarget;b.request(()=>{S(D,R,I,T)})},onClick(E){if(r==="mousedown-only")return;const T=m.current;if(r==="mousedown"&&T){m.current=void 0;return}if(oa(T,!0)&&a)return;const R=d.select("open"),_=C(R,E.currentTarget,D=>D==="click"||D==="mousedown"||D==="keydown"||D==="keyup");S(_,E.nativeEvent,E.currentTarget,T)},onKeyDown(){m.current=void 0}}},[h,r,a,f,d,l,s,b,y,c]);return v.useMemo(()=>n?{reference:k}:$n,[n,k])}function _P(e,t){let n=null,r=null,s=!1;return{contextElement:e||void 0,getBoundingClientRect(){const a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},l=t.axis==="x"||t.axis==="both",c=t.axis==="y"||t.axis==="both",f=["mouseenter","mousemove"].includes(t.dataRef.current.openEvent?.type||"")&&t.pointerType!=="touch";let d=a.width,h=a.height,m=a.x,b=a.y;return n==null&&t.x&&l&&(n=a.x-t.x),r==null&&t.y&&c&&(r=a.y-t.y),m-=n||0,b-=r||0,d=0,h=0,!s||f?(d=t.axis==="y"?a.width:0,h=t.axis==="x"?a.height:0,m=l&&t.x!=null?t.x:m,b=c&&t.y!=null?t.y:b):s&&!f&&(h=t.axis==="x"?a.height:h,d=t.axis==="y"?a.width:d),s=!0,{width:d,height:h,x:m,y:b,top:b,right:m+d,bottom:b+h,left:m}}}}function Gw(e){return e!=null&&e.clientX!=null}function AP(e,t={}){const{enabled:n=!0,axis:r="both"}=t,s="rootStore"in e?e.rootStore:e,a=s.useState("open"),l=s.useState("floatingElement"),c=s.useState("domReferenceElement"),f=s.context.dataRef,d=v.useRef(!1),h=v.useRef(null),[m,b]=v.useState(),[y,k]=v.useState([]),S=Ke(_=>{s.set("positionReference",_)}),C=Ke((_,D,A)=>{d.current||f.current.openEvent&&!Gw(f.current.openEvent)||s.set("positionReference",_P(A??c,{x:_,y:D,axis:r,dataRef:f,pointerType:m}))}),E=Ke(_=>{a?h.current||(C(_.clientX,_.clientY,_.currentTarget),k([])):C(_.clientX,_.clientY,_.currentTarget)}),T=oa(m)?l:a;v.useEffect(()=>{if(!n){S(c);return}if(!T)return;function _(){h.current?.(),h.current=null}const D=vn(l);function A(I){const P=gr(I);ht(l,P)?_():C(I.clientX,I.clientY)}return!f.current.openEvent||Gw(f.current.openEvent)?h.current=Dt(D,"mousemove",A):S(c),_},[T,n,l,f,c,s,C,S,y]),v.useEffect(()=>()=>{s.set("positionReference",null)},[s]),v.useEffect(()=>{n&&!l&&(d.current=!1)},[n,l]),v.useEffect(()=>{!n&&a&&(d.current=!0)},[n,a]);const R=v.useMemo(()=>{function _(D){b(D.pointerType)}return{onPointerDown:_,onPointerEnter:_,onMouseMove:E,onMouseEnter:E}},[E]);return v.useMemo(()=>n?{reference:R,trigger:R}:{},[n,R])}function NP(){return!1}function OP(e){return{escapeKey:typeof e=="boolean"?e:e?.escapeKey??!1,outsidePress:typeof e=="boolean"?e:e?.outsidePress??!0}}function ex(e,t={}){const{enabled:n=!0,escapeKey:r=!0,outsidePress:s=!0,outsidePressEvent:a="sloppy",referencePress:l=NP,bubbles:c,externalTree:f}=t,d="rootStore"in e?e.rootStore:e,h=d.useState("open"),m=d.useState("floatingElement"),{dataRef:b}=d.context,y=ga(f),k=Ke(typeof s=="function"?s:()=>!1),S=typeof s=="function"?k:s,C=S!==!1,E=Ke(()=>a),{escapeKey:T,outsidePress:R}=OP(c),_=v.useRef(!1),D=v.useRef(!1),A=v.useRef(!1),I=v.useRef(!1),P=v.useRef(""),$=v.useRef(null),O=yi(),Y=yi(),U=Ke(()=>{Y.clear(),b.current.insideReactTree=!1}),B=Ke(V=>{const L=b.current.floatingContext?.nodeId;return(y?wo(y.nodesRef.current,L):[]).some(re=>re.context?.open&&!re.context.dataRef.current[V])}),j=Ke(V=>vb(V,d.select("floatingElement"))||vb(V,d.select("domReferenceElement"))),q=Ke(V=>{l()&&d.setOpen(!1,Ct(Bl,V.nativeEvent))}),H=Ke(V=>{if(!h||!n||!r||V.key!=="Escape"||I.current||!T&&B("__escapeKeyBubbles"))return;const L=zz(V)?V.nativeEvent:V,Z=Ct(Hv,L);d.setOpen(!1,Z),Z.isCanceled||V.preventDefault(),!T&&!Z.isPropagationAllowed&&V.stopPropagation()}),W=Ke(()=>{b.current.insideReactTree=!0,Y.start(0,U)}),F=Ke(V=>{if(!h||!n||V.button!==0)return;const L=gr(V.nativeEvent);ht(d.select("floatingElement"),L)&&(_.current||(_.current=!0,D.current=!1))}),K=Ke(V=>{!h||!n||(V.defaultPrevented||V.nativeEvent.defaultPrevented)&&_.current&&(D.current=!0)});v.useEffect(()=>{if(!h||!n)return;b.current.__escapeKeyBubbles=T,b.current.__outsidePressBubbles=R;const V=new Ii,L=new Ii;function Z(){V.clear(),I.current=!0}function re(){V.start(Co?5:0,()=>{I.current=!1})}function ie(){A.current=!0,L.start(0,()=>{A.current=!1})}function ae(){_.current=!1,D.current=!1}function le(){const ee=P.current,fe=ee==="pen"||!ee?"mouse":ee,Q=E(),ne=typeof Q=="function"?Q():Q;return typeof ne=="string"?ne:ne[fe]}function ce(ee){const fe=le();return fe==="intentional"&&ee.type!=="click"||fe==="sloppy"&&ee.type==="click"}function Ee(ee){const fe=b.current.floatingContext?.nodeId,Q=y&&wo(y.nodesRef.current,fe).some(ne=>vb(ee,ne.context?.elements.floating));return j(ee)||Q}function be(ee){if(ce(ee)){ee.type!=="click"&&!j(ee)&&(L.clear(),A.current=!1),U();return}if(b.current.insideReactTree){U();return}const fe=gr(ee),Q=`[${Cc("inert")}]`,ne=gt(fe)?fe.getRootNode():null,we=Array.from((So(ne)?ne:Wt(d.select("floatingElement"))).querySelectorAll(Q)),Pe=d.context.triggerElements;if(fe&&(Pe.hasElement(fe)||Pe.hasMatchingElement(Ze=>ht(Ze,fe))))return;let Ye=gt(fe)?fe:null;for(;Ye&&!Ai(Ye);){const Ze=As(Ye);if(Ai(Ze)||!gt(Ze))break;Ye=Ze}if(!(we.length&&gt(fe)&&!$z(fe)&&!ht(fe,d.select("floatingElement"))&&we.every(Ze=>!ht(Ye,Ze)))){if(Ft(fe)&&!("touches"in ee)){const Ze=Ai(fe),bt=Tr(fe),Je=/auto|scroll/,vt=Ze||Je.test(bt.overflowX),kt=Ze||Je.test(bt.overflowY),nt=vt&&fe.clientWidth>0&&fe.scrollWidth>fe.clientWidth,rt=kt&&fe.clientHeight>0&&fe.scrollHeight>fe.clientHeight,ct=bt.direction==="rtl",it=rt&&(ct?ee.offsetX<=fe.offsetWidth-fe.clientWidth:ee.offsetX>fe.clientWidth),ft=nt&&ee.offsetY>fe.clientHeight;if(it||ft)return}if(!Ee(ee)){if(le()==="intentional"&&A.current){L.clear(),A.current=!1;return}typeof S=="function"&&!S(ee)||B("__outsidePressBubbles")||(d.setOpen(!1,Ct(qv,ee)),U())}}}function ue(ee){le()!=="sloppy"||ee.pointerType==="touch"||!d.select("open")||!n||j(ee)||be(ee)}function ge(ee){if(le()!=="sloppy"||!d.select("open")||!n||j(ee))return;const fe=ee.touches[0];fe&&($.current={startTime:Date.now(),startX:fe.clientX,startY:fe.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},O.start(1e3,()=>{$.current&&($.current.dismissOnTouchEnd=!1,$.current.dismissOnMouseDown=!1)}))}function Se(ee,fe){const Q=gr(ee);if(!Q)return;const ne=Dt(Q,ee.type,()=>{fe(ee),ne()})}function Ae(ee){P.current="touch",Se(ee,ge)}function ke(ee){O.clear(),ee.type==="pointerdown"&&(P.current=ee.pointerType),!(ee.type==="mousedown"&&$.current&&!$.current.dismissOnMouseDown)&&Se(ee,fe=>{fe.type==="pointerdown"?ue(fe):be(fe)})}function xe(ee){if(!_.current)return;const fe=D.current;if(ae(),le()==="intentional"){if(ee.type==="pointercancel"){fe&&ie();return}if(!Ee(ee)){if(fe){ie();return}typeof S=="function"&&!S(ee)||(L.clear(),A.current=!0,U())}}}function Ce(ee){if(le()!=="sloppy"||!$.current||j(ee))return;const fe=ee.touches[0];if(!fe)return;const Q=Math.abs(fe.clientX-$.current.startX),ne=Math.abs(fe.clientY-$.current.startY),we=Math.sqrt(Q*Q+ne*ne);we>5&&($.current.dismissOnTouchEnd=!0),we>10&&(be(ee),O.clear(),$.current=null)}function Me(ee){Se(ee,Ce)}function ze(ee){le()!=="sloppy"||!$.current||j(ee)||($.current.dismissOnTouchEnd&&be(ee),O.clear(),$.current=null)}function Fe(ee){Se(ee,ze)}const ye=Wt(m),_e=Ki(r&&Ki(Dt(ye,"keydown",H),Dt(ye,"compositionstart",Z),Dt(ye,"compositionend",re)),C&&Ki(Dt(ye,"click",ke,!0),Dt(ye,"pointerdown",ke,!0),Dt(ye,"pointerup",xe,!0),Dt(ye,"pointercancel",xe,!0),Dt(ye,"mousedown",ke,!0),Dt(ye,"mouseup",xe,!0),Dt(ye,"touchstart",Ae,!0),Dt(ye,"touchmove",Me,!0),Dt(ye,"touchend",Fe,!0)));return()=>{_e(),V.clear(),L.clear(),ae(),A.current=!1}},[b,m,r,C,S,h,n,T,R,H,U,E,B,j,y,d,O]),v.useEffect(U,[S,U]);const N=v.useMemo(()=>({onKeyDown:H,onPointerDown:q,onClick:q}),[H,q]),z=v.useMemo(()=>({onKeyDown:H,onPointerDown:K,onMouseDown:K,onClickCapture:W,onMouseDownCapture(V){W(),F(V)},onPointerDownCapture(V){W(),F(V)},onMouseUpCapture:W,onTouchEndCapture:W,onTouchMoveCapture:W}),[H,W,F,K]);return v.useMemo(()=>n?{reference:N,floating:z,trigger:N}:{},[n,N,z])}function Ww(e,t,n){let{reference:r,floating:s}=e;const a=gi(t),l=Zv(t),c=Xv(l),f=ti(t),d=a==="y",h=r.x+r.width/2-s.width/2,m=r.y+r.height/2-s.height/2,b=r[c]/2-s[c]/2;let y;switch(f){case"top":y={x:h,y:r.y-s.height};break;case"bottom":y={x:h,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:m};break;case"left":y={x:r.x-s.width,y:m};break;default:y={x:r.x,y:r.y}}const k=Ro(t);return k&&(y[l]+=b*(k==="end"?1:-1)*(n&&d?-1:1)),y}async function IP(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:a,rects:l,elements:c,strategy:f}=e,{boundary:d="clippingAncestors",rootBoundary:h="viewport",elementContext:m="floating",altBoundary:b=!1,padding:y=0}=Ns(t,e),k=g_(y),C=c[b?m==="floating"?"reference":"floating":m],E=Tc(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(C)))==null||n?C:C.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:d,rootBoundary:h,strategy:f})),T=m==="floating"?{x:r,y:s,width:l.floating.width,height:l.floating.height}:l.reference,R=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating)),_=await(a.isElement==null?void 0:a.isElement(R))&&await(a.getScale==null?void 0:a.getScale(R))||{x:1,y:1},D=Tc(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:T,offsetParent:R,strategy:f}):T);return{top:(E.top-D.top+k.top)/_.y,bottom:(D.bottom-E.bottom+k.bottom)/_.y,left:(E.left-D.left+k.left)/_.x,right:(D.right-E.right+k.right)/_.x}}const MP=50,DP=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:l}=n,c=l.detectOverflow?l:{...l,detectOverflow:IP},f=await(l.isRTL==null?void 0:l.isRTL(t));let d=await l.getElementRects({reference:e,floating:t,strategy:s}),{x:h,y:m}=Ww(d,r,f),b=r,y=0;const k={};for(let S=0;S<a.length;S++){const C=a[S];if(!C)continue;const{name:E,fn:T}=C,{x:R,y:_,data:D,reset:A}=await T({x:h,y:m,initialPlacement:r,placement:b,strategy:s,middlewareData:k,rects:d,platform:c,elements:{reference:e,floating:t}});h=R??h,m=_??m,k[E]={...k[E],...D},A&&y<MP&&(y++,typeof A=="object"&&(A.placement&&(b=A.placement),A.rects&&(d=A.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:s}):A.rects),{x:h,y:m}=Ww(d,b,f)),S=-1)}return{x:h,y:m,placement:b,strategy:s,middlewareData:k}},LP=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:s,middlewareData:a,rects:l,initialPlacement:c,platform:f,elements:d}=t,{mainAxis:h=!0,crossAxis:m=!0,fallbackPlacements:b,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:k="none",flipAlignment:S=!0,...C}=Ns(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const E=ti(s),T=gi(c),R=ti(c)===c,_=await(f.isRTL==null?void 0:f.isRTL(d.floating)),D=b||(R||!S?[Mp(c)]:Jz(c)),A=k!=="none";!b&&A&&D.push(...rP(c,S,k,_));const I=[c,...D],P=await f.detectOverflow(t,C),$=[];let O=((r=a.flip)==null?void 0:r.overflows)||[];if(h&&$.push(P[E]),m){const j=Qz(s,l,_);$.push(P[j[0]],P[j[1]])}if(O=[...O,{placement:s,overflows:$}],!$.every(j=>j<=0)){var Y,U;const j=(((Y=a.flip)==null?void 0:Y.index)||0)+1,q=I[j];if(q&&(!(m==="alignment"?T!==gi(q):!1)||O.every(F=>gi(F.placement)===T?F.overflows[0]>0:!0)))return{data:{index:j,overflows:O},reset:{placement:q}};let H=(U=O.filter(W=>W.overflows[0]<=0).sort((W,F)=>W.overflows[1]-F.overflows[1])[0])==null?void 0:U.placement;if(!H)switch(y){case"bestFit":{var B;const W=(B=O.filter(F=>{if(A){const K=gi(F.placement);return K===T||K==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(K=>K>0).reduce((K,N)=>K+N,0)]).sort((F,K)=>F[1]-K[1])[0])==null?void 0:B[0];W&&(H=W);break}case"initialPlacement":H=c;break}if(s!==H)return{reset:{placement:H}}}return{}}}};function Kw(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Yw(e){return Xz.some(t=>e[t]>=0)}const jP=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:s="referenceHidden",...a}=Ns(e,t);switch(s){case"referenceHidden":{const l=await r.detectOverflow(t,{...a,elementContext:"reference"}),c=Kw(l,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Yw(c)}}}case"escaped":{const l=await r.detectOverflow(t,{...a,altBoundary:!0}),c=Kw(l,n.floating);return{data:{escapedOffsets:c,escaped:Yw(c)}}}default:return{}}}}},L_=new Set(["left","top"]);async function zP(e,t){const{placement:n,platform:r,elements:s}=e,a=await(r.isRTL==null?void 0:r.isRTL(s.floating)),l=ti(n),c=Ro(n),f=gi(n)==="y",d=L_.has(l)?-1:1,h=a&&f?-1:1,m=Ns(t,e);let{mainAxis:b,crossAxis:y,alignmentAxis:k}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof k=="number"&&(y=c==="end"?k*-1:k),f?{x:y*h,y:b*d}:{x:b*d,y:y*h}}const PP=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:a,placement:l,middlewareData:c}=t,f=await zP(t,e);return l===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:s+f.x,y:a+f.y,data:{...f,placement:l}}}}},$P=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s,platform:a}=t,{mainAxis:l=!0,crossAxis:c=!1,limiter:f={fn:T=>{let{x:R,y:_}=T;return{x:R,y:_}}},...d}=Ns(e,t),h={x:n,y:r},m=await a.detectOverflow(t,d),b=gi(s),y=Yv(b);let k=h[y],S=h[b];const C=(T,R)=>m_(R+m[T==="y"?"top":"left"],R,R-m[T==="y"?"bottom":"right"]);l&&(k=C(y,k)),c&&(S=C(b,S));const E=f.fn({...t,[y]:k,[b]:S});return{...E,data:{x:E.x-n,y:E.y-r,enabled:{[y]:l,[b]:c}}}}}},BP=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,r;const{x:s,y:a,placement:l,rects:c,middlewareData:f}=t,{offset:d=0,mainAxis:h=!0,crossAxis:m=!0}=Ns(e,t),b={x:s,y:a},y=gi(l),k=Yv(y);let S=b[k],C=b[y];const E=Ns(d,t),T=typeof E=="number"?{mainAxis:E,crossAxis:0}:{mainAxis:(n=E.mainAxis)!=null?n:0,crossAxis:(r=E.crossAxis)!=null?r:0};if(h){const D=k==="y"?"height":"width",A=c.reference[k]-c.floating[D]+T.mainAxis,I=c.reference[k]+c.reference[D]-T.mainAxis;S<A?S=A:S>I&&(S=I)}if(m){var R,_;const D=k==="y"?"width":"height",A=L_.has(ti(l)),I=c.reference[y]-c.floating[D]+(A&&((R=f.offset)==null?void 0:R[y])||0)+(A?0:T.crossAxis),P=c.reference[y]+c.reference[D]+(A?0:((_=f.offset)==null?void 0:_[y])||0)-(A?T.crossAxis:0);C<I?C=I:C>P&&(C=P)}return{[k]:S,[y]:C}}}},FP=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:s,elements:a}=t,{apply:l=()=>{},...c}=Ns(e,t),f=await s.detectOverflow(t,c),d=ti(n),h=Ro(n),m=gi(n)==="y",{width:b,height:y}=r.floating;let k,S;d==="top"||d==="bottom"?(k=d,S=h===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(S=d,k=h==="end"?"top":"bottom");const C=y-f.top-f.bottom,E=b-f.left-f.right,T=Cl(y-f[k],C),R=Cl(b-f[S],E),_=t.middlewareData.shift,D=!_;let A=T,I=R;_!=null&&_.enabled.x&&(I=E),_!=null&&_.enabled.y&&(A=C),D&&!h&&(m?I=b-2*Cs(f.left,f.right):A=y-2*Cs(f.top,f.bottom)),await l({...t,availableWidth:I,availableHeight:A});const P=await s.getDimensions(a.floating);return b!==P.width||y!==P.height?{reset:{rects:!0}}:{}}}};function j_(e){const t=Tr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Ft(e),a=s?e.offsetWidth:n,l=s?e.offsetHeight:r,c=Rl(n)!==a||Rl(r)!==l;return c&&(n=a,r=l),{width:n,height:r,$:c}}function tx(e){return gt(e)?e:e.contextElement}function vl(e){const t=tx(e);if(!Ft(t))return Rs(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=j_(t);let l=(a?Rl(n.width):n.width)/r,c=(a?Rl(n.height):n.height)/s;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const UP=Rs(0);function z_(e){const t=vn(e);return!gh()||!t.visualViewport?UP:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function qP(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===vn(e)}function aa(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=tx(e);let l=Rs(1);t&&(r?gt(r)&&(l=vl(r)):l=vl(e));const c=qP(a,n,r)?z_(a):Rs(0);let f=(s.left+c.x)/l.x,d=(s.top+c.y)/l.y,h=s.width/l.x,m=s.height/l.y;if(a&&r){const b=vn(a),y=gt(r)?vn(r):r;let k=b,S=Iy(k);for(;S&&y!==k;){const C=vl(S),E=S.getBoundingClientRect(),T=Tr(S),R=E.left+(S.clientLeft+parseFloat(T.paddingLeft))*C.x,_=E.top+(S.clientTop+parseFloat(T.paddingTop))*C.y;f*=C.x,d*=C.y,h*=C.x,m*=C.y,f+=R,d+=_,k=vn(S),S=Iy(k)}}return Tc({width:h,height:m,x:f,y:d})}function Ch(e,t){const n=bh(e).scrollLeft;return t?t.left+n:aa(Is(e)).left+n}function P_(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Ch(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function HP(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const a=s==="fixed",l=Is(r),c=t?mh(t.floating):!1;if(r===l||c&&a)return n;let f={scrollLeft:0,scrollTop:0},d=Rs(1);const h=Rs(0),m=Ft(r);if((m||!a)&&((Qn(r)!=="body"||ma(l))&&(f=bh(r)),m)){const y=aa(r);d=vl(r),h.x=y.x+r.clientLeft,h.y=y.y+r.clientTop}const b=l&&!m&&!a?P_(l,f):Rs(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-f.scrollLeft*d.x+h.x+b.x,y:n.y*d.y-f.scrollTop*d.y+h.y+b.y}}function VP(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function GP(e){const t=bh(e),n=e.ownerDocument.body,r=Cs(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),s=Cs(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let a=-t.scrollLeft+Ch(e);const l=-t.scrollTop;return Tr(n).direction==="rtl"&&(a+=Cs(e.clientWidth,n.clientWidth)-r),{width:r,height:s,x:a,y:l}}const WP=25;function KP(e,t,n){n===void 0&&(n="viewport");const r=n==="layoutViewport",s=vn(e),a=Is(e),l=s.visualViewport;let c=a.clientWidth,f=a.clientHeight,d=0,h=0;if(l){const b=!gh()||t==="fixed";r?b||(d=-l.offsetLeft,h=-l.offsetTop):(c=l.width,f=l.height,b&&(d=l.offsetLeft,h=l.offsetTop))}if(Ch(a)<=0){const b=a.ownerDocument,y=b.body,k=getComputedStyle(y),S=b.compatMode==="CSS1Compat"&&parseFloat(k.marginLeft)+parseFloat(k.marginRight)||0,C=Math.abs(a.clientWidth-y.clientWidth-S),E=getComputedStyle(a).scrollbarGutter==="stable both-edges"?C/2:C;E<=WP&&(c-=E)}return{width:c,height:f,x:d,y:h}}function YP(e,t){const n=aa(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,a=vl(e),l=e.clientWidth*a.x,c=e.clientHeight*a.y,f=s*a.x,d=r*a.y;return{width:l,height:c,x:f,y:d}}function Xw(e,t,n){let r;if(t==="viewport"||t==="layoutViewport")r=KP(e,n,t);else if(t==="document")r=GP(Is(e));else if(gt(t))r=YP(t,n);else{const s=z_(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Tc(r)}function XP(e,t){const n=t.get(e);if(n)return n;let r=bo(e,[],!1).filter(c=>gt(c)&&Qn(c)!=="body"),s=null;const a=Tr(e).position==="fixed";let l=a?As(e):e;for(;gt(l)&&!Ai(l);){const c=Tr(l),f=Fv(l),d=s?s.position:a?"fixed":"";!f&&(d==="fixed"||d==="absolute"&&c.position==="static")?r=r.filter(m=>m!==l):s=c,l=As(l)}return t.set(e,r),r}function ZP(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const l=[...n==="clippingAncestors"?mh(t)?[]:XP(t,this._c):[].concat(n),r],c=Xw(t,l[0],s);let f=c.top,d=c.right,h=c.bottom,m=c.left;for(let b=1;b<l.length;b++){const y=Xw(t,l[b],s);f=Cs(y.top,f),d=Cl(y.right,d),h=Cl(y.bottom,h),m=Cs(y.left,m)}return{width:d-m,height:h-f,x:m,y:f}}function QP(e){const{width:t,height:n}=j_(e);return{width:t,height:n}}function JP(e,t,n){const r=Ft(t),s=Is(t),a=n==="fixed",l=aa(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const f=Rs(0);if((r||!a)&&((Qn(t)!=="body"||ma(s))&&(c=bh(t)),r)){const b=aa(t,!0,a,t);f.x=b.x+t.clientLeft,f.y=b.y+t.clientTop}!r&&s&&(f.x=Ch(s));const d=s&&!r&&!a?P_(s,c):Rs(0),h=l.left+c.scrollLeft-f.x-d.x,m=l.top+c.scrollTop-f.y-d.y;return{x:h,y:m,width:l.width,height:l.height}}function wb(e){return Tr(e).position==="static"}function Zw(e,t){if(!Ft(e)||Tr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Is(e)===n&&(n=n.ownerDocument.body),n}function $_(e,t){const n=vn(e);if(mh(e))return n;if(!Ft(e)){let s=As(e);for(;s&&!Ai(s);){if(gt(s)&&!wb(s))return s;s=As(s)}return n}let r=Zw(e,t);for(;r&&bz(r)&&wb(r);)r=Zw(r,t);return r&&Ai(r)&&wb(r)&&!Fv(r)?n:r||xz(e)||n}const e$=async function(e){const t=this.getOffsetParent||$_,n=this.getDimensions,r=await n(e.floating);return{reference:JP(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function t$(e){return Tr(e).direction==="rtl"}const B_={convertOffsetParentRelativeRectToViewportRelativeRect:HP,getDocumentElement:Is,getClippingRect:ZP,getOffsetParent:$_,getElementRects:e$,getClientRects:VP,getDimensions:QP,getScale:vl,isElement:gt,isRTL:t$};function F_(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function n$(e,t,n){let r=null,s;const a=Is(e);function l(){var h;clearTimeout(s),(h=r)==null||h.disconnect(),r=null}function c(h,m){h===void 0&&(h=!1),m===void 0&&(m=1),l();const b=e.getBoundingClientRect(),{left:y,top:k,width:S,height:C}=b;if(h||t(),!S||!C)return;const E=ml(k),T=ml(a.clientWidth-(y+S)),R=ml(a.clientHeight-(k+C)),_=ml(y),A={rootMargin:-E+"px "+-T+"px "+-R+"px "+-_+"px",threshold:Cs(0,Cl(1,m))||1};let I=!0;function P($){const O=$[0].intersectionRatio;if(!F_(b,e.getBoundingClientRect()))return c();if(O!==m){if(!I)return c();O?c(!1,O):s=setTimeout(()=>{c(!1,1e-7)},1e3)}I=!1}try{r=new IntersectionObserver(P,{...A,root:a.ownerDocument})}catch{r=new IntersectionObserver(P,A)}r.observe(e)}const f=vn(e),d=()=>c(n);return f.addEventListener("resize",d),c(!0),()=>{f.removeEventListener("resize",d),l()}}function Lp(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:a=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:f=!1}=r,d=tx(e),h=s||a?[...d?bo(d):[],...t?bo(t):[]]:[];h.forEach(E=>{s&&E.addEventListener("scroll",n),a&&E.addEventListener("resize",n)});const m=d&&c?n$(d,n,a):null;let b=-1,y=null;l&&(y=new ResizeObserver(E=>{let[T]=E;T&&T.target===d&&y&&t&&(y.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var R;(R=y)==null||R.observe(t)})),n()}),d&&!f&&y.observe(d),t&&y.observe(t));let k,S=f?aa(e):null;f&&C();function C(){const E=aa(e);S&&!F_(S,E)&&n(),S=E,k=requestAnimationFrame(C)}return n(),()=>{var E;h.forEach(T=>{s&&T.removeEventListener("scroll",n),a&&T.removeEventListener("resize",n)}),m?.(),(E=y)==null||E.disconnect(),y=null,f&&cancelAnimationFrame(k)}}const r$=PP,i$=$P,s$=LP,o$=FP,a$=jP,l$=BP,u$=(e,t,n)=>{const r=new Map,s=n??{},a={...B_,...s.platform,_c:r};return DP(e,t,{...s,platform:a})};var c$=typeof document<"u",f$=function(){},vp=c$?v.useLayoutEffect:f$;function jp(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!jp(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const a=s[r];if(!(a==="_owner"&&e.$$typeof)&&!jp(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function U_(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Qw(e,t){const n=U_(e);return Math.round(t*n)/n}function Eb(e){const t=v.useRef(e);return vp(()=>{t.current=e}),t}function q_(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:a,floating:l}={},transform:c=!0,whileElementsMounted:f,open:d}=e,[h,m]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[b,y]=v.useState(r);jp(b,r)||y(r);const[k,S]=v.useState(null),[C,E]=v.useState(null),T=v.useCallback(F=>{F!==A.current&&(A.current=F,S(F))},[]),R=v.useCallback(F=>{F!==I.current&&(I.current=F,E(F))},[]),_=a||k,D=l||C,A=v.useRef(null),I=v.useRef(null),P=v.useRef(h),$=f!=null,O=Eb(f),Y=Eb(s),U=Eb(d),B=v.useCallback(()=>{if(!A.current||!I.current)return;const F={placement:t,strategy:n,middleware:b};Y.current&&(F.platform=Y.current),u$(A.current,I.current,F).then(K=>{const N={...K,isPositioned:U.current!==!1};j.current&&!jp(P.current,N)&&(P.current=N,Di.flushSync(()=>{m(N)}))})},[b,t,n,Y,U]);vp(()=>{d===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,m(F=>({...F,isPositioned:!1})))},[d]);const j=v.useRef(!1);vp(()=>(j.current=!0,()=>{j.current=!1}),[]),vp(()=>{if(_&&(A.current=_),D&&(I.current=D),_&&D){if(O.current)return O.current(_,D,B);B()}},[_,D,B,O,$]);const q=v.useMemo(()=>({reference:A,floating:I,setReference:T,setFloating:R}),[T,R]),H=v.useMemo(()=>({reference:_,floating:D}),[_,D]),W=v.useMemo(()=>{const F={position:n,left:0,top:0};if(!H.floating)return F;const K=Qw(H.floating,h.x),N=Qw(H.floating,h.y);return c?{...F,transform:"translate("+K+"px, "+N+"px)",...U_(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:K,top:N}},[n,c,H.floating,h.x,h.y]);return v.useMemo(()=>({...h,update:B,refs:q,elements:H,floatingStyles:W}),[h,B,q,H,W])}const nx=(e,t)=>{const n=r$(e);return{name:n.name,fn:n.fn,options:[e,t]}},rx=(e,t)=>{const n=i$(e);return{name:n.name,fn:n.fn,options:[e,t]}},d$=(e,t)=>({fn:l$(e).fn,options:[e,t]}),ix=(e,t)=>{const n=s$(e);return{name:n.name,fn:n.fn,options:[e,t]}},sx=(e,t)=>{const n=o$(e);return{name:n.name,fn:n.fn,options:[e,t]}},p$=(e,t)=>{const n=a$(e);return{name:n.name,fn:n.fn,options:[e,t]}};function zp(e,t,n,r){return{left:e,top:t,right:n,bottom:r,x:e,y:t,width:n-e,height:r-t}}function h$(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}}function H_(e){const t=[];let n,r=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY,l=Number.NEGATIVE_INFINITY;for(const c of Array.from(e).sort((f,d)=>f.top-d.top)){if(r=Math.min(r,c.left),s=Math.min(s,c.top),a=Math.max(a,c.right),l=Math.max(l,c.bottom),!n||c.top-n.top>n.height/2)t.push(h$(c));else{const f=t[t.length-1];f.left=Math.min(f.left,c.left),f.right=Math.max(f.right,c.right),f.bottom=Math.max(f.bottom,c.bottom),f.width=f.right-f.left,f.height=f.bottom-f.top}n=c}return{lines:t,fallback:zp(r,s,a,l)}}function V_(e,t,n){return e.findIndex(r=>t>r.left-2&&t<r.right+2&&n>r.top-2&&n<r.bottom+2)}function Jw(e){return zp(e.left,e.top,e.right,e.bottom)}function m$(e,t,n){const{lines:r}=H_(e.getClientRects());if(r.length<2)return;const s=V_(r,t,n);return{x:t,y:n,lineIndex:s===-1?void 0:s,element:e}}function g$(e,t,n){const{lines:r,fallback:s}=H_(e.getClientRects());if(r.length<2)return null;const a=n?.x,l=n?.y,c=t[0];if(n?.lineIndex!=null&&r[n.lineIndex])return Jw(r[n.lineIndex]);if(a!=null&&l!=null){const k=V_(r,a,l);if(k!==-1)return Jw(r[k])}if(r.length===2&&r[0].left>r[1].right&&a!=null&&l!=null)return s;if(c==="t"||c==="b"){const k=r[0],S=r[r.length-1],C=c==="t"?k:S;return zp(C.left,k.top,C.right,S.bottom)}const f=c==="l";let d=r[0].left,h=r[0].right,m=f?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY,b=r[0],y=r[0];for(const k of r){d=Math.min(d,k.left),h=Math.max(h,k.right);const S=f?k.left:k.right;f&&S<m||!f&&S>m?(m=S,b=k,y=k):S===m&&(y=k)}return zp(d,b.top,h,y.bottom)}function b$(e){return"contextElement"in e&&e.contextElement?e.contextElement:gt(e)?e:void 0}function y$(e,t){function n(s){G_(e,s.currentTarget,s.clientX,s.clientY)}function r(s){t||n(s)}return{onFocus(){e.current=void 0},onMouseEnter:r,onMouseMove:r}}function G_(e,t,n,r){const s=m$(t,n,r);return e.current=s,s}function v$(e){return{name:"inline",async fn(t){const n=t.elements.reference;if(typeof n?.getClientRects!="function")return{};const r=b$(n),s=e.current,a=s?.element===n||s?.element===r?s:void 0,l=g$(n,t.placement,a);if(!l||typeof t.platform.getElementRects!="function")return{};const c=await t.platform.getElementRects({reference:{contextElement:r,getBoundingClientRect(){return l}},floating:t.elements.floating,strategy:t.strategy});return t.rects.reference.x===c.reference.x&&t.rects.reference.y===c.reference.y&&t.rects.reference.width===c.reference.width&&t.rects.reference.height===c.reference.height?{}:{reset:{rects:c}}}}}function W_(e){const t=v.useRef(!0);t.current&&(t.current=!1,e())}const tt=(e,t,n,r,s,a,...l)=>{if(l.length>0)throw new Error(Nn(1));let c;if(e)c=e;else throw new Error("Missing arguments");return c};var Tb={exports:{}},Cb={};var eE;function x$(){if(eE)return Cb;eE=1;var e=Gc();function t(m,b){return m===b&&(m!==0||1/m===1/b)||m!==m&&b!==b}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,s=e.useEffect,a=e.useLayoutEffect,l=e.useDebugValue;function c(m,b){var y=b(),k=r({inst:{value:y,getSnapshot:b}}),S=k[0].inst,C=k[1];return a(function(){S.value=y,S.getSnapshot=b,f(S)&&C({inst:S})},[m,y,b]),s(function(){return f(S)&&C({inst:S}),m(function(){f(S)&&C({inst:S})})},[m]),l(y),y}function f(m){var b=m.getSnapshot;m=m.value;try{var y=b();return!n(m,y)}catch{return!0}}function d(m,b){return b()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:c;return Cb.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,Cb}var tE;function K_(){return tE||(tE=1,Tb.exports=x$()),Tb.exports}var ox=K_(),Rb={exports:{}},_b={};var nE;function k$(){if(nE)return _b;nE=1;var e=Gc(),t=K_();function n(d,h){return d===h&&(d!==0||1/d===1/h)||d!==d&&h!==h}var r=typeof Object.is=="function"?Object.is:n,s=t.useSyncExternalStore,a=e.useRef,l=e.useEffect,c=e.useMemo,f=e.useDebugValue;return _b.useSyncExternalStoreWithSelector=function(d,h,m,b,y){var k=a(null);if(k.current===null){var S={hasValue:!1,value:null};k.current=S}else S=k.current;k=c(function(){function E(A){if(!T){if(T=!0,R=A,A=b(A),y!==void 0&&S.hasValue){var I=S.value;if(y(I,A))return _=I}return _=A}if(I=_,r(R,A))return I;var P=b(A);return y!==void 0&&y(I,P)?(R=A,I):(R=A,_=P)}var T=!1,R,_,D=m===void 0?null:m;return[function(){return E(h())},D===null?void 0:function(){return E(D())}]},[h,m,b,y]);var C=s(d,k[0],k[1]);return l(function(){S.hasValue=!0,S.value=C},[C]),f(C),C},_b}var rE;function S$(){return rE||(rE=1,Rb.exports=k$()),Rb.exports}var w$=S$();const By=[];let Fy;function E$(){return Fy}function T$(e){By.push(e)}function ax(e){const t=(n,r)=>{const s=zr(C$).current;let a;try{Fy=s;for(const l of By)l.before(s);a=e(n,r);for(const l of By)l.after(s);s.didInitialize=!0}finally{Fy=void 0}return a};return t.displayName=e.displayName||e.name,t}function Y_(e){return v.forwardRef(ax(e))}function C$(){return{didInitialize:!1}}const R$=zv(19),_$=R$?N$:O$;function mt(e,t,n,r,s){return _$(e,t,n,r,s)}function A$(e,t,n,r,s){const a=v.useCallback(()=>t(e.getSnapshot(),n,r,s),[e,t,n,r,s]);return ox.useSyncExternalStore(e.subscribe,a,a)}T$({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){const r=e.syncHooks[n],s=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,s)||(t=!0,r.value=s)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{const n=new Set;for(const s of e.syncHooks)n.add(s.store);const r=[];for(const s of n)r.push(s.subscribe(t));return()=>{for(const s of r)s()}}),ox.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function N$(e,t,n,r,s){const a=E$();if(!a)return A$(e,t,n,r,s);const l=a.syncIndex;a.syncIndex+=1;let c;return a.didInitialize?(c=a.syncHooks[l],(c.store!==e||c.selector!==t||!Object.is(c.a1,n)||!Object.is(c.a2,r)||!Object.is(c.a3,s))&&(c.store!==e&&(a.didChangeStore=!0),c.store=e,c.selector=t,c.a1=n,c.a2=r,c.a3=s,c.value=t(e.getSnapshot(),n,r,s))):(c={store:e,selector:t,a1:n,a2:r,a3:s,value:t(e.getSnapshot(),n,r,s)},a.syncHooks.push(c)),c.value}function O$(e,t,n,r,s){return w$.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,a=>t(a,n,r,s))}class X_{constructor(t){this.state=t,this.listeners=new Set,this.updateTick=0}subscribe=t=>(this.listeners.add(t),()=>{this.listeners.delete(t)});getSnapshot=()=>this.state;setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){this.setState({...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||this.setState({...this.state,[t]:n})}notifyAll(){const t={...this.state};this.setState(t)}use(t,n,r,s){return mt(this,t,n,r,s)}}class lx extends X_{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){v.useDebugValue(t);const r=this;Ve(()=>{r.state[t]!==n&&r.set(t,n)},[r,t,n])}useSyncedValueWithCleanup(t,n){const r=this;Ve(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){const n=this,r=Object.values(t);Ve(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){v.useDebugValue(t);const r=this,s=n!==void 0;Ve(()=>{s&&!Object.is(r.state[t],n)&&r.setState({...r.state,[t]:n})},[r,t,n,s])}select(t,n,r,s){const a=this.selectors[t];return a(this.state,n,r,s)}useState(t,n,r,s){return v.useDebugValue(t),mt(this,this.selectors[t],n,r,s)}useContextCallback(t,n){v.useDebugValue(t);const r=Ke(n??Zn);this.context[t]=r}useStateSetter(t){const n=v.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let s=r(this.state);return n(s,s,this),this.subscribe(a=>{const l=r(a);if(!Object.is(s,l)){const c=s;s=l,n(l,c,this)}})}}function I$(){const[,e]=v.useState({});return v.useCallback(()=>{e({})},[])}const M$={open:tt(e=>e.open),transitionStatus:tt(e=>e.transitionStatus),domReferenceElement:tt(e=>e.domReferenceElement),referenceElement:tt(e=>e.positionReference??e.referenceElement),floatingElement:tt(e=>e.floatingElement),floatingId:tt(e=>e.floatingId)};class Rh extends lx{constructor(t){const{syncOnly:n,nested:r,onOpenChange:s,triggerElements:a,...l}=t;super({...l,positionReference:l.referenceElement,domReferenceElement:l.referenceElement},{onOpenChange:s,dataRef:{current:{}},events:I_(),nested:r,triggerElements:a},M$),this.syncOnly=n}syncOpenEvent=(t,n)=>{(!t||!this.state.open||n!=null&&Pz(n))&&(this.context.dataRef.current.openEvent=t?n:void 0)};dispatchOpenChange=(t,n)=>{this.syncOpenEvent(t,n.event);const r={open:t,reason:n.reason,nativeEvent:n.event,nested:this.context.nested,triggerElement:n.trigger};this.context.events.emit("openchange",r)};setOpen=(t,n)=>{if(this.syncOnly){this.context.onOpenChange?.(t,n);return}this.dispatchOpenChange(t,n),this.context.onOpenChange?.(t,n)}}function D$(e){const{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:s,nested:a,onOpenChange:l}=e,c=t.useState("open"),f=t.useState("activeTriggerElement"),d=t.useState(n?"popupElement":"positionerElement"),h=t.context.triggerElements,m=l,b=v.useRef(null);r===void 0&&b.current===null&&(b.current=new Rh({open:c,transitionStatus:void 0,referenceElement:f,floatingElement:d,triggerElements:h,onOpenChange:m,floatingId:s,syncOnly:!0,nested:a}));const y=r??b.current;return t.useSyncedValue("floatingId",s),Ve(()=>{const k={open:c,floatingId:s,referenceElement:f,floatingElement:d};gt(f)&&(k.domReferenceElement=f),y.state.positionReference===y.state.referenceElement&&(k.positionReference=f),y.update(k)},[c,s,f,d,y]),y.context.onOpenChange=m,y.context.nested=a,y}function Yc(e,t=!1,n=!1){const[r,s]=v.useState(e&&t?"idle":void 0),[a,l]=v.useState(e);return e&&!a&&(l(!0),s("starting")),!e&&a&&r!=="ending"&&!n&&s("ending"),!e&&!a&&r==="ending"&&s(void 0),Ve(()=>{if(!e&&a&&r!=="ending"&&n){const c=Lr.request(()=>{s("ending")});return()=>{Lr.cancel(c)}}},[e,a,r,n]),Ve(()=>{if(!e||t)return;const c=Lr.request(()=>{s(void 0)});return()=>{Lr.cancel(c)}},[t,e]),Ve(()=>{if(!e||!t)return;e&&a&&r!=="idle"&&s("starting");const c=Lr.request(()=>{s("idle")});return()=>{Lr.cancel(c)}},[t,e,a,r]),{mounted:a,setMounted:l,transitionStatus:r}}function Z_(e,t=!1,n=!0){const r=Tl();return Ke((s,a=null)=>{r.cancel();const l=vs(e);if(l==null)return;const c=l,f=()=>{Di.flushSync(s)};if(typeof c.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED){s();return}function d(){Promise.all(c.getAnimations().map(h=>h.finished)).then(()=>{a?.aborted||f()}).catch(()=>{if(n){a?.aborted||f();return}const h=c.getAnimations();!a?.aborted&&h.length>0&&h.some(m=>m.pending||m.playState!=="finished")&&d()})}if(t){const h=sa.startingStyle;if(!c.hasAttribute(h)){r.request(d);return}const m=new MutationObserver(()=>{c.hasAttribute(h)||(m.disconnect(),d())});m.observe(c,{attributes:!0,attributeFilter:[h]}),a?.addEventListener("abort",()=>m.disconnect(),{once:!0});return}r.request(d)})}function _o(e){const{enabled:t=!0,open:n,ref:r,onComplete:s}=e,a=Ke(s),l=Z_(r,n,!1);v.useEffect(()=>{if(!t)return;const c=new AbortController;return l(a,c.signal),()=>{c.abort()}},[t,n,a,l])}const ux={tabIndex:-1,[Dy]:""};function Q_(e,t,n=!1){const r=Kc(),s=Ul()!=null,a=v.useRef(null);e===void 0&&a.current===null&&(a.current=t(r,s));const l=e??a.current;return D$({popupStore:l,treatPopupAsFloatingElement:n,floatingRootContext:l.state.floatingRootContext,floatingId:r,nested:s,onOpenChange:l.setOpen}),{store:l,internalStore:a.current}}function L$(e,t){const n=v.useRef(null),r=v.useRef(null);return v.useCallback(s=>{if(e===void 0)return;let a=!1;if(n.current!==null){const l=n.current,c=r.current,f=t.context.triggerElements.getById(l);c&&f===c&&(t.context.triggerElements.delete(l),a=!0),n.current=null,r.current=null}if(s!==null&&(n.current=e,r.current=s,t.context.triggerElements.add(e,s),a=!0),a){const l=t.context.triggerElements.size;t.select("open")&&t.state.triggerCount!==l&&t.set("triggerCount",l)}},[t,e])}function j$(e,t,n,r=!1){t?e.preventUnmountingOnClose=!1:r&&(e.preventUnmountingOnClose=!0);const s=n?.id??null;(s||t)&&(e.activeTriggerId=s,e.activeTriggerElement=n??null)}function z$(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function J_(e,t,n,r={}){const s=n.reason,a=s===Sr,l=t&&s===gp,c=!t&&(s===Bl||s===Hv),f=z$(n);if(e.context.onOpenChange?.(t,n),n.isCanceled)return;r.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,n);const d=()=>{const h={...r.extraState,open:t};l?h.instantType="focus":c?h.instantType="dismiss":a&&(h.instantType=void 0),j$(h,t,n.trigger,f()),e.update(h)};a?Di.flushSync(d):d()}function eA(e,t,n,r){W_(()=>{t===void 0&&e.state.open===!1&&n&&(e.state={...e.state,open:!0,activeTriggerId:r,preventUnmountingOnClose:!1})})}function tA(e,t,n,r){const s=n.useState("isMountedByTrigger",e),a=L$(e,n),l=Ke(c=>{if(a(c),!c)return;const f=n.select("open"),d=n.select("activeTriggerId");if(d===e){n.update({activeTriggerElement:c,...f?r:null});return}d==null&&f&&n.update({activeTriggerId:e,activeTriggerElement:c,...r})});return Ve(()=>{s&&n.update({activeTriggerElement:t.current,...r})},[s,n,t,...Object.values(r)]),{registerTrigger:l,isMountedByThisTrigger:s}}function nA(e,t={}){const{closeOnActiveTriggerUnmount:n=!1}=t,r=e.useState("open"),s=e.useState("triggerCount");Ve(()=>{if(!r){e.state.triggerCount!==0&&e.set("triggerCount",0);return}const a=e.context.triggerElements.size,l={};e.state.triggerCount!==a&&(l.triggerCount=a);const c=e.select("activeTriggerId");let f=null;if(c){const d=e.context.triggerElements.getById(c);d?d!==e.state.activeTriggerElement&&(l.activeTriggerElement=d):f=c}if(!f&&!c&&a===1){const d=e.context.triggerElements.entries().next();if(!d.done){const[h,m]=d.value;l.activeTriggerId=h,l.activeTriggerElement=m}}(l.triggerCount!==void 0||l.activeTriggerId!==void 0||l.activeTriggerElement!==void 0)&&e.update(l),f&&n&&queueMicrotask(()=>{if(e.select("open")&&e.select("activeTriggerId")===f&&!e.context.triggerElements.getById(f)){const d=Ct(Oi);e.setOpen(!1,d),d.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[r,e,s,n])}function rA(e,t,n){const{mounted:r,setMounted:s,transitionStatus:a}=Yc(e),l=t.useState("preventUnmountingOnClose"),c=e?!1:l;t.useSyncedValues({mounted:r,transitionStatus:a,preventUnmountingOnClose:c});const f=Ke(()=>{s(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return _o({enabled:r&&!e&&!c,open:e,ref:t.context.popupRef,onComplete(){e||f()}}),{forceUnmount:f,transitionStatus:a}}function iA(e,t){e.useSyncedValues(t),Ve(()=>()=>{e.update({activeTriggerProps:$n,inactiveTriggerProps:$n,popupProps:$n})},[e])}class _h{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(t,n){const r=this.idMap.get(t);r!==n&&(r!==void 0&&this.elementsSet.delete(r),this.elementsSet.add(n),this.idMap.set(t,n))}delete(t){const n=this.idMap.get(t);n&&(this.elementsSet.delete(n),this.idMap.delete(t))}hasElement(t){return this.elementsSet.has(t)}hasMatchingElement(t){for(const n of this.elementsSet)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}function P$(){return new Rh({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new _h,floatingId:void 0,syncOnly:!1,nested:!1,onOpenChange:void 0})}function sA(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:P$(),floatingId:void 0,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:$n,inactiveTriggerProps:$n,popupProps:$n}}function oA(e,t,n=!1){return new Rh({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0})}const dc=tt(e=>e.triggerIdProp??e.activeTriggerId),cx=tt(e=>e.openProp??e.open),iE=tt(e=>(e.popupElement?.id??e.floatingId)||void 0);function aA(e,t){return t!==void 0&&cx(e)&&dc(e)===t}function $$(e,t){return aA(e,t)?!0:t!==void 0&&cx(e)&&dc(e)==null&&e.triggerCount===1}const lA={open:cx,mounted:tt(e=>e.mounted),transitionStatus:tt(e=>e.transitionStatus),floatingRootContext:tt(e=>e.floatingRootContext),triggerCount:tt(e=>e.triggerCount),preventUnmountingOnClose:tt(e=>e.preventUnmountingOnClose),payload:tt(e=>e.payload),activeTriggerId:dc,activeTriggerElement:tt(e=>e.mounted?e.activeTriggerElement:null),popupId:iE,isTriggerActive:tt((e,t)=>t!==void 0&&dc(e)===t),isOpenedByTrigger:tt((e,t)=>aA(e,t)),isMountedByTrigger:tt((e,t)=>t!==void 0&&dc(e)===t&&e.mounted),triggerProps:tt((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),triggerPopupId:tt((e,t)=>$$(e,t)?iE(e):void 0),popupProps:tt(e=>e.popupProps),popupElement:tt(e=>e.popupElement),positionerElement:tt(e=>e.positionerElement)};function uA(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,s=Kc(),a=Ul()!=null,l=zr(()=>new Rh({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new _h,floatingId:s,syncOnly:!1,nested:a})).current;return Ve(()=>{const c={open:t,floatingId:s};r.reference!==void 0&&(c.referenceElement=r.reference,c.domReferenceElement=gt(r.reference)?r.reference:null),r.floating!==void 0&&(c.floatingElement=r.floating),l.update(c)},[t,s,r.reference,r.floating,l]),l.context.onOpenChange=n,l.context.nested=a,l}function B$(e={}){const{nodeId:t,externalTree:n}=e,r=uA(e),s=e.rootContext||r,a=s.useState("referenceElement"),l=s.useState("floatingElement"),c=s.useState("domReferenceElement"),f=s.useState("open"),d=s.useState("floatingId"),[h,m]=v.useState(null),[b,y]=v.useState(void 0),[k,S]=v.useState(void 0),C=v.useRef(null),E=ga(n),T=v.useMemo(()=>({reference:a,floating:l,domReference:c}),[a,l,c]),R=q_({...e,elements:{...T,...h&&{reference:h}}}),_=gt(b)?b:null,D=k===void 0?s.state.floatingElement:k;s.useSyncedValue("referenceElement",b??null),s.useSyncedValue("domReferenceElement",b===void 0?c:_),s.useSyncedValue("floatingElement",D);const A=v.useCallback(U=>{const B=gt(U)?{getBoundingClientRect:()=>U.getBoundingClientRect(),getClientRects:()=>U.getClientRects(),contextElement:U}:U;m(B),R.refs.setReference(B)},[R.refs]),I=v.useCallback(U=>{(gt(U)||U===null)&&(C.current=U,y(U)),(gt(R.refs.reference.current)||R.refs.reference.current===null||U!==null&&!gt(U))&&R.refs.setReference(U)},[R.refs,y]),P=v.useCallback(U=>{S(U),R.refs.setFloating(U)},[R.refs]),$=v.useMemo(()=>({...R.refs,setReference:I,setFloating:P,setPositionReference:A,domReference:C}),[R.refs,I,P,A]),O=v.useMemo(()=>({...R.elements,domReference:c}),[R.elements,c]),Y=v.useMemo(()=>({...R,dataRef:s.context.dataRef,open:f,onOpenChange:s.setOpen,events:s.context.events,floatingId:d,refs:$,elements:O,nodeId:t,rootStore:s}),[R,$,O,t,s,f,d]);return Ve(()=>{c&&(C.current=c)},[c]),Ve(()=>{s.context.dataRef.current.floatingContext=Y;const U=E?.nodesRef.current.find(B=>B.id===t);U&&(U.context=Y)}),v.useMemo(()=>({...R,context:Y,refs:$,elements:O,rootStore:s}),[R,$,O,Y,s])}const Ab=l_&&Co;function cA(e,t={}){const{enabled:n=!0,delay:r}=t,s="rootStore"in e?e.rootStore:e,{events:a,dataRef:l}=s.context,c=v.useRef(!1),f=v.useRef(null),d=v.useRef(!0),h=yi();v.useEffect(()=>{const b=s.select("domReferenceElement");if(!n)return;const y=vn(b);function k(){const E=s.select("domReferenceElement");!s.select("open")&&Ft(E)&&E===pr(Wt(E))&&(c.current=!0)}function S(){d.current=!0}function C(){d.current=!1}return Ki(Dt(y,"blur",k),Ab&&Dt(y,"keydown",S,!0),Ab&&Dt(y,"pointerdown",C,!0))},[s,n]),v.useEffect(()=>{if(!n)return;function b(y){if(y.reason===Bl||y.reason===Hv){const k=s.select("domReferenceElement");gt(k)&&(f.current=k,c.current=!0)}}return a.on("openchange",b),()=>{a.off("openchange",b)}},[a,n,s]);const m=v.useMemo(()=>{function b(){c.current=!1,f.current=null}return{onMouseLeave(){b()},onFocus(y){const k=y.currentTarget;if(c.current){if(f.current===k)return;b()}const S=gr(y.nativeEvent);if(gt(S)){if(Ab&&!y.relatedTarget){if(!d.current&&!wh(S))return}else if(!Fz(S))return}const C=Ap(y.relatedTarget,s.context.triggerElements),{nativeEvent:E,currentTarget:T}=y,R=typeof r=="function"?r():r;if(s.select("open")&&C||R===0||R===void 0){s.setOpen(!0,Ct(gp,E,T));return}h.start(R,()=>{c.current||s.setOpen(!0,Ct(gp,E,T))})},onBlur(y){b();const k=y.relatedTarget,S=y.nativeEvent,C=gt(k)&&k.hasAttribute(Cc("focus-guard"))&&k.getAttribute("data-type")==="outside";h.start(0,()=>{const E=s.select("domReferenceElement"),T=pr(Wt(E));!k&&T===E||ht(l.current.floatingContext?.refs.floating.current,T)||ht(E,T)||C||Ap(k??T,s.context.triggerElements)||s.setOpen(!1,Ct(gp,S))})}}},[l,r,s,h]);return v.useMemo(()=>n?{reference:m,trigger:m}:{},[n,m])}class fx{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new Ii,this.restTimeout=new Ii,this.handleCloseOptions=void 0}static create(){return new fx}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose}const Pp=new WeakMap;function $p(e){if(!e.performedPointerEventsMutation)return;const t=e.pointerEventsScopeElement;t&&Pp.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),Pp.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function fA(e,t){const{scopeElement:n,referenceElement:r,floatingElement:s}=t,a=Pp.get(n);a&&a!==e&&$p(a),$p(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=s,Pp.set(n,e),n.style.pointerEvents="none",r.style.pointerEvents="auto",s.style.pointerEvents="auto"}function dx(e){const t=e.context.dataRef.current,n=zr(()=>t.hoverInteractionState??fx.create()).current;return t.hoverInteractionState||(t.hoverInteractionState=n),Vv(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function dA(e,t={}){const{enabled:n=!0,closeDelay:r=0,nodeId:s}=t,a="rootStore"in e?e.rootStore:e,l=a.useState("open"),c=a.useState("floatingElement"),f=a.useState("domReferenceElement"),{dataRef:d}=a.context,h=ga(),m=Ul(),b=dx(a),y=yi(),k=Ke(()=>d_(d.current.openEvent?.type,b.interactedInside)),S=Ke(()=>qz(d.current.openEvent?.type)),C=Ke(()=>{$p(b)});Ve(()=>{l||(b.pointerType=void 0,b.restTimeoutPending=!1,b.interactedInside=!1,C())},[l,b,C]),v.useEffect(()=>C,[C]),Ve(()=>{if(n&&l&&b.handleCloseOptions?.blockPointerEvents&&S()&&gt(f)&&c){const E=f,T=c,R=Wt(c),_=h?.nodesRef.current.find(P=>P.id===m)?.context?.elements.floating;_&&(_.style.pointerEvents="");const D=b.pointerEventsScopeElement!==T?b.pointerEventsScopeElement:null,A=_!==T?_:null,I=b.handleCloseOptions?.getScope?.()??D??A??E.closest("[data-rootownerid]")??R.body;return fA(b,{scopeElement:I,referenceElement:E,floatingElement:T}),()=>{C()}}},[n,l,f,c,b,S,h,m,C]),v.useEffect(()=>{if(!n)return;function E(){return!!(h&&m&&wo(h.nodesRef.current,m).length>0)}function T(P){const $=Op(r,"close",b.pointerType),O=()=>{a.setOpen(!1,Ct(Sr,P)),h?.events.emit("floating.closed",P)};$?b.openChangeTimeout.start($,O):(b.openChangeTimeout.clear(),O())}function R(P){const $=gr(P);if(!Bz($)){b.interactedInside=!1;return}b.interactedInside=$?.closest("[aria-haspopup]")!=null}function _(){b.openChangeTimeout.clear(),y.clear(),h?.events.off("floating.closed",A),C()}function D(P){if(E()&&h){h.events.on("floating.closed",A);return}if(Ap(P.relatedTarget,a.context.triggerElements))return;const $=d.current.floatingContext?.nodeId??s,O=P.relatedTarget;if(!(h&&$&&gt(O)&&wo(h.nodesRef.current,$,!1).some(U=>ht(U.context?.elements.floating,O)))){if(b.handler){b.handler(P);return}C(),S()&&!k()&&T(P)}}function A(P){!h||!m||E()||y.start(0,()=>{h.events.off("floating.closed",A),a.setOpen(!1,Ct(Sr,P)),h.events.emit("floating.closed",P)})}const I=c;return Ki(I&&Dt(I,"mouseenter",_),I&&Dt(I,"mouseleave",D),I&&Dt(I,"pointerdown",R,!0),()=>{h?.events.off("floating.closed",A)})},[n,c,a,d,r,s,S,k,C,b,h,m,y])}const F$={current:null};function pA(e,t={}){const{enabled:n=!0,delay:r=0,handleClose:s=null,mouseOnly:a=!1,restMs:l=0,move:c=!0,triggerElementRef:f=F$,externalTree:d,isActiveTrigger:h=!0,getHandleCloseContext:m,isClosing:b,shouldOpen:y}=t,k="rootStore"in e?e.rootStore:e,{dataRef:S,events:C}=k.context,E=ga(d),T=dx(k),R=v.useRef(!1),_=An(s),D=An(r),A=An(l),I=An(n),P=An(y),$=An(b),O=Ke(()=>d_(S.current.openEvent?.type,T.interactedInside)),Y=Ke(()=>P.current?.()!==!1),U=Ke((q,H,W)=>{const F=k.context.triggerElements;if(F.hasElement(H))return!q||!ht(q,H);if(!gt(W))return!1;const K=W;return F.hasMatchingElement(N=>ht(N,K))&&(!q||!ht(q,K))}),B=Ke(()=>{if(!T.handler)return;Wt(k.select("domReferenceElement")).removeEventListener("mousemove",T.handler),T.handler=void 0}),j=Ke(()=>{$p(T)});return h&&(T.handleCloseOptions=_.current?.__options),v.useEffect(()=>B,[B]),v.useEffect(()=>{if(!n)return;function q(H){H.open?R.current=!1:(R.current=H.reason===Sr,B(),T.openChangeTimeout.clear(),T.restTimeout.clear(),T.blockMouseMove=!0,T.restTimeoutPending=!1)}return C.on("openchange",q),()=>{C.off("openchange",q)}},[n,C,T,B]),v.useEffect(()=>{if(!n)return;function q(K,N=!0){const z=Op(D.current,"close",T.pointerType);z?T.openChangeTimeout.start(z,()=>{k.setOpen(!1,Ct(Sr,K)),E?.events.emit("floating.closed",K)}):N&&(T.openChangeTimeout.clear(),k.setOpen(!1,Ct(Sr,K)),E?.events.emit("floating.closed",K))}const H=f.current??(h?k.select("domReferenceElement"):null);if(!gt(H))return;function W(K){if(T.openChangeTimeout.clear(),T.blockMouseMove=!1,a&&!oa(T.pointerType))return;const N=Iw(A.current),z=Op(D.current,"open",T.pointerType),V=gr(K),L=K.currentTarget??null,Z=k.select("domReferenceElement");let re=L;if(gt(V)&&!k.context.triggerElements.hasElement(V)){for(const Se of k.context.triggerElements.elements())if(ht(Se,V)){re=Se;break}}gt(L)&&gt(Z)&&!k.context.triggerElements.hasElement(L)&&ht(L,Z)&&(re=Z);const ie=re==null?!1:U(Z,re,V),ae=k.select("open"),le=$.current?.()??k.select("transitionStatus")==="ending",ce=!ae&&le&&R.current,Ee=!ie&&gt(re)&&gt(Z)&&ht(Z,re)&&ce,be=N>0&&!z,ue=ie&&(ae||ce)||Ee,ge=!ae||ie;if(ue){Y()&&k.setOpen(!0,Ct(Sr,K,re));return}be||(z?T.openChangeTimeout.start(z,()=>{ge&&Y()&&k.setOpen(!0,Ct(Sr,K,re))}):ge&&Y()&&k.setOpen(!0,Ct(Sr,K,re)))}function F(K){if(O()){j();return}B();const N=k.select("domReferenceElement"),z=Wt(N);T.restTimeout.clear(),T.restTimeoutPending=!1;const V=S.current.floatingContext??m?.();if(Ap(K.relatedTarget,k.context.triggerElements))return;if(_.current&&V){k.select("open")||T.openChangeTimeout.clear();const Z=f.current;T.handler=_.current({...V,tree:E,x:K.clientX,y:K.clientY,onClose(){j(),B(),I.current&&!O()&&Z===k.select("domReferenceElement")&&q(K,!0)}}),z.addEventListener("mousemove",T.handler),T.handler(K);return}(T.pointerType!=="touch"||!ht(k.select("floatingElement"),K.relatedTarget))&&q(K)}return c?Ki(Dt(H,"mousemove",W,{once:!0}),Dt(H,"mouseenter",W),Dt(H,"mouseleave",F)):Ki(Dt(H,"mouseenter",W),Dt(H,"mouseleave",F))},[B,j,S,D,k,n,_,T,h,U,O,a,c,A,f,E,I,m,$,Y]),v.useMemo(()=>{if(!n)return;function q(H){T.pointerType=H.pointerType}return{onPointerDown:q,onPointerEnter:q,onMouseMove(H){const{nativeEvent:W}=H,F=H.currentTarget,K=k.select("domReferenceElement"),N=k.select("open"),z=U(K,F,H.target);if(a&&!oa(T.pointerType))return;if(N&&z&&T.handleCloseOptions?.blockPointerEvents){const Z=k.select("floatingElement");if(Z){const re=T.handleCloseOptions?.getScope?.()??F.ownerDocument.body;fA(T,{scopeElement:re,referenceElement:F,floatingElement:Z})}}const V=Iw(A.current);if(N&&!z||V===0||!z&&T.restTimeoutPending&&H.movementX**2+H.movementY**2<2)return;T.restTimeout.clear();function L(){if(T.restTimeoutPending=!1,O())return;const Z=k.select("open");!T.blockMouseMove&&(!Z||z)&&Y()&&k.setOpen(!0,Ct(Sr,W,F))}T.pointerType==="touch"?Di.flushSync(()=>{L()}):z&&N?L():(T.restTimeoutPending=!0,T.restTimeout.start(V,L))}}},[n,T,O,U,a,k,A,Y])}const U$="Escape";function Ah(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Id(e,t){return Ah(t,e===f_||e===Kv,e===kh||e===Sh)}function Nb(e,t,n){return Ah(t,e===Kv,n?e===kh:e===Sh)||e==="Enter"||e===" "||e===""}function q$(e,t,n){return Ah(t,n?e===kh:e===Sh,e===Kv)}function H$(e,t,n,r){const s=n?e===Sh:e===kh,a=e===f_;return t==="both"||t==="horizontal"&&r?e===U$:Ah(t,s,a)}function V$(e,t){const{listRef:n,activeIndex:r,onNavigate:s=()=>{},enabled:a=!0,selectedIndex:l=null,allowEscape:c=!1,loopFocus:f=!1,nested:d=!1,rtl:h=!1,virtual:m=!1,focusItemOnOpen:b="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:k=!0,disabledIndices:S=void 0,orientation:C="vertical",parentOrientation:E,id:T,resetOnPointerLeave:R=!0,externalTree:_,grid:D}=t,A=D!=null,I="rootStore"in e?e.rootStore:e,P=I.useState("open"),$=I.useState("floatingElement"),O=I.useState("domReferenceElement"),Y=I.context.dataRef,U=Np($),B=Ly(O),j=An(U),q=Ul(),H=ga(_),W=v.useRef(b),F=v.useRef(l??-1),K=v.useRef(null),N=v.useRef(!0),z=Ke(ee=>{s(F.current===-1?null:F.current,ee)}),V=v.useRef(!!$),L=v.useRef(P),Z=v.useRef(!1),re=v.useRef(!1),ie=v.useRef(null),ae=An(S),le=An(P),ce=An(l),Ee=An(R),be=Tl(),ue=Tl(),ge=Ke(()=>{function ee(we){m?H?.events.emit("virtualfocus",we):ie.current=yp(we,{sync:Z.current,preventScroll:!0})}const fe=n.current[F.current],Q=re.current;fe&&ee(fe),(Z.current?we=>we():we=>be.request(we))(()=>{const we=n.current[F.current]||fe;if(!we)return;fe||ee(we),Me&&(Q||!N.current)&&we.scrollIntoView?.({block:"nearest",inline:"nearest"})})});Ve(()=>{Y.current.orientation=C},[Y,C]),Ve(()=>{a&&(P&&$?(F.current=l??-1,W.current&&l!=null&&(re.current=!0,z())):V.current&&(F.current=-1,z()))},[a,P,$,l,z]),Ve(()=>{if(a){if(!P){Z.current=!1;return}if($)if(r==null){if(Z.current=!1,ce.current!=null)return;if(V.current&&(F.current=-1,ge()),(!L.current||!V.current)&&W.current&&(K.current!=null||W.current===!0&&K.current==null)){let ee=0;const fe=()=>{n.current[0]==null?(ee<2&&(ee?ne=>ue.request(ne):queueMicrotask)(fe),ee+=1):(F.current=K.current==null||Nb(K.current,C,h)||d?bp(n):zy(n),K.current=null,z())};fe()}}else cc(n.current,r)||(F.current=r,ge(),re.current=!1)}},[a,P,$,r,ce,d,n,C,h,z,ge,ue]),Ve(()=>{if(!a||$||!H||m||!V.current)return;const ee=H.nodesRef.current,fe=ee.find(we=>we.id===q)?.context?.elements.floating,Q=pr(Wt(O??fe??null)),ne=ee.some(we=>we.context&&ht(we.context.elements.floating,Q));fe&&!ne&&N.current&&fe.focus({preventScroll:!0})},[a,$,O,H,q,m]),Ve(()=>{L.current=P,V.current=!!$}),Ve(()=>{P||(K.current=null,W.current=b)},[P,b]);const Se=r!=null,Ae=Ke(ee=>{if(!le.current)return;const fe=n.current.indexOf(ee.currentTarget);fe!==-1&&(F.current!==fe||r!==fe)&&(F.current=fe,z(ee))}),ke=Ke(()=>E??H?.nodesRef.current.find(ee=>ee.id===q)?.context?.dataRef?.current.orientation),xe=Ke(()=>bp(n,ae.current)),Ce=Ke(ee=>{if(N.current=!1,Z.current=!0,ee.which===229||!le.current&&ee.currentTarget===j.current)return;if(d&&H$(ee.key,C,h,A)){Id(ee.key,ke())||qi(ee),I.setOpen(!1,Ct(Cw,ee.nativeEvent)),Ft(O)&&(m?H?.events.emit("virtualfocus",O):O.focus());return}const fe=F.current,Q=bp(n,S),ne=zy(n,S);if(B||(ee.key==="Home"&&(qi(ee),F.current=Q,z(ee)),ee.key==="End"&&(qi(ee),F.current=ne,z(ee))),D!=null){const we=D(ee,F.current,n,C,f,h,S,Q,ne);if(we!=null&&(F.current=we,z(ee)),C==="both")return}if(Id(ee.key,C)){if(qi(ee),P&&!m&&pr(ee.currentTarget.ownerDocument)===ee.currentTarget){F.current=Nb(ee.key,C,h)?Q:ne,z(ee);return}Nb(ee.key,C,h)?f?fe>=ne?c&&fe!==n.current.length?F.current=-1:(Z.current=!1,F.current=Q):F.current=ws(n.current,{startingIndex:fe,disabledIndices:S}):F.current=Math.min(ne,ws(n.current,{startingIndex:fe,disabledIndices:S})):f?fe<=Q?c&&fe!==-1?F.current=n.current.length:(Z.current=!1,F.current=ne):F.current=ws(n.current,{startingIndex:fe,decrement:!0,disabledIndices:S}):F.current=Math.max(Q,ws(n.current,{startingIndex:fe,decrement:!0,disabledIndices:S})),cc(n.current,F.current)&&(F.current=-1),z(ee)}}),Me=v.useMemo(()=>({onFocus(fe){Z.current=!0,Ae(fe)},onClick:({currentTarget:fe})=>fe.focus({preventScroll:!0}),onMouseMove(fe){Z.current=!0,re.current=!1,y&&Ae(fe)},onPointerLeave(fe){if(!le.current||!N.current||fe.pointerType==="touch")return;Z.current=!0;const Q=fe.relatedTarget;if(!(!y||n.current.includes(Q))&&Ee.current&&(ie.current?.(),ie.current=null,F.current=-1,z(fe),!m)){const ne=j.current,we=pr(Wt(ne));ne&&ht(ne,we)&&ne.focus({preventScroll:!0})}}}),[Ae,le,j,y,n,z,Ee,m]),ze=v.useMemo(()=>m&&P&&Se&&{"aria-activedescendant":`${T}-${r}`},[m,P,Se,T,r]),Fe=v.useMemo(()=>({"aria-orientation":C==="both"?void 0:C,...B?{}:ze,onKeyDown(ee){if(ee.key==="Tab"&&ee.shiftKey&&P&&!m){const fe=gr(ee.nativeEvent);if(fe&&!ht(j.current,fe))return;qi(ee),I.setOpen(!1,Ct(yh,ee.nativeEvent)),Ft(O)&&O.focus();return}Ce(ee)},onPointerMove(){N.current=!0}}),[ze,Ce,j,C,B,I,P,m,O]),ye=v.useMemo(()=>{function ee(ne){I.setOpen(!0,Ct(Cw,ne.nativeEvent,ne.currentTarget))}function fe(ne){b==="auto"&&Wv(ne.nativeEvent)&&(W.current=!m)}function Q(ne){W.current=b,b==="auto"&&u_(ne.nativeEvent)&&(W.current=!0)}return{onKeyDown(ne){const we=I.select("open");N.current=!1;const Pe=ne.key.startsWith("Arrow"),Ye=q$(ne.key,ke(),h),Ze=Id(ne.key,C),bt=(d?Ye:Ze)||ne.key==="Enter"||ne.key.trim()==="";if(m&&we)return Ce(ne);if(!(!we&&!k&&Pe)){if(bt){const Je=Id(ne.key,ke());K.current=d&&Je?null:ne.key}if(d){Ye&&(qi(ne),we?(F.current=xe(),z(ne)):ee(ne));return}Ze&&(ce.current!=null&&(F.current=ce.current),qi(ne),!we&&k?ee(ne):Ce(ne),we&&z(ne))}},onFocus(ne){I.select("open")&&!m&&(F.current=-1,z(ne))},onPointerDown:Q,onPointerEnter:Q,onMouseDown:fe,onClick:fe}},[Ce,b,xe,d,z,I,k,C,ke,h,ce,m]),_e=v.useMemo(()=>({...ze,...ye}),[ze,ye]);return v.useMemo(()=>a?{reference:_e,floating:Fe,item:Me,trigger:ye}:{},[a,_e,Fe,ye,Me])}function G$(e,t){const{listRef:n,elementsRef:r,activeIndex:s,onMatch:a,disabledIndices:l,onTyping:c,enabled:f=!0,resetMs:d=750,selectedIndex:h=null}=t,m="rootStore"in e?e.rootStore:e,b=m.useState("open"),y=yi(),k=v.useRef(""),S=v.useRef(h??s??-1),C=v.useRef(null),E=Ke(_=>{function D(j){const q=r?.current[j];return!q||Eh(q)}function A(j){return D(j)?l==null||!Dp(ko,j,l):!1}function I(j,q,H=0){if(j.length===0)return-1;const W=(H%j.length+j.length)%j.length,F=q.toLowerCase();for(let K=0;K<j.length;K+=1){const N=(W+K)%j.length;if(!(!j[N]?.toLowerCase().startsWith(F)||!A(N)))return N}return-1}const P=n.current;if(k.current.length>0&&_.key===" "&&(qi(_),c?.(!0)),k.current.length>0&&k.current[0]!==" "&&I(P,k.current)===-1&&_.key!==" "&&c?.(!1),P==null||_.key.length!==1||_.ctrlKey||_.metaKey||_.altKey)return;b&&_.key!==" "&&(qi(_),c?.(!0));const $=k.current==="";$&&(S.current=h??s??-1),P.every((j,q)=>j&&A(q)?j[0]?.toLowerCase()!==j[1]?.toLowerCase():!0)&&k.current===_.key&&(k.current="",S.current=C.current),k.current+=_.key,y.start(d,()=>{k.current="",S.current=C.current,c?.(!1)});const U=(($?h??s??-1:S.current)??0)+1,B=I(P,k.current,U);B!==-1?(a?.(B),C.current=B):_.key!==" "&&(k.current="",c?.(!1))}),T=Ke(_=>{const D=_.relatedTarget,A=m.select("domReferenceElement"),I=m.select("floatingElement");ht(A,D)||ht(I,D)||(y.clear(),k.current="",S.current=C.current,c?.(!1))});Ve(()=>{!b&&h!==null||(y.clear(),C.current=null,k.current!==""&&(k.current=""))},[b,h,y]),Ve(()=>{b&&k.current===""&&(S.current=h??s??-1)},[b,h,s]);const R=v.useMemo(()=>({onKeyDown:E,onBlur:T}),[E,T]);return v.useMemo(()=>f?{reference:R,floating:R}:{},[f,R])}const sE=.1,W$=sE*sE,pn=.5;function Md(e,t,n,r,s,a){return r>=t!=a>=t&&e<=(s-n)*(t-r)/(a-r)+n}function Dd(e,t,n,r,s,a,l,c,f,d){let h=!1;return Md(e,t,n,r,s,a)&&(h=!h),Md(e,t,s,a,l,c)&&(h=!h),Md(e,t,l,c,f,d)&&(h=!h),Md(e,t,f,d,n,r)&&(h=!h),h}function K$(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function Ld(e,t,n,r,s,a){const l=Math.min(n,s),c=Math.max(n,s),f=Math.min(r,a),d=Math.max(r,a);return e>=l&&e<=c&&t>=f&&t<=d}function hA(e={}){const{blockPointerEvents:t=!1}=e,n=new Ii,r=({x:s,y:a,placement:l,elements:c,onClose:f,nodeId:d,tree:h})=>{const m=l?.split("-")[0];let b=!1,y=null,k=null,S=typeof performance<"u"?performance.now():0;function C(T,R){const _=performance.now(),D=_-S;if(y===null||k===null||D===0)return y=T,k=R,S=_,!1;const A=T-y,I=R-k,P=A*A+I*I,$=D*D*W$;return y=T,k=R,S=_,P<$}function E(){n.clear(),f()}return function(R){n.clear();const _=c.domReference,D=c.floating;if(!_||!D||m==null||s==null||a==null)return;const{clientX:A,clientY:I}=R,P=gr(R),$=R.type==="mouseleave",O=ht(D,P),Y=ht(_,P);if(O&&(b=!0,!$))return;if(Y&&(b=!1,!$)){b=!0;return}if($&&gt(R.relatedTarget)&&ht(D,R.relatedTarget))return;function U(){return!!(h&&wo(h.nodesRef.current,d).length>0)}function B(){U()||E()}if(U())return;const j=_.getBoundingClientRect(),q=D.getBoundingClientRect(),H=s>q.right-q.width/2,W=a>q.bottom-q.height/2,F=q.width>j.width,K=q.height>j.height,N=(F?j:q).left,z=(F?j:q).right,V=(K?j:q).top,L=(K?j:q).bottom;if(m==="top"&&a>=j.bottom-1||m==="bottom"&&a<=j.top+1||m==="left"&&s>=j.right-1||m==="right"&&s<=j.left+1){B();return}let Z=!1;switch(m){case"top":Z=Ld(A,I,N,j.top+1,z,q.bottom-1);break;case"bottom":Z=Ld(A,I,N,q.top+1,z,j.bottom-1);break;case"left":Z=Ld(A,I,q.right-1,L,j.left+1,V);break;case"right":Z=Ld(A,I,j.right-1,L,q.left+1,V);break}if(Z)return;if(b&&!K$(A,I,j)){B();return}if(!$&&C(A,I)){B();return}let re=!1;switch(m){case"top":{const ie=F?pn/2:pn*4,ae=F||H?s+ie:s-ie,le=F?s-ie:H?s+ie:s-ie,ce=a+pn+1,Ee=H||F?q.bottom-pn:q.top,be=H?F?q.bottom-pn:q.top:q.bottom-pn;re=Dd(A,I,ae,ce,le,ce,q.left,Ee,q.right,be);break}case"bottom":{const ie=F?pn/2:pn*4,ae=F||H?s+ie:s-ie,le=F?s-ie:H?s+ie:s-ie,ce=a-pn,Ee=H||F?q.top+pn:q.bottom,be=H?F?q.top+pn:q.bottom:q.top+pn;re=Dd(A,I,ae,ce,le,ce,q.left,Ee,q.right,be);break}case"left":{const ie=K?pn/2:pn*4,ae=K||W?a+ie:a-ie,le=K?a-ie:W?a+ie:a-ie,ce=s+pn+1,Ee=W||K?q.right-pn:q.left,be=W?K?q.right-pn:q.left:q.right-pn;re=Dd(A,I,Ee,q.top,be,q.bottom,ce,ae,ce,le);break}case"right":{const ie=K?pn/2:pn*4,ae=K||W?a+ie:a-ie,le=K?a-ie:W?a+ie:a-ie,ce=s-pn,Ee=W||K?q.left+pn:q.right,be=W?K?q.left+pn:q.right:q.left+pn;re=Dd(A,I,ce,ae,ce,le,Ee,q.top,be,q.bottom);break}}re?b||n.start(40,B):B()}};return r.__options={...e,blockPointerEvents:t},r}const pc="ArrowUp",hc="ArrowDown",Bp="ArrowLeft",Fp="ArrowRight",Nh="Home",Oh="End",mA=new Set([Bp,Fp]),Y$=new Set([Bp,Fp,Nh,Oh]),gA=new Set([pc,hc]),X$=new Set([pc,hc,Nh,Oh]),bA=new Set([...mA,...gA]),yA=new Set([...bA,Nh,Oh]),Z$="Shift",Q$="Control",J$="Alt",e3="Meta",t3=new Set([Z$,Q$,J$,e3]);function n3(e){return Ft(e)&&e.tagName==="INPUT"}function oE(e){return!!(n3(e)&&e.selectionStart!=null||Ft(e)&&e.tagName==="TEXTAREA")}function aE(e,t,n,r){if(!e||!t||!t.scrollTo)return;let s=e.scrollLeft,a=e.scrollTop;const l=e.clientWidth<e.scrollWidth,c=e.clientHeight<e.scrollHeight;if(l&&r!=="vertical"){const f=lE(e,t,"left"),d=jd(e),h=jd(t);n==="ltr"&&(f+t.offsetWidth+h.scrollMarginRight>e.scrollLeft+e.clientWidth-d.scrollPaddingRight?s=f+t.offsetWidth+h.scrollMarginRight-e.clientWidth+d.scrollPaddingRight:f-h.scrollMarginLeft<e.scrollLeft+d.scrollPaddingLeft&&(s=f-h.scrollMarginLeft-d.scrollPaddingLeft)),n==="rtl"&&(f-h.scrollMarginRight<e.scrollLeft+d.scrollPaddingLeft?s=f-h.scrollMarginLeft-d.scrollPaddingLeft:f+t.offsetWidth+h.scrollMarginRight>e.scrollLeft+e.clientWidth-d.scrollPaddingRight&&(s=f+t.offsetWidth+h.scrollMarginRight-e.clientWidth+d.scrollPaddingRight))}if(c&&r!=="horizontal"){const f=lE(e,t,"top"),d=jd(e),h=jd(t);f-h.scrollMarginTop<e.scrollTop+d.scrollPaddingTop?a=f-h.scrollMarginTop-d.scrollPaddingTop:f+t.offsetHeight+h.scrollMarginBottom>e.scrollTop+e.clientHeight-d.scrollPaddingBottom&&(a=f+t.offsetHeight+h.scrollMarginBottom-e.clientHeight+d.scrollPaddingBottom)}e.scrollTo({left:s,top:a,behavior:"auto"})}function lE(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let s=0;for(;t.offsetParent&&(s+=t[r],t.offsetParent!==e);)t=t.offsetParent;return s}function jd(e){const t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}function r3(e){return zv(19)?e:e?"true":void 0}const i3=v.forwardRef(function(t,n){const{cutout:r,...s}=t;let a;if(r){const l=r.getBoundingClientRect();a=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${l.left}px ${l.top}px,${l.left}px ${l.bottom}px,${l.right}px ${l.bottom}px,${l.right}px ${l.top}px,${l.left}px ${l.top}px)`}return g.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...s,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:a}})});let uE={},cE={},fE="";function s3(e){if(typeof document>"u")return!1;const t=Wt(e);return vn(t).innerWidth-t.documentElement.clientWidth>0}function o3(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=Wt(e),r=n.documentElement,s=n.body,a=ma(r)?r:s,l=a.style.overflowY,c=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",a.style.overflowY="scroll";const f=a.offsetWidth;a.style.overflowY="hidden";const d=a.offsetWidth;return a.style.overflowY=l,r.style.scrollbarGutter=c,f===d}function a3(e){const t=Wt(e),n=t.documentElement,r=t.body,s=ma(n)?n:r,a={overflowY:s.style.overflowY,overflowX:s.style.overflowX};return Object.assign(s.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(s.style,a)}}function l3(e){const t=Wt(e),n=t.documentElement,r=t.body,s=vn(n);let a=0,l=0,c=!1;const f=Lr.create();if(Co&&(s.visualViewport?.scale??1)!==1)return()=>{};function d(){const y=s.getComputedStyle(n),k=s.getComputedStyle(r),E=(y.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";a=n.scrollTop,l=n.scrollLeft,uE={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},fE=n.style.scrollBehavior,cE={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};const T=n.scrollHeight>n.clientHeight,R=n.scrollWidth>n.clientWidth,_=y.overflowY==="scroll"||k.overflowY==="scroll",D=y.overflowX==="scroll"||k.overflowX==="scroll",A=Math.max(0,s.innerWidth-r.clientWidth),I=Math.max(0,s.innerHeight-r.clientHeight),P=parseFloat(k.marginTop)+parseFloat(k.marginBottom),$=parseFloat(k.marginLeft)+parseFloat(k.marginRight),O=ma(n)?n:r;if(c=o3(e),c){n.style.scrollbarGutter=E,O.style.overflowY="hidden",O.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:E,overflowY:"hidden",overflowX:"hidden"}),(T||_)&&(n.style.overflowY="scroll"),(R||D)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:P||I?`calc(100dvh - ${P+I}px)`:"100dvh",width:$||A?`calc(100vw - ${$+A}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=a,r.scrollLeft=l,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function h(){Object.assign(n.style,uE),Object.assign(r.style,cE),c||(n.scrollTop=a,n.scrollLeft=l,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=fE)}function m(){h(),f.request(d)}d();const b=Dt(s,"resize",m);return()=>{f.cancel(),h(),typeof s.removeEventListener=="function"&&b()}}class u3{lockCount=0;restore=null;timeoutLock=Ii.create();timeoutUnlock=Ii.create();acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}release=()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(t){if(this.lockCount===0||this.restore!==null)return;const r=Wt(t).documentElement,s=vn(r).getComputedStyle(r).overflowY;if(s==="hidden"||s==="clip"){this.restore=Zn;return}const a=xh||!s3(t);this.restore=a?a3(t):l3(t)}}const c3=new u3;function f3(e=!0,t=null){Ve(()=>{if(e)return c3.acquire(t)},[e,t])}function d3(e){const t=v.useRef(""),n=v.useCallback(s=>{s.defaultPrevented||(t.current=s.pointerType,e(s,s.pointerType))},[e]);return{onClick:v.useCallback(s=>{if(s.detail===0){e(s,"keyboard");return}"pointerType"in s?e(s,s.pointerType):e(s,t.current),t.current=""},[e]),onPointerDown:n}}function vA(e,t){const n=v.useRef(e),r=Ke(t);Ve(()=>{n.current!==e&&r(n.current)},[e,r]),Ve(()=>{n.current=e},[e])}function p3(e,t){const n=Ke((a,l)=>{(typeof e=="function"?e():e)||t(l||(xh?"touch":""))}),{onClick:r,onPointerDown:s}=d3(n);return v.useMemo(()=>({onClick:r,onPointerDown:s}),[r,s])}function h3(e){const[t,n]=v.useState(null),r=p3(e,n);return vA(e,s=>{s&&!e&&n(null)}),v.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}const m3=v.createContext(void 0);function Li(){return v.useContext(m3)?.direction??"ltr"}const g3="0account 1dd 1gent 5-circle 6square 5s 6-swarm 1larm-clock 2ert 1rchive 2my-base 2row-block-bend-up-left cdown cleft dine-down hleft hright hup cright cup 7racket-from-down jleft jright jup l-dashed eto-down hleft hright hup 6ccw 7ircle-down dleft dright dup 7w 6down 6elbow-down-left hright cup-left fright 6left a-down bup 6right b-down cup 6square-down dfrom-down ileft iright iup dleft h-down itop iup dright i-down jtop jup dto-down gleft gright gup dup 7wap 6u-up-left bright 7p 5s-both-horizontal cvertical 7ccw a-angular 8ontract f-simple 8w 7down-up 7elbow-up-left 8xpand d-simple 7left-right 7out-cardinal 1sterisk 1t 2om 0bandaid 3knote 8s-stack 2rbell 2sketball 1each-umbrella 3ker 6-stop 2ehouse 2ll 4-dot 5slash 1inary 3oculars 1luetooth 1oard-kanban 2ok 4-open 4mark 4s 2wtie 1racket 7-dot 8error 7s-curly e-dot fx 9square 3in 5-hourglass 6simple cst 7lash 2iefcase 2owser 7s 2ush 1ug 3bot 2ilding 8s 2llseye 0calculator 3endar 8-hourglass 2mera 2r 3dholder 2stle 1d 1hart-bars 6line 6pie 7yramid 6scatter 3t-bubble b-chevrons-left-right cellipsis dxclamation cpencil cquestion bs c-grid 4Bubble a-ellipsis cxclamation bquestion as 2eck 5-circle 6square 5s 3f-hat 3ss-king 6tower 3vron-circle-down fleft fright fup 8down c-small 8left c-small 8right d-small 8up a-small 7s-down d-up 9left d-right 9right e-dotted-left 9up b-down 2ip 4-simple 1ircle 6-circle 7dashed 6s 7-check 1lipboard 2ock 3ne 3se 3ud 5-arrow-down cup 6download 6upload 1ode 4-brackets 5simple 2g 2llection a-plus 3or-mode 2mmand 4ent 7-dashed 9iscussion 9ot 7s 3pass 7-check 8dot 2nversation 2okie 2pilot 3y 2rners-in 8out b-check csparkle 2st-high 5low 5medium 1redit-card 2oss-medical 5hair 3wn 2ystal-ball 1ube 4-coordinates 5nodes 5transparent 2rrency-btc 9dollar 9eth 3sor-logo 7text 2tlery 1ylinder 0dashboard 2tabase 8-network 1ebug-pause 6restart 6start 8op 2ckchair-umbrella 2sktop-download 2vice-camera d-video 7desktop 7mobile 1iagram 2ff 4-added 5ignored 5modified 6ultiple 5removed 7named 5single b-arrow-right-up cdot 2scard 3play 7-check 9ircle 9onnect 8play 8waves 7s 1ots-3-horizontal 7vertical 1rop 0easel 1dit 1lephant 2lipsis 1nvelope 8-open 1raser 2ror 1xclamation-circle ctriangle 2ecution-parallel asequential 2tensions 1ye 3-closed 4slash 0fast-backward 5forward 1eedback 1ile 4-add 6rrow-right-up 5binary 5chevrons-left-right 6ode 5directory e-create 5image 5list 6ock 5media 5pdf 6lus 5text 6ype-adobe-illustrator gphotoshop ababel czel bevy bicep comejs bower bun ac-plus-plus csharp blojure brystal buda adart bocker aejs blixir bslint af-sharp birebase ageckodriver bit-meta bo cdot brails dphql coovy cunt bulp ahaml cndlebars cskell aionic ajava escript bulia cpyter akarma botlin alatex biquid amaven bustache anpm bunjucks aocaml bdata apdf berl blatformio bowershell brettier cisma colog buppet bython areason cscript bollup bust asass bbt bcala blim btylus bublime bvelte bwift aterraform bypescript avala bite bsc bue aweb-assembly dpack bindows ayarn azig 5zip 4s 3m-reel 5strip 3ter 1lag 4-hill 3me 3sk 5-slash-circle 2oppy-disc 1ocus-window 2ld-dashed 4er 6-active 8rrow-right-up 7check 7dashed 7library 7open bed 7plus 6s 2rk 1unnel 6-simple 0game-controller f-retro 2uge 1ear 2m 1ift 2t-branch 4commit a-horizontal 7pare 4fetch 5ork 4merge 4pull 8-request g-closed ireate hdone iraft 6sh 3hub 6-actions 1lobe 1raduation-cap 3ph 5-line 6scatter 2id 4-plus 5sparkle 3pper 0hamburger 3mer 2sh 2t 1eadphones 4set 3rt 2xagon 1istory 1ome 2urglass 3se 0i-circle 1mage 5-square 1nbox 2finity 3o 2spect 1ssue 5-closed 6draft 5s 0joystick 1son 0kebab-horizontal 6vertical 2y 3board 8-tab 0laptop 2yers 3out-dialog 7empty 7floating-window 7panel-bottom j-dock kon kundock doff 7sidebar-left j-dock koff ln kundock fright k-dock loff mn lundock 8plit-horizontal n-dashed oright-dock uundock dvertical 1eaf 2go 1ibrary 2ghtbulb 9-sparkle 5ning 2nk 4-external 2st-bullets 5checks 5filter 5ordered 5todo 9-subtask 5x 1oading 2cation 3k 4-locked 5unlocked 2go-azure a-devops 5figma 5git 8hub 8lab 5jira 5linear 5markdown 6cp 6icrosoft-teams 5notion 5python 5sentry 6lack 5vscode b-insiders 5x 0mac-mini 2gic-wand 3net 4ifying-glass g-fuzzy hminus hplus hslash-circle iparkle aGlass f-minus gplus gslash-circle 2il 2p 3-pin 2rk-github 4down 2sk-happy 4s-happy 1cp 1egaphone 2ntion 3u 2rge 1ic 3roscope 2nus 5-circle 6small 1obile 2on 4-sparkle 5z 2re 1usic 2te 0new-file 5older 3spaper 1ote 0one-circle 1rganization c-filled 1wl 0package 7-zipper 2int-roller 2lette 2perclip 5plane 2ragraph 2ss 2use 5-circle 2w 1en-nib 3cil 6-square 3tagon 2ople 6-3 2rcent 3son 6-add 7chat-bubble 8ircle 7follow 7plus 1iano 2e-chart 2lcrow 2n 3-slash 2pe 1lan 4e 3y 4-bug 5circle 5slow 6uper-fast 4back-loop 4s-bug 2ug 4-slash 3s 4-circle 5minus 1ointer-arrow 1ug 2lse 2zzle-piece 0question 8-circle 2ote 0radar 3io-tower 1ect-magnifying-glass fGlass 2do 2fresh 2gex 2mote-control 4ve 6-close 2place 7-all 3ort 2turn 2view 1obot 2cket 4ing-chair 1ss 1uler 4s 2n 0satellite 1cales 1eal 4-check 5question 3rch 6-stop 2nd 2rver 6s 2ttings 8-gear 1hapes-square-circle 3re 2ield 6-check 7question 7x 2oe-fast 3pping-bag bsket 1ignal 1kills 6-capability 1lash-circle 2iders 1martwatch 2iley-happy c-square 7neutral 7plus 7sad 1nowflake 1occer-ball 2rt-ascending 5descending 2urce-control 1parkle 7s 2eaker-hifi 8waves 8x 2inner 2lit 5-horizontal 6vertical 2rint 1quare 6-dashed 8ot 6s 7-minus 8plus 8x 1tack 3r 4-empty 5full 3tus-done 8raft 7needs-attention 2op 4-circle 4watch 3refront 1un 1watches 1ymbol-folder 2nc 0t-shirt 1able 3s 2g 3s-chevron-down dleft dright dup 2rget 1erminal 8-rectangle 2xt-aa 6b 5b 5c 5d 5italic 5j 5r 5s 6trikethrough 5t 6-square 6t 5y 1hinking-high 9low 9medium 2reads-parallel 8single 4e-bars 2umbs-down 7up 9-down 6down 6up 1raffic-cone 7Cone 3sh 5can 3y 2easure-chest 3nding-down 9up 2iangle-small-down fleft fright fup 1wig 0unfold-dashed 2lock 2mute 2verified 0vault 1erified 3sions 1ideo-camera 1m 1r 2-headset a-head 0wallet 2nd 2rning 2tch 2veform 1hole-word 1indow 6-pointer-arrow 6s 1rench 0x 1-circle 0yarn 0zap 1ipper 1oom-in 5out 1zz",b3="1ajd -8p 1wz t 1 1 -w ah -273 18 1wb a6 -ke 1 iy 2 2 2 -j3 1 3s 1 a -1f5 -1 -1 1f6 -1 -1 -1ok 8a 1 1 1 -5k -4d 9c 1ww 1 1 -269 1m4 1 -1m4 1m5 -zs 10y 2q -1 -1ra 8u 1ft 7 -1 0 -7 6 -114 0 -k 145 -1r8 1r7 -2k -1ez c9 13u -1od -8 1m9 1x -1v 1w -1v -1na 1nb k4 -i9 -1u -1dw -4p il -a2 1jz 1 5n -5m 1 1 1 -1xc a0 1nd -1w8 6w 32 -80 3k 1qr -1sb 1r8 -1v4 1 6v 1ue -1yb 5y 1 -5z 5y 1 -9o l9 1bp 1 1 1 -1w3 2 39 i8 -lg bu 1k7 1 -1mx 1my -1w2 1ut -1tn 1ux 1 1 1 -1tv 67 2 1md -1me c2 -9q 1ed -1l6 ht vt 7o 5w -1an 14n -1l6 1dm 7o -1pa lk 108 -1ep 1p2 1 1 8d 2 2 2 -24o 1lr -1lq 1lr -1lq 1lr -1lq 1lr -1k3 2 kf zn 1y -11z -k2 k7 -c2 1kx -1np -e es -mc bb bf -9 -dw c6 -d4 -6g 1 -1 1 1vr -1xc 1xd -1ub 1lz c -1np 1le -1nx bn 1fm -1fq -8z 7i 2 -1 1h6 70 -1mk -1w -3j -1 1hq ab -1e 1 1 -1uc 1vp 1 6n -6m -1ac 1ad -1ah 103 af 1 1 -1a3 10r 9d 1 1 -1vt 1vu -70 -1oq 1oo -1it 1pw -1w7 o -1 -2n 2p 1tv -1tp -5 1 1 91 -90 1 8y -n 1 ae -lk 73 1 1b -1a 1zf 1 -26j 44 1yc -4a -1yf 21u -21l 4g -1 hx -m1 mt -nk 1wk 1 -1t7 -3a 1qg -1n5 1tb 1 -5n -1qp lu -in -37 32 -32 8 -3 2y a1 -9l -g 1 iq 1ce 41 -2 28 -p 5 -16 46 -18 1a -5x 1 j 4 2x 2e -7a 58 -2m 1y -2j x r -3o 1 3v -s -32 4j 1e -y o -b -2z -2c 1 1 1 3e -3d 1 34 1f k -1x c r 1k -2t u 21 -1u -1m 4o -2y m -2m -24 4u -s -41 1 2q 24 -3m 3q -12 -x -2y 1 1 1 3f -3e 3c -3b 14 -13 1 3f p -24d 39 1v0 1 -1v0 9a -7z -1a -3d a0 -46 ij 3 -o6 37 -9 9 23b -1wu -6g -38 -3 30 1tf -1ta 42 1qz 1 -1w2 17 28 -27 jf -jc 1l3 -1l2 80 -ca 4b 1u -64 ae -u 3u -2z -4a -59 3f 2 w -u 67 1 1od 1 1 -1um 1un -1bs 1dm -1t 1 1 -1up 1xy -21l 3o jt -jt -42 de 1ae -1jn hx -m2 9p -5h j2 -dd df 1bf -1ug -43 44 1 ij -a8 ba -e8 1x9 1 1 -1w0 20 -2f 1d7 -1cs 1 20 -20 -f 18n -18a 23 -23 -c 18n -15r -1 1be 1 -1in 1sh 1 -1ql -8r bz be -id k1 -1t -ky 5s -31 je 191 -1uu ln -j4 -4l 0 73 2s g 1mq ad -26z 1wn 54 -53 -7n -1ci 1p9 -53 -1kk 1po -53 -1l1 1 -54 1rs -1p7 -x -8x bk -3v -1 -1f 76 -df 7p -1 -1f -1e 6h -6j -46 49 1u6 1 -1lx -89 8n -5d n 2v -bd 5e 1ib b3 -1w2 1l0 b3 1 -1yr bj -6v h5 -lp 1yo -1u2 1ru -1wi 0 24k -1zt 1us -s 1 -1lq -1x 1ci -10n 142 -3e b5 -b4 -1o0 oa 1ds -21r 1yu -1mp -cs 9y -1j 3 1g 0 25 -1i -2v -2a 1r4 85 -gc b5 -7v -1jd l 1ob 1 -l -1m9 -4v -2l -34 1jm 5s -1bf 1sd -20j 1tx -b5 -1ir 1 1tw -1tv 1lp 0 -1lm 0 1 21d -21a g7 15b 0 -1lb 4o 1dp -1c7 -64 1tg -1td -4x 1vi -56 7z -1uv 1jq -1gx -1 -7d 69 5d 1og -1tr 2 -2i 1vm -1n9 -5u 32 2 -1 1q1 1 1 1 -1ny 0 -9f 45 1hz -51 gb -ga -1ds 1dq gd 1 -bb 1 -113 -bo 0 1o2 -1sd -29 iu 19h -1jn -79 1qn -1x0 270 -a3 -1uw a 5s -5w 7l -a0 0 6n gx 1 1 13z -1iu 1o3 2z -ba bb -1z5 -c 1zi -1qm 1dz -1nc 26w 2 2 2 -1vw 1sm -22x 18 3h -3v 20b -2 -1xb 1yi -12 2b 1 -fr -19 -1g8 1va -54 1 1 -r 1 -1ph fg 1 1l8 -1l9 1 14m 0 -1qk 0 3s 1vh 1 1 -1sq 1 1 1 1w2 -1ej -hg 1 1 1sj -1si 1 -4f -2n 1zk 60 1 -60 -1ob -bo 7k 1sg -1se 1 2a 1da -1g2 et -l7 230 -1s3 1od -1sc 1 1sc",y3="01070c0d0e0f0g0h0i0j0p0u0v0w0x0z1415161718191a1f1g1h1i1j1k1l1m1r1v2a2b2o2r2t2u2w2x303a3b3d3l3p3s3v3w3x40414344464748494a4f4g4h4i4j4k4l4m4n4o4p4q5152545758595a5h5i5j5k5l5m5p5s5v5w5x5y66696b6d6e6g6h6i6n6p6r6s6v6w6x6y70717273747576777a7b7h7k7n7p7s7t7x7y838487898a8i8j8k8l8m8n8o8p8q8r8s8t8u8v8w8x8y8z909192939495969798999a9b9c9d9e9f9g9h9i9j9k9l9m9n9o9p9q9r9s9t9u9v9w9x9y9za0a1a2a3a4a5a6a7a8a9aaabacadaeafagahaiajakalamanaoapaqarasauawb1b2b4bbbkblbnbobpbqbsbtbubvbwbxbybzc0c3c8c9cecicjcocpcqctcvcwcyd0d5d6d7dbdfdgdidldndqdudydze0e2e7ebecedeef0f2f3f6f7f8fafcfefjfmfofpfrfsfwfxg5g6g7g9gbgcgdgegfgkgogvgxgzh0h2h4h9hbhchehfhjhshthui0i6i9iaicieihiiijiliminioitiuiviwiyj0j2j7j8j9jbjcjfjgjijljmjnjojpjqjrjtjvjwjxk0k2k5k6k7k8k9kakbkekfkikjklkmkpkqkskzl0l2l3l6l7lgliljlmlnlolplulxlzm1m3m4m5m6m7m8m9",v3="1c6d br -fj 1 ep 2 2 2 -eu 1 ap -ao 1 1 1 1 3 -2 1 4 -2 1 2 3 -2 1 0 4 -2 1 0 2 1 1 93 4a -dc 1 1 aj 2q 0 -d8 1 1 1 8p -8o 4 -3 1 1 2 -1 -2 1 2 3 -2 1 dv 2 2 2 -dy -1 3 -1 3 -1 3 -1 3 -1 2 1 8 34 -3b 8f -8e 2 -1 2 1 -l m -m ac -76 -2j 1 bp -bm -2 1 8a -g -7s 1 -1qm 2j 1qq -3m 3t -2l 1e -1f -7 1 1 1 1 1 1 2r -2p dc -43 -v -8d 2n -2m 1 1 -19 1a 0 0 5 7f 1c -2 28 -p 5 -16 46 -18 1a -3q 1 -1o 4 2x 2e -6p 4n -2m 1y -2j x r -33 50 -1p -s -2i 3z 1e -y o -b -2z -1s 28 2m -4t 2w -28 -n 2n 1f k -1x c r 1k -2t 2e h -1u -1m 4o -2y m -2m -1n 4d -s -3k 1 29 24 -3m 3q -12 -x 29 -4q 1 4o -1o -2z 2x -2w p -o 1 30 p -b0 1 7d -7c 1 1 1 0 -v w 1 2 -1 2 1 1 6 -1 -4 1 1 1 3 1 d8 1 -61 -77 7u -7t 2 -1 -1 3 -1v 13 bv -b2 2 1f -1e 0 1 0 1 0 1 1 8v -7t -11 -u v 6 -5 0 1 3 -2 1 1 -2 1 -17 19 av -dk 2q 2 -1 2 1 1 q 99 -2p 34 -4a -63 6e -8w -1pu 1sd 74 -73 -2q 2r 9d -9c -1px 1py 1 2 -1 2 an -am bn -c1 1c -x -1q4 1q6 -1 -k 8 j -2l 86 -5n -3 1 1 7 0 -5 1 1 1 1 -1r 1s 0 1 1 -15 1 15 4 -3 1 1 2 1 0 -3e 13 -17o 1a0 1 -25 7d 6d -bk an 2 2 2 -as 9l -3v -2 17 -12 -2 -5q 66 3k 1 -1 1 -9q 0 75 -8i z -c r 1 -2l 24 5s -5a 1 2 -1 7g -80 9q -am -1",dE=2;function x3(e){const t=[];let n="";for(const r of e.split(" "))n=n.slice(0,Number.parseInt(r[0],36))+r.slice(1),t.push(n);return t}function xA(e){const t=[];let n=0;for(const r of e.split(" "))n+=Number.parseInt(r,36),t.push(String.fromCharCode(n));return t}const Up=x3(g3);function k3(){const e=xA(b3),t={};for(let n=0;n<Up.length;n++)t[Up[n]]=e[n];return t}function S3(){const e=xA(v3),t={};for(let n=0;n<e.length;n++){const r=Number.parseInt(y3.slice(n*dE,(n+1)*dE),36);t[Up[r]]=e[n]}return t}const kA=k3(),w3=S3(),E3={...kA,...w3};function T3(e,t="outline"){return t==="filled"?E3[e]:kA[e]}const C3={root:{km0Bbg:"ui-ngwomw",$$css:!0}},R3=new Set(["ui-progress-spin","cursor-icon-spin"]);function _3(e){if(!(!e||typeof CSSAnimation>"u"))for(const t of e.getAnimations({subtree:!0}))t instanceof CSSAnimation&&R3.has(t.animationName)&&(t.startTime=0)}const Uy=v.createContext(void 0);function Ms({iconSize:e,iconButtonSize:t,iconButtonVariant:n,iconButtonTone:r,iconButtonRootStyle:s,iconButtonIconStyle:a,iconButtonIconSize:l,buttonSize:c,buttonRootStyle:f,buttonVariant:d,buttonTone:h,buttonIconSize:m,buttonRounded:b,buttonFullWidth:y,menuSize:k,disabled:S,children:C}){const E=v.useContext(Uy),T=v.useMemo(()=>({iconSize:e??E?.iconSize,iconButtonSize:t??E?.iconButtonSize,iconButtonVariant:n??E?.iconButtonVariant,iconButtonTone:r??E?.iconButtonTone,iconButtonRootStyle:s??E?.iconButtonRootStyle,iconButtonIconStyle:a??E?.iconButtonIconStyle,iconButtonIconSize:l??E?.iconButtonIconSize,buttonSize:c??E?.buttonSize,buttonRootStyle:f??E?.buttonRootStyle,buttonVariant:d??E?.buttonVariant,buttonTone:h??E?.buttonTone,buttonIconSize:m??E?.buttonIconSize,buttonRounded:b??E?.buttonRounded,buttonFullWidth:y??E?.buttonFullWidth,menuSize:k??E?.menuSize,disabled:S??E?.disabled}),[y,h,m,f,b,c,d,S,l,a,r,s,t,n,e,k,E]);return g.jsx(Uy.Provider,{value:T,children:C})}function ba(){return v.useContext(Uy)}const A3="sm",N3=/(^|-)(left|right)(-|$)/,O3=new Set(["history","link-external","list-bullets","list-ordered","quote","redo","return"]),I3=new Set(Up.filter(e=>N3.test(e)||O3.has(e))),Xt={base:{kKX8nH:"ui-1j61x8r",k63SB2:"ui-etm3q0",kGuDYH:"ui-1tachi3",kMv6JI:"ui-1qt6sjn",kLWn49:"ui-o5v014",k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kMwMTN:"ui-1heor9g",kzqmXN:"ui-1oai4fc",kZKoxP:"ui-higkf7",kXLuUW:"ui-xymvpz",kMnn75:"ui-krqix3",kJwUce:"ui-1403hyl",k9WMMc:"ui-2b8uid",kP9fke:"ui-6mezaz",khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",kfSwDN:"ui-87ps6o",kO7zv1:"ui-1winvzj","--icon-size":"ui-1u4itkb","--icon-weight":"ui-1q5xvfy",keTefX:"ui-jb5y04",k71WvV:"ui-1bxnb1t",kQmYQc:"ui-1ehclkv",kgeoSG:"ui-1yj7g93",$$css:!0},noPresetSize:{$$css:!0},sizeXs:{"--icon-size":"ui-aiyo0p",$$css:!0},sizeSm:{"--icon-size":"ui-1u4itkb",$$css:!0},sizeBase:{"--icon-size":"ui-xfpx3u",$$css:!0},sizeLg:{"--icon-size":"ui-1qxde8p",$$css:!0},sizeXl:{"--icon-size":"ui-dyy2ci",$$css:!0},size2xl:{"--icon-size":"ui-7lg4th",$$css:!0},noColor:{$$css:!0},colorPrimary:{kMwMTN:"ui-1nqczng",$$css:!0},colorSecondary:{kMwMTN:"ui-1mh7f6w",$$css:!0},colorTertiary:{kMwMTN:"ui-1lbmi28",$$css:!0},colorQuaternary:{kMwMTN:"ui-1qh17o",$$css:!0},colorGitAdded:{kMwMTN:"ui-15wwr8d",$$css:!0},colorGitModified:{kMwMTN:"ui-eedwss",$$css:!0},colorGitRemoved:{kMwMTN:"ui-fowoju",$$css:!0},colorGitUntracked:{kMwMTN:"ui-1p7vtww",$$css:!0},colorCyan:{kMwMTN:"ui-1rbygr4",$$css:!0},colorBlue:{kMwMTN:"ui-101qeuz",$$css:!0},colorRed:{kMwMTN:"ui-ku4wcm",$$css:!0},colorGreen:{kMwMTN:"ui-p6nzhx",$$css:!0},colorSuccess:{kMwMTN:"ui-1qphcl",$$css:!0},colorDanger:{kMwMTN:"ui-yz91fk",$$css:!0},colorYellow:{kMwMTN:"ui-1hn9r2r",$$css:!0},colorMagenta:{kMwMTN:"ui-pwp9en",$$css:!0},colorOrange:{kMwMTN:"ui-4qtrdv",$$css:!0},colorPurple:{kMwMTN:"ui-1b0hn6l",$$css:!0},colorAccent:{kMwMTN:"ui-scuw3h",$$css:!0},colorBrand:{kMwMTN:"ui-v3vxec",$$css:!0},noModifier:{$$css:!0},modifierSpin:{kKVMdj:"ui-138fvbv",k44tkh:"ui-lmf4m6",kyAemX:"ui-1esw782",ko0y90:"ui-a4qsjk",$$css:!0},modifierDisabled:{kSiTet:"ui-ti2d7y",$$css:!0},modifierHidden:{k33iCy:"ui-lshs6z",$$css:!0},capTrim:{kQypYc:"ui-14ymb62",$$css:!0}};function M3(e,t,n){return[Xt.base,SA(e),D3(t),L3(n)]}function px(e){return typeof e=="string"&&!e.startsWith("var(")}function SA(e){if(!px(e))return Xt.noPresetSize;switch(e){case"xs":return Xt.sizeXs;case"sm":return Xt.sizeSm;case"base":return Xt.sizeBase;case"lg":return Xt.sizeLg;case"xl":return Xt.sizeXl;case"2xl":return Xt.size2xl}}function D3(e){switch(e){case"primary":return Xt.colorPrimary;case"secondary":return Xt.colorSecondary;case"tertiary":return Xt.colorTertiary;case"quaternary":return Xt.colorQuaternary;case"git-added":return Xt.colorGitAdded;case"git-modified":return Xt.colorGitModified;case"git-removed":return Xt.colorGitRemoved;case"git-untracked":return Xt.colorGitUntracked;case"cyan":return Xt.colorCyan;case"blue":return Xt.colorBlue;case"red":return Xt.colorRed;case"green":return Xt.colorGreen;case"success":return Xt.colorSuccess;case"danger":return Xt.colorDanger;case"yellow":return Xt.colorYellow;case"magenta":return Xt.colorMagenta;case"orange":return Xt.colorOrange;case"purple":return Xt.colorPurple;case"accent":return Xt.colorAccent;case"brand":return Xt.colorBrand;case void 0:return Xt.noColor}}function L3(e){switch(e){case"spin":return Xt.modifierSpin;case"disabled":return Xt.modifierDisabled;case"hidden":return Xt.modifierHidden;case void 0:return Xt.noModifier}}function j3(e){if(!(typeof e!="string"||e.length===0))return`"${e}"`}function qt({name:e,modifier:t,syncSpin:n=!0,variant:r="outline",size:s,color:a,capTrim:l=!1,className:c,rootStyle:f,style:d,title:h,"aria-label":m,"aria-hidden":b,ref:y}){const k=ba(),S=v.useCallback(A=>{typeof y=="function"?y(A):y&&(y.current=A),A&&t==="spin"&&n&&_3(A)},[y,t,n]),C=s??k?.iconSize??A3,E=px(C),T=Li()==="rtl"&&I3.has(e),R=j3(T3(e,r)),_={...R?{"--cursor-icon-content":R}:{},...E?{}:{"--icon-size":typeof C=="number"?`${C}px`:C},...d},D=Yt({rootClass:"ui-icon",stylexStyles:[M3(C,a,t),T&&C3.root,l&&Xt.capTrim,f],className:sn("cursor-icon",c),style:_});return g.jsx("i",{ref:S,className:D.className,"data-icon-name":e,"data-size":E?C:void 0,"data-color":a,style:D.style,title:h??m,"aria-hidden":b??(m?void 0:!0)})}const z3=v.createContext({root:null});function ya(){return v.useContext(z3).root}const P3={dropdown:"--ui-portal-layer-z-index-dropdown",tooltip:"--ui-portal-layer-z-index-tooltip",modal:"--ui-portal-layer-z-index-modal",popover:"--ui-portal-layer-z-index-popover"},$3={},B3=3e3,F3=10;let pE=B3;function U3(){const e=pE;return pE+=F3,{zIndex:e,release:()=>{}}}const q3=v.createContext(null);function H3(){return v.useContext(q3)}function ql(e,t){const n=H3(),[r,s]=v.useState(null);v.useLayoutEffect(()=>{if(!t){s(null);return}const l=n?.claimZIndex()??U3();return s(l.zIndex),()=>{l.release()}},[t,n]);const a=v.useMemo(()=>r===null?$3:{[P3[e]]:String(r)},[r,e]);return v.useMemo(()=>({zIndex:r,portalLayerStyles:a}),[r,a])}const hx=v.forwardRef(function(t,n){const{render:r,className:s,disabled:a=!1,focusableWhenDisabled:l=!1,nativeButton:c=!0,style:f,...d}=t,{getButtonProps:h,buttonRef:m}=$l({disabled:a,focusableWhenDisabled:l,native:c});return gn("button",t,{state:{disabled:a},ref:[n,m],props:[d,h]})}),V3=["secondary","tertiary","accent","monochrome","success","warning","danger"],G3=["accent","monochrome","success","danger","warning"],wA={plan:"warning","git-added":"success","git-modified":"warning","git-removed":"danger"},W3=["accent","success","warning","danger"];new Set(V3);new Set(G3);const K3=new Set(W3);function Y3(e){return e!==void 0&&Object.hasOwn(wA,e)}function X3(e){return e!==void 0&&K3.has(e)}function EA(e){if(e!==void 0)return Y3(e)?wA[e]:e}const TA="accent",Z3=["primary","secondary","media"],Q3=["outline","ghost","text"],J3=new Set(Z3),e6=new Set(Q3);function t6(e){return J3.has(e)}function n6(e){return e6.has(e)}function mx(e,t){const n=e==="secondary"&&t!==void 0&&!X3(t);return{applyControlTone:e!=="secondary"||n,applyFilledColors:t6(e)&&!n,applyNonFilledBackground:n6(e)||n}}const gx={foreground:{"--ui-button-fg":"ui-1h31wig ui-qalphj ui-alrmhx ui-1e1xjh9 ui-1eont2s ui-qygd40 ui-1ucl2ju ui-4txb8k ui-xy4i2e ui-1g9hv69 ui-v6bjuk ui-17og37h ui-1mruliz ui-10ch5e ui-1xnt5ni ui-bcxwum","--ui-button-fg-hover":"ui-ve8a38 ui-572mpw ui-vp5bk3 ui-16shgaf ui-mjj3su ui-1v3oqsu ui-2ngaw7 ui-28dmf3",$$css:!0}},CA={secondary:{"--ui-button-fg":"ui-1j8p2m6","--ui-button-fg-hover":"ui-e6ovir",$$css:!0},tertiary:{"--ui-button-fg":"ui-1fwx157","--ui-button-fg-hover":"ui-111fdx3",$$css:!0},accent:{"--ui-button-fg":"ui-1f79f0m","--ui-button-fg-hover":"ui-1sd9hjt",$$css:!0},monochrome:{"--ui-button-fg":"ui-4zyimg","--ui-button-fg-hover":"ui-l1tqj1",$$css:!0},success:{"--ui-button-fg":"ui-gquhxt","--ui-button-fg-hover":"ui-u19t9b",$$css:!0},warning:{"--ui-button-fg":"ui-1sxygwt","--ui-button-fg-hover":"ui-8iuffn",$$css:!0},danger:{"--ui-button-fg":"ui-3kwxde","--ui-button-fg-hover":"ui-cuwwvc",$$css:!0}},r6={secondary:{"--ui-button-fg":"ui-zinbld","--ui-button-fg-hover":"ui-l1tqj1",$$css:!0},tertiary:{"--ui-button-fg":"ui-1mn641q","--ui-button-fg-hover":"ui-17wn194",$$css:!0}},_i={appearance:{"--ui-button-bg-disabled":"ui-t2ps8i ui-1siydi6 ui-9mchb4 ui-b3sabi","--ui-button-fg-disabled":"ui-lxpv47 ui-1wzq4de",kWkggS:"ui-elcf9h ui-g74ub2 ui-1twq3x9 ui-mzrycd",kMwMTN:"ui-gl2jp8 ui-qfdz8i ui-7mi40u",kKMj4B:"ui-e1kniv ui-fq1cfh",kSiTet:"ui-1x77wit",k1ekBW:"ui-fvdr79",kIyJzY:"ui-2krxs4 ui-sagj69",kAMwcw:"ui-6ekqhr",$$css:!0},press:{k3aq6I:"ui-3oybdh ui-e60hhf ui-1v3nhsv",k3nNDw:"ui-1g0ag68",$$css:!0},engaged:{kWkggS:"ui-1x1890e ui-mzrycd",kMwMTN:"ui-8ech78 ui-7mi40u",$$css:!0},media:{kSiTet:"ui-1szrgyu",k6WDB:"ui-1hvsj6t",kMzoRj:"ui-mkeg23",ksu8eU:"ui-1y0btm7",kVAM5u:"ui-1aml6k",$$css:!0},colors:{"--ui-button-bg":"ui-afdq1a ui-125v35v ui-1olvpfz ui-oa62de ui-1chhnie ui-302ab4 ui-18o3eha ui-1qs2zoo ui-1g9fn2x ui-10rfvjz ui-18ab9qp","--ui-button-bg-hover":"ui-13v2mu8 ui-yt64w ui-e9ir63 ui-onvtd7 ui-1k8s92z ui-1kvkcw9 ui-43o616 ui-cs87t5 ui-197nqx8 ui-uudzfn ui-uontnf","--ui-button-bg-active":"ui-1f1zgjn ui-1nsurhp ui-11xudch ui-1f8rfv1 ui-ggai1r","--ui-button-fg":"ui-18rr0f6 ui-cdmvwo ui-1oum4wa ui-1yrx47c ui-1s3xcaz ui-2424zi ui-rwu1v7 ui-9sccad ui-z1osth ui-s45wth ui-13k0jm5 ui-pzfz8q","--ui-button-fg-hover":"ui-ve8a38 ui-lidx4s ui-f1csfx ui-10swf5o ui-2fu0p3","--ui-button-label-shadow":"ui-107xv6h ui-1fgkyrd ui-uxtdke ui-1lpoe4m ui-1mh6czn",$$css:!0}},la={background:{"--ui-button-bg":"ui-1gwrc9l ui-302ab4 ui-1luhpj5 ui-14iu9ww","--ui-button-bg-hover":"ui-s16ggv ui-1kvkcw9 ui-hqa6pe ui-e032zu",$$css:!0},outline:{kMzoRj:"ui-mkeg23",ksu8eU:"ui-1y0btm7",kVAM5u:"ui-13747pv ui-wm9d6",$$css:!0}},i6=["accent","success","warning","danger"],s6=new Set(i6);function qp(e){return e!==void 0&&s6.has(e)}const RA={accent:{"--ui-button-bg-hover":"ui-2qxk4j",$$css:!0},success:{"--ui-button-bg-hover":"ui-11h7f69",$$css:!0},warning:{"--ui-button-bg-hover":"ui-1donwlf",$$css:!0},danger:{"--ui-button-bg-hover":"ui-x6ealz",$$css:!0}},_A={accent:{kVAM5u:"ui-5r2jki ui-wm9d6",$$css:!0},success:{kVAM5u:"ui-1gvt79p ui-wm9d6",$$css:!0},warning:{kVAM5u:"ui-1cucnr7 ui-wm9d6",$$css:!0},danger:{kVAM5u:"ui-105evjg ui-wm9d6",$$css:!0}},AA={sm:"sm",md:"sm",lg:"base",xl:"lg"},NA={root:{kGuDYH:"ui-y5h43f",kLWn49:"ui-19ji09o",kb6lSQ:"ui-t1j8c4",$$css:!0}},Ds={root:{kGuDYH:"ui-1wm8ruf",kLWn49:"ui-spwq11",kb6lSQ:"ui-14s4slr",$$css:!0}},_s={root:{kGuDYH:"ui-11wthnw",kLWn49:"ui-1ja60sm",kb6lSQ:"ui-vu1jfw",$$css:!0}},OA={root:{kGuDYH:"ui-fc7y3v",kLWn49:"ui-1yxxptd",kb6lSQ:"ui-1bignsj",$$css:!0}},o6={root:{kGuDYH:"ui-19d36u7",kLWn49:"ui-dod15v",kb6lSQ:"ui-k22nv0",$$css:!0}},a6={root:{kGuDYH:"ui-wsyq91",kLWn49:"ui-19v9tvf",kb6lSQ:"ui-1h56xvc",$$css:!0}},l6={root:{kGuDYH:"ui-1i1m3gp",kLWn49:"ui-eqr9p9",kb6lSQ:"ui-qhv51x",$$css:!0}},Hl={root:{kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kg5iWk:"ui-lyipyv",k8aIck:"ui-jlip5",kqG3fB:"ui-kyw5k8",$$css:!0}},Ih={root:{khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",$$css:!0}},hE={content:{k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kOIVth:"ui-pkkfsy",k63SB2:"ui-20ajya",khDVqt:"ui-uxw1ft",kfSwDN:"ui-87ps6o",k9WMMc:"ui-2b8uid",$$css:!0},pill:{kaIpWk:"ui-1i4c3av",kOIVth:"ui-11twubx",$$css:!0}},u6={sm:{kLKAdn:"ui-exx8yu",kwRFfy:"ui-19bzwdx",kGO01o:"ui-18d9i69",kZCmMZ:"ui-v853mj",$$css:!0},md:{kLKAdn:"ui-exx8yu",kwRFfy:"ui-196pc8s",kGO01o:"ui-18d9i69",kZCmMZ:"ui-22095l",$$css:!0},lg:{kLKAdn:"ui-exx8yu",kwRFfy:"ui-1fg0g13",kGO01o:"ui-18d9i69",kZCmMZ:"ui-1tajz9i",$$css:!0},xl:{kLKAdn:"ui-exx8yu",kwRFfy:"ui-t1q3vd",kGO01o:"ui-18d9i69",kZCmMZ:"ui-8fiw5y",$$css:!0}},c6={sm:{kLKAdn:"ui-exx8yu",kwRFfy:"ui-196pc8s",kGO01o:"ui-18d9i69",kZCmMZ:"ui-22095l",$$css:!0},md:{kLKAdn:"ui-exx8yu",kwRFfy:"ui-1fg0g13",kGO01o:"ui-18d9i69",kZCmMZ:"ui-1tajz9i",$$css:!0},lg:{kLKAdn:"ui-exx8yu",kwRFfy:"ui-t1q3vd",kGO01o:"ui-18d9i69",kZCmMZ:"ui-8fiw5y",$$css:!0},xl:{kLKAdn:"ui-exx8yu",kwRFfy:"ui-1n9uuka",kGO01o:"ui-18d9i69",kZCmMZ:"ui-cssynl",$$css:!0}},Ti={content:hE.content,pill:hE.pill,size:u6,pillSize:c6,typography:{sm:_s.root,md:_s.root,lg:_s.root,xl:OA.root}},IA={root:{kFalU9:"ui-ggy1nq",kSiTet:"ui-1szrgyu",kMeerF:"ui-1k57tk5 ui-784prv",k3XXqK:"ui-1t137rt ui-9v5kkp",kInvED:"ui-1wfwxd8 ui-7s97pk",kjBf7l:"ui-1uczgqu ui-1725o6r",$$css:!0}},f6={root:{kB7OPa:"ui-9f619",kMv6JI:"ui-jb2p0i",kGuDYH:"ui-1qlqyl8",kLWn49:"ui-15bjb6t",kMzoRj:"ui-mkeg23",ksu8eU:"ui-1y0btm7",kVAM5u:"ui-9r1u3d",kkrTdU:"ui-1ypdohk ui-1j1ks5o",kSiTet:"ui-1hc1fzr",kfzvcC:"ui-67bb7w ui-7gqb9v",$$css:!0}},bx={root:[f6.root,IA.root]},Es={sm:{kaIpWk:"ui-1e1y6u3",$$css:!0},md:{kaIpWk:"ui-1043rbw",$$css:!0},lg:{kaIpWk:"ui-1m7fhj7",$$css:!0},xl:{kaIpWk:"ui-1q4ynmn",$$css:!0}},Vi={sm:{kZKoxP:"ui-1a6rlst",$$css:!0},md:{kZKoxP:"ui-1e94bgo",$$css:!0},lg:{kZKoxP:"ui-170hpbr",$$css:!0},xl:{kZKoxP:"ui-t8t6p",$$css:!0}},Vu={markdownHover:{"--ui-md-state-color":"ui-1w18epr",$$css:!0},primaryWeight:{k63SB2:"ui-20ajya ui-1uv0z76",$$css:!0},alignLeft:{kjj79g:"ui-1nhvcw1",$$css:!0},fullWidth:{kzqmXN:"ui-h8yej3",$$css:!0},frameContent:{kZCmMZ:"ui-1c1uobl",kwRFfy:"ui-yri2b",$$css:!0}},mE={labelGroup:{k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kOIVth:"ui-pkkfsy",k7Eaqz:"ui-euugli",ks0D6T:"ui-193iq5w",$$css:!0},kbs:{kmuXW:"ui-2lah0s",kMv6JI:"ui-y1aii3",k63SB2:"ui-20ajya",kSiTet:"ui-byyjgo ui-s6mkfk",k33iCy:"ui-1go34h7",$$css:!0}},Ei={root:[bx.root,Ti.content,Vu.markdownHover,Vu.primaryWeight],fontSmoothing:Ih.root,align:{center:null,left:Vu.alignLeft},fullWidth:Vu.fullWidth,frame:{container:null,content:Vu.frameContent},shape:{pill:Ti.pill},size:{sm:[Vi.sm,Es.sm,Ti.size.sm],md:[Vi.md,Es.md,Ti.size.md],lg:[Vi.lg,Es.lg,Ti.size.lg],xl:[Vi.xl,Es.xl,Ti.size.xl]},pillSize:Ti.pillSize,typography:Ti.typography,labelGroup:mE.labelGroup,kbs:[Ds.root,mE.kbs]};function d6({rounded:e,variant:t,enforcedRounded:n}){return e!==void 0?e:t==="text"?!1:n===!0}const p6="md",h6="secondary",m6={"ui--default-marker":"ui--default-marker",$$css:!0};function gE(e,t){if(e==null)return null;const n=typeof e=="string"?{name:e}:e;return g.jsx(qt,{"aria-hidden":"true",modifier:n.modifier,name:n.name,size:t,variant:n.variant})}function yn({variant:e,tone:t,size:n,rounded:r,frame:s="container",align:a,fullWidth:l,disabled:c,children:f,leadingIcon:d,trailingIcon:h,kbs:m,pressed:b,className:y,style:k,rootStyle:S,"aria-expanded":C,"aria-pressed":E,"aria-busy":T,...R}){const _=ba(),D=e??_?.buttonVariant??h6,A=n??_?.buttonSize??p6,I=d6({enforcedRounded:_?.buttonRounded,rounded:r,variant:D}),P=l??_?.buttonFullWidth??!1,$=c??_?.disabled,O=t??(D==="primary"||D==="ghost"?_?.buttonTone:void 0),Y=EA(O??(D==="primary"?TA:void 0)),U=_?.buttonIconSize??AA[A],B=R["data-pressed"],j=mx(D,Y),q=zt(Ei.root,Ei.fontSmoothing,_i.appearance,j.applyControlTone&&gx.foreground,j.applyControlTone&&Y!==void 0&&CA[Y],j.applyFilledColors&&_i.colors,j.applyNonFilledBackground&&la.background,(D==="outline"||D==="ghost")&&qp(Y)&&RA[Y],D==="outline"&&la.outline,D==="outline"&&qp(Y)&&_A[Y],D==="media"&&_i.media,b===!0&&_i.engaged,Ei.size[A],Ei.typography[A],Ei.align[a??"center"],P&&Ei.fullWidth,I&&Ei.shape.pill,I&&Ei.pillSize[A],Ei.frame[s],_?.buttonRootStyle,S,m6),H=gE(d,U),W=gE(h,U);let F=f;if(m!=null){const K=zt(Ei.labelGroup),N=zt(Ei.kbs);F=g.jsxs("span",{className:sn("ui-button__label-group",K.className),style:K.style,children:[H,f,W,g.jsx("span",{className:sn("ui-button__kbs",N.className),style:N.style,children:m})]})}else(H!=null||W!=null)&&(F=g.jsxs(g.Fragment,{children:[H,f,W]}));return g.jsx(hx,{...R,"aria-busy":T,"aria-expanded":C,"aria-pressed":C===void 0&&b!==void 0?b:E,className:sn("ui-button",q.className,y),style:{...q.style,...k},"data-variant":D,"data-size":A,"data-rounded":I||void 0,"data-frame":s!=="container"?s:void 0,"data-tone":Y,"data-align":a==="left"?a:void 0,"data-full-width":P||void 0,"data-pressed":b!==void 0?String(b):B,"data-busy":T===!0||T==="true"?"":void 0,"data-padded-label":s==="container"?"":void 0,disabled:$,children:g.jsx(Ms,{iconSize:U,children:F})})}function Xc(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function _l({controlled:e,default:t,name:n,state:r="value"}){const{current:s}=v.useRef(e!==void 0),[a,l]=v.useState(t),c=s?e:a,f=v.useCallback(d=>{s||l(d)},[]);return[c,f]}let bE=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.indeterminate="data-indeterminate",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({}),yE=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const g6={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},ac={valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},b6={disabled:!1,...ac},Zc={valid(e){return e===null?null:e?{[yE.valid]:""}:{[yE.invalid]:""}}};function y6(e){return v.useMemo(()=>({checked(t){return e.indeterminate?{}:t?{[bE.checked]:""}:{[bE.unchecked]:""}},...Zc}),[e.indeterminate])}const v6={invalid:void 0,name:void 0,validityData:{state:g6,errors:[],error:"",value:"",initialValue:null},setValidityData:Zn,disabled:void 0,touched:ac.touched,setTouched:Zn,dirty:ac.dirty,setDirty:Zn,filled:ac.filled,setFilled:Zn,focused:ac.focused,setFocused:Zn,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:b6,markedDirtyRef:{current:!1},registerFieldControl:Zn,validation:{getValidationProps:(e,t=$n)=>t,inputRef:{current:null},registerInput:Zn,commit:async()=>{},change:Zn}},x6=v.createContext(v6);function Mh(e=!0){const t=v.useContext(x6);if(t.setValidityData===Zn&&!e)throw new Error(Nn(28));return t}function MA(e,t,n,r,s=!0,a){const{registerFieldControl:l}=Mh(),c=v.useRef(null);c.current||(c.current=Symbol()),Ve(()=>{const f=c.current;return!f||!s?void 0:(l(f,{controlRef:e,getValue:r,id:t,name:a,value:n}),()=>{l(f,void 0)})},[e,s,r,t,a,l,n])}const k6=v.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Zn,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function DA(){return v.useContext(k6)}const S6=v.createContext({controlId:void 0,registerControlId:Zn,labelId:void 0,setLabelId:Zn,messageIds:[],setMessageIds:Zn,getDescriptionProps:e=>e});function yx(){return v.useContext(S6)}const w6=v.createContext(void 0);function E6(){const e=v.useContext(w6);if(e===void 0)throw new Error(Nn(14));return e}const T6=v.forwardRef(function(t,n){const{render:r,className:s,style:a,keepMounted:l=!1,...c}=t,f=E6(),d=f.checked||f.indeterminate,{mounted:h,transitionStatus:m,setMounted:b}=Yc(d),y=v.useRef(null),k={...f,transitionStatus:m};_o({open:d,ref:y,onComplete(){d||b(!1)}});const C={...y6(f),...To,...Zc},E=l||h,T=gn("span",t,{ref:[n,y],state:k,stateAttributesMapping:C,props:c});return E?T:null}),C6="md",vE={root:{kVAEAm:"ui-1n2onr6",k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kB7OPa:"ui-9f619",kMeerF:"ui-1k57tk5 ui-1gv1zob",k3XXqK:"ui-1t137rt ui-1rsevuf",kjBf7l:"ui-1uczgqu ui-14qs42y",kInvED:"ui-1wfwxd8 ui-1i57s2w",kMzoRj:"ui-mkeg23",ksu8eU:"ui-1y0btm7",kaIpWk:"ui-1e1y6u3",kMwMTN:"ui-1lriclw ui-m9a9xk",kWkggS:"ui-i07v4r ui-1yow1yk ui-ff598k",kVAM5u:"ui-1tjqsyf ui-1b3ufqo ui-1ch3k2o",k3aq6I:"ui-3oybdh ui-78fr0e",k3nNDw:"ui-1g0ag68",k1ekBW:"ui-1lxufdw",kIyJzY:"ui-2krxs4 ui-sagj69",kAMwcw:"ui-6ekqhr",$$css:!0},sm:{kzqmXN:"ui-2s4hoy",kZKoxP:"ui-px1j5t",$$css:!0},md:{kzqmXN:"ui-ek66a6",kZKoxP:"ui-1q5geii",$$css:!0},lg:{kzqmXN:"ui-1xx3ewh",kZKoxP:"ui-14dyci",$$css:!0}},R6={primary:{"--ui-checkbox-bg":"ui-x0sf4j","--ui-checkbox-border":"ui-14p436a","--ui-checkbox-glyph":"ui-1d5945d",$$css:!0},green:{"--ui-checkbox-bg":"ui-1g72fie","--ui-checkbox-border":"ui-165ap9x","--ui-checkbox-glyph":"ui-1d5945d",$$css:!0},neutral:{"--ui-checkbox-bg":"ui-1rpsy8r","--ui-checkbox-border":"ui-mtpsoh","--ui-checkbox-glyph":"ui-qnctk6",$$css:!0}},_6={sm:9,md:10,lg:11},xE={"--icon-weight":"700"};function A6({indeterminate:e,interactive:t,size:n,variant:r}){const s=zt(vE.root,vE[n],R6[r]),a={className:"ui-10l6tqk ui-10a8y8t ui-3nfvp2 ui-6s0dn4 ui-l56j7k ui-1g0ag68 ui-n9if97 ui-7pq1vu ui-sagj69 ui-6ekqhr ui-g01cxk ui-hhdk15 ui-nyzrob ui-h98lc ui-1nrvvgt ui-cntms"},l=_6[n];return g.jsx("span",{"aria-hidden":"true",className:sn("ui-checkbox__box",s.className),style:s.style,children:t?g.jsx(T6,{className:sn("ui-checkbox__icon",a.className),keepMounted:!0,render:(c,f)=>g.jsx("span",{...c,children:g.jsx(qt,{name:f.indeterminate?"minus":"check",size:l,style:xE})}),style:a.style}):g.jsx("span",{className:sn("ui-checkbox__icon",a.className),style:a.style,children:g.jsx(qt,{name:e?"minus":"check",size:l,style:xE})})})}function LA({checked:e,disabled:t,indeterminate:n=!1,size:r=C6,variant:s="primary"}){const a={className:"ui-3nfvp2 ui-6s0dn4 ui-l56j7k ui-1c4vz4f ui-2lah0s ui-dl72j9 ui-xymvpz ui-47corl ui--default-marker"};return g.jsx("span",{"aria-hidden":"true",className:sn("ui-checkbox",a.className),style:a.style,"data-component":"checkbox","data-size":r,"data-variant":s,"data-checked":e||void 0,"data-disabled":t||void 0,"data-indeterminate":n||void 0,children:g.jsx(A6,{indeterminate:n,interactive:!1,size:r,variant:s})})}function N6(e,t,n=(r,s)=>r===s){return e.length===t.length&&e.every((r,s)=>n(r,t[s]))}function O6(e){const{open:t,defaultOpen:n,onOpenChange:r,disabled:s}=e,[a,l]=_l({controlled:t,default:n,name:"Collapsible",state:"open"}),{mounted:c,setMounted:f,transitionStatus:d}=Yc(a,!0,!0),h=Fl(),[m,b]=v.useState(),y=m??h,k=Ke(S=>{const C=!a,E=Ct(Bl,S.nativeEvent);r(C,E),!E.isCanceled&&l(C)});return v.useMemo(()=>({disabled:s,handleTrigger:k,mounted:c,open:a,panelId:y,setMounted:f,setOpen:l,setPanelIdState:b,transitionStatus:d}),[s,k,c,a,y,f,l,b,d])}const jA=v.createContext(void 0);function zA(){const e=v.useContext(jA);if(e===void 0)throw new Error(Nn(15));return e}let vx=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=sa.startingStyle]="startingStyle",e[e.endingStyle=sa.endingStyle]="endingStyle",e})({}),I6=(function(e){return e.panelOpen="data-panel-open",e})({});const M6={[vx.open]:""},D6={[vx.closed]:""},L6={open(e){return e?{[I6.panelOpen]:""}:null}},j6={open(e){return e?M6:D6}},PA={...j6,...To},z6=v.forwardRef(function(t,n){const{render:r,className:s,defaultOpen:a=!1,disabled:l=!1,onOpenChange:c,open:f,style:d,...h}=t,m=Ke(c),b=O6({open:f,defaultOpen:a,onOpenChange:m,disabled:l}),y=v.useMemo(()=>({open:b.open,disabled:b.disabled,transitionStatus:b.transitionStatus}),[b.open,b.disabled,b.transitionStatus]),k=v.useMemo(()=>({...b,onOpenChange:m,state:y}),[b,m,y]),S=gn("div",t,{state:y,ref:n,props:h,stateAttributesMapping:PA});return g.jsx(jA.Provider,{value:k,children:S})}),P6={...L6,...To},kE=v.forwardRef(function(t,n){const{panelId:r,open:s,handleTrigger:a,state:l,disabled:c}=zA(),{className:f,disabled:d=c,render:h,nativeButton:m=!0,style:b,...y}=t,{getButtonProps:k,buttonRef:S}=$l({disabled:d,focusableWhenDisabled:!0,native:m});return gn("button",t,{state:l,ref:[n,S],props:[{"aria-controls":s?r:void 0,"aria-expanded":s,onClick:a},y,k],stateAttributesMapping:P6})}),Gu={height:void 0,width:void 0};function $6(e){const{externalRef:t,hiddenUntilFound:n,id:r,keepMounted:s,mounted:a,onOpenChange:l,open:c,setMounted:f,setOpen:d,transitionStatus:h}=e,m=v.useRef(null),b=v.useRef(null),[y,k]=v.useState(Gu),S=v.useRef(Gu),C=v.useRef(!1),E=v.useRef(c),T=v.useRef(!1),[R,_]=v.useState(!1),D=v.useRef(null),A=xo(t,m),I=An({mounted:a,open:c}),P=Z_(m,!1,!1),$=!c&&!a,O=R?"idle":h,Y=c&&(E.current||T.current),U=!c&&a&&b.current==="css-animation"&&y.height===void 0&&y.width===void 0?S.current:y,B=n&&$&&b.current!=="css-animation",j=Ke((K,N=!0)=>{N&&(S.current=K),k(K)}),q=Ke(()=>{D.current?.(),D.current=null}),H=Ke(K=>{q(),D.current=()=>{D.current=null,K()}}),W=Ke(()=>{c&&a&&b.current==="css-animation"&&(T.current=!0)});Ve(()=>{!R||h==="starting"||_(!1)},[R,h]),v.useEffect(()=>()=>{W(),q()},[W,q]),Ve(()=>{const K=m.current;if(!K)return;!c&&D.current&&q();const N=B6(K,Y);if(b.current=N,c&&h==="idle"&&E.current&&N==="css-animation"){S.current=rl(K);return}if(c&&h==="starting"){const L=C.current;if(C.current=!1,N==="none"){j(rl(K)),_(!0);return}if(N==="css-transition"){const Z=F6(K);if(j(rl(K)),!L)return Z;const re=Wu(K,"transition-duration","0s");return H(re),_(!0),Z}if(N==="css-animation"){if(j(rl(K)),!L){Wu(K,"animation-name","none")();return}const Z=Wu(K,"animation-name","none"),re=Wu(K,"animation-duration","0s");Z(),H(re),_(!0);return}}if(!c&&a&&(h==="idle"||h==="starting")){if(E.current=!1,T.current=!1,N==="none"){j(Gu,!1),f(!1);return}j(rl(K));return}if(h!=="ending")return;if(N==="none"){f(!1);return}const z=rl(K);if(!((z.height??0)>0||(z.width??0)>0)){f(!1);return}j(z),N==="css-animation"&&Wu(K,"animation-name","none")()},[a,c,q,j,f,H,Y,h]),_o({enabled:c&&a&&O==="idle",open:!0,ref:m,onComplete(){c&&j(Gu,!1)}}),v.useEffect(()=>{if(c||!a||O!=="ending"||!m.current)return;const N=new AbortController;let z=-1;function V(){I.current.open||(f(!1),j(Gu,!1))}return z=Lr.request(()=>{N.signal.aborted||P(V,N.signal)}),()=>{Lr.cancel(z),N.abort()}},[I,a,c,O,P,j,f]),Ve(()=>{const K=m.current;!K||!n||!$||K.setAttribute("hidden","until-found")},[$,n]),v.useEffect(function(){const N=m.current;if(!N)return;function z(V){const L=Ct(Oi,V);l(!0,L),!L.isCanceled&&(C.current=!0,d(!0))}return Dt(N,"beforematch",z)},[l,d]);const F=s||n||a||c;return{height:U.height,props:{...B?{[vx.startingStyle]:""}:void 0,hidden:$,id:r},ref:A,shouldPreventOpenAnimation:Y,shouldRender:F,transitionStatus:O,width:U.width}}function rl(e){return{height:e.scrollHeight,width:e.scrollWidth}}function B6(e,t=!1){const n=vn(e).getComputedStyle(e),r=(n.animationName.split(",").map(a=>a.trim()).some(a=>a!==""&&a!=="none")||t)&&SE(n.animationDuration),s=SE(n.transitionDuration);return r&&s||s?"css-transition":r?"css-animation":"none"}function SE(e){return e.split(",").map(t=>t.trim()).some(t=>t!==""&&Number.parseFloat(t)>0)}function Wu(e,t,n){const r=e.style.getPropertyValue(t),s=e.style.getPropertyPriority(t);return e.style.setProperty(t,n),()=>{if(r===""){e.style.removeProperty(t);return}e.style.setProperty(t,r,s)}}function F6(e){const t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(s=>{e.style.setProperty(s,"initial","important")});function n(){Object.entries(t).forEach(([s,a])=>{if(a===""){e.style.removeProperty(s);return}e.style.setProperty(s,a)})}const r=Lr.request(n);return()=>{Lr.cancel(r),n()}}let wE=(function(e){return e.collapsiblePanelHeight="--collapsible-panel-height",e.collapsiblePanelWidth="--collapsible-panel-width",e})({});const U6=v.forwardRef(function(t,n){const{className:r,hiddenUntilFound:s,keepMounted:a,render:l,id:c,style:f,...d}=t,{mounted:h,onOpenChange:m,open:b,panelId:y,setMounted:k,setPanelIdState:S,setOpen:C,state:E,transitionStatus:T}=zA(),R=s??!1,_=a??!1;Ve(()=>{if(c)return S(c),()=>{S(void 0)}},[c,S]);const{height:D,props:A,ref:I,shouldPreventOpenAnimation:P,shouldRender:$,transitionStatus:O,width:Y}=$6({externalRef:n,hiddenUntilFound:R,id:y,keepMounted:_,mounted:h,onOpenChange:m,open:b,setMounted:k,setOpen:C,transitionStatus:T}),U={...E,transitionStatus:O},B=ZR(f,U),j=gn("div",{...t,style:void 0},{state:U,ref:I,props:[A,{style:{[wE.collapsiblePanelHeight]:D===void 0?"auto":`${D}px`,[wE.collapsiblePanelWidth]:Y===void 0?"auto":`${Y}px`}},d,B?{style:B}:void 0,P?{style:{animationName:"none"}}:void 0],stateAttributesMapping:PA});return $?j:null}),q6={root:{kKwaWg:"ui-c079w9 ui-phioz4",kgSjnq:"ui-akli9p",kHypHr:"ui-1ta4xzc ui-15mlgz9",kBahZS:"ui-1t23j8t ui-nqxwjk",kUisrP:"ui-g7jpbn ui-1xgngqn",kKVMdj:"ui-1dtn8og ui-1aquc0h",k44tkh:"ui-1q3qbx4",kyAemX:"ui-1esw782",ko0y90:"ui-a4qsjk",$$css:!0}},H6={inherit:{"--ui-text-shimmer-base":"ui-1ptom83","--ui-text-shimmer-highlight":"ui-rxqqkw",$$css:!0},primary:{kMwMTN:"ui-1wd3ewq","--ui-text-shimmer-base":"ui-cf8467","--ui-text-shimmer-highlight":"ui-17vhta",$$css:!0},secondary:{kMwMTN:"ui-19aaqeu","--ui-text-shimmer-base":"ui-1dl6blw","--ui-text-shimmer-highlight":"ui-17vhta",$$css:!0},tertiary:{kMwMTN:"ui-4b2ntj","--ui-text-shimmer-base":"ui-3zfljf","--ui-text-shimmer-highlight":"ui-1ph1pus",$$css:!0}};function $A(e){return[q6.root,H6[e]]}const V6={"ui--default-marker":"ui--default-marker",$$css:!0};function BA(e){return e==="default"?"secondary":"tertiary"}const co={base:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kfSwDN:"ui-87ps6o",kOIVth:"ui-11twubx",k8aIck:"ui-jlip5",kqG3fB:"ui-kyw5k8",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kg5iWk:"ui-lyipyv",kGuDYH:"ui-hwpfco",kLWn49:"ui-1bcdmom",$$css:!0},buttonReset:{kWkggS:"ui-jbqb8w",kMzoRj:"ui-c342km",ksu8eU:"ui-ng3xce",kLKAdn:"ui-exx8yu",kGO01o:"ui-18d9i69",kZCmMZ:"ui-1c1uobl",kwRFfy:"ui-yri2b",keoZOQ:"ui-dj266r",k1K539:"ui-at24cr",keTefX:"ui-1lziwak",k71WvV:"ui-14z9mp",kMv6JI:"ui-jb2p0i",k63SB2:"ui-1pd3egz",kMwMTN:"ui-1heor9g",k9WMMc:"ui-1yc453h",kMeerF:"ui-1k57tk5 ui-784prv",k3XXqK:"ui-1t137rt ui-9v5kkp",kInvED:"ui-1wfwxd8 ui-1bqaal",kjBf7l:"ui-1uczgqu ui-1725o6r",$$css:!0},presentational:{kMeerF:"ui-1k57tk5",k3XXqK:"ui-1t137rt",$$css:!0},clickable:{kkrTdU:"ui-1ypdohk",$$css:!0},disabled:{kSiTet:"ui-byyjgo",$$css:!0},detailsButton:{kGuDYH:"ui-1qlqyl8",kLWn49:"ui-15bjb6t",ks0D6T:"ui-193iq5w",kVQacm:"ui-b3r6kr",kkrTdU:"ui-1ypdohk",kMnn75:"ui-ujl8zx",k1TLXF:"ui-r5o5jz ui-9ojkr9 ui-1e7jyuc",k1ekBW:"ui-eirdtl",kIyJzY:"ui-7pq1vu ui-6xbvzw ui-1nk6rg0",kAMwcw:"ui-1bt1wk1",kg5iWk:"ui-lyipyv",khDVqt:"ui-uxw1ft",$$css:!0},detailsButtonShimmer:{kMnn75:"ui-krqix3 ui-1sur9pj ui-1f2jko9",$$css:!0}},Ob={base:{kmuXW:"ui-2lah0s",kMwMTN:"ui-19aaqeu ui-1dkqrid",k63SB2:"ui-20ajya",k1ekBW:"ui-t3l3uh",kIyJzY:"ui-7pq1vu",kAMwcw:"ui-1bt1wk1",$$css:!0},muted:{kMwMTN:"ui-4b2ntj ui-1uq8sgy",$$css:!0},tabularNums:{kcqcaj:"ui-ss6m8b",$$css:!0}};function G6({action:e,chevronRef:t,details:n,detailsRef:r,leadingIcon:s,loading:a,shimmerDetails:l,showChevron:c,tabularNums:f,tone:d}){const h=zt(Ob.base,(d==="muted"||d==="tertiary")&&Ob.muted,f&&Ob.tabularNums,a&&!l&&$A(BA(d))),m={0:{className:"ui-1lliihq ui-s83m0k ui-euugli ui-4b2ntj ui-qdr9cq ui-6ikm8r ui-10wlt62 ui-lyipyv ui-t3l3uh ui-7pq1vu ui-1bt1wk1"},2:{className:"ui-1lliihq ui-s83m0k ui-euugli ui-6ikm8r ui-10wlt62 ui-lyipyv ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-1e4uaio ui-116yoyw"},1:{className:"ui-1lliihq ui-s83m0k ui-euugli ui-4b2ntj ui-qdr9cq ui-6ikm8r ui-10wlt62 ui-lyipyv ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-ss6m8b"},3:{className:"ui-1lliihq ui-s83m0k ui-euugli ui-6ikm8r ui-10wlt62 ui-lyipyv ui-t3l3uh ui-7pq1vu ui-1bt1wk1 ui-1e4uaio ui-116yoyw ui-ss6m8b"}}[(d==="muted")<<1|!!f<<0],b={className:"ui-2lah0s ui-fdlg0y ui-1urst0s ui-1lbmi28 ui-18tq7xr ui-g01cxk ui-bthccv ui-7p49u4 ui-1tty4wy ui-p33vsb ui-4f0zl0 ui-93pzih ui-1bt1wk1"},y={className:"ui-3nfvp2 ui-6s0dn4 ui-2lah0s ui-14ju556 ui-1urst0s"};return g.jsxs(g.Fragment,{children:[s!=null&&g.jsx("span",{className:sn("ui-collapsible-leading-icon",y.className),style:y.style,children:s}),e!=null&&g.jsx("span",{className:sn("ui-collapsible-action",h.className),style:h.style,children:e}),n&&g.jsx("span",{ref:r,className:sn("ui-collapsible-details",m.className),style:m.style,children:n}),c&&g.jsx(qt,{ref:t,name:"chevron-right",className:sn("ui-collapsible-chevron",b.className),style:b.style,size:"sm"})]})}function vi({action:e,details:t,onDetailsClick:n,detailsButtonStyle:r,headerStyle:s,leadingIcon:a,disabled:l=!1,expandable:c=!0,loading:f=!1,shimmerDetails:d=!0,tabularNums:h=!1,tone:m="default",children:b,headerRef:y,detailsRef:k,chevronRef:S,className:C,contentClassName:E,open:T,defaultOpen:R,onOpenChange:_,...D}){const A=n!==void 0,I=c&&A,P=T!==void 0,[$,O]=v.useState(()=>R??!1),Y=P?!!T:$,U=(Z,re)=>{P||O(Z),_?.(Z,re)},B=A?g.jsx("button",{type:"button",...zt(co.buttonReset,co.detailsButton,f&&d&&co.detailsButtonShimmer,r),disabled:l,onClick:Z=>{Z.stopPropagation(),n(Z)},children:t}):t,j=c&&b!=null&&typeof b!="boolean",q={className:"ui-78zum5 ui-dt5ytf"},H=zt(co.base,c&&!A?co.buttonReset:co.presentational,c&&!l&&co.clickable,l&&co.disabled,f&&d&&$A(BA(m)),V6,s),W={0:{className:"ui-jbqb8w ui-c342km ui-ng3xce ui-exx8yu ui-18d9i69 ui-1c1uobl ui-yri2b ui-dj266r ui-at24cr ui-1lziwak ui-14z9mp ui-jb2p0i ui-1pd3egz ui-1heor9g ui-1yc453h ui-1k57tk5 ui-784prv ui-1t137rt ui-9v5kkp ui-1wfwxd8 ui-1bqaal ui-1uczgqu ui-1725o6r ui-3nfvp2 ui-6s0dn4 ui-2lah0s ui--default-marker"},1:{className:"ui-jbqb8w ui-c342km ui-ng3xce ui-exx8yu ui-18d9i69 ui-1c1uobl ui-yri2b ui-dj266r ui-at24cr ui-1lziwak ui-14z9mp ui-jb2p0i ui-1pd3egz ui-1heor9g ui-1yc453h ui-1k57tk5 ui-784prv ui-1t137rt ui-9v5kkp ui-1wfwxd8 ui-1bqaal ui-1uczgqu ui-1725o6r ui-1ypdohk ui-3nfvp2 ui-6s0dn4 ui-2lah0s ui--default-marker"}}[!l<<0],F={className:"ui-2lah0s ui-fdlg0y ui-1urst0s ui-1lbmi28 ui-18tq7xr ui-g01cxk ui-bthccv ui-7p49u4 ui-1tty4wy ui-p33vsb ui-4f0zl0 ui-93pzih ui-1bt1wk1"},K={className:"ui-1lliihq ui-1kd3hbs ui-uan8c8 ui-1fe7yth ui-12wejat ui-6ikm8r ui-10wlt62 ui-pv8u57 ui-ua3uq3 ui-4wkmsb ui-g3p6pi ui-ptf4uz"},N={className:"ui-6ikm8r ui-10wlt62 ui-2lwn1j"},z={className:"ui-78zum5 ui-dt5ytf ui-1y48gol ui-1vdilah ui-1hc1fzr ui-19991ni ui-4wkmsb ui-g3p6pi ui-1bt1wk1"},V={"data-component":"collapsible-header",className:sn("ui-collapsible-header",H.className),style:H.style},L=g.jsx(G6,{action:e,chevronRef:S,details:B,detailsRef:k,leadingIcon:a,loading:f,shimmerDetails:d,showChevron:c&&!A,tabularNums:h,tone:m});return g.jsxs(z6,{...D,open:I?Y:T,defaultOpen:I?void 0:R,onOpenChange:I?U:_,disabled:l,"data-expandable":c?"":void 0,"data-loading":f?"":void 0,"data-tone":m,className:sn("ui-collapsible",q.className,C),style:q.style,children:[I?g.jsxs("div",{...V,ref:y,onClick:()=>{l||U(!Y)},children:[L,g.jsx(kE,{"data-component":"collapsible-header","aria-label":typeof t=="string"?`Toggle ${t}`:"Toggle details",className:W.className,style:W.style,...j?null:{"aria-controls":void 0},onClick:Z=>{l||Z.stopPropagation()},children:g.jsx(qt,{ref:S,name:"chevron-right",className:sn("ui-collapsible-chevron",F.className),style:F.style,size:"sm"})})]}):c?g.jsx(kE,{...V,ref:y,...j?null:{"aria-controls":void 0},onClick:Z=>{l||Z.stopPropagation()},children:L}):g.jsx("div",{...V,ref:y,children:L}),j&&g.jsx(U6,{keepMounted:!0,className:sn("ui-collapsible-content-view",K.className),style:K.style,children:g.jsx("div",{className:N.className,style:N.style,children:g.jsx("div",{className:sn("ui-collapsible-content",z.className,E),style:z.style,children:b})})})]})}const W6=(e,t)=>Object.is(e,t);function ua(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function K6(e,t,n){return!e||e.length===0?!1:e.some(r=>r===void 0?!1:ua(t,r,n))}function mc(e,t,n){return!e||e.length===0?-1:e.findIndex(r=>r===void 0?!1:ua(r,t,n))}function Y6(e,t,n){return e.filter(r=>!ua(t,r,n))}function qy(e){if(e==null)return"";if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return String(e)}}function FA(e){return e!=null&&e.length>0&&typeof e[0]=="object"&&e[0]!=null&&"items"in e[0]}function X6(e){if(!Array.isArray(e))return e!=null&&"null"in e;const t=e;if(FA(t)){for(const n of t)for(const r of n.items)if(r&&r.value==null&&r.label!=null)return!0;return!1}for(const n of t)if(n&&n.value==null&&n.label!=null)return!0;return!1}function UA(e,t){if(t&&e!=null)return t(e)??"";if(e&&typeof e=="object"){if("label"in e&&e.label!=null)return String(e.label);if("value"in e)return String(e.value)}return qy(e)}function Jo(e,t){return t&&e!=null?t(e)??"":e&&typeof e=="object"&&"value"in e&&"label"in e?qy(e.value):qy(e)}function qA(e,t,n){function r(){return UA(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e=="object"&&"label"in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return t[e]??r();if(Array.isArray(t)){const s=t,a=FA(s)?s.flatMap(l=>l.items):s;if(e==null||typeof e!="object"){const l=a.find(c=>c.value===e);return l&&l.label!=null?l.label:r()}if("value"in e){const l=a.find(c=>c&&c.value===e.value);if(l&&l.label!=null)return l.label}}return r()}function Z6(e,t,n){return e.reduce((r,s,a)=>(a>0&&r.push(", "),r.push(g.jsx(v.Fragment,{children:qA(s,t,n)},a)),r),[])}function xx(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:s,registerControlId:a}=yx(),l=Fl(t),c=n?s:void 0,f=zr(()=>Symbol("labelable-control")),d=v.useRef(!1),h=v.useRef(t!=null),m=Ke(()=>{!d.current||a===Zn||(d.current=!1,a(f.current,void 0))});return Ve(()=>{if(a===Zn)return;let b;if(n){const y=r?.current;gt(y)&&y.closest("label")!=null?b=t??null:b=c??l}else if(t!=null)h.current=!0,b=t;else if(h.current)b=l;else{m();return}if(b===void 0){m();return}d.current=!0,a(f.current,b)},[t,r,c,a,n,l,f,m]),v.useEffect(()=>m,[m]),s??l}function Q6(e,t){return e??t}function J6(e){const t=e.getBoundingClientRect(),n=vn(e);if(Gv)return t;const r=n.getComputedStyle(e,"::before"),s=n.getComputedStyle(e,"::after");if(!(r.content!=="none"||s.content!=="none"))return t;const l=parseFloat(r.width)||0,c=parseFloat(r.height)||0,f=parseFloat(s.width)||0,d=parseFloat(s.height)||0,h=Math.max(t.width,l,f),m=Math.max(t.height,c,d),b=h-t.width,y=m-t.height;return{left:t.left-b/2,right:t.right+b/2,top:t.top-y/2,bottom:t.bottom+y/2}}const HA=v.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function e4(){return v.useContext(HA)}function kx(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:s}=e,a=Ke(s),l=v.useRef(0),c=zr(n4).current,f=zr(t4).current,[d,h]=v.useState(0),m=v.useRef(d),b=Ke((E,T)=>{f.set(E,T??null),m.current+=1,h(m.current)}),y=Ke(E=>{f.delete(E),m.current+=1,h(m.current)}),k=v.useMemo(()=>{const E=new Map;return Array.from(f.keys()).filter(R=>R.isConnected).sort(r4).forEach((R,_)=>{const D=f.get(R)??{};E.set(R,{...D,index:_})}),E},[f,d]);Ve(()=>{if(typeof MutationObserver!="function"||k.size===0)return;const E=new MutationObserver(T=>{const R=new Set,_=D=>R.has(D)?R.delete(D):R.add(D);T.forEach(D=>{D.removedNodes.forEach(_),D.addedNodes.forEach(_)}),R.size===0&&(m.current+=1,h(m.current))});return k.forEach((T,R)=>{R.parentElement&&E.observe(R.parentElement,{childList:!0})}),()=>{E.disconnect()}},[k]),Ve(()=>{m.current===d&&(n.current.length!==k.size&&(n.current.length=k.size),r&&r.current.length!==k.size&&(r.current.length=k.size),l.current=k.size),a(k)},[a,k,n,r,d]),Ve(()=>()=>{n.current=[]},[n]),Ve(()=>()=>{r&&(r.current=[])},[r]);const S=Ke(E=>(c.add(E),()=>{c.delete(E)}));Ve(()=>{c.forEach(E=>E(k))},[c,k]);const C=v.useMemo(()=>({register:b,unregister:y,subscribeMapChange:S,elementsRef:n,labelsRef:r,nextIndexRef:l}),[b,y,S,n,r,l]);return g.jsx(HA.Provider,{value:C,children:t})}function t4(){return new Map}function n4(){return new Set}function r4(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const i4=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:a,platform:l,elements:c,middlewareData:f}=t,{element:d,padding:h=0,offsetParent:m="real"}=Ns(e,t)||{};if(d==null)return{};const b=g_(h),y={x:n,y:r},k=Zv(s),S=Xv(k),C=await l.getDimensions(d),E=k==="y",T=E?"top":"left",R=E?"bottom":"right",_=E?"clientHeight":"clientWidth",D=a.reference[S]+a.reference[k]-y[k]-a.floating[S],A=y[k]-a.reference[k],I=m==="real"?await l.getOffsetParent?.(d):c.floating;let P=c.floating[_]||a.floating[S];(!P||!await l.isElement?.(I))&&(P=c.floating[_]||a.floating[S]);const $=D/2-A/2,O=P/2-C[S]/2-1,Y=Math.min(b[T],O),U=Math.min(b[R],O),B=Y,j=P-C[S]-U,q=P/2-C[S]/2+$,H=m_(B,q,j),W=!f.arrow&&Ro(s)!=null&&q!==H&&a.reference[S]/2-(q<B?Y:U)-C[S]/2<0,F=W?q<B?q-B:q-j:0;return{[k]:y[k]+F,data:{[k]:H,centerOffset:q-H-F,...W&&{alignmentOffset:F}},reset:W}}}),s4=(e,t)=>({...i4(e),options:[e,t]}),o4=p$().fn,a4={name:"hide",async fn(e){const{width:t,height:n,x:r,y:s}=e.rects.reference,a=t===0&&n===0&&r===0&&s===0;return{data:{referenceHidden:(await o4(e)).data?.referenceHidden||a}}}},xp={sideX:"left",sideY:"top"},VA={name:"adaptiveOrigin",async fn(e){const{x:t,y:n,rects:{floating:r},elements:{floating:s},platform:a,strategy:l,placement:c}=e,f=vn(s),d=f.getComputedStyle(s);if(!(d.transitionDuration!=="0s"&&d.transitionDuration!==""))return{x:t,y:n,data:xp};const m=await a.getOffsetParent?.(s);let b={width:0,height:0};if(l==="fixed"&&f?.visualViewport)b={width:f.visualViewport.width,height:f.visualViewport.height};else if(m===f){const T=Wt(s);b={width:T.documentElement.clientWidth,height:T.documentElement.clientHeight}}else await a.isElement?.(m)&&(b=await a.getDimensions(m));const y=ti(c);let k=t,S=n;y==="left"&&(k=b.width-(t+r.width)),y==="top"&&(S=b.height-(n+r.height));const C=y==="left"?"right":xp.sideX,E=y==="top"?"bottom":xp.sideY;return{x:k,y:S,data:{sideX:C,sideY:E}}}};function GA(e,t,n){const r=e==="inline-start"||e==="inline-end";return{top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"}[t]}function EE(e,t,n){const{rects:r,placement:s}=e;return{side:GA(t,ti(s),n),align:Ro(s)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Sx(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:s=0,align:a="center",alignOffset:l=0,collisionBoundary:c,collisionPadding:f=5,sticky:d=!1,arrowPadding:h=5,disableAnchorTracking:m=!1,inline:b,keepMounted:y=!1,floatingRootContext:k,mounted:S,collisionAvoidance:C,shiftCrossAxis:E=!1,nodeId:T,adaptiveOrigin:R,lazyFlip:_=!1,externalTree:D}=e,[A,I]=v.useState(null);!S&&A!==null&&I(null);const P=C.side||"flip",$=C.align||"flip",O=C.fallbackAxisSide||"end",Y=typeof t=="function"?t:void 0,U=Ke(Y),B=Y?U:t,j=An(t),q=An(S),W=Li()==="rtl",F=A||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":W?"left":"right","inline-start":W?"right":"left"}[r],K=a==="center"?F:`${F}-${a}`;let N=f;const z=1,V=r==="bottom"?z:0,L=r==="top"?z:0,Z=r==="right"?z:0,re=r==="left"?z:0;typeof N=="number"?N={top:N+V,right:N+re,bottom:N+L,left:N+Z}:N&&(N={top:(N.top||0)+V,right:(N.right||0)+re,bottom:(N.bottom||0)+L,left:(N.left||0)+Z});const ie={boundary:c==="clipping-ancestors"?"clippingAncestors":c,padding:N},ae=v.useRef(null),le=An(s),ce=An(l),Ee=typeof s!="function"?s:0,be=typeof l!="function"?l:0,ue=[];b&&ue.push(b),ue.push(nx(it=>{const ft=EE(it,r,W),Lt=typeof le.current=="function"?le.current(ft):le.current,Pt=typeof ce.current=="function"?ce.current(ft):ce.current;return{mainAxis:Lt,crossAxis:Pt,alignmentAxis:Pt}},[Ee,be,W,r]));const ge=$==="none"&&P!=="shift",Se=!ge&&(d||E||P==="shift"),Ae=P==="none"?null:ix({...ie,padding:{top:N.top+z,right:N.right+z,bottom:N.bottom+z,left:N.left+z},mainAxis:!E&&P==="flip",crossAxis:$==="flip"?"alignment":!1,fallbackAxisSideDirection:O}),ke=ge?null:rx(it=>{const ft=Wt(it.elements.floating).documentElement;return{...ie,rootBoundary:E?{x:0,y:0,width:ft.clientWidth,height:ft.clientHeight}:void 0,mainAxis:$!=="none",crossAxis:Se,limiter:d||E?void 0:d$(Lt=>{if(!ae.current)return{};const{width:Pt,height:At}=ae.current.getBoundingClientRect(),X=gi(ti(Lt.placement)),me=X==="y"?Pt:At,Le=X==="y"?N.left+N.right:N.top+N.bottom;return{offset:me/2+Le/2}})}},[ie,d,E,N,$]);P==="shift"||$==="shift"||a==="center"?ue.push(ke,Ae):ue.push(Ae,ke),ue.push(sx({...ie,apply({elements:{floating:it},availableWidth:ft,availableHeight:Lt,rects:Pt}){if(!q.current)return;const At=it.style;At.setProperty("--available-width",`${ft}px`),At.setProperty("--available-height",`${Lt}px`);const X=vn(it).devicePixelRatio||1,{x:me,y:Le,width:Xe,height:Rt}=Pt.reference,lt=(Math.round((me+Xe)*X)-Math.round(me*X))/X,He=(Math.round((Le+Rt)*X)-Math.round(Le*X))/X;At.setProperty("--anchor-width",`${lt}px`),At.setProperty("--anchor-height",`${He}px`)}}),s4(it=>({element:ae.current||Wt(it.elements.floating).createElement("div"),padding:h,offsetParent:"floating"}),[h]),{name:"transformOrigin",fn(it){const{elements:ft,middlewareData:Lt,placement:Pt,rects:At,y:X}=it,me=ti(Pt),Le=gi(me),Xe=ae.current,Rt=Lt.arrow?.x||0,lt=Lt.arrow?.y||0,He=Xe?.clientWidth||0,qe=Xe?.clientHeight||0,De=Rt+He/2,je=lt+qe/2,Ie=Math.abs(Lt.shift?.y||0),We=At.reference.height/2,dt=typeof s=="function"?s(EE(it,r,W)):s,Et=Ie>dt,Ne={top:`${De}px calc(100% + ${dt}px)`,bottom:`${De}px ${-dt}px`,left:`calc(100% + ${dt}px) ${je}px`,right:`${-dt}px ${je}px`}[me],Tt=`${De}px ${At.reference.y+We-X}px`;return ft.floating.style.setProperty("--transform-origin",Se&&Le==="y"&&Et?Tt:Ne),{}}},a4,R),Ve(()=>{!S&&k&&k.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[S,k]);const xe=v.useMemo(()=>({elementResize:!m&&typeof ResizeObserver<"u",layoutShift:!m&&typeof IntersectionObserver<"u"}),[m]),{refs:Ce,elements:Me,x:ze,y:Fe,middlewareData:ye,update:_e,placement:ee,context:fe,isPositioned:Q,floatingStyles:ne}=B$({rootContext:k,open:y?S:void 0,placement:K,middleware:ue,strategy:n,whileElementsMounted:y?void 0:(...it)=>Lp(...it,xe),nodeId:T,externalTree:D}),{sideX:we,sideY:Pe}=ye.adaptiveOrigin||xp,Ye=Q?n:"fixed",Ze=v.useMemo(()=>{const it=R?{position:Ye,[we]:ze,[Pe]:Fe}:{position:Ye,...ne};return Q||(it.opacity=0),it},[R,Ye,we,ze,Pe,Fe,ne,Q]),bt=v.useRef(null);Ve(()=>{if(!S)return;const it=j.current,ft=typeof it=="function"?it():it,Pt=(TE(ft)?ft.current:ft)||null||null;Pt!==bt.current&&(Ce.setPositionReference(Pt),bt.current=Pt)},[S,Ce,B,j]),v.useEffect(()=>{if(!S)return;const it=j.current;typeof it!="function"&&TE(it)&&it.current!==bt.current&&(Ce.setPositionReference(it.current),bt.current=it.current)},[S,Ce,B,j]),v.useEffect(()=>{if(y&&S&&Me.reference&&Me.floating)return Lp(Me.reference,Me.floating,_e,xe)},[y,S,Me,_e,xe]);const Je=ti(ee),vt=GA(r,Je,W),kt=Ro(ee)||"center",nt=!!ye.hide?.referenceHidden;Ve(()=>{_&&S&&Q&&I(Je)},[_,S,Q,Je]);const rt=v.useMemo(()=>({position:"absolute",top:ye.arrow?.y,left:ye.arrow?.x}),[ye.arrow]),ct=ye.arrow?.centerOffset!==0;return v.useMemo(()=>({positionerStyles:Ze,arrowStyles:rt,arrowRef:ae,arrowUncentered:ct,side:vt,align:kt,physicalSide:Je,anchorHidden:nt,refs:Ce,context:fe,isPositioned:Q,update:_e}),[Ze,rt,ae,ct,vt,kt,Je,nt,Ce,fe,Q,_e])}function TE(e){return e!=null&&"current"in e}function Dh(e){return e==="starting"?hP:$n}function wx(e,t,{styles:n,transitionStatus:r,props:s,refs:a,hidden:l,inert:c=!1}){const f={...n};return c&&(f.pointerEvents="none"),gn("div",e,{state:t,ref:a,props:[{role:"presentation",hidden:l,style:f},Dh(r),s],stateAttributesMapping:Wc})}const l4=20;function u4(e,t,n,r){const[s,a]=v.useState(!1);Ve(()=>{if(!e||!t||n==null){a(!1);return}const l=Wt(n).documentElement.clientWidth,c=n.offsetWidth;a(l>0&&c>0&&c>=l-l4)},[e,t,n]),f3(e&&(!t||s),r)}let WA=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function KA(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:s,index:a}=e,{register:l,unregister:c,subscribeMapChange:f,elementsRef:d,labelsRef:h,nextIndexRef:m}=e4(),b=v.useRef(-1),[y,k]=v.useState(a??(s===WA.GuessFromOrder?()=>{if(b.current===-1){const E=m.current;m.current+=1,b.current=E}return b.current}:-1)),S=v.useRef(null),C=v.useCallback(E=>{if(S.current=E,y!==-1&&E!==null&&(d.current[y]=E,h)){const T=t!==void 0;h.current[y]=T?t:r?.current?.textContent??E.textContent}},[y,d,h,t,r]);return Ve(()=>{if(a!=null)return;const E=S.current;if(E)return l(E,n),()=>{c(E)}},[a,l,c,n]),Ve(()=>{if(a==null)return f(E=>{const T=S.current?E.get(S.current)?.index:null;T!=null&&k(T)})},[a,f,k]),{ref:C,index:y}}const YA={popup:{k6sLGO:"ui-1so62im",k3nNDw:"ui-ctpfpq",k1ekBW:"ui-11xpdln",kAMwcw:"ui-19frgs0",kIyJzY:"ui-7pq1vu ui-1fdgx8g ui-sagj69",k3aq6I:"ui-1c071of ui-17ll0io ui-2um2vg ui-1ahjy9u ui-s2p038 ui-fld6f8 ui-14hpypv ui-1296zyv ui-1h7md5i",$$css:!0},positioner:{"--ui-floating-anchor-fade-duration":"ui-1kwwprx ui-5ece57 ui-4rr00i",kSiTet:"ui-1hc1fzr ui-4itv7f ui-fwszop",$$css:!0}},Lh=YA.popup,c4=YA.positioner,f4={transition:`opacity var(--ui-floating-anchor-fade-duration) ${Hj["--cursor-easing-out-quint"]}`};function jh(...e){const t=zt(c4,...e);return{...t,style:{...t.style,...f4}}}const zh={border:{k5JduY:"ui-1s928wv",kwXMNM:"ui-1j6awrg",k3foIR:"ui-1m1drc7",kH8aOt:"ui-1unh1gc",k8Iv0R:"ui-1xrz1ek",kc1e00:"ui-1iygr5g",kDVEDD:"ui-itxdhh",kUfP38:"ui-1k48kgn",kbMawA:"ui-1o7vem3",kloYau:"ui-2q1x1w",$$css:!0}},lr={positioner:{kY2c9j:"ui-2hst0z",$$css:!0},popupPositioner:{kY2c9j:"ui-fc2p8",$$css:!0},popupShadow:{kGVxlE:"ui-1x78n9t",$$css:!0},tooltipShadow:{kGVxlE:"ui-4l6n3x",$$css:!0},popupRadius:{kaIpWk:"ui-1pkpdue",$$css:!0},tooltipRadius:{kaIpWk:"ui-15ujvgx",$$css:!0},surface:{kB7OPa:"ui-9f619",kVAEAm:"ui-1n2onr6",kWkggS:"ui-f1vpex",kEafiO:"ui-972fbf",kPef9Z:"ui-1ejq31n",ke9TFa:"ui-10w94by",k8ry5P:"ui-18oe1m7",kt9PQ7:"ui-1qhh985",kfdmCh:"ui-1sy0etr",k2ei4v:"ui-14e42zd",kVhnKS:"ui-stzfhl",kaIpWk:"ui-1pkpdue",kMwMTN:"ui-1wd3ewq",kMv6JI:"ui-1acoasx",kGuDYH:"ui-11wthnw",kLWn49:"ui-1ja60sm",kb6lSQ:"ui-vu1jfw",khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",$$css:!0},popupLayout:{k1xSpc:"ui-1lliihq",kzqmXN:"ui-ezivpi",ks0D6T:"ui-w5ewwj",kHjlTd:"ui-j0a0fe",$$css:!0},popupInset:{kLKAdn:"ui-uve7l6",kwRFfy:"ui-196pc8s",kGO01o:"ui-1rgtt3y",kZCmMZ:"ui-22095l",$$css:!0},previewCardInset:{kLKAdn:"ui-oyc9vk",kwRFfy:"ui-1fg0g13",kGO01o:"ui-2lprc",kZCmMZ:"ui-1tajz9i",$$css:!0},popupInteractive:{kfzvcC:"ui-67bb7w",kfSwDN:"ui-1hx0egp",$$css:!0},popupSurfaceMd:{kaIpWk:"ui-1pkpdue",$$css:!0},tooltipSurface:{"--ui-surface-hairline-width":"ui-10ssw4j",kGuDYH:"ui-mppzg7",kLWn49:"ui-l68z86",kb6lSQ:"ui-55tv1j",kLKAdn:"ui-3jsnqb",kGO01o:"ui-1w5ico7",kwRFfy:"ui-180w9kh",kZCmMZ:"ui-1vs96pt",$$css:!0}},XA=lr.positioner,Ex=[lr.surface,zh.border],ZA=[XA,lr.popupShadow,lr.popupRadius],d4=[XA,lr.tooltipShadow,lr.tooltipRadius],p4=[lr.tooltipRadius,lr.tooltipSurface],h4=lr.popupLayout,m4=lr.popupInset,QA=lr.previewCardInset,JA=[h4,m4],g4=lr.popupInteractive,eN=[lr.surface,zh.border],b4=lr.popupSurfaceMd,y4=lr.popupPositioner,v4=[y4,lr.popupShadow,lr.popupRadius],va={popupFrame:{kB7OPa:"ui-9f619",k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kHBbk8:"ui-c8icb0",kfSwDN:"ui-87ps6o",kY4cRS:"ui-lvsv26",$$css:!0},list:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kAzted:"ui-2lwn1j",kXHlph:"ui-6ikm8r",kORKVm:"ui-ryxfnj",$$css:!0},row:{k1xSpc:"ui-78zum5",kXwgrk:"ui-1q0g3np",kGNEyG:"ui-6s0dn4",kMeerF:"ui-1k57tk5",k3XXqK:"ui-1t137rt",kkrTdU:"ui-1ypdohk ui-mh7c9n",kMwMTN:"ui-1wd3ewq ui-1kosevp",kWkggS:"ui-jbqb8w ui-1sbws7q",$$css:!0},rowFrame:{kB7OPa:"ui-9f619",kVAEAm:"ui-1n2onr6",kOIVth:"ui-xhr3t",kaIpWk:"ui-2u8bby","--ui-popup-list-row-highlighted-opacity":"ui-5i412e ui-1nlrr02",kWkggS:"ui-jbqb8w ui-9wl9qz",$$css:!0},rowInsetHighlight:{kfYRhQ:"ui-1b16mni",k7VdEw:"ui-1nwgpwx",kXO8Uu:"ui-1r87rg3",kDFFfQ:"ui-1wv1pz9",kllAdU:"ui-1v0xhfw",kxsapM:"ui-13bjwnm",k3JYP4:"ui-t2or2s",kDMCui:"ui-tj3xra",kWQQwa:"ui-50seq6",kYNu72:"ui-95qkr9",$$css:!0},rowSectionTrailing:{keTefX:"ui-kiyga0",$$css:!0},rowSectionDescription:{kSGwAc:"ui-qcrz7y",keoZOQ:"ui-1k5org8",$$css:!0}},x4=va.list,k4=va.row,S4=va.popupFrame,w4=va.rowFrame,E4=va.rowInsetHighlight,T4=va.rowSectionTrailing,C4=va.rowSectionDescription,Pr={popup:{k7Eaqz:"ui-1i9suas",ks0D6T:"ui-13kvn80",kskxy:"ui-2pj5ht",$$css:!0},popupWidth:e=>[{kzqmXN:e!=null?"ui-5lhr3w":e,ks0D6T:e!=null?"ui-f68679":e,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(e),"--x-maxWidth":(t=>typeof t=="number"?t+"px":t??void 0)(e)}],popupDefaultWidth:{kzqmXN:"ui-ezivpi",k7Eaqz:"ui-lopysa",$$css:!0},list:{kOIVth:"ui-ihas45",kLKAdn:"ui-9g4tyx",kwRFfy:"ui-yri2b",kGO01o:"ui-x776sp",kZCmMZ:"ui-1c1uobl",$$css:!0},row:{kAzted:"ui-14dnd5q ui-12uk8lx",kLKAdn:"ui-p90ga9 ui-17apzky",kwRFfy:"ui-mk9vl6",kGO01o:"ui-1ep5yuf ui-zkc5ih",kZCmMZ:"ui-vtdk6d",$$css:!0},rowText:{kUk6DE:"ui-98rzlu",k7Eaqz:"ui-euugli",kVAEAm:"ui-1n2onr6",kY2c9j:"ui-1vjfegm",$$css:!0},rowLabel:{k1xSpc:"ui-1lliihq",kzQI83:"ui-1iyjqo2",kmuXW:"ui-s83m0k",kCS8Yb:"ui-dl72j9",k7Eaqz:"ui-euugli",ks0D6T:"ui-193iq5w",kVQacm:"ui-b3r6kr",kg5iWk:"ui-lyipyv",khDVqt:"ui-uxw1ft",$$css:!0},itemTextWithMeta:{k1xSpc:"ui-78zum5",kXwgrk:"ui-1q0g3np",kGNEyG:"ui-1pha0wt",k7Eaqz:"ui-euugli",ks0D6T:"ui-193iq5w",$$css:!0},rowTextWithDescription:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kGNEyG:"ui-1cy8zhl",kOIVth:"ui-137clkk",$$css:!0},rowDescription:{k1xSpc:"ui-1lliihq",ks0D6T:"ui-193iq5w",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kg5iWk:"ui-lyipyv",khDVqt:"ui-uxw1ft",kMwMTN:"ui-4b2ntj",$$css:!0},rowMeta:{keTefX:"ui-1uokl23",$$css:!0},rowSection:{k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kmuXW:"ui-2lah0s",kVAEAm:"ui-1n2onr6",kY2c9j:"ui-1vjfegm",kMwMTN:"ui-19aaqeu",$$css:!0},rowSectionLeading:{k71WvV:"ui-17adnql",$$css:!0},rowSectionEnd:{kOIVth:"ui-1jcujwu",$$css:!0}},R4=[eN,S4,Pr.popup],_4={sm:null,md:b4},A4=Pr.popupWidth,N4=Pr.popupDefaultWidth,O4=[x4,Pr.list],I4=[k4,w4,Pr.row,E4,_s.root],M4=Pr.rowText,D4=Pr.rowLabel,L4=Pr.itemTextWithMeta,j4=Pr.rowTextWithDescription,z4=Pr.rowDescription,P4=Pr.rowMeta,Ib=Pr.rowSection,$4=Pr.rowSectionLeading,CE=T4,B4=Pr.rowSectionEnd,Mb=C4;function il(e,t,n){let r=n.initialDeps??[],s,a=!0;function l(){var c,f,d;let h;n.key&&((c=n.debug)!=null&&c.call(n))&&(h=Date.now());const m=e();if(!(m.length!==r.length||m.some((k,S)=>r[S]!==k)))return s;r=m;let y;if(n.key&&((f=n.debug)!=null&&f.call(n))&&(y=Date.now()),s=t(...m),n.key&&((d=n.debug)!=null&&d.call(n))){const k=Math.round((Date.now()-h)*100)/100,S=Math.round((Date.now()-y)*100)/100,C=S/16,E=(T,R)=>{for(T=String(T);T.length<R;)T=" "+T;return T};console.info(`%c⏱ ${E(S,5)} /${E(k,5)} ms`,`
10
+ font-size: .6rem;
11
+ font-weight: bold;
12
+ color: hsl(${Math.max(0,Math.min(120-120*C,120))}deg 100% 31%);`,n?.key)}return n?.onChange&&!(a&&n.skipInitialOnChange)&&n.onChange(s),a=!1,s}return l.updateDeps=c=>{r=c},l}function RE(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const F4=(e,t)=>Math.abs(e-t)<1.01,U4=(e,t,n)=>{let r;return function(...s){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,s),n)}},_E=e=>{const{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},q4=e=>e,H4=e=>{const t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1),r=[];for(let s=t;s<=n;s++)r.push(s);return r},V4=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;const s=l=>{const{width:c,height:f}=l;t({width:Math.round(c),height:Math.round(f)})};if(s(_E(n)),!r.ResizeObserver)return()=>{};const a=new r.ResizeObserver(l=>{const c=()=>{const f=l[0];if(f?.borderBoxSize){const d=f.borderBoxSize[0];if(d){s({width:d.inlineSize,height:d.blockSize});return}}s(_E(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(c):c()});return a.observe(n,{box:"border-box"}),()=>{a.unobserve(n)}},AE={passive:!0},NE=typeof window>"u"?!0:"onscrollend"in window,G4=(e,t)=>{const n=e.scrollElement;if(!n)return;const r=e.targetWindow;if(!r)return;let s=0;const a=e.options.useScrollendEvent&&NE?()=>{}:U4(r,()=>{t(s,!1)},e.options.isScrollingResetDelay),l=h=>()=>{const{horizontal:m,isRtl:b}=e.options;s=m?n.scrollLeft*(b&&-1||1):n.scrollTop,a(),t(s,h)},c=l(!0),f=l(!1);n.addEventListener("scroll",c,AE);const d=e.options.useScrollendEvent&&NE;return d&&n.addEventListener("scrollend",f,AE),()=>{n.removeEventListener("scroll",c),d&&n.removeEventListener("scrollend",f)}},W4=(e,t,n)=>{if(t?.borderBoxSize){const r=t.borderBoxSize[0];if(r)return Math.round(r[n.options.horizontal?"inlineSize":"blockSize"])}return e[n.options.horizontal?"offsetWidth":"offsetHeight"]},K4=(e,{adjustments:t=0,behavior:n},r)=>{var s,a;const l=e+t;(a=(s=r.scrollElement)==null?void 0:s.scrollTo)==null||a.call(s,{[r.options.horizontal?"left":"top"]:l,behavior:n})};class Y4{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this.itemSizeCache=new Map,this.laneAssignments=new Map,this.pendingMeasuredCacheIndexes=[],this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.now=()=>{var n,r,s;return((s=(r=(n=this.targetWindow)==null?void 0:n.performance)==null?void 0:r.now)==null?void 0:s.call(r))??Date.now()},this.observer=(()=>{let n=null;const r=()=>n||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:n=new this.targetWindow.ResizeObserver(s=>{s.forEach(a=>{const l=()=>{const c=a.target,f=this.indexFromElement(c);if(!c.isConnected){this.observer.unobserve(c);return}this.shouldMeasureDuringScroll(f)&&this.resizeItem(f,this.options.measureElement(c,a,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()})}));return{disconnect:()=>{var s;(s=r())==null||s.disconnect(),n=null},observe:s=>{var a;return(a=r())==null?void 0:a.observe(s,{box:"border-box"})},unobserve:s=>{var a;return(a=r())==null?void 0:a.unobserve(s)}}})(),this.range=null,this.setOptions=n=>{Object.entries(n).forEach(([r,s])=>{typeof s>"u"&&delete n[r]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:q4,rangeExtractor:H4,onChange:()=>{},measureElement:W4,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...n}},this.notify=n=>{var r,s;(s=(r=this.options).onChange)==null||s.call(r,this,n)},this.maybeNotify=il(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),n=>{this.notify(n)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(n=>n()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var n;const r=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==r){if(this.cleanup(),!r){this.maybeNotify();return}this.scrollElement=r,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((n=this.scrollElement)==null?void 0:n.window)??null,this.elementsCache.forEach(s=>{this.observer.observe(s)}),this.unsubs.push(this.options.observeElementRect(this,s=>{this.scrollRect=s,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(s,a)=>{this.scrollAdjustments=0,this.scrollDirection=a?this.getScrollOffset()<s?"forward":"backward":null,this.scrollOffset=s,this.isScrolling=a,this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(n,r)=>{const s=new Map,a=new Map;for(let l=r-1;l>=0;l--){const c=n[l];if(s.has(c.lane))continue;const f=a.get(c.lane);if(f==null||c.end>f.end?a.set(c.lane,c):c.end<f.end&&s.set(c.lane,!0),s.size===this.options.lanes)break}return a.size===this.options.lanes?Array.from(a.values()).sort((l,c)=>l.end===c.end?l.index-c.index:l.end-c.end)[0]:void 0},this.getMeasurementOptions=il(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes],(n,r,s,a,l,c)=>(this.prevLanes!==void 0&&this.prevLanes!==c&&(this.lanesChangedFlag=!0),this.prevLanes=c,this.pendingMeasuredCacheIndexes=[],{count:n,paddingStart:r,scrollMargin:s,getItemKey:a,enabled:l,lanes:c}),{key:!1}),this.getMeasurements=il(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:n,paddingStart:r,scrollMargin:s,getItemKey:a,enabled:l,lanes:c},f)=>{if(!l)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>n)for(const b of this.laneAssignments.keys())b>=n&&this.laneAssignments.delete(b);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMeasuredCacheIndexes=[]),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(b=>{this.itemSizeCache.set(b.key,b.size)}));const d=this.lanesSettling?0:this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[],this.lanesSettling&&this.measurementsCache.length===n&&(this.lanesSettling=!1);const h=this.measurementsCache.slice(0,d),m=new Array(c).fill(void 0);for(let b=0;b<d;b++){const y=h[b];y&&(m[y.lane]=b)}for(let b=d;b<n;b++){const y=a(b),k=this.laneAssignments.get(b);let S,C;if(k!==void 0&&this.options.lanes>1){S=k;const _=m[S],D=_!==void 0?h[_]:void 0;C=D?D.end+this.options.gap:r+s}else{const _=this.options.lanes===1?h[b-1]:this.getFurthestMeasurement(h,b);C=_?_.end+this.options.gap:r+s,S=_?_.lane:b%this.options.lanes,this.options.lanes>1&&this.laneAssignments.set(b,S)}const E=f.get(y),T=typeof E=="number"?E:this.options.estimateSize(b),R=C+T;h[b]={index:b,start:C,size:T,end:R,key:y,lane:S},m[S]=b}return this.measurementsCache=h,h},{key:!1,debug:()=>this.options.debug}),this.calculateRange=il(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(n,r,s,a)=>this.range=n.length>0&&r>0?X4({measurements:n,outerSize:r,scrollOffset:s,lanes:a}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=il(()=>{let n=null,r=null;const s=this.calculateRange();return s&&(n=s.startIndex,r=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,n,r]),[this.options.rangeExtractor,this.options.overscan,this.options.count,n,r]},(n,r,s,a,l)=>a===null||l===null?[]:n({startIndex:a,endIndex:l,overscan:r,count:s}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=n=>{const r=this.options.indexAttribute,s=n.getAttribute(r);return s?parseInt(s,10):(console.warn(`Missing attribute name '${r}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=n=>{var r;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const s=this.scrollState.index??((r=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:r.index);if(s!==void 0&&this.range){const a=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),l=Math.max(0,s-a),c=Math.min(this.options.count-1,s+a);return n>=l&&n<=c}return!0},this.measureElement=n=>{if(!n){this.elementsCache.forEach((l,c)=>{l.isConnected||(this.observer.unobserve(l),this.elementsCache.delete(c))});return}const r=this.indexFromElement(n),s=this.options.getItemKey(r),a=this.elementsCache.get(s);a!==n&&(a&&this.observer.unobserve(a),this.observer.observe(n),this.elementsCache.set(s,n)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(r)&&this.resizeItem(r,this.options.measureElement(n,void 0,this))},this.resizeItem=(n,r)=>{var s;const a=this.measurementsCache[n];if(!a)return;const l=this.itemSizeCache.get(a.key)??a.size,c=r-l;c!==0&&(((s=this.scrollState)==null?void 0:s.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(a,c,this):a.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=c,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(a.index),this.itemSizeCache=new Map(this.itemSizeCache.set(a.key,r)),this.notify(!1))},this.getVirtualItems=il(()=>[this.getVirtualIndexes(),this.getMeasurements()],(n,r)=>{const s=[];for(let a=0,l=n.length;a<l;a++){const c=n[a],f=r[c];s.push(f)}return s},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=n=>{const r=this.getMeasurements();if(r.length!==0)return RE(r[tN(0,r.length-1,s=>RE(r[s]).start,n)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const n=this.scrollElement.document.documentElement;return this.options.horizontal?n.scrollWidth-this.scrollElement.innerWidth:n.scrollHeight-this.scrollElement.innerHeight}},this.getOffsetForAlignment=(n,r,s=0)=>{if(!this.scrollElement)return 0;const a=this.getSize(),l=this.getScrollOffset();r==="auto"&&(r=n>=l+a?"end":"start"),r==="center"?n+=(s-a)/2:r==="end"&&(n-=a);const c=this.getMaxScrollOffset();return Math.max(Math.min(c,n),0)},this.getOffsetForIndex=(n,r="auto")=>{n=Math.max(0,Math.min(n,this.options.count-1));const s=this.getSize(),a=this.getScrollOffset(),l=this.measurementsCache[n];if(!l)return;if(r==="auto")if(l.end>=a+s-this.options.scrollPaddingEnd)r="end";else if(l.start<=a+this.options.scrollPaddingStart)r="start";else return[a,r];if(r==="end"&&n===this.options.count-1)return[this.getMaxScrollOffset(),r];const c=r==="end"?l.end+this.options.scrollPaddingEnd:l.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(c,r,l.size),r]},this.scrollToOffset=(n,{align:r="start",behavior:s="auto"}={})=>{const a=this.getOffsetForAlignment(n,r),l=this.now();this.scrollState={index:null,align:r,behavior:s,startedAt:l,lastTargetOffset:a,stableFrames:0},this._scrollToOffset(a,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollToIndex=(n,{align:r="auto",behavior:s="auto"}={})=>{n=Math.max(0,Math.min(n,this.options.count-1));const a=this.getOffsetForIndex(n,r);if(!a)return;const[l,c]=a,f=this.now();this.scrollState={index:n,align:c,behavior:s,startedAt:f,lastTargetOffset:l,stableFrames:0},this._scrollToOffset(l,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollBy=(n,{behavior:r="auto"}={})=>{const s=this.getScrollOffset()+n,a=this.now();this.scrollState={index:null,align:"start",behavior:r,startedAt:a,lastTargetOffset:s,stableFrames:0},this._scrollToOffset(s,{adjustments:void 0,behavior:r}),this.scheduleScrollReconcile()},this.getTotalSize=()=>{var n;const r=this.getMeasurements();let s;if(r.length===0)s=this.options.paddingStart;else if(this.options.lanes===1)s=((n=r[r.length-1])==null?void 0:n.end)??0;else{const a=Array(this.options.lanes).fill(null);let l=r.length-1;for(;l>=0&&a.some(c=>c===null);){const c=r[l];a[c.lane]===null&&(a[c.lane]=c.end),l--}s=Math.max(...a.filter(c=>c!==null))}return Math.max(s-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(n,{adjustments:r,behavior:s})=>{this.options.scrollToFn(n,{behavior:s,adjustments:r},this)},this.measure=()=>{this.itemSizeCache=new Map,this.laneAssignments=new Map,this.notify(!1)},this.setOptions(t)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const r=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,s=r?r[0]:this.scrollState.lastTargetOffset,a=1,l=s!==this.scrollState.lastTargetOffset;if(!l&&F4(s,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=a){this.scrollState=null;return}}else this.scrollState.stableFrames=0,l&&(this.scrollState.lastTargetOffset=s,this.scrollState.behavior="auto",this._scrollToOffset(s,{adjustments:void 0,behavior:"auto"}));this.scheduleScrollReconcile()}}const tN=(e,t,n,r)=>{for(;e<=t;){const s=(e+t)/2|0,a=n(s);if(a<r)e=s+1;else if(a>r)t=s-1;else return s}return e>0?e-1:0};function X4({measurements:e,outerSize:t,scrollOffset:n,lanes:r}){const s=e.length-1,a=f=>e[f].start;if(e.length<=r)return{startIndex:0,endIndex:s};let l=tN(0,s,a,n),c=l;if(r===1)for(;c<s&&e[c].end<n+t;)c++;else if(r>1){const f=Array(r).fill(0);for(;c<s&&f.some(h=>h<n+t);){const h=e[c];f[h.lane]=h.end,c++}const d=Array(r).fill(n+t);for(;l>=0&&d.some(h=>h>=n);){const h=e[l];d[h.lane]=h.start,l--}l=Math.max(0,l-l%r),c=Math.min(s,c+(r-1-c%r))}return{startIndex:l,endIndex:c}}const OE=typeof document<"u"?v.useLayoutEffect:v.useEffect;function Z4({useFlushSync:e=!0,...t}){const n=v.useReducer(()=>({}),{})[1],r={...t,onChange:(a,l)=>{var c;e&&l?Di.flushSync(n):n(),(c=t.onChange)==null||c.call(t,a,l)}},[s]=v.useState(()=>new Y4(r));return s.setOptions(r),OE(()=>s._didMount(),[]),OE(()=>s._willUpdate()),s}function nN(e){return Z4({observeElementRect:V4,observeElementOffset:G4,scrollToFn:K4,...e})}function Q4(){const e=v.useRef(void 0),t=v.useCallback(()=>{const r=e.current;r!==void 0&&(e.current=void 0,cancelAnimationFrame(r))},[]),n=v.useCallback(r=>{t(),e.current=requestAnimationFrame(s=>{e.current=void 0,r(s)})},[t]);return v.useEffect(()=>t,[t]),v.useMemo(()=>({dispose:t,request:n}),[t,n])}function rN(e){return typeof ResizeObserver>"u"?null:new ResizeObserver(e)}function Hy({deltaX:e,deltaY:t,mapVerticalWheelToHorizontal:n,axisBehavior:r="dominant",mappedBehavior:s="dominant"}){if(n){let c;return s==="dominant"&&Math.abs(t)>Math.abs(e)?c=t:c=e||t,c===0?null:c}if(r==="raw")return e===0?null:e;const a=Math.abs(e),l=Math.abs(t);return e===0||a<=l?null:e}const J4="hover",eB=4,tB={kn1fP1:"ui-xqa2ke",kJcbqH:"ui-16fucec",$$css:!0};function nB(e){const{scrollTop:t,scrollHeight:n,clientHeight:r,threshold:s}=e;return{isAtTop:t<=s,isAtBottom:t+r>=n-s}}function rB(e){const{scrollLeft:t,scrollWidth:n,clientWidth:r,threshold:s}=e,a=Math.abs(t);return{isAtStart:a<=s,isAtEnd:a+r>=n-s}}const IE={maskGeometry:e=>[tB,{kQB4zb:(e>1?"intersect":null)!=null?"ui-1xrn8sl":e>1?"intersect":null,kRVSR3:(e>1?"source-in":null)!=null?"ui-60m5pi":e>1?"source-in":null,$$css:!0},{"--x-maskSize":(e>1?"100% 100%, 100% 100%":"100% 100%")!=null?e>1?"100% 100%, 100% 100%":"100% 100%":void 0,"--x-maskComposite":(e>1?"intersect":null)!=null?e>1?"intersect":null:void 0,"--x-WebkitMaskComposite":(e>1?"source-in":null)!=null?e>1?"source-in":null:void 0}],mask:e=>[{kX1K2I:e!=null?"ui-wjwp01":e,kAExgp:e!=null?"ui-11jd449":e,$$css:!0},{"--x-maskImage":e??void 0,"--x-WebkitMaskImage":e??void 0}]};function iB({topFadePx:e,bottomFadePx:t,topFadeStartOpacity:n=0,bottomFadeStartOpacity:r=0,startFadePx:s=0,endFadePx:a=0}){const l=[];return(e>0||t>0)&&l.push(`linear-gradient(to bottom, rgba(0, 0, 0, ${n}) 0px, black ${e}px, black calc(100% - ${t}px), rgba(0, 0, 0, ${r}) 100%)`),(s>0||a>0)&&l.push(`linear-gradient(to right, transparent 0px, black ${s}px, black calc(100% - ${a}px), transparent 100%)`),l.length===0?null:[IE.maskGeometry(l.length),IE.mask(l.join(", "))]}const sB=20;class oB{constructor(){this._trackSize=0,this._viewportSize=0,this._scrollSize=0,this._scrollPosition=0,this._isScrollable=!1,this._thumbSize=0,this._thumbPosition=0,this._thumbRatio=0}setDimensions(t,n,r,s){const a=Math.round(t),l=Math.round(n),c=Math.round(r),f=Math.round(s);return this._trackSize===a&&this._viewportSize===l&&this._scrollSize===c&&this._scrollPosition===f?!1:(this._trackSize=a,this._viewportSize=l,this._scrollSize=c,this._scrollPosition=f,this._recompute(),!0)}setScrollPosition(t){const n=Math.round(t);return this._scrollPosition===n?!1:(this._scrollPosition=n,this._thumbPosition=this._computeThumbPosition(),!0)}_recompute(){if(this._isScrollable=this._scrollSize>0&&this._viewportSize>0&&this._scrollSize>this._viewportSize,!this._isScrollable||this._trackSize<=0){this._thumbSize=0,this._thumbPosition=0,this._thumbRatio=0;return}const t=Math.floor(this._trackSize*this._viewportSize/this._scrollSize);this._thumbSize=Math.min(this._trackSize,Math.max(sB,t));const n=this._trackSize-this._thumbSize,r=this._scrollSize-this._viewportSize;this._thumbRatio=r>0?n/r:0,this._thumbPosition=this._computeThumbPosition()}_computeThumbPosition(){return!this._isScrollable||this._thumbRatio===0?0:Math.round(this._scrollPosition*this._thumbRatio)}isScrollable(){return this._isScrollable}getThumbSize(){return this._thumbSize}getThumbPosition(){return this._thumbPosition}getScrollPositionFromThumbDelta(t,n){return!this._isScrollable||this._thumbRatio===0?0:Math.round(n+t/this._thumbRatio)}getScrollPositionFromTrackOffset(t){if(!this._isScrollable||this._thumbRatio===0)return 0;const n=Math.max(0,Math.min(this._trackSize-this._thumbSize,t-this._thumbSize/2));return Math.round(n/this._thumbRatio)}}const yl=class yl{constructor(t){this.thumbInsetStart=0,this.horizontalWheelAxisLock=null,this.horizontalWheelResetTimer=null,this.resizeObserver=null,this.boundOnScroll=null,this.boundOnThumbDown=null,this.boundOnTrackDown=null,this.boundOnWheel=null,this.dragCleanup=null,this.pendingSyncThumbFrame=null,this.viewport=t.viewport,this.content=t.content,this.scrollbar=t.scrollbar,this.thumb=t.thumb,this.state=new oB,this.direction=t.direction,this.mapVerticalWheelToHorizontal=t.mapVerticalWheelToHorizontal??!1}get horizontal(){return this.direction==="horizontal"}attach(){this.attachScrollListener(),this.attachResizeObserver(),this.attachPointerEvents(),this.attachWheelForwarding(),this.scheduleSyncThumb()}detach(){this.detachScrollListener(),this.detachResizeObserver(),this.detachPointerEvents(),this.detachWheelForwarding(),this.pendingSyncThumbFrame!==null&&(cancelAnimationFrame(this.pendingSyncThumbFrame),this.pendingSyncThumbFrame=null),this.horizontalWheelResetTimer&&(clearTimeout(this.horizontalWheelResetTimer),this.horizontalWheelResetTimer=null),this.horizontalWheelAxisLock=null}refresh(){this.scheduleSyncThumb()}attachScrollListener(){this.boundOnScroll=this.handleScroll.bind(this),this.viewport.addEventListener("scroll",this.boundOnScroll,{passive:!0})}detachScrollListener(){this.boundOnScroll&&(this.viewport.removeEventListener("scroll",this.boundOnScroll),this.boundOnScroll=null)}handleScroll(){const t=this.horizontal?this.viewport.scrollLeft:this.viewport.scrollTop;if(this.state.setScrollPosition(t)){const n=this.state.getThumbPosition();this.thumb.style.transform=this.getThumbTransform(n)}}attachResizeObserver(){this.resizeObserver=rN(()=>this.scheduleSyncThumb()),this.resizeObserver!==null&&(this.resizeObserver.observe(this.viewport),this.content!==void 0&&this.resizeObserver.observe(this.content),this.resizeObserver.observe(this.scrollbar))}detachResizeObserver(){this.resizeObserver?.disconnect(),this.resizeObserver=null}scheduleSyncThumb(){this.pendingSyncThumbFrame===null&&(this.pendingSyncThumbFrame=requestAnimationFrame(()=>{this.pendingSyncThumbFrame=null,this.syncThumb()}))}syncThumb(){this.thumbInsetStart=this.getThumbInsetStart();const t=this.readDimensions();this.state.setDimensions(t.trackSize,t.viewportSize,t.scrollSize,t.scrollPos)&&this.applyThumbStyle()}readDimensions(){const t=Math.max(0,this.scrollbar.clientHeight-this.thumbInsetStart);return{trackSize:this.horizontal?this.scrollbar.clientWidth:t,viewportSize:this.horizontal?this.viewport.clientWidth:this.viewport.clientHeight,scrollSize:this.horizontal?this.viewport.scrollWidth:this.viewport.scrollHeight,scrollPos:this.horizontal?this.viewport.scrollLeft:this.viewport.scrollTop}}applyThumbStyle(){const t=this.state.getThumbSize(),n=this.state.getThumbPosition();this.horizontal?(this.thumb.style.width=`${t}px`,this.thumb.style.height="",this.thumb.style.transform=this.getThumbTransform(n)):(this.thumb.style.height=`${t}px`,this.thumb.style.width="",this.thumb.style.transform=this.getThumbTransform(n)),this.scrollbar.dataset.scrollable=this.state.isScrollable()?"true":"false"}attachPointerEvents(){this.boundOnThumbDown=this.handleThumbDown.bind(this),this.boundOnTrackDown=this.handleTrackDown.bind(this),this.thumb.addEventListener("pointerdown",this.boundOnThumbDown),this.scrollbar.addEventListener("pointerdown",this.boundOnTrackDown)}detachPointerEvents(){this.boundOnThumbDown&&(this.thumb.removeEventListener("pointerdown",this.boundOnThumbDown),this.boundOnThumbDown=null),this.boundOnTrackDown&&(this.scrollbar.removeEventListener("pointerdown",this.boundOnTrackDown),this.boundOnTrackDown=null),this.dragCleanup?.(),this.dragCleanup=null}handleThumbDown(t){if(t.button!==0)return;t.preventDefault();const n=this.horizontal?t.clientX:t.clientY,r=this.horizontal?this.viewport.scrollLeft:this.viewport.scrollTop,s=t.pointerId;this.thumb.setPointerCapture(s),this.thumb.classList.add("ui-scroll-area__thumb--active");const a=c=>{const f=(this.horizontal?c.clientX:c.clientY)-n,d=this.state.getScrollPositionFromThumbDelta(f,r);this.horizontal?this.viewport.scrollLeft=d:this.viewport.scrollTop=d},l=()=>{this.thumb.classList.remove("ui-scroll-area__thumb--active");try{this.thumb.releasePointerCapture(s)}catch{}this.thumb.removeEventListener("pointermove",a),this.thumb.removeEventListener("pointerup",l),this.thumb.removeEventListener("pointercancel",l),this.dragCleanup=null};this.thumb.addEventListener("pointermove",a),this.thumb.addEventListener("pointerup",l),this.thumb.addEventListener("pointercancel",l),this.dragCleanup=l}handleTrackDown(t){if(t.button!==0||t.target===this.thumb)return;const n=this.scrollbar.getBoundingClientRect();if(!this.horizontal){this.viewport.scrollTop=this.state.getScrollPositionFromTrackOffset(t.clientY-n.top-this.thumbInsetStart);return}const r=getComputedStyle(this.viewport).direction==="rtl",s=r?n.right-t.clientX:t.clientX-n.left,a=this.state.getScrollPositionFromTrackOffset(s);this.viewport.scrollLeft=r?-a:a}attachWheelForwarding(){this.boundOnWheel=t=>{if(this.horizontal){const n=this.viewport.scrollWidth-this.viewport.clientWidth;if(n<=0)return;let r=null;if(this.mapVerticalWheelToHorizontal)r=Hy({deltaX:t.deltaX,deltaY:t.deltaY,mapVerticalWheelToHorizontal:!0,mappedBehavior:"prefer-horizontal"});else{if(this.horizontalWheelAxisLock||(this.horizontalWheelAxisLock=Math.abs(t.deltaX)>Math.abs(t.deltaY)?"x":"y"),this.horizontalWheelResetTimer&&clearTimeout(this.horizontalWheelResetTimer),this.horizontalWheelResetTimer=setTimeout(()=>{this.horizontalWheelAxisLock=null,this.horizontalWheelResetTimer=null},yl.WHEEL_GESTURE_RESET_MS),this.horizontalWheelAxisLock!=="x")return;if(r=Hy({deltaX:t.deltaX,deltaY:t.deltaY,mapVerticalWheelToHorizontal:!1,axisBehavior:"raw"}),r===null){t.preventDefault(),t.stopPropagation();return}}if(r===null)return;const s=Math.max(0,Math.min(n,this.viewport.scrollLeft+r));this.viewport.scrollLeft=s,t.preventDefault(),t.stopPropagation()}else this.viewport.scrollTop+=t.deltaY},this.scrollbar.addEventListener("wheel",this.boundOnWheel,{passive:!1})}detachWheelForwarding(){this.boundOnWheel&&(this.scrollbar.removeEventListener("wheel",this.boundOnWheel),this.boundOnWheel=null)}getThumbTransform(t){return this.horizontal?`translateX(${t}px)`:`translateY(${t+this.thumbInsetStart}px)`}getThumbInsetStart(){if(this.horizontal)return 0;const t=getComputedStyle(this.scrollbar).getPropertyValue(yl.VERTICAL_THUMB_OFFSET_CSS_VAR),n=Number.parseFloat(t);return Number.isFinite(n)?Math.max(0,n):0}};yl.VERTICAL_THUMB_OFFSET_CSS_VAR="--scrollbar-thumb-top-offset",yl.WHEEL_GESTURE_RESET_MS=150;let Hp=yl;const aB={base:{"--scrollbar-size":"ui-1ekbvf6","--scrollbar-inset":"ui-1logqu4","--scrollbar-thumb-top-offset":"ui-1fx8caa","--scroll-area-scroll-padding":"ui-8ddqcf",kVAEAm:"ui-1n2onr6",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",k1xSpc:"ui-rvj5dj",k52YG4:"ui-ypqxfk",$$css:!0}},Db={base:{kJuA4N:"ui-175mniq",kAzted:"ui-2lwn1j",kskxy:"ui-mz0i5r",kaIpWk:"ui-1pjcqnp",kXHlph:"ui-6ikm8r",kORKVm:"ui-1odjw0f",kaPefq:"ui-1fu52t7",kC2sXz:"ui-1ufbpdf",k9lH4S:"ui-3oazx1",kphCe6:"ui-19l4kpp",kvh3hx:"ui-1t1jukp",kacamN:"ui-1e4zzel",k5wCbM:"ui-1rohswg",kAnDOJ:"ui-6ehuon",kOuLrU:"ui-fk6m8",$$css:!0},horizontal:{kXHlph:"ui-w2csxc",kORKVm:"ui-10wlt62",kaPefq:"ui-k8sdt9",kC2sXz:"ui-1duton",k9lH4S:"ui-101ixbw",kphCe6:"ui-exgr1p",kvh3hx:"ui-7p5m3t",kacamN:"ui-y5w88m",$$css:!0},both:{kXHlph:"ui-w2csxc",kORKVm:"ui-1odjw0f",kaPefq:"ui-k8sdt9",kC2sXz:"ui-1duton",k9lH4S:"ui-101ixbw",kphCe6:"ui-exgr1p",kZeWKH:"ui-ish69e",$$css:!0}},Lb={base:{kB7OPa:"ui-9f619",kzqmXN:"ui-eq5yr9",k7Eaqz:"ui-gqtt45",ks0D6T:"ui-193iq5w",kAzted:"ui-1us19tq",k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",$$css:!0},horizontal:{kzqmXN:"ui-14atkfc",kZKoxP:"ui-g7h5cd",kXwgrk:"ui-1q0g3np",$$css:!0},both:{kzqmXN:"ui-ezivpi",k7Eaqz:"ui-gqtt45",ks0D6T:"ui-1x1rfll",kZKoxP:"ui-t7dq6l",kXwgrk:"ui-dt5ytf",$$css:!0}},Ku={base:{kVAEAm:"ui-10l6tqk",kY2c9j:"ui-1n327nk",k87sOh:"ui-16271f3",kt4wiu:"ui-1cdd6y0",krVfgx:"ui-1c87l4o",kLqNvP:"ui-hi6v0a",kzqmXN:"ui-790ffn",kfzvcC:"ui-67bb7w",k1xSpc:"ui-1lliihq ui-y36ywk",$$css:!0},horizontal:{k87sOh:"ui-80663w",kt4wiu:"ui-1cdd6y0",krVfgx:"ui-1gncbth",kLqNvP:"ui-pl0nw1",kzqmXN:"ui-14atkfc",kZKoxP:"ui-a38mao",$$css:!0},bothVertical:{krVfgx:"ui-1143y87",$$css:!0},bothHorizontal:{kt4wiu:"ui-13kbk1n",$$css:!0},visibilityNever:{k1xSpc:"ui-1s85apg",$$css:!0}},jb={base:{kVAEAm:"ui-10l6tqk",k87sOh:"ui-13vifvy",kt4wiu:"ui-tijo5x",krVfgx:"ui-dd4er5",kLqNvP:"ui-1o0tod",kAzted:"ui-4jlmx6",kzqmXN:"ui-790ffn",kaIpWk:"ui-1i4c3av",kWkggS:"ui-1m4ooaa ui-1kik0b9 ui-19p5jqy ui-gk890x",kSiTet:"ui-1hc1fzr",kfzvcC:"ui-67bb7w",k3aq6I:"ui-oww4n8",k1ekBW:"ui-1e8aii2",kIyJzY:"ui-1vaoic9 ui-144st5w",kAMwcw:"ui-1aiz5cx",$$css:!0},horizontal:{k87sOh:"ui-13vifvy",kt4wiu:"ui-1woyocn",krVfgx:"ui-1ey2m1c",kLqNvP:"ui-1o0tod",kzqmXN:"ui-14atkfc",kZKoxP:"ui-a38mao",kAzted:"ui-65nank",k7Eaqz:"ui-cbmsab",$$css:!0},hoverHidden:{kSiTet:"ui-g01cxk ui-4gyw5p ui-gorybd",$$css:!0}};function lB(){return aB.base}function uB({direction:e}){return[Db.base,e==="horizontal"?Db.horizontal:null,e==="both"?Db.both:null]}function cB(e){return[Lb.base,e==="horizontal"?Lb.horizontal:null,e==="both"?Lb.both:null]}function ME({direction:e,orientation:t,visibility:n}){return[Ku.base,t==="horizontal"?Ku.horizontal:null,e==="both"&&t==="vertical"?Ku.bothVertical:null,e==="both"&&t==="horizontal"?Ku.bothHorizontal:null,n==="never"?Ku.visibilityNever:null]}function DE(e,t){return[jb.base,e==="horizontal"?jb.horizontal:null,t?jb.hoverHidden:null]}const fB=1e4,Yu=5,Al=v.forwardRef(function({children:t,height:n,maxHeight:r,width:s,className:a,viewportClassName:l,rootStyle:c,viewportStyle:f,allowScrollChaining:d=!1,contentStyle:h,scrollbarStyle:m,overlay:b,style:y,scrollbarVisibility:k=J4,isScrollbarRevealed:S=!1,direction:C="vertical",topFadeSize:E,bottomFadeSize:T,topFadeStartOpacity:R=0,bottomFadeStartOpacity:_=0,startFadeSize:D,endFadeSize:A,autoScrollToBottom:I=!1,scrollTrigger:P,autoScrollPauseTimeout:$=fB,onScrollStateChange:O,mapVerticalWheelToHorizontal:Y=!1,scrollPadding:U=eB,scrollbarInset:B,onPointerEnter:j,onPointerLeave:q,...H},W){const F=v.useRef(null),K=v.useRef(null),N=v.useRef(null),z=v.useRef(null),V=v.useRef(null),L=v.useRef(null),Z=v.useRef(null),re=C!=="horizontal",ie=C!=="vertical",ae=Y&&!re,[le,ce]=v.useState(!1),[Ee,be]=v.useState(!1),[ue,ge]=v.useState(!1),[Se,Ae]=v.useState(!1),[ke,xe]=v.useState(!1),Ce=v.useRef(!1);Ce.current=ke;const Me=v.useRef(0),ze=v.useRef(0),Fe=v.useRef(null),ye=v.useRef(null);v.useLayoutEffect(()=>{const De=K.current,je=N.current;if(!De||!je)return;const Ie=[];if(re){const We=z.current,dt=V.current;We&&dt&&Ie.push(new Hp({viewport:De,content:je,scrollbar:We,thumb:dt,direction:"vertical",mapVerticalWheelToHorizontal:ae}))}if(ie){const We=L.current,dt=Z.current;We&&dt&&Ie.push(new Hp({viewport:De,content:je,scrollbar:We,thumb:dt,direction:"horizontal",mapVerticalWheelToHorizontal:ae}))}if(Ie.length!==0){for(const We of Ie)We.attach();return()=>{for(const We of Ie)We.detach()}}},[re,ie,ae]);const _e=v.useCallback(()=>{const De=K.current;return De?{scrollTop:De.scrollTop,scrollHeight:De.scrollHeight,clientHeight:De.clientHeight}:{scrollTop:0,scrollHeight:0,clientHeight:0}},[]),ee=v.useCallback((De=!1)=>{const je=K.current;je&&je.scrollTo({top:je.scrollHeight,behavior:De?"smooth":"instant"})},[]),fe=v.useCallback((De=!1)=>{const je=K.current;je&&je.scrollTo({top:0,behavior:De?"smooth":"instant"})},[]),Q=v.useCallback(()=>{ye.current===null&&(ye.current=requestAnimationFrame(()=>{ye.current=null,!Ce.current&&ee(!1)}))},[ee]),ne=v.useCallback(()=>{I&&(Ce.current||Q())},[I,Q]);v.useImperativeHandle(W,()=>({scrollToBottom:ee,scrollToTop:fe,requestAutoScroll:ne,getScrollPosition:_e,get rootElement(){return F.current},get viewportElement(){return K.current}}),[ee,fe,ne,_e]);const we=v.useCallback(()=>{const De=K.current;if(!De)return;const{scrollTop:je,scrollHeight:Ie,clientHeight:We}=De,{isAtTop:dt,isAtBottom:Et}=nB({scrollTop:je,scrollHeight:Ie,clientHeight:We,threshold:Yu});ce(!dt),be(!Et);const{isAtStart:Ne,isAtEnd:Tt}=rB({scrollLeft:De.scrollLeft,scrollWidth:De.scrollWidth,clientWidth:De.clientWidth,threshold:Yu});ge(!Ne),Ae(!Tt),O?.({isAtBottom:Et,isAtTop:dt}),Et&&Ce.current&&(xe(!1),Fe.current&&(clearTimeout(Fe.current),Fe.current=null));const Qt=Ie<ze.current-Yu,rn=Ie>ze.current+Yu,Rn=je<Me.current-Yu;Rn&&!Qt&&!Et&&I&&!Ce.current&&(xe(!0),Fe.current&&clearTimeout(Fe.current),Fe.current=setTimeout(()=>{xe(!1),Fe.current=null},$)),rn&&I&&!Ce.current&&!Et&&!Rn&&Q(),Qt&&I&&!Ce.current&&!Et&&Q(),Me.current=je,ze.current=Ie},[O,I,$,Q]),Pe=Q4(),Ye=v.useCallback(()=>{Pe.request(we)},[Pe,we]);v.useEffect(()=>{const De=K.current,je=N.current;if(!De)return;const Ie=()=>{Ye()};De.addEventListener("scroll",Ie,{passive:!0});const We=rN(we);return We!==null&&(We.observe(De),je&&We.observe(je)),()=>{De.removeEventListener("scroll",Ie),We?.disconnect(),Pe.dispose()}},[we,Ye,Pe]),v.useEffect(()=>{P!==void 0&&I&&(Ce.current||Q())},[P,I,Q]),v.useEffect(()=>{if(!re)return;const De=K.current;if(!De)return;const je=Ie=>{const We=Ie.deltaY;if(We===0)return;const dt=De.scrollHeight-De.clientHeight;if(dt<=0)return;const Et=De.scrollTop,Ne=Et<=0&&We<0,Tt=Et>=dt-.5&&We>0;Ne||Tt||Ie.stopPropagation()};return De.addEventListener("wheel",je,{passive:!0}),()=>De.removeEventListener("wheel",je)},[re]),v.useEffect(()=>{if(!ie)return;const De=K.current;if(!De)return;const je=We=>{const dt=Hy({deltaX:We.deltaX,deltaY:We.deltaY,mapVerticalWheelToHorizontal:ae});if(dt===null)return;const Et=De.scrollWidth-De.clientWidth;if(Et<=0)return;const Ne=De.scrollLeft;if(!(dt<0&&Ne<=0)&&!(dt>0&&Ne>=Et-.5)){if(!ae){We.stopPropagation();return}We.preventDefault(),De.scrollLeft=Ne+dt}},Ie=ae?{passive:!1,capture:!0}:{passive:!0,capture:!0};return De.addEventListener("wheel",je,Ie),()=>De.removeEventListener("wheel",je,Ie)},[ie,ae]);const Ze=E!==void 0||T!==void 0,bt=D!==void 0||A!==void 0,Je=Ze||bt,vt=Ze?E??24:0,kt=Ze?T??24:0,nt=bt?D??24:0,rt=bt?A??24:0,ct=k==="hover",[it,ft]=v.useState(!1);v.useLayoutEffect(()=>{ct&&ft(F.current?.matches(":hover")??!1)},[ct]);const Lt=v.useCallback(De=>{ft(!0),j?.(De)},[j]),Pt=v.useCallback(De=>{ft(!1),q?.(De)},[q]),At=ct&&!it&&!S;v.useEffect(()=>()=>{Fe.current&&clearTimeout(Fe.current),ye.current!==null&&(cancelAnimationFrame(ye.current),ye.current=null)},[]);const X={"--scroll-area-scroll-padding":`${U}px`,...B!==void 0?{"--scrollbar-inset":`${B}px`}:void 0},me=Yt({rootClass:"ui-scroll-area",stylexStyles:[lB(),c],className:sn(Je&&"ui-scroll-area--masked",a),style:{height:n,maxHeight:r,width:s,...X,...y}}),Le=Yt({rootClass:"ui-scroll-area__viewport",stylexStyles:[uB({direction:C}),f,Je?iB({topFadePx:le?vt:0,bottomFadePx:Ee?kt:0,topFadeStartOpacity:R,bottomFadeStartOpacity:_,startFadePx:ue?nt:0,endFadePx:Se?rt:0}):null],className:l,style:d?{overscrollBehavior:"auto"}:void 0}),Xe=Yt({rootClass:"ui-scroll-area__content",stylexStyles:[cB(C),h]}),Rt=Yt({rootClass:"ui-scroll-area__scrollbar",stylexStyles:[ME({direction:C,orientation:"vertical",visibility:k}),m]}),lt=zt(DE("vertical",At)),He=Yt({rootClass:"ui-scroll-area__scrollbar",stylexStyles:[ME({direction:C,orientation:"horizontal",visibility:k}),m]}),qe=zt(DE("horizontal",At));return g.jsxs("div",{ref:F,className:me.className,style:me.style,"data-scroll-padding":U,"data-visibility":k,"data-direction":C,...H,onPointerEnter:ct?Lt:j,onPointerLeave:ct?Pt:q,children:[g.jsx("div",{ref:K,className:Le.className,style:Le.style,"data-native-scrollbar":"none",children:g.jsx("div",{ref:N,className:Xe.className,style:Xe.style,children:t})}),b,re&&g.jsx("div",{ref:z,className:Rt.className,style:Rt.style,"data-orientation":"vertical","data-scrollable":"false",role:"presentation","aria-hidden":"true",children:g.jsx("div",{ref:V,className:lt.className,style:lt.style,"data-orientation":"vertical"})}),ie&&g.jsx("div",{ref:L,className:He.className,style:He.style,"data-orientation":"horizontal","data-scrollable":"false",role:"presentation","aria-hidden":"true",children:g.jsx("div",{ref:Z,className:qe.className,style:qe.style,"data-orientation":"horizontal"})})]})}),zb={root:{kzQI83:"ui-1iyjqo2",kmuXW:"ui-s83m0k",kCS8Yb:"ui-dl72j9",kAzted:"ui-2lwn1j",k7Eaqz:"ui-euugli",$$css:!0},rootHidden:{k1xSpc:"ui-1s85apg",$$css:!0},viewport:{kaPefq:"ui-1uzft2t",k9lH4S:"ui-pt7jon",$$css:!0}};function dB({children:e,hidden:t=!1,ref:n}){return g.jsx(Al,{ref:n,"data-component":"list-popup-scroll",maxHeight:"none",rootStyle:[zb.root,t&&zb.rootHidden],viewportStyle:zb.viewport,children:e})}const Ph="top",Tx=300,$h=100;function pB(e){const[t,n="center"]=e.split("-");return{side:t,align:n}}function hB(e){return typeof e=="number"?{sideOffset:e}:{sideOffset:e.mainAxis,alignOffset:e.alignmentAxis}}function mB(e){return e?{side:"flip",align:"shift",fallbackAxisSide:"none"}:{side:"flip",align:"shift",fallbackAxisSide:"start"}}function Bh(e,t,n){const{side:r,align:s}=v.useMemo(()=>pB(e),[e]),{sideOffset:a,alignOffset:l}=v.useMemo(()=>hB(t),[t]),c=v.useMemo(()=>mB(n),[n]);return{side:r,align:s,sideOffset:a,alignOffset:l,collisionAvoidance:c,positionMethod:"fixed"}}const gB=v.forwardRef(function(t,n){const{render:r,className:s,id:a,name:l,value:c,disabled:f=!1,onValueChange:d,defaultValue:h,autoFocus:m=!1,style:b,...y}=t,{state:k,name:S,disabled:C,setTouched:E,setDirty:T,validityData:R,setFocused:_,setFilled:D,validationMode:A,validation:I}=Mh(),{clearErrors:P}=DA(),$=C||f,O=S??l,Y={...k,disabled:$},{labelId:U}=yx(),B=xx({id:a});Ve(()=>{const N=c!=null;I.inputRef.current?.value||N&&c!==""?D(!0):N&&c===""&&D(!1)},[I.inputRef,D,c]);const j=v.useRef(null);Ve(()=>{m&&j.current===pr(Wt(j.current))&&_(!0)},[m,_]);const[q]=_l({controlled:c,default:h,name:"FieldControl",state:"value"}),H=c!==void 0,W=H?q:void 0,F=Ke(()=>I.inputRef.current?.value);return MA(I.inputRef,B,W,F,!$,l),gn("input",t,{ref:[n,j],state:Y,props:[{id:B,disabled:$,name:O,ref:I.inputRef,"aria-labelledby":U,autoFocus:m,...H?{value:W}:{defaultValue:h},onChange(N){const z=N.currentTarget.value;d?.(z,Ct(Oi,N.nativeEvent)),T(z!==R.initialValue),D(z!==""),N.nativeEvent.defaultPrevented||(P(O),I.change(z))},onFocus(){_(!0)},onBlur(N){E(!0),_(!1),A==="onBlur"&&I.commit(N.currentTarget.value)},onKeyDown(N){N.currentTarget.tagName==="INPUT"&&N.key==="Enter"&&(E(!0),I.commit(N.currentTarget.value))}},y,N=>I.getValidationProps($,N)],stateAttributesMapping:Zc})}),bB=v.forwardRef(function(t,n){return g.jsx(gB,{ref:n,...t})});var yB=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Vp=yB.join(","),iN=typeof Element>"u",Nl=iN?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Gp=!iN&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e?.ownerDocument},Wp=function(t,n){var r;n===void 0&&(n=!0);var s=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),a=s===""||s==="true",l=a||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):Wp(t.parentNode));return l},vB=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},sN=function(t,n,r){if(Wp(t))return[];var s=Array.prototype.slice.apply(t.querySelectorAll(Vp));return n&&Nl.call(t,Vp)&&s.unshift(t),s=s.filter(r),s},Kp=function(t,n,r){for(var s=[],a=Array.from(t);a.length;){var l=a.shift();if(!Wp(l,!1))if(l.tagName==="SLOT"){var c=l.assignedElements(),f=c.length?c:l.children,d=Kp(f,!0,r);r.flatten?s.push.apply(s,d):s.push({scopeParent:l,candidates:d})}else{var h=Nl.call(l,Vp);h&&r.filter(l)&&(n||!t.includes(l))&&s.push(l);var m=l.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(l),b=!Wp(m,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(l));if(m&&b){var y=Kp(m===!0?l.children:m.children,!0,r);r.flatten?s.push.apply(s,y):s.push({scopeParent:l,candidates:y})}else a.unshift.apply(a,l.children)}}return s},oN=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},aN=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||vB(t))&&!oN(t)?0:t.tabIndex},xB=function(t,n){var r=aN(t);return r<0&&n&&!oN(t)?0:r},kB=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},lN=function(t){return t.tagName==="INPUT"},SB=function(t){return lN(t)&&t.type==="hidden"},wB=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},EB=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},TB=function(t){if(!t.name)return!0;var n=t.form||Gp(t),r=function(c){return n.querySelectorAll('input[type="radio"][name="'+c+'"]')},s;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")s=r(window.CSS.escape(t.name));else try{s=r(t.name)}catch(l){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",l.message),!1}var a=EB(s,t.form);return!a||a===t},CB=function(t){return lN(t)&&t.type==="radio"},RB=function(t){return CB(t)&&!TB(t)},_B=function(t){var n,r=t&&Gp(t),s=(n=r)===null||n===void 0?void 0:n.host,a=!1;if(r&&r!==t){var l,c,f;for(a=!!((l=s)!==null&&l!==void 0&&(c=l.ownerDocument)!==null&&c!==void 0&&c.contains(s)||t!=null&&(f=t.ownerDocument)!==null&&f!==void 0&&f.contains(t));!a&&s;){var d,h,m;r=Gp(s),s=(d=r)===null||d===void 0?void 0:d.host,a=!!((h=s)!==null&&h!==void 0&&(m=h.ownerDocument)!==null&&m!==void 0&&m.contains(s))}}return a},LE=function(t){var n=t.getBoundingClientRect(),r=n.width,s=n.height;return r===0&&s===0},AB=function(t,n){var r=n.displayCheck,s=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var a=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!a}if(getComputedStyle(t).visibility==="hidden")return!0;var l=Nl.call(t,"details>summary:first-of-type"),c=l?t.parentElement:t;if(Nl.call(c,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof s=="function"){for(var f=t;t;){var d=t.parentElement,h=Gp(t);if(d&&!d.shadowRoot&&s(d)===!0)return LE(t);t.assignedSlot?t=t.assignedSlot:!d&&h!==t.ownerDocument?t=h.host:t=d}t=f}if(_B(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return LE(t);return!1},NB=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var s=n.children.item(r);if(s.tagName==="LEGEND")return Nl.call(n,"fieldset[disabled] *")?!0:!s.contains(t)}return!0}n=n.parentElement}return!1},Vy=function(t,n){return!(n.disabled||SB(n)||AB(n,t)||wB(n)||NB(n))},Gy=function(t,n){return!(RB(n)||aN(n)<0||!Vy(t,n))},OB=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},uN=function(t){var n=[],r=[];return t.forEach(function(s,a){var l=!!s.scopeParent,c=l?s.scopeParent:s,f=xB(c,l),d=l?uN(s.candidates):c;f===0?l?n.push.apply(n,d):n.push(c):r.push({documentOrder:a,tabIndex:f,item:s,isScope:l,content:d})}),r.sort(kB).reduce(function(s,a){return a.isScope?s.push.apply(s,a.content):s.push(a.content),s},[]).concat(n)},Fh=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Kp([t],n.includeContainer,{filter:Gy.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:OB}):r=sN(t,n.includeContainer,Gy.bind(null,n)),uN(r)},IB=function(t,n){n=n||{};var r;return n.getShadowRoot?r=Kp([t],n.includeContainer,{filter:Vy.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=sN(t,n.includeContainer,Vy.bind(null,n)),r},cN=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Nl.call(t,Vp)===!1?!1:Gy(n,t)};function MB(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function fN(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function DB(){return/apple/i.test(navigator.vendor)}function Wy(){const e=/android/i;return e.test(MB())||e.test(fN())}function LB(){return fN().includes("jsdom/")}const jE="data-floating-ui-focusable",jB="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",Pb="ArrowLeft",$b="ArrowRight",zB="ArrowUp",PB="ArrowDown";function po(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function xr(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&So(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function ho(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Bb(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function $B(e){return e.matches("html,body")}function hr(e){return e?.ownerDocument||document}function dN(e){return Ft(e)&&e.matches(jB)}function Ky(e){return e?e.getAttribute("role")==="combobox"&&dN(e):!1}function Yp(e){return e?e.hasAttribute(jE)?e:e.querySelector("["+jE+"]")||e:null}function na(e,t,n){return n===void 0&&(n=!0),e.filter(s=>{var a;return s.parentId===t&&(!n||((a=s.context)==null?void 0:a.open))}).flatMap(s=>[s,...na(e,s.id,n)])}function BB(e,t){let n,r=-1;function s(a,l){l>r&&(n=a,r=l),na(e,a).forEach(f=>{s(f.id,l+1)})}return s(t,0),e.find(a=>a.id===n)}function zE(e,t){var n;let r=[],s=(n=e.find(a=>a.id===t))==null?void 0:n.parentId;for(;s;){const a=e.find(l=>l.id===s);s=a?.parentId,a&&(r=r.concat(a))}return r}function ar(e){e.preventDefault(),e.stopPropagation()}function FB(e){return"nativeEvent"in e}function pN(e){return e.mozInputSource===0&&e.isTrusted?!0:Wy()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function hN(e){return LB()?!1:!Wy()&&e.width===0&&e.height===0||Wy()&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Rc(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}var UB=typeof document<"u",qB=function(){},mn=UB?v.useLayoutEffect:qB;const HB={...jv};function er(e){const t=v.useRef(e);return mn(()=>{t.current=e}),t}const VB=HB.useInsertionEffect,GB=VB||(e=>e());function Pn(e){const t=v.useRef(()=>{});return GB(()=>{t.current=e}),v.useCallback(function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return t.current==null?void 0:t.current(...r)},[])}function zd(e,t,n){return Math.floor(e/t)!==n}function gc(e,t){return t<0||t>=e.current.length}function Fb(e,t){return dr(e,{disabledIndices:t})}function PE(e,t){return dr(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function dr(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:s,amount:a=1}=t===void 0?{}:t,l=n;do l+=r?-a:a;while(l>=0&&l<=e.current.length-1&&kp(e,l,s));return l}function WB(e,t){let{event:n,orientation:r,loop:s,rtl:a,cols:l,disabledIndices:c,minIndex:f,maxIndex:d,prevIndex:h,stopEvent:m=!1}=t,b=h;if(n.key===zB){if(m&&ar(n),h===-1)b=d;else if(b=dr(e,{startingIndex:b,amount:l,decrement:!0,disabledIndices:c}),s&&(h-l<f||b<0)){const y=h%l,k=d%l,S=d-(k-y);k===y?b=d:b=k>y?S:S-l}gc(e,b)&&(b=h)}if(n.key===PB&&(m&&ar(n),h===-1?b=f:(b=dr(e,{startingIndex:h,amount:l,disabledIndices:c}),s&&h+l>d&&(b=dr(e,{startingIndex:h%l-l,amount:l,disabledIndices:c}))),gc(e,b)&&(b=h)),r==="both"){const y=ml(h/l);n.key===(a?Pb:$b)&&(m&&ar(n),h%l!==l-1?(b=dr(e,{startingIndex:h,disabledIndices:c}),s&&zd(b,l,y)&&(b=dr(e,{startingIndex:h-h%l-1,disabledIndices:c}))):s&&(b=dr(e,{startingIndex:h-h%l-1,disabledIndices:c})),zd(b,l,y)&&(b=h)),n.key===(a?$b:Pb)&&(m&&ar(n),h%l!==0?(b=dr(e,{startingIndex:h,decrement:!0,disabledIndices:c}),s&&zd(b,l,y)&&(b=dr(e,{startingIndex:h+(l-h%l),decrement:!0,disabledIndices:c}))):s&&(b=dr(e,{startingIndex:h+(l-h%l),decrement:!0,disabledIndices:c})),zd(b,l,y)&&(b=h));const k=ml(d/l)===y;gc(e,b)&&(s&&k?b=n.key===(a?$b:Pb)?d:dr(e,{startingIndex:h-h%l-1,disabledIndices:c}):b=h)}return b}function KB(e,t,n){const r=[];let s=0;return e.forEach((a,l)=>{let{width:c,height:f}=a,d=!1;for(n&&(s=0);!d;){const h=[];for(let m=0;m<c;m++)for(let b=0;b<f;b++)h.push(s+m+b*t);s%t+c<=t&&h.every(m=>r[m]==null)?(h.forEach(m=>{r[m]=l}),d=!0):s++}}),[...r]}function YB(e,t,n,r,s){if(e===-1)return-1;const a=n.indexOf(e),l=t[e];switch(s){case"tl":return a;case"tr":return l?a+l.width-1:a;case"bl":return l?a+(l.height-1)*r:a;case"br":return n.lastIndexOf(e)}}function XB(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function kp(e,t,n){if(typeof n=="function")return n(t);if(n)return n.includes(t);const r=e.current[t];return r==null||r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true"}const Qc=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function mN(e,t){const n=Fh(e,Qc()),r=n.length;if(r===0)return;const s=po(hr(e)),a=n.indexOf(s),l=a===-1?t===1?0:r-1:a+t;return n[l]}function gN(e){return mN(hr(e).body,1)||e}function bN(e){return mN(hr(e).body,-1)||e}function bc(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!xr(n,r)}function ZB(e){Fh(e,Qc()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function $E(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}function Jc(e){const t=v.useRef(void 0),n=v.useCallback(r=>{const s=e.map(a=>{if(a!=null){if(typeof a=="function"){const l=a,c=l(r);return typeof c=="function"?c:()=>{l(null)}}return a.current=r,()=>{a.current=null}}});return()=>{s.forEach(a=>a?.())}},e);return v.useMemo(()=>e.every(r=>r==null)?null:r=>{t.current&&(t.current(),t.current=void 0),r!=null&&(t.current=n(r))},e)}function QB(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const yN=v.createContext({register:()=>{},unregister:()=>{},map:new Map,elementsRef:{current:[]}});function vN(e){const{children:t,elementsRef:n,labelsRef:r}=e,[s,a]=v.useState(()=>new Set),l=v.useCallback(d=>{a(h=>new Set(h).add(d))},[]),c=v.useCallback(d=>{a(h=>{const m=new Set(h);return m.delete(d),m})},[]),f=v.useMemo(()=>{const d=new Map;return Array.from(s.keys()).sort(QB).forEach((m,b)=>{d.set(m,b)}),d},[s]);return g.jsx(yN.Provider,{value:v.useMemo(()=>({register:l,unregister:c,map:f,elementsRef:n,labelsRef:r}),[l,c,f,n,r]),children:t})}function Uh(e){e===void 0&&(e={});const{label:t}=e,{register:n,unregister:r,map:s,elementsRef:a,labelsRef:l}=v.useContext(yN),[c,f]=v.useState(null),d=v.useRef(null),h=v.useCallback(m=>{if(d.current=m,c!==null&&(a.current[c]=m,l)){var b;const y=t!==void 0;l.current[c]=y?t:(b=m?.textContent)!=null?b:null}},[c,a,l,t]);return mn(()=>{const m=d.current;if(m)return n(m),()=>{r(m)}},[n,r]),mn(()=>{const m=d.current?s.get(d.current):null;m!=null&&f(m)},[s]),v.useMemo(()=>({ref:h,index:c??-1}),[c,h])}const JB="data-floating-ui-focusable",BE="active",FE="selected",ef="ArrowLeft",tf="ArrowRight",xN="ArrowUp",qh="ArrowDown",e9={...jv};let UE=!1,t9=0;const qE=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+t9++;function n9(){const[e,t]=v.useState(()=>UE?qE():void 0);return mn(()=>{e==null&&t(qE())},[]),v.useEffect(()=>{UE=!0},[]),e}const r9=e9.useId,Hh=r9||n9;function kN(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(s=>s(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}const SN=v.createContext(null),wN=v.createContext(null),Ao=()=>{var e;return((e=v.useContext(SN))==null?void 0:e.id)||null},No=()=>v.useContext(wN);function Cx(e){const t=Hh(),n=No(),s=Ao();return mn(()=>{if(!t)return;const a={id:t,parentId:s};return n?.addNode(a),()=>{n?.removeNode(a)}},[n,t,s]),t}function Rx(e){const{children:t,id:n}=e,r=Ao();return g.jsx(SN.Provider,{value:v.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function i9(e){const{children:t}=e,n=v.useRef([]),r=v.useCallback(l=>{n.current=[...n.current,l]},[]),s=v.useCallback(l=>{n.current=n.current.filter(c=>c!==l)},[]),[a]=v.useState(()=>kN());return g.jsx(wN.Provider,{value:v.useMemo(()=>({nodesRef:n,addNode:r,removeNode:s,events:a}),[r,s,a]),children:t})}function Ol(e){return"data-floating-ui-"+e}function fr(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}const HE=Ol("safe-polygon");function Ub(e,t,n){if(n&&!Rc(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r?.[t]}return e?.[t]}function qb(e){return typeof e=="function"?e():e}function EN(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:s,events:a,elements:l}=e,{enabled:c=!0,delay:f=0,handleClose:d=null,mouseOnly:h=!1,restMs:m=0,move:b=!0}=t,y=No(),k=Ao(),S=er(d),C=er(f),E=er(n),T=er(m),R=v.useRef(),_=v.useRef(-1),D=v.useRef(),A=v.useRef(-1),I=v.useRef(!0),P=v.useRef(!1),$=v.useRef(()=>{}),O=v.useRef(!1),Y=Pn(()=>{var W;const F=(W=s.current.openEvent)==null?void 0:W.type;return F?.includes("mouse")&&F!=="mousedown"});v.useEffect(()=>{if(!c)return;function W(F){let{open:K}=F;K||(fr(_),fr(A),I.current=!0,O.current=!1)}return a.on("openchange",W),()=>{a.off("openchange",W)}},[c,a]),v.useEffect(()=>{if(!c||!S.current||!n)return;function W(K){Y()&&r(!1,K,"hover")}const F=hr(l.floating).documentElement;return F.addEventListener("mouseleave",W),()=>{F.removeEventListener("mouseleave",W)}},[l.floating,n,r,c,S,Y]);const U=v.useCallback(function(W,F,K){F===void 0&&(F=!0),K===void 0&&(K="hover");const N=Ub(C.current,"close",R.current);N&&!D.current?(fr(_),_.current=window.setTimeout(()=>r(!1,W,K),N)):F&&(fr(_),r(!1,W,K))},[C,r]),B=Pn(()=>{$.current(),D.current=void 0}),j=Pn(()=>{if(P.current){const W=hr(l.floating).body;W.style.pointerEvents="",W.removeAttribute(HE),P.current=!1}}),q=Pn(()=>s.current.openEvent?["click","mousedown"].includes(s.current.openEvent.type):!1);v.useEffect(()=>{if(!c)return;function W(V){if(fr(_),I.current=!1,h&&!Rc(R.current)||qb(T.current)>0&&!Ub(C.current,"open"))return;const L=Ub(C.current,"open",R.current);L?_.current=window.setTimeout(()=>{E.current||r(!0,V,"hover")},L):n||r(!0,V,"hover")}function F(V){if(q()){j();return}$.current();const L=hr(l.floating);if(fr(A),O.current=!1,S.current&&s.current.floatingContext){n||fr(_),D.current=S.current({...s.current.floatingContext,tree:y,x:V.clientX,y:V.clientY,onClose(){j(),B(),q()||U(V,!0,"safe-polygon")}});const re=D.current;L.addEventListener("mousemove",re),$.current=()=>{L.removeEventListener("mousemove",re)};return}(R.current!=="touch"||!xr(l.floating,V.relatedTarget))&&U(V)}function K(V){q()||s.current.floatingContext&&(S.current==null||S.current({...s.current.floatingContext,tree:y,x:V.clientX,y:V.clientY,onClose(){j(),B(),q()||U(V)}})(V))}function N(){fr(_)}function z(V){q()||U(V,!1)}if(gt(l.domReference)){const V=l.domReference,L=l.floating;return n&&V.addEventListener("mouseleave",K),b&&V.addEventListener("mousemove",W,{once:!0}),V.addEventListener("mouseenter",W),V.addEventListener("mouseleave",F),L&&(L.addEventListener("mouseleave",K),L.addEventListener("mouseenter",N),L.addEventListener("mouseleave",z)),()=>{n&&V.removeEventListener("mouseleave",K),b&&V.removeEventListener("mousemove",W),V.removeEventListener("mouseenter",W),V.removeEventListener("mouseleave",F),L&&(L.removeEventListener("mouseleave",K),L.removeEventListener("mouseenter",N),L.removeEventListener("mouseleave",z))}}},[l,c,e,h,b,U,B,j,r,n,E,y,C,S,s,q,T]),mn(()=>{var W;if(c&&n&&(W=S.current)!=null&&(W=W.__options)!=null&&W.blockPointerEvents&&Y()){P.current=!0;const K=l.floating;if(gt(l.domReference)&&K){var F;const N=hr(l.floating).body;N.setAttribute(HE,"");const z=l.domReference,V=y==null||(F=y.nodesRef.current.find(L=>L.id===k))==null||(F=F.context)==null?void 0:F.elements.floating;return V&&(V.style.pointerEvents=""),N.style.pointerEvents="none",z.style.pointerEvents="auto",K.style.pointerEvents="auto",()=>{N.style.pointerEvents="",z.style.pointerEvents="",K.style.pointerEvents=""}}}},[c,n,k,l,y,S,Y]),mn(()=>{n||(R.current=void 0,O.current=!1,B(),j())},[n,B,j]),v.useEffect(()=>()=>{B(),fr(_),fr(A),j()},[c,l.domReference,B,j]);const H=v.useMemo(()=>{function W(F){R.current=F.pointerType}return{onPointerDown:W,onPointerEnter:W,onMouseMove(F){const{nativeEvent:K}=F;function N(){!I.current&&!E.current&&r(!0,K,"hover")}h&&!Rc(R.current)||n||qb(T.current)===0||O.current&&F.movementX**2+F.movementY**2<2||(fr(A),R.current==="touch"?N():(O.current=!0,A.current=window.setTimeout(N,qb(T.current))))}}},[h,r,n,E,T]);return v.useMemo(()=>c?{reference:H}:{},[c,H])}let VE=0;function ea(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:s=!1}=t;r&&cancelAnimationFrame(VE);const a=()=>e?.focus({preventScroll:n});s?a():VE=requestAnimationFrame(a)}function Hb(e,t){if(!e||!t)return!1;const n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&So(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function s9(e){return"composedPath"in e?e.composedPath()[0]:e.target}function o9(e){return e?.ownerDocument||document}const xl={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function GE(e){return e==="inert"?xl.inert:e==="aria-hidden"?xl["aria-hidden"]:xl.none}let Pd=new WeakSet,$d={},Vb=0;const a9=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,TN=e=>e&&(e.host||TN(e.parentNode)),l9=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=TN(n);return e.contains(r)?r:null}).filter(n=>n!=null);function u9(e,t,n,r){const s="data-floating-ui-inert",a=r?"inert":n?"aria-hidden":null,l=l9(t,e),c=new Set,f=new Set(l),d=[];$d[s]||($d[s]=new WeakMap);const h=$d[s];l.forEach(m),b(t),c.clear();function m(y){!y||c.has(y)||(c.add(y),y.parentNode&&m(y.parentNode))}function b(y){!y||f.has(y)||[].forEach.call(y.children,k=>{if(Qn(k)!=="script")if(c.has(k))b(k);else{const S=a?k.getAttribute(a):null,C=S!==null&&S!=="false",E=GE(a),T=(E.get(k)||0)+1,R=(h.get(k)||0)+1;E.set(k,T),h.set(k,R),d.push(k),T===1&&C&&Pd.add(k),R===1&&k.setAttribute(s,""),!C&&a&&k.setAttribute(a,a==="inert"?"":"true")}})}return Vb++,()=>{d.forEach(y=>{const k=GE(a),C=(k.get(y)||0)-1,E=(h.get(y)||0)-1;k.set(y,C),h.set(y,E),C||(!Pd.has(y)&&a&&y.removeAttribute(a),Pd.delete(y)),E||y.removeAttribute(s)}),Vb--,Vb||(xl.inert=new WeakMap,xl["aria-hidden"]=new WeakMap,xl.none=new WeakMap,Pd=new WeakSet,$d={})}}function WE(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=o9(e[0]).body;return u9(e.concat(Array.from(r.querySelectorAll('[aria-live],[role="status"],output'))),r,t,n)}const Vh={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},Xp=v.forwardRef(function(t,n){const[r,s]=v.useState();mn(()=>{DB()&&s("button")},[]);const a={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Ol("focus-guard")]:"",style:Vh};return g.jsx("span",{...t,...a})}),CN=v.createContext(null),KE=Ol("portal");function c9(e){e===void 0&&(e={});const{id:t,root:n}=e,r=Hh(),s=RN(),[a,l]=v.useState(null),c=v.useRef(null);return mn(()=>()=>{a?.remove(),queueMicrotask(()=>{c.current=null})},[a]),mn(()=>{if(!r||c.current)return;const f=t?document.getElementById(t):null;if(!f)return;const d=document.createElement("div");d.id=r,d.setAttribute(KE,""),f.appendChild(d),c.current=d,l(d)},[t,r]),mn(()=>{if(n===null||!r||c.current)return;let f=n||s?.portalNode;f&&!hh(f)&&(f=f.current),f=f||document.body;let d=null;t&&(d=document.createElement("div"),d.id=t,f.appendChild(d));const h=document.createElement("div");h.id=r,h.setAttribute(KE,""),f=d||f,f.appendChild(h),c.current=h,l(h)},[t,n,r,s]),a}function _x(e){const{children:t,id:n,root:r,preserveTabOrder:s=!0}=e,a=c9({id:n,root:r}),[l,c]=v.useState(null),f=v.useRef(null),d=v.useRef(null),h=v.useRef(null),m=v.useRef(null),b=l?.modal,y=l?.open,k=!!l&&!l.modal&&l.open&&s&&!!(r||a);return v.useEffect(()=>{if(!a||!s||b)return;function S(C){a&&bc(C)&&(C.type==="focusin"?$E:ZB)(a)}return a.addEventListener("focusin",S,!0),a.addEventListener("focusout",S,!0),()=>{a.removeEventListener("focusin",S,!0),a.removeEventListener("focusout",S,!0)}},[a,s,b]),v.useEffect(()=>{a&&(y||$E(a))},[y,a]),g.jsxs(CN.Provider,{value:v.useMemo(()=>({preserveTabOrder:s,beforeOutsideRef:f,afterOutsideRef:d,beforeInsideRef:h,afterInsideRef:m,portalNode:a,setFocusManagerState:c}),[s,a]),children:[k&&a&&g.jsx(Xp,{"data-type":"outside",ref:f,onFocus:S=>{if(bc(S,a)){var C;(C=h.current)==null||C.focus()}else{const E=l?l.domReference:null,T=bN(E);T?.focus()}}}),k&&a&&g.jsx("span",{"aria-owns":a.id,style:Vh}),a&&Di.createPortal(t,a),k&&a&&g.jsx(Xp,{"data-type":"outside",ref:d,onFocus:S=>{if(bc(S,a)){var C;(C=m.current)==null||C.focus()}else{const E=l?l.domReference:null,T=gN(E);T?.focus(),l?.closeOnFocusOut&&l?.onOpenChange(!1,S.nativeEvent,"focus-out")}}})]})}const RN=()=>v.useContext(CN);function YE(e){return v.useMemo(()=>t=>{e.forEach(n=>{n&&(n.current=t)})},e)}const f9=20;let go=[];function Ax(){go=go.filter(e=>e.isConnected)}function d9(e){Ax(),e&&Qn(e)!=="body"&&(go.push(e),go.length>f9&&(go=go.slice(-20)))}function XE(){return Ax(),go[go.length-1]}function p9(e){const t=Qc();return cN(e,t)?e:Fh(e,t)[0]||e}function ZE(e,t){var n;if(!t.current.includes("floating")&&!((n=e.getAttribute("role"))!=null&&n.includes("dialog")))return;const r=Qc(),a=IB(e,r).filter(c=>{const f=c.getAttribute("data-tabindex")||"";return cN(c,r)||c.hasAttribute("data-tabindex")&&!f.startsWith("-")}),l=e.getAttribute("tabindex");t.current.includes("floating")||a.length===0?l!=="0"&&e.setAttribute("tabindex","0"):(l!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}const h9=v.forwardRef(function(t,n){return g.jsx("button",{...t,type:"button",ref:n,tabIndex:-1,style:Vh})});function Nx(e){const{context:t,children:n,disabled:r=!1,order:s=["content"],guards:a=!0,initialFocus:l=0,returnFocus:c=!0,restoreFocus:f=!1,modal:d=!0,visuallyHiddenDismiss:h=!1,closeOnFocusOut:m=!0,outsideElementsInert:b=!1,getInsideElements:y=()=>[]}=e,{open:k,onOpenChange:S,events:C,dataRef:E,elements:{domReference:T,floating:R}}=t,_=Pn(()=>{var ue;return(ue=E.current.floatingContext)==null?void 0:ue.nodeId}),D=Pn(y),A=typeof l=="number"&&l<0,I=Ky(T)&&A,P=a9(),$=P?a:!0,O=!$||P&&b,Y=er(s),U=er(l),B=er(c),j=No(),q=RN(),H=v.useRef(null),W=v.useRef(null),F=v.useRef(!1),K=v.useRef(!1),N=v.useRef(-1),z=v.useRef(-1),V=q!=null,L=Yp(R),Z=Pn(function(ue){return ue===void 0&&(ue=L),ue?Fh(ue,Qc()):[]}),re=Pn(ue=>{const ge=Z(ue);return Y.current.map(Se=>T&&Se==="reference"?T:L&&Se==="floating"?L:ge).filter(Boolean).flat()});v.useEffect(()=>{if(r||!d)return;function ue(Se){if(Se.key==="Tab"){xr(L,po(hr(L)))&&Z().length===0&&!I&&ar(Se);const Ae=re(),ke=ho(Se);Y.current[0]==="reference"&&ke===T&&(ar(Se),Se.shiftKey?ea(Ae[Ae.length-1]):ea(Ae[1])),Y.current[1]==="floating"&&ke===L&&Se.shiftKey&&(ar(Se),ea(Ae[0]))}}const ge=hr(L);return ge.addEventListener("keydown",ue),()=>{ge.removeEventListener("keydown",ue)}},[r,T,L,d,Y,I,Z,re]),v.useEffect(()=>{if(r||!R)return;function ue(ge){const Se=ho(ge),ke=Z().indexOf(Se);ke!==-1&&(N.current=ke)}return R.addEventListener("focusin",ue),()=>{R.removeEventListener("focusin",ue)}},[r,R,Z]),v.useEffect(()=>{if(r||!m)return;function ue(){K.current=!0,setTimeout(()=>{K.current=!1})}function ge(ke){const xe=ke.relatedTarget,Ce=ke.currentTarget,Me=ho(ke);queueMicrotask(()=>{const ze=_(),Fe=!(xr(T,xe)||xr(R,xe)||xr(xe,R)||xr(q?.portalNode,xe)||xe!=null&&xe.hasAttribute(Ol("focus-guard"))||j&&(na(j.nodesRef.current,ze).find(ye=>{var _e,ee;return xr((_e=ye.context)==null?void 0:_e.elements.floating,xe)||xr((ee=ye.context)==null?void 0:ee.elements.domReference,xe)})||zE(j.nodesRef.current,ze).find(ye=>{var _e,ee,fe;return[(_e=ye.context)==null?void 0:_e.elements.floating,Yp((ee=ye.context)==null?void 0:ee.elements.floating)].includes(xe)||((fe=ye.context)==null?void 0:fe.elements.domReference)===xe})));if(Ce===T&&L&&ZE(L,Y),f&&Ce!==T&&!(Me!=null&&Me.isConnected)&&po(hr(L))===hr(L).body){Ft(L)&&L.focus();const ye=N.current,_e=Z(),ee=_e[ye]||_e[_e.length-1]||L;Ft(ee)&&ee.focus()}if(E.current.insideReactTree){E.current.insideReactTree=!1;return}(I||!d)&&xe&&Fe&&!K.current&&xe!==XE()&&(F.current=!0,S(!1,ke,"focus-out"))})}const Se=!!(!j&&q);function Ae(){fr(z),E.current.insideReactTree=!0,z.current=window.setTimeout(()=>{E.current.insideReactTree=!1})}if(R&&Ft(T))return T.addEventListener("focusout",ge),T.addEventListener("pointerdown",ue),R.addEventListener("focusout",ge),Se&&R.addEventListener("focusout",Ae,!0),()=>{T.removeEventListener("focusout",ge),T.removeEventListener("pointerdown",ue),R.removeEventListener("focusout",ge),Se&&R.removeEventListener("focusout",Ae,!0)}},[r,T,R,L,d,j,q,S,m,f,Z,I,_,Y,E]);const ie=v.useRef(null),ae=v.useRef(null),le=YE([ie,q?.beforeInsideRef]),ce=YE([ae,q?.afterInsideRef]);v.useEffect(()=>{var ue,ge;if(r||!R)return;const Se=Array.from((q==null||(ue=q.portalNode)==null?void 0:ue.querySelectorAll("["+Ol("portal")+"]"))||[]),ke=(ge=(j?zE(j.nodesRef.current,_()):[]).find(Me=>{var ze;return Ky(((ze=Me.context)==null?void 0:ze.elements.domReference)||null)}))==null||(ge=ge.context)==null?void 0:ge.elements.domReference,xe=[R,ke,...Se,...D(),H.current,W.current,ie.current,ae.current,q?.beforeOutsideRef.current,q?.afterOutsideRef.current,Y.current.includes("reference")||I?T:null].filter(Me=>Me!=null),Ce=d||I?WE(xe,!O,O):WE(xe);return()=>{Ce()}},[r,T,R,d,Y,q,I,$,O,j,_,D]),mn(()=>{if(r||!Ft(L))return;const ue=hr(L),ge=po(ue);queueMicrotask(()=>{const Se=re(L),Ae=U.current,ke=(typeof Ae=="number"?Se[Ae]:Ae.current)||L,xe=xr(L,ge);!A&&!xe&&k&&ea(ke,{preventScroll:ke===L})})},[r,k,L,A,re,U]),mn(()=>{if(r||!L)return;const ue=hr(L),ge=po(ue);d9(ge);function Se(xe){let{reason:Ce,event:Me,nested:ze}=xe;if(["hover","safe-polygon"].includes(Ce)&&Me.type==="mouseleave"&&(F.current=!0),Ce==="outside-press")if(ze)F.current=!1;else if(pN(Me)||hN(Me))F.current=!1;else{let Fe=!1;document.createElement("div").focus({get preventScroll(){return Fe=!0,!1}}),Fe?F.current=!1:F.current=!0}}C.on("openchange",Se);const Ae=ue.createElement("span");Ae.setAttribute("tabindex","-1"),Ae.setAttribute("aria-hidden","true"),Object.assign(Ae.style,Vh),V&&T&&T.insertAdjacentElement("afterend",Ae);function ke(){if(typeof B.current=="boolean"){const xe=T||XE();return xe&&xe.isConnected?xe:Ae}return B.current.current||Ae}return()=>{C.off("openchange",Se);const xe=po(ue),Ce=xr(R,xe)||j&&na(j.nodesRef.current,_(),!1).some(ze=>{var Fe;return xr((Fe=ze.context)==null?void 0:Fe.elements.floating,xe)}),Me=ke();queueMicrotask(()=>{const ze=p9(Me);B.current&&!F.current&&Ft(ze)&&(!(ze!==xe&&xe!==ue.body)||Ce)&&ze.focus({preventScroll:!0}),Ae.remove()})}},[r,R,L,B,E,C,j,V,T,_]),v.useEffect(()=>(queueMicrotask(()=>{F.current=!1}),()=>{queueMicrotask(Ax)}),[r]),mn(()=>{if(!r&&q)return q.setFocusManagerState({modal:d,closeOnFocusOut:m,open:k,onOpenChange:S,domReference:T}),()=>{q.setFocusManagerState(null)}},[r,q,d,k,S,m,T]),mn(()=>{r||L&&ZE(L,Y)},[r,L,Y]);function Ee(ue){return r||!h||!d?null:g.jsx(h9,{ref:ue==="start"?H:W,onClick:ge=>S(!1,ge.nativeEvent),children:typeof h=="string"?h:"Dismiss"})}const be=!r&&$&&(d?!I:!0)&&(V||d);return g.jsxs(g.Fragment,{children:[be&&g.jsx(Xp,{"data-type":"inside",ref:le,onFocus:ue=>{if(d){const Se=re();ea(s[0]==="reference"?Se[0]:Se[Se.length-1])}else if(q!=null&&q.preserveTabOrder&&q.portalNode)if(F.current=!1,bc(ue,q.portalNode)){const Se=gN(T);Se?.focus()}else{var ge;(ge=q.beforeOutsideRef.current)==null||ge.focus()}}}),!I&&Ee("start"),n,Ee("end"),be&&g.jsx(Xp,{"data-type":"inside",ref:ce,onFocus:ue=>{if(d)ea(re()[0]);else if(q!=null&&q.preserveTabOrder&&q.portalNode)if(m&&(F.current=!0),bc(ue,q.portalNode)){const Se=bN(T);Se?.focus()}else{var ge;(ge=q.afterOutsideRef.current)==null||ge.focus()}}})]})}function QE(e){return Ft(e.target)&&e.target.tagName==="BUTTON"}function m9(e){return Ft(e.target)&&e.target.tagName==="A"}function JE(e){return dN(e)}function _N(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:s,elements:{domReference:a}}=e,{enabled:l=!0,event:c="click",toggle:f=!0,ignoreMouse:d=!1,keyboardHandlers:h=!0,stickIfOpen:m=!0}=t,b=v.useRef(),y=v.useRef(!1),k=v.useMemo(()=>({onPointerDown(S){b.current=S.pointerType},onMouseDown(S){const C=b.current;S.button===0&&c!=="click"&&(Rc(C,!0)&&d||(n&&f&&(!(s.current.openEvent&&m)||s.current.openEvent.type==="mousedown")?r(!1,S.nativeEvent,"click"):(S.preventDefault(),r(!0,S.nativeEvent,"click"))))},onClick(S){const C=b.current;if(c==="mousedown"&&b.current){b.current=void 0;return}Rc(C,!0)&&d||(n&&f&&(!(s.current.openEvent&&m)||s.current.openEvent.type==="click")?r(!1,S.nativeEvent,"click"):r(!0,S.nativeEvent,"click"))},onKeyDown(S){b.current=void 0,!(S.defaultPrevented||!h||QE(S))&&(S.key===" "&&!JE(a)&&(S.preventDefault(),y.current=!0),!m9(S)&&S.key==="Enter"&&r(!(n&&f),S.nativeEvent,"click"))},onKeyUp(S){S.defaultPrevented||!h||QE(S)||JE(a)||S.key===" "&&y.current&&(y.current=!1,r(!(n&&f),S.nativeEvent,"click"))}}),[s,a,c,d,h,r,n,m,f]);return v.useMemo(()=>l?{reference:k}:{},[l,k])}const g9={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},b9={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},eT=e=>{var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e?.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e?.outsidePress)!=null?n:!0}};function AN(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,elements:s,dataRef:a}=e,{enabled:l=!0,escapeKey:c=!0,outsidePress:f=!0,outsidePressEvent:d="pointerdown",referencePress:h=!1,referencePressEvent:m="pointerdown",ancestorScroll:b=!1,bubbles:y,capture:k}=t,S=No(),C=Pn(typeof f=="function"?f:()=>!1),E=typeof f=="function"?C:f,T=v.useRef(!1),{escapeKey:R,outsidePress:_}=eT(y),{escapeKey:D,outsidePress:A}=eT(k),I=v.useRef(!1),P=Pn(j=>{var q;if(!n||!l||!c||j.key!=="Escape"||I.current)return;const H=(q=a.current.floatingContext)==null?void 0:q.nodeId,W=S?na(S.nodesRef.current,H):[];if(!R&&(j.stopPropagation(),W.length>0)){let F=!0;if(W.forEach(K=>{var N;if((N=K.context)!=null&&N.open&&!K.context.dataRef.current.__escapeKeyBubbles){F=!1;return}}),!F)return}r(!1,FB(j)?j.nativeEvent:j,"escape-key")}),$=Pn(j=>{var q;const H=()=>{var W;P(j),(W=ho(j))==null||W.removeEventListener("keydown",H)};(q=ho(j))==null||q.addEventListener("keydown",H)}),O=Pn(j=>{var q;const H=a.current.insideReactTree;a.current.insideReactTree=!1;const W=T.current;if(T.current=!1,d==="click"&&W||H||typeof E=="function"&&!E(j))return;const F=ho(j),K="["+Ol("inert")+"]",N=hr(s.floating).querySelectorAll(K);let z=gt(F)?F:null;for(;z&&!Ai(z);){const re=As(z);if(Ai(re)||!gt(re))break;z=re}if(N.length&&gt(F)&&!$B(F)&&!xr(F,s.floating)&&Array.from(N).every(re=>!xr(z,re)))return;if(Ft(F)&&B){const re=Ai(F),ie=Tr(F),ae=/auto|scroll/,le=re||ae.test(ie.overflowX),ce=re||ae.test(ie.overflowY),Ee=le&&F.clientWidth>0&&F.scrollWidth>F.clientWidth,be=ce&&F.clientHeight>0&&F.scrollHeight>F.clientHeight,ue=ie.direction==="rtl",ge=be&&(ue?j.offsetX<=F.offsetWidth-F.clientWidth:j.offsetX>F.clientWidth),Se=Ee&&j.offsetY>F.clientHeight;if(ge||Se)return}const V=(q=a.current.floatingContext)==null?void 0:q.nodeId,L=S&&na(S.nodesRef.current,V).some(re=>{var ie;return Bb(j,(ie=re.context)==null?void 0:ie.elements.floating)});if(Bb(j,s.floating)||Bb(j,s.domReference)||L)return;const Z=S?na(S.nodesRef.current,V):[];if(Z.length>0){let re=!0;if(Z.forEach(ie=>{var ae;if((ae=ie.context)!=null&&ae.open&&!ie.context.dataRef.current.__outsidePressBubbles){re=!1;return}}),!re)return}r(!1,j,"outside-press")}),Y=Pn(j=>{var q;const H=()=>{var W;O(j),(W=ho(j))==null||W.removeEventListener(d,H)};(q=ho(j))==null||q.addEventListener(d,H)});v.useEffect(()=>{if(!n||!l)return;a.current.__escapeKeyBubbles=R,a.current.__outsidePressBubbles=_;let j=-1;function q(N){r(!1,N,"ancestor-scroll")}function H(){window.clearTimeout(j),I.current=!0}function W(){j=window.setTimeout(()=>{I.current=!1},gh()?5:0)}const F=hr(s.floating);c&&(F.addEventListener("keydown",D?$:P,D),F.addEventListener("compositionstart",H),F.addEventListener("compositionend",W)),E&&F.addEventListener(d,A?Y:O,A);let K=[];return b&&(gt(s.domReference)&&(K=bo(s.domReference)),gt(s.floating)&&(K=K.concat(bo(s.floating))),!gt(s.reference)&&s.reference&&s.reference.contextElement&&(K=K.concat(bo(s.reference.contextElement)))),K=K.filter(N=>{var z;return N!==((z=F.defaultView)==null?void 0:z.visualViewport)}),K.forEach(N=>{N.addEventListener("scroll",q,{passive:!0})}),()=>{c&&(F.removeEventListener("keydown",D?$:P,D),F.removeEventListener("compositionstart",H),F.removeEventListener("compositionend",W)),E&&F.removeEventListener(d,A?Y:O,A),K.forEach(N=>{N.removeEventListener("scroll",q)}),window.clearTimeout(j)}},[a,s,c,E,d,n,r,b,l,R,_,P,D,$,O,A,Y]),v.useEffect(()=>{a.current.insideReactTree=!1},[a,E,d]);const U=v.useMemo(()=>({onKeyDown:P,...h&&{[g9[m]]:j=>{r(!1,j.nativeEvent,"reference-press")},...m!=="click"&&{onClick(j){r(!1,j.nativeEvent,"reference-press")}}}}),[P,r,h,m]),B=v.useMemo(()=>({onKeyDown:P,onMouseDown(){T.current=!0},onMouseUp(){T.current=!0},[b9[d]]:()=>{a.current.insideReactTree=!0}}),[P,d,a]);return v.useMemo(()=>l?{reference:U,floating:B}:{},[l,U,B])}function y9(e){const{open:t=!1,onOpenChange:n,elements:r}=e,s=Hh(),a=v.useRef({}),[l]=v.useState(()=>kN()),c=Ao()!=null,[f,d]=v.useState(r.reference),h=Pn((y,k,S)=>{a.current.openEvent=y?k:void 0,l.emit("openchange",{open:y,event:k,reason:S,nested:c}),n?.(y,k,S)}),m=v.useMemo(()=>({setPositionReference:d}),[]),b=v.useMemo(()=>({reference:f||r.reference||null,floating:r.floating||null,domReference:r.reference}),[f,r.reference,r.floating]);return v.useMemo(()=>({dataRef:a,open:t,onOpenChange:h,elements:b,events:l,floatingId:s,refs:m}),[t,h,b,l,s,m])}function Ox(e){e===void 0&&(e={});const{nodeId:t}=e,n=y9({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,s=r.elements,[a,l]=v.useState(null),[c,f]=v.useState(null),h=s?.domReference||a,m=v.useRef(null),b=No();mn(()=>{h&&(m.current=h)},[h]);const y=q_({...e,elements:{...s,...c&&{reference:c}}}),k=v.useCallback(R=>{const _=gt(R)?{getBoundingClientRect:()=>R.getBoundingClientRect(),getClientRects:()=>R.getClientRects(),contextElement:R}:R;f(_),y.refs.setReference(_)},[y.refs]),S=v.useCallback(R=>{(gt(R)||R===null)&&(m.current=R,l(R)),(gt(y.refs.reference.current)||y.refs.reference.current===null||R!==null&&!gt(R))&&y.refs.setReference(R)},[y.refs]),C=v.useMemo(()=>({...y.refs,setReference:S,setPositionReference:k,domReference:m}),[y.refs,S,k]),E=v.useMemo(()=>({...y.elements,domReference:h}),[y.elements,h]),T=v.useMemo(()=>({...y,...r,refs:C,elements:E,nodeId:t}),[y,C,E,t,r]);return mn(()=>{r.dataRef.current.floatingContext=T;const R=b?.nodesRef.current.find(_=>_.id===t);R&&(R.context=T)}),v.useMemo(()=>({...y,context:T,refs:C,elements:E}),[y,C,E,T])}function Gb(e,t,n){const r=new Map,s=n==="item";let a=e;if(s&&e){const{[BE]:l,[FE]:c,...f}=e;a=f}return{...n==="floating"&&{tabIndex:-1,[JB]:""},...a,...t.map(l=>{const c=l?l[n]:null;return typeof c=="function"?e?c(e):null:c}).concat(e).reduce((l,c)=>(c&&Object.entries(c).forEach(f=>{let[d,h]=f;if(!(s&&[BE,FE].includes(d)))if(d.indexOf("on")===0){if(r.has(d)||r.set(d,[]),typeof h=="function"){var m;(m=r.get(d))==null||m.push(h),l[d]=function(){for(var b,y=arguments.length,k=new Array(y),S=0;S<y;S++)k[S]=arguments[S];return(b=r.get(d))==null?void 0:b.map(C=>C(...k)).find(C=>C!==void 0)}}}else l[d]=h}),l),{})}}function NN(e){e===void 0&&(e=[]);const t=e.map(c=>c?.reference),n=e.map(c=>c?.floating),r=e.map(c=>c?.item),s=v.useCallback(c=>Gb(c,e,"reference"),t),a=v.useCallback(c=>Gb(c,e,"floating"),n),l=v.useCallback(c=>Gb(c,e,"item"),r);return v.useMemo(()=>({getReferenceProps:s,getFloatingProps:a,getItemProps:l}),[s,a,l])}const v9="Escape";function Gh(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Bd(e,t){return Gh(t,e===xN||e===qh,e===ef||e===tf)}function Wb(e,t,n){return Gh(t,e===qh,n?e===ef:e===tf)||e==="Enter"||e===" "||e===""}function tT(e,t,n){return Gh(t,n?e===ef:e===tf,e===qh)}function nT(e,t,n,r){const s=n?e===tf:e===ef,a=e===xN;return t==="both"||t==="horizontal"&&r&&r>1?e===v9:Gh(t,s,a)}function ON(e,t){const{open:n,onOpenChange:r,elements:s,floatingId:a}=e,{listRef:l,activeIndex:c,onNavigate:f=()=>{},enabled:d=!0,selectedIndex:h=null,allowEscape:m=!1,loop:b=!1,nested:y=!1,rtl:k=!1,virtual:S=!1,focusItemOnOpen:C="auto",focusItemOnHover:E=!0,openOnArrowKeyDown:T=!0,disabledIndices:R=void 0,orientation:_="vertical",parentOrientation:D,cols:A=1,scrollItemIntoView:I=!0,virtualItemRef:P,itemSizes:$,dense:O=!1}=t,Y=Yp(s.floating),U=er(Y),B=Ao(),j=No();mn(()=>{e.dataRef.current.orientation=_},[e,_]);const q=Pn(()=>{f(F.current===-1?null:F.current)}),H=Ky(s.domReference),W=v.useRef(C),F=v.useRef(h??-1),K=v.useRef(null),N=v.useRef(!0),z=v.useRef(q),V=v.useRef(!!s.floating),L=v.useRef(n),Z=v.useRef(!1),re=v.useRef(!1),ie=er(R),ae=er(n),le=er(I),ce=er(h),[Ee,be]=v.useState(),[ue,ge]=v.useState(),Se=Pn(()=>{function ye(Q){if(S){var ne;(ne=Q.id)!=null&&ne.endsWith("-fui-option")&&(Q.id=a+"-"+Math.random().toString(16).slice(2,10)),be(Q.id),j?.events.emit("virtualfocus",Q),P&&(P.current=Q)}else ea(Q,{sync:Z.current,preventScroll:!0})}const _e=l.current[F.current],ee=re.current;_e&&ye(_e),(Z.current?Q=>Q():requestAnimationFrame)(()=>{const Q=l.current[F.current]||_e;if(!Q)return;_e||ye(Q);const ne=le.current;ne&&ke&&(ee||!N.current)&&(Q.scrollIntoView==null||Q.scrollIntoView(typeof ne=="boolean"?{block:"nearest",inline:"nearest"}:ne))})});mn(()=>{d&&(n&&s.floating?W.current&&h!=null&&(re.current=!0,F.current=h,q()):V.current&&(F.current=-1,z.current()))},[d,n,s.floating,h,q]),mn(()=>{if(d&&n&&s.floating)if(c==null){if(Z.current=!1,ce.current!=null)return;if(V.current&&(F.current=-1,Se()),(!L.current||!V.current)&&W.current&&(K.current!=null||W.current===!0&&K.current==null)){let ye=0;const _e=()=>{l.current[0]==null?(ye<2&&(ye?requestAnimationFrame:queueMicrotask)(_e),ye++):(F.current=K.current==null||Wb(K.current,_,k)||y?Fb(l,ie.current):PE(l,ie.current),K.current=null,q())};_e()}}else gc(l,c)||(F.current=c,Se(),re.current=!1)},[d,n,s.floating,c,ce,y,l,_,k,q,Se,ie]),mn(()=>{var ye;if(!d||s.floating||!j||S||!V.current)return;const _e=j.nodesRef.current,ee=(ye=_e.find(ne=>ne.id===B))==null||(ye=ye.context)==null?void 0:ye.elements.floating,fe=po(hr(s.floating)),Q=_e.some(ne=>ne.context&&xr(ne.context.elements.floating,fe));ee&&!Q&&N.current&&ee.focus({preventScroll:!0})},[d,s.floating,j,B,S]),mn(()=>{if(!d||!j||!S||B)return;function ye(_e){ge(_e.id),P&&(P.current=_e)}return j.events.on("virtualfocus",ye),()=>{j.events.off("virtualfocus",ye)}},[d,j,S,B,P]),mn(()=>{z.current=q,L.current=n,V.current=!!s.floating}),mn(()=>{n||(K.current=null,W.current=C)},[n,C]);const Ae=c!=null,ke=v.useMemo(()=>{function ye(ee){if(!ae.current)return;const fe=l.current.indexOf(ee);fe!==-1&&F.current!==fe&&(F.current=fe,q())}return{onFocus(ee){let{currentTarget:fe}=ee;Z.current=!0,ye(fe)},onClick:ee=>{let{currentTarget:fe}=ee;return fe.focus({preventScroll:!0})},onMouseMove(ee){let{currentTarget:fe}=ee;Z.current=!0,re.current=!1,E&&ye(fe)},onPointerLeave(ee){let{pointerType:fe}=ee;if(!(!N.current||fe==="touch")&&(Z.current=!0,!!E&&(F.current=-1,q(),!S))){var Q;(Q=U.current)==null||Q.focus({preventScroll:!0})}}}},[ae,U,E,l,q,S]),xe=v.useCallback(()=>{var ye;return D??(j==null||(ye=j.nodesRef.current.find(_e=>_e.id===B))==null||(ye=ye.context)==null||(ye=ye.dataRef)==null?void 0:ye.current.orientation)},[B,j,D]),Ce=Pn(ye=>{if(N.current=!1,Z.current=!0,ye.which===229||!ae.current&&ye.currentTarget===U.current)return;if(y&&nT(ye.key,_,k,A)){Bd(ye.key,xe())||ar(ye),r(!1,ye.nativeEvent,"list-navigation"),Ft(s.domReference)&&(S?j?.events.emit("virtualfocus",s.domReference):s.domReference.focus());return}const _e=F.current,ee=Fb(l,R),fe=PE(l,R);if(H||(ye.key==="Home"&&(ar(ye),F.current=ee,q()),ye.key==="End"&&(ar(ye),F.current=fe,q())),A>1){const Q=$||Array.from({length:l.current.length},()=>({width:1,height:1})),ne=KB(Q,A,O),we=ne.findIndex(Ze=>Ze!=null&&!kp(l,Ze,R)),Pe=ne.reduce((Ze,bt,Je)=>bt!=null&&!kp(l,bt,R)?Je:Ze,-1),Ye=ne[WB({current:ne.map(Ze=>Ze!=null?l.current[Ze]:null)},{event:ye,orientation:_,loop:b,rtl:k,cols:A,disabledIndices:XB([...(typeof R!="function"?R:null)||l.current.map((Ze,bt)=>kp(l,bt,R)?bt:void 0),void 0],ne),minIndex:we,maxIndex:Pe,prevIndex:YB(F.current>fe?ee:F.current,Q,ne,A,ye.key===qh?"bl":ye.key===(k?ef:tf)?"tr":"tl"),stopEvent:!0})];if(Ye!=null&&(F.current=Ye,q()),_==="both")return}if(Bd(ye.key,_)){if(ar(ye),n&&!S&&po(ye.currentTarget.ownerDocument)===ye.currentTarget){F.current=Wb(ye.key,_,k)?ee:fe,q();return}Wb(ye.key,_,k)?b?F.current=_e>=fe?m&&_e!==l.current.length?-1:ee:dr(l,{startingIndex:_e,disabledIndices:R}):F.current=Math.min(fe,dr(l,{startingIndex:_e,disabledIndices:R})):b?F.current=_e<=ee?m&&_e!==-1?l.current.length:fe:dr(l,{startingIndex:_e,decrement:!0,disabledIndices:R}):F.current=Math.max(ee,dr(l,{startingIndex:_e,decrement:!0,disabledIndices:R})),gc(l,F.current)&&(F.current=-1),q()}}),Me=v.useMemo(()=>S&&n&&Ae&&{"aria-activedescendant":ue||Ee},[S,n,Ae,ue,Ee]),ze=v.useMemo(()=>({"aria-orientation":_==="both"?void 0:_,...H?{}:Me,onKeyDown:Ce,onPointerMove(){N.current=!0}}),[Me,Ce,_,H]),Fe=v.useMemo(()=>{function ye(ee){C==="auto"&&pN(ee.nativeEvent)&&(W.current=!0)}function _e(ee){W.current=C,C==="auto"&&hN(ee.nativeEvent)&&(W.current=!0)}return{...Me,onKeyDown(ee){N.current=!1;const fe=ee.key.startsWith("Arrow"),Q=["Home","End"].includes(ee.key),ne=fe||Q,we=tT(ee.key,_,k),Pe=nT(ee.key,_,k,A),Ye=tT(ee.key,xe(),k),Ze=Bd(ee.key,_),bt=(y?Ye:Ze)||ee.key==="Enter"||ee.key.trim()==="";if(S&&n){const nt=j?.nodesRef.current.find(ct=>ct.parentId==null),rt=j&&nt?BB(j.nodesRef.current,nt.id):null;if(ne&&rt&&P){const ct=new KeyboardEvent("keydown",{key:ee.key,bubbles:!0});if(we||Pe){var Je,vt;const it=((Je=rt.context)==null?void 0:Je.elements.domReference)===ee.currentTarget,ft=Pe&&!it?(vt=rt.context)==null?void 0:vt.elements.domReference:we?l.current.find(Lt=>Lt?.id===Ee):null;ft&&(ar(ee),ft.dispatchEvent(ct),ge(void 0))}if((Ze||Q)&&rt.context&&rt.context.open&&rt.parentId&&ee.currentTarget!==rt.context.elements.domReference){var kt;ar(ee),(kt=rt.context.elements.domReference)==null||kt.dispatchEvent(ct);return}}return Ce(ee)}if(!(!n&&!T&&fe)){if(bt){const nt=Bd(ee.key,xe());K.current=y&&nt?null:ee.key}if(y){Ye&&(ar(ee),n?(F.current=Fb(l,ie.current),q()):r(!0,ee.nativeEvent,"list-navigation"));return}Ze&&(h!=null&&(F.current=h),ar(ee),!n&&T?r(!0,ee.nativeEvent,"list-navigation"):Ce(ee),n&&q())}},onFocus(){n&&!S&&(F.current=-1,q())},onPointerDown:_e,onPointerEnter:_e,onMouseDown:ye,onClick:ye}},[Ee,Me,A,Ce,ie,C,l,y,q,r,n,T,_,xe,k,h,j,S,P]);return v.useMemo(()=>d?{reference:Fe,floating:ze,item:ke}:{},[d,Fe,ze,ke])}const x9=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function IN(e,t){var n,r;t===void 0&&(t={});const{open:s,elements:a,floatingId:l}=e,{enabled:c=!0,role:f="dialog"}=t,d=Hh(),h=((n=a.domReference)==null?void 0:n.id)||d,m=v.useMemo(()=>{var T;return((T=Yp(a.floating))==null?void 0:T.id)||l},[a.floating,l]),b=(r=x9.get(f))!=null?r:f,k=Ao()!=null,S=v.useMemo(()=>b==="tooltip"||f==="label"?{["aria-"+(f==="label"?"labelledby":"describedby")]:s?m:void 0}:{"aria-expanded":s?"true":"false","aria-haspopup":b==="alertdialog"?"dialog":b,"aria-controls":s?m:void 0,...b==="listbox"&&{role:"combobox"},...b==="menu"&&{id:h},...b==="menu"&&k&&{role:"menuitem"},...f==="select"&&{"aria-autocomplete":"none"},...f==="combobox"&&{"aria-autocomplete":"list"}},[b,m,k,s,h,f]),C=v.useMemo(()=>{const T={id:m,...b&&{role:b}};return b==="tooltip"||f==="label"?T:{...T,...b==="menu"&&{"aria-labelledby":h}}},[b,m,h,f]),E=v.useCallback(T=>{let{active:R,selected:_}=T;const D={role:"option",...R&&{id:m+"-fui-option"}};switch(f){case"select":case"combobox":return{...D,"aria-selected":_}}return{}},[m,f]);return v.useMemo(()=>c?{reference:S,floating:C,item:E}:{},[c,S,C,E])}const rT=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(t,n)=>(n?"-":"")+t.toLowerCase());function sl(e,t){return typeof e=="function"?e(t):e}function k9(e,t){const[n,r]=v.useState(e);return e&&!n&&r(!0),v.useEffect(()=>{if(!e&&n){const s=setTimeout(()=>r(!1),t);return()=>clearTimeout(s)}},[e,n,t]),n}function S9(e,t){t===void 0&&(t={});const{open:n,elements:{floating:r}}=e,{duration:s=250}=t,l=(typeof s=="number"?s:s.close)||0,[c,f]=v.useState("unmounted"),d=k9(n,l);return!d&&c==="close"&&f("unmounted"),mn(()=>{if(r){if(n){f("initial");const h=requestAnimationFrame(()=>{Di.flushSync(()=>{f("open")})});return()=>{cancelAnimationFrame(h)}}f("close")}},[n,r]),{isMounted:d,status:c}}function MN(e,t){t===void 0&&(t={});const{initial:n={opacity:0},open:r,close:s,common:a,duration:l=250}=t,c=e.placement,f=c.split("-")[0],d=v.useMemo(()=>({side:f,placement:c}),[f,c]),h=typeof l=="number",m=(h?l:l.open)||0,b=(h?l:l.close)||0,[y,k]=v.useState(()=>({...sl(a,d),...sl(n,d)})),{isMounted:S,status:C}=S9(e,{duration:l}),E=er(n),T=er(r),R=er(s),_=er(a);return mn(()=>{const D=sl(E.current,d),A=sl(R.current,d),I=sl(_.current,d),P=sl(T.current,d)||Object.keys(D).reduce(($,O)=>($[O]="",$),{});if(C==="initial"&&k($=>({transitionProperty:$.transitionProperty,...I,...D})),C==="open"&&k({transitionProperty:Object.keys(P).map(rT).join(","),transitionDuration:m+"ms",...I,...P}),C==="close"){const $=A||D;k({transitionProperty:Object.keys($).map(rT).join(","),transitionDuration:b+"ms",...I,...$})}},[b,R,E,T,_,m,C,d]),{isMounted:S,styles:y}}function DN(e,t){var n;const{open:r,dataRef:s}=e,{listRef:a,activeIndex:l,onMatch:c,onTypingChange:f,enabled:d=!0,findMatch:h=null,resetMs:m=750,ignoreKeys:b=[],selectedIndex:y=null}=t,k=v.useRef(-1),S=v.useRef(""),C=v.useRef((n=y??l)!=null?n:-1),E=v.useRef(null),T=Pn(c),R=Pn(f),_=er(h),D=er(b);mn(()=>{r&&(fr(k),E.current=null,S.current="")},[r]),mn(()=>{if(r&&S.current===""){var O;C.current=(O=y??l)!=null?O:-1}},[r,y,l]);const A=Pn(O=>{O?s.current.typing||(s.current.typing=O,R(O)):s.current.typing&&(s.current.typing=O,R(O))}),I=Pn(O=>{function Y(H,W,F){const K=_.current?_.current(W,F):W.find(N=>N?.toLocaleLowerCase().indexOf(F.toLocaleLowerCase())===0);return K?H.indexOf(K):-1}const U=a.current;if(S.current.length>0&&S.current[0]!==" "&&(Y(U,U,S.current)===-1?A(!1):O.key===" "&&ar(O)),U==null||D.current.includes(O.key)||O.key.length!==1||O.ctrlKey||O.metaKey||O.altKey)return;r&&O.key!==" "&&(ar(O),A(!0)),U.every(H=>{var W,F;return H?((W=H[0])==null?void 0:W.toLocaleLowerCase())!==((F=H[1])==null?void 0:F.toLocaleLowerCase()):!0})&&S.current===O.key&&(S.current="",C.current=E.current),S.current+=O.key,fr(k),k.current=window.setTimeout(()=>{S.current="",C.current=E.current,A(!1)},m);const j=C.current,q=Y(U,[...U.slice((j||0)+1),...U.slice(0,(j||0)+1)],S.current);q!==-1?(T(q),E.current=q):O.key!==" "&&(S.current="",A(!1))}),P=v.useMemo(()=>({onKeyDown:I}),[I]),$=v.useMemo(()=>({onKeyDown:I,onKeyUp(O){O.key===" "&&A(!1)}}),[I,A]);return v.useMemo(()=>d?{reference:P,floating:$}:{},[d,P,$])}function LN(e,t,n){return n===void 0&&(n=!0),e.filter(s=>{var a;return s.parentId===t&&(!n||((a=s.context)==null?void 0:a.open))}).flatMap(s=>[s,...LN(e,s.id,n)])}function iT(e,t){const[n,r]=e;let s=!1;const a=t.length;for(let l=0,c=a-1;l<a;c=l++){const[f,d]=t[l]||[0,0],[h,m]=t[c]||[0,0];d>=r!=m>=r&&n<=(h-f)*(r-d)/(m-d)+f&&(s=!s)}return s}function w9(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function jN(e){e===void 0&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,s={current:-1};let a=!1,l=null,c=null,f=typeof performance<"u"?performance.now():0;function d(m,b){const y=performance.now(),k=y-f;if(l===null||c===null||k===0)return l=m,c=b,f=y,null;const S=m-l,C=b-c,T=Math.sqrt(S*S+C*C)/k;return l=m,c=b,f=y,T}const h=m=>{let{x:b,y,placement:k,elements:S,onClose:C,nodeId:E,tree:T}=m;return function(_){function D(){fr(s),C()}if(fr(s),!S.domReference||!S.floating||k==null||b==null||y==null)return;const{clientX:A,clientY:I}=_,P=[A,I],$=s9(_),O=_.type==="mouseleave",Y=Hb(S.floating,$),U=Hb(S.domReference,$),B=S.domReference.getBoundingClientRect(),j=S.floating.getBoundingClientRect(),q=k.split("-")[0],H=b>j.right-j.width/2,W=y>j.bottom-j.height/2,F=w9(P,B),K=j.width>B.width,N=j.height>B.height,z=(K?B:j).left,V=(K?B:j).right,L=(N?B:j).top,Z=(N?B:j).bottom;if(Y&&(a=!0,!O))return;if(U&&(a=!1),U&&!O){a=!0;return}if(O&&gt(_.relatedTarget)&&Hb(S.floating,_.relatedTarget)||T&&LN(T.nodesRef.current,E).length)return;if(q==="top"&&y>=B.bottom-1||q==="bottom"&&y<=B.top+1||q==="left"&&b>=B.right-1||q==="right"&&b<=B.left+1)return D();let re=[];switch(q){case"top":re=[[z,B.top+1],[z,j.bottom-1],[V,j.bottom-1],[V,B.top+1]];break;case"bottom":re=[[z,j.top+1],[z,B.bottom-1],[V,B.bottom-1],[V,j.top+1]];break;case"left":re=[[j.right-1,Z],[j.right-1,L],[B.left+1,L],[B.left+1,Z]];break;case"right":re=[[B.right-1,Z],[B.right-1,L],[j.left+1,L],[j.left+1,Z]];break}function ie(ae){let[le,ce]=ae;switch(q){case"top":{const Ee=[K?le+t/2:H?le+t*4:le-t*4,ce+t+1],be=[K?le-t/2:H?le+t*4:le-t*4,ce+t+1],ue=[[j.left,H||K?j.bottom-t:j.top],[j.right,H?K?j.bottom-t:j.top:j.bottom-t]];return[Ee,be,...ue]}case"bottom":{const Ee=[K?le+t/2:H?le+t*4:le-t*4,ce-t],be=[K?le-t/2:H?le+t*4:le-t*4,ce-t],ue=[[j.left,H||K?j.top+t:j.bottom],[j.right,H?K?j.top+t:j.bottom:j.top+t]];return[Ee,be,...ue]}case"left":{const Ee=[le+t+1,N?ce+t/2:W?ce+t*4:ce-t*4],be=[le+t+1,N?ce-t/2:W?ce+t*4:ce-t*4];return[...[[W||N?j.right-t:j.left,j.top],[W?N?j.right-t:j.left:j.right-t,j.bottom]],Ee,be]}case"right":{const Ee=[le-t,N?ce+t/2:W?ce+t*4:ce-t*4],be=[le-t,N?ce-t/2:W?ce+t*4:ce-t*4],ue=[[W||N?j.left+t:j.right,j.top],[W?N?j.left+t:j.right:j.left+t,j.bottom]];return[Ee,be,...ue]}}}if(!iT([A,I],re)){if(a&&!F)return D();if(!O&&r){const ae=d(_.clientX,_.clientY);if(ae!==null&&ae<.1)return D()}iT([A,I],ie([b,y]))?!a&&r&&(s.current=window.setTimeout(D,40)):D()}}};return h.__options={blockPointerEvents:n},h}function zN(e){return gn(e.defaultTagName??"div",e,e)}const E9=v.createContext(void 0);function T9(){return v.useContext(E9)}const Kb={base:{kVAEAm:"ui-10l6tqk",krVfgx:"ui-r0fw0u",kCIrl2:"ui-7zl9wm",kzqmXN:"ui-jwey39",kZKoxP:"ui-wbbb81",kaIpWk:"ui-16rqkct",kfzvcC:"ui-47corl",$$css:!0},colorBlue:{kWkggS:"ui-1b558e3",$$css:!0},colorGreen:{kWkggS:"ui-15xcjd2",$$css:!0}};function C9(e){return[Kb.base,e==="green"?Kb.colorGreen:Kb.colorBlue]}function R9({color:e="blue",className:t}){const n=Yt({rootClass:"ui-indicator-dot",stylexStyles:C9(e),className:t});return g.jsx("span",{"aria-hidden":!0,className:n.className,"data-color":e,style:n.style})}const _9={root:{kysU6D:"ui-jyslct",k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kmuXW:"ui-2lah0s",kB7OPa:"ui-9f619",kLKAdn:"ui-exx8yu",kwRFfy:"ui-yri2b",kGO01o:"ui-18d9i69",kZCmMZ:"ui-1c1uobl",keoZOQ:"ui-dj266r",k71WvV:"ui-14z9mp",k1K539:"ui-at24cr",keTefX:"ui-1lziwak",kMzoRj:"ui-c342km",ksu8eU:"ui-ng3xce",kMv6JI:"ui-jb2p0i",kGuDYH:"ui-1qlqyl8",k63SB2:"ui-1pd3egz",kLWn49:"ui-15bjb6t",kkrTdU:"ui-1ypdohk ui-1j1ks5o",kSiTet:null,kfzvcC:"ui-67bb7w ui-7gqb9v",kVAEAm:"ui-1fxuinm",$$css:!0}},Fd={sm:{kzqmXN:"ui-16bvwqk",$$css:!0},md:{kzqmXN:"ui-1eu7oa3",$$css:!0},lg:{kzqmXN:"ui-jst10v",$$css:!0},xl:{kzqmXN:"ui-mjrt60",$$css:!0}},A9={rounded:{kaIpWk:"ui-1i4c3av",$$css:!0}},N9={sm:{keoZOQ:"ui-vqhhvk",k71WvV:"ui-1bk7dnq",k1K539:"ui-1dy9ubm",keTefX:"ui-1fesk1l",$$css:!0},md:{keoZOQ:"ui-kv60qn",k71WvV:"ui-xku7nj",k1K539:"ui-1hi8m59",keTefX:"ui-13srazm",$$css:!0},lg:{keoZOQ:"ui-4xtw7q",k71WvV:"ui-7quaee",k1K539:"ui-eci9o5",keTefX:"ui-1na8g2l",$$css:!0},xl:{keoZOQ:"ui-1fm9hdn",k71WvV:"ui-tyhy2u",k1K539:"ui-foffu7",keTefX:"ui-1tnioq7",$$css:!0}},Ud={root:[_9.root,IA.root],size:{sm:[Vi.sm,Es.sm,Fd.sm],md:[Vi.md,Es.md,Fd.md],lg:[Vi.lg,Es.lg,Fd.lg],xl:[Vi.xl,Es.xl,Fd.xl]},contentFrame:N9,rounded:A9.rounded},O9="md",I9="ghost",M9={root:{k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kzqmXN:"ui-1oai4fc",kZKoxP:"ui-higkf7",kGuDYH:"ui-1tachi3",kLWn49:"ui-o5v014",$$css:!0}};function PN(e){if(e!==void 0&&px(e))return zt(M9.root,SA(e));const t={className:"ui-3nfvp2 ui-6s0dn4 ui-l56j7k ui-1oai4fc ui-higkf7 ui-1tachi3 ui-o5v014"};return e===void 0?t:{...t,style:{...t.style,"--icon-size":typeof e=="number"?`${e}px`:e}}}function D9({variant:e,rounded:t,frame:n,size:r,tone:s,indicatorDot:a}){return{"data-variant":e,"data-rounded":t||void 0,"data-frame":n,"data-size":r,"data-tone":s,"data-fg-channel":"icon","data-indicator-dot":a||void 0}}function $N({enforcedRootStyle:e,frame:t,indicatorDot:n,rootStyle:r,rounded:s,size:a,tone:l,variant:c}){const f=mx(c,l);return{dataAttrs:D9({frame:t,indicatorDot:n,rounded:s,size:a,tone:l,variant:c}),rootAttrs:zt(Ud.root,_i.appearance,f.applyControlTone&&gx.foreground,f.applyControlTone&&l!==void 0&&CA[l],c==="ghost"&&(l==="secondary"||l==="tertiary")&&r6[l],f.applyFilledColors&&_i.colors,f.applyNonFilledBackground&&la.background,(c==="outline"||c==="ghost")&&qp(l)&&RA[l],c==="outline"&&la.outline,c==="outline"&&qp(l)&&_A[l],c==="media"&&_i.media,_i.press,a!=="xs"&&Ud.size[a],s&&Ud.rounded,t==="content"&&a!=="xs"&&Ud.contentFrame[a],e,r)}}function BN({size:e,iconSize:t,disabled:n,variant:r,tone:s,enforced:a}){const l=e??a?.iconButtonSize??O9,c=r??a?.iconButtonVariant??I9,f=l==="xs"?void 0:AA[l];return{size:l,innerIconSize:t??a?.iconButtonIconSize??f,disabled:n??a?.disabled,variant:c,tone:EA(s??a?.iconButtonTone??(c==="primary"?TA:void 0))}}function br({icon:e,iconVariant:t="outline",variant:n,rounded:r,frame:s="container",size:a,iconSize:l,tone:c,className:f,style:d,rootStyle:h,iconStyle:m,disabled:b,indicatorDot:y=!1,indicatorDotColor:k="blue","aria-label":S,"aria-labelledby":C,...E}){const T=ba(),{size:R,innerIconSize:_,disabled:D,variant:A,tone:I}=BN({disabled:b,enforced:T,iconSize:l,size:a,tone:c,variant:n}),P=$N({enforcedRootStyle:T?.iconButtonRootStyle,frame:s,indicatorDot:y,rootStyle:h,rounded:r,size:R,tone:I,variant:A});return g.jsxs(hx,{...E,className:sn("ui-icon-button",P.rootAttrs.className,f),style:{...P.rootAttrs.style,...d},...P.dataAttrs,disabled:D,"aria-label":S,"aria-labelledby":C,children:[typeof e=="string"?g.jsx(qt,{name:e,rootStyle:[T?.iconButtonIconStyle,m],variant:t,size:_,"aria-hidden":"true"}):g.jsx("span",{...PN(_),"aria-hidden":"true",children:e}),y?g.jsx(R9,{color:k}):null]})}function L9(){return typeof navigator<"u"&&/Mac|iPod|iPhone|iPad/.test(navigator.platform)}function Ix(e){if(!(L9()?e.metaKey:e.ctrlKey)||e.shiftKey||e.altKey)return!1;switch(e.key.toLowerCase()){case"a":return e.preventDefault(),e.nativeEvent.stopImmediatePropagation(),e.currentTarget.select(),!0;case"c":case"v":case"x":case"z":return e.nativeEvent.stopImmediatePropagation(),!0;default:return!1}}const qd={base:{kMeerF:"ui-1k57tk5",k3XXqK:"ui-1t137rt",kInvED:"ui-1wfwxd8",kjBf7l:"ui-1uczgqu",kUk6DE:"ui-98rzlu",k7Eaqz:"ui-euugli",kEafiO:"ui-972fbf",kPef9Z:"ui-1ejq31n",ke9TFa:"ui-10w94by",k8ry5P:"ui-18oe1m7",kt9PQ7:"ui-1qhh985",kfdmCh:"ui-1sy0etr",k2ei4v:"ui-14e42zd",kVhnKS:"ui-stzfhl",kWkggS:"ui-jbqb8w",kMwMTN:"ui-1wd3ewq",kMv6JI:"ui-jb2p0i",kGuDYH:"ui-11wthnw",kLWn49:"ui-1ja60sm",kb6lSQ:"ui-12oo3zp",k8Qsv1:"ui-19ovir5",$$css:!0},disabled:{kkrTdU:"ui-1h6gzvc",k8Qsv1:"ui-ompknl",$$css:!0},mono:{kMv6JI:"ui-ul7cyv",$$css:!0},monoInput:{kGuDYH:"ui-pr5cyi",$$css:!0}};function j9({className:e,disabled:t=!1,mono:n=!1,ref:r,rootStyle:s,style:a,onKeyDown:l,...c}){const f=Yt({rootClass:"ui-input-group__input",stylexStyles:[qd.base,t?qd.disabled:null,n?qd.mono:null,n?qd.monoInput:null,s],className:e,style:a}),d=v.useCallback(h=>{l?.(h),!h.defaultPrevented&&Ix(h)},[l]);return g.jsx("input",{ref:r,className:f.className,style:f.style,disabled:t,onKeyDown:d,...c})}const Er={base:{"--ui-input-group-border-width":"ui-1cx02xk","--ui-input-group-padding-block":"ui-1we15r7","--ui-input-group-padding-inline":"ui-vnd6s4","--input-group-button-inset":"ui-1c59nzh","--ui-input-group-stroke-rest":"ui-ja7v4d",k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kB7OPa:"ui-9f619",kzqmXN:"ui-h8yej3",kEafiO:"ui-178xt8z",kPef9Z:"ui-13fuv20",kLZC3w:"ui-or0oem ui-9afaxg ui-4vz0kq",ke9TFa:"ui-1lun4ml",k8ry5P:"ui-18b5jzi",kBCPoo:"ui-2an0dy ui-jsivns ui-1n6ytmu",kt9PQ7:"ui-so031l",kfdmCh:"ui-1q0q8m5",kL6WhQ:"ui-snjbj6 ui-illscj ui-1rfq9xa",k2ei4v:"ui-pilrb4",kVhnKS:"ui-1t7ytsu",kGJrpR:"ui-iui3t5 ui-16dcxar ui-ghzbfo",kaIpWk:"ui-1043rbw",kLKAdn:"ui-e8kt42",kwRFfy:"ui-n29lvp",kGO01o:"ui-1ftrzfz",kZCmMZ:"ui-1ecvjd7",kWkggS:"ui-1gwrjia",k1ekBW:"ui-1oy24xj",kIyJzY:"ui-g3p6pi ui-sagj69",kAMwcw:"ui-6ekqhr",khiITx:"ui-vmahel",kTUp5R:"ui-lh3980",$$css:!0},disabled:{kLZC3w:"ui-1aeic0j",kBCPoo:"ui-5q6521",kL6WhQ:"ui-17fyfba",kGJrpR:"ui-4n2izg",kkrTdU:"ui-1h6gzvc",kSiTet:"ui-byyjgo",$$css:!0},sizeMd:{"--ui-input-group-padding-block":"ui-174jhef","--ui-input-group-padding-inline":"ui-xlcw59","--input-group-button-inset":"ui-1ethuh",kZKoxP:"ui-1e94bgo",kOIVth:"ui-11twubx",$$css:!0},sizeLg:{"--ui-input-group-padding-block":"ui-174jhef","--ui-input-group-padding-inline":"ui-cby3z1","--input-group-button-inset":"ui-1u9w55t",kZKoxP:"ui-170hpbr",kOIVth:"ui-pkkfsy",$$css:!0},sizeXl:{"--ui-input-group-padding-block":"ui-17wxzvn","--ui-input-group-padding-inline":"ui-cby3z1","--input-group-button-inset":"ui-1ethuh",kOIVth:"ui-ehausa",$$css:!0},layoutTextarea:{kGNEyG:"ui-1cy8zhl",kZKoxP:"ui-t7dq6l",kAzted:"ui-16ry4p3",$$css:!0},layoutTextareaMd:{kAzted:"ui-t6xkjb",$$css:!0},layoutTextareaLg:{kAzted:"ui-16ry4p3",$$css:!0},frameContent:{kzqmXN:"ui-q8za26",kqGvvJ:"ui-1k4kybs",kUOVxO:"ui-d1nd0v",$$css:!0},variantDefault:{"--ui-input-group-stroke-rest":"ui-l27skc",$$css:!0},variantElevated:{kWkggS:"ui-f1vpex",$$css:!0},variantGhost:{kWkggS:"ui-jbqb8w ui-qjnua1 ui-aig341",kLZC3w:"ui-1v8p93f",kBCPoo:"ui-1o3jo1z",kL6WhQ:"ui-16stqrj",kGJrpR:"ui-v5lvn5",$$css:!0},variantUnfilled:{"--ui-input-group-border-width":"ui-qkl0tc","--ui-input-group-padding-block":"ui-1we15r7","--ui-input-group-padding-inline":"ui-vnd6s4",kWkggS:"ui-jbqb8w",kEafiO:"ui-972fbf",kPef9Z:"ui-1ejq31n",kLZC3w:"ui-1b4hy2t",ke9TFa:"ui-10w94by",k8ry5P:"ui-18oe1m7",kBCPoo:"ui-1273586",kt9PQ7:"ui-1qhh985",kfdmCh:"ui-1sy0etr",kL6WhQ:"ui-1tnzt7h",k2ei4v:"ui-14e42zd",kVhnKS:"ui-stzfhl",kGJrpR:"ui-1mi4oqr",kOIVth:"ui-137clkk",kGVxlE:"ui-1gnnqk1 ui-15ysqaf",$$css:!0},variantUnfilledSize:{kZKoxP:"ui-t7dq6l",$$css:!0},shapePill:{kaIpWk:"ui-1i4c3av",$$css:!0}},Zo={field:{kMeerF:"ui-1k57tk5",k3XXqK:"ui-1t137rt",kInvED:"ui-1wfwxd8",kjBf7l:"ui-1uczgqu",kUk6DE:"ui-98rzlu",k7Eaqz:"ui-euugli",kEafiO:"ui-972fbf",kPef9Z:"ui-1ejq31n",ke9TFa:"ui-10w94by",k8ry5P:"ui-18oe1m7",kt9PQ7:"ui-1qhh985",kfdmCh:"ui-1sy0etr",k2ei4v:"ui-14e42zd",kVhnKS:"ui-stzfhl",kWkggS:"ui-jbqb8w",kMwMTN:"ui-1wd3ewq",kMv6JI:"ui-jb2p0i",kGuDYH:"ui-11wthnw",kLWn49:"ui-1ja60sm",kb6lSQ:"ui-12oo3zp",kAzted:"ui-10fesj9",kHenm0:"ui-tt52l0",kORKVm:"ui-10wlt62",k8Qsv1:"ui-19ovir5",$$css:!0},disabled:{kkrTdU:"ui-1h6gzvc",k8Qsv1:"ui-ompknl",$$css:!0},mono:{kMv6JI:"ui-ul7cyv",$$css:!0},autoSizeContent:{kOwNse:"ui-i3vqlg",kAzted:"ui-10fesj9 ui-1mcog50",kORKVm:"ui-10wlt62 ui-n0h0yx",$$css:!0},autoSizeContentMaxRows:{kskxy:"ui-17r4vdi",$$css:!0},autoSizeRows:(e,t)=>[{"--ui-input-group-textarea-min-rows":String(e)!=null?"ui-so4lmt":String(e),"--ui-input-group-textarea-max-rows":String(t)!=null?"ui-1554sew":String(t),$$css:!0},{"--x---ui-input-group-textarea-min-rows":String(e)!=null?String(e):void 0,"--x---ui-input-group-textarea-max-rows":String(t)!=null?String(t):void 0}],collapseBlur:{kskxy:"ui-1kxtfma ui-5u5ifr",kORKVm:"ui-10wlt62",$$css:!0}},Il={base:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kmuXW:"ui-2lah0s",kMwMTN:"ui-1mh7f6w",keTefX:"ui-1lziwak ui-dve3mh",k71WvV:"ui-14z9mp ui-rybaqh",$$css:!0},textareaLayout:{kAzted:"ui-1tn5z8q",$$css:!0}},sT={base:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kmuXW:"ui-2lah0s",kMwMTN:"ui-19aaqeu",kGuDYH:"ui-11wthnw",kLWn49:"ui-1ja60sm",kb6lSQ:"ui-12oo3zp",$$css:!0},mono:{kMv6JI:"ui-ul7cyv",$$css:!0}},z9={md:Er.sizeMd,lg:Er.sizeLg,xl:Er.sizeXl},P9={md:Er.layoutTextareaMd,lg:Er.layoutTextareaLg,xl:null},$9={container:null,content:Er.frameContent},B9={default:Er.variantDefault,elevated:Er.variantElevated,ghost:Er.variantGhost,unfilled:Er.variantUnfilled},F9={rounded:null,pill:Er.shapePill},FN=v.createContext(null);function xa(e){const t=v.useContext(FN);if(!t)throw new Error(`${e} must be used within InputGroup.Root`);return t}function U9(){return xa("InputGroup.useContext")}const q9={md:"sm",lg:"base",xl:"lg"},H9={md:"sm",lg:"sm",xl:"sm"},V9={md:"sm",lg:"sm",xl:"md"};function G9(){return typeof CSS<"u"&&typeof CSS.supports=="function"&&CSS.supports("field-sizing","content")}function oT({variant:e="default",frame:t="container",size:n="lg",shape:r="rounded",layout:s="default",mono:a=!1,disabled:l=!1,rootStyle:c,className:f,children:d}){const h=T9(),m=l||h?.disabled===!0,b=Yt({rootClass:"ui-input-group",stylexStyles:[Er.base,z9[n],s==="textarea"?Er.layoutTextarea:null,s==="textarea"?P9[n]:null,$9[t],B9[e],e==="unfilled"?Er.variantUnfilledSize:null,F9[r],m?Er.disabled:null,c],className:f});return g.jsx(FN.Provider,{value:{disabled:m,layout:s,mono:a},children:g.jsx(Ms,{iconSize:q9[n],iconButtonSize:H9[n],buttonSize:V9[n],disabled:m||void 0,children:g.jsx("div",{className:b.className,style:b.style,"data-variant":e,"data-frame":t,"data-size":n,"data-shape":r!=="rounded"?r:void 0,"data-layout":s==="textarea"?"textarea":void 0,"data-mono":a||void 0,"data-disabled":m||void 0,children:d})})})}function W9({className:e,disabled:t,ref:n,rootStyle:r,style:s,...a}){const l=xa("InputGroup.Input"),c=l.disabled||t===!0;return g.jsx(bB,{...a,className:e,disabled:c,ref:n,render:g.jsx(j9,{mono:l.mono,rootStyle:r}),style:s})}function K9({className:e,disabled:t,ref:n,rootStyle:r,style:s,onKeyDown:a,onInput:l,onFocus:c,onBlur:f,minRows:d=1,maxRows:h,autoResize:m=!0,collapseToSingleLineWhenBlurred:b=!1,rows:y,value:k,placeholder:S,focusedPlaceholder:C,...E}){const T=xa("InputGroup.Textarea"),R=T.disabled||t===!0,_=d<1?1:d,D=h===void 0?void 0:h<_?_:h,A=m&&!b,I=Math.min(Math.max(y??_,_),D??Number.POSITIVE_INFINITY),P=Yt({rootClass:"ui-input-group__textarea",stylexStyles:[Zo.field,R?Zo.disabled:null,T.mono?Zo.mono:null,b?Zo.collapseBlur:null,A?Zo.autoSizeContent:null,A&&D!==void 0?Zo.autoSizeContentMaxRows:null,A?Zo.autoSizeRows(I,D??I):null,r],className:e,style:s}),$=v.useRef(null),O=Jc([$,n]),[Y,U]=v.useState(!1),B=v.useCallback(()=>{if(!m)return;const N=$.current;if(!N||A&&N.style.height===""&&G9())return;if(D===_&&(y===void 0||y===_)){N.style.height="",N.style.overflowY="auto";return}N.style.height="auto";const z=window.getComputedStyle(N),V=Number.parseFloat(z.lineHeight),L=Number.parseFloat(z.paddingTop)||0,Z=Number.parseFloat(z.paddingBottom)||0,re=Number.parseFloat(z.borderTopWidth)||0,ie=Number.parseFloat(z.borderBottomWidth)||0,ae=L+Z+re+ie,le=Number.isFinite(V)&&V>0?ae+V*_:0,ce=D!==void 0&&Number.isFinite(V)&&V>0?ae+V*D:void 0,Ee=Math.max(N.scrollHeight,le),be=ce!==void 0?Math.min(Ee,ce):Ee;N.style.height=`${be}px`,N.style.overflowY=ce!==void 0&&N.scrollHeight>ce?"auto":"hidden"},[m,D,_,y,A]);v.useLayoutEffect(()=>{B()},[k,B]);const j=v.useCallback(N=>{a?.(N),!N.defaultPrevented&&Ix(N)},[a]),q=v.useCallback(N=>{l?.(N),N.defaultPrevented||B()},[l,B]),H=v.useCallback(N=>{U(!0),c?.(N)},[c]),W=v.useCallback(N=>{U(!1),f?.(N)},[f]),F=y??_,K=Y&&C!==void 0?C:S;return g.jsx("textarea",{ref:O,className:P.className,style:P.style,disabled:R,onKeyDown:j,rows:F,value:k,placeholder:K,...E,"data-textarea-collapse-blur":b?"":void 0,onInput:q,onFocus:H,onBlur:W})}function Y9({addonStyle:e,className:t,ref:n,...r}){const s=xa("InputGroup.Icon"),a=Yt({rootClass:"ui-input-group__addon",stylexStyles:[Il.base,s.layout==="textarea"?Il.textareaLayout:null,e],className:t});return g.jsx("span",{className:a.className,style:a.style,children:g.jsx(qt,{ref:n,...r})})}function X9({addonStyle:e,className:t,disabled:n,ref:r,...s}){const a=xa("InputGroup.IconButton"),l=a.disabled?!0:n,c=Yt({rootClass:"ui-input-group__addon",stylexStyles:[Il.base,a.layout==="textarea"?Il.textareaLayout:null,e],className:t});return g.jsx("span",{className:c.className,style:c.style,children:g.jsx(br,{ref:r,disabled:l,...s})})}function Z9({addonStyle:e,className:t,disabled:n,ref:r,...s}){const a=xa("InputGroup.Button"),l=a.disabled?!0:n,c=Yt({rootClass:"ui-input-group__addon",stylexStyles:[Il.base,a.layout==="textarea"?Il.textareaLayout:null,e],className:t});return g.jsx("span",{className:c.className,style:c.style,children:g.jsx(yn,{ref:r,disabled:l,...s})})}function Q9({className:e,children:t}){const n=xa("InputGroup.Span"),r=Yt({rootClass:"ui-input-group__span",stylexStyles:[sT.base,n.mono?sT.mono:null],className:e});return g.jsx("span",{className:r.className,style:r.style,children:t})}const Hd=Object.assign(oT,{Root:oT,Input:W9,Textarea:K9,Icon:Y9,IconButton:X9,Button:Z9,Span:Q9,useContext:U9}),J9=v.createContext(void 0);function e5(e){return v.useContext(J9)}function UN(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=o_(),{ref:s,index:a}=KA(e),l=n===a,c=v.useRef(null),f=xo(s,c);return{compositeProps:{tabIndex:l?0:-1,onFocus(){r(a)},onMouseMove(){const h=c.current;if(!t||!h)return;const m=h.hasAttribute("disabled")||h.ariaDisabled==="true";!l&&!m&&h.focus()}},compositeRef:f,index:a}}function t5(e){const{render:t,className:n,style:r,state:s=$n,props:a=ko,refs:l=ko,metadata:c,stateAttributesMapping:f,tag:d="div",...h}=e,{compositeProps:m,compositeRef:b}=UN({metadata:c});return gn(d,e,{state:s,ref:[...l,b],props:[m,...a,h],stateAttributesMapping:f})}function n5(e){const[t,n]=v.useState({current:e,previous:null});return e!==t.current&&n({current:e,previous:t.current}),t.previous}function aT(e){const t=Tr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Ft(e),a=s?e.offsetWidth:n,l=s?e.offsetHeight:r;return(Rl(n)!==a||Rl(r)!==l)&&(n=a,r=l),{width:n,height:r}}function qN(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}const HN=v.createContext(void 0);function nf(e){const t=v.useContext(HN);if(t===void 0&&!e)throw new Error(Nn(50));return t}const r5=600,VN=300,i5={...lA,instantType:tt(e=>e.instantType),hasViewport:tt(e=>e.hasViewport)};class Wh extends lx{constructor(t,n,r=!1){const s=new _h,a={...s5(),...t};a.floatingRootContext=oA(s,n,r),super(a,{popupRef:v.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:s,closeDelayRef:{current:VN},inlineRectCoordsRef:{current:void 0}},i5)}setOpen=(t,n)=>{const{inlineRectCoordsRef:r}=this.context;J_(this,t,n,{onBeforeDispatch(){const s=n.event;t&&n.reason===Sr&&n.trigger&&"clientX"in s&&"clientY"in s&&r.current?.element!==n.trigger&&G_(r,n.trigger,s.clientX,s.clientY)}})};static useStore(t,n){return Q_(t,(s,a)=>new Wh(n,s,a)).store}}function s5(){return{...sA(),instantType:void 0,hasViewport:!1}}function lT(e){const{open:t,defaultOpen:n=!1,onOpenChange:r,onOpenChangeComplete:s,actionsRef:a,handle:l,triggerId:c,defaultTriggerId:f=null,children:d}=e,h=Wh.useStore(l?.store,{open:n,openProp:t,activeTriggerId:f,triggerIdProp:c});eA(h,t,n,f),h.useControlledProp("openProp",t),h.useControlledProp("triggerIdProp",c),h.useContextCallback("onOpenChange",r),h.useContextCallback("onOpenChangeComplete",s);const m=h.useState("open"),b=h.useState("activeTriggerId"),y=h.useState("mounted"),k=h.useState("payload");nA(h,{closeOnActiveTriggerUnmount:!0});const{forceUnmount:S}=rA(m,h,()=>{h.context.inlineRectCoordsRef.current=void 0});Ve(()=>{m&&b==null&&h.set("payload",void 0)},[h,b,m]);const C=v.useCallback(()=>{h.setOpen(!1,Ct(_p))},[h]);v.useImperativeHandle(a,()=>({unmount:S,close:C}),[S,C]);const E=m||y;return g.jsxs(HN.Provider,{value:h,children:[E&&g.jsx(o5,{store:h}),typeof d=="function"?d({payload:k}):d]})}function o5({store:e}){const t=e.useState("floatingRootContext"),n=ex(t),r=n.reference??$n,s=n.trigger??$n,a=v.useMemo(()=>Wi(ux,n.floating),[n.floating]);return iA(e,{activeTriggerProps:r,inactiveTriggerProps:s,popupProps:a}),null}const GN=ax(function(t){return nf(!0)?g.jsx(lT,{...t}):g.jsx(wP,{children:g.jsx(lT,{...t})})}),WN=v.createContext(void 0);function a5(){const e=v.useContext(WN);if(e===void 0)throw new Error(Nn(48));return e}const KN=v.forwardRef(function(t,n){const{children:r,container:s,className:a,render:l,style:c,...f}=t,{portalNode:d,portalSubtree:h}=O_({container:s,ref:n,componentProps:t,elementProps:f});return!h&&!d?null:g.jsxs(v.Fragment,{children:[h,d&&Di.createPortal(r,d)]})}),YN=v.forwardRef(function(t,n){const{keepMounted:r=!1,...s}=t;return nf().useState("mounted")||r?g.jsx(WN.Provider,{value:r,children:g.jsx(KN,{ref:n,...s})}):null}),XN=Y_(function(t,n){const{render:r,className:s,delay:a,closeDelay:l,id:c,payload:f,handle:d,style:h,...m}=t,b=nf(!0),y=d?.store??b;if(!y)throw new Error(Nn(89));const k=Fl(c),S=y.useState("isTriggerActive",k),C=y.useState("isOpenedByTrigger",k),E=y.useState("floatingRootContext"),T=y.context.inlineRectCoordsRef,R=v.useRef(null),_=a??r5,D=l??VN,{registerTrigger:A,isMountedByThisTrigger:I}=tA(k,R,y,{payload:f});Ve(()=>{I&&(y.context.closeDelayRef.current=D)},[y,I,D]);const P=pA(E,{mouseOnly:!0,move:!1,handleClose:hA(),delay:()=>({open:_,close:D}),triggerElementRef:R,isActiveTrigger:S,isClosing:()=>y.select("transitionStatus")==="ending"}),$=cA(E,{delay:_}),O={open:C},Y=y.useState("triggerProps",I),U=y$(T,C);return gn("a",t,{state:O,ref:[n,A,R],props:[P,$.reference,Y,U,{id:k},m],stateAttributesMapping:r_})}),ZN=v.createContext(void 0);function l5(){const e=v.useContext(ZN);if(e===void 0)throw new Error(Nn(49));return e}const QN=v.forwardRef(function(t,n){const{render:r,className:s,anchor:a,positionMethod:l="absolute",side:c="bottom",align:f="center",sideOffset:d=0,alignOffset:h=0,collisionBoundary:m="clipping-ancestors",collisionPadding:b=5,arrowPadding:y=5,sticky:k=!1,disableAnchorTracking:S=!1,collisionAvoidance:C=__,style:E,...T}=t,R=nf(),_=a5(),D=kP(),A=R.useState("open"),I=R.useState("mounted"),P=R.useState("floatingRootContext"),$=R.useState("instantType"),O=R.useState("transitionStatus"),Y=R.useState("hasViewport"),U=R.context.inlineRectCoordsRef,B=Sx({anchor:a,floatingRootContext:P,positionMethod:l,mounted:I,side:c,sideOffset:d,align:f,alignOffset:h,arrowPadding:y,collisionBoundary:m,collisionPadding:b,sticky:k,disableAnchorTracking:S,keepMounted:_,nodeId:D,collisionAvoidance:C,adaptiveOrigin:Y?VA:void 0,inline:v$(U)}),j=B.update;Ve(()=>{A&&I&&j()},[A,I,j]);const q={open:A,side:B.side,align:B.align,anchorHidden:B.anchorHidden,instant:$},H=wx(t,q,{styles:B.positionerStyles,transitionStatus:O,props:T,refs:[n,R.useStateSetter("positionerElement")],hidden:!I,inert:!A});return g.jsx(ZN.Provider,{value:B,children:g.jsx(SP,{id:D,children:H})})}),u5={...Wc,...To},JN=v.forwardRef(function(t,n){const{className:r,render:s,style:a,...l}=t,c=nf(),{side:f,align:d}=l5(),h=c.useState("open"),m=c.useState("instantType"),b=c.useState("transitionStatus"),y=c.useState("popupProps"),k=c.useState("floatingRootContext");_o({open:h,ref:c.context.popupRef,onComplete(){h&&c.context.onOpenChangeComplete?.(!0)}});const S=Ke(()=>c.context.closeDelayRef.current);return dA(k,{closeDelay:S}),gn("div",t,{state:{open:h,side:f,align:d,instant:m,transitionStatus:b},ref:[n,c.context.popupRef,c.useStateSetter("popupElement")],props:[y,Dh(b),l],stateAttributesMapping:u5})});class c5{constructor(){this.store=new Wh}open(t){const n=t?this.store.context.triggerElements.getById(t):void 0;if(t&&!n)throw new Error(Nn(88,t));this.store.setOpen(!0,Ct(_p,void 0,n))}close(){this.store.setOpen(!1,Ct(_p,void 0,void 0))}get isOpen(){return this.store.select("open")}}function f5(){return new c5}function Ml(e,t,n,r){const[s,a]=v.useState(t),l=v.useRef(n),c=v.useRef(s),f=e!==void 0,d=v.useRef(f);v.useLayoutEffect(()=>{l.current=n},[n]),v.useEffect(()=>{c.current!==s&&l.current?.(s),c.current=s},[s]),v.useEffect(()=>{d.current,d.current=f},[r,f]);const h=f?e:s,m=v.useCallback(b=>{if(!f){a(b);return}const y=typeof b=="function"?b(e):b;y!==e&&l.current?.(y)},[e,f]);return[h,m]}const eO="never",Yb={base:{kVAEAm:"ui-1n2onr6",kfSwDN:"ui-1hx0egp",kfzvcC:"ui-67bb7w",$$css:!0},width:e=>[{kzqmXN:e!=null?"ui-5lhr3w":e,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(e)}],maxWidth:e=>[{ks0D6T:e!=null?"ui-f68679":e,$$css:!0},{"--x-maxWidth":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]},d5={base:{kB7OPa:"ui-9f619",$$css:!0}};function p5({ariaLabel:e,close:t,content:n,contentStyle:r,isOpen:s,maxHeight:a,maxWidth:l,offset:c,placement:f,sameAxisOnly:d,scrollbarVisibility:h,surfaceClassName:m,surfaceStyle:b,width:y}){const{portalLayerStyles:k}=ql("tooltip",!0),{side:S,align:C,sideOffset:E,alignOffset:T,collisionAvoidance:R,positionMethod:_}=Bh(f??Ph,c,d),D=jh(ZA),A=zt(Ex,Yb.base,Lh,Yb.width(y),l!==void 0&&Yb.maxWidth(l),b),I=zt(QA,d5.base,r);return g.jsx(QN,{align:C,alignOffset:T,className:D.className,collisionAvoidance:R,collisionPadding:8,positionMethod:_,side:S,sideOffset:E,style:{...D.style,...k},children:g.jsx(JN,{"aria-label":e,className:sn("ui-preview-card",m,A.className),"data-block-global-shortcuts":s?"Escape":void 0,role:"dialog",style:A.style,children:g.jsx(Al,{maxHeight:a,scrollbarVisibility:h,children:g.jsx("div",{className:sn("ui-preview-card__content",I.className),style:I.style,children:typeof n=="function"?n(t):n})})})})}function tO({children:e,content:t,placement:n=Ph,sameAxisOnly:r=!1,offset:s=8,openDelay:a=Tx,closeDelay:l=$h,disabled:c=!1,maxHeight:f=300,maxWidth:d,scrollbarVisibility:h=eO,width:m=280,className:b,surfaceStyle:y,contentStyle:k,"aria-label":S,ref:C,defaultOpen:E=!1,open:T,onOpenChange:R,onOpenChangeComplete:_,...D}){const A=v.useRef(null),[I,P]=Ml(T,E,void 0,"PreviewCard"),$=v.Children.only(e),O=v.isValidElement($),Y=v.useCallback(H=>{H!==null&&(A.current?.close(),T===void 0&&A.current?.unmount())},[T]),U=zN({defaultTagName:"span",props:D,ref:[C,Y],render:O?$:void 0}),B=ya(),j=v.useCallback((H,W)=>{if(c){H&&W.cancel();return}if(W.reason==="outside-press"||W.reason==="trigger-press"){W.cancel();return}R?.(H,W),W.isCanceled||P(H)},[c,R,P]),q=v.useCallback(()=>A.current?.close(),[]);return O?g.jsxs(GN,{actionsRef:A,defaultOpen:E,onOpenChange:j,onOpenChangeComplete:_,open:T,children:[c?U:g.jsx(XN,{...D,closeDelay:l,delay:a,ref:C,render:$}),c?null:g.jsx(YN,{container:B??void 0,children:g.jsx(p5,{ariaLabel:S,close:q,content:t,contentStyle:k,isOpen:I,maxHeight:f,maxWidth:d,offset:s,placement:n,sameAxisOnly:r,scrollbarVisibility:h,surfaceClassName:b,surfaceStyle:y,width:m})})]}):g.jsx(g.Fragment,{children:e})}function uT(e){const t=v.useRef(e);return v.useLayoutEffect(()=>{t.current=e},[e]),t}function nO(e,t){const n=uT(e),r=uT(t);return v.useCallback(s=>{if(s==null)return;const{ownerDocument:a}=s,l=c=>{const f=c.target,d=a.defaultView?.Element;if(d===void 0||!(f instanceof d))return;const h=r.current;if(h==null)return;const m=a.getElementById(h);m!=null&&f.contains(m)&&n.current.close()};return a.addEventListener("scroll",l,{capture:!0,passive:!0}),()=>{a.removeEventListener("scroll",l,!0)}},[n,r])}const Zp=v.createContext(!1);function rO({children:e,dismiss:t}){const n=v.use(Zp);return g.jsx(Zp.Provider,{value:n||t,children:e})}const iO=v.createContext(null),sO=v.createContext(null),oO=v.createContext(null);function aO(e){const t=v.use(iO);if(t===null)throw new Error(`${e} must be used within PreviewCardLayer`);return t}function h5(){const e=v.use(sO);if(e===null)throw new Error("PreviewCardLayer.Popup must be inside an open PreviewCardLayer");return e}function m5(){const e=v.use(oO);if(e===null)throw new Error("PreviewCardLayer.Popup must be inside an open PreviewCardLayer");return e}function g5({children:e}){const t=Cx();return Ox({nodeId:t,open:!0}),g.jsx(Rx,{id:t,children:e})}function _c({children:e,placement:t=Ph,offset:n=8,sameAxisOnly:r=!1,openDelay:s=Tx,closeDelay:a=$h,controlledTargetId:l}){const c=v.useMemo(()=>f5(),[]),f=v.useRef(null),d=v.useRef(null),h=v.useRef(null),m=v.useRef(!1),b=v.useRef(new Map),y=v.useRef(l),[k,S]=v.useState(!1),C=v.use(Zp),E=Bh(t,n,r),T=v.useCallback(P=>{f.current===P&&(f.current=null,c.close())},[c]),R=v.useCallback(()=>{const P=y.current;if(P===void 0)return;const $=P===null?void 0:b.current.get(P);if(P===null||$===void 0||$.suppressed){f.current=null,c.close();return}f.current=$.triggerId,c.open($.triggerId)},[c]),_=v.useCallback(()=>{const P=m.current;m.current=!1;const $=d.current;if($===null)return;const O=h.current;O===null||O.id!==$||!O.isConnected||O.hasAttribute("data-preview-card-layer-trigger-suppressed")||!P&&O!==O.ownerDocument.activeElement&&!O.matches(":hover")||(f.current=$,c.open($))},[c]),D=v.useCallback((P,$)=>(b.current.set(P,$),R(),()=>{b.current.get(P)===$&&(b.current.delete(P),R())}),[R]);v.useLayoutEffect(()=>{const P=y.current;if(P===void 0&&l!==void 0&&(d.current=f.current),y.current=l,l===void 0){P!==void 0&&_();return}P!==l&&(m.current=!1),R()},[l,R,_]);const A=v.useCallback((P,$)=>{if(y.current!==void 0&&$.reason!=="imperative-action"){P&&$.trigger!==void 0&&!$.trigger.hasAttribute("data-preview-card-layer-trigger-suppressed")?(d.current=$.trigger.id,h.current=$.trigger,m.current=!0):!P&&$.trigger?.id===d.current&&(d.current=null,h.current=null,m.current=!1),$.cancel(),R();return}if(P&&$.trigger?.hasAttribute("data-preview-card-layer-trigger-suppressed")){if($.cancel(),y.current!==void 0){R();return}f.current=null,d.current=null,c.close();return}if(!P&&$.reason==="trigger-focus"&&$.event instanceof FocusEvent&&$.event.relatedTarget===null&&$.event.target instanceof Element&&$.event.target.matches(":hover")){$.cancel();return}!P&&$.reason!=="imperative-action"&&$.trigger?.id===d.current&&(d.current=null,h.current=null,m.current=!1),f.current=P?$.trigger?.id??f.current:null,y.current===void 0&&(d.current=f.current),S(P),y.current===void 0&&$.trigger!==void 0&&(h.current=P?$.trigger:null)},[c,R]),I=v.useMemo(()=>({handle:c,instantDismiss:C,openDelay:s,closeDelay:a,positioner:E,closeIfActive:T,registerTarget:D}),[a,T,c,C,s,E,D]);return g.jsxs(iO.Provider,{value:I,children:[e,g.jsx(GN,{handle:c,onOpenChange:A,children:({payload:P})=>!C&&k&&P!==void 0?g.jsx(sO.Provider,{value:P.triggerId,children:g.jsx(oO.Provider,{value:P.contentKey,children:g.jsx(g5,{children:P.content})})}):null})]})}function b5({children:e,content:t,targetId:n,contentKey:r,disabled:s=!1,openDelay:a,closeDelay:l}){const{handle:c,instantDismiss:f,openDelay:d,closeDelay:h,closeIfActive:m,registerTarget:b}=aO("PreviewCardLayer.Trigger"),y=v.useId(),k=e.props.id,S=typeof k=="string"?k:y,C=s||f,E=v.useMemo(()=>({content:t,contentKey:r??S,triggerId:S}),[t,r,S]);return v.useLayoutEffect(()=>{const T=n===void 0?void 0:b(n,{triggerId:S,suppressed:C});return C&&m(S),()=>{T?.(),m(S)}},[m,b,C,n,S]),g.jsx(XN,{closeDelay:l??h,delay:a??d,handle:c,id:S,payload:E,"data-preview-card-layer-trigger-suppressed":C?"":void 0,render:e})}function y5({ariaLabel:e,children:t,maxHeight:n,surfaceClassName:r,surfaceStyle:s}){const{handle:a,positioner:l}=aO("PreviewCardLayer.Popup"),c=h5(),f=m5(),d=ya(),h=nO(a,c),{portalLayerStyles:m}=ql("tooltip",!0),b=jh(ZA),y=zt(Ex,JA,QA,Lh,g4,s);return g.jsx(YN,{container:d??void 0,children:g.jsx(QN,{align:l.align,alignOffset:l.alignOffset,className:b.className,collisionAvoidance:l.collisionAvoidance,collisionPadding:8,positionMethod:l.positionMethod,side:l.side,sideOffset:l.sideOffset,style:{...b.style,...m},children:g.jsx(JN,{"aria-label":e,"data-component":"preview-card-layer-popup",className:sn("ui-preview-card-layer",r,y.className),ref:h,role:"dialog",style:y.style,children:n===void 0?t:g.jsx(Al,{maxHeight:`min(${typeof n=="number"?`${n}px`:n}, var(--available-height, 100vh))`,scrollbarVisibility:eO,children:t})},f)})})}(function(e){e.Trigger=b5,e.Popup=y5})(_c||(_c={}));const lO="data-composite-item-active",v5=[];function x5(e){const{loopFocus:t=!0,orientation:n="both",grid:r,onLoop:s,direction:a,highlightedIndex:l,onHighlightedIndexChange:c,rootRef:f,enableHomeAndEndKeys:d=!1,stopEventPropagation:h=!1,disabledIndices:m,modifierKeys:b=v5}=e,[y,k]=v.useState(0),S=r!=null,C=v.useRef(null),E=xo(C,f),T=v.useRef([]),R=v.useRef(!1),_=l??y,D=Ke((O,Y=!1)=>{if((c??k)(O),Y){const U=T.current[O];aE(C.current,U,a,n)}}),A=Ke(O=>{if(O.size===0||R.current)return;R.current=!0;const Y=Array.from(O.keys()),U=Y.find(j=>j?.hasAttribute(lO))??null,B=U?Y.indexOf(U):-1;if(B!==-1)D(B);else if(Dp(Y,_,m)){const j=ws(Y,{disabledIndices:m});cc(Y,j)||D(j)}aE(C.current,U,a,n)});Ve(()=>{if(m==null||l!=null||!R.current)return;const O=T.current;if(Dp(O,_,m)){const Y=ws(O,{disabledIndices:m});cc(O,Y)||D(Y)}},[m,l,_,T,D]);const I=Ke((O,Y,U)=>s?s(O,Y,U,T):U),P=Ke(O=>{const Y=d?yA:bA;if(!Y.has(O.key)||k5(O,b)||!C.current)return;const B=a==="rtl",j=B?Bp:Fp,q={horizontal:j,vertical:hc,both:j}[n],H=B?Fp:Bp,W={horizontal:H,vertical:pc,both:H}[n],F=gr(O.nativeEvent);if(F!=null&&oE(F)&&!qN(F)){const re=F.selectionStart,ie=F.selectionEnd,ae=F.value??"";if(re==null||O.shiftKey||re!==ie||O.key!==W&&re<ae.length||O.key!==q&&re>0)return}let K=_;const N=bp(T,m),z=zy(T,m);r!=null&&(K=r({disabledIndices:m,elementsRef:T,event:O,highlightedIndex:_,loopFocus:t,maxIndex:z,minIndex:N,onLoop:I,orientation:n,rtl:B}));const V={horizontal:[j],vertical:[hc],both:[j,hc]}[n],L={horizontal:[H],vertical:[pc],both:[H,pc]}[n],Z=S?Y:{horizontal:d?Y$:mA,vertical:d?X$:gA,both:Y}[n];d&&(O.key===Nh?K=N:O.key===Oh&&(K=z)),K===_&&(V.includes(O.key)||L.includes(O.key))&&(t&&K===z&&V.includes(O.key)?(K=N,s&&(K=s(O,_,K,T))):t&&K===N&&L.includes(O.key)?(K=z,s&&(K=s(O,_,K,T))):K=ws(T.current,{startingIndex:K,decrement:L.includes(O.key),disabledIndices:m})),K!==_&&!cc(T.current,K)&&(h&&O.stopPropagation(),Z.has(O.key)&&O.preventDefault(),D(K,!0),queueMicrotask(()=>{T.current[K]?.focus()}))});return{props:{ref:E,onFocus(O){const Y=C.current,U=gr(O.nativeEvent);!Y||U==null||!oE(U)||U.setSelectionRange(0,U.value.length??0)},onKeyDown:P},highlightedIndex:_,onHighlightedIndexChange:D,elementsRef:T,disabledIndices:m,onMapChange:A,relayKeyboardEvent:P}}function k5(e,t){for(const n of t3.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function S5(e){const{render:t,className:n,style:r,refs:s=ko,props:a=ko,state:l=$n,stateAttributesMapping:c,highlightedIndex:f,onHighlightedIndexChange:d,orientation:h,grid:m,loopFocus:b,onLoop:y,enableHomeAndEndKeys:k,onMapChange:S,stopEventPropagation:C=!0,rootRef:E,disabledIndices:T,modifierKeys:R,highlightItemOnHover:_=!1,tag:D="div",...A}=e,I=Li(),{props:P,highlightedIndex:$,onHighlightedIndexChange:O,elementsRef:Y,onMapChange:U,relayKeyboardEvent:B}=x5({grid:m,loopFocus:b,onLoop:y,orientation:h,highlightedIndex:f,onHighlightedIndexChange:d,rootRef:E,stopEventPropagation:C,enableHomeAndEndKeys:k,direction:I,disabledIndices:T,modifierKeys:R}),j=gn(D,e,{state:l,ref:s,props:[P,...a,A],stateAttributesMapping:c}),q=v.useMemo(()=>({highlightedIndex:$,onHighlightedIndexChange:O,highlightItemOnHover:_,relayKeyboardEvent:B}),[$,O,_,B]);return g.jsx(s_.Provider,{value:q,children:g.jsx(kx,{elementsRef:Y,onMapChange:H=>{S?.(H),U(H)},children:j})})}const w5=v.createContext(void 0);function E5(){const e=v.useContext(w5);if(e===void 0)throw new Error(Nn(63));return e}let cT=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const T5={...Zc,checked(e){return e?{[cT.checked]:""}:{[cT.unchecked]:""}}},C5=v.forwardRef(function(t,n){const{render:r,className:s,style:a,...l}=t,c=E5();return gn("span",t,{state:c,ref:n,stateAttributesMapping:T5,props:l})}),R5="md",fT={root:{kVAEAm:"ui-1n2onr6",k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kB7OPa:"ui-9f619",kmuXW:"ui-2lah0s",kaIpWk:"ui-1i4c3av",kMeerF:"ui-1k57tk5 ui-x510wv",k3XXqK:"ui-1t137rt ui-15veape",kjBf7l:"ui-1uczgqu ui-1whe2fk",kInvED:"ui-1wfwxd8 ui-1edn9mt",kWkggS:"ui-59yu97 ui-fewc5l ui-dc3jbj",k1ekBW:"ui-15406qy",kIyJzY:"ui-7pq1vu",kAMwcw:"ui-6ekqhr",$$css:!0},sm:{kzqmXN:"ui-23j0i4",kZKoxP:"ui-1vatr1o","--ui-switch-thumb-travel":"ui-sc32xf",$$css:!0},regular:{kzqmXN:"ui-1849jeq",kZKoxP:"ui-mix8c7","--ui-switch-thumb-travel":"ui-9pb0k7",kWkggS:"ui-3dhcaw ui-fewc5l ui-dc3jbj",kGVxlE:"ui-1gnnqk1 ui-10yfhlr",$$css:!0},md:{kzqmXN:"ui-1td3qas",kZKoxP:"ui-1a6rlst","--ui-switch-thumb-travel":"ui-9pb0k7",$$css:!0},lg:{kzqmXN:"ui-1guw455",kZKoxP:"ui-1e94bgo","--ui-switch-thumb-travel":"ui-1c3f5sz",$$css:!0}},_5={primary:{"--ui-switch-active-bg":"ui-i0s8m6",$$css:!0},green:{"--ui-switch-active-bg":"ui-1g3p0vo",$$css:!0},neutral:{"--ui-switch-active-bg":"ui-742exl",$$css:!0},monochrome:{"--ui-switch-active-bg":"ui-1iuey4n","--ui-switch-thumb-bg":"ui-1bbrhsv",$$css:!0}};function A5({interactive:e,size:t,variant:n}){const r=g.jsx("span",{className:"ui-1lliihq ui-h8yej3 ui-5yr21d ui-1i4c3av ui-hwtojv ui-10mbuw1 ui-10z6xd1 ui-19ule2h ui-1g0ag68 ui-3oybdh ui-27jcm2 ui-11xpdln ui-622pbu ui-99dd5c ui-sagj69 ui-6tor67"}),s=e?g.jsx(C5,{className:"ui-10l6tqk ui-np7j22 ui-it89om ui-121ilyj ui-1plog1 ui-bryuvx ui-kkvxwt ui-11xpdln ui-1bqoo3p ui-sagj69 ui-1tkypeg",children:r}):g.jsx("span",{className:"ui-10l6tqk ui-np7j22 ui-it89om ui-121ilyj ui-1plog1 ui-bryuvx ui-kkvxwt ui-11xpdln ui-1bqoo3p ui-sagj69 ui-1tkypeg",children:r});return g.jsx("span",{"aria-hidden":"true",...zt(fT.root,fT[t],_5[n]),children:s})}function N5({checked:e,disabled:t,size:n=R5,variant:r="green"}){return g.jsx("span",{"aria-hidden":"true","data-component":"switch","data-size":n,"data-variant":r,"data-checked":e||void 0,"data-disabled":t||void 0,className:"ui-3nfvp2 ui-6s0dn4 ui-l56j7k ui-1c4vz4f ui-2lah0s ui-dl72j9 ui-xymvpz ui-47corl ui--default-marker",children:g.jsx(A5,{interactive:!1,size:n,variant:r})})}const Sn={base:{kMv6JI:"ui-1acoasx",keoZOQ:"ui-dj266r",k71WvV:"ui-14z9mp",k1K539:"ui-at24cr",keTefX:"ui-1lziwak",kLKAdn:"ui-exx8yu",kwRFfy:"ui-yri2b",kGO01o:"ui-18d9i69",kZCmMZ:"ui-1c1uobl",$$css:!0},sizeInherit:{kGuDYH:"ui-1qlqyl8",kLWn49:"ui-15bjb6t",kb6lSQ:"ui-4gjf66",$$css:!0},variantCode:{kMv6JI:"ui-ul7cyv",$$css:!0},weightRegular:{k63SB2:"ui-20ajya",$$css:!0},weightMedium:{k63SB2:"ui-1yl5bsf",$$css:!0},weightSemibold:{k63SB2:"ui-13ebx5f",$$css:!0},weightBold:{k63SB2:"ui-1v8v64w",$$css:!0},colorPrimary:{kMwMTN:"ui-1wd3ewq",$$css:!0},colorSecondary:{kMwMTN:"ui-19aaqeu",$$css:!0},colorTertiary:{kMwMTN:"ui-4b2ntj",$$css:!0},colorQuaternary:{kMwMTN:"ui-1e4uaio",$$css:!0},colorActive:{kMwMTN:"ui-7qsbfx",$$css:!0},colorFocused:{kMwMTN:"ui-zlszhr",$$css:!0},colorRed:{kMwMTN:"ui-1jh5svw",$$css:!0},colorRedSecondary:{kMwMTN:"ui-o7cye4",$$css:!0},colorYellow:{kMwMTN:"ui-1izesbo",$$css:!0},colorYellowSecondary:{kMwMTN:"ui-14nh9a",$$css:!0},colorGreen:{kMwMTN:"ui-1w5rjie",$$css:!0},colorGreenSecondary:{kMwMTN:"ui-dki84f",$$css:!0},colorMagenta:{kMwMTN:"ui-xjecij",$$css:!0},colorMagentaSecondary:{kMwMTN:"ui-29qggb",$$css:!0},colorCyan:{kMwMTN:"ui-1d0l12",$$css:!0},colorCyanSecondary:{kMwMTN:"ui-l34bp",$$css:!0},colorOrange:{kMwMTN:"ui-11pqmr",$$css:!0},colorOrangeSecondary:{kMwMTN:"ui-11nfuof",$$css:!0},truncateStart:{k1xSpc:"ui-1lliihq",kzqmXN:"ui-h8yej3",k7Eaqz:"ui-euugli",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kg5iWk:"ui-lyipyv",k8aIck:"ui-jlip5",kqG3fB:"ui-kyw5k8",ksoyAI:"ui-zyj77d",k9WMMc:"ui-dpxx8g",$$css:!0}},O5={xs:NA.root,sm:Ds.root,md:_s.root,lg:OA.root,xl:o6.root,"2xl":a6.root,"3xl":l6.root,inherit:Sn.sizeInherit},I5={regular:Sn.weightRegular,medium:Sn.weightMedium,semibold:Sn.weightSemibold,bold:Sn.weightBold},M5={primary:Sn.colorPrimary,secondary:Sn.colorSecondary,tertiary:Sn.colorTertiary,quaternary:Sn.colorQuaternary,active:Sn.colorActive,focused:Sn.colorFocused,red:Sn.colorRed,"red-secondary":Sn.colorRedSecondary,yellow:Sn.colorYellow,"yellow-secondary":Sn.colorYellowSecondary,green:Sn.colorGreen,"green-secondary":Sn.colorGreenSecondary,magenta:Sn.colorMagenta,"magenta-secondary":Sn.colorMagentaSecondary,cyan:Sn.colorCyan,"cyan-secondary":Sn.colorCyanSecondary,orange:Sn.colorOrange,"orange-secondary":Sn.colorOrangeSecondary};function D5({color:e,size:t,truncate:n,variant:r,weight:s}){return[Sn.base,Ih.root,O5[t],I5[s],r==="code"?Sn.variantCode:null,e?M5[e]:null,n==="start"?Sn.truncateStart:null,n==="end"?Hl.root:null]}function Qp({as:e="span",variant:t="default",size:n="md",weight:r="regular",color:s,truncate:a,numeric:l,children:c,rootStyle:f,className:d,style:h,ref:m,...b}){const y=a===!0?"end":a===!1?void 0:a??void 0,{className:k,style:S}=zt(D5({color:s,size:n,truncate:y,variant:t,weight:r}),f);return g.jsx(e,{ref:m,className:sn("ui-text",k,d),style:{...S,...h},"data-variant":t,"data-size":n,"data-weight":r,"data-color":s,"data-truncate":y,"data-numeric":l||void 0,...b,children:y==="start"?g.jsxs(g.Fragment,{children:["⁦",c,"⁩"]}):c})}const uO={text:{kzqmXN:"ui-h8yej3",kHjlTd:"ui-j0a0fe",kN2L0X:"ui-1w2vvpw",$$css:!0}};function cO({children:e}){return g.jsx("div",{"data-component":"empty-state-root",className:"ui-98rzlu ui-5yr21d ui-2lwn1j ui-euugli ui-78zum5 ui-dt5ytf ui-6s0dn4 ui-l56j7k ui-1rea2x4 ui-j2grvh ui-mw8u6f ui-9f619 ui-2b8uid ui-1oot3zn",children:e})}function fO({children:e,variant:t="default"}){return g.jsx("div",{"data-component":"empty-state-icon","data-variant":t,...{0:{className:"ui-1pwdyn5 ui-1vatr1o ui-2lah0s ui-78zum5 ui-6s0dn4 ui-l56j7k ui-1lbmi28"},1:{className:"ui-2lah0s ui-78zum5 ui-6s0dn4 ui-l56j7k ui-1lbmi28 ui-1niwmkg ui-f2gx5w ui-9f619 ui-mkeg23 ui-1y0btm7 ui-qz0629 ui-1m7fhj7"}}[(t==="tab")<<0],children:e})}function dO({children:e}){return g.jsx("div",{"data-component":"empty-state-header",className:"ui-h8yej3 ui-euugli ui-78zum5 ui-dt5ytf ui-6s0dn4 ui-137clkk",children:e})}function pO({children:e}){return g.jsx(Qp,{as:"p",color:"primary","data-component":"empty-state-title",rootStyle:uO.text,size:"md",weight:"medium",children:e})}function hO({children:e}){return g.jsx(Qp,{as:"p",color:"secondary","data-component":"empty-state-description",rootStyle:uO.text,size:"md",weight:"regular",children:e})}function mO({children:e}){return g.jsx("div",{"data-component":"empty-state-content",className:"ui-78zum5 ui-6s0dn4 ui-l56j7k ui-1a02dak ui-ehausa",children:e})}function L5({body:e,cta:t,icon:n,iconVariant:r="default",title:s}){const a=typeof n=="string"?n:void 0,l=a!==void 0?g.jsx(qt,{color:"tertiary",name:a,size:"lg"}):n;return g.jsxs(cO,{children:[l===void 0?null:g.jsx(fO,{variant:r,children:l}),g.jsxs(dO,{children:[s===void 0?null:g.jsx(pO,{children:s}),g.jsx(hO,{children:e})]}),t===void 0?null:g.jsx(mO,{children:g.jsx(yn,{disabled:t.disabled,onClick:t.onClick,size:"md",variant:"outline",children:t.label})})]})}const Ri=Object.assign(L5,{Root:cO,Icon:fO,Header:dO,Title:pO,Description:hO,Content:mO});function rf({className:e,variant:t="default",size:n="lg",ref:r,disabled:s,startIcon:a,endIcon:l,inputGroupRootStyle:c,...f}){return g.jsxs(Hd.Root,{className:e,rootStyle:c,variant:t,size:n,disabled:s,children:[a!=null&&g.jsx(Hd.Icon,{name:a}),g.jsx(Hd.Input,{ref:r,...f}),l!=null&&g.jsx(Hd.Icon,{name:l})]})}const ks=class ks{constructor(){this.data=null,this.listeners=new Set}static getInstance(){return ks.instance||(ks.instance=new ks),ks.instance}static subscribe(t){return ks.getInstance().subscribeToChanges(t)}static isDragActive(){return ks.getInstance().hasData()}notifyListeners(){for(const t of this.listeners)t()}subscribeToChanges(t){return this.listeners.add(t),()=>{this.listeners.delete(t)}}setData(t){this.data!==t&&(this.data=t,this.notifyListeners())}getData(){return this.data}getValidatedData(t){if(!this.data)return null;for(const n of t)if(this.data instanceof n)return n.schema.safeParse(this.data.payload).success?this.data:null;return null}hasAnyClass(t){return this.data?t.some(n=>this.data instanceof n):!1}clearData(){this.data!==null&&(this.data=null,this.notifyListeners())}hasData(){return this.data!==null}};ks.instance=null;let bi=ks;const Xb={fontFamily:{sans:"var(--cursor-font-family, var(--vscode-font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif))",mono:"var(--cursor-font-family-mono, var(--monaco-monospace-font, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace))"},scrollbar:{verticalSize:"var(--vscode-scrollbar-vertical-size, 14px)",horizontalSize:"var(--vscode-scrollbar-horizontal-size, 12px)",thumbBackground:"var(--vscode-scrollbarSlider-background)",thumbHoverBackground:"var(--vscode-scrollbarSlider-hoverBackground)",thumbActiveBackground:"var(--vscode-scrollbarSlider-activeBackground)"},syntax:{foreground:"oklch(0.878 0.01 286.202)",background:"oklch(0.209 0 0)",keyword:"oklch(0.811 0.079 191.639)",string:"oklch(0.769 0.132 329.919)",function:"oklch(0.805 0.097 58.138)",number:"oklch(0.849 0.086 80.222)",comment:"oklch(0.919 0 0 / 0.369)",constant:"oklch(0.854 0.131 83.385)",parameter:"oklch(0.878 0.01 286.202)",punctuation:"oklch(0.878 0.01 286.202)",link:"oklch(0.799 0.106 249.274)",stringExpression:"oklch(0.769 0.132 329.919)"}},j5={1:1,2:2},Yy={instant:50,fast:100,normal:150,slow:200,slower:300},gO={default:"ease",in:"ease-in",out:"ease-out",inOut:"ease-in-out",inStrong:"cubic-bezier(0.895, 0.03, 0.685, 0.22)",outStrong:"cubic-bezier(0.165, 0.84, 0.44, 1)",outCubic:"cubic-bezier(0.215, 0.61, 0.355, 1)",outQuint:"cubic-bezier(0.16, 1, 0.3, 1)",inOutStrong:"cubic-bezier(0.77, 0, 0.175, 1)"},z5={"ne-0.25":-1,"ne-0.5":-2,"ne-0.75":-3,"ne-1":-4,"ne-1.25":-5,"ne-1.5":-6,"ne-1.75":-7,"ne-2":-8,"ne-2.25":-9,"ne-2.5":-10,"ne-2.75":-11,"ne-3":-12,"ne-3.25":-13,"ne-3.5":-14,"ne-3.75":-15,"ne-4":-16,"ne-4.25":-17,"ne-4.5":-18,"ne-4.75":-19,"ne-5":-20,"0.25":1,"0.5":2,"0.75":3,1:4,"1.25":5,"1.5":6,"1.75":7,2:8,"2.25":9,"2.5":10,"2.75":11,3:12,"3.25":13,"3.5":14,"3.75":15,4:16,"4.25":17,"4.5":18,"4.75":19,5:20,"5.5":22,6:24,"6.5":26,7:28,"7.5":30,8:32,"8.5":34,9:36,"9.5":38,10:40,11:44,12:48,13:52,14:56,15:60,16:64,17:68,18:72,19:76,20:80},P5={none:0,xs:2,sm:4,base:6,lg:8,xl:12,"2xl":14,"3xl":16,"4xl":18,full:9999},$5={xs:20,sm:24,base:28,lg:32},B5={xs:11,sm:12,base:13,lg:14},F5={xs:14,sm:16,base:18,lg:22},U5={xs:.07,sm:0,base:-.08,lg:-.15,xl:.08,"2xl":-.46,"3xl":-.26},q5=.98,H5=2,dT={open:Yy.fast,close:Yy.fast},V5=gO.outQuint;function bO(e){const[t,n]=e.split("-");switch(t){case"top":case"right":case"bottom":case"left":return{side:t,alignment:n==="start"||n==="end"?n:void 0};default:throw new Error(`Unsupported floating placement: ${e}`)}}function G5(e){const{side:t,alignment:n}=bO(e);switch(t){case"top":return`${pT(n)} bottom`;case"right":return`left ${hT(n)}`;case"bottom":return`${pT(n)} top`;case"left":return`right ${hT(n)}`}}function W5(e,t={}){const{side:n}=bO(e),r=t.offset??H5,s=t.scale??q5;switch(n){case"top":return`translate3d(0, ${r}px, 0) scale(${s})`;case"right":return`translate3d(-${r}px, 0, 0) scale(${s})`;case"bottom":return`translate3d(0, -${r}px, 0) scale(${s})`;case"left":return`translate3d(${r}px, 0, 0) scale(${s})`}}function K5(e,t){return{opacity:0,transform:W5(e,t)}}function Y5(e){return{transformOrigin:G5(e),transitionTimingFunction:V5}}function X5({closeDuration:e=dT.close,transform:t}={}){return{duration:{open:dT.open,close:e},initial:({placement:n})=>K5(n,t),common:({placement:n})=>Y5(n)}}function pT(e){switch(e){case"start":return"left";case"end":return"right";case void 0:return"center"}}function hT(e){switch(e){case"start":return"top";case"end":return"bottom";case void 0:return"center"}}function Z5(){const e=v.useRef(!0),t=v.useRef(void 0),n=v.useCallback(()=>{t.current!==void 0&&(clearTimeout(t.current),t.current=void 0)},[]),r=v.useCallback((s,a)=>{e.current&&(n(),t.current=setTimeout(()=>{t.current=void 0,s()},a))},[n]);return v.useEffect(()=>(e.current=!0,()=>{e.current=!1,n()}),[n]),v.useMemo(()=>({cancel:n,schedule:r}),[n,r])}const Q5=300,yO=v.createContext(null);function Xy({children:e}){const[t,n]=v.useState(null),r=Z5(),s=v.useCallback(c=>{r.cancel(),n(c)},[r]),a=v.useCallback(c=>{r.schedule(()=>{n(f=>f===c?null:f)},Q5)},[r]),l=v.useMemo(()=>({activeId:t,markOpen:s,markClosed:a}),[t,s,a]);return g.jsx(yO.Provider,{value:l,children:e})}function J5(e,t){const n=v.useContext(yO),r=n?.markOpen,s=n?.markClosed;return v.useEffect(()=>{if(!(!t||e==null||r==null||s==null))return r(e),()=>s(e)},[t,e,r,s]),{activeId:n?.activeId??null}}const Vl="data-ui-menu-item-region",vO=v.createContext("body");function Ts({value:e,children:t}){return g.jsx(vO.Provider,{value:e,children:t})}function sf(){return v.useContext(vO)}const eF='[role="menuitem"]',mT=["pointermove","mousemove"];function xO(e){if(e.key==="ArrowDown"||e.key==="ArrowUp"||e.key==="ArrowLeft"||e.key==="ArrowRight"||e.key==="Home"||e.key==="End")return!0;if(!e.ctrlKey||e.metaKey)return!1;const t=e.key.toLowerCase();return t==="n"||t==="p"||t==="j"||t==="k"}function kO(e,t){if(!(e===void 0||t===null||t<0))return`${e}-item-${t}`}function of(e,t){const n=kO(e,t);return n===void 0?{}:{id:n}}function SO(e){const{"aria-activedescendant":t,...n}=e;return n}function tF(e,t){if(t==null)return null;const n=e.current[t];return n instanceof HTMLElement?n:null}function nF(e,t){const n=e.current;for(let r=0;r<n.length;r++)if(n[r]?.getAttribute(Vl)===t)return r;return null}function wO(e,t,n){queueMicrotask(()=>{const r=nF(e,t);n(r??null)})}function EO(e,t){if(!(e instanceof Element))return null;const n=e.closest(eF);if(!n)return null;const r=t.current.indexOf(n);return r>=0?r:null}function rF(e,t){if(!e)return()=>{};for(const n of mT)e.addEventListener(n,t,{passive:!0});return()=>{for(const n of mT)e.removeEventListener(n,t)}}function iF({event:e,direction:t,activeIndex:n,listRef:r,restoreFocus:s}){const a=tF(r,n);if(!a)return!1;e.preventDefault(),e.stopPropagation();const l=document.activeElement===e.currentTarget;return a.focus(),a.dispatchEvent(new KeyboardEvent("keydown",{key:t,bubbles:!0,cancelable:!0})),l&&document.activeElement===a&&s?.(),!0}function TO(e,t){return v.useCallback(n=>{const r=e(n);if(t)return r;const{onPointerLeave:s,...a}=r;return a},[e,t])}function CO(){const[e,t]=v.useState(!0),n=v.useCallback(()=>{t(!1)},[]),r=v.useCallback(()=>{t(!0)},[]),s=v.useCallback(()=>{t(!0)},[]);return{focusItemOnHoverEnabled:e,markKeyboardNavigation:n,markPointerNavigation:r,resetFocusItemOnHover:s}}const sF=360,RO="--ui-menu-available-width",Mx="--ui-menu-available-height",oF=new Set(["none","auto","initial","inherit","unset","revert","revert-layer","min-content","max-content","fit-content","stretch"]);function _O(e){const t=`var(${Mx}, 100vh)`;return e==null||aF(e)?t:`min(${fl(e)}, ${t})`}function aF(e){return typeof e=="string"&&oF.has(e.trim().toLowerCase())}const lF="320px";function fl(e){return typeof e=="number"?`${e}px`:e}function Zb(e){return`min(${e}, var(${RO}, 100vw))`}function Dx(e){const{width:t,minWidth:n,maxWidth:r,clampToAvailableWidth:s=!1}=e,l=t===void 0&&(n!==void 0||r!==void 0)?"max-content":fl(t??"200px");return s?{width:l==="max-content"?l:Zb(l),...n!=null&&{minWidth:Zb(fl(n))},maxWidth:Zb(r!=null?fl(r):lF)}:{width:l,...n!=null&&{minWidth:fl(n)},...r!=null&&{maxWidth:fl(r)}}}const uF=50;function Lx({isOpen:e,isPositioned:t}){return e&&!t?{opacity:0}:void 0}function cF(e,t){v.useLayoutEffect(()=>{if(!e)return;const n=t.current;if(!(n instanceof HTMLElement))return;const r=n.closest('[role="menu"]');if(r!=null)return r.style.pointerEvents="none",n.style.pointerEvents="auto",()=>{r.style.pointerEvents="",n.style.pointerEvents=""}},[e,t])}function fF(){return{name:"bottomAnchor",fn({y:e,placement:t,rects:n,elements:r}){if(!t.startsWith("top"))return{};const s=r.floating.offsetParent,a=s===document.body&&window.getComputedStyle(s).position==="static";return{data:{bottom:(!s||s===document.documentElement||a?document.documentElement.clientHeight||window.innerHeight:s.clientHeight)-e-n.floating.height}}}}}function Kh(e=200){const t=v.useRef(0);return v.useEffect(()=>{const n=()=>{t.current=Date.now()+e};return window.addEventListener("focus",n),()=>{window.removeEventListener("focus",n)}},[e]),v.useCallback(n=>{const r=n.target,s=r instanceof Node?r.ownerDocument:document,a=Date.now(),l=s?.hasFocus()??document.hasFocus(),c=a>=t.current;return l&&c},[])}const dF={open:0,close:0},pF={opacity:1,transform:"none"},jx=v.createContext(null);function Xi(e){const t=v.useContext(jx);if(!t)throw new Error(`${e} must be used within LegacyMenu`);return t}function AO(){return Xi("LegacyMenu.useContext")}function hF({children:e,open:t,defaultOpen:n=!1,onOpenChange:r,activeIndex:s,onActiveIndexChange:a,placement:l="bottom-start",offset:c=4,flip:f=!0,closeOnSelect:d,instantClose:h=!1,instantTransitions:m=!1,returnFocusOnSelect:b=!0,returnFocus:y,focusItemOnOpen:k=!1,virtualFocus:S=!1,shouldKeepOpenDuringDrag:C=!1,lockPositionWhileOpen:E=!1,dismissOnReferenceScroll:T=!1,enableClick:R=!0,strategy:_,shouldDismissOutsidePress:D}){const A=Cx(),[I,P]=Ml(t,n,r,"LegacyMenu.Root (open)"),[$,O]=v.useState(""),Y=v.useRef(null),[U,B]=v.useState(!1),[j,q]=v.useState(!1),[H,W]=Ml(s,null,a,"LegacyMenu.Root (activeIndex)"),{focusItemOnHoverEnabled:F,markKeyboardNavigation:K,markPointerNavigation:N,resetFocusItemOnHover:z}=CO(),V=v.useRef([]),L=v.useRef([]),Z=v.useRef(null),re=v.useCallback(Pe=>{P(Pe),Pe?(O(""),Z.current=null):W(null),z()},[z,P,W]),ie=v.useRef(!1);v.useLayoutEffect(()=>{const Pe=ie.current;ie.current=I,!Pe&&I&&O(""),Pe!==I&&z()},[I,z]);const{refs:ae,floatingStyles:le,middlewareData:ce,context:Ee,update:be}=Ox({nodeId:A,open:I,onOpenChange:re,placement:l,strategy:_,middleware:[nx(c),...f?[ix()]:[],rx(),sx({padding:8,apply({availableHeight:Pe,elements:Ye}){Ye.floating.style.setProperty(Mx,`${Math.max(0,Math.floor(Pe))}px`)}}),fF()],whileElementsMounted:E?void 0:Lp,transform:!1}),ue=EN(Ee,{enabled:j,delay:{open:75},handleClose:jN({blockPointerEvents:!0,requireIntent:!1})}),ge=_N(Ee,{enabled:R&&!j}),Se=Kh(),Ae=v.useCallback(Pe=>D!==void 0&&!D(Pe)||C&&bi.getInstance().hasData()?!1:Se(Pe),[D,C,Se]),ke=AN(Ee,{ancestorScroll:T,outsidePressEvent:"click",outsidePress:Ae}),xe=IN(Ee,{role:"menu"}),Ce=ON(Ee,{listRef:V,activeIndex:H,onNavigate:W,loop:!1,virtual:S||U,focusItemOnOpen:k,focusItemOnHover:F}),Me=DN(Ee,{listRef:L,activeIndex:H,onMatch:U?void 0:W,enabled:!U}),{getReferenceProps:ze,getFloatingProps:Fe,getItemProps:ye}=NN([ue,ge,ke,xe,Ce,Me]),_e=TO(ye,I),ee=v.useCallback(Pe=>({...SO(ze(Pe)),ref:ae.setReference,"aria-haspopup":"menu","aria-expanded":I}),[ze,ae.setReference,I]),fe=m?{duration:dF,initial:pF}:X5(h?{closeDuration:0}:void 0),{isMounted:Q,styles:ne}=MN(Ee,fe),we=v.useMemo(()=>({isOpen:I,isMounted:Q,setIsOpen:P,activeIndex:H,setActiveIndex:W,markKeyboardNavigation:K,markPointerNavigation:N,virtualFocus:S,searchValue:$,setSearchValue:O,hasSearchInput:U,setHasSearchInput:B,enableHover:j,setHasHoverTrigger:q,closeOnSelect:d,returnFocusOnSelect:b,returnFocus:y,nodeId:A,activeDescendantIdPrefix:U?A:void 0,listRef:V,labelsRef:L,searchInputRef:Y,refs:ae,floatingStyles:le,middlewareData:ce,transitionStyles:ne,context:Ee,updateFloating:be,getReferenceProps:ze,getFloatingProps:Fe,getItemProps:_e,getTriggerProps:ee,dismissCauseRef:Z,shouldAllowPointerInteraction:Ae}),[I,Q,P,H,W,K,N,S,$,U,j,d,b,y,A,ae,le,ce,ne,Ee,be,ze,Fe,_e,ee,Ae]);return g.jsx(Rx,{id:A,children:g.jsx(jx.Provider,{value:we,children:g.jsx(Xy,{children:e})})})}function Xu(e,t){return n=>{e?.(n),n.defaultPrevented||t(n)}}function Gl(e,t){switch(e){case"ArrowLeft":return t==="rtl"?"end":"start";case"ArrowRight":return t==="rtl"?"start":"end";default:return null}}const mF=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),gF={_zod:{output:{}},safeParse:e=>mF(e)?{success:!0}:{success:!1,error:new TypeError("drag payload must be an object")}};function NO(e,t=()=>gF){var a;let n=null;const r=()=>(n===null&&(n=t()),n);return a=class{constructor(c){this.type=e,this.payload=c}static get schema(){return r()}},a.type=e,a}const bF=v.createContext(null);function yF(){return v.useContext(bF)}const vF=v.createContext("copy-with-plain-text");function xF(){return v.useContext(vF)}const kF="application/x-cursor-draggable",Vd=wF("ui-i9pz9s"),SF="data-no-drag";let ta=!1,gT=!1;function wF(e){return e?.split(/\s+/).filter(Boolean)??[]}function Gd(e,t,n){for(const r of t)e.classList.toggle(r,n)}function EF(){if(gT||typeof document>"u")return;gT=!0,document.addEventListener("pointerdown",t=>{if(t.button!==0||!(t.target instanceof Element)){ta=!1;return}ta=t.target.closest(`[${SF}]`)!==null},{capture:!0});const e=()=>{ta=!1};document.addEventListener("pointerup",e,{capture:!0}),document.addEventListener("pointercancel",e,{capture:!0})}function TF({id:e,data:t,disabled:n=!1,dragImageOffset:r,onDragStart:s,onDragEnd:a}){const l=yF(),c=xF(),f=v.useRef(null),d=v.useRef({onDragStart:s,onDragEnd:a});d.current={onDragStart:s,onDragEnd:a};const h=v.useRef(t);h.current=t;const m=v.useRef(r);m.current=r;const b=v.useRef(l);b.current=l;const y=l?.activeDragId===e,k=v.useRef(y);return k.current=y,v.useEffect(()=>{const C=f.current;if(C)return Gd(C,Vd,!n&&y),()=>{Gd(C,Vd,!1)}},[n,y]),v.useEffect(()=>{const C=f.current;if(!C)return;if(n){C.removeAttribute("aria-grabbed");return}const E=y?"true":"false";C.getAttribute("aria-grabbed")!==E&&C.setAttribute("aria-grabbed",E)},[n,y]),{ref:v.useCallback(C=>{if(f.current=C,!C)return;Gd(C,Vd,!n&&k.current);const E=!n;if(C.draggable!==E&&(C.draggable=E),n)return;EF();const T=bi.getInstance(),R=D=>{if(ta){ta=!1,D.preventDefault(),D.stopPropagation();return}const A=h.current;T.setData(A);const I=C.ownerDocument,P=()=>{I.removeEventListener("dragend",P,!0),I.removeEventListener("drop",P,!0),I.removeEventListener("mousemove",P,!0),setTimeout(()=>{T.getData()===A&&(T.clearData(),ta=!1,b.current?.setDragging(null,null))},0)};if(I.addEventListener("dragend",P,!0),I.addEventListener("drop",P,!0),I.addEventListener("mousemove",P,!0),D.dataTransfer){const $=c==="copy-with-plain-text";D.dataTransfer.effectAllowed=$?"copyMove":"move",D.dataTransfer.setData(kF,A.type),$&&D.dataTransfer.setData("text/plain",A.type);const O=m.current;O&&D.dataTransfer.setDragImage(C,O.x,O.y)}b.current?.setDragging(e,A,{x:D.clientX,y:D.clientY}),d.current.onDragStart?.(D)},_=D=>{T.clearData(),ta=!1,b.current?.setDragging(null,null),d.current.onDragEnd?.(D)};return C.addEventListener("dragstart",R),C.addEventListener("dragend",_),()=>{C.removeEventListener("dragstart",R),C.removeEventListener("dragend",_),Gd(C,Vd,!1)}},[e,n,c]),isDragging:y}}const Sp={base:{"--ui-menu-row-padding-block":"ui-kd6fbz","--ui-menu-row-padding-inline":"ui-1ucplye","--ui-menu-row-gap":"ui-1fi38xd","--ui-menu-row-border-radius":"ui-s7jddj","--ui-menu-item-left-width":"ui-1bm229x","--ui-menu-item-left-height":"ui-1eaezr9","--ui-menu-search-row-padding-top":"ui-so2ig8","--ui-menu-section-title-padding-inline":"ui-e020nh",kMeerF:"ui-1k57tk5",k3XXqK:"ui-1t137rt",kInvED:"ui-1wfwxd8",kjBf7l:"ui-1uczgqu",kY2c9j:"ui-fc2p8",kVAEAm:"ui-1n2onr6",kGVxlE:"ui-1gnnqk1",k7Eaqz:"ui-1i9suas",ks0D6T:"ui-1va8c73",kfSwDN:"ui-87ps6o",kY4cRS:"ui-lvsv26",k6sLGO:"ui-1q1rmc8",k3aq6I:"ui-17dzmu4",kgyCeQ:"ui-lp1x4z",kdrBUz:"ui-7iibnf",kHBbk8:"ui-c8icb0",ktR8K2:"ui-awy1a7",kgeoSG:"ui-1cpjm7i",kEoFBp:"ui-1hmns74",kFcpXp:"ui-xx281p",kPB484:"ui-xyica1",ktNmms:"ui-wfqmlb",km8f2m:"ui-kk1bqk",k5JduY:"ui-1s928wv",kwXMNM:"ui-1j6awrg",kv0HGH:"ui-arstr8",kDVEDD:"ui-itxdhh",kUfP38:"ui-1k48kgn",kbMawA:"ui-1o7vem3",kloYau:"ui-2q1x1w",$$css:!0},sizeMd:{"--ui-menu-row-padding-block":"ui-1jjxvf6","--ui-menu-row-padding-inline":"ui-18k90n9","--ui-menu-row-gap":"ui-vzyzmz","--ui-menu-item-left-width":"ui-eurstk","--ui-menu-item-left-height":"ui-1eaezr9","--ui-menu-search-row-padding-top":"ui-14atyw8","--ui-menu-section-title-padding-inline":"ui-mhevzc",kaIpWk:"ui-1pkpdue",$$css:!0},hasAttachment:{kWkggS:"ui-jbqb8w",k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",khm7nJ:"ui-3r2rup",kP1sEF:"ui-15ozc13",kc3QkE:"ui-1h1zc6f",$$css:!0},dropIndicator:{kMeerF:"ui-1qgsegg",k3XXqK:"ui-aatb59",kjBf7l:"ui-pkz39j",kInvED:"ui-1jn6s22",k5JduY:"ui-1s928wv",kwXMNM:"ui-1j6awrg",kc1e00:"ui-cfinr5",kH8aOt:"ui-14idyls",k3foIR:"ui-17mrvg7",k4zj60:"ui-1d1o5dh",ks3ayO:"ui-1ssvodr",kUfP38:"ui-gad8h8",kloYau:"ui-2q1x1w",kDVEDD:"ui-itxdhh",$$css:!0}},CF={base:{kVAEAm:"ui-ixxii4",kpwlN0:"ui-10a8y8t",kY2c9j:"ui-cfsmg2",kLKAdn:"ui-exx8yu",kwRFfy:"ui-yri2b",kGO01o:"ui-18d9i69",kZCmMZ:"ui-1c1uobl",keoZOQ:"ui-dj266r",k71WvV:"ui-14z9mp",k1K539:"ui-at24cr",keTefX:"ui-1lziwak",kEafiO:"ui-972fbf",kPef9Z:"ui-1ejq31n",kLZC3w:"ui-1b4hy2t",ke9TFa:"ui-10w94by",k8ry5P:"ui-18oe1m7",kBCPoo:"ui-1273586",kt9PQ7:"ui-1qhh985",kfdmCh:"ui-1sy0etr",kL6WhQ:"ui-1tnzt7h",k2ei4v:"ui-14e42zd",kVhnKS:"ui-stzfhl",kGJrpR:"ui-1mi4oqr",kysU6D:"ui-jyslct",kkrTdU:"ui-t0e3qv",kWkggS:"ui-jbqb8w",kY4cRS:"ui-lvsv26",$$css:!0}},xi={dropIndicatorSlot:{k1xSpc:"ui-jp7ctv",kfzvcC:"ui-47corl",$$css:!0},inner:{kLKAdn:"ui-12ryuzz",kwRFfy:"ui-opxd5p",kGO01o:"ui-ftabeb",kZCmMZ:"ui-1bpcb8s",k2VNRW:"ui-1aj3mmm",$$css:!0},layout:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kAzted:"ui-2lwn1j",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",$$css:!0},bodyScroll:{kzQI83:"ui-1iyjqo2",kmuXW:"ui-s83m0k",kCS8Yb:"ui-dl72j9",kAzted:"ui-2lwn1j",$$css:!0},header:{kLKAdn:"ui-f6zju3",kwRFfy:"ui-1tlft3r",kGO01o:"ui-cnij5n",kZCmMZ:"ui-tw3t59",kt9PQ7:"ui-so031l",kfdmCh:"ui-1q0q8m5",kL6WhQ:"ui-17fyfba",$$css:!0},footer:{kLKAdn:"ui-f6zju3",kwRFfy:"ui-1tlft3r",kGO01o:"ui-cnij5n",kZCmMZ:"ui-tw3t59",kEafiO:"ui-178xt8z",kPef9Z:"ui-13fuv20",kLZC3w:"ui-1aeic0j",$$css:!0},layoutCard:{kVAEAm:"ui-1n2onr6",kWkggS:"ui-f1vpex",kaIpWk:"ui-1pjcqnp",kGVxlE:"ui-1x78n9t",$$css:!0},attachment:{kVAEAm:"ui-1n2onr6",kmuXW:"ui-2lah0s",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kWkggS:"ui-f1vpex",kaIpWk:"ui-1pjcqnp",kGVxlE:"ui-1x78n9t",$$css:!0},list:{kH6xsr:"ui-3ct3a4",keoZOQ:"ui-dj266r",k71WvV:"ui-14z9mp",k1K539:"ui-at24cr",keTefX:"ui-1lziwak",kLKAdn:"ui-exx8yu",kwRFfy:"ui-yri2b",kGO01o:"ui-18d9i69",kZCmMZ:"ui-1c1uobl",k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kOIVth:"ui-1374kml",$$css:!0},virtualizedList:{kOIVth:"ui-xhr3t",$$css:!0},virtualizedRow:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kGNEyG:"ui-1qjc9v5",kB7OPa:"ui-9f619",$$css:!0},virtualizedScroller:{kzqmXN:"ui-h8yej3",kXHlph:"ui-6ikm8r",k5wCbM:"ui-1rohswg",kAnDOJ:"ui-6ehuon",kOuLrU:"ui-fk6m8",$$css:!0}},Bi={base:{k1xSpc:"ui-78zum5",kXwgrk:"ui-1q0g3np",kGNEyG:"ui-1cy8zhl",kB7OPa:"ui-9f619",kAzted:"ui-bpgt9h",kOIVth:"ui-1kk7d6x",kMeerF:"ui-1k57tk5",k3XXqK:"ui-1t137rt",kInvED:"ui-1wfwxd8",kjBf7l:"ui-1uczgqu",kLKAdn:"ui-1xgckd",kwRFfy:"ui-yupq46",kGO01o:"ui-1mv37q2",kZCmMZ:"ui-1xc7y5k",kaIpWk:"ui-1w5zb4f",kkrTdU:"ui-1ypdohk",kWkggS:"ui-jbqb8w",$$css:!0},focused:{kWkggS:"ui-flfp0o",$$css:!0},submenuHover:{kWkggS:"ui-qjnua1",$$css:!0},selected:{kWkggS:"ui-i07v4r",$$css:!0},disabled:{kMwMTN:"ui-4b2ntj",kkrTdU:"ui-t0e3qv",$$css:!0},disabledFocused:{kWkggS:"ui-jbqb8w",$$css:!0},muted:{kMwMTN:"ui-1e4uaio",$$css:!0},mutedFocused:{kMwMTN:"ui-19aaqeu",$$css:!0},indent:{kZCmMZ:"ui-bp56qb",$$css:!0},expanded:{kWkggS:"ui-flfp0o",$$css:!0}},Yi={left:{kmuXW:"ui-2lah0s",kMwMTN:"ui-r88yfa",k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kzqmXN:"ui-1kvrb00",kZKoxP:"ui-g2ss61",$$css:!0},leftWide:{kzqmXN:"ui-1td3qas",$$css:!0},content:{kUk6DE:"ui-98rzlu",k7Eaqz:"ui-euugli",k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kjj79g:"ui-1qughib",$$css:!0},right:{kmuXW:"ui-2lah0s",k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kMwMTN:"ui-19aaqeu",kZKoxP:"ui-g2ss61",$$css:!0},rightDisabled:{kMwMTN:"ui-1e4uaio",$$css:!0},rightHidden:{k33iCy:"ui-lshs6z",$$css:!0},submenuRight:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kOIVth:"ui-11twubx",k7Eaqz:"ui-euugli",$$css:!0},wrapper:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",k7Eaqz:"ui-euugli",kUk6DE:"ui-98rzlu",kLWn49:"ui-1evy7pa",$$css:!0},title:{kzqmXN:"ui-h8yej3",kUk6DE:"ui-98rzlu",k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kOIVth:"ui-11twubx",$$css:!0},description:{k63SB2:"ui-20ajya",kMwMTN:"ui-4b2ntj",$$css:!0}},ra={wrapper:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kUk6DE:"ui-98rzlu",k7Eaqz:"ui-euugli",$$css:!0},wrapperInline:{kXwgrk:"ui-1q0g3np",kGNEyG:"ui-1pha0wt",kOIVth:"ui-ehausa",$$css:!0},title:{kMwMTN:"ui-1wd3ewq",$$css:!0},titleInline:{kzQI83:"ui-1ikap7u",kmuXW:"ui-2lah0s",kCS8Yb:"ui-1r8uery",k7Eaqz:"ui-euugli",ks0D6T:"ui-1t8xbu",$$css:!0},subtitle:{kMwMTN:"ui-4b2ntj",$$css:!0},subtitleInline:{kzQI83:"ui-gyuaek",kmuXW:"ui-2lah0s",kCS8Yb:"ui-1r8uery",k7Eaqz:"ui-euugli",ks0D6T:"ui-1t8xbu",$$css:!0},subtitleWrap:{khDVqt:"ui-eaf4i8",kXHlph:"ui-1plvlek",kORKVm:"ui-ryxfnj",kg5iWk:"ui-brixnn",$$css:!0}},Jp={wrapper:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kOIVth:"ui-1374kml",kEbPVU:"ui-g259vi",kisVnR:"ui-141yacn",kPhN0D:"ui-xacq05",kCI4qJ:"ui-119sr6i",kflGA3:"ui-144guhz",kuQXTp:"ui-yhg72o",k8KjL7:"ui-o6llqc",k6ANuI:"ui-qapjow",kzNLci:"ui-13cyfv6",kvgbxY:"ui-449esf",kSChS3:"ui-i7iayf",kW5UhK:"ui-43qgld",kIK0UP:"ui-16isvt",kKhlpd:"ui-1s6a5gi",kWPmei:"ui-f2yixb",k1ZCP1:"ui-9ymq9g",k8vVtf:"ui-8il1zj",kXJ5VR:"ui-tv04z4",kFqVbU:"ui-al8qud",k3zOy0:"ui-bvt3p7",kYzy8m:"ui-1b3rhy7",k4QksK:"ui-azug9i",kA8bO0:"ui-p35uty",kOegPX:"ui-11nj3wz",kMHwGy:"ui-1db8ipi",kcy3WD:"ui-1xjs8pl",k1e9jE:"ui-1lnrnqe",kSTvrD:"ui-ejpia5",kvV0by:"ui-6xymf4",kysnry:"ui-1hw1hzy",$$css:!0},title:{kLKAdn:"ui-f6zju3",kwRFfy:"ui-fp2jl6",kGO01o:"ui-cnij5n",kZCmMZ:"ui-vc46pw",kMwMTN:"ui-4b2ntj",$$css:!0},titleAction:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kjj79g:"ui-1qughib",kOIVth:"ui-ehausa",$$css:!0},textAction:{kmuXW:"ui-2lah0s",kEafiO:"ui-972fbf",ke9TFa:"ui-10w94by",kt9PQ7:"ui-1qhh985",k2ei4v:"ui-14e42zd",kWkggS:"ui-jbqb8w",kLKAdn:"ui-exx8yu",kwRFfy:"ui-yri2b",kGO01o:"ui-18d9i69",kZCmMZ:"ui-1c1uobl",kMv6JI:"ui-jb2p0i",kGuDYH:"ui-1qlqyl8",k63SB2:"ui-1pd3egz",kLWn49:"ui-15bjb6t",kMwMTN:"ui-4b2ntj ui-7gh5u8",kkrTdU:"ui-1ypdohk",kaIpWk:"ui-1e1y6u3",k1ekBW:"ui-1oy24xj",kIyJzY:"ui-g3p6pi ui-sagj69",kAMwcw:"ui-6ekqhr",kMeerF:"ui-1k57tk5 ui-784prv",k3XXqK:"ui-1t137rt ui-9v5kkp",kInvED:"ui-1wfwxd8 ui-7s97pk",kjBf7l:"ui-1uczgqu ui-1725o6r",$$css:!0}},RF={divider:{k1xSpc:"ui-1lliihq",kEafiO:"ui-jpjugk",kPef9Z:"ui-13fuv20",kLZC3w:"ui-14av3n6",keoZOQ:"ui-15lde7i",k71WvV:"ui-1av4zx7",k1K539:"ui-4qbr5s",keTefX:"ui-3f5ixz",kfzvcC:"ui-47corl",$$css:!0}},_F={row:{kLKAdn:"ui-fs8kq3",kwRFfy:"ui-yupq46",kGO01o:"ui-b6dno7",kZCmMZ:"ui-1xc7y5k",$$css:!0}},Zy={surface:{kzqmXN:"ui-1oysuqx",kskxy:"ui-uyqlj2",kORKVm:"ui-1odjw0f",kfzvcC:"ui-67bb7w",k5wCbM:"ui-1597r2g",k6w4Gs:"ui-xkn5u1",$$css:!0},surfaceMedium:{kzqmXN:"ui-ezivpi",ks0D6T:"ui-y2m5lo",$$css:!0},surfaceWide:{kzqmXN:"ui-ezivpi",ks0D6T:"ui-c74ic2",$$css:!0}},eh={empty:{kLKAdn:"ui-f6zju3",kwRFfy:"ui-t1q3vd",kGO01o:"ui-cnij5n",kZCmMZ:"ui-8fiw5y",kMwMTN:"ui-4b2ntj",k9WMMc:"ui-2b8uid",$$css:!0},emptyIndent:{kZCmMZ:"ui-14o0yop",$$css:!0},loading:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kOIVth:"ui-ehausa",kLKAdn:"ui-13ly8rp",kwRFfy:"ui-t1q3vd",kGO01o:"ui-1xlntvz",kZCmMZ:"ui-8fiw5y",kMwMTN:"ui-4b2ntj",$$css:!0},loadingSpinner:{k44tkh:"ui-1s1fvk8",$$css:!0}};function AF(e,t=!1){return[eN,Sp.base,_s.root,e==="md"&&Sp.sizeMd,t&&Sp.hasAttachment]}function NF(e=!1){return e&&Sp.dropIndicator}function OF(){return CF.base}function IF(){return xi.inner}function MF(){return xi.dropIndicatorSlot}function DF(e=!1){return[xi.layout,e&&xi.layoutCard,e&&zh.border]}function LF(){return[xi.attachment,zh.border]}function OO(){return xi.bodyScroll}function jF(){return xi.header}function zF(){return xi.footer}function PF(e=!1){return[xi.list,e&&xi.virtualizedList]}function $F(){return xi.virtualizedRow}function BF(){return xi.virtualizedScroller}function zx(e={}){return[Bi.base,e.selected&&Bi.selected,e.inSubmenu&&!e.disabled&&Bi.submenuHover,e.focused&&Bi.focused,e.expanded&&Bi.expanded,e.disabled&&Bi.disabled,e.disabled&&e.focused&&Bi.disabledFocused,e.variant==="muted"&&Bi.muted,e.variant==="muted"&&e.focused&&Bi.mutedFocused,e.indent&&Bi.indent]}const FF={disabled:{kkrTdU:"ui-1h6gzvc",$$css:!0}};function UF(){return FF.disabled}function qF(e={}){return[Yi.left,e.wideLeft&&Yi.leftWide]}function HF(){return Yi.content}function VF(e={}){return[Yi.right,e.disabled&&Yi.rightDisabled,e.trailingHidden&&Yi.rightHidden]}function GF(){return Yi.submenuRight}function WF(){return Yi.wrapper}function KF(){return[Hl.root,Yi.title]}function YF(){return[Ds.root,Hl.root,Yi.description]}function XF(e){return[ra.wrapper,e&&ra.wrapperInline]}function ZF(e){return[Hl.root,ra.title,e&&ra.titleInline]}function QF({inline:e,wrap:t}){return[Ds.root,Hl.root,ra.subtitle,e&&ra.subtitleInline,t&&ra.subtitleWrap]}function JF(){return _F.row}function eU(){return Jp.wrapper}function tU(e){return[Ds.root,Jp.title,e&&Jp.titleAction]}function nU(){return Jp.textAction}function rU(){return RF.divider}function Px(){return Zy.surface}function IO(e){switch(e){case"default":return;case"medium":return Zy.surfaceMedium;case"wide":return Zy.surfaceWide;default:return e}}function iU(e){return[Ds.root,eh.empty,e&&eh.emptyIndent]}function sU(){return[_s.root,eh.loading]}function oU(){return eh.loadingSpinner}const MO=v.createContext(null);function af(e){const t=v.useContext(MO);if(!t)throw new Error(`${e} must be used within LegacyMenu.Content or LegacyMenu.SubMenuContent`);return t}function DO({children:e,activeIndex:t,setIsOpen:n,getItemProps:r,searchValue:s,closeOnSelect:a,virtualFocus:l=!1,activeDescendantIdPrefix:c}){const f=v.useMemo(()=>({activeIndex:t,setIsOpen:n,getItemProps:r,searchValue:s,closeOnSelect:a,virtualFocus:l,activeDescendantIdPrefix:c}),[t,n,r,s,a,l,c]);return g.jsx(MO.Provider,{value:f,children:e})}const LO=v.createContext(void 0);function Yh(e){const t=v.useContext(LO);if(t===void 0&&!e)throw new Error(Nn(72));return t}const aU={...lA,disabled:tt(e=>e.disabled),instantType:tt(e=>e.instantType),isInstantPhase:tt(e=>e.isInstantPhase),trackCursorAxis:tt(e=>e.trackCursorAxis),disableHoverablePopup:tt(e=>e.disableHoverablePopup),lastOpenChangeReason:tt(e=>e.openChangeReason),closeOnClick:tt(e=>e.closeOnClick),closeDelay:tt(e=>e.closeDelay),hasViewport:tt(e=>e.hasViewport)};class $x extends lx{constructor(t,n,r=!1){const s=new _h,a={...lU(),...t};a.floatingRootContext=oA(s,n,r),super(a,{popupRef:v.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:s},aU)}setOpen=(t,n)=>{J_(this,t,n,{extraState:{openChangeReason:n.reason}})};cancelPendingOpen(t){this.state.floatingRootContext.dispatchOpenChange(!1,Ct(Bl,t))}static useStore(t,n){return Q_(t,(s,a)=>new $x(n,s,a)).store}}function lU(){return{...sA(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1}}const uU=ax(function(t){const{disabled:n=!1,defaultOpen:r=!1,open:s,disableHoverablePopup:a=!1,trackCursorAxis:l="none",actionsRef:c,onOpenChange:f,onOpenChangeComplete:d,handle:h,triggerId:m,defaultTriggerId:b=null,children:y}=t,k=$x.useStore(h?.store,{open:r,openProp:s,activeTriggerId:b,triggerIdProp:m});eA(k,s,r,b),k.useControlledProp("openProp",s),k.useControlledProp("triggerIdProp",m),k.useContextCallback("onOpenChange",f),k.useContextCallback("onOpenChangeComplete",d);const S=k.useState("open"),C=!n&&S,E=k.useState("activeTriggerId"),T=k.useState("mounted"),R=k.useState("payload");k.useSyncedValues({trackCursorAxis:l,disableHoverablePopup:a}),k.useSyncedValue("disabled",n),nA(k,{closeOnActiveTriggerUnmount:!0});const{forceUnmount:_,transitionStatus:D}=rA(C,k),A=k.useState("isInstantPhase"),I=k.useState("instantType"),P=k.useState("lastOpenChangeReason"),$=v.useRef(null);Ve(()=>{S&&n&&k.setOpen(!1,Ct(a_))},[S,n,k]),Ve(()=>{D==="ending"&&P===Oi||D!=="ending"&&A?(I!=="delay"&&($.current=I),k.set("instantType","delay")):$.current!==null&&(k.set("instantType",$.current),$.current=null)},[D,A,P,I,k]),Ve(()=>{C&&E==null&&k.set("payload",void 0)},[k,E,C]);const O=v.useCallback(()=>{k.setOpen(!1,Ct(_p))},[k]);v.useImperativeHandle(c,()=>({unmount:_,close:O}),[_,O]);const Y=C||T||!n&&l!=="none";return g.jsxs(LO.Provider,{value:k,children:[Y&&g.jsx(cU,{store:k,disabled:n,trackCursorAxis:l}),typeof y=="function"?y({payload:R}):y]})});function cU({store:e,disabled:t,trackCursorAxis:n}){const r=e.useState("floatingRootContext"),s=ex(r,{enabled:!t,referencePress:()=>e.select("closeOnClick")}),a=AP(r,{enabled:!t&&n!=="none",axis:n==="none"?void 0:n}),l=v.useMemo(()=>Wi(a.reference,s.reference),[a.reference,s.reference]),c=v.useMemo(()=>Wi(a.trigger,s.trigger),[a.trigger,s.trigger]),f=v.useMemo(()=>Wi(ux,a.floating,s.floating),[a.floating,s.floating]);return iA(e,{activeTriggerProps:l,inactiveTriggerProps:c,popupProps:f}),null}const fU=v.createContext(void 0);function dU(){return v.useContext(fU)}let pU=(function(e){return e[e.popupOpen=Rp.popupOpen]="popupOpen",e.triggerDisabled="data-trigger-disabled",e})({});const hU=600,jO="data-base-ui-tooltip-trigger";function bT(e){if("composedPath"in e){const n=e.composedPath();for(let r=0;r<n.length;r+=1){const s=n[r];if(gt(s))return s}}const t=e.target;return gt(t)?t:null}function mU(e){let t=e;for(;t;){if(t.hasAttribute(jO))return t;const n=t.parentElement;if(n){t=n;continue}const r=t.getRootNode();t="host"in r&&gt(r.host)?r.host:null}return null}const gU=Y_(function(t,n){const{render:r,className:s,style:a,handle:l,payload:c,disabled:f,delay:d,closeOnClick:h=!0,closeDelay:m,id:b,...y}=t,k=Yh(!0),S=l?.store??k;if(!S)throw new Error(Nn(82));const C=Fl(b),E=S.useState("isTriggerActive",C),T=S.useState("isOpenedByTrigger",C),R=S.useState("floatingRootContext"),_=v.useRef(null),D=d??hU,A=m??0,{registerTrigger:I,isMountedByThisTrigger:P}=tA(C,_,S,{payload:c,closeOnClick:h,closeDelay:A}),$=dU(),{delayRef:O,isInstantPhase:Y,hasProvider:U}=Gz(R,{open:T}),B=dx(R);S.useSyncedValue("isInstantPhase",Y);const j=S.useState("disabled"),q=f??j,H=An(q),W=S.useState("trackCursorAxis"),F=S.useState("disableHoverablePopup"),K=v.useRef(!1),N=yi(),z=v.useRef(void 0);function V(){const ue=$?.delay,ge=typeof O.current=="object"?O.current.open:void 0;let Se=D;return U&&(ge!==0?Se=d??ue??D:Se=0),Se}function L(ue){const ge=_.current;if(!ge||!ue)return!1;const Se=mU(ue);return Se!==null&&Se!==ge&&ht(ge,Se)}function Z(ue){const ge=L(ue);return K.current=ge,ge&&(B.openChangeTimeout.clear(),B.restTimeout.clear(),B.restTimeoutPending=!1,N.clear()),ge}const re=pA(R,{enabled:!q,mouseOnly:!0,move:!1,handleClose:!F&&W!=="both"?hA():null,restMs:V,delay(){const ue=typeof O.current=="object"?O.current.close:void 0;let ge=A;return m==null&&U&&(ge=ue),{close:ge}},triggerElementRef:_,isActiveTrigger:E,isClosing:()=>S.select("transitionStatus")==="ending",shouldOpen(){return!K.current}}),ie=cA(R,{enabled:!q}).reference,ae=ue=>{const ge=K.current,Se=bT(ue),Ae=Z(Se),ke=_.current,xe=ke&&Se&&ht(ke,Se);if(Ae&&S.select("open")&&S.select("lastOpenChangeReason")===Sr){S.setOpen(!1,Ct(Sr,ue));return}if(ge&&!Ae&&xe&&!H.current&&!S.select("open")&&ke&&oa(z.current)){const Ce=()=>{!K.current&&!H.current&&!S.select("open")&&S.setOpen(!0,Ct(Sr,ue,ke))},Me=V();Me===0?(N.clear(),Ce()):N.start(Me,Ce)}},le=S.useState("triggerProps",P);return gn("button",t,{state:{open:T},ref:[n,I,_],props:[re,ie,P||W!=="none"?le:void 0,{onMouseOver(ue){ae(ue.nativeEvent)},onFocus(ue){L(bT(ue.nativeEvent))&&ue.preventBaseUIHandler()},onMouseLeave(){K.current=!1,N.clear(),z.current=void 0},onPointerEnter(ue){z.current=ue.pointerType},onPointerDown(ue){z.current=ue.pointerType,S.set("closeOnClick",h),h&&!S.select("open")&&S.cancelPendingOpen(ue.nativeEvent)},onClick(ue){h&&!S.select("open")&&S.cancelPendingOpen(ue.nativeEvent)},id:C,[pU.triggerDisabled]:q?"":void 0,[jO]:q?void 0:""},y],stateAttributesMapping:r_})}),zO=v.createContext(void 0);function bU(){const e=v.useContext(zO);if(e===void 0)throw new Error(Nn(70));return e}const yU=v.forwardRef(function(t,n){const{keepMounted:r=!1,...s}=t;return Yh().useState("mounted")||r?g.jsx(zO.Provider,{value:r,children:g.jsx(KN,{ref:n,...s})}):null}),PO=v.createContext(void 0);function vU(){const e=v.useContext(PO);if(e===void 0)throw new Error(Nn(71));return e}const xU=v.forwardRef(function(t,n){const{render:r,className:s,anchor:a,positionMethod:l="absolute",side:c="top",align:f="center",sideOffset:d=0,alignOffset:h=0,collisionBoundary:m="clipping-ancestors",collisionPadding:b=5,arrowPadding:y=5,sticky:k=!1,disableAnchorTracking:S=!1,collisionAvoidance:C=__,style:E,...T}=t,R=Yh(),_=bU(),D=R.useState("open"),A=R.useState("mounted"),I=R.useState("trackCursorAxis"),P=R.useState("disableHoverablePopup"),$=R.useState("floatingRootContext"),O=R.useState("instantType"),Y=R.useState("transitionStatus"),U=R.useState("hasViewport"),B=Sx({anchor:a,positionMethod:l,floatingRootContext:$,mounted:A,side:c,sideOffset:d,align:f,alignOffset:h,collisionBoundary:m,collisionPadding:b,sticky:k,arrowPadding:y,disableAnchorTracking:S,keepMounted:_,collisionAvoidance:C,adaptiveOrigin:U?VA:void 0}),j=v.useMemo(()=>({open:D,side:B.side,align:B.align,anchorHidden:B.anchorHidden,instant:I!=="none"?"tracking-cursor":O}),[D,B.side,B.align,B.anchorHidden,I,O]),q=wx(t,j,{styles:B.positionerStyles,transitionStatus:Y,props:T,refs:[n,R.useStateSetter("positionerElement")],hidden:!A,inert:!D||I==="both"||P});return g.jsx(PO.Provider,{value:B,children:q})}),kU={...Wc,...To},SU=v.forwardRef(function(t,n){const{render:r,className:s,style:a,...l}=t,c=Yh(),{side:f,align:d}=vU(),h=c.useState("open"),m=c.useState("instantType"),b=c.useState("transitionStatus"),y=c.useState("popupProps"),k=c.useState("floatingRootContext"),S=c.useState("disabled"),C=c.useState("closeDelay");_o({open:h,ref:c.context.popupRef,onComplete(){h&&c.context.onOpenChangeComplete?.(!0)}}),dA(k,{enabled:!S,closeDelay:C});const E=c.useStateSetter("popupElement");return gn("div",t,{state:{open:h,side:f,align:d,instant:m,transitionStatus:b},ref:[n,c.context.popupRef,E],props:[y,Dh(b),l],stateAttributesMapping:kU})}),wU=v.createContext(null),EU={base:{kfSwDN:"ui-87ps6o",kfzvcC:"ui-47corl",$$css:!0}},$O=v.createContext(null);function BO(e){const t=v.use($O);if(t===null)throw new Error(`${e} must be used within Tooltip.Root`);return t}function FO({children:e,placement:t=Ph,offset:n=8,openDelay:r=Tx,closeDelay:s=$h,disabled:a=!1,defaultOpen:l,open:c,sameAxisOnly:f=!1,onOpenChange:d,onOpenChangeComplete:h}){const m=v.use(wU),b=v.use(Zp),y=a||b,k=m?.open??r,S=m?.close??s,C=v.useRef(null),E=v.useMemo(()=>({close:()=>{C.current?.close()}}),[]),[T,R]=v.useState(),_=(A,I)=>{d?.(A,I),I.isCanceled||R(A?I.trigger?.id:void 0)},D=v.useMemo(()=>({disabled:y,instantDismiss:b,offset:n,openTriggerId:T,placement:t,sameAxisOnly:f,scrollDismissHandle:E,triggerCloseDelay:S,triggerDelay:k}),[y,b,n,T,t,f,E,S,k]);return g.jsx($O.Provider,{value:D,children:g.jsx(uU,{actionsRef:C,defaultOpen:l,disabled:y,disableHoverablePopup:!0,onOpenChange:_,onOpenChangeComplete:h,open:c,children:e})})}function UO({children:e,ref:t,...n}){const{disabled:r,triggerCloseDelay:s,triggerDelay:a}=BO("Tooltip.Trigger"),l=e.props?.id;return g.jsx(gU,{...n,closeDelay:s,delay:a,disabled:r,id:l??n.id,ref:t,render:e})}function qO({content:e,anchor:t,ariaLabel:n,width:r,minWidth:s,maxWidth:a}){const{instantDismiss:l,offset:c,openTriggerId:f,placement:d,sameAxisOnly:h,scrollDismissHandle:m}=BO("Tooltip.Popup"),b=ya(),y=nO(m,f),{side:k,align:S,sideOffset:C,alignOffset:E,collisionAvoidance:T,positionMethod:R}=Bh(d,c,h),_=jh(d4),D=zt(Ex,JA,p4,EU.base,Lh);return l?null:g.jsx(yU,{container:b??void 0,children:g.jsx(xU,{align:S,alignOffset:E,anchor:t,className:_.className,collisionAvoidance:T,collisionPadding:8,positionMethod:R,side:k,sideOffset:C,style:_.style,children:g.jsx(SU,{"aria-label":n,className:D.className,"data-component":"tooltip-popup",ref:y,role:"tooltip",style:r===void 0&&s===void 0&&a===void 0?D.style:{...D.style,width:r,minWidth:s,maxWidth:a},children:typeof e=="function"?e():e})})})}function TU({children:e,anchor:t,"aria-label":n,width:r,minWidth:s,maxWidth:a}){return g.jsx(qO,{anchor:t,ariaLabel:n,content:e,maxWidth:a,minWidth:s,width:r})}function Qy({children:e,content:t,placement:n,offset:r,openDelay:s,closeDelay:a,disabled:l,defaultOpen:c,open:f,"aria-label":d,width:h,minWidth:m,maxWidth:b,sameAxisOnly:y,onOpenChange:k,onOpenChangeComplete:S,ref:C,...E}){const T=v.Children.only(e);return v.isValidElement(T)?g.jsxs(FO,{closeDelay:a,defaultOpen:c,disabled:l,offset:r,onOpenChange:k,onOpenChangeComplete:S,open:f,openDelay:s,placement:n,sameAxisOnly:y,children:[g.jsx(UO,{...E,ref:C,children:T}),g.jsx(qO,{ariaLabel:d,content:t,maxWidth:b,minWidth:m,width:h})]}):g.jsx(g.Fragment,{children:e})}(function(e){e.Root=FO,e.Trigger=UO,e.Popup=TU})(Qy||(Qy={}));const CU="ui-menu",Bx="ui-menu__backdrop",RU="ui-menu__list",_U="ui-menu__content",AU="ui-menu__drop-indicator-slot",NU="ui-menu__layout",HO="ui-menu__body-scroll",OU="ui-menu__header",IU="ui-menu__footer",MU="ui-menu__attachment",DU="ui-menu__row",LU="ui-menu__item-left",jU="ui-menu__item-content",zU="ui-menu__item-right",PU="ui-menu__item-wrapper",$U="ui-menu__item-title",BU="ui-menu__item-description",FU="ui-menu__text-wrapper",UU="ui-menu__title",qU="ui-menu__subtitle",HU="ui-menu__search-row",VU="ui-menu__section",GU="ui-menu__section-title",WU="ui-menu__section-text-action",KU="ui-menu__virtualized-section-divider",YU="ui-menu__submenu-trigger",XU="ui-menu__submenu-right-section",ZU="ui-menu__toggle-row",QU="ui-menu__tooltip",JU="ui-menu__empty",e8="ui-menu__loading",t8="ui-menu__loading-spinner",n8="ui-menu__virtualized-row",r8="ui-menu__virtualized-scroller";function tn(e,t,n={}){return Yt({rootClass:e,stylexStyles:t,className:n.className,style:n.style})}function Fx({className:e,hasDropIndicator:t=!1,size:n,style:r,hasAttachment:s=!1,surfaceStyle:a}){return a=[NF(t),a],tn(CU,[AF(n,s),a],{className:e,style:r})}function VO(e){return tn(Bx,OF(),{style:e})}function Ux(e=!1,t){return tn(RU,[PF(e),t],{className:e?"ui-menu__list--virtualized":void 0})}function qx(e){return tn(_U,[IF(),e])}function i8(){return tn(AU,MF())}function Hx(e,t=!1,n){return tn(NU,[DF(t),n],{style:e})}function s8(){return tn(MU,LF())}function Vx(){return tn(OU,jF())}function Gx(){return tn(IU,zF())}function Wx(e={},t){return tn(DU,[{"ui--default-marker":"ui--default-marker",$$css:!0},zx(e),t],{className:e.className})}function o8(e={},t){return tn(ZU,[zx(e),e.disabled&&UF(),t],{className:e.className})}function a8(e={}){return tn(YU,zx(e),{className:e.className})}function l8(e={},t){return tn(LU,[qF(e),t])}function u8(e){return tn(jU,[HF(),e])}function c8(e={},t){return tn(zU,[VF(e),t])}function Kx(){return tn(PU,WF())}function Yx(){return tn($U,KF())}function Xx(){return tn(BU,YF())}function f8(e){return tn(FU,XF(e))}function d8(e){return tn(UU,ZF(e))}function p8({inline:e,wrap:t}){return tn(qU,QF({inline:e,wrap:t}))}function h8(e,t){return tn(HU,[JF(),t],{className:e})}function m8(e){return tn(VU,[eU(),e])}function GO(e,t){return tn(GU,[tU(e),t])}function g8(){return tn(WU,nU())}function b8(){return tn(KU,rU())}function y8(){return tn(XU,GF())}function v8(e,t){return tn(JU,[iU(e),t])}function x8(){return tn(e8,sU())}function k8(){return tn(n8,$F())}function S8(){return tn(r8,BF())}const w8=tn(t8,oU()).className,th="submenuOpenChange",Zx=v.createContext(null);function Qx(e){return Math.max(e,$h)}function Jx(){return v.use(Zx)}function e0({children:e,layerNodeId:t,placement:n="right-start"}){const r=No(),[s,a]=v.useState(new Set);v.useEffect(()=>{if(!r)return;const f=d=>{d.parentId===t&&a(h=>{const m=new Set(h);return d.isOpen?m.add(d.nodeId):m.delete(d.nodeId),m})};return r.events.on(th,f),()=>{r.events.off(th,f)}},[r,t]);const l=s.size>0,c=v.useMemo(()=>({hasOpenChild:l}),[l]);return g.jsx(Zx.Provider,{value:c,children:g.jsx(_c,{offset:6,placement:n,sameAxisOnly:!0,children:e})})}function E8({content:e,surfaceStyle:t}){return g.jsx(_c.Popup,{surfaceClassName:QU,surfaceStyle:[Px(),t],children:typeof e=="function"?e():e})}function WO({children:e,content:t,contentKey:n,disabled:r=!1,openDelay:s=0,closeDelay:a=0,surfaceStyle:l}){const c=v.use(Zx);return c==null?g.jsx(g.Fragment,{children:e}):g.jsx(_c.Trigger,{closeDelay:Qx(a),content:g.jsx(E8,{content:t,surfaceStyle:l}),contentKey:n,openDelay:s,disabled:r||c.hasOpenChild,children:e})}function T8(e,t){const n=No(),r=Ao();v.useEffect(()=>{if(!n||e===void 0)return;const s={nodeId:e,parentId:r,isOpen:t};return n.events.emit(th,s),()=>{t&&n.events.emit(th,{nodeId:e,parentId:r,isOpen:!1})}},[n,e,r,t])}function lf({children:e,content:t,contentKey:n,disabled:r=!1,openDelay:s=0,closeDelay:a=0,interactive:l=!0,surfaceStyle:c}){return Jx()!=null?g.jsx(WO,{closeDelay:a,content:t,contentKey:n,disabled:r,openDelay:s,surfaceStyle:c,children:e}):l?g.jsx(tO,{closeDelay:Qx(a),content:t,disabled:r,offset:6,openDelay:s,placement:"right",sameAxisOnly:!0,surfaceStyle:[Px(),c],children:e}):g.jsx(Qy,{closeDelay:a,content:t,disabled:r,offset:6,openDelay:s,placement:"right",sameAxisOnly:!0,children:e})}function Dl({children:e,disabled:t=!1,leading:n,trailing:r,rightFallback:s,trailingAccessory:a,trailingHidden:l=!1,wideLeft:c=!1,leadingStyle:f,contentStyle:d,trailingStyle:h}){const m=r??s,b=m!=null||a!=null,y=l8({wideLeft:c},f),k=u8(d),S=c8({disabled:t,trailingHidden:l},h);return g.jsxs(Ms,{iconSize:"base",children:[n!=null?g.jsx("span",{className:y.className,style:y.style,"data-component":"menu-item-left",children:n}):null,g.jsx("div",{className:k.className,style:k.style,"data-component":"menu-item-content",children:e}),b?g.jsxs("span",{className:S.className,style:S.style,"data-component":"menu-item-right",children:[m,a]}):null]})}const KO=v.createContext(!1);function uf(){return v.useContext(KO)}const Xh=v.createContext(null);function Zh(e){const t=v.useContext(Xh);if(!t)throw new Error(`${e} must be used within LegacyMenu.SubMenu`);return t}function C8(){return Zh("LegacyMenu.SubMenu.useContext")}function t0(){const e=v.useContext(Xh),{setIsOpen:t,dismissCauseRef:n}=AO();return v.useCallback(r=>{n.current="selection",r(!1),e!=null&&t(!1)},[e,t,n])}function n0(e,t,n){const{searchValue:r}=af(n);return t||!r||!e?!0:e.toLowerCase().includes(r.toLowerCase())}const R8=NO("@@menu-item-noop"),_8=new R8({}),YO=v.createContext(null);function A8(){return v.useContext(YO)}function XO({children:e,label:t,ignoreSearch:n=!1,...r}){const s=t??(typeof e=="string"?e:"");return n0(s,n,"LegacyMenu.Item")?g.jsx(ZO,{...r,contextPart:"LegacyMenu.Item",itemLabel:s,children:e}):null}function ZO({children:e,"data-testid":t,"aria-haspopup":n,"aria-expanded":r,mentionMenuFlatIndex:s,disabled:a=!1,onMouseDown:l,onAuxClick:c,onSelect:f,onKeyDown:d,leading:h,trailing:m,tooltip:b,tooltipDisabled:y=!1,tooltipOpenDelay:k=0,tooltipCloseDelay:S=0,tooltipSurface:C="default",closeOnSelect:E,description:T,rootStyle:R,leadingStyle:_,contentStyle:D,trailingStyle:A,variant:I="default",trailingVisibility:P="always",selected:$=!1,radioChecked:O,indent:Y=!1,wideLeftSection:U=!1,draggable:B,ref:j,itemLabel:q,referenceRef:H,itemPropsTransform:W,trailingAccessory:F,contextPart:K}){const{activeIndex:N,setIsOpen:z,getItemProps:V,closeOnSelect:L,virtualFocus:Z,activeDescendantIdPrefix:re}=af(K),{shouldAllowPointerInteraction:ie}=Xi(K),ae=uf(),le=t0(),ce=sf(),Ee=Li(),be=ce==="body",ue=E??L??!0,{ref:ge,index:Se}=Uh({label:q||null}),Ae=N===Se,[ke,xe]=v.useState(!1);Jx();const Ce=v.useRef(null),Me=v.useId(),ze=B!=null,Fe=B?.mode==="pointer",ye=v.useSyncExternalStore(bi.subscribe,bi.isDragActive,bi.isDragActive),_e=v.useRef(null),ee=v.useRef(null),fe=v.useRef(null),Q=v.useRef(null),ne=v.useRef(!1),[we,Pe]=v.useState(null),{ref:Ye,isDragging:Ze}=TF({id:B?.id??`menu-item-${Me}`,data:B?.data??_8,disabled:!ze||Fe||(B?.disabled??!1),dragImageOffset:B?.dragImageOffset,onDragStart:B?.onDragStart,onDragEnd:B?.onDragEnd}),bt=Jc([ge,H,j,ze&&!Fe?Ye:null]),Je=v.useCallback(Ne=>{Ce.current=Ne},[]),vt=v.useMemo(()=>({setSubMenuOpen:xe,isSubMenuOpen:ke,registerSubMenuOpener:Je}),[ke,Je]),kt=IO(C);v.useEffect(()=>()=>{_e.current?.(),fe.current!=null&&cancelAnimationFrame(fe.current)},[]);const nt=v.useCallback(()=>{fe.current=null;const Ne=ee.current,Tt=Q.current;!Ne||!Tt||(Ne.style.transform=`translate3d(${Tt.x+8}px, ${Tt.y+8}px, 0)`)},[]),rt=v.useCallback(Ne=>{Q.current=Ne,fe.current==null&&(fe.current=requestAnimationFrame(nt))},[nt]),ct=v.useCallback(Ne=>{ee.current=Ne,nt()},[nt]),it=()=>{if(a)return;const Ne={defaultPrevented:!1,preventDefault:()=>{Ne.defaultPrevented=!0}};f?.(Ne),ue&&!Ne.defaultPrevented&&le(z)},ft=Ne=>{if(ne.current){ne.current=!1,Ne.preventDefault(),Ne.stopPropagation();return}if(!ie(Ne.nativeEvent)){Ne.preventDefault(),Ne.stopPropagation();return}it()},Lt=v.useCallback(Ne=>{if(!ie(Ne.nativeEvent)){Ne.preventDefault(),Ne.stopPropagation();return}if(l?.(Ne),!Ne.defaultPrevented){if(Fe&&B!=null&&!B.disabled&&Ne.button===0){_e.current?.();const Tt=bi.getInstance(),Qt=Ne.currentTarget,rn={clientX:Ne.clientX,clientY:Ne.clientY,isDragging:!1},Rn=()=>{document.removeEventListener("mousemove",Yn,!0),document.removeEventListener("mouseup",Br,!0),fe.current!=null&&(cancelAnimationFrame(fe.current),fe.current=null),Q.current=null,_e.current=null,Tt.clearData(),setTimeout(()=>{ne.current=!1},0)},Yn=Bn=>{const ri=Bn.clientX-rn.clientX,Fr=Bn.clientY-rn.clientY;if(!(!rn.isDragging&&Math.hypot(ri,Fr)<4)){if(!rn.isDragging){rn.isDragging=!0,ne.current=!0,Tt.setData(B.data);const tr=Qt.getBoundingClientRect().width;rt({x:Bn.clientX,y:Bn.clientY}),Pe(tr),B.onPointerDragStart?.(Bn)}Bn.preventDefault(),rt({x:Bn.clientX,y:Bn.clientY}),B.onPointerDragMove?.(Bn)}},Br=Bn=>{if(!rn.isDragging){Rn();return}Bn.preventDefault(),Pe(null),B.onPointerDragEnd?.(Bn),Rn()};_e.current=Rn,document.addEventListener("mousemove",Yn,!0),document.addEventListener("mouseup",Br,!0)}Z&&!ze&&Ne.preventDefault()}},[B,ze,Fe,l,rt,ie,Z]),Pt=v.useCallback(Ne=>{if(!ie(Ne.nativeEvent)){Ne.preventDefault(),Ne.stopPropagation();return}c?.(Ne)},[c,ie]),At=Ne=>{a||(d?.(Ne),!Ne.defaultPrevented&&((Ne.key==="Enter"||Ne.key===" ")&&(Ne.preventDefault(),Ne.stopPropagation(),it()),Gl(Ne.key,Ee)==="end"&&Ce.current&&(Ne.preventDefault(),Ne.stopPropagation(),Ce.current())))},X=V({...of(re,Se),onClick:ft,onKeyDown:At,onMouseDown:Lt,onAuxClick:Pt}),me=W?.(X)??X,Le=m!=null?g.jsx(YO.Provider,{value:vt,children:m}):void 0,Xe=Kx(),Rt=Yx(),lt=Xx(),He=T!=null?g.jsxs("div",{className:Xe.className,style:Xe.style,children:[g.jsx("div",{className:Rt.className,style:Rt.style,children:e}),g.jsx("div",{className:lt.className,style:lt.style,"data-component":"menu-item-description",children:T})]}):e,qe=y||ye||ke,De=P==="focused"&&(ye||!Ae),je=Wx({disabled:a,expanded:r===!0,focused:!ye&&Ae,indent:Y,inSubmenu:ae,selected:$,variant:I},R),Ie={role:O===void 0?"menuitem":"menuitemradio",tabIndex:Ae?0:-1,...O!==void 0?{"aria-checked":O}:{},...n!==void 0?{"aria-haspopup":n}:{},...r!==void 0?{"aria-expanded":r}:{},"aria-disabled":a||void 0,"data-component":"menu-row","data-expanded":r===!0||void 0,draggable:Fe?!1:void 0,"data-disabled":a||void 0,"data-focused":!ye&&Ae?!0:void 0,"data-menu-draggable":ze||void 0,"data-selected":$||void 0,"data-has-description":T!=null||void 0,"data-variant":I!=="default"?I:void 0,"data-indent":Y||void 0,"data-wide-left":U||void 0,"data-dragging":Ze||we!=null||void 0,...t?{"data-testid":t}:{},...s!==void 0?{"data-mention-menu-flat-index":String(s)}:{},[Vl]:ce,className:je.className,style:je.style,...me},We={className:"ui-u96u03 ui-47corl ui-ixxii4 ui-13vifvy ui-u1ixa1 ui-1so62im ui-18ivbjn"},dt=we!=null&&B?.preview!=null?Di.createPortal(g.jsx("div",{"aria-hidden":"true",ref:ct,className:We.className,style:{...We.style,width:we},children:B.preview}),document.body):null,Et=be?g.jsxs("li",{ref:bt,...Ie,children:[g.jsx(Dl,{disabled:a,leading:h,trailing:Le,trailingAccessory:F,trailingHidden:De,wideLeft:U,leadingStyle:_,contentStyle:D,trailingStyle:A,children:He}),dt]}):g.jsxs("div",{ref:bt,...Ie,children:[g.jsx(Dl,{disabled:a,leading:h,trailing:Le,trailingAccessory:F,trailingHidden:De,wideLeft:U,leadingStyle:_,contentStyle:D,trailingStyle:A,children:He}),dt]});return b!=null?g.jsx(lf,{closeDelay:S,content:qe?null:b,disabled:qe,openDelay:k,surfaceStyle:kt,children:Et}):Et}const QO=v.createContext(null);function JO(e){const t=v.useContext(QO);if(!t)throw new Error(`${e} must be used within LegacyMenu.ExpandableSection`);return t}function N8({children:e,defaultExpanded:t=!1,expanded:n,onExpandedChange:r}){const[s,a]=v.useState(t),l=n!==void 0,c=l?n:s,f=h=>{l||a(h),r?.(h)},d=()=>f(!c);return g.jsx(QO.Provider,{value:{expanded:c,setExpanded:f,toggle:d},children:e})}function O8({children:e,contentStyle:t,leading:n,leadingStyle:r,rootStyle:s,trailing:a,trailingStyle:l,label:c}){const{expanded:f,setExpanded:d,toggle:h}=JO("LegacyMenu.ExpandableSectionTrigger"),m=Li(),b=typeof n=="function"?n(f):n,y=k=>{const S=Gl(k.key,m);if(S==="end"&&!f){k.preventDefault(),k.stopPropagation(),d(!0);return}S==="start"&&f&&(k.preventDefault(),k.stopPropagation(),d(!1))};return g.jsx(XO,{closeOnSelect:!1,contentStyle:t,wideLeftSection:!0,leading:b,leadingStyle:r,rootStyle:s,trailing:a,trailingStyle:l,label:c??(typeof e=="string"?e:void 0),onKeyDown:y,onSelect:h,children:e})}function I8({children:e}){const{expanded:t}=JO("LegacyMenu.ExpandableSectionContent");return t?g.jsx(g.Fragment,{children:e}):null}function M8({children:e,label:t,ignoreSearch:n,...r}){const s=t??(typeof e=="string"?e:"");return n0(s,n,"LegacyMenu.CheckboxItem")?g.jsx(D8,{...r,itemLabel:s,children:e}):null}function D8({children:e,"data-testid":t,checked:n,defaultChecked:r=!1,onChange:s,disabled:a=!1,trailing:l,description:c,tooltip:f,tooltipOpenDelay:d=0,tooltipCloseDelay:h=0,tooltipSurface:m="default",closeOnSelect:b,itemLabel:y,rootStyle:k,contentStyle:S,trailingStyle:C}){const{activeIndex:E,getItemProps:T,setIsOpen:R,closeOnSelect:_,activeDescendantIdPrefix:D}=af("LegacyMenu.CheckboxItem"),{shouldAllowPointerInteraction:A}=Xi("LegacyMenu.CheckboxItem"),I=uf(),P=t0(),$=sf(),O=$==="body",Y=b??_??!1,[U,B]=v.useState(r),j=n!==void 0,q=j?n:U,{ref:H,index:W}=Uh({label:y||null}),F=E===W,K=Jx(),N=IO(m),z=v.useCallback(()=>{if(a)return;const ke=!q;j||B(ke);const xe={defaultPrevented:!1,preventDefault:()=>{xe.defaultPrevented=!0}};s?.(ke,xe),Y&&!xe.defaultPrevented&&P(R)},[a,q,j,s,Y,R,P]),V=v.useCallback(ke=>{if(!A(ke.nativeEvent)){ke.preventDefault(),ke.stopPropagation();return}ke.preventDefault(),ke.stopPropagation(),z()},[z,A]),L=v.useCallback(ke=>{a||(ke.key==="Enter"||ke.key===" ")&&(ke.preventDefault(),ke.stopPropagation(),z())},[a,z]),Z=T({...of(D,W),onClick:V,onKeyDown:L}),re=c!=null,ie=Wx({disabled:a,focused:F,inSubmenu:I},k),ae={role:"menuitemcheckbox","aria-checked":q,tabIndex:F?0:-1,"aria-disabled":a||void 0,"data-checked":q||void 0,"data-component":"menu-row","data-disabled":a||void 0,"data-focused":F||void 0,"data-has-description":re||void 0,...t?{"data-testid":t}:{},[Vl]:$,className:ie.className,style:ie.style,...Z},le=g.jsx(LA,{checked:q,disabled:a}),ce=Kx(),Ee=Yx(),be=Xx(),ue=re?g.jsxs("div",{className:ce.className,style:ce.style,children:[g.jsx("div",{className:Ee.className,style:Ee.style,children:e}),g.jsx("div",{className:be.className,style:be.style,"data-component":"menu-item-description",children:c})]}):e,ge=g.jsx(Dl,{disabled:a,leading:le,trailing:l,contentStyle:S,trailingStyle:C,children:ue}),Se=f!=null&&K!=null,Ae=O?g.jsx("li",{ref:H,...ae,children:ge}):g.jsx("div",{ref:H,...ae,children:ge});return Se?g.jsx(WO,{closeDelay:h,content:f,openDelay:d,surfaceStyle:N,children:Ae}):f!=null?g.jsx(tO,{content:f,placement:"right",offset:6,openDelay:d,closeDelay:Qx(h),sameAxisOnly:!0,surfaceStyle:[Px(),N],children:Ae}):Ae}function Qb(e,t){if(!t?.length||!e.dataTransfer)return!1;for(const n of e.dataTransfer.types)for(const r of t)if(n.toLowerCase()===r.toLowerCase())return!0;return!1}function L8(e,t){const n=e.relatedTarget;if(n!==null&&t.contains(n))return!1;const r=t.defaultView;return r?e.clientX<=0||e.clientY<=0||e.clientX>=r.innerWidth||e.clientY>=r.innerHeight:!0}function j8(e){const{accept:t,disabled:n=!1,acceptNativeTypes:r,onDragEnter:s,onDragOver:a,onDragLeave:l,onDrop:c}=e,f=v.useRef(null),d=v.useRef(null),h=v.useRef(0),m=v.useRef(null),[b,y]=v.useState(!1),[k,S]=v.useState(!1),C=v.useRef(b);C.current=b;const E=v.useCallback(()=>{h.current=0,y(!1),S(!1)},[]),T=v.useCallback(()=>{m.current!==null&&(cancelAnimationFrame(m.current),m.current=null)},[]);v.useEffect(()=>{if(!b)return;const I=d.current?.ownerDocument??document,P=()=>{T(),E()};return I.addEventListener("mousemove",P,!0),()=>{I.removeEventListener("mousemove",P,!0)}},[b,T,E]);const R=v.useRef({onDragEnter:s,onDragOver:a,onDragLeave:l,onDrop:c});R.current={onDragEnter:s,onDragOver:a,onDragLeave:l,onDrop:c};const _=v.useRef(r);_.current=r;const D=v.useRef(Array.isArray(t)?t:[t]);D.current=Array.isArray(t)?t:[t];const A=v.useCallback(I=>{if(d.current=I,f.current&&(f.current(),f.current=null),h.current=0,I!==null&&(y(!1),S(!1)),!I||n)return;const P=bi.getInstance(),$=F=>{if(h.current++,h.current===1){y(!0);const K=D.current,N=!n&&P.hasAnyClass(K),z=N||!n&&Qb(F,_.current);S(z);const V=N?P.getValidatedData(K):null;R.current.onDragEnter?.(F,V)}},O=F=>{h.current=Math.max(0,h.current-1),h.current===0&&(T(),E(),R.current.onDragLeave?.(F))},Y=F=>{const K=D.current,N=!n&&P.hasAnyClass(K),z=!N&&!n&&Qb(F,_.current);if(N||z){if(F.preventDefault(),F.dataTransfer&&(F.dataTransfer.dropEffect=N?"move":"copy"),h.current===0){h.current=1,y(!0),S(!0);const V=N?P.getValidatedData(K):null;R.current.onDragEnter?.(F,V)}if(R.current.onDragOver&&m.current===null){const V=N?P.getValidatedData(K):null;m.current=requestAnimationFrame(()=>{m.current=null,R.current.onDragOver?.(F,V)})}}},U=F=>{F.preventDefault(),T(),E();const K=D.current;if(P.hasAnyClass(K)){const N=P.getValidatedData(K),{onDrop:z}=R.current;z&&(z(F,N),F.stopPropagation())}else if(Qb(F,_.current)){const{onDrop:N}=R.current;N&&(N(F,null),F.stopPropagation())}};I.addEventListener("dragenter",$),I.addEventListener("dragleave",O),I.addEventListener("dragover",Y),I.addEventListener("drop",U);const B=I.ownerDocument,j=()=>{(h.current!==0||C.current)&&(T(),E())},q=()=>j(),H=()=>j(),W=F=>{L8(F,B)&&j()};B.addEventListener("drop",q,!0),B.addEventListener("dragend",H,!0),B.addEventListener("dragleave",W,!0),f.current=()=>{I.removeEventListener("dragenter",$),I.removeEventListener("dragleave",O),I.removeEventListener("dragover",Y),I.removeEventListener("drop",U),B.removeEventListener("drop",q,!0),B.removeEventListener("dragend",H,!0),B.removeEventListener("dragleave",W,!0),m.current!==null&&(cancelAnimationFrame(m.current),m.current=null)}},[n,E,T]);return v.useEffect(()=>()=>{f.current&&(f.current(),f.current=null)},[]),{ref:A,isOver:b,canDrop:k,isDropBlocked:b&&!k}}const z8=NO("@@menu-content-noop");function P8({children:e,header:t,footer:n,attachment:r,"aria-label":s,popupRole:a="menu","data-testid":l,className:c,surfaceStyle:f,contentStyle:d,layoutStyle:h,listStyle:m,scrollAreaStyles:b,style:y,dropIndicatorTop:k,maxHeight:S,width:C,minWidth:E,maxWidth:T,tooltipPlacement:R,size:_,backdrop:D,adaptiveHeight:A=!0,returnFocus:I,onKeyDownCapture:P,onBodyPointerEnter:$,droppable:O,ref:Y}){const U=ba(),{isOpen:B,isMounted:j,activeIndex:q,setActiveIndex:H,setIsOpen:W,markKeyboardNavigation:F,markPointerNavigation:K,virtualFocus:N,searchValue:z,setSearchValue:V,hasSearchInput:L,searchInputRef:Z,enableHover:re,closeOnSelect:ie,nodeId:ae,activeDescendantIdPrefix:le,listRef:ce,labelsRef:Ee,refs:be,floatingStyles:ue,middlewareData:ge,transitionStyles:Se,context:Ae,getFloatingProps:ke,getItemProps:xe,dismissCauseRef:Ce,returnFocusOnSelect:Me,returnFocus:ze}=Xi("LegacyMenu.Content"),Fe=D??!re,[ye,_e]=v.useState(null),ee=N&&!L,fe=Kh(),Q=v.useSyncExternalStore(bi.subscribe,bi.isDragActive,bi.isDragActive),ne=Ae.placement.startsWith("top"),we=ne&&j?ge.bottomAnchor?.bottom??null:null,Pe=v.useRef(null),Ye=v.useRef(q),Ze=v.useRef(!1);v.useLayoutEffect(()=>{Ye.current=q},[q]),v.useLayoutEffect(()=>{if(!B){Ze.current=!1;return}const Ne=Rn=>{xO(Rn)&&(Ze.current=!0,F())},Tt=Rn=>{const Yn=EO(Rn,ce);Yn==null||Yn===Ye.current||H(Yn)},Qt=Rn=>{const Yn=Ze.current;Ze.current=!1,K(),Yn&&Tt(Rn.target)};document.addEventListener("keydown",Ne,!0);const rn=rF(ye,Qt);return()=>{document.removeEventListener("keydown",Ne,!0),rn()}},[B,ce,F,K,ye,H]),v.useLayoutEffect(()=>{if(!B){Pe.current=null;return}if(!N||q==null||Pe.current===q||(Pe.current=q,!Ze.current))return;const Ne=ce.current[q]??null;if(!Ne)return;const Tt=requestAnimationFrame(()=>{Ne.scrollIntoView({block:"nearest",inline:"nearest"})});return()=>cancelAnimationFrame(Tt)},[B,N,q,ce]);const bt=v.useCallback(Ne=>{if(Ne.key==="Escape"){Ce.current="escape";return}if(Ne.ctrlKey&&!Ne.metaKey){const Qt=Ne.key.toLowerCase(),rn=Qt==="n"||Qt==="j";if(rn||(Qt==="p"||Qt==="k")){Ne.preventDefault();const Yn=ce.current,Br=Yn.length;if(Br===0)return;const Bn=Ye.current,ri=rn?1:-1;let Fr=Bn==null?rn?0:Br-1:Bn+ri;for(;Fr>=0&&Fr<Br;){if(Yn[Fr]!=null){H(Fr);return}Fr+=ri}return}}if(!L)return;if(Ne.key.length===1&&!Ne.ctrlKey&&!Ne.metaKey&&!Ne.altKey){if(document.activeElement===Z.current)return;Ne.preventDefault(),Ne.stopPropagation(),Z.current?.focus(),V(z+Ne.key),wO(ce,"body",H)}},[Ce,L,ce,Z,z,H,V]),Je=v.useCallback(Ne=>{fe(Ne.nativeEvent)&&(Ce.current="backdrop",W(!1))},[Ce,W,fe]),vt=v.useCallback(Ne=>{if(Ne.stopPropagation(),!fe(Ne.nativeEvent))return;Ne.preventDefault(),Ce.current="backdrop",W(!1);const rn=document.elementsFromPoint(Ne.clientX,Ne.clientY).find(Rn=>!Rn.classList.contains(Bx));rn&&rn.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,view:window,clientX:Ne.clientX,clientY:Ne.clientY,screenX:Ne.screenX,screenY:Ne.screenY,button:Ne.button,buttons:Ne.buttons,ctrlKey:Ne.ctrlKey,shiftKey:Ne.shiftKey,altKey:Ne.altKey,metaKey:Ne.metaKey}))},[Ce,W,fe]),kt=O!=null,{ref:nt,isOver:rt,isDropBlocked:ct}=j8({accept:O?.accept??z8,disabled:!kt||(O?.disabled??!1),onDragEnter:O?.onDragEnter,onDragOver:O?.onDragOver,onDragLeave:O?.onDragLeave,onDrop:O?.onDrop}),it=Jc([be.setFloating,_e,Y,kt?nt:null]),ft=ya(),{zIndex:Lt,portalLayerStyles:Pt}=ql("popover",j);if(!j)return null;const At=_??U?.menuSize??"sm",X={...ue,...Se,...Pt,...Lt!==null?{zIndex:Lt}:{},...y,...k!==void 0?{"--ui-menu-drop-indicator-top":`${k}px`}:{},...Dx({width:C,minWidth:E,maxWidth:T}),...ne&&we!==null?{top:"auto",bottom:we}:{},...Lx({isOpen:B,isPositioned:Ae.isPositioned})},me={...Pt,...Lt!==null?{zIndex:Lt-1}:{},pointerEvents:kt&&Q?"none":void 0},Le=A?_O(S):S,Xe=r!=null,Rt=a==="dialog",lt=VO(me),He=Fx({className:c,hasDropIndicator:k!==void 0,size:At,surfaceStyle:f,style:Xe&&Le!==void 0?{...X,maxHeight:Le}:X,hasAttachment:Xe}),qe=Hx(Xe||Le===void 0?void 0:{maxHeight:Le},Xe,h),De=Vx(),je=qx(d),Ie=Ux(!1,m),We=Gx(),dt=s8(),Et=i8();return g.jsxs(_x,{...ft?{root:ft}:{},children:[Fe&&g.jsx("div",{className:lt.className,style:lt.style,"data-component":"menu-backdrop",onClick:Je,onContextMenu:vt,role:"none"}),g.jsx(Nx,{context:Ae,initialFocus:ee?-1:Z,returnFocus:I??ze??(Ce.current!=="backdrop"&&(Ce.current!=="selection"||Me)),modal:!ee,children:g.jsxs("div",{ref:it,className:He.className,style:He.style,tabIndex:-1,"data-component":"menu-popup","data-size":At,"data-drop-active":kt&&rt&&!ct?"":void 0,"data-drop-blocked":kt&&ct?"":void 0,...l?{"data-testid":l}:{},...Xe?{"aria-label":s??"Menu"}:{},...ke({...Rt?{role:"dialog","aria-label":s??"Menu","aria-labelledby":void 0,"aria-orientation":void 0}:{},onKeyDown:bt,onKeyDownCapture:P,onMouseDown:N?Ne=>{Ne.stopPropagation()}:void 0}),children:[kt&&O?.indicator!=null?g.jsx("div",{"aria-hidden":"true",className:Et.className,style:Et.style,children:O.indicator}):null,g.jsx(Ms,{menuSize:At,children:g.jsx(rO,{dismiss:!B,children:g.jsx(e0,{layerNodeId:ae,placement:R,children:g.jsx(DO,{activeIndex:q,setIsOpen:W,getItemProps:xe,searchValue:z,closeOnSelect:ie,virtualFocus:N,activeDescendantIdPrefix:le,children:g.jsxs(vN,{elementsRef:ce,labelsRef:Ee,children:[g.jsxs("div",{className:qe.className,style:qe.style,"data-component":"menu-layout",...Xe||Rt?{}:{role:"menu","aria-label":s??"Menu"},children:[t!=null?g.jsx("div",{className:De.className,style:De.style,"data-component":"menu-header",children:g.jsx(Ts,{value:"header",children:t})}):null,g.jsx(Al,{className:HO,rootStyle:[OO(),b?.root],viewportStyle:b?.viewport,contentStyle:b?.content,maxHeight:"none","data-component":"menu-body-scroll",children:g.jsx("div",{className:je.className,style:je.style,"data-component":"menu-content",onPointerEnter:$,children:g.jsx("ul",{role:"presentation",className:Ie.className,style:Ie.style,"data-component":"menu-list",children:e})})}),n!=null?g.jsx("div",{className:We.className,style:We.style,"data-component":"menu-footer",children:g.jsx(Ts,{value:"footer",children:n})}):null]}),r!=null?g.jsx("div",{className:dt.className,style:dt.style,"data-component":"menu-attachment",children:g.jsx("div",{className:je.className,style:je.style,"data-component":"menu-content",children:g.jsx(Ts,{value:"footer",children:r})})}):null]})})})})})]})})]})}function $8({children:e,indent:t=!1,rootStyle:n}){const r=v8(t,n);return g.jsx("div",{className:r.className,style:r.style,"data-component":"menu-empty","data-indent":t||void 0,children:e})}function eI(e){const t=v.useContext(Xh),n=v.useContext(jx),r=t??n;if(!r)throw new Error(`${e} must be used within LegacyMenu or LegacyMenu.SubMenu`);return r}function B8(){return eI("LegacyMenu.useLayerContext")}function F8({children:e}){const t=x8();return g.jsxs("div",{className:t.className,style:t.style,role:"status","aria-live":"polite","aria-busy":"true",children:[g.jsx(qt,{name:"loading",size:"base",modifier:"spin",className:w8}),g.jsx("span",{children:e??"Loading..."})]})}function U8({placeholder:e="Search...","aria-label":t,className:n,rootStyle:r,inputGroupRootStyle:s,value:a,onValueChange:l,autoFocus:c=!1}){const d=sf()==="body",h=uf(),m=Li(),{searchValue:b,setSearchValue:y,searchInputRef:k,activeIndex:S,setActiveIndex:C,listRef:E,setHasSearchInput:T,activeDescendantIdPrefix:R}=eI("LegacyMenu.SearchInput"),_=v.useRef(null),D=a!==void 0&&l!==void 0,I=!D||c||h?k:_,P=D?a:b;v.useEffect(()=>{if(!D)return T(!0),()=>T(!1)},[D,T]),v.useLayoutEffect(()=>{if(D&&!c)return;const B=k.current;if(!B)return;B.focus({preventScroll:!0});const j=requestAnimationFrame(()=>{document.activeElement!==B&&B.focus({preventScroll:!0})});return()=>cancelAnimationFrame(j)},[D,c,k]);const $=B=>{D?l(B.target.value):(y(B.target.value),wO(E,"body",C),l?.(B.target.value))},O=B=>{if(Ix(B))return;if(B.ctrlKey&&!B.metaKey){const F=B.key.toLowerCase();if(F==="n"||F==="p"||F==="j"||F==="k"){B.preventDefault();return}}if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Tab","Escape"].includes(B.key)&&!B.metaKey&&!B.ctrlKey&&!B.altKey&&B.stopPropagation(),D&&B.key==="Enter"){B.preventDefault(),B.stopPropagation();return}if(!D&&B.key==="Enter"&&S!=null){B.preventDefault();const F=E.current[S];F&&(F.click(),k.current?.focus())}if(B.key!=="ArrowLeft"&&B.key!=="ArrowRight")return;const q=B.currentTarget,H=Gl(B.key,m)==="end"?q.value.length:0;if(!(q.selectionStart===H&&q.selectionEnd===H)){B.stopPropagation();return}iF({event:B,direction:B.key,activeIndex:S,listRef:E,restoreFocus:()=>k.current?.focus()})},Y=h8(n,r),U=g.jsx(rf,{ref:I,type:"text",variant:"unfilled",size:"md",inputGroupRootStyle:s,value:P,onChange:$,onKeyDown:O,placeholder:e,"aria-label":t??"Search menu items","aria-activedescendant":kO(R,S)});return d?g.jsx("li",{className:Y.className,style:Y.style,"data-component":"menu-search-row",role:"none",children:U}):g.jsx("div",{className:Y.className,style:Y.style,"data-component":"menu-search-row",role:"none",children:U})}function q8(e){const[t,n]=v.useState(!1);return v.useLayoutEffect(()=>{const r=e.current;if(r===null||r.parentElement===null)return;const s=()=>{n(r.nextElementSibling?.hasAttribute("data-menu-section")??!1)};s();const a=new MutationObserver(s);return a.observe(r.parentElement,{childList:!0}),()=>a.disconnect()},[e]),t}function H8({children:e,title:t,dividerVisibility:n="default",trailingDividerVisibility:r="default",textAction:s,titleTrailing:a,tooltip:l,noDivider:c,rootStyle:f,titleStyle:d}){const h=v.useRef(null),m=q8(h),b=m8(f),y=s!=null||a!=null,k=GO(y,d),S=g8(),C=t!=null&&t!==!1?g.jsxs("div",{role:"presentation",className:k.className,style:k.style,"data-component":"menu-section-title","data-has-action":y||void 0,children:[g.jsx("span",{children:t}),a,s!=null?g.jsx("button",{type:"button",className:S.className,style:S.style,onClick:s.onClick,children:s.label}):null]}):null,E=C!=null&&l!=null?g.jsx(lf,{content:l,openDelay:0,closeDelay:0,children:C}):C;return g.jsxs("div",{ref:h,role:"group","aria-label":typeof t=="string"?t:void 0,className:b.className,style:b.style,"data-menu-section":!0,"data-next-is-section":m||void 0,"data-divider-visibility":n!=="default"?n:void 0,"data-trailing-divider-visibility":r!=="default"?r:void 0,"data-no-divider":c||void 0,children:[E,e]})}function tI({children:e,trigger:t="hover",placement:n,anchorRef:r,offset:s,keepHoverSubmenuInset:a=!1,closeOnSelect:l,open:c,defaultOpen:f=!1,onOpenChange:d,hoverOpenDelay:h,keepOpenOnHoverOut:m=!1,dismissOnReferenceScroll:b=!1,suppressSiblingPointerGuard:y=!1,virtualFocus:k=!1,focusItemOnOpen:S}){const C=Cx(),E=Li(),[T,R]=Ml(c,f,d,"LegacyMenu.SubMenu"),_=c!==void 0,D=t==="hover"&&(!_||r==null),[A,I]=v.useState(null),{focusItemOnHoverEnabled:P,markKeyboardNavigation:$,markPointerNavigation:O,resetFocusItemOnHover:Y}=CO(),[U,B]=v.useState(""),[j,q]=v.useState(!1),H=v.useRef([]),W=v.useRef([]),F=v.useRef(null),K=v.useId(),N=v.useRef(null),z=v.useRef(new Set);T8(C,T);const V=A8();v.useEffect(()=>{V&&V.setSubMenuOpen(T)},[T,V]);const L=v.useRef(T);v.useEffect(()=>{const rt=L.current;L.current=T,rt!==T&&(B(""),T||I(null),Y())},[T,Y]);const Z=v.useCallback(rt=>{R(rt)},[R]);v.useEffect(()=>{if(V)return V.registerSubMenuOpener(()=>Z(!0)),()=>{V.registerSubMenuOpener(null)}},[V,Z]);const re=v.useCallback((rt,ct,it)=>{const ft=F.current;!rt&&t==="hover"&&(it==="hover"||it==="safe-polygon")&&(m||ft?.value&&ft.ownerDocument.activeElement===ft)||Z(rt)},[m,Z,t]),ie=v.useCallback(()=>{Z(!1)},[Z]),le=n??(t==="hover"?E==="rtl"?"left-start":"right-start":"bottom-start"),ce={mainAxis:-2,alignmentAxis:-2},ue=s??(a?ce:t==="hover"?ce:4),{refs:ge,floatingStyles:Se,context:Ae}=Ox({nodeId:C,open:T,onOpenChange:re,placement:le,middleware:[nx(ue),ix(),rx({crossAxis:le.startsWith("left")||le.startsWith("right")}),sx({padding:8,apply({availableWidth:rt,availableHeight:ct,elements:it}){it.floating.style.setProperty(RO,`${Math.max(0,Math.floor(rt))}px`),it.floating.style.setProperty(Mx,`${Math.max(0,Math.floor(ct))}px`)}})],whileElementsMounted:Lp,transform:!1});v.useLayoutEffect(()=>{const rt=r?.current;rt&&ge.setReference(rt)}),cF(D&&T&&!y,ge.domReference);const{activeId:ke}=J5(C,T),xe=ke!=null?0:h??75,Ce=EN(Ae,{enabled:D,delay:{open:xe},handleClose:jN({blockPointerEvents:!1,requireIntent:!1})}),Me=_N(Ae,{enabled:t==="click"&&!_}),ze=Kh(),Fe=AN(Ae,{ancestorScroll:b,bubbles:!0,outsidePressEvent:"click",outsidePress:ze}),ye=IN(Ae,{role:"menu"}),_e=ON(Ae,{listRef:H,activeIndex:A,onNavigate:I,nested:!0,rtl:E==="rtl",loop:!0,focusItemOnOpen:k?!1:S??!0,virtual:j||k,focusItemOnHover:P&&!k}),ee=DN(Ae,{listRef:W,activeIndex:A,onMatch:j?void 0:I,enabled:!j&&!k}),{getReferenceProps:fe,getFloatingProps:Q,getItemProps:ne}=NN([Ce,Me,Fe,ye,_e,ee]),we=TO(ne,T),Pe=v.useCallback(rt=>{const{role:ct,...it}=SO(fe(rt));return it},[fe]),Ye=v.useCallback(rt=>{const ct=z.current;return ct.add(rt),()=>{ct.delete(rt)}},[]),Ze=v.useCallback(()=>N.current!==null,[]),bt=v.useCallback(rt=>{N.current=rt;for(const ct of z.current)ct();r||ge.setReference(rt)},[r,ge.setReference]),Je=v.useCallback(()=>({...Pe(),id:K,ref:bt,"aria-haspopup":"menu","aria-expanded":T}),[Pe,bt,K,T]),{isMounted:vt,styles:kt}=MN(Ae,{duration:{open:0,close:uF},initial:{opacity:0,transform:"scale(1)"}}),nt=v.useMemo(()=>({isOpen:T,isMounted:vt,setIsOpen:Z,closeFromKeyboard:ie,activeIndex:A,setActiveIndex:I,markKeyboardNavigation:$,markPointerNavigation:O,trigger:t,closeOnSelect:l,nodeId:C,activeDescendantIdPrefix:j?C:void 0,listRef:H,labelsRef:W,searchInputRef:F,searchValue:U,setSearchValue:B,hasSearchInput:j,setHasSearchInput:q,triggerId:K,subscribeTriggerElement:Ye,hasTriggerElement:Ze,refs:ge,floatingStyles:Se,transitionStyles:kt,context:Ae,getReferenceProps:Pe,getFloatingProps:Q,getItemProps:we,getTriggerProps:Je,virtualFocus:k}),[T,vt,Z,ie,A,t,$,O,l,C,U,j,K,Ye,Ze,k,ge,Se,kt,Ae,Pe,Q,we,Je]);return g.jsx(Rx,{id:C,children:g.jsx(Xh.Provider,{value:nt,children:e})})}function V8({children:e,disabled:t=!1,label:n,leading:r,leadingStyle:s,trailing:a,contentStyle:l,trailingStyle:c}){const{activeIndex:f,getItemProps:d,activeDescendantIdPrefix:h}=af("LegacyMenu.SubMenuTrigger"),{shouldAllowPointerInteraction:m}=Xi("LegacyMenu.SubMenuTrigger"),b=Zh("LegacyMenu.SubMenuTrigger"),y=sf(),k=Li(),S=y==="body",C=n??(typeof e=="string"?e:""),{ref:E,index:T}=Uh({label:C||null}),R=f===T,_=Jc([E,b.refs.setReference]),D=g.jsx(qt,{name:"chevron-right",color:"tertiary"}),A=a8({disabled:t,expanded:b.isOpen,focused:R}),I={role:"menuitem","aria-haspopup":"menu","aria-expanded":b.isOpen,"data-component":"menu-submenu-trigger","data-expanded":b.isOpen||void 0,tabIndex:R?0:-1,"aria-disabled":t||void 0,"data-disabled":t||void 0,"data-focused":R||void 0,[Vl]:y,className:A.className,style:A.style,...b.getReferenceProps(d({...of(h,T),onMouseDown(O){m(O.nativeEvent)||(O.preventDefault(),O.stopPropagation())},onClick(O){if(!m(O.nativeEvent)){O.preventDefault(),O.stopPropagation();return}!t&&b.trigger==="hover"&&b.setIsOpen(!0)},onKeyDown(O){(Gl(O.key,k)==="end"||O.key==="Enter"||O.key===" ")&&!t&&(O.preventDefault(),O.stopPropagation(),b.setIsOpen(!0))}}))},P=y8(),$=g.jsx(Dl,{disabled:t,leading:r,leadingStyle:s,contentStyle:l,trailing:a!=null?g.jsx("div",{className:P.className,style:P.style,"data-component":"menu-submenu-right-section",children:a}):void 0,rightFallback:D,trailingStyle:c,children:e});return S?g.jsx("li",{ref:_,...I,children:$}):g.jsx("div",{ref:_,...I,children:$})}function G8({children:e,label:t,showChevron:n=!0,onKeyDown:r,closeOnSelect:s,...a}){const l=Zh("LegacyMenu.SubMenuItem"),c=Li(),f=t??(typeof e=="string"?e:""),d=m=>{a.disabled||(r?.(m),!m.defaultPrevented&&Gl(m.key,c)==="end"&&(m.preventDefault(),m.stopPropagation(),l.setIsOpen(!0)))},h=n?g.jsx(qt,{name:"chevron-right",color:"tertiary"}):void 0;return g.jsx(ZO,{...a,contextPart:"LegacyMenu.SubMenuItem",itemLabel:f,closeOnSelect:s??l.closeOnSelect,"aria-haspopup":"menu","aria-expanded":l.isOpen,referenceRef:l.refs.setReference,itemPropsTransform:l.getReferenceProps,onKeyDown:d,trailingAccessory:h,children:e})}function W8({children:e,header:t,footer:n,"aria-label":r,"data-testid":s,onPointerEnter:a,keepSearchFocus:l=!1,className:c,surfaceStyle:f,contentStyle:d,listStyle:h,width:m,minWidth:b,maxWidth:y,maxHeight:k,size:S,contentPadding:C}){const E=ba(),T=Zh("LegacyMenu.SubMenuContent"),R=Li(),_=ya(),{portalLayerStyles:D}=ql("popover",T.isMounted),A=S??E?.menuSize??"sm",{virtualFocus:I}=T,P=v.useSyncExternalStore(T.subscribeTriggerElement,T.hasTriggerElement,()=>!1);if(!T.isMounted)return null;const $={...T.floatingStyles,...T.transitionStyles,...D,...Dx({width:m,minWidth:b,maxWidth:y,clampToAvailableWidth:!0}),...Lx({isOpen:T.isOpen,isPositioned:T.context.isPositioned})},O=Fx({className:c,size:A,surfaceStyle:f,style:$}),Y=qx(d),U=Ux(!1,h),B=_O(k),j=t!=null||n!=null,q=Hx(j?{maxHeight:B}:void 0),H=Vx(),W=Gx(),F=C===void 0?Y.style:{...Y.style,padding:C,scrollPaddingBlock:C},K=V=>{V.stopPropagation()},N=P?T.triggerId:void 0,z=V=>{T.markPointerNavigation();const L=EO(V,T.listRef);if(L!=null&&L!==T.activeIndex&&T.setActiveIndex(L),!l||L==null)return;const Z=T.searchInputRef.current;if(Z==null)return;const re=Z.ownerDocument.activeElement;re!==Z&&(re instanceof HTMLInputElement||re instanceof HTMLTextAreaElement||Z.focus({preventScroll:!0}))};return g.jsx(_x,{..._?{root:_}:{},children:g.jsx(Nx,{context:T.context,disabled:I,initialFocus:T.hasSearchInput?T.searchInputRef:-1,returnFocus:!1,modal:!1,closeOnFocusOut:T.trigger==="click",children:g.jsx("div",{ref:T.refs.setFloating,className:O.className,style:O.style,"data-component":"menu-popup","data-submenu":"","data-size":A,...s?{"data-testid":s}:{},...T.getFloatingProps({...N===void 0?{}:{"aria-labelledby":N},onClick:K,onPointerEnter:a,onMouseMove(V){z(V.target)},onPointerMove(V){z(V.target)},onKeyDown(V){if(xO(V)&&T.markKeyboardNavigation(),Gl(V.key,R)==="start"||V.key==="Escape"){V.preventDefault(),V.stopPropagation(),T.closeFromKeyboard();const L=T.refs.domReference.current;L instanceof HTMLElement&&L.focus()}}}),children:g.jsx(KO.Provider,{value:!0,children:g.jsx(Ms,{menuSize:A,children:g.jsx(e0,{layerNodeId:T.nodeId,children:g.jsx(DO,{activeIndex:T.activeIndex,setIsOpen:T.setIsOpen,getItemProps:T.getItemProps,searchValue:T.searchValue,closeOnSelect:T.closeOnSelect,virtualFocus:I,activeDescendantIdPrefix:T.activeDescendantIdPrefix,children:g.jsx(vN,{elementsRef:T.listRef,labelsRef:T.labelsRef,children:j?g.jsxs("div",{className:q.className,style:q.style,role:"menu","aria-label":r??"Submenu","data-component":"menu-layout",children:[t!=null?g.jsx("div",{className:H.className,style:H.style,"data-component":"menu-header",children:g.jsx(Ts,{value:"header",children:t})}):null,g.jsx(Al,{className:HO,rootStyle:OO(),maxHeight:"none","data-component":"menu-body-scroll",children:g.jsx("div",{className:Y.className,style:F,"data-component":"menu-content",children:g.jsx("ul",{role:"presentation",className:U.className,style:U.style,"data-component":"menu-list",children:g.jsx(Ts,{value:"body",children:g.jsx(Xy,{children:e})})})})}),n!=null?g.jsx("div",{className:W.className,style:W.style,"data-component":"menu-footer",children:g.jsx(Ts,{value:"footer",children:n})}):null]}):g.jsx(Al,{maxHeight:B,children:g.jsx("div",{className:Y.className,style:F,"data-component":"menu-content",children:g.jsx("ul",{role:"menu","aria-label":r??"Submenu",className:U.className,style:U.style,"data-component":"menu-list",children:g.jsx(Ts,{value:"body",children:g.jsx(Xy,{children:e})})})})})})})})})})})})})}function K8({children:e,label:t,ignoreSearch:n,...r}){const s=t??(typeof e=="string"?e:"");return n0(s,n,"LegacyMenu.SwitchItem")?g.jsx(Y8,{...r,itemLabel:s,children:e}):null}function Y8({children:e,"data-testid":t,checked:n,defaultChecked:r=!1,onChange:s,disabled:a=!1,switchVariant:l,leading:c,leadingStyle:f,trailing:d,contentStyle:h,trailingStyle:m,rootStyle:b,tooltip:y,closeOnSelect:k,itemLabel:S}){const{activeIndex:C,getItemProps:E,setIsOpen:T,closeOnSelect:R,activeDescendantIdPrefix:_}=af("LegacyMenu.SwitchItem"),{shouldAllowPointerInteraction:D}=Xi("LegacyMenu.SwitchItem"),A=uf(),I=t0(),P=sf(),$=P==="body",O=k??R??!1,[Y,U]=v.useState(r),B=n!==void 0,j=B?n:Y,{ref:q,index:H}=Uh({label:S||null}),W=C===H,F=v.useCallback(()=>{if(a)return;const ie=!j;B||U(ie);const ae={defaultPrevented:!1,preventDefault:()=>{ae.defaultPrevented=!0}};s?.(ie,ae),O&&!ae.defaultPrevented&&I(T)},[a,j,B,s,O,T,I]),K=v.useCallback(ie=>{if(!D(ie.nativeEvent)){ie.preventDefault(),ie.stopPropagation();return}ie.preventDefault(),ie.stopPropagation(),F()},[F,D]),N=v.useCallback(ie=>{a||(ie.key==="Enter"||ie.key===" ")&&(ie.preventDefault(),ie.stopPropagation(),F())},[a,F]),z=E({...of(_,H),onClick:K,onKeyDown:N}),V=o8({disabled:a,focused:W,inSubmenu:A},b),L={role:"menuitemcheckbox","aria-checked":j,tabIndex:W?0:-1,"aria-disabled":a||void 0,"data-checked":j||void 0,"data-component":"menu-toggle-row","data-disabled":a||void 0,"data-focused":W||void 0,...t?{"data-testid":t}:{},[Vl]:P,className:V.className,style:V.style,...z},Z=g.jsx(Dl,{disabled:a,leading:c,leadingStyle:f,contentStyle:h,trailing:d,trailingStyle:m,trailingAccessory:g.jsx(N5,{checked:j,disabled:a,size:"sm",variant:l}),children:e}),re=$?g.jsx("li",{ref:q,...L,children:Z}):g.jsx("div",{ref:q,...L,children:Z});return y!=null?g.jsx(lf,{content:y,openDelay:0,closeDelay:0,children:re}):re}function X8({title:e,subtitle:t,inline:n=!1,wrapSubtitle:r=!1}){const s=f8(n),a=d8(n),l=p8({inline:n,wrap:r});return g.jsxs("div",{className:s.className,style:s.style,"data-inline":n||void 0,children:[g.jsx(Qp,{size:"md",weight:"regular",color:"primary",className:a.className,style:a.style,children:e}),t!=null?g.jsx(Qp,{size:"sm",weight:"regular",color:"tertiary",className:l.className,style:l.style,"data-wrap":r||void 0,children:t}):null]})}const Z8={title:{kZKoxP:"ui-xk0z11",kB7OPa:"ui-9f619",kVQacm:"ui-b3r6kr",$$css:!0}};function Q8({title:e,divider:t}){const n=GO(!1,Z8.title),r=b8();return g.jsxs(g.Fragment,{children:[t?g.jsx("div",{role:"presentation","aria-hidden":"true",className:r.className,style:r.style}):null,e!==void 0?g.jsx("div",{role:"presentation",className:n.className,"data-component":"menu-section-title",style:n.style,children:g.jsx("span",{children:e})}):null]})}const Ac=typeof window<"u"?v.useLayoutEffect:v.useEffect;function yT(e){if(e!==void 0)switch(typeof e){case"number":return e;case"string":{if(e.endsWith("px"))return parseFloat(e);break}}}function J8({box:e,defaultHeight:t,defaultWidth:n,disabled:r,element:s,mode:a,style:l}){const{styleHeight:c,styleWidth:f}=v.useMemo(()=>({styleHeight:yT(l?.height),styleWidth:yT(l?.width)}),[l?.height,l?.width]),[d,h]=v.useState({height:t,width:n}),m=r||c!==void 0||a==="only-width"||c!==void 0&&f!==void 0;return Ac(()=>{if(s===null||m)return;const b=new ResizeObserver(y=>{for(const k of y){const{contentRect:S,target:C}=k;s===C&&h(E=>E.height===S.height&&E.width===S.width?E:{height:S.height,width:S.width})}});return b.observe(s,{box:e}),()=>{b?.unobserve(s)}},[e,m,s,c,f]),v.useMemo(()=>({height:c??d.height,width:f??d.width}),[d,c,f])}function eq(e){const t=v.useRef(()=>{throw new Error("Cannot call during render.")});return Ac(()=>{t.current=e},[e]),v.useCallback(n=>t.current?.(n),[t])}function Jb({containerElement:e,direction:t,isRtl:n,scrollOffset:r}){return r}function yo(e,t="Assertion error"){if(!e)throw console.error(t),Error(t)}function yc(e,t){if(e===t)return!0;if(!!e!=!!t||(yo(e!==void 0),yo(t!==void 0),Object.keys(e).length!==Object.keys(t).length))return!1;for(const n in e)if(!Object.is(t[n],e[n]))return!1;return!0}function nI({cachedBounds:e,itemCount:t,itemSize:n}){if(t===0)return 0;if(typeof n=="number")return t*n;{const r=e.get(e.size===0?0:e.size-1);yo(r!==void 0,"Unexpected bounds cache miss");const s=(r.scrollOffset+r.size)/e.size;return t*s}}function tq({align:e,cachedBounds:t,index:n,itemCount:r,itemSize:s,containerScrollOffset:a,containerSize:l}){if(n<0||n>=r)throw RangeError(`Invalid index specified: ${n}`,{cause:`Index ${n} is not within the range of 0 - ${r-1}`});const c=nI({cachedBounds:t,itemCount:r,itemSize:s}),f=t.get(n),d=Math.max(0,Math.min(c-l,f.scrollOffset)),h=Math.max(0,f.scrollOffset-l+f.size);switch(e==="smart"&&(a>=h&&a<=d?e="auto":e="center"),e){case"start":return d;case"end":return h;case"center":return f.scrollOffset<=l/2?0:f.scrollOffset+f.size/2>=c-l/2?c-l:f.scrollOffset+f.size/2-l/2;default:return a>=h&&a<=d?a:a<h?h:d}}function vT({cachedBounds:e,containerScrollOffset:t,containerSize:n,itemCount:r,overscanCount:s}){const a=r-1;let l=0,c=-1,f=0,d=-1,h=0;for(;h<a;){const m=e.get(h);if(m.scrollOffset+m.size>t)break;h++}for(l=h,f=Math.max(0,l-s);h<a;){const m=e.get(h);if(m.scrollOffset+m.size>=t+n)break;h++}return c=Math.min(a,h),d=Math.min(r-1,c+s),l<0&&(l=0,c=-1,f=0,d=-1),{startIndexVisible:l,stopIndexVisible:c,startIndexOverscan:f,stopIndexOverscan:d}}function nq({itemCount:e,itemProps:t,itemSize:n}){const r=new Map;return{get(s){for(yo(s<e,`Invalid index ${s}`);r.size-1<s;){const l=r.size;let c;switch(typeof n){case"function":{c=n(l,t);break}case"number":{c=n;break}}if(l===0)r.set(l,{size:c,scrollOffset:0});else{const f=r.get(l-1);yo(f!==void 0,`Unexpected bounds cache miss for index ${s}`),r.set(l,{scrollOffset:f.scrollOffset+f.size,size:c})}}const a=r.get(s);return yo(a!==void 0,`Unexpected bounds cache miss for index ${s}`),a},set(s,a){r.set(s,a)},get size(){return r.size}}}function rq({itemCount:e,itemProps:t,itemSize:n}){return v.useMemo(()=>nq({itemCount:e,itemProps:t,itemSize:n}),[e,t,n])}function iq({containerSize:e,itemSize:t}){let n;return typeof t==="string"?(yo(t.endsWith("%"),`Invalid item size: "${t}"; string values must be percentages (e.g. "100%")`),yo(e!==void 0,"Container size must be defined if a percentage item size is specified"),n=e*parseInt(t)/100):n=t,n}function sq({containerElement:e,containerStyle:t,defaultContainerSize:n=0,direction:r,isRtl:s=!1,itemCount:a,itemProps:l,itemSize:c,onResize:f,overscanCount:d}){const[h,m]=v.useState({startIndexVisible:0,startIndexOverscan:0,stopIndexVisible:-1,stopIndexOverscan:-1}),{startIndexVisible:b,startIndexOverscan:y,stopIndexVisible:k,stopIndexOverscan:S}={startIndexVisible:Math.min(a-1,h.startIndexVisible),startIndexOverscan:Math.min(a-1,h.startIndexOverscan),stopIndexVisible:Math.min(a-1,h.stopIndexVisible),stopIndexOverscan:Math.min(a-1,h.stopIndexOverscan)},{height:C=n,width:E=n}=J8({defaultHeight:n,defaultWidth:void 0,element:e,mode:"only-height",style:t}),T=v.useRef({height:0,width:0}),R=C,_=iq({containerSize:R,itemSize:c});v.useLayoutEffect(()=>{if(typeof f=="function"){const O=T.current;(O.height!==C||O.width!==E)&&(f({height:C,width:E},{...O}),O.height=C,O.width=E)}},[C,f,E]);const D=rq({itemCount:a,itemProps:l,itemSize:_}),A=v.useCallback(O=>D.get(O),[D]),I=v.useCallback(()=>nI({cachedBounds:D,itemCount:a,itemSize:_}),[D,a,_]),P=v.useCallback(O=>{const Y=Jb({containerElement:e,direction:r,isRtl:s,scrollOffset:O});return vT({cachedBounds:D,containerScrollOffset:Y,containerSize:R,itemCount:a,overscanCount:d})},[D,e,R,r,s,a,d]);Ac(()=>{const O=e?.scrollTop??0;m(P(O))},[e,r,P]),Ac(()=>{if(!e)return;const O=()=>{m(Y=>{const{scrollLeft:U,scrollTop:B}=e,j=Jb({containerElement:e,direction:r,isRtl:s,scrollOffset:B}),q=vT({cachedBounds:D,containerScrollOffset:j,containerSize:R,itemCount:a,overscanCount:d});return yc(q,Y)?Y:q})};return e.addEventListener("scroll",O),()=>{e.removeEventListener("scroll",O)}},[D,e,R,r,a,d]);const $=eq(({align:O="auto",containerScrollOffset:Y,index:U})=>{let B=tq({align:O,cachedBounds:D,containerScrollOffset:Y,containerSize:R,index:U,itemCount:a,itemSize:_});if(e){if(B=Jb({containerElement:e,direction:r,isRtl:s,scrollOffset:B}),typeof e.scrollTo!="function"){const j=P(B);yc(h,j)||m(j)}return B}});return{getCellBounds:A,getEstimatedSize:I,scrollToIndex:$,startIndexOverscan:y,startIndexVisible:b,stopIndexOverscan:S,stopIndexVisible:k}}function oq(e){return v.useMemo(()=>e,Object.values(e))}function aq(e,t){const{ariaAttributes:n,style:r,...s}=e,{ariaAttributes:a,style:l,...c}=t;return yc(n,a)&&yc(r,l)&&yc(s,c)}function lq(e){return e!=null&&typeof e=="object"&&"getAverageRowHeight"in e&&typeof e.getAverageRowHeight=="function"}const uq="data-react-window-index";function cq({children:e,className:t,defaultHeight:n=0,listRef:r,onResize:s,onRowsRendered:a,overscanCount:l=3,rowComponent:c,rowCount:f,rowHeight:d,rowProps:h,tagName:m="div",style:b,...y}){const k=oq(h),S=v.useMemo(()=>v.memo(c,aq),[c]),[C,E]=v.useState(null),T=lq(d),R=v.useMemo(()=>T?B=>d.getRowHeight(B)??d.getAverageRowHeight():d,[T,d]),{getCellBounds:_,getEstimatedSize:D,scrollToIndex:A,startIndexOverscan:I,startIndexVisible:P,stopIndexOverscan:$,stopIndexVisible:O}=sq({containerElement:C,containerStyle:b,defaultContainerSize:n,direction:"vertical",itemCount:f,itemProps:k,itemSize:R,onResize:s,overscanCount:l});v.useImperativeHandle(r,()=>({get element(){return C},scrollToRow({align:B="auto",behavior:j="auto",index:q}){const H=A({align:B,containerScrollOffset:C?.scrollTop??0,index:q});typeof C?.scrollTo=="function"&&C.scrollTo({behavior:j,top:H})}}),[C,A]),Ac(()=>{if(!C)return;const B=Array.from(C.children).filter((j,q)=>{if(j.hasAttribute("aria-hidden"))return!1;const H=`${I+q}`;return j.setAttribute(uq,H),!0});if(T)return d.observeRowElements(B)},[C,T,d,I,$]),v.useEffect(()=>{I>=0&&$>=0&&a&&a({startIndex:P,stopIndex:O},{startIndex:I,stopIndex:$})},[a,I,P,$,O]);const Y=v.useMemo(()=>{const B=[];if(f>0)for(let j=I;j<=$;j++){const q=_(j);B.push(v.createElement(S,{...k,ariaAttributes:{"aria-posinset":j+1,"aria-setsize":f,role:"listitem"},key:j,index:j,style:{position:"absolute",left:0,transform:`translateY(${q.scrollOffset}px)`,height:T?void 0:q.size,width:"100%"}}))}return B},[S,_,T,f,k,I,$]),U=g.jsx("div",{"aria-hidden":!0,style:{height:D(),width:"100%",zIndex:-1}});return v.createElement(m,{role:"list",...y,className:t,ref:E,style:{position:"relative",maxHeight:"100%",flexGrow:1,overflowY:"auto",...b}},Y,e,U)}const rI=v.createContext(null);function fq(e){const t=v.useContext(rI);if(!t)throw new Error(`${e} must be used within LegacyMenu.VirtualizedContent`);return t}function dq({children:e,activeIndex:t,setIsOpen:n,getItemProps:r,listRef:s,closeOnSelect:a,onRowElementChange:l}){const c=v.useMemo(()=>({activeIndex:t,setIsOpen:n,getItemProps:r,listRef:s,closeOnSelect:a,onRowElementChange:l}),[t,n,r,s,a,l]);return g.jsx(rI.Provider,{value:c,children:e})}const pq=4,xT="ui-menu--virtualized";function hq({index:e,style:t,items:n,activeIndex:r,renderItem:s,onMouseMove:a}){const l=n[e],c=r===e,f=k8();return g.jsx("div",{className:f.className,style:{...t,...f.style},onMouseMove:d=>a(e,d),children:s(l,e,c)})}function mq({items:e,itemHeight:t,renderItem:n,getItemLabel:r,header:s,footer:a,emptyState:l,"aria-label":c,className:f,style:d,surfaceStyle:h,maxHeight:m,width:b="200px",size:y,backdrop:k,closeOnSelect:S=!0,overscanCount:C=5,getItemKey:E,onPreserveActiveIndex:T,renderActivePreview:R,ref:_}){const D=ba(),{isOpen:A,isMounted:I,activeIndex:P,setActiveIndex:$,setIsOpen:O,virtualFocus:Y,enableHover:U,nodeId:B,listRef:j,labelsRef:q,searchValue:H,refs:W,floatingStyles:F,middlewareData:K,transitionStyles:N,context:z,getFloatingProps:V,getItemProps:L,dismissCauseRef:Z,returnFocusOnSelect:re,returnFocus:ie}=Xi("LegacyMenu.VirtualizedContent"),ae=v.useRef(null),le=v.useRef(null),ce=v.useRef(P);ce.current=P;const Ee=v.useRef(null),[be,ue]=v.useState(null),[ge,Se]=v.useState(null),Ae=k??!U,ke=Kh(),{portalLayerStyles:xe}=ql("popover",I),Ce=v.useRef(null),Me=v.useRef(void 0),ze=v.useRef(e),Fe=v.useRef(P),ye=v.useRef(null);v.useEffect(()=>{r?q.current=e.map(je=>r(je)):q.current=e.map(()=>null),j.current.length!==e.length&&(j.current.length=e.length)},[e,r,q,j]),v.useLayoutEffect(()=>{const je=ze.current!==e,Ie=Fe.current!==P;if(ze.current=e,Fe.current=P,E===void 0||P==null){Me.current=void 0;return}const We=Me.current;if(je&&!Ie&&We!==void 0){const Et=e.findIndex(Ne=>E(Ne)===We);if(Et>=0&&Et!==P){ye.current=Et,T===void 0?$(Et):T(Et);return}}const dt=e[P];Me.current=dt===void 0?void 0:E(dt)},[P,E,e,T,$]);const _e=z.placement.startsWith("top"),ee=_e&&I?K.bottomAnchor?.bottom??null:null,fe=v.useRef(null);v.useLayoutEffect(()=>{if(!A){fe.current=null,Ce.current=null;return}if(P==null||fe.current===P)return;fe.current=P;const je=ye.current===P;if(ye.current=null,je)return;const Ie=Ce.current===P;Ce.current=null,!Ie&&(P<0||P>=e.length||le.current?.scrollToRow({index:P,align:"smart",behavior:"instant"}))},[A,P,e.length]);const Q=v.useRef(H),ne=v.useRef(A);v.useEffect(()=>{const je=Q.current,Ie=ne.current;Q.current=H,ne.current=A,!(!A||!Ie||je===H)&&(e.length>0&&le.current?.scrollToRow({index:0,align:"start",behavior:"instant"}),$(e.length>0?0:null))},[A,e.length,H,$]);const we=v.useCallback((je,Ie)=>{Ee.current=je,ue(We=>We===je?We:je),Se(We=>We===Ie?We:Ie)},[]);v.useLayoutEffect(()=>{if(!A||P==null||P<0||P>=e.length){we(null,null);return}const je=j.current[P];je!=null&&we(je,P)},[P,A,e.length,j,we]);const Pe=v.useCallback((je,Ie)=>{je===ce.current&&Ie!=null&&we(Ie,je)},[we]),Ye=v.useRef(null),Ze=v.useCallback((je,Ie)=>{const We=Ye.current;Ye.current={x:Ie.clientX,y:Ie.clientY},!(We!==null&&We.x===Ie.clientX&&We.y===Ie.clientY)&&P!==je&&(Ce.current=je,$(je))},[P,$]),bt=v.useCallback(je=>{je.key==="Escape"&&(Z.current="escape")},[Z]),Je=v.useCallback(je=>{ke(je.nativeEvent)&&(Z.current="backdrop",O(!1))},[Z,O,ke]),vt=v.useCallback(je=>{if(!ke(je.nativeEvent))return;je.preventDefault(),Z.current="backdrop",O(!1);const dt=document.elementsFromPoint(je.clientX,je.clientY).find(Et=>!Et.classList.contains(Bx));dt&&dt.dispatchEvent(new MouseEvent("contextmenu",{bubbles:!0,cancelable:!0,view:window,clientX:je.clientX,clientY:je.clientY,screenX:je.screenX,screenY:je.screenY,button:je.button,buttons:je.buttons,ctrlKey:je.ctrlKey,shiftKey:je.shiftKey,altKey:je.altKey,metaKey:je.metaKey}))},[Z,O,ke]),kt=Jc([W.setFloating,ae,_]),nt=ya();if(!I)return null;const rt=m??sF,ct=typeof t=="number"?e.length*t:e.reduce((je,Ie,We)=>je+t(We),0),it=Math.min(ct,Math.max(0,rt-pq*2)),ft=y??D?.menuSize??"sm",Lt={...F,...N,...d,...Dx({width:b}),...xe,..._e&&ee!==null?{top:"auto",bottom:ee}:{},...Lx({isOpen:A,isPositioned:z.isPositioned})},Pt=VO(xe),At=Fx({className:f?`${xT} ${f}`:xT,size:ft,style:Lt,surfaceStyle:h}),X=Hx(),me=Vx(),Le=qx(),Xe=Ux(!0),Rt=S8(),lt=Gx(),He=A&&ge!=null&&ge>=0&&ge<e.length&&be!=null&&R!=null?R(ge,{rowElement:be,menuContentElement:ae.current}):null,qe=He!=null&&be!=null,De={items:e,activeIndex:P,renderItem:n,onMouseMove:Ze};return g.jsxs(_x,{...nt?{root:nt}:{},children:[Ae&&g.jsx("div",{className:Pt.className,style:Pt.style,"data-component":"menu-backdrop",onClick:Je,onContextMenu:vt,role:"none"}),g.jsx(Nx,{context:z,initialFocus:-1,returnFocus:ie??(Z.current!=="backdrop"&&(Z.current!=="selection"||re)),modal:!Y&&A,children:g.jsx("div",{ref:kt,className:At.className,style:At.style,tabIndex:-1,"data-component":"menu-popup","data-virtualized":"","data-size":ft,...V({"aria-label":c??"Menu","aria-labelledby":void 0,onKeyDown:bt,onMouseDown:Y?je=>{je.stopPropagation()}:void 0}),children:g.jsx(Ms,{menuSize:ft,children:g.jsx("div",{className:X.className,style:X.style,"data-component":"menu-layout",role:"none",children:g.jsx(rO,{dismiss:!A,children:g.jsx(e0,{layerNodeId:B,children:g.jsxs(dq,{activeIndex:P,setIsOpen:O,getItemProps:L,listRef:j,closeOnSelect:S,onRowElementChange:Pe,children:[s!=null?g.jsx("div",{className:me.className,style:me.style,"data-component":"menu-header",children:g.jsx(Ts,{value:"header",children:s})}):null,e.length>0?g.jsx("div",{className:Le.className,style:Le.style,"data-component":"menu-content",children:g.jsx("div",{className:Xe.className,style:Xe.style,"data-component":"menu-list",role:"presentation",children:g.jsx(cq,{listRef:le,className:Rt.className,role:"none",rowComponent:hq,rowProps:De,rowCount:e.length,rowHeight:t,overscanCount:C,"data-native-scrollbar":"none",style:{height:it}})})}):l,a!=null?g.jsx("div",{className:lt.className,style:lt.style,"data-component":"menu-footer",children:g.jsx(Ts,{value:"footer",children:a})}):null,R!=null?g.jsx(tI,{open:qe,placement:"right-start",anchorRef:Ee,offset:6,closeOnSelect:!1,virtualFocus:!0,children:qe?He:null}):null]})})})})})})})]})}function gq({index:e,children:t,disabled:n=!1,onSelect:r,onMouseDown:s,leading:a,leadingStyle:l,contentStyle:c,trailing:f,trailingStyle:d,wideLeftSection:h=!1,tooltip:m,tooltipContentKey:b,closeOnSelect:y,description:k,variant:S="default",checked:C,ref:E}){const{shouldAllowPointerInteraction:T,virtualFocus:R,activeDescendantIdPrefix:_}=Xi("LegacyMenu.VirtualizedItem"),D=uf(),{activeIndex:A,setIsOpen:I,getItemProps:P,listRef:$,closeOnSelect:O,onRowElementChange:Y}=fq("LegacyMenu.VirtualizedItem"),U=y??O??!0,B=A===e,j=v.useCallback(be=>{$.current[e]=be,Y?.(e,be),typeof E=="function"?E(be):E&&(E.current=be)},[e,$,Y,E]),q=()=>{if(n)return;const be={defaultPrevented:!1,preventDefault:()=>{be.defaultPrevented=!0}};r?.(be),U&&!be.defaultPrevented&&I(!1)},H=be=>{if(!T(be.nativeEvent)){be.preventDefault(),be.stopPropagation();return}q()},W=be=>{n||(be.key==="Enter"||be.key===" ")&&(be.preventDefault(),q())},F=be=>{if(!T(be.nativeEvent)){be.preventDefault(),be.stopPropagation();return}s?.(be),!be.defaultPrevented&&R&&be.preventDefault()},{onMouseMove:K,onPointerLeave:N,...z}=P({...of(_,e),onClick:H,onKeyDown:W,onMouseDown:F}),V=Kx(),L=Yx(),Z=Xx(),re=k!=null?g.jsxs("div",{className:V.className,style:V.style,children:[g.jsx("div",{className:L.className,style:L.style,children:t}),g.jsx("div",{className:Z.className,style:Z.style,"data-component":"menu-item-description",children:k})]}):t,ie=Wx({disabled:n,focused:B,inSubmenu:D,variant:S}),ae=C!==void 0,le=ae&&a==null?g.jsx(LA,{checked:C,disabled:n}):a,ce=ae?{role:"menuitemcheckbox","aria-checked":C,"data-checked":C||void 0}:{role:"menuitem"},Ee=g.jsx("li",{ref:j,...ce,tabIndex:B?0:-1,"aria-disabled":n||void 0,"data-component":"menu-row","data-disabled":n||void 0,"data-focused":B||void 0,"data-has-description":k!=null||void 0,"data-variant":S!=="default"?S:void 0,"data-wide-left":h||void 0,[Vl]:"body",className:ie.className,style:ie.style,...z,children:g.jsx(Dl,{disabled:n,leading:le,leadingStyle:l,contentStyle:c,trailing:f,trailingStyle:d,wideLeft:h,children:re})});return m!=null?g.jsx(lf,{content:m,contentKey:b,children:Ee}):Ee}function kT({children:e,open:t,defaultOpen:n,onOpenChange:r,activeIndex:s,onActiveIndexChange:a,placement:l,offset:c,flip:f,closeOnSelect:d,instantClose:h,instantTransitions:m,returnFocusOnSelect:b,returnFocus:y,focusItemOnOpen:k,virtualFocus:S,shouldKeepOpenDuringDrag:C,lockPositionWhileOpen:E,dismissOnReferenceScroll:T}){return g.jsx(hF,{open:t,defaultOpen:n,onOpenChange:r,activeIndex:s,onActiveIndexChange:a,placement:l,offset:c,flip:f,closeOnSelect:d,instantClose:h,instantTransitions:m,returnFocusOnSelect:b,returnFocus:y,focusItemOnOpen:k,virtualFocus:S,shouldKeepOpenDuringDrag:C,lockPositionWhileOpen:E,dismissOnReferenceScroll:T,children:e})}function bq(e){return Ao()===null?g.jsx(i9,{children:g.jsx(kT,{...e})}):g.jsx(kT,{...e})}function iI(e,t,n){const{ref:r,...s}=n,a=zN({defaultTagName:"button",props:s,ref:r,render:e});return t?e:a}function yq({children:e,disabled:t=!1}){const{getTriggerProps:n}=Xi("LegacyMenu.Trigger");return iI(e,t,n())}function vq({children:e,onClick:t,disabled:n=!1}){const{getTriggerProps:r,setHasHoverTrigger:s,setIsOpen:a}=Xi("LegacyMenu.HoverTrigger");v.useEffect(()=>{if(!n)return s(!0),()=>s(!1)},[n,s]);const l=r();return iI(e,n,{...l,onPointerDown:Xu(void 0,Xu(l.onPointerDown,c=>{c.button===2&&a(!1)})),onContextMenu:Xu(void 0,Xu(l.onContextMenu,c=>{a(!1),c.stopPropagation()})),onClick:Xu(t,c=>{l.onClick?.(c)})})}const xq=Object.assign(tI,{useContext:C8}),ei=Object.assign(bq,{useContext:AO,useLayerContext:B8,Trigger:yq,HoverTrigger:vq,Content:P8,Item:XO,CheckboxItem:M8,TextItem:X8,SwitchItem:K8,Section:H8,SearchInput:U8,EmptyState:$8,LoadingState:F8,ExpandableSection:N8,ExpandableSectionTrigger:O8,ExpandableSectionContent:I8,SubMenu:xq,SubMenuItem:G8,SubMenuTrigger:V8,SubMenuContent:W8,VirtualizedContent:mq,VirtualizedItem:gq,VirtualizedSectionHeader:Q8}),sI=v.createContext(void 0);function r0(){const e=v.useContext(sI);if(e===void 0)throw new Error(Nn(64));return e}let kq=(function(e){return e.activationDirection="data-activation-direction",e.orientation="data-orientation",e})({});const Qh={tabActivationDirection:e=>({[kq.activationDirection]:e})},oI=v.forwardRef(function(t,n){const{className:r,defaultValue:s=0,onValueChange:a,orientation:l="horizontal",render:c,value:f,style:d,...h}=t,m=t.defaultValue!==void 0,b=v.useRef([]),[y,k]=v.useState(()=>new Map),[S,C]=_l({controlled:f,default:s,name:"Tabs",state:"value"}),E=f!==void 0,[T,R]=v.useState(()=>new Map),_=v.useRef(void 0),D=v.useCallback(ce=>{if(ce===void 0)return null;for(const[Ee,be]of T.entries())if(be!=null&&ce===(be.value??be.index))return Ee;return null},[T]),[A,I]=v.useState(()=>({previousValue:S,tabActivationDirection:"none"})),{previousValue:P,tabActivationDirection:$}=A;let O=$,Y=!1;P!==S&&(O=ST(P,S,l,T),Y=P!=null&&S!=null&&D(S)==null);const U=Y?P:S,B=P!==U||$!==O;Ve(()=>{B&&I({previousValue:U,tabActivationDirection:O})},[U,B,O]);const j=Ke((ce,Ee)=>{const be=ST(S,ce,l,T);Ee.activationDirection=be,a?.(ce,Ee),!Ee.isCanceled&&C(ce)}),q=Ke((ce,Ee)=>{a?.(ce,Ct(Ee,void 0,void 0,{activationDirection:"none"}))}),H=Ke((ce,Ee)=>{k(be=>{if(be.get(ce)===Ee)return be;const ue=new Map(be);return ue.set(ce,Ee),ue})}),W=Ke((ce,Ee)=>{k(be=>{if(!be.has(ce)||be.get(ce)!==Ee)return be;const ue=new Map(be);return ue.delete(ce),ue})}),F=v.useCallback(ce=>y.get(ce),[y]),K=v.useCallback(ce=>{for(const Ee of T.values())if(ce===Ee?.value)return Ee?.id},[T]),N=v.useMemo(()=>({getTabElementBySelectedValue:D,getTabIdByPanelValue:K,getTabPanelIdByValue:F,onValueChange:j,orientation:l,registerMountedTabPanel:H,setTabMap:R,unregisterMountedTabPanel:W,tabActivationDirection:O,value:S}),[D,K,F,j,l,H,R,W,O,S]),z=v.useMemo(()=>{for(const ce of T.values())if(ce!=null&&ce.value===S)return ce},[T,S]),V=v.useMemo(()=>{for(const ce of T.values())if(ce!=null&&!ce.disabled)return ce.value},[T]),L=v.useRef(!m),Z=v.useRef(s),re=v.useRef(m),ie=v.useRef(!1);Ve(()=>{if(E)return;function ce(ge,Se){C(ge),I(Ae=>Ae.previousValue===ge&&Ae.tabActivationDirection==="none"?Ae:{previousValue:ge,tabActivationDirection:"none"}),q(ge,Se),L.current=!1}if(T.size===0){ie.current&&S!==null&&!_.current?.isConnected&&ce(null,Rw);return}ie.current=!0,_.current=T.keys().next().value;const Ee=z?.disabled,be=z==null&&S!==null;if(!Ee&&S===Z.current&&(re.current=!1),re.current&&Ee&&S===Z.current)return;const ue=L.current;if(Ee||be){const ge=V??null;if(S===ge){L.current=!1;return}let Se=Rw;ue?Se=_w:Ee&&(Se=a_),ce(ge,Se);return}ue&&z!=null&&(q(S,_w),L.current=!1)},[V,E,q,z,C,T,S]);const le=gn("div",t,{state:{orientation:l,tabActivationDirection:O},ref:n,props:h,stateAttributesMapping:Qh});return g.jsx(sI.Provider,{value:N,children:g.jsx(kx,{elementsRef:b,children:le})})});function ST(e,t,n,r){if(e==null||t==null)return"none";let s=null,a=null;for(const[f,d]of r.entries()){if(d==null)continue;const h=d.value??d.index;if(e===h&&(s=f),t===h&&(a=f),s!=null&&a!=null)break}if(s==null||a==null)return s!==a&&(typeof e=="number"||typeof e=="string")&&typeof e==typeof t?n==="horizontal"?t>e?"right":"left":t>e?"down":"up":"none";const l=s.getBoundingClientRect(),c=a.getBoundingClientRect();if(n==="horizontal"){if(c.left<l.left)return"left";if(c.left>l.left)return"right"}else{if(c.top<l.top)return"up";if(c.top>l.top)return"down"}return"none"}const aI=v.createContext(void 0);function lI(){const e=v.useContext(aI);if(e===void 0)throw new Error(Nn(65));return e}const uI=v.forwardRef(function(t,n){const{className:r,disabled:s=!1,render:a,value:l,id:c,nativeButton:f=!0,style:d,...h}=t,{value:m,getTabPanelIdByValue:b,orientation:y,tabActivationDirection:k}=r0(),{activateOnFocus:S,highlightedTabIndex:C,onTabActivation:E,registerTabResizeObserverElement:T,setHighlightedTabIndex:R,tabsListElement:_}=lI(),D=Fl(c),A=v.useMemo(()=>({disabled:s,id:D,value:l}),[s,D,l]),{compositeProps:I,compositeRef:P,index:$}=UN({metadata:A}),O=l===m,Y=v.useRef(!1),U=v.useRef(null);Ve(()=>{const L=U.current;if(L)return T(L)},[T]),Ve(()=>{if(Y.current){Y.current=!1;return}if(!(O&&$>-1&&C!==$))return;const L=_;if(L!=null){const Z=pr(Wt(L));if(Z&&ht(L,Z))return}s||R($)},[O,$,C,R,s,_]);const{getButtonProps:B,buttonRef:j}=$l({disabled:s,native:f,focusableWhenDisabled:!0}),q=b(l),H=v.useRef(!1),W=v.useRef(!1);function F(L){O||s||E(l,Ct(Oi,L.nativeEvent,void 0,{activationDirection:"none"}))}function K(L){O||($>-1&&!s&&R($),!s&&S&&(!H.current||H.current&&W.current)&&E(l,Ct(Oi,L.nativeEvent,void 0,{activationDirection:"none"})))}function N(L){if(O||s)return;H.current=!0;function Z(){H.current=!1,W.current=!1}(!L.button||L.button===0)&&(W.current=!0,Wt(L.currentTarget).addEventListener("pointerup",Z,{once:!0}))}return gn("button",t,{state:{disabled:s,active:O,orientation:y,tabActivationDirection:k},ref:[n,j,P,U],props:[I,{role:"tab","aria-controls":q,"aria-selected":O,id:D,onClick:F,onFocus:K,onPointerDown:N,[lO]:O?"":void 0,onKeyDownCapture(){Y.current=!0}},h,B],stateAttributesMapping:Qh})});function Sq(){return Zn}function wq(){return!1}function Eq(){return!0}function Tq(){return ox.useSyncExternalStore(Sq,wq,Eq)}const Cq='!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const i=e.querySelector("[data-active]");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c("left",o),c("right",n),c("top",h),c("bottom",l),c("width",r),c("height",f),r>0&&f>0&&t.removeAttribute("hidden")}();';let ol=(function(e){return e.activeTabLeft="--active-tab-left",e.activeTabRight="--active-tab-right",e.activeTabTop="--active-tab-top",e.activeTabBottom="--active-tab-bottom",e.activeTabWidth="--active-tab-width",e.activeTabHeight="--active-tab-height",e})({});const Rq=v.createContext(void 0),_q={disableStyleElements:!1};function cI(){return v.useContext(Rq)??_q}const Aq={...Qh,activeTabPosition:()=>null,activeTabSize:()=>null},fI=v.forwardRef(function(t,n){const{className:r,render:s,renderBeforeHydration:a=!1,style:l,...c}=t,{nonce:f}=cI(),{getTabElementBySelectedValue:d,orientation:h,tabActivationDirection:m,value:b}=r0(),{tabsListElement:y,registerIndicatorUpdateListener:k}=lI(),S=Tq(),C=I$();v.useEffect(()=>k(C),[k,C]);let E=0,T=0,R=0,_=0,D=0,A=0,I=!1;if(b!=null&&y!=null){const j=d(b);if(j!=null){I=!0;const{width:q,height:H}=aT(j),{width:W,height:F}=aT(y),K=j.getBoundingClientRect(),N=y.getBoundingClientRect(),z=W>0?N.width/W:1,V=F>0?N.height/F:1;if(Math.abs(z)>Number.EPSILON&&Math.abs(V)>Number.EPSILON){const Z=K.left-N.left,re=K.top-N.top;E=Z/z+y.scrollLeft-y.clientLeft,R=re/V+y.scrollTop-y.clientTop}else E=j.offsetLeft,R=j.offsetTop;D=q,A=H,T=y.scrollWidth-E-D,_=y.scrollHeight-R-A}}const P=I?{left:E,right:T,top:R,bottom:_}:null,$=I?{width:D,height:A}:null,O=I?{[ol.activeTabLeft]:`${E}px`,[ol.activeTabRight]:`${T}px`,[ol.activeTabTop]:`${R}px`,[ol.activeTabBottom]:`${_}px`,[ol.activeTabWidth]:`${D}px`,[ol.activeTabHeight]:`${A}px`}:void 0,Y=I&&D>0&&A>0,B=gn("span",t,{state:{orientation:h,activeTabPosition:P,activeTabSize:$,tabActivationDirection:m},ref:n,props:[{role:"presentation",style:O,hidden:!Y},c,{suppressHydrationWarning:!0}],stateAttributesMapping:Aq});return b==null?null:g.jsxs(v.Fragment,{children:[B,S&&a&&g.jsx("script",{nonce:f,dangerouslySetInnerHTML:{__html:Cq},suppressHydrationWarning:!0})]})}),dI=v.forwardRef(function(t,n){const{activateOnFocus:r=!1,className:s,loopFocus:a=!0,render:l,style:c,...f}=t,{onValueChange:d,orientation:h,value:m,setTabMap:b,tabActivationDirection:y}=r0(),[k,S]=v.useState(0),[C,E]=v.useState(null),T=v.useRef(new Set),R=v.useRef(new Set),_=v.useRef(null);Ve(()=>{if(typeof ResizeObserver>"u")return;const Y=new ResizeObserver(()=>{T.current.forEach(U=>{U()})});return _.current=Y,C&&Y.observe(C),R.current.forEach(U=>{Y.observe(U)}),()=>{Y.disconnect(),_.current=null}},[C]);const D=Ke(Y=>(T.current.add(Y),()=>{T.current.delete(Y)})),A=Ke(Y=>(R.current.add(Y),_.current?.observe(Y),()=>{R.current.delete(Y),_.current?.unobserve(Y)})),I=Ke((Y,U)=>{Y!==m&&d(Y,U)}),P={orientation:h,tabActivationDirection:y},$={"aria-orientation":h==="vertical"?"vertical":void 0,role:"tablist"},O=v.useMemo(()=>({activateOnFocus:r,highlightedTabIndex:k,registerIndicatorUpdateListener:D,registerTabResizeObserverElement:A,onTabActivation:I,setHighlightedTabIndex:S,tabsListElement:C}),[r,k,D,A,I,S,C]);return g.jsx(aI.Provider,{value:O,children:g.jsx(S5,{render:l,className:s,style:c,state:P,refs:[n,E],props:[$,f],stateAttributesMapping:Qh,highlightedIndex:k,enableHomeAndEndKeys:!0,loopFocus:a,orientation:h,onHighlightedIndexChange:S,onMapChange:b,disabledIndices:ko})})}),Wd={base:{k1xSpc:"ui-3nfvp2",kGNEyG:"ui-1qjc9v5",kB7OPa:"ui-9f619",kVAEAm:"ui-1n2onr6",kzQI83:"ui-1iyjqo2",k7Eaqz:"ui-euugli",ks0D6T:"ui-193iq5w",$$css:!0},default:{kWkggS:"ui-flfp0o",$$css:!0},padded:{kLKAdn:"ui-493x5y",kpe85a:"ui-14ndyrl",kGO01o:"ui-b6dno7",kE3dHu:"ui-1e7ydrk",$$css:!0},rounded:{kaIpWk:"ui-1i4c3av",$$css:!0}},Nq={sm:{kZKoxP:"ui-1e94bgo",$$css:!0},md:{kZKoxP:"ui-170hpbr",$$css:!0},lg:{kZKoxP:"ui-t8t6p",$$css:!0},xl:{kZKoxP:"ui-12tj2o0",$$css:!0}},Oq={sm:{kZKoxP:"ui-jmh96e",$$css:!0},md:{kZKoxP:"ui-17n66dt",$$css:!0},lg:{kZKoxP:"ui-y8quj6",$$css:!0},xl:{kZKoxP:"ui-1wl7iu6",$$css:!0}},Iq={sm:{kaIpWk:"ui-1yjdzib",$$css:!0},md:{kaIpWk:"ui-17dxljr",$$css:!0},lg:{kaIpWk:"ui-172nrg4",$$css:!0},xl:{kaIpWk:"ui-1y34t1",$$css:!0}},Mq={sm:{kaIpWk:"ui-13mijux",$$css:!0},md:{kaIpWk:"ui-1k9pyrz",$$css:!0},lg:{kaIpWk:"ui-1fkry76",$$css:!0},xl:{kaIpWk:"ui-126z3em",$$css:!0}},wT={base:{kVAEAm:"ui-10l6tqk",kY2c9j:"ui-1ja2u2z",kfzvcC:"ui-47corl",kB7OPa:"ui-9f619",kbCHJM:"ui-vbikie",k87sOh:"ui-10uur0e",kzqmXN:"ui-offw1",kZKoxP:"ui-1gezbiy",kWkggS:"ui-i07v4r",k1ekBW:"ui-98hnz2",kIyJzY:"ui-1bqoo3p ui-sagj69",kAMwcw:"ui-1tkypeg",$$css:!0},rounded:{kaIpWk:"ui-1i4c3av",$$css:!0}},Kd={base:{kysU6D:"ui-jyslct",kzQI83:"ui-1c4vz4f",kmuXW:"ui-2lah0s",kCS8Yb:"ui-dl72j9",kVAEAm:"ui-1n2onr6",kY2c9j:"ui-1vjfegm",kWkggS:"ui-jbqb8w",kMwMTN:"ui-19aaqeu ui-1qp4pc4 ui-1gfq6vl",k1ekBW:"ui-1gbuem2",kIyJzY:"ui-g3p6pi ui-sagj69",kAMwcw:"ui-6ekqhr",$$css:!0},fullWidth:{kzQI83:"ui-1iyjqo2",kCS8Yb:"ui-1r8uery",$$css:!0},compact:{kMwMTN:"ui-4b2ntj ui-1qp4pc4 ui-1gfq6vl",$$css:!0},rounded:{kaIpWk:"ui-1i4c3av",$$css:!0}};function pI(e,t){return e==="outline"?Mq[t]:Iq[t]}function Dq(e,t){return e==="outline"?Oq[t]:Vi[t]}const hI=v.createContext(null);function Lq(){const e=v.use(hI);if(e===null)throw new Error("SegmentedControl.Item must be used within SegmentedControl");return e}function jq({value:e,defaultValue:t,onValueChange:n,variant:r="default",size:s="md",rounded:a=!1,disabled:l=!1,fullWidth:c=!1,children:f,"aria-label":d,"aria-labelledby":h,...m}){const b=v.useMemo(()=>({variant:r,size:s,rounded:a,disabled:l,fullWidth:c}),[l,c,a,s,r]);return g.jsx(hI.Provider,{value:b,children:g.jsx(oI,{...m,value:e,defaultValue:t,onValueChange:n,"data-component":"segmented-control","data-size":s,"data-variant":r,"data-rounded":a||void 0,...{0:{className:"ui-3nfvp2 ui-1qjc9v5 ui-9f619 ui-2lah0s ui-eq5yr9 ui-193iq5w"},1:{className:"ui-3nfvp2 ui-1qjc9v5 ui-9f619 ui-2lah0s ui-193iq5w ui-h8yej3"}}[!!c<<0],children:g.jsxs(dI,{activateOnFocus:!0,"aria-label":d,"aria-labelledby":h,"data-component":"segmented-control-list","data-disabled":l||void 0,...zt(Wd.base,Wd.padded,Nq[s],r==="default"&&Wd.default,r==="outline"&&la.outline,a?Wd.rounded:Es[s]),children:[f,g.jsx(fI,{"data-component":"segmented-control-indicator",...zt(wT.base,a?wT.rounded:pI(r,s))})]})})})}function zq({value:e,disabled:t=!1,children:n,...r}){const s=Lq();return g.jsx(uI,{...r,value:e,disabled:s.disabled||t,"data-component":"segmented-control-item","data-size":s.size,"data-variant":s.variant,"data-rounded":s.rounded||void 0,...zt(bx.root,Ti.content,Ih.root,s.rounded?Kd.rounded:pI(s.variant,s.size),Dq(s.variant,s.size),Ti.size[s.size],s.size==="sm"?Ds.root:Ti.typography[s.size],Kd.base,s.variant==="compact"&&Kd.compact,s.fullWidth&&Kd.fullWidth),children:n})}const vc=Object.assign(jq,{Item:zq}),mI=v.createContext(null),gI=v.createContext(null);function Ls(){const e=v.useContext(mI);if(e===null)throw new Error(Nn(60));return e}function bI(){const e=v.useContext(gI);if(e===null)throw new Error(Nn(61));return e}const pt={id:tt(e=>e.id),labelId:tt(e=>e.labelId),modal:tt(e=>e.modal),multiple:tt(e=>e.multiple),items:tt(e=>e.items),itemToStringLabel:tt(e=>e.itemToStringLabel),itemToStringValue:tt(e=>e.itemToStringValue),isItemEqualToValue:tt(e=>e.isItemEqualToValue),value:tt(e=>e.value),hasSelectedValue:tt(e=>{const{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:Jo(t,r)!==""}),hasNullItemLabel:tt((e,t)=>t?X6(e.items):!1),open:tt(e=>e.open),mounted:tt(e=>e.mounted),forceMount:tt(e=>e.forceMount),transitionStatus:tt(e=>e.transitionStatus),openMethod:tt(e=>e.openMethod),activeIndex:tt(e=>e.activeIndex),selectedIndex:tt(e=>e.selectedIndex),isActive:tt((e,t)=>e.activeIndex===t),isSelected:tt((e,t)=>{const n=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(s=>ua(t,s,n)):ua(t,r,n)}),isSelectedByFocus:tt((e,t)=>e.selectedIndex===t),popupProps:tt(e=>e.popupProps),triggerProps:tt(e=>e.triggerProps),triggerElement:tt(e=>e.triggerElement),positionerElement:tt(e=>e.positionerElement),listElement:tt(e=>e.listElement),popupSide:tt(e=>e.popupSide),scrollUpArrowVisible:tt(e=>e.scrollUpArrowVisible),scrollDownArrowVisible:tt(e=>e.scrollDownArrowVisible),hasScrollArrows:tt(e=>e.hasScrollArrows)};function lc(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))}const xs=1;function yI(e,t){return Math.max(0,e-t)}function Pq(e,t){if(t<=0)return 0;const n=lc(e,0,t),r=n,s=t-n,a=r<=xs,l=s<=xs;return a&&l?r<=s?0:t:a?0:l?t:n}function $q(e){const{id:t,value:n,defaultValue:r=null,onValueChange:s,open:a,defaultOpen:l=!1,onOpenChange:c,name:f,form:d,autoComplete:h,disabled:m=!1,readOnly:b=!1,required:y=!1,modal:k=!0,actionsRef:S,inputRef:C,onOpenChangeComplete:E,items:T,multiple:R=!1,itemToStringLabel:_,itemToStringValue:D,isItemEqualToValue:A=W6,highlightItemOnHover:I=!0,children:P}=e,{clearErrors:$}=DA(),{setDirty:O,setTouched:Y,setFocused:U,validityData:B,setFilled:j,name:q,disabled:H,validation:W,validationMode:F}=Mh(),K=xx({id:t}),N=H||m,z=q??f,[V,L]=_l({controlled:n,default:R?r??ko:r,name:"Select",state:"value"}),[Z,re]=_l({controlled:a,default:l,name:"Select",state:"open"}),ie=v.useRef([]),ae=v.useRef([]),le=v.useRef(null),ce=v.useRef(null),Ee=v.useRef(0),be=v.useRef(null),ue=v.useRef([]),ge=v.useRef(!1),Se=v.useRef(null),Ae=v.useRef(null),ke=v.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),xe=v.useRef(!1),{mounted:Ce,setMounted:Me,transitionStatus:ze}=Yc(Z),{openMethod:Fe,triggerProps:ye}=h3(Z),_e=zr(()=>new X_({id:K,labelId:void 0,modal:k,multiple:R,itemToStringLabel:_,itemToStringValue:D,isItemEqualToValue:A,value:V,open:Z,mounted:Ce,transitionStatus:ze,items:T,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:{},triggerProps:{},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1})).current,ee=mt(_e,pt.activeIndex),fe=mt(_e,pt.selectedIndex),Q=mt(_e,pt.triggerElement),ne=mt(_e,pt.positionerElement),we=n5(Fe),Pe=Fe??we??null,Ye=v.useMemo(()=>R?"":Jo(V,D),[R,V,D]),Ze=v.useMemo(()=>R&&Array.isArray(V)?V.map(Ie=>Jo(Ie,D)):Jo(V,D),[R,V,D]),bt=An(_e.state.triggerElement),Je=Ke(()=>Ze);MA(bt,K,V,Je,!N,f);const vt=v.useRef(V),kt=R?Array.isArray(V)&&V.length>0:V!=null&&Jo(V,D)!=="";Ve(()=>{V!==vt.current&&_e.set("forceMount",!0)},[_e,V]),Ve(()=>{j(kt)},[kt,j]),Ve(function(){const We=ue.current;let dt;if(R){const Et=Array.isArray(V)?V:[];if(Et.length===0)dt=null;else{const Ne=Et[Et.length-1],Tt=mc(We,Ne,A);dt=Tt===-1?null:Tt}}else{const Et=mc(We,V,A);dt=Et===-1?null:Et}dt===null&&(Ae.current=null),!Z&&_e.set("selectedIndex",dt)},[kt,R,Z,V,ue,A,_e,Ae]);function nt(Ie){const We=B.initialValue;return Array.isArray(Ie)&&Array.isArray(We)?!N6(Ie,We,(dt,Et)=>ua(dt,Et,A)):Ie!==We}vA(V,()=>{$(z),O(nt(V)),W.change(V)});const rt=Ke((Ie,We)=>{c?.(Ie,We),!We.isCanceled&&(re(Ie),!Ie&&(We.reason===yh||We.reason===qv)&&(Y(!0),U(!1),F==="onBlur"&&W.commit(V)))}),ct=Ke(()=>{Me(!1),_e.update({activeIndex:null,openMethod:null}),E?.(!1)});_o({enabled:!S,open:Z,ref:le,onComplete(){Z||ct()}}),v.useImperativeHandle(S,()=>({unmount:ct}),[ct]);const it=Ke((Ie,We)=>{s?.(Ie,We),!We.isCanceled&&L(Ie)}),ft=Ke(()=>{const Ie=_e.state.listElement||le.current;if(!Ie)return;const We=yI(Ie.scrollHeight,Ie.clientHeight),dt=Pq(Ie.scrollTop,We),Et=dt>0,Ne=dt<We;_e.state.scrollUpArrowVisible!==Et&&_e.set("scrollUpArrowVisible",Et),_e.state.scrollDownArrowVisible!==Ne&&_e.set("scrollDownArrowVisible",Ne)}),Lt=uA({open:Z,onOpenChange:rt,elements:{reference:Q,floating:ne}}),Pt=RP(Lt,{enabled:!b&&!N,event:"mousedown"}),At=ex(Lt),X=V$(Lt,{enabled:!b&&!N,listRef:ie,activeIndex:ee,selectedIndex:fe,disabledIndices:ko,onNavigate(Ie){Ie===null&&!Z||_e.set("activeIndex",Ie)},focusItemOnHover:I}),me=G$(Lt,{enabled:!b&&!N&&(Z||!R),listRef:ae,activeIndex:ee,selectedIndex:fe,disabledIndices:Ie=>qN(ie.current[Ie]),onMatch(Ie){Z?_e.set("activeIndex",Ie):it(ue.current[Ie],Ct("none"))},onTyping(Ie){ge.current=Ie}}),Le=v.useMemo(()=>{const Ie=Wi(me.reference,X.reference,At.reference,Pt.reference,ye);return K&&(Ie.id=K),Ie},[Pt.reference,me.reference,X.reference,At.reference,ye,K]),Xe=v.useMemo(()=>Wi(ux,me.floating,X.floating,At.floating),[me.floating,X.floating,At.floating]),Rt=X.item??$n;W_(()=>{_e.update({popupProps:Xe,triggerProps:Le})}),Ve(()=>{_e.update({id:K,modal:k,multiple:R,value:V,open:Z,mounted:Ce,transitionStatus:ze,popupProps:Xe,triggerProps:Le,items:T,itemToStringLabel:_,itemToStringValue:D,isItemEqualToValue:A,openMethod:Pe})},[_e,K,k,R,V,Z,Ce,ze,Xe,Le,T,_,D,A,Pe]);const lt=v.useMemo(()=>({store:_e,name:z,required:y,disabled:N,readOnly:b,multiple:R,highlightItemOnHover:I,setValue:it,setOpen:rt,listRef:ie,popupRef:le,scrollHandlerRef:ce,handleScrollArrowVisibility:ft,scrollArrowsMountedCountRef:Ee,itemProps:Rt,valueRef:be,valuesRef:ue,labelsRef:ae,typingRef:ge,selectionRef:ke,firstItemTextRef:Se,selectedItemTextRef:Ae,validation:W,onOpenChangeComplete:E,alignItemWithTriggerActiveRef:xe,initialValueRef:vt}),[_e,z,y,N,b,R,I,it,rt,Rt,W,E,ft]),He=xo(C,W.inputRef),qe=R&&Array.isArray(V)&&V.length>0,De=R?void 0:z,je=v.useMemo(()=>!R||!Array.isArray(V)||!z?null:V.map(Ie=>{const We=Jo(Ie,D);return g.jsx("input",{type:"hidden",form:d,name:z,value:We,disabled:N},We)}),[R,V,d,z,D,N]);return g.jsx(mI.Provider,{value:lt,children:g.jsxs(gI.Provider,{value:Lt,children:[P,g.jsx("input",{...W.getValidationProps(N,{onFocus(){_e.state.triggerElement?.focus({focusVisible:!0})},onChange(Ie){if(Ie.nativeEvent.defaultPrevented||N||b)return;const We=Ie.currentTarget.value,dt=Ct(Oi,Ie.nativeEvent);function Et(){if(R)return;const Ne=We.toLowerCase();let Tt=ue.current.findIndex(rn=>Jo(rn,D).toLowerCase()===Ne||UA(rn,_).toLowerCase()===Ne);Tt===-1&&(Tt=ue.current.findIndex((rn,Rn)=>{const Yn=ae.current[Rn];return Yn!=null&&Yn.toLowerCase()===Ne}));const Qt=Tt===-1?void 0:ue.current[Tt];Qt!=null&&it(Qt,dt)}_e.set("forceMount",!0),queueMicrotask(Et)}}),id:K&&De==null?`${K}-hidden-input`:void 0,form:d,name:De,autoComplete:h,value:Ye,disabled:N,required:y&&!qe,readOnly:b,ref:He,style:z?Yz:h_,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),je]})})}const Yd=2,Bq=400,Fq={...gz,...Zc,popupSide:e=>e?{"data-popup-side":e}:null,value:()=>null},Uq=v.forwardRef(function(t,n){const{render:r,className:s,id:a,disabled:l=!1,nativeButton:c=!0,style:f,...d}=t,{setTouched:h,setFocused:m,validationMode:b,state:y,disabled:k}=Mh(),{labelId:S}=yx(),{store:C,setOpen:E,selectionRef:T,validation:R,readOnly:_,required:D,alignItemWithTriggerActiveRef:A,disabled:I}=Ls(),P=k||I||l,$=mt(C,pt.open),O=mt(C,pt.mounted),Y=mt(C,pt.value),U=mt(C,pt.triggerProps),B=mt(C,pt.positionerElement),j=mt(C,pt.listElement),q=mt(C,pt.popupSide),H=mt(C,pt.id),W=mt(C,pt.labelId),F=mt(C,pt.hasSelectedValue),K=O&&B?q:null,N=a??H,z=Q6(S,W);xx({id:N});const V=An(B),L=v.useRef(null),{getButtonProps:Z,buttonRef:re}=$l({disabled:P,native:c}),ie=Ke(ge=>{C.set("triggerElement",ge)}),ae=yi(),le=yi(),ce=yi();v.useEffect(()=>{if($)return ce.start(Bq,()=>{T.current.allowUnselectedMouseUp=!0,T.current.allowSelectedMouseUp=!0}),()=>{ce.clear()};T.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},le.clear()},[$,T,le,ce]);const Ee=Wi(U,{id:N,role:"combobox","aria-expanded":$?"true":"false","aria-haspopup":"listbox","aria-controls":$?j?.id??Np(B)?.id:void 0,"aria-labelledby":z,"aria-readonly":_||void 0,"aria-required":D||void 0,tabIndex:P?-1:0,onFocus(ge){m(!0),$&&A.current&&E(!1,Ct(Oi,ge.nativeEvent)),ae.start(0,()=>{C.set("forceMount",!0)})},onBlur(ge){ht(B,ge.relatedTarget)||(h(!0),m(!1),b==="onBlur"&&R.commit(Y))},onMouseDown(ge){if($)return;const Se=Wt(ge.currentTarget);function Ae(ke){if(!L.current)return;const xe=ke.target;if(ht(L.current,xe)||ht(V.current,xe))return;const Ce=J6(L.current);ke.clientX>=Ce.left-Yd&&ke.clientX<=Ce.right+Yd&&ke.clientY>=Ce.top-Yd&&ke.clientY<=Ce.bottom+Yd||E(!1,Ct(Rz,ke))}le.start(0,()=>{Se.addEventListener("mouseup",Ae,{once:!0})})}},d,Z),be=R.getValidationProps(P,Ee);be.role="combobox";const ue={...y,open:$,disabled:P,value:Y,readOnly:_,popupSide:K,placeholder:!F};return gn("button",t,{ref:[n,L,re,ie],state:ue,stateAttributesMapping:Fq,props:be})}),qq={value:()=>null},Hq=v.forwardRef(function(t,n){const{className:r,render:s,children:a,placeholder:l,style:c,...f}=t,{store:d,valueRef:h}=Ls(),m=mt(d,pt.value),b=mt(d,pt.items),y=mt(d,pt.itemToStringLabel),k=mt(d,pt.hasSelectedValue),S=!k&&l!=null&&a==null,C=mt(d,pt.hasNullItemLabel,S),E={value:m,placeholder:!k};let T=null;return typeof a=="function"?T=a(m):a!=null?T=a:!k&&l!=null&&!C?T=l:Array.isArray(m)?T=Z6(m,b,y):T=qA(m,b,y),gn("span",t,{state:E,ref:[n,h],props:[{children:T},f],stateAttributesMapping:qq})}),Vq=v.createContext(void 0),Gq=v.forwardRef(function(t,n){const{store:r}=Ls(),s=mt(r,pt.mounted),a=mt(r,pt.forceMount);return s||a?g.jsx(Vq.Provider,{value:!0,children:g.jsx(vP,{ref:n,...t})}):null}),Wq={...Wc,...To},Kq=v.forwardRef(function(t,n){const{render:r,className:s,style:a,...l}=t,{store:c}=Ls(),f=mt(c,pt.open),d=mt(c,pt.mounted),h=mt(c,pt.transitionStatus);return gn("div",t,{state:{open:f,transitionStatus:h},ref:n,props:[{role:"presentation",hidden:!d,style:{userSelect:"none",WebkitUserSelect:"none"}},l],stateAttributesMapping:Wq})}),vI=v.createContext(void 0);function xI(){const e=v.useContext(vI);if(!e)throw new Error(Nn(59));return e}function nh(e,t){e&&Object.assign(e.style,t)}const kI={position:"relative",maxHeight:"100%",overflowX:"hidden",overflowY:"auto"},Yq={position:"fixed"},Xq=v.forwardRef(function(t,n){const{anchor:r,positionMethod:s="absolute",className:a,render:l,side:c="bottom",align:f="center",sideOffset:d=0,alignOffset:h=0,collisionBoundary:m="clipping-ancestors",collisionPadding:b,arrowPadding:y=5,sticky:k=!1,disableAnchorTracking:S,alignItemWithTrigger:C=!0,collisionAvoidance:E=gP,style:T,...R}=t,{store:_,listRef:D,labelsRef:A,alignItemWithTriggerActiveRef:I,selectedItemTextRef:P,valuesRef:$,initialValueRef:O,popupRef:Y,setValue:U}=Ls(),B=bI(),j=mt(_,pt.open),q=mt(_,pt.mounted),H=mt(_,pt.modal),W=mt(_,pt.value),F=mt(_,pt.openMethod),K=mt(_,pt.positionerElement),N=mt(_,pt.triggerElement),z=mt(_,pt.isItemEqualToValue),V=mt(_,pt.transitionStatus),L=v.useRef(null),Z=v.useRef(null),[re,ie]=v.useState(C),ae=q&&re&&F!=="touch";!q&&re!==C&&ie(C),Ve(()=>{q||(pt.scrollUpArrowVisible(_.state)&&_.set("scrollUpArrowVisible",!1),pt.scrollDownArrowVisible(_.state)&&_.set("scrollDownArrowVisible",!1))},[_,q]),v.useImperativeHandle(I,()=>ae),u4((ae||H)&&j,F==="touch",K,N);const le=Sx({anchor:r,floatingRootContext:B,positionMethod:s,mounted:q,side:c,sideOffset:d,align:f,alignOffset:h,arrowPadding:y,collisionBoundary:m,collisionPadding:b,sticky:k,disableAnchorTracking:S??ae,collisionAvoidance:E,keepMounted:!0}),ce=ae?"none":le.side,Ee=ae?Yq:le.positionerStyles,be={open:j,side:ce,align:le.align,anchorHidden:le.anchorHidden};Ve(()=>{_.set("popupSide",le.side)},[_,le.side]);const ue=Ke(xe=>{_.set("positionerElement",xe)}),ge=wx(t,be,{styles:Ee,transitionStatus:V,props:R,refs:[n,ue],hidden:!q,inert:!j}),Se=v.useRef(0),Ae=Ke(xe=>{if(xe.size===0&&Se.current===0||$.current.length===0)return;const Ce=Se.current;if(Se.current=xe.size,xe.size===Ce)return;const Me=Ct(Oi);if(Ce!==0&&!_.state.multiple&&W!==null&&mc($.current,W,z)===-1){const Fe=O.current,_e=Fe!=null&&mc($.current,Fe,z)!==-1?Fe:null;U(_e,Me),_e===null&&(_.set("selectedIndex",null),P.current=null)}if(Ce!==0&&_.state.multiple&&Array.isArray(W)){const ze=ye=>mc($.current,ye,z)!==-1,Fe=W.filter(ye=>ze(ye));(Fe.length!==W.length||Fe.some(ye=>!K6(W,ye,z)))&&(U(Fe,Me),Fe.length===0&&(_.set("selectedIndex",null),P.current=null))}if(j&&ae){_.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});const ze={height:""};nh(K,ze),nh(Y.current,ze)}}),ke=v.useMemo(()=>({...le,side:ce,alignItemWithTriggerActive:ae,setControlledAlignItemWithTrigger:ie,scrollUpArrowRef:L,scrollDownArrowRef:Z}),[le,ce,ae,ie]);return g.jsx(kx,{elementsRef:D,labelsRef:A,onMapChange:Ae,children:g.jsxs(vI.Provider,{value:ke,children:[q&&H&&g.jsx(i3,{inert:r3(!j),cutout:N}),ge]})})}),Xd="base-ui-disable-scrollbar",Jy={className:Xd,getElement(e){return g.jsx("style",{nonce:e,href:Xd,precedence:"base-ui:low",children:`.${Xd}{scrollbar-width:none}.${Xd}::-webkit-scrollbar{display:none}`})}},Zq={...Wc,...To},Qq=v.forwardRef(function(t,n){const{render:r,className:s,style:a,finalFocus:l,...c}=t,{store:f,popupRef:d,onOpenChangeComplete:h,setOpen:m,valueRef:b,firstItemTextRef:y,selectedItemTextRef:k,multiple:S,handleScrollArrowVisibility:C,scrollHandlerRef:E,listRef:T,highlightItemOnHover:R}=Ls(),{side:_,align:D,alignItemWithTriggerActive:A,isPositioned:I,setControlledAlignItemWithTrigger:P}=xI(),$=e5()!=null,O=bI(),Y=Li(),{nonce:U,disableStyleElements:B}=cI(),j=mt(f,pt.id),q=mt(f,pt.open),H=mt(f,pt.openMethod),W=mt(f,pt.mounted),F=mt(f,pt.popupProps),K=mt(f,pt.transitionStatus),N=mt(f,pt.triggerElement),z=mt(f,pt.positionerElement),V=mt(f,pt.listElement),L=v.useRef(!1),Z=v.useRef(!1),re=v.useRef({}),ie=Tl(),ae=Ke(be=>{if(!z||!d.current||!Z.current)return;if(L.current||!A){C();return}const ue=z.style.top==="0px",ge=z.style.bottom==="0px";if(!ue&&!ge){C();return}const Se=TT(z),Ae=uc(z.getBoundingClientRect().height,"y",Se),ke=Wt(z),xe=vn(z),Ce=xe.getComputedStyle(z),Me=parseFloat(Ce.marginTop),ze=parseFloat(Ce.marginBottom),Fe=ET(xe.getComputedStyle(d.current)),ye=Math.min(ke.documentElement.clientHeight-Me-ze,Fe),_e=be.scrollTop,ee=Zd(be);let fe=0,Q=null,ne=!1,we=!1;const Pe=Je=>{z.style.height=`${Je}px`},Ye=(Je,vt)=>{const kt=lc(Je,0,ye-Ae);kt>0&&Pe(Ae+kt),be.scrollTop=vt,ye-(Ae+kt)<=xs&&(L.current=!0),C()},Ze=ue?ee-_e:_e,bt=Math.min(Ae+Ze,ye);if(fe=bt,Ze<=xs){Ye(Ze,ue?ee:0);return}if(ye-bt>xs)ue?we=!0:Q=0;else if(ne=!0,ge&&_e<ee){const Je=Ae+Ze-ye;Q=_e-(Ze-Je)}if(fe=Math.ceil(fe),fe!==0&&Pe(fe),we||Q!=null){const Je=Zd(be),vt=we?Je:lc(Q,0,Je);Math.abs(be.scrollTop-vt)>xs&&(be.scrollTop=vt)}(ne||fe>=ye-xs)&&(L.current=!0),C()});v.useImperativeHandle(E,()=>ae,[ae]),_o({open:q,ref:d,onComplete(){q&&h?.(!0)}});const le={open:q,transitionStatus:K,side:_,align:D};Ve(()=>{!z||!d.current||Object.keys(re.current).length||(re.current={top:z.style.top||"0",left:z.style.left||"0",right:z.style.right,height:z.style.height,bottom:z.style.bottom,minHeight:z.style.minHeight,maxHeight:z.style.maxHeight,marginTop:z.style.marginTop,marginBottom:z.style.marginBottom})},[d,z]),Ve(()=>{q||A||(Z.current=!1,L.current=!1,nh(z,re.current))},[q,A,z,d]),Ve(()=>{const be=d.current;if(!q||!N||!z||!be||A&&!I||f.state.transitionStatus==="ending")return;if(!A){Z.current=!0,ie.request(C),be.style.removeProperty("--transform-origin");return}const ue=Jq(be);be.style.removeProperty("--transform-origin");try{let ge=k.current;ge?.isConnected||(ge=!pt.hasSelectedValue(f.state)&&y.current?.isConnected?y.current:null);const Se=b.current,Ae=vn(z),ke=Ae.getComputedStyle(z),xe=Ae.getComputedStyle(be),Ce=Wt(N),Me=TT(N),ze=Qd(N.getBoundingClientRect(),Me),Fe=Qd(z.getBoundingClientRect(),Me),ye=ze.height,_e=V||be,ee=_e.scrollHeight,fe=parseFloat(xe.borderBottomWidth),Q=parseFloat(ke.marginTop)||10,ne=parseFloat(ke.marginBottom)||10,we=parseFloat(ke.minHeight)||100,Pe=ET(xe),Ye=5,Ze=5,bt=20,Je=Ce.documentElement.clientHeight-Q-ne,vt=Ce.documentElement.clientWidth,kt=Je-ze.bottom+ye;let nt,rt=Y==="rtl"?ze.right-Fe.width:ze.left,ct=0;if(ge&&Se){const lt=Qd(Se.getBoundingClientRect(),Me);nt=Qd(ge.getBoundingClientRect(),Me),rt=Fe.left+(Y==="rtl"?lt.right-nt.right:lt.left-nt.left);const He=lt.top-ze.top+lt.height/2;ct=nt.top-Fe.top+nt.height/2-He}const it=kt+ct+ne+fe;let ft=Math.min(Je,it);const Lt=Je-Q-ne,Pt=it-ft,At=vt-Ze;z.style.left=`${lc(rt,Ye,At-Fe.width)}px`,z.style.height=`${ft}px`,z.style.maxHeight="none",z.style.marginTop=`${Q}px`,z.style.marginBottom=`${ne}px`,be.style.height="100%";const X=Zd(_e),me=Pt>=X-xs;me&&(ft=Math.min(Je,Fe.height)-(Pt-X));const Le=ze.top<bt||ze.bottom>Je-bt||Math.ceil(ft)+xs<Math.min(ee,we),Xe=(Ae.visualViewport?.scale??1)!==1&&Co;if(Le||Xe){Z.current=!0,nh(z,re.current),P(!1);return}const Rt=Math.max(we,ft);if(me){const lt=Math.max(0,Je-it);z.style.top=Fe.height>=Lt?"0":`${lt}px`,z.style.height=`${ft}px`,_e.scrollTop=Zd(_e)}else z.style.bottom="0",_e.scrollTop=Pt;if(nt){const lt=Fe.top,He=Fe.height,qe=nt.top+nt.height/2,De=He>0?(qe-lt)/He*100:50,je=lc(De,0,100);be.style.setProperty("--transform-origin",`50% ${je}%`)}(Rt===Je||ft>=Pe)&&(L.current=!0),C(),R&&f.state.selectedIndex===null&&f.state.activeIndex===null&&T.current[0]!=null&&f.set("activeIndex",0),Z.current=!0}finally{ue()}},[f,q,z,N,b,y,k,d,C,A,P,ie,V,T,R,Y,I]),v.useEffect(()=>{if(!A||!z||!q)return;const be=vn(z);function ue(ge){m(!1,Ct(_z,ge))}return Dt(be,"resize",ue)},[m,A,z,q]);const ce={...V?{role:"presentation","aria-orientation":void 0}:{role:"listbox","aria-multiselectable":S||void 0,id:`${j}-list`},onKeyDown(be){$&&yA.has(be.key)&&be.stopPropagation()},onScroll(be){V||ae(be.currentTarget)},...A&&{style:V?{height:"100%"}:kI}},Ee=gn("div",t,{ref:[n,d],state:le,stateAttributesMapping:Zq,props:[F,ce,Dh(K),{className:!V&&A?Jy.className:void 0},c]});return g.jsxs(v.Fragment,{children:[!B&&Jy.getElement(U),g.jsx(CP,{context:O,modal:!1,disabled:!W,openInteractionType:H,returnFocus:l,restoreFocus:!0,children:Ee})]})});function ET(e){const t=e.maxHeight||"";return t.endsWith("px")&&parseFloat(t)||1/0}function Zd(e){return yI(e.scrollHeight,e.clientHeight)}function TT(e){return B_.getScale(e)}function uc(e,t,n){return e/n[t]}function Qd(e,t){return Tc({x:uc(e.x,"x",t),y:uc(e.y,"y",t),width:uc(e.width,"x",t),height:uc(e.height,"y",t)})}const CT=[["transform","none"],["scale","1"],["translate","0 0"]];function Jq(e){const{style:t}=e,n={};for(const[r,s]of CT)n[r]=t.getPropertyValue(r),t.setProperty(r,s,"important");return()=>{for(const[r]of CT){const s=n[r];s?t.setProperty(r,s):t.removeProperty(r)}}}const e7=v.forwardRef(function(t,n){const{render:r,className:s,style:a,...l}=t,{store:c,scrollHandlerRef:f}=Ls(),{alignItemWithTriggerActive:d}=xI(),h=mt(c,pt.hasScrollArrows),m=mt(c,pt.openMethod),b=mt(c,pt.multiple),k={id:`${mt(c,pt.id)}-list`,role:"listbox","aria-multiselectable":b||void 0,onScroll(C){f.current?.(C.currentTarget)},...d&&{style:kI},className:h&&m!=="touch"?Jy.className:void 0},S=Ke(C=>{c.set("listElement",C)});return gn("div",t,{ref:[n,S],props:[k,l]})}),SI=v.createContext(void 0);function i0(){const e=v.useContext(SI);if(!e)throw new Error(Nn(57));return e}const t7=v.memo(v.forwardRef(function(t,n){const{render:r,className:s,style:a,value:l=null,label:c,disabled:f=!1,nativeButton:d=!1,...h}=t,m=v.useRef(null),b=KA({label:c,textRef:m,indexGuessBehavior:WA.GuessFromOrder}),{store:y,itemProps:k,setOpen:S,setValue:C,selectionRef:E,typingRef:T,valuesRef:R,multiple:_,selectedItemTextRef:D,disabled:A,readOnly:I}=Ls(),P=mt(y,pt.isActive,b.index),$=mt(y,pt.open),O=mt(y,pt.isSelected,l),Y=mt(y,pt.isSelectedByFocus,b.index),U=mt(y,pt.isItemEqualToValue),B=b.index,j=B!==-1,q=v.useRef(null);Ve(()=>{if(!j)return;const ae=R.current;return ae[B]=l,()=>{delete ae[B]}},[j,B,l,R]),Ve(()=>{if(!j)return;const ae=y.state.value;let le=ae;_&&Array.isArray(ae)&&(le=ae.length>0?ae[ae.length-1]:void 0),le!==void 0&&ua(l,le,U)&&(y.set("selectedIndex",B),m.current&&(D.current=m.current))},[j,B,_,U,y,l,D]);const H=v.useRef(null),W=v.useRef("mouse"),F=v.useRef(!1),{getButtonProps:K,buttonRef:N}=$l({disabled:f,focusableWhenDisabled:!0,native:d,composite:!0}),z={disabled:f,selected:O,highlighted:P};function V(ae){if(A||I)return;const le=y.state.value;if(_){const ce=Array.isArray(le)?le:[],Ee=O?Y6(ce,l,U):[...ce,l];C(Ee,Ct(yb,ae))}else C(l,Ct(yb,ae)),S(!1,Ct(yb,ae))}function L(){E.current.dragY=0}const Z={role:"option","aria-selected":O,tabIndex:$&&P?0:-1,onKeyDown(ae){H.current=ae.key,y.set("activeIndex",B),ae.key===" "&&T.current&&ae.preventDefault()},onClick(ae){const le=ae.type==="click"&&W.current!=="touch",ce=ae.nativeEvent.pointerType,Ee=le&&Wv(ae.nativeEvent)&&(ce!==void 0||P),be=le&&!Ee&&!F.current;F.current=!1,!(ae.type==="keydown"&&H.current===null)&&(f||ae.type==="keydown"&&H.current===" "&&T.current||be||(H.current=null,V(ae.nativeEvent)))},onPointerEnter(ae){W.current=ae.pointerType},onPointerMove(ae){if(ae.pointerType==="mouse"&&ae.buttons===1){const le=E.current;le.dragY+=ae.movementY,le.dragY**2>=64&&(le.allowUnselectedMouseUp=!0)}},onPointerDown(ae){W.current=ae.pointerType,F.current=!0,L()},onMouseUp(){if(L(),f||W.current==="touch"||F.current)return;const ae=!E.current.allowSelectedMouseUp&&O,le=!E.current.allowUnselectedMouseUp&&!O;ae||le||(F.current=!0,q.current?.click(),F.current=!1)}},re=gn("div",t,{ref:[N,n,b.ref,q],state:z,props:[k,Z,h,K]}),ie=v.useMemo(()=>({selected:O,index:B,textRef:m,selectedByFocus:Y,hasRegistered:j}),[O,B,m,Y,j]);return g.jsx(SI.Provider,{value:ie,children:re})})),RT=v.forwardRef(function(t,n){const r=t.keepMounted??!1,{selected:s}=i0();return r||s?g.jsx(n7,{...t,ref:n}):null}),n7=v.memo(v.forwardRef((e,t)=>{const{render:n,className:r,style:s,keepMounted:a,...l}=e,{selected:c}=i0(),f=v.useRef(null),{transitionStatus:d,setMounted:h}=Yc(c),b=gn("span",e,{ref:[t,f],state:{selected:c,transitionStatus:d},props:[{"aria-hidden":!0,children:"✔️"},l],stateAttributesMapping:To});return _o({open:c,ref:f,onComplete(){c||h(!1)}}),b})),r7=v.memo(v.forwardRef(function(t,n){const{index:r,textRef:s,selectedByFocus:a,hasRegistered:l}=i0(),{firstItemTextRef:c,selectedItemTextRef:f}=Ls(),{render:d,className:h,style:m,...b}=t,y=v.useCallback(S=>{S&&(l&&r===0&&(c.current=S),l&&a&&(f.current=S))},[c,f,r,a,l]);return gn("div",t,{ref:[y,n,s],props:b})})),wI="lg",EI="outline",i7={"ui--default-marker":"ui--default-marker",$$css:!0},Gi={base:{kysU6D:"ui-jyslct",keoZOQ:"ui-dj266r",k71WvV:"ui-14z9mp",k1K539:"ui-at24cr",keTefX:"ui-1lziwak",k63SB2:"ui-1pd3egz",k1xSpc:"ui-78zum5",kXwgrk:"ui-1q0g3np",kGNEyG:"ui-6s0dn4",kOIVth:"ui-11twubx",$$css:!0},sizeLg:{kLKAdn:"ui-f6zju3",kwRFfy:"ui-1msowdo",kGO01o:"ui-cnij5n",kZCmMZ:"ui-1uxnm1j",$$css:!0},sizeMd:{kLKAdn:"ui-493x5y",kwRFfy:"ui-1tlft3r",kGO01o:"ui-b6dno7",kZCmMZ:"ui-v853mj",$$css:!0},shapeRounded:{kaIpWk:"ui-1043rbw",$$css:!0},shapePill:{kaIpWk:"ui-1i4c3av",$$css:!0},frameContentLg:{keoZOQ:"ui-1m79sar",k1K539:"ui-1w4rq16",keTefX:"ui-1t34h19",k71WvV:"ui-u45m27",$$css:!0},frameContentMd:{keoZOQ:"ui-lvyip8",k1K539:"ui-b4cpfm",keTefX:"ui-1hk7dha",k71WvV:"ui-yy14hb",$$css:!0},frameContentHugFalseLg:{kzqmXN:"ui-lai49p",$$css:!0},frameContentHugFalseMd:{kzqmXN:"ui-u0r5jw",$$css:!0},hugFalse:{kzqmXN:"ui-h8yej3",kjj79g:"ui-13a6bvl",$$css:!0}},_T={base:{kUk6DE:"ui-98rzlu",k7Eaqz:"ui-euugli",k9WMMc:"ui-1yc453h",kMwMTN:"ui-15rks2t",$$css:!0},placeholder:{kMwMTN:"ui-4b2ntj ui-1s8h5yg",$$css:!0}},s7="sm",o7={md:Gi.sizeMd,lg:Gi.sizeLg},a7={md:Gi.frameContentMd,lg:Gi.frameContentLg},l7={md:Gi.frameContentHugFalseMd,lg:Gi.frameContentHugFalseLg};function u7({children:e,variant:t=EI,frame:n="container",shape:r="rounded",size:s=wI,hug:a=!0,className:l,style:c,rootStyle:f,labelStyle:d,disabled:h=!1,id:m,leading:b,trailing:y,open:k,placeholder:S,hideChevron:C=!1,ref:E,"data-popup-open":T,...R}){const _=e==null&&S!=null,D=k??(T!==void 0&&T!==!1),A=k===void 0?T:k||void 0,I=mx(t,void 0),P=zt(bx.root,Gi.base,_s.root,Vi[s],o7[s],_i.appearance,I.applyControlTone&&gx.foreground,I.applyFilledColors&&_i.colors,I.applyNonFilledBackground&&la.background,t==="outline"&&la.outline,D&&_i.engaged,!a&&Gi.hugFalse,r==="pill"?Gi.shapePill:Gi.shapeRounded,n==="content"&&a7[s],n==="content"&&!a&&l7[s],f,i7),$=zt(Hl.root,Ih.root,_T.base,_&&_T.placeholder,d),O={className:"ui-78zum5 ui-6s0dn4 ui-2lah0s ui-1mh7f6w ui-1s8h5yg"},Y={0:{className:"ui-2lah0s ui-1mh7f6w ui-1s8h5yg"},1:{className:"ui-2lah0s ui-7qsbfx"}}[!!D<<0];return g.jsxs(hx,{...R,ref:E,id:m,className:sn("ui-select-trigger",P.className,l),style:{...P.style,...c},"data-popup-open":A,"data-variant":t,"data-size":s,disabled:h,children:[b!=null&&g.jsx("span",{className:O.className,style:O.style,children:b}),g.jsx("span",{className:sn("ui-select-label",$.className),style:$.style,children:_?S:e}),y!=null&&g.jsx("span",{className:O.className,style:O.style,children:y}),C?null:g.jsx(qt,{name:"chevron-down",size:10,className:sn("ui-select-icon",Y.className),style:Y.style})]})}const AT={backdrop:{kVAEAm:"ui-ixxii4",kpwlN0:"ui-10a8y8t",kWkggS:"ui-jbqb8w",$$css:!0},backdropZIndex:e=>[{kY2c9j:e!=null?"ui-r3buco":e,$$css:!0},{"--x-zIndex":e??void 0}]},TI=v.createContext(null);function s0(){const e=v.useContext(TI);if(!e)throw new Error("Select internals must be used within Select");return e}function c7(){const e=s0(),t=e.hasValue?g.jsx(Hq,{}):void 0;return g.jsx(Uq,{disabled:e.disabled,id:e.id,...e.ariaLabel!==void 0?{"aria-label":e.ariaLabel}:{},...e.ariaLabelledBy!==void 0?{"aria-labelledby":e.ariaLabelledBy}:{},render:e.renderTrigger??((n,r)=>g.jsx(u7,{...n,className:sn(n.className,e.className),disabled:e.disabled,frame:e.frame,hug:e.hug,hideChevron:e.hideChevron,leading:e.leading,labelStyle:e.labelStyle,open:r.open,placeholder:e.placeholder,rootStyle:e.rootStyle,trailing:e.trailing,shape:e.shape,size:e.size,variant:e.variant})),children:t})}function f7({children:e}){const t=s0(),n=ya(),{zIndex:r,portalLayerStyles:s}=ql("popover",t.open),a=Bh(t.placement,t.offset,!1),l=t.matchAnchorWidth?"var(--anchor-width)":t.contentWidth;return g.jsxs(Gq,{container:n??void 0,style:s,children:[g.jsx(Kq,{"data-component":"select-backdrop",...zt(AT.backdrop,r!==null&&AT.backdropZIndex(r-1))}),g.jsx(Xq,{align:a.align,alignItemWithTrigger:!1,alignOffset:a.alignOffset,collisionAvoidance:a.collisionAvoidance,"data-component":"select-positioner",positionMethod:a.positionMethod,side:a.side,sideOffset:a.sideOffset,...jh(v4),children:g.jsx(Qq,{"data-block-global-shortcuts":t.open?"Escape":void 0,"data-component":"select-popup","data-size":t.menuSize,...zt(R4,Lh,_4[t.menuSize],l!==void 0?A4(l):N4,t.contentStyle),children:g.jsx(Ms,{menuSize:t.menuSize,children:g.jsx(dB,{children:g.jsx(e7,{"aria-label":t.ariaLabel??"Select an option",...zt(O4),children:e})})})})})]})}function d7({option:e}){s0();const t=e.description!==void 0,n=g.jsxs(t7,{disabled:e.disabled,label:typeof e.label=="string"?e.label:void 0,value:e.value,"data-component":"select-item","data-has-description":t||void 0,...zt(I4),children:[e.leading!=null?g.jsx("span",{...zt(Ib,$4,t&&Mb),children:e.leading}):null,g.jsxs("span",{...zt(M4,t&&j4),children:[g.jsxs(r7,{...zt(e.labelMeta!=null&&L4),children:[g.jsx("span",{...zt(D4),children:e.label}),e.labelMeta!=null?g.jsx("span",{...zt(P4),children:e.labelMeta}):null]}),t?g.jsx("span",{"data-component":"select-item-description",...zt(z4,Ds.root),children:e.description}):null]}),e.trailing!=null?g.jsxs("span",{"data-component":"select-item-end",...zt(Ib,CE,B4,t&&Mb),children:[e.trailing,g.jsx(RT,{"data-component":"select-item-indicator",children:g.jsx(qt,{color:"primary",name:"check","aria-hidden":!0})})]}):g.jsx(RT,{"data-component":"select-item-indicator",...zt(Ib,CE,t&&Mb),children:g.jsx(qt,{color:"primary",name:"check","aria-hidden":!0})})]});return e.tooltip==null?n:g.jsx(lf,{closeDelay:e.tooltipCloseDelay,content:e.tooltip,openDelay:e.tooltipOpenDelay,children:n})}function p7({value:e,defaultValue:t,onValueChange:n,open:r,defaultOpen:s,onOpenChange:a,options:l,placeholder:c,variant:f=EI,frame:d="container",shape:h="rounded",size:m=wI,menuSize:b,contentWidth:y,matchAnchorWidth:k=!1,hug:S=!0,disabled:C=!1,className:E,renderTrigger:T,placement:R="bottom-start",offset:_=4,"aria-label":D,"aria-labelledby":A,id:I,leading:P,trailing:$,labelStyle:O,rootStyle:Y,hideChevron:U=!1,contentStyle:B,...j}){const[q,H]=Ml(e,t,void 0,"Select.Root (value)"),W=q!=null&&l.some(re=>re.value===q),[F,K]=Ml(r,s??!1,void 0,"Select.Root (open)"),N=b??"sm",z=v.useCallback((re,ie)=>{n?.(re,ie),!ie.isCanceled&&H(re)},[n,H]),V=v.useCallback((re,ie)=>{a?.(re,ie),!ie.isCanceled&&K(re)},[a,K]),L=v.useMemo(()=>({hasValue:W,variant:f,frame:d,shape:h,size:m,menuSize:N,hug:S,disabled:C,open:F,placement:R,offset:_,id:I,ariaLabel:D,ariaLabelledBy:A,placeholder:c,leading:P,trailing:$,labelStyle:O,rootStyle:Y,hideChevron:U,contentStyle:B,className:E,renderTrigger:T,contentWidth:y,matchAnchorWidth:k}),[D,A,E,B,y,C,d,S,W,U,I,F,O,P,k,_,R,c,N,Y,$,T,h,m,f]),Z=l.map(re=>({label:re.label,value:re.value}));return g.jsx(TI.Provider,{value:L,children:g.jsx(Ms,{iconSize:s7,children:g.jsxs($q,{...j,defaultOpen:s,defaultValue:t,disabled:C,id:I,items:Z,onOpenChange:V,onValueChange:z,open:r,value:e,children:[g.jsx(c7,{}),g.jsx(f7,{children:l.map((re,ie)=>g.jsx(d7,{option:re},typeof re.value=="string"||typeof re.value=="number"?String(re.value):ie))})]})})})}const h7=v.createContext(void 0);function m7(e=!0){const t=v.useContext(h7);if(t===void 0&&!e)throw new Error(Nn(7));return t}const g7=v.forwardRef(function(t,n){const{className:r,defaultPressed:s=!1,disabled:a=!1,form:l,onPressedChange:c,pressed:f,render:d,type:h,value:m,nativeButton:b=!0,style:y,...k}=t,S=Fl(m||void 0),C=m7(),E=C?.value??[],T=C?void 0:s,R=(a||C?.disabled)??!1,[_,D]=_l({controlled:C?S!==void 0&&E.indexOf(S)>-1:f,default:T,name:"Toggle",state:"pressed"}),{getButtonProps:A,buttonRef:I}=$l({disabled:R,native:b}),P={disabled:R,pressed:_},$=[I,n],O=[{"aria-pressed":_,onClick(B){const j=!_,q=Ct(Oi,B.nativeEvent);c?.(j,q),!q.isCanceled&&(S&&C?.setGroupValue?.(S,j,q),!q.isCanceled&&D(j))}},k,A],Y=gn("button",t,{enabled:!C,state:P,ref:$,props:O}),U=v.useMemo(()=>({disabled:R,focusableWhenDisabled:!1}),[R]);return C?g.jsx(t5,{tag:"button",render:d,className:r,style:y,metadata:U,state:P,refs:$,props:O}):Y});function NT(e,t,n,r){return typeof e=="string"?g.jsx(qt,{"aria-hidden":"true",name:e,rootStyle:r,size:n,variant:t}):g.jsx("span",{...PN(n),"aria-hidden":"true",children:e})}function b7({icon:e,pressedIcon:t,pressed:n,iconVariant:r,iconSize:s,iconStyle:a}){return g.jsxs("span",{className:"ui-rvj5dj ui-6s0dn4 ui-1o2pa38 ui-c8icb0 ui-47corl ui-1heor9g","aria-hidden":"true",children:[g.jsx("span",{className:"ui-1ms6mhf ui-gkxs2y ui-3nfvp2 ui-6s0dn4 ui-l56j7k ui-1g0ag68 ui-g01cxk ui-6rycqq ui-fimr68 ui-1owdx9d ui-tea3wc ui-1qzdkne ui-nejef0 ui-4wkmsb ui-7pq1vu ui-6ekqhr","data-swap-active":!n||void 0,children:NT(e,r,s,a)}),g.jsx("span",{className:"ui-1ms6mhf ui-gkxs2y ui-3nfvp2 ui-6s0dn4 ui-l56j7k ui-1g0ag68 ui-g01cxk ui-6rycqq ui-fimr68 ui-1owdx9d ui-tea3wc ui-1qzdkne ui-nejef0 ui-4wkmsb ui-7pq1vu ui-6ekqhr","data-swap-active":n||void 0,children:NT(t,r,s,a)})]})}function y7({icon:e,pressedIcon:t=e,iconVariant:n="outline",variant:r,rounded:s,frame:a="container",size:l,iconSize:c,tone:f,rootStyle:d,iconStyle:h,disabled:m,"aria-label":b,"aria-labelledby":y,...k}){const S=ba(),{size:C,innerIconSize:E,disabled:T,variant:R,tone:_}=BN({disabled:m,enforced:S,iconSize:c,size:l,tone:f,variant:r}),D=$N({enforcedRootStyle:S?.iconButtonRootStyle,frame:a,rootStyle:d,rounded:s,size:C,tone:_,variant:R});return g.jsx(g7,{...k,className:sn("ui-icon-button",D.rootAttrs.className),style:D.rootAttrs.style,...D.dataAttrs,"aria-label":b,"aria-labelledby":y,"data-component":"toggle-icon-button",disabled:T,render:(A,I)=>g.jsx("button",{...A,"data-pressed":void 0,children:g.jsx(b7,{icon:e,iconSize:E,iconStyle:[S?.iconButtonIconStyle,h],iconVariant:n,pressed:I.pressed,pressedIcon:t})})})}function v7({pressed:e,...t}){return g.jsx(y7,{...t,pressed:e,variant:e?"secondary":"ghost"})}const OT=e=>{let t;const n=new Set,r=(d,h)=>{const m=typeof d=="function"?d(t):d;if(!Object.is(m,t)){const b=t;t=h??(typeof m!="object"||m===null)?m:Object.assign({},t,m),n.forEach(y=>y(t,b))}},s=()=>t,c={setState:r,getState:s,getInitialState:()=>f,subscribe:d=>(n.add(d),()=>n.delete(d))},f=t=e(r,s,c);return c},x7=(e=>e?OT(e):OT),k7=e=>e;function S7(e,t=k7){const n=sc.useSyncExternalStore(e.subscribe,sc.useCallback(()=>t(e.getState()),[e,t]),sc.useCallback(()=>t(e.getInitialState()),[e,t]));return sc.useDebugValue(n),n}const w7=/^\/internal\/agent-serve\/agents\/(asd_[0-9a-f]{32})\/engine(?:\/|$)/,E7=/^asd-([0-9a-f]{32})\.agents\.cursorusercontent\.com$/;function T7(e=window.location.pathname,t=window.location.hostname){const n=E7.exec(t.toLowerCase());if(n!==null)return{publicId:`asd_${n[1]}`,mountPath:""};const r=w7.exec(e);if(r===null)return null;const s=r[1];return{publicId:s,mountPath:`/internal/agent-serve/agents/${s}/engine`}}function C7(e=window.location.search){return new URLSearchParams(e).get("embed")==="1"}function CI(e=window.location,t=window.history){const n=e.hash.startsWith("#")?e.hash.slice(1):e.hash;if(n==="")return"";const s=new URLSearchParams(n).get("access")?.trim()??"";return s===""?"":(t.replaceState(null,"",`${e.pathname}${e.search}`),s)}function R7(e,t=window){const n=()=>{const r=CI(t.location,t.history);r!==""&&e(r)};return t.addEventListener("hashchange",n),()=>t.removeEventListener("hashchange",n)}function RI(e){const t=typeof e=="string"?e:e!==null&&typeof e=="object"&&typeof e.url=="string"?e.url:null;if(t===null)return null;let n;try{n=new URL(t)}catch{return null}return n.protocol==="http:"||n.protocol==="https:"?t:null}function _I(e){return{kind:typeof e.kind=="string"&&e.kind!==""?e.kind:"artifact",title:typeof e.title=="string"&&e.title.trim()!==""?e.title:void 0,url:RI(e.data)??void 0,artifactId:typeof e.id=="string"&&e.id!==""?e.id:void 0,data:e.data}}function ev(e){if(!Number.isFinite(e)||e<0)return"";if(e<1024)return`${e} B`;const t=["KB","MB","GB"];let n=e,r="B";for(const s of t){if(n<1024)break;n/=1024,r=s}return`${n>=10?Math.round(n):Math.round(n*10)/10} ${r}`}function _7(e){if(e===void 0||e.trim()==="")return!0;const t=e.split(";")[0]?.trim().toLowerCase()??"";return t.startsWith("text/")||t.endsWith("+json")||t.endsWith("+xml")||t==="application/json"||t==="application/x-ndjson"||t==="application/xml"||t==="application/javascript"||t==="application/yaml"||t==="application/x-yaml"||t==="application/toml"||t==="application/sql"?!0:!(t.startsWith("image/")||t.startsWith("audio/")||t.startsWith("video/")||t.startsWith("font/")||t==="application/pdf"||t==="application/zip"||t==="application/gzip")}function A7(e){return/\u0000|[\u0001-\u0008\u000b\u000e-\u001f]{4}/.test(e)}function N7(e,t){const n=e?.split(";")[0]?.trim().toLowerCase()??"";if(n==="text/x-diff"||n==="text/x-patch")return!0;const r=t.slice(0,4e3);return/^diff --git /m.test(r)||/^--- /m.test(r)&&/^\+\+\+ /m.test(r)&&/^@@ /m.test(r)}function O7(e){return e.startsWith("+++")||e.startsWith("---")?"meta":e.startsWith("+")?"add":e.startsWith("-")?"del":e.startsWith("@@")?"hunk":e.startsWith("diff ")||e.startsWith("index ")||e.startsWith("new file mode")||e.startsWith("deleted file mode")||e.startsWith("rename from")||e.startsWith("rename to")||e.startsWith("similarity index")||e.startsWith("Binary files ")?"meta":"ctx"}function I7(e){const t=e.title?.trim();return t!==void 0&&t!==""?t:`${e.kind} · ${e.id}`}function M7(e){const t=new Set;for(const n of e)t.add(n.kind);return[...t].sort((n,r)=>n.localeCompare(r))}function IT(e){const t=Date.parse(e.updatedAt);return Number.isNaN(t)?0:t}function AI(e){return[...e].sort((t,n)=>IT(n)-IT(t))}function D7(e,t){return t===null?e:e.filter(n=>n.kind===t)}function L7(e){const t=new Map,n=[];for(const s of AI(e)){const a=s.sessionId;if(a===void 0||a===""){n.push(s);continue}const l=t.get(a);l===void 0?t.set(a,[s]):l.push(s)}const r=[...t.entries()].map(([s,a])=>({sessionId:s,artifacts:a}));return n.length>0&&r.push({sessionId:null,artifacts:n}),r}const j7=["home","runs","evals","logs"],tv="section",z7="home",P7={agent:"home"};function $7(e){const t=e?.trim()??"";return t===""?null:j7.includes(t)?t:P7[t]??null}function B7(e){let t=null,n=null,r=null;try{const s=new URL(e,"https://playground.invalid"),a=s.searchParams.get("sessionId")?.trim()??"";t=a.length>0?a:null;const l=s.searchParams.get("view")?.trim()??"";n=l.length>0?l:null,r=$7(s.searchParams.get(tv))}catch{return{sessionId:null,view:null,section:null}}return n==="logs"&&r===null&&(r="logs"),{sessionId:t,view:n,section:r}}function NI(e){try{const t=new URL(window.location.href);e===z7?t.searchParams.delete(tv):t.searchParams.set(tv,e);const n=t.toString();if(n===window.location.href)return;history.replaceState(null,"",n)}catch{}}const F7="cursor-playground",U7=["https://cursor.com","https://www.cursor.com","https://prod.cursor.com","https://staging.cursor.com","http://localhost:4000","https://localhost:4000"];function q7(e=document.referrer,t=window.parent!==window){if(!t||e==="")return null;let n;try{n=new URL(e).origin}catch{return null}return U7.includes(n)?n:null}function H7(e,t,n=q7(),r){if(n===null)return;const s={source:F7,type:"state",view:e};t!==void 0&&(s.sessionId=t),r!==void 0&&(s.section=r),window.parent.postMessage(s,n)}const MT=e=>Number.isFinite(e)?e:0;function V7(e){return{days:Math.trunc(e/864e5),hours:Math.trunc(e/36e5%24),minutes:Math.trunc(e/6e4%60),seconds:Math.trunc(e/1e3%60),milliseconds:Math.trunc(e%1e3),microseconds:Math.trunc(MT(e*1e3)%1e3),nanoseconds:Math.trunc(MT(e*1e6)%1e3)}}function G7(e){return{days:e/86400000n,hours:e/3600000n%24n,minutes:e/60000n%60n,seconds:e/1000n%60n,milliseconds:e%1000n,microseconds:0n,nanoseconds:0n}}function W7(e){switch(typeof e){case"number":{if(Number.isFinite(e))return V7(e);break}case"bigint":return G7(e)}throw new TypeError("Expected a finite number or bigint")}const K7=e=>e===0||e===0n,Y7=(e,t)=>t===1||t===1n?e:`${e}s`,X7=1e-7,Z7=24n*60n*60n*1000n;function Q7(e,t){const n=typeof e=="bigint";if(!n&&!Number.isFinite(e))throw new TypeError("Expected a finite number or bigint");t={...t};const r=e<0?"-":"";e=e<0?-e:e,t.colonNotation&&(t.compact=!1,t.formatSubMilliseconds=!1,t.separateMilliseconds=!1,t.verbose=!1),t.compact&&(t.unitCount=1,t.secondsDecimalDigits=0,t.millisecondsDecimalDigits=0);let s=[];const a=(h,m)=>{const b=Math.floor(h*10**m+X7);return(Math.round(b)/10**m).toFixed(m)},l=(h,m,b,y)=>{if(!((s.length===0||!t.colonNotation)&&K7(h)&&!(t.colonNotation&&b==="m"))){if(y??=String(h),t.colonNotation){const k=y.includes(".")?y.split(".")[0].length:y.length,S=s.length>0?2:1;y="0".repeat(Math.max(0,S-k))+y}else y+=t.verbose?" "+Y7(m,h):b;s.push(y)}},c=W7(e),f=BigInt(c.days);if(t.hideYearAndDays?l(BigInt(f)*24n+BigInt(c.hours),"hour","h"):(t.hideYear?l(f,"day","d"):(l(f/365n,"year","y"),l(f%365n,"day","d")),l(Number(c.hours),"hour","h")),l(Number(c.minutes),"minute","m"),!t.hideSeconds)if(t.separateMilliseconds||t.formatSubMilliseconds||!t.colonNotation&&e<1e3){const h=Number(c.seconds),m=Number(c.milliseconds),b=Number(c.microseconds),y=Number(c.nanoseconds);if(l(h,"second","s"),t.formatSubMilliseconds)l(m,"millisecond","ms"),l(b,"microsecond","µs"),l(y,"nanosecond","ns");else{const k=m+b/1e3+y/1e6,S=typeof t.millisecondsDecimalDigits=="number"?t.millisecondsDecimalDigits:0,C=k>=1?Math.round(k):Math.ceil(k),E=S?k.toFixed(S):C;l(Number.parseFloat(E),"millisecond","ms",E)}}else{const h=(n?Number(e%Z7):e)/1e3%60,m=typeof t.secondsDecimalDigits=="number"?t.secondsDecimalDigits:1,b=a(h,m),y=t.keepDecimalsOnWholeSeconds?b:b.replace(/\.0+$/,"");l(Number.parseFloat(y),"second","s",y)}if(s.length===0)return r+"0"+(t.verbose?" milliseconds":"ms");const d=t.colonNotation?":":" ";return typeof t.unitCount=="number"&&(s=s.slice(0,Math.max(t.unitCount,1))),r+s.join(d)}var OI="en",o0={},nv={};function II(){return OI}function MI(e){OI=e}function J7(e){return o0[e]}function DI(e){if(!e)throw new Error("No locale data passed");o0[e.locale]=e,nv[e.locale.toLowerCase()]=e.locale}function DT(e){if(o0[e])return e;if(nv[e.toLowerCase()])return nv[e.toLowerCase()]}function LI(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.localeMatcher||"lookup";switch(n){case"lookup":return LT(e);case"best fit":return LT(e);default:throw new RangeError('Invalid "localeMatcher" option: '.concat(n))}}function LT(e){var t=DT(e);if(t)return t;for(var n=e.split("-");e.length>1;){n.pop(),e=n.join("-");var r=DT(e);if(r)return r}}var te={af:function(t){return t==1?"one":"other"},ak:function(t){return t==0||t==1?"one":"other"},am:function(t){return t>=0&&t<=1?"one":"other"},ar:function(t){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-2);return t==0?"zero":t==1?"one":t==2?"two":s>=3&&s<=10?"few":s>=11&&s<=99?"many":"other"},ast:function(t){var n=String(t).split("."),r=!n[1];return t==1&&r?"one":"other"},be:function(t){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-1),a=r&&n[0].slice(-2);return s==1&&a!=11?"one":s>=2&&s<=4&&(a<12||a>14)?"few":r&&s==0||s>=5&&s<=9||a>=11&&a<=14?"many":"other"},blo:function(t){return t==0?"zero":t==1?"one":"other"},br:function(t){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-1),a=r&&n[0].slice(-2),l=r&&n[0].slice(-6);return s==1&&a!=11&&a!=71&&a!=91?"one":s==2&&a!=12&&a!=72&&a!=92?"two":(s==3||s==4||s==9)&&(a<10||a>19)&&(a<70||a>79)&&(a<90||a>99)?"few":t!=0&&r&&l==0?"many":"other"},bs:function(t){var n=String(t).split("."),r=n[0],s=n[1]||"",a=!n[1],l=r.slice(-1),c=r.slice(-2),f=s.slice(-1),d=s.slice(-2);return a&&l==1&&c!=11||f==1&&d!=11?"one":a&&l>=2&&l<=4&&(c<12||c>14)||f>=2&&f<=4&&(d<12||d>14)?"few":"other"},ca:function(t,n){var r=String(t).split("."),s=r[0],a=!r[1],l=s.slice(-6);return t==1&&a?"one":!n&&s!=0&&l==0&&a||n>5?"many":"other"},ceb:function(t){var n=String(t).split("."),r=n[0],s=n[1]||"",a=!n[1],l=r.slice(-1),c=s.slice(-1);return a&&(r==1||r==2||r==3)||a&&l!=4&&l!=6&&l!=9||!a&&c!=4&&c!=6&&c!=9?"one":"other"},cs:function(t){var n=String(t).split("."),r=n[0],s=!n[1];return t==1&&s?"one":r>=2&&r<=4&&s?"few":s?"other":"many"},cy:function(t){return t==0?"zero":t==1?"one":t==2?"two":t==3?"few":t==6?"many":"other"},da:function(t){var n=String(t).split("."),r=n[0],s=Number(n[0])==t;return t==1||!s&&(r==0||r==1)?"one":"other"},dsb:function(t){var n=String(t).split("."),r=n[0],s=n[1]||"",a=!n[1],l=r.slice(-2),c=s.slice(-2);return a&&l==1||c==1?"one":a&&l==2||c==2?"two":a&&(l==3||l==4)||c==3||c==4?"few":"other"},dz:function(t){return"other"},es:function(t,n){var r=String(t).split("."),s=r[0],a=!r[1],l=s.slice(-6);return t==1?"one":!n&&s!=0&&l==0&&a||n>5?"many":"other"},ff:function(t){return t>=0&&t<2?"one":"other"},fr:function(t,n){var r=String(t).split("."),s=r[0],a=!r[1],l=s.slice(-6);return t>=0&&t<2?"one":!n&&s!=0&&l==0&&a||n>5?"many":"other"},ga:function(t){var n=String(t).split("."),r=Number(n[0])==t;return t==1?"one":t==2?"two":r&&t>=3&&t<=6?"few":r&&t>=7&&t<=10?"many":"other"},gd:function(t){var n=String(t).split("."),r=Number(n[0])==t;return t==1||t==11?"one":t==2||t==12?"two":r&&t>=3&&t<=10||r&&t>=13&&t<=19?"few":"other"},he:function(t){var n=String(t).split("."),r=n[0],s=!n[1];return r==1&&s||r==0&&!s?"one":r==2&&s?"two":"other"},is:function(t){var n=String(t).split("."),r=n[0],s=(n[1]||"").replace(/0+$/,""),a=Number(n[0])==t,l=r.slice(-1),c=r.slice(-2);return a&&l==1&&c!=11||s%10==1&&s%100!=11?"one":"other"},lt:function(t){var n=String(t).split("."),r=n[1]||"",s=Number(n[0])==t,a=s&&n[0].slice(-1),l=s&&n[0].slice(-2);return a==1&&(l<11||l>19)?"one":a>=2&&a<=9&&(l<11||l>19)?"few":r!=0?"many":"other"},lv:function(t){var n=String(t).split("."),r=n[1]||"",s=r.length,a=Number(n[0])==t,l=a&&n[0].slice(-1),c=a&&n[0].slice(-2),f=r.slice(-2),d=r.slice(-1);return a&&l==0||c>=11&&c<=19||s==2&&f>=11&&f<=19?"zero":l==1&&c!=11||s==2&&d==1&&f!=11||s!=2&&d==1?"one":"other"},mk:function(t){var n=String(t).split("."),r=n[0],s=n[1]||"",a=!n[1],l=r.slice(-1),c=r.slice(-2),f=s.slice(-1),d=s.slice(-2);return a&&l==1&&c!=11||f==1&&d!=11?"one":"other"},mt:function(t){var n=String(t).split("."),r=Number(n[0])==t,s=r&&n[0].slice(-2);return t==1?"one":t==2?"two":t==0||s>=3&&s<=10?"few":s>=11&&s<=19?"many":"other"},pl:function(t){var n=String(t).split("."),r=n[0],s=!n[1],a=r.slice(-1),l=r.slice(-2);return t==1&&s?"one":s&&a>=2&&a<=4&&(l<12||l>14)?"few":s&&r!=1&&(a==0||a==1)||s&&a>=5&&a<=9||s&&l>=12&&l<=14?"many":"other"},pt:function(t,n){var r=String(t).split("."),s=r[0],a=!r[1],l=s.slice(-6);return s==0||s==1?"one":!n&&s!=0&&l==0&&a||n>5?"many":"other"},ro:function(t){var n=String(t).split("."),r=!n[1],s=Number(n[0])==t,a=s&&n[0].slice(-2);return t==1&&r?"one":!r||t==0||t!=1&&a>=1&&a<=19?"few":"other"},ru:function(t){var n=String(t).split("."),r=n[0],s=!n[1],a=r.slice(-1),l=r.slice(-2);return s&&a==1&&l!=11?"one":s&&a>=2&&a<=4&&(l<12||l>14)?"few":s&&a==0||s&&a>=5&&a<=9||s&&l>=11&&l<=14?"many":"other"},se:function(t){return t==1?"one":t==2?"two":"other"},si:function(t){var n=String(t).split("."),r=n[0],s=n[1]||"";return t==0||t==1||r==0&&s==1?"one":"other"},sl:function(t){var n=String(t).split("."),r=n[0],s=!n[1],a=r.slice(-2);return s&&a==1?"one":s&&a==2?"two":s&&(a==3||a==4)||!s?"few":"other"}};te.as=te.am;te.az=te.af;te.bal=te.af;te.bg=te.af;te.bn=te.am;te.brx=te.af;te.ce=te.af;te.chr=te.af;te.csw=te.ak;te.cv=te.blo;te.de=te.ast;te.doi=te.am;te.ee=te.af;te.el=te.af;te.en=te.ast;te.eo=te.af;te.et=te.ast;te.eu=te.af;te.fa=te.am;te.fi=te.ast;te.fil=te.ceb;te.fo=te.af;te.fur=te.af;te.fy=te.ast;te.gl=te.ast;te.gu=te.am;te.ha=te.af;te.hi=te.am;te.hr=te.bs;te.hsb=te.dsb;te.hu=te.af;te.hy=te.ff;te.ia=te.ast;te.id=te.dz;te.ie=te.ast;te.ig=te.dz;te.ii=te.dz;te.it=te.ca;te.ja=te.dz;te.jgo=te.af;te.jv=te.dz;te.ka=te.af;te.kea=te.dz;te.kk=te.af;te.kl=te.af;te.km=te.dz;te.kn=te.am;te.ko=te.dz;te.kok=te.am;te.ks=te.af;te.ksh=te.blo;te.ku=te.af;te.ky=te.af;te.lb=te.af;te.lkt=te.dz;te.lld=te.ca;te.lo=te.dz;te.ml=te.af;te.mn=te.af;te.mr=te.af;te.ms=te.dz;te.my=te.dz;te.nb=te.af;te.ne=te.af;te.nl=te.ast;te.nn=te.af;te.no=te.af;te.nqo=te.dz;te.nso=te.ak;te.om=te.af;te.or=te.af;te.pa=te.ak;te.pcm=te.am;te.ps=te.af;te.rm=te.af;te.sah=te.dz;te.sc=te.ast;te.scn=te.ca;te.sd=te.af;te.sk=te.cs;te.so=te.af;te.sq=te.af;te.sr=te.bs;te.su=te.dz;te.sv=te.ast;te.sw=te.ast;te.syr=te.af;te.ta=te.af;te.te=te.af;te.th=te.dz;te.ti=te.ak;te.tk=te.af;te.tn=te.af;te.to=te.dz;te.tr=te.af;te.ug=te.af;te.uk=te.ru;te.ur=te.ast;te.uz=te.af;te.vec=te.ca;te.vi=te.dz;te.wae=te.af;te.wo=te.dz;te.xh=te.af;te.yi=te.ast;te.yo=te.dz;te.yue=te.dz;te.zh=te.dz;te.zu=te.am;function jT(e){return e==="pt-PT"?e:tH(e)}var eH=/^([a-z0-9]+)/i;function tH(e){var t=e.match(eH);if(!t)throw new TypeError("Invalid locale: ".concat(e));return t[1]}function Nc(e){"@babel/helpers - typeof";return Nc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Nc(e)}function nH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zT(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,iH(r.key),r)}}function rH(e,t,n){return t&&zT(e.prototype,t),n&&zT(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function iH(e){var t=sH(e,"string");return Nc(t)=="symbol"?t:t+""}function sH(e,t){if(Nc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Nc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var rv=(function(){function e(t,n){nH(this,e);var r=e.supportedLocalesOf(t);if(r.length===0)throw new RangeError("Unsupported locale: "+t);if(n&&n.type!=="cardinal")throw new RangeError('Only "cardinal" "type" is supported');this.$=te[jT(r[0])]}return rH(e,[{key:"select",value:function(n){return this.$(n)}}],[{key:"supportedLocalesOf",value:function(n){return typeof n=="string"&&(n=[n]),n.filter(function(r){return te[jT(r)]})}}]),e})();function Ll(e){"@babel/helpers - typeof";return Ll=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ll(e)}function PT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function $T(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?PT(Object(n),!0).forEach(function(r){oH(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function oH(e,t,n){return(t=jI(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BT(e,t){return cH(e)||uH(e,t)||lH(e,t)||aH()}function aH(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
13
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lH(e,t){if(e){if(typeof e=="string")return FT(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?FT(e,t):void 0}}function FT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function uH(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,s,a,l,c=[],f=!0,d=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(f=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);f=!0);}catch(h){d=!0,s=h}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw s}}return c}}function cH(e){if(Array.isArray(e))return e}function fH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dH(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,jI(r.key),r)}}function pH(e,t,n){return t&&dH(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function jI(e){var t=hH(e,"string");return Ll(t)=="symbol"?t:t+""}function hH(e,t){if(Ll(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ll(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var mH=["second","minute","hour","day","week","month","quarter","year"],gH=["auto","always"],bH=["long","short","narrow"],yH=["lookup","best fit"],Os=(function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};fH(this,e);var r=n.numeric,s=n.style,a=n.localeMatcher;if(this.numeric="always",this.style="long",this.localeMatcher="lookup",r!==void 0){if(gH.indexOf(r)<0)throw new RangeError('Invalid "numeric" option: '.concat(r));this.numeric=r}if(s!==void 0){if(bH.indexOf(s)<0)throw new RangeError('Invalid "style" option: '.concat(s));this.style=s}if(a!==void 0){if(yH.indexOf(a)<0)throw new RangeError('Invalid "localeMatcher" option: '.concat(a));this.localeMatcher=a}if(typeof t=="string"&&(t=[t]),t.push(II()),this.locale=e.supportedLocalesOf(t,{localeMatcher:this.localeMatcher})[0],!this.locale)throw new Error("Unsupported locale");rv.supportedLocalesOf(this.locale).length>0?this.pluralRules=new rv(this.locale):console.warn('"'.concat(this.locale,'" locale is not supported')),typeof Intl<"u"&&Intl.NumberFormat?(this.numberFormat=new Intl.NumberFormat(this.locale),this.numberingSystem=this.numberFormat.resolvedOptions().numberingSystem):this.numberingSystem="latn",this.locale=LI(this.locale,{localeMatcher:this.localeMatcher})}return pH(e,[{key:"format",value:function(){var n=UT(arguments),r=BT(n,2),s=r[0],a=r[1];return this.getRule(s,a).replace("{0}",this.formatNumber(Math.abs(s)))}},{key:"formatToParts",value:function(){var n=UT(arguments),r=BT(n,2),s=r[0],a=r[1],l=this.getRule(s,a),c=l.indexOf("{0}");if(c<0)return[{type:"literal",value:l}];var f=[];return c>0&&f.push({type:"literal",value:l.slice(0,c)}),f=f.concat(this.formatNumberToParts(Math.abs(s)).map(function(d){return $T($T({},d),{},{unit:a})})),c+3<l.length-1&&f.push({type:"literal",value:l.slice(c+3)}),f}},{key:"getRule",value:function(n,r){var s=J7(this.locale)[this.style][r];if(typeof s=="string")return s;if(this.numeric==="auto"){if(n===-2||n===-1){var a=s["previous".concat(n===-1?"":"-"+Math.abs(n))];if(a)return a}else if(n===1||n===2){var l=s["next".concat(n===1?"":"-"+Math.abs(n))];if(l)return l}else if(n===0&&s.current)return s.current}var c=s[wH(n)?"past":"future"];if(typeof c=="string")return c;var f=this.pluralRules&&this.pluralRules.select(Math.abs(n))||"other";return c[f]||c.other}},{key:"formatNumber",value:function(n){return this.numberFormat?this.numberFormat.format(n):String(n)}},{key:"formatNumberToParts",value:function(n){return this.numberFormat&&this.numberFormat.formatToParts?this.numberFormat.formatToParts(n):[{type:"integer",value:this.formatNumber(n)}]}},{key:"resolvedOptions",value:function(){return{locale:this.locale,style:this.style,numeric:this.numeric,numberingSystem:this.numberingSystem}}}]),e})();Os.supportedLocalesOf=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof e=="string")e=[e];else if(!Array.isArray(e))throw new TypeError('Invalid "locales" argument');return e.filter(function(n){return LI(n,t)})};Os.addLocale=DI;Os.addDefaultLocale=function(e){DI(e),MI(e.locale)};Os.setDefaultLocale=MI;Os.getDefaultLocale=II;Os.PluralRules=rv;var ey='Invalid "unit" argument';function vH(e){if(Ll(e)==="symbol")throw new TypeError(ey);if(typeof e!="string")throw new RangeError("".concat(ey,": ").concat(e));if(e[e.length-1]==="s"&&(e=e.slice(0,e.length-1)),mH.indexOf(e)<0)throw new RangeError("".concat(ey,": ").concat(e));return e}var xH='Invalid "number" argument';function kH(e){if(e=Number(e),Number.isFinite&&!Number.isFinite(e))throw new RangeError("".concat(xH,": ").concat(e));return e}function SH(e){return 1/e===-1/0}function wH(e){return e<0||e===0&&SH(e)}function UT(e){if(e.length<2)throw new TypeError('"unit" argument is required');return[kH(e[0]),vH(e[1])]}function ca(e){"@babel/helpers - typeof";return ca=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ca(e)}function EH(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TH(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,RH(r.key),r)}}function CH(e,t,n){return t&&TH(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function RH(e){var t=_H(e,"string");return ca(t)=="symbol"?t:t+""}function _H(e,t){if(ca(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(ca(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var qT=(function(){function e(){EH(this,e),this.cache={}}return CH(e,[{key:"get",value:function(){for(var n=this.cache,r=arguments.length,s=new Array(r),a=0;a<r;a++)s[a]=arguments[a];for(var l=0,c=s;l<c.length;l++){var f=c[l];if(ca(n)!=="object")return;n=n[f]}return n}},{key:"put",value:function(){for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];for(var a=r.pop(),l=r.pop(),c=this.cache,f=0,d=r;f<d.length;f++){var h=d[f];ca(c[h])!=="object"&&(c[h]={}),c=c[h]}return c[l]=a}}]),e})();function iv(e){"@babel/helpers - typeof";return iv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},iv(e)}function AH(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=NH(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
14
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function NH(e,t){if(e){if(typeof e=="string")return HT(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?HT(e,t):void 0}}function HT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function OH(e,t){for(var n=AH(e),r;!(r=n()).done;){var s=r.value;if(t(s))return s;for(var a=s.split("-");a.length>1;)if(a.pop(),s=a.join("-"),t(s))return s}throw new Error("No locale data has been registered for any of the locales: ".concat(e.join(", ")))}function IH(){var e=(typeof Intl>"u"?"undefined":iv(Intl))==="object";return e&&typeof Intl.DateTimeFormat=="function"}function sv(e){"@babel/helpers - typeof";return sv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sv(e)}function MH(e){return LH(e)&&(Array.isArray(e.steps)||Array.isArray(e.gradation)||Array.isArray(e.flavour)||typeof e.flavour=="string"||Array.isArray(e.labels)||typeof e.labels=="string"||Array.isArray(e.units)||typeof e.custom=="function")}var DH={}.constructor;function LH(e){return sv(e)!==void 0&&e!==null&&e.constructor===DH}var Ss=60,rh=60*Ss,ia=24*rh,ov=7*ia,av=30.44*ia,zI=146097/400*ia;function kl(e){switch(e){case"second":return 1;case"minute":return Ss;case"hour":return rh;case"day":return ia;case"week":return ov;case"month":return av;case"year":return zI}}function PI(e){return e.factor!==void 0?e.factor:kl(e.unit||e.formatAs)||1}function Oc(e){return e==="floor"?Math.floor:Math.round}function a0(e){return e==="floor"?1:.5}function lv(e){"@babel/helpers - typeof";return lv=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lv(e)}function $I(e,t){var n=t.prevStep,r=t.timestamp,s=t.now,a=t.future,l=t.round,c;return n&&(n.id||n.unit)&&(c=e["threshold_for_".concat(n.id||n.unit)]),c===void 0&&e.threshold!==void 0&&(c=e.threshold,typeof c=="function"&&(c=c(s,a))),c===void 0&&(c=e.minTime),lv(c)==="object"&&(n&&n.id&&c[n.id]!==void 0?c=c[n.id]:c=c.default),typeof c=="function"&&(c=c(r,{future:a,getMinTimeForUnit:function(d,h){return VT(d,h||n&&n.formatAs,{round:l})}})),c===void 0&&e.test&&(e.test(r,{now:s,future:a})?c=0:c=9007199254740991),c===void 0&&(n?e.formatAs&&n.formatAs&&(c=VT(e.formatAs,n.formatAs,{round:l})):c=0),c===void 0&&console.warn("[javascript-time-ago] A step should specify `minTime`:\n"+JSON.stringify(e,null,2)),c}function VT(e,t,n){var r=n.round,s=kl(e),a=kl(t==="now"?e:t);if(s!==void 0&&a!==void 0)return s-a*(1-a0(r))}function Ic(e){"@babel/helpers - typeof";return Ic=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ic(e)}function GT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function jH(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?GT(Object(n),!0).forEach(function(r){zH(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):GT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zH(e,t,n){return(t=PH(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function PH(e){var t=$H(e,"string");return Ic(t)=="symbol"?t:t+""}function $H(e,t){if(Ic(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Ic(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function BH(e,t,n){var r=n.now,s=n.future,a=n.round,l=n.units;e=UH(e,l);var c=FH(e,t,{now:r,future:s,round:a});{if(c){var f=e[e.indexOf(c)-1],d=e[e.indexOf(c)+1];return[f,c,d]}return[void 0,void 0,e[0]]}}function FH(e,t,n){var r=n.now,s=n.future,a=n.round;if(e.length!==0){var l=BI(e,t,{now:r,future:s||t<0,round:a});if(l!==-1){var c=e[l];if(c.granularity){var f=Oc(a)(Math.abs(t)/PI(c)/c.granularity)*c.granularity;if(f===0&&l>0)return e[l-1]}return c}}}function BI(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=$I(e[r],jH({prevStep:e[r-1],timestamp:n.now-t*1e3},n));return s===void 0||Math.abs(t)<s?r-1:r===e.length-1?r:BI(e,t,n,r+1)}function UH(e,t){return e.filter(function(n){var r=n.unit,s=n.formatAs;return r=r||s,r?t.indexOf(r)>=0:!0})}function qH(e,t,n){var r=n.now,s=n.round;if(kl(e)){var a=kl(e)*1e3,l=t>r,c=Math.abs(t-r),f=Oc(s)(c/a)*a;return l?f>0?c-f+VH(s,a):c-f+1:-(c-f)+HH(s,a)}}function HH(e,t){return a0(e)*t}function VH(e,t){return(1-a0(e))*t+1}var GH=365*24*60*60*1e3,FI=1e3*GH;function WH(e,t,n){var r=n.prevStep,s=n.nextStep,a=n.now,l=n.future,c=n.round,f=e.getTime?e.getTime():e,d=function(k){return qH(k,f,{now:a,round:c})},h=YH(l?t:s,f,{future:l,now:a,round:c,prevStep:l?r:t});if(h!==void 0){var m;if(t&&(t.getTimeToNextUpdate&&(m=t.getTimeToNextUpdate(f,{getTimeToNextUpdateForUnit:d,getRoundFunction:Oc,now:a,future:l,round:c})),m===void 0)){var b=t.unit||t.formatAs;b&&(m=d(b))}return m===void 0?h:Math.min(m,h)}}function KH(e,t,n){var r=n.now,s=n.future,a=n.round,l=n.prevStep,c=$I(e,{timestamp:t,now:r,future:s,round:a,prevStep:l});if(c!==void 0)return s?t-c*1e3+1:c===0&&t===r?FI:t+c*1e3}function YH(e,t,n){var r=n.now,s=n.future,a=n.round,l=n.prevStep;if(e){var c=KH(e,t,{now:r,future:s,round:a,prevStep:l});return c===void 0?void 0:c-r}else return s?t-r+1:FI}var UI={};function gl(e){return UI[e]}function qI(e){if(!e)throw new Error("[javascript-time-ago] No locale data passed.");UI[e.locale]=e}const XH=[{formatAs:"now"},{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"},{formatAs:"day"},{formatAs:"week"},{formatAs:"month"},{formatAs:"year"}],uv={steps:XH,labels:"long"};function Mc(e){"@babel/helpers - typeof";return Mc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mc(e)}function WT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function KT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?WT(Object(n),!0).forEach(function(r){ZH(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ZH(e,t,n){return(t=QH(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function QH(e){var t=JH(e,"string");return Mc(t)=="symbol"?t:t+""}function JH(e,t){if(Mc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Mc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const cv=KT(KT({},uv),{},{steps:uv.steps.filter(function(e){return e.formatAs!=="second"})}),HI=[{factor:1,unit:"now"},{threshold:1,threshold_for_now:45.5,factor:1,unit:"second"},{threshold:45.5,factor:Ss,unit:"minute"},{threshold:2.5*Ss,granularity:5,factor:Ss,unit:"minute"},{threshold:22.5*Ss,factor:.5*rh,unit:"half-hour"},{threshold:42.5*Ss,threshold_for_minute:52.5*Ss,factor:rh,unit:"hour"},{threshold:20.5/24*ia,factor:ia,unit:"day"},{threshold:5.5*ia,factor:ov,unit:"week"},{threshold:3.5*ov,factor:av,unit:"month"},{threshold:10.5*av,factor:zI,unit:"year"}],YT={gradation:HI,flavour:"long",units:["now","minute","hour","day","week","month","year"]},eV={gradation:HI,flavour:"long-time",units:["now","minute","hour","day","week","month","year"]};function VI(e){return e instanceof Date?e:new Date(e)}var fv=[{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"}],Hi={},tV={minTime:function(t,n){n.future;var r=n.getMinTimeForUnit;return r("day")},format:function(t,n){return Hi[n]||(Hi[n]={}),Hi[n].dayMonth||(Hi[n].dayMonth=new Intl.DateTimeFormat(n,{month:"short",day:"numeric"})),Hi[n].dayMonth.format(VI(t))}},nV={minTime:function(t,n){var r=n.future;if(r){var s=new Date(new Date(t).getFullYear(),0).getTime()-1;return(t-s)/1e3}else{var a=new Date(new Date(t).getFullYear()+1,0).getTime();return(a-t)/1e3}},format:function(t,n){return Hi[n]||(Hi[n]={}),Hi[n].dayMonthYear||(Hi[n].dayMonthYear=new Intl.DateTimeFormat(n,{year:"numeric",month:"short",day:"numeric"})),Hi[n].dayMonthYear.format(VI(t))}};IH()?fv.push(tV,nV):fv.push({formatAs:"day"},{formatAs:"week"},{formatAs:"month"},{formatAs:"year"});const fa={steps:fv,labels:["mini","short-time","narrow","short"]};function Dc(e){"@babel/helpers - typeof";return Dc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dc(e)}function XT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function ZT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XT(Object(n),!0).forEach(function(r){rV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rV(e,t,n){return(t=iV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iV(e){var t=sV(e,"string");return Dc(t)=="symbol"?t:t+""}function sV(e,t){if(Dc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Dc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const oV=ZT(ZT({},fa),{},{steps:[{formatAs:"now"}].concat(fa.steps)});function Lc(e){"@babel/helpers - typeof";return Lc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lc(e)}function QT(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function JT(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?QT(Object(n),!0).forEach(function(r){aV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QT(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function aV(e,t,n){return(t=lV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lV(e){var t=uV(e,"string");return Lc(t)=="symbol"?t:t+""}function uV(e,t){if(Lc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Lc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const dv=JT(JT({},fa),{},{steps:fa.steps.filter(function(e){return e.formatAs!=="second"})});function jc(e){"@babel/helpers - typeof";return jc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jc(e)}function eC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function tC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?eC(Object(n),!0).forEach(function(r){cV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cV(e,t,n){return(t=fV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fV(e){var t=dV(e,"string");return jc(t)=="symbol"?t:t+""}function dV(e,t){if(jc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(jc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const pV=tC(tC({},dv),{},{steps:[{formatAs:"now"}].concat(dv.steps)});function zc(e){"@babel/helpers - typeof";return zc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zc(e)}function nC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function Jd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?nC(Object(n),!0).forEach(function(r){hV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hV(e,t,n){return(t=mV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mV(e){var t=gV(e,"string");return zc(t)=="symbol"?t:t+""}function gV(e,t){if(zc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(zc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const bV=Jd(Jd({},fa),{},{steps:fa.steps.filter(function(e){return e.formatAs!=="second"}).map(function(e){return e.formatAs==="minute"?Jd(Jd({},e),{},{minTime:Ss}):e})}),Pc={steps:[{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"},{formatAs:"day"},{formatAs:"month"},{formatAs:"year"}],labels:["mini","short-time","narrow","short"]};function $c(e){"@babel/helpers - typeof";return $c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$c(e)}function rC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function iC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rC(Object(n),!0).forEach(function(r){yV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function yV(e,t,n){return(t=vV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vV(e){var t=xV(e,"string");return $c(t)=="symbol"?t:t+""}function xV(e,t){if($c(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if($c(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const kV=iC(iC({},Pc),{},{steps:[{formatAs:"now"}].concat(Pc.steps)});function Bc(e){"@babel/helpers - typeof";return Bc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bc(e)}function sC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function oC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sC(Object(n),!0).forEach(function(r){SV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function SV(e,t,n){return(t=wV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wV(e){var t=EV(e,"string");return Bc(t)=="symbol"?t:t+""}function EV(e,t){if(Bc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Bc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const pv=oC(oC({},Pc),{},{steps:Pc.steps.filter(function(e){return e.formatAs!=="second"})});function Fc(e){"@babel/helpers - typeof";return Fc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fc(e)}function aC(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function lC(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?aC(Object(n),!0).forEach(function(r){TV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):aC(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function TV(e,t,n){return(t=CV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CV(e){var t=RV(e,"string");return Fc(t)=="symbol"?t:t+""}function RV(e,t){if(Fc(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(Fc(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const _V=lC(lC({},pv),{},{steps:[{formatAs:"now"}].concat(pv.steps)});function AV(e){switch(e){case"default":case"round":return uv;case"round-minute":return cv;case"approximate":return YT;case"time":case"approximate-time":return eV;case"mini":return Pc;case"mini-now":return kV;case"mini-minute":return pv;case"mini-minute-now":return _V;case"twitter":return fa;case"twitter-now":return oV;case"twitter-minute":return dv;case"twitter-minute-now":return pV;case"twitter-first-minute":return bV;default:return YT}}function da(e){"@babel/helpers - typeof";return da=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},da(e)}function NV(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=GI(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
15
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function OV(e,t){return DV(e)||MV(e,t)||GI(e,t)||IV()}function IV(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
16
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function GI(e,t){if(e){if(typeof e=="string")return uC(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?uC(e,t):void 0}}function uC(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function MV(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,s,a,l,c=[],f=!0,d=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(f=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);f=!0);}catch(h){d=!0,s=h}finally{try{if(!f&&n.return!=null&&(l=n.return(),Object(l)!==l))return}finally{if(d)throw s}}return c}}function DV(e){if(Array.isArray(e))return e}function LV(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jV(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,PV(r.key),r)}}function zV(e,t,n){return t&&jV(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function PV(e){var t=$V(e,"string");return da(t)=="symbol"?t:t+""}function $V(e,t){if(da(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(da(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var jr=(function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.polyfill;LV(this,e),typeof t=="string"&&(t=[t]),this.locale=OH(t.concat(e.getDefaultLocale()),gl),typeof Intl<"u"&&Intl.NumberFormat&&(this.numberFormat=new Intl.NumberFormat(this.locale)),r===!1?(this.IntlRelativeTimeFormat=Intl.RelativeTimeFormat,this.IntlPluralRules=Intl.PluralRules):(this.IntlRelativeTimeFormat=Os,this.IntlPluralRules=Os.PluralRules),this.relativeTimeFormatCache=new qT,this.pluralRulesCache=new qT}return zV(e,[{key:"format",value:function(n,r,s){var a=this;s||(r&&!HV(r)?(s=r,r=void 0):s={}),r||(r=cv),typeof r=="string"&&(r=AV(r));var l=BV(n),c=this.getLabels(r.flavour||r.labels),f=c.labels,d=c.labelsType,h=s.round||r.round,m,b=Date.now();r.now!==void 0&&(m=r.now),m===void 0&&s.now!==void 0&&(m=s.now),m===void 0&&(m=b);var y=function(A){var I=A.now,P=(I-l)/1e3,$=s.future||P<0,O=qV(f,gl(a.locale).now,gl(a.locale).long,$);if(r.custom){var Y=r.custom({now:I,date:new Date(l),time:l,elapsed:P,locale:a.locale});if(Y!==void 0)return{getText:function(){return Y},getTextRefreshDelay:function(){throw new Error('`getTimeToNextUpdate: true` feature is not supported by legacy "styles" that have a `custom` function')}}}var U=UV(r.units,f,O),B=BH(r.gradation||r.steps||cv.steps,P,{now:I,units:U,round:h,future:$}),j=OV(B,3),q=j[0],H=j[1],W=j[2],F=function(){return a.formatDateForStep(l,H,P,{labels:f,labelsType:d,nowLabel:O,now:I,future:$,round:h})||""},K=function(){var z=WH(l,H,{nextStep:W,prevStep:q,now:I,future:$,round:h});if(typeof z=="number")return s.getTimeToNextUpdateUncapped?z:KI(z)};return{getText:F,getTextRefreshDelay:K}},k=y({now:m}),S=k.getText,C=k.getTextRefreshDelay;if(s.getTimeToNextUpdate)return[S(),C()];if(s.refresh){var E=6e4,T,R=function D(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:E;T=VV(function(){var I=y({now:m+(Date.now()-b)}),P=I.getText,$=I.getTextRefreshDelay;s.refresh(P()),D($())},A)};R(C());var _=function(){clearTimeout(T)};return[S(),_]}return S()}},{key:"formatDateForStep",value:function(n,r,s,a){var l=this,c=a.labels,f=a.labelsType,d=a.nowLabel,h=a.now,m=a.future,b=a.round;if(r){if(r.format)return r.format(n,this.locale,{formatAs:function(E,T){return l.formatValue(T,E,{labels:c,future:m})},now:h,future:m});var y=r.unit||r.formatAs;if(!y)throw new Error("[javascript-time-ago] Each step must define either `formatAs` or `format()`. Step: ".concat(JSON.stringify(r)));if(y==="now")return d;var k=Math.abs(s)/PI(r);r.granularity&&(k=Oc(b)(k/r.granularity)*r.granularity);var S=-1*Math.sign(s)*Oc(b)(k);switch(S===0&&(m?S=0:S=-0),f){case"long":case"short":case"narrow":return this.getFormatter(f).format(S,y);default:return this.formatValue(S,y,{labels:c,future:m})}}}},{key:"formatValue",value:function(n,r,s){var a=s.labels,l=s.future;return this.getFormattingRule(a,r,n,{future:l}).replace("{0}",this.formatNumber(Math.abs(n)))}},{key:"getFormattingRule",value:function(n,r,s,a){var l=a.future;if(this.locale,n=n[r],typeof n=="string")return n;var c=s===0?l?"future":"past":s<0?"past":"future",f=n[c]||n;if(typeof f=="string")return f;var d=this.getPluralRules().select(Math.abs(s));return f[d]||f.other}},{key:"formatNumber",value:function(n){return this.numberFormat?this.numberFormat.format(n):String(n)}},{key:"getFormatter",value:function(n){return this.relativeTimeFormatCache.get(this.locale,n)||this.relativeTimeFormatCache.put(this.locale,n,new this.IntlRelativeTimeFormat(this.locale,{style:n}))}},{key:"getPluralRules",value:function(){return this.pluralRulesCache.get(this.locale)||this.pluralRulesCache.put(this.locale,new this.IntlPluralRules(this.locale))}},{key:"getLabels",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];typeof n=="string"&&(n=[n]),n=n.map(function(c){switch(c){case"tiny":case"mini-time":return"mini";default:return c}}),n=n.concat("long");for(var r=gl(this.locale),s=NV(n),a;!(a=s()).done;){var l=a.value;if(r[l])return{labelsType:l,labels:r[l]}}}}]),e})(),WI="en";jr.getDefaultLocale=function(){return WI};jr.setDefaultLocale=function(e){hv=!0,WI=e};jr.addDefaultLocale=function(e){hv&&jr.getDefaultLocale()!==e.locale&&console.warn(`[javascript-time-ago] You're adding "`.concat(e.locale,'" as the default locale but you have already added "').concat(jr.getDefaultLocale(),'" as the default locale. "').concat(e.locale,'" is the default locale now.')),hv=!0,jr.addLocale(e),jr.setDefaultLocale(e.locale)};var hv=!1;jr.addLocale=function(e){qI(e),Os.addLocale(e)};jr.locale=jr.addLocale;jr.addLabels=function(e,t,n){var r=gl(e);r||(qI({locale:e}),r=gl(e)),r[t]=n};function BV(e){if(e.constructor===Date||FV(e))return e.getTime();if(typeof e=="number")return e;throw new Error("Unsupported relative time formatter input: ".concat(da(e),", ").concat(e))}function FV(e){return da(e)==="object"&&typeof e.getTime=="function"}function UV(e,t,n){var r=Object.keys(t);return n&&r.push("now"),e&&(r=e.filter(function(s){return s==="now"||r.indexOf(s)>=0})),r}function qV(e,t,n,r){var s=e.now||t&&t.now;if(s)return typeof s=="string"?s:r?s.future:s.past;if(n&&n.second&&n.second.current)return n.second.current}function HV(e){return typeof e=="string"||MH(e)}function VV(e,t){return setTimeout(e,KI(t))}function KI(e){return Math.min(e,GV)}var GV=2147483647;const YI={locale:"en",long:{year:{previous:"last year",current:"this year",next:"next year",past:{one:"{0} year ago",other:"{0} years ago"},future:{one:"in {0} year",other:"in {0} years"}},quarter:{previous:"last quarter",current:"this quarter",next:"next quarter",past:{one:"{0} quarter ago",other:"{0} quarters ago"},future:{one:"in {0} quarter",other:"in {0} quarters"}},month:{previous:"last month",current:"this month",next:"next month",past:{one:"{0} month ago",other:"{0} months ago"},future:{one:"in {0} month",other:"in {0} months"}},week:{previous:"last week",current:"this week",next:"next week",past:{one:"{0} week ago",other:"{0} weeks ago"},future:{one:"in {0} week",other:"in {0} weeks"}},day:{previous:"yesterday",current:"today",next:"tomorrow",past:{one:"{0} day ago",other:"{0} days ago"},future:{one:"in {0} day",other:"in {0} days"}},hour:{current:"this hour",past:{one:"{0} hour ago",other:"{0} hours ago"},future:{one:"in {0} hour",other:"in {0} hours"}},minute:{current:"this minute",past:{one:"{0} minute ago",other:"{0} minutes ago"},future:{one:"in {0} minute",other:"in {0} minutes"}},second:{current:"now",past:{one:"{0} second ago",other:"{0} seconds ago"},future:{one:"in {0} second",other:"in {0} seconds"}}},short:{year:{previous:"last yr.",current:"this yr.",next:"next yr.",past:"{0} yr. ago",future:"in {0} yr."},quarter:{previous:"last qtr.",current:"this qtr.",next:"next qtr.",past:{one:"{0} qtr. ago",other:"{0} qtrs. ago"},future:{one:"in {0} qtr.",other:"in {0} qtrs."}},month:{previous:"last mo.",current:"this mo.",next:"next mo.",past:"{0} mo. ago",future:"in {0} mo."},week:{previous:"last wk.",current:"this wk.",next:"next wk.",past:"{0} wk. ago",future:"in {0} wk."},day:{previous:"yesterday",current:"today",next:"tomorrow",past:{one:"{0} day ago",other:"{0} days ago"},future:{one:"in {0} day",other:"in {0} days"}},hour:{current:"this hour",past:"{0} hr. ago",future:"in {0} hr."},minute:{current:"this minute",past:"{0} min. ago",future:"in {0} min."},second:{current:"now",past:"{0} sec. ago",future:"in {0} sec."}},narrow:{year:{previous:"last yr.",current:"this yr.",next:"next yr.",past:"{0}y ago",future:"in {0}y"},quarter:{previous:"last qtr.",current:"this qtr.",next:"next qtr.",past:"{0}q ago",future:"in {0}q"},month:{previous:"last mo.",current:"this mo.",next:"next mo.",past:"{0}mo ago",future:"in {0}mo"},week:{previous:"last wk.",current:"this wk.",next:"next wk.",past:"{0}w ago",future:"in {0}w"},day:{previous:"yesterday",current:"today",next:"tomorrow",past:"{0}d ago",future:"in {0}d"},hour:{current:"this hour",past:"{0}h ago",future:"in {0}h"},minute:{current:"this minute",past:"{0}m ago",future:"in {0}m"},second:{current:"now",past:"{0}s ago",future:"in {0}s"}},now:{now:{current:"now",future:"in a moment",past:"just now"}},mini:{year:"{0}yr",month:"{0}mo",week:"{0}wk",day:"{0}d",hour:"{0}h",minute:"{0}m",second:"{0}s",now:"now"},"short-time":{year:"{0} yr.",month:"{0} mo.",week:"{0} wk.",day:{one:"{0} day",other:"{0} days"},hour:"{0} hr.",minute:"{0} min.",second:"{0} sec."},"long-time":{year:{one:"{0} year",other:"{0} years"},month:{one:"{0} month",other:"{0} months"},week:{one:"{0} week",other:"{0} weeks"},day:{one:"{0} day",other:"{0} days"},hour:{one:"{0} hour",other:"{0} hours"},minute:{one:"{0} minute",other:"{0} minutes"},second:{one:"{0} second",other:"{0} seconds"}}};jr.addLocale(YI);jr.addDefaultLocale(YI);const WV=new jr("en-US");function jn(e,t){let n=typeof e=="string"?e:JSON.stringify(e);return n===void 0&&(n=""),n.length>t?`${n.slice(0,t-1)}…`:n}function Jr(e,t){const n=String(e??"").replace(/\s+/g," ").trim();return n.length>t?`${n.slice(0,t-1)}…`:n}function KV(e,t){const n=String(e??"").replace(/\s+/g," ").trim();if(n.length<=t)return n;const r=t-1,s=Math.max(1,Math.floor(r*.35)),a=Math.max(1,r-s);return`${n.slice(0,s)}…${n.slice(n.length-a)}`}function Sl(e){if(!e)return null;const t=Date.parse(e);return Number.isNaN(t)?null:t}function Mi(e){return e==null||!Number.isFinite(e)?"—":Q7(e)}function l0(e){const t=Math.ceil(e/1e3);if(e<1e3)return"1s";if(t<60)return`${t}s`;if(t>=3600){const s=Math.floor(t/3600),a=Math.floor(t%3600/60);return a>0?`${s}h ${a}m`:`${s}h`}const n=Math.floor(t/60),r=t%60;return r>0?`${n}m ${r}s`:`${n}m`}const YV=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3,hour12:!1});function cC(e){return e==null||!Number.isFinite(e)?"—":YV.format(e)}function mv(e,t=Date.now()){const n=Sl(e);return n===null?null:WV.format(Math.min(n,t),"mini",{now:t})}function Eo(e,t=8e3){if(e==null)return"";let n;try{n=typeof e=="string"?e:JSON.stringify(e,null,2)}catch{n=String(e)}return n.length>t?`${n.slice(0,t-1)}…`:n}const XV=new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:1});function ih(e){return e==null||!Number.isFinite(e)?"0":XV.format(e)}function u0(e){return e==null||!Number.isFinite(e)?"—":e===0?"$0.00":e>=.1?`$${e.toFixed(2)}`:`$${e.toFixed(4)}`}function XI(e){if(e?.redacted===!0)return null;const t=e?.text;return typeof t=="string"&&t!==""?t:null}function gv(e){const t=String(e||"").trim();if(!t)return[];if(t.charAt(0)==="[")try{const r=JSON.parse(t);return Array.isArray(r)?r:[]}catch{return[]}const n=[];for(const r of t.split(/\n/)){const s=r.trim();if(s)try{n.push(JSON.parse(s))}catch{}}return n}const ZV=new Set(["review.cursor.com"]);function ZI(e){try{const t=new URL(e),n=t.pathname.split("/").filter(Boolean);return t.hostname==="github.com"&&n.length>=4&&n[2]==="pull"||t.hostname==="cursor.com"&&n[0]==="codebase"&&n.length>=5&&n[3]==="pull"||ZV.has(t.hostname)&&n[0]==="pr"?!0:(/^origin(-[a-z0-9]+)?\.cursor\.com$/i.test(t.hostname)||t.hostname==="localhost")&&n.length>=4&&n[2]==="github"}catch{return!1}}function QV(e){return typeof e=="string"?e:e&&typeof e=="object"&&typeof e.id=="string"?e.id:e?JSON.stringify(e):""}function QI(e){return e!=="http"}const JV=new Set(["chat","trace","raw","artifacts"]);function eG(e){if(!e.seeded||!e.embedded)return{action:"none"};const n=e.sessions.filter(s=>!e.knownIds.has(s.sessionId)&&QI(s.channelId)&&s.running===!0)[0];return n===void 0?{action:"none"}:e.currentSessionId===null&&JV.has(e.view)?{action:"select",sessionId:n.sessionId}:{action:"reveal",sessionId:n.sessionId}}function tG(e){return e.filter(t=>QI(t.channelId)&&t.running===!0).length}const nG=new Set(["github","slack"]);function rG(e){return/^\s*\//.test(e)}function Jh(e){const t=[];for(const n of e??[])if(n.id!=="http"&&!(n.kind!==void 0&&nG.has(n.kind)))for(const r of n.routes??[]){const s=lG(n.id,r.path);if(s===null)continue;const a={name:s,channelId:n.id,method:r.method.toUpperCase(),url:r.url,path:r.path};r.description!==void 0&&(a.description=r.description),r.bodySchema!==void 0&&(a.bodySchema=r.bodySchema),r.querySchema!==void 0&&(a.querySchema=r.querySchema),t.push(a)}return t.sort((n,r)=>{const s=n.name.localeCompare(r.name);return s!==0?s:sh(n.method)-sh(r.method)}),t}function JI(e){const t=new Set,n=[];for(const r of e)t.has(r.name)||(t.add(r.name),n.push(r.name));return n}function iG(e,t){const n=e.trim().toLowerCase();if(!n.startsWith("/"))return[];const r=new Set,s=[];for(const a of t)a.name.toLowerCase().startsWith(n)&&(r.has(a.name)||(r.add(a.name),s.push(a)));return s}function sG(e){if(e.length===0)return"No channel slash commands on this agent. Send a normal message to chat on http.";const t=["Channel slash commands (from `/v1/info` routes):",""],n=new Map;for(const r of e){const s=n.get(r.name)??[];s.push(r),n.set(r.name,s)}for(const[r,s]of n){const a=s.map(d=>d.method).join("|"),l=s.find(d=>d.description)?.description??"",c=c0(s[0]),f=eM(c);t.push(f?`- \`${r}\` (${a}) — ${l}${l?" ":""}${f}`:`- \`${r}\` (${a})${l?` — ${l}`:""}`)}return t.push("","Args: JSON object, `key=value` flags, or a positional value for the first required string field."),t.join(`
17
+ `)}function oG(e,t){const n=e.trim(),r=/^(\/[^\s]+)(?:\s+([\s\S]*))?$/.exec(n);if(r===null)return{ok:!1,error:"Expected `/command` optionally followed by args."};const s=r[1],a=(r[2]??"").trim(),l=t.filter(m=>m.name===s);if(l.length===0){const m=JI(t);return{ok:!1,error:m.length===0?`Unknown command \`${s}\`. No channel commands on this agent.`:`Unknown command \`${s}\`. Try ${m.map(b=>`\`${b}\``).join(", ")} or \`/help\`.`,commandName:s}}const c=aG(l,a),f=c0(c),d=fG(a,f);if(!d.ok)return{ok:!1,error:d.error,commandName:s};const h=uG(f,d.value);return h.length>0?{ok:!1,error:`Missing required field${h.length>1?"s":""}: ${h.join(", ")}. ${eM(f)||""}`.trim(),commandName:s}:c.method==="GET"||c.method==="HEAD"?{ok:!0,command:c,query:hG(d.value)}:{ok:!0,command:c,body:d.value,query:c.querySchema!==void 0?mG(d.value,c.querySchema):void 0}}function aG(e,t){if(e.length===1)return e[0];const n=[...e].sort((a,l)=>sh(a.method)-sh(l.method)),r=tM(t);if(r!==null){let a=null,l=-1;for(const c of n){const f=c0(c),d=cG(f,r);d>l&&(l=d,a=c)}if(a!==null&&l>0)return a}const s=n.find(a=>a.method==="GET");return s!==void 0?s:n[0]}function lG(e,t){const n=e.trim();if(n==="")return null;const r=t===""||t==="/"?"":t.startsWith("/")?t.replace(/\/+$/,""):`/${t.replace(/\/+$/,"")}`;return r.includes(":")?null:`/${n}${r}`}function sh(e){switch(e.toUpperCase()){case"GET":return 0;case"POST":return 1;case"PUT":return 2;case"PATCH":return 3;case"DELETE":return 4;default:return 9}}function c0(e){return e.method==="GET"||e.method==="HEAD"?e.querySchema:e.bodySchema??e.querySchema}function eM(e){if(e===void 0)return"";const t=em(e);if(t===void 0)return"";const n=tm(e),r=[];for(const s of n)t[s]?.type==="string"?r.push(`<${s}>`):r.push(`${s}=…`);for(const s of Object.keys(t))n.has(s)||r.push(`[${s}=…]`);return r.length>0?`Usage: ${r.join(" ")}`:""}function em(e){if(e===void 0||e.type!=="object")return;const t=e.properties;if(!(typeof t!="object"||t===null||Array.isArray(t)))return t}function tm(e){return e===void 0||!Array.isArray(e.required)?new Set:new Set(e.required.filter(t=>typeof t=="string"))}function uG(e,t){const n=tm(e),r=[];for(const s of n){const a=t[s];(a==null||typeof a=="string"&&a.trim()==="")&&r.push(s)}return r}function cG(e,t){const n=em(e);if(n===void 0)return 0;let r=0;for(const s of Object.keys(t))s in n?r+=2:r-=1;for(const s of tm(e))s in t&&(r+=3);return r}function tM(e){const t=e.trim();if(!t.startsWith("{"))return null;try{const n=JSON.parse(t);if(typeof n=="object"&&n!==null&&!Array.isArray(n))return n}catch{return null}return null}function fG(e,t){if(e==="")return{ok:!0,value:{}};const n=tM(e);if(n!==null)return{ok:!0,value:n};if(e.startsWith("{"))return{ok:!1,error:"Args look like JSON but failed to parse."};const r=em(t),s={},a=[];for(const l of dG(e)){const c=l.indexOf("=");if(c>0){const f=l.slice(0,c),d=l.slice(c+1);s[f]=pG(d,r?.[f])}else a.push(l)}if(a.length>0){const l=[...tm(t)],c=(l.length>0?l:Object.keys(r??{})).filter(d=>{const h=r?.[d];return h===void 0||h.type==="string"||h.type===void 0}),f=c.find(d=>s[d]===void 0)??c[0];if(f===void 0)return{ok:!1,error:`Unexpected positional args: ${a.join(" ")}`};a.length===1?s[f]=a[0]:s[f]=a.join(" ")}return{ok:!0,value:s}}function dG(e){const t=[];let n="",r=null;for(let s=0;s<e.length;s++){const a=e[s];if(r!==null){a===r?r=null:n+=a;continue}if(a==='"'||a==="'"){r=a;continue}if(/\s/.test(a)){n!==""&&(t.push(n),n="");continue}n+=a}return n!==""&&t.push(n),t}function pG(e,t){const n=t?.type;if(n==="number"||n==="integer"){const r=Number(e);return Number.isFinite(r)?r:e}if(n==="boolean"){if(e==="true")return!0;if(e==="false")return!1}if(n==="array"||n==="object")try{return JSON.parse(e)}catch{return e}return e}function hG(e){const t={};for(const[n,r]of Object.entries(e))r!=null&&(t[n]=typeof r=="string"?r:String(r));return t}function mG(e,t){const n=em(t);if(n===void 0)return;const r={};for(const s of Object.keys(n)){const a=e[s];a!=null&&(r[s]=typeof a=="string"?a:String(a))}return Object.keys(r).length>0?r:void 0}class gG{constructor(t,n,r=()=>""){this.basePath=t,this.getToken=n,this.getAliasToken=r}url(t){return(this.basePath||"")+t}headers(t){const n={...t},r=this.getToken().trim();r&&(n.authorization=`Bearer ${r}`);const s=this.getAliasToken().trim();return s&&(n["x-agent-alias-token"]=s),n}async request(t,n={}){const r=await fetch(this.url(t),{...n,headers:this.headers(n.headers)}),s=await r.text();let a=null;try{a=s?JSON.parse(s):null}catch{a=null}return{status:r.status,ok:r.ok,body:a}}postJson(t,n){return this.request(t,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n)})}health(){return this.request("/v1/health")}info(){return this.request("/v1/info")}logs(t=-1){const n=t<0?"":`?after=${t}`;return this.request(`/v1/logs${n}`)}meta(){return this.request("/v1/meta")}sessions(){return this.request("/v1/sessions")}artifacts(t={}){const n=new URLSearchParams;t.sessionId!==void 0&&t.sessionId!==""&&n.set("sessionId",t.sessionId),t.limit!==void 0&&n.set("limit",String(t.limit));const r=n.toString();return this.request(`/v1/artifacts${r===""?"":`?${r}`}`)}async artifactContent(t,n){const r=await fetch(this.url(`/v1/artifacts/${encodeURIComponent(t)}/content`),{headers:this.headers()}),s=r.headers.get("content-type")??void 0;if(!r.ok||r.body===null)return await r.body?.cancel().catch(()=>{}),{status:r.status,ok:!1,contentType:s,bytes:new Uint8Array(0),truncated:!1};const a=r.body.getReader(),l=[];let c=0,f=!1;for(;;){const{done:m,value:b}=await a.read();if(m)break;if(b!==void 0){if(c+b.length>n){l.push(b.slice(0,n-c)),c=n,f=!0,await a.cancel().catch(()=>{});break}l.push(b),c+=b.length}}const d=new Uint8Array(c);let h=0;for(const m of l)d.set(m,h),h+=m.length;return{status:r.status,ok:!0,contentType:s,bytes:d,truncated:f}}createSession(t){return this.postJson("/v1/session",{message:t})}followUp(t,n,r){return this.postJson(`/v1/session/${encodeURIComponent(t)}`,{message:n,continuationToken:r})}stopSession(t){return this.postJson(`/v1/session/${encodeURIComponent(t)}/stop`,{})}resolveApproval(t,n,r){return this.postJson(`/v1/session/${encodeURIComponent(t)}/approvals/${encodeURIComponent(n)}`,{decision:r})}resolveAuth(t,n,r){return this.postJson(`/v1/session/${encodeURIComponent(t)}/auths/${encodeURIComponent(n)}`,{decision:r})}dispatchSchedule(t){return this.request(`/v1/dev/schedules/${encodeURIComponent(t)}`,{method:"POST"})}evalsList(){return this.request("/v1/dev/evals")}evalsListRuns(){return this.request("/v1/dev/evals/runs")}evalsStartRun(t={}){return this.postJson("/v1/dev/evals/runs",t)}evalsRunStatus(t){return this.request(`/v1/dev/evals/runs/${encodeURIComponent(t)}`)}evalsCancelRun(t){return this.postJson(`/v1/dev/evals/runs/${encodeURIComponent(t)}/cancel`,{})}channelRequest(t,n,r={}){let s=n;if(r.query!==void 0){const l=new URLSearchParams;for(const[f,d]of Object.entries(r.query))d!==""&&l.set(f,d);const c=l.toString();c!==""&&(s=`${n}?${c}`)}const a={method:t.toUpperCase()};return r.body!==void 0&&(a.headers={"content-type":"application/json"},a.body=JSON.stringify(r.body)),this.request(s,a)}streamFetch(t,n,r){return fetch(this.url(`/v1/session/${encodeURIComponent(t)}/stream?startIndex=${n}`),{signal:r,headers:this.headers()})}eventsText(t){return fetch(this.url(`/v1/session/${encodeURIComponent(t)}/events`),{headers:this.headers()})}sessionCost(t){return this.request(`/v1/session/${encodeURIComponent(t)}/cost`)}}const wt={infoRead:"info.read",sessionRead:"session.read",sessionStart:"session.start",sessionFollowUp:"session.followUp",sessionStop:"session.stop",sessionStream:"session.stream",eventRead:"event.read",sessionCost:"session.cost",approvalResolve:"approval.resolve",authResolve:"auth.resolve",logRead:"log.read",artifactRead:"artifact.read",artifactContent:"artifact.content",scheduleDispatch:"schedule.dispatch",evalRead:"eval.read",evalRun:"eval.run",evalCancel:"eval.cancel",channelInvoke:"channel.invoke"},bG=new Set(Object.values(wt));class yG{constructor(t){this.client=t,this.capabilities=bG,this.health=()=>this.client.health(),this.info=()=>this.client.info(),this.meta=()=>this.client.meta(),this.logs=n=>this.client.logs(n),this.sessions=()=>this.client.sessions(),this.createSession=n=>this.client.createSession(n),this.followUp=(n,r,s)=>this.client.followUp(n,r,s),this.stopSession=n=>this.client.stopSession(n),this.subscribeEvents=(n,r,s)=>this.client.streamFetch(n,r,s),this.eventsText=n=>this.client.eventsText(n),this.sessionCost=n=>this.client.sessionCost(n),this.resolveApproval=(n,r,s)=>this.client.resolveApproval(n,r,s),this.resolveAuth=(n,r,s)=>this.client.resolveAuth(n,r,s),this.artifacts=n=>this.client.artifacts(n),this.artifactContent=(n,r)=>this.client.artifactContent(n,r),this.dispatchSchedule=n=>this.client.dispatchSchedule(n),this.evalsList=()=>this.client.evalsList(),this.evalsListRuns=()=>this.client.evalsListRuns(),this.evalsStartRun=n=>this.client.evalsStartRun(n),this.evalsRunStatus=n=>this.client.evalsRunStatus(n),this.evalsCancelRun=n=>this.client.evalsCancelRun(n),this.channelRequest=(n,r,s)=>this.client.channelRequest(n,r,s),this.url=n=>this.client.url(n)}}const vG="agent-sdk-playground-boot";function xG(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function kG(e){const t=e.getElementById(vG);if(t===null)return{kind:"local"};let n;try{n=JSON.parse(t.textContent??"")}catch{throw new Error("Playground boot document is not valid JSON.")}if(!xG(n)||n.transport!=="hosted")throw new Error("Playground boot document has an unknown transport.");if(typeof n.teamId!="number"||!Number.isSafeInteger(n.teamId)||n.teamId<=0||typeof n.deploymentSlug!="string"||n.deploymentSlug.length===0)throw new Error("Playground hosted transport configuration is invalid.");return{kind:"hosted",teamId:n.teamId,deploymentSlug:n.deploymentSlug}}const SG=new Set([wt.infoRead,wt.sessionRead,wt.sessionStart,wt.sessionFollowUp,wt.sessionStream,wt.eventRead,wt.logRead]),fC=18e4,wG=1e3,dC=500;function EG(e){return Math.min(100*2**e,wG)}const TG=5e3,CG=100,RG=e=>new Promise(t=>globalThis.setTimeout(t,e));function Kn(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function _G(e){return!Kn(e)||typeof e.slug!="string"?null:{slug:e.slug,cliVersion:typeof e.manifestCliVersion=="string"?e.manifestCliVersion:void 0}}function AG(e){if(!Kn(e)||!Array.isArray(e.components))return null;const t=e.components.filter(n=>Kn(n)&&typeof n.componentKey=="string"&&Kn(n.info));return(t.find(n=>n.componentKey==="default")??t[0])?.info??null}function NG(e){return!Kn(e)||typeof e.deliveryId!="string"||e.deliveryId===""||e.sessionId!==void 0&&(typeof e.sessionId!="string"||e.sessionId==="")?null:{deliveryId:e.deliveryId,sessionId:e.sessionId}}function OG(e){return Kn(e)?e.status==="pending"?{status:"pending"}:e.status==="allocated"&&typeof e.sessionId=="string"&&e.sessionId!==""?{status:"allocated",sessionId:e.sessionId}:e.status==="skipped"||e.status==="failed"?{status:e.status}:null:null}function IG(e){switch(e){case"unbound":case"creating":case"active":case"hibernated":case"failed":case"deleting":return e;default:return null}}function MG(e){if(!Kn(e))return null;const t=IG(e.phase);return t===null||typeof e.sessionId!="string"||typeof e.channelId!="string"||typeof e.mode!="string"||typeof e.createdAt!="string"||typeof e.lastActivityAt!="string"||e.lastError!==null&&typeof e.lastError!="string"||e.customer!==void 0&&typeof e.customer!="boolean"?null:{sessionId:e.sessionId,channelId:e.channelId,mode:e.mode,phase:t,createdAt:e.createdAt,lastActivityAt:e.lastActivityAt,lastError:e.lastError,customer:e.customer===!0}}function DG(e){if(!Kn(e)||!Array.isArray(e.sessions))return null;const t=[];for(const n of e.sessions){const r=MG(n);if(r===null)return null;t.push(r)}return e.nextCursor===null?{sessions:t,nextCursor:null}:!Kn(e.nextCursor)||typeof e.nextCursor.lastActivityAt!="string"||typeof e.nextCursor.id!="string"?null:{sessions:t,nextCursor:{lastActivityAt:e.nextCursor.lastActivityAt,id:e.nextCursor.id}}}function nM(e){return!Kn(e)||typeof e.type!="string"||e.index!==void 0&&typeof e.index!="number"||e.at!==void 0&&typeof e.at!="string"||e.turnId!==void 0&&typeof e.turnId!="string"||e.sessionId!==void 0&&typeof e.sessionId!="string"||e.data!==void 0&&!Kn(e.data)?null:{index:e.index,type:e.type,at:e.at,turnId:e.turnId,sessionId:e.sessionId,data:e.data}}function LG(e){if(!Kn(e)||!Array.isArray(e.events))return null;const t=[];for(const n of e.events){const r=nM(n);if(r===null)return null;t.push(r)}return t}function jG(e){if(!Kn(e)||!Array.isArray(e.events)||typeof e.unreadableChunks!="number")return null;const t=[];for(const r of e.events){const s=nM(r);if(s===null)return null;t.push(s)}let n=null;if(e.execution!==null){if(!Kn(e.execution)||typeof e.execution.executionId!="string"||typeof e.execution.turnStatus!="string")return null;n={executionId:e.execution.executionId,turnStatus:e.execution.turnStatus}}return{events:t,execution:n,unreadableChunks:e.unreadableChunks}}function zG(e){if(!Kn(e)||!Array.isArray(e.sessions))return null;const t=[];for(const n of e.sessions){if(!Kn(n)||typeof n.sessionId!="string"||!Array.isArray(n.lines)||!n.lines.every(r=>typeof r=="string"))return null;t.push({sessionId:n.sessionId,channelId:typeof n.channelId=="string"?n.channelId:void 0,lines:n.lines})}return t}function PG(e,t){for(let n=Math.min(e.length,t.length);n>0;n--){const r=e.length-n;let s=0;for(;s<n&&t[s]===e[r+s];)s++;if(s===n)return t.slice(n)}return[...t]}function $G(e,t,n){e.delete(t),e.set(t,n);for(const r of e.keys()){if(e.size<=CG)return;e.delete(r)}}function BG(e){if(e.lastError!==null||e.phase==="failed")return"Failed";switch(e.phase){case"unbound":case"creating":return"Creating";case"active":return"Active";case"hibernated":return"Hibernated";case"deleting":return"Deleting"}}const FG=100;function UG(e){if(!Kn(e)||!Kn(e.session))return null;const t=e.session;if(typeof t.sessionId!="string"||t.sessionId==="")return null;const n=typeof t.channelId=="string"?t.channelId:"http",r=typeof t.mode=="string"?t.mode:"chat";return{sessionId:t.sessionId,channelId:n,mode:r,followUpAllowed:!1,title:`${t.sessionId} · History`,running:t.running===!0,turnCount:typeof t.turnCount=="number"?t.turnCount:void 0,createdAt:typeof t.createdAt=="string"?t.createdAt:void 0,updatedAt:typeof t.updatedAt=="string"?t.updatedAt:void 0}}const rM=new Set(["creating","active"]);function qG(e,t){return{sessionId:e.sessionId,channelId:e.channelId,mode:e.mode,followUpAllowed:e.channelId==="http"&&!e.customer,title:`${e.sessionId} · ${BG(e)}`,running:rM.has(e.phase),turnCount:t,createdAt:e.createdAt,updatedAt:e.lastActivityAt}}function pC(e){return`${e.lastActivityAt}|${e.phase}`}const HG=3e4;function VG(e){if(!Kn(e)||!Kn(e.turnCounts))return null;const t=new Map;for(const[n,r]of Object.entries(e.turnCounts)){if(typeof r!="number")return null;t.set(n,r)}return t}function pi(){return Promise.resolve({status:501,ok:!1,body:null})}class GG{constructor(t,n,r=RG){this.teamId=t,this.waitForRetry=r,this.capabilities=SG,this.bootstrapRequest=null,this.composedSessionIds=new Set,this.writableSessionIds=new Set,this.logTails=new Map,this.logIndex=-1,this.logsReadAt=Number.NEGATIVE_INFINITY,this.logsReading=!1,this.turnCounts=new Map,this.turnCountsReading=!1,this.health=async()=>{const s=await this.bootstrap();return{status:s.status,ok:s.ok,body:s.ok?{ok:!0}:null}},this.meta=async()=>{const s=await this.bootstrap();return{status:s.status,ok:s.ok,body:s.body===null?null:{name:s.body.slug,dev:!1,basePath:"",version:s.body.cliVersion,readonly:!1}}},this.info=async()=>{const[s,a]=await Promise.all([this.bootstrap(),this.request("/info",AG).catch(()=>null)]);return{status:s.status,ok:s.ok,body:s.body===null?null:{...a?.body,name:s.body.slug,runtime:"cloud"}}},this.sessions=async()=>{const s=new URLSearchParams({limit:String(FG)}),a=await this.request(`/sessions?${s.toString()}`,DG);if(!a.ok||a.body===null)return{status:a.status,ok:!1,body:null};const l=a.body.sessions,c=l.map(f=>qG(f,this.turnCounts.get(f.sessionId)?.count));return this.writableSessionIds=new Set([...this.composedSessionIds,...c.filter(f=>f.followUpAllowed===!0).map(f=>f.sessionId)]),this.readTurnCounts(l),{status:200,ok:!0,body:{sessions:c}}},this.sessionById=async s=>{const a=await this.request(`/sessions/${encodeURIComponent(s)}`,UG);return a.ok?{status:a.status,ok:!0,body:{session:a.body}}:{status:a.status,ok:!1,body:null}},this.eventsText=async s=>{const a=await this.request(`/sessions/${encodeURIComponent(s)}`,LG);if(!a.ok||a.body===null)return new Response(null,{status:a.status});const l=a.body.map(c=>JSON.stringify(c)).join(`
18
+ `);return new Response(l===""?"":`${l}
19
+ `,{status:a.status,headers:{"content-type":"application/x-ndjson"}})},this.subscribeEvents=async(s,a,l)=>{const c=await this.request(`/sessions/${encodeURIComponent(s)}/events?afterEventIndex=${a-1}`,jG,{signal:l});if(!c.ok||c.body===null)return new Response(null,{status:c.status});const f=c.body.events.map(d=>JSON.stringify(d)).join(`
20
+ `);return new Response(f===""?"":`${f}
21
+ `,{status:c.status,headers:{"content-type":"application/x-ndjson"}})},this.logs=async(s=-1)=>{const a=this.logsFailure===void 0?{status:200,ok:!0,body:{entries:[],nextAfter:this.logIndex}}:{status:this.logsFailure,ok:!1,body:null};if(this.logsReading)return a;if(s<this.logIndex)this.logTails.clear(),this.logSessionId=void 0,this.logIndex=s;else if(Date.now()-this.logsReadAt<TG)return a;this.logsReadAt=Date.now(),this.logsReading=!0;const l=await this.request("/logs",zG).finally(()=>{this.logsReading=!1});if(!l.ok||l.body===null)return this.logsFailure=l.status===404?501:l.status,{status:this.logsFailure,ok:!1,body:null};this.logsFailure=void 0;const c=[];for(const f of l.body){if(f.lines.length===0)continue;const d=PG(this.logTails.get(f.sessionId)??[],f.lines);if($G(this.logTails,f.sessionId,f.lines),d.length!==0){if(this.logSessionId!==f.sessionId){this.logSessionId=f.sessionId;const h=f.channelId===void 0?"":` (${f.channelId})`;c.push({index:++this.logIndex,at:"",line:`==> ${f.sessionId}${h} <==`})}for(const h of d)c.push({index:++this.logIndex,at:"",line:h})}}return{status:200,ok:!0,body:{entries:c,nextAfter:this.logIndex}}},this.createSession=s=>this.startSession(s),this.followUp=(s,a)=>this.writableSessionIds.has(s)?this.startSession(a,s):Promise.resolve({status:409,ok:!1,body:null}),this.stopSession=()=>pi(),this.sessionCost=()=>pi(),this.resolveApproval=()=>pi(),this.resolveAuth=()=>pi(),this.artifacts=()=>pi(),this.artifactContent=()=>Promise.resolve({status:501,ok:!1,bytes:new Uint8Array(0),truncated:!1}),this.dispatchSchedule=()=>pi(),this.evalsList=()=>pi(),this.evalsListRuns=()=>pi(),this.evalsStartRun=()=>pi(),this.evalsRunStatus=()=>pi(),this.evalsCancelRun=()=>pi(),this.channelRequest=()=>pi(),this.url=s=>s,this.basePath=`/api/v2/agentsdk/deployments/${encodeURIComponent(n)}`}async request(t,n,r={}){const s=t.includes("?")?"&":"?",a=await fetch(`${this.basePath}${t}${s}teamId=${this.teamId}`,r),l=await a.json().catch(()=>null),c=n(l);return{status:c===null&&a.ok?502:a.status,ok:a.ok&&c!==null,body:c}}async bootstrap(){this.bootstrapRequest??=this.request("",_G);const t=this.bootstrapRequest;try{const n=await t;return!n.ok&&this.bootstrapRequest===t&&(this.bootstrapRequest=null),n}catch(n){throw this.bootstrapRequest===t&&(this.bootstrapRequest=null),n}}async readTurnCounts(t){if(this.turnCountsReading)return;const n=new Set(t.map(a=>a.sessionId));for(const a of this.turnCounts.keys())n.has(a)||this.turnCounts.delete(a);const r=Date.now(),s=t.filter(a=>!a.customer&&this.turnCountStale(a,r));if(s.length!==0){this.turnCountsReading=!0;try{const a=new URLSearchParams({sessionIds:s.map(c=>c.sessionId).join(",")}),l=await this.request(`/session-turn-counts?${a.toString()}`,VG).catch(()=>null);if(!l?.ok||l.body===null)return;for(const c of s){const f=this.turnCounts.get(c.sessionId)?.count,d=l.body.get(c.sessionId);this.turnCounts.set(c.sessionId,{activity:pC(c),count:d===void 0?f:Math.max(d,f??0),readAt:r})}}finally{this.turnCountsReading=!1}}}turnCountStale(t,n){const r=this.turnCounts.get(t.sessionId);return r===void 0||r.activity!==pC(t)?!0:rM.has(t.phase)&&n-r.readAt>=HG}async startSession(t,n){const r=await this.request("/sessions",NG,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({teamId:this.teamId,message:t,sessionId:n})});if(!r.ok||r.body===null)return{status:r.status,ok:!1,body:null};const s=r.body.sessionId??await this.waitForDeliveryBinding(r.body.deliveryId);return typeof s!="string"?s:(this.composedSessionIds.add(s),this.writableSessionIds.add(s),{status:r.status,ok:!0,body:{sessionId:s}})}async waitForDeliveryBinding(t){const n=Date.now();for(let r=0;r<dC;r++){const s=await this.request(`/session-deliveries/${encodeURIComponent(t)}`,OG);if(s.ok&&s.body?.status==="allocated")return s.body.sessionId;if(s.ok&&(s.body?.status==="skipped"||s.body?.status==="failed"))return{status:409,ok:!1,body:null};if(!(s.ok&&s.body?.status==="pending")&&s.status!==404)return{status:s.status,ok:!1,body:null};const a=Date.now()-n;if(a>=fC||r+1>=dC)break;await this.waitForRetry(Math.min(EG(r),fC-a))}return{status:504,ok:!1,body:null}}}function WG(e,t){const n=kG(document);switch(n.kind){case"local":return new yG(new gG(e,()=>t().authToken,()=>t().aliasToken));case"hosted":return new GG(n.teamId,n.deploymentSlug)}}function al(e,t,n){return e.has(t)?n.some(r=>e.has(r))?"enabled":"read-only":"disabled"}function iM(e){const t=n=>al(e,wt.eventRead,[n]);return{composer:al(e,wt.sessionRead,[wt.sessionStart,wt.sessionFollowUp]),stop:t(wt.sessionStop),approvals:t(wt.approvalResolve),auth:t(wt.authResolve),logs:e.has(wt.logRead)?"enabled":"disabled",evals:al(e,wt.evalRead,[wt.evalRun]),artifacts:al(e,wt.artifactRead,[wt.artifactContent]),schedules:al(e,wt.infoRead,[wt.scheduleDispatch]),channelRoutes:al(e,wt.infoRead,[wt.channelInvoke])}}const KG=new Set(["actions.requested","actions.completed","action.result","action.approval_requested","action.approval_resolved","action.auth_requested","action.auth_resolved","subagent.called","subagent.completed","artifact.tagged"]),YG=new Set(["message.received","turn.started","message.completed","reasoning.appended","reasoning.completed","actions.requested","actions.completed","action.approval_requested","action.approval_resolved","action.auth_requested","action.auth_resolved","action.result","subagent.called","subagent.completed","artifact.tagged","turn.completed","turn.failed","agent.bound","session.failed"]),XG=12e4;function ZG(e){return e===404||e>=500&&e<600}function sM(){const e=window.location.pathname,t=e.replace(/\/playground\/?$/,"");return t===e?"":t}function QG(){const e=T7()!==null,t=e?CI():"";return{meta:{name:"agent",dev:!1,basePath:sM()},capabilities:iM(new Set),info:null,health:"unknown",sessions:[],current:null,localTrace:!1,view:"overview",running:!1,turnStartedAt:null,queued:[],composerDraft:null,authToken:"",aliasToken:t,aliasHosted:e,embedded:e&&C7(),transcript:[],traceEvents:[],historyLoading:!1,sessionCostUsd:null,barTitle:"No session",barId:"",externalUrl:null,drawerOpen:!1,overviewSection:"home",overviewRunId:null,surfaceFocusNonce:0,chatPanelOpen:!0,toast:null,evalCases:[],evalConfig:null,evalRun:null,evalRuns:[],evalNavReturn:!1}}class JG{constructor(t,n){this.api=t,this.stateStore=n,this.items=[],this.itemIndex=new Map,this.toolIds=new Set,this.assistantId=null,this.reasoningId=null,this.nestedAssistantIds=new Map,this.nestedReasoningIds=new Map,this.idSeq=0,this.streamAbort=null,this.streamRetry=null,this.snapshotOpen=!1,this.snapshotToken=0,this.lastIndex=-1,this.toastTimer=null,this.evalPollTimer=null,this.evalRestoreGeneration=0,this.evalPollGeneration=0,this.evalRestoreInFlight=null,this.booted=!1,this.pendingSessionDeepLink=null,this.aliasStreamInterrupted=!1,this.discardTurnBody=!1,this.activeTurnId=null,this.activeTurnStartedAt=null,this.pendingUserEchoes=[],this.pendingCreate=null,this.flushingQueue=!1,this.queueHeld=!1,this.knownSessionIds=new Set,this.sessionsSeeded=!1,this.subscribe=this.stateStore.subscribe,this.getState=()=>this.stateStore.getState(),this.getInitialState=()=>this.stateStore.getInitialState()}get historyOnly(){return this.state.meta.readonly===!0}get state(){return this.stateStore.getState()}hasCapability(t){return this.api.capabilities.has(t)}set(t){this.stateStore.setState(t)}commitTranscript(){this.set({transcript:this.items.slice()})}toast(t){this.set({toast:t}),this.toastTimer&&clearTimeout(this.toastTimer),this.toastTimer=setTimeout(()=>this.set({toast:null}),4e3)}setAuthToken(t){this.set({authToken:t})}async signInWithAliasToken(t){const n=t.trim();if(n==="")return{ok:!1,error:"Enter the deployment's alias token."};this.set({aliasToken:n});const r=await this.api.health();return!r.ok&&r.status===404?(this.set({aliasToken:""}),{ok:!1,error:"That token was not accepted. Check it and try again."}):(this.aliasStreamInterrupted=!1,this.booted=!1,await this.boot(),{ok:!0})}acceptAliasTokenHandoff(t){if(this.set({aliasToken:t}),!this.booted){this.boot();return}if(!this.aliasStreamInterrupted)return;this.aliasStreamInterrupted=!1;const n=this.state.current;n!==null&&this.streamAbort===null&&this.startStream(n.sessionId,this.lastIndex+1)}noteAliasAuthLoss(t){return!this.state.aliasHosted||t!==401&&t!==404||this.state.aliasToken.trim()===""?!1:(this.aliasStreamInterrupted=this.streamAbort!==null,this.stopStream(),this.set({aliasToken:""}),!0)}setDrawerOpen(t){this.set({drawerOpen:t})}setOverviewSection(t,n=null){this.set({overviewSection:t,overviewRunId:n}),this.setView("overview")}focusAgentSurface(){this.setOverviewSection("home"),this.set({drawerOpen:!1,surfaceFocusNonce:this.state.surfaceFocusNonce+1})}setChatPanelOpen(t){this.set({chatPanelOpen:t})}nextId(t){return this.idSeq+=1,`${t}-${this.idSeq}`}push(t){this.itemIndex.set(t.id,this.items.length),this.items.push(t)}update(t,n){const r=this.itemIndex.get(t);r!==void 0&&(this.items[r]={...this.items[r],...n})}resetTranscript(){this.items=[],this.itemIndex.clear(),this.toolIds.clear(),this.assistantId=null,this.reasoningId=null,this.nestedAssistantIds.clear(),this.nestedReasoningIds.clear(),this.discardTurnBody=!1,this.activeTurnId=null,this.activeTurnStartedAt=null,this.queueHeld=!1,this.pendingUserEchoes=[],this.pendingCreate=null}subagentToolCallId(t){return`sub:${t}`}ensureSubagentTool(t,n){const r=this.subagentToolCallId(t),s=this.itemIndex.has(this.toolItemId(r));return this.upsertTool(r,s?"":"subagent:task",null,n)}getToolItem(t){const n=this.itemIndex.get(t);if(n===void 0)return null;const r=this.items[n];return r?.kind==="tool"?r:null}updateSubagentChildren(t,n,r=null){const s=this.ensureSubagentTool(t,r),a=this.getToolItem(s);if(a===null)return;const l=n([...a.children??[]]);this.update(s,{children:l})}upsertNestedTool(t,n,r,s,a){this.updateSubagentChildren(t,l=>{const c=l.findIndex(f=>f.kind==="tool"&&f.callId===n);if(c>=0){const f=l[c];if(f?.kind!=="tool")return l;const d=l.slice();return d[c]={...f,name:r||f.name,args:s??f.args},d}return l.push({kind:"tool",id:this.nextId("nested-tool"),callId:n,name:r,args:s??null,status:"running",output:null,startedAt:a??Date.now(),endedAt:null}),l},a)}finishNestedTool(t,n,r,s,a,l){this.updateSubagentChildren(t,c=>{const f=c.findIndex(b=>b.kind==="tool"&&b.callId===n),d=s==null?"(no output)":jn(s,4e3);if(f<0)return c.push({kind:"tool",id:this.nextId("nested-tool"),callId:n,name:r,args:null,status:a?"error":"done",output:d,outputRaw:s,startedAt:l??Date.now(),endedAt:l??Date.now()}),c;const h=c[f];if(h?.kind!=="tool")return c;const m=c.slice();return m[f]={...h,name:r||h.name,status:a?"error":"done",output:d,outputRaw:s,endedAt:l??Date.now()},m},l)}ensureNestedAssistant(t){const n=this.nestedAssistantIds.get(t);if(n)return n;const r=this.nextId("nested-asst");return this.nestedAssistantIds.set(t,r),this.updateSubagentChildren(t,s=>(s.push({kind:"assistant",id:r,text:"",streaming:!0}),s)),r}ensureNestedReasoning(t){const n=this.nestedReasoningIds.get(t);if(n)return n;const r=this.nextId("nested-think");return this.nestedReasoningIds.set(t,r),this.updateSubagentChildren(t,s=>(s.push({kind:"reasoning",id:r,text:"",open:!0}),s)),r}updateNestedChild(t,n,r){this.updateSubagentChildren(t,s=>{const a=s.findIndex(f=>f.id===n);if(a<0)return s;const l=s[a];if(l===void 0)return s;const c=s.slice();return c[a]={...l,...r},c})}pushUser(t){this.assistantId=null,this.reasoningId=null;const n=this.nextId("user");return this.push(t===null?{kind:"user",id:n,text:"",hidden:!0}:{kind:"user",id:n,text:t}),n}pushUserEcho(t){const n=this.pushUser(t);return this.pendingUserEchoes.push({id:n,text:t}),this.commitTranscript(),n}consumeUserEcho(t){const n=this.pendingUserEchoes[0];return n===void 0||t!==null&&n.text!==t?!1:(this.pendingUserEchoes.shift(),this.assistantId=null,this.reasoningId=null,!0)}rollbackUserEcho(t){this.pendingUserEchoes=this.pendingUserEchoes.filter(r=>r.id!==t);const n=this.itemIndex.get(t);n!==void 0&&(this.items.splice(n,1),this.itemIndex.clear(),this.items.forEach((r,s)=>this.itemIndex.set(r.id,s))),this.commitTranscript()}pushDivider(t,n=!1,r){this.push({kind:"divider",id:this.nextId("div"),text:t,fail:n,url:r})}ensureAssistant(){if(this.assistantId)return this.assistantId;const t=this.nextId("asst");return this.push({kind:"assistant",id:t,text:"",streaming:!0}),this.assistantId=t,t}ensureReasoning(){if(this.reasoningId)return this.reasoningId;const t=this.nextId("think");return this.push({kind:"reasoning",id:t,text:"",open:!0}),this.reasoningId=t,t}toolItemId(t){return`tool:${t}`}upsertTool(t,n,r,s){const a=this.toolItemId(t);if(this.itemIndex.has(a)){const l={};if(n&&(l.name=n),r!=null&&(l.args=r),s!==null){const c=this.getToolItem(a);c!==null&&c.startedAt===null&&(l.startedAt=s)}return Object.keys(l).length>0&&this.update(a,l),a}return this.push({kind:"tool",id:a,callId:t,name:n,args:r??null,status:"running",output:null,startedAt:s??Date.now(),endedAt:null}),this.toolIds.add(a),a}markAwaiting(t,n,r){const s=this.upsertTool(t,n,r,Date.now());this.update(s,{status:"awaiting",gate:"approval",output:"Parked for human approval. Approve or deny to continue the turn."})}markAwaitingAuth(t,n,r,s){const a=this.upsertTool(t,n,null,Date.now());this.update(a,{status:"awaiting",gate:"auth",connection:r,authUrl:s,output:`Waiting for ${r} authorization.`})}clearAwaiting(t,n){const r=this.toolItemId(t);if(!this.itemIndex.has(r))return;const s=this.getToolItem(r)?.gate==="auth",a=n==="deny";this.update(r,{status:"running",output:a?s?"Canceled — tool will not execute.":"Denied — tool will not execute.":s?"Connected — retrying…":"Approved — executing…"})}finishTool(t,n,r,s,a){const l=this.upsertTool(t,n,null,a),c=r==null?"(no output)":jn(r,4e3);this.update(l,{status:s?"error":"done",output:c,outputRaw:r,endedAt:a??Date.now()}),this.activeTurnId===null&&!this.hasOpenTools()&&this.setRunning(!1)}hasOpenTools(){for(const t of this.toolIds){const n=this.itemIndex.get(t);if(n===void 0)continue;const r=this.items[n];if(r.kind==="tool"&&(r.status==="running"||r.status==="awaiting"))return!0}return!1}finalizeOpenTools(t,n){const r=t??Date.now();for(const s of this.toolIds){const a=this.itemIndex.get(s);if(a===void 0)continue;const l=this.items[a];l.kind==="tool"&&(l.status==="done"||l.status==="error"||l.status!=="awaiting"&&this.update(s,{status:"orphan",endedAt:r,output:n}))}}beginDiscardStaleTurnBody(){this.discardTurnBody=!0,this.activeTurnId=null}applyChat(t){if(this.discardTurnBody){if(t.type==="turn.started")this.discardTurnBody=!1;else if(t.type!=="message.received"&&t.type!=="agent.bound")return}else if(this.activeTurnId!==null&&t.turnId!==void 0&&t.turnId!==this.activeTurnId&&!KG.has(t.type)&&t.type!=="message.received"&&t.type!=="agent.bound")return;const n=t.data||{},r=Sl(t.at)||Date.now();switch(t.type){case"message.received":{const s=XI(n);this.consumeUserEcho(s)||this.pushUser(s);break}case"agent.bound":this.pushDivider(n.url?`cloud agent ${n.sdkAgentId}`:`agent ${n.sdkAgentId}`,!1,typeof n.url=="string"?n.url:void 0);break;case"turn.started":this.activeTurnId=t.turnId??null,this.activeTurnStartedAt=Sl(t.at),this.setRunning(!0);break;case"reasoning.appended":if(typeof n.parentCallId=="string"&&n.parentCallId!==""){const s=this.ensureNestedReasoning(n.parentCallId);this.updateNestedChild(n.parentCallId,s,{text:String(n.text??"")})}else this.update(this.ensureReasoning(),{text:String(n.text??"")});break;case"reasoning.completed":if(typeof n.parentCallId=="string"&&n.parentCallId!==""){const s=this.nestedReasoningIds.get(n.parentCallId);s&&(this.updateNestedChild(n.parentCallId,s,{open:!1}),this.nestedReasoningIds.delete(n.parentCallId))}else this.reasoningId&&(this.update(this.reasoningId,{open:!1}),this.reasoningId=null);break;case"message.appended":if(typeof n.parentCallId=="string"&&n.parentCallId!==""){const s=this.ensureNestedAssistant(n.parentCallId);this.updateNestedChild(n.parentCallId,s,{text:String(n.text??"")})}else this.update(this.ensureAssistant(),{text:String(n.text??"")});break;case"message.completed":{if(typeof n.parentCallId=="string"&&n.parentCallId!==""){const s=this.ensureNestedAssistant(n.parentCallId);this.updateNestedChild(n.parentCallId,s,{text:String(n.text??""),streaming:!1}),this.nestedAssistantIds.delete(n.parentCallId)}else{const s=this.ensureAssistant();this.update(s,{text:String(n.text??""),streaming:!1}),this.assistantId=null}break}case"actions.requested":this.setRunning(!0);for(const s of n.calls||[]){const a=typeof s.parentCallId=="string"&&s.parentCallId!==""?s.parentCallId:typeof n.parentCallId=="string"&&n.parentCallId!==""?n.parentCallId:void 0;a!==void 0?this.upsertNestedTool(a,s.callId,s.toolName,s.args,r):s.toolName==="task"||this.upsertTool(s.callId,s.toolName,s.args,r)}break;case"action.approval_requested":this.markAwaiting(n.callId,n.toolName,n.args);break;case"action.approval_resolved":this.clearAwaiting(n.callId,n.decision);break;case"action.auth_requested":this.markAwaitingAuth(n.callId,n.toolName,n.connection,n.authUrl);break;case"action.auth_resolved":this.clearAwaiting(n.callId,n.decision);break;case"action.result":typeof n.parentCallId=="string"&&n.parentCallId!==""?this.finishNestedTool(n.parentCallId,n.callId,n.toolName,n.output,!!n.isError,r):n.toolName==="task"||this.finishTool(n.callId,n.toolName,n.output,!!n.isError,r);break;case"subagent.called":this.setRunning(!0),this.upsertTool(this.subagentToolCallId(n.callId),`subagent:${n.name||"task"}`,n.description,r);break;case"artifact.tagged":{const s=_I(n);this.push({kind:"artifact",id:this.nextId("artifact"),artifactKind:s.kind,title:s.title,url:s.url,artifactId:s.artifactId,data:s.data});break}case"subagent.completed":this.nestedAssistantIds.delete(n.callId),this.nestedReasoningIds.delete(n.callId),this.finishTool(this.subagentToolCallId(n.callId),"","completed",!1,r);break;case"turn.completed":{this.activeTurnId=null,this.finalizeOpenTools(r,"(no result — turn completed before the tool reported back)");const s=this.activeTurnStartedAt;this.activeTurnStartedAt=null,this.push({kind:"turn-end",id:this.nextId("turn"),ms:s!==null&&Sl(t.at)!==null?Math.max(0,r-s):null,inTokens:typeof n.usage?.inputTokens=="number"?n.usage.inputTokens:void 0,outTokens:typeof n.usage?.outputTokens=="number"?n.usage.outputTokens:void 0,costUsd:typeof n.cost?.totalUsd=="number"?n.cost.totalUsd:void 0});const a=this.state.current?.sessionId;a&&this.refreshSessionCost(a),this.setRunning(this.hasOpenTools());break}case"turn.failed":this.activeTurnId=null,this.activeTurnStartedAt=null,this.finalizeOpenTools(r,`(no result — turn failed: ${n.message||"unknown"})`),this.pushDivider(`turn failed: ${n.message}`,!0),this.setRunning(this.hasOpenTools());break;case"session.waiting":this.setRunning(this.hasOpenTools()),this.refreshSessions();break;case"session.completed":this.finalizeOpenTools(r,"(no result — session completed)"),this.pushDivider("task session completed"),this.setRunning(!1),this.refreshSessions();break;case"session.failed":this.finalizeOpenTools(r,`(no result — session failed: ${n.message||"unknown"})`),this.pushDivider(`session failed: ${n.message}`,!0),this.setRunning(!1),this.refreshSessions();break}}ingestStreamEvent(t){if(t.index!==void 0){if(t.index<=this.lastIndex)return;this.lastIndex=t.index}this.state.traceEvents.push(t),this.applyChat(t)}flushStreamPaint(){this.set({transcript:this.items.slice(),traceEvents:this.state.traceEvents.slice()})}beginLocalTurn(){this.activeTurnStartedAt=Date.now(),this.setRunning(!0)}setRunning(t){this.set({running:t,turnStartedAt:t?this.activeTurnStartedAt:null}),t||queueMicrotask(()=>this.maybeFlushQueue())}setView(t){if(t==="logs"){this.set({view:"overview",overviewSection:"logs",evalNavReturn:!1});try{const s=new URL(window.location.href);s.searchParams.delete("view"),history.replaceState(null,"",s.toString())}catch{}NI("logs");return}const n=t==="overview"||t==="chat"||t==="trace"||t==="raw"||t==="evals"||t==="artifacts"?t:"overview",r=this.state.view==="evals"&&(n==="chat"||n==="trace"||n==="raw"||n==="artifacts");this.set({view:n,...n==="evals"||n==="overview"?{evalNavReturn:!1}:r?{evalNavReturn:!0}:{}}),r&&this.state.current===null&&this.attachEvalCaseSessionForView(n);try{const s=new URL(window.location.href);n==="overview"?s.searchParams.delete("view"):s.searchParams.set("view",n),history.replaceState(null,"",s.toString())}catch{}n==="evals"&&(this.refreshEvalRuns(),this.restoreEvalRun())}backToEvals(){this.set({evalNavReturn:!1}),this.setView("evals")}backToOverview(){this.set({evalNavReturn:!1}),this.setView("overview")}newChat(){this.historyOnly||!this.hasCapability(wt.sessionStart)||(this.deselectSession(),this.setView("chat"))}async refreshSessions(){if(!this.hasCapability(wt.sessionRead))return;let t;try{t=await this.api.sessions()}catch{return}if(!t.ok||!t.body){this.noteAliasAuthLoss(t.status);return}const n=t.body.sessions||[],r=eG({knownIds:this.knownSessionIds,sessions:n,currentSessionId:this.state.current?.sessionId??null,embedded:this.state.embedded,view:this.state.view,seeded:this.sessionsSeeded});this.knownSessionIds=new Set(n.map(l=>l.sessionId)),this.sessionsSeeded=!0;const s={sessions:n};let a=!1;if(this.state.current){const l=n.find(c=>c.sessionId===this.state.current?.sessionId);l?.continuationToken&&(s.current={...this.state.current,continuationToken:l.continuationToken}),l?.running===!0&&!this.state.running&&this.streamAbort===null&&!this.snapshotOpen&&!this.historyOnly?(s.running=!0,a=!0):l?.running===!1&&this.state.running&&!this.hasOpenTools()&&(s.running=!1)}if(this.set(s),s.running===!1&&queueMicrotask(()=>this.maybeFlushQueue()),a&&this.state.current!==null&&this.startStream(this.state.current.sessionId,this.lastIndex+1),r.action==="select"){const l=n.find(c=>c.sessionId===r.sessionId);l!==void 0&&this.selectSession(l);return}r.action==="reveal"&&this.revealEmbeddedTriggeredRun(r.sessionId,n)}revealEmbeddedTriggeredRun(t,n){if(this.state.view==="overview"){this.set({overviewSection:"runs"});return}const r=n.find(l=>l.sessionId===t),s=r?.channelId??"triggered",a=r?.title?.trim();this.toast(a===void 0||a===""?`New ${s} run started`:`New ${s} run: ${a}`)}isCurrent(t){return this.state.current!==null&&this.state.current.sessionId===t}stopStream(){this.streamAbort&&(this.streamAbort.abort(),this.streamAbort=null)}startStream(t,n){if(this.historyOnly||!this.hasCapability(wt.sessionStream))return;this.stopStream();const r=new AbortController;this.streamAbort=r,this.api.subscribeEvents(t,n,r.signal).then(async s=>{if(!s.ok||!s.body){this.handleStreamPollFailure(t,r,s.status);return}this.streamRetry=null;const a=s.body.getReader(),l=new TextDecoder;let c="";for(;;){const f=await a.read();if(f.done){this.scheduleReconnect(t,r);return}c+=l.decode(f.value,{stream:!0});const d=c.split(`
22
+ `);c=d.pop()||"";const h=[];for(const m of d){if(r.signal.aborted)return;if(!m||!m.trim())continue;let b=null;try{b=JSON.parse(m)}catch{continue}b!==null&&h.push(b)}if(r.signal.aborted)return;for(const m of h)this.ingestStreamEvent(m);h.length>0&&this.flushStreamPaint()}}).catch(()=>{r.signal.aborted||this.scheduleReconnect(t,r)})}handleStreamPollFailure(t,n,r){if(ZG(r)&&this.claimStreamRetryBudget(t)){this.scheduleReconnect(t,n);return}this.streamRetry=null,this.streamAbort===n&&(this.streamAbort=null),this.toast(`Stream failed (${r})`)}claimStreamRetryBudget(t){const n=Date.now();return this.streamRetry===null||this.streamRetry.sessionId!==t||this.listedRunning(t)?(this.streamRetry={sessionId:t,startedAt:n},!0):n-this.streamRetry.startedAt<XG}listedRunning(t){return this.state.sessions.some(n=>n.sessionId===t&&n.running===!0)}scheduleReconnect(t,n){n.signal.aborted||this.historyOnly||this.isCurrent(t)&&setTimeout(()=>{!this.isCurrent(t)||this.streamAbort!==n||this.startStream(t,this.lastIndex+1)},1e3)}async refreshSessionCost(t){if(this.hasCapability(wt.sessionCost))try{const n=await this.api.sessionCost(t);if(!n.ok||n.body===null||this.state.current?.sessionId!==t)return;this.set({sessionCostUsd:n.body.source==="unavailable"?null:n.body.costUsd})}catch{}}selectSession(t){if(this.isCurrent(t.sessionId)&&(this.streamAbort!==null||this.snapshotOpen)){this.set({chatPanelOpen:!0,evalNavReturn:!1}),this.showSelectedSession(t.sessionId);return}this.stopStream(),this.streamRetry=null,this.resetTranscript(),this.lastIndex=-1,this.state.traceEvents=[],this.set({localTrace:!1,current:{sessionId:t.sessionId,channelId:t.channelId,mode:t.mode,followUpAllowed:t.followUpAllowed,continuationToken:t.continuationToken,externalUrl:t.externalUrl||null,prUrl:t.prUrl||null},running:!!t.running,turnStartedAt:null,queued:[],composerDraft:null,barTitle:t.title||"Session",barId:t.sessionId,externalUrl:t.externalUrl||null,transcript:[],traceEvents:[],sessionCostUsd:null,chatPanelOpen:!0,evalNavReturn:!1}),this.showSelectedSession(t.sessionId),this.refreshSessions(),this.refreshSessionCost(t.sessionId),this.loadEventsSnapshot(t.sessionId,!!t.running)}showSelectedSession(t){this.syncSessionUrl(t),(this.state.view==="evals"||this.state.view==="overview")&&(this.setView("chat"),this.set({evalNavReturn:!1}))}syncSessionUrl(t){try{const n=new URL(window.location.href);t?n.searchParams.set("sessionId",t):n.searchParams.delete("sessionId"),history.replaceState(null,"",n.toString())}catch{}}async loadEventsSnapshot(t,n){if(!this.hasCapability(wt.eventRead))return;const r=++this.snapshotToken;this.snapshotOpen=!0,this.set({historyLoading:!0}),this.stopStream();try{const s=await this.api.eventsText(t);if(r!==this.snapshotToken||!this.isCurrent(t))return;if(!s.ok){this.historyOnly?this.toast(`Could not load trace (${s.status})`):(this.toast(`Could not load trace (${s.status}) — falling back to stream`),this.startStream(t,0));return}const a=await s.text();if(r!==this.snapshotToken||!this.isCurrent(t)||(await this.refreshSessions(),r!==this.snapshotToken||!this.isCurrent(t)))return;const l=this.state.sessions.find(d=>d.sessionId===t),c=l!==void 0?l.running===!0:n;this.ingestEventsCompact(gv(a),c);const f=this.hasOpenTools()||c;this.setRunning(f),f&&!this.historyOnly&&this.startStream(t,this.lastIndex+1)}catch(s){if(r!==this.snapshotToken||!this.isCurrent(t))return;this.toast(`Trace load failed: ${eW(s)}`),this.historyOnly||this.startStream(t,0)}finally{r===this.snapshotToken&&(this.snapshotOpen=!1,this.set({historyLoading:!1}))}}ingestEventsCompact(t,n=!1){this.resetTranscript(),this.lastIndex=-1;for(const r of t){const s=YG.has(r.type)||n&&r.type==="message.appended";s&&this.applyChat(r),!(!s&&r.type==="message.appended")&&typeof r.index=="number"&&r.index>this.lastIndex&&(this.lastIndex=r.index)}this.setRunning(this.hasOpenTools()||n),this.set({traceEvents:t.slice(),transcript:this.items.slice()})}deselectSession(){this.stopStream(),this.streamRetry=null,this.resetTranscript(),this.lastIndex=-1,this.set({current:null,localTrace:!1,running:!1,turnStartedAt:null,queued:[],composerDraft:null,transcript:[],traceEvents:[],sessionCostUsd:null,barTitle:"No session",barId:"",externalUrl:null,chatPanelOpen:!0,evalNavReturn:!1}),this.syncSessionUrl(null),this.state.embedded||this.setView("overview"),this.refreshSessions()}loadLocalTrace(t,n){this.stopStream(),this.resetTranscript(),this.lastIndex=-1;const r=gv(t);if(r.length===0){this.toast("No session events found in that file."),this.deselectSession();return}const s=r[0].sessionId||"local-trace";this.set({current:null,localTrace:!0,running:!1,turnStartedAt:null,queued:[],composerDraft:null,barTitle:"Trace",barId:`${n||s} · ${r.length} events`,externalUrl:null,chatPanelOpen:!0}),this.setView("trace"),this.syncSessionUrl(null),this.ingestEventsCompact(r),this.toast(`Loaded ${r.length} events — Trace timeline ready`)}slashCommands(){return Jh(this.state.info?.channels)}async sendMessage(t,n={}){const r=t.trim();if(!r||this.state.localTrace||this.historyOnly)return!1;const s=this.state.current;if(rG(r))return this.hasCapability(wt.channelInvoke)?this.invokeSlashCommand(r):(this.toast("Channel commands are not available in this playground"),!1);if(s!==null&&(!this.hasCapability(wt.sessionFollowUp)||s.followUpAllowed===!1||s.channelId!=="http"||s.mode==="task"))return this.toast("This session is read-only in this playground"),!1;if(this.queueHeld=!1,s!==null&&this.state.running&&!n.force)return this.queueMessage(r),!0;if(s===null&&this.pendingCreate!==null)return this.queueMessage(r),!0;if(s===null){if(!this.hasCapability(wt.sessionStart))return this.toast("Starting new chats is not available in this playground"),!1;this.resetTranscript(),this.lastIndex=-1,this.beginLocalTurn();const l=this.pushUserEcho(r);this.set({localTrace:!1,barTitle:"Session",barId:"starting…",externalUrl:null,traceEvents:[]});const c={};this.pendingCreate=c;let f=!1,d;try{d=await this.api.createSession(r)}finally{f=this.pendingCreate!==c,f||(this.pendingCreate=null)}return f?(d.ok?this.refreshSessions():this.toast(`Create failed: ${jn(d.body,160)}`),!0):!d.ok||!d.body?(this.setRunning(!1),this.rollbackUserEcho(l),this.set({barTitle:"No session",barId:""}),this.toast(`Create failed: ${jn(d.body,160)}`),!1):(this.set({current:{sessionId:d.body.sessionId,channelId:"http",mode:"chat",followUpAllowed:!0,continuationToken:d.body.continuationToken},barId:d.body.sessionId}),this.syncSessionUrl(d.body.sessionId),this.startStream(d.body.sessionId,0),this.refreshSessions(),!0)}this.beginLocalTurn();const a=this.pushUserEcho(r);return this.beginDiscardStaleTurnBody(),this.streamAbort===null&&this.startStream(s.sessionId,this.lastIndex+1),this.postFollowUp(s,r,!0,a)}async postFollowUp(t,n,r,s){const a=await this.api.followUp(t.sessionId,n,t.continuationToken);if(a.ok&&a.body)return this.set({current:{...t,continuationToken:a.body.continuationToken}}),!0;if(a.body?.error==="stale_continuation_token"&&r){await this.refreshSessions();const l=this.state.current??t;return this.postFollowUp(l,n,!1,s)}return this.setRunning(!1),this.rollbackUserEcho(s),this.toast(`Send failed: ${jn(a.body,160)}`),!1}queueMessage(t){this.set({queued:[...this.state.queued,{id:this.nextId("queued"),text:t}]})}removeQueued(t){this.set({queued:this.state.queued.filter(n=>n.id!==t)})}clearQueue(){this.set({queued:[]})}editQueued(t){const n=this.state.queued.find(r=>r.id===t);n!==void 0&&(this.removeQueued(t),this.set({composerDraft:n.text}))}consumeComposerDraft(){this.set({composerDraft:null})}setComposerDraft(t){this.set({composerDraft:t})}async sendQueuedNow(t){const n=this.state.queued.find(s=>s.id===t);if(n===void 0)return;if(this.pendingCreate!==null){this.toast("The session is still starting. Queued messages send once it is ready.");return}this.removeQueued(t),this.queueHeld=!1,await this.sendMessage(n.text,{force:!0})||this.requeueFront(n)}requeueFront(t){this.set({queued:[t,...this.state.queued]}),this.queueHeld=!0}maybeFlushQueue(){if(this.flushingQueue||this.queueHeld)return;const{running:t,queued:n,localTrace:r,current:s}=this.state;if(t||r||this.historyOnly||s===null||n.length===0)return;const[a,...l]=n;if(a===void 0)return;this.flushingQueue=!0,this.set({queued:l}),this.beginLocalTurn();const c=this.pushUserEcho(a.text);this.streamAbort===null&&this.startStream(s.sessionId,this.lastIndex+1),this.postFollowUp(s,a.text,!0,c).then(f=>{f||this.requeueFront(a)}).finally(()=>{this.flushingQueue=!1})}async stopTurn(){const t=this.state.current?.sessionId;if(!t||this.state.localTrace||this.historyOnly||!this.hasCapability(wt.sessionStop)||!this.state.running)return;this.state.queued.length>0&&(this.queueHeld=!0),this.beginDiscardStaleTurnBody(),this.stopStream(),this.setRunning(!1),this.assistantId&&(this.update(this.assistantId,{streaming:!1}),this.assistantId=null),this.reasoningId&&(this.update(this.reasoningId,{open:!1}),this.reasoningId=null),this.finalizeOpenTools(Date.now(),"(no result — turn interrupted)"),this.pushDivider("turn interrupted"),this.commitTranscript();const n=await this.api.stopSession(t);if(!n.ok){this.toast(`Stop failed: ${jn(n.body,160)}`);return}this.refreshSessions()}async submitApproval(t,n){const r=this.state.current?.sessionId;if(!r||this.historyOnly||!this.hasCapability(wt.approvalResolve))return;const s=await this.api.resolveApproval(r,t,n);s.ok||this.toast(`Approval failed: ${jn(s.body,160)}`)}async submitAuth(t,n){const r=this.state.current?.sessionId;if(!r||this.historyOnly||!this.hasCapability(wt.authResolve))return;const s=await this.api.resolveAuth(r,t,n);s.ok||this.toast(`Connect failed: ${jn(s.body,160)}`)}async dispatchSchedule(t){if(this.historyOnly||!this.hasCapability(wt.scheduleDispatch))return;const n=await this.api.dispatchSchedule(t);if(!n.ok||!n.body){this.toast(`Dispatch failed: ${jn(n.body,120)}`);return}await this.refreshSessions();const r=n.body.sessionIds?.[0],s=this.state.sessions.find(a=>a.sessionId===r);s&&this.selectSession(s)}async refreshEvalCases(){if(!this.hasCapability(wt.evalRead))return;const t=await this.api.evalsList();if(!t.ok||!t.body){t.status!==0&&this.toast(`Could not list evals (${t.status}): ${jn(t.body,120)}`);return}this.set({evalCases:t.body.evals??[],evalConfig:t.body.config??null})}async refreshEvalRuns(){if(!this.hasCapability(wt.evalRead))return;const t=await this.api.evalsListRuns();if(!t.ok||t.body===null)return;const n=Array.isArray(t.body.runs)?t.body.runs:null;n!==null&&this.set({evalRuns:n})}async selectEvalRun(t){const n=t.trim();if(n==="")return;this.set({chatPanelOpen:!0});const r=this.state.evalRuns.find(a=>a.runId===n);if(r!==void 0&&r.status!=="running"){this.applyRestoredEvalRun(r),this.setView("evals");return}const s=await this.api.evalsRunStatus(n);if(!s.ok||s.body===null){this.toast(`Eval run not found: ${n}`);return}this.applyRestoredEvalRun(s.body),this.setView("evals"),this.refreshEvalRuns()}async openEvalRunInOverview(t){const n=t.trim();n!==""&&(this.setOverviewSection("runs",n),await this.selectEvalRun(n))}async restoreEvalRun(){if(this.hasCapability(wt.evalRead))return this.evalRestoreInFlight!==null?this.evalRestoreInFlight:(this.evalRestoreInFlight=this.doRestoreEvalRun().finally(()=>{this.evalRestoreInFlight=null}),this.evalRestoreInFlight)}async doRestoreEvalRun(){const t=++this.evalRestoreGeneration,n=rW();if(n!==null){const d=await this.api.evalsRunStatus(n);if(t!==this.evalRestoreGeneration)return;if(d.ok&&d.body){this.applyRestoredEvalRun(d.body),this.refreshEvalRuns();return}}const r=await this.api.evalsListRuns();if(t!==this.evalRestoreGeneration)return;const s=r.ok?r.body:null,a=Array.isArray(s?.runs)?s.runs:null;if(a!==null&&this.set({evalRuns:a}),s?.activeRunId!==void 0&&a!==null){const d=s.activeRunId,h=a.find(m=>m.runId===d)??await this.fetchEvalRunIfCurrent(t,d);if(t!==this.evalRestoreGeneration)return;if(h!==void 0){this.state.evalRun?.runId===h.runId?(this.set({evalRun:h}),h.status==="running"&&this.evalPollTimer===null&&this.startEvalRunPoll(h.runId)):this.applyRestoredEvalRun(h);return}}const l=this.state.evalRun;if(l!==null){l.status==="running"&&this.evalPollTimer===null&&this.startEvalRunPoll(l.runId);return}const c=nW(this.state.meta.basePath);if(c!==null){const d=await this.api.evalsRunStatus(c);if(t!==this.evalRestoreGeneration||this.state.evalRun!==null)return;if(d.ok&&d.body){this.applyRestoredEvalRun(d.body);return}}if(a===null)return;const f=a[0];f!==void 0&&this.state.evalRun===null&&this.applyRestoredEvalRun(f)}async fetchEvalRunIfCurrent(t,n){const r=await this.api.evalsRunStatus(n);if(t===this.evalRestoreGeneration)return r.ok&&r.body?r.body:void 0}applyRestoredEvalRun(t){this.set({evalRun:t}),this.mergeEvalRunIntoList(t),ep(this.state.meta.basePath,t.runId),iW(t.runId),t.status==="running"&&this.startEvalRunPoll(t.runId)}mergeEvalRunIntoList(t){const n=this.state.evalRuns.filter(r=>r.runId!==t.runId);this.set({evalRuns:[t,...n]})}async startEvalRun(t){if(this.historyOnly||!this.hasCapability(wt.evalRun))return;if(this.state.evalRun?.status==="running"){this.toast("An eval run is already in progress");return}this.evalRestoreGeneration+=1;const n=await this.api.evalsStartRun(t===void 0||t.length===0?{}:{filterIds:t});if(!n.ok||!n.body){this.toast(`Eval start failed: ${jn(n.body,160)}`);return}this.set({evalRun:n.body}),ep(this.state.meta.basePath,n.body.runId),(this.state.view==="overview"||this.state.view==="chat")&&(this.set({overviewSection:"runs",overviewRunId:n.body.runId,chatPanelOpen:!0}),this.mergeEvalRunIntoList(n.body)),this.setView("evals"),this.toast(`Eval ID: ${n.body.runId}`),this.startEvalRunPoll(n.body.runId),this.refreshEvalRuns()}async cancelEvalRun(t){if(this.historyOnly||!this.hasCapability(wt.evalCancel))return;const n=t??this.state.evalRun?.runId;if(n===void 0||n===""){this.toast("No eval run to cancel");return}const r=await this.api.evalsCancelRun(n);if(!r.ok||!r.body){this.toast(`Eval cancel failed: ${jn(r.body,160)}`);return}this.set({evalRun:r.body}),ep(this.state.meta.basePath,r.body.runId),this.toast(`Cancelled Eval ID ${r.body.runId}`),r.body.status==="running"?this.startEvalRunPoll(r.body.runId):this.stopEvalRunPoll(),this.refreshEvalRuns()}stopEvalRunPoll(){this.evalPollTimer!==null&&(clearInterval(this.evalPollTimer),this.evalPollTimer=null)}startEvalRunPoll(t){this.stopEvalRunPoll();const n=++this.evalPollGeneration;let r=!1,s=!1;const a=async()=>{if(!(n!==this.evalPollGeneration||r)){r=!0;try{const l=await this.api.evalsRunStatus(t);if(n!==this.evalPollGeneration||!l.ok||!l.body)return;if(this.set({evalRun:l.body}),ep(this.state.meta.basePath,l.body.runId),this.mergeEvalRunIntoList(l.body),l.body.status!=="running"){if(this.stopEvalRunPoll(),this.refreshSessions(),this.refreshEvalRuns(),s||n!==this.evalPollGeneration)return;s=!0;const{passed:c,failed:f,total:d}=l.body.summary;this.toast(l.body.status==="failed"?`Eval run failed: ${l.body.error??"unknown error"}`:`Evals done — ${c} passed, ${f} failed, ${d} total`)}}finally{r=!1}}};a(),this.evalPollTimer=setInterval(()=>{a()},1500)}async attachEvalCaseSessionForView(t){const r=(this.state.evalRun??this.state.evalRuns[0]??null)?.cases.find(a=>a.sessionId!==void 0)?.sessionId;if(r===void 0||(await this.refreshSessions(),this.state.current!==null||this.state.view!==t))return;const s=this.state.sessions.find(a=>a.sessionId===r);s!==void 0?this.selectSession({...s,running:s.running===!0}):this.selectSession({sessionId:r,channelId:"http",mode:"conversation",title:"Eval session",turnCount:0,running:!1}),this.set({evalNavReturn:!0}),this.setView(t)}async openEvalCaseSession(t){await this.refreshSessions();const n=this.state.sessions.find(r=>r.sessionId===t);n!==void 0?this.selectSession({...n,running:n.running===!0}):this.selectSession({sessionId:t,channelId:"http",mode:"conversation",title:"Eval session",turnCount:0,running:!1}),this.set({evalNavReturn:!0}),this.setView("chat")}async openEvalCaseTrace(t){await this.refreshSessions();const n=this.state.sessions.find(r=>r.sessionId===t);n!==void 0?this.selectSession({...n,running:n.running===!0}):this.selectSession({sessionId:t,channelId:"http",mode:"conversation",title:"Eval session",turnCount:0,running:!1}),this.set({evalNavReturn:!0}),this.setView("trace")}async openSessionFromChannelResponse(t,n){const r=typeof n?.sessionId=="string"&&n.sessionId.trim()!==""?n.sessionId:null;if(r===null)return!1;await this.refreshSessions();const s=this.state.sessions.find(c=>c.sessionId===r),a=typeof n.status=="string"?n.status:void 0,l=a===void 0||a==="started"||a==="running";if(s!==void 0)this.selectSession({...s,running:l?!0:!!s.running});else{const c=typeof n.continuationToken=="string"?n.continuationToken:typeof n.key=="string"?n.key:void 0,f=typeof n.pr=="string"?n.pr:typeof n.title=="string"?n.title:"Session";this.selectSession({sessionId:r,channelId:t,mode:typeof n.mode=="string"?n.mode:"task",title:f,turnCount:0,running:l,continuationToken:c,externalUrl:typeof n.agentUrl=="string"?n.agentUrl:null})}return this.setView("chat"),this.setDrawerOpen(!1),!0}async openSessionById(t){const n=t.trim();if(n==="")return;await this.refreshSessions();const r=this.state.sessions.find(s=>s.sessionId===n);r!==void 0?this.selectSession(r):this.selectSession({sessionId:n,channelId:"http",mode:"conversation",title:"Session",turnCount:0,running:!1}),this.setView("chat")}async invokeSlashCommand(t){if(!this.hasCapability(wt.channelInvoke))return!1;const n=t.trim(),r=this.slashCommands();if(/^\/help(?:\s|$)/i.test(n)){this.resetTranscript(),this.pushUser(n);const l=this.ensureAssistant();return this.update(l,{text:sG(r),streaming:!1}),this.assistantId=null,this.set({localTrace:!1,current:null,barTitle:"Help",barId:"",externalUrl:null,running:!1,turnStartedAt:null}),this.syncSessionUrl(null),this.commitTranscript(),!0}const s=oG(n,r);if(!s.ok)return this.toast(s.error),!1;this.setRunning(!0),this.resetTranscript(),this.pushUser(n);const a=this.ensureAssistant();this.update(a,{text:`Running \`${s.command.name}\` (${s.command.method} ${s.command.url})…`}),this.set({localTrace:!1,current:null,barTitle:s.command.name,barId:s.command.method,externalUrl:null,transcript:this.items.slice()}),this.syncSessionUrl(null);try{const l=await this.api.channelRequest(s.command.method,s.command.url,{body:s.body,query:s.query});return l.ok?await this.openSessionFromChannelResponse(s.command.channelId,l.body)?(this.assistantId=null,!0):(this.setRunning(!1),this.update(a,{text:"```json\n"+tW(l.body)+"\n```",streaming:!1}),this.assistantId=null,this.commitTranscript(),!0):(this.setRunning(!1),this.update(a,{text:`Command failed (${l.status}): ${jn(l.body,400)}`,streaming:!1}),this.assistantId=null,this.commitTranscript(),!0)}catch(l){return this.setRunning(!1),this.update(a,{text:`Command failed: ${l instanceof Error?l.message:String(l)}`,streaming:!1}),this.assistantId=null,this.commitTranscript(),!0}}async loadEngineMeta(){let t;try{t=await this.api.meta()}catch{return!1}return!t.ok||!t.body?!1:(this.set({meta:{name:t.body.name??"agent",dev:!!t.body.dev,basePath:this.api.url(""),indexPath:t.body.indexPath,version:t.body.version,readonly:t.body.readonly===!0}}),console.info(`[playground] engine version ${t.body.version??"pre-0.1.14"}`),!0)}refreshEngineStatus(){this.api.health().then(t=>{this.set({health:t.ok?"ok":"bad"})}),this.api.info().then(t=>{t.ok&&t.body?this.set({info:t.body}):t.status===401&&(this.noteAliasAuthLoss(t.status)||this.toast("Unauthorized: set a bearer token (⋯ menu) that matches the channel auth."))})}async pollEngineMetaUntilReady(){const t=Date.now()+18e4;let n=1e3;for(;Date.now()<t;){if(await new Promise(r=>setTimeout(r,n)),n=Math.min(n*2,1e4),this.aliasAuthPending)return;if(await this.loadEngineMeta()){this.refreshEngineStatus(),this.refreshEvalCases(),this.restoreEvalRun();const r=this.pendingSessionDeepLink;if(this.pendingSessionDeepLink=null,r!==null){await this.refreshSessions(),this.selectDeepLinkedSession(r);try{new URL(window.location.href).searchParams.get("view")==="overview"&&this.setView("overview")}catch{}}return}}this.pendingSessionDeepLink=null}selectDeepLinkedSession(t){const n=this.state.sessions.find(r=>r.sessionId===t);if(n){this.selectSession(n);return}this.selectSessionOutsideList(t)}async selectSessionOutsideList(t){const n=this.api.sessionById;if(n!==void 0){const r=await n(t);if(r.ok&&r.body?.session){this.selectSession(r.body.session);return}}this.state.sessions.length>0&&this.toast(`Session not found: ${t}`)}get aliasAuthPending(){return this.state.aliasHosted&&this.state.aliasToken.trim()===""}async boot(){if(this.booted||this.aliasAuthPending)return;this.booted=!0;let t=null,n=null,r=null;try{const a=B7(window.location.href);t=a.sessionId,n=a.view,r=a.section}catch{}const s=await this.loadEngineMeta();s?this.refreshEngineStatus():(this.pendingSessionDeepLink=t,this.set({health:"bad"}),this.pollEngineMetaUntilReady()),n?this.setView(n):this.setView("overview"),r!==null&&this.set({overviewSection:r}),await this.refreshSessions(),this.refreshEvalCases(),this.refreshEvalRuns(),this.restoreEvalRun(),t&&s&&(this.selectDeepLinkedSession(t),n==="overview"&&this.setView("overview")),this.historyOnly||setInterval(()=>{this.refreshSessions()},this.state.meta.dev?2e3:5e3)}modelLabel(){return QV(this.state.info?.model)}}function eW(e){return e instanceof Error?e.message:String(e)}function tW(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function oM(e){return`agent-serve:evalRunId:${e||"/"}`}function nW(e){try{const t=sessionStorage.getItem(oM(e));return t!==null&&t!==""?t:null}catch{return null}}function rW(){try{const e=new URL(window.location.href).searchParams.get("evalRunId");if(e===null)return null;const t=e.trim();return t===""?null:t}catch{return null}}function iW(e){try{const t=new URL(window.location.href);if(t.searchParams.get("evalRunId")===e)return;t.searchParams.set("evalRunId",e),history.replaceState(null,"",t.toString())}catch{}}function ep(e,t){try{sessionStorage.setItem(oM(e),t)}catch{}}function sW(e){const t=x7(()=>QG()),n=e(t.getState);return t.setState({capabilities:iM(n.capabilities)}),new JG(n,t)}const Qe=sW(e=>WG(sM(),e));Qe.getState().aliasHosted&&R7(e=>Qe.acceptAliasTokenHandoff(e));let hC=Qe.getState().overviewSection;Qe.subscribe(e=>{e.overviewSection!==hC&&(hC=e.overviewSection,NI(e.overviewSection))});if(Qe.getState().embedded){let e=Qe.getState().view,t=Qe.getState().current?.sessionId??null,n=Qe.getState().overviewSection,r=t!==null;Qe.subscribe(s=>{const a=s.current?.sessionId??null;a!==null&&(r=!0),!(s.view===e&&a===t&&s.overviewSection===n)&&(e=s.view,t=a,n=s.overviewSection,H7(s.view,r?a:void 0,void 0,s.overviewSection))})}function Ue(e){return S7(Qe,e)}function oW(){const[e,t]=v.useState(""),[n,r]=v.useState(null),[s,a]=v.useState(!1);async function l(c){c.preventDefault(),a(!0),r(null);const f=await Qe.signInWithAliasToken(e);a(!1),f.ok||r(f.error)}return g.jsx("div",{className:"pg-alias-signin",children:g.jsxs("div",{className:"pg-alias-signin-box",children:[g.jsx("h1",{children:"agent-serve playground"}),g.jsx("p",{children:"This deployment requires its alias token."}),n!==null?g.jsx("div",{className:"pg-alias-signin-error",children:n}):null,g.jsxs("form",{onSubmit:c=>{l(c)},children:[g.jsx(rf,{type:"password",size:"md","aria-label":"Alias token",placeholder:"adt_…",autoComplete:"off",autoFocus:!0,value:e,onChange:c=>t(c.target.value),disabled:s}),g.jsx(yn,{type:"submit",variant:"primary",disabled:s||e.trim()==="",children:s?"Checking…":"Open playground"})]}),g.jsxs("div",{className:"pg-alias-signin-hint",children:["The alias token was shown once when the agent was deployed. Lost it?",g.jsx("code",{children:"bdk rotate-token <slug>"})," mints a replacement. The token stays in this tab only — refresh to sign in again."]})]})})}function aW(){return g.jsx("div",{className:"pg-alias-signin",children:g.jsxs("div",{className:"pg-alias-signin-box",children:[g.jsx("h1",{children:"Playground disconnected"}),g.jsx("p",{children:"This playground connects through your Cursor dashboard. Use Reconnect on the dashboard, or reload the page."})]})})}const lW=["noopener","noreferrer"];function f0(e){return e.trim()===""}function aM(e){const t=e.trim();if(f0(t)||t.startsWith("#"))return!1;try{const n=new URL(t,"https://playground.invalid").protocol.toLowerCase();return n!=="javascript:"&&n!=="data:"&&n!=="vbscript:"&&n!=="file:"}catch{return!0}}function uW(e){if(e.hasAttribute("download"))return;const t=e.getAttribute("href");if(t===null||!aM(t))return;e.target="_blank";const n=new Set(e.rel.split(/\s+/).map(r=>r.toLowerCase()).filter(r=>r!==""));for(const r of lW)n.add(r);e.rel=[...n].join(" ")}function mC(e){const t=e.target;if(!(t instanceof Element))return;const n=t.closest("a");if(!(n instanceof HTMLAnchorElement))return;uW(n);const r=n.getAttribute("href");r!==null&&f0(r)&&!n.hasAttribute("download")&&e.preventDefault()}function cW(e=document){return e.addEventListener("click",mC,!0),()=>e.removeEventListener("click",mC,!0)}function pa({href:e,onClick:t,...n}){const s=e!==void 0&&f0(e)?a=>{a.preventDefault(),t?.(a)}:t;return e===void 0||!aM(e)?g.jsx("a",{href:e,...n,onClick:s}):g.jsx("a",{href:e,...n,onClick:s,target:"_blank",rel:"noopener noreferrer"})}const lM=512*1024,fW=64*1024*1024,dW=240;async function uM(e){if(!Qe.hasCapability(wt.artifactContent))return{phase:"absent"};try{const t=await Qe.api.artifactContent(e,lM);if(!t.ok)return t.status===404?{phase:"absent"}:{phase:"error",message:`HTTP ${t.status}`};let n=null;if(_7(t.contentType)){const r=new TextDecoder("utf-8",{fatal:!1}).decode(t.bytes);n=A7(r)?null:r}return{phase:"loaded",text:n,isDiff:n!==null&&N7(t.contentType,n),contentType:t.contentType,size:t.bytes.length,truncated:t.truncated}}catch(t){return{phase:"error",message:t instanceof Error?t.message:String(t)}}}async function cM(e,t){if(Qe.hasCapability(wt.artifactContent))try{const n=await Qe.api.artifactContent(e,fW);if(!n.ok)return;const r=new Blob([n.bytes.buffer],{type:n.contentType??"application/octet-stream"}),s=URL.createObjectURL(r),a=document.createElement("a");a.href=s,a.download=hW(t,e,n.contentType),a.click(),URL.revokeObjectURL(s)}catch{}}const pW={"text/x-diff":".diff","text/x-patch":".patch","application/json":".json","text/markdown":".md","text/plain":".txt","text/html":".html","text/csv":".csv"};function hW(e,t,n){const r=(e??t).trim().replace(/[^\w.-]+/g,"-").replace(/^-+|-+$/g,"").slice(0,80),s=n?.split(";")[0]?.trim().toLowerCase()??"",a=pW[s]??"",l=r===""?t:r;return l.includes(".")?l:`${l}${a}`}function mW({text:e,isDiff:t}){const n=v.useMemo(()=>t?e.split(`
23
+ `):null,[e,t]);return n===null?g.jsx("pre",{className:"pg-artifact-file-text",children:e}):g.jsx("pre",{className:"pg-artifact-file-text pg-artifact-diff",children:n.map((r,s)=>g.jsx("span",{className:`diff-line diff-${O7(r)}`,children:r},s))})}function fM({artifactId:e,title:t,state:n}){if(n.phase==="idle"||n.phase==="loading")return g.jsx("div",{className:"pg-artifact-file-note",children:"Loading contents…"});if(n.phase==="absent")return null;if(n.phase==="error")return g.jsxs("div",{className:"pg-artifact-file-note",children:["Failed to load contents: ",n.message]});const r=ev(n.size),s=[n.contentType?.split(";")[0],r].filter(a=>a!==void 0&&a!=="").join(" · ");return g.jsxs("div",{className:"pg-artifact-file",children:[g.jsxs("div",{className:"pg-artifact-file-head",children:[g.jsx(qt,{name:"file",size:"sm",color:"tertiary"}),g.jsx("span",{className:"pg-artifact-file-meta",children:s||"file payload"}),g.jsx(yn,{variant:"ghost",size:"sm",onClick:()=>{cM(e,t)},children:"Download"})]}),n.text!==null?g.jsx(mW,{text:n.text,isDiff:n.isDiff}):g.jsx("div",{className:"pg-artifact-file-note",children:"Binary payload — use Download to save it."}),n.truncated?g.jsxs("div",{className:"pg-artifact-file-note",children:["Preview truncated to ",ev(lM)," — Download has the full payload."]}):null]})}function gW({data:e}){const[t,n]=v.useState(!1),r=v.useMemo(()=>Eo(e),[e]);if(r===""||r==="null")return null;const s=r.length>dW;return g.jsxs("div",{className:"pg-artifact-data",children:[g.jsx("pre",{className:s&&!t?"pg-artifact-json clamped":"pg-artifact-json",children:r}),s?g.jsx("button",{type:"button",className:"link-btn",onClick:()=>n(a=>!a),children:t?"Collapse":"Show all"}):null]})}const bW=v.memo(function({artifactKind:t,title:n,url:r,artifactId:s,data:a}){const[l,c]=v.useState(!1),[f,d]=v.useState({phase:"idle"}),h=Ue(b=>b.capabilities.artifacts==="enabled"),m=b=>{c(b),!(!b||!h||s===void 0||f.phase!=="idle")&&(d({phase:"loading"}),uM(s).then(d))};return g.jsx("div",{className:"pg-artifact-card",children:g.jsx(vi,{action:"Artifact",details:g.jsxs("span",{className:"pg-artifact-head",children:[g.jsx(vo,{variant:"accent",size:"sm",pill:!0,children:t}),n!==void 0?g.jsx("span",{className:"pg-artifact-head-title",children:n}):null]}),leadingIcon:g.jsx(qt,{name:"bookmark",size:"sm",color:"secondary"}),open:l,onOpenChange:m,tone:"tertiary",children:g.jsxs("div",{className:"pg-artifact-body",children:[r!==void 0?g.jsx(pa,{className:"pg-artifact-link",href:r,children:r}):null,a!==void 0?g.jsx(gW,{data:a}):null,s!==void 0?h?g.jsx(fM,{artifactId:s,title:n,state:f}):g.jsx("div",{className:"pg-artifact-file-note",children:"File contents are not available in this playground"}):null]})})})}),gC=280,yW=8,ty=1e3;function vW({record:e}){const[t,n]=v.useState(!1),r=v.useMemo(()=>{const a=RI(e.data);return a!==null?{url:a,json:"",short:""}:{url:null,json:Eo(e.data),short:jn(e.data,gC)}},[e.data]);if(r.url!==null)return g.jsx(pa,{className:"artifact-link",href:r.url,children:r.url});if(r.json==="")return null;const s=r.json.length>gC||r.json.split(`
24
+ `).length>yW;return g.jsxs("div",{className:"artifact-data",children:[g.jsx("pre",{className:"artifact-json",children:s&&!t?r.short:r.json}),s?g.jsx("button",{type:"button",className:"link-btn",onClick:()=>n(!t),children:t?"Collapse":"Expand"}):null]})}function xW({record:e,contentAvailable:t}){const[n,r]=v.useState({phase:"idle"}),s=e.content;if(s===void 0)return null;if(!t)return g.jsxs("div",{className:"pg-artifact-file-head",children:[g.jsx(qt,{name:"file",size:"sm",color:"tertiary"}),g.jsx("span",{className:"pg-artifact-file-meta",children:"File contents are not available in this playground"})]});if(n.phase==="idle"){const a=[s.contentType,ev(s.size)].filter(l=>l!==void 0&&l!=="").join(" · ");return g.jsxs("div",{className:"pg-artifact-file-head",children:[g.jsx(qt,{name:"file",size:"sm",color:"tertiary"}),g.jsx("span",{className:"pg-artifact-file-meta",children:a||"file payload"}),g.jsx(yn,{variant:"ghost",size:"sm",onClick:()=>{r({phase:"loading"}),uM(e.id).then(r)},children:"View"}),g.jsx(yn,{variant:"ghost",size:"sm",onClick:()=>{cM(e.id,e.title)},children:"Download"})]})}return g.jsx(fM,{artifactId:e.id,title:e.title,state:n})}const bC=v.memo(function({record:t,contentAvailable:n}){return g.jsxs("div",{className:"artifact-row",children:[g.jsxs("div",{className:"artifact-row-head",children:[g.jsx("span",{className:"artifact-title",children:I7(t)}),g.jsx(vo,{variant:"accent",size:"sm",pill:!0,children:t.kind}),g.jsx(vo,{variant:t.source==="model"?"success":"neutral",size:"sm",pill:!0,children:t.source}),g.jsx("span",{className:"artifact-updated",title:`updated ${t.updatedAt}`,children:mv(t.updatedAt)??t.updatedAt})]}),g.jsx(vW,{record:t}),g.jsx(xW,{record:t,contentAvailable:n})]})});function kW({sessionId:e,count:t,title:n}){const r=`${t} artifact${t===1?"":"s"}`;return e===null?g.jsxs("div",{className:"artifact-group-head",children:[g.jsx("span",{className:"artifact-group-id",children:"No session"}),g.jsx("span",{className:"artifact-group-n",children:r})]}):g.jsxs("button",{type:"button",className:"artifact-group-head",onClick:()=>{Qe.openSessionById(e)},title:"Open this session's replay",children:[g.jsx("span",{className:"artifact-group-id",children:n||e}),n?g.jsx("span",{className:"artifact-group-sub",children:e}):null,g.jsxs("span",{className:"artifact-group-n",children:[r," →"]})]})}function dM(){const e=Ue($=>$.current),t=Ue($=>$.sessions),n=Ue($=>$.capabilities.artifacts),r=n!=="disabled",s=n==="enabled",[a,l]=v.useState(null),[c,f]=v.useState(null),[d,h]=v.useState(null),[m,b]=v.useState("all"),[y,k]=v.useState(0);e===null&&m==="session"&&b("all");const S=m==="session"&&e!==null?e.sessionId:null,C=a!==null&&a.scope===S?a.rows:null;v.useEffect(()=>{if(!r)return;let $=!1,O=!1;f(null);const Y=async()=>{if(!O){O=!0;try{const B=await Qe.api.artifacts({sessionId:S??void 0,limit:ty});if($)return;if(!B.ok||B.body===null){f(`Failed to load artifacts (${B.status})`);return}f(null),l({scope:S,rows:B.body.artifacts??[]})}catch(B){$||f(B instanceof Error?B.message:String(B))}finally{O=!1}}};Y();const U=setInterval(()=>{Y()},4e3);return()=>{$=!0,clearInterval(U)}},[r,S,y]);const E=()=>k($=>$+1),T=S!==null;if(!r)return g.jsx("div",{className:"pg-artifacts is-empty",children:g.jsx(Ri,{body:"Artifacts are not available in this playground."})});if(C===null)return g.jsx("div",{className:"pg-artifacts is-empty",children:c!==null?g.jsx(Ri,{body:c,cta:{label:"Retry",onClick:E}}):g.jsx(Ri,{body:"Loading artifacts…"})});const R=AI(C);if(R.length===0)return g.jsx("div",{className:"pg-artifacts is-empty",children:g.jsx(Ri,{body:T?"No artifacts tagged for this session.":"No artifacts tagged yet."})});const _=M7(R),D=d!==null&&_.includes(d)?d:null,A=D7(R,D),I=T?[]:L7(A),P=new Map(t.map($=>[$.sessionId,$.title]));return g.jsxs("div",{className:"pg-artifacts",children:[g.jsxs("div",{className:"pg-artifacts-toolbar",children:[g.jsx("span",{className:"pg-artifacts-toolbar-title",children:"Artifacts"}),g.jsxs("span",{className:"pg-artifacts-toolbar-meta",children:[A.length," of ",R.length,R.length>=ty?` (newest ${ty})`:""]}),c!==null?g.jsx("span",{className:"pg-artifacts-toolbar-error",children:c}):null,g.jsx("span",{className:"grow"}),e!==null?g.jsxs(vc,{size:"sm",variant:"compact",value:m,onValueChange:$=>b($==="session"?"session":"all"),"aria-label":"Artifact scope",children:[g.jsx(vc.Item,{value:"all",children:"All sessions"}),g.jsx(vc.Item,{value:"session",children:"This session"})]}):null,g.jsx(yn,{variant:"secondary",size:"sm",onClick:E,children:"Refresh"})]}),_.length>1?g.jsxs("div",{className:"artifact-kinds",role:"group","aria-label":"Filter by kind",children:[g.jsx("button",{type:"button",className:`artifact-kind-chip${D===null?" active":""}`,onClick:()=>h(null),children:"All"}),_.map($=>g.jsx("button",{type:"button",className:`artifact-kind-chip${D===$?" active":""}`,onClick:()=>h(D===$?null:$),children:$},$))]}):null,A.length===0?g.jsx(Ri,{body:"No artifacts match this kind filter."}):T?g.jsx("div",{className:"artifact-list",children:A.map($=>g.jsx(bC,{record:$,contentAvailable:s},$.id))}):g.jsx("div",{className:"artifact-group-list",children:I.map($=>g.jsxs("section",{className:"artifact-group",children:[g.jsx(kW,{sessionId:$.sessionId,count:$.artifacts.length,title:$.sessionId===null?void 0:P.get($.sessionId)}),g.jsx("div",{className:"artifact-list",children:$.artifacts.map(O=>g.jsx(bC,{record:O,contentAvailable:s},O.id))})]},$.sessionId??"(none)"))})]})}function SW(e){const{localTrace:t,historyOnly:n,canStart:r,canFollowUp:s,current:a,running:l,slashNames:c}=e;if(n)return{disabled:!0,hint:"This agent is stopped. Open a session from Runs to inspect its chat and trace."};if(t)return{disabled:!0,hint:"Local trace (view only). Click New or pick a live session to chat."};if(a===null)return r?{disabled:!1,hint:c.length>0?`Slash commands: ${c.slice(0,4).join(", ")}${c.length>4?", …":""}, /help.`:""}:{disabled:!0,hint:"Starting new chats is not available in this playground."};if(!s)return{disabled:!0,hint:"This session is read-only in this playground."};if(a.followUpAllowed===!1||a.mode==="task"||a.channelId!=="http")return a.followUpAllowed===!1&&a.channelId==="http"?{disabled:!0,hint:"Customer sessions are read-only in this playground."}:a.mode==="task"?{disabled:!0,hint:"Task sessions (schedules) are fire-and-forget; watch only."}:a.channelId==="slack"?{disabled:!0,hint:`Slack thread — watch here, reply in Slack${a.externalUrl?" (Open in Slack above).":"."}`}:{disabled:!0,hint:`Sessions owned by the “${a.channelId}” channel take follow-ups through that channel; watch only here.`};if(!a.continuationToken&&a.followUpAllowed!==!0)return{disabled:!0,hint:"This session has no continuation token; watch only."};const d=c.length>0?` Channel commands (${c.slice(0,3).join(", ")}${c.length>3?", …":""}) also work from here.`:"";return{disabled:!1,hint:l?"Turn running — Enter queues the follow-up; ⌘Enter sends now and interrupts.":`Follow-ups reuse this session’s rotating continuation token.${d}`}}function wW(){const e=Ue(t=>t.queued);return e.length===0?null:g.jsx("div",{className:"pg-queue",role:"list","aria-label":"Queued messages",children:e.map(t=>g.jsxs("div",{className:"pg-queue-item",role:"listitem",children:[g.jsx("button",{type:"button",className:"pg-queue-label",title:"Edit queued message",onClick:()=>Qe.editQueued(t.id),children:t.text}),g.jsxs("span",{className:"pg-queue-actions",children:[g.jsx(br,{icon:"arrow-up",size:"sm",variant:"ghost","aria-label":"Send now (interrupts the running turn)",onClick:()=>{Qe.sendQueuedNow(t.id)}}),g.jsx(br,{icon:"x",size:"sm",variant:"ghost","aria-label":"Remove queued message",onClick:()=>Qe.removeQueued(t.id)})]})]},t.id))})}function pM(){const[e,t]=v.useState(""),[n,r]=v.useState(0),s=v.useRef(null),a=Ue(U=>U.localTrace),l=Ue(U=>U.meta.readonly===!0),c=Ue(U=>U.current),f=Ue(U=>U.running),d=Ue(U=>U.composerDraft),h=Ue(U=>U.info),m=Ue(U=>U.capabilities.composer),b=Ue(U=>U.capabilities.stop),y=m==="enabled"&&Qe.hasCapability(wt.sessionStart),k=m==="enabled"&&Qe.hasCapability(wt.sessionFollowUp),S=b==="enabled",C=Qe.hasCapability(wt.channelInvoke);v.useEffect(()=>{d!==null&&(t(U=>U.trim()?`${U} ${d}`:d),Qe.consumeComposerDraft(),s.current?.focus())},[d]);const E=v.useMemo(()=>C?Jh(h?.channels):[],[h,C]),T=v.useMemo(()=>JI(E),[E]),R=v.useMemo(()=>{if(a||l)return null;const U=e.replace(/^\s+/,"");return!U.startsWith("/")||/\s/.test(U)?null:U},[e,a,l]),_=v.useMemo(()=>R===null?[]:iG(R,E),[R,E]),D=R!==null&&_.length>0,{disabled:A,hint:I}=SW({localTrace:a,historyOnly:l,canStart:y,canFollowUp:k,current:c,running:f,slashNames:T}),P=S&&f&&c!==null&&!a&&!l,$=async(U=e,B=!1)=>{if(!U.trim())return;t(""),r(0),await Qe.sendMessage(U,{force:B})||t(q=>q.trim()?q:U)},O=U=>{t(`${U} `),r(0)},Y=U=>{if(D){if(U.key==="ArrowDown"){U.preventDefault(),r(B=>(B+1)%_.length);return}if(U.key==="ArrowUp"){U.preventDefault(),r(B=>(B-1+_.length)%_.length);return}if(U.key==="Tab"||U.key==="Enter"&&!U.shiftKey){const B=_[n]??_[0];if(B!==void 0&&R!==B.name){U.preventDefault(),O(B.name);return}}if(U.key==="Escape"){U.preventDefault(),t(""),r(0);return}}U.key==="Enter"&&!U.shiftKey&&(U.preventDefault(),$(e,U.metaKey||U.ctrlKey))};return g.jsxs("div",{className:"pg-composer",children:[D?g.jsxs("ul",{className:"pg-slash-menu",role:"listbox","aria-label":"Slash commands",children:[_.map((U,B)=>g.jsx("li",{children:g.jsxs("button",{type:"button",role:"option","aria-selected":B===n,className:B===n?"pg-slash-item is-active":"pg-slash-item",onMouseDown:j=>{j.preventDefault(),O(U.name)},onMouseEnter:()=>r(B),children:[g.jsx("code",{className:"pg-slash-name",children:U.name}),g.jsx("span",{className:"pg-slash-method",children:U.method}),U.description?g.jsx("span",{className:"pg-slash-desc",children:U.description}):null]})},`${U.name}:${U.method}`)),g.jsxs("li",{className:"pg-slash-footer",children:[g.jsx("code",{children:"/help"})," lists all channel commands"]})]}):null,g.jsxs("div",{className:"inner",children:[g.jsx(wW,{}),g.jsxs("div",{className:A&&!P?"pg-prompt disabled":"pg-prompt",children:[g.jsx("textarea",{ref:s,className:"pg-prompt-input",rows:1,placeholder:T.length>0?`Message the agent, or ${T[0]} …`:"Message the agent...","aria-label":"Message the agent","aria-autocomplete":D?"list":void 0,"aria-expanded":D,value:e,onChange:U=>{t(U.target.value),r(0)},onKeyDown:Y,disabled:A,autoFocus:!0}),g.jsxs("div",{className:"pg-prompt-toolbar",children:[g.jsx("span",{className:"pg-prompt-hint",title:I,children:I}),P&&!e.trim()?g.jsx(br,{icon:"square",iconVariant:"filled",variant:"primary",tone:"monochrome",rounded:!0,size:"lg",className:"pg-prompt-stop","aria-label":"Stop the running turn",onClick:()=>{Qe.stopTurn()}}):g.jsx(br,{icon:"arrow-up",variant:"primary",tone:"monochrome",rounded:!0,size:"lg","aria-label":f?"Queue message (⌘Enter sends now)":"Send message",disabled:A,onClick:()=>{$()}})]})]})]})]})}function EW(e){return{filename:`${e.runId}.eval-results.json`,text:`${JSON.stringify(e,null,2)}
25
+ `}}function TW(e,t,n="application/json"){const r=new Blob([t],{type:n}),s=URL.createObjectURL(r),a=document.createElement("a");a.href=s,a.download=e,a.target="_self",document.body.appendChild(a),a.click(),a.remove(),URL.revokeObjectURL(s)}function hi(e){const t=e.at??null,n=e.ms??null;let r=e.startAt??null;return r===null&&t!==null&&n!==null&&n>0&&(r=t-n),r===null&&(r=t),{...e,startAt:r,at:t,ms:n}}function hM(e){const t=[];let n=null,r={};const s=new Map;let a=null,l="";const c=new Map;let f=null,d=1,h=0,m=0;function b(C){return n&&n.endedAt===null||(n={turnId:C?.turnId||`turn_${t.length+1}`,startedAt:C?.at?Sl(C.at):null,endedAt:null,usage:null,rows:[],provisional:!0},t.push(n)),n}function y(C){b({turnId:C.turnId,at:null}).rows.push(C),C.ms&&C.ms>d&&(d=C.ms)}function k(C){if(a===null)return;const E=b(),T=C!==null&&a!==null?Math.max(0,C-a):null,R=l.trim()||void 0;E.rows.push(hi({kind:"think",label:R?Jr(R,80):"thinking",body:R,ms:T,at:C,startAt:a})),T&&T>d&&(d=T),a=null,l=""}for(const C of e){const E=C.data||{},T=Sl(C.at);switch(C.type){case"turn.started":n&&n.provisional&&n.endedAt===null?(n.turnId=C.turnId||n.turnId,n.startedAt=T,n.provisional=!1):(n={turnId:C.turnId||`turn_${t.length+1}`,startedAt:T,endedAt:null,usage:null,rows:[],provisional:!1},t.push(n)),a=null,l="",f=null;break;case"message.received":{const R=XI(E);y(hi({kind:"user",label:R===null?"Prompt hidden":Jr(R,140),body:R??void 0,at:T,startAt:T,ms:0,turnId:C.turnId}));break}case"reasoning.appended":if(typeof E.parentCallId=="string"&&E.parentCallId!==""){const R=c.get(E.parentCallId)??{start:T,text:""};R.start===null&&(R.start=T),typeof E.text=="string"&&(R.text=E.text),c.set(E.parentCallId,R);break}a===null&&(a=T),typeof E.text=="string"&&(l=E.text);break;case"reasoning.completed":if(typeof E.parentCallId=="string"&&E.parentCallId!==""){const R=E.parentCallId,_=c.get(R);c.delete(R);const D=_?.text.trim()||void 0;if(D!==void 0){const A=_?.start??T,I=A!==null&&T!==null?Math.max(0,T-A):null;y(hi({kind:"think",label:Jr(D,80),body:D,ms:I,at:T,startAt:A,turnId:C.turnId,depth:1,parentCallId:R}))}break}k(T);break;case"message.appended":if(typeof E.parentCallId=="string"&&E.parentCallId!=="")break;f===null&&(f=T);break;case"message.completed":{if(typeof E.parentCallId=="string"&&E.parentCallId!==""){const D=E.parentCallId;y(hi({kind:"agent",label:Jr(E.text,160)||"(empty reply)",body:typeof E.text=="string"?E.text:void 0,at:T,startAt:T,ms:0,turnId:C.turnId,depth:1,parentCallId:D}));break}const R=f??T,_=R!==null&&T!==null?Math.max(0,T-R):null;y(hi({kind:"agent",label:Jr(E.text,160)||"(empty reply)",body:typeof E.text=="string"?E.text:void 0,at:T,startAt:R,ms:_,turnId:C.turnId})),_&&_>d&&(d=_),f=null;break}case"actions.requested":for(const R of E.calls||[]){const _=typeof R.parentCallId=="string"&&R.parentCallId!==""?R.parentCallId:typeof E.parentCallId=="string"&&E.parentCallId!==""?E.parentCallId:void 0;if(_===void 0&&R.toolName==="task")continue;const D=_===void 0?R.callId:`${_}:${R.callId}`;r[D]={name:R.toolName,args:R.args,start:T,turnId:C.turnId,parentCallId:_}}break;case"action.result":{const R=E.callId;if(R==null)break;const _=typeof E.parentCallId=="string"&&E.parentCallId!==""?E.parentCallId:void 0;if(_===void 0&&E.toolName==="task"){delete r[R];break}const D=_===void 0?R:`${_}:${R}`,A=r[D];delete r[D];const I=A&&A.start!==null&&T!==null?T-A.start:null;h+=1,E.isError&&(m+=1);{const P=E.toolName||A?.name||"tool",$=A?.args;y(hi({kind:"tool",label:P+($?` ${Jr(jn($,60),60)}`:""),toolName:P,callId:typeof R=="string"?R:String(R),toolArgs:$,toolOutput:E.output,body:typeof E.output=="string"?E.output:E.output!=null?jn(E.output,4e3):void 0,ms:I,error:!!E.isError,at:T,startAt:A?.start??null,turnId:C.turnId,depth:_===void 0?0:1,parentCallId:_}))}I&&I>d&&(d=I);break}case"subagent.called":{const R=`task:${E.name||"subagent"}`,_=typeof E.callId=="string"?E.callId:String(E.callId);r[`sub:${_}`]={name:R,args:E.description,start:T,turnId:C.turnId};const D=b(C);D.rows.push(hi({kind:"tool",label:R,toolName:R,callId:_,toolArgs:E.description,ms:null,at:T,startAt:T,turnId:C.turnId,depth:0})),s.set(_,{turn:D,index:D.rows.length-1});break}case"subagent.completed":{const R=typeof E.callId=="string"?E.callId:String(E.callId),_=`sub:${R}`,D=r[_];delete r[_];const A=D&&D.start!==null&&T!==null?T-D.start:null;h+=1;const I=s.get(R);s.delete(R);const P=I!==void 0?I.turn.rows[I.index]:void 0;P!==void 0&&P.kind==="tool"?(P.ms=A,P.at=T,A&&A>d&&(d=A)):y(hi({kind:"tool",label:D?.name||"subagent",toolName:D?.name||"subagent",callId:R,toolArgs:D?.args,ms:A,at:T,startAt:D?.start??null,turnId:C.turnId}));break}case"artifact.tagged":{const R=_I(E);y(hi({kind:"artifact",label:Jr(R.title===void 0?R.kind:`${R.kind} · ${R.title}`,120),body:E.data!=null?jn(E.data,4e3):void 0,url:R.url,at:T,startAt:T,ms:0,turnId:C.turnId}));break}case"turn.completed":case"turn.failed":case"session.waiting":{if(C.type==="session.waiting"&&(n===null||n.endedAt!==null))break;const R=b(C);if((C.type==="turn.completed"||C.type==="turn.failed")&&(R.endedAt=T,R.usage=E.usage||null,R.cost=E.cost||null,R.failed=C.type==="turn.failed",R.error=E.message,R.startedAt!==null&&R.endedAt!==null)){const _=R.endedAt-R.startedAt;_>d&&(d=_),R.wallMs=_}if(k(T),f!==null&&T!==null){const _=Math.max(0,T-f);R.rows.push(hi({kind:"agent",label:"(streaming…)",ms:_,at:T,startAt:f})),f=null}for(const _ of Object.keys(r)){const D=r[_],A=D.start!==null&&T!==null?T-D.start:null;R.rows.push(hi({kind:"tool",label:`${D.name||"tool"} (no result)`,ms:A,error:!0,at:T,startAt:D.start,turnId:D.turnId})),A&&A>d&&(d=A)}r={},(C.type==="turn.completed"||C.type==="turn.failed")&&(n=null);break}}}for(const C of Object.keys(r)){const E=r[C];y(hi({kind:"tool",label:`${E.name||"tool"} (running…)`,ms:null,at:E.start,startAt:E.start,turnId:E.turnId}))}let S=null;for(const C of t){const E=C.cost?.totalUsd;typeof E=="number"&&Number.isFinite(E)&&(S=(S??0)+E)}return{turns:t,maxWallMs:d,totalTools:h,failedTools:m,eventCount:e.length,totalCostUsd:S}}function CW(e,t=6){if(!Number.isFinite(e)||e<=0)return[0];const n=e/Math.max(2,t-1),r=10**Math.floor(Math.log10(Math.max(n,1))),s=[1,2,2.5,5,10].map(c=>c*r),a=s.find(c=>n/c<=1.5)??s[s.length-1],l=[0];for(let c=a;c<e-a*.25&&(l.push(c),!(l.length>=t-1));c+=a);return l[l.length-1]!==e&&l.push(e),l}function RW({case:e}){const t=Object.entries(e.metrics??{});return t.length===0?null:g.jsx("div",{className:"eval-metrics","aria-label":"Eval metrics",children:t.map(([n,r])=>g.jsxs("span",{className:"eval-metric",title:n,children:[g.jsx("span",{className:"eval-metric-name",children:n}),g.jsx("span",{className:"eval-metric-value",children:String(r)})]},n))})}const _W={},AW={};function NW(e){return/\/factory\/([^/]+)\/agent\/playground\//.exec(e)?.[1]}const mM=new Map;for(const[e,t]of Object.entries(AW)){if(t?.default==null)continue;const n=typeof t.agentName=="string"&&t.agentName.trim()!==""?t.agentName.trim():void 0,r=NW(e),s=new Set;n!==void 0&&s.add(n),r!==void 0&&s.add(r);for(const a of s)mM.set(a,t.default)}function OW(e){if(!(e===void 0||e.trim()===""))return mM.get(e.trim())}const IW={passed:"Pass",failed:"Fail",scored:"Scored",skipped:"Skipped"},MW={passed:"success",failed:"danger",scored:"warn",skipped:"neutral"};function DW(e){return e.verdict??(e.ok===!0?"passed":"failed")}function LW(e){const t=[];return e.score!==void 0&&t.push(`score ${e.score.toFixed(3)}${e.threshold===void 0?"":` ≥ ${e.threshold}`}`),e.detail!==void 0&&t.push(e.detail),t.length===0?void 0:t.join(" · ")}function jW({a:e}){return e.passed?g.jsx(qt,{name:"check-circle",variant:"filled",size:"sm",color:"green"}):e.severity==="soft"?g.jsx(qt,{name:"minus-circle",variant:"filled",size:"sm",color:"yellow"}):g.jsx(qt,{name:"x-circle",variant:"filled",size:"sm",color:"red"})}function gM(e,t=200){const[n,r]=v.useState(e);return v.useEffect(()=>{if(e){r(!0);return}if(!n)return;const s=window.setTimeout(()=>r(!1),t);return()=>window.clearTimeout(s)},[e,n,t]),e||n}const zW={user:"chat-bubble",agent:"sparkles",think:"brain-simple",tool:"wrench",artifact:"bookmark"},PW={user:"User",agent:"Assistant",think:"Thinking",tool:"Tool call",artifact:"Artifact"},$W={user:"accent",agent:"green",think:"yellow",tool:"purple",artifact:"orange"};function BW({row:e}){const[t,n]=v.useState(!1),r=e.body!==void 0&&e.body.length>0||e.toolArgs!==void 0||e.toolOutput!==void 0,s=t&&r,a=gM(s),l=e.error?"error":e.kind;return g.jsxs("div",{className:`eval-step eval-step-${e.kind}${e.error?" error":""}`,children:[g.jsxs("button",{type:"button",className:"eval-step-head",disabled:!r,onClick:()=>n(c=>!c),"aria-expanded":t,children:[g.jsxs("span",{className:`eval-step-kind kind-${l}`,children:[g.jsx(qt,{name:zW[e.kind],size:"sm",color:e.error?"red":$W[e.kind]}),g.jsx("span",{className:"eval-step-kind-label",children:PW[e.kind]})]}),g.jsx("span",{className:"eval-step-label",title:e.label,children:e.kind==="tool"&&e.toolName!==void 0?e.toolName:e.label}),e.ms!=null&&e.ms>0?g.jsx("span",{className:"eval-step-ms",children:Mi(e.ms)}):null,r?g.jsx("span",{className:t?"eval-chevron open":"eval-chevron",children:g.jsx(qt,{name:"chevron-right",size:10})}):null]}),a?g.jsx("div",{className:s?"eval-collapse-clip":"eval-collapse-clip collapsed","aria-hidden":!s,inert:s?void 0:!0,children:g.jsxs("div",{className:"eval-step-detail",children:[e.kind==="tool"&&e.toolArgs!==void 0?g.jsxs("div",{className:"eval-step-block",children:[g.jsx("div",{className:"eval-step-block-label",children:"args"}),g.jsx("pre",{children:Eo(e.toolArgs)})]}):null,e.kind==="tool"&&e.toolOutput!==void 0?g.jsxs("div",{className:"eval-step-block",children:[g.jsx("div",{className:"eval-step-block-label",children:e.error?"error":"result"}),g.jsx("pre",{children:typeof e.toolOutput=="string"?e.toolOutput:Eo(e.toolOutput)})]}):null,e.kind!=="tool"&&e.body!==void 0?g.jsx("div",{className:"eval-step-block",children:g.jsx("pre",{children:e.body})}):null,e.kind==="tool"&&e.body!==void 0&&e.toolOutput===void 0?g.jsx("div",{className:"eval-step-block",children:g.jsx("pre",{children:e.body})}):null]})}):null]})}function FW({sessionId:e,live:t}){const[n,r]=v.useState([]),[s,a]=v.useState(null),[l,c]=v.useState(!0),[f,d]=v.useState(!1),h=v.useRef(null),m=Qe.hasCapability(wt.sessionStream),b=t&&m;v.useEffect(()=>{let k=!1;const S=new AbortController;return c(!0),a(null),r([]),d(!1),(async()=>{let C=-1;try{const E=await Qe.api.eventsText(e);if(k)return;if(E.ok){const T=await E.text();if(k)return;const R=gv(T);for(const _ of R)typeof _.index=="number"&&_.index>C&&(C=_.index);r(R)}}catch(E){k||a(E instanceof Error?E.message:String(E))}finally{k||c(!1)}if(!(!b||k)){d(!0);try{const E=await Qe.api.subscribeEvents(e,C+1,S.signal);if(!E.ok||!E.body){k||(a(`Stream failed (${E.status})`),d(!1));return}const T=E.body.getReader(),R=new TextDecoder;let _="";for(;;){const{done:D,value:A}=await T.read();if(D||k)break;_+=R.decode(A,{stream:!0});const I=_.split(`
26
+ `);_=I.pop()??"";const P=[];for(const $ of I){const O=$.trim();if(O)try{const Y=JSON.parse(O);P.push(Y),typeof Y.index=="number"&&Y.index>C&&(C=Y.index)}catch{}}P.length>0&&!k&&r($=>[...$,...P])}}catch(E){!k&&!(E instanceof DOMException&&E.name==="AbortError")&&a(E instanceof Error?E.message:String(E))}finally{k||d(!1)}}})(),()=>{k=!0,S.abort()}},[e,b]),v.useEffect(()=>{b&&h.current&&h.current.scrollIntoView({block:"nearest"})},[n.length,b]);const y=v.useMemo(()=>hM(n),[n]);return l&&n.length===0?g.jsxs("div",{className:"eval-trace",children:[g.jsx("span",{className:"spin"})," Loading session trace…"]}):s!==null&&n.length===0?g.jsx("div",{className:"eval-error",children:s}):y.turns.length===0?g.jsx("div",{className:"eval-trace",children:g.jsx("div",{className:"eval-trace-empty",children:b?g.jsxs(g.Fragment,{children:[g.jsx("span",{className:"spin"})," Waiting for first events…"]}):"No events in this session."})}):g.jsxs("div",{className:"eval-trace",children:[g.jsxs("div",{className:"eval-trace-meta",children:[y.eventCount," events · ",y.totalTools," tool",y.totalTools===1?"":"s",y.failedTools>0?` · ${y.failedTools} failed`:"",b||f?g.jsxs(g.Fragment,{children:[" · ",g.jsxs("span",{className:"eval-live",children:[g.jsx("span",{className:"spin"})," live"]})]}):null]}),s!==null?g.jsx("div",{className:"eval-error",children:s}):null,y.turns.map((k,S)=>g.jsxs("div",{className:"eval-turn",children:[g.jsxs("div",{className:"eval-turn-head",children:["Turn ",S+1,k.failed?" · failed":"",k.wallMs!=null&&k.wallMs>0?` · ${Mi(k.wallMs)}`:""]}),k.rows.map((C,E)=>g.jsx(BW,{row:C},`${k.turnId}-${E}-${C.kind}`))]},k.turnId)),g.jsx("div",{ref:h})]})}function UW({c:e}){const t=e.inputs??[],n=e.toolCalls??[];return t.length>0||e.finalText!==void 0||n.length>0||e.tools!==void 0&&e.tools.length>0?g.jsxs("div",{className:"eval-io",children:[g.jsxs("div",{className:"eval-io-section",children:[g.jsx("div",{className:"eval-io-heading",children:"Inputs"}),t.length===0?g.jsx("div",{className:"eval-trace-empty",children:"None yet"}):t.map((s,a)=>g.jsxs("div",{className:"eval-step-block",children:[g.jsxs("div",{className:"eval-step-block-label",children:["message ",t.length>1?a+1:""]}),g.jsx("pre",{children:s})]},`in-${a}`))]}),g.jsxs("div",{className:"eval-io-section",children:[g.jsx("div",{className:"eval-io-heading",children:"Tool calls"}),n.length===0?g.jsx("div",{className:"eval-trace-empty",children:e.tools&&e.tools.length>0?e.tools.join(", "):"None"}):n.map((s,a)=>g.jsxs("div",{className:`eval-step eval-step-tool${s.isError?" error":""}`,children:[g.jsxs("div",{className:"eval-step-head",style:{cursor:"default"},children:[g.jsxs("span",{className:`eval-step-kind kind-${s.isError?"error":"tool"}`,children:[g.jsx(qt,{name:"wrench",size:"sm",color:s.isError?"red":"purple"}),g.jsx("span",{className:"eval-step-kind-label",children:"Tool call"})]}),g.jsx("span",{className:"eval-step-label",children:s.toolName})]}),g.jsxs("div",{className:"eval-step-detail",children:[s.args!==void 0?g.jsxs("div",{className:"eval-step-block",children:[g.jsx("div",{className:"eval-step-block-label",children:"args"}),g.jsx("pre",{children:Eo(s.args)})]}):null,s.output!==void 0?g.jsxs("div",{className:"eval-step-block",children:[g.jsx("div",{className:"eval-step-block-label",children:s.isError?"error":"result"}),g.jsx("pre",{children:typeof s.output=="string"?s.output:Eo(s.output)})]}):null]})]},`tc-${a}-${s.toolName}`))]}),g.jsxs("div",{className:"eval-io-section",children:[g.jsx("div",{className:"eval-io-heading",children:"Output"}),e.finalText!==void 0&&e.finalText!==""?g.jsxs("div",{className:"eval-step-block",children:[g.jsx("div",{className:"eval-step-block-label",children:"final reply"}),g.jsx("pre",{children:e.finalText})]}):g.jsx("div",{className:"eval-trace-empty",children:e.status==="running"?"Waiting for reply…":"No final reply"})]})]}):g.jsx("div",{className:"eval-io",children:g.jsx("div",{className:"eval-trace-empty",children:e.status==="running"?"Waiting for inputs / outputs…":"No captured inputs or outputs."})})}function qW({c:e,batchRunning:t,customization:n}){const[r,s]=v.useState(!1),[a,l]=v.useState(!1),c=r||a,f=gM(c),d=v.useRef({io:!1,expanded:!1});c&&(d.current={io:a,expanded:r});const h=c?a:d.current.io,m=c?r:d.current.expanded,b=DW(e),y=e.status==="pending"?"Queued":e.status==="running"?"Running":IW[b],k=e.status==="done"?MW[b]:e.status==="running"?"accent":"neutral",S=e.sessionId!==void 0||e.status==="done"||e.status==="running",C=e.status==="done"||e.status==="running"||e.inputs!==void 0&&e.inputs.length>0||e.finalText!==void 0,E=n?.CaseMetrics,T=n?.CaseExtras;return g.jsxs("div",{className:`eval-case${r||a?" expanded":""}`,children:[g.jsxs("div",{className:"eval-case-head",children:[g.jsxs("button",{type:"button",className:"eval-id-btn",disabled:!S,"aria-expanded":r,title:S?r?"Collapse":"Expand live trace":void 0,onClick:()=>s(R=>!R),children:[g.jsx("span",{className:r?"eval-chevron open":"eval-chevron",children:g.jsx(qt,{name:"chevron-right",size:10})}),g.jsx(vo,{variant:k,size:"sm",children:y}),g.jsx("span",{className:"eval-id",children:e.id})]}),g.jsxs("div",{className:"eval-case-actions",children:[e.durationMs!==void 0?g.jsxs("span",{className:"eval-dur",children:[(e.durationMs/1e3).toFixed(1),"s"]}):null,C?g.jsx(yn,{variant:a?"secondary":"ghost",size:"sm",onClick:()=>l(R=>!R),title:"View eval inputs, tool results, and final output",children:"I/O"}):null,e.sessionId!==void 0?g.jsxs(g.Fragment,{children:[g.jsx(yn,{variant:"ghost",size:"sm",onClick:()=>{Qe.openEvalCaseTrace(e.sessionId)},children:"Full trace"}),g.jsx(yn,{variant:"ghost",size:"sm",onClick:()=>{Qe.openEvalCaseSession(e.sessionId)},children:"Chat"})]}):null]})]}),e.description!==void 0?g.jsx("div",{className:"eval-desc",children:e.description}):null,E!==void 0?g.jsx(E,{case:e,batchRunning:t}):g.jsx(RW,{case:e}),T!==void 0?g.jsx(T,{case:e,batchRunning:t}):null,e.error!==void 0?g.jsxs("div",{className:"eval-error",children:["error: ",e.error]}):null,e.skipReason!==void 0?g.jsxs("div",{className:"eval-desc",children:["skipped: ",e.skipReason]}):null,e.assertions!==void 0&&e.assertions.length>0?g.jsx("div",{className:"eval-assertions",children:e.assertions.map(R=>{const _=LW(R);return g.jsxs("div",{className:R.passed||R.severity==="soft"?"eval-assertion":"eval-assertion fail",children:[g.jsx("span",{className:"eval-assertion-icon",children:g.jsx(jW,{a:R})}),g.jsxs("span",{className:"eval-assertion-text",children:[g.jsx("span",{className:"eval-assertion-name",children:R.name}),_!==void 0?g.jsx("span",{className:"eval-assertion-detail",children:_}):null]})]},`${R.name}-${R.passed}-${R.detail??""}`)})}):null,e.logs!==void 0&&e.logs.length>0?g.jsx("div",{className:"eval-logs",children:e.logs.map((R,_)=>g.jsx("div",{className:"eval-log-line",children:R},`${_}:${R}`))}):null,f?g.jsxs("div",{className:c?"eval-collapse-clip":"eval-collapse-clip collapsed","aria-hidden":!c,inert:c?void 0:!0,children:[h?g.jsx(UW,{c:e}):null,m&&e.sessionId!==void 0?g.jsx(FW,{sessionId:e.sessionId,live:e.status==="running"&&t},e.sessionId):null,m&&e.sessionId===void 0?g.jsx("div",{className:"eval-trace-empty",children:e.status==="running"?g.jsxs(g.Fragment,{children:[g.jsx("span",{className:"spin"})," ",yC(e)?"Aggregating sibling cases…":"Waiting for session…"]}):yC(e)?g.jsxs(g.Fragment,{children:["Suite summary (no agent session)",e.finalText!==void 0?g.jsx("pre",{className:"eval-final-text",children:e.finalText}):null]}):g.jsxs(g.Fragment,{children:["No session for this case",e.finalText!==void 0?g.jsx("pre",{className:"eval-final-text",children:e.finalText}):null]})}):null]}):null]})}function yC(e){return e.id==="overall"||e.id.endsWith("/overall")||(e.tags?.includes("summary")??!1)}function bM(){const e=Ue(S=>S.evalRun),t=Ue(S=>S.evalCases),n=Ue(S=>S.evalConfig),r=Ue(S=>S.meta.name),s=Ue(S=>S.meta.readonly===!0),a=Ue(S=>S.capabilities.evals),l=v.useMemo(()=>OW(r),[r]),c=e?.status==="running",f=!s&&a==="enabled"&&t.length>0,d=!s&&Qe.hasCapability(wt.evalCancel),h=l?.RunSummary;if(a==="disabled")return g.jsx("div",{className:"pg-evals",children:g.jsx("div",{className:"eval-empty",children:g.jsx("p",{children:"Evaluations are not available in this playground."})})});if(e===null)return g.jsx("div",{className:"pg-evals",children:g.jsxs("div",{className:"eval-empty",children:[g.jsx("p",{children:"No eval run selected."}),g.jsxs("p",{className:"eval-hint",children:[t.length>0?`${t.length} case${t.length===1?"":"s"} discovered.`:"No evals/ cases found for this agent.",n?.maxConcurrency!==void 0?` Concurrency: ${n.maxConcurrency}.`:""]}),f?g.jsx("p",{className:"eval-hint",children:n?.durableRuns===!0?`Runs persist via the agent/storage.ts evals table (keeps last ${n.maxPlaygroundRuns??20}).`:`Runs stay in memory only (last ${n?.maxPlaygroundRuns??20}); lost when serve exits. Add an evals table to agent/storage.ts to keep them.`}):null,f?g.jsx(yn,{variant:"secondary",size:"sm",disabled:c,onClick:()=>{Qe.startEvalRun()},children:"Run all"}):null]})});const{summary:m,status:b}=e,y=b==="failed"||b==="cancelled"?"danger":c?"accent":"success",k=b==="failed"?"Failed":b==="cancelled"?"Cancelled":c?"Running":"Completed";return g.jsxs("div",{className:"pg-evals",children:[g.jsxs("div",{className:"eval-summary",children:[g.jsx(vo,{variant:y,size:"sm",children:k}),g.jsx("span",{className:"eval-run-id",title:"Eval ID",children:e.runId}),g.jsxs("span",{className:"eval-summary-stats",children:[g.jsxs("span",{className:"eval-summary-muted",children:[m.done,"/",m.total," done · ",m.passed," passed"]})," · ",m.failed," failed",m.scored!==void 0&&m.scored>0?g.jsxs("span",{className:"eval-summary-muted",children:[" · ",m.scored," scored"]}):null,m.skipped!==void 0&&m.skipped>0?g.jsxs("span",{className:"eval-summary-muted",children:[" · ",m.skipped," skipped"]}):null]}),h!==void 0?g.jsx(h,{run:e}):null,c?g.jsx("span",{className:"spin"}):null,e.error!==void 0?g.jsx("span",{className:"eval-error",children:e.error}):null,g.jsxs("div",{className:"eval-actions",children:[g.jsx(yn,{variant:"ghost",size:"sm",onClick:()=>{const S=EW(e);TW(S.filename,S.text)},title:"Download this eval run's results (assertions, metrics, I/O) as JSON",children:"Download run"}),c&&d?g.jsx(yn,{variant:"secondary",size:"sm",onClick:()=>{Qe.cancelEvalRun(e.runId)},children:"Cancel"}):null,f?g.jsx(yn,{variant:"secondary",size:"sm",disabled:c,onClick:()=>{Qe.startEvalRun()},children:"Run all"}):null]})]}),g.jsx("div",{className:"eval-case-list",children:e.cases.map(S=>g.jsx(qW,{c:S,batchRunning:c,customization:l},S.id))})]})}const yM=48;function HW(e){return e.scrollHeight-e.scrollTop-e.clientHeight}function VW(e,t=yM){return HW(e)<=t}function ny(e){e.scrollTop=e.scrollHeight}function vM(e){const{contentKey:t,latchKey:n,thresholdPx:r=yM}=e,s=v.useRef(null),a=v.useRef(!0);return v.useEffect(()=>{const l=s.current;if(!l)return;const c=()=>{a.current=VW(l,r)};return l.addEventListener("scroll",c,{passive:!0}),()=>l.removeEventListener("scroll",c)},[r,t,n]),v.useLayoutEffect(()=>{if(n===void 0)return;a.current=!0;const l=s.current;l&&ny(l)},[n]),v.useLayoutEffect(()=>{if(!a.current)return;const l=s.current;l&&ny(l)},[t]),v.useEffect(()=>{const l=s.current;if(!l)return;const c=()=>{a.current&&ny(l)};c();const f=new Set,d=new ResizeObserver(c),h=y=>{f.has(y)||(f.add(y),d.observe(y))},m=y=>{h(y);for(const k of y.children)m(k)};m(l);const b=new MutationObserver(y=>{for(const k of y)k.addedNodes.forEach(S=>{S instanceof Element&&m(S)});c()});return b.observe(l,{childList:!0,subtree:!0}),()=>{d.disconnect(),b.disconnect()}},[t,n]),{scrollRef:s}}function d0({idle:e,empty:t}){const n=Ue(s=>s.current),r=Ue(s=>s.historyLoading);return n===null?g.jsx(Ri,{body:e}):r?g.jsx(Ri,{icon:g.jsx("span",{className:"spin"}),body:"Loading session…"}):g.jsx(Ri,{body:t})}function xM(){const e=Ue(a=>a.traceEvents),t=Ue(a=>a.current),n=e.length,{scrollRef:r}=vM({contentKey:n,latchKey:`${t?.sessionId??"none"}:${n}`}),s=nN({count:n,getScrollElement:()=>r.current,estimateSize:()=>18,overscan:24});return n===0?g.jsx("div",{className:"pg-raw",children:g.jsx(d0,{idle:"Select a session to see the raw event stream.",empty:"No events recorded for this session yet."})}):g.jsxs("div",{className:"pg-raw",children:[g.jsx("div",{className:"head",children:"Raw NDJSON stream"}),g.jsx("div",{className:"raw-lines",ref:r,children:g.jsx("div",{style:{height:s.getTotalSize(),position:"relative",width:"100%"},children:s.getVirtualItems().map(a=>{const l=e[a.index];return g.jsxs("div",{"data-index":a.index,ref:s.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${a.start}px)`},children:[g.jsx("span",{children:`[${l.index??a.index}] `}),g.jsx("span",{className:"etype",children:l.type}),g.jsx("span",{children:` ${jn(l.data,240)}`})]},a.key)})})})]})}const GW={user:"chat-bubble",agent:"sparkles",think:"brain-simple",tool:"wrench",artifact:"bookmark"},WW={user:"User",agent:"Assistant",think:"Thinking",tool:"Tool call",artifact:"Artifact"},KW={user:"accent",agent:"green",think:"yellow",tool:"purple",artifact:"orange"};function YW(e,t){return t?"red":KW[e]}function kM({kind:e,error:t,showLabel:n=!0}){const r=YW(e,t),s=`${WW[e]}${t?" · error":""}`;return g.jsxs("span",{className:`wf-kind kind-${t?"error":e}`,title:n?void 0:s,"aria-label":n?void 0:s,children:[g.jsx(qt,{name:GW[e],size:"sm",color:r}),n?g.jsx("span",{className:"wf-kind-label",children:s}):null]})}function XW(e){if(e.startedAt!=null)return e.startedAt;let t=Number.POSITIVE_INFINITY;for(const n of e.rows){const r=n.startAt??n.at;r!=null&&r<t&&(t=r)}return Number.isFinite(t)?t:0}function ZW(e,t){if(e.wallMs!=null&&e.wallMs>0)return e.wallMs;if(e.endedAt!=null&&e.endedAt>t)return e.endedAt-t;let n=0;for(const r of e.rows){const a=(r.startAt??r.at??t)+(r.ms!=null&&r.ms>0?r.ms:0);a-t>n&&(n=a-t)}return Math.max(n,1)}function QW(e,t,n,r,s){const a=e.startAt??e.at??r,l=Math.max(0,a-r),c=e.ms!=null&&e.ms>0?e.ms:e.ms===0?0:null,f=c===null||c===0,d=s*.012,h=f?d:Math.max(c,d),m=Math.max(0,Math.min(100,l/s*100)),b=Math.max(.9,Math.min(100-m,h/s*100));return{id:`${n}-${t}`,row:e,turnId:n,wallMs:s,startMs:l,durMs:h,trueDurMs:c,leftPct:m,widthPct:b,instant:f}}function SM(e){return e===null?"—":e===0?"instant":Mi(e)}function bs({label:e,value:t}){return g.jsxs("div",{children:[g.jsx("dt",{children:e}),g.jsx("dd",{title:t,children:t})]})}function JW({span:e,onClose:t}){const{row:n,turnId:r,startMs:s,trueDurMs:a,wallMs:l}=e,c=a!=null?s+a:s,f=a!=null&&a>0&&l>0?`${(a/l*100).toFixed(1)}%`:"—",d=n.body?.trim()||"",h=n.toolArgs!=null?Eo(n.toolArgs):"",m=n.toolOutput!=null?Eo(n.toolOutput):n.kind==="tool"&&d?d:"";return g.jsxs("aside",{className:"trace-detail","aria-label":"Span details",children:[g.jsxs("div",{className:"trace-detail-head",children:[g.jsx(kM,{kind:n.kind,error:n.error}),g.jsx(br,{icon:"x",size:"sm",variant:"ghost","aria-label":"Close",onClick:t})]}),n.toolName?g.jsx("div",{className:"trace-detail-title",children:n.toolName}):null,n.url?g.jsx(pa,{className:"artifact-link",href:n.url,children:n.url}):null,n.kind!=="tool"&&d?g.jsx("pre",{className:"trace-detail-body",children:d}):null,n.kind!=="tool"&&!d&&n.label?g.jsx("div",{className:"trace-detail-label",children:n.label}):null,g.jsxs("dl",{className:"trace-detail-meta",children:[g.jsx(bs,{label:"Turn",value:r}),n.error?g.jsx(bs,{label:"Status",value:"error"}):null,g.jsx(bs,{label:"Start +",value:Mi(s)}),g.jsx(bs,{label:"End +",value:Mi(c)}),g.jsx(bs,{label:"Duration",value:SM(a)}),g.jsx(bs,{label:"% of turn",value:f}),g.jsx(bs,{label:"Started",value:cC(n.startAt)}),g.jsx(bs,{label:"Ended",value:cC(n.at)}),n.callId?g.jsx(bs,{label:"Call id",value:n.callId}):null]}),h?g.jsxs("div",{className:"trace-detail-section",children:[g.jsx("div",{className:"trace-detail-section-title",children:"Args"}),g.jsx("pre",{className:"trace-detail-body",children:h})]}):null,m?g.jsxs("div",{className:"trace-detail-section",children:[g.jsx("div",{className:"trace-detail-section-title",children:n.error?"Error":"Output"}),g.jsx("pre",{className:"trace-detail-body",children:m})]}):null]})}function eK({span:e,selected:t,detailOpen:n,onSelect:r}){const{row:s}=e,a=`${s.kind}${s.error?" error":""}`,l=SM(e.trueDurMs),c=e.widthPct>=8,f=s.depth??0;return g.jsxs("button",{type:"button",className:`wf-row ${a}${t?" selected":""}${f>0?" nested":""}`,onClick:r,"aria-pressed":t,style:f>0?{paddingLeft:`${8+f*14}px`}:void 0,children:[g.jsx(kM,{kind:s.kind,error:s.error,showLabel:!n}),g.jsx("span",{className:"wf-name",title:s.label,children:f>0?`↳ ${s.label||"—"}`:s.label||"—"}),g.jsx("span",{className:"wf-track","aria-hidden":"true",children:g.jsx("span",{className:`wf-bar ${a}${e.instant?" instant":""}`,style:{left:`${e.leftPct}%`,width:`${e.widthPct}%`},children:c?g.jsx("span",{className:"wf-bar-label",children:l}):null})}),g.jsx("span",{className:"wf-dur",children:l})]})}function tK({turn:e,index:t,selectedId:n,onSelect:r}){const s=XW(e),a=ZW(e,s),l=v.useMemo(()=>e.rows.map((h,m)=>QW(h,m,e.turnId,s,a)),[e,s,a]),c=v.useMemo(()=>CW(a),[a]),f=[];e.wallMs!==void 0&&f.push(`Worked for ${l0(e.wallMs)}`),e.usage&&f.push(`in ${ih(e.usage.inputTokens)} · out ${ih(e.usage.outputTokens)}`);const d=e.cost?.totalUsd;return typeof d=="number"&&Number.isFinite(d)&&f.push(u0(d)),g.jsxs("div",{className:e.failed?"trace-turn trace-turn--failed":"trace-turn",children:[g.jsxs("div",{className:"thead",children:[g.jsxs("span",{className:"thead-title",children:["Turn ",t+1,g.jsx("code",{className:"thead-id",children:e.turnId}),e.failed?g.jsxs("span",{className:"thead-failed",children:[g.jsx(qt,{name:"x-circle",size:"sm",variant:"filled",color:"red","aria-hidden":"true"}),"Failed"]}):null]}),g.jsx("span",{className:"wall",children:f.join(" · ")||"In progress"})]}),g.jsxs("div",{className:"wf",children:[g.jsxs("div",{className:"wf-ruler","aria-hidden":"true",children:[g.jsx("span",{className:"wf-kind"}),g.jsx("span",{className:"wf-name"}),g.jsx("span",{className:"wf-track wf-ruler-track",children:c.map(h=>g.jsxs("span",{className:"wf-tick",style:{left:`${h/a*100}%`},children:[g.jsx("span",{className:"wf-tick-line"}),g.jsx("span",{className:"wf-tick-label",children:Mi(h)})]},h))}),g.jsx("span",{className:"wf-dur"})]}),l.length===0?g.jsx("div",{className:"trace-empty-turn",children:"No timed spans in this turn."}):l.map(h=>g.jsx(eK,{span:h,selected:n===h.id,detailOpen:n!=null,onSelect:()=>r(n===h.id?null:h)},h.id))]})]})}function wM(){const e=Ue(c=>c.traceEvents),t=Ue(c=>c.sessionCostUsd),n=v.useMemo(()=>hM(e),[e]),[r,s]=v.useState(null);if(!e.length)return g.jsx("div",{className:"pg-trace",children:g.jsx(d0,{idle:"Select a session to see the timeline.",empty:"No events recorded for this session yet."})});const a=t??n.totalCostUsd,l=[`${n.eventCount} events`,`${n.turns.length} turn${n.turns.length===1?"":"s"}`,`${n.totalTools} tool call${n.totalTools===1?"":"s"}`,n.failedTools?`${n.failedTools} error${n.failedTools===1?"":"s"}`:null,a!==null?`cost ${u0(a)}`:null].filter(Boolean).join(" · ");return g.jsx("div",{className:"pg-trace",children:g.jsxs("div",{className:"trace-rows",children:[g.jsx("div",{className:"trace-summary",children:l}),g.jsxs("div",{className:`trace-layout${r?" has-detail":""}`,children:[g.jsx("div",{className:"trace-main",children:n.turns.map((c,f)=>g.jsx(tK,{turn:c,index:f,selectedId:r?.id??null,onSelect:s},`${c.turnId||"turn"}-${f}`))}),r?g.jsx(JW,{span:r,onClose:()=>s(null)}):null]})]})})}function nK(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const rK=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,iK=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,sK={};function vC(e,t){return(sK.jsx?iK:rK).test(e)}const oK=/[ \t\n\f\r]/g;function aK(e){return typeof e=="object"?e.type==="text"?xC(e.value):!1:xC(e)}function xC(e){return e.replace(oK,"")===""}class cf{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}cf.prototype.normal={};cf.prototype.property={};cf.prototype.space=void 0;function EM(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new cf(n,r,t)}function bv(e){return e.toLowerCase()}class $r{constructor(t,n){this.attribute=n,this.property=t}}$r.prototype.attribute="";$r.prototype.booleanish=!1;$r.prototype.boolean=!1;$r.prototype.commaOrSpaceSeparated=!1;$r.prototype.commaSeparated=!1;$r.prototype.defined=!1;$r.prototype.mustUseProperty=!1;$r.prototype.number=!1;$r.prototype.overloadedBoolean=!1;$r.prototype.property="";$r.prototype.spaceSeparated=!1;$r.prototype.space=void 0;let lK=0;const Mt=ka(),Wn=ka(),yv=ka(),Be=ka(),wn=ka(),wl=ka(),Zr=ka();function ka(){return 2**++lK}const vv=Object.freeze(Object.defineProperty({__proto__:null,boolean:Mt,booleanish:Wn,commaOrSpaceSeparated:Zr,commaSeparated:wl,number:Be,overloadedBoolean:yv,spaceSeparated:wn},Symbol.toStringTag,{value:"Module"})),ry=Object.keys(vv);class p0 extends $r{constructor(t,n,r,s){let a=-1;if(super(t,n),kC(this,"space",s),typeof r=="number")for(;++a<ry.length;){const l=ry[a];kC(this,ry[a],(r&vv[l])===vv[l])}}}p0.prototype.defined=!0;function kC(e,t,n){n&&(e[t]=n)}function Wl(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const a=new p0(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[bv(r)]=r,n[bv(a.attribute)]=r}return new cf(t,n,e.space)}const TM=Wl({properties:{ariaActiveDescendant:null,ariaAtomic:Wn,ariaAutoComplete:null,ariaBusy:Wn,ariaChecked:Wn,ariaColCount:Be,ariaColIndex:Be,ariaColSpan:Be,ariaControls:wn,ariaCurrent:null,ariaDescribedBy:wn,ariaDetails:null,ariaDisabled:Wn,ariaDropEffect:wn,ariaErrorMessage:null,ariaExpanded:Wn,ariaFlowTo:wn,ariaGrabbed:Wn,ariaHasPopup:null,ariaHidden:Wn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:wn,ariaLevel:Be,ariaLive:null,ariaModal:Wn,ariaMultiLine:Wn,ariaMultiSelectable:Wn,ariaOrientation:null,ariaOwns:wn,ariaPlaceholder:null,ariaPosInSet:Be,ariaPressed:Wn,ariaReadOnly:Wn,ariaRelevant:null,ariaRequired:Wn,ariaRoleDescription:wn,ariaRowCount:Be,ariaRowIndex:Be,ariaRowSpan:Be,ariaSelected:Wn,ariaSetSize:Be,ariaSort:null,ariaValueMax:Be,ariaValueMin:Be,ariaValueNow:Be,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function CM(e,t){return t in e?e[t]:t}function RM(e,t){return CM(e,t.toLowerCase())}const uK=Wl({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:wl,acceptCharset:wn,accessKey:wn,action:null,allow:null,allowFullScreen:Mt,allowPaymentRequest:Mt,allowUserMedia:Mt,alt:null,as:null,async:Mt,autoCapitalize:null,autoComplete:wn,autoFocus:Mt,autoPlay:Mt,blocking:wn,capture:null,charSet:null,checked:Mt,cite:null,className:wn,cols:Be,colSpan:null,content:null,contentEditable:Wn,controls:Mt,controlsList:wn,coords:Be|wl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Mt,defer:Mt,dir:null,dirName:null,disabled:Mt,download:yv,draggable:Wn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Mt,formTarget:null,headers:wn,height:Be,hidden:yv,high:Be,href:null,hrefLang:null,htmlFor:wn,httpEquiv:wn,id:null,imageSizes:null,imageSrcSet:null,inert:Mt,inputMode:null,integrity:null,is:null,isMap:Mt,itemId:null,itemProp:wn,itemRef:wn,itemScope:Mt,itemType:wn,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Mt,low:Be,manifest:null,max:null,maxLength:Be,media:null,method:null,min:null,minLength:Be,multiple:Mt,muted:Mt,name:null,nonce:null,noModule:Mt,noValidate:Mt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Mt,optimum:Be,pattern:null,ping:wn,placeholder:null,playsInline:Mt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Mt,referrerPolicy:null,rel:wn,required:Mt,reversed:Mt,rows:Be,rowSpan:Be,sandbox:wn,scope:null,scoped:Mt,seamless:Mt,selected:Mt,shadowRootClonable:Mt,shadowRootDelegatesFocus:Mt,shadowRootMode:null,shape:null,size:Be,sizes:null,slot:null,span:Be,spellCheck:Wn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Be,step:null,style:null,tabIndex:Be,target:null,title:null,translate:null,type:null,typeMustMatch:Mt,useMap:null,value:Wn,width:Be,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:wn,axis:null,background:null,bgColor:null,border:Be,borderColor:null,bottomMargin:Be,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Mt,declare:Mt,event:null,face:null,frame:null,frameBorder:null,hSpace:Be,leftMargin:Be,link:null,longDesc:null,lowSrc:null,marginHeight:Be,marginWidth:Be,noResize:Mt,noHref:Mt,noShade:Mt,noWrap:Mt,object:null,profile:null,prompt:null,rev:null,rightMargin:Be,rules:null,scheme:null,scrolling:Wn,standby:null,summary:null,text:null,topMargin:Be,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Be,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Mt,disableRemotePlayback:Mt,prefix:null,property:null,results:Be,security:null,unselectable:null},space:"html",transform:RM}),cK=Wl({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",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",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",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",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",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",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Zr,accentHeight:Be,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Be,amplitude:Be,arabicForm:null,ascent:Be,attributeName:null,attributeType:null,azimuth:Be,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Be,by:null,calcMode:null,capHeight:Be,className:wn,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Be,diffuseConstant:Be,direction:null,display:null,dur:null,divisor:Be,dominantBaseline:null,download:Mt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Be,enableBackground:null,end:null,event:null,exponent:Be,externalResourcesRequired:null,fill:null,fillOpacity:Be,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:wl,g2:wl,glyphName:wl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Be,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Be,horizOriginX:Be,horizOriginY:Be,id:null,ideographic:Be,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Be,k:Be,k1:Be,k2:Be,k3:Be,k4:Be,kernelMatrix:Zr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Be,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Be,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Be,overlineThickness:Be,paintOrder:null,panose1:null,path:null,pathLength:Be,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:wn,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Be,pointsAtY:Be,pointsAtZ:Be,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Zr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Zr,rev:Zr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Zr,requiredFeatures:Zr,requiredFonts:Zr,requiredFormats:Zr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Be,specularExponent:Be,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Be,strikethroughThickness:Be,string:null,stroke:null,strokeDashArray:Zr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Be,strokeOpacity:Be,strokeWidth:null,style:null,surfaceScale:Be,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Zr,tabIndex:Be,tableValues:null,target:null,targetX:Be,targetY:Be,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Zr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Be,underlineThickness:Be,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Be,values:null,vAlphabetic:Be,vMathematical:Be,vectorEffect:null,vHanging:Be,vIdeographic:Be,version:null,vertAdvY:Be,vertOriginX:Be,vertOriginY:Be,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Be,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:CM}),_M=Wl({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),AM=Wl({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:RM}),NM=Wl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),fK={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},dK=/[A-Z]/g,SC=/-[a-z]/g,pK=/^data[-\w.:]+$/i;function hK(e,t){const n=bv(t);let r=t,s=$r;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&pK.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(SC,gK);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!SC.test(a)){let l=a.replace(dK,mK);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}s=p0}return new s(r,t)}function mK(e){return"-"+e.toLowerCase()}function gK(e){return e.charAt(1).toUpperCase()}const bK=EM([TM,uK,_M,AM,NM],"html"),h0=EM([TM,cK,_M,AM,NM],"svg");function yK(e){return e.join(" ").trim()}var ll={},iy,wC;function vK(){if(wC)return iy;wC=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,c=/^\s+|\s+$/g,f=`
27
+ `,d="/",h="*",m="",b="comment",y="declaration";iy=function(S,C){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];C=C||{};var E=1,T=1;function R(B){var j=B.match(t);j&&(E+=j.length);var q=B.lastIndexOf(f);T=~q?B.length-q:T+B.length}function _(){var B={line:E,column:T};return function(j){return j.position=new D(B),P(),j}}function D(B){this.start=B,this.end={line:E,column:T},this.source=C.source}D.prototype.content=S;function A(B){var j=new Error(C.source+":"+E+":"+T+": "+B);if(j.reason=B,j.filename=C.source,j.line=E,j.column=T,j.source=S,!C.silent)throw j}function I(B){var j=B.exec(S);if(j){var q=j[0];return R(q),S=S.slice(q.length),j}}function P(){I(n)}function $(B){var j;for(B=B||[];j=O();)j!==!1&&B.push(j);return B}function O(){var B=_();if(!(d!=S.charAt(0)||h!=S.charAt(1))){for(var j=2;m!=S.charAt(j)&&(h!=S.charAt(j)||d!=S.charAt(j+1));)++j;if(j+=2,m===S.charAt(j-1))return A("End of comment missing");var q=S.slice(2,j-2);return T+=2,R(q),S=S.slice(j),T+=2,B({type:b,comment:q})}}function Y(){var B=_(),j=I(r);if(j){if(O(),!I(s))return A("property missing ':'");var q=I(a),H=B({type:y,property:k(j[0].replace(e,m)),value:q?k(q[0].replace(e,m)):m});return I(l),H}}function U(){var B=[];$(B);for(var j;j=Y();)j!==!1&&(B.push(j),$(B));return B}return P(),U()};function k(S){return S?S.replace(c,m):m}return iy}var EC;function xK(){if(EC)return ll;EC=1;var e=ll&&ll.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ll,"__esModule",{value:!0}),ll.default=n;var t=e(vK());function n(r,s){var a=null;if(!r||typeof r!="string")return a;var l=(0,t.default)(r),c=typeof s=="function";return l.forEach(function(f){if(f.type==="declaration"){var d=f.property,h=f.value;c?s(d,h,f):h&&(a=a||{},a[d]=h)}}),a}return ll}var kK=xK();const TC=Vc(kK),SK=TC.default||TC,wK=Object.freeze(Object.defineProperty({__proto__:null,default:SK},Symbol.toStringTag,{value:"Module"})),EK=Oj(wK);var Zu={},CC;function TK(){if(CC)return Zu;CC=1,Object.defineProperty(Zu,"__esModule",{value:!0}),Zu.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,a=function(d){return!d||n.test(d)||e.test(d)},l=function(d,h){return h.toUpperCase()},c=function(d,h){return"".concat(h,"-")},f=function(d,h){return h===void 0&&(h={}),a(d)?d:(d=d.toLowerCase(),h.reactCompat?d=d.replace(s,c):d=d.replace(r,c),d.replace(t,l))};return Zu.camelCase=f,Zu}var Qu,RC;function CK(){if(RC)return Qu;RC=1;var e=Qu&&Qu.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(EK),n=TK();function r(s,a){var l={};return!s||typeof s!="string"||(0,t.default)(s,function(c,f){c&&f&&(l[(0,n.camelCase)(c,a)]=f)}),l}return r.default=r,Qu=r,Qu}var RK=CK();const _K=Vc(RK),OM=IM("end"),m0=IM("start");function IM(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function AK(e){const t=m0(e),n=OM(e);if(t&&n)return{start:t,end:n}}function xc(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?_C(e.position):"start"in e||"end"in e?_C(e):"line"in e||"column"in e?xv(e):""}function xv(e){return AC(e&&e.line)+":"+AC(e&&e.column)}function _C(e){return xv(e&&e.start)+"-"+xv(e&&e.end)}function AC(e){return e&&typeof e=="number"?e:1}class yr extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let s="",a={},l=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?s=t:!a.cause&&t&&(l=!0,s=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const f=r.indexOf(":");f===-1?a.ruleId=r:(a.source=r.slice(0,f),a.ruleId=r.slice(f+1))}if(!a.place&&a.ancestors&&a.ancestors){const f=a.ancestors[a.ancestors.length-1];f&&(a.place=f.position)}const c=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file,this.message=s,this.line=c?c.line:void 0,this.name=xc(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=l&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}yr.prototype.file="";yr.prototype.name="";yr.prototype.reason="";yr.prototype.message="";yr.prototype.stack="";yr.prototype.column=void 0;yr.prototype.line=void 0;yr.prototype.ancestors=void 0;yr.prototype.cause=void 0;yr.prototype.fatal=void 0;yr.prototype.place=void 0;yr.prototype.ruleId=void 0;yr.prototype.source=void 0;const g0={}.hasOwnProperty,NK=new Map,OK=/[A-Z]/g,IK=new Set(["table","tbody","thead","tfoot","tr"]),MK=new Set(["td","th"]),MM="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function DK(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=UK(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=FK(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?h0:bK,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=DM(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function DM(e,t,n){if(t.type==="element")return LK(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return jK(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return PK(e,t,n);if(t.type==="mdxjsEsm")return zK(e,t);if(t.type==="root")return $K(e,t,n);if(t.type==="text")return BK(e,t)}function LK(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=h0,e.schema=s),e.ancestors.push(t);const a=jM(e,t.tagName,!1),l=qK(e,t);let c=y0(e,t);return IK.has(t.tagName)&&(c=c.filter(function(f){return typeof f=="string"?!aK(f):!0})),LM(e,l,a,t),b0(l,c),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function jK(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Uc(e,t.position)}function zK(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Uc(e,t.position)}function PK(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=h0,e.schema=s),e.ancestors.push(t);const a=t.name===null?e.Fragment:jM(e,t.name,!0),l=HK(e,t),c=y0(e,t);return LM(e,l,a,t),b0(l,c),e.ancestors.pop(),e.schema=r,e.create(t,a,l,n)}function $K(e,t,n){const r={};return b0(r,y0(e,t)),e.create(t,e.Fragment,r,n)}function BK(e,t){return t.value}function LM(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function b0(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function FK(e,t,n){return r;function r(s,a,l,c){const d=Array.isArray(l.children)?n:t;return c?d(a,l,c):d(a,l)}}function UK(e,t){return n;function n(r,s,a,l){const c=Array.isArray(a.children),f=m0(r);return t(s,a,l,c,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function qK(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&g0.call(t.properties,s)){const a=VK(e,s,t.properties[s]);if(a){const[l,c]=a;e.tableCellAlignToStyle&&l==="align"&&typeof c=="string"&&MK.has(t.tagName)?r=c:n[l]=c}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function HK(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const l=a.expression;l.type;const c=l.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else Uc(e,t.position);else{const s=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const c=r.value.data.estree.body[0];c.type,a=e.evaluater.evaluateExpression(c.expression)}else Uc(e,t.position);else a=r.value===null?!0:r.value;n[s]=a}return n}function y0(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:NK;for(;++r<t.children.length;){const a=t.children[r];let l;if(e.passKeys){const f=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(f){const d=s.get(f)||0;l=f+"-"+d,s.set(f,d+1)}}const c=DM(e,a,l);c!==void 0&&n.push(c)}return n}function VK(e,t,n){const r=hK(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?nK(n):yK(n)),r.property==="style"){let s=typeof n=="object"?n:GK(e,String(n));return e.stylePropertyNameCase==="css"&&(s=WK(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?fK[r.property]||r.property:r.attribute,n]}}function GK(e,t){try{return _K(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new yr("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=MM+"#cannot-parse-style-attribute",s}}function jM(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let a=-1,l;for(;++a<s.length;){const c=vC(s[a])?{type:"Identifier",name:s[a]}:{type:"Literal",value:s[a]};l=l?{type:"MemberExpression",object:l,property:c,computed:!!(a&&c.type==="Literal"),optional:!1}:c}r=l}else r=vC(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return g0.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);Uc(e)}function Uc(e,t){const n=new yr("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=MM+"#cannot-handle-mdx-estrees-without-createevaluater",n}function WK(e){const t={};let n;for(n in e)g0.call(e,n)&&(t[KK(n)]=e[n]);return t}function KK(e){let t=e.replace(OK,YK);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function YK(e){return"-"+e.toLowerCase()}const sy={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},XK={};function v0(e,t){const n=XK,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return zM(e,r,s)}function zM(e,t,n){if(ZK(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return NC(e.children,t,n)}return Array.isArray(e)?NC(e,t,n):""}function NC(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=zM(e[s],t,n);return r.join("")}function ZK(e){return!!(e&&typeof e=="object")}const OC=document.createElement("i");function x0(e){const t="&"+e+";";OC.innerHTML=t;const n=OC.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ni(e,t,n,r){const s=e.length;let a=0,l;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);a<r.length;)l=r.slice(a,a+1e4),l.unshift(t,0),e.splice(...l),a+=1e4,t+=1e4}function mi(e,t){return e.length>0?(ni(e,e.length,0,t),e):t}const IC={}.hasOwnProperty;function PM(e){const t={};let n=-1;for(;++n<e.length;)QK(t,e[n]);return t}function QK(e,t){let n;for(n in t){const s=(IC.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let l;if(a)for(l in a){IC.call(s,l)||(s[l]=[]);const c=a[l];JK(s[l],Array.isArray(c)?c:c?[c]:[])}}}function JK(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);ni(e,0,0,r)}function $M(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Ni(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const wr=Oo(/[A-Za-z]/),mr=Oo(/[\dA-Za-z]/),eY=Oo(/[#-'*+\--9=?A-Z^-~]/);function oh(e){return e!==null&&(e<32||e===127)}const kv=Oo(/\d/),tY=Oo(/[\dA-Fa-f]/),nY=Oo(/[!-/:-@[-`{-~]/);function yt(e){return e!==null&&e<-2}function xn(e){return e!==null&&(e<0||e===32)}function Ut(e){return e===-2||e===-1||e===32}const nm=Oo(new RegExp("\\p{P}|\\p{S}","u")),ha=Oo(/\s/);function Oo(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Kl(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const a=e.charCodeAt(n);let l="";if(a===37&&mr(e.charCodeAt(n+1))&&mr(e.charCodeAt(n+2)))s=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(l=String.fromCharCode(a));else if(a>55295&&a<57344){const c=e.charCodeAt(n+1);a<56320&&c>56319&&c<57344?(l=String.fromCharCode(a,c),s=1):l="�"}else l=String.fromCharCode(a);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+s+1,l=""),s&&(n+=s,s=0)}return t.join("")+e.slice(r)}function Zt(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let a=0;return l;function l(f){return Ut(f)?(e.enter(n),c(f)):t(f)}function c(f){return Ut(f)&&a++<s?(e.consume(f),c):(e.exit(n),t(f))}}const rY={tokenize:iY};function iY(e){const t=e.attempt(this.parser.constructs.contentInitial,r,s);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Zt(e,t,"linePrefix")}function s(c){return e.enter("paragraph"),a(c)}function a(c){const f=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=f),n=f,l(c)}function l(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return yt(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),l)}}const sY={tokenize:oY},MC={tokenize:aY};function oY(e){const t=this,n=[];let r=0,s,a,l;return c;function c(R){if(r<n.length){const _=n[r];return t.containerState=_[1],e.attempt(_[0].continuation,f,d)(R)}return d(R)}function f(R){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&T();const _=t.events.length;let D=_,A;for(;D--;)if(t.events[D][0]==="exit"&&t.events[D][1].type==="chunkFlow"){A=t.events[D][1].end;break}E(r);let I=_;for(;I<t.events.length;)t.events[I][1].end={...A},I++;return ni(t.events,D+1,0,t.events.slice(_)),t.events.length=I,d(R)}return c(R)}function d(R){if(r===n.length){if(!s)return b(R);if(s.currentConstruct&&s.currentConstruct.concrete)return k(R);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(MC,h,m)(R)}function h(R){return s&&T(),E(r),b(R)}function m(R){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,k(R)}function b(R){return t.containerState={},e.attempt(MC,y,k)(R)}function y(R){return r++,n.push([t.currentConstruct,t.containerState]),b(R)}function k(R){if(R===null){s&&T(),E(0),e.consume(R);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:a}),S(R)}function S(R){if(R===null){C(e.exit("chunkFlow"),!0),E(0),e.consume(R);return}return yt(R)?(e.consume(R),C(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(R),S)}function C(R,_){const D=t.sliceStream(R);if(_&&D.push(null),R.previous=a,a&&(a.next=R),a=R,s.defineSkip(R.start),s.write(D),t.parser.lazy[R.start.line]){let A=s.events.length;for(;A--;)if(s.events[A][1].start.offset<l&&(!s.events[A][1].end||s.events[A][1].end.offset>l))return;const I=t.events.length;let P=I,$,O;for(;P--;)if(t.events[P][0]==="exit"&&t.events[P][1].type==="chunkFlow"){if($){O=t.events[P][1].end;break}$=!0}for(E(r),A=I;A<t.events.length;)t.events[A][1].end={...O},A++;ni(t.events,P+1,0,t.events.slice(I)),t.events.length=A}}function E(R){let _=n.length;for(;_-- >R;){const D=n[_];t.containerState=D[1],D[0].exit.call(t,e)}n.length=R}function T(){s.write([null]),a=void 0,s=void 0,t.containerState._closeFlow=void 0}}function aY(e,t,n){return Zt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function jl(e){if(e===null||xn(e)||ha(e))return 1;if(nm(e))return 2}function rm(e,t,n){const r=[];let s=-1;for(;++s<e.length;){const a=e[s].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Sv={name:"attention",resolveAll:lY,tokenize:uY};function lY(e,t){let n=-1,r,s,a,l,c,f,d,h;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;f=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m={...e[r][1].end},b={...e[n][1].start};DC(m,-f),DC(b,f),l={type:f>1?"strongSequence":"emphasisSequence",start:m,end:{...e[r][1].end}},c={type:f>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:b},a={type:f>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},s={type:f>1?"strong":"emphasis",start:{...l.start},end:{...c.end}},e[r][1].end={...l.start},e[n][1].start={...c.end},d=[],e[r][1].end.offset-e[r][1].start.offset&&(d=mi(d,[["enter",e[r][1],t],["exit",e[r][1],t]])),d=mi(d,[["enter",s,t],["enter",l,t],["exit",l,t],["enter",a,t]]),d=mi(d,rm(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),d=mi(d,[["exit",a,t],["enter",c,t],["exit",c,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,d=mi(d,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,ni(e,r-1,n-r+3,d),n=r+d.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function uY(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=jl(r);let a;return l;function l(f){return a=f,e.enter("attentionSequence"),c(f)}function c(f){if(f===a)return e.consume(f),c;const d=e.exit("attentionSequence"),h=jl(f),m=!h||h===2&&s||n.includes(f),b=!s||s===2&&h||n.includes(r);return d._open=!!(a===42?m:m&&(s||!b)),d._close=!!(a===42?b:b&&(h||!m)),t(f)}}function DC(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const cY={name:"autolink",tokenize:fY};function fY(e,t,n){let r=0;return s;function s(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(y){return wr(y)?(e.consume(y),l):y===64?n(y):d(y)}function l(y){return y===43||y===45||y===46||mr(y)?(r=1,c(y)):d(y)}function c(y){return y===58?(e.consume(y),r=0,f):(y===43||y===45||y===46||mr(y))&&r++<32?(e.consume(y),c):(r=0,d(y))}function f(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||oh(y)?n(y):(e.consume(y),f)}function d(y){return y===64?(e.consume(y),h):eY(y)?(e.consume(y),d):n(y)}function h(y){return mr(y)?m(y):n(y)}function m(y){return y===46?(e.consume(y),r=0,h):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):b(y)}function b(y){if((y===45||mr(y))&&r++<63){const k=y===45?b:m;return e.consume(y),k}return n(y)}}const ff={partial:!0,tokenize:dY};function dY(e,t,n){return r;function r(a){return Ut(a)?Zt(e,s,"linePrefix")(a):s(a)}function s(a){return a===null||yt(a)?t(a):n(a)}}const BM={continuation:{tokenize:hY},exit:mY,name:"blockQuote",tokenize:pY};function pY(e,t,n){const r=this;return s;function s(l){if(l===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),a}return n(l)}function a(l){return Ut(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function hY(e,t,n){const r=this;return s;function s(l){return Ut(l)?Zt(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):a(l)}function a(l){return e.attempt(BM,t,n)(l)}}function mY(e){e.exit("blockQuote")}const FM={name:"characterEscape",tokenize:gY};function gY(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),s}function s(a){return nY(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const UM={name:"characterReference",tokenize:bY};function bY(e,t,n){const r=this;let s=0,a,l;return c;function c(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),f}function f(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),d):(e.enter("characterReferenceValue"),a=31,l=mr,h(m))}function d(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,l=tY,h):(e.enter("characterReferenceValue"),a=7,l=kv,h(m))}function h(m){if(m===59&&s){const b=e.exit("characterReferenceValue");return l===mr&&!x0(r.sliceSerialize(b))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(m)&&s++<a?(e.consume(m),h):n(m)}}const LC={partial:!0,tokenize:vY},jC={concrete:!0,name:"codeFenced",tokenize:yY};function yY(e,t,n){const r=this,s={partial:!0,tokenize:D};let a=0,l=0,c;return f;function f(A){return d(A)}function d(A){const I=r.events[r.events.length-1];return a=I&&I[1].type==="linePrefix"?I[2].sliceSerialize(I[1],!0).length:0,c=A,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(A)}function h(A){return A===c?(l++,e.consume(A),h):l<3?n(A):(e.exit("codeFencedFenceSequence"),Ut(A)?Zt(e,m,"whitespace")(A):m(A))}function m(A){return A===null||yt(A)?(e.exit("codeFencedFence"),r.interrupt?t(A):e.check(LC,S,_)(A)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(A))}function b(A){return A===null||yt(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(A)):Ut(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Zt(e,y,"whitespace")(A)):A===96&&A===c?n(A):(e.consume(A),b)}function y(A){return A===null||yt(A)?m(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),k(A))}function k(A){return A===null||yt(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(A)):A===96&&A===c?n(A):(e.consume(A),k)}function S(A){return e.attempt(s,_,C)(A)}function C(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),E}function E(A){return a>0&&Ut(A)?Zt(e,T,"linePrefix",a+1)(A):T(A)}function T(A){return A===null||yt(A)?e.check(LC,S,_)(A):(e.enter("codeFlowValue"),R(A))}function R(A){return A===null||yt(A)?(e.exit("codeFlowValue"),T(A)):(e.consume(A),R)}function _(A){return e.exit("codeFenced"),t(A)}function D(A,I,P){let $=0;return O;function O(q){return A.enter("lineEnding"),A.consume(q),A.exit("lineEnding"),Y}function Y(q){return A.enter("codeFencedFence"),Ut(q)?Zt(A,U,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(q):U(q)}function U(q){return q===c?(A.enter("codeFencedFenceSequence"),B(q)):P(q)}function B(q){return q===c?($++,A.consume(q),B):$>=l?(A.exit("codeFencedFenceSequence"),Ut(q)?Zt(A,j,"whitespace")(q):j(q)):P(q)}function j(q){return q===null||yt(q)?(A.exit("codeFencedFence"),I(q)):P(q)}}}function vY(e,t,n){const r=this;return s;function s(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a)}function a(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const oy={name:"codeIndented",tokenize:kY},xY={partial:!0,tokenize:SY};function kY(e,t,n){const r=this;return s;function s(d){return e.enter("codeIndented"),Zt(e,a,"linePrefix",5)(d)}function a(d){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?l(d):n(d)}function l(d){return d===null?f(d):yt(d)?e.attempt(xY,l,f)(d):(e.enter("codeFlowValue"),c(d))}function c(d){return d===null||yt(d)?(e.exit("codeFlowValue"),l(d)):(e.consume(d),c)}function f(d){return e.exit("codeIndented"),t(d)}}function SY(e,t,n){const r=this;return s;function s(l){return r.parser.lazy[r.now().line]?n(l):yt(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),s):Zt(e,a,"linePrefix",5)(l)}function a(l){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):yt(l)?s(l):n(l)}}const wY={name:"codeText",previous:TY,resolve:EY,tokenize:CY};function EY(e){let t=e.length-4,n=3,r,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)s===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(s=r):(r===t||e[r][1].type==="lineEnding")&&(e[s][1].type="codeTextData",r!==s+2&&(e[s][1].end=e[r-1][1].end,e.splice(s+2,r-s-2),t-=r-s-2,r=s+2),s=void 0);return e}function TY(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function CY(e,t,n){let r=0,s,a;return l;function l(m){return e.enter("codeText"),e.enter("codeTextSequence"),c(m)}function c(m){return m===96?(e.consume(m),r++,c):(e.exit("codeTextSequence"),f(m))}function f(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),f):m===96?(a=e.enter("codeTextSequence"),s=0,h(m)):yt(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),f):(e.enter("codeTextData"),d(m))}function d(m){return m===null||m===32||m===96||yt(m)?(e.exit("codeTextData"),f(m)):(e.consume(m),d)}function h(m){return m===96?(e.consume(m),s++,h):s===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",d(m))}}class RY{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const s=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&Ju(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Ju(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ju(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Ju(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ju(this.left,n.reverse())}}}function Ju(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function qM(e){const t={};let n=-1,r,s,a,l,c,f,d;const h=new RY(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(f=r[1]._tokenizer.events,a=0,a<f.length&&f[a][1].type==="lineEndingBlank"&&(a+=2),a<f.length&&f[a][1].type==="content"))for(;++a<f.length&&f[a][1].type!=="content";)f[a][1].type==="chunkText"&&(f[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,_Y(h,n)),n=t[n],d=!0);else if(r[1]._container){for(a=n,s=void 0;a--;)if(l=h.get(a),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(s&&(h.get(s)[1].type="lineEndingBlank"),l[1].type="lineEnding",s=a);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;s&&(r[1].end={...h.get(s)[1].start},c=h.slice(s,n),c.unshift(r),h.splice(s,n-s+1,c))}}return ni(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!d}function _Y(e,t){const n=e.get(t)[1],r=e.get(t)[2];let s=t-1;const a=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const c=l.events,f=[],d={};let h,m,b=-1,y=n,k=0,S=0;const C=[S];for(;y;){for(;e.get(++s)[1]!==y;);a.push(s),y._tokenizer||(h=r.sliceStream(y),y.next||h.push(null),m&&l.defineSkip(y.start),y._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(h),y._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),m=y,y=y.next}for(y=n;++b<c.length;)c[b][0]==="exit"&&c[b-1][0]==="enter"&&c[b][1].type===c[b-1][1].type&&c[b][1].start.line!==c[b][1].end.line&&(S=b+1,C.push(S),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(l.events=[],y?(y._tokenizer=void 0,y.previous=void 0):C.pop(),b=C.length;b--;){const E=c.slice(C[b],C[b+1]),T=a.pop();f.push([T,T+E.length-1]),e.splice(T,2,E)}for(f.reverse(),b=-1;++b<f.length;)d[k+f[b][0]]=k+f[b][1],k+=f[b][1]-f[b][0]-1;return d}const AY={resolve:OY,tokenize:IY},NY={partial:!0,tokenize:MY};function OY(e){return qM(e),e}function IY(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(c)}function s(c){return c===null?a(c):yt(c)?e.check(NY,l,a)(c):(e.consume(c),s)}function a(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function l(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function MY(e,t,n){const r=this;return s;function s(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Zt(e,a,"linePrefix")}function a(l){if(l===null||yt(l))return n(l);const c=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function HM(e,t,n,r,s,a,l,c,f){const d=f||Number.POSITIVE_INFINITY;let h=0;return m;function m(E){return E===60?(e.enter(r),e.enter(s),e.enter(a),e.consume(E),e.exit(a),b):E===null||E===32||E===41||oh(E)?n(E):(e.enter(r),e.enter(l),e.enter(c),e.enter("chunkString",{contentType:"string"}),S(E))}function b(E){return E===62?(e.enter(a),e.consume(E),e.exit(a),e.exit(s),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),y(E))}function y(E){return E===62?(e.exit("chunkString"),e.exit(c),b(E)):E===null||E===60||yt(E)?n(E):(e.consume(E),E===92?k:y)}function k(E){return E===60||E===62||E===92?(e.consume(E),y):y(E)}function S(E){return!h&&(E===null||E===41||xn(E))?(e.exit("chunkString"),e.exit(c),e.exit(l),e.exit(r),t(E)):h<d&&E===40?(e.consume(E),h++,S):E===41?(e.consume(E),h--,S):E===null||E===32||E===40||oh(E)?n(E):(e.consume(E),E===92?C:S)}function C(E){return E===40||E===41||E===92?(e.consume(E),S):S(E)}}function VM(e,t,n,r,s,a){const l=this;let c=0,f;return d;function d(y){return e.enter(r),e.enter(s),e.consume(y),e.exit(s),e.enter(a),h}function h(y){return c>999||y===null||y===91||y===93&&!f||y===94&&!c&&"_hiddenFootnoteSupport"in l.parser.constructs?n(y):y===93?(e.exit(a),e.enter(s),e.consume(y),e.exit(s),e.exit(r),t):yt(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===null||y===91||y===93||yt(y)||c++>999?(e.exit("chunkString"),h(y)):(e.consume(y),f||(f=!Ut(y)),y===92?b:m)}function b(y){return y===91||y===92||y===93?(e.consume(y),c++,m):m(y)}}function GM(e,t,n,r,s,a){let l;return c;function c(b){return b===34||b===39||b===40?(e.enter(r),e.enter(s),e.consume(b),e.exit(s),l=b===40?41:b,f):n(b)}function f(b){return b===l?(e.enter(s),e.consume(b),e.exit(s),e.exit(r),t):(e.enter(a),d(b))}function d(b){return b===l?(e.exit(a),f(l)):b===null?n(b):yt(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),Zt(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(b))}function h(b){return b===l||b===null||yt(b)?(e.exit("chunkString"),d(b)):(e.consume(b),b===92?m:h)}function m(b){return b===l||b===92?(e.consume(b),h):h(b)}}function kc(e,t){let n;return r;function r(s){return yt(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):Ut(s)?Zt(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const DY={name:"definition",tokenize:jY},LY={partial:!0,tokenize:zY};function jY(e,t,n){const r=this;let s;return a;function a(y){return e.enter("definition"),l(y)}function l(y){return VM.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function c(y){return s=Ni(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),f):n(y)}function f(y){return xn(y)?kc(e,d)(y):d(y)}function d(y){return HM(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function h(y){return e.attempt(LY,m,m)(y)}function m(y){return Ut(y)?Zt(e,b,"whitespace")(y):b(y)}function b(y){return y===null||yt(y)?(e.exit("definition"),r.parser.defined.push(s),t(y)):n(y)}}function zY(e,t,n){return r;function r(c){return xn(c)?kc(e,s)(c):n(c)}function s(c){return GM(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return Ut(c)?Zt(e,l,"whitespace")(c):l(c)}function l(c){return c===null||yt(c)?t(c):n(c)}}const PY={name:"hardBreakEscape",tokenize:$Y};function $Y(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),s}function s(a){return yt(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const BY={name:"headingAtx",resolve:FY,tokenize:UY};function FY(e,t){let n=e.length-2,r=3,s,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(s={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},ni(e,r,n-r+1,[["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t]])),e}function UY(e,t,n){let r=0;return s;function s(h){return e.enter("atxHeading"),a(h)}function a(h){return e.enter("atxHeadingSequence"),l(h)}function l(h){return h===35&&r++<6?(e.consume(h),l):h===null||xn(h)?(e.exit("atxHeadingSequence"),c(h)):n(h)}function c(h){return h===35?(e.enter("atxHeadingSequence"),f(h)):h===null||yt(h)?(e.exit("atxHeading"),t(h)):Ut(h)?Zt(e,c,"whitespace")(h):(e.enter("atxHeadingText"),d(h))}function f(h){return h===35?(e.consume(h),f):(e.exit("atxHeadingSequence"),c(h))}function d(h){return h===null||h===35||xn(h)?(e.exit("atxHeadingText"),c(h)):(e.consume(h),d)}}const qY=["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","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],zC=["pre","script","style","textarea"],HY={concrete:!0,name:"htmlFlow",resolveTo:WY,tokenize:KY},VY={partial:!0,tokenize:XY},GY={partial:!0,tokenize:YY};function WY(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function KY(e,t,n){const r=this;let s,a,l,c,f;return d;function d(L){return h(L)}function h(L){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(L),m}function m(L){return L===33?(e.consume(L),b):L===47?(e.consume(L),a=!0,S):L===63?(e.consume(L),s=3,r.interrupt?t:N):wr(L)?(e.consume(L),l=String.fromCharCode(L),C):n(L)}function b(L){return L===45?(e.consume(L),s=2,y):L===91?(e.consume(L),s=5,c=0,k):wr(L)?(e.consume(L),s=4,r.interrupt?t:N):n(L)}function y(L){return L===45?(e.consume(L),r.interrupt?t:N):n(L)}function k(L){const Z="CDATA[";return L===Z.charCodeAt(c++)?(e.consume(L),c===Z.length?r.interrupt?t:U:k):n(L)}function S(L){return wr(L)?(e.consume(L),l=String.fromCharCode(L),C):n(L)}function C(L){if(L===null||L===47||L===62||xn(L)){const Z=L===47,re=l.toLowerCase();return!Z&&!a&&zC.includes(re)?(s=1,r.interrupt?t(L):U(L)):qY.includes(l.toLowerCase())?(s=6,Z?(e.consume(L),E):r.interrupt?t(L):U(L)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(L):a?T(L):R(L))}return L===45||mr(L)?(e.consume(L),l+=String.fromCharCode(L),C):n(L)}function E(L){return L===62?(e.consume(L),r.interrupt?t:U):n(L)}function T(L){return Ut(L)?(e.consume(L),T):O(L)}function R(L){return L===47?(e.consume(L),O):L===58||L===95||wr(L)?(e.consume(L),_):Ut(L)?(e.consume(L),R):O(L)}function _(L){return L===45||L===46||L===58||L===95||mr(L)?(e.consume(L),_):D(L)}function D(L){return L===61?(e.consume(L),A):Ut(L)?(e.consume(L),D):R(L)}function A(L){return L===null||L===60||L===61||L===62||L===96?n(L):L===34||L===39?(e.consume(L),f=L,I):Ut(L)?(e.consume(L),A):P(L)}function I(L){return L===f?(e.consume(L),f=null,$):L===null||yt(L)?n(L):(e.consume(L),I)}function P(L){return L===null||L===34||L===39||L===47||L===60||L===61||L===62||L===96||xn(L)?D(L):(e.consume(L),P)}function $(L){return L===47||L===62||Ut(L)?R(L):n(L)}function O(L){return L===62?(e.consume(L),Y):n(L)}function Y(L){return L===null||yt(L)?U(L):Ut(L)?(e.consume(L),Y):n(L)}function U(L){return L===45&&s===2?(e.consume(L),H):L===60&&s===1?(e.consume(L),W):L===62&&s===4?(e.consume(L),z):L===63&&s===3?(e.consume(L),N):L===93&&s===5?(e.consume(L),K):yt(L)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(VY,V,B)(L)):L===null||yt(L)?(e.exit("htmlFlowData"),B(L)):(e.consume(L),U)}function B(L){return e.check(GY,j,V)(L)}function j(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),q}function q(L){return L===null||yt(L)?B(L):(e.enter("htmlFlowData"),U(L))}function H(L){return L===45?(e.consume(L),N):U(L)}function W(L){return L===47?(e.consume(L),l="",F):U(L)}function F(L){if(L===62){const Z=l.toLowerCase();return zC.includes(Z)?(e.consume(L),z):U(L)}return wr(L)&&l.length<8?(e.consume(L),l+=String.fromCharCode(L),F):U(L)}function K(L){return L===93?(e.consume(L),N):U(L)}function N(L){return L===62?(e.consume(L),z):L===45&&s===2?(e.consume(L),N):U(L)}function z(L){return L===null||yt(L)?(e.exit("htmlFlowData"),V(L)):(e.consume(L),z)}function V(L){return e.exit("htmlFlow"),t(L)}}function YY(e,t,n){const r=this;return s;function s(l){return yt(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a):n(l)}function a(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function XY(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(ff,t,n)}}const ZY={name:"htmlText",tokenize:QY};function QY(e,t,n){const r=this;let s,a,l;return c;function c(N){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(N),f}function f(N){return N===33?(e.consume(N),d):N===47?(e.consume(N),D):N===63?(e.consume(N),R):wr(N)?(e.consume(N),P):n(N)}function d(N){return N===45?(e.consume(N),h):N===91?(e.consume(N),a=0,k):wr(N)?(e.consume(N),T):n(N)}function h(N){return N===45?(e.consume(N),y):n(N)}function m(N){return N===null?n(N):N===45?(e.consume(N),b):yt(N)?(l=m,W(N)):(e.consume(N),m)}function b(N){return N===45?(e.consume(N),y):m(N)}function y(N){return N===62?H(N):N===45?b(N):m(N)}function k(N){const z="CDATA[";return N===z.charCodeAt(a++)?(e.consume(N),a===z.length?S:k):n(N)}function S(N){return N===null?n(N):N===93?(e.consume(N),C):yt(N)?(l=S,W(N)):(e.consume(N),S)}function C(N){return N===93?(e.consume(N),E):S(N)}function E(N){return N===62?H(N):N===93?(e.consume(N),E):S(N)}function T(N){return N===null||N===62?H(N):yt(N)?(l=T,W(N)):(e.consume(N),T)}function R(N){return N===null?n(N):N===63?(e.consume(N),_):yt(N)?(l=R,W(N)):(e.consume(N),R)}function _(N){return N===62?H(N):R(N)}function D(N){return wr(N)?(e.consume(N),A):n(N)}function A(N){return N===45||mr(N)?(e.consume(N),A):I(N)}function I(N){return yt(N)?(l=I,W(N)):Ut(N)?(e.consume(N),I):H(N)}function P(N){return N===45||mr(N)?(e.consume(N),P):N===47||N===62||xn(N)?$(N):n(N)}function $(N){return N===47?(e.consume(N),H):N===58||N===95||wr(N)?(e.consume(N),O):yt(N)?(l=$,W(N)):Ut(N)?(e.consume(N),$):H(N)}function O(N){return N===45||N===46||N===58||N===95||mr(N)?(e.consume(N),O):Y(N)}function Y(N){return N===61?(e.consume(N),U):yt(N)?(l=Y,W(N)):Ut(N)?(e.consume(N),Y):$(N)}function U(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),s=N,B):yt(N)?(l=U,W(N)):Ut(N)?(e.consume(N),U):(e.consume(N),j)}function B(N){return N===s?(e.consume(N),s=void 0,q):N===null?n(N):yt(N)?(l=B,W(N)):(e.consume(N),B)}function j(N){return N===null||N===34||N===39||N===60||N===61||N===96?n(N):N===47||N===62||xn(N)?$(N):(e.consume(N),j)}function q(N){return N===47||N===62||xn(N)?$(N):n(N)}function H(N){return N===62?(e.consume(N),e.exit("htmlTextData"),e.exit("htmlText"),t):n(N)}function W(N){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),F}function F(N){return Ut(N)?Zt(e,K,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):K(N)}function K(N){return e.enter("htmlTextData"),l(N)}}const k0={name:"labelEnd",resolveAll:nX,resolveTo:rX,tokenize:iX},JY={tokenize:sX},eX={tokenize:oX},tX={tokenize:aX};function nX(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const s=r.type==="labelImage"?4:2;r.type="data",t+=s}}return e.length!==n.length&&ni(e,0,e.length,n),e}function rX(e,t){let n=e.length,r=0,s,a,l,c;for(;n--;)if(s=e[n][1],a){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(a=n,s.type!=="labelLink")){r=2;break}}else s.type==="labelEnd"&&(l=n);const f={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},d={type:"label",start:{...e[a][1].start},end:{...e[l][1].end}},h={type:"labelText",start:{...e[a+r+2][1].end},end:{...e[l-2][1].start}};return c=[["enter",f,t],["enter",d,t]],c=mi(c,e.slice(a+1,a+r+3)),c=mi(c,[["enter",h,t]]),c=mi(c,rm(t.parser.constructs.insideSpan.null,e.slice(a+r+4,l-3),t)),c=mi(c,[["exit",h,t],e[l-2],e[l-1],["exit",d,t]]),c=mi(c,e.slice(l+1)),c=mi(c,[["exit",f,t]]),ni(e,a,e.length,c),e}function iX(e,t,n){const r=this;let s=r.events.length,a,l;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){a=r.events[s][1];break}return c;function c(b){return a?a._inactive?m(b):(l=r.parser.defined.includes(Ni(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),f):n(b)}function f(b){return b===40?e.attempt(JY,h,l?h:m)(b):b===91?e.attempt(eX,h,l?d:m)(b):l?h(b):m(b)}function d(b){return e.attempt(tX,h,m)(b)}function h(b){return t(b)}function m(b){return a._balanced=!0,n(b)}}function sX(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),s}function s(m){return xn(m)?kc(e,a)(m):a(m)}function a(m){return m===41?h(m):HM(e,l,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function l(m){return xn(m)?kc(e,f)(m):h(m)}function c(m){return n(m)}function f(m){return m===34||m===39||m===40?GM(e,d,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):h(m)}function d(m){return xn(m)?kc(e,h)(m):h(m)}function h(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function oX(e,t,n){const r=this;return s;function s(c){return VM.call(r,e,a,l,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(Ni(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function l(c){return n(c)}}function aX(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),s}function s(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const lX={name:"labelStartImage",resolveAll:k0.resolveAll,tokenize:uX};function uX(e,t,n){const r=this;return s;function s(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),a}function a(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),l):n(c)}function l(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const cX={name:"labelStartLink",resolveAll:k0.resolveAll,tokenize:fX};function fX(e,t,n){const r=this;return s;function s(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),a}function a(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const ay={name:"lineEnding",tokenize:dX};function dX(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Zt(e,t,"linePrefix")}}const wp={name:"thematicBreak",tokenize:pX};function pX(e,t,n){let r=0,s;return a;function a(d){return e.enter("thematicBreak"),l(d)}function l(d){return s=d,c(d)}function c(d){return d===s?(e.enter("thematicBreakSequence"),f(d)):r>=3&&(d===null||yt(d))?(e.exit("thematicBreak"),t(d)):n(d)}function f(d){return d===s?(e.consume(d),r++,f):(e.exit("thematicBreakSequence"),Ut(d)?Zt(e,c,"whitespace")(d):c(d))}}const Dr={continuation:{tokenize:bX},exit:vX,name:"list",tokenize:gX},hX={partial:!0,tokenize:xX},mX={partial:!0,tokenize:yX};function gX(e,t,n){const r=this,s=r.events[r.events.length-1];let a=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,l=0;return c;function c(y){const k=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:kv(y)){if(r.containerState.type||(r.containerState.type=k,e.enter(k,{_container:!0})),k==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(wp,n,d)(y):d(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(y)}return n(y)}function f(y){return kv(y)&&++l<10?(e.consume(y),f):(!r.interrupt||l<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),d(y)):n(y)}function d(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(ff,r.interrupt?n:h,e.attempt(hX,b,m))}function h(y){return r.containerState.initialBlankLine=!0,a++,b(y)}function m(y){return Ut(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),b):n(y)}function b(y){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function bX(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ff,s,a);function s(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Zt(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!Ut(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(mX,t,l)(c))}function l(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,Zt(e,e.attempt(Dr,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function yX(e,t,n){const r=this;return Zt(e,s,"listItemIndent",r.containerState.size+1);function s(a){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(a):n(a)}}function vX(e){e.exit(this.containerState.type)}function xX(e,t,n){const r=this;return Zt(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(a){const l=r.events[r.events.length-1];return!Ut(a)&&l&&l[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const PC={name:"setextUnderline",resolveTo:kX,tokenize:SX};function kX(e,t){let n=e.length,r,s,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",a?(e.splice(s,0,["enter",l,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function SX(e,t,n){const r=this;let s;return a;function a(d){let h=r.events.length,m;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){m=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),s=d,l(d)):n(d)}function l(d){return e.enter("setextHeadingLineSequence"),c(d)}function c(d){return d===s?(e.consume(d),c):(e.exit("setextHeadingLineSequence"),Ut(d)?Zt(e,f,"lineSuffix")(d):f(d))}function f(d){return d===null||yt(d)?(e.exit("setextHeadingLine"),t(d)):n(d)}}const wX={tokenize:EX};function EX(e){const t=this,n=e.attempt(ff,r,e.attempt(this.parser.constructs.flowInitial,s,Zt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(AY,s)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const TX={resolveAll:KM()},CX=WM("string"),RX=WM("text");function WM(e){return{resolveAll:KM(e==="text"?_X:void 0),tokenize:t};function t(n){const r=this,s=this.parser.constructs[e],a=n.attempt(s,l,c);return l;function l(h){return d(h)?a(h):c(h)}function c(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),f}function f(h){return d(h)?(n.exit("data"),a(h)):(n.consume(h),f)}function d(h){if(h===null)return!0;const m=s[h];let b=-1;if(m)for(;++b<m.length;){const y=m[b];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function KM(e){return t;function t(n,r){let s=-1,a;for(;++s<=n.length;)a===void 0?n[s]&&n[s][1].type==="data"&&(a=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==a+2&&(n[a][1].end=n[s-1][1].end,n.splice(a+2,s-a-2),s=a+2),a=void 0);return e?e(n,r):n}}function _X(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],s=t.sliceStream(r);let a=s.length,l=-1,c=0,f;for(;a--;){const d=s[a];if(typeof d=="string"){for(l=d.length;d.charCodeAt(l-1)===32;)c++,l--;if(l)break;l=-1}else if(d===-2)f=!0,c++;else if(d!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const d={type:n===e.length||f||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?l:r.start._bufferIndex+l,_index:r.start._index+a,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:{...r.end}};r.end={...d.start},r.start.offset===r.end.offset?Object.assign(r,d):(e.splice(n,0,["enter",d,t],["exit",d,t]),n+=2)}n++}return e}const AX={42:Dr,43:Dr,45:Dr,48:Dr,49:Dr,50:Dr,51:Dr,52:Dr,53:Dr,54:Dr,55:Dr,56:Dr,57:Dr,62:BM},NX={91:DY},OX={[-2]:oy,[-1]:oy,32:oy},IX={35:BY,42:wp,45:[PC,wp],60:HY,61:PC,95:wp,96:jC,126:jC},MX={38:UM,92:FM},DX={[-5]:ay,[-4]:ay,[-3]:ay,33:lX,38:UM,42:Sv,60:[cY,ZY],91:cX,92:[PY,FM],93:k0,95:Sv,96:wY},LX={null:[Sv,TX]},jX={null:[42,95]},zX={null:[]},PX=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:jX,contentInitial:NX,disable:zX,document:AX,flow:IX,flowInitial:OX,insideSpan:LX,string:MX,text:DX},Symbol.toStringTag,{value:"Module"}));function $X(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const s={},a=[];let l=[],c=[];const f={attempt:I(D),check:I(A),consume:T,enter:R,exit:_,interrupt:I(A,{interrupt:!0})},d={code:null,containerState:{},defineSkip:S,events:[],now:k,parser:e,previous:null,sliceSerialize:b,sliceStream:y,write:m};let h=t.tokenize.call(d,f);return t.resolveAll&&a.push(t),d;function m(Y){return l=mi(l,Y),C(),l[l.length-1]!==null?[]:(P(t,0),d.events=rm(a,d.events,d),d.events)}function b(Y,U){return FX(y(Y),U)}function y(Y){return BX(l,Y)}function k(){const{_bufferIndex:Y,_index:U,line:B,column:j,offset:q}=r;return{_bufferIndex:Y,_index:U,line:B,column:j,offset:q}}function S(Y){s[Y.line]=Y.column,O()}function C(){let Y;for(;r._index<l.length;){const U=l[r._index];if(typeof U=="string")for(Y=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===Y&&r._bufferIndex<U.length;)E(U.charCodeAt(r._bufferIndex));else E(U)}}function E(Y){h=h(Y)}function T(Y){yt(Y)?(r.line++,r.column=1,r.offset+=Y===-3?2:1,O()):Y!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),d.previous=Y}function R(Y,U){const B=U||{};return B.type=Y,B.start=k(),d.events.push(["enter",B,d]),c.push(B),B}function _(Y){const U=c.pop();return U.end=k(),d.events.push(["exit",U,d]),U}function D(Y,U){P(Y,U.from)}function A(Y,U){U.restore()}function I(Y,U){return B;function B(j,q,H){let W,F,K,N;return Array.isArray(j)?V(j):"tokenize"in j?V([j]):z(j);function z(ie){return ae;function ae(le){const ce=le!==null&&ie[le],Ee=le!==null&&ie.null,be=[...Array.isArray(ce)?ce:ce?[ce]:[],...Array.isArray(Ee)?Ee:Ee?[Ee]:[]];return V(be)(le)}}function V(ie){return W=ie,F=0,ie.length===0?H:L(ie[F])}function L(ie){return ae;function ae(le){return N=$(),K=ie,ie.partial||(d.currentConstruct=ie),ie.name&&d.parser.constructs.disable.null.includes(ie.name)?re():ie.tokenize.call(U?Object.assign(Object.create(d),U):d,f,Z,re)(le)}}function Z(ie){return Y(K,N),q}function re(ie){return N.restore(),++F<W.length?L(W[F]):H}}}function P(Y,U){Y.resolveAll&&!a.includes(Y)&&a.push(Y),Y.resolve&&ni(d.events,U,d.events.length-U,Y.resolve(d.events.slice(U),d)),Y.resolveTo&&(d.events=Y.resolveTo(d.events,d))}function $(){const Y=k(),U=d.previous,B=d.currentConstruct,j=d.events.length,q=Array.from(c);return{from:j,restore:H};function H(){r=Y,d.previous=U,d.currentConstruct=B,d.events.length=j,c=q,O()}}function O(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function BX(e,t){const n=t.start._index,r=t.start._bufferIndex,s=t.end._index,a=t.end._bufferIndex;let l;if(n===s)l=[e[n].slice(r,a)];else{if(l=e.slice(n,s),r>-1){const c=l[0];typeof c=="string"?l[0]=c.slice(r):l.shift()}a>0&&l.push(e[s].slice(0,a))}return l}function FX(e,t){let n=-1;const r=[];let s;for(;++n<e.length;){const a=e[n];let l;if(typeof a=="string")l=a;else switch(a){case-5:{l="\r";break}case-4:{l=`
28
+ `;break}case-3:{l=`\r
29
+ `;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&s)continue;l=" ";break}default:l=String.fromCharCode(a)}s=a===-2,r.push(l)}return r.join("")}function UX(e){const r={constructs:PM([PX,...(e||{}).extensions||[]]),content:s(rY),defined:[],document:s(sY),flow:s(wX),lazy:{},string:s(CX),text:s(RX)};return r;function s(a){return l;function l(c){return $X(r,a,c)}}}function qX(e){for(;!qM(e););return e}const $C=/[\0\t\n\r]/g;function HX(){let e=1,t="",n=!0,r;return s;function s(a,l,c){const f=[];let d,h,m,b,y;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(l||void 0).decode(a)),m=0,t="",n&&(a.charCodeAt(0)===65279&&m++,n=void 0);m<a.length;){if($C.lastIndex=m,d=$C.exec(a),b=d&&d.index!==void 0?d.index:a.length,y=a.charCodeAt(b),!d){t=a.slice(m);break}if(y===10&&m===b&&r)f.push(-3),r=void 0;else switch(r&&(f.push(-5),r=void 0),m<b&&(f.push(a.slice(m,b)),e+=b-m),y){case 0:{f.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,f.push(-2);e++<h;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:r=!0,e=1}m=b+1}return c&&(r&&f.push(-5),t&&f.push(t),f.push(null)),f}}const VX=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function GX(e){return e.replace(VX,WX)}function WX(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),a=s===120||s===88;return $M(n.slice(a?2:1),a?16:10)}return x0(n)||e}const YM={}.hasOwnProperty;function KX(e,t,n){return typeof t!="string"&&(n=t,t=void 0),YX(n)(qX(UX(n).document().write(HX()(e,t,!0))))}function YX(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Me),autolinkProtocol:$,autolinkEmail:$,atxHeading:a(Ae),blockQuote:a(Ee),characterEscape:$,characterReference:$,codeFenced:a(be),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:a(be,l),codeText:a(ue,l),codeTextData:$,data:$,codeFlowValue:$,definition:a(ge),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:a(Se),hardBreakEscape:a(ke),hardBreakTrailing:a(ke),htmlFlow:a(xe,l),htmlFlowData:$,htmlText:a(xe,l),htmlTextData:$,image:a(Ce),label:l,link:a(Me),listItem:a(Fe),listItemValue:b,listOrdered:a(ze,m),listUnordered:a(ze),paragraph:a(ye),reference:L,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:a(Ae),strong:a(_e),thematicBreak:a(fe)},exit:{atxHeading:f(),atxHeadingSequence:D,autolink:f(),autolinkEmail:ce,autolinkProtocol:le,blockQuote:f(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:re,characterReferenceMarkerNumeric:re,characterReferenceValue:ie,characterReference:ae,codeFenced:f(C),codeFencedFence:S,codeFencedFenceInfo:y,codeFencedFenceMeta:k,codeFlowValue:O,codeIndented:f(E),codeText:f(q),codeTextData:O,data:O,definition:f(),definitionDestinationString:_,definitionLabelString:T,definitionTitleString:R,emphasis:f(),hardBreakEscape:f(U),hardBreakTrailing:f(U),htmlFlow:f(B),htmlFlowData:O,htmlText:f(j),htmlTextData:O,image:f(W),label:K,labelText:F,lineEnding:Y,link:f(H),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:Z,resourceDestinationString:N,resourceTitleString:z,resource:V,setextHeading:f(P),setextHeadingLineSequence:I,setextHeadingText:A,strong:f(),thematicBreak:f()}};XM(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(Q){let ne={type:"root",children:[]};const we={stack:[ne],tokenStack:[],config:t,enter:c,exit:d,buffer:l,resume:h,data:n},Pe=[];let Ye=-1;for(;++Ye<Q.length;)if(Q[Ye][1].type==="listOrdered"||Q[Ye][1].type==="listUnordered")if(Q[Ye][0]==="enter")Pe.push(Ye);else{const Ze=Pe.pop();Ye=s(Q,Ze,Ye)}for(Ye=-1;++Ye<Q.length;){const Ze=t[Q[Ye][0]];YM.call(Ze,Q[Ye][1].type)&&Ze[Q[Ye][1].type].call(Object.assign({sliceSerialize:Q[Ye][2].sliceSerialize},we),Q[Ye][1])}if(we.tokenStack.length>0){const Ze=we.tokenStack[we.tokenStack.length-1];(Ze[1]||BC).call(we,void 0,Ze[0])}for(ne.position={start:fo(Q.length>0?Q[0][1].start:{line:1,column:1,offset:0}),end:fo(Q.length>0?Q[Q.length-2][1].end:{line:1,column:1,offset:0})},Ye=-1;++Ye<t.transforms.length;)ne=t.transforms[Ye](ne)||ne;return ne}function s(Q,ne,we){let Pe=ne-1,Ye=-1,Ze=!1,bt,Je,vt,kt;for(;++Pe<=we;){const nt=Q[Pe];switch(nt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{nt[0]==="enter"?Ye++:Ye--,kt=void 0;break}case"lineEndingBlank":{nt[0]==="enter"&&(bt&&!kt&&!Ye&&!vt&&(vt=Pe),kt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:kt=void 0}if(!Ye&&nt[0]==="enter"&&nt[1].type==="listItemPrefix"||Ye===-1&&nt[0]==="exit"&&(nt[1].type==="listUnordered"||nt[1].type==="listOrdered")){if(bt){let rt=Pe;for(Je=void 0;rt--;){const ct=Q[rt];if(ct[1].type==="lineEnding"||ct[1].type==="lineEndingBlank"){if(ct[0]==="exit")continue;Je&&(Q[Je][1].type="lineEndingBlank",Ze=!0),ct[1].type="lineEnding",Je=rt}else if(!(ct[1].type==="linePrefix"||ct[1].type==="blockQuotePrefix"||ct[1].type==="blockQuotePrefixWhitespace"||ct[1].type==="blockQuoteMarker"||ct[1].type==="listItemIndent"))break}vt&&(!Je||vt<Je)&&(bt._spread=!0),bt.end=Object.assign({},Je?Q[Je][1].start:nt[1].end),Q.splice(Je||Pe,0,["exit",bt,nt[2]]),Pe++,we++}if(nt[1].type==="listItemPrefix"){const rt={type:"listItem",_spread:!1,start:Object.assign({},nt[1].start),end:void 0};bt=rt,Q.splice(Pe,0,["enter",rt,nt[2]]),Pe++,we++,vt=void 0,kt=!0}}}return Q[ne][1]._spread=Ze,we}function a(Q,ne){return we;function we(Pe){c.call(this,Q(Pe),Pe),ne&&ne.call(this,Pe)}}function l(){this.stack.push({type:"fragment",children:[]})}function c(Q,ne,we){this.stack[this.stack.length-1].children.push(Q),this.stack.push(Q),this.tokenStack.push([ne,we||void 0]),Q.position={start:fo(ne.start),end:void 0}}function f(Q){return ne;function ne(we){Q&&Q.call(this,we),d.call(this,we)}}function d(Q,ne){const we=this.stack.pop(),Pe=this.tokenStack.pop();if(Pe)Pe[0].type!==Q.type&&(ne?ne.call(this,Q,Pe[0]):(Pe[1]||BC).call(this,Q,Pe[0]));else throw new Error("Cannot close `"+Q.type+"` ("+xc({start:Q.start,end:Q.end})+"): it’s not open");we.position.end=fo(Q.end)}function h(){return v0(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function b(Q){if(this.data.expectingFirstListItemValue){const ne=this.stack[this.stack.length-2];ne.start=Number.parseInt(this.sliceSerialize(Q),10),this.data.expectingFirstListItemValue=void 0}}function y(){const Q=this.resume(),ne=this.stack[this.stack.length-1];ne.lang=Q}function k(){const Q=this.resume(),ne=this.stack[this.stack.length-1];ne.meta=Q}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const Q=this.resume(),ne=this.stack[this.stack.length-1];ne.value=Q.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const Q=this.resume(),ne=this.stack[this.stack.length-1];ne.value=Q.replace(/(\r?\n|\r)$/g,"")}function T(Q){const ne=this.resume(),we=this.stack[this.stack.length-1];we.label=ne,we.identifier=Ni(this.sliceSerialize(Q)).toLowerCase()}function R(){const Q=this.resume(),ne=this.stack[this.stack.length-1];ne.title=Q}function _(){const Q=this.resume(),ne=this.stack[this.stack.length-1];ne.url=Q}function D(Q){const ne=this.stack[this.stack.length-1];if(!ne.depth){const we=this.sliceSerialize(Q).length;ne.depth=we}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function I(Q){const ne=this.stack[this.stack.length-1];ne.depth=this.sliceSerialize(Q).codePointAt(0)===61?1:2}function P(){this.data.setextHeadingSlurpLineEnding=void 0}function $(Q){const we=this.stack[this.stack.length-1].children;let Pe=we[we.length-1];(!Pe||Pe.type!=="text")&&(Pe=ee(),Pe.position={start:fo(Q.start),end:void 0},we.push(Pe)),this.stack.push(Pe)}function O(Q){const ne=this.stack.pop();ne.value+=this.sliceSerialize(Q),ne.position.end=fo(Q.end)}function Y(Q){const ne=this.stack[this.stack.length-1];if(this.data.atHardBreak){const we=ne.children[ne.children.length-1];we.position.end=fo(Q.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ne.type)&&($.call(this,Q),O.call(this,Q))}function U(){this.data.atHardBreak=!0}function B(){const Q=this.resume(),ne=this.stack[this.stack.length-1];ne.value=Q}function j(){const Q=this.resume(),ne=this.stack[this.stack.length-1];ne.value=Q}function q(){const Q=this.resume(),ne=this.stack[this.stack.length-1];ne.value=Q}function H(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const ne=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=ne,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function W(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const ne=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=ne,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function F(Q){const ne=this.sliceSerialize(Q),we=this.stack[this.stack.length-2];we.label=GX(ne),we.identifier=Ni(ne).toLowerCase()}function K(){const Q=this.stack[this.stack.length-1],ne=this.resume(),we=this.stack[this.stack.length-1];if(this.data.inReference=!0,we.type==="link"){const Pe=Q.children;we.children=Pe}else we.alt=ne}function N(){const Q=this.resume(),ne=this.stack[this.stack.length-1];ne.url=Q}function z(){const Q=this.resume(),ne=this.stack[this.stack.length-1];ne.title=Q}function V(){this.data.inReference=void 0}function L(){this.data.referenceType="collapsed"}function Z(Q){const ne=this.resume(),we=this.stack[this.stack.length-1];we.label=ne,we.identifier=Ni(this.sliceSerialize(Q)).toLowerCase(),this.data.referenceType="full"}function re(Q){this.data.characterReferenceType=Q.type}function ie(Q){const ne=this.sliceSerialize(Q),we=this.data.characterReferenceType;let Pe;we?(Pe=$M(ne,we==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Pe=x0(ne);const Ye=this.stack[this.stack.length-1];Ye.value+=Pe}function ae(Q){const ne=this.stack.pop();ne.position.end=fo(Q.end)}function le(Q){O.call(this,Q);const ne=this.stack[this.stack.length-1];ne.url=this.sliceSerialize(Q)}function ce(Q){O.call(this,Q);const ne=this.stack[this.stack.length-1];ne.url="mailto:"+this.sliceSerialize(Q)}function Ee(){return{type:"blockquote",children:[]}}function be(){return{type:"code",lang:null,meta:null,value:""}}function ue(){return{type:"inlineCode",value:""}}function ge(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Se(){return{type:"emphasis",children:[]}}function Ae(){return{type:"heading",depth:0,children:[]}}function ke(){return{type:"break"}}function xe(){return{type:"html",value:""}}function Ce(){return{type:"image",title:null,url:"",alt:null}}function Me(){return{type:"link",title:null,url:"",children:[]}}function ze(Q){return{type:"list",ordered:Q.type==="listOrdered",start:null,spread:Q._spread,children:[]}}function Fe(Q){return{type:"listItem",spread:Q._spread,checked:null,children:[]}}function ye(){return{type:"paragraph",children:[]}}function _e(){return{type:"strong",children:[]}}function ee(){return{type:"text",value:""}}function fe(){return{type:"thematicBreak"}}}function fo(e){return{line:e.line,column:e.column,offset:e.offset}}function XM(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?XM(e,r):XX(e,r)}}function XX(e,t){let n;for(n in t)if(YM.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function BC(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+xc({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+xc({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+xc({start:t.start,end:t.end})+") is still open")}function ZX(e){const t=this;t.parser=n;function n(r){return KX(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function QX(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function JX(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
30
+ `}]}function eZ(e,t){const n=t.value?t.value+`
31
+ `:"",r={};t.lang&&(r.className=["language-"+t.lang]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function tZ(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function nZ(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function rZ(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),s=Kl(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let l,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=a+1,c+=1,e.footnoteCounts.set(r,c);const f={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,f);const d={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(t,d),e.applyData(t,d)}function iZ(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function sZ(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function ZM(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const s=e.all(t),a=s[0];a&&a.type==="text"?a.value="["+a.value:s.unshift({type:"text",value:"["});const l=s[s.length-1];return l&&l.type==="text"?l.value+=r:s.push({type:"text",value:r}),s}function oZ(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ZM(e,t);const s={src:Kl(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,a),e.applyData(t,a)}function aZ(e,t){const n={src:Kl(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function lZ(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function uZ(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ZM(e,t);const s={href:Kl(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function cZ(e,t){const n={href:Kl(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function fZ(e,t,n){const r=e.all(t),s=n?dZ(n):QM(t),a={},l=[];if(typeof t.checked=="boolean"){const h=r[0];let m;h&&h.type==="element"&&h.tagName==="p"?m=h:(m={type:"element",tagName:"p",properties:{},children:[]},r.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let c=-1;for(;++c<r.length;){const h=r[c];(s||c!==0||h.type!=="element"||h.tagName!=="p")&&l.push({type:"text",value:`
32
+ `}),h.type==="element"&&h.tagName==="p"&&!s?l.push(...h.children):l.push(h)}const f=r[r.length-1];f&&(s||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
33
+ `});const d={type:"element",tagName:"li",properties:a,children:l};return e.patch(t,d),e.applyData(t,d)}function dZ(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=QM(n[r])}return t}function QM(e){const t=e.spread;return t??e.children.length>1}function pZ(e,t){const n={},r=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<r.length;){const l=r[s];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function hZ(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function mZ(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function gZ(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function bZ(e,t){const n=e.all(t),r=n.shift(),s=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),s.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=m0(t.children[1]),f=OM(t.children[t.children.length-1]);c&&f&&(l.position={start:c,end:f}),s.push(l)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,a),e.applyData(t,a)}function yZ(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,c=l?l.length:t.children.length;let f=-1;const d=[];for(;++f<c;){const m=t.children[f],b={},y=l?l[f]:void 0;y&&(b.align=y);let k={type:"element",tagName:a,properties:b,children:[]};m&&(k.children=e.all(m),e.patch(m,k),k=e.applyData(m,k)),d.push(k)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(d,!0)};return e.patch(t,h),e.applyData(t,h)}function vZ(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const FC=9,UC=32;function xZ(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const a=[];for(;r;)a.push(qC(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return a.push(qC(t.slice(s),s>0,!1)),a.join("")}function qC(e,t,n){let r=0,s=e.length;if(t){let a=e.codePointAt(r);for(;a===FC||a===UC;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(s-1);for(;a===FC||a===UC;)s--,a=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function kZ(e,t){const n={type:"text",value:xZ(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function SZ(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const wZ={blockquote:QX,break:JX,code:eZ,delete:tZ,emphasis:nZ,footnoteReference:rZ,heading:iZ,html:sZ,imageReference:oZ,image:aZ,inlineCode:lZ,linkReference:uZ,link:cZ,listItem:fZ,list:pZ,paragraph:hZ,root:mZ,strong:gZ,table:bZ,tableCell:vZ,tableRow:yZ,text:kZ,thematicBreak:SZ,toml:tp,yaml:tp,definition:tp,footnoteDefinition:tp};function tp(){}const JM=-1,im=0,Sc=1,ah=2,S0=3,w0=4,E0=5,T0=6,eD=7,tD=8,HC=typeof self=="object"?self:globalThis,EZ=(e,t)=>{const n=(s,a)=>(e.set(a,s),s),r=s=>{if(e.has(s))return e.get(s);const[a,l]=t[s];switch(a){case im:case JM:return n(l,s);case Sc:{const c=n([],s);for(const f of l)c.push(r(f));return c}case ah:{const c=n({},s);for(const[f,d]of l)c[r(f)]=r(d);return c}case S0:return n(new Date(l),s);case w0:{const{source:c,flags:f}=l;return n(new RegExp(c,f),s)}case E0:{const c=n(new Map,s);for(const[f,d]of l)c.set(r(f),r(d));return c}case T0:{const c=n(new Set,s);for(const f of l)c.add(r(f));return c}case eD:{const{name:c,message:f}=l;return n(new HC[c](f),s)}case tD:return n(BigInt(l),s);case"BigInt":return n(Object(BigInt(l)),s);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:c}=new Uint8Array(l);return n(new DataView(c),l)}}return n(new HC[a](l),s)};return r},VC=e=>EZ(new Map,e)(0),ul="",{toString:TZ}={},{keys:CZ}=Object,ec=e=>{const t=typeof e;if(t!=="object"||!e)return[im,t];const n=TZ.call(e).slice(8,-1);switch(n){case"Array":return[Sc,ul];case"Object":return[ah,ul];case"Date":return[S0,ul];case"RegExp":return[w0,ul];case"Map":return[E0,ul];case"Set":return[T0,ul];case"DataView":return[Sc,n]}return n.includes("Array")?[Sc,n]:n.includes("Error")?[eD,n]:[ah,n]},np=([e,t])=>e===im&&(t==="function"||t==="symbol"),RZ=(e,t,n,r)=>{const s=(l,c)=>{const f=r.push(l)-1;return n.set(c,f),f},a=l=>{if(n.has(l))return n.get(l);let[c,f]=ec(l);switch(c){case im:{let h=l;switch(f){case"bigint":c=tD,h=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);h=null;break;case"undefined":return s([JM],l)}return s([c,h],l)}case Sc:{if(f){let b=l;return f==="DataView"?b=new Uint8Array(l.buffer):f==="ArrayBuffer"&&(b=new Uint8Array(l)),s([f,[...b]],l)}const h=[],m=s([c,h],l);for(const b of l)h.push(a(b));return m}case ah:{if(f)switch(f){case"BigInt":return s([f,l.toString()],l);case"Boolean":case"Number":case"String":return s([f,l.valueOf()],l)}if(t&&"toJSON"in l)return a(l.toJSON());const h=[],m=s([c,h],l);for(const b of CZ(l))(e||!np(ec(l[b])))&&h.push([a(b),a(l[b])]);return m}case S0:return s([c,l.toISOString()],l);case w0:{const{source:h,flags:m}=l;return s([c,{source:h,flags:m}],l)}case E0:{const h=[],m=s([c,h],l);for(const[b,y]of l)(e||!(np(ec(b))||np(ec(y))))&&h.push([a(b),a(y)]);return m}case T0:{const h=[],m=s([c,h],l);for(const b of l)(e||!np(ec(b)))&&h.push(a(b));return m}}const{message:d}=l;return s([c,{name:f,message:d}],l)};return a},GC=(e,{json:t,lossy:n}={})=>{const r=[];return RZ(!(t||n),!!t,new Map,r)(e),r},lh=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?VC(GC(e,t)):structuredClone(e):(e,t)=>VC(GC(e,t));function _Z(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function AZ(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function NZ(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||_Z,r=e.options.footnoteBackLabel||AZ,s=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let f=-1;for(;++f<e.footnoteOrder.length;){const d=e.footnoteById.get(e.footnoteOrder[f]);if(!d)continue;const h=e.all(d),m=String(d.identifier).toUpperCase(),b=Kl(m.toLowerCase());let y=0;const k=[],S=e.footnoteCounts.get(m);for(;S!==void 0&&++y<=S;){k.length>0&&k.push({type:"text",value:" "});let T=typeof n=="string"?n:n(f,y);typeof T=="string"&&(T={type:"text",value:T}),k.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+b+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(f,y),className:["data-footnote-backref"]},children:Array.isArray(T)?T:[T]})}const C=h[h.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const T=C.children[C.children.length-1];T&&T.type==="text"?T.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...k)}else h.push(...k);const E={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(h,!0)};e.patch(d,E),c.push(E)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...lh(l),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
34
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
35
+ `}]}}const df=(function(e){if(e==null)return DZ;if(typeof e=="function")return sm(e);if(typeof e=="object")return Array.isArray(e)?OZ(e):IZ(e);if(typeof e=="string")return MZ(e);throw new Error("Expected function, string, or object as test")});function OZ(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=df(e[n]);return sm(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function IZ(e){const t=e;return sm(n);function n(r){const s=r;let a;for(a in e)if(s[a]!==t[a])return!1;return!0}}function MZ(e){return sm(t);function t(n){return n&&n.type===e}}function sm(e){return t;function t(n,r,s){return!!(LZ(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function DZ(){return!0}function LZ(e){return e!==null&&typeof e=="object"&&"type"in e}const nD=[],jZ=!0,wv=!1,zZ="skip";function rD(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const a=df(s),l=r?-1:1;c(e,void 0,[])();function c(f,d,h){const m=f&&typeof f=="object"?f:{};if(typeof m.type=="string"){const y=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(f.type+(y?"<"+y+">":""))+")"})}return b;function b(){let y=nD,k,S,C;if((!t||a(f,d,h[h.length-1]||void 0))&&(y=PZ(n(f,h)),y[0]===wv))return y;if("children"in f&&f.children){const E=f;if(E.children&&y[0]!==zZ)for(S=(r?E.children.length:-1)+l,C=h.concat(E);S>-1&&S<E.children.length;){const T=E.children[S];if(k=c(T,S,C)(),k[0]===wv)return k;S=typeof k[1]=="number"?k[1]:S+l}}return y}}}function PZ(e){return Array.isArray(e)?e:typeof e=="number"?[jZ,e]:e==null?nD:[e]}function om(e,t,n,r){let s,a,l;typeof t=="function"&&typeof n!="function"?(a=void 0,l=t,s=n):(a=t,l=n,s=r),rD(e,a,c,s);function c(f,d){const h=d[d.length-1],m=h?h.children.indexOf(f):void 0;return l(f,m,h)}}const Ev={}.hasOwnProperty,$Z={};function BZ(e,t){const n=t||$Z,r=new Map,s=new Map,a=new Map,l={...wZ,...n.handlers},c={all:d,applyData:UZ,definitionById:r,footnoteById:s,footnoteCounts:a,footnoteOrder:[],handlers:l,one:f,options:n,patch:FZ,wrap:HZ};return om(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const m=h.type==="definition"?r:s,b=String(h.identifier).toUpperCase();m.has(b)||m.set(b,h)}}),c;function f(h,m){const b=h.type,y=c.handlers[b];if(Ev.call(c.handlers,b)&&y)return y(c,h,m);if(c.options.passThrough&&c.options.passThrough.includes(b)){if("children"in h){const{children:S,...C}=h,E=lh(C);return E.children=c.all(h),E}return lh(h)}return(c.options.unknownHandler||qZ)(c,h,m)}function d(h){const m=[];if("children"in h){const b=h.children;let y=-1;for(;++y<b.length;){const k=c.one(b[y],h);if(k){if(y&&b[y-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=WC(k.value)),!Array.isArray(k)&&k.type==="element")){const S=k.children[0];S&&S.type==="text"&&(S.value=WC(S.value))}Array.isArray(k)?m.push(...k):m.push(k)}}}return m}}function FZ(e,t){e.position&&(t.position=AK(e))}function UZ(e,t){let n=t;if(e&&e.data){const r=e.data.hName,s=e.data.hChildren,a=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&a&&Object.assign(n.properties,lh(a)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function qZ(e,t){const n=t.data||{},r="value"in t&&!(Ev.call(n,"hProperties")||Ev.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function HZ(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
36
+ `});++r<e.length;)r&&n.push({type:"text",value:`
37
+ `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
38
+ `}),n}function WC(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function KC(e,t){const n=BZ(e,t),r=n.one(e,void 0),s=NZ(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&a.children.push({type:"text",value:`
39
+ `},s),a}function VZ(e,t){return e&&"run"in e?async function(n,r){const s=KC(n,{file:r,...t});await e.run(s,r)}:function(n,r){return KC(n,{file:r,...e||t})}}function YC(e){if(e)throw e}var ly,XC;function GZ(){if(XC)return ly;XC=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(d){return typeof Array.isArray=="function"?Array.isArray(d):t.call(d)==="[object Array]"},a=function(d){if(!d||t.call(d)!=="[object Object]")return!1;var h=e.call(d,"constructor"),m=d.constructor&&d.constructor.prototype&&e.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!h&&!m)return!1;var b;for(b in d);return typeof b>"u"||e.call(d,b)},l=function(d,h){n&&h.name==="__proto__"?n(d,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):d[h.name]=h.newValue},c=function(d,h){if(h==="__proto__")if(e.call(d,h)){if(r)return r(d,h).value}else return;return d[h]};return ly=function f(){var d,h,m,b,y,k,S=arguments[0],C=1,E=arguments.length,T=!1;for(typeof S=="boolean"&&(T=S,S=arguments[1]||{},C=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});C<E;++C)if(d=arguments[C],d!=null)for(h in d)m=c(S,h),b=c(d,h),S!==b&&(T&&b&&(a(b)||(y=s(b)))?(y?(y=!1,k=m&&s(m)?m:[]):k=m&&a(m)?m:{},l(S,{name:h,newValue:f(T,k,b)})):typeof b<"u"&&l(S,{name:h,newValue:b}));return S},ly}var WZ=GZ();const uy=Vc(WZ);function Tv(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function KZ(){const e=[],t={run:n,use:r};return t;function n(...s){let a=-1;const l=s.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);c(null,...s);function c(f,...d){const h=e[++a];let m=-1;if(f){l(f);return}for(;++m<s.length;)(d[m]===null||d[m]===void 0)&&(d[m]=s[m]);s=d,h?YZ(h,c)(...d):l(null,...d)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function YZ(e,t){let n;return r;function r(...l){const c=e.length>l.length;let f;c&&l.push(s);try{f=e.apply(this,l)}catch(d){const h=d;if(c&&n)throw h;return s(h)}c||(f&&f.then&&typeof f.then=="function"?f.then(a,s):f instanceof Error?s(f):a(f))}function s(l,...c){n||(n=!0,t(l,...c))}function a(l){s(null,l)}}const Ui={basename:XZ,dirname:ZZ,extname:QZ,join:JZ,sep:"/"};function XZ(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');pf(e);let n=0,r=-1,s=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else r<0&&(a=!0,r=s+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,c=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else l<0&&(a=!0,l=s+1),c>-1&&(e.codePointAt(s)===t.codePointAt(c--)?c<0&&(r=s):(c=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function ZZ(e){if(pf(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function QZ(e){pf(e);let t=e.length,n=-1,r=0,s=-1,a=0,l;for(;t--;){const c=e.codePointAt(t);if(c===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),c===46?s<0?s=t:a!==1&&(a=1):s>-1&&(a=-1)}return s<0||n<0||a===0||a===1&&s===n-1&&s===r+1?"":e.slice(s,n)}function JZ(...e){let t=-1,n;for(;++t<e.length;)pf(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":eQ(n)}function eQ(e){pf(e);const t=e.codePointAt(0)===47;let n=tQ(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function tQ(e,t){let n="",r=0,s=-1,a=0,l=-1,c,f;for(;++l<=e.length;){if(l<e.length)c=e.codePointAt(l);else{if(c===47)break;c=47}if(c===47){if(!(s===l-1||a===1))if(s!==l-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(f=n.lastIndexOf("/"),f!==n.length-1){f<0?(n="",r=0):(n=n.slice(0,f),r=n.length-1-n.lastIndexOf("/")),s=l,a=0;continue}}else if(n.length>0){n="",r=0,s=l,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(s+1,l):n=e.slice(s+1,l),r=l-s-1;s=l,a=0}else c===46&&a>-1?a++:a=-1}return n}function pf(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const nQ={cwd:rQ};function rQ(){return"/"}function Cv(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function iQ(e){if(typeof e=="string")e=new URL(e);else if(!Cv(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return sQ(e)}function sQ(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const cy=["history","path","basename","stem","extname","dirname"];class iD{constructor(t){let n;t?Cv(t)?n={path:t}:typeof t=="string"||oQ(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":nQ.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<cy.length;){const a=cy[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let s;for(s in n)cy.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Ui.basename(this.path):void 0}set basename(t){dy(t,"basename"),fy(t,"basename"),this.path=Ui.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ui.dirname(this.path):void 0}set dirname(t){ZC(this.basename,"dirname"),this.path=Ui.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ui.extname(this.path):void 0}set extname(t){if(fy(t,"extname"),ZC(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ui.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Cv(t)&&(t=iQ(t)),dy(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ui.basename(this.path,this.extname):void 0}set stem(t){dy(t,"stem"),fy(t,"stem"),this.path=Ui.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const s=this.message(t,n,r);throw s.fatal=!0,s}info(t,n,r){const s=this.message(t,n,r);return s.fatal=void 0,s}message(t,n,r){const s=new yr(t,n,r);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function fy(e,t){if(e&&e.includes(Ui.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ui.sep+"`")}function dy(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ZC(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function oQ(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const aQ=(function(e){const r=this.constructor.prototype,s=r[e],a=function(){return s.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),lQ={}.hasOwnProperty;class C0 extends aQ{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=KZ()}copy(){const t=new C0;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(uy(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(my("data",this.frozen),this.namespace[t]=n,this):lQ.call(this.namespace,t)&&this.namespace[t]||void 0:t?(my("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const s=n.call(t,...r);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=rp(t),r=this.parser||this.Parser;return py("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),py("process",this.parser||this.Parser),hy("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(a,l){const c=rp(t),f=r.parse(c);r.run(f,c,function(h,m,b){if(h||!m||!b)return d(h);const y=m,k=r.stringify(y,b);fQ(k)?b.value=k:b.result=k,d(h,b)});function d(h,m){h||!m?l(h):a?a(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),py("processSync",this.parser||this.Parser),hy("processSync",this.compiler||this.Compiler),this.process(t,s),JC("processSync","process",n),r;function s(a,l){n=!0,YC(a),r=l}}run(t,n,r){QC(t),this.freeze();const s=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(l,c){const f=rp(n);s.run(t,f,d);function d(h,m,b){const y=m||t;h?c(h):l?l(y):r(void 0,y,b)}}}runSync(t,n){let r=!1,s;return this.run(t,n,a),JC("runSync","run",r),s;function a(l,c){YC(l),s=c,r=!0}}stringify(t,n){this.freeze();const r=rp(n),s=this.compiler||this.Compiler;return hy("stringify",s),QC(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(my("use",this.frozen),t!=null)if(typeof t=="function")f(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(d){if(typeof d=="function")f(d,[]);else if(typeof d=="object")if(Array.isArray(d)){const[h,...m]=d;f(h,m)}else l(d);else throw new TypeError("Expected usable value, not `"+d+"`")}function l(d){if(!("plugins"in d)&&!("settings"in d))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");c(d.plugins),d.settings&&(s.settings=uy(!0,s.settings,d.settings))}function c(d){let h=-1;if(d!=null)if(Array.isArray(d))for(;++h<d.length;){const m=d[h];a(m)}else throw new TypeError("Expected a list of plugins, not `"+d+"`")}function f(d,h){let m=-1,b=-1;for(;++m<r.length;)if(r[m][0]===d){b=m;break}if(b===-1)r.push([d,...h]);else if(h.length>0){let[y,...k]=h;const S=r[b][1];Tv(S)&&Tv(y)&&(y=uy(!0,S,y)),r[b]=[d,y,...k]}}}}const uQ=new C0().freeze();function py(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function hy(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function my(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function QC(e){if(!Tv(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function JC(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function rp(e){return cQ(e)?e:new iD(e)}function cQ(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function fQ(e){return typeof e=="string"||dQ(e)}function dQ(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const pQ="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",eR=[],tR={allowDangerousHtml:!0},hQ=/^(https?|ircs?|mailto|xmpp)$/i,mQ=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function gQ(e){const t=bQ(e),n=yQ(e);return vQ(t.runSync(t.parse(n),n),e)}function bQ(e){const t=e.rehypePlugins||eR,n=e.remarkPlugins||eR,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...tR}:tR;return uQ().use(ZX).use(n).use(VZ,r).use(t)}function yQ(e){const t=e.children||"",n=new iD;return typeof t=="string"&&(n.value=t),n}function vQ(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,a=t.disallowedElements,l=t.skipHtml,c=t.unwrapDisallowed,f=t.urlTransform||xQ;for(const h of mQ)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+pQ+h.id,void 0);return om(e,d),DK(e,{Fragment:g.Fragment,components:s,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function d(h,m,b){if(h.type==="raw"&&b&&typeof m=="number")return l?b.children.splice(m,1):b.children[m]={type:"text",value:h.value},m;if(h.type==="element"){let y;for(y in sy)if(Object.hasOwn(sy,y)&&Object.hasOwn(h.properties,y)){const k=h.properties[y],S=sy[y];(S===null||S.includes(h.tagName))&&(h.properties[y]=f(String(k||""),y,h))}}if(h.type==="element"){let y=n?!n.includes(h.tagName):a?a.includes(h.tagName):!1;if(!y&&r&&typeof m=="number"&&(y=!r(h,m,b)),y&&b&&typeof m=="number")return c&&h.children?b.children.splice(m,1,...h.children):b.children.splice(m,1),m}}}function xQ(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),s=e.indexOf("/");return t===-1||s!==-1&&t>s||n!==-1&&t>n||r!==-1&&t>r||hQ.test(e.slice(0,t))?e:""}const nR=(function(e,t,n){const r=df(n);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(r(e.children[t],t,e))return e.children[t]}),Sa=(function(e){if(e==null)return wQ;if(typeof e=="string")return SQ(e);if(typeof e=="object")return kQ(e);if(typeof e=="function")return R0(e);throw new Error("Expected function, string, or array as `test`")});function kQ(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Sa(e[n]);return R0(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function SQ(e){return R0(t);function t(n){return n.tagName===e}}function R0(e){return t;function t(n,r,s){return!!(EQ(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function wQ(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function EQ(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const rR=/\n/g,iR=/[\t ]+/g,Rv=Sa("br"),sR=Sa(IQ),TQ=Sa("p"),oR=Sa("tr"),CQ=Sa(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",OQ,MQ]),sD=Sa(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function RQ(e,t){const n=t||{},r="children"in e?e.children:[],s=sD(e),a=lD(e,{whitespace:n.whitespace||"normal"}),l=[];(e.type==="text"||e.type==="comment")&&l.push(...aD(e,{breakBefore:!0,breakAfter:!0}));let c=-1;for(;++c<r.length;)l.push(...oD(r[c],e,{whitespace:a,breakBefore:c?void 0:s,breakAfter:c<r.length-1?Rv(r[c+1]):s}));const f=[];let d;for(c=-1;++c<l.length;){const h=l[c];typeof h=="number"?d!==void 0&&h>d&&(d=h):h&&(d!==void 0&&d>-1&&f.push(`
40
+ `.repeat(d)||" "),d=-1,f.push(h))}return f.join("")}function oD(e,t,n){return e.type==="element"?_Q(e,t,n):e.type==="text"?n.whitespace==="normal"?aD(e,n):AQ(e):[]}function _Q(e,t,n){const r=lD(e,n),s=e.children||[];let a=-1,l=[];if(CQ(e))return l;let c,f;for(Rv(e)||oR(e)&&nR(t,e,oR)?f=`
41
+ `:TQ(e)?(c=2,f=2):sD(e)&&(c=1,f=1);++a<s.length;)l=l.concat(oD(s[a],e,{whitespace:r,breakBefore:a?void 0:c,breakAfter:a<s.length-1?Rv(s[a+1]):f}));return sR(e)&&nR(t,e,sR)&&l.push(" "),c&&l.unshift(c),f&&l.push(f),l}function aD(e,t){const n=String(e.value),r=[],s=[];let a=0;for(;a<=n.length;){rR.lastIndex=a;const f=rR.exec(n),d=f&&"index"in f?f.index:n.length;r.push(NQ(n.slice(a,d).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),a===0?t.breakBefore:!0,d===n.length?t.breakAfter:!0)),a=d+1}let l=-1,c;for(;++l<r.length;)r[l].charCodeAt(r[l].length-1)===8203||l<r.length-1&&r[l+1].charCodeAt(0)===8203?(s.push(r[l]),c=void 0):r[l]?(typeof c=="number"&&s.push(c),s.push(r[l]),c=0):(l===0||l===r.length-1)&&s.push(0);return s}function AQ(e){return[String(e.value)]}function NQ(e,t,n){const r=[];let s=0,a;for(;s<e.length;){iR.lastIndex=s;const l=iR.exec(e);a=l?l.index:e.length,!s&&!a&&l&&!t&&r.push(""),s!==a&&r.push(e.slice(s,a)),s=l?a+l[0].length:a}return s!==a&&!n&&r.push(""),r.join(" ")}function lD(e,t){if(e.type==="element"){const n=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return n.wrap?"pre-wrap":"pre";case"td":case"th":return n.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function OQ(e){return!!(e.properties||{}).hidden}function IQ(e){return e.tagName==="td"||e.tagName==="th"}function MQ(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function DQ(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",l="(?!struct)("+r+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",c={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"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},h={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[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},m={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"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},b={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},y=t.optional(s)+e.IDENT_RE+"\\s*\\(",k=["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"],S=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],C=["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"],E=["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:S,keyword:k,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:C},D={className:"function.dispatch",relevance:0,keywords:{_hint:E},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},A=[D,m,c,n,e.C_BLOCK_COMMENT_MODE,h,d],I={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:_,contains:A.concat([{begin:/\(/,end:/\)/,keywords:_,contains:A.concat(["self"]),relevance:0}]),relevance:0},P={className:"function",begin:"("+l+"[\\*&\\s]+)+"+y,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:_,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:_,relevance:0},{begin:y,returnBegin:!0,contains:[b],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[d,h]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,d,h,c,{begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,d,h,c]}]},c,n,e.C_BLOCK_COMMENT_MODE,m]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:_,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(I,P,D,A,[m,{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",c]},{begin:e.IDENT_RE+"::",keywords:_},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function LQ(e){const t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=DQ(e),r=n.keywords;return r.type=[...r.type,...t.type],r.literal=[...r.literal,...t.literal],r.built_in=[...r.built_in,...t.built_in],r._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n}function jQ(e){const t=e.regex,n={},r={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.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"}}),l={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},c={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,s]};s.contains.push(c);const f={match:/\\"/},d={className:"string",begin:/'/,end:/'/},h={match:/\\'/},m={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},b=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],y=e.SHEBANG({binary:`(${b.join("|")})`,relevance:10}),k={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},S=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],C=["true","false"],E={match:/(\/[a-z._-]+)+/},T=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],R=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],_=["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"],D=["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:S,literal:C,built_in:[...T,...R,"set","shopt",..._,...D]},contains:[y,e.SHEBANG(),k,m,a,l,E,c,f,d,h,n]}}function zQ(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",l="("+r+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",c={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\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"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},h={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},m={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(d,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},b={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},y=t.optional(s)+e.IDENT_RE+"\\s*\\(",C={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"},E=[m,c,n,e.C_BLOCK_COMMENT_MODE,h,d],T={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:C,contains:E.concat([{begin:/\(/,end:/\)/,keywords:C,contains:E.concat(["self"]),relevance:0}]),relevance:0},R={begin:"("+l+"[\\*&\\s]+)+"+y,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:C,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:C,relevance:0},{begin:y,returnBegin:!0,contains:[e.inherit(b,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,d,h,c,{begin:/\(/,end:/\)/,keywords:C,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,d,h,c]}]},c,n,e.C_BLOCK_COMMENT_MODE,m]};return{name:"C",aliases:["h"],keywords:C,disableAutodetect:!0,illegal:"</",contains:[].concat(T,R,E,[m,{begin:e.IDENT_RE+"::",keywords:C},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:m,strings:d,keywords:C}}}function PQ(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),r="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",l="(?!struct)("+r+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",c={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"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},h={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[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},m={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"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},b={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},y=t.optional(s)+e.IDENT_RE+"\\s*\\(",k=["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"],S=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],C=["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"],E=["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:S,keyword:k,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:C},D={className:"function.dispatch",relevance:0,keywords:{_hint:E},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},A=[D,m,c,n,e.C_BLOCK_COMMENT_MODE,h,d],I={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:_,contains:A.concat([{begin:/\(/,end:/\)/,keywords:_,contains:A.concat(["self"]),relevance:0}]),relevance:0},P={className:"function",begin:"("+l+"[\\*&\\s]+)+"+y,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:_,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:r,keywords:_,relevance:0},{begin:y,returnBegin:!0,contains:[b],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[d,h]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,d,h,c,{begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,d,h,c]}]},c,n,e.C_BLOCK_COMMENT_MODE,m]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:_,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(I,P,D,A,[m,{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",c]},{begin:e.IDENT_RE+"::",keywords:_},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function $Q(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["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"],l={keyword:s.concat(a),built_in:t,literal:r},c=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),f={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},d={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},h={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},m=e.inherit(h,{illegal:/\n/}),b={className:"subst",begin:/\{/,end:/\}/,keywords:l},y=e.inherit(b,{illegal:/\n/}),k={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,y]},S={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},b]},C=e.inherit(S,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},y]});b.contains=[S,k,h,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,e.C_BLOCK_COMMENT_MODE],y.contains=[C,k,m,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const E={variants:[d,S,k,h,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},T={begin:"<",end:">",contains:[{beginKeywords:"in out"},c]},R=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",_={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:l,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"}},E,f,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},c,T,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[c,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[c,T,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:"("+R+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:l,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,T],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,relevance:0,contains:[E,f,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},_]}}const BQ=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.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_-]*/}}),FQ=["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"],UQ=["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"],qQ=[...FQ,...UQ],HQ=["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(),VQ=["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(),GQ=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),WQ=["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","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","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 KQ(e){const t=e.regex,n=BQ(e),r={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},s="and or not only",a=/@-?\w[\w]*(-\w+)*/,l="[a-zA-Z-][a-zA-Z0-9_-]*",c=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,r,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+l,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+VQ.join("|")+")"},{begin:":(:)?("+GQ.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+WQ.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...c,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...c,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:a},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:s,attribute:HQ.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...c,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+qQ.join("|")+")\\b"}]}}function YQ(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function XQ(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:/-?\.\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:/["']/}]}]}}function ZQ(e){const t=e.regex,n=/[_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:t.concat(n,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function QQ(e){const t=e.regex,n={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/},l={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},c={begin:/\[/,end:/\]/,contains:[r,a,s,l,n,"self"],relevance:0},f=/[A-Za-z0-9_-]+/,d=/"(\\"|[^"])*"/,h=/'[^']*'/,m=t.either(f,d,h),b=t.concat(m,"(\\s*\\.\\s*",m,")*",t.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[r,{className:"section",begin:/\[+/,end:/\]+/},{begin:b,className:"attr",starts:{end:/$/,contains:[r,c,a,s,l,n]}}]}}var dl="[0-9](_*[0-9])*",ip=`\\.(${dl})`,sp="[0-9a-fA-F](_*[0-9a-fA-F])*",aR={className:"number",variants:[{begin:`(\\b(${dl})((${ip})|\\.)?|(${ip}))[eE][+-]?(${dl})[fFdD]?\\b`},{begin:`\\b(${dl})((${ip})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${ip})[fFdD]?\\b`},{begin:`\\b(${dl})[fFdD]\\b`},{begin:`\\b0[xX]((${sp})\\.?|(${sp})?\\.(${sp}))[pP][+-]?(${dl})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${sp})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function uD(e,t,n){return n===-1?"":e.replace(t,r=>uD(e,t,n-1))}function JQ(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",r=n+uD("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),f={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"]},d={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},h={className:"params",begin:/\(/,end:/\)/,keywords:f,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:f,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[h,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+r+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:f,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:f,relevance:0,contains:[d,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,aR,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},aR,d]}}const lR="[A-Za-z$_][0-9A-Za-z$_]*",eJ=["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"],tJ=["true","false","null","undefined","NaN","Infinity"],cD=["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"],fD=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],dD=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],nJ=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],rJ=[].concat(dD,cD,fD);function iJ(e){const t=e.regex,n=(F,{after:K})=>{const N="</"+F[0].slice(1);return F.input.indexOf(N,K)!==-1},r=lR,s={begin:"<>",end:"</>"},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,l={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(F,K)=>{const N=F[0].length+F.index,z=F.input[N];if(z==="<"||z===","){K.ignoreMatch();return}z===">"&&(n(F,{after:N})||K.ignoreMatch());let V;const L=F.input.substring(N);if(V=L.match(/^\s*=/)){K.ignoreMatch();return}if((V=L.match(/^\s+extends\s+/))&&V.index===0){K.ignoreMatch();return}}},c={$pattern:lR,keyword:eJ,literal:tJ,built_in:rJ,"variable.language":nJ},f="[0-9](_?[0-9])*",d=`\\.(${f})`,h="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",m={className:"number",variants:[{begin:`(\\b(${h})((${d})|\\.)?|(${d}))[eE][+-]?(${f})\\b`},{begin:`\\b(${h})\\b((${d})\\b|\\.)?|(${d})\\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},b={className:"subst",begin:"\\$\\{",end:"\\}",keywords:c,contains:[]},y={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"xml"}},k={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"css"}},S={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"graphql"}},C={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,b]},T={className:"comment",variants:[e.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:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},R=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,y,k,S,C,{match:/\$\d+/},m];b.contains=R.concat({begin:/\{/,end:/\}/,keywords:c,contains:["self"].concat(R)});const _=[].concat(T,b.contains),D=_.concat([{begin:/(\s*)\(/,end:/\)/,keywords:c,contains:["self"].concat(_)}]),A={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:D},I={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},P={relevance:0,match:t.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:{_:[...cD,...fD]}},$={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},O={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[A],illegal:/%/},Y={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function U(F){return t.concat("(?!",F.join("|"),")")}const B={match:t.concat(/\b/,U([...dD,"super","import"].map(F=>`${F}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},j={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},q={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},A]},H="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",W={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(H)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[A]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:c,exports:{PARAMS_CONTAINS:D,CLASS_REFERENCE:P},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),$,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,y,k,S,C,T,{match:/\$\d+/},m,P,{scope:"attr",match:r+t.lookahead(":"),relevance:0},W,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[T,e.REGEXP_MODE,{className:"function",begin:H,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:D}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:a},{begin:l.begin,"on:begin":l.isTrulyOpeningTag,end:l.end}],subLanguage:"xml",contains:[{begin:l.begin,end:l.end,skip:!0,contains:["self"]}]}]},O,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[A,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},j,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[A]},B,Y,I,q,{match:/\$[(.]/}]}}function sJ(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},r=["true","false","null"],s={scope:"literal",beginKeywords:r.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:r},contains:[t,n,e.QUOTE_STRING_MODE,s,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var pl="[0-9](_*[0-9])*",op=`\\.(${pl})`,ap="[0-9a-fA-F](_*[0-9a-fA-F])*",oJ={className:"number",variants:[{begin:`(\\b(${pl})((${op})|\\.)?|(${op}))[eE][+-]?(${pl})[fFdD]?\\b`},{begin:`\\b(${pl})((${op})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${op})[fFdD]?\\b`},{begin:`\\b(${pl})[fFdD]\\b`},{begin:`\\b0[xX]((${ap})\\.?|(${ap})?\\.(${ap}))[pP][+-]?(${pl})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${ap})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function aJ(e){const t={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"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},r={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},s={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},a={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},l={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[a,s]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,a,s]}]};s.contains.push(l);const c={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},f={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(l,{className:"string"}),"self"]}]},d=oJ,h=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),m={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},b=m;return b.variants[1].contains=[m],m.variants[1].contains=[b],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,h,n,r,c,f,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[m,e.C_LINE_COMMENT_MODE,h],relevance:0},e.C_LINE_COMMENT_MODE,h,c,f,l,e.C_NUMBER_MODE]},h]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},c,f]},l,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
42
+ `},d]}}const lJ=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.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_-]*/}}),uJ=["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"],cJ=["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"],fJ=[...uJ,...cJ],dJ=["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(),pD=["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(),hD=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),pJ=["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","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","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(),hJ=pD.concat(hD).sort().reverse();function mJ(e){const t=lJ(e),n=hJ,r="and or not only",s="[\\w-]+",a="("+s+"|@\\{"+s+"\\})",l=[],c=[],f=function(R){return{className:"string",begin:"~?"+R+".*?"+R}},d=function(R,_,D){return{className:R,begin:_,relevance:D}},h={$pattern:/[a-z-]+/,keyword:r,attribute:dJ.join(" ")},m={begin:"\\(",end:"\\)",contains:c,keywords:h,relevance:0};c.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,f("'"),f('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,m,d("variable","@@?"+s,10),d("variable","@\\{"+s+"\\}"),d("built_in","~?`[^`]*?`"),{className:"attribute",begin:s+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const b=c.concat({begin:/\{/,end:/\}/,contains:l}),y={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(c)},k={begin:a+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+pJ.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:c}}]},S={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:h,returnEnd:!0,contains:c,relevance:0}},C={className:"variable",variants:[{begin:"@"+s+"\\s*:",relevance:15},{begin:"@"+s}],starts:{end:"[;}]",returnEnd:!0,contains:b}},E={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:a,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,y,d("keyword","all\\b"),d("variable","@\\{"+s+"\\}"),{begin:"\\b("+fJ.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,d("selector-tag",a,0),d("selector-id","#"+a),d("selector-class","\\."+a,0),d("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+pD.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+hD.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:b},{begin:"!important"},t.FUNCTION_DISPATCH]},T={begin:s+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[E]};return l.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,S,C,T,k,E,y,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:l}}function gJ(e){const t="\\[=*\\[",n="\\]=*\\]",r={begin:t,end:n,contains:["self"]},s=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{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 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:t,end:n,contains:[r],relevance:5}])}}function bJ(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},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:[t,n]},s={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},a={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},l={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[t]};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,t,n,r,s,a,l]}}function yJ(e){const t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},r={begin:"^[-\\*]{3,}",end:"$"},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},l={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},c=/[A-Za-z][A-Za-z0-9+.-]*/,f={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,c,/:\/\/.*?\)/),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}/}]},h={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},m=e.inherit(d,{contains:[]}),b=e.inherit(h,{contains:[]});d.contains.push(b),h.contains.push(m);let y=[n,f];return[d,h,m,b].forEach(E=>{E.contains=E.contains.concat(y)}),y=y.concat(d,h),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:y},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:y}]}]},n,a,d,h,{className:"quote",begin:"^>\\s+",contains:y,end:"$"},s,r,f,l,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function vJ(e){const t={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+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,c={"variable.language":["this","super"],$pattern:n,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"]},f={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:c,illegal:"</",contains:[t,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:"("+f.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:f,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function xJ(e){const t=e.regex,n=["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:n.join(" ")},a={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:s},l={begin:/->\{/,end:/\}/},c={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},f={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[c]},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},h=[e.BACKSLASH_ESCAPE,a,f],m=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],b=(S,C,E="\\1")=>{const T=E==="\\1"?E:t.concat(E,C);return t.concat(t.concat("(?:",S,")"),C,/(?:\\.|[^\\\/])*?/,T,/(?:\\.|[^\\\/])*?/,E,r)},y=(S,C,E)=>t.concat(t.concat("(?:",S,")"),C,/(?:\\.|[^\\\/])*?/,E,r),k=[f,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),l,{className:"string",contains:h,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:b("s|tr|y",t.either(...m,{capture:!0}))},{begin:b("s|tr|y","\\(","\\)")},{begin:b("s|tr|y","\\[","\\]")},{begin:b("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:y("(?:m|qr)?",/\//,/\//)},{begin:y("m|qr",t.either(...m,{capture:!0}),/\1/)},{begin:y("m|qr",/\(/,/\)/)},{begin:y("m|qr",/\[/,/\]/)},{begin:y("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,c]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,c,d]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return a.contains=k,l.contains=k,{name:"Perl",aliases:["pl","pm"],keywords:s,contains:k}}function kJ(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,r=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),s=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),a=t.concat(/[A-Z]+/,n),l={scope:"variable",match:"\\$+"+r},c={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},f={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},d=e.inherit(e.APOS_STRING_MODE,{illegal:null}),h=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(f)}),m={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(f),"on:begin":(j,q)=>{q.data._beginMatch=j[1]||j[2]},"on:end":(j,q)=>{q.data._beginMatch!==j[1]&&q.ignoreMatch()}},b=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),y=`[
43
+ ]`,k={scope:"string",variants:[h,d,m,b]},S={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},C=["false","null","true"],E=["__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"],T=["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"],_={keyword:E,literal:(j=>{const q=[];return j.forEach(H=>{q.push(H),H.toLowerCase()===H?q.push(H.toUpperCase()):q.push(H.toLowerCase())}),q})(C),built_in:T},D=j=>j.map(q=>q.replace(/\|\d+$/,"")),A={variants:[{match:[/new/,t.concat(y,"+"),t.concat("(?!",D(T).join("\\b|"),"\\b)"),s],scope:{1:"keyword",4:"title.class"}}]},I=t.concat(r,"\\b(?!\\()"),P={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),I],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[s,t.concat(/::/,t.lookahead(/(?!class\b)/)),I],scope:{1:"title.class",3:"variable.constant"}},{match:[s,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[s,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},$={scope:"attr",match:t.concat(r,t.lookahead(":"),t.lookahead(/(?!::)/))},O={relevance:0,begin:/\(/,end:/\)/,keywords:_,contains:[$,l,P,e.C_BLOCK_COMMENT_MODE,k,S,A]},Y={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",D(E).join("\\b|"),"|",D(T).join("\\b|"),"\\b)"),r,t.concat(y,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[O]};O.contains.push(Y);const U=[$,P,e.C_BLOCK_COMMENT_MODE,k,S,A],B={begin:t.concat(/#\[\s*\\?/,t.either(s,a)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:C,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:C,keyword:["new","array"]},contains:["self",...U]},...U,{scope:"meta",variants:[{match:s},{match:a}]}]};return{case_insensitive:!1,keywords:_,contains:[B,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}]}},c,{scope:"variable.language",match:/\$this\b/},l,Y,P,{match:[/const/,/\s/,r],scope:{1:"keyword",3:"variable.constant"}},A,{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:_,contains:["self",B,l,P,e.C_BLOCK_COMMENT_MODE,k,S]}]},{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]},k,S]}}function SJ(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})]}]}}function wJ(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function EJ(e){const t=e.regex,n=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","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],c={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:r,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","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","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"]},f={className:"meta",begin:/^(>>>|\.\.\.) /},d={className:"subst",begin:/\{/,end:/\}/,keywords:c,illegal:/#/},h={begin:/\{\{/,relevance:0},m={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,f],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,f],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,f,h,d]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,f,h,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:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,h,d]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,h,d]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},b="[0-9](_?[0-9])*",y=`(\\b(${b}))?\\.(${b})|\\b(${b})\\.`,k=`\\b|${r.join("|")}`,S={className:"number",relevance:0,variants:[{begin:`(\\b(${b})|(${y}))[eE][+-]?(${b})[jJ]?(?=${k})`},{begin:`(${y})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${k})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${k})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${k})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${k})`},{begin:`\\b(${b})[jJ](?=${k})`}]},C={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:c,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},E={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:["self",f,S,m,e.HASH_COMMENT_MODE]}]};return d.contains=[m,S,f],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:c,illegal:/(<\/|\?)|=>/,contains:[f,S,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},m,C,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[E]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[S,E,m]}]}}function TJ(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function CJ(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,r=t.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=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,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:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{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:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:s},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:a},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function RJ(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",r=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),s=t.concat(r,/(::\w+)*/),l={"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"]},c={className:"doctag",begin:"@[A-Za-z]+"},f={begin:"#<",end:">"},d=[e.COMMENT("#","$",{contains:[c]}),e.COMMENT("^=begin","^=end",{contains:[c],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],h={className:"subst",begin:/#\{/,end:/\}/,keywords:l},m={className:"string",contains:[e.BACKSLASH_ESCAPE,h],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:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,h]})]}]},b="[1-9](_?[0-9])*|0",y="[0-9](_?[0-9])*",k={className:"number",relevance:0,variants:[{begin:`\\b(${b})(\\.(${y}))?([eE][+-]?(${y})|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"}]},S={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:l}]},A=[m,{variants:[{match:[/class\s+/,s,/\s+<\s+/,s]},{match:[/\b(class|module)\s+/,s]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:l},{match:[/(include|extend)\s+/,s],scope:{2:"title.class"},keywords:l},{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+/,n],scope:{1:"keyword",3:"title.function"},contains:[S]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[m,{begin:n}],relevance:0},k,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:l},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,h],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(f,d),relevance:0}].concat(f,d);h.contains=A,S.contains=A;const O=[{begin:/^\s*=>/,starts:{end:"$",contains:A}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:l,contains:A}}];return d.unshift(f),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:l,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(O).concat(d).concat(A)}}function _J(e){const t=e.regex,n=/(r#)?/,r=t.concat(n,e.UNDERSCORE_IDENT_RE),s=t.concat(n,e.IDENT_RE),a={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,s,t.lookahead(/\s*\(/))},l="([ui](8|16|32|64|128|size)|f(32|64))?",c=["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","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],f=["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!"],h=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:h,keyword:c,literal:f,built_in:d},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"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})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+l},{begin:"\\b0o([0-7_]+)"+l},{begin:"\\b0x([A-Fa-f0-9_]+)"+l},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+l}],relevance:0},{begin:[/fn/,/\s+/,r],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,r],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,r,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,r],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:d,type:h}},{className:"punctuation",begin:"->"},a]}}const AJ=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.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_-]*/}}),NJ=["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"],OJ=["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"],IJ=[...NJ,...OJ],MJ=["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(),DJ=["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(),LJ=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),jJ=["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","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","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 zJ(e){const t=AJ(e),n=LJ,r=DJ,s="@[a-z-]+",a="and or not only",c={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+IJ.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+r.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},c,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+jJ.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:[t.BLOCK_COMMENT,c,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:s,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:a,attribute:MJ.join(" ")},contains:[{begin:s,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},c,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function PJ(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function $J(e){const t=e.regex,n=e.COMMENT("--","$"),r={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},s={begin:/"/,end:/"/,contains:[{match:/""/}]},a=["true","false","unknown"],l=["double precision","large object","with timezone","without timezone"],c=["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"],f=["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"],h=["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"],m=["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"],b=["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"],y=h,k=[...d,...f].filter(D=>!h.includes(D)),S={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},C={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},E={match:t.concat(/\b/,t.either(...y),/\s*\(/),relevance:0,keywords:{built_in:y}};function T(D){return t.concat(/\b/,t.either(...D.map(A=>A.replace(/\s+/,"\\s+"))),/\b/)}const R={scope:"keyword",match:T(b),relevance:0};function _(D,{exceptions:A,when:I}={}){const P=I;return A=A||[],D.map($=>$.match(/\|\d+$/)||A.includes($)?$:P($)?`${$}|0`:$)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:_(k,{when:D=>D.length<3}),literal:a,type:c,built_in:m},contains:[{scope:"type",match:T(l)},R,E,S,r,s,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,C]}}function mD(e){return e?typeof e=="string"?e:e.source:null}function tc(e){return hn("(?=",e,")")}function hn(...e){return e.map(n=>mD(n)).join("")}function BJ(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function kr(...e){return"("+(BJ(e).capture?"":"?:")+e.map(r=>mD(r)).join("|")+")"}const _0=e=>hn(/\b/,e,/\w$/.test(e)?/\b/:/\B/),FJ=["Protocol","Type"].map(_0),uR=["init","self"].map(_0),UJ=["Any","Self"],gy=["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"],cR=["false","nil","true"],qJ=["assignment","associativity","higherThan","left","lowerThan","none","right"],HJ=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],fR=["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"],gD=kr(/[/=\-+!*%<>&|^~?]/,/[\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]/),bD=kr(gD,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),by=hn(gD,bD,"*"),yD=kr(/[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]/),uh=kr(yD,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Fi=hn(yD,uh,"*"),lp=hn(/[A-Z]/,uh,"*"),VJ=["attached","autoclosure",hn(/convention\(/,kr("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",hn(/objc\(/,Fi,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],GJ=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function WJ(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r=[e.C_LINE_COMMENT_MODE,n],s={match:[/\./,kr(...FJ,...uR)],className:{2:"keyword"}},a={match:hn(/\./,kr(...gy)),relevance:0},l=gy.filter(ke=>typeof ke=="string").concat(["_|0"]),c=gy.filter(ke=>typeof ke!="string").concat(UJ).map(_0),f={variants:[{className:"keyword",match:kr(...c,...uR)}]},d={$pattern:kr(/\b\w+/,/#\w+/),keyword:l.concat(HJ),literal:cR},h=[s,a,f],m={match:hn(/\./,kr(...fR)),relevance:0},b={className:"built_in",match:hn(/\b/,kr(...fR),/(?=\()/)},y=[m,b],k={match:/->/,relevance:0},S={className:"operator",relevance:0,variants:[{match:by},{match:`\\.(\\.|${bD})+`}]},C=[k,S],E="([0-9]_*)+",T="([0-9a-fA-F]_*)+",R={className:"number",relevance:0,variants:[{match:`\\b(${E})(\\.(${E}))?([eE][+-]?(${E}))?\\b`},{match:`\\b0x(${T})(\\.(${T}))?([pP][+-]?(${E}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},_=(ke="")=>({className:"subst",variants:[{match:hn(/\\/,ke,/[0\\tnr"']/)},{match:hn(/\\/,ke,/u\{[0-9a-fA-F]{1,8}\}/)}]}),D=(ke="")=>({className:"subst",match:hn(/\\/,ke,/[\t ]*(?:[\r\n]|\r\n)/)}),A=(ke="")=>({className:"subst",label:"interpol",begin:hn(/\\/,ke,/\(/),end:/\)/}),I=(ke="")=>({begin:hn(ke,/"""/),end:hn(/"""/,ke),contains:[_(ke),D(ke),A(ke)]}),P=(ke="")=>({begin:hn(ke,/"/),end:hn(/"/,ke),contains:[_(ke),A(ke)]}),$={className:"string",variants:[I(),I("#"),I("##"),I("###"),P(),P("#"),P("##"),P("###")]},O=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],Y={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:O},U=ke=>{const xe=hn(ke,/\//),Ce=hn(/\//,ke);return{begin:xe,end:Ce,contains:[...O,{scope:"comment",begin:`#(?!.*${Ce})`,end:/$/}]}},B={scope:"regexp",variants:[U("###"),U("##"),U("#"),Y]},j={match:hn(/`/,Fi,/`/)},q={className:"variable",match:/\$\d+/},H={className:"variable",match:`\\$${uh}+`},W=[j,q,H],F={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:GJ,contains:[...C,R,$]}]}},K={scope:"keyword",match:hn(/@/,kr(...VJ),tc(kr(/\(/,/\s+/)))},N={scope:"meta",match:hn(/@/,Fi)},z=[F,K,N],V={match:tc(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:hn(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,uh,"+")},{className:"type",match:lp,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:hn(/\s+&\s+/,tc(lp)),relevance:0}]},L={begin:/</,end:/>/,keywords:d,contains:[...r,...h,...z,k,V]};V.contains.push(L);const Z={match:hn(Fi,/\s*:/),keywords:"_|0",relevance:0},re={begin:/\(/,end:/\)/,relevance:0,keywords:d,contains:["self",Z,...r,B,...h,...y,...C,R,$,...W,...z,V]},ie={begin:/</,end:/>/,keywords:"repeat each",contains:[...r,V]},ae={begin:kr(tc(hn(Fi,/\s*:/)),tc(hn(Fi,/\s+/,Fi,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Fi}]},le={begin:/\(/,end:/\)/,keywords:d,contains:[ae,...r,...h,...C,R,$,...z,V,re],endsParent:!0,illegal:/["']/},ce={match:[/(func|macro)/,/\s+/,kr(j.match,Fi,by)],className:{1:"keyword",3:"title.function"},contains:[ie,le,t],illegal:[/\[/,/%/]},Ee={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[ie,le,t],illegal:/\[|%/},be={match:[/operator/,/\s+/,by],className:{1:"keyword",3:"title"}},ue={begin:[/precedencegroup/,/\s+/,lp],className:{1:"keyword",3:"title"},contains:[V],keywords:[...qJ,...cR],end:/}/},ge={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},Se={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Ae={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,Fi,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:d,contains:[ie,...h,{begin:/:/,end:/\{/,keywords:d,contains:[{scope:"title.class.inherited",match:lp},...h],relevance:0}]};for(const ke of $.variants){const xe=ke.contains.find(Me=>Me.label==="interpol");xe.keywords=d;const Ce=[...h,...y,...C,R,$,...W];xe.contains=[...Ce,{begin:/\(/,end:/\)/,contains:["self",...Ce]}]}return{name:"Swift",keywords:d,contains:[...r,ce,Ee,ge,Se,Ae,be,ue,{beginKeywords:"import",end:/$/,contains:[...r],relevance:0},B,...h,...y,...C,R,$,...W,...z,V,re]}}const ch="[A-Za-z$_][0-9A-Za-z$_]*",vD=["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"],xD=["true","false","null","undefined","NaN","Infinity"],kD=["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"],SD=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],wD=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],ED=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],TD=[].concat(wD,kD,SD);function KJ(e){const t=e.regex,n=(F,{after:K})=>{const N="</"+F[0].slice(1);return F.input.indexOf(N,K)!==-1},r=ch,s={begin:"<>",end:"</>"},a=/<[A-Za-z0-9\\._:-]+\s*\/>/,l={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(F,K)=>{const N=F[0].length+F.index,z=F.input[N];if(z==="<"||z===","){K.ignoreMatch();return}z===">"&&(n(F,{after:N})||K.ignoreMatch());let V;const L=F.input.substring(N);if(V=L.match(/^\s*=/)){K.ignoreMatch();return}if((V=L.match(/^\s+extends\s+/))&&V.index===0){K.ignoreMatch();return}}},c={$pattern:ch,keyword:vD,literal:xD,built_in:TD,"variable.language":ED},f="[0-9](_?[0-9])*",d=`\\.(${f})`,h="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",m={className:"number",variants:[{begin:`(\\b(${h})((${d})|\\.)?|(${d}))[eE][+-]?(${f})\\b`},{begin:`\\b(${h})\\b((${d})\\b|\\.)?|(${d})\\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},b={className:"subst",begin:"\\$\\{",end:"\\}",keywords:c,contains:[]},y={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"xml"}},k={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"css"}},S={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,b],subLanguage:"graphql"}},C={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,b]},T={className:"comment",variants:[e.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:r+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},R=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,y,k,S,C,{match:/\$\d+/},m];b.contains=R.concat({begin:/\{/,end:/\}/,keywords:c,contains:["self"].concat(R)});const _=[].concat(T,b.contains),D=_.concat([{begin:/(\s*)\(/,end:/\)/,keywords:c,contains:["self"].concat(_)}]),A={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:D},I={variants:[{match:[/class/,/\s+/,r,/\s+/,/extends/,/\s+/,t.concat(r,"(",t.concat(/\./,r),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,r],scope:{1:"keyword",3:"title.class"}}]},P={relevance:0,match:t.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:{_:[...kD,...SD]}},$={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},O={variants:[{match:[/function/,/\s+/,r,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[A],illegal:/%/},Y={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function U(F){return t.concat("(?!",F.join("|"),")")}const B={match:t.concat(/\b/,U([...wD,"super","import"].map(F=>`${F}\\s*\\(`)),r,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},j={begin:t.concat(/\./,t.lookahead(t.concat(r,/(?![0-9A-Za-z$_(])/))),end:r,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},q={match:[/get|set/,/\s+/,r,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},A]},H="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",W={match:[/const|var|let/,/\s+/,r,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(H)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[A]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:c,exports:{PARAMS_CONTAINS:D,CLASS_REFERENCE:P},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),$,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,y,k,S,C,T,{match:/\$\d+/},m,P,{scope:"attr",match:r+t.lookahead(":"),relevance:0},W,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[T,e.REGEXP_MODE,{className:"function",begin:H,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,contains:D}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:a},{begin:l.begin,"on:begin":l.isTrulyOpeningTag,end:l.end}],subLanguage:"xml",contains:[{begin:l.begin,end:l.end,skip:!0,contains:["self"]}]}]},O,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[A,e.inherit(e.TITLE_MODE,{begin:r,className:"title.function"})]},{match:/\.\.\./,relevance:0},j,{match:"\\$"+r,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[A]},B,Y,I,q,{match:/\$[(.]/}]}}function YJ(e){const t=e.regex,n=KJ(e),r=ch,s=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],a={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},l={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:s},contains:[n.exports.CLASS_REFERENCE]},c={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},f=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],d={$pattern:ch,keyword:vD.concat(f),literal:xD,built_in:TD.concat(s),"variable.language":ED},h={className:"meta",begin:"@"+r},m=(S,C,E)=>{const T=S.contains.findIndex(R=>R.label===C);if(T===-1)throw new Error("can not find mode to replace");S.contains.splice(T,1,E)};Object.assign(n.keywords,d),n.exports.PARAMS_CONTAINS.push(h);const b=n.contains.find(S=>S.scope==="attr"),y=Object.assign({},b,{match:t.concat(r,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,b,y]),n.contains=n.contains.concat([h,a,l,y]),m(n,"shebang",e.SHEBANG()),m(n,"use_strict",c);const k=n.contains.find(S=>S.label==="func.def");return k.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function XJ(e){const t=e.regex,n={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}/,l=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,c=/\d{1,2}(:\d{1,2}){1,2}/,f={className:"literal",variants:[{begin:t.concat(/# */,t.either(a,s),/ *#/)},{begin:t.concat(/# */,c,/ *#/)},{begin:t.concat(/# */,l,/ *#/)},{begin:t.concat(/# */,t.either(a,s),/ +/,t.either(l,c),/ *#/)}]},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])|[%&])?/}]},h={className:"label",begin:/^\w+:/},m=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),b=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:[n,r,f,d,h,m,b,{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:[b]}]}}function ZJ(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const n=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_]+/},l={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},c={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/},f={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:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},a,l,s,e.QUOTE_STRING_MODE,f,d,c]}}function QJ(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.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/}]},l=e.inherit(a,{begin:/\(/,end:/\)/}),c=e.inherit(e.APOS_STRING_MODE,{className:"string"}),f=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,f,c,l,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[a,l,f,c]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},s,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[f]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[d],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[d],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:d}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function JJ(e){const t="true false yes no null",n="[\\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}]},l={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,s]},c=e.inherit(l,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),b={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"},y={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},k={begin:/\{/,end:/\}/,contains:[y],illegal:"\\n",relevance:0},S={begin:"\\[",end:"\\]",contains:[y],illegal:"\\n",relevance:0},C=[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+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},b,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},k,S,a,l],E=[...C];return E.pop(),E.push(c),y.contains=E,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:C}}const eee={arduino:LQ,bash:jQ,c:zQ,cpp:PQ,csharp:$Q,css:KQ,diff:YQ,go:XQ,graphql:ZQ,ini:QQ,java:JQ,javascript:iJ,json:sJ,kotlin:aJ,less:mJ,lua:gJ,makefile:bJ,markdown:yJ,objectivec:vJ,perl:xJ,php:kJ,"php-template":SJ,plaintext:wJ,python:EJ,"python-repl":TJ,r:CJ,ruby:RJ,rust:_J,scss:zJ,shell:PJ,sql:$J,swift:WJ,typescript:YJ,vbnet:XJ,wasm:ZJ,xml:QJ,yaml:JJ};var yy,dR;function tee(){if(dR)return yy;dR=1;function e(X){return X instanceof Map?X.clear=X.delete=X.set=function(){throw new Error("map is read-only")}:X instanceof Set&&(X.add=X.clear=X.delete=function(){throw new Error("set is read-only")}),Object.freeze(X),Object.getOwnPropertyNames(X).forEach(me=>{const Le=X[me],Xe=typeof Le;(Xe==="object"||Xe==="function")&&!Object.isFrozen(Le)&&e(Le)}),X}class t{constructor(me){me.data===void 0&&(me.data={}),this.data=me.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(X){return X.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function r(X,...me){const Le=Object.create(null);for(const Xe in X)Le[Xe]=X[Xe];return me.forEach(function(Xe){for(const Rt in Xe)Le[Rt]=Xe[Rt]}),Le}const s="</span>",a=X=>!!X.scope,l=(X,{prefix:me})=>{if(X.startsWith("language:"))return X.replace("language:","language-");if(X.includes(".")){const Le=X.split(".");return[`${me}${Le.shift()}`,...Le.map((Xe,Rt)=>`${Xe}${"_".repeat(Rt+1)}`)].join(" ")}return`${me}${X}`};class c{constructor(me,Le){this.buffer="",this.classPrefix=Le.classPrefix,me.walk(this)}addText(me){this.buffer+=n(me)}openNode(me){if(!a(me))return;const Le=l(me.scope,{prefix:this.classPrefix});this.span(Le)}closeNode(me){a(me)&&(this.buffer+=s)}value(){return this.buffer}span(me){this.buffer+=`<span class="${me}">`}}const f=(X={})=>{const me={children:[]};return Object.assign(me,X),me};class d{constructor(){this.rootNode=f(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(me){this.top.children.push(me)}openNode(me){const Le=f({scope:me});this.add(Le),this.stack.push(Le)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(me){return this.constructor._walk(me,this.rootNode)}static _walk(me,Le){return typeof Le=="string"?me.addText(Le):Le.children&&(me.openNode(Le),Le.children.forEach(Xe=>this._walk(me,Xe)),me.closeNode(Le)),me}static _collapse(me){typeof me!="string"&&me.children&&(me.children.every(Le=>typeof Le=="string")?me.children=[me.children.join("")]:me.children.forEach(Le=>{d._collapse(Le)}))}}class h extends d{constructor(me){super(),this.options=me}addText(me){me!==""&&this.add(me)}startScope(me){this.openNode(me)}endScope(){this.closeNode()}__addSublanguage(me,Le){const Xe=me.root;Le&&(Xe.scope=`language:${Le}`),this.add(Xe)}toHTML(){return new c(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function m(X){return X?typeof X=="string"?X:X.source:null}function b(X){return S("(?=",X,")")}function y(X){return S("(?:",X,")*")}function k(X){return S("(?:",X,")?")}function S(...X){return X.map(Le=>m(Le)).join("")}function C(X){const me=X[X.length-1];return typeof me=="object"&&me.constructor===Object?(X.splice(X.length-1,1),me):{}}function E(...X){return"("+(C(X).capture?"":"?:")+X.map(Xe=>m(Xe)).join("|")+")"}function T(X){return new RegExp(X.toString()+"|").exec("").length-1}function R(X,me){const Le=X&&X.exec(me);return Le&&Le.index===0}const _=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function D(X,{joinWith:me}){let Le=0;return X.map(Xe=>{Le+=1;const Rt=Le;let lt=m(Xe),He="";for(;lt.length>0;){const qe=_.exec(lt);if(!qe){He+=lt;break}He+=lt.substring(0,qe.index),lt=lt.substring(qe.index+qe[0].length),qe[0][0]==="\\"&&qe[1]?He+="\\"+String(Number(qe[1])+Rt):(He+=qe[0],qe[0]==="("&&Le++)}return He}).map(Xe=>`(${Xe})`).join(me)}const A=/\b\B/,I="[a-zA-Z]\\w*",P="[a-zA-Z_]\\w*",$="\\b\\d+(\\.\\d+)?",O="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Y="\\b(0b[01]+)",U="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",B=(X={})=>{const me=/^#![ ]*\//;return X.binary&&(X.begin=S(me,/.*\b/,X.binary,/\b.*/)),r({scope:"meta",begin:me,end:/$/,relevance:0,"on:begin":(Le,Xe)=>{Le.index!==0&&Xe.ignoreMatch()}},X)},j={begin:"\\\\[\\s\\S]",relevance:0},q={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[j]},H={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[j]},W={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/},F=function(X,me,Le={}){const Xe=r({scope:"comment",begin:X,end:me,contains:[]},Le);Xe.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 Rt=E("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 Xe.contains.push({begin:S(/[ ]+/,"(",Rt,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Xe},K=F("//","$"),N=F("/\\*","\\*/"),z=F("#","$"),V={scope:"number",begin:$,relevance:0},L={scope:"number",begin:O,relevance:0},Z={scope:"number",begin:Y,relevance:0},re={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[j,{begin:/\[/,end:/\]/,relevance:0,contains:[j]}]},ie={scope:"title",begin:I,relevance:0},ae={scope:"title",begin:P,relevance:0},le={begin:"\\.\\s*"+P,relevance:0};var Ee=Object.freeze({__proto__:null,APOS_STRING_MODE:q,BACKSLASH_ESCAPE:j,BINARY_NUMBER_MODE:Z,BINARY_NUMBER_RE:Y,COMMENT:F,C_BLOCK_COMMENT_MODE:N,C_LINE_COMMENT_MODE:K,C_NUMBER_MODE:L,C_NUMBER_RE:O,END_SAME_AS_BEGIN:function(X){return Object.assign(X,{"on:begin":(me,Le)=>{Le.data._beginMatch=me[1]},"on:end":(me,Le)=>{Le.data._beginMatch!==me[1]&&Le.ignoreMatch()}})},HASH_COMMENT_MODE:z,IDENT_RE:I,MATCH_NOTHING_RE:A,METHOD_GUARD:le,NUMBER_MODE:V,NUMBER_RE:$,PHRASAL_WORDS_MODE:W,QUOTE_STRING_MODE:H,REGEXP_MODE:re,RE_STARTERS_RE:U,SHEBANG:B,TITLE_MODE:ie,UNDERSCORE_IDENT_RE:P,UNDERSCORE_TITLE_MODE:ae});function be(X,me){X.input[X.index-1]==="."&&me.ignoreMatch()}function ue(X,me){X.className!==void 0&&(X.scope=X.className,delete X.className)}function ge(X,me){me&&X.beginKeywords&&(X.begin="\\b("+X.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",X.__beforeBegin=be,X.keywords=X.keywords||X.beginKeywords,delete X.beginKeywords,X.relevance===void 0&&(X.relevance=0))}function Se(X,me){Array.isArray(X.illegal)&&(X.illegal=E(...X.illegal))}function Ae(X,me){if(X.match){if(X.begin||X.end)throw new Error("begin & end are not supported with match");X.begin=X.match,delete X.match}}function ke(X,me){X.relevance===void 0&&(X.relevance=1)}const xe=(X,me)=>{if(!X.beforeMatch)return;if(X.starts)throw new Error("beforeMatch cannot be used with starts");const Le=Object.assign({},X);Object.keys(X).forEach(Xe=>{delete X[Xe]}),X.keywords=Le.keywords,X.begin=S(Le.beforeMatch,b(Le.begin)),X.starts={relevance:0,contains:[Object.assign(Le,{endsParent:!0})]},X.relevance=0,delete Le.beforeMatch},Ce=["of","and","for","in","not","or","if","then","parent","list","value"],Me="keyword";function ze(X,me,Le=Me){const Xe=Object.create(null);return typeof X=="string"?Rt(Le,X.split(" ")):Array.isArray(X)?Rt(Le,X):Object.keys(X).forEach(function(lt){Object.assign(Xe,ze(X[lt],me,lt))}),Xe;function Rt(lt,He){me&&(He=He.map(qe=>qe.toLowerCase())),He.forEach(function(qe){const De=qe.split("|");Xe[De[0]]=[lt,Fe(De[0],De[1])]})}}function Fe(X,me){return me?Number(me):ye(X)?0:1}function ye(X){return Ce.includes(X.toLowerCase())}const _e={},ee=X=>{console.error(X)},fe=(X,...me)=>{console.log(`WARN: ${X}`,...me)},Q=(X,me)=>{_e[`${X}/${me}`]||(console.log(`Deprecated as of ${X}. ${me}`),_e[`${X}/${me}`]=!0)},ne=new Error;function we(X,me,{key:Le}){let Xe=0;const Rt=X[Le],lt={},He={};for(let qe=1;qe<=me.length;qe++)He[qe+Xe]=Rt[qe],lt[qe+Xe]=!0,Xe+=T(me[qe-1]);X[Le]=He,X[Le]._emit=lt,X[Le]._multi=!0}function Pe(X){if(Array.isArray(X.begin)){if(X.skip||X.excludeBegin||X.returnBegin)throw ee("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),ne;if(typeof X.beginScope!="object"||X.beginScope===null)throw ee("beginScope must be object"),ne;we(X,X.begin,{key:"beginScope"}),X.begin=D(X.begin,{joinWith:""})}}function Ye(X){if(Array.isArray(X.end)){if(X.skip||X.excludeEnd||X.returnEnd)throw ee("skip, excludeEnd, returnEnd not compatible with endScope: {}"),ne;if(typeof X.endScope!="object"||X.endScope===null)throw ee("endScope must be object"),ne;we(X,X.end,{key:"endScope"}),X.end=D(X.end,{joinWith:""})}}function Ze(X){X.scope&&typeof X.scope=="object"&&X.scope!==null&&(X.beginScope=X.scope,delete X.scope)}function bt(X){Ze(X),typeof X.beginScope=="string"&&(X.beginScope={_wrap:X.beginScope}),typeof X.endScope=="string"&&(X.endScope={_wrap:X.endScope}),Pe(X),Ye(X)}function Je(X){function me(He,qe){return new RegExp(m(He),"m"+(X.case_insensitive?"i":"")+(X.unicodeRegex?"u":"")+(qe?"g":""))}class Le{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(qe,De){De.position=this.position++,this.matchIndexes[this.matchAt]=De,this.regexes.push([De,qe]),this.matchAt+=T(qe)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const qe=this.regexes.map(De=>De[1]);this.matcherRe=me(D(qe,{joinWith:"|"}),!0),this.lastIndex=0}exec(qe){this.matcherRe.lastIndex=this.lastIndex;const De=this.matcherRe.exec(qe);if(!De)return null;const je=De.findIndex((We,dt)=>dt>0&&We!==void 0),Ie=this.matchIndexes[je];return De.splice(0,je),Object.assign(De,Ie)}}class Xe{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(qe){if(this.multiRegexes[qe])return this.multiRegexes[qe];const De=new Le;return this.rules.slice(qe).forEach(([je,Ie])=>De.addRule(je,Ie)),De.compile(),this.multiRegexes[qe]=De,De}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(qe,De){this.rules.push([qe,De]),De.type==="begin"&&this.count++}exec(qe){const De=this.getMatcher(this.regexIndex);De.lastIndex=this.lastIndex;let je=De.exec(qe);if(this.resumingScanAtSamePosition()&&!(je&&je.index===this.lastIndex)){const Ie=this.getMatcher(0);Ie.lastIndex=this.lastIndex+1,je=Ie.exec(qe)}return je&&(this.regexIndex+=je.position+1,this.regexIndex===this.count&&this.considerAll()),je}}function Rt(He){const qe=new Xe;return He.contains.forEach(De=>qe.addRule(De.begin,{rule:De,type:"begin"})),He.terminatorEnd&&qe.addRule(He.terminatorEnd,{type:"end"}),He.illegal&&qe.addRule(He.illegal,{type:"illegal"}),qe}function lt(He,qe){const De=He;if(He.isCompiled)return De;[ue,Ae,bt,xe].forEach(Ie=>Ie(He,qe)),X.compilerExtensions.forEach(Ie=>Ie(He,qe)),He.__beforeBegin=null,[ge,Se,ke].forEach(Ie=>Ie(He,qe)),He.isCompiled=!0;let je=null;return typeof He.keywords=="object"&&He.keywords.$pattern&&(He.keywords=Object.assign({},He.keywords),je=He.keywords.$pattern,delete He.keywords.$pattern),je=je||/\w+/,He.keywords&&(He.keywords=ze(He.keywords,X.case_insensitive)),De.keywordPatternRe=me(je,!0),qe&&(He.begin||(He.begin=/\B|\b/),De.beginRe=me(De.begin),!He.end&&!He.endsWithParent&&(He.end=/\B|\b/),He.end&&(De.endRe=me(De.end)),De.terminatorEnd=m(De.end)||"",He.endsWithParent&&qe.terminatorEnd&&(De.terminatorEnd+=(He.end?"|":"")+qe.terminatorEnd)),He.illegal&&(De.illegalRe=me(He.illegal)),He.contains||(He.contains=[]),He.contains=[].concat(...He.contains.map(function(Ie){return kt(Ie==="self"?He:Ie)})),He.contains.forEach(function(Ie){lt(Ie,De)}),He.starts&&lt(He.starts,qe),De.matcher=Rt(De),De}if(X.compilerExtensions||(X.compilerExtensions=[]),X.contains&&X.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return X.classNameAliases=r(X.classNameAliases||{}),lt(X)}function vt(X){return X?X.endsWithParent||vt(X.starts):!1}function kt(X){return X.variants&&!X.cachedVariants&&(X.cachedVariants=X.variants.map(function(me){return r(X,{variants:null},me)})),X.cachedVariants?X.cachedVariants:vt(X)?r(X,{starts:X.starts?r(X.starts):null}):Object.isFrozen(X)?r(X):X}var nt="11.11.1";class rt extends Error{constructor(me,Le){super(me),this.name="HTMLInjectionError",this.html=Le}}const ct=n,it=r,ft=Symbol("nomatch"),Lt=7,Pt=function(X){const me=Object.create(null),Le=Object.create(null),Xe=[];let Rt=!0;const lt="Could not find the language '{}', did you forget to load/include a language module?",He={disableAutodetect:!0,name:"Plain text",contains:[]};let qe={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:h};function De($e){return qe.noHighlightRe.test($e)}function je($e){let at=$e.className+" ";at+=$e.parentNode?$e.parentNode.className:"";const jt=qe.languageDetectRe.exec(at);if(jt){const on=tr(jt[1]);return on||(fe(lt.replace("{}",jt[1])),fe("Falling back to no-highlight mode for this block.",$e)),on?jt[1]:"no-highlight"}return at.split(/\s+/).find(on=>De(on)||tr(on))}function Ie($e,at,jt){let on="",Mn="";typeof at=="object"?(on=$e,jt=at.ignoreIllegals,Mn=at.language):(Q("10.7.0","highlight(lang, code, ...args) has been deprecated."),Q("10.7.0",`Please use highlight(code, options) instead.
44
+ https://github.com/highlightjs/highlight.js/issues/2277`),Mn=$e,on=at),jt===void 0&&(jt=!0);const ur={code:on,language:Mn};Io("before:highlight",ur);const Ur=ur.result?ur.result:We(ur.language,ur.code,jt);return Ur.code=ur.code,Io("after:highlight",Ur),Ur}function We($e,at,jt,on){const Mn=Object.create(null);function ur(Ge,st){return Ge.keywords[st]}function Ur(){if(!St.keywords){Un.addText(an);return}let Ge=0;St.keywordPatternRe.lastIndex=0;let st=St.keywordPatternRe.exec(an),Nt="";for(;st;){Nt+=an.substring(Ge,st.index);const Ht=nr.case_insensitive?st[0].toLowerCase():st[0],_n=ur(St,Ht);if(_n){const[ii,Ql]=_n;if(Un.addText(Nt),Nt="",Mn[Ht]=(Mn[Ht]||0)+1,Mn[Ht]<=Lt&&($s+=Ql),ii.startsWith("_"))Nt+=st[0];else{const xf=nr.classNameAliases[ii]||ii;qr(st[0],xf)}}else Nt+=st[0];Ge=St.keywordPatternRe.lastIndex,st=St.keywordPatternRe.exec(an)}Nt+=an.substring(Ge),Un.addText(Nt)}function Cr(){if(an==="")return;let Ge=null;if(typeof St.subLanguage=="string"){if(!me[St.subLanguage]){Un.addText(an);return}Ge=We(St.subLanguage,an,!0,vf[St.subLanguage]),vf[St.subLanguage]=Ge._top}else Ge=Et(an,St.subLanguage.length?St.subLanguage:null);St.relevance>0&&($s+=Ge.relevance),Un.__addSublanguage(Ge._emitter,Ge.language)}function kn(){St.subLanguage!=null?Cr():Ur(),an=""}function qr(Ge,st){Ge!==""&&(Un.startScope(st),Un.addText(Ge),Un.endScope())}function bf(Ge,st){let Nt=1;const Ht=st.length-1;for(;Nt<=Ht;){if(!Ge._emit[Nt]){Nt++;continue}const _n=nr.classNameAliases[Ge[Nt]]||Ge[Nt],ii=st[Nt];_n?qr(ii,_n):(an=ii,Ur(),an=""),Nt++}}function Ea(Ge,st){return Ge.scope&&typeof Ge.scope=="string"&&Un.openNode(nr.classNameAliases[Ge.scope]||Ge.scope),Ge.beginScope&&(Ge.beginScope._wrap?(qr(an,nr.classNameAliases[Ge.beginScope._wrap]||Ge.beginScope._wrap),an=""):Ge.beginScope._multi&&(bf(Ge.beginScope,st),an="")),St=Object.create(Ge,{parent:{value:St}}),St}function Yl(Ge,st,Nt){let Ht=R(Ge.endRe,Nt);if(Ht){if(Ge["on:end"]){const _n=new t(Ge);Ge["on:end"](st,_n),_n.isMatchIgnored&&(Ht=!1)}if(Ht){for(;Ge.endsParent&&Ge.parent;)Ge=Ge.parent;return Ge}}if(Ge.endsWithParent)return Yl(Ge.parent,st,Nt)}function Ta(Ge){return St.matcher.regexIndex===0?(an+=Ge[0],1):(Bs=!0,0)}function lm(Ge){const st=Ge[0],Nt=Ge.rule,Ht=new t(Nt),_n=[Nt.__beforeBegin,Nt["on:begin"]];for(const ii of _n)if(ii&&(ii(Ge,Ht),Ht.isMatchIgnored))return Ta(st);return Nt.skip?an+=st:(Nt.excludeBegin&&(an+=st),kn(),!Nt.returnBegin&&!Nt.excludeBegin&&(an=st)),Ea(Nt,Ge),Nt.returnBegin?0:st.length}function Rr(Ge){const st=Ge[0],Nt=at.substring(Ge.index),Ht=Yl(St,Ge,Nt);if(!Ht)return ft;const _n=St;St.endScope&&St.endScope._wrap?(kn(),qr(st,St.endScope._wrap)):St.endScope&&St.endScope._multi?(kn(),bf(St.endScope,Ge)):_n.skip?an+=st:(_n.returnEnd||_n.excludeEnd||(an+=st),kn(),_n.excludeEnd&&(an=st));do St.scope&&Un.closeNode(),!St.skip&&!St.subLanguage&&($s+=St.relevance),St=St.parent;while(St!==Ht.parent);return Ht.starts&&Ea(Ht.starts,Ge),_n.returnEnd?0:st.length}function Xl(){const Ge=[];for(let st=St;st!==nr;st=st.parent)st.scope&&Ge.unshift(st.scope);Ge.forEach(st=>Un.openNode(st))}let Mo={};function Ca(Ge,st){const Nt=st&&st[0];if(an+=Ge,Nt==null)return kn(),0;if(Mo.type==="begin"&&st.type==="end"&&Mo.index===st.index&&Nt===""){if(an+=at.slice(st.index,st.index+1),!Rt){const Ht=new Error(`0 width match regex (${$e})`);throw Ht.languageName=$e,Ht.badRule=Mo.rule,Ht}return 1}if(Mo=st,st.type==="begin")return lm(st);if(st.type==="illegal"&&!jt){const Ht=new Error('Illegal lexeme "'+Nt+'" for mode "'+(St.scope||"<unnamed>")+'"');throw Ht.mode=St,Ht}else if(st.type==="end"){const Ht=Rr(st);if(Ht!==ft)return Ht}if(st.type==="illegal"&&Nt==="")return an+=`
45
+ `,1;if(Zl>1e5&&Zl>st.index*3)throw new Error("potential infinite loop, way more iterations than matches");return an+=Nt,Nt.length}const nr=tr($e);if(!nr)throw ee(lt.replace("{}",$e)),new Error('Unknown language: "'+$e+'"');const yf=Je(nr);let Ra="",St=on||yf;const vf={},Un=new qe.__emitter(qe);Xl();let an="",$s=0,es=0,Zl=0,Bs=!1;try{if(nr.__emitTokens)nr.__emitTokens(at,Un);else{for(St.matcher.considerAll();;){Zl++,Bs?Bs=!1:St.matcher.considerAll(),St.matcher.lastIndex=es;const Ge=St.matcher.exec(at);if(!Ge)break;const st=at.substring(es,Ge.index),Nt=Ca(st,Ge);es=Ge.index+Nt}Ca(at.substring(es))}return Un.finalize(),Ra=Un.toHTML(),{language:$e,value:Ra,relevance:$s,illegal:!1,_emitter:Un,_top:St}}catch(Ge){if(Ge.message&&Ge.message.includes("Illegal"))return{language:$e,value:ct(at),illegal:!0,relevance:0,_illegalBy:{message:Ge.message,index:es,context:at.slice(es-100,es+100),mode:Ge.mode,resultSoFar:Ra},_emitter:Un};if(Rt)return{language:$e,value:ct(at),illegal:!1,relevance:0,errorRaised:Ge,_emitter:Un,_top:St};throw Ge}}function dt($e){const at={value:ct($e),illegal:!1,relevance:0,_top:He,_emitter:new qe.__emitter(qe)};return at._emitter.addText($e),at}function Et($e,at){at=at||qe.languages||Object.keys(me);const jt=dt($e),on=at.filter(tr).filter(zs).map(kn=>We(kn,$e,!1));on.unshift(jt);const Mn=on.sort((kn,qr)=>{if(kn.relevance!==qr.relevance)return qr.relevance-kn.relevance;if(kn.language&&qr.language){if(tr(kn.language).supersetOf===qr.language)return 1;if(tr(qr.language).supersetOf===kn.language)return-1}return 0}),[ur,Ur]=Mn,Cr=ur;return Cr.secondBest=Ur,Cr}function Ne($e,at,jt){const on=at&&Le[at]||jt;$e.classList.add("hljs"),$e.classList.add(`language-${on}`)}function Tt($e){let at=null;const jt=je($e);if(De(jt))return;if(Io("before:highlightElement",{el:$e,language:jt}),$e.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",$e);return}if($e.children.length>0&&(qe.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($e)),qe.throwUnescapedHTML))throw new rt("One of your code blocks includes unescaped HTML.",$e.innerHTML);at=$e;const on=at.textContent,Mn=jt?Ie(on,{language:jt,ignoreIllegals:!0}):Et(on);$e.innerHTML=Mn.value,$e.dataset.highlighted="yes",Ne($e,jt,Mn.language),$e.result={language:Mn.language,re:Mn.relevance,relevance:Mn.relevance},Mn.secondBest&&($e.secondBest={language:Mn.secondBest.language,relevance:Mn.secondBest.relevance}),Io("after:highlightElement",{el:$e,result:Mn,text:on})}function Qt($e){qe=it(qe,$e)}const rn=()=>{Br(),Q("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Rn(){Br(),Q("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Yn=!1;function Br(){function $e(){Br()}if(document.readyState==="loading"){Yn||window.addEventListener("DOMContentLoaded",$e,!1),Yn=!0;return}document.querySelectorAll(qe.cssSelector).forEach(Tt)}function Bn($e,at){let jt=null;try{jt=at(X)}catch(on){if(ee("Language definition for '{}' could not be registered.".replace("{}",$e)),Rt)ee(on);else throw on;jt=He}jt.name||(jt.name=$e),me[$e]=jt,jt.rawDefinition=at.bind(null,X),jt.aliases&&Qi(jt.aliases,{languageName:$e})}function ri($e){delete me[$e];for(const at of Object.keys(Le))Le[at]===$e&&delete Le[at]}function Fr(){return Object.keys(me)}function tr($e){return $e=($e||"").toLowerCase(),me[$e]||me[Le[$e]]}function Qi($e,{languageName:at}){typeof $e=="string"&&($e=[$e]),$e.forEach(jt=>{Le[jt.toLowerCase()]=at})}function zs($e){const at=tr($e);return at&&!at.disableAutodetect}function Ps($e){$e["before:highlightBlock"]&&!$e["before:highlightElement"]&&($e["before:highlightElement"]=at=>{$e["before:highlightBlock"](Object.assign({block:at.el},at))}),$e["after:highlightBlock"]&&!$e["after:highlightElement"]&&($e["after:highlightElement"]=at=>{$e["after:highlightBlock"](Object.assign({block:at.el},at))})}function Fn($e){Ps($e),Xe.push($e)}function gf($e){const at=Xe.indexOf($e);at!==-1&&Xe.splice(at,1)}function Io($e,at){const jt=$e;Xe.forEach(function(on){on[jt]&&on[jt](at)})}function Ji($e){return Q("10.7.0","highlightBlock will be removed entirely in v12.0"),Q("10.7.0","Please use highlightElement now."),Tt($e)}Object.assign(X,{highlight:Ie,highlightAuto:Et,highlightAll:Br,highlightElement:Tt,highlightBlock:Ji,configure:Qt,initHighlighting:rn,initHighlightingOnLoad:Rn,registerLanguage:Bn,unregisterLanguage:ri,listLanguages:Fr,getLanguage:tr,registerAliases:Qi,autoDetection:zs,inherit:it,addPlugin:Fn,removePlugin:gf}),X.debugMode=function(){Rt=!1},X.safeMode=function(){Rt=!0},X.versionString=nt,X.regex={concat:S,lookahead:b,either:E,optional:k,anyNumberOfTimes:y};for(const $e in Ee)typeof Ee[$e]=="object"&&e(Ee[$e]);return Object.assign(X,Ee),X},At=Pt({});return At.newInstance=()=>Pt({}),yy=At,At.HighlightJS=At,At.default=At,yy}var nee=tee();const ree=Vc(nee),pR={},iee="hljs-";function see(e){const t=ree.newInstance();return e&&a(e),{highlight:n,highlightAuto:r,listLanguages:s,register:a,registerAlias:l,registered:c};function n(f,d,h){const m=h||pR,b=typeof m.prefix=="string"?m.prefix:iee;if(!t.getLanguage(f))throw new Error("Unknown language: `"+f+"` is not registered");t.configure({__emitter:oee,classPrefix:b});const y=t.highlight(d,{ignoreIllegals:!0,language:f});if(y.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:y.errorRaised});const k=y._emitter.root,S=k.data;return S.language=y.language,S.relevance=y.relevance,k}function r(f,d){const m=(d||pR).subset||s();let b=-1,y=0,k;for(;++b<m.length;){const S=m[b];if(!t.getLanguage(S))continue;const C=n(S,f,d);C.data&&C.data.relevance!==void 0&&C.data.relevance>y&&(y=C.data.relevance,k=C)}return k||{type:"root",children:[],data:{language:void 0,relevance:y}}}function s(){return t.listLanguages()}function a(f,d){if(typeof f=="string")t.registerLanguage(f,d);else{let h;for(h in f)Object.hasOwn(f,h)&&t.registerLanguage(h,f[h])}}function l(f,d){if(typeof f=="string")t.registerAliases(typeof d=="string"?d:[...d],{languageName:f});else{let h;for(h in f)if(Object.hasOwn(f,h)){const m=f[h];t.registerAliases(typeof m=="string"?m:[...m],{languageName:h})}}}function c(f){return!!t.getLanguage(f)}}class oee{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;const n=this.stack[this.stack.length-1],r=n.children[n.children.length-1];r&&r.type==="text"?r.value+=t:n.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,n){const r=this.stack[this.stack.length-1],s=t.root.children;n?r.children.push({type:"element",tagName:"span",properties:{className:[n]},children:s}):r.children.push(...s)}openNode(t){const n=this,r=t.split(".").map(function(l,c){return c?l+"_".repeat(c):n.options.classPrefix+l}),s=this.stack[this.stack.length-1],a={type:"element",tagName:"span",properties:{className:r},children:[]};s.children.push(a),this.stack.push(a)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const aee={};function lee(e){const t=e||aee,n=t.aliases,r=t.detect||!1,s=t.languages||eee,a=t.plainText,l=t.prefix,c=t.subset;let f="hljs";const d=see(s);if(n&&d.registerAlias(n),l){const h=l.indexOf("-");f=h===-1?l:l.slice(0,h)}return function(h,m){om(h,"element",function(b,y,k){if(b.tagName!=="code"||!k||k.type!=="element"||k.tagName!=="pre")return;const S=uee(b);if(S===!1||!S&&!r||S&&a&&a.includes(S))return;Array.isArray(b.properties.className)||(b.properties.className=[]),b.properties.className.includes(f)||b.properties.className.unshift(f);const C=RQ(b,{whitespace:"pre"});let E;try{E=S?d.highlight(S,C,{prefix:l}):d.highlightAuto(C,{prefix:l,subset:c})}catch(T){const R=T;if(S&&/Unknown language/.test(R.message)){m.message("Cannot highlight as `"+S+"`, it’s not registered",{ancestors:[k,b],cause:R,place:b.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw R}!S&&E.data&&E.data.language&&b.properties.className.push("language-"+E.data.language),E.children.length>0&&(b.children=E.children)})}}function uee(e){const t=e.properties.className;let n=-1;if(!Array.isArray(t))return;let r;for(;++n<t.length;){const s=String(t[n]);if(s==="no-highlight"||s==="nohighlight")return!1;!r&&s.slice(0,5)==="lang-"&&(r=s.slice(5)),!r&&s.slice(0,9)==="language-"&&(r=s.slice(9))}return r}function hR(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,s=n.indexOf(t);for(;s!==-1;)r++,s=n.indexOf(t,s+t.length);return r}function cee(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function fee(e,t,n){const s=df((n||{}).ignore||[]),a=dee(t);let l=-1;for(;++l<a.length;)rD(e,"text",c);function c(d,h){let m=-1,b;for(;++m<h.length;){const y=h[m],k=b?b.children:void 0;if(s(y,k?k.indexOf(y):void 0,b))return;b=y}if(b)return f(d,h)}function f(d,h){const m=h[h.length-1],b=a[l][0],y=a[l][1];let k=0;const C=m.children.indexOf(d);let E=!1,T=[];b.lastIndex=0;let R=b.exec(d.value);for(;R;){const _=R.index,D={index:R.index,input:R.input,stack:[...h,d]};let A=y(...R,D);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?b.lastIndex=_+1:(k!==_&&T.push({type:"text",value:d.value.slice(k,_)}),Array.isArray(A)?T.push(...A):A&&T.push(A),k=_+R[0].length,E=!0),!b.global)break;R=b.exec(d.value)}return E?(k<d.value.length&&T.push({type:"text",value:d.value.slice(k)}),m.children.splice(C,1,...T)):T=[d],C+T.length}}function dee(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const s=n[r];t.push([pee(s[0]),hee(s[1])])}return t}function pee(e){return typeof e=="string"?new RegExp(cee(e),"g"):e}function hee(e){return typeof e=="function"?e:function(){return e}}const vy="phrasing",xy=["autolink","link","image","label"];function mee(){return{transforms:[See],enter:{literalAutolink:bee,literalAutolinkEmail:ky,literalAutolinkHttp:ky,literalAutolinkWww:ky},exit:{literalAutolink:kee,literalAutolinkEmail:xee,literalAutolinkHttp:yee,literalAutolinkWww:vee}}}function gee(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:vy,notInConstruct:xy},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:vy,notInConstruct:xy},{character:":",before:"[ps]",after:"\\/",inConstruct:vy,notInConstruct:xy}]}}function bee(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function ky(e){this.config.enter.autolinkProtocol.call(this,e)}function yee(e){this.config.exit.autolinkProtocol.call(this,e)}function vee(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function xee(e){this.config.exit.autolinkEmail.call(this,e)}function kee(e){this.exit(e)}function See(e){fee(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,wee],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Eee]],{ignore:["link","linkReference"]})}function wee(e,t,n,r,s){let a="";if(!CD(s)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!Tee(n)))return!1;const l=Cee(n+r);if(!l[0])return!1;const c={type:"link",title:null,url:a+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[c,{type:"text",value:l[1]}]:c}function Eee(e,t,n,r){return!CD(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Tee(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Cee(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const s=hR(e,"(");let a=hR(e,")");for(;r!==-1&&s>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function CD(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ha(n)||nm(n))&&(!t||n!==47)}RD.peek=Lee;function Ree(){this.buffer()}function _ee(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Aee(){this.buffer()}function Nee(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Oee(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ni(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Iee(e){this.exit(e)}function Mee(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ni(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Dee(e){this.exit(e)}function Lee(){return"["}function RD(e,t,n,r){const s=n.createTracker(r);let a=s.move("[^");const l=n.enter("footnoteReference"),c=n.enter("reference");return a+=s.move(n.safe(n.associationId(e),{after:"]",before:a})),c(),l(),a+=s.move("]"),a}function jee(){return{enter:{gfmFootnoteCallString:Ree,gfmFootnoteCall:_ee,gfmFootnoteDefinitionLabelString:Aee,gfmFootnoteDefinition:Nee},exit:{gfmFootnoteCallString:Oee,gfmFootnoteCall:Iee,gfmFootnoteDefinitionLabelString:Mee,gfmFootnoteDefinition:Dee}}}function zee(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:RD},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,s,a,l){const c=a.createTracker(l);let f=c.move("[^");const d=a.enter("footnoteDefinition"),h=a.enter("label");return f+=c.move(a.safe(a.associationId(r),{before:f,after:"]"})),h(),f+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),f+=c.move((t?`
46
+ `:" ")+a.indentLines(a.containerFlow(r,c.current()),t?_D:Pee))),d(),f}}function Pee(e,t,n){return t===0?e:_D(e,t,n)}function _D(e,t,n){return(n?"":" ")+e}const $ee=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];AD.peek=Hee;function Bee(){return{canContainEols:["delete"],enter:{strikethrough:Uee},exit:{strikethrough:qee}}}function Fee(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:$ee}],handlers:{delete:AD}}}function Uee(e){this.enter({type:"delete",children:[]},e)}function qee(e){this.exit(e)}function AD(e,t,n,r){const s=n.createTracker(r),a=n.enter("strikethrough");let l=s.move("~~");return l+=n.containerPhrasing(e,{...s.current(),before:l,after:"~"}),l+=s.move("~~"),a(),l}function Hee(){return"~"}function Vee(e,t={}){const n=(t.align||[]).concat(),r=t.stringLength||Wee,s=[],a=[],l=[],c=[];let f=0,d=-1;for(;++d<e.length;){const k=[],S=[];let C=-1;for(e[d].length>f&&(f=e[d].length);++C<e[d].length;){const E=Gee(e[d][C]);if(t.alignDelimiters!==!1){const T=r(E);S[C]=T,(c[C]===void 0||T>c[C])&&(c[C]=T)}k.push(E)}a[d]=k,l[d]=S}let h=-1;if(typeof n=="object"&&"length"in n)for(;++h<f;)s[h]=mR(n[h]);else{const k=mR(n);for(;++h<f;)s[h]=k}h=-1;const m=[],b=[];for(;++h<f;){const k=s[h];let S="",C="";k===99?(S=":",C=":"):k===108?S=":":k===114&&(C=":");let E=t.alignDelimiters===!1?1:Math.max(1,c[h]-S.length-C.length);const T=S+"-".repeat(E)+C;t.alignDelimiters!==!1&&(E=S.length+E+C.length,E>c[h]&&(c[h]=E),b[h]=E),m[h]=T}a.splice(1,0,m),l.splice(1,0,b),d=-1;const y=[];for(;++d<a.length;){const k=a[d],S=l[d];h=-1;const C=[];for(;++h<f;){const E=k[h]||"";let T="",R="";if(t.alignDelimiters!==!1){const _=c[h]-(S[h]||0),D=s[h];D===114?T=" ".repeat(_):D===99?_%2?(T=" ".repeat(_/2+.5),R=" ".repeat(_/2-.5)):(T=" ".repeat(_/2),R=T):R=" ".repeat(_)}t.delimiterStart!==!1&&!h&&C.push("|"),t.padding!==!1&&!(t.alignDelimiters===!1&&E==="")&&(t.delimiterStart!==!1||h)&&C.push(" "),t.alignDelimiters!==!1&&C.push(T),C.push(E),t.alignDelimiters!==!1&&C.push(R),t.padding!==!1&&C.push(" "),(t.delimiterEnd!==!1||h!==f-1)&&C.push("|")}y.push(t.delimiterEnd===!1?C.join("").replace(/ +$/,""):C.join(""))}return y.join(`
47
+ `)}function Gee(e){return e==null?"":String(e)}function Wee(e){return e.length}function mR(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function Kee(e,t,n,r){const s=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const l=n.indentLines(n.containerFlow(e,a.current()),Yee);return s(),l}function Yee(e,t,n){return">"+(n?"":" ")+e}function Xee(e,t){return gR(e,t.inConstruct,!0)&&!gR(e,t.notInConstruct,!1)}function gR(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function bR(e,t,n,r){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
48
+ `&&Xee(n.stack,n.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
49
+ `}function Zee(e,t){const n=String(e);let r=n.indexOf(t),s=r,a=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===s?++a>l&&(l=a):a=1,s=r+t.length,r=n.indexOf(t,s);return l}function Qee(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Jee(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function ete(e,t,n,r){const s=Jee(n),a=e.value||"",l=s==="`"?"GraveAccent":"Tilde";if(Qee(e,n)){const m=n.enter("codeIndented"),b=n.indentLines(a,tte);return m(),b}const c=n.createTracker(r),f=s.repeat(Math.max(Zee(a,s)+1,3)),d=n.enter("codeFenced");let h=c.move(f);if(e.lang){const m=n.enter(`codeFencedLang${l}`);h+=c.move(n.safe(e.lang,{before:h,after:" ",encode:["`"],...c.current()})),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${l}`);h+=c.move(" "),h+=c.move(n.safe(e.meta,{before:h,after:`
50
+ `,encode:["`"],...c.current()})),m()}return h+=c.move(`
51
+ `),a&&(h+=c.move(a+`
52
+ `)),h+=c.move(f),d(),h}function tte(e,t,n){return(n?"":" ")+e}function A0(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function nte(e,t,n,r){const s=A0(n),a=s==='"'?"Quote":"Apostrophe",l=n.enter("definition");let c=n.enter("label");const f=n.createTracker(r);let d=f.move("[");return d+=f.move(n.safe(n.associationId(e),{before:d,after:"]",...f.current()})),d+=f.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),d+=f.move("<"),d+=f.move(n.safe(e.url,{before:d,after:">",...f.current()})),d+=f.move(">")):(c=n.enter("destinationRaw"),d+=f.move(n.safe(e.url,{before:d,after:e.title?" ":`
53
+ `,...f.current()}))),c(),e.title&&(c=n.enter(`title${a}`),d+=f.move(" "+s),d+=f.move(n.safe(e.title,{before:d,after:s,...f.current()})),d+=f.move(s),c()),l(),d}function rte(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function qc(e){return"&#x"+e.toString(16).toUpperCase()+";"}function fh(e,t,n){const r=jl(e),s=jl(t);return r===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}ND.peek=ite;function ND(e,t,n,r){const s=rte(n),a=n.enter("emphasis"),l=n.createTracker(r),c=l.move(s);let f=l.move(n.containerPhrasing(e,{after:s,before:c,...l.current()}));const d=f.charCodeAt(0),h=fh(r.before.charCodeAt(r.before.length-1),d,s);h.inside&&(f=qc(d)+f.slice(1));const m=f.charCodeAt(f.length-1),b=fh(r.after.charCodeAt(0),m,s);b.inside&&(f=f.slice(0,-1)+qc(m));const y=l.move(s);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:h.outside},c+f+y}function ite(e,t,n){return n.options.emphasis||"*"}function ste(e,t){let n=!1;return om(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,wv}),!!((!e.depth||e.depth<3)&&v0(e)&&(t.options.setext||n))}function ote(e,t,n,r){const s=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(ste(e,n)){const h=n.enter("headingSetext"),m=n.enter("phrasing"),b=n.containerPhrasing(e,{...a.current(),before:`
54
+ `,after:`
55
+ `});return m(),h(),b+`
56
+ `+(s===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
57
+ `))+1))}const l="#".repeat(s),c=n.enter("headingAtx"),f=n.enter("phrasing");a.move(l+" ");let d=n.containerPhrasing(e,{before:"# ",after:`
58
+ `,...a.current()});return/^[\t ]/.test(d)&&(d=qc(d.charCodeAt(0))+d.slice(1)),d=d?l+" "+d:l,n.options.closeAtx&&(d+=" "+l),f(),c(),d}OD.peek=ate;function OD(e){return e.value||""}function ate(){return"<"}ID.peek=lte;function ID(e,t,n,r){const s=A0(n),a=s==='"'?"Quote":"Apostrophe",l=n.enter("image");let c=n.enter("label");const f=n.createTracker(r);let d=f.move("![");return d+=f.move(n.safe(e.alt,{before:d,after:"]",...f.current()})),d+=f.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),d+=f.move("<"),d+=f.move(n.safe(e.url,{before:d,after:">",...f.current()})),d+=f.move(">")):(c=n.enter("destinationRaw"),d+=f.move(n.safe(e.url,{before:d,after:e.title?" ":")",...f.current()}))),c(),e.title&&(c=n.enter(`title${a}`),d+=f.move(" "+s),d+=f.move(n.safe(e.title,{before:d,after:s,...f.current()})),d+=f.move(s),c()),d+=f.move(")"),l(),d}function lte(){return"!"}MD.peek=ute;function MD(e,t,n,r){const s=e.referenceType,a=n.enter("imageReference");let l=n.enter("label");const c=n.createTracker(r);let f=c.move("![");const d=n.safe(e.alt,{before:f,after:"]",...c.current()});f+=c.move(d+"]["),l();const h=n.stack;n.stack=[],l=n.enter("reference");const m=n.safe(n.associationId(e),{before:f,after:"]",...c.current()});return l(),n.stack=h,a(),s==="full"||!d||d!==m?f+=c.move(m+"]"):s==="shortcut"?f=f.slice(0,-1):f+=c.move("]"),f}function ute(){return"!"}DD.peek=cte;function DD(e,t,n){let r=e.value||"",s="`",a=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(r);)s+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const l=n.unsafe[a],c=n.compilePattern(l);let f;if(l.atBreak)for(;f=c.exec(r);){let d=f.index;r.charCodeAt(d)===10&&r.charCodeAt(d-1)===13&&d--,r=r.slice(0,d)+" "+r.slice(f.index+1)}}return s+r+s}function cte(){return"`"}function LD(e,t){const n=v0(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}jD.peek=fte;function jD(e,t,n,r){const s=A0(n),a=s==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let c,f;if(LD(e,n)){const h=n.stack;n.stack=[],c=n.enter("autolink");let m=l.move("<");return m+=l.move(n.containerPhrasing(e,{before:m,after:">",...l.current()})),m+=l.move(">"),c(),n.stack=h,m}c=n.enter("link"),f=n.enter("label");let d=l.move("[");return d+=l.move(n.containerPhrasing(e,{before:d,after:"](",...l.current()})),d+=l.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),d+=l.move("<"),d+=l.move(n.safe(e.url,{before:d,after:">",...l.current()})),d+=l.move(">")):(f=n.enter("destinationRaw"),d+=l.move(n.safe(e.url,{before:d,after:e.title?" ":")",...l.current()}))),f(),e.title&&(f=n.enter(`title${a}`),d+=l.move(" "+s),d+=l.move(n.safe(e.title,{before:d,after:s,...l.current()})),d+=l.move(s),f()),d+=l.move(")"),c(),d}function fte(e,t,n){return LD(e,n)?"<":"["}zD.peek=dte;function zD(e,t,n,r){const s=e.referenceType,a=n.enter("linkReference");let l=n.enter("label");const c=n.createTracker(r);let f=c.move("[");const d=n.containerPhrasing(e,{before:f,after:"]",...c.current()});f+=c.move(d+"]["),l();const h=n.stack;n.stack=[],l=n.enter("reference");const m=n.safe(n.associationId(e),{before:f,after:"]",...c.current()});return l(),n.stack=h,a(),s==="full"||!d||d!==m?f+=c.move(m+"]"):s==="shortcut"?f=f.slice(0,-1):f+=c.move("]"),f}function dte(){return"["}function N0(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function pte(e){const t=N0(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function hte(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function PD(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function mte(e,t,n,r){const s=n.enter("list"),a=n.bulletCurrent;let l=e.ordered?hte(n):N0(n);const c=e.ordered?l==="."?")":".":pte(n);let f=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&h&&(!h.children||!h.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(f=!0),PD(n)===l&&h){let m=-1;for(;++m<e.children.length;){const b=e.children[m];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){f=!0;break}}}}f&&(l=c),n.bulletCurrent=l;const d=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=a,s(),d}function gte(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function bte(e,t,n,r){const s=gte(n);let a=n.bulletCurrent||N0(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let l=a.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const c=n.createTracker(r);c.move(a+" ".repeat(l-a.length)),c.shift(l);const f=n.enter("listItem"),d=n.indentLines(n.containerFlow(e,c.current()),h);return f(),d;function h(m,b,y){return b?(y?"":" ".repeat(l))+m:(y?a:a+" ".repeat(l-a.length))+m}}function yte(e,t,n,r){const s=n.enter("paragraph"),a=n.enter("phrasing"),l=n.containerPhrasing(e,r);return a(),s(),l}const vte=df(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function xte(e,t,n,r){return(e.children.some(function(l){return vte(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function kte(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}$D.peek=Ste;function $D(e,t,n,r){const s=kte(n),a=n.enter("strong"),l=n.createTracker(r),c=l.move(s+s);let f=l.move(n.containerPhrasing(e,{after:s,before:c,...l.current()}));const d=f.charCodeAt(0),h=fh(r.before.charCodeAt(r.before.length-1),d,s);h.inside&&(f=qc(d)+f.slice(1));const m=f.charCodeAt(f.length-1),b=fh(r.after.charCodeAt(0),m,s);b.inside&&(f=f.slice(0,-1)+qc(m));const y=l.move(s+s);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:h.outside},c+f+y}function Ste(e,t,n){return n.options.strong||"*"}function wte(e,t,n,r){return n.safe(e.value,r)}function Ete(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Tte(e,t,n){const r=(PD(n)+(n.options.ruleSpaces?" ":"")).repeat(Ete(n));return n.options.ruleSpaces?r.slice(0,-1):r}const BD={blockquote:Kee,break:bR,code:ete,definition:nte,emphasis:ND,hardBreak:bR,heading:ote,html:OD,image:ID,imageReference:MD,inlineCode:DD,link:jD,linkReference:zD,list:mte,listItem:bte,paragraph:yte,root:xte,strong:$D,text:wte,thematicBreak:Tte};function Cte(){return{enter:{table:Rte,tableData:yR,tableHeader:yR,tableRow:Ate},exit:{codeText:Nte,table:_te,tableData:Sy,tableHeader:Sy,tableRow:Sy}}}function Rte(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function _te(e){this.exit(e),this.data.inTable=void 0}function Ate(e){this.enter({type:"tableRow",children:[]},e)}function Sy(e){this.exit(e)}function yR(e){this.enter({type:"tableCell",children:[]},e)}function Nte(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Ote));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Ote(e,t){return t==="|"?t:e}function Ite(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,s=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
59
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:l,tableCell:f,tableRow:c}};function l(y,k,S,C){return d(h(y,S,C),y.align)}function c(y,k,S,C){const E=m(y,S,C),T=d([E]);return T.slice(0,T.indexOf(`
60
+ `))}function f(y,k,S,C){const E=S.enter("tableCell"),T=S.enter("phrasing"),R=S.containerPhrasing(y,{...C,before:a,after:a});return T(),E(),R}function d(y,k){return Vee(y,{align:k,alignDelimiters:r,padding:n,stringLength:s})}function h(y,k,S){const C=y.children;let E=-1;const T=[],R=k.enter("table");for(;++E<C.length;)T[E]=m(C[E],k,S);return R(),T}function m(y,k,S){const C=y.children;let E=-1;const T=[],R=k.enter("tableRow");for(;++E<C.length;)T[E]=f(C[E],y,k,S);return R(),T}function b(y,k,S){let C=BD.inlineCode(y,k,S);return S.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function Mte(){return{exit:{taskListCheckValueChecked:vR,taskListCheckValueUnchecked:vR,paragraph:Lte}}}function Dte(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:jte}}}function vR(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Lte(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const s=t.children;let a=-1,l;for(;++a<s.length;){const c=s[a];if(c.type==="paragraph"){l=c;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function jte(e,t,n,r){const s=e.children[0],a=typeof e.checked=="boolean"&&s&&s.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);a&&c.move(l);let f=BD.listItem(e,t,n,{...r,...c.current()});return a&&(f=f.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,d)),f;function d(h){return h+l}}function zte(){return[mee(),jee(),Bee(),Cte(),Mte()]}function Pte(e){return{extensions:[gee(),zee(e),Fee(),Ite(e),Dte()]}}const $te={tokenize:Vte,partial:!0},FD={tokenize:Gte,partial:!0},UD={tokenize:Wte,partial:!0},qD={tokenize:Kte,partial:!0},Bte={tokenize:Yte,partial:!0},HD={name:"wwwAutolink",tokenize:qte,previous:GD},VD={name:"protocolAutolink",tokenize:Hte,previous:WD},js={name:"emailAutolink",tokenize:Ute,previous:KD},Zi={};function Fte(){return{text:Zi}}let Qo=48;for(;Qo<123;)Zi[Qo]=js,Qo++,Qo===58?Qo=65:Qo===91&&(Qo=97);Zi[43]=js;Zi[45]=js;Zi[46]=js;Zi[95]=js;Zi[72]=[js,VD];Zi[104]=[js,VD];Zi[87]=[js,HD];Zi[119]=[js,HD];function Ute(e,t,n){const r=this;let s,a;return l;function l(m){return!_v(m)||!KD.call(r,r.previous)||O0(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(m))}function c(m){return _v(m)?(e.consume(m),c):m===64?(e.consume(m),f):n(m)}function f(m){return m===46?e.check(Bte,h,d)(m):m===45||m===95||mr(m)?(a=!0,e.consume(m),f):h(m)}function d(m){return e.consume(m),s=!0,f}function h(m){return a&&s&&wr(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function qte(e,t,n){const r=this;return s;function s(l){return l!==87&&l!==119||!GD.call(r,r.previous)||O0(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check($te,e.attempt(FD,e.attempt(UD,a),n),n)(l))}function a(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function Hte(e,t,n){const r=this;let s="",a=!1;return l;function l(m){return(m===72||m===104)&&WD.call(r,r.previous)&&!O0(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(m),e.consume(m),c):n(m)}function c(m){if(wr(m)&&s.length<5)return s+=String.fromCodePoint(m),e.consume(m),c;if(m===58){const b=s.toLowerCase();if(b==="http"||b==="https")return e.consume(m),f}return n(m)}function f(m){return m===47?(e.consume(m),a?d:(a=!0,f)):n(m)}function d(m){return m===null||oh(m)||xn(m)||ha(m)||nm(m)?n(m):e.attempt(FD,e.attempt(UD,h),n)(m)}function h(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function Vte(e,t,n){let r=0;return s;function s(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),s):l===46&&r===3?(e.consume(l),a):n(l)}function a(l){return l===null?n(l):t(l)}}function Gte(e,t,n){let r,s,a;return l;function l(d){return d===46||d===95?e.check(qD,f,c)(d):d===null||xn(d)||ha(d)||d!==45&&nm(d)?f(d):(a=!0,e.consume(d),l)}function c(d){return d===95?r=!0:(s=r,r=void 0),e.consume(d),l}function f(d){return s||r||!a?n(d):t(d)}}function Wte(e,t){let n=0,r=0;return s;function s(l){return l===40?(n++,e.consume(l),s):l===41&&r<n?a(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(qD,t,a)(l):l===null||xn(l)||ha(l)?t(l):(e.consume(l),s)}function a(l){return l===41&&r++,e.consume(l),s}}function Kte(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),a):c===93?(e.consume(c),s):c===60||c===null||xn(c)||ha(c)?t(c):n(c)}function s(c){return c===null||c===40||c===91||xn(c)||ha(c)?t(c):r(c)}function a(c){return wr(c)?l(c):n(c)}function l(c){return c===59?(e.consume(c),r):wr(c)?(e.consume(c),l):n(c)}}function Yte(e,t,n){return r;function r(a){return e.consume(a),s}function s(a){return mr(a)?n(a):t(a)}}function GD(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||xn(e)}function WD(e){return!wr(e)}function KD(e){return!(e===47||_v(e))}function _v(e){return e===43||e===45||e===46||e===95||mr(e)}function O0(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Xte={tokenize:ine,partial:!0};function Zte(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:tne,continuation:{tokenize:nne},exit:rne}},text:{91:{name:"gfmFootnoteCall",tokenize:ene},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Qte,resolveTo:Jte}}}}function Qte(e,t,n){const r=this;let s=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;s--;){const f=r.events[s][1];if(f.type==="labelImage"){l=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return c;function c(f){if(!l||!l._balanced)return n(f);const d=Ni(r.sliceSerialize({start:l.end,end:r.now()}));return d.codePointAt(0)!==94||!a.includes(d.slice(1))?n(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),t(f))}}function Jte(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",a,t],["enter",l,t],["exit",l,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function ene(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,l;return c;function c(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),f}function f(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",d)}function d(m){if(a>999||m===93&&!l||m===null||m===91||xn(m))return n(m);if(m===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return s.includes(Ni(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return xn(m)||(l=!0),a++,e.consume(m),m===92?h:d}function h(m){return m===91||m===92||m===93?(e.consume(m),a++,d):d(m)}}function tne(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,l=0,c;return f;function f(k){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(k){return k===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(k)}function h(k){if(l>999||k===93&&!c||k===null||k===91||xn(k))return n(k);if(k===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return a=Ni(r.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return xn(k)||(c=!0),l++,e.consume(k),k===92?m:h}function m(k){return k===91||k===92||k===93?(e.consume(k),l++,h):h(k)}function b(k){return k===58?(e.enter("definitionMarker"),e.consume(k),e.exit("definitionMarker"),s.includes(a)||s.push(a),Zt(e,y,"gfmFootnoteDefinitionWhitespace")):n(k)}function y(k){return t(k)}}function nne(e,t,n){return e.check(ff,t,e.attempt(Xte,t,n))}function rne(e){e.exit("gfmFootnoteDefinition")}function ine(e,t,n){const r=this;return Zt(e,s,"gfmFootnoteDefinitionIndent",5);function s(a){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(a):n(a)}}function sne(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:s};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(l,c){let f=-1;for(;++f<l.length;)if(l[f][0]==="enter"&&l[f][1].type==="strikethroughSequenceTemporary"&&l[f][1]._close){let d=f;for(;d--;)if(l[d][0]==="exit"&&l[d][1].type==="strikethroughSequenceTemporary"&&l[d][1]._open&&l[f][1].end.offset-l[f][1].start.offset===l[d][1].end.offset-l[d][1].start.offset){l[f][1].type="strikethroughSequence",l[d][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},l[d][1].start),end:Object.assign({},l[f][1].end)},m={type:"strikethroughText",start:Object.assign({},l[d][1].end),end:Object.assign({},l[f][1].start)},b=[["enter",h,c],["enter",l[d][1],c],["exit",l[d][1],c],["enter",m,c]],y=c.parser.constructs.insideSpan.null;y&&ni(b,b.length,0,rm(y,l.slice(d+1,f),c)),ni(b,b.length,0,[["exit",m,c],["enter",l[f][1],c],["exit",l[f][1],c],["exit",h,c]]),ni(l,d-1,f-d+3,b),f=d+b.length-2;break}}for(f=-1;++f<l.length;)l[f][1].type==="strikethroughSequenceTemporary"&&(l[f][1].type="data");return l}function a(l,c,f){const d=this.previous,h=this.events;let m=0;return b;function b(k){return d===126&&h[h.length-1][1].type!=="characterEscape"?f(k):(l.enter("strikethroughSequenceTemporary"),y(k))}function y(k){const S=jl(d);if(k===126)return m>1?f(k):(l.consume(k),m++,y);if(m<2&&!n)return f(k);const C=l.exit("strikethroughSequenceTemporary"),E=jl(k);return C._open=!E||E===2&&!!S,C._close=!S||S===2&&!!E,c(k)}}}class one{constructor(){this.map=[]}add(t,n,r){ane(this,t,n,r)}consume(t){if(this.map.sort(function(a,l){return a[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let s=r.pop();for(;s;){for(const a of s)t.push(a);s=r.pop()}this.map.length=0}}function ane(e,t,n,r){let s=0;if(!(n===0&&r.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...r);return}s+=1}e.map.push([t,n,r])}}function lne(e,t){let n=!1;const r=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function une(){return{flow:{null:{name:"table",tokenize:cne,resolveAll:fne}}}}function cne(e,t,n){const r=this;let s=0,a=0,l;return c;function c(O){let Y=r.events.length-1;for(;Y>-1;){const j=r.events[Y][1].type;if(j==="lineEnding"||j==="linePrefix")Y--;else break}const U=Y>-1?r.events[Y][1].type:null,B=U==="tableHead"||U==="tableRow"?A:f;return B===A&&r.parser.lazy[r.now().line]?n(O):B(O)}function f(O){return e.enter("tableHead"),e.enter("tableRow"),d(O)}function d(O){return O===124||(l=!0,a+=1),h(O)}function h(O){return O===null?n(O):yt(O)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),y):n(O):Ut(O)?Zt(e,h,"whitespace")(O):(a+=1,l&&(l=!1,s+=1),O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),l=!0,h):(e.enter("data"),m(O)))}function m(O){return O===null||O===124||xn(O)?(e.exit("data"),h(O)):(e.consume(O),O===92?b:m)}function b(O){return O===92||O===124?(e.consume(O),m):m(O)}function y(O){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(O):(e.enter("tableDelimiterRow"),l=!1,Ut(O)?Zt(e,k,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):k(O))}function k(O){return O===45||O===58?C(O):O===124?(l=!0,e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),S):D(O)}function S(O){return Ut(O)?Zt(e,C,"whitespace")(O):C(O)}function C(O){return O===58?(a+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),E):O===45?(a+=1,E(O)):O===null||yt(O)?_(O):D(O)}function E(O){return O===45?(e.enter("tableDelimiterFiller"),T(O)):D(O)}function T(O){return O===45?(e.consume(O),T):O===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),R):(e.exit("tableDelimiterFiller"),R(O))}function R(O){return Ut(O)?Zt(e,_,"whitespace")(O):_(O)}function _(O){return O===124?k(O):O===null||yt(O)?!l||s!==a?D(O):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(O)):D(O)}function D(O){return n(O)}function A(O){return e.enter("tableRow"),I(O)}function I(O){return O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),I):O===null||yt(O)?(e.exit("tableRow"),t(O)):Ut(O)?Zt(e,I,"whitespace")(O):(e.enter("data"),P(O))}function P(O){return O===null||O===124||xn(O)?(e.exit("data"),I(O)):(e.consume(O),O===92?$:P)}function $(O){return O===92||O===124?(e.consume(O),P):P(O)}}function fne(e,t){let n=-1,r=!0,s=0,a=[0,0,0,0],l=[0,0,0,0],c=!1,f=0,d,h,m;const b=new one;for(;++n<e.length;){const y=e[n],k=y[1];y[0]==="enter"?k.type==="tableHead"?(c=!1,f!==0&&(xR(b,t,f,d,h),h=void 0,f=0),d={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},b.add(n,0,[["enter",d,t]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(r=!0,m=void 0,a=[0,0,0,0],l=[0,n+1,0,0],c&&(c=!1,h={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},b.add(n,0,[["enter",h,t]])),s=k.type==="tableDelimiterRow"?2:h?3:1):s&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(a[1]!==0&&(l[0]=l[1],m=up(b,t,a,s,void 0,m),a=[0,0,0,0]),l[2]=n)):k.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(l[0]=l[1],m=up(b,t,a,s,void 0,m)),a=l,l=[a[1],n,0,0])):k.type==="tableHead"?(c=!0,f=n):k.type==="tableRow"||k.type==="tableDelimiterRow"?(f=n,a[1]!==0?(l[0]=l[1],m=up(b,t,a,s,n,m)):l[1]!==0&&(m=up(b,t,l,s,n,m)),s=0):s&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(l[3]=n)}for(f!==0&&xR(b,t,f,d,h),b.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=lne(t.events,n))}return e}function up(e,t,n,r,s,a){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},hl(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const f=hl(t.events,n[1]);if(a={type:l,start:Object.assign({},f),end:Object.assign({},f)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const d=hl(t.events,n[2]),h=hl(t.events,n[3]),m={type:c,start:Object.assign({},d),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const b=t.events[n[2]],y=t.events[n[3]];if(b[1].end=Object.assign({},y[1].end),b[1].type="chunkText",b[1].contentType="text",n[3]>n[2]+1){const k=n[2]+1,S=n[3]-n[2]-1;e.add(k,S,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return s!==void 0&&(a.end=Object.assign({},hl(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function xR(e,t,n,r,s){const a=[],l=hl(t.events,n);s&&(s.end=Object.assign({},l),a.push(["exit",s,t])),r.end=Object.assign({},l),a.push(["exit",r,t]),e.add(n+1,0,a)}function hl(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const dne={name:"tasklistCheck",tokenize:hne};function pne(){return{text:{91:dne}}}function hne(e,t,n){const r=this;return s;function s(f){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),a)}function a(f){return xn(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),l):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),l):n(f)}function l(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(f)}function c(f){return yt(f)?t(f):Ut(f)?e.check({tokenize:mne},t,n)(f):n(f)}}function mne(e,t,n){return Zt(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function gne(e){return PM([Fte(),Zte(),sne(e),une(),pne()])}const bne={};function yne(e){const t=this,n=e||bne,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(gne(n)),a.push(zte()),l.push(Pte(n))}function vne(e){return g.jsx("div",{className:"md-table-wrap",children:g.jsx("table",{...e})})}function YD(e){return g.jsx("span",{className:"md-cell",children:e})}function xne({children:e,...t}){return g.jsx("th",{...t,children:YD(e)})}function kne({children:e,...t}){return g.jsx("td",{...t,children:YD(e)})}function Av(e){return e==null||typeof e=="boolean"?"":typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(Av).join(""):v.isValidElement(e)?Av(e.props.children):""}function Sne({children:e,...t}){const[n,r]=v.useState(!1),s=v.useRef(void 0),a=v.useCallback(()=>{navigator.clipboard.writeText(Av(e)),r(!0),clearTimeout(s.current),s.current=setTimeout(()=>r(!1),2e3)},[e]);return g.jsxs("div",{className:"md-pre-wrap",children:[g.jsx("pre",{...t,children:e}),g.jsx("span",{className:"md-copy",children:g.jsx(br,{icon:n?"check":"copy",size:"sm",variant:"ghost","aria-label":n?"Copied":"Copy code",onClick:a})})]})}const wne={table:vne,th:xne,td:kne,pre:Sne,a:pa},zl=v.memo(function({text:t,className:n}){return g.jsx("div",{className:n?`md ${n}`:"md",children:g.jsx(gQ,{remarkPlugins:[yne],rehypePlugins:[[lee,{detect:!1}]],components:wne,children:t??""})})});function Ene(e){switch(e){case"done":return{name:"check-circle",color:"secondary"};case"error":return{name:"x-circle",color:"red"};case"awaiting":return{name:"clock",color:"yellow"};case"orphan":return{name:"slash-circle",color:"tertiary"};default:return{name:"spinner",color:"blue",modifier:"spin"}}}function hf(e){const[t,n]=v.useState(()=>Date.now()),r=e.status==="running"||e.status==="awaiting";v.useEffect(()=>{if(!r||e.endedAt!=null)return;const a=setInterval(()=>n(Date.now()),250);return()=>clearInterval(a)},[r,e.endedAt]);const s=e.endedAt??(r?t:e.startedAt??t);return e.startedAt!=null?Math.max(0,s-e.startedAt):null}function wa({status:e}){const t=Ene(e);return g.jsx(qt,{name:t.name,color:t.color,...t.modifier?{modifier:t.modifier}:{}})}function Tne({callId:e}){return g.jsxs("div",{className:"approval-bar",children:[g.jsx("span",{children:"Awaiting human approval"}),g.jsx(yn,{variant:"secondary",tone:"success",size:"sm",onClick:()=>{Qe.submitApproval(e,"approve")},children:"Approve"}),g.jsx(yn,{variant:"secondary",tone:"danger",size:"sm",onClick:()=>{Qe.submitApproval(e,"deny")},children:"Deny"})]})}function Cne({callId:e,authUrl:t,connection:n}){return g.jsxs("div",{className:"approval-bar",children:[g.jsxs("span",{children:["Connect ",n]}),g.jsx(yn,{variant:"secondary",tone:"success",size:"sm",onClick:()=>window.open(t,"_blank","noopener,noreferrer"),children:"Connect"}),g.jsx(yn,{variant:"secondary",size:"sm",onClick:()=>{Qe.submitAuth(e,"approve")},children:"Connected"}),g.jsx(yn,{variant:"secondary",tone:"danger",size:"sm",onClick:()=>{Qe.submitAuth(e,"deny")},children:"Cancel"})]})}function mf({item:e}){const t=Ue(r=>r.capabilities.approvals),n=Ue(r=>r.capabilities.auth);return e.status!=="awaiting"?null:e.gate!=="auth"?t!=="enabled"?g.jsx("div",{className:"approval-bar",children:g.jsx("span",{children:"Awaiting approval outside this playground"})}):g.jsx(Tne,{callId:e.callId}):n!=="enabled"?g.jsx("div",{className:"approval-bar",children:g.jsx("span",{children:"Awaiting connection outside this playground"})}):e.authUrl===void 0||e.connection===void 0?null:g.jsx(Cne,{callId:e.callId,authUrl:e.authUrl,connection:e.connection})}function I0(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}function El(e,...t){if(!e)return"";for(const n of t){const r=e[n];if(typeof r=="string"&&r.trim()!=="")return r}return""}const XD=new Map;for(const[e,t]of Object.entries(_W)){if(t?.default==null)continue;const n=typeof t.toolName=="string"&&t.toolName.trim()!==""?t.toolName.trim():void 0,r=e.split("/").pop()?.replace(/\.(tsx|ts)$/,""),s=n??r;s&&XD.set(s,t.default)}function Rne(e){return e&&typeof e=="object"&&!Array.isArray(e)&&typeof e.command=="string"?e.command:typeof e=="string"?e:""}function kR(e){if(e&&typeof e=="object"&&!Array.isArray(e)){const t=e;if("stdout"in t||"stderr"in t||"exitCode"in t)return t}return null}function _ne(e){const t=kR(e.outputRaw);if(t)return t;if(e.output)try{return kR(JSON.parse(e.output))}catch{}return null}function SR(e){return e.replace(/[\s\uFEFF\u00A0]+$/,"")}const Ane=v.memo(function({item:t}){const[n,r]=v.useState(!1),s=hf(t),a=Rne(t.args),l=_ne(t),c=SR(l?.stdout??""),f=SR(l?.stderr??""),d=l?.exitCode!=null&&l.exitCode!==0,h=t.status==="done"&&d?"error":t.status,m=[a?Jr(a,80):"shell"];return d&&m.push(`exit ${l?.exitCode}`),m.push(Mi(s)),g.jsxs("div",{className:`pg-tool pg-shell ${h}`,children:[g.jsxs(vi,{action:"shell",details:m.join(" · "),leadingIcon:g.jsx(wa,{status:h}),open:n,onOpenChange:b=>r(b),tabularNums:!0,children:[a?g.jsx("pre",{className:"shell-cmd",children:a}):null,c?g.jsx("pre",{className:"shell-std",children:c}):null,f?g.jsx("pre",{className:"shell-std shell-err",children:f}):null,!c&&!f?g.jsx("div",{className:"shell-empty",children:l?`Exited ${l.exitCode??0} with no output.`:t.output??"running…"}):null]}),g.jsx(mf,{item:t})]})}),Nne=v.memo(function({item:t}){const[n,r]=v.useState(!1),s=hf(t),a=El(I0(t.args),"path"),l=One(t),c=[a?KV(a,80):"read",Mi(s)];return g.jsxs("div",{className:`pg-tool pg-read ${t.status}`,children:[g.jsxs(vi,{action:"read",details:c.join(" · "),leadingIcon:g.jsx(wa,{status:t.status}),open:n,onOpenChange:f=>r(f),tabularNums:!0,children:[a?g.jsx("pre",{className:"tool-primary",children:a}):null,l!=null?l?g.jsx("pre",{className:"tool-body",children:l}):g.jsx("div",{className:"tool-empty",children:"(empty file)"}):g.jsx("div",{className:"out",children:t.output??"running…"})]}),g.jsx(mf,{item:t})]})});function One(e){const t=wR(e.outputRaw);if(t!=null)return t;if(e.output)try{return wR(JSON.parse(e.output))}catch{}return null}function wR(e){if(e&&typeof e=="object"&&!Array.isArray(e)){const t=e.content;if(typeof t=="string")return t}if(typeof e=="string")try{const t=JSON.parse(e);if(t&&typeof t=="object"&&!Array.isArray(t)){const n=t.content;if(typeof n=="string")return n}}catch{return e}return null}const Ine=v.memo(function({item:t}){const[n,r]=v.useState(!1),s=hf(t),a=I0(t.args),l=El(a,"glob_pattern","globPattern"),c=El(a,"target_directory","targetDirectory"),f=Mne(t),d=[l?Jr(l,80):"glob",Mi(s)];return g.jsxs("div",{className:`pg-tool pg-glob ${t.status}`,children:[g.jsxs(vi,{action:"glob",details:d.join(" · "),leadingIcon:g.jsx(wa,{status:t.status}),open:n,onOpenChange:h=>r(h),tabularNums:!0,children:[l?g.jsx("pre",{className:"tool-primary",children:l}):null,c?g.jsx("pre",{className:"tool-meta",children:c}):null,f!=null?f.length>0?g.jsx("pre",{className:"tool-body",children:f.join(`
61
+ `)}):g.jsx("div",{className:"tool-empty",children:"(no matches)"}):g.jsx("div",{className:"out",children:t.output??"running…"})]}),g.jsx(mf,{item:t})]})});function Mne(e){const t=ER(e.outputRaw);if(t!=null)return t;if(e.output)try{return ER(JSON.parse(e.output))}catch{}return null}function ER(e){let t=e;if(typeof t=="string")try{t=JSON.parse(t)}catch{return null}if(!t||typeof t!="object"||Array.isArray(t))return null;const n=t.files;return Array.isArray(n)?n.filter(r=>typeof r=="string"):null}const Dne=v.memo(function({item:t}){const[n,r]=v.useState(!1),s=hf(t),a=I0(t.args),l=El(a,"pattern"),c=El(a,"path"),f=El(a,"glob"),d=[l?Jr(l,80):"grep",Mi(s)],h=[c,f?`glob ${f}`:""].filter(Boolean).join(`
62
+ `);return g.jsxs("div",{className:`pg-tool pg-grep ${t.status}`,children:[g.jsxs(vi,{action:"grep",details:d.join(" · "),leadingIcon:g.jsx(wa,{status:t.status}),open:n,onOpenChange:m=>r(m),tabularNums:!0,children:[l?g.jsx("pre",{className:"tool-primary",children:l}):null,h?g.jsx("pre",{className:"tool-meta",children:h}):null,g.jsx("div",{className:"out",children:t.output??"running…"})]}),g.jsx(mf,{item:t})]})}),Lne=v.memo(function({text:t,open:n}){const[r,s]=v.useState(!1);return n?g.jsx("div",{className:"pg-subagent-reasoning",children:g.jsx(vi,{action:"Thinking",loading:!0,open:!r,onOpenChange:a=>s(!a),tone:"muted",children:g.jsx(zl,{text:t,className:"body"})})}):g.jsx("div",{className:"pg-subagent-reasoning",children:g.jsx(vi,{action:"Thought",defaultOpen:!1,tone:"muted",children:g.jsx(zl,{text:t,className:"body"})})})}),jne=v.memo(function({child:t}){if(t.kind==="assistant")return g.jsx("div",{className:`pg-subagent-msg${t.streaming?" streaming":""}`,children:g.jsx(zl,{text:t.text||"…",className:"body"})});if(t.kind==="reasoning")return g.jsx(Lne,{text:t.text,open:t.open});const n=t.args==null?"":jn(t.args,80),r=t.status==="running"?"running…":t.status==="error"?"error":t.status==="done"?"done":t.status;return g.jsxs("div",{className:`pg-subagent-tool ${t.status}`,children:[g.jsxs("div",{className:"pg-subagent-tool-head",children:[g.jsx(wa,{status:t.status}),g.jsx("span",{className:"pg-subagent-tool-name",children:t.name}),n?g.jsx("span",{className:"pg-subagent-tool-args",children:n}):null,g.jsx("span",{className:"pg-subagent-tool-status",children:r})]}),t.output?g.jsx("pre",{className:"pg-subagent-tool-out",children:t.output}):null]})});function zne(e,t){for(let n=t.length-1;n>=0;n--){const r=t[n];if(r!==void 0&&r.kind==="tool")return r.status==="running"?`Running ${r.name}`:r.status==="error"?`Failed ${r.name}`:`Ran ${r.name}`}return e.status==="running"?"Generating":e.status==="error"?"Error":"Completed"}const Pne=v.memo(function({item:t}){const n=t.children??[],r=n.length>0,[s,a]=v.useState(t.status==="running"),l=t.name.replace(/^subagent:/,"")||"subagent",c=typeof t.args=="string"?t.args:t.args==null?"":jn(t.args,100),f=t.status==="running",d=c?Jr(c,120):l;return g.jsxs("div",{className:`pg-tool pg-subagent-card ${t.status}`,children:[g.jsxs("button",{type:"button",className:"pg-subagent-head","aria-expanded":s,onClick:()=>a(h=>!h),children:[g.jsx("span",{className:"pg-subagent-status",children:g.jsx(wa,{status:t.status})}),g.jsxs("span",{className:"pg-subagent-titles",children:[g.jsx("span",{className:f?"pg-subagent-title shimmer":"pg-subagent-title",children:d}),g.jsxs("span",{className:"pg-subagent-subtitle",children:[zne(t,n)," · ",l]})]}),g.jsx("span",{className:s?"pg-subagent-chevron open":"pg-subagent-chevron",children:g.jsx(qt,{name:"chevron-right",size:10})})]}),g.jsx("div",{className:s?"pg-subagent-clip":"pg-subagent-clip collapsed","aria-hidden":!s,inert:s?void 0:!0,children:g.jsx("div",{className:"pg-subagent-body",children:r?n.map(h=>g.jsx(jne,{child:h},h.id)):g.jsx("div",{className:"pg-subagent-empty",children:t.output??"running…"})})})]})});function $ne(e){if(e==null)return"";if(typeof e=="string")return Jr(e,80);if(typeof e=="object"&&!Array.isArray(e)){const t=Object.entries(e);if(t.length===1){const n=t[0]?.[1];if(typeof n=="string"&&n!=="")return Jr(n,80)}}return jn(e,120)}const Bne=v.memo(function({item:t}){const[n,r]=v.useState(!1),s=hf(t),a=$ne(t.args),l=Mi(s);return g.jsxs("div",{className:`pg-tool ${t.status}`,children:[g.jsx(vi,{action:t.name,details:a?`${a} · ${l}`:l,leadingIcon:g.jsx(wa,{status:t.status}),open:n,onOpenChange:c=>r(c),tabularNums:!0,children:g.jsx("div",{className:"out",children:t.output??"running…"})}),g.jsx(mf,{item:t})]})}),Fne={shell:e=>g.jsx(Ane,{item:e}),read:e=>g.jsx(Nne,{item:e}),glob:e=>g.jsx(Ine,{item:e}),grep:e=>g.jsx(Dne,{item:e})};function Une(e){return e.name.startsWith("subagent:")}const qne=v.memo(function({item:t}){if(Une(t))return g.jsx(Pne,{item:t});const n=XD.get(t.name);if(n)return g.jsx(n,{item:t});const r=Fne[t.name];return r?r(t):g.jsx(Bne,{item:t})}),TR=120,Hne=v.memo(function({text:t}){const[n,r]=v.useState(!1),[s,a]=v.useState(!1),l=v.useRef(null);v.useLayoutEffect(()=>{const h=l.current;if(!h)return;const m=()=>{a(h.scrollHeight>TR)};m();const b=new ResizeObserver(m);return b.observe(h),()=>b.disconnect()},[t]);const c=s&&!n,f=()=>{s&&r(h=>!h)},d=h=>{s&&(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),f())};return g.jsx("div",{className:"msg user",children:g.jsx("div",{ref:l,className:c?"bubble furled":s?"bubble expandable":"bubble",style:c?{maxHeight:TR}:void 0,role:s?"button":void 0,tabIndex:s?0:void 0,"aria-expanded":s?n:void 0,"aria-label":s?n?"Collapse message":"Expand message":void 0,onClick:s?f:void 0,onKeyDown:s?d:void 0,children:t})})});function Vne(){return g.jsx("div",{className:"msg user",children:g.jsx("div",{className:"bubble withheld",children:"Prompt hidden"})})}const Gne=v.memo(function({text:t,streaming:n}){return g.jsx("div",{className:"msg assistant",children:g.jsx(zl,{text:t,className:n?"bubble streaming":"bubble"})})}),Wne=v.memo(function({text:t,open:n}){const[r,s]=v.useState(!1);return n?g.jsx("div",{className:"pg-reasoning",children:g.jsx(vi,{action:"Thinking",loading:!0,open:!r,onOpenChange:a=>s(!a),tone:"muted",children:g.jsx(zl,{text:t,className:"body"})})}):g.jsx("div",{className:"pg-reasoning",children:g.jsx(vi,{action:"Thought",defaultOpen:!1,tone:"muted",children:g.jsx(zl,{text:t,className:"body"})})})}),Kne=v.memo(function({text:t,fail:n,url:r}){return g.jsxs("div",{className:n?"divider fail":"divider",children:[t,r?g.jsxs(g.Fragment,{children:[" · ",g.jsx(pa,{href:r,children:r})]}):null]})});function wc(e){switch(e.kind){case"user":return e.hidden===!0?g.jsx(Vne,{},e.id):g.jsx(Hne,{text:e.text},e.id);case"assistant":return g.jsx(Gne,{text:e.text,streaming:e.streaming},e.id);case"reasoning":return g.jsx(Wne,{text:e.text,open:e.open},e.id);case"tool":return g.jsx(qne,{item:e},e.id);case"divider":return g.jsx(Kne,{text:e.text,fail:e.fail,url:e.url},e.id);case"artifact":return g.jsx(bW,{artifactKind:e.artifactKind,title:e.title,url:e.url,artifactId:e.artifactId,data:e.data},e.id);case"turn-end":return null;default:return null}}function CR(e){return e.kind==="tool"&&e.name.startsWith("subagent:")}function Yne({steps:e,cards:t,final:n,marker:r,isLatest:s}){const[a,l]=v.useState(void 0),c=a??s,f=[];(r.inTokens!==void 0||r.outTokens!==void 0)&&f.push(`${ih(r.inTokens)} in · ${ih(r.outTokens)} out tokens`),r.costUsd!==void 0&&f.push(u0(r.costUsd));const d=f.length>0?f.join(" · "):void 0;return g.jsxs(g.Fragment,{children:[e.length>0?g.jsx("div",{className:"pg-turn-group",title:d,children:g.jsx(vi,{action:"Worked",details:r.ms!==null?`for ${l0(r.ms)}`:void 0,open:c,onOpenChange:l,tabularNums:!0,tone:"tertiary",children:g.jsx("div",{className:"pg-turn-group-content",children:e.map(wc)})})}):null,t.map(wc),n?wc(n):null]})}function Xne({startMs:e}){const[t,n]=v.useState(()=>Date.now());return v.useEffect(()=>{const r=setInterval(()=>n(Date.now()),1e3);return()=>clearInterval(r)},[]),g.jsx("div",{className:"pg-turn-group",children:g.jsx(vi,{action:"Working",details:`for ${l0(Math.max(0,t-e))}`,expandable:!1,tabularNums:!0,tone:"tertiary"})})}function Zne(e,t){const n=e.findLast(l=>l.kind==="turn-end")?.id,r=[];let s=[];const a=()=>{for(const l of s)r.push(wc(l));s=[]};for(const l of e)switch(l.kind){case"user":case"divider":a(),r.push(wc(l));break;case"turn-end":{const c=s[s.length-1],f=c!==void 0&&c.kind==="assistant"&&!c.streaming?c:null,d=f===null?s:s.slice(0,-1),h=d.filter(b=>!CR(b)),m=d.filter(CR);r.push(g.jsx(Yne,{steps:h,cards:m,final:f,marker:l,isLatest:l.id===n},l.id)),s=[];break}default:s.push(l);break}return t!==null&&r.push(g.jsx(Xne,{startMs:t},"working")),a(),r}function ZD(){const e=Ue(h=>h.transcript),t=Ue(h=>h.current),n=Ue(h=>h.localTrace),r=Ue(h=>h.running),s=Ue(h=>h.turnStartedAt),a=e.length===0&&(r?s:null)===null&&(t!==null||!n),l=v.useMemo(()=>e.map(h=>{switch(h.kind){case"user":case"assistant":case"reasoning":return`${h.id}:${h.text.length}`;case"tool":return`${h.id}:${h.status}:${h.output?.length??0}`;case"divider":return`${h.id}:${h.text}`;case"artifact":case"turn-end":return h.id;default:return h}}).join("|"),[e]),c=e.findLast(h=>h.kind==="user")?.id??"",f=`${t?.sessionId??"none"}:${c}:${e.length}`,{scrollRef:d}=vM({contentKey:l,latchKey:f});return g.jsx("div",{ref:d,className:a?"pg-transcript is-empty":"pg-transcript",children:a?g.jsx(d0,{idle:"Start a session to talk to your agent. Type below or pick a session, then use the Trace tab for a timeline with tool timings.",empty:"No messages in this session yet."}):Zne(e,r?s:null)})}const RR=["accent","blue","magenta","orange","purple"];function QD(e){let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)>>>0;return RR[t%RR.length]}function _R(e,t,n){if(e.length===0)return 0;if(t<=0)return e.length;let r=1,s=0;for(const a of e){const l=s===0?a:s+n+a;l>t&&s>0?(r+=1,s=a):s=l}return r}function Qne(e){const{availableWidth:t,itemWidths:n,gap:r,triggerWidth:s,maxLines:a=2}=e,l=n.length;if(l===0)return 0;if(_R(n,t,r)<=a)return l;for(let c=l-1;c>=0;c-=1){const f=[...n.slice(0,c),s];if(_R(f,t,r)<=a)return c}return 0}const Jne="Send a message below to start a new HTTP session. Use the Trace tab for a timeline with tool timings.",ere="This agent is stopped. Pick a session from the Runs tab to inspect its chat and trace.",AR="... More";function tre({cases:e,disabled:t}){const n=v.useRef(null),r=v.useRef(null),s=v.useRef(null),a=e.map(m=>m.id).join("|"),[l,c]=v.useState({key:a,visibleCount:Number.POSITIVE_INFINITY});l.key!==a&&c({key:a,visibleCount:Number.POSITIVE_INFINITY}),v.useLayoutEffect(()=>{const m=n.current;if(!m||e.length===0)return;if(s.current?.key!==a){const S=Array.from(m.querySelectorAll(":scope > [data-measure]"));if(S.length!==e.length)return;const C=getComputedStyle(m);s.current={key:a,widths:S.map(E=>E.offsetWidth),gap:parseFloat(C.gap)||0,triggerWidth:r.current?.offsetWidth??0}}const b=()=>{const S=s.current;if(!S)return;const C=Qne({availableWidth:m.clientWidth,itemWidths:S.widths,gap:S.gap,triggerWidth:S.triggerWidth});c(E=>E.visibleCount===C?E:{...E,visibleCount:C})};b();let y;const k=new ResizeObserver(()=>{y!==void 0&&cancelAnimationFrame(y),y=requestAnimationFrame(()=>{y=void 0,b()})});return k.observe(m),()=>{k.disconnect(),y!==void 0&&cancelAnimationFrame(y)}},[e.length,a]);const f=Math.min(l.visibleCount,e.length),d=e.slice(0,f),h=e.slice(f);return g.jsxs("div",{ref:n,className:"pg-panel-empty__evals",children:[d.map(m=>g.jsx("button",{type:"button",className:"pg-panel-empty__eval","data-measure":"",title:m.description||`Run ${m.id}`,disabled:t,onClick:()=>{Qe.startEvalRun([m.id])},children:m.id},m.id)),g.jsx("button",{ref:r,type:"button",className:"pg-panel-empty__eval pg-panel-empty__eval-more-measure",tabIndex:-1,"aria-hidden":"true",children:AR}),h.length>0?g.jsxs(ei,{placement:"bottom",children:[g.jsx(ei.Trigger,{disabled:t,children:g.jsx("button",{type:"button",className:"pg-panel-empty__eval",disabled:t,"aria-label":`Show ${h.length} more evaluations`,children:AR})}),g.jsx(ei.Content,{"aria-label":"More evaluations",size:"sm",children:h.map(m=>g.jsx(ei.Item,{disabled:t,onSelect:()=>{Qe.startEvalRun([m.id])},children:m.id},m.id))})]}):null]})}function nre(){const e=Ue(f=>f.meta),t=Ue(f=>f.info),n=Ue(f=>f.evalCases),r=Ue(f=>f.evalRun?.status==="running"),s=e.name||t?.name||"Agent",a=e.readonly===!0,l=QD(s),c=a?ere:t?.description||Jne;return g.jsxs("div",{className:"pg-panel-empty",children:[g.jsx("div",{className:"pg-panel-empty__avatar","data-color":l,"aria-hidden":"true",children:g.jsx(qt,{name:"robot",variant:"filled",size:24,color:l})}),g.jsx("div",{className:"pg-panel-empty__name",children:s}),g.jsx("p",{className:"pg-panel-empty__description",children:c}),n.length>0&&!a?g.jsx(tre,{cases:n,disabled:r}):null]})}const wy={base:{k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kB7OPa:"ui-9f619",k7Eaqz:"ui-euugli",ks0D6T:"ui-193iq5w",$$css:!0},wrap:{kwnvtZ:"ui-1a02dak",$$css:!0},underline:{k1xSpc:"ui-78zum5",kVAEAm:"ui-1n2onr6",kGNEyG:"ui-1qjc9v5",kzqmXN:"ui-h8yej3",kt9PQ7:"ui-so031l",kfdmCh:"ui-1q0q8m5",kL6WhQ:"ui-17fyfba",$$css:!0}},rre={sm:{kOIVth:"ui-137clkk",$$css:!0},md:{kOIVth:"ui-pkkfsy",$$css:!0}},ire={sm:{kOIVth:"ui-1oot3zn",$$css:!0},md:{kOIVth:"ui-1jlwbde",$$css:!0}};function sre(e,t){return e==="filter"||e==="underline"&&t==="lg"?"md":"sm"}const NR={base:{kysU6D:"ui-jyslct",k1xSpc:"ui-3nfvp2",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kB7OPa:"ui-9f619",kVAEAm:"ui-1n2onr6",kmuXW:"ui-2lah0s",khDVqt:"ui-uxw1ft",kMv6JI:"ui-jb2p0i",k63SB2:"ui-1pd3egz",kMwMTN:"ui-19aaqeu ui-1qp4pc4 ui-1gfq6vl",kWkggS:"ui-jbqb8w",ksu8eU:"ui-ng3xce",kaIpWk:"ui-1i4c3av",kkrTdU:"ui-1ypdohk ui-mh7c9n",kSiTet:"ui-1hc1fzr ui-1szrgyu",kFalU9:"ui-ggy1nq",kOIVth:"ui-11twubx",kMnn75:"ui-krqix3",kMeerF:"ui-1k57tk5 ui-784prv",k3XXqK:"ui-1t137rt ui-9v5kkp",kInvED:"ui-1wfwxd8 ui-7s97pk",kjBf7l:"ui-1uczgqu ui-1725o6r",k1ekBW:"ui-1gbuem2",kIyJzY:"ui-g3p6pi ui-sagj69",kAMwcw:"ui-6ekqhr",$$css:!0},default:{kWkggS:"ui-jbqb8w ui-q24i1q ui-x05fgs",$$css:!0},filter:{kaIpWk:"ui-1e1y6u3",kAzted:"ui-4jlmx6",kMwMTN:"ui-19aaqeu ui-1t93vz6 ui-t6ogrd",kWkggS:"ui-jbqb8w ui-1834tr1 ui-d9g367",k63SB2:"ui-1yl5bsf",$$css:!0},underline:{kaIpWk:"ui-2u8bby",kWkggS:"ui-jbqb8w",kMwMTN:"ui-19aaqeu ui-1qp4pc4 ui-1gfq6vl",$$css:!0}},ore={sm:{kLKAdn:"ui-493x5y",kpe85a:"ui-17v7654",kGO01o:"ui-b6dno7",kE3dHu:"ui-1lfpczk",$$css:!0},md:{kLKAdn:"ui-1gv78wz",kpe85a:"ui-1yxiud8",kGO01o:"ui-1cea8gx",kE3dHu:"ui-yab65l",$$css:!0},lg:{kLKAdn:"ui-1to6kjf",kpe85a:"ui-16b7oty",kGO01o:"ui-5wifs",kE3dHu:"ui-o7x2bt",$$css:!0}},are={sm:{kLKAdn:"ui-13ly8rp",kpe85a:"ui-14ndyrl",kGO01o:"ui-1xlntvz",kE3dHu:"ui-1e7ydrk",$$css:!0},md:{kLKAdn:"ui-13ly8rp",kpe85a:"ui-14ndyrl",kGO01o:"ui-1xlntvz",kE3dHu:"ui-1e7ydrk",$$css:!0},lg:{kLKAdn:"ui-oyc9vk",kpe85a:"ui-14ndyrl",kGO01o:"ui-2lprc",kE3dHu:"ui-1e7ydrk",$$css:!0}},JD=v.createContext(null);function e2(e){const t=v.use(JD);if(t===null)throw new Error(`${e} must be used within Tabs.Root`);return t}function lre({value:e,defaultValue:t,onValueChange:n,size:r="md",variant:s="default",children:a,...l}){const c=v.useMemo(()=>({size:r,variant:s}),[r,s]);return g.jsx(JD.Provider,{value:c,children:g.jsx(oI,{...l,value:e,defaultValue:t,onValueChange:n,"data-component":"tabs-root","data-size":r,"data-variant":s,className:"ui-jp7ctv",children:a})})}function ure({activateOnFocus:e,spacing:t,wrap:n=!1,children:r,...s}){const a=e2("Tabs.List"),l=t??sre(a.variant,a.size),c=n&&a.variant!=="underline";return g.jsxs(dI,{...s,activateOnFocus:e,"data-component":"tabs-list","data-variant":a.variant,"data-wrap":c?"true":void 0,...zt(wy.base,a.variant==="underline"&&wy.underline,a.variant==="underline"?ire[l]:rre[l],c&&wy.wrap),children:[r,a.variant==="underline"?g.jsx(fI,{"data-component":"tabs-underline-indicator",className:"ui-10l6tqk ui-1vjfegm ui-47corl ui-9f619 ui-vbikie ui-offw1 ui-jm9jq1 ui-qmqy1e ui-mak4db ui-1ym43eq ui-1bqoo3p ui-sagj69 ui-1tkypeg"}):null]})}function cre({value:e,secondaryLabel:t,href:n,children:r,...s}){const a=e2("Tabs.Item");return g.jsxs(uI,{...s,value:e,render:n===void 0?void 0:l=>g.jsx("a",{...l,href:n}),nativeButton:n===void 0,"data-component":"tabs-item","data-size":a.size,"data-variant":a.variant,...zt(NR.base,a.size==="sm"?Ds.root:_s.root,a.variant==="underline"?are[a.size]:ore[a.size],NR[a.variant],a.variant==="filter"&&NA.root),children:[r,t!=null?g.jsx("span",{className:"ui-2lah0s ui-4b2ntj",children:t}):null]})}const Ey={Root:lre,List:ure,Item:cre};function fre(e,t){return t===null?!0:e!=="artifacts"||t.artifacts!==void 0}function t2(e,t,n){return e.filter(r=>r.value===n||fre(r.value,t))}const dre=[{value:"chat",label:"Chat"},{value:"trace",label:"Trace"},{value:"raw",label:"Raw"},{value:"evals",label:"Evals"},{value:"artifacts",label:"Artifacts"}];function M0(e){return e==="overview"?"chat":e}function pre({size:e="lg"}){const t=Ue(f=>f.view),n=Ue(f=>f.evalNavReturn),r=Ue(f=>f.info),s=Ue(f=>f.capabilities),a=dre.filter(f=>(f.value!=="evals"||s.evals!=="disabled")&&(f.value!=="artifacts"||s.artifacts!=="disabled")),l=n||t==="evals"?a:a.filter(f=>f.value!=="evals"),c=t2(l,r,t);return g.jsx(Ey.Root,{value:M0(t),onValueChange:f=>Qe.setView(f),size:e,children:g.jsx(Ey.List,{"aria-label":"Visualization mode",wrap:!0,children:c.map(f=>g.jsx(Ey.Item,{value:f.value,children:f.label},f.value))})})}function n2(){const e=Ue(s=>s.view),t=Ue(s=>s.current),n=Ue(s=>s.transcript.length===0),r=t===null&&n;return g.jsxs(g.Fragment,{children:[M0(e)==="chat"?g.jsxs(g.Fragment,{children:[r?g.jsx(nre,{}):g.jsx(ZD,{}),g.jsx(pM,{})]}):null,e==="trace"?g.jsx(wM,{}):null,e==="raw"?g.jsx(xM,{}):null,e==="evals"?g.jsx(bM,{}):null,e==="artifacts"?g.jsx(dM,{}):null]})}function hre({className:e,labeled:t=!1}){const n=Ue(r=>r.authToken);return g.jsxs("div",{className:e,children:[t?g.jsx("label",{className:"pg-auth-token-label",htmlFor:"pg-auth-token",children:"Bearer token"}):null,g.jsx(rf,{id:t?"pg-auth-token":void 0,type:"password",size:"md","aria-label":"Bearer token",placeholder:t?"Optional":"Bearer token (optional)",value:n,onChange:r=>Qe.setAuthToken(r.target.value),title:"Sent as Authorization: Bearer ... on API calls"})]})}function mre(){return Ue(t=>t.aliasHosted)?null:g.jsxs(ei,{placement:"bottom-end",children:[g.jsx(ei.Trigger,{children:g.jsx(br,{icon:"dots-3-horizontal",size:"lg","aria-label":"More actions"})}),g.jsx(ei.Content,{"aria-label":"More actions",className:"pg-detail-more",size:"sm",width:240,footer:g.jsx(hre,{className:"pg-detail-more__token",labeled:!0}),children:null})]})}function r2({variant:e}){const t=Ue(l=>l.barTitle),n=Ue(l=>l.barId),r=Ue(l=>l.current),s=e==="panel",a=n||t;return g.jsxs("div",{className:s?"pg-detail__head pg-detail__head--panel":"pg-detail__head",children:[g.jsxs("div",{className:"pg-detail__head-start",children:[s?null:g.jsx(br,{icon:"arrow-left",size:"lg","aria-label":"Back to overview",onClick:()=>Qe.backToOverview()}),r!==null||n?g.jsx("div",{className:"pg-detail__session",title:a,children:g.jsx("span",{className:"pg-detail__session-id",children:a})}):null]}),g.jsx(pre,{}),g.jsxs("div",{className:"pg-detail__head-end",children:[g.jsx(mre,{}),s?g.jsx(br,{icon:"x",size:"lg","aria-label":"Close chat panel",onClick:()=>Qe.setChatPanelOpen(!1)}):null]})]})}function gre(){return g.jsxs("div",{className:"pg-detail",children:[g.jsx(r2,{variant:"page"}),g.jsx("div",{className:"pg-transcript-wrap",children:g.jsx(n2,{})})]})}const bre="agent-serve.playground.try.";function i2(e,t){return`${bre}${e}:${t}`}function OR(e,t){try{const n=localStorage.getItem(i2(e,t));if(n===null)return null;const r=JSON.parse(n);if(typeof r!="object"||r===null||Array.isArray(r))return null;const s=r,a={};return typeof s.body=="string"&&(a.body=s.body),typeof s.query=="string"&&(a.query=s.query),a}catch{return null}}function yre(e,t,n){try{localStorage.setItem(i2(e,t),JSON.stringify(n))}catch{}}function IR(e){if(e===void 0)return"{}";const t=e.properties;if(e.type!=="object"||t===void 0)return"{}";const n={};for(const[r,s]of Object.entries(t)){const a=s.type;a==="string"?n[r]="":a==="number"||a==="integer"?n[r]=0:a==="boolean"?n[r]=!1:a==="array"?n[r]=[]:a==="object"?n[r]={}:n[r]=null}return JSON.stringify(n,null,2)}function MR({label:e,schema:t}){if(t===void 0)return g.jsxs("div",{className:"pg-try-schema-missing",children:["No ",e," schema on this route — body is free-form JSON."]});const n=t.properties,r=new Set(Array.isArray(t.required)?t.required.filter(s=>typeof s=="string"):[]);return n===void 0||Object.keys(n).length===0?g.jsxs("details",{className:"pg-try-schema",children:[g.jsxs("summary",{children:[e," schema"]}),g.jsx("pre",{children:JSON.stringify(t,null,2)})]}):g.jsxs("details",{className:"pg-try-schema",open:!0,children:[g.jsxs("summary",{children:[e," schema"]}),g.jsx("ul",{children:Object.entries(n).map(([s,a])=>{const l=typeof a.type=="string"?a.type:"any",c=typeof a.description=="string"?a.description:null;return g.jsxs("li",{children:[g.jsx("code",{children:s}),r.has(s)?g.jsx("span",{className:"req",children:" required"}):g.jsx("span",{className:"opt",children:" optional"}),g.jsxs("span",{className:"type",children:[" · ",l]}),c?g.jsx("div",{className:"desc",children:c}):null]},s)})})]})}function s2(e,t){const n=e.trim();if(n==="")return{ok:!0,value:{}};try{const r=JSON.parse(n);return typeof r!="object"||r===null||Array.isArray(r)?{ok:!1,error:`${t} must be a JSON object`}:{ok:!0,value:r}}catch(r){return{ok:!1,error:`${t}: ${r instanceof Error?r.message:String(r)}`}}}function cp(e){return`'${e.replace(/'/g,"'\\''")}'`}function vre(e){const t=["curl","-sS","-X",e.method],n=e.token.trim();if(n!==""&&t.push("-H",cp(`Authorization: Bearer ${n}`)),e.hasBody){t.push("-H",cp("Content-Type: application/json"));const r=e.bodyText.trim()===""?"{}":e.bodyText.trim();t.push("--data-binary",cp(r))}return t.push(cp(e.absoluteUrl)),t.join(" ")}function xre(e,t,n){let r=Qe.api.url(e);if(n){const s=s2(t,"Query");if(!s.ok)return s;const a=new URLSearchParams;for(const[c,f]of Object.entries(s.value)){if(f==null)continue;const d=typeof f=="string"?f:String(f);d!==""&&a.set(c,d)}const l=a.toString();l!==""&&(r=`${r}?${l}`)}try{return{ok:!0,url:new URL(r,window.location.origin).toString()}}catch(s){return{ok:!1,error:`URL: ${s instanceof Error?s.message:String(s)}`}}}function o2({channelId:e,route:t,onClose:n}){const r=t.method.toUpperCase(),s=r!=="GET"&&r!=="HEAD",a=t.querySchema!==void 0||r==="GET"||r==="HEAD",l=Ue(I=>I.authToken),[c,f]=v.useState(()=>{const I=OR(r,t.url);return I?.query!==void 0&&I.query.trim()!==""?I.query:IR(t.querySchema)}),[d,h]=v.useState(()=>{const I=OR(r,t.url);return I?.body!==void 0&&I.body.trim()!==""?I.body:IR(t.bodySchema)}),[m,b]=v.useState(!1),[y,k]=v.useState(!1),[S,C]=v.useState(null),[E,T]=v.useState(null);v.useEffect(()=>{const I=P=>{P.key==="Escape"&&n()};return window.addEventListener("keydown",I),()=>window.removeEventListener("keydown",I)},[n]);const R=I=>{const P={};s&&(P.body=I.body??d),a&&(P.query=I.query??c),yre(r,t.url,P)},_=()=>{R({body:d,query:c}),n()},D=async()=>{if(C(null),k(!1),s&&d.trim()!=="")try{JSON.parse(d)}catch($){C(`Body: ${$ instanceof Error?$.message:String($)}`);return}const I=xre(t.url,c,a);if(!I.ok){C(I.error);return}const P=vre({method:r,absoluteUrl:I.url,token:l,hasBody:s,bodyText:d});try{await navigator.clipboard.writeText(P),k(!0),Qe.toast("Copied curl to clipboard"),window.setTimeout(()=>k(!1),1500)}catch($){C(`Copy failed: ${$ instanceof Error?$.message:String($)}`)}},A=async()=>{C(null),T(null);let I;if(a){const $=s2(c,"Query");if(!$.ok){C($.error);return}I={};for(const[O,Y]of Object.entries($.value))Y!=null&&(I[O]=typeof Y=="string"?Y:String(Y))}let P;if(s){const $=d.trim();if($==="")P={};else try{P=JSON.parse($)}catch(O){C(`Body: ${O instanceof Error?O.message:String(O)}`);return}}R({body:d,query:c}),b(!0);try{const $=await Qe.api.channelRequest(r,t.url,{body:s?P:void 0,query:I});if($.ok&&$.body&&await Qe.openSessionFromChannelResponse(e,$.body)){n();return}T({status:$.status,body:$.body})}catch($){C($ instanceof Error?$.message:String($))}finally{b(!1)}};return g.jsx("div",{className:"pg-try-backdrop",role:"presentation",onClick:_,children:g.jsxs("div",{className:"pg-try-modal",role:"dialog","aria-modal":"true","aria-label":`Try ${r} ${t.url}`,onClick:I=>I.stopPropagation(),children:[g.jsxs("div",{className:"pg-try-head",children:[g.jsxs("div",{children:[g.jsxs("div",{className:"pg-try-title",children:[g.jsx("span",{className:"pg-try-method",children:r})," ",g.jsx("code",{children:t.url})]}),g.jsxs("div",{className:"pg-try-sub",children:["channel ",g.jsx("code",{children:e}),t.description?` · ${t.description}`:null]})]}),g.jsx("button",{type:"button",className:"link-btn",onClick:_,children:"Close"})]}),g.jsxs("div",{className:"pg-try-body",children:[a?g.jsxs(g.Fragment,{children:[g.jsx(MR,{label:"Query",schema:t.querySchema}),g.jsxs("label",{className:"pg-try-field",children:[g.jsx("span",{children:"Query (JSON object → search params)"}),g.jsx("textarea",{value:c,onChange:I=>f(I.target.value),spellCheck:!1,rows:6})]})]}):null,s?g.jsxs(g.Fragment,{children:[g.jsx(MR,{label:"Body",schema:t.bodySchema}),g.jsxs("label",{className:"pg-try-field",children:[g.jsx("span",{children:"Body (JSON)"}),g.jsx("textarea",{value:d,onChange:I=>h(I.target.value),spellCheck:!1,rows:10})]})]}):null,S?g.jsx("div",{className:"pg-try-error",children:S}):null,E?g.jsxs("div",{className:"pg-try-result",children:[g.jsxs("div",{className:"pg-try-status",children:["Status ",g.jsx("code",{children:E.status})]}),g.jsx("pre",{children:JSON.stringify(E.body,null,2)})]}):null]}),g.jsxs("div",{className:"pg-try-foot",children:[g.jsx(yn,{variant:"secondary",size:"sm",onClick:()=>{D()},children:y?"Copied":"Copy curl"}),g.jsx("div",{className:"pg-try-foot-spacer"}),g.jsx(yn,{variant:"secondary",size:"sm",onClick:_,children:"Cancel"}),g.jsx(yn,{variant:"primary",size:"sm",disabled:m,onClick:()=>{A()},children:m?"Sending…":"Send"})]})]})})}const a2="agent-serve.playground.drawerWidth",Ty=340,Nv=280,Ov=720;function Ep(e){return Math.min(Ov,Math.max(Nv,e))}function kre(){try{const e=localStorage.getItem(a2);if(e===null)return Ty;const t=Number.parseInt(e,10);return Number.isFinite(t)?Ep(t):Ty}catch{return Ty}}function cl({title:e,children:t}){return g.jsxs(g.Fragment,{children:[g.jsx("h4",{children:e}),t]})}function nc({name:e,detail:t}){return g.jsxs("div",{className:"item",children:[g.jsx("div",{className:"n",children:e}),t?g.jsx("div",{className:"d",children:t}):null]})}function Sre(){const e=Ue(T=>T.drawerOpen),t=Ue(T=>T.info),[n,r]=v.useState(null),[s,a]=v.useState(kre),[l,c]=v.useState(!1),f=v.useRef(s);f.current=s,v.useEffect(()=>{try{localStorage.setItem(a2,String(s))}catch{}},[s]);const d=v.useCallback(T=>{T.preventDefault();const R=T.currentTarget,_=T.clientX,D=f.current;R.setPointerCapture(T.pointerId),c(!0),document.body.classList.add("pg-resizing-drawer");const A=P=>{a(Ep(D+(P.clientX-_)))},I=P=>{R.releasePointerCapture(P.pointerId),R.removeEventListener("pointermove",A),R.removeEventListener("pointerup",I),R.removeEventListener("pointercancel",I),c(!1),document.body.classList.remove("pg-resizing-drawer")};R.addEventListener("pointermove",A),R.addEventListener("pointerup",I),R.addEventListener("pointercancel",I)},[]),h=t?.tools??[],m=t?.skills??[],b=t?.subagents??[],y=t?.connections??[],k=t?.channels??[],S=t?.hooks??[],C=v.useMemo(()=>{const T=new Map;for(const R of Jh(k))T.set(`${R.method}:${R.url}`,R.name);return T},[k]),E=t!==null&&h.length===0&&m.length===0&&b.length===0&&y.length===0&&k.length===0&&S.length===0;return g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:e?l?"pg-drawer open resizing":"pg-drawer open":"pg-drawer",style:{width:s},children:[g.jsx("div",{className:l?"pg-drawer-resizer dragging":"pg-drawer-resizer",role:"separator","aria-orientation":"vertical","aria-label":"Resize agent surface","aria-valuenow":s,"aria-valuemin":Nv,"aria-valuemax":Ov,tabIndex:0,onPointerDown:d,onKeyDown:T=>{T.key==="ArrowLeft"?(T.preventDefault(),a(R=>Ep(R-16))):T.key==="ArrowRight"?(T.preventDefault(),a(R=>Ep(R+16))):T.key==="Home"?(T.preventDefault(),a(Nv)):T.key==="End"&&(T.preventDefault(),a(Ov))}}),g.jsxs("div",{className:"head",children:[g.jsx("span",{children:"Agent surface"}),g.jsx("button",{type:"button",className:"link-btn",onClick:()=>Qe.setDrawerOpen(!1),children:"Close"})]}),g.jsxs("div",{className:"body",children:[t===null?g.jsx("div",{className:"drawer-empty",children:"Loading…"}):null,E?g.jsx("div",{className:"drawer-empty",children:"No surface to show for this agent."}):null,h.length?g.jsx(cl,{title:"Tools",children:h.map(T=>g.jsx(nc,{name:T.name,detail:T.description},T.name))}):null,m.length?g.jsx(cl,{title:"Skills",children:m.map(T=>g.jsx(nc,{name:T.name,detail:T.description},T.name))}):null,b.length?g.jsx(cl,{title:"Subagents",children:b.map(T=>g.jsx(nc,{name:T.name,detail:T.description},T.name))}):null,y.length?g.jsx(cl,{title:"MCP Connections",children:y.map(T=>g.jsx(nc,{name:T.name,detail:T.transport},T.name))}):null,k.length?g.jsx(cl,{title:"Channels",children:k.map(T=>g.jsxs("div",{className:"item",children:[g.jsx("div",{className:"n",children:T.id}),(T.routes??[]).length===0?g.jsx("div",{className:"d",children:"(events only)"}):g.jsx("div",{className:"channel-routes",children:(T.routes??[]).map(R=>{const _=T.id!=="http",D=`${R.method} ${R.url}`,A=C.get(`${R.method.toUpperCase()}:${R.url}`);return _?g.jsxs("div",{className:"channel-route",children:[g.jsx("code",{children:D}),A?g.jsx("code",{className:"channel-slash",title:"Composer slash command",children:A}):null,g.jsx("button",{type:"button",className:"link-btn",onClick:()=>r({channelId:T.id,route:R}),children:"Try"})]},D):g.jsx("div",{className:"channel-route",children:g.jsx("code",{children:D})},D)})})]},T.id))}):null,S.length?g.jsx(cl,{title:"Hooks",children:S.map(T=>g.jsx(nc,{name:T},T))}):null]})]}),n?g.jsx(o2,{channelId:n.channelId,route:n.route,onClose:()=>r(null)}):null]})}const wre=/^turn_(\d+)$/;function Ere(e){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n?.type!=="turn.started")continue;const r=Number(wre.exec(n.turnId??"")?.[1]);if(Number.isSafeInteger(r))return r}}function Tre(e,t,n){return t===null||n===void 0?e:e.map(r=>r.sessionId===t&&n>(r.turnCount??0)?{...r,turnCount:n}:r)}const DR="Logs are not available in this playground.";function Cre(){const e=Ue(h=>h.meta.readonly===!0),t=Ue(h=>h.capabilities.logs!=="disabled"),[n,r]=v.useState([]),[s,a]=v.useState(null),l=v.useRef(-1),c=v.useRef(null),f=n.length,d=nN({count:f,getScrollElement:()=>c.current,estimateSize:()=>18,overscan:24});return v.useEffect(()=>{if(!t)return;let h=!1;const m=async()=>{const y=await Qe.api.logs(l.current);if(h)return;if(!y.ok||y.body===null){a(y.status===501?DR:`logs failed (${y.status})`);return}a(null);const k=y.body.entries??[];k.length>0&&(l.current=y.body.nextAfter,r(S=>{const C=S.concat(k);return C.length>2e3?C.slice(C.length-2e3):C}))};if(m(),e)return()=>{h=!0};const b=window.setInterval(()=>{m()},1e3);return()=>{h=!0,window.clearInterval(b)}},[t,e]),v.useEffect(()=>{f>0&&d.scrollToIndex(f-1,{align:"end"})},[f,d]),t?s!==null&&f===0?g.jsx("div",{className:"pg-raw",children:g.jsx(Ri,{body:s})}):f===0?g.jsx("div",{className:"pg-raw",children:g.jsx(Ri,{body:e?"No stored logs for this stopped agent.":"Waiting for agent logs… webhook captures and session activity appear here."})}):g.jsxs("div",{className:"pg-raw",children:[g.jsx("div",{className:"head",children:"Agent logs"}),g.jsx("div",{className:"raw-lines",ref:c,children:g.jsx("div",{style:{height:d.getTotalSize(),position:"relative",width:"100%"},children:d.getVirtualItems().map(h=>{const m=n[h.index];if(m===void 0)return null;const b=m.at.slice(11,19);return g.jsxs("div",{"data-index":h.index,ref:d.measureElement,style:{position:"absolute",top:0,left:0,width:"100%",transform:`translateY(${h.start}px)`},children:[g.jsxs("span",{className:"elog-time",children:[b," "]}),g.jsx("span",{children:m.line})]},h.key)})})})]}):g.jsx("div",{className:"pg-raw",children:g.jsx(Ri,{body:DR})})}const D0={root:{k1xSpc:"ui-78zum5",kzqmXN:"ui-h8yej3",kGNEyG:"ui-6s0dn4",kjj79g:"ui-1qughib",kOIVth:"ui-ehausa",kMwMTN:"ui-4b2ntj",kGuDYH:"ui-1wm8ruf",kLWn49:"ui-spwq11",kcqcaj:"ui-ss6m8b",$$css:!0},controls:{k1xSpc:"ui-78zum5",kGNEyG:"ui-6s0dn4",kOIVth:"ui-ehausa",$$css:!0},status:{kMwMTN:"ui-4b2ntj",kcqcaj:"ui-ss6m8b",$$css:!0}};function Rre(){return D0.root}function _re(){return D0.controls}function Are(){return D0.status}function Nre({currentPage:e,totalPages:t,totalItems:n,pageSize:r,onPageChange:s,isLoading:a=!1,leading:l,rootStyle:c,className:f}){const d=Math.min(Math.max(1,e),t),h=n===0?0:Math.min(n,(d-1)*r+1),m=Math.min(n,d*r),b=C=>{C<1||C>t||C===d||a||s(C)},y=Yt({rootClass:"ui-pagination-footer",stylexStyles:[Rre(),c],className:["pagination-footer",f].filter(Boolean).join(" ")}),k=Yt({rootClass:"ui-pagination-footer__controls",stylexStyles:_re(),className:"pagination-footer__controls"}),S=Yt({rootClass:"ui-pagination-footer__status",stylexStyles:Are(),className:"pagination-footer__status"});return g.jsxs("div",{className:y.className,style:y.style,children:[g.jsxs("div",{className:"pagination-footer__summary",children:[l,g.jsxs("span",{className:S.className,style:S.style,children:[h.toLocaleString(),"–",m.toLocaleString()," of ",n.toLocaleString()]})]}),g.jsxs("div",{className:k.className,style:k.style,children:[g.jsx(br,{"aria-label":"Previous page",disabled:d<=1||a,icon:"chevron-left",onClick:()=>b(d-1),size:"sm",variant:"ghost"}),g.jsxs("span",{className:S.className,style:S.style,children:[d.toLocaleString()," / ",t.toLocaleString()]}),g.jsx(br,{"aria-label":"Next page",disabled:d>=t||a,icon:"chevron-right",onClick:()=>b(d+1),size:"sm",variant:"ghost"})]})]})}const Ore={base:{k1xSpc:"ui-78zum5",kzqmXN:"ui-h8yej3",kXwgrk:"ui-dt5ytf",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kLKAdn:"ui-f6zju3",kpe85a:"ui-17v7654",kGO01o:"ui-1rgtt3y",kE3dHu:"ui-1lfpczk",kEafiO:"ui-178xt8z",kPef9Z:"ui-13fuv20",kLZC3w:"ui-1w002xl",kWqL5O:"ui-s1s249",kSWEuD:"ui-32b0ac",k26BEO:"ui-1ppb01f",kt9PQ7:"ui-so031l",kfdmCh:"ui-1q0q8m5",kL6WhQ:"ui-1g95lbd",kZ1KPB:"ui-e0pwq",k4WBpm:"ui-19ypqd9",kaZRDh:"ui-fektcw",kaIpWk:"ui-1m7fhj7",kWkggS:"ui-f1vpex",$$css:!0}},l2={base:{k1xSpc:"ui-78zum5",k7Eaqz:"ui-euugli",kGNEyG:"ui-6s0dn4",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kLKAdn:"ui-1t8xvyj",kpe85a:"ui-14ndyrl",kGO01o:"ui-usxwy5",kE3dHu:"ui-1e7ydrk",kMwMTN:"ui-19aaqeu",kg5iWk:"ui-lyipyv",k8aIck:"ui-jlip5",kqG3fB:"ui-kyw5k8",kmkexE:"ui-po99wt",$$css:!0}},Ire={base:{kjj79g:"ui-13a6bvl",k9WMMc:"ui-1hr2gdg",$$css:!0}},Mre={base:{kMwMTN:"ui-1wd3ewq",$$css:!0}},Dre={base:{k1xSpc:"ui-78zum5",k7Eaqz:"ui-euugli",kGNEyG:"ui-6s0dn4",kXHlph:"ui-6ikm8r",kORKVm:"ui-10wlt62",kLKAdn:"ui-1t8xvyj",kpe85a:"ui-14ndyrl",kGO01o:"ui-usxwy5",kE3dHu:"ui-1e7ydrk",kMwMTN:"ui-19aaqeu",kGuDYH:"ui-fifm61",k63SB2:"ui-20ajya",kLWn49:"ui-1d3mw78",k9WMMc:"ui-dpxx8g",kg5iWk:"ui-lyipyv",k8aIck:"ui-jlip5",kqG3fB:"ui-kyw5k8",$$css:!0}},Lre={base:{kjj79g:"ui-13a6bvl",k9WMMc:"ui-1hr2gdg",$$css:!0}},jre={base:{k1xSpc:"ui-78zum5",kXwgrk:"ui-1q0g3np",kGNEyG:"ui-1qjc9v5",kOIVth:"ui-1oot3zn",kLKAdn:"ui-exx8yu",kpe85a:"ui-1yxiud8",kGO01o:"ui-18d9i69",kE3dHu:"ui-yab65l",$$css:!0}},zre={base:{kVAEAm:"ui-1n2onr6",k1xSpc:"ui-78zum5",kXwgrk:"ui-1q0g3np",kGNEyG:"ui-1qjc9v5",kOIVth:"ui-1oot3zn",kLKAdn:"ui-exx8yu",kpe85a:"ui-1yxiud8",kGO01o:"ui-18d9i69",kE3dHu:"ui-yab65l",k4Z53h:"ui-gfevyv",kGzVvX:"ui-qjnua1",kSWMeD:"ui-h5l0ry",kNVotH:"ui-1487vgl",k2syFR:"ui-o4r6jd",kyZIQH:"ui-fp6kh7",$$css:!0}},Pre={base:{kkrTdU:"ui-1ypdohk",$$css:!0}},$re={base:{kVAEAm:"ui-10l6tqk",k87sOh:"ui-13vifvy",kCIrl2:"ui-1qo02jc",kbCHJM:"ui-134kyd4",kZKoxP:"ui-jyxbwm",kWkggS:"ui-iw1gut",kfzvcC:"ui-47corl",k1xSpc:"ui-1vga6i0",$$css:!0}},LR={base:{k1xSpc:"ui-78zum5",kXwgrk:"ui-dt5ytf",kGuDYH:"ui-4z9k3i",kLWn49:"ui-1fc57z9",$$css:!0}},Bre={base:{kjj79g:"ui-l56j7k",k9WMMc:"ui-2b8uid",$$css:!0}},Fre={base:{kMwMTN:"ui-1e4uaio",$$css:!0}},Ure={base:{kMwMTN:"ui-19aaqeu",$$css:!0}},qre={base:{kMwMTN:"ui-4b2ntj",$$css:!0}},Hre={base:{k1xSpc:"ui-78zum5",kAzted:"ui-i3av73",kXwgrk:"ui-dt5ytf",kGNEyG:"ui-6s0dn4",kjj79g:"ui-l56j7k",kOIVth:"ui-11twubx",kLKAdn:"ui-t9g0qb",kpe85a:"ui-1yxiud8",kGO01o:"ui-20eq2h",kE3dHu:"ui-yab65l",k9WMMc:"ui-2b8uid",kMwMTN:"ui-4b2ntj",kGuDYH:"ui-4z9k3i",kLWn49:"ui-1fc57z9",$$css:!0}},Vre={base:{kMwMTN:"ui-4b2ntj",kGuDYH:"ui-4z9k3i",kLWn49:"ui-d4r4e8",$$css:!0}},Gre={base:{kMwMTN:"ui-19aaqeu",kGuDYH:"ui-4z9k3i",k63SB2:"ui-20ajya",kLWn49:"ui-d4r4e8",$$css:!0}},Wre={base:{kjj79g:"ui-l56j7k",k9WMMc:"ui-2b8uid",$$css:!0}},jR={base:{k1xSpc:"ui-jp7ctv",kMwMTN:"ui-1heor9g",kybGjl:"ui-1hl2dhg",kysU6D:"ui-jyslct",kEafiO:"ui-972fbf",kPef9Z:"ui-1ejq31n",kWqL5O:"ui-gfja2r",kSWEuD:"ui-11pwa6s",kt9PQ7:"ui-1qhh985",kfdmCh:"ui-1sy0etr",kZ1KPB:"ui-yj58a3",k4WBpm:"ui-1b16gh4",kWkggS:"ui-jbqb8w",kVVagm:"ui-ln7xf2",k9WMMc:"ui-16tdsg8",kkrTdU:"ui-1ypdohk",kDPRdz:"ui-144v4sp",k67Jb4:"ui-1lku1pv",kfbEmr:"ui-17kgsl5",kxHR8W:"ui-1dmdw0h",$$css:!0}},Kre={base:{k1xSpc:"ui-1lliihq",kZKoxP:"ui-1qx5ct2",kaIpWk:"ui-1e1y6u3",kWkggS:"ui-flfp0o",kKVMdj:"ui-16iawpz",k44tkh:"ui-1c74tu6",kyAemX:"ui-w1l40g",ko0y90:"ui-a4qsjk",$$css:!0}},Yre={base:{kzqmXN:"ui-3hqpx7",$$css:!0}},Xre={base:{kzqmXN:"ui-1iy3nof",$$css:!0}},Zre={base:{kzqmXN:"ui-g0jo4d",$$css:!0}},Qre={base:{k1xSpc:"ui-78zum5",kzqmXN:"ui-h8yej3",k7Eaqz:"ui-euugli",kXwgrk:"ui-dt5ytf",$$css:!0}},Jre={base:{keoZOQ:"ui-1e66mq1",kLKAdn:"ui-f6zju3",kpe85a:"ui-1yxiud8",kGO01o:"ui-cnij5n",kE3dHu:"ui-yab65l",$$css:!0}},zR=[{identityClass:"automations-run-history-table__skeleton--wide",style:Zre.base},{identityClass:"automations-run-history-table__skeleton--medium",style:Yre.base},{identityClass:"automations-run-history-table__skeleton--short",style:Xre.base}];function eie(e){return typeof e=="number"?`${e}px`:e}function tie(e){if(e.fixedWidth!==void 0)return{flexValue:`0 0 ${eie(e.fixedWidth)}`,minWidth:e.fixedWidth,maxWidth:e.fixedWidth};const t=e.flexWidth;return t!==void 0?{flexValue:`${t.grow??1} 1 0`,minWidth:t.minWidth,maxWidth:t.maxWidth}:{flexValue:"1 1 0",minWidth:void 0,maxWidth:void 0}}function L0(e){const t=tie(e),n={flex:t.flexValue};return t.minWidth!==void 0&&(n.minWidth=t.minWidth),t.maxWidth!==void 0&&(n.maxWidth=t.maxWidth),n}const j0={identityClass:"",style:null};function u2(e){switch(e){case"right":return{identityClass:"automations-run-history-table__cell--align-right",style:Ire.base};case"center":return{identityClass:"automations-run-history-table__cell--align-center",style:Bre.base};default:return j0}}function nie(e){switch(e){case"right":return{identityClass:"automations-run-history-table__header--align-right",style:Lre.base};case"center":return{identityClass:"automations-run-history-table__header--align-center",style:Wre.base};default:return j0}}function rie(e){switch(e){case"primary":return{identityClass:"automations-run-history-table__cell--tint-primary",style:Mre.base};case"secondary":return{identityClass:"automations-run-history-table__cell--tint-secondary",style:Ure.base};case"tertiary":return{identityClass:"automations-run-history-table__cell--tint-tertiary",style:qre.base};case"quaternary":return{identityClass:"automations-run-history-table__cell--tint-quaternary",style:Fre.base};default:return j0}}function iie(e){return!e.defaultPrevented&&e.button===0&&!e.metaKey&&!e.altKey&&!e.ctrlKey&&!e.shiftKey&&e.currentTarget.target!=="_blank"}function Hc(...e){return e.filter(Boolean).join(" ")}function c2(e){return sn(Yt({rootClass:"ui-automations-run-history-table__row",stylexStyles:[zre.base,e&&Pre.base],className:Hc("automations-run-history-table__row",e&&"automations-run-history-table__row--linked")}).className,"ui--default-marker")}function f2(){return g.jsx("div",{className:Yt({rootClass:"ui-automations-run-history-table__row-divider",stylexStyles:$re.base,className:"automations-run-history-table__row-divider"}).className,"data-run-history-row-divider":""})}function sie({columns:e}){return g.jsx("div",{className:Yt({rootClass:"ui-automations-run-history-table__header-row",stylexStyles:jre.base,className:"automations-run-history-table__header-row"}).className,children:e.map(t=>{const n=nie(t.align);return g.jsx("div",{className:Yt({rootClass:"ui-automations-run-history-table__header",stylexStyles:[Dre.base,n.style],className:Hc("automations-run-history-table__header",n.identityClass)}).className,style:L0(t),children:t.header},`header-${t.key}`)})})}function PR({row:e,column:t}){const n=u2(t.align),r=rie(t.tintColor);return g.jsx("div",{className:Yt({rootClass:"ui-automations-run-history-table__cell",stylexStyles:[l2.base,n.style,r.style],className:Hc("automations-run-history-table__cell",n.identityClass,r.identityClass)}).className,style:L0(t),children:t.render(e)})}function oie({columns:e,rowIndex:t}){const n=zR[t%zR.length];return g.jsxs("div",{className:c2(!1),"data-run-history-row":"",children:[g.jsx(f2,{}),e.map(r=>{const s=u2(r.align);return g.jsx("div",{className:Yt({rootClass:"ui-automations-run-history-table__cell",stylexStyles:[l2.base,s.style],className:Hc("automations-run-history-table__cell",s.identityClass)}).className,style:L0(r),children:r.header!==""&&r.header!=null&&g.jsx("span",{className:Yt({rootClass:"ui-automations-run-history-table__skeleton",stylexStyles:[Kre.base,n.style],className:Hc("automations-run-history-table__skeleton",n.identityClass)}).className})},`skeleton-${r.key}`)})]})}function d2({data:e,columns:t,isLoading:n=!1,skeletonRowCount:r=3,emptyState:s,onRowClick:a,getRowHref:l,pagination:c,ariaLabel:f="Run history"}){const{linkColumns:d,excludedColumns:h,hasExcludedColumns:m}=v.useMemo(()=>{const S=[],C=[];for(const E of t)E.excludeFromRowLink===!0?C.push(E):S.push(E);return{linkColumns:S,excludedColumns:C,hasExcludedColumns:C.length>0}},[t]),b=n&&e.length===0,y=!n&&e.length===0,k=c!==void 0&&c.totalPages>1&&!n;return g.jsxs("div",{className:Yt({rootClass:"ui-automations-run-history-table__wrapper",stylexStyles:Qre.base,className:"automations-run-history-table__wrapper"}).className,"data-vr":"all-runs",children:[g.jsxs("section",{"aria-busy":n,"aria-label":f,className:Yt({rootClass:"ui-automations-run-history-table",stylexStyles:Ore.base,className:"automations-run-history-table"}).className,children:[g.jsx(sie,{columns:t}),b?g.jsx("div",{className:Yt({rootClass:"ui-automations-run-history-table__rows",stylexStyles:LR.base,className:"automations-run-history-table__rows"}).className,children:Array.from({length:r},(S,C)=>g.jsx(oie,{columns:t,rowIndex:C},`skeleton-row-${C.toString()}`))}):y?g.jsx("div",{"aria-live":"polite",className:Yt({rootClass:"ui-automations-run-history-table__empty",stylexStyles:Hre.base,className:"automations-run-history-table__empty"}).className,role:"status",children:s??g.jsxs(g.Fragment,{children:[g.jsx("span",{className:Yt({rootClass:"ui-automations-run-history-table__empty-title",stylexStyles:Gre.base,className:"automations-run-history-table__empty-title"}).className,children:"No Results"}),g.jsx("span",{className:Yt({rootClass:"ui-automations-run-history-table__empty-description",stylexStyles:Vre.base,className:"automations-run-history-table__empty-description"}).className,children:"Try different filters"})]})}):g.jsx("div",{className:Yt({rootClass:"ui-automations-run-history-table__rows",stylexStyles:LR.base,className:"automations-run-history-table__rows"}).className,children:e.map(S=>{const C=l?.(S),E=C!==void 0&&C!==""&&d.length>0,T=E||a!==void 0&&d.length>0,R=()=>d.map(_=>g.jsx(PR,{column:_,row:S},`cell-${S.id}-${_.key}`));return g.jsx(v.Fragment,{children:g.jsxs("div",{className:c2(T),"data-run-history-row":"",children:[g.jsx(f2,{}),E?g.jsx("a",{className:Yt({rootClass:"ui-automations-run-history-table__row-link",stylexStyles:jR.base,className:"automations-run-history-table__row-link"}).className,"data-run-history-row-link":"",href:C,onClick:_=>{a!==void 0&&iie(_)&&(_.preventDefault(),a(S))},children:R()}):a!==void 0&&d.length>0?g.jsx("button",{className:Yt({rootClass:"ui-automations-run-history-table__row-link",stylexStyles:jR.base,className:"automations-run-history-table__row-link"}).className,"data-run-history-row-link":"",onClick:()=>a(S),type:"button",children:R()}):R(),m&&h.map(_=>g.jsx(PR,{column:_,row:S},`cell-${S.id}-${_.key}`))]})},S.id)})})]}),k&&c!==void 0&&g.jsx(Nre,{currentPage:c.currentPage,onPageChange:c.onPageChange,pageSize:c.pageSize,rootStyle:Jre.base,totalItems:c.totalItems,totalPages:c.totalPages})]})}function am(e,...t){const n=e.trim().toLowerCase();return n===""?!0:t.filter(r=>r!=null&&r!=="").join(" ").toLowerCase().includes(n)}function p2({title:e,count:t,singularLabel:n,pluralLabel:r,search:s,searchPlaceholder:a,onSearchChange:l,actions:c,children:f}){const d=t===1?n:r;return g.jsxs("section",{className:"pg-list-section",children:[e!==void 0?g.jsxs("header",{className:"pg-list-section__header",children:[g.jsx("h1",{className:"pg-list-section__title",children:e}),c?g.jsx("div",{className:"pg-list-section__actions",children:c}):null]}):null,g.jsxs("div",{className:"pg-list-section__toolbar",children:[g.jsxs("p",{className:"pg-list-section__count",children:[t," ",d]}),g.jsxs("div",{className:"pg-list-section__toolbar-end",children:[g.jsx("div",{className:"pg-list-section__search",children:g.jsx(rf,{type:"search",size:"lg",startIcon:"search",value:s,onChange:h=>l(h.target.value),placeholder:a,"aria-label":a,autoComplete:"off"})}),e===void 0&&c?g.jsx("div",{className:"pg-list-section__actions",children:c}):null]})]}),f]})}function aie(e){return e==="running"?"Running":e==="cancelled"?"Cancelled":e==="failed"?"Failed":"Completed"}function lie(e){return e==="running"?"accent":e==="failed"?"danger":"neutral"}function uie(e,t){return am(t,e.id,e.description,e.verdict,e.error,e.sessionId)}function cie(e,t){return am(t,e.runId,"eval",e.status,e.error,`${e.summary.passed} passed`,`${e.summary.failed} failed`,`${e.summary.done}/${e.summary.total}`)?!0:e.cases.some(n=>uie(n,t))}function fie(e,t){return am(t,e.title,e.sessionId,e.channelId,e.mode)}function $R({running:e,active:t=!1,children:n}){const r=["pg-agent-run__primary",t?"pg-agent-run__primary--active":null].filter(Boolean).join(" ");return g.jsxs("span",{className:r,children:[e===!0?g.jsx("span",{className:"spin","aria-label":"Running"}):null,g.jsx("span",{className:"pg-agent-run__primary-text",children:n})]})}function die({sessions:e,runs:t,currentSessionId:n,currentEvalRunId:r,readOnly:s=!1,onSelectSession:a,onOpenEvalRun:l}){const[c,f]=v.useState(""),d=v.useMemo(()=>[...e.map(S=>({kind:"session",at:S.updatedAt??S.createdAt??"",session:S})),...t.map(S=>({kind:"evalRun",at:S.finishedAt??S.startedAt,run:S}))].sort((S,C)=>C.at.localeCompare(S.at)),[e,t]),h=v.useMemo(()=>d.filter(k=>k.kind==="session"?fie(k.session,c):cie(k.run,c)),[d,c]),m=v.useMemo(()=>h.map(k=>k.kind==="session"?{id:`session:${k.session.sessionId}`,kind:"session",session:k.session,active:k.session.sessionId===n}:{id:`eval:${k.run.runId}`,kind:"evalRun",run:k.run,active:k.run.runId===r}),[h,n,r]),b=v.useMemo(()=>[{key:"run",header:"Run",flexWidth:{minWidth:160,grow:2},tintColor:"primary",render:k=>k.kind==="session"?g.jsx($R,{running:k.session.running,active:k.active,children:k.session.title||k.session.sessionId}):g.jsx($R,{running:k.run.status==="running",active:k.active,children:k.run.runId})},{key:"type",header:"Type",flexWidth:{minWidth:140,grow:1},render:k=>{if(k.kind==="session")return k.session.channelId||"—";const{status:S,summary:C}=k.run;return g.jsxs("span",{className:"pg-agent-run__type",children:[g.jsx(vo,{variant:lie(S),size:"sm",children:"Eval"}),g.jsxs("span",{className:"pg-eval-run__meta",children:[aie(S),S==="running"?` · ${C.done}/${C.total} done`:""]})]})}},{key:"details",header:"Details",flexWidth:{minWidth:160,grow:1.5},render:k=>{if(k.kind==="session"){const C=k.session.turnCount;return C===void 0?"—":`${C} ${C===1?"turn":"turns"}`}const{summary:S}=k.run;return g.jsxs("span",{className:"pg-eval-run__cases-summary",children:[g.jsxs("span",{className:"pg-eval-run__stat pg-verdict--success",children:[g.jsx(qt,{name:"check-circle",size:12,variant:"filled","aria-hidden":!0}),S.passed," passed"]}),g.jsxs("span",{className:"pg-eval-run__stat pg-verdict--danger",children:[g.jsx(qt,{name:"x-circle",size:12,variant:"filled","aria-hidden":!0}),S.failed," failed"]})]})}},{key:"activity",header:"Last activity",fixedWidth:96,align:"right",render:k=>k.kind==="session"?k.session.updatedAt?mv(k.session.updatedAt)??"—":"—":mv(k.run.finishedAt??k.run.startedAt)??"—"}],[]),y=d.length===0?g.jsx("span",{children:s?"No stored runs for this stopped agent.":"No runs yet — start a chat."}):g.jsx("span",{children:"No runs match your search."});return g.jsx(p2,{count:h.length,singularLabel:"run",pluralLabel:"runs",search:c,searchPlaceholder:"Search runs",onSearchChange:f,children:g.jsx(d2,{data:m,columns:b,ariaLabel:"Agent runs",emptyState:y,onRowClick:k=>{if(k.kind==="session"){a(k.session);return}l(k.run.runId)}})})}function pie(e,t){const n=e?.cases.find(s=>s.id===t);if(n===void 0)return{label:"—",className:"",icon:void 0};if(n.status==="running")return{label:"Running…",className:"pg-verdict--warn",icon:void 0};const r=n.verdict??(n.ok===!0?"passed":"failed");return r==="passed"?{label:"Passed",className:"pg-verdict--success",icon:"check-circle"}:r==="failed"?{label:"Failed",className:"pg-verdict--danger",icon:"x-circle"}:{label:r,className:"pg-verdict--muted",icon:void 0}}function hie({cases:e,latestRun:t,running:n,onRun:r,onRunAll:s,readOnly:a=!1}){const[l,c]=v.useState(""),f=v.useMemo(()=>e.filter(b=>am(l,b.id,b.description,b.fileId,b.tags?.join(" "))),[e,l]),d=v.useMemo(()=>f.map(b=>{const y=pie(t,b.id);return{id:b.id,evalCase:b,verdictLabel:y.label,verdictClassName:y.className,verdictIcon:y.icon,isSummary:b.id.endsWith("/overall")||(b.tags?.includes("summary")??!1)}}),[f,t]),h=v.useMemo(()=>{const b=[{key:"case",header:"Case",flexWidth:{minWidth:160,grow:1.4},tintColor:"primary",render:y=>g.jsx("span",{className:"pg-agent-run__primary-text",children:y.evalCase.id})},{key:"description",header:"Description",flexWidth:{minWidth:180,grow:2.4},render:y=>g.jsx("span",{className:"pg-agent-run__primary-text",children:y.evalCase.description||"—"})},{key:"tags",header:"Tags",flexWidth:{minWidth:100,grow:1},render:y=>y.evalCase.tags?.join(", ")||"—"},{key:"latest",header:"Latest",flexWidth:{minWidth:80,grow:1},render:y=>g.jsxs("span",{className:y.verdictClassName?`pg-eval-run__stat ${y.verdictClassName}`:"pg-eval-run__stat",children:[y.verdictIcon!==void 0?g.jsx(qt,{name:y.verdictIcon,variant:"filled",size:12,"aria-hidden":!0}):null,y.verdictLabel]})}];return a||b.push({key:"actions",header:"",fixedWidth:40,align:"right",excludeFromRowLink:!0,render:y=>g.jsx(br,{icon:"play",size:"sm","aria-label":"Run",disabled:n,title:y.isSummary?`Runs full ${y.evalCase.fileId} suite (summary needs siblings)`:void 0,onClick:()=>r(y.evalCase.id)})}),b},[r,n,a]),m=e.length===0?g.jsx("span",{children:"No evals/ cases found for this agent."}):g.jsx("span",{children:"No evaluations match your search."});return g.jsx(p2,{count:f.length,singularLabel:"evaluation",pluralLabel:"evaluations",search:l,searchPlaceholder:"Search evaluations",onSearchChange:c,actions:!a&&e.length>0?g.jsx(yn,{variant:"primary",tone:"monochrome",size:"lg",disabled:n,title:n?"Eval run in progress":void 0,onClick:s,children:"Run all"}):null,children:g.jsx(d2,{data:d,columns:h,ariaLabel:"Evaluations",emptyState:m})})}function rc({label:e,children:t}){return g.jsxs("div",{className:"pg-meta-table__cell",children:[g.jsx("div",{className:"pg-meta-table__label",children:e}),g.jsx("div",{className:"pg-meta-table__value",children:t})]})}function Cy(){return g.jsx("span",{className:"pg-meta-table__empty",children:"—"})}function mie(e,t){return t?"History":e?"Development":"Production"}function gie(e,t){return t?"neutral":e?"warn":"neutral"}function bie(e,t){return t&&e!=="bad"?"Stopped":e==="ok"?"Healthy":e==="bad"?"Unhealthy":"Unknown"}function yie(e,t){return t&&e!=="bad"?"neutral":e==="ok"?"success":e==="bad"?"danger":"neutral"}function vie(e,t){return t&&t.trim()!==""?t:e&&e.trim()!==""?e.charAt(0).toUpperCase()+e.slice(1):null}function xie({dev:e=!1,health:t="unknown",model:n,runtime:r,sourcePath:s,version:a,readOnly:l=!1}){const c=vie(r,s),f=n&&n.trim()!==""?n:null,d=a&&a.trim()!==""?a.trim():null,h=l&&t!=="bad",m=!h&&t==="ok";return g.jsxs("section",{className:"pg-meta-table","aria-labelledby":"pg-overview-title",children:[g.jsx("h2",{id:"pg-overview-title",className:"pg-section-title",children:"Overview"}),g.jsxs("div",{className:"pg-meta-table__card",children:[g.jsx(rc,{label:"Mode",children:g.jsxs(vo,{variant:gie(e,l),size:"sm",pill:!0,children:[e&&!l?g.jsx("span",{className:"pg-meta-table__dot pg-meta-table__dot--dev","aria-hidden":!0}):null,mie(e,l)]})}),g.jsx(rc,{label:"Status",children:g.jsxs(vo,{variant:yie(t,l),size:"sm",pill:!0,children:[g.jsx(qt,{name:h?"pause-circle":m?"check-circle":"x-circle",variant:"filled",size:12,color:m?"green":t==="bad"?"red":"secondary","aria-hidden":!0}),bie(t,l)]})}),g.jsx(rc,{label:"Model",children:f?g.jsx("span",{className:"pg-meta-table__text",children:f}):g.jsx(Cy,{})}),g.jsx(rc,{label:"Source",children:c?g.jsx("span",{className:"pg-meta-table__text",title:c,children:c}):g.jsx(Cy,{})}),g.jsx(rc,{label:"BDK",children:d?g.jsx("span",{className:"pg-meta-table__text",children:d}):g.jsx(Cy,{})})]})]})}function kie({schedules:e,dev:t,onDispatch:n}){return e.length===0?null:g.jsxs("section",{className:"pg-schedules","aria-labelledby":"pg-schedules-title",children:[g.jsx("h2",{id:"pg-schedules-title",className:"pg-section-title",children:"Schedules"}),g.jsx("div",{className:"pg-schedules__card",children:e.map(r=>g.jsxs("div",{className:"pg-schedules__row",children:[g.jsxs("div",{className:"pg-schedules__copy",children:[g.jsx("div",{className:"pg-schedules__name",children:r.name}),g.jsx("div",{className:"pg-schedules__cron",children:r.cron})]}),g.jsx(yn,{variant:"outline",size:"lg",className:"pg-outline-button",disabled:!t,title:t?`Dispatch ${r.name} once`:"Start the server with --dev to dispatch schedules by hand",onClick:()=>{n(r.name)},children:"Dispatch"})]},r.name))})]})}function fp(e){return g.jsx("span",{className:"pg-surface-field__text",children:e.map((t,n)=>g.jsxs("span",{children:[n>0?", ":"",t.name]},t.name))})}function dp(e){return e.map(t=>g.jsxs("div",{className:"pg-surface-detail",children:[g.jsx("div",{className:"pg-surface-detail__name",children:t.name}),t.detail?g.jsx("div",{className:"pg-surface-detail__desc",children:t.detail}):null]},t.name))}function Sie({field:e,expanded:t,onToggle:n}){const s=!e.empty&&e.details!==void 0?g.jsxs("button",{type:"button",className:"pg-surface-field__head","aria-expanded":t,"aria-label":`${t?"Collapse":"Expand"} ${e.label}`,onClick:n,children:[g.jsx("span",{className:"pg-surface-field__label",children:e.label}),g.jsx(qt,{name:"chevron-down",size:12,"aria-hidden":!0,className:t?"pg-surface-field__chevron open":"pg-surface-field__chevron"})]}):g.jsx("div",{className:"pg-surface-field__label",children:e.label});return g.jsxs("div",{className:"pg-surface-field",children:[s,g.jsx("div",{className:"pg-surface-field__value",children:e.empty?g.jsx("span",{className:"pg-surface-field__empty",children:"Empty"}):t&&e.details!==void 0?g.jsx("div",{className:"pg-surface-field__details",children:e.details}):e.summary})]})}function wie({info:e,onTryRoute:t,readOnly:n=!1}){const[r,s]=v.useState(null),[a,l]=v.useState(new Set),c=e?.tools??[],f=e?.skills??[],d=e?.subagents??[],h=e?.connections??[],m=e?.channels??[],b=e?.hooks??[],y=v.useMemo(()=>{const E=new Map;for(const T of Jh(m))E.set(`${T.method}:${T.url}`,T.name);return E},[m]),k=(E,T)=>{if(t){t(E,T);return}s({channelId:E,route:T})},S=m.map(E=>g.jsxs("div",{className:"pg-surface-detail",children:[g.jsx("div",{className:"pg-surface-detail__name",children:E.id}),(E.routes??[]).length===0?g.jsx("div",{className:"pg-surface-detail__desc",children:"(events only)"}):g.jsx("div",{className:"pg-surface-channel__routes",children:(E.routes??[]).map(T=>{const R=!n&&E.id!=="http",_=`${T.method} ${T.url}`,D=y.get(`${T.method.toUpperCase()}:${T.url}`);return g.jsxs("div",{className:"pg-surface-channel__route",children:[g.jsx("code",{children:_}),D?g.jsx("code",{className:"pg-surface-channel__slash",title:"Composer slash command",children:D}):null,R?g.jsx("button",{type:"button",className:"link-btn",onClick:()=>k(E.id,T),children:"Try"}):null]},_)})})]},E.id)),C=[{id:"tools",label:"Tools",empty:c.length===0,summary:fp(c),details:dp(c.map(E=>({name:E.name,detail:E.description})))},{id:"skills",label:"Skills",empty:f.length===0,summary:fp(f),details:dp(f.map(E=>({name:E.name,detail:E.description})))},{id:"subagents",label:"Subagents",empty:d.length===0,summary:fp(d),details:dp(d.map(E=>({name:E.name,detail:E.description})))},{id:"connections",label:"MCP Connections",empty:h.length===0,summary:fp(h),details:dp(h.map(E=>({name:E.name,detail:E.transport})))},{id:"channels",label:"Channels",empty:m.length===0,summary:g.jsx("span",{className:"pg-surface-field__text",children:m.map(E=>E.id).join(", ")}),details:S},{id:"hooks",label:"Hooks",empty:b.length===0,summary:g.jsx("span",{className:"pg-surface-field__text",children:b.join(", ")})}];return g.jsxs("section",{className:"pg-surface",id:"pg-agent-surface","aria-labelledby":"pg-agent-trace-title",children:[g.jsx("h2",{id:"pg-agent-trace-title",className:"pg-section-title",children:"Agent Trace"}),e===null?g.jsx("div",{className:"pg-surface-empty",children:"Loading…"}):g.jsx("div",{className:"pg-surface-card",children:C.map(E=>g.jsx(Sie,{field:E,expanded:a.has(E.id),onToggle:()=>{l(T=>{const R=new Set(T);return R.has(E.id)?R.delete(E.id):R.add(E.id),R})}},E.id))}),r?g.jsx(o2,{channelId:r.channelId,route:r.route,onClose:()=>s(null)}):null]})}function BR(){const e=Ue(U=>U.meta),t=Ue(U=>U.capabilities),n=Ue(U=>U.info),r=Ue(U=>U.health),s=Ue(U=>U.sessions),a=Ue(U=>U.current),l=Ue(U=>Ere(U.traceEvents)),c=Ue(U=>U.view),f=Ue(U=>U.evalCases),d=Ue(U=>U.evalRuns),h=Ue(U=>U.evalRun),m=Ue(U=>U.evalNavReturn),b=Ue(U=>U.overviewSection),y=Ue(U=>U.surfaceFocusNonce),k=v.useRef(null);v.useEffect(()=>{y!==0&&k.current?.scrollIntoView({behavior:"smooth",block:"start"})},[y]);const S=e.name||n?.name||"Agent",C=QD(S),E=h??d?.[0]??null,T=h?.status==="running",R=Qe.modelLabel(),_=a?.sessionId??null,D=v.useMemo(()=>{const U=h===null?d:[h,...d],B=new Set(U.flatMap(j=>j.cases.flatMap(q=>q.sessionId===void 0?[]:[q.sessionId])));return Tre(s.filter(j=>!B.has(j.sessionId)),_,l)},[s,d,h,_,l]),A=tG(D),I=M0(c),P=m||I==="evals",$=P?null:a?.sessionId??null,O=P?h?.runId??null:null,Y=[{id:"home",label:"Agent"},{id:"runs",label:A>0?`Runs (${A})`:"Runs"},...t.evals==="disabled"?[]:[{id:"evals",label:"Evaluations"}],...t.logs==="disabled"?[]:[{id:"logs",label:"Logs"}]];return g.jsxs("div",{className:"pg-overview",children:[g.jsxs("div",{className:"pg-overview-identity",children:[g.jsx("div",{className:"pg-overview-identity__avatar","data-color":C,"aria-hidden":"true",children:g.jsx(qt,{name:"robot",variant:"filled",size:24,color:C})}),g.jsxs("div",{className:"pg-overview-identity__text",children:[g.jsx("h1",{className:"pg-overview-identity__name",children:S}),n?.description?g.jsx("p",{className:"pg-overview-identity__description",children:n.description}):null]})]}),g.jsx("div",{className:"pg-tabs",role:"tablist","aria-label":"Overview sections",children:Y.map(U=>g.jsx("button",{type:"button",role:"tab","aria-selected":b===U.id,className:b===U.id?"pg-tab pg-tab--active":"pg-tab",onClick:()=>Qe.setOverviewSection(U.id),children:U.label},U.id))}),b==="home"?g.jsxs(g.Fragment,{children:[g.jsx(xie,{dev:e.dev,health:r,model:R||void 0,runtime:n?.runtime,sourcePath:n?.local?.cwd,version:e.version,readOnly:e.readonly===!0}),g.jsx(kie,{schedules:n?.schedules??[],dev:e.dev&&e.readonly!==!0&&t.schedules==="enabled",onDispatch:U=>Qe.dispatchSchedule(U)}),g.jsx("div",{ref:k,children:g.jsx(wie,{info:n,readOnly:e.readonly===!0||t.channelRoutes!=="enabled"})})]}):null,b==="runs"?g.jsx(die,{sessions:D,runs:d,currentSessionId:$,currentEvalRunId:O,readOnly:e.readonly===!0,onSelectSession:U=>Qe.selectSession(U),onOpenEvalRun:U=>{Qe.selectEvalRun(U)}}):null,b==="evals"?g.jsx(hie,{cases:f,latestRun:E,running:T,readOnly:e.readonly===!0||t.evals!=="enabled",onRun:U=>{Qe.startEvalRun([U])},onRunAll:()=>{Qe.startEvalRun()}}):null,b==="logs"?g.jsx("div",{className:"pg-overview-logs",children:g.jsx(Cre,{})}):null]})}const h2="agent-serve.playground.chatPanelWidth.v2",dh=320,Eie=.5,Tie=.8;function ic(e){const t=e?.parentElement;return t&&t.clientWidth>0?t.clientWidth:typeof window<"u"?window.innerWidth:1200}function Iv(e){return Math.max(dh,Math.floor(e*Tie))}function bl(e,t){return Math.min(Iv(t),Math.max(dh,Math.round(e)))}function Ry(e){return bl(e*Eie,e)}function FR(e){try{const t=localStorage.getItem(h2);if(t===null)return Ry(e);const n=Number.parseInt(t,10);return Number.isFinite(n)?bl(n,e):Ry(e)}catch{return Ry(e)}}function Cie(){const e=Ue(h=>h.chatPanelOpen),t=v.useRef(null),[n,r]=v.useState(()=>FR(typeof window<"u"?window.innerWidth:1200)),[s,a]=v.useState(!1),l=v.useRef(n);l.current=n,v.useLayoutEffect(()=>{const h=t.current?.parentElement;if(!h)return;r(FR(ic(t.current)));const m=()=>{const y=ic(t.current);r(k=>bl(k,y))},b=new ResizeObserver(m);return b.observe(h),()=>b.disconnect()},[]),v.useEffect(()=>{try{localStorage.setItem(h2,String(n))}catch{}},[n]);const c=v.useCallback(h=>{h.preventDefault();const m=h.currentTarget,b=h.clientX,y=l.current;m.setPointerCapture(h.pointerId),a(!0),document.body.classList.add("pg-resizing-chat-panel");const k=C=>{const E=ic(t.current);r(bl(y-(C.clientX-b),E))},S=C=>{m.releasePointerCapture(C.pointerId),m.removeEventListener("pointermove",k),m.removeEventListener("pointerup",S),m.removeEventListener("pointercancel",S),a(!1),document.body.classList.remove("pg-resizing-chat-panel")};m.addEventListener("pointermove",k),m.addEventListener("pointerup",S),m.addEventListener("pointercancel",S)},[]);if(!e)return null;const f=ic(t.current),d=Iv(f);return g.jsxs("aside",{ref:t,className:s?"pg-chat-panel pg-chat-panel--resizing":"pg-chat-panel",style:{width:n},children:[g.jsx("div",{className:s?"pg-chat-panel__resizer dragging":"pg-chat-panel__resizer",role:"separator","aria-orientation":"vertical","aria-label":"Resize chat panel","aria-valuenow":n,"aria-valuemin":dh,"aria-valuemax":d,tabIndex:0,onPointerDown:c,onKeyDown:h=>{const m=ic(t.current);h.key==="ArrowLeft"?(h.preventDefault(),r(b=>bl(b+16,m))):h.key==="ArrowRight"?(h.preventDefault(),r(b=>bl(b-16,m))):h.key==="Home"?(h.preventDefault(),r(dh)):h.key==="End"&&(h.preventDefault(),r(Iv(m)))}}),g.jsx(r2,{variant:"panel"}),g.jsx("div",{className:"pg-transcript-wrap",children:g.jsx(n2,{})})]})}function Rie(e){const t=e.replace("#","").trim();if(t.length===8)return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:parseInt(t.slice(6,8),16)/255};if(t.length===6)return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:1};if(t.length===3)return{r:parseInt(t[0]+t[0],16),g:parseInt(t[1]+t[1],16),b:parseInt(t[2]+t[2],16),a:1};throw new Error(`Invalid hex: ${e}`)}function m2(e){const t=e.r.toString(16).padStart(2,"0"),n=e.g.toString(16).padStart(2,"0"),r=e.b.toString(16).padStart(2,"0");return`#${t}${n}${r}`.toUpperCase()}function _ie(e){const t=Math.round(Math.min(1,Math.max(0,e.a))*255).toString(16).padStart(2,"0");return`${m2(e)}${t}`.toUpperCase()}const Aie=/^oklch\(\s*([^\s/]+)\s+([^\s/]+)\s+([^\s/)]+?)(?:\s*\/\s*([^)]+?))?\s*\)$/i,Nie=/^rgba?\(\s*([0-9.]+)\s*,\s*([0-9.]+)\s*,\s*([0-9.]+)(?:\s*,\s*([0-9.]+))?\s*\)$/i,g2=.5/255;function pp(e,t,n){return Math.min(n,Math.max(t,e))}function _y(e){const t=Math.abs(e);return t<=.04045?e/12.92:(e<0?-1:1)*((t+.055)/1.055)**2.4}function Ay(e){const t=Math.abs(e);return t<=.0031308?e*12.92:(e<0?-1:1)*(1.055*t**(1/2.4)-.055)}function Oie(e){const t=_y(e.r/255),n=_y(e.g/255),r=_y(e.b/255),s=.4122214708*t+.5363325363*n+.0514459929*r,a=.2119034982*t+.6806995451*n+.1073969566*r,l=.0883024619*t+.2817188376*n+.6299787005*r,c=Math.cbrt(s),f=Math.cbrt(a),d=Math.cbrt(l),h=.2104542553*c+.793617785*f-.0040720468*d,m=1.9779984951*c-2.428592205*f+.4505937099*d,b=.0259040371*c+.7827717662*f-.808675766*d,y=Math.sqrt(m*m+b*b);let k=Math.atan2(b,m)*180/Math.PI;return k<0&&(k+=360),{l:h,c:y,h:y<5e-4?0:k,a:e.a}}function Iie(e){const t=e.h*Math.PI/180,n=e.c*Math.cos(t),r=e.c*Math.sin(t),s=e.l+.3963377774*n+.2158037573*r,a=e.l-.1055613458*n-.0638541728*r,l=e.l-.0894841775*n-1.291485548*r,c=s*s*s,f=a*a*a,d=l*l*l,h=4.0767416621*c-3.3077115913*f+.2309699292*d,m=-1.2684380046*c+2.6097574011*f-.3413193965*d,b=-.0041960863*c-.7034186147*f+1.707614701*d;return{r:Math.round(pp(Ay(h),0,1)*255),g:Math.round(pp(Ay(m),0,1)*255),b:Math.round(pp(Ay(b),0,1)*255),a:pp(e.a,0,1)}}function hp(e,t){const n=5e-4*10**(1-t);return!Number.isFinite(e)||Object.is(e,-0)||Math.abs(e)<n?"0":e.toFixed(t).replace(/(\.\d*?)0+$/,"$1").replace(/\.$/,"")}function b2(e){const t=hp(e.l,3),n=hp(e.c,3),r=n==="0"?"0":hp(e.h,3);return e.a<1-g2?`oklch(${t} ${n} ${r} / ${hp(e.a,3)})`:`oklch(${t} ${n} ${r})`}function mp(e,t){const n=e.trim();if(n.endsWith("%"))return Number.parseFloat(n.slice(0,-1))/100*t;const r=n.replace(/deg$/i,"");return Number.parseFloat(r)}function y2(e){const t=Aie.exec(e.trim());if(t===null)throw new Error(`Invalid oklch: ${e}`);const n=mp(t[1],1),r=mp(t[2],.4),s=mp(t[3],1),a=t[4]===void 0?1:mp(t[4],1);if(![n,r,s,a].every(Number.isFinite))throw new Error(`Invalid oklch: ${e}`);return{l:n,c:r,h:s,a}}function Mie(e){const t=Nie.exec(e.trim());if(t===null)throw new Error(`Invalid rgb: ${e}`);return{r:Number.parseFloat(t[1]),g:Number.parseFloat(t[2]),b:Number.parseFloat(t[3]),a:t[4]===void 0?1:Number.parseFloat(t[4])}}function v2(e){const t=e.trim();if(t.startsWith("#"))return Rie(t);if(t.toLowerCase().startsWith("oklch("))return Iie(y2(t));if(/^rgba?\(/i.test(t))return Mie(t);throw new Error(`Unsupported CSS color: ${e}`)}function Die(e){return b2(Oie(e))}function Lie(e){const t=e.trim();return t.toLowerCase().startsWith("oklch(")?b2(y2(t)):Die(v2(t))}function jie(e){const t=v2(e);return t.a<1-g2?_ie(t):m2(t)}function zie(e,t){const n=Object.keys(e).sort((l,c)=>l.localeCompare(c)),r=n.map(l=>`${t}--cursor-${l}: ${jie(e[l])};`),s=`${t} `,a=n.map(l=>`${s}--cursor-${l}: ${Lie(e[l])};`);return[...r,`${t}@supports (color: oklch(0 0 0)) {`,...a,`${t}}`]}const Pie={name:"dark",appearance:"dark",highContrast:!1,sidebar:"oklch(0.209 0 0)",chrome:"oklch(0.191 0 0)",editor:"oklch(0.209 0 0)",base:"oklch(0.955 0 0)",accent:"oklch(0.681 0.131 252.629)",actionLabel:"oklch(0.226 0.013 264.284)",brand:"oklch(0.652 0.214 37.99)",focus:"oklch(0.955 0 0)",success:"oklch(0.638 0.129 153.739)",warn:"oklch(0.811 0.118 71.255)",danger:"oklch(0.628 0.194 8.387)",added:"oklch(0.713 0.094 155.438)",modified:"oklch(0.811 0.118 71.255)",removed:"oklch(0.712 0.177 12.651)",untracked:"oklch(0.775 0.062 217.469)",terminalAnsiBlack:"oklch(0.26 0 0)",terminalAnsiRed:"oklch(0.712 0.177 12.651)",terminalAnsiYellow:"oklch(0.712 0.125 71.923)",terminalAnsiGreen:"oklch(0.638 0.129 153.739)",terminalAnsiCyan:"oklch(0.775 0.062 217.469)",terminalAnsiBlue:"oklch(0.697 0.059 248.687)",terminalAnsiMagenta:"oklch(0.692 0.062 332.665)",terminalAnsiWhite:"oklch(0.955 0 0)",terminalAnsiBrightBlack:"oklch(0.955 0 0 / 0.6)",terminalAnsiBrightRed:"oklch(0.712 0.177 12.651)",terminalAnsiBrightYellow:"oklch(0.811 0.118 71.255)",terminalAnsiBrightGreen:"oklch(0.713 0.094 155.438)",terminalAnsiBrightCyan:"oklch(0.775 0.062 217.469)",terminalAnsiBrightBlue:"oklch(0.713 0.056 247.764)",terminalAnsiBrightMagenta:"oklch(0.692 0.062 332.665)",terminalAnsiBrightWhite:"oklch(0.955 0 0)",red:"oklch(0.712 0.177 12.651)",orange:"oklch(0.693 0.096 38.241)",yellow:"oklch(0.811 0.118 71.255)",green:"oklch(0.638 0.129 153.739)",cyan:"oklch(0.697 0.059 248.687)",blue:"oklch(0.74 0.101 251.884)",magenta:"oklch(0.692 0.062 332.665)",purple:"oklch(0.679 0.156 286.998)",diffAddedLineBackground:"oklch(0.638 0.129 153.739 / 0.2)",diffAddedTextBackground:"oklch(0.638 0.129 153.739 / 0.133)",diffRemovedLineBackground:"oklch(0.5 0.2 9.842 / 0.2)",diffRemovedTextBackground:"oklch(0.5 0.2 9.842 / 0.133)"},$ie={name:"light",appearance:"light",highContrast:!1,sidebar:"oklch(0.964 0 0)",chrome:"oklch(0.979 0 0)",editor:"oklch(0.991 0 0)",base:"oklch(0.191 0 0)",accent:"oklch(0.561 0.137 249.943)",actionLabel:"oklch(0.991 0 0)",brand:"oklch(0.652 0.214 37.99)",focus:"oklch(0.561 0.137 249.943)",success:"oklch(0.479 0.116 156.327)",warn:"oklch(0.567 0.123 69.543)",danger:"oklch(0.518 0.196 14.313)",added:"oklch(0.479 0.116 156.327)",modified:"oklch(0.567 0.123 69.543)",removed:"oklch(0.518 0.196 14.313)",untracked:"oklch(0.487 0.077 204.607)",terminalAnsiBlack:"oklch(0.191 0 0)",terminalAnsiRed:"oklch(0.518 0.196 14.313)",terminalAnsiYellow:"oklch(0.503 0.109 69.936)",terminalAnsiGreen:"oklch(0.479 0.116 156.327)",terminalAnsiCyan:"oklch(0.487 0.077 204.607)",terminalAnsiBlue:"oklch(0.497 0.143 250.703)",terminalAnsiMagenta:"oklch(0.449 0.176 345.345)",terminalAnsiWhite:"oklch(0.991 0 0)",terminalAnsiBrightBlack:"oklch(0.191 0 0 / 0.741)",terminalAnsiBrightRed:"oklch(0.582 0.178 13.604)",terminalAnsiBrightYellow:"oklch(0.567 0.123 69.543)",terminalAnsiBrightGreen:"oklch(0.542 0.133 155.45)",terminalAnsiBrightCyan:"oklch(0.552 0.068 203.209)",terminalAnsiBrightBlue:"oklch(0.561 0.137 249.943)",terminalAnsiBrightMagenta:"oklch(0.577 0.154 343.697)",terminalAnsiBrightWhite:"oklch(1 0 0)",red:"oklch(0.518 0.196 14.313)",orange:"oklch(0.576 0.183 39.534)",yellow:"oklch(0.567 0.123 69.543)",green:"oklch(0.479 0.116 156.327)",cyan:"oklch(0.487 0.077 204.607)",blue:"oklch(0.561 0.137 249.943)",magenta:"oklch(0.449 0.176 345.345)",purple:"oklch(0.572 0.154 287.656)",diffAddedLineBackground:"oklch(0.663 0.162 155.537 / 0.141)",diffAddedTextBackground:"oklch(0.666 0.162 155.968 / 0.22)",diffRemovedLineBackground:"oklch(0.703 0.192 13.697 / 0.22)",diffRemovedTextBackground:"oklch(0.703 0.192 13.697 / 0.341)"},x2=["sidebar","chrome","editor","base","accent","actionLabel","brand","focus","success","warn","danger","added","modified","removed","untracked","terminalAnsiBlack","terminalAnsiRed","terminalAnsiYellow","terminalAnsiGreen","terminalAnsiCyan","terminalAnsiBlue","terminalAnsiMagenta","terminalAnsiWhite","terminalAnsiBrightBlack","terminalAnsiBrightRed","terminalAnsiBrightYellow","terminalAnsiBrightGreen","terminalAnsiBrightCyan","terminalAnsiBrightBlue","terminalAnsiBrightMagenta","terminalAnsiBrightWhite","red","orange","yellow","green","cyan","blue","magenta","purple","diffAddedLineBackground","diffAddedTextBackground","diffRemovedLineBackground","diffRemovedTextBackground"];function Bie(e){const t={};for(const n of x2){const r=e[n],s=Xc(n);t[s]=r}return t}function Fie(e){return e.highContrast?e.appearance==="light"?"lightHighContrast":"darkHighContrast":e.appearance}const Uie={light:{text:{primary:100,secondary:84,tertiary:72,quaternary:52},icon:{primary:92,secondary:70,tertiary:52,quaternary:32},bg:{primary:100,secondary:20,tertiary:18,quaternary:10,quinary:8},border:{primary:92,secondary:56,tertiary:42,quaternary:12}},dark:{text:{primary:100,secondary:78,tertiary:60,quaternary:40},icon:{primary:92,secondary:70,tertiary:52,quaternary:32},bg:{primary:100,secondary:20,tertiary:16,quaternary:8,quinary:8},border:{primary:92,secondary:56,tertiary:42,quaternary:28}}};function qie(e,t,n){const r=Uie[n];if(e==="bg")return r.bg[t];if(t==="quinary")throw new Error("mixOpacityPercent: quinary is a bg-only level");return r[e][t]}const Hie={red:"red",orange:"orange",yellow:"yellow",green:"green",cyan:"cyan",blue:"blue",magenta:"magenta",purple:"violet"};function Vie(e){return Object.keys(e)}const Gie=Vie(Hie),Wie=["added","modified","removed","untracked"],Kie=["danger","success","warning"],Yie={danger:"danger",success:"success",warning:"warn"},k2=["primary","secondary","tertiary","quaternary"];function Pl(e){return e.charAt(0).toUpperCase()+e.slice(1)}function zn(e,t,n,r){return{key:e,hue:t,role:n,level:r}}function Xie(){return Gie.flatMap(e=>{const t=Pl(e);return[...k2.flatMap(n=>{const r=Pl(n);return[zn(`text${t}${r}`,e,"text",n),zn(`icon${t}${r}`,e,"icon",n),zn(`bg${t}${r}`,e,"bg",n),zn(`stroke${t}${r}`,e,"border",n)]}),zn(`bg${t}Quinary`,e,"bg","quinary")]})}function Zie(){return Wie.flatMap(e=>{const t=Pl(e);return[...k2.flatMap(n=>{const r=Pl(n);return[zn(`textGit${t}${r}`,e,"text",n),zn(`iconGit${t}${r}`,e,"icon",n),zn(`bgGit${t}${r}`,e,"bg",n)]}),zn(`strokeGit${t}`,e,"border","primary"),zn(`strokeGit${t}Secondary`,e,"border","secondary")]})}function Qie(){return[...["secondary","tertiary","quaternary"].flatMap(t=>{const n=Pl(t);return[zn(`textAccent${n}`,"accent","text",t),zn(`iconAccent${n}`,"accent","icon",t),zn(`bgAccent${n}`,"accent","bg",t),zn(`strokeAccent${n}`,"accent","border",t)]}),zn("bgAccentQuinary","accent","bg","quinary"),zn("strokeAccent","accent","border","primary")]}function Jie(){return Kie.flatMap(e=>{const t=Pl(e);return[zn(`bg${t}Primary`,e,"bg","primary"),zn(`bg${t}Secondary`,e,"bg","secondary"),zn(`bg${t}Tertiary`,e,"bg","tertiary"),zn(`bg${t}Quaternary`,e,"bg","quaternary"),zn(`bg${t}Quinary`,e,"bg","quinary")]})}const S2=[...Xie(),...Zie(),...Qie(),...Jie()];function ese(e){switch(e){case"accent":return"accent";case"added":case"modified":case"removed":case"untracked":return"git";case"danger":case"success":case"warning":return"status";default:return"hue"}}const UR={all:{border:{primary:56,secondary:32,tertiary:20,quaternary:12}},hue:{text:{primary:100,secondary:78,tertiary:64,quaternary:40},icon:{primary:100,secondary:70,tertiary:56,quaternary:32},bg:{primary:100,secondary:12,tertiary:8,quaternary:6,quinary:4}},git:{text:{primary:100,secondary:78,tertiary:64,quaternary:40},icon:{primary:100,secondary:70,tertiary:56,quaternary:32},bg:{primary:100,secondary:24,tertiary:12,quaternary:8}},accent:{text:{secondary:78,tertiary:64,quaternary:40},icon:{secondary:70,tertiary:56,quaternary:32},bg:{secondary:24,tertiary:12,quaternary:8,quinary:4}},status:{bg:{primary:100,secondary:20,tertiary:18,quaternary:10,quinary:8}}};function tse(e,t,n,r){return UR[ese(e)][t]?.[n]??UR.all[t]?.[n]??qie(t,n,r)}function nse(e){return e==="danger"||e==="success"||e==="warning"?Yie[e]:e}function rse(e,t,n,r){const s=tse(e,t,n,r),a=nse(e);return s>=100?{op:"ref",ref:a}:{op:"mixTransparent",ref:a,percent:s}}function ise(e){return e==="dark"||e==="darkHighContrast"?"dark":"light"}function sse(e,t){return JSON.stringify(e)===JSON.stringify(t)}function Mv(e){const t=ise(e);return Object.fromEntries(S2.map(n=>[n.key,rse(n.hue,n.role,n.level,t)]))}function ose(e){return Mv(e)}function Ny(e){const t=Mv("light"),n=Mv(e);return Object.fromEntries(S2.flatMap(r=>{const s=n[r.key];return s===void 0||sse(t[r.key]??s,s)?[]:[[r.key,s]]}))}new Set(x2);const ase=ose("light"),lse={foreground:{op:"ref",ref:"base"},textPrimary:{op:"ref",ref:"base"},textSecondary:{op:"mixTransparent",ref:"base",percent:74},textTertiary:{op:"mixTransparent",ref:"base",percent:60},textQuaternary:{op:"mixTransparent",ref:"base",percent:36},textInvert:{op:"ref",ref:"editor"},textMedia:{op:"mixWhite",whitePercent:100},textActive:{op:"ref",ref:"textPrimary"},textFocused:{op:"ref",ref:"textPrimary"},...ase,textAccent:{op:"ref",ref:"accent"},textLink:{op:"ref",ref:"textBluePrimary"},bgLinkHover:{op:"ref",ref:"bgBlueSecondary"},iconPrimary:{op:"ref",ref:"base"},iconSecondary:{op:"mixTransparent",ref:"base",percent:66},iconTertiary:{op:"mixTransparent",ref:"base",percent:52},iconQuaternary:{op:"mixTransparent",ref:"base",percent:28},iconAccentPrimary:{op:"ref",ref:"accent"},bgPrimary:{op:"mixTransparent",ref:"base",percent:20},bgSecondary:{op:"mixTransparent",ref:"base",percent:14},bgTertiary:{op:"mixTransparent",ref:"base",percent:8},bgQuaternary:{op:"mixTransparent",ref:"base",percent:6},bgQuinary:{op:"mixTransparent",ref:"base",percent:4},bgMedia:{op:"mixBlack",blackPercent:72},bgMediaHover:{op:"mixBlack",blackPercent:54},bgElevated:{op:"ref",ref:"editor"},bgChrome:{op:"ref",ref:"chrome"},bgCard:{op:"ref",ref:"bgQuaternary"},bgInput:{op:"ref",ref:"editor"},bgInputField:{op:"mixTransparentOverlay",ref:"base",percent:3},bgInputSurface:{op:"ref",ref:"bgQuaternary"},bgEditor:{op:"ref",ref:"editor"},bgSidebar:{op:"ref",ref:"sidebar"},bgDiffInserted:{op:"ref",ref:"diffAddedLineBackground"},bgDiffRemoved:{op:"ref",ref:"diffRemovedLineBackground"},bgGitAddedHover:{op:"mixTwo",k1:"base",p1:10,k2:"added"},bgGitModifiedHover:{op:"mixTwo",k1:"base",p1:10,k2:"modified"},bgGitRemovedHover:{op:"mixTwo",k1:"base",p1:10,k2:"removed"},bgGitUntrackedHover:{op:"mixTwo",k1:"base",p1:10,k2:"untracked"},bgActive:{op:"mixTransparent",ref:"base",percent:16},bgFocused:{op:"mixTransparent",ref:"base",percent:22},bgAccent:{op:"ref",ref:"accent"},bgAccentHover:{op:"mixTwo",k1:"base",p1:10,k2:"accent"},strokeControlDivider:{op:"mixBlack",blackPercent:16},strokeControlDividerMonochrome:{op:"mixTransparent",ref:"editor",percent:16},strokePrimary:{op:"mixTransparent",ref:"base",percent:20},strokeSecondary:{op:"mixTransparent",ref:"base",percent:12},strokeMedia:{op:"mixWhite",whitePercent:12},strokeTertiary:{op:"mixTransparent",ref:"base",percent:8},strokeTertiaryOpaque:{op:"mixTwo",k1:"base",p1:8,k2:"chrome"},strokeQuaternary:{op:"mixTransparent",ref:"base",percent:4},strokeFocused:{op:"ref",ref:"focus",fadePercent:15},strokeHighContrast:{op:"mixTransparent",ref:"base",percent:0},shadowPrimary:{op:"mixBlack",blackPercent:20},shadowSecondary:{op:"mixTransparent",ref:"shadowPrimary",percent:60},shadowTertiary:{op:"mixTransparent",ref:"shadowPrimary",percent:30},shadowWorkbench:{op:"shadow",candidates:[{x:0,y:0,blur:8,spread:2,primaryMixPercent:40}]},boxShadowSm:{op:"shadow",candidates:[{x:0,y:2,blur:8,spread:0,shadowToken:"shadowSecondary"}]},boxShadowBase:{op:"shadow",candidates:[{x:0,y:0,blur:8,spread:2,shadowToken:"shadowPrimary"}]},boxShadowSoft:{op:"shadow",candidates:[{x:0,y:0,blur:8,spread:2,shadowToken:"shadowTertiary"}]},boxShadowPopup:{op:"shadow",candidates:[{x:0,y:3,blur:8,spread:0,shadowToken:"shadowSecondary"},{x:0,y:2,blur:5,spread:0,shadowToken:"shadowSecondary"},{x:0,y:1,blur:1,spread:0,shadowToken:"shadowSecondary"}]},boxShadowLg:{op:"shadow",candidates:[{inset:!0,x:0,y:0,blur:4,spread:0,literalColor:"oklch(1 0 0 / 0.05)"},{x:0,y:0,blur:3,spread:0,shadowToken:"shadowSecondary"},{x:0,y:16,blur:24,spread:0,shadowToken:"shadowTertiary"}]},boxShadowXl:{op:"shadow",candidates:[{inset:!0,x:0,y:0,blur:4,spread:0,literalColor:"oklch(1 0 0 / 0.05)"},{x:0,y:0,blur:6,spread:8,shadowToken:"shadowSecondary"},{x:0,y:24,blur:16,spread:6,shadowToken:"shadowTertiary"}]},buttonDangerBackground:{op:"ref",ref:"bgDangerPrimary"},buttonDangerForeground:{op:"ref",ref:"textInvert"},buttonDangerHoverBackground:{op:"mixBlackRef",ref:"danger",colorPercent:85},buttonDangerActiveBackground:{op:"ref",ref:"buttonDangerHoverBackground"},buttonDangerSoftBackground:{op:"ref",ref:"bgDangerQuaternary"},buttonDangerSoftHoverBackground:{op:"ref",ref:"bgDangerTertiary"},controlDisabledBackground:{op:"ref",ref:"bgQuinary"},controlDisabledBorder:{op:"ref",ref:"strokeTertiary"},controlDisabledForeground:{op:"ref",ref:"textQuaternary"},buttonPrimaryBackground:{op:"ref",ref:"bgAccent"},buttonPrimaryForeground:{op:"ref",ref:"actionLabel"},buttonPrimaryHoverBackground:{op:"ref",ref:"bgAccentHover"},buttonPrimaryActiveBackground:{op:"ref",ref:"buttonPrimaryHoverBackground"},buttonSecondaryBackground:{op:"ref",ref:"bgTertiary"},buttonSecondaryForeground:{op:"ref",ref:"textPrimary"},buttonSecondaryHoverBackground:{op:"ref",ref:"bgSecondary"},buttonSuccessBackground:{op:"ref",ref:"bgSuccessPrimary"},buttonSuccessForeground:{op:"ref",ref:"textInvert"},buttonSuccessHoverBackground:{op:"mixWhiteRef",ref:"success",colorPercent:85},buttonSuccessActiveBackground:{op:"ref",ref:"buttonSuccessHoverBackground"},buttonSuccessSoftBackground:{op:"ref",ref:"bgSuccessQuaternary"},buttonSuccessSoftHoverBackground:{op:"ref",ref:"bgSuccessTertiary"},buttonWarningBackground:{op:"ref",ref:"bgWarningPrimary"},buttonWarningForeground:{op:"ref",ref:"textInvert"},buttonWarningHoverBackground:{op:"mixTwoOklab",k1:"base",p1:10,k2:"warn"},buttonWarningActiveBackground:{op:"ref",ref:"buttonWarningHoverBackground"},buttonWarningSoftBackground:{op:"ref",ref:"bgWarningQuaternary"},buttonWarningSoftHoverBackground:{op:"ref",ref:"bgWarningTertiary"},titlebarActiveForeground:{op:"ref",ref:"textSecondary"},titlebarInactiveForeground:{op:"ref",ref:"textTertiary"},commandCenterForeground:{op:"ref",ref:"textSecondary"},commandCenterBackground:{op:"ref",ref:"bgTertiary"},commandCenterBorder:{op:"ref",ref:"strokeSecondary"},commandCenterActiveForeground:{op:"ref",ref:"textSecondary"},commandCenterActiveBorder:{op:"ref",ref:"strokePrimary"},commandCenterActiveBackground:{op:"ref",ref:"bgSecondary"},commandCenterInactiveForeground:{op:"ref",ref:"textTertiary"},commandCenterInactiveBorder:{op:"ref",ref:"strokeSecondary"},terminalBackground:{op:"ref",ref:"chrome"},terminalForeground:{op:"ref",ref:"textPrimary"},terminalSelectionBackground:{op:"mixTransparent",ref:"base",percent:12},scrollbarThumbBackground:{op:"mixTransparentOverlay",ref:"base",percent:14},scrollbarThumbHoverBackground:{op:"mixTransparentOverlay",ref:"base",percent:22},scrollbarThumbActiveBackground:{op:"mixTransparentOverlay",ref:"base",percent:26},scrollbarShadow:{op:"ref",ref:"shadowPrimary"},progressBarBackground:{op:"ref",ref:"accent"},toolbarHoverBackground:{op:"ref",ref:"bgTertiary"},inputBorder:{op:"ref",ref:"strokeSecondary"},inputPlaceholderForeground:{op:"ref",ref:"textQuaternary"},editorForeground:{op:"ref",ref:"textPrimary"},editorLineHighlightBackground:{op:"mixTransparent",ref:"base",percent:8},editorLineNumberForeground:{op:"ref",ref:"textTertiary"},editorLineNumberActiveForeground:{op:"ref",ref:"textPrimary"},editorCursorForeground:{op:"ref",ref:"textPrimary"},editorSelectionBackground:{op:"mixTransparent",ref:"accent",percent:42},editorInactiveSelectionBackground:{op:"mixTransparent",ref:"accent",percent:30},editorSelectionHighlightBackground:{op:"mixTransparentAlpha",key:"accent",percent:32,alpha:128/255},editorWidgetBackground:{op:"ref",ref:"bgElevated"},editorWidgetBorder:{op:"ref",ref:"strokeSecondary"},editorWidgetForeground:{op:"ref",ref:"textPrimary"},editorGutterBackground:{op:"ref",ref:"editor"},editorWhitespaceForeground:{op:"mixTransparent",ref:"base",percent:22},editorBracketMatchBackground:{op:"mixTransparent",ref:"success",percent:22},editorBracketMatchBorder:{op:"mixTransparent",ref:"base",percent:52},editorIndentGuideBackground:{op:"mixTransparent",ref:"base",percent:22},editorIndentGuideActiveBackground:{op:"mixTransparent",ref:"base",percent:40},editorFindMatchBackground:{op:"mixTransparent",ref:"warn",percent:72},editorFindMatchHighlightBackground:{op:"mixTransparentOverlay",ref:"warn",percent:32},textCodeBlockBackground:{op:"ref",ref:"bgElevated"},textLinkActive:{op:"ref",ref:"accent"}},qR={textPrimary:{op:"ref",ref:"base"},textSecondary:{op:"mixTransparent",ref:"base",percent:84},textTertiary:{op:"mixTransparent",ref:"base",percent:72},textQuaternary:{op:"mixTransparent",ref:"base",percent:60},textGitAddedSecondary:{op:"mixTransparent",ref:"added",percent:88},textGitAddedTertiary:{op:"mixTransparent",ref:"added",percent:76},textGitAddedQuaternary:{op:"mixTransparent",ref:"added",percent:64},textGitModifiedSecondary:{op:"mixTransparent",ref:"modified",percent:88},textGitModifiedTertiary:{op:"mixTransparent",ref:"modified",percent:76},textGitModifiedQuaternary:{op:"mixTransparent",ref:"modified",percent:64},textGitRemovedSecondary:{op:"mixTransparent",ref:"removed",percent:88},textGitRemovedTertiary:{op:"mixTransparent",ref:"removed",percent:76},textGitRemovedQuaternary:{op:"mixTransparent",ref:"removed",percent:64},textGitUntrackedSecondary:{op:"mixTransparent",ref:"untracked",percent:88},textGitUntrackedTertiary:{op:"mixTransparent",ref:"untracked",percent:76},textGitUntrackedQuaternary:{op:"mixTransparent",ref:"untracked",percent:64},textRedSecondary:{op:"mixTransparent",ref:"red",percent:88},textYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:88},textGreenSecondary:{op:"mixTransparent",ref:"green",percent:88},textMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:88},textPurpleSecondary:{op:"mixTransparent",ref:"purple",percent:88},textCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:88},textBlueSecondary:{op:"mixTransparent",ref:"blue",percent:88},textOrangeSecondary:{op:"mixTransparent",ref:"orange",percent:88},textAccentSecondary:{op:"mixTransparent",ref:"accent",percent:88},iconGitAddedSecondary:{op:"mixTransparent",ref:"added",percent:80},iconGitAddedTertiary:{op:"mixTransparent",ref:"added",percent:68},iconGitAddedQuaternary:{op:"mixTransparent",ref:"added",percent:56},iconGitModifiedSecondary:{op:"mixTransparent",ref:"modified",percent:80},iconGitModifiedTertiary:{op:"mixTransparent",ref:"modified",percent:68},iconGitModifiedQuaternary:{op:"mixTransparent",ref:"modified",percent:56},iconGitRemovedSecondary:{op:"mixTransparent",ref:"removed",percent:80},iconGitRemovedTertiary:{op:"mixTransparent",ref:"removed",percent:68},iconGitRemovedQuaternary:{op:"mixTransparent",ref:"removed",percent:56},iconGitUntrackedSecondary:{op:"mixTransparent",ref:"untracked",percent:80},iconGitUntrackedTertiary:{op:"mixTransparent",ref:"untracked",percent:68},iconGitUntrackedQuaternary:{op:"mixTransparent",ref:"untracked",percent:56},iconRedSecondary:{op:"mixTransparent",ref:"red",percent:80},iconYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:80},iconGreenSecondary:{op:"mixTransparent",ref:"green",percent:80},iconMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:80},iconPurpleSecondary:{op:"mixTransparent",ref:"purple",percent:80},iconCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:80},iconBlueSecondary:{op:"mixTransparent",ref:"blue",percent:80},iconOrangeSecondary:{op:"mixTransparent",ref:"orange",percent:80},iconAccentSecondary:{op:"mixTransparent",ref:"accent",percent:80},iconPrimary:{op:"ref",ref:"base"},iconSecondary:{op:"mixTransparent",ref:"base",percent:76},iconTertiary:{op:"mixTransparent",ref:"base",percent:64},iconQuaternary:{op:"mixTransparent",ref:"base",percent:52},bgPrimary:{op:"mixTransparent",ref:"base",percent:36},bgSecondary:{op:"mixTransparent",ref:"base",percent:24},bgTertiary:{op:"mixTransparent",ref:"base",percent:14},bgQuaternary:{op:"mixTransparent",ref:"base",percent:8},bgQuinary:{op:"mixTransparent",ref:"base",percent:5},bgInputField:{op:"ref",ref:"bgInput"},bgInputSurface:{op:"ref",ref:"bgInput"},bgYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:24},bgRedSecondary:{op:"mixTransparent",ref:"red",percent:24},bgGreenSecondary:{op:"mixTransparent",ref:"green",percent:24},bgMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:24},bgCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:24},bgBlueSecondary:{op:"mixTransparent",ref:"blue",percent:24},strokePrimary:{op:"mixTransparent",ref:"base",percent:48},strokeSecondary:{op:"mixTransparent",ref:"base",percent:36},strokeTertiary:{op:"mixTransparent",ref:"base",percent:28},strokeTertiaryOpaque:{op:"mixTwo",k1:"base",p1:28,k2:"chrome"},strokeQuaternary:{op:"mixTransparent",ref:"base",percent:20},strokeGitAdded:{op:"mixTransparent",ref:"added",percent:80},strokeGitAddedSecondary:{op:"mixTransparent",ref:"added",percent:56},strokeGitModified:{op:"mixTransparent",ref:"modified",percent:80},strokeGitModifiedSecondary:{op:"mixTransparent",ref:"modified",percent:56},strokeGitRemoved:{op:"mixTransparent",ref:"removed",percent:80},strokeGitRemovedSecondary:{op:"mixTransparent",ref:"removed",percent:56},strokeGitUntracked:{op:"mixTransparent",ref:"untracked",percent:80},strokeGitUntrackedSecondary:{op:"mixTransparent",ref:"untracked",percent:56},strokeAccent:{op:"mixTransparent",ref:"accent",percent:80},strokeAccentSecondary:{op:"mixTransparent",ref:"accent",percent:56},strokeRedPrimary:{op:"mixTransparent",ref:"red",percent:80},strokeRedSecondary:{op:"mixTransparent",ref:"red",percent:56},strokeYellowPrimary:{op:"mixTransparent",ref:"yellow",percent:80},strokeYellowSecondary:{op:"mixTransparent",ref:"yellow",percent:56},strokeGreenPrimary:{op:"mixTransparent",ref:"green",percent:80},strokeGreenSecondary:{op:"mixTransparent",ref:"green",percent:56},strokeMagentaPrimary:{op:"mixTransparent",ref:"magenta",percent:80},strokeMagentaSecondary:{op:"mixTransparent",ref:"magenta",percent:56},strokeCyanPrimary:{op:"mixTransparent",ref:"cyan",percent:80},strokeCyanSecondary:{op:"mixTransparent",ref:"cyan",percent:56},strokeBluePrimary:{op:"mixTransparent",ref:"blue",percent:80},strokeBlueSecondary:{op:"mixTransparent",ref:"blue",percent:56},strokeFocused:{op:"ref",ref:"focus",fadePercent:100},strokeHighContrast:{op:"mixTransparent",ref:"base",percent:36},textRedTertiary:{op:"mixTransparent",ref:"red",percent:76},textOrangeTertiary:{op:"mixTransparent",ref:"orange",percent:76},textYellowTertiary:{op:"mixTransparent",ref:"yellow",percent:76},textGreenTertiary:{op:"mixTransparent",ref:"green",percent:76},textCyanTertiary:{op:"mixTransparent",ref:"cyan",percent:76},textBlueTertiary:{op:"mixTransparent",ref:"blue",percent:76},textMagentaTertiary:{op:"mixTransparent",ref:"magenta",percent:76},textPurpleTertiary:{op:"mixTransparent",ref:"purple",percent:76},textAccentTertiary:{op:"mixTransparent",ref:"accent",percent:76},textRedQuaternary:{op:"mixTransparent",ref:"red",percent:64},textOrangeQuaternary:{op:"mixTransparent",ref:"orange",percent:64},textYellowQuaternary:{op:"mixTransparent",ref:"yellow",percent:64},textGreenQuaternary:{op:"mixTransparent",ref:"green",percent:64},textCyanQuaternary:{op:"mixTransparent",ref:"cyan",percent:64},textBlueQuaternary:{op:"mixTransparent",ref:"blue",percent:64},textMagentaQuaternary:{op:"mixTransparent",ref:"magenta",percent:64},textPurpleQuaternary:{op:"mixTransparent",ref:"purple",percent:64},textAccentQuaternary:{op:"mixTransparent",ref:"accent",percent:64},iconRedTertiary:{op:"mixTransparent",ref:"red",percent:68},iconOrangeTertiary:{op:"mixTransparent",ref:"orange",percent:68},iconYellowTertiary:{op:"mixTransparent",ref:"yellow",percent:68},iconGreenTertiary:{op:"mixTransparent",ref:"green",percent:68},iconCyanTertiary:{op:"mixTransparent",ref:"cyan",percent:68},iconBlueTertiary:{op:"mixTransparent",ref:"blue",percent:68},iconMagentaTertiary:{op:"mixTransparent",ref:"magenta",percent:68},iconPurpleTertiary:{op:"mixTransparent",ref:"purple",percent:68},iconAccentTertiary:{op:"mixTransparent",ref:"accent",percent:68},iconRedQuaternary:{op:"mixTransparent",ref:"red",percent:56},iconOrangeQuaternary:{op:"mixTransparent",ref:"orange",percent:56},iconYellowQuaternary:{op:"mixTransparent",ref:"yellow",percent:56},iconGreenQuaternary:{op:"mixTransparent",ref:"green",percent:56},iconCyanQuaternary:{op:"mixTransparent",ref:"cyan",percent:56},iconBlueQuaternary:{op:"mixTransparent",ref:"blue",percent:56},iconMagentaQuaternary:{op:"mixTransparent",ref:"magenta",percent:56},iconPurpleQuaternary:{op:"mixTransparent",ref:"purple",percent:56},iconAccentQuaternary:{op:"mixTransparent",ref:"accent",percent:56},strokePurplePrimary:{op:"mixTransparent",ref:"purple",percent:80},strokePurpleSecondary:{op:"mixTransparent",ref:"purple",percent:56},strokeRedTertiary:{op:"mixTransparent",ref:"red",percent:40},strokeOrangeTertiary:{op:"mixTransparent",ref:"orange",percent:40},strokeYellowTertiary:{op:"mixTransparent",ref:"yellow",percent:40},strokeGreenTertiary:{op:"mixTransparent",ref:"green",percent:40},strokeCyanTertiary:{op:"mixTransparent",ref:"cyan",percent:40},strokeBlueTertiary:{op:"mixTransparent",ref:"blue",percent:40},strokeMagentaTertiary:{op:"mixTransparent",ref:"magenta",percent:40},strokePurpleTertiary:{op:"mixTransparent",ref:"purple",percent:40},strokeAccentTertiary:{op:"mixTransparent",ref:"accent",percent:40},strokeRedQuaternary:{op:"mixTransparent",ref:"red",percent:28},strokeOrangeQuaternary:{op:"mixTransparent",ref:"orange",percent:28},strokeYellowQuaternary:{op:"mixTransparent",ref:"yellow",percent:28},strokeGreenQuaternary:{op:"mixTransparent",ref:"green",percent:28},strokeCyanQuaternary:{op:"mixTransparent",ref:"cyan",percent:28},strokeBlueQuaternary:{op:"mixTransparent",ref:"blue",percent:28},strokeMagentaQuaternary:{op:"mixTransparent",ref:"magenta",percent:28},strokePurpleQuaternary:{op:"mixTransparent",ref:"purple",percent:28},strokeAccentQuaternary:{op:"mixTransparent",ref:"accent",percent:28}},use={light:{shadowPrimary:{op:"mixBlack",blackPercent:6},boxShadowPopup:{op:"shadow",candidates:[{x:0,y:6,blur:18,spread:0,literalColor:"lch(0% 0 0 / 0.02)"},{x:0,y:3,blur:9,spread:0,literalColor:"lch(0% 0 0 / 0.04)"},{x:0,y:1,blur:1,spread:0,literalColor:"lch(0% 0 0 / 0.04)"}]}},dark:{...Ny("dark")},lightHighContrast:{...Ny("lightHighContrast"),...qR},darkHighContrast:{...Ny("darkHighContrast"),...qR}};function Qr(e){return`var(--cursor-${Xc(e)})`}function cse(e){const t=e.inset?"inset ":"",n=`${e.x}px ${e.y}px ${e.blur}px ${e.spread}px`;return"literalColor"in e?`${t}${n} ${e.literalColor}`:"shadowToken"in e?`${t}${n} ${Qr(e.shadowToken)}`:`${t}${n} color-mix(in srgb, ${Qr("shadowPrimary")} ${e.primaryMixPercent}%, transparent)`}function fse(e){return e.map(t=>cse(t)).join(", ")}function dse(e){switch(e.op){case"mixTransparent":case"mixTransparentOverlay":return`color-mix(in srgb, ${Qr(e.ref)} ${e.percent}%, transparent)`;case"mixTwo":return`color-mix(in srgb, ${Qr(e.k1)} ${e.p1}%, ${Qr(e.k2)})`;case"mixTwoOklab":return`color-mix(in oklab, ${Qr(e.k1)} ${e.p1}%, ${Qr(e.k2)})`;case"mixWhiteRef":return`color-mix(in srgb, ${Qr(e.ref)} ${e.colorPercent}%, white)`;case"mixBlackRef":return`color-mix(in srgb, ${Qr(e.ref)} ${e.colorPercent}%, black)`;case"mixBlackChrome":return`color-mix(in srgb, oklch(0 0 0) ${e.blackPercent}%, ${Qr("chrome")})`;case"mixBlack":return`color-mix(in srgb, oklch(0 0 0) ${e.blackPercent}%, transparent)`;case"mixWhite":return`color-mix(in srgb, oklch(1 0 0) ${e.whitePercent}%, transparent)`;case"ref":return e.fadePercent!==void 0?`color-mix(in srgb, ${Qr(e.ref)} ${e.fadePercent}%, transparent)`:Qr(e.ref);case"shadow":return fse(e.candidates);case"mixTransparentAlpha":return`color-mix(in srgb, ${Qr(e.key)} ${e.percent}%, transparent)`;default:return e}}function pse(e){const t=use[e];return Object.entries(lse).map(([n,r])=>({name:Xc(n),expr:t[n]??r}))}function hse(e){const t=pse(e),n=[];for(const{name:r,expr:s}of t)n.push(` --cursor-${r}: ${dse(s)};`);return n}function mse(e){const t=Bie(e),n=zie(t," "),r=Fie(e),s=hse(r).join(`
63
+ `);return`:root {
64
+ ${n.join(`
65
+ `)}
66
+ }
67
+ :root {
68
+ ${s}
69
+ }`}const Dv={fontFamily:Xb.fontFamily,scrollbar:Xb.scrollbar,syntax:Xb.syntax},gse=[{key:"fontFamily",cssMid:"font-family"},{key:"scrollbar",cssMid:"scrollbar"},{key:"syntax",cssMid:"syntax"}];function bse(e,t){const n=Xc(t.replace(/\./g,"-"));return`--cursor-${e}-${n}`}function ys(e,t,n,r=""){for(const[s,a]of Object.entries(t)){const l=typeof a=="number"?`${a}${r}`:a;n.push(` ${bse(e,s)}: ${l};`)}}function yse(e={}){const t=e.selector??":root",n=e.theme??Dv,r=[`${t} {`];for(const{key:s,cssMid:a}of gse)for(const[l,c]of Object.entries(n[s]))r.push(` --cursor-${a}-${Xc(l)}: ${c};`);return ys("duration",Yy,r,"ms"),ys("easing",gO,r),ys("spacing",z5,r,"px"),ys("radius",P5,r,"px"),ys("height",$5,r,"px"),ys("font-size",B5,r,"px"),ys("line-height",F5,r,"px"),ys("letter-spacing",U5,r,"px"),ys("elevation",j5,r),r.push("}"),r.join(`
70
+ `)}function vse(e){const t=mse(e.core),n=yse(e.nonColor);return`${t}
71
+ ${n}`}function xse(e){if(!e)return"default";const t=e.toLowerCase().replace(/_/g,"-");return t==="ja"||t.startsWith("ja-")?"ja":t==="ko"||t.startsWith("ko-")?"ko":t==="zh-tw"||t==="zh-hk"||t==="zh-mo"||t.includes("hant")?"zh-Hant":t==="zh"||t.startsWith("zh-")?"zh-Hans":"default"}function kse(e,t){switch(e){case"mac":switch(t){case"zh-Hans":return'-apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif';case"zh-Hant":return'-apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif';case"ja":return'-apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif';case"ko":return'-apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Nanum Gothic", "AppleGothic", sans-serif';default:return"-apple-system, BlinkMacSystemFont, sans-serif"}case"windows":switch(t){case"zh-Hans":return'"Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif';case"zh-Hant":return'"Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif';case"ja":return'"Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif';case"ko":return'"Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif';default:return'"Segoe WPC", "Segoe UI", sans-serif'}case"linux":switch(t){case"zh-Hans":return'system-ui, "Ubuntu", "Droid Sans", "Source Han Sans SC", "Source Han Sans CN", "Source Han Sans", sans-serif';case"zh-Hant":return'system-ui, "Ubuntu", "Droid Sans", "Source Han Sans TC", "Source Han Sans TW", "Source Han Sans", sans-serif';case"ja":return'system-ui, "Ubuntu", "Droid Sans", "Source Han Sans J", "Source Han Sans JP", "Source Han Sans", sans-serif';case"ko":return'system-ui, "Ubuntu", "Droid Sans", "Source Han Sans K", "Source Han Sans JR", "Source Han Sans", "UnDotum", "FBaekmuk Gulim", sans-serif';default:return'system-ui, "Ubuntu", "Droid Sans", sans-serif'}default:return e}}function Sse(e,t){const n=`${e} ${t}`.toLowerCase();return n.includes("mac")?"mac":n.includes("win")?"windows":"linux"}function wse(e){return kse(e.platform,xse(e.locale))}function Ese(e){switch(e){case"mac":return'"SF Mono", Monaco, Menlo, Courier, monospace';case"windows":return'Consolas, "Courier New", monospace';case"linux":return'"Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace';default:return e}}const HR="agent-serve-cursor-theme",w2="agent-serve.playground.theme";function E2(){try{return localStorage.getItem(w2)}catch{return null}}function Tse(){return typeof window>"u"||typeof window.matchMedia!="function"?!0:window.matchMedia("(prefers-color-scheme: dark)").matches}function Cse(e=typeof window<"u"?window.location.search:"",t={}){const n=new URLSearchParams(e).get("theme");if(n==="light"||n==="dark")return n;const r=t.stored!==void 0?t.stored:E2();return r==="light"||r==="dark"?r:(t.prefersDark!==void 0?t.prefersDark:Tse())?"dark":"light"}function Lv(e){const t=document.documentElement;t.dataset.theme=e==="light"?"cursor-light":"cursor-dark",t.style.colorScheme=e;const n=Sse(navigator.userAgent,navigator.platform),r=vse({core:e==="light"?$ie:Pie,nonColor:{theme:{...Dv,fontFamily:{...Dv.fontFamily,sans:wse({platform:n,locale:navigator.language}),mono:Ese(n)}}}});let s=document.getElementById(HR);s==null&&(s=document.createElement("style"),s.id=HR,document.head.appendChild(s)),s.textContent=r}function Rse(){return document.documentElement.dataset.theme==="cursor-light"?"light":"dark"}function _se(e){try{localStorage.setItem(w2,e)}catch{}try{const t=new URL(window.location.href);t.searchParams.set("theme",e),history.replaceState(null,"",t.toString())}catch{}Lv(e)}function Ase(e=window.location.search){if(Lv(Cse(e)),typeof window.matchMedia!="function")return()=>{};const t=window.matchMedia("(prefers-color-scheme: dark)"),n=()=>{const r=new URLSearchParams(window.location.search).get("theme");if(r==="light"||r==="dark")return;const s=E2();s==="light"||s==="dark"||Lv(t.matches?"dark":"light")};return t.addEventListener("change",n),()=>t.removeEventListener("change",n)}function Nse(e){const t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]}),()=>t.disconnect()}function Ose(){return v.useSyncExternalStore(Nse,Rse,()=>"dark")}function VR({title:e="Playground",onNewChat:t}){const n=Ose(),r=Ue(s=>s.chatPanelOpen);return g.jsxs("header",{className:"pg-overview-header",children:[g.jsxs("div",{className:"pg-overview-header__start",children:[g.jsx("div",{className:"pg-overview-header__title",children:e}),g.jsx(br,{icon:n==="dark"?"sun":"moon",size:"lg","aria-label":n==="dark"?"Switch to light theme":"Switch to dark theme",onClick:()=>_se(n==="dark"?"light":"dark")})]}),g.jsxs("div",{className:"pg-overview-header__actions",children:[t?g.jsx(yn,{variant:"primary",tone:"monochrome",size:"lg",title:"New chat",onClick:t,children:"New Chat"}):null,g.jsx("span",{className:"pg-overview-header__panel-toggle",children:g.jsx(v7,{icon:"layout-sidebar-right",size:"lg","aria-label":r?"Close chat panel":"Open chat panel",pressed:r,onPressedChange:s=>Qe.setChatPanelOpen(s)})})]})]})}function Ise(){const e=Ue(t=>t.toast);return e?g.jsx("div",{className:"pg-toast",role:"status","aria-live":"polite",children:e}):null}const Mse=/\b([\w.-]+)\/([\w.-]+)#(\d+)\b/,Dse=/https?:\/\/(?:www\.)?github\.com\/([\w.-]+)\/([\w.-]+)\/pull\/(\d+)/i;function Lse(e){const t=zse(e.externalUrl),n=GR(e.prUrl)??GR(e.externalUrl)??jse(e.title);return{slack:t,github:n!==void 0&&n!==t?n:void 0}}function jse(e){const n=e.match(Dse)??e.match(Mse);if(n!==null)return`https://github.com/${n[1]}/${n[2]}/pull/${n[3]}`}function zse(e){if(!(e===null||e===""||!$se(e)||ZI(e)))return Pse(e)?e:void 0}function GR(e){if(!(e==null||e===""))return ZI(e)?e:void 0}function Pse(e){try{const t=new URL(e).hostname.toLowerCase();return t==="slack.com"||t.endsWith(".slack.com")}catch{return!1}}function $se(e){return e.startsWith("https://")||e.startsWith("http://")}const Bse=[{value:"overview",label:"Overview"},{value:"chat",label:"Chat"},{value:"trace",label:"Trace"},{value:"raw",label:"Raw"},{value:"evals",label:"Evals"},{value:"artifacts",label:"Artifacts"}],T2="(max-width: 640px)";function Fse(e){const t=window.matchMedia(T2);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function Use(){return v.useSyncExternalStore(Fse,()=>window.matchMedia(T2).matches)}function qse(){const e=Ue(_=>_.barTitle),t=Ue(_=>_.barId),n=Ue(_=>_.externalUrl),r=Ue(_=>_.current),s=Ue(_=>_.view),a=Ue(_=>_.authToken),l=Ue(_=>_.aliasHosted),c=Ue(_=>_.embedded),f=Ue(_=>_.evalNavReturn),d=Ue(_=>_.evalRun),h=Ue(_=>_.info),m=Use(),b=t2(Bse,h,s),y=r?.sessionId??null,k=f&&s!=="evals"&&d!==null,S=Lse({title:e,externalUrl:n,prUrl:r?.prUrl}),C=S.slack,E=S.github,T=async()=>{if(y)try{const _=await Qe.api.eventsText(y);if(!_.ok){Qe.toast(`Download failed (${_.status})`);return}const D=await _.blob(),A=URL.createObjectURL(D),I=document.createElement("a");I.href=A,I.download=`${y}.events.ndjson`,I.target="_self",document.body.appendChild(I),I.click(),I.remove(),URL.revokeObjectURL(A)}catch(_){Qe.toast(`Download failed: ${_ instanceof Error?_.message:String(_)}`)}},R=m?g.jsx(p7,{size:"md","aria-label":"Visualization mode",value:s,onValueChange:_=>Qe.setView(_??"overview"),options:b}):g.jsx(vc,{size:"sm",variant:"compact",value:s,onValueChange:_=>Qe.setView(_),"aria-label":"Visualization mode",children:b.map(_=>g.jsx(vc.Item,{value:_.value,children:_.label},_.value))});return g.jsxs("div",{className:"pg-topbar",children:[g.jsx(br,{icon:"arrow-left",size:"sm","aria-label":"Back to overview",onClick:()=>Qe.backToOverview()}),k?g.jsx(yn,{variant:"secondary",size:"sm",onClick:()=>Qe.backToEvals(),title:"Return to eval results",children:"← Back to Evals"}):null,g.jsx("span",{className:"session-title",children:e}),t?g.jsx("span",{className:"session-id",children:t}):null,c?null:g.jsxs(g.Fragment,{children:[C!==void 0?g.jsx(pa,{className:"tlink",href:C,title:"Open the Slack thread",children:"Open in Slack"}):null,E!==void 0?g.jsx(pa,{className:"tlink",href:E,title:"Open the GitHub pull request",children:"Open in GitHub"}):null,y?g.jsx(yn,{variant:"ghost",size:"sm",onClick:()=>{T()},title:"Download this session's event log",children:"Download"}):null]}),g.jsx("span",{className:"grow"}),R,c&&(y!==null||C!==void 0||E!==void 0)?g.jsxs(ei,{children:[g.jsx(ei.Trigger,{children:g.jsx(br,{icon:"dots-3-horizontal",size:"sm","aria-label":"More actions"})}),g.jsxs(ei.Content,{"aria-label":"Session actions",size:"sm",children:[C!==void 0?g.jsx(ei.Item,{onSelect:()=>window.open(C,"_blank","noopener,noreferrer"),children:"Open in Slack"}):null,E!==void 0?g.jsx(ei.Item,{onSelect:()=>window.open(E,"_blank","noopener,noreferrer"),children:"Open in GitHub"}):null,y!==null?g.jsx(ei.Item,{onSelect:()=>{T()},children:"Download event log"}):null]})]}):null,l?null:g.jsx("div",{className:"pg-token",children:g.jsx(rf,{type:"password",size:"md","aria-label":"Bearer token",placeholder:"Bearer token (optional)",value:a,onChange:_=>Qe.setAuthToken(_.target.value),title:"Sent as Authorization: Bearer ... on API calls"})})]})}const C2="(min-width: 1201px)";function Hse(e){const t=window.matchMedia(C2);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function Vse(){return window.matchMedia(C2).matches}function Gse(){return!0}function Wse(){return v.useSyncExternalStore(Hse,Vse,Gse)}function Kse(){const e=Ue(h=>h.view),t=Ue(h=>h.drawerOpen),n=Ue(h=>h.aliasHosted),r=Ue(h=>h.aliasToken),s=Ue(h=>h.embedded),a=Ue(h=>h.meta.readonly===!0),c=Ue(h=>h.capabilities.composer)==="enabled"&&Qe.hasCapability(wt.sessionStart),f=Wse();if(v.useEffect(()=>{Qe.boot()},[]),n&&r.trim()==="")return s?g.jsx(aW,{}):g.jsx(oW,{});const d=f||s;return g.jsxs("div",{className:"pg-app",children:[g.jsx("div",{className:"pg-main",children:d?g.jsxs("div",{className:"pg-overview-layout",children:[g.jsxs("div",{className:"pg-overview-main",children:[g.jsx(VR,{onNewChat:a||!c?void 0:()=>Qe.newChat()}),g.jsx("div",{className:"pg-overview-scroll",children:g.jsx(BR,{})})]}),g.jsx(Cie,{})]}):e==="overview"?g.jsxs("div",{className:"pg-overview-main",children:[g.jsx(VR,{onNewChat:a||!c?void 0:()=>Qe.newChat()}),g.jsx("div",{className:"pg-overview-scroll",children:g.jsx(BR,{})})]}):s?g.jsxs(g.Fragment,{children:[g.jsx(qse,{}),g.jsxs("div",{className:"pg-columns",children:[e==="chat"?g.jsxs("div",{className:"pg-transcript-wrap",children:[g.jsx(ZD,{}),g.jsx(pM,{})]}):null,e==="trace"?g.jsx(wM,{}):null,e==="raw"?g.jsx(xM,{}):null,e==="evals"?g.jsx(bM,{}):null,e==="artifacts"?g.jsx(dM,{}):null]})]}):g.jsx(gre,{})}),t?g.jsx("button",{type:"button","aria-label":"Close agent surface",className:"pg-drawer-backdrop",onClick:()=>Qe.setDrawerOpen(!1)}):null,g.jsx(Sre,{}),g.jsx(Ise,{})]})}Ase();cW();const R2=document.getElementById("root");if(R2===null)throw new Error("Playground bootstrap failed: #root element is missing.");Bj.createRoot(R2).render(g.jsx(v.StrictMode,{children:g.jsx(Ms,{menuSize:"md",children:g.jsx(Kse,{})})}));