clawmini 0.0.7 → 0.0.9

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 (367) hide show
  1. package/.changeset/README.md +8 -0
  2. package/.changeset/config.json +14 -0
  3. package/.github/workflows/release.yml +49 -0
  4. package/CHANGELOG.md +36 -0
  5. package/README.md +5 -4
  6. package/dist/adapter-discord/index.d.mts.map +1 -1
  7. package/dist/adapter-discord/index.mjs +465 -282
  8. package/dist/adapter-discord/index.mjs.map +1 -1
  9. package/dist/adapter-google-chat/index.mjs +367 -243
  10. package/dist/adapter-google-chat/index.mjs.map +1 -1
  11. package/dist/cli/index.mjs +684 -24
  12. package/dist/cli/index.mjs.map +1 -1
  13. package/dist/cli/lite.mjs +43 -13
  14. package/dist/cli/lite.mjs.map +1 -1
  15. package/dist/cli/{propose-policy.mjs → manage-policies.mjs} +270 -47
  16. package/dist/cli/manage-policies.mjs.map +1 -0
  17. package/dist/cli/run-host.d.mts +1 -0
  18. package/dist/cli/run-host.mjs +3090 -0
  19. package/dist/cli/run-host.mjs.map +1 -0
  20. package/dist/config-CPFQIGdG.mjs +57 -0
  21. package/dist/config-CPFQIGdG.mjs.map +1 -0
  22. package/dist/config-Dvl-Pov4.mjs +76 -0
  23. package/dist/config-Dvl-Pov4.mjs.map +1 -0
  24. package/dist/daemon/index.d.mts.map +1 -1
  25. package/dist/daemon/index.mjs +970 -332
  26. package/dist/daemon/index.mjs.map +1 -1
  27. package/dist/supervisor-actions-CiW56eLi.mjs +843 -0
  28. package/dist/supervisor-actions-CiW56eLi.mjs.map +1 -0
  29. package/dist/turn-log-buffer-DRgW53gl.mjs +767 -0
  30. package/dist/turn-log-buffer-DRgW53gl.mjs.map +1 -0
  31. package/dist/web/_app/immutable/chunks/{Drm9vgeP.js → 3AZlWB6U.js} +1 -1
  32. package/dist/web/_app/immutable/chunks/BhRSsUCh.js +2 -0
  33. package/dist/web/_app/immutable/chunks/BiLeM2i1.js +1 -0
  34. package/{web/.svelte-kit/output/client/_app/immutable/chunks/CME08kGM.js → dist/web/_app/immutable/chunks/BmBj85Ll.js} +1 -1
  35. package/dist/web/_app/immutable/chunks/BrERcKAH.js +1 -0
  36. package/dist/web/_app/immutable/chunks/Bv9252RM.js +1 -0
  37. package/dist/web/_app/immutable/chunks/CIXNBPKi.js +1 -0
  38. package/dist/web/_app/immutable/chunks/DISKL3GN.js +2 -0
  39. package/dist/web/_app/immutable/chunks/{Zeh-C-mx.js → DcpaLzmX.js} +1 -1
  40. package/dist/web/_app/immutable/chunks/DnQ3vS13.js +1 -0
  41. package/dist/web/_app/immutable/chunks/KsloHTKS.js +1 -0
  42. package/{web/.svelte-kit/output/client/_app/immutable/chunks/Ck-be5J2.js → dist/web/_app/immutable/chunks/RsHsUj-8.js} +2 -2
  43. package/dist/web/_app/immutable/chunks/{G_zz-Gou.js → wpfV79dV.js} +1 -1
  44. package/dist/web/_app/immutable/entry/app.CIw1Qj0n.js +2 -0
  45. package/dist/web/_app/immutable/entry/start.Di0-Jhte.js +1 -0
  46. package/dist/web/_app/immutable/nodes/{0.CYS8iApT.js → 0.DYyUA1au.js} +1 -1
  47. package/dist/web/_app/immutable/nodes/1.D-3QEMMZ.js +1 -0
  48. package/dist/web/_app/immutable/nodes/{2.BnwnD1Ki.js → 2.4olHnH7U.js} +1 -1
  49. package/{web/.svelte-kit/output/client/_app/immutable/nodes/3.Dr0ot9sV.js → dist/web/_app/immutable/nodes/3.4w0bE-m2.js} +3 -3
  50. package/dist/web/_app/immutable/nodes/4.CZvjhVHt.js +60 -0
  51. package/dist/web/_app/immutable/nodes/{5.BBGQ_i84.js → 5.DLbPVJY2.js} +1 -1
  52. package/dist/web/_app/version.json +1 -1
  53. package/dist/web/index.html +12 -12
  54. package/dist/workspace-oWmVh5mi.mjs +1001 -0
  55. package/dist/workspace-oWmVh5mi.mjs.map +1 -0
  56. package/docs/23_adapter_slash_autocomplete/development_log.md +19 -0
  57. package/docs/23_adapter_slash_autocomplete/notes.md +18 -0
  58. package/docs/23_adapter_slash_autocomplete/prd.md +46 -0
  59. package/docs/23_adapter_slash_autocomplete/questions.md +6 -0
  60. package/docs/23_adapter_slash_autocomplete/tickets.md +21 -0
  61. package/docs/24_subagent_job_policy_fixes/development_log.md +22 -0
  62. package/docs/24_subagent_job_policy_fixes/notes.md +28 -0
  63. package/docs/24_subagent_job_policy_fixes/prd.md +59 -0
  64. package/docs/24_subagent_job_policy_fixes/questions.md +3 -0
  65. package/docs/24_subagent_job_policy_fixes/tickets.md +49 -0
  66. package/docs/25_e2e_test_improvements/development_log.md +30 -0
  67. package/docs/25_e2e_test_improvements/notes.md +29 -0
  68. package/docs/25_e2e_test_improvements/prd.md +43 -0
  69. package/docs/25_e2e_test_improvements/questions.md +12 -0
  70. package/docs/25_e2e_test_improvements/tickets-2.md +22 -0
  71. package/docs/25_e2e_test_improvements/tickets.md +22 -0
  72. package/docs/25_policy_cwd/development_log.md +30 -0
  73. package/docs/25_policy_cwd/notes.md +28 -0
  74. package/docs/25_policy_cwd/prd.md +77 -0
  75. package/docs/25_policy_cwd/questions.md +6 -0
  76. package/docs/25_policy_cwd/tickets.md +77 -0
  77. package/docs/CLI_REFERENCE.md +3 -1
  78. package/docs/PHILOSOPHY.md +35 -0
  79. package/docs/adapter-visibility/SPEC.md +461 -0
  80. package/docs/adapter-visibility/SPEC_v2.md +202 -0
  81. package/docs/auto-update/SPEC.md +344 -0
  82. package/docs/backups/SPEC.md +296 -0
  83. package/docs/backups/clawmini.gitignore +69 -0
  84. package/docs/guides/assets/clawmini-avatar.png +0 -0
  85. package/docs/guides/backups.md +332 -0
  86. package/docs/guides/discord_adapter_setup.md +1 -1
  87. package/docs/guides/google_chat_adapter_setup.md +81 -0
  88. package/docs/unified-startup/SPEC.md +203 -0
  89. package/e2e/_helpers/test-environment.test.ts +49 -0
  90. package/e2e/_helpers/test-environment.ts +548 -0
  91. package/e2e/adapters/_google-chat-fixtures.ts +340 -0
  92. package/{src/cli/e2e → e2e/adapters}/adapter-discord.test.ts +22 -23
  93. package/e2e/adapters/adapter-google-chat-downtime.test.ts +157 -0
  94. package/e2e/adapters/adapter-google-chat-inbound.test.ts +697 -0
  95. package/e2e/adapters/adapter-google-chat-outbound.test.ts +297 -0
  96. package/e2e/adapters/adapter-google-chat-roundtrip.test.ts +56 -0
  97. package/e2e/adapters/adapter-google-chat-threads.test.ts +1078 -0
  98. package/e2e/agents/custom-api-env.test.ts +80 -0
  99. package/e2e/agents/export-lite-func.test.ts +104 -0
  100. package/e2e/agents/fallbacks.test.ts +124 -0
  101. package/e2e/agents/interrupt.test.ts +50 -0
  102. package/e2e/agents/no-reply-necessary.test.ts +57 -0
  103. package/e2e/agents/session-timeout-subagents.test.ts +76 -0
  104. package/e2e/agents/subagent-authorization.test.ts +246 -0
  105. package/e2e/agents/subagent-env.test.ts +49 -0
  106. package/e2e/agents/subagent-lifecycle.test.ts +782 -0
  107. package/e2e/agents/subagents-depth.test.ts +47 -0
  108. package/e2e/cli/agents.test.ts +176 -0
  109. package/e2e/cli/auto-update.test.ts +741 -0
  110. package/e2e/cli/basic.test.ts +44 -0
  111. package/{src/cli/e2e → e2e/cli}/export-lite.test.ts +16 -12
  112. package/e2e/cli/init-gitignore.test.ts +86 -0
  113. package/e2e/cli/init.test.ts +76 -0
  114. package/e2e/cli/messages.test.ts +363 -0
  115. package/e2e/cli/serve.test.ts +76 -0
  116. package/{src/cli/e2e → e2e/cli}/skills.test.ts +11 -10
  117. package/{src/cli/e2e → e2e/daemon}/daemon.test.ts +57 -195
  118. package/e2e/jobs/agent-jobs.test.ts +216 -0
  119. package/e2e/jobs/cron.test.ts +64 -0
  120. package/e2e/jobs/restart.test.ts +108 -0
  121. package/e2e/policies/approval-session.test.ts +69 -0
  122. package/e2e/policies/auto-create-policies-file.test.ts +35 -0
  123. package/e2e/policies/builtin-manage-policies.test.ts +184 -0
  124. package/e2e/policies/builtin-run-host.test.ts +180 -0
  125. package/e2e/policies/environment-policies.test.ts +177 -0
  126. package/e2e/policies/manage-policies.test.ts +566 -0
  127. package/e2e/policies/output-size.test.ts +98 -0
  128. package/e2e/policies/policies-context-cwd.test.ts +160 -0
  129. package/e2e/policies/relative-script-path.test.ts +60 -0
  130. package/e2e/policies/requests-show.test.ts +135 -0
  131. package/e2e/policies/requests.test.ts +208 -0
  132. package/e2e/policies/slash-policies.test.ts +308 -0
  133. package/e2e/policies/startup-cleanup.test.ts +48 -0
  134. package/e2e/routers/session-timeout.test.ts +106 -0
  135. package/e2e/routers/slash-model.test.ts +152 -0
  136. package/e2e/routers/slash-new.test.ts +50 -0
  137. package/e2e/routers/slash-restart-adapter.test.ts +96 -0
  138. package/e2e/routers/slash-restart.test.ts +114 -0
  139. package/e2e/routers/slash-shutdown.test.ts +55 -0
  140. package/e2e/routers/slash-stop.test.ts +232 -0
  141. package/e2e/routers/slash-upgrade.test.ts +88 -0
  142. package/{src/cli/e2e → e2e/sandbox}/environments.test.ts +14 -13
  143. package/eslint.config.js +6 -0
  144. package/napkin.md +1 -1
  145. package/package.json +8 -3
  146. package/src/adapter-discord/commands.test.ts +42 -0
  147. package/src/adapter-discord/commands.ts +33 -0
  148. package/src/adapter-discord/config.ts +12 -0
  149. package/src/adapter-discord/forwarder.test.ts +499 -21
  150. package/src/adapter-discord/forwarder.ts +343 -124
  151. package/src/adapter-discord/inbound-cache.test.ts +47 -0
  152. package/src/adapter-discord/inbound-cache.ts +37 -0
  153. package/src/adapter-discord/index.test.ts +67 -2
  154. package/src/adapter-discord/index.ts +84 -216
  155. package/src/adapter-discord/interactions.test.ts +54 -3
  156. package/src/adapter-discord/interactions.ts +97 -53
  157. package/src/adapter-discord/processMessage.ts +239 -0
  158. package/src/adapter-discord/state.ts +1 -0
  159. package/src/adapter-google-chat/auth.test.ts +9 -5
  160. package/src/adapter-google-chat/auth.ts +29 -23
  161. package/src/adapter-google-chat/cards.ts +7 -2
  162. package/src/adapter-google-chat/client.test.ts +37 -2
  163. package/src/adapter-google-chat/client.ts +138 -38
  164. package/src/adapter-google-chat/config.ts +19 -0
  165. package/src/adapter-google-chat/forwarder.test.ts +81 -56
  166. package/src/adapter-google-chat/forwarder.ts +394 -185
  167. package/src/adapter-google-chat/inbound-cache.test.ts +61 -0
  168. package/src/adapter-google-chat/inbound-cache.ts +36 -0
  169. package/src/adapter-google-chat/state.test.ts +1 -0
  170. package/src/adapter-google-chat/state.ts +9 -1
  171. package/src/adapter-google-chat/subscriptions.ts +8 -6
  172. package/src/cli/builtin-policies.ts +44 -0
  173. package/src/cli/commands/agents.ts +59 -5
  174. package/src/cli/commands/down.ts +54 -2
  175. package/src/cli/commands/environments.ts +8 -2
  176. package/src/cli/commands/init.ts +31 -0
  177. package/src/cli/commands/logs.ts +116 -0
  178. package/src/cli/commands/policies.ts +6 -4
  179. package/src/cli/commands/serve.test.ts +67 -0
  180. package/src/cli/commands/serve.ts +284 -0
  181. package/src/cli/commands/up.ts +122 -2
  182. package/src/cli/commands/web-api/agents.ts +3 -2
  183. package/src/cli/index.ts +4 -0
  184. package/src/cli/install-detection.test.ts +72 -0
  185. package/src/cli/install-detection.ts +48 -0
  186. package/src/cli/lite.ts +54 -22
  187. package/src/cli/manage-policies-utils.ts +104 -0
  188. package/src/cli/manage-policies.ts +291 -0
  189. package/src/cli/run-host.ts +45 -0
  190. package/src/cli/supervisor-actions.ts +267 -0
  191. package/src/cli/supervisor-control.test.ts +129 -0
  192. package/src/cli/supervisor-control.ts +155 -0
  193. package/src/cli/supervisor-pid.ts +68 -0
  194. package/src/cli/supervisor.ts +277 -0
  195. package/src/daemon/agent/agent-context.ts +11 -11
  196. package/src/daemon/agent/agent-session.ts +8 -1
  197. package/src/daemon/agent/chat-logger.test.ts +78 -9
  198. package/src/daemon/agent/chat-logger.ts +25 -5
  199. package/src/daemon/agent/turn-registry.test.ts +89 -0
  200. package/src/daemon/agent/turn-registry.ts +94 -0
  201. package/src/daemon/agent/types.ts +2 -0
  202. package/src/daemon/api/agent-policy-endpoints.ts +263 -0
  203. package/src/daemon/api/agent-router.ts +47 -126
  204. package/src/daemon/api/index.test.ts +1 -0
  205. package/src/daemon/api/policy-request.test.ts +7 -5
  206. package/src/daemon/api/router-utils.ts +6 -5
  207. package/src/daemon/api/subagent-router.ts +110 -74
  208. package/src/daemon/api/subagent-utils.test.ts +60 -0
  209. package/src/daemon/api/subagent-utils.ts +113 -87
  210. package/src/daemon/api/user-router.ts +34 -8
  211. package/src/daemon/auth.ts +1 -0
  212. package/src/daemon/cron.test.ts +62 -4
  213. package/src/daemon/cron.ts +42 -16
  214. package/src/daemon/events.ts +65 -0
  215. package/src/daemon/index.ts +24 -1
  216. package/src/daemon/message-interruption.test.ts +1 -0
  217. package/src/daemon/message-jobs.test.ts +1 -0
  218. package/src/daemon/message.ts +78 -14
  219. package/src/daemon/observation.test.ts +26 -18
  220. package/src/daemon/pending-replies.test.ts +112 -0
  221. package/src/daemon/pending-replies.ts +162 -0
  222. package/src/daemon/policy-request-service.ts +3 -1
  223. package/src/daemon/policy-utils.test.ts +66 -1
  224. package/src/daemon/policy-utils.ts +126 -1
  225. package/src/daemon/request-store.ts +31 -0
  226. package/src/daemon/routers/session-timeout.ts +4 -0
  227. package/src/daemon/routers/slash-model.test.ts +344 -0
  228. package/src/daemon/routers/slash-model.ts +207 -0
  229. package/src/daemon/routers/slash-policies.test.ts +38 -32
  230. package/src/daemon/routers/slash-policies.ts +84 -33
  231. package/src/daemon/routers/slash-restart.test.ts +69 -0
  232. package/src/daemon/routers/slash-restart.ts +36 -0
  233. package/src/daemon/routers/slash-shutdown.test.ts +50 -0
  234. package/src/daemon/routers/slash-shutdown.ts +28 -0
  235. package/src/daemon/routers/slash-upgrade.test.ts +116 -0
  236. package/src/daemon/routers/slash-upgrade.ts +76 -0
  237. package/src/daemon/routers/types.ts +7 -0
  238. package/src/daemon/routers.ts +16 -0
  239. package/src/shared/adapters/blockquote.test.ts +28 -0
  240. package/src/shared/adapters/blockquote.ts +20 -0
  241. package/src/shared/adapters/filtering.test.ts +224 -10
  242. package/src/shared/adapters/filtering.ts +95 -7
  243. package/src/shared/adapters/inbound-cache.test.ts +48 -0
  244. package/src/shared/adapters/inbound-cache.ts +54 -0
  245. package/src/shared/adapters/turn-log-buffer.ts +266 -0
  246. package/src/shared/adapters/turn-log.test.ts +389 -0
  247. package/src/shared/adapters/turn-log.ts +357 -0
  248. package/src/shared/agent-utils.ts +12 -5
  249. package/src/shared/chats.test.ts +4 -0
  250. package/src/shared/chats.ts +9 -0
  251. package/src/shared/config.ts +16 -1
  252. package/src/shared/lite.ts +76 -2
  253. package/src/shared/policies.ts +26 -0
  254. package/src/shared/template-manifest.ts +267 -0
  255. package/src/shared/utils/shell.ts +61 -0
  256. package/src/shared/version.ts +34 -0
  257. package/src/shared/workspace.test.ts +217 -0
  258. package/src/shared/workspace.ts +626 -48
  259. package/templates/environments/cladding/allowlist-domain.mjs +125 -0
  260. package/templates/environments/cladding/env.json +21 -1
  261. package/templates/environments/cladding/run-with-network.mjs +54 -0
  262. package/templates/environments/macos-proxy/allowlist-domain.mjs +95 -0
  263. package/templates/environments/macos-proxy/env.json +8 -1
  264. package/templates/environments/macos-proxy/proxy.mjs +42 -13
  265. package/templates/gemini/template.json +5 -0
  266. package/templates/gemini-claw/template.json +13 -0
  267. package/templates/skills/clawmini-requests/SKILL.md +69 -10
  268. package/templates/skills/run-host/SKILL.md +51 -0
  269. package/templates/skills/skill-creator/SKILL.md +4 -3
  270. package/templates/skills/skill-creator/scripts/validate.sh +52 -0
  271. package/tsdown.config.ts +10 -1
  272. package/vitest.config.ts +2 -2
  273. package/web/.svelte-kit/ambient.d.ts +292 -176
  274. package/web/.svelte-kit/generated/server/internal.js +1 -1
  275. package/web/.svelte-kit/output/client/.vite/manifest.json +127 -137
  276. package/web/.svelte-kit/output/client/_app/immutable/chunks/{Drm9vgeP.js → 3AZlWB6U.js} +1 -1
  277. package/web/.svelte-kit/output/client/_app/immutable/chunks/BhRSsUCh.js +2 -0
  278. package/web/.svelte-kit/output/client/_app/immutable/chunks/BiLeM2i1.js +1 -0
  279. package/{dist/web/_app/immutable/chunks/CME08kGM.js → web/.svelte-kit/output/client/_app/immutable/chunks/BmBj85Ll.js} +1 -1
  280. package/web/.svelte-kit/output/client/_app/immutable/chunks/BrERcKAH.js +1 -0
  281. package/web/.svelte-kit/output/client/_app/immutable/chunks/Bv9252RM.js +1 -0
  282. package/web/.svelte-kit/output/client/_app/immutable/chunks/CIXNBPKi.js +1 -0
  283. package/web/.svelte-kit/output/client/_app/immutable/chunks/DISKL3GN.js +2 -0
  284. package/web/.svelte-kit/output/client/_app/immutable/chunks/{Zeh-C-mx.js → DcpaLzmX.js} +1 -1
  285. package/web/.svelte-kit/output/client/_app/immutable/chunks/DnQ3vS13.js +1 -0
  286. package/web/.svelte-kit/output/client/_app/immutable/chunks/KsloHTKS.js +1 -0
  287. package/{dist/web/_app/immutable/chunks/Ck-be5J2.js → web/.svelte-kit/output/client/_app/immutable/chunks/RsHsUj-8.js} +2 -2
  288. package/web/.svelte-kit/output/client/_app/immutable/chunks/{G_zz-Gou.js → wpfV79dV.js} +1 -1
  289. package/web/.svelte-kit/output/client/_app/immutable/entry/app.CIw1Qj0n.js +2 -0
  290. package/web/.svelte-kit/output/client/_app/immutable/entry/start.Di0-Jhte.js +1 -0
  291. package/web/.svelte-kit/output/client/_app/immutable/nodes/{0.CYS8iApT.js → 0.DYyUA1au.js} +1 -1
  292. package/web/.svelte-kit/output/client/_app/immutable/nodes/1.D-3QEMMZ.js +1 -0
  293. package/web/.svelte-kit/output/client/_app/immutable/nodes/{2.BnwnD1Ki.js → 2.4olHnH7U.js} +1 -1
  294. package/{dist/web/_app/immutable/nodes/3.Dr0ot9sV.js → web/.svelte-kit/output/client/_app/immutable/nodes/3.4w0bE-m2.js} +3 -3
  295. package/web/.svelte-kit/output/client/_app/immutable/nodes/4.CZvjhVHt.js +60 -0
  296. package/web/.svelte-kit/output/client/_app/immutable/nodes/{5.BBGQ_i84.js → 5.DLbPVJY2.js} +1 -1
  297. package/web/.svelte-kit/output/client/_app/version.json +1 -1
  298. package/web/.svelte-kit/output/server/.vite/manifest.json +12 -10
  299. package/web/.svelte-kit/output/server/chunks/Icon.js +1 -1
  300. package/web/.svelte-kit/output/server/chunks/client.js +1 -1
  301. package/web/.svelte-kit/output/server/chunks/exports.js +1 -1
  302. package/web/.svelte-kit/output/server/chunks/index-server.js +2 -1
  303. package/web/.svelte-kit/output/server/chunks/internal.js +1 -1
  304. package/web/.svelte-kit/output/server/chunks/render-context.js +77 -0
  305. package/web/.svelte-kit/output/server/chunks/root.js +739 -788
  306. package/web/.svelte-kit/output/server/chunks/shared.js +234 -21
  307. package/web/.svelte-kit/output/server/index.js +126 -90
  308. package/web/.svelte-kit/output/server/manifest-full.js +1 -1
  309. package/web/.svelte-kit/output/server/manifest.js +1 -1
  310. package/web/.svelte-kit/output/server/nodes/0.js +1 -1
  311. package/web/.svelte-kit/output/server/nodes/1.js +1 -1
  312. package/web/.svelte-kit/output/server/nodes/2.js +1 -1
  313. package/web/.svelte-kit/output/server/nodes/3.js +1 -1
  314. package/web/.svelte-kit/output/server/nodes/4.js +1 -1
  315. package/web/.svelte-kit/output/server/nodes/5.js +1 -1
  316. package/web/.svelte-kit/output/server/remote-entry.js +245 -81
  317. package/web/.svelte-kit/tsconfig.json +4 -1
  318. package/dist/cli/propose-policy.mjs.map +0 -1
  319. package/dist/lite-CBxOT1y5.mjs +0 -241
  320. package/dist/lite-CBxOT1y5.mjs.map +0 -1
  321. package/dist/routing-D8rTxtaV.mjs +0 -245
  322. package/dist/routing-D8rTxtaV.mjs.map +0 -1
  323. package/dist/web/_app/immutable/chunks/B6YN0Nuq.js +0 -1
  324. package/dist/web/_app/immutable/chunks/BmRlVmv6.js +0 -1
  325. package/dist/web/_app/immutable/chunks/CK9JZLaG.js +0 -2
  326. package/dist/web/_app/immutable/chunks/Ck3rYNON.js +0 -1
  327. package/dist/web/_app/immutable/chunks/DMtIqaiV.js +0 -2
  328. package/dist/web/_app/immutable/chunks/DhD271EB.js +0 -1
  329. package/dist/web/_app/immutable/chunks/DpuLqk8d.js +0 -1
  330. package/dist/web/_app/immutable/chunks/DsIToJCP.js +0 -1
  331. package/dist/web/_app/immutable/chunks/bBmtyQMj.js +0 -1
  332. package/dist/web/_app/immutable/entry/app.CJmSwntr.js +0 -2
  333. package/dist/web/_app/immutable/entry/start.ZpUrT2ak.js +0 -1
  334. package/dist/web/_app/immutable/nodes/1.Bli0Hqzn.js +0 -1
  335. package/dist/web/_app/immutable/nodes/4.oBhvQhcA.js +0 -60
  336. package/dist/workspace-BJmJBfKi.mjs +0 -456
  337. package/dist/workspace-BJmJBfKi.mjs.map +0 -1
  338. package/src/cli/e2e/agents.test.ts +0 -140
  339. package/src/cli/e2e/basic.test.ts +0 -43
  340. package/src/cli/e2e/cron.test.ts +0 -132
  341. package/src/cli/e2e/export-lite-func.test.ts +0 -206
  342. package/src/cli/e2e/fallbacks.test.ts +0 -175
  343. package/src/cli/e2e/init.test.ts +0 -77
  344. package/src/cli/e2e/messages.test.ts +0 -332
  345. package/src/cli/e2e/propose-policy.test.ts +0 -203
  346. package/src/cli/e2e/requests.test.ts +0 -180
  347. package/src/cli/e2e/session-timeout.test.ts +0 -192
  348. package/src/cli/e2e/slash-new.test.ts +0 -93
  349. package/src/cli/e2e/subagents.test.ts +0 -106
  350. package/src/cli/e2e/utils.ts +0 -66
  351. package/src/cli/propose-policy.ts +0 -91
  352. package/web/.svelte-kit/output/client/_app/immutable/chunks/B6YN0Nuq.js +0 -1
  353. package/web/.svelte-kit/output/client/_app/immutable/chunks/BmRlVmv6.js +0 -1
  354. package/web/.svelte-kit/output/client/_app/immutable/chunks/CK9JZLaG.js +0 -2
  355. package/web/.svelte-kit/output/client/_app/immutable/chunks/Ck3rYNON.js +0 -1
  356. package/web/.svelte-kit/output/client/_app/immutable/chunks/DMtIqaiV.js +0 -2
  357. package/web/.svelte-kit/output/client/_app/immutable/chunks/DhD271EB.js +0 -1
  358. package/web/.svelte-kit/output/client/_app/immutable/chunks/DpuLqk8d.js +0 -1
  359. package/web/.svelte-kit/output/client/_app/immutable/chunks/DsIToJCP.js +0 -1
  360. package/web/.svelte-kit/output/client/_app/immutable/chunks/bBmtyQMj.js +0 -1
  361. package/web/.svelte-kit/output/client/_app/immutable/entry/app.CJmSwntr.js +0 -2
  362. package/web/.svelte-kit/output/client/_app/immutable/entry/start.ZpUrT2ak.js +0 -1
  363. package/web/.svelte-kit/output/client/_app/immutable/nodes/1.Bli0Hqzn.js +0 -1
  364. package/web/.svelte-kit/output/client/_app/immutable/nodes/4.oBhvQhcA.js +0 -60
  365. package/web/.svelte-kit/output/server/chunks/false.js +0 -4
  366. /package/dist/cli/{propose-policy.d.mts → manage-policies.d.mts} +0 -0
  367. /package/{src/cli/e2e → e2e/_helpers}/global-setup.ts +0 -0
@@ -1,5 +1,5 @@
1
- import{p as lt,c as E,a as b,f as L,d as We}from"./BmRlVmv6.js";import{b5 as je,h as ze,d as Ue,bj as Ke,b as Ge,I as x,bk as Yt,a8 as He,w as d,D as S,aj as ot,G as T,l as Xe,bl as qe,bg as Zt,bh as Ye,u as Ze,n as Ct,o as Ot,aN as Je,p as P,f as w,a as I,c as K,be as N,r as G,bm as Qe,bn as $e,s as ct,bf as tn,C as en}from"./CME08kGM.js";import{c as z}from"./Zeh-C-mx.js";import{B as nn,p as h,i as V,r as O,s as M,b as de,l as rn}from"./B6YN0Nuq.js";import{l as kt,j as A,a as j,e as sn,m as on,i as an,c as $,I as un,s as cn}from"./CK9JZLaG.js";import{g as ln,o as F,m as dn,u as fn}from"./DMtIqaiV.js";import"./Ck3rYNON.js";function hn(){return Symbol(je)}const pn=Symbol("NaN");function gn(n,t,e){ze&&Ue();var r=new nn(n),s=!Ke();Ge(()=>{var i=t();i!==i&&(i=pn),s&&i!==null&&typeof i=="object"&&(i={}),r.ensure(i,e)})}class vn extends Map{#t=new Map;#e=x(0);#n=x(0);#r=Yt||-1;constructor(t){if(super(),t){for(var[e,r]of t)super.set(e,r);this.#n.v=super.size}}#s(t){return Yt===this.#r?x(t):He(t)}has(t){var e=this.#t,r=e.get(t);if(r===void 0)if(super.has(t))r=this.#s(0),e.set(t,r);else return d(this.#e),!1;return d(r),!0}forEach(t,e){this.#o(),super.forEach(t,e)}get(t){var e=this.#t,r=e.get(t);if(r===void 0)if(super.has(t))r=this.#s(0),e.set(t,r);else{d(this.#e);return}return d(r),super.get(t)}set(t,e){var r=this.#t,s=r.get(t),i=super.get(t),o=super.set(t,e),a=this.#e;if(s===void 0)s=this.#s(0),r.set(t,s),S(this.#n,super.size),ot(a);else if(i!==e){ot(s);var c=a.reactions===null?null:new Set(a.reactions),u=c===null||!s.reactions?.every(v=>c.has(v));u&&ot(a)}return o}delete(t){var e=this.#t,r=e.get(t),s=super.delete(t);return r!==void 0&&(e.delete(t),S(r,-1)),s&&(S(this.#n,super.size),ot(this.#e)),s}clear(){if(super.size!==0){super.clear();var t=this.#t;S(this.#n,0);for(var e of t.values())S(e,-1);ot(this.#e),t.clear()}}#o(){d(this.#e);var t=this.#t;if(this.#n.v!==t.size){for(var e of super.keys())if(!t.has(e)){var r=this.#s(0);t.set(e,r)}}for([,r]of this.#t)d(r)}keys(){return d(this.#e),super.keys()}values(){return this.#o(),super.values()}entries(){return this.#o(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return d(this.#n),super.size}}function dt(n){return n!==null&&typeof n=="object"}const bn=["string","number","bigint","boolean"];function _t(n){return n==null||bn.includes(typeof n)?!0:Array.isArray(n)?n.every(t=>_t(t)):typeof n=="object"?Object.getPrototypeOf(n)===Object.prototype:!1}const mt=Symbol("box"),fe=Symbol("is-writable");function m(n,t){const e=T(n);return t?{[mt]:!0,[fe]:!0,get current(){return d(e)},set current(r){t(r)}}:{[mt]:!0,get current(){return n()}}}function mn(n){return dt(n)&&mt in n}function yn(n){let t=x(Xe(n));return{[mt]:!0,[fe]:!0,get current(){return d(t)},set current(e){S(t,e,!0)}}}function he(...n){return function(t){for(const e of n)if(e){if(t.defaultPrevented)return;typeof e=="function"?e.call(this,t):e.current?.call(this,t)}}}var Jt=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,wn=/\n/g,Sn=/^\s*/,En=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Tn=/^:\s*/,Cn=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,An=/^[;\s]*/,Pn=/^\s+|\s+$/g,In=`
1
+ import{p as lt,c as E,a as b,f as L,d as We}from"./BrERcKAH.js";import{b2 as je,h as ze,d as Ue,bj as Ke,b as Ge,B as x,bk as Yt,a3 as qe,x as d,y as S,af as ot,A as T,l as He,bl as Xe,bg as Zt,bh as Ye,aJ as Ze,u as Ct,q as Ot,aK as Je,p as P,f as w,a as I,c as K,be as N,r as G,bm as Qe,bn as $e,s as ct,bf as tn,w as en}from"./BmBj85Ll.js";import{c as z}from"./DcpaLzmX.js";import{B as nn,p as h,i as V,r as O,s as M,b as de,l as rn}from"./KsloHTKS.js";import{l as kt,j as A,a as j,e as sn,m as on,i as an,c as $,I as un,s as cn}from"./DISKL3GN.js";import{g as ln,o as F,m as dn,u as fn}from"./BhRSsUCh.js";import"./CIXNBPKi.js";function hn(){return Symbol(je)}const pn=Symbol("NaN");function gn(n,t,e){ze&&Ue();var r=new nn(n),s=!Ke();Ge(()=>{var i=t();i!==i&&(i=pn),s&&i!==null&&typeof i=="object"&&(i={}),r.ensure(i,e)})}class vn extends Map{#t=new Map;#e=x(0);#n=x(0);#r=Yt||-1;constructor(t){if(super(),t){for(var[e,r]of t)super.set(e,r);this.#n.v=super.size}}#s(t){return Yt===this.#r?x(t):qe(t)}has(t){var e=this.#t,r=e.get(t);if(r===void 0)if(super.has(t))r=this.#s(0),e.set(t,r);else return d(this.#e),!1;return d(r),!0}forEach(t,e){this.#o(),super.forEach(t,e)}get(t){var e=this.#t,r=e.get(t);if(r===void 0)if(super.has(t))r=this.#s(0),e.set(t,r);else{d(this.#e);return}return d(r),super.get(t)}set(t,e){var r=this.#t,s=r.get(t),i=super.get(t),o=super.set(t,e),a=this.#e;if(s===void 0)s=this.#s(0),r.set(t,s),S(this.#n,super.size),ot(a);else if(i!==e){ot(s);var c=a.reactions===null?null:new Set(a.reactions),u=c===null||!s.reactions?.every(v=>c.has(v));u&&ot(a)}return o}delete(t){var e=this.#t,r=e.get(t),s=super.delete(t);return r!==void 0&&(e.delete(t),S(r,-1)),s&&(S(this.#n,super.size),ot(this.#e)),s}clear(){if(super.size!==0){super.clear();var t=this.#t;S(this.#n,0);for(var e of t.values())S(e,-1);ot(this.#e),t.clear()}}#o(){d(this.#e);var t=this.#t;if(this.#n.v!==t.size){for(var e of super.keys())if(!t.has(e)){var r=this.#s(0);t.set(e,r)}}for([,r]of this.#t)d(r)}keys(){return d(this.#e),super.keys()}values(){return this.#o(),super.values()}entries(){return this.#o(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return d(this.#n),super.size}}function dt(n){return n!==null&&typeof n=="object"}const bn=["string","number","bigint","boolean"];function _t(n){return n==null||bn.includes(typeof n)?!0:Array.isArray(n)?n.every(t=>_t(t)):typeof n=="object"?Object.getPrototypeOf(n)===Object.prototype:!1}const mt=Symbol("box"),fe=Symbol("is-writable");function m(n,t){const e=T(n);return t?{[mt]:!0,[fe]:!0,get current(){return d(e)},set current(r){t(r)}}:{[mt]:!0,get current(){return n()}}}function mn(n){return dt(n)&&mt in n}function yn(n){let t=x(He(n));return{[mt]:!0,[fe]:!0,get current(){return d(t)},set current(e){S(t,e,!0)}}}function he(...n){return function(t){for(const e of n)if(e){if(t.defaultPrevented)return;typeof e=="function"?e.call(this,t):e.current?.call(this,t)}}}var Jt=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,wn=/\n/g,Sn=/^\s*/,En=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Tn=/^:\s*/,Cn=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,An=/^[;\s]*/,Pn=/^\s+|\s+$/g,In=`
2
2
  `,Qt="/",$t="*",Y="",kn="comment",xn="declaration";function Nn(n,t){if(typeof n!="string")throw new TypeError("First argument must be a string");if(!n)return[];t=t||{};var e=1,r=1;function s(l){var f=l.match(wn);f&&(e+=f.length);var C=l.lastIndexOf(In);r=~C?l.length-C:r+l.length}function i(){var l={line:e,column:r};return function(f){return f.position=new o(l),u(),f}}function o(l){this.start=l,this.end={line:e,column:r},this.source=t.source}o.prototype.content=n;function a(l){var f=new Error(t.source+":"+e+":"+r+": "+l);if(f.reason=l,f.filename=t.source,f.line=e,f.column=r,f.source=n,!t.silent)throw f}function c(l){var f=l.exec(n);if(f){var C=f[0];return s(C),n=n.slice(C.length),f}}function u(){c(Sn)}function v(l){var f;for(l=l||[];f=g();)f!==!1&&l.push(f);return l}function g(){var l=i();if(!(Qt!=n.charAt(0)||$t!=n.charAt(1))){for(var f=2;Y!=n.charAt(f)&&($t!=n.charAt(f)||Qt!=n.charAt(f+1));)++f;if(f+=2,Y===n.charAt(f-1))return a("End of comment missing");var C=n.slice(2,f-2);return r+=2,s(C),n=n.slice(f),r+=2,l({type:kn,comment:C})}}function y(){var l=i(),f=c(En);if(f){if(g(),!c(Tn))return a("property missing ':'");var C=c(Cn),_=l({type:xn,property:te(f[0].replace(Jt,Y)),value:C?te(C[0].replace(Jt,Y)):Y});return c(An),_}}function p(){var l=[];v(l);for(var f;f=y();)f!==!1&&(l.push(f),v(l));return l}return u(),p()}function te(n){return n?n.replace(Pn,Y):Y}function On(n,t){let e=null;if(!n||typeof n!="string")return e;const r=Nn(n),s=typeof t=="function";return r.forEach(i=>{if(i.type!=="declaration")return;const{property:o,value:a}=i;s?t(o,a,i):a&&(e=e||{},e[o]=a)}),e}const _n=/\d/,Dn=["-","_","/","."];function Rn(n=""){if(!_n.test(n))return n!==n.toLowerCase()}function Fn(n){const t=[];let e="",r,s;for(const i of n){const o=Dn.includes(i);if(o===!0){t.push(e),e="",r=void 0;continue}const a=Rn(i);if(s===!1){if(r===!1&&a===!0){t.push(e),e=i,r=a;continue}if(r===!0&&a===!1&&e.length>1){const c=e.at(-1);t.push(e.slice(0,Math.max(0,e.length-1))),e=c+i,r=a;continue}}e+=i,r=a,s=o}return t.push(e),t}function pe(n){return n?Fn(n).map(t=>Ln(t)).join(""):""}function Mn(n){return Bn(pe(n||""))}function Ln(n){return n?n[0].toUpperCase()+n.slice(1):""}function Bn(n){return n?n[0].toLowerCase()+n.slice(1):""}function pt(n){if(!n)return{};const t={};function e(r,s){if(r.startsWith("-moz-")||r.startsWith("-webkit-")||r.startsWith("-ms-")||r.startsWith("-o-")){t[pe(r)]=s;return}if(r.startsWith("--")){t[r]=s;return}t[Mn(r)]=s}return On(n,e),t}function ut(...n){return(...t)=>{for(const e of n)typeof e=="function"&&e(...t)}}function Vn(n,t){const e=RegExp(n,"g");return r=>{if(typeof r!="string")throw new TypeError(`expected an argument of type string, but got ${typeof r}`);return r.match(e)?r.replace(e,t):r}}const Wn=Vn(/[A-Z]/,n=>`-${n.toLowerCase()}`);function jn(n){if(!n||typeof n!="object"||Array.isArray(n))throw new TypeError(`expected an argument of type object, but got ${typeof n}`);return Object.keys(n).map(t=>`${Wn(t)}: ${n[t]};`).join(`
3
3
  `)}function zn(n={}){return jn(n).replace(`
4
4
  `," ")}const Un=["onabort","onanimationcancel","onanimationend","onanimationiteration","onanimationstart","onauxclick","onbeforeinput","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncompositionend","oncompositionstart","oncompositionupdate","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onfocusin","onfocusout","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onselectionchange","onselectstart","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitioncancel","ontransitionend","ontransitionrun","ontransitionstart","onvolumechange","onwaiting","onwebkitanimationend","onwebkitanimationiteration","onwebkitanimationstart","onwebkittransitionend","onwheel"],Kn=new Set(Un);function Gn(n){return Kn.has(n)}function W(...n){const t={...n[0]};for(let e=1;e<n.length;e++){const r=n[e];if(r){for(const s of Object.keys(r)){const i=t[s],o=r[s],a=typeof i=="function",c=typeof o=="function";if(a&&Gn(s)){const u=i,v=o;t[s]=he(u,v)}else if(a&&c)t[s]=ut(i,o);else if(s==="class"){const u=_t(i),v=_t(o);u&&v?t[s]=kt(i,o):u?t[s]=kt(i):v&&(t[s]=kt(o))}else if(s==="style"){const u=typeof i=="object",v=typeof o=="object",g=typeof i=="string",y=typeof o=="string";if(u&&v)t[s]={...i,...o};else if(u&&y){const p=pt(o);t[s]={...i,...p}}else if(g&&v){const p=pt(i);t[s]={...p,...o}}else if(g&&y){const p=pt(i),l=pt(o);t[s]={...p,...l}}else u?t[s]=i:v?t[s]=o:g?t[s]=i:y&&(t[s]=o)}else t[s]=o!==void 0?o:i}for(const s of Object.getOwnPropertySymbols(r)){const i=t[s],o=r[s];t[s]=o!==void 0?o:i}}}return typeof t.style=="object"&&(t.style=zn(t.style).replaceAll(`
5
- `," ")),t.hidden===!1&&(t.hidden=void 0,delete t.hidden),t.disabled===!1&&(t.disabled=void 0,delete t.disabled),t}const Hn=typeof window<"u"?window:void 0;function Xn(n){let t=n.activeElement;for(;t?.shadowRoot;){const e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}class qn{#t;#e;constructor(t={}){const{window:e=Hn,document:r=e?.document}=t;e!==void 0&&(this.#t=r,this.#e=ln(s=>{const i=F(e,"focusin",s),o=F(e,"focusout",s);return()=>{i(),o()}}))}get current(){return this.#e?.(),this.#t?Xn(this.#t):null}}new qn;class ge{#t;#e;constructor(t){this.#t=t,this.#e=Symbol(t)}get key(){return this.#e}exists(){return qe(this.#e)}get(){const t=Zt(this.#e);if(t===void 0)throw new Error(`Context "${this.#t}" not found`);return t}getOr(t){const e=Zt(this.#e);return e===void 0?t:e}set(t){return Ye(this.#e,t)}}function Yn(n,t){switch(n){case"post":Ct(t);break;case"pre":Ze(t);break}}function ve(n,t,e,r={}){const{lazy:s=!1}=r;let i=!s,o=Array.isArray(n)?[]:void 0;Yn(t,()=>{const a=Array.isArray(n)?n.map(u=>u()):n();if(!i){i=!0,o=a;return}const c=Ot(()=>e(a,o));return o=a,c})}function B(n,t,e){ve(n,"post",t,e)}function Zn(n,t,e){ve(n,"pre",t,e)}B.pre=Zn;function tt(n){Ct(()=>()=>{n()})}function Jn(n,t){return setTimeout(t,n)}function Ft(n){Je().then(n)}const Qn=1,$n=9,tr=11;function Dt(n){return dt(n)&&n.nodeType===Qn&&typeof n.nodeName=="string"}function be(n){return dt(n)&&n.nodeType===$n}function er(n){return dt(n)&&n.constructor?.name==="VisualViewport"}function nr(n){return dt(n)&&n.nodeType!==void 0}function me(n){return nr(n)&&n.nodeType===tr&&"host"in n}function rr(n,t){if(!n||!t||!Dt(n)||!Dt(t))return!1;const e=t.getRootNode?.();if(n===t||n.contains(t))return!0;if(e&&me(e)){let r=t;for(;r;){if(n===r)return!0;r=r.parentNode||r.host}}return!1}function sr(n){return be(n)?n:er(n)?n.document:n?.ownerDocument??document}function or(n){return me(n)?or(n.host):be(n)?n.defaultView??window:Dt(n)?n.ownerDocument?.defaultView??window:window}function ir(n){let t=n.activeElement;for(;t?.shadowRoot;){const e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}class ye{element;#t=T(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return d(this.#t)}set root(t){S(this.#t,t)}constructor(t){typeof t=="function"?this.element=m(t):this.element=t}getDocument=()=>sr(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>ir(this.root);isActiveElement=t=>t===this.getActiveElement();getElementById(t){return this.root.getElementById(t)}querySelector=t=>this.root?this.root.querySelector(t):null;querySelectorAll=t=>this.root?this.root.querySelectorAll(t):[];setTimeout=(t,e)=>this.getWindow().setTimeout(t,e);clearTimeout=t=>this.getWindow().clearTimeout(t)}function et(n,t){return{[hn()]:e=>mn(n)?(n.current=e,Ot(()=>t?.(e)),()=>{"isConnected"in e&&e.isConnected||(n.current=null,t?.(null))}):(n(e),Ot(()=>t?.(e)),()=>{"isConnected"in e&&e.isConnected||(n(null),t?.(null))})}}function ar(n){return n?"true":"false"}function yt(n){return n?"":void 0}function ur(n){return n?"open":"closed"}class cr{#t;#e;attrs;constructor(t){this.#t=t.getVariant?t.getVariant():null,this.#e=this.#t?`data-${this.#t}-`:`data-${t.component}-`,this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(t.parts.map(e=>[e,this.getAttr(e)]))}getAttr(t,e){return e?`data-${e}-${t}`:`${this.#e}${t}`}selector(t,e){return`[${this.getAttr(t,e)}]`}}function we(n){const t=new cr(n);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}const Se="Enter",lr="Escape",Ee=" ",Te=typeof document<"u",ee=dr();function dr(){return Te&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function ne(n){return n instanceof HTMLElement}function Rs(n){return n instanceof Element}function fr(n){return n instanceof Element||n instanceof SVGElement}function Fs(n){return n.matches(":focus-visible")}function Ms(n){return n!==null}class hr{#t;#e=null;constructor(t){this.#t=t,tt(()=>this.#n())}#n(){this.#e&&(window.cancelAnimationFrame(this.#e),this.#e=null)}run(t){this.#n();const e=this.#t.ref.current;if(e){if(typeof e.getAnimations!="function"){this.#r(t);return}this.#e=window.requestAnimationFrame(()=>{const r=e.getAnimations();if(r.length===0){this.#r(t);return}Promise.allSettled(r.map(s=>s.finished)).then(()=>{this.#r(t)})})}}#r(t){const e=()=>{t()};this.#t.afterTick?Ft(e):e()}}class re{#t;#e;#n;#r=x(!1);constructor(t){this.#t=t,S(this.#r,t.open.current,!0),this.#e=t.enabled??!0,this.#n=new hr({ref:this.#t.ref,afterTick:this.#t.open}),B(()=>this.#t.open.current,e=>{e&&S(this.#r,!0),this.#e&&this.#n.run(()=>{e===this.#t.open.current&&(this.#t.open.current||S(this.#r,!1),this.#t.onComplete?.())})})}get shouldRender(){return d(this.#r)}}function k(){}function ft(n,t){return`bits-${n}`}const pr=we({component:"dialog",parts:["content","trigger","overlay","title","description","close","cancel","action"]}),U=new ge("Dialog.Root | AlertDialog.Root");class Mt{static create(t){const e=U.getOr(null);return U.set(new Mt(t,e))}opts;#t=x(null);get triggerNode(){return d(this.#t)}set triggerNode(t){S(this.#t,t,!0)}#e=x(null);get contentNode(){return d(this.#e)}set contentNode(t){S(this.#e,t,!0)}#n=x(null);get overlayNode(){return d(this.#n)}set overlayNode(t){S(this.#n,t,!0)}#r=x(null);get descriptionNode(){return d(this.#r)}set descriptionNode(t){S(this.#r,t,!0)}#s=x(void 0);get contentId(){return d(this.#s)}set contentId(t){S(this.#s,t,!0)}#o=x(void 0);get titleId(){return d(this.#o)}set titleId(t){S(this.#o,t,!0)}#u=x(void 0);get triggerId(){return d(this.#u)}set triggerId(t){S(this.#u,t,!0)}#i=x(void 0);get descriptionId(){return d(this.#i)}set descriptionId(t){S(this.#i,t,!0)}#l=x(null);get cancelNode(){return d(this.#l)}set cancelNode(t){S(this.#l,t,!0)}#c=x(0);get nestedOpenCount(){return d(this.#c)}set nestedOpenCount(t){S(this.#c,t,!0)}depth;parent;contentPresence;overlayPresence;constructor(t,e){this.opts=t,this.parent=e,this.depth=e?e.depth+1:0,this.handleOpen=this.handleOpen.bind(this),this.handleClose=this.handleClose.bind(this),this.contentPresence=new re({ref:m(()=>this.contentNode),open:this.opts.open,enabled:!0,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new re({ref:m(()=>this.overlayNode),open:this.opts.open,enabled:!0}),B(()=>this.opts.open.current,r=>{this.parent&&(r?this.parent.incrementNested():this.parent.decrementNested())},{lazy:!0}),tt(()=>{this.opts.open.current&&this.parent?.decrementNested()})}handleOpen(){this.opts.open.current||(this.opts.open.current=!0)}handleClose(){this.opts.open.current&&(this.opts.open.current=!1)}getBitsAttr=t=>pr.getAttr(t,this.opts.variant.current);incrementNested(){this.nestedOpenCount++,this.parent?.incrementNested()}decrementNested(){this.nestedOpenCount!==0&&(this.nestedOpenCount--,this.parent?.decrementNested())}#a=T(()=>({"data-state":ur(this.opts.open.current)}));get sharedProps(){return d(this.#a)}set sharedProps(t){S(this.#a,t)}}class Ce{static create(t){return new Ce(t,U.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=et(this.opts.ref,r=>{this.root.triggerNode=r,this.root.triggerId=r?.id}),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(t){this.opts.disabled.current||t.button>0||this.root.handleOpen()}onkeydown(t){this.opts.disabled.current||(t.key===Ee||t.key===Se)&&(t.preventDefault(),this.root.handleOpen())}#t=T(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":ar(this.root.opts.open.current),"aria-controls":this.root.contentId,[this.root.getBitsAttr("trigger")]:"",onkeydown:this.onkeydown,onclick:this.onclick,disabled:this.opts.disabled.current?!0:void 0,...this.root.sharedProps,...this.attachment}));get props(){return d(this.#t)}set props(t){S(this.#t,t)}}class Lt{static create(t){return new Lt(t,U.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=et(this.opts.ref),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(t){this.opts.disabled.current||t.button>0||this.root.handleClose()}onkeydown(t){this.opts.disabled.current||(t.key===Ee||t.key===Se)&&(t.preventDefault(),this.root.handleClose())}#t=T(()=>({id:this.opts.id.current,[this.root.getBitsAttr(this.opts.variant.current)]:"",onclick:this.onclick,onkeydown:this.onkeydown,disabled:this.opts.disabled.current?!0:void 0,tabindex:0,...this.root.sharedProps,...this.attachment}));get props(){return d(this.#t)}set props(t){S(this.#t,t)}}class Bt{static create(t){return new Bt(t,U.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.root.titleId=this.opts.id.current,this.attachment=et(this.opts.ref),B.pre(()=>this.opts.id.current,r=>{this.root.titleId=r})}#t=T(()=>({id:this.opts.id.current,role:"heading","aria-level":this.opts.level.current,[this.root.getBitsAttr("title")]:"",...this.root.sharedProps,...this.attachment}));get props(){return d(this.#t)}set props(t){S(this.#t,t)}}class Vt{static create(t){return new Vt(t,U.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.root.descriptionId=this.opts.id.current,this.attachment=et(this.opts.ref,r=>{this.root.descriptionNode=r}),B.pre(()=>this.opts.id.current,r=>{this.root.descriptionId=r})}#t=T(()=>({id:this.opts.id.current,[this.root.getBitsAttr("description")]:"",...this.root.sharedProps,...this.attachment}));get props(){return d(this.#t)}set props(t){S(this.#t,t)}}class Wt{static create(t){return new Wt(t,U.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=et(this.opts.ref,r=>{this.root.contentNode=r,this.root.contentId=r?.id})}#t=T(()=>({open:this.root.opts.open.current}));get snippetProps(){return d(this.#t)}set snippetProps(t){S(this.#t,t)}#e=T(()=>({id:this.opts.id.current,role:this.root.opts.variant.current==="alert-dialog"?"alertdialog":"dialog","aria-modal":"true","aria-describedby":this.root.descriptionId,"aria-labelledby":this.root.titleId,[this.root.getBitsAttr("content")]:"",style:{pointerEvents:"auto",outline:this.root.opts.variant.current==="alert-dialog"?"none":void 0,"--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount,contain:"layout style"},tabindex:this.root.opts.variant.current==="alert-dialog"?-1:void 0,"data-nested-open":yt(this.root.nestedOpenCount>0),"data-nested":yt(this.root.parent!==null),...this.root.sharedProps,...this.attachment}));get props(){return d(this.#e)}set props(t){S(this.#e,t)}get shouldRender(){return this.root.contentPresence.shouldRender}}class jt{static create(t){return new jt(t,U.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=et(this.opts.ref,r=>this.root.overlayNode=r)}#t=T(()=>({open:this.root.opts.open.current}));get snippetProps(){return d(this.#t)}set snippetProps(t){S(this.#t,t)}#e=T(()=>({id:this.opts.id.current,[this.root.getBitsAttr("overlay")]:"",style:{pointerEvents:"auto","--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount},"data-nested-open":yt(this.root.nestedOpenCount>0),"data-nested":yt(this.root.parent!==null),...this.root.sharedProps,...this.attachment}));get props(){return d(this.#e)}set props(t){S(this.#e,t)}get shouldRender(){return this.root.overlayPresence.shouldRender}}var gr=L("<div><!></div>");function vr(n,t){const e=lt();P(t,!0);let r=h(t,"id",19,()=>ft(e)),s=h(t,"ref",15,null),i=h(t,"level",3,2),o=O(t,["$$slots","$$events","$$legacy","id","ref","child","children","level"]);const a=Bt.create({id:m(()=>r()),level:m(()=>i()),ref:m(()=>s(),p=>s(p))}),c=T(()=>W(o,a.props));var u=E(),v=w(u);{var g=p=>{var l=E(),f=w(l);A(f,()=>t.child,()=>({props:d(c)})),b(p,l)},y=p=>{var l=gr();j(l,()=>({...d(c)}));var f=K(l);A(f,()=>t.children??N),G(l),b(p,l)};V(v,p=>{t.child?p(g):p(y,-1)})}b(n,u),I()}function br(n,t){var e=E(),r=w(e);gn(r,()=>t.children,s=>{var i=E(),o=w(i);A(o,()=>t.children??N),b(s,i)}),b(n,e)}const mr=new ge("BitsConfig");function yr(){const n=new wr(null,{});return mr.getOr(n).opts}class wr{opts;constructor(t,e){const r=Sr(t,e);this.opts={defaultPortalTo:r(s=>s.defaultPortalTo),defaultLocale:r(s=>s.defaultLocale)}}}function Sr(n,t){return e=>m(()=>{const s=e(t)?.current;if(s!==void 0)return s;if(n!==null)return e(n.opts)?.current})}function Er(n,t){return e=>{const r=yr();return m(()=>{const s=e();if(s!==void 0)return s;const i=n(r).current;return i!==void 0?i:t})}}const Tr=Er(n=>n.defaultPortalTo,"body");function Cr(n,t){P(t,!0);const e=Tr(()=>t.to),r=Qe();let s=T(i);function i(){if(!Te||t.disabled)return null;let g=null;return typeof e.current=="string"?g=document.querySelector(e.current):g=e.current,g}let o;function a(){o&&(fn(o),o=null)}B([()=>d(s),()=>t.disabled],([g,y])=>{if(!g||y){a();return}return o=dn(br,{target:g,props:{children:t.children},context:r}),()=>{a()}});var c=E(),u=w(c);{var v=g=>{var y=E(),p=w(y);A(p,()=>t.children??N),b(g,y)};V(u,g=>{t.disabled&&g(v)})}b(n,c),I()}function se(n,t=500){let e=null;const r=(...s)=>{e!==null&&clearTimeout(e),e=setTimeout(()=>{n(...s)},t)};return r.destroy=()=>{e!==null&&(clearTimeout(e),e=null)},r}function Ae(n,t){return n===t||n.contains(t)}function Pe(n){return n?.ownerDocument??document}function Ar(n,t){const{clientX:e,clientY:r}=n,s=t.getBoundingClientRect();return e<s.left||e>s.right||r<s.top||r>s.bottom}var Ie=["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] *)"],Rt=Ie.join(","),ke=typeof Element>"u",Q=ke?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,wt=!ke&&Element.prototype.getRootNode?function(n){var t;return n==null||(t=n.getRootNode)===null||t===void 0?void 0:t.call(n)}:function(n){return n?.ownerDocument},St=function(t,e){var r;e===void 0&&(e=!0);var s=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=s===""||s==="true",o=i||e&&t&&(typeof t.closest=="function"?t.closest("[inert]"):St(t.parentNode));return o},Pr=function(t){var e,r=t==null||(e=t.getAttribute)===null||e===void 0?void 0:e.call(t,"contenteditable");return r===""||r==="true"},xe=function(t,e,r){if(St(t))return[];var s=Array.prototype.slice.apply(t.querySelectorAll(Rt));return e&&Q.call(t,Rt)&&s.unshift(t),s=s.filter(r),s},Et=function(t,e,r){for(var s=[],i=Array.from(t);i.length;){var o=i.shift();if(!St(o,!1))if(o.tagName==="SLOT"){var a=o.assignedElements(),c=a.length?a:o.children,u=Et(c,!0,r);r.flatten?s.push.apply(s,u):s.push({scopeParent:o,candidates:u})}else{var v=Q.call(o,Rt);v&&r.filter(o)&&(e||!t.includes(o))&&s.push(o);var g=o.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(o),y=!St(g,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(o));if(g&&y){var p=Et(g===!0?o.children:g.children,!0,r);r.flatten?s.push.apply(s,p):s.push({scopeParent:o,candidates:p})}else i.unshift.apply(i,o.children)}}return s},Ne=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Oe=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Pr(t))&&!Ne(t)?0:t.tabIndex},Ir=function(t,e){var r=Oe(t);return r<0&&e&&!Ne(t)?0:r},kr=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},_e=function(t){return t.tagName==="INPUT"},xr=function(t){return _e(t)&&t.type==="hidden"},Nr=function(t){var e=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return e},Or=function(t,e){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===e)return t[r]},_r=function(t){if(!t.name)return!0;var e=t.form||wt(t),r=function(a){return e.querySelectorAll('input[type="radio"][name="'+a+'"]')},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(o){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",o.message),!1}var i=Or(s,t.form);return!i||i===t},Dr=function(t){return _e(t)&&t.type==="radio"},Rr=function(t){return Dr(t)&&!_r(t)},Fr=function(t){var e,r=t&&wt(t),s=(e=r)===null||e===void 0?void 0:e.host,i=!1;if(r&&r!==t){var o,a,c;for(i=!!((o=s)!==null&&o!==void 0&&(a=o.ownerDocument)!==null&&a!==void 0&&a.contains(s)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!i&&s;){var u,v,g;r=wt(s),s=(u=r)===null||u===void 0?void 0:u.host,i=!!((v=s)!==null&&v!==void 0&&(g=v.ownerDocument)!==null&&g!==void 0&&g.contains(s))}}return i},oe=function(t){var e=t.getBoundingClientRect(),r=e.width,s=e.height;return r===0&&s===0},Mr=function(t,e){var r=e.displayCheck,s=e.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var i=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!i}if(getComputedStyle(t).visibility==="hidden")return!0;var o=Q.call(t,"details>summary:first-of-type"),a=o?t.parentElement:t;if(Q.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof s=="function"){for(var c=t;t;){var u=t.parentElement,v=wt(t);if(u&&!u.shadowRoot&&s(u)===!0)return oe(t);t.assignedSlot?t=t.assignedSlot:!u&&v!==t.ownerDocument?t=v.host:t=u}t=c}if(Fr(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return oe(t);return!1},Lr=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if(e.tagName==="FIELDSET"&&e.disabled){for(var r=0;r<e.children.length;r++){var s=e.children.item(r);if(s.tagName==="LEGEND")return Q.call(e,"fieldset[disabled] *")?!0:!s.contains(t)}return!0}e=e.parentElement}return!1},Tt=function(t,e){return!(e.disabled||xr(e)||Mr(e,t)||Nr(e)||Lr(e))},ie=function(t,e){return!(Rr(e)||Oe(e)<0||!Tt(t,e))},Br=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},De=function(t){var e=[],r=[];return t.forEach(function(s,i){var o=!!s.scopeParent,a=o?s.scopeParent:s,c=Ir(a,o),u=o?De(s.candidates):a;c===0?o?e.push.apply(e,u):e.push(a):r.push({documentOrder:i,tabIndex:c,item:s,isScope:o,content:u})}),r.sort(kr).reduce(function(s,i){return i.isScope?s.push.apply(s,i.content):s.push(i.content),s},[]).concat(e)},Vr=function(t,e){e=e||{};var r;return e.getShadowRoot?r=Et([t],e.includeContainer,{filter:ie.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:Br}):r=xe(t,e.includeContainer,ie.bind(null,e)),De(r)},Wr=function(t,e){e=e||{};var r;return e.getShadowRoot?r=Et([t],e.includeContainer,{filter:Tt.bind(null,e),flatten:!0,getShadowRoot:e.getShadowRoot}):r=xe(t,e.includeContainer,Tt.bind(null,e)),r},jr=Ie.concat("iframe:not([inert]):not([inert] *)").join(","),zr=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return Q.call(t,jr)===!1?!1:Tt(e,t)};const Ur="data-context-menu-trigger",Kr="data-context-menu-content";we({component:"menu",parts:["trigger","content","sub-trigger","item","group","group-heading","checkbox-group","checkbox-item","radio-group","radio-item","separator","sub-content","arrow"]});globalThis.bitsDismissableLayers??=new Map;class zt{static create(t){return new zt(t)}opts;#t;#e;#n={pointerdown:!1};#r=!1;#s=!1;#o=void 0;#u;#i=k;constructor(t){this.opts=t,this.#e=t.interactOutsideBehavior,this.#t=t.onInteractOutside,this.#u=t.onFocusOutside,Ct(()=>{this.#o=Pe(this.opts.ref.current)});let e=k;const r=()=>{this.#f(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),e()};B([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return Jn(1,()=>{this.opts.ref.current&&(globalThis.bitsDismissableLayers.set(this,this.#e),e(),e=this.#c())}),r}),tt(()=>{this.#f.destroy(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),this.#i(),e()})}#l=t=>{t.defaultPrevented||this.opts.ref.current&&Ft(()=>{!this.opts.ref.current||this.#v(t.target)||t.target&&!this.#s&&this.#u.current?.(t)})};#c(){return ut(F(this.#o,"pointerdown",ut(this.#h,this.#g),{capture:!0}),F(this.#o,"pointerdown",ut(this.#p,this.#d)),F(this.#o,"focusin",this.#l))}#a=t=>{let e=t;e.defaultPrevented&&(e=ae(t)),this.#t.current(t)};#d=se(t=>{if(!this.opts.ref.current){this.#i();return}const e=this.opts.isValidEvent.current(t,this.opts.ref.current)||Xr(t,this.opts.ref.current);if(!this.#r||this.#b()||!e){this.#i();return}let r=t;if(r.defaultPrevented&&(r=ae(r)),this.#e.current!=="close"&&this.#e.current!=="defer-otherwise-close"){this.#i();return}t.pointerType==="touch"?(this.#i(),this.#i=F(this.#o,"click",this.#a,{once:!0})):this.#t.current(r)},10);#h=t=>{this.#n[t.type]=!0};#p=t=>{this.#n[t.type]=!1};#g=()=>{this.opts.ref.current&&(this.#r=Hr(this.opts.ref.current))};#v=t=>this.opts.ref.current?Ae(this.opts.ref.current,t):!1;#f=se(()=>{for(const t in this.#n)this.#n[t]=!1;this.#r=!1},20);#b(){return Object.values(this.#n).some(Boolean)}#m=()=>{this.#s=!0};#y=()=>{this.#s=!1};props={onfocuscapture:this.#m,onblurcapture:this.#y}}function Gr(n=[...globalThis.bitsDismissableLayers]){return n.findLast(([t,{current:e}])=>e==="close"||e==="ignore")}function Hr(n){const t=[...globalThis.bitsDismissableLayers],e=Gr(t);if(e)return e[0].opts.ref.current===n;const[r]=t[0];return r.opts.ref.current===n}function Xr(n,t){const e=n.target;if(!fr(e))return!1;const r=!!e.closest(`[${Ur}]`);if("button"in n&&n.button>0&&!r)return!1;if("button"in n&&n.button===0&&r)return!0;const s=!!t.closest(`[${Kr}]`);return r&&s?!1:Pe(e).documentElement.contains(e)&&!Ae(t,e)&&Ar(n,t)}function ae(n){const t=n.currentTarget,e=n.target;let r;n instanceof PointerEvent?r=new PointerEvent(n.type,n):r=new PointerEvent("pointerdown",n);let s=!1;return new Proxy(r,{get:(o,a)=>a==="currentTarget"?t:a==="target"?e:a==="preventDefault"?()=>{s=!0,typeof o.preventDefault=="function"&&o.preventDefault()}:a==="defaultPrevented"?s:a in o?o[a]:n[a]})}function qr(n,t){P(t,!0);let e=h(t,"interactOutsideBehavior",3,"close"),r=h(t,"onInteractOutside",3,k),s=h(t,"onFocusOutside",3,k),i=h(t,"isValidEvent",3,()=>!1);const o=zt.create({id:m(()=>t.id),interactOutsideBehavior:m(()=>e()),onInteractOutside:m(()=>r()),enabled:m(()=>t.enabled),onFocusOutside:m(()=>s()),isValidEvent:m(()=>i()),ref:t.ref});var a=E(),c=w(a);A(c,()=>t.children??N,()=>({props:o.props})),b(n,a),I()}globalThis.bitsEscapeLayers??=new Map;class Ut{static create(t){return new Ut(t)}opts;domContext;constructor(t){this.opts=t,this.domContext=new ye(this.opts.ref);let e=k;B(()=>t.enabled.current,r=>(r&&(globalThis.bitsEscapeLayers.set(this,t.escapeKeydownBehavior),e=this.#t()),()=>{e(),globalThis.bitsEscapeLayers.delete(this)}))}#t=()=>F(this.domContext.getDocument(),"keydown",this.#e,{passive:!1});#e=t=>{if(t.key!==lr||!Yr(this))return;const e=new KeyboardEvent(t.type,t);t.preventDefault();const r=this.opts.escapeKeydownBehavior.current;r!=="close"&&r!=="defer-otherwise-close"||this.opts.onEscapeKeydown.current(e)}}function Yr(n){const t=[...globalThis.bitsEscapeLayers],e=t.findLast(([s,{current:i}])=>i==="close"||i==="ignore");if(e)return e[0]===n;const[r]=t[0];return r===n}function Zr(n,t){P(t,!0);let e=h(t,"escapeKeydownBehavior",3,"close"),r=h(t,"onEscapeKeydown",3,k);Ut.create({escapeKeydownBehavior:m(()=>e()),onEscapeKeydown:m(()=>r()),enabled:m(()=>t.enabled),ref:t.ref});var s=E(),i=w(s);A(i,()=>t.children??N),b(n,s),I()}class Kt{static instance;#t=yn([]);#e=new WeakMap;#n=new WeakMap;static getInstance(){return this.instance||(this.instance=new Kt),this.instance}register(t){const e=this.getActive();e&&e!==t&&e.pause();const r=document.activeElement;r&&r!==document.body&&this.#n.set(t,r),this.#t.current=this.#t.current.filter(s=>s!==t),this.#t.current.unshift(t)}unregister(t){this.#t.current=this.#t.current.filter(r=>r!==t);const e=this.getActive();e&&e.resume()}getActive(){return this.#t.current[0]}setFocusMemory(t,e){this.#e.set(t,e)}getFocusMemory(t){return this.#e.get(t)}isActiveScope(t){return this.getActive()===t}setPreFocusMemory(t,e){this.#n.set(t,e)}getPreFocusMemory(t){return this.#n.get(t)}clearPreFocusMemory(t){this.#n.delete(t)}}class Gt{#t=!1;#e=null;#n=Kt.getInstance();#r=[];#s;constructor(t){this.#s=t}get paused(){return this.#t}pause(){this.#t=!0}resume(){this.#t=!1}#o(){for(const t of this.#r)t();this.#r=[]}mount(t){this.#e&&this.unmount(),this.#e=t,this.#n.register(this),this.#l(),this.#u()}unmount(){this.#e&&(this.#o(),this.#i(),this.#n.unregister(this),this.#n.clearPreFocusMemory(this),this.#e=null)}#u(){if(!this.#e)return;const t=new CustomEvent("focusScope.onOpenAutoFocus",{bubbles:!1,cancelable:!0});this.#s.onOpenAutoFocus.current(t),t.defaultPrevented||requestAnimationFrame(()=>{if(!this.#e)return;const e=this.#a();e?(e.focus(),this.#n.setFocusMemory(this,e)):this.#e.focus()})}#i(){const t=new CustomEvent("focusScope.onCloseAutoFocus",{bubbles:!1,cancelable:!0});if(this.#s.onCloseAutoFocus.current?.(t),!t.defaultPrevented){const e=this.#n.getPreFocusMemory(this);if(e&&document.contains(e))try{e.focus()}catch{document.body.focus()}}}#l(){if(!this.#e||!this.#s.trap.current)return;const t=this.#e,e=t.ownerDocument,r=o=>{if(this.#t||!this.#n.isActiveScope(this))return;const a=o.target;if(!a)return;if(t.contains(a))this.#n.setFocusMemory(this,a);else{const u=this.#n.getFocusMemory(this);if(u&&t.contains(u)&&zr(u))o.preventDefault(),u.focus();else{const v=this.#a(),g=this.#d()[0];(v||g||t).focus()}}},s=o=>{if(!this.#s.loop||this.#t||o.key!=="Tab"||!this.#n.isActiveScope(this))return;const a=this.#c();if(a.length===0)return;const c=a[0],u=a[a.length-1];!o.shiftKey&&e.activeElement===u?(o.preventDefault(),c.focus()):o.shiftKey&&e.activeElement===c&&(o.preventDefault(),u.focus())};this.#r.push(F(e,"focusin",r,{capture:!0}),F(t,"keydown",s));const i=new MutationObserver(()=>{const o=this.#n.getFocusMemory(this);if(o&&!t.contains(o)){const a=this.#a(),c=this.#d()[0],u=a||c;u?(u.focus(),this.#n.setFocusMemory(this,u)):t.focus()}});i.observe(t,{childList:!0,subtree:!0}),this.#r.push(()=>i.disconnect())}#c(){return this.#e?Vr(this.#e,{includeContainer:!1,getShadowRoot:!0}):[]}#a(){return this.#c()[0]||null}#d(){return this.#e?Wr(this.#e,{includeContainer:!1,getShadowRoot:!0}):[]}static use(t){let e=null;return B([()=>t.ref.current,()=>t.enabled.current],([r,s])=>{r&&s?(e||(e=new Gt(t)),e.mount(r)):e&&(e.unmount(),e=null)}),tt(()=>{e?.unmount()}),{get props(){return{tabindex:-1}}}}}function Jr(n,t){P(t,!0);let e=h(t,"enabled",3,!1),r=h(t,"trapFocus",3,!1),s=h(t,"loop",3,!1),i=h(t,"onCloseAutoFocus",3,k),o=h(t,"onOpenAutoFocus",3,k);const a=Gt.use({enabled:m(()=>e()),trap:m(()=>r()),loop:s(),onCloseAutoFocus:m(()=>i()),onOpenAutoFocus:m(()=>o()),ref:t.ref});var c=E(),u=w(c);A(u,()=>t.focusScope??N,()=>({props:a.props})),b(n,c),I()}globalThis.bitsTextSelectionLayers??=new Map;class Ht{static create(t){return new Ht(t)}opts;domContext;#t=k;constructor(t){this.opts=t,this.domContext=new ye(t.ref);let e=k;B(()=>this.opts.enabled.current,r=>(r&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),e(),e=this.#e()),()=>{e(),this.#r(),globalThis.bitsTextSelectionLayers.delete(this)}))}#e(){return ut(F(this.domContext.getDocument(),"pointerdown",this.#n),F(this.domContext.getDocument(),"pointerup",he(this.#r,this.opts.onPointerUp.current)))}#n=t=>{const e=this.opts.ref.current,r=t.target;!ne(e)||!ne(r)||!this.opts.enabled.current||!$r(this)||!rr(e,r)||(this.opts.onPointerDown.current(t),!t.defaultPrevented&&(this.#t=Qr(e,this.domContext.getDocument().body)))};#r=()=>{this.#t(),this.#t=k}}const ue=n=>n.style.userSelect||n.style.webkitUserSelect;function Qr(n,t){const e=ue(t),r=ue(n);return gt(t,"none"),gt(n,"text"),()=>{gt(t,e),gt(n,r)}}function gt(n,t){n.style.userSelect=t,n.style.webkitUserSelect=t}function $r(n){const t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;const e=t.at(-1);return e?e[0]===n:!1}function ts(n,t){P(t,!0);let e=h(t,"preventOverflowTextSelection",3,!0),r=h(t,"onPointerDown",3,k),s=h(t,"onPointerUp",3,k);Ht.create({id:m(()=>t.id),onPointerDown:m(()=>r()),onPointerUp:m(()=>s()),enabled:m(()=>t.enabled&&e()),ref:t.ref});var i=E(),o=w(i);A(o,()=>t.children??N),b(n,i),I()}globalThis.bitsIdCounter??={current:0};function es(n="bits"){return globalThis.bitsIdCounter.current++,`${n}-${globalThis.bitsIdCounter.current}`}class ns{#t;#e=0;#n=x();#r;constructor(t){this.#t=t}#s(){this.#e-=1,this.#r&&this.#e<=0&&(this.#r(),S(this.#n,void 0),this.#r=void 0)}get(...t){return this.#e+=1,d(this.#n)===void 0&&(this.#r=$e(()=>{S(this.#n,this.#t(...t),!0)})),Ct(()=>()=>{this.#s()}),d(this.#n)}}const bt=new vn;let vt=x(null),xt=null,it=null,at=!1;const ce=m(()=>{for(const n of bt.values())if(n)return!0;return!1});let Nt=null;const rs=new ns(()=>{function n(){document.body.setAttribute("style",d(vt)??""),document.body.style.removeProperty("--scrollbar-width"),ee&&xt?.(),S(vt,null)}function t(){it!==null&&(window.clearTimeout(it),it=null)}function e(s,i){t(),at=!0,Nt=Date.now();const o=Nt,a=()=>{it=null,Nt===o&&(Re(bt)?at=!1:(at=!1,i()))},c=s===null?24:s;it=window.setTimeout(a,c)}function r(){d(vt)===null&&bt.size===0&&!at&&S(vt,document.body.getAttribute("style"),!0)}return B(()=>ce.current,()=>{if(!ce.current)return;r(),at=!1;const s=getComputedStyle(document.documentElement),i=getComputedStyle(document.body),o=s.scrollbarGutter?.includes("stable")||i.scrollbarGutter?.includes("stable"),a=window.innerWidth-document.documentElement.clientWidth,u={padding:Number.parseInt(i.paddingRight??"0",10)+a,margin:Number.parseInt(i.marginRight??"0",10)};a>0&&!o&&(document.body.style.paddingRight=`${u.padding}px`,document.body.style.marginRight=`${u.margin}px`,document.body.style.setProperty("--scrollbar-width",`${a}px`)),document.body.style.overflow="hidden",ee&&(xt=F(document,"touchmove",v=>{v.target===document.documentElement&&(v.touches.length>1||v.preventDefault())},{passive:!1})),Ft(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})}),tt(()=>()=>{xt?.()}),{get lockMap(){return bt},resetBodyStyle:n,scheduleCleanupIfNoNewLocks:e,cancelPendingCleanup:t,ensureInitialStyleCaptured:r}});class ss{#t=es();#e;#n=()=>null;#r;locked;constructor(t,e=()=>null){this.#e=t,this.#n=e,this.#r=rs.get(),this.#r&&(this.#r.cancelPendingCleanup(),this.#r.ensureInitialStyleCaptured(),this.#r.lockMap.set(this.#t,this.#e??!1),this.locked=m(()=>this.#r.lockMap.get(this.#t)??!1,r=>this.#r.lockMap.set(this.#t,r)),tt(()=>{if(this.#r.lockMap.delete(this.#t),Re(this.#r.lockMap))return;const r=this.#n();this.#r.scheduleCleanupIfNoNewLocks(r,()=>{this.#r.resetBodyStyle()})}))}}function Re(n){for(const[t,e]of n)if(e)return!0;return!1}function le(n,t){P(t,!0);let e=h(t,"preventScroll",3,!0),r=h(t,"restoreScrollDelay",3,null);e()&&new ss(e(),()=>r()),I()}var os=L("<div><!></div>");function is(n,t){const e=lt();P(t,!0);let r=h(t,"id",19,()=>ft(e)),s=h(t,"forceMount",3,!1),i=h(t,"ref",15,null),o=O(t,["$$slots","$$events","$$legacy","id","forceMount","child","children","ref"]);const a=jt.create({id:m(()=>r()),ref:m(()=>i(),y=>i(y))}),c=T(()=>W(o,a.props));var u=E(),v=w(u);{var g=y=>{var p=E(),l=w(p);{var f=_=>{var R=E(),D=w(R);{let H=T(()=>({props:W(d(c)),...a.snippetProps}));A(D,()=>t.child,()=>d(H))}b(_,R)},C=_=>{var R=os();j(R,H=>({...H}),[()=>W(d(c))]);var D=K(R);A(D,()=>t.children??N,()=>a.snippetProps),G(R),b(_,R)};V(l,_=>{t.child?_(f):_(C,-1)})}b(y,p)};V(v,y=>{(a.shouldRender||s())&&y(g)})}b(n,u),I()}var as=L("<div><!></div>");function us(n,t){const e=lt();P(t,!0);let r=h(t,"id",19,()=>ft(e)),s=h(t,"ref",15,null),i=O(t,["$$slots","$$events","$$legacy","id","children","child","ref"]);const o=Vt.create({id:m(()=>r()),ref:m(()=>s(),y=>s(y))}),a=T(()=>W(i,o.props));var c=E(),u=w(c);{var v=y=>{var p=E(),l=w(p);A(l,()=>t.child,()=>({props:d(a)})),b(y,p)},g=y=>{var p=as();j(p,()=>({...d(a)}));var l=K(p);A(l,()=>t.children??N),G(p),b(y,p)};V(u,y=>{t.child?y(v):y(g,-1)})}b(n,c),I()}function cs(n,t){P(t,!0);let e=h(t,"open",15,!1),r=h(t,"onOpenChange",3,k),s=h(t,"onOpenChangeComplete",3,k);Mt.create({variant:m(()=>"dialog"),open:m(()=>e(),a=>{e(a),r()(a)}),onOpenChangeComplete:m(()=>s())});var i=E(),o=w(i);A(o,()=>t.children??N),b(n,i),I()}var ls=L("<button><!></button>");function ds(n,t){const e=lt();P(t,!0);let r=h(t,"id",19,()=>ft(e)),s=h(t,"ref",15,null),i=h(t,"disabled",3,!1),o=O(t,["$$slots","$$events","$$legacy","children","child","id","ref","disabled"]);const a=Lt.create({variant:m(()=>"close"),id:m(()=>r()),ref:m(()=>s(),p=>s(p)),disabled:m(()=>!!i())}),c=T(()=>W(o,a.props));var u=E(),v=w(u);{var g=p=>{var l=E(),f=w(l);A(f,()=>t.child,()=>({props:d(c)})),b(p,l)},y=p=>{var l=ls();j(l,()=>({...d(c)}));var f=K(l);A(f,()=>t.children??N),G(l),b(p,l)};V(v,p=>{t.child?p(g):p(y,-1)})}b(n,u),I()}var fs=L("<!> <!>",1),hs=L("<!> <div><!></div>",1);function ps(n,t){const e=lt();P(t,!0);let r=h(t,"id",19,()=>ft(e)),s=h(t,"ref",15,null),i=h(t,"forceMount",3,!1),o=h(t,"onCloseAutoFocus",3,k),a=h(t,"onOpenAutoFocus",3,k),c=h(t,"onEscapeKeydown",3,k),u=h(t,"onInteractOutside",3,k),v=h(t,"trapFocus",3,!0),g=h(t,"preventScroll",3,!0),y=h(t,"restoreScrollDelay",3,null),p=O(t,["$$slots","$$events","$$legacy","id","children","child","ref","forceMount","onCloseAutoFocus","onOpenAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","restoreScrollDelay"]);const l=Wt.create({id:m(()=>r()),ref:m(()=>s(),D=>s(D))}),f=T(()=>W(p,l.props));var C=E(),_=w(C);{var R=D=>{Jr(D,{get ref(){return l.opts.ref},loop:!0,get trapFocus(){return v()},get enabled(){return l.root.opts.open.current},get onOpenAutoFocus(){return a()},get onCloseAutoFocus(){return o()},focusScope:(At,Pt)=>{let ht=()=>Pt?.().props;Zr(At,M(()=>d(f),{get enabled(){return l.root.opts.open.current},get ref(){return l.opts.ref},onEscapeKeydown:Z=>{c()(Z),!Z.defaultPrevented&&l.root.handleClose()},children:(Z,Fe)=>{qr(Z,M(()=>d(f),{get ref(){return l.opts.ref},get enabled(){return l.root.opts.open.current},onInteractOutside:X=>{u()(X),!X.defaultPrevented&&l.root.handleClose()},children:(X,Xt)=>{ts(X,M(()=>d(f),{get ref(){return l.opts.ref},get enabled(){return l.root.opts.open.current},children:(Me,Ps)=>{var qt=E(),Le=w(qt);{var Be=J=>{var nt=fs(),rt=w(nt);{var st=q=>{le(q,{get preventScroll(){return g()},get restoreScrollDelay(){return y()}})};V(rt,q=>{l.root.opts.open.current&&q(st)})}var It=ct(rt,2);{let q=T(()=>({props:W(d(f),ht()),...l.snippetProps}));A(It,()=>t.child,()=>d(q))}b(J,nt)},Ve=J=>{var nt=hs(),rt=w(nt);le(rt,{get preventScroll(){return g()}});var st=ct(rt,2);j(st,q=>({...q}),[()=>W(d(f),ht())]);var It=K(st);A(It,()=>t.children??N),G(st),b(J,nt)};V(Le,J=>{t.child?J(Be):J(Ve,-1)})}b(Me,qt)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})};V(_,D=>{(l.shouldRender||i())&&D(R)})}b(n,C),I()}const gs={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};var vs=We("<svg><!><!></svg>");function bs(n,t){P(t,!0);const e=h(t,"color",3,"currentColor"),r=h(t,"size",3,24),s=h(t,"strokeWidth",3,2),i=h(t,"absoluteStrokeWidth",3,!1),o=h(t,"iconNode",19,()=>[]),a=O(t,["$$slots","$$events","$$legacy","name","color","size","strokeWidth","absoluteStrokeWidth","iconNode","children"]);var c=vs();j(c,g=>({...gs,...a,width:r(),height:r(),stroke:e(),"stroke-width":g,class:["lucide-icon lucide",t.name&&`lucide-${t.name}`,t.class]}),[()=>i()?Number(s())*24/Number(r()):s()]);var u=K(c);sn(u,17,o,an,(g,y)=>{var p=T(()=>tn(d(y),2));let l=()=>d(p)[0],f=()=>d(p)[1];var C=E(),_=w(C);on(_,l,!0,(R,D)=>{j(R,()=>({...f()}))}),b(g,C)});var v=ct(u);A(v,()=>t.children??N),G(c),b(n,c),I()}function ms(n,t){P(t,!0);let e=O(t,["$$slots","$$events","$$legacy"]);const r=[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]];bs(n,M({name:"x"},()=>e,{get iconNode(){return r},children:(s,i)=>{var o=E(),a=w(o);A(a,()=>t.children??N),b(s,o)},$$slots:{default:!0}})),I()}function Ls(n,t){P(t,!0);let e=h(t,"open",15,!1),r=O(t,["$$slots","$$events","$$legacy","open"]);var s=E(),i=w(s);z(i,()=>cs,(o,a)=>{a(o,M(()=>r,{get open(){return e()},set open(c){e(c)}}))}),b(n,s),I()}function ys(n,t){let e=O(t,["$$slots","$$events","$$legacy"]);var r=E(),s=w(r);z(s,()=>Cr,(i,o)=>{o(i,M(()=>e))}),b(n,r)}function Bs(n,t){P(t,!0);let e=h(t,"ref",15,null),r=O(t,["$$slots","$$events","$$legacy","ref","class"]);var s=E(),i=w(s);{let o=T(()=>$("text-lg leading-none font-semibold",t.class));z(i,()=>vr,(a,c)=>{c(a,M({"data-slot":"dialog-title",get class(){return d(o)}},()=>r,{get ref(){return e()},set ref(u){e(u)}}))})}b(n,s),I()}var ws=L("<div><!></div>");function Vs(n,t){P(t,!0);let e=h(t,"ref",15,null),r=O(t,["$$slots","$$events","$$legacy","ref","class","children"]);var s=ws();j(s,o=>({"data-slot":"dialog-footer",class:o,...r}),[()=>$("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t.class)]);var i=K(s);A(i,()=>t.children??N),G(s),de(s,o=>e(o),()=>e()),b(n,s),I()}var Ss=L("<div><!></div>");function Ws(n,t){P(t,!0);let e=h(t,"ref",15,null),r=O(t,["$$slots","$$events","$$legacy","ref","class","children"]);var s=Ss();j(s,o=>({"data-slot":"dialog-header",class:o,...r}),[()=>$("flex flex-col gap-2 text-center sm:text-start",t.class)]);var i=K(s);A(i,()=>t.children??N),G(s),de(s,o=>e(o),()=>e()),b(n,s),I()}function Es(n,t){P(t,!0);let e=h(t,"ref",15,null),r=O(t,["$$slots","$$events","$$legacy","ref","class"]);var s=E(),i=w(s);{let o=T(()=>$("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t.class));z(i,()=>is,(a,c)=>{c(a,M({"data-slot":"dialog-overlay",get class(){return d(o)}},()=>r,{get ref(){return e()},set ref(u){e(u)}}))})}b(n,s),I()}var Ts=L('<!> <span class="sr-only">Close</span>',1),Cs=L("<!> <!>",1),As=L("<!> <!>",1);function js(n,t){P(t,!0);let e=h(t,"ref",15,null),r=h(t,"showCloseButton",3,!0),s=O(t,["$$slots","$$events","$$legacy","ref","class","portalProps","children","showCloseButton"]);ys(n,M(()=>t.portalProps,{children:(i,o)=>{var a=As(),c=w(a);z(c,()=>Es,(v,g)=>{g(v,{})});var u=ct(c,2);{let v=T(()=>$("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t.class));z(u,()=>ps,(g,y)=>{y(g,M({"data-slot":"dialog-content",get class(){return d(v)}},()=>s,{get ref(){return e()},set ref(p){e(p)},children:(p,l)=>{var f=Cs(),C=w(f);A(C,()=>t.children??N);var _=ct(C,2);{var R=D=>{var H=E(),At=w(H);z(At,()=>ds,(Pt,ht)=>{ht(Pt,{class:"ring-offset-background focus:ring-ring absolute end-4 top-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:(Z,Fe)=>{var X=Ts(),Xt=w(X);ms(Xt,{}),en(2),b(Z,X)},$$slots:{default:!0}})}),b(D,H)};V(_,D=>{r()&&D(R)})}b(p,f)},$$slots:{default:!0}}))})}b(i,a)},$$slots:{default:!0}})),I()}function zs(n,t){P(t,!0);let e=h(t,"ref",15,null),r=O(t,["$$slots","$$events","$$legacy","ref","class"]);var s=E(),i=w(s);{let o=T(()=>$("text-muted-foreground text-sm",t.class));z(i,()=>us,(a,c)=>{c(a,M({"data-slot":"dialog-description",get class(){return d(o)}},()=>r,{get ref(){return e()},set ref(u){e(u)}}))})}b(n,s),I()}function Us(n,t){const e=rn(t,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"M12 8V4H8"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2"}],["path",{d:"M2 14h2"}],["path",{d:"M20 14h2"}],["path",{d:"M15 13v2"}],["path",{d:"M9 13v2"}]];un(n,M({name:"bot"},()=>e,{get iconNode(){return r},children:(s,i)=>{var o=E(),a=w(o);cn(a,t,"default",{}),b(s,o)},$$slots:{default:!0}}))}export{k as A,Us as B,ge as C,js as D,Zr as E,Jr as F,Cr as G,cs as H,bs as I,is as J,ps as K,ds as L,vr as M,us as N,re as P,le as S,ts as T,ms as X,Ws as a,Bs as b,zs as c,Vs as d,Ls as e,Hn as f,ft as g,Ce as h,m as i,et as j,pt as k,Ms as l,W as m,zn as n,or as o,qr as p,sr as q,Rs as r,yn as s,tt as t,es as u,ye as v,B as w,Fs as x,yt as y,we as z};
5
+ `," ")),t.hidden===!1&&(t.hidden=void 0,delete t.hidden),t.disabled===!1&&(t.disabled=void 0,delete t.disabled),t}const qn=typeof window<"u"?window:void 0;function Hn(n){let t=n.activeElement;for(;t?.shadowRoot;){const e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}class Xn{#t;#e;constructor(t={}){const{window:e=qn,document:r=e?.document}=t;e!==void 0&&(this.#t=r,this.#e=ln(s=>{const i=F(e,"focusin",s),o=F(e,"focusout",s);return()=>{i(),o()}}))}get current(){return this.#e?.(),this.#t?Hn(this.#t):null}}new Xn;class ge{#t;#e;constructor(t){this.#t=t,this.#e=Symbol(t)}get key(){return this.#e}exists(){return Xe(this.#e)}get(){const t=Zt(this.#e);if(t===void 0)throw new Error(`Context "${this.#t}" not found`);return t}getOr(t){const e=Zt(this.#e);return e===void 0?t:e}set(t){return Ye(this.#e,t)}}function Yn(n,t){switch(n){case"post":Ct(t);break;case"pre":Ze(t);break}}function ve(n,t,e,r={}){const{lazy:s=!1}=r;let i=!s,o=Array.isArray(n)?[]:void 0;Yn(t,()=>{const a=Array.isArray(n)?n.map(u=>u()):n();if(!i){i=!0,o=a;return}const c=Ot(()=>e(a,o));return o=a,c})}function B(n,t,e){ve(n,"post",t,e)}function Zn(n,t,e){ve(n,"pre",t,e)}B.pre=Zn;function tt(n){Ct(()=>()=>{n()})}function Jn(n,t){return setTimeout(t,n)}function Ft(n){Je().then(n)}const Qn=1,$n=9,tr=11;function Dt(n){return dt(n)&&n.nodeType===Qn&&typeof n.nodeName=="string"}function be(n){return dt(n)&&n.nodeType===$n}function er(n){return dt(n)&&n.constructor?.name==="VisualViewport"}function nr(n){return dt(n)&&n.nodeType!==void 0}function me(n){return nr(n)&&n.nodeType===tr&&"host"in n}function rr(n,t){if(!n||!t||!Dt(n)||!Dt(t))return!1;const e=t.getRootNode?.();if(n===t||n.contains(t))return!0;if(e&&me(e)){let r=t;for(;r;){if(n===r)return!0;r=r.parentNode||r.host}}return!1}function sr(n){return be(n)?n:er(n)?n.document:n?.ownerDocument??document}function or(n){return me(n)?or(n.host):be(n)?n.defaultView??window:Dt(n)?n.ownerDocument?.defaultView??window:window}function ir(n){let t=n.activeElement;for(;t?.shadowRoot;){const e=t.shadowRoot.activeElement;if(e===t)break;t=e}return t}class ye{element;#t=T(()=>this.element.current?this.element.current.getRootNode()??document:document);get root(){return d(this.#t)}set root(t){S(this.#t,t)}constructor(t){typeof t=="function"?this.element=m(t):this.element=t}getDocument=()=>sr(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>ir(this.root);isActiveElement=t=>t===this.getActiveElement();getElementById(t){return this.root.getElementById(t)}querySelector=t=>this.root?this.root.querySelector(t):null;querySelectorAll=t=>this.root?this.root.querySelectorAll(t):[];setTimeout=(t,e)=>this.getWindow().setTimeout(t,e);clearTimeout=t=>this.getWindow().clearTimeout(t)}function et(n,t){return{[hn()]:e=>mn(n)?(n.current=e,Ot(()=>t?.(e)),()=>{"isConnected"in e&&e.isConnected||(n.current=null,t?.(null))}):(n(e),Ot(()=>t?.(e)),()=>{"isConnected"in e&&e.isConnected||(n(null),t?.(null))})}}function ar(n){return n?"true":"false"}function yt(n){return n?"":void 0}function ur(n){return n?"open":"closed"}class cr{#t;#e;attrs;constructor(t){this.#t=t.getVariant?t.getVariant():null,this.#e=this.#t?`data-${this.#t}-`:`data-${t.component}-`,this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(t.parts.map(e=>[e,this.getAttr(e)]))}getAttr(t,e){return e?`data-${e}-${t}`:`${this.#e}${t}`}selector(t,e){return`[${this.getAttr(t,e)}]`}}function we(n){const t=new cr(n);return{...t.attrs,selector:t.selector,getAttr:t.getAttr}}const Se="Enter",lr="Escape",Ee=" ",Te=typeof document<"u",ee=dr();function dr(){return Te&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function ne(n){return n instanceof HTMLElement}function Rs(n){return n instanceof Element}function fr(n){return n instanceof Element||n instanceof SVGElement}function Fs(n){return n.matches(":focus-visible")}function Ms(n){return n!==null}class hr{#t;#e=null;constructor(t){this.#t=t,tt(()=>this.#n())}#n(){this.#e&&(window.cancelAnimationFrame(this.#e),this.#e=null)}run(t){this.#n();const e=this.#t.ref.current;if(e){if(typeof e.getAnimations!="function"){this.#r(t);return}this.#e=window.requestAnimationFrame(()=>{const r=e.getAnimations();if(r.length===0){this.#r(t);return}Promise.allSettled(r.map(s=>s.finished)).then(()=>{this.#r(t)})})}}#r(t){const e=()=>{t()};this.#t.afterTick?Ft(e):e()}}class re{#t;#e;#n;#r=x(!1);constructor(t){this.#t=t,S(this.#r,t.open.current,!0),this.#e=t.enabled??!0,this.#n=new hr({ref:this.#t.ref,afterTick:this.#t.open}),B(()=>this.#t.open.current,e=>{e&&S(this.#r,!0),this.#e&&this.#n.run(()=>{e===this.#t.open.current&&(this.#t.open.current||S(this.#r,!1),this.#t.onComplete?.())})})}get shouldRender(){return d(this.#r)}}function k(){}function ft(n,t){return`bits-${n}`}const pr=we({component:"dialog",parts:["content","trigger","overlay","title","description","close","cancel","action"]}),U=new ge("Dialog.Root | AlertDialog.Root");class Mt{static create(t){const e=U.getOr(null);return U.set(new Mt(t,e))}opts;#t=x(null);get triggerNode(){return d(this.#t)}set triggerNode(t){S(this.#t,t,!0)}#e=x(null);get contentNode(){return d(this.#e)}set contentNode(t){S(this.#e,t,!0)}#n=x(null);get overlayNode(){return d(this.#n)}set overlayNode(t){S(this.#n,t,!0)}#r=x(null);get descriptionNode(){return d(this.#r)}set descriptionNode(t){S(this.#r,t,!0)}#s=x(void 0);get contentId(){return d(this.#s)}set contentId(t){S(this.#s,t,!0)}#o=x(void 0);get titleId(){return d(this.#o)}set titleId(t){S(this.#o,t,!0)}#u=x(void 0);get triggerId(){return d(this.#u)}set triggerId(t){S(this.#u,t,!0)}#i=x(void 0);get descriptionId(){return d(this.#i)}set descriptionId(t){S(this.#i,t,!0)}#l=x(null);get cancelNode(){return d(this.#l)}set cancelNode(t){S(this.#l,t,!0)}#c=x(0);get nestedOpenCount(){return d(this.#c)}set nestedOpenCount(t){S(this.#c,t,!0)}depth;parent;contentPresence;overlayPresence;constructor(t,e){this.opts=t,this.parent=e,this.depth=e?e.depth+1:0,this.handleOpen=this.handleOpen.bind(this),this.handleClose=this.handleClose.bind(this),this.contentPresence=new re({ref:m(()=>this.contentNode),open:this.opts.open,enabled:!0,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new re({ref:m(()=>this.overlayNode),open:this.opts.open,enabled:!0}),B(()=>this.opts.open.current,r=>{this.parent&&(r?this.parent.incrementNested():this.parent.decrementNested())},{lazy:!0}),tt(()=>{this.opts.open.current&&this.parent?.decrementNested()})}handleOpen(){this.opts.open.current||(this.opts.open.current=!0)}handleClose(){this.opts.open.current&&(this.opts.open.current=!1)}getBitsAttr=t=>pr.getAttr(t,this.opts.variant.current);incrementNested(){this.nestedOpenCount++,this.parent?.incrementNested()}decrementNested(){this.nestedOpenCount!==0&&(this.nestedOpenCount--,this.parent?.decrementNested())}#a=T(()=>({"data-state":ur(this.opts.open.current)}));get sharedProps(){return d(this.#a)}set sharedProps(t){S(this.#a,t)}}class Ce{static create(t){return new Ce(t,U.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=et(this.opts.ref,r=>{this.root.triggerNode=r,this.root.triggerId=r?.id}),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(t){this.opts.disabled.current||t.button>0||this.root.handleOpen()}onkeydown(t){this.opts.disabled.current||(t.key===Ee||t.key===Se)&&(t.preventDefault(),this.root.handleOpen())}#t=T(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":ar(this.root.opts.open.current),"aria-controls":this.root.contentId,[this.root.getBitsAttr("trigger")]:"",onkeydown:this.onkeydown,onclick:this.onclick,disabled:this.opts.disabled.current?!0:void 0,...this.root.sharedProps,...this.attachment}));get props(){return d(this.#t)}set props(t){S(this.#t,t)}}class Lt{static create(t){return new Lt(t,U.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=et(this.opts.ref),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(t){this.opts.disabled.current||t.button>0||this.root.handleClose()}onkeydown(t){this.opts.disabled.current||(t.key===Ee||t.key===Se)&&(t.preventDefault(),this.root.handleClose())}#t=T(()=>({id:this.opts.id.current,[this.root.getBitsAttr(this.opts.variant.current)]:"",onclick:this.onclick,onkeydown:this.onkeydown,disabled:this.opts.disabled.current?!0:void 0,tabindex:0,...this.root.sharedProps,...this.attachment}));get props(){return d(this.#t)}set props(t){S(this.#t,t)}}class Bt{static create(t){return new Bt(t,U.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.root.titleId=this.opts.id.current,this.attachment=et(this.opts.ref),B.pre(()=>this.opts.id.current,r=>{this.root.titleId=r})}#t=T(()=>({id:this.opts.id.current,role:"heading","aria-level":this.opts.level.current,[this.root.getBitsAttr("title")]:"",...this.root.sharedProps,...this.attachment}));get props(){return d(this.#t)}set props(t){S(this.#t,t)}}class Vt{static create(t){return new Vt(t,U.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.root.descriptionId=this.opts.id.current,this.attachment=et(this.opts.ref,r=>{this.root.descriptionNode=r}),B.pre(()=>this.opts.id.current,r=>{this.root.descriptionId=r})}#t=T(()=>({id:this.opts.id.current,[this.root.getBitsAttr("description")]:"",...this.root.sharedProps,...this.attachment}));get props(){return d(this.#t)}set props(t){S(this.#t,t)}}class Wt{static create(t){return new Wt(t,U.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=et(this.opts.ref,r=>{this.root.contentNode=r,this.root.contentId=r?.id})}#t=T(()=>({open:this.root.opts.open.current}));get snippetProps(){return d(this.#t)}set snippetProps(t){S(this.#t,t)}#e=T(()=>({id:this.opts.id.current,role:this.root.opts.variant.current==="alert-dialog"?"alertdialog":"dialog","aria-modal":"true","aria-describedby":this.root.descriptionId,"aria-labelledby":this.root.titleId,[this.root.getBitsAttr("content")]:"",style:{pointerEvents:"auto",outline:this.root.opts.variant.current==="alert-dialog"?"none":void 0,"--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount,contain:"layout style"},tabindex:this.root.opts.variant.current==="alert-dialog"?-1:void 0,"data-nested-open":yt(this.root.nestedOpenCount>0),"data-nested":yt(this.root.parent!==null),...this.root.sharedProps,...this.attachment}));get props(){return d(this.#e)}set props(t){S(this.#e,t)}get shouldRender(){return this.root.contentPresence.shouldRender}}class jt{static create(t){return new jt(t,U.get())}opts;root;attachment;constructor(t,e){this.opts=t,this.root=e,this.attachment=et(this.opts.ref,r=>this.root.overlayNode=r)}#t=T(()=>({open:this.root.opts.open.current}));get snippetProps(){return d(this.#t)}set snippetProps(t){S(this.#t,t)}#e=T(()=>({id:this.opts.id.current,[this.root.getBitsAttr("overlay")]:"",style:{pointerEvents:"auto","--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount},"data-nested-open":yt(this.root.nestedOpenCount>0),"data-nested":yt(this.root.parent!==null),...this.root.sharedProps,...this.attachment}));get props(){return d(this.#e)}set props(t){S(this.#e,t)}get shouldRender(){return this.root.overlayPresence.shouldRender}}var gr=L("<div><!></div>");function vr(n,t){const e=lt();P(t,!0);let r=h(t,"id",19,()=>ft(e)),s=h(t,"ref",15,null),i=h(t,"level",3,2),o=O(t,["$$slots","$$events","$$legacy","id","ref","child","children","level"]);const a=Bt.create({id:m(()=>r()),level:m(()=>i()),ref:m(()=>s(),p=>s(p))}),c=T(()=>W(o,a.props));var u=E(),v=w(u);{var g=p=>{var l=E(),f=w(l);A(f,()=>t.child,()=>({props:d(c)})),b(p,l)},y=p=>{var l=gr();j(l,()=>({...d(c)}));var f=K(l);A(f,()=>t.children??N),G(l),b(p,l)};V(v,p=>{t.child?p(g):p(y,-1)})}b(n,u),I()}function br(n,t){var e=E(),r=w(e);gn(r,()=>t.children,s=>{var i=E(),o=w(i);A(o,()=>t.children??N),b(s,i)}),b(n,e)}const mr=new ge("BitsConfig");function yr(){const n=new wr(null,{});return mr.getOr(n).opts}class wr{opts;constructor(t,e){const r=Sr(t,e);this.opts={defaultPortalTo:r(s=>s.defaultPortalTo),defaultLocale:r(s=>s.defaultLocale)}}}function Sr(n,t){return e=>m(()=>{const s=e(t)?.current;if(s!==void 0)return s;if(n!==null)return e(n.opts)?.current})}function Er(n,t){return e=>{const r=yr();return m(()=>{const s=e();if(s!==void 0)return s;const i=n(r).current;return i!==void 0?i:t})}}const Tr=Er(n=>n.defaultPortalTo,"body");function Cr(n,t){P(t,!0);const e=Tr(()=>t.to),r=Qe();let s=T(i);function i(){if(!Te||t.disabled)return null;let g=null;return typeof e.current=="string"?g=document.querySelector(e.current):g=e.current,g}let o;function a(){o&&(fn(o),o=null)}B([()=>d(s),()=>t.disabled],([g,y])=>{if(!g||y){a();return}return o=dn(br,{target:g,props:{children:t.children},context:r}),()=>{a()}});var c=E(),u=w(c);{var v=g=>{var y=E(),p=w(y);A(p,()=>t.children??N),b(g,y)};V(u,g=>{t.disabled&&g(v)})}b(n,c),I()}function se(n,t=500){let e=null;const r=(...s)=>{e!==null&&clearTimeout(e),e=setTimeout(()=>{n(...s)},t)};return r.destroy=()=>{e!==null&&(clearTimeout(e),e=null)},r}function Ae(n,t){return n===t||n.contains(t)}function Pe(n){return n?.ownerDocument??document}function Ar(n,t){const{clientX:e,clientY:r}=n,s=t.getBoundingClientRect();return e<s.left||e>s.right||r<s.top||r>s.bottom}var Ie=["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] *)"],Rt=Ie.join(","),ke=typeof Element>"u",Q=ke?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,wt=!ke&&Element.prototype.getRootNode?function(n){var t;return n==null||(t=n.getRootNode)===null||t===void 0?void 0:t.call(n)}:function(n){return n?.ownerDocument},St=function(t,e){var r;e===void 0&&(e=!0);var s=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=s===""||s==="true",o=i||e&&t&&(typeof t.closest=="function"?t.closest("[inert]"):St(t.parentNode));return o},Pr=function(t){var e,r=t==null||(e=t.getAttribute)===null||e===void 0?void 0:e.call(t,"contenteditable");return r===""||r==="true"},xe=function(t,e,r){if(St(t))return[];var s=Array.prototype.slice.apply(t.querySelectorAll(Rt));return e&&Q.call(t,Rt)&&s.unshift(t),s=s.filter(r),s},Et=function(t,e,r){for(var s=[],i=Array.from(t);i.length;){var o=i.shift();if(!St(o,!1))if(o.tagName==="SLOT"){var a=o.assignedElements(),c=a.length?a:o.children,u=Et(c,!0,r);r.flatten?s.push.apply(s,u):s.push({scopeParent:o,candidates:u})}else{var v=Q.call(o,Rt);v&&r.filter(o)&&(e||!t.includes(o))&&s.push(o);var g=o.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(o),y=!St(g,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(o));if(g&&y){var p=Et(g===!0?o.children:g.children,!0,r);r.flatten?s.push.apply(s,p):s.push({scopeParent:o,candidates:p})}else i.unshift.apply(i,o.children)}}return s},Ne=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Oe=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Pr(t))&&!Ne(t)?0:t.tabIndex},Ir=function(t,e){var r=Oe(t);return r<0&&e&&!Ne(t)?0:r},kr=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},_e=function(t){return t.tagName==="INPUT"},xr=function(t){return _e(t)&&t.type==="hidden"},Nr=function(t){var e=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return e},Or=function(t,e){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===e)return t[r]},_r=function(t){if(!t.name)return!0;var e=t.form||wt(t),r=function(a){return e.querySelectorAll('input[type="radio"][name="'+a+'"]')},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(o){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",o.message),!1}var i=Or(s,t.form);return!i||i===t},Dr=function(t){return _e(t)&&t.type==="radio"},Rr=function(t){return Dr(t)&&!_r(t)},Fr=function(t){var e,r=t&&wt(t),s=(e=r)===null||e===void 0?void 0:e.host,i=!1;if(r&&r!==t){var o,a,c;for(i=!!((o=s)!==null&&o!==void 0&&(a=o.ownerDocument)!==null&&a!==void 0&&a.contains(s)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!i&&s;){var u,v,g;r=wt(s),s=(u=r)===null||u===void 0?void 0:u.host,i=!!((v=s)!==null&&v!==void 0&&(g=v.ownerDocument)!==null&&g!==void 0&&g.contains(s))}}return i},oe=function(t){var e=t.getBoundingClientRect(),r=e.width,s=e.height;return r===0&&s===0},Mr=function(t,e){var r=e.displayCheck,s=e.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var i=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!i}if(getComputedStyle(t).visibility==="hidden")return!0;var o=Q.call(t,"details>summary:first-of-type"),a=o?t.parentElement:t;if(Q.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof s=="function"){for(var c=t;t;){var u=t.parentElement,v=wt(t);if(u&&!u.shadowRoot&&s(u)===!0)return oe(t);t.assignedSlot?t=t.assignedSlot:!u&&v!==t.ownerDocument?t=v.host:t=u}t=c}if(Fr(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return oe(t);return!1},Lr=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if(e.tagName==="FIELDSET"&&e.disabled){for(var r=0;r<e.children.length;r++){var s=e.children.item(r);if(s.tagName==="LEGEND")return Q.call(e,"fieldset[disabled] *")?!0:!s.contains(t)}return!0}e=e.parentElement}return!1},Tt=function(t,e){return!(e.disabled||xr(e)||Mr(e,t)||Nr(e)||Lr(e))},ie=function(t,e){return!(Rr(e)||Oe(e)<0||!Tt(t,e))},Br=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},De=function(t){var e=[],r=[];return t.forEach(function(s,i){var o=!!s.scopeParent,a=o?s.scopeParent:s,c=Ir(a,o),u=o?De(s.candidates):a;c===0?o?e.push.apply(e,u):e.push(a):r.push({documentOrder:i,tabIndex:c,item:s,isScope:o,content:u})}),r.sort(kr).reduce(function(s,i){return i.isScope?s.push.apply(s,i.content):s.push(i.content),s},[]).concat(e)},Vr=function(t,e){e=e||{};var r;return e.getShadowRoot?r=Et([t],e.includeContainer,{filter:ie.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:Br}):r=xe(t,e.includeContainer,ie.bind(null,e)),De(r)},Wr=function(t,e){e=e||{};var r;return e.getShadowRoot?r=Et([t],e.includeContainer,{filter:Tt.bind(null,e),flatten:!0,getShadowRoot:e.getShadowRoot}):r=xe(t,e.includeContainer,Tt.bind(null,e)),r},jr=Ie.concat("iframe:not([inert]):not([inert] *)").join(","),zr=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return Q.call(t,jr)===!1?!1:Tt(e,t)};const Ur="data-context-menu-trigger",Kr="data-context-menu-content";we({component:"menu",parts:["trigger","content","sub-trigger","item","group","group-heading","checkbox-group","checkbox-item","radio-group","radio-item","separator","sub-content","arrow"]});globalThis.bitsDismissableLayers??=new Map;class zt{static create(t){return new zt(t)}opts;#t;#e;#n={pointerdown:!1};#r=!1;#s=!1;#o=void 0;#u;#i=k;constructor(t){this.opts=t,this.#e=t.interactOutsideBehavior,this.#t=t.onInteractOutside,this.#u=t.onFocusOutside,Ct(()=>{this.#o=Pe(this.opts.ref.current)});let e=k;const r=()=>{this.#f(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),e()};B([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return Jn(1,()=>{this.opts.ref.current&&(globalThis.bitsDismissableLayers.set(this,this.#e),e(),e=this.#c())}),r}),tt(()=>{this.#f.destroy(),globalThis.bitsDismissableLayers.delete(this),this.#d.destroy(),this.#i(),e()})}#l=t=>{t.defaultPrevented||this.opts.ref.current&&Ft(()=>{!this.opts.ref.current||this.#v(t.target)||t.target&&!this.#s&&this.#u.current?.(t)})};#c(){return ut(F(this.#o,"pointerdown",ut(this.#h,this.#g),{capture:!0}),F(this.#o,"pointerdown",ut(this.#p,this.#d)),F(this.#o,"focusin",this.#l))}#a=t=>{let e=t;e.defaultPrevented&&(e=ae(t)),this.#t.current(t)};#d=se(t=>{if(!this.opts.ref.current){this.#i();return}const e=this.opts.isValidEvent.current(t,this.opts.ref.current)||Hr(t,this.opts.ref.current);if(!this.#r||this.#b()||!e){this.#i();return}let r=t;if(r.defaultPrevented&&(r=ae(r)),this.#e.current!=="close"&&this.#e.current!=="defer-otherwise-close"){this.#i();return}t.pointerType==="touch"?(this.#i(),this.#i=F(this.#o,"click",this.#a,{once:!0})):this.#t.current(r)},10);#h=t=>{this.#n[t.type]=!0};#p=t=>{this.#n[t.type]=!1};#g=()=>{this.opts.ref.current&&(this.#r=qr(this.opts.ref.current))};#v=t=>this.opts.ref.current?Ae(this.opts.ref.current,t):!1;#f=se(()=>{for(const t in this.#n)this.#n[t]=!1;this.#r=!1},20);#b(){return Object.values(this.#n).some(Boolean)}#m=()=>{this.#s=!0};#y=()=>{this.#s=!1};props={onfocuscapture:this.#m,onblurcapture:this.#y}}function Gr(n=[...globalThis.bitsDismissableLayers]){return n.findLast(([t,{current:e}])=>e==="close"||e==="ignore")}function qr(n){const t=[...globalThis.bitsDismissableLayers],e=Gr(t);if(e)return e[0].opts.ref.current===n;const[r]=t[0];return r.opts.ref.current===n}function Hr(n,t){const e=n.target;if(!fr(e))return!1;const r=!!e.closest(`[${Ur}]`);if("button"in n&&n.button>0&&!r)return!1;if("button"in n&&n.button===0&&r)return!0;const s=!!t.closest(`[${Kr}]`);return r&&s?!1:Pe(e).documentElement.contains(e)&&!Ae(t,e)&&Ar(n,t)}function ae(n){const t=n.currentTarget,e=n.target;let r;n instanceof PointerEvent?r=new PointerEvent(n.type,n):r=new PointerEvent("pointerdown",n);let s=!1;return new Proxy(r,{get:(o,a)=>a==="currentTarget"?t:a==="target"?e:a==="preventDefault"?()=>{s=!0,typeof o.preventDefault=="function"&&o.preventDefault()}:a==="defaultPrevented"?s:a in o?o[a]:n[a]})}function Xr(n,t){P(t,!0);let e=h(t,"interactOutsideBehavior",3,"close"),r=h(t,"onInteractOutside",3,k),s=h(t,"onFocusOutside",3,k),i=h(t,"isValidEvent",3,()=>!1);const o=zt.create({id:m(()=>t.id),interactOutsideBehavior:m(()=>e()),onInteractOutside:m(()=>r()),enabled:m(()=>t.enabled),onFocusOutside:m(()=>s()),isValidEvent:m(()=>i()),ref:t.ref});var a=E(),c=w(a);A(c,()=>t.children??N,()=>({props:o.props})),b(n,a),I()}globalThis.bitsEscapeLayers??=new Map;class Ut{static create(t){return new Ut(t)}opts;domContext;constructor(t){this.opts=t,this.domContext=new ye(this.opts.ref);let e=k;B(()=>t.enabled.current,r=>(r&&(globalThis.bitsEscapeLayers.set(this,t.escapeKeydownBehavior),e=this.#t()),()=>{e(),globalThis.bitsEscapeLayers.delete(this)}))}#t=()=>F(this.domContext.getDocument(),"keydown",this.#e,{passive:!1});#e=t=>{if(t.key!==lr||!Yr(this))return;const e=new KeyboardEvent(t.type,t);t.preventDefault();const r=this.opts.escapeKeydownBehavior.current;r!=="close"&&r!=="defer-otherwise-close"||this.opts.onEscapeKeydown.current(e)}}function Yr(n){const t=[...globalThis.bitsEscapeLayers],e=t.findLast(([s,{current:i}])=>i==="close"||i==="ignore");if(e)return e[0]===n;const[r]=t[0];return r===n}function Zr(n,t){P(t,!0);let e=h(t,"escapeKeydownBehavior",3,"close"),r=h(t,"onEscapeKeydown",3,k);Ut.create({escapeKeydownBehavior:m(()=>e()),onEscapeKeydown:m(()=>r()),enabled:m(()=>t.enabled),ref:t.ref});var s=E(),i=w(s);A(i,()=>t.children??N),b(n,s),I()}class Kt{static instance;#t=yn([]);#e=new WeakMap;#n=new WeakMap;static getInstance(){return this.instance||(this.instance=new Kt),this.instance}register(t){const e=this.getActive();e&&e!==t&&e.pause();const r=document.activeElement;r&&r!==document.body&&this.#n.set(t,r),this.#t.current=this.#t.current.filter(s=>s!==t),this.#t.current.unshift(t)}unregister(t){this.#t.current=this.#t.current.filter(r=>r!==t);const e=this.getActive();e&&e.resume()}getActive(){return this.#t.current[0]}setFocusMemory(t,e){this.#e.set(t,e)}getFocusMemory(t){return this.#e.get(t)}isActiveScope(t){return this.getActive()===t}setPreFocusMemory(t,e){this.#n.set(t,e)}getPreFocusMemory(t){return this.#n.get(t)}clearPreFocusMemory(t){this.#n.delete(t)}}class Gt{#t=!1;#e=null;#n=Kt.getInstance();#r=[];#s;constructor(t){this.#s=t}get paused(){return this.#t}pause(){this.#t=!0}resume(){this.#t=!1}#o(){for(const t of this.#r)t();this.#r=[]}mount(t){this.#e&&this.unmount(),this.#e=t,this.#n.register(this),this.#l(),this.#u()}unmount(){this.#e&&(this.#o(),this.#i(),this.#n.unregister(this),this.#n.clearPreFocusMemory(this),this.#e=null)}#u(){if(!this.#e)return;const t=new CustomEvent("focusScope.onOpenAutoFocus",{bubbles:!1,cancelable:!0});this.#s.onOpenAutoFocus.current(t),t.defaultPrevented||requestAnimationFrame(()=>{if(!this.#e)return;const e=this.#a();e?(e.focus(),this.#n.setFocusMemory(this,e)):this.#e.focus()})}#i(){const t=new CustomEvent("focusScope.onCloseAutoFocus",{bubbles:!1,cancelable:!0});if(this.#s.onCloseAutoFocus.current?.(t),!t.defaultPrevented){const e=this.#n.getPreFocusMemory(this);if(e&&document.contains(e))try{e.focus()}catch{document.body.focus()}}}#l(){if(!this.#e||!this.#s.trap.current)return;const t=this.#e,e=t.ownerDocument,r=o=>{if(this.#t||!this.#n.isActiveScope(this))return;const a=o.target;if(!a)return;if(t.contains(a))this.#n.setFocusMemory(this,a);else{const u=this.#n.getFocusMemory(this);if(u&&t.contains(u)&&zr(u))o.preventDefault(),u.focus();else{const v=this.#a(),g=this.#d()[0];(v||g||t).focus()}}},s=o=>{if(!this.#s.loop||this.#t||o.key!=="Tab"||!this.#n.isActiveScope(this))return;const a=this.#c();if(a.length===0)return;const c=a[0],u=a[a.length-1];!o.shiftKey&&e.activeElement===u?(o.preventDefault(),c.focus()):o.shiftKey&&e.activeElement===c&&(o.preventDefault(),u.focus())};this.#r.push(F(e,"focusin",r,{capture:!0}),F(t,"keydown",s));const i=new MutationObserver(()=>{const o=this.#n.getFocusMemory(this);if(o&&!t.contains(o)){const a=this.#a(),c=this.#d()[0],u=a||c;u?(u.focus(),this.#n.setFocusMemory(this,u)):t.focus()}});i.observe(t,{childList:!0,subtree:!0}),this.#r.push(()=>i.disconnect())}#c(){return this.#e?Vr(this.#e,{includeContainer:!1,getShadowRoot:!0}):[]}#a(){return this.#c()[0]||null}#d(){return this.#e?Wr(this.#e,{includeContainer:!1,getShadowRoot:!0}):[]}static use(t){let e=null;return B([()=>t.ref.current,()=>t.enabled.current],([r,s])=>{r&&s?(e||(e=new Gt(t)),e.mount(r)):e&&(e.unmount(),e=null)}),tt(()=>{e?.unmount()}),{get props(){return{tabindex:-1}}}}}function Jr(n,t){P(t,!0);let e=h(t,"enabled",3,!1),r=h(t,"trapFocus",3,!1),s=h(t,"loop",3,!1),i=h(t,"onCloseAutoFocus",3,k),o=h(t,"onOpenAutoFocus",3,k);const a=Gt.use({enabled:m(()=>e()),trap:m(()=>r()),loop:s(),onCloseAutoFocus:m(()=>i()),onOpenAutoFocus:m(()=>o()),ref:t.ref});var c=E(),u=w(c);A(u,()=>t.focusScope??N,()=>({props:a.props})),b(n,c),I()}globalThis.bitsTextSelectionLayers??=new Map;class qt{static create(t){return new qt(t)}opts;domContext;#t=k;constructor(t){this.opts=t,this.domContext=new ye(t.ref);let e=k;B(()=>this.opts.enabled.current,r=>(r&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),e(),e=this.#e()),()=>{e(),this.#r(),globalThis.bitsTextSelectionLayers.delete(this)}))}#e(){return ut(F(this.domContext.getDocument(),"pointerdown",this.#n),F(this.domContext.getDocument(),"pointerup",he(this.#r,this.opts.onPointerUp.current)))}#n=t=>{const e=this.opts.ref.current,r=t.target;!ne(e)||!ne(r)||!this.opts.enabled.current||!$r(this)||!rr(e,r)||(this.opts.onPointerDown.current(t),!t.defaultPrevented&&(this.#t=Qr(e,this.domContext.getDocument().body)))};#r=()=>{this.#t(),this.#t=k}}const ue=n=>n.style.userSelect||n.style.webkitUserSelect;function Qr(n,t){const e=ue(t),r=ue(n);return gt(t,"none"),gt(n,"text"),()=>{gt(t,e),gt(n,r)}}function gt(n,t){n.style.userSelect=t,n.style.webkitUserSelect=t}function $r(n){const t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;const e=t.at(-1);return e?e[0]===n:!1}function ts(n,t){P(t,!0);let e=h(t,"preventOverflowTextSelection",3,!0),r=h(t,"onPointerDown",3,k),s=h(t,"onPointerUp",3,k);qt.create({id:m(()=>t.id),onPointerDown:m(()=>r()),onPointerUp:m(()=>s()),enabled:m(()=>t.enabled&&e()),ref:t.ref});var i=E(),o=w(i);A(o,()=>t.children??N),b(n,i),I()}globalThis.bitsIdCounter??={current:0};function es(n="bits"){return globalThis.bitsIdCounter.current++,`${n}-${globalThis.bitsIdCounter.current}`}class ns{#t;#e=0;#n=x();#r;constructor(t){this.#t=t}#s(){this.#e-=1,this.#r&&this.#e<=0&&(this.#r(),S(this.#n,void 0),this.#r=void 0)}get(...t){return this.#e+=1,d(this.#n)===void 0&&(this.#r=$e(()=>{S(this.#n,this.#t(...t),!0)})),Ct(()=>()=>{this.#s()}),d(this.#n)}}const bt=new vn;let vt=x(null),xt=null,it=null,at=!1;const ce=m(()=>{for(const n of bt.values())if(n)return!0;return!1});let Nt=null;const rs=new ns(()=>{function n(){document.body.setAttribute("style",d(vt)??""),document.body.style.removeProperty("--scrollbar-width"),ee&&xt?.(),S(vt,null)}function t(){it!==null&&(window.clearTimeout(it),it=null)}function e(s,i){t(),at=!0,Nt=Date.now();const o=Nt,a=()=>{it=null,Nt===o&&(Re(bt)?at=!1:(at=!1,i()))},c=s===null?24:s;it=window.setTimeout(a,c)}function r(){d(vt)===null&&bt.size===0&&!at&&S(vt,document.body.getAttribute("style"),!0)}return B(()=>ce.current,()=>{if(!ce.current)return;r(),at=!1;const s=getComputedStyle(document.documentElement),i=getComputedStyle(document.body),o=s.scrollbarGutter?.includes("stable")||i.scrollbarGutter?.includes("stable"),a=window.innerWidth-document.documentElement.clientWidth,u={padding:Number.parseInt(i.paddingRight??"0",10)+a,margin:Number.parseInt(i.marginRight??"0",10)};a>0&&!o&&(document.body.style.paddingRight=`${u.padding}px`,document.body.style.marginRight=`${u.margin}px`,document.body.style.setProperty("--scrollbar-width",`${a}px`)),document.body.style.overflow="hidden",ee&&(xt=F(document,"touchmove",v=>{v.target===document.documentElement&&(v.touches.length>1||v.preventDefault())},{passive:!1})),Ft(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})}),tt(()=>()=>{xt?.()}),{get lockMap(){return bt},resetBodyStyle:n,scheduleCleanupIfNoNewLocks:e,cancelPendingCleanup:t,ensureInitialStyleCaptured:r}});class ss{#t=es();#e;#n=()=>null;#r;locked;constructor(t,e=()=>null){this.#e=t,this.#n=e,this.#r=rs.get(),this.#r&&(this.#r.cancelPendingCleanup(),this.#r.ensureInitialStyleCaptured(),this.#r.lockMap.set(this.#t,this.#e??!1),this.locked=m(()=>this.#r.lockMap.get(this.#t)??!1,r=>this.#r.lockMap.set(this.#t,r)),tt(()=>{if(this.#r.lockMap.delete(this.#t),Re(this.#r.lockMap))return;const r=this.#n();this.#r.scheduleCleanupIfNoNewLocks(r,()=>{this.#r.resetBodyStyle()})}))}}function Re(n){for(const[t,e]of n)if(e)return!0;return!1}function le(n,t){P(t,!0);let e=h(t,"preventScroll",3,!0),r=h(t,"restoreScrollDelay",3,null);e()&&new ss(e(),()=>r()),I()}var os=L("<div><!></div>");function is(n,t){const e=lt();P(t,!0);let r=h(t,"id",19,()=>ft(e)),s=h(t,"forceMount",3,!1),i=h(t,"ref",15,null),o=O(t,["$$slots","$$events","$$legacy","id","forceMount","child","children","ref"]);const a=jt.create({id:m(()=>r()),ref:m(()=>i(),y=>i(y))}),c=T(()=>W(o,a.props));var u=E(),v=w(u);{var g=y=>{var p=E(),l=w(p);{var f=_=>{var R=E(),D=w(R);{let q=T(()=>({props:W(d(c)),...a.snippetProps}));A(D,()=>t.child,()=>d(q))}b(_,R)},C=_=>{var R=os();j(R,q=>({...q}),[()=>W(d(c))]);var D=K(R);A(D,()=>t.children??N,()=>a.snippetProps),G(R),b(_,R)};V(l,_=>{t.child?_(f):_(C,-1)})}b(y,p)};V(v,y=>{(a.shouldRender||s())&&y(g)})}b(n,u),I()}var as=L("<div><!></div>");function us(n,t){const e=lt();P(t,!0);let r=h(t,"id",19,()=>ft(e)),s=h(t,"ref",15,null),i=O(t,["$$slots","$$events","$$legacy","id","children","child","ref"]);const o=Vt.create({id:m(()=>r()),ref:m(()=>s(),y=>s(y))}),a=T(()=>W(i,o.props));var c=E(),u=w(c);{var v=y=>{var p=E(),l=w(p);A(l,()=>t.child,()=>({props:d(a)})),b(y,p)},g=y=>{var p=as();j(p,()=>({...d(a)}));var l=K(p);A(l,()=>t.children??N),G(p),b(y,p)};V(u,y=>{t.child?y(v):y(g,-1)})}b(n,c),I()}function cs(n,t){P(t,!0);let e=h(t,"open",15,!1),r=h(t,"onOpenChange",3,k),s=h(t,"onOpenChangeComplete",3,k);Mt.create({variant:m(()=>"dialog"),open:m(()=>e(),a=>{e(a),r()(a)}),onOpenChangeComplete:m(()=>s())});var i=E(),o=w(i);A(o,()=>t.children??N),b(n,i),I()}var ls=L("<button><!></button>");function ds(n,t){const e=lt();P(t,!0);let r=h(t,"id",19,()=>ft(e)),s=h(t,"ref",15,null),i=h(t,"disabled",3,!1),o=O(t,["$$slots","$$events","$$legacy","children","child","id","ref","disabled"]);const a=Lt.create({variant:m(()=>"close"),id:m(()=>r()),ref:m(()=>s(),p=>s(p)),disabled:m(()=>!!i())}),c=T(()=>W(o,a.props));var u=E(),v=w(u);{var g=p=>{var l=E(),f=w(l);A(f,()=>t.child,()=>({props:d(c)})),b(p,l)},y=p=>{var l=ls();j(l,()=>({...d(c)}));var f=K(l);A(f,()=>t.children??N),G(l),b(p,l)};V(v,p=>{t.child?p(g):p(y,-1)})}b(n,u),I()}var fs=L("<!> <!>",1),hs=L("<!> <div><!></div>",1);function ps(n,t){const e=lt();P(t,!0);let r=h(t,"id",19,()=>ft(e)),s=h(t,"ref",15,null),i=h(t,"forceMount",3,!1),o=h(t,"onCloseAutoFocus",3,k),a=h(t,"onOpenAutoFocus",3,k),c=h(t,"onEscapeKeydown",3,k),u=h(t,"onInteractOutside",3,k),v=h(t,"trapFocus",3,!0),g=h(t,"preventScroll",3,!0),y=h(t,"restoreScrollDelay",3,null),p=O(t,["$$slots","$$events","$$legacy","id","children","child","ref","forceMount","onCloseAutoFocus","onOpenAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","restoreScrollDelay"]);const l=Wt.create({id:m(()=>r()),ref:m(()=>s(),D=>s(D))}),f=T(()=>W(p,l.props));var C=E(),_=w(C);{var R=D=>{Jr(D,{get ref(){return l.opts.ref},loop:!0,get trapFocus(){return v()},get enabled(){return l.root.opts.open.current},get onOpenAutoFocus(){return a()},get onCloseAutoFocus(){return o()},focusScope:(At,Pt)=>{let ht=()=>Pt?.().props;Zr(At,M(()=>d(f),{get enabled(){return l.root.opts.open.current},get ref(){return l.opts.ref},onEscapeKeydown:Z=>{c()(Z),!Z.defaultPrevented&&l.root.handleClose()},children:(Z,Fe)=>{Xr(Z,M(()=>d(f),{get ref(){return l.opts.ref},get enabled(){return l.root.opts.open.current},onInteractOutside:H=>{u()(H),!H.defaultPrevented&&l.root.handleClose()},children:(H,Ht)=>{ts(H,M(()=>d(f),{get ref(){return l.opts.ref},get enabled(){return l.root.opts.open.current},children:(Me,Ps)=>{var Xt=E(),Le=w(Xt);{var Be=J=>{var nt=fs(),rt=w(nt);{var st=X=>{le(X,{get preventScroll(){return g()},get restoreScrollDelay(){return y()}})};V(rt,X=>{l.root.opts.open.current&&X(st)})}var It=ct(rt,2);{let X=T(()=>({props:W(d(f),ht()),...l.snippetProps}));A(It,()=>t.child,()=>d(X))}b(J,nt)},Ve=J=>{var nt=hs(),rt=w(nt);le(rt,{get preventScroll(){return g()}});var st=ct(rt,2);j(st,X=>({...X}),[()=>W(d(f),ht())]);var It=K(st);A(It,()=>t.children??N),G(st),b(J,nt)};V(Le,J=>{t.child?J(Be):J(Ve,-1)})}b(Me,Xt)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})};V(_,D=>{(l.shouldRender||i())&&D(R)})}b(n,C),I()}const gs={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};var vs=We("<svg><!><!></svg>");function bs(n,t){P(t,!0);const e=h(t,"color",3,"currentColor"),r=h(t,"size",3,24),s=h(t,"strokeWidth",3,2),i=h(t,"absoluteStrokeWidth",3,!1),o=h(t,"iconNode",19,()=>[]),a=O(t,["$$slots","$$events","$$legacy","name","color","size","strokeWidth","absoluteStrokeWidth","iconNode","children"]);var c=vs();j(c,g=>({...gs,...a,width:r(),height:r(),stroke:e(),"stroke-width":g,class:["lucide-icon lucide",t.name&&`lucide-${t.name}`,t.class]}),[()=>i()?Number(s())*24/Number(r()):s()]);var u=K(c);sn(u,17,o,an,(g,y)=>{var p=T(()=>tn(d(y),2));let l=()=>d(p)[0],f=()=>d(p)[1];var C=E(),_=w(C);on(_,l,!0,(R,D)=>{j(R,()=>({...f()}))}),b(g,C)});var v=ct(u);A(v,()=>t.children??N),G(c),b(n,c),I()}function ms(n,t){P(t,!0);let e=O(t,["$$slots","$$events","$$legacy"]);const r=[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]];bs(n,M({name:"x"},()=>e,{get iconNode(){return r},children:(s,i)=>{var o=E(),a=w(o);A(a,()=>t.children??N),b(s,o)},$$slots:{default:!0}})),I()}function Ls(n,t){P(t,!0);let e=h(t,"open",15,!1),r=O(t,["$$slots","$$events","$$legacy","open"]);var s=E(),i=w(s);z(i,()=>cs,(o,a)=>{a(o,M(()=>r,{get open(){return e()},set open(c){e(c)}}))}),b(n,s),I()}function ys(n,t){let e=O(t,["$$slots","$$events","$$legacy"]);var r=E(),s=w(r);z(s,()=>Cr,(i,o)=>{o(i,M(()=>e))}),b(n,r)}function Bs(n,t){P(t,!0);let e=h(t,"ref",15,null),r=O(t,["$$slots","$$events","$$legacy","ref","class"]);var s=E(),i=w(s);{let o=T(()=>$("text-lg leading-none font-semibold",t.class));z(i,()=>vr,(a,c)=>{c(a,M({"data-slot":"dialog-title",get class(){return d(o)}},()=>r,{get ref(){return e()},set ref(u){e(u)}}))})}b(n,s),I()}var ws=L("<div><!></div>");function Vs(n,t){P(t,!0);let e=h(t,"ref",15,null),r=O(t,["$$slots","$$events","$$legacy","ref","class","children"]);var s=ws();j(s,o=>({"data-slot":"dialog-footer",class:o,...r}),[()=>$("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t.class)]);var i=K(s);A(i,()=>t.children??N),G(s),de(s,o=>e(o),()=>e()),b(n,s),I()}var Ss=L("<div><!></div>");function Ws(n,t){P(t,!0);let e=h(t,"ref",15,null),r=O(t,["$$slots","$$events","$$legacy","ref","class","children"]);var s=Ss();j(s,o=>({"data-slot":"dialog-header",class:o,...r}),[()=>$("flex flex-col gap-2 text-center sm:text-start",t.class)]);var i=K(s);A(i,()=>t.children??N),G(s),de(s,o=>e(o),()=>e()),b(n,s),I()}function Es(n,t){P(t,!0);let e=h(t,"ref",15,null),r=O(t,["$$slots","$$events","$$legacy","ref","class"]);var s=E(),i=w(s);{let o=T(()=>$("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t.class));z(i,()=>is,(a,c)=>{c(a,M({"data-slot":"dialog-overlay",get class(){return d(o)}},()=>r,{get ref(){return e()},set ref(u){e(u)}}))})}b(n,s),I()}var Ts=L('<!> <span class="sr-only">Close</span>',1),Cs=L("<!> <!>",1),As=L("<!> <!>",1);function js(n,t){P(t,!0);let e=h(t,"ref",15,null),r=h(t,"showCloseButton",3,!0),s=O(t,["$$slots","$$events","$$legacy","ref","class","portalProps","children","showCloseButton"]);ys(n,M(()=>t.portalProps,{children:(i,o)=>{var a=As(),c=w(a);z(c,()=>Es,(v,g)=>{g(v,{})});var u=ct(c,2);{let v=T(()=>$("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",t.class));z(u,()=>ps,(g,y)=>{y(g,M({"data-slot":"dialog-content",get class(){return d(v)}},()=>s,{get ref(){return e()},set ref(p){e(p)},children:(p,l)=>{var f=Cs(),C=w(f);A(C,()=>t.children??N);var _=ct(C,2);{var R=D=>{var q=E(),At=w(q);z(At,()=>ds,(Pt,ht)=>{ht(Pt,{class:"ring-offset-background focus:ring-ring absolute end-4 top-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:(Z,Fe)=>{var H=Ts(),Ht=w(H);ms(Ht,{}),en(2),b(Z,H)},$$slots:{default:!0}})}),b(D,q)};V(_,D=>{r()&&D(R)})}b(p,f)},$$slots:{default:!0}}))})}b(i,a)},$$slots:{default:!0}})),I()}function zs(n,t){P(t,!0);let e=h(t,"ref",15,null),r=O(t,["$$slots","$$events","$$legacy","ref","class"]);var s=E(),i=w(s);{let o=T(()=>$("text-muted-foreground text-sm",t.class));z(i,()=>us,(a,c)=>{c(a,M({"data-slot":"dialog-description",get class(){return d(o)}},()=>r,{get ref(){return e()},set ref(u){e(u)}}))})}b(n,s),I()}function Us(n,t){const e=rn(t,["children","$$slots","$$events","$$legacy"]);const r=[["path",{d:"M12 8V4H8"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2"}],["path",{d:"M2 14h2"}],["path",{d:"M20 14h2"}],["path",{d:"M15 13v2"}],["path",{d:"M9 13v2"}]];un(n,M({name:"bot"},()=>e,{get iconNode(){return r},children:(s,i)=>{var o=E(),a=w(o);cn(a,t,"default",{}),b(s,o)},$$slots:{default:!0}}))}export{k as A,Us as B,ge as C,js as D,Zr as E,Jr as F,Cr as G,cs as H,bs as I,is as J,ps as K,ds as L,vr as M,us as N,re as P,le as S,ts as T,ms as X,Ws as a,Bs as b,zs as c,Vs as d,Ls as e,qn as f,ft as g,Ce as h,m as i,et as j,pt as k,Ms as l,W as m,zn as n,or as o,Xr as p,sr as q,Rs as r,yn as s,tt as t,es as u,ye as v,B as w,Fs as x,yt as y,we as z};
@@ -1 +1 @@
1
- import{s as e,p as r}from"./bBmtyQMj.js";const t={get error(){return r.error},get status(){return r.status},get url(){return r.url}};e.updated.check;const a=t;export{a as p};
1
+ import{s as e,p as r}from"./Bv9252RM.js";const t={get error(){return r.error},get status(){return r.status},get url(){return r.url}};e.updated.check;const a=t;export{a as p};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.DYyUA1au.js","../chunks/BrERcKAH.js","../chunks/BmBj85Ll.js","../chunks/BiLeM2i1.js","../chunks/BhRSsUCh.js","../chunks/KsloHTKS.js","../chunks/DISKL3GN.js","../chunks/CIXNBPKi.js","../chunks/DcpaLzmX.js","../chunks/RsHsUj-8.js","../chunks/wpfV79dV.js","../chunks/Bv9252RM.js","../chunks/3AZlWB6U.js","../chunks/DnQ3vS13.js","../assets/0.C-4eziNy.css","../nodes/1.D-3QEMMZ.js","../nodes/2.4olHnH7U.js","../nodes/3.4w0bE-m2.js","../nodes/4.CZvjhVHt.js","../assets/4.Cc_xwLNl.css","../nodes/5.DLbPVJY2.js"])))=>i.map(i=>d[i]);
2
+ import{y as x,ac as G,x as f,aH as H,ax as J,aI as K,p as W,aJ as Y,u as z,aK as F,f as w,s as Q,a as X,B as k,c as Z,r as $,A as L,t as tt}from"../chunks/BmBj85Ll.js";import{h as et,m as rt,u as st,s as at}from"../chunks/BhRSsUCh.js";import{a as E,c as A,f as V,t as nt}from"../chunks/BrERcKAH.js";import{o as ot}from"../chunks/BiLeM2i1.js";import{p as S,i as j,b as C}from"../chunks/KsloHTKS.js";import{c as I}from"../chunks/DcpaLzmX.js";function ct(o){return class extends it{constructor(t){super({component:o,...t})}}}class it{#e;#t;constructor(t){var a=new Map,i=(r,e)=>{var s=K(e,!1,!1);return a.set(r,s),s};const u=new Proxy({...t.props||{},$$events:{}},{get(r,e){return f(a.get(e)??i(e,Reflect.get(r,e)))},has(r,e){return e===G?!0:(f(a.get(e)??i(e,Reflect.get(r,e))),Reflect.has(r,e))},set(r,e,s){return x(a.get(e)??i(e,s),s),Reflect.set(r,e,s)}});this.#t=(t.hydrate?et:rt)(t.component,{target:t.target,anchor:t.anchor,props:u,context:t.context,intro:t.intro??!1,recover:t.recover,transformError:t.transformError}),(!t?.props?.$$host||t.sync===!1)&&H(),this.#e=u.$$events;for(const r of Object.keys(this.#t))r==="$set"||r==="$destroy"||r==="$on"||J(this,r,{get(){return this.#t[r]},set(e){this.#t[r]=e},enumerable:!0});this.#t.$set=r=>{Object.assign(u,r)},this.#t.$destroy=()=>{st(this.#t)}}$set(t){this.#t.$set(t)}$on(t,a){this.#e[t]=this.#e[t]||[];const i=(...u)=>a.call(this,...u);return this.#e[t].push(i),()=>{this.#e[t]=this.#e[t].filter(u=>u!==i)}}$destroy(){this.#t.$destroy()}}const ut="modulepreload",lt=function(o,t){return new URL(o,t).href},D={},b=function(t,a,i){let u=Promise.resolve();if(a&&a.length>0){let O=function(c){return Promise.all(c.map(m=>Promise.resolve(m).then(d=>({status:"fulfilled",value:d}),d=>({status:"rejected",reason:d}))))};const e=document.getElementsByTagName("link"),s=document.querySelector("meta[property=csp-nonce]"),R=s?.nonce||s?.getAttribute("nonce");u=O(a.map(c=>{if(c=lt(c,i),c in D)return;D[c]=!0;const m=c.endsWith(".css"),d=m?'[rel="stylesheet"]':"";if(i)for(let h=e.length-1;h>=0;h--){const n=e[h];if(n.href===c&&(!m||n.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${c}"]${d}`))return;const l=document.createElement("link");if(l.rel=m?"stylesheet":ut,m||(l.as="script"),l.crossOrigin="",l.href=c,R&&l.setAttribute("nonce",R),document.head.appendChild(l),m)return new Promise((h,n)=>{l.addEventListener("load",h),l.addEventListener("error",()=>n(new Error(`Unable to preload CSS for ${c}`)))})}))}function r(e){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=e,window.dispatchEvent(s),!s.defaultPrevented)throw e}return u.then(e=>{for(const s of e||[])s.status==="rejected"&&r(s.reason);return t().catch(r)})},pt={};var mt=V('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),ft=V("<!> <!>",1);function dt(o,t){W(t,!0);let a=S(t,"components",23,()=>[]),i=S(t,"data_0",3,null),u=S(t,"data_1",3,null);Y(()=>t.stores.page.set(t.page)),z(()=>{t.stores,t.page,t.constructors,a(),t.form,i(),u(),t.stores.page.notify()});let r=k(!1),e=k(!1),s=k(null);ot(()=>{const n=t.stores.page.subscribe(()=>{f(r)&&(x(e,!0),F().then(()=>{x(s,document.title||"untitled page",!0)}))});return x(r,!0),n});const R=L(()=>t.constructors[1]);var O=ft(),c=w(O);{var m=n=>{const _=L(()=>t.constructors[0]);var v=A(),P=w(v);I(P,()=>f(_),(g,y)=>{C(y(g,{get data(){return i()},get form(){return t.form},get params(){return t.page.params},children:(p,_t)=>{var T=A(),N=w(T);I(N,()=>f(R),(q,B)=>{C(B(q,{get data(){return u()},get form(){return t.form},get params(){return t.page.params}}),U=>a()[1]=U,()=>a()?.[1])}),E(p,T)},$$slots:{default:!0}}),p=>a()[0]=p,()=>a()?.[0])}),E(n,v)},d=n=>{const _=L(()=>t.constructors[0]);var v=A(),P=w(v);I(P,()=>f(_),(g,y)=>{C(y(g,{get data(){return i()},get form(){return t.form},get params(){return t.page.params}}),p=>a()[0]=p,()=>a()?.[0])}),E(n,v)};j(c,n=>{t.constructors[1]?n(m):n(d,-1)})}var l=Q(c,2);{var h=n=>{var _=mt(),v=Z(_);{var P=g=>{var y=nt();tt(()=>at(y,f(s))),E(g,y)};j(v,g=>{f(e)&&g(P)})}$(_),E(n,_)};j(l,n=>{f(r)&&n(h)})}E(o,O),X()}const Rt=ct(dt),Ot=[()=>b(()=>import("../nodes/0.DYyUA1au.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]),import.meta.url),()=>b(()=>import("../nodes/1.D-3QEMMZ.js"),__vite__mapDeps([15,1,2,4,10,11,3]),import.meta.url),()=>b(()=>import("../nodes/2.4olHnH7U.js"),__vite__mapDeps([16,1,2,7]),import.meta.url),()=>b(()=>import("../nodes/3.4w0bE-m2.js"),__vite__mapDeps([17,1,2,4,5,6,7,8,11,3,12,9]),import.meta.url),()=>b(()=>import("../nodes/4.CZvjhVHt.js"),__vite__mapDeps([18,1,2,3,4,5,6,7,11,13,19]),import.meta.url),()=>b(()=>import("../nodes/5.DLbPVJY2.js"),__vite__mapDeps([20,1,2,4,5,6,7,11,3,12]),import.meta.url)],wt=[],xt={"/":[2],"/agents":[3],"/chats/[id]":[4],"/chats/[id]/settings":[5]},M={handleError:(({error:o})=>{console.error(o)}),reroute:(()=>{}),transport:{}},ht=Object.fromEntries(Object.entries(M.transport).map(([o,t])=>[o,t.decode])),kt=Object.fromEntries(Object.entries(M.transport).map(([o,t])=>[o,t.encode])),Lt=!1,At=(o,t)=>ht[o](t);export{At as decode,ht as decoders,xt as dictionary,kt as encoders,Lt as hash,M as hooks,pt as matchers,Ot as nodes,Rt as root,wt as server_loads};
@@ -0,0 +1 @@
1
+ import{l as o,a as r}from"../chunks/Bv9252RM.js";export{o as load_css,r as start};