@lovelybunch/api 1.0.71-alpha.2 → 1.0.71-alpha.4

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 (235) hide show
  1. package/dist/lib/file-validation.d.ts +65 -0
  2. package/dist/lib/file-validation.js +125 -0
  3. package/dist/middleware/auth.d.ts +1 -0
  4. package/dist/middleware/auth.js +13 -3
  5. package/dist/routes/api/v1/resources/route.js +10 -7
  6. package/package.json +5 -4
  7. package/static/assets/{AgentDetailPage-DwWIjGx1.js → AgentDetailPage-BkWRFbPj.js} +1 -1
  8. package/static/assets/{AgentEditPage-BvVPfYR3.js → AgentEditPage-DN0TouUG.js} +1 -1
  9. package/static/assets/{AgentsPage-D-Uy87Gh.js → AgentsPage-DW6eV7oU.js} +2 -2
  10. package/static/assets/{AgentsSettingsPage-CDuAvFxu.js → AgentsSettingsPage-BJKnn0R0.js} +1 -1
  11. package/static/assets/{ApiKeysSettingsPage-Jug0kB7Z.js → ApiKeysSettingsPage-ChFu9Eo6.js} +1 -1
  12. package/static/assets/{ArchitectureEditPage-BmAgJAMV.js → ArchitectureEditPage-DWrvSS5U.js} +1 -1
  13. package/static/assets/{ArchitecturePage-ZjbdnDA7.js → ArchitecturePage-BdQG779E.js} +1 -1
  14. package/static/assets/{AuthSettingsPage-_pXoewOB.js → AuthSettingsPage-BXMn4xXd.js} +1 -1
  15. package/static/assets/{CallbackPage-CaAOpz4z.js → CallbackPage-AxQqTxCV.js} +1 -1
  16. package/static/assets/{CodePage-DEbgr8C1.js → CodePage-CfKZ52Zo.js} +1 -1
  17. package/static/assets/{CollapsibleSection-msxUBh1L.js → CollapsibleSection-ZFq6LSXW.js} +1 -1
  18. package/static/assets/{DashboardPage-BXu-fikP.js → DashboardPage-Df-d3-fG.js} +1 -1
  19. package/static/assets/{GitPage-B7qFcP-K.js → GitPage-DAWR8rrg.js} +1 -1
  20. package/static/assets/{GitSettingsPage-D7GjdOnE.js → GitSettingsPage-CzGuiY9j.js} +1 -1
  21. package/static/assets/{IdentityPage-BR48gNhN.js → IdentityPage-DbsNwWtP.js} +1 -1
  22. package/static/assets/{ImplementationStepsEditor-BdHMNVVd.js → ImplementationStepsEditor-DZq7KcDP.js} +1 -1
  23. package/static/assets/{IntegrationsSettingsPage-B1OHGlDC.js → IntegrationsSettingsPage-qvvsp1_G.js} +1 -1
  24. package/static/assets/{KnowledgeDetailPage-DBOQQs3R.js → KnowledgeDetailPage-BMnj1qiH.js} +1 -1
  25. package/static/assets/{KnowledgeEditPage-DHJxLPwi.js → KnowledgeEditPage-BZa4E2M9.js} +1 -1
  26. package/static/assets/{KnowledgePage-CuuDTMa_.js → KnowledgePage-Dtq9BKZi.js} +2 -2
  27. package/static/assets/{LoginPage-IIU6NAG9.js → LoginPage-BnlCd8Cm.js} +1 -1
  28. package/static/assets/McpSettingsPage-COPMqimV.js +1 -0
  29. package/static/assets/{NewAgentPage-DolltGy5.js → NewAgentPage-Dtvey1oU.js} +1 -1
  30. package/static/assets/{NewKnowledgePage-_jbUZqBU.js → NewKnowledgePage-CbiRD2V3.js} +1 -1
  31. package/static/assets/{NewProposalPage-bFnfuuoA.js → NewProposalPage-B1tUJIZz.js} +1 -1
  32. package/static/assets/{ProjectEditPage-DTTjPnGj.js → ProjectEditPage-CwM8LXHy.js} +1 -1
  33. package/static/assets/{ProjectPage-DhwrnEq2.js → ProjectPage-BHa8M3vI.js} +1 -1
  34. package/static/assets/{PromptsSettingsPage-DLOVysbE.js → PromptsSettingsPage-CwGmsIAW.js} +1 -1
  35. package/static/assets/{ProposalDetailPage-KvjXUaaf.js → ProposalDetailPage-DC7NMuFi.js} +1 -1
  36. package/static/assets/{ProposalEditPage-BmzkHL9a.js → ProposalEditPage-CfUidv6D.js} +1 -1
  37. package/static/assets/{ProposalsPage-DwQr1ycd.js → ProposalsPage-V8ut_TsU.js} +1 -1
  38. package/static/assets/ResourcesPage-Cofgbx3H.js +66 -0
  39. package/static/assets/{RulesSettingsPage-CsGXFTFY.js → RulesSettingsPage-BJ72X2Y3.js} +1 -1
  40. package/static/assets/{SchedulePage-CY8GdQlp.js → SchedulePage-DBYxTZMb.js} +1 -1
  41. package/static/assets/{TagInput-CbH9zq5n.js → TagInput-Cqju3cXZ.js} +1 -1
  42. package/static/assets/{TerminalPage-DsjOLnyY.js → TerminalPage-Iow1ciWG.js} +1 -1
  43. package/static/assets/{TerminalSessionPage-DQ065WYU.js → TerminalSessionPage-CZdzhFhY.js} +1 -1
  44. package/static/assets/{UserPreferencesPage-55VTrzfQ.js → UserPreferencesPage-CAuJ7yO4.js} +1 -1
  45. package/static/assets/{UserSettingsPage-BZwb93B4.js → UserSettingsPage-0j7ha-RI.js} +1 -1
  46. package/static/assets/{UtilitiesPage-BmEW7eJ_.js → UtilitiesPage-OgkcmaOS.js} +1 -1
  47. package/static/assets/{alert-CNSGDe1U.js → alert-D2VTq6m-.js} +1 -1
  48. package/static/assets/{arrow-down-D1dapxzl.js → arrow-down-vmWOjyjO.js} +1 -1
  49. package/static/assets/{arrow-left-CEZFPQje.js → arrow-left-Do2jUSS9.js} +1 -1
  50. package/static/assets/{arrow-up-D-lB4Ah6.js → arrow-up-hMM1cdZm.js} +1 -1
  51. package/static/assets/{badge-DO6e5hC1.js → badge-D7ZZbMEG.js} +1 -1
  52. package/static/assets/browser-modal-CWDhylx7.js +6 -0
  53. package/static/assets/{calendar-DWaFMSXH.js → calendar-C5JtKp_F.js} +1 -1
  54. package/static/assets/{card-Cnz8b7Ou.js → card-D_zGBKua.js} +1 -1
  55. package/static/assets/{chevron-left-CNgc28Tc.js → chevron-left-JjvWea8A.js} +1 -1
  56. package/static/assets/{circle-alert-Dick-jNf.js → circle-alert-DQD0CPB3.js} +1 -1
  57. package/static/assets/{circle-check-big-B70gdce7.js → circle-check-big-KfJvKA9H.js} +1 -1
  58. package/static/assets/{circle-check-DDk43rYV.js → circle-check-xj41FKuF.js} +1 -1
  59. package/static/assets/{circle-play-TJEfmKde.js → circle-play-BlGnYWUU.js} +1 -1
  60. package/static/assets/{circle-x-BfR2YcXx.js → circle-x-Ds97aY1x.js} +1 -1
  61. package/static/assets/{clipboard-BTZru8wn.js → clipboard-D3NA8gb4.js} +1 -1
  62. package/static/assets/{clock-DQXbrDkQ.js → clock-9dU_D6sL.js} +1 -1
  63. package/static/assets/{download-CW_rWwud.js → download-CNckZYWh.js} +1 -1
  64. package/static/assets/{eye-Bv6mO2ld.js → eye-Dp6wEoME.js} +1 -1
  65. package/static/assets/{folder-git-2-Cv5NbBZZ.js → folder-git-2-B9ILjFN2.js} +1 -1
  66. package/static/assets/{index-BSBM4i_g.js → index-Bbxvuj4b.js} +3 -3
  67. package/static/assets/index-Ca98xZVe.css +2 -0
  68. package/static/assets/{label-vEgNxdb2.js → label-CZGCmBD7.js} +1 -1
  69. package/static/assets/{markdown-editor-O6tGYa1a.js → markdown-editor-BiM9h5iI.js} +1 -1
  70. package/static/assets/{pause-6aQLhmG9.js → pause-BNL49HvB.js} +1 -1
  71. package/static/assets/{play-DsDsjO2V.js → play-8b83f5X0.js} +1 -1
  72. package/static/assets/{plus-BfBtnncn.js → plus-Be79gWKj.js} +1 -1
  73. package/static/assets/{radio-group-D_RD_9vY.js → radio-group-DpxssBzw.js} +1 -1
  74. package/static/assets/{refresh-cw-DvFNtws1.js → refresh-cw-C0_Ot2Zc.js} +1 -1
  75. package/static/assets/registry-ANRa5WBi.js +1 -0
  76. package/static/assets/{search-kcgmZUqQ.js → search-CrIdR7ah.js} +1 -1
  77. package/static/assets/{switch-Bjq8cgQn.js → switch-BYPAX9oF.js} +1 -1
  78. package/static/assets/{tabs-DDbBXbPg.js → tabs-Ug7Ug5Ha.js} +1 -1
  79. package/static/assets/{tag-Czz-3rNY.js → tag-BgO5mxYK.js} +1 -1
  80. package/static/assets/{terminal-preview-B7iP2vUT.js → terminal-preview-CDrLQbSE.js} +1 -1
  81. package/static/assets/{use-terminal-CN3pheMp.js → use-terminal-CNk4WtA6.js} +1 -1
  82. package/static/assets/{zap-BMkP_c9R.js → zap-cD8GAJPg.js} +1 -1
  83. package/static/index.html +2 -2
  84. package/dist/lib/auth/auth-manager.d.ts.map +0 -1
  85. package/dist/lib/auth/auth-manager.js.map +0 -1
  86. package/dist/lib/gait-path.d.ts.map +0 -1
  87. package/dist/lib/gait-path.js.map +0 -1
  88. package/dist/lib/git-settings.d.ts.map +0 -1
  89. package/dist/lib/git-settings.js.map +0 -1
  90. package/dist/lib/git.d.ts.map +0 -1
  91. package/dist/lib/git.js.map +0 -1
  92. package/dist/lib/jobs/global-job-scheduler.d.ts.map +0 -1
  93. package/dist/lib/jobs/global-job-scheduler.js.map +0 -1
  94. package/dist/lib/jobs/job-runner.d.ts.map +0 -1
  95. package/dist/lib/jobs/job-runner.js.map +0 -1
  96. package/dist/lib/jobs/job-scheduler.d.ts.map +0 -1
  97. package/dist/lib/jobs/job-scheduler.js.map +0 -1
  98. package/dist/lib/jobs/job-store.d.ts.map +0 -1
  99. package/dist/lib/jobs/job-store.js.map +0 -1
  100. package/dist/lib/project-paths.d.ts.map +0 -1
  101. package/dist/lib/project-paths.js.map +0 -1
  102. package/dist/lib/storage/file-storage.d.ts.map +0 -1
  103. package/dist/lib/storage/file-storage.js.map +0 -1
  104. package/dist/lib/symlinks/symlink-manager.d.ts.map +0 -1
  105. package/dist/lib/symlinks/symlink-manager.js.map +0 -1
  106. package/dist/lib/symlinks/types.d.ts.map +0 -1
  107. package/dist/lib/symlinks/types.js.map +0 -1
  108. package/dist/lib/terminal/context-helper.d.ts.map +0 -1
  109. package/dist/lib/terminal/context-helper.js.map +0 -1
  110. package/dist/lib/terminal/global-manager.d.ts.map +0 -1
  111. package/dist/lib/terminal/global-manager.js.map +0 -1
  112. package/dist/lib/terminal/shell-utils.d.ts.map +0 -1
  113. package/dist/lib/terminal/shell-utils.js.map +0 -1
  114. package/dist/lib/terminal/terminal-manager.d.ts.map +0 -1
  115. package/dist/lib/terminal/terminal-manager.js.map +0 -1
  116. package/dist/lib/user-preferences.d.ts.map +0 -1
  117. package/dist/lib/user-preferences.js.map +0 -1
  118. package/dist/middleware/auth.d.ts.map +0 -1
  119. package/dist/middleware/auth.js.map +0 -1
  120. package/dist/routes/api/v1/agents/[id]/index.d.ts.map +0 -1
  121. package/dist/routes/api/v1/agents/[id]/index.js.map +0 -1
  122. package/dist/routes/api/v1/agents/[id]/route.d.ts.map +0 -1
  123. package/dist/routes/api/v1/agents/[id]/route.js.map +0 -1
  124. package/dist/routes/api/v1/agents/index.d.ts.map +0 -1
  125. package/dist/routes/api/v1/agents/index.js.map +0 -1
  126. package/dist/routes/api/v1/agents/route.d.ts.map +0 -1
  127. package/dist/routes/api/v1/agents/route.js.map +0 -1
  128. package/dist/routes/api/v1/ai/index.d.ts.map +0 -1
  129. package/dist/routes/api/v1/ai/index.js.map +0 -1
  130. package/dist/routes/api/v1/ai/route.d.ts.map +0 -1
  131. package/dist/routes/api/v1/ai/route.js.map +0 -1
  132. package/dist/routes/api/v1/api-keys/index.d.ts.map +0 -1
  133. package/dist/routes/api/v1/api-keys/index.js.map +0 -1
  134. package/dist/routes/api/v1/api-keys/route.d.ts.map +0 -1
  135. package/dist/routes/api/v1/api-keys/route.js.map +0 -1
  136. package/dist/routes/api/v1/auth/index.d.ts.map +0 -1
  137. package/dist/routes/api/v1/auth/index.js.map +0 -1
  138. package/dist/routes/api/v1/auth/route.d.ts.map +0 -1
  139. package/dist/routes/api/v1/auth/route.js.map +0 -1
  140. package/dist/routes/api/v1/auth-settings/index.d.ts.map +0 -1
  141. package/dist/routes/api/v1/auth-settings/index.js.map +0 -1
  142. package/dist/routes/api/v1/auth-settings/route.d.ts.map +0 -1
  143. package/dist/routes/api/v1/auth-settings/route.js.map +0 -1
  144. package/dist/routes/api/v1/chats/[id]/index.d.ts.map +0 -1
  145. package/dist/routes/api/v1/chats/[id]/index.js.map +0 -1
  146. package/dist/routes/api/v1/chats/[id]/route.d.ts.map +0 -1
  147. package/dist/routes/api/v1/chats/[id]/route.js.map +0 -1
  148. package/dist/routes/api/v1/chats/index.d.ts.map +0 -1
  149. package/dist/routes/api/v1/chats/index.js.map +0 -1
  150. package/dist/routes/api/v1/chats/route.d.ts.map +0 -1
  151. package/dist/routes/api/v1/chats/route.js.map +0 -1
  152. package/dist/routes/api/v1/config/index.d.ts.map +0 -1
  153. package/dist/routes/api/v1/config/index.js.map +0 -1
  154. package/dist/routes/api/v1/config/route.d.ts.map +0 -1
  155. package/dist/routes/api/v1/config/route.js.map +0 -1
  156. package/dist/routes/api/v1/context/architecture/route.d.ts.map +0 -1
  157. package/dist/routes/api/v1/context/architecture/route.js.map +0 -1
  158. package/dist/routes/api/v1/context/index.d.ts.map +0 -1
  159. package/dist/routes/api/v1/context/index.js.map +0 -1
  160. package/dist/routes/api/v1/context/knowledge/[filename]/index.d.ts.map +0 -1
  161. package/dist/routes/api/v1/context/knowledge/[filename]/index.js.map +0 -1
  162. package/dist/routes/api/v1/context/knowledge/[filename]/route.d.ts.map +0 -1
  163. package/dist/routes/api/v1/context/knowledge/[filename]/route.js.map +0 -1
  164. package/dist/routes/api/v1/context/knowledge/index.d.ts.map +0 -1
  165. package/dist/routes/api/v1/context/knowledge/index.js.map +0 -1
  166. package/dist/routes/api/v1/context/knowledge/route.d.ts.map +0 -1
  167. package/dist/routes/api/v1/context/knowledge/route.js.map +0 -1
  168. package/dist/routes/api/v1/context/project/route.d.ts.map +0 -1
  169. package/dist/routes/api/v1/context/project/route.js.map +0 -1
  170. package/dist/routes/api/v1/git/index.d.ts.map +0 -1
  171. package/dist/routes/api/v1/git/index.js.map +0 -1
  172. package/dist/routes/api/v1/jobs/[id]/route.d.ts.map +0 -1
  173. package/dist/routes/api/v1/jobs/[id]/route.js.map +0 -1
  174. package/dist/routes/api/v1/jobs/[id]/run/route.d.ts.map +0 -1
  175. package/dist/routes/api/v1/jobs/[id]/run/route.js.map +0 -1
  176. package/dist/routes/api/v1/jobs/index.d.ts.map +0 -1
  177. package/dist/routes/api/v1/jobs/index.js.map +0 -1
  178. package/dist/routes/api/v1/jobs/route.d.ts.map +0 -1
  179. package/dist/routes/api/v1/jobs/route.js.map +0 -1
  180. package/dist/routes/api/v1/jobs/status/route.d.ts.map +0 -1
  181. package/dist/routes/api/v1/jobs/status/route.js.map +0 -1
  182. package/dist/routes/api/v1/mcp/index.d.ts.map +0 -1
  183. package/dist/routes/api/v1/mcp/index.js.map +0 -1
  184. package/dist/routes/api/v1/mcp/route.d.ts.map +0 -1
  185. package/dist/routes/api/v1/mcp/route.js.map +0 -1
  186. package/dist/routes/api/v1/proposals/[id]/route.d.ts.map +0 -1
  187. package/dist/routes/api/v1/proposals/[id]/route.js.map +0 -1
  188. package/dist/routes/api/v1/proposals/index.d.ts.map +0 -1
  189. package/dist/routes/api/v1/proposals/index.js.map +0 -1
  190. package/dist/routes/api/v1/proposals/route.d.ts.map +0 -1
  191. package/dist/routes/api/v1/proposals/route.js.map +0 -1
  192. package/dist/routes/api/v1/resources/[id]/index.d.ts.map +0 -1
  193. package/dist/routes/api/v1/resources/[id]/index.js.map +0 -1
  194. package/dist/routes/api/v1/resources/[id]/route.js.map +0 -1
  195. package/dist/routes/api/v1/resources/[id]/thumbnail/index.d.ts.map +0 -1
  196. package/dist/routes/api/v1/resources/[id]/thumbnail/index.js.map +0 -1
  197. package/dist/routes/api/v1/resources/[id]/thumbnail/route.js.map +0 -1
  198. package/dist/routes/api/v1/resources/index.d.ts.map +0 -1
  199. package/dist/routes/api/v1/resources/index.js.map +0 -1
  200. package/dist/routes/api/v1/resources/route.d.ts.map +0 -1
  201. package/dist/routes/api/v1/resources/route.js.map +0 -1
  202. package/dist/routes/api/v1/symlinks/index.d.ts.map +0 -1
  203. package/dist/routes/api/v1/symlinks/index.js.map +0 -1
  204. package/dist/routes/api/v1/symlinks/route.d.ts.map +0 -1
  205. package/dist/routes/api/v1/symlinks/route.js.map +0 -1
  206. package/dist/routes/api/v1/terminal/[proposalId]/create/index.d.ts.map +0 -1
  207. package/dist/routes/api/v1/terminal/[proposalId]/create/index.js.map +0 -1
  208. package/dist/routes/api/v1/terminal/[proposalId]/create/route.d.ts.map +0 -1
  209. package/dist/routes/api/v1/terminal/[proposalId]/create/route.js.map +0 -1
  210. package/dist/routes/api/v1/terminal/[proposalId]/destroy/index.d.ts.map +0 -1
  211. package/dist/routes/api/v1/terminal/[proposalId]/destroy/index.js.map +0 -1
  212. package/dist/routes/api/v1/terminal/[proposalId]/destroy/route.d.ts.map +0 -1
  213. package/dist/routes/api/v1/terminal/[proposalId]/destroy/route.js.map +0 -1
  214. package/dist/routes/api/v1/terminal/[proposalId]/resize/index.d.ts.map +0 -1
  215. package/dist/routes/api/v1/terminal/[proposalId]/resize/index.js.map +0 -1
  216. package/dist/routes/api/v1/terminal/[proposalId]/resize/route.d.ts.map +0 -1
  217. package/dist/routes/api/v1/terminal/[proposalId]/resize/route.js.map +0 -1
  218. package/dist/routes/api/v1/terminal/sessions/index.d.ts.map +0 -1
  219. package/dist/routes/api/v1/terminal/sessions/index.js.map +0 -1
  220. package/dist/routes/api/v1/terminal/sessions/route.d.ts.map +0 -1
  221. package/dist/routes/api/v1/terminal/sessions/route.js.map +0 -1
  222. package/dist/routes/api/v1/user/index.d.ts.map +0 -1
  223. package/dist/routes/api/v1/user/index.js.map +0 -1
  224. package/dist/routes/api/v1/user/settings/index.d.ts.map +0 -1
  225. package/dist/routes/api/v1/user/settings/index.js.map +0 -1
  226. package/dist/routes/api/v1/user/settings/route.d.ts.map +0 -1
  227. package/dist/routes/api/v1/user/settings/route.js.map +0 -1
  228. package/dist/server-with-static.d.ts.map +0 -1
  229. package/dist/server-with-static.js.map +0 -1
  230. package/dist/server.d.ts.map +0 -1
  231. package/dist/server.js.map +0 -1
  232. package/static/assets/McpSettingsPage-iz5gLGWt.js +0 -1
  233. package/static/assets/ResourcesPage-B8Hm_j47.js +0 -66
  234. package/static/assets/browser-modal-BTxVvZIA.js +0 -6
  235. package/static/assets/index-CKwmN6yL.css +0 -2
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardPage-BXu-fikP.js","assets/card-Cnz8b7Ou.js","assets/badge-DO6e5hC1.js","assets/folder-git-2-Cv5NbBZZ.js","assets/calendar-DWaFMSXH.js","assets/circle-check-DDk43rYV.js","assets/chevron-left-CNgc28Tc.js","assets/clock-DQXbrDkQ.js","assets/circle-check-big-B70gdce7.js","assets/plus-BfBtnncn.js","assets/LoginPage-IIU6NAG9.js","assets/label-vEgNxdb2.js","assets/tabs-DDbBXbPg.js","assets/CallbackPage-CaAOpz4z.js","assets/circle-x-BfR2YcXx.js","assets/ProposalsPage-DwQr1ycd.js","assets/search-kcgmZUqQ.js","assets/ProposalDetailPage-KvjXUaaf.js","assets/clipboard-B9ndUJKl.js","assets/arrow-left-CEZFPQje.js","assets/clipboard-BTZru8wn.js","assets/download-CW_rWwud.js","assets/ProposalEditPage-BmzkHL9a.js","assets/markdown-editor-O6tGYa1a.js","assets/markdown-editor-DUEthZ0y.css","assets/CollapsibleSection-msxUBh1L.js","assets/ImplementationStepsEditor-BdHMNVVd.js","assets/TagInput-CbH9zq5n.js","assets/NewProposalPage-bFnfuuoA.js","assets/TerminalPage-DsjOLnyY.js","assets/use-terminal-CN3pheMp.js","assets/terminal-preview-B7iP2vUT.js","assets/xterm-DTxiCjtJ.js","assets/xterm-qxJ8_QYu.css","assets/refresh-cw-DvFNtws1.js","assets/play-DsDsjO2V.js","assets/circle-play-TJEfmKde.js","assets/TerminalSessionPage-DQ065WYU.js","assets/radio-group-D_RD_9vY.js","assets/arrow-down-D1dapxzl.js","assets/droid-CmYuCN_q.js","assets/zap-BMkP_c9R.js","assets/UtilitiesPage-BmEW7eJ_.js","assets/CodePage-DEbgr8C1.js","assets/AgentsPage-D-Uy87Gh.js","assets/browser-modal-BTxVvZIA.js","assets/tag-Czz-3rNY.js","assets/AgentDetailPage-DwWIjGx1.js","assets/NewAgentPage-DolltGy5.js","assets/AgentEditPage-BvVPfYR3.js","assets/ResourcesPage-B8Hm_j47.js","assets/KnowledgePage-CuuDTMa_.js","assets/arrow-up-D-lB4Ah6.js","assets/KnowledgeDetailPage-DBOQQs3R.js","assets/KnowledgeEditPage-DHJxLPwi.js","assets/NewKnowledgePage-_jbUZqBU.js","assets/ProjectPage-DhwrnEq2.js","assets/ProjectEditPage-DTTjPnGj.js","assets/ArchitecturePage-ZjbdnDA7.js","assets/ArchitectureEditPage-BmAgJAMV.js","assets/IdentityPage-BR48gNhN.js","assets/alert-CNSGDe1U.js","assets/eye-Bv6mO2ld.js","assets/UserSettingsPage-BZwb93B4.js","assets/AuthSettingsPage-_pXoewOB.js","assets/switch-Bjq8cgQn.js","assets/circle-alert-Dick-jNf.js","assets/ApiKeysSettingsPage-Jug0kB7Z.js","assets/AgentsSettingsPage-CDuAvFxu.js","assets/pause-6aQLhmG9.js","assets/IntegrationsSettingsPage-B1OHGlDC.js","assets/GitSettingsPage-D7GjdOnE.js","assets/McpSettingsPage-iz5gLGWt.js","assets/PromptsSettingsPage-DLOVysbE.js","assets/RulesSettingsPage-CsGXFTFY.js","assets/GitPage-B7qFcP-K.js","assets/SchedulePage-CY8GdQlp.js","assets/UserPreferencesPage-55VTrzfQ.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardPage-Df-d3-fG.js","assets/card-D_zGBKua.js","assets/badge-D7ZZbMEG.js","assets/folder-git-2-B9ILjFN2.js","assets/calendar-C5JtKp_F.js","assets/circle-check-xj41FKuF.js","assets/chevron-left-JjvWea8A.js","assets/clock-9dU_D6sL.js","assets/circle-check-big-KfJvKA9H.js","assets/plus-Be79gWKj.js","assets/LoginPage-BnlCd8Cm.js","assets/label-CZGCmBD7.js","assets/tabs-Ug7Ug5Ha.js","assets/CallbackPage-AxQqTxCV.js","assets/circle-x-Ds97aY1x.js","assets/ProposalsPage-V8ut_TsU.js","assets/search-CrIdR7ah.js","assets/ProposalDetailPage-DC7NMuFi.js","assets/clipboard-B9ndUJKl.js","assets/arrow-left-Do2jUSS9.js","assets/clipboard-D3NA8gb4.js","assets/download-CNckZYWh.js","assets/ProposalEditPage-CfUidv6D.js","assets/markdown-editor-BiM9h5iI.js","assets/markdown-editor-DUEthZ0y.css","assets/CollapsibleSection-ZFq6LSXW.js","assets/ImplementationStepsEditor-DZq7KcDP.js","assets/TagInput-Cqju3cXZ.js","assets/NewProposalPage-B1tUJIZz.js","assets/TerminalPage-Iow1ciWG.js","assets/use-terminal-CNk4WtA6.js","assets/terminal-preview-CDrLQbSE.js","assets/xterm-DTxiCjtJ.js","assets/xterm-qxJ8_QYu.css","assets/refresh-cw-C0_Ot2Zc.js","assets/play-8b83f5X0.js","assets/circle-play-BlGnYWUU.js","assets/TerminalSessionPage-CZdzhFhY.js","assets/radio-group-DpxssBzw.js","assets/arrow-down-vmWOjyjO.js","assets/droid-CmYuCN_q.js","assets/zap-cD8GAJPg.js","assets/UtilitiesPage-OgkcmaOS.js","assets/CodePage-CfKZ52Zo.js","assets/AgentsPage-DW6eV7oU.js","assets/browser-modal-CWDhylx7.js","assets/registry-ANRa5WBi.js","assets/tag-BgO5mxYK.js","assets/AgentDetailPage-BkWRFbPj.js","assets/NewAgentPage-Dtvey1oU.js","assets/AgentEditPage-DN0TouUG.js","assets/ResourcesPage-Cofgbx3H.js","assets/KnowledgePage-Dtq9BKZi.js","assets/arrow-up-hMM1cdZm.js","assets/KnowledgeDetailPage-BMnj1qiH.js","assets/KnowledgeEditPage-BZa4E2M9.js","assets/NewKnowledgePage-CbiRD2V3.js","assets/ProjectPage-BHa8M3vI.js","assets/ProjectEditPage-CwM8LXHy.js","assets/ArchitecturePage-BdQG779E.js","assets/ArchitectureEditPage-DWrvSS5U.js","assets/IdentityPage-DbsNwWtP.js","assets/alert-D2VTq6m-.js","assets/eye-Dp6wEoME.js","assets/UserSettingsPage-0j7ha-RI.js","assets/AuthSettingsPage-BXMn4xXd.js","assets/switch-BYPAX9oF.js","assets/circle-alert-DQD0CPB3.js","assets/ApiKeysSettingsPage-ChFu9Eo6.js","assets/AgentsSettingsPage-BJKnn0R0.js","assets/pause-BNL49HvB.js","assets/IntegrationsSettingsPage-qvvsp1_G.js","assets/GitSettingsPage-CzGuiY9j.js","assets/McpSettingsPage-COPMqimV.js","assets/PromptsSettingsPage-CwGmsIAW.js","assets/RulesSettingsPage-BJ72X2Y3.js","assets/GitPage-DAWR8rrg.js","assets/SchedulePage-DBYxTZMb.js","assets/UserPreferencesPage-CAuJ7yO4.js"])))=>i.map(i=>d[i]);
2
2
  function _T(e,n){for(var r=0;r<n.length;r++){const i=n[r];if(typeof i!="string"&&!Array.isArray(i)){for(const l in i)if(l!=="default"&&!(l in e)){const s=Object.getOwnPropertyDescriptor(i,l);s&&Object.defineProperty(e,l,s.get?s:{enumerable:!0,get:()=>i[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))i(l);new MutationObserver(l=>{for(const s of l)if(s.type==="childList")for(const c of s.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&i(c)}).observe(document,{childList:!0,subtree:!0});function r(l){const s={};return l.integrity&&(s.integrity=l.integrity),l.referrerPolicy&&(s.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?s.credentials="include":l.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(l){if(l.ep)return;l.ep=!0;const s=r(l);fetch(l.href,s)}})();function vc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var fh={exports:{}},Sl={};/**
3
3
  * @license React
4
4
  * react-jsx-runtime.production.js
@@ -352,7 +352,7 @@ Please change the parent <Route path="${N}"> to <Route path="${N==="/"?"*":`${N}
352
352
 
353
353
  If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.
354
354
 
355
- For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return x.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},cO="DialogDescriptionWarning",fO=({contentRef:e,descriptionId:n})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${B1(cO).contentName}}.`;return x.useEffect(()=>{const l=e.current?.getAttribute("aria-describedby");n&&l&&(document.getElementById(n)||console.warn(i))},[i,e,n]),null},fm=k1,U1=T1,dm=N1,es=_1,ts=M1,ns=D1,rs=P1,Oc=z1;const H1=fm,dO=dm,F1=x.forwardRef(({className:e,...n},r)=>g.jsx(es,{className:ue("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...n,ref:r}));F1.displayName=es.displayName;const hO=Rc("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),hm=x.forwardRef(({side:e="right",className:n,children:r,...i},l)=>g.jsxs(dO,{children:[g.jsx(F1,{}),g.jsxs(ts,{ref:l,className:ue(hO({side:e}),n),...i,children:[r,g.jsxs(Oc,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[g.jsx(no,{className:"h-4 w-4"}),g.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));hm.displayName=ts.displayName;const pm=({className:e,...n})=>g.jsx("div",{className:ue("flex flex-col space-y-2 text-center sm:text-left",e),...n});pm.displayName="SheetHeader";const mm=x.forwardRef(({className:e,...n},r)=>g.jsx(ns,{ref:r,className:ue("text-lg font-semibold text-foreground",e),...n}));mm.displayName=ns.displayName;const q1=x.forwardRef(({className:e,...n},r)=>g.jsx(rs,{ref:r,className:ue("text-sm text-muted-foreground",e),...n}));q1.displayName=rs.displayName;function Ob({className:e,...n}){return g.jsx("div",{className:ue("animate-pulse rounded-md bg-muted",e),...n})}const pO=["top","right","bottom","left"],Aa=Math.min,Nn=Math.max,oc=Math.round,zu=Math.floor,yr=e=>({x:e,y:e}),mO={left:"right",right:"left",bottom:"top",top:"bottom"},gO={start:"end",end:"start"};function pp(e,n,r){return Nn(e,Aa(n,r))}function Vr(e,n){return typeof e=="function"?e(n):e}function $r(e){return e.split("-")[0]}function bo(e){return e.split("-")[1]}function gm(e){return e==="x"?"y":"x"}function ym(e){return e==="y"?"height":"width"}const yO=new Set(["top","bottom"]);function mr(e){return yO.has($r(e))?"y":"x"}function vm(e){return gm(mr(e))}function vO(e,n,r){r===void 0&&(r=!1);const i=bo(e),l=vm(e),s=ym(l);let c=l==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return n.reference[s]>n.floating[s]&&(c=lc(c)),[c,lc(c)]}function xO(e){const n=lc(e);return[mp(e),n,mp(n)]}function mp(e){return e.replace(/start|end/g,n=>gO[n])}const Pb=["left","right"],Lb=["right","left"],bO=["top","bottom"],wO=["bottom","top"];function SO(e,n,r){switch(e){case"top":case"bottom":return r?n?Lb:Pb:n?Pb:Lb;case"left":case"right":return n?bO:wO;default:return[]}}function EO(e,n,r,i){const l=bo(e);let s=SO($r(e),r==="start",i);return l&&(s=s.map(c=>c+"-"+l),n&&(s=s.concat(s.map(mp)))),s}function lc(e){return e.replace(/left|right|bottom|top/g,n=>mO[n])}function CO(e){return{top:0,right:0,bottom:0,left:0,...e}}function V1(e){return typeof e!="number"?CO(e):{top:e,right:e,bottom:e,left:e}}function sc(e){const{x:n,y:r,width:i,height:l}=e;return{width:i,height:l,top:r,left:n,right:n+i,bottom:r+l,x:n,y:r}}function zb(e,n,r){let{reference:i,floating:l}=e;const s=mr(n),c=vm(n),f=ym(c),d=$r(n),h=s==="y",m=i.x+i.width/2-l.width/2,y=i.y+i.height/2-l.height/2,b=i[f]/2-l[f]/2;let w;switch(d){case"top":w={x:m,y:i.y-l.height};break;case"bottom":w={x:m,y:i.y+i.height};break;case"right":w={x:i.x+i.width,y};break;case"left":w={x:i.x-l.width,y};break;default:w={x:i.x,y:i.y}}switch(bo(n)){case"start":w[c]-=b*(r&&h?-1:1);break;case"end":w[c]+=b*(r&&h?-1:1);break}return w}const kO=async(e,n,r)=>{const{placement:i="bottom",strategy:l="absolute",middleware:s=[],platform:c}=r,f=s.filter(Boolean),d=await(c.isRTL==null?void 0:c.isRTL(n));let h=await c.getElementRects({reference:e,floating:n,strategy:l}),{x:m,y}=zb(h,i,d),b=i,w={},S=0;for(let E=0;E<f.length;E++){const{name:A,fn:T}=f[E],{x:N,y:R,data:O,reset:D}=await T({x:m,y,initialPlacement:i,placement:b,strategy:l,middlewareData:w,rects:h,platform:c,elements:{reference:e,floating:n}});m=N??m,y=R??y,w={...w,[A]:{...w[A],...O}},D&&S<=50&&(S++,typeof D=="object"&&(D.placement&&(b=D.placement),D.rects&&(h=D.rects===!0?await c.getElementRects({reference:e,floating:n,strategy:l}):D.rects),{x:m,y}=zb(h,b,d)),E=-1)}return{x:m,y,placement:b,strategy:l,middlewareData:w}};async function Hl(e,n){var r;n===void 0&&(n={});const{x:i,y:l,platform:s,rects:c,elements:f,strategy:d}=e,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:y="floating",altBoundary:b=!1,padding:w=0}=Vr(n,e),S=V1(w),A=f[b?y==="floating"?"reference":"floating":y],T=sc(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(A)))==null||r?A:A.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(f.floating)),boundary:h,rootBoundary:m,strategy:d})),N=y==="floating"?{x:i,y:l,width:c.floating.width,height:c.floating.height}:c.reference,R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(f.floating)),O=await(s.isElement==null?void 0:s.isElement(R))?await(s.getScale==null?void 0:s.getScale(R))||{x:1,y:1}:{x:1,y:1},D=sc(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:N,offsetParent:R,strategy:d}):N);return{top:(T.top-D.top+S.top)/O.y,bottom:(D.bottom-T.bottom+S.bottom)/O.y,left:(T.left-D.left+S.left)/O.x,right:(D.right-T.right+S.right)/O.x}}const AO=e=>({name:"arrow",options:e,async fn(n){const{x:r,y:i,placement:l,rects:s,platform:c,elements:f,middlewareData:d}=n,{element:h,padding:m=0}=Vr(e,n)||{};if(h==null)return{};const y=V1(m),b={x:r,y:i},w=vm(l),S=ym(w),E=await c.getDimensions(h),A=w==="y",T=A?"top":"left",N=A?"bottom":"right",R=A?"clientHeight":"clientWidth",O=s.reference[S]+s.reference[w]-b[w]-s.floating[S],D=b[w]-s.reference[w],j=await(c.getOffsetParent==null?void 0:c.getOffsetParent(h));let B=j?j[R]:0;(!B||!await(c.isElement==null?void 0:c.isElement(j)))&&(B=f.floating[R]||s.floating[S]);const F=O/2-D/2,Z=B/2-E[S]/2-1,L=Aa(y[T],Z),W=Aa(y[N],Z),J=L,ae=B-E[S]-W,K=B/2-E[S]/2+F,ie=pp(J,K,ae),z=!d.arrow&&bo(l)!=null&&K!==ie&&s.reference[S]/2-(K<J?L:W)-E[S]/2<0,X=z?K<J?K-J:K-ae:0;return{[w]:b[w]+X,data:{[w]:ie,centerOffset:K-ie-X,...z&&{alignmentOffset:X}},reset:z}}}),TO=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(n){var r,i;const{placement:l,middlewareData:s,rects:c,initialPlacement:f,platform:d,elements:h}=n,{mainAxis:m=!0,crossAxis:y=!0,fallbackPlacements:b,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:E=!0,...A}=Vr(e,n);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const T=$r(l),N=mr(f),R=$r(f)===f,O=await(d.isRTL==null?void 0:d.isRTL(h.floating)),D=b||(R||!E?[lc(f)]:xO(f)),j=S!=="none";!b&&j&&D.push(...EO(f,E,S,O));const B=[f,...D],F=await Hl(n,A),Z=[];let L=((i=s.flip)==null?void 0:i.overflows)||[];if(m&&Z.push(F[T]),y){const K=vO(l,c,O);Z.push(F[K[0]],F[K[1]])}if(L=[...L,{placement:l,overflows:Z}],!Z.every(K=>K<=0)){var W,J;const K=(((W=s.flip)==null?void 0:W.index)||0)+1,ie=B[K];if(ie&&(!(y==="alignment"?N!==mr(ie):!1)||L.every(H=>mr(H.placement)===N?H.overflows[0]>0:!0)))return{data:{index:K,overflows:L},reset:{placement:ie}};let z=(J=L.filter(X=>X.overflows[0]<=0).sort((X,H)=>X.overflows[1]-H.overflows[1])[0])==null?void 0:J.placement;if(!z)switch(w){case"bestFit":{var ae;const X=(ae=L.filter(H=>{if(j){const re=mr(H.placement);return re===N||re==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(re=>re>0).reduce((re,k)=>re+k,0)]).sort((H,re)=>H[1]-re[1])[0])==null?void 0:ae[0];X&&(z=X);break}case"initialPlacement":z=f;break}if(l!==z)return{reset:{placement:z}}}return{}}}};function Ib(e,n){return{top:e.top-n.height,right:e.right-n.width,bottom:e.bottom-n.height,left:e.left-n.width}}function Bb(e){return pO.some(n=>e[n]>=0)}const RO=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(n){const{rects:r}=n,{strategy:i="referenceHidden",...l}=Vr(e,n);switch(i){case"referenceHidden":{const s=await Hl(n,{...l,elementContext:"reference"}),c=Ib(s,r.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Bb(c)}}}case"escaped":{const s=await Hl(n,{...l,altBoundary:!0}),c=Ib(s,r.floating);return{data:{escapedOffsets:c,escaped:Bb(c)}}}default:return{}}}}},$1=new Set(["left","top"]);async function NO(e,n){const{placement:r,platform:i,elements:l}=e,s=await(i.isRTL==null?void 0:i.isRTL(l.floating)),c=$r(r),f=bo(r),d=mr(r)==="y",h=$1.has(c)?-1:1,m=s&&d?-1:1,y=Vr(n,e);let{mainAxis:b,crossAxis:w,alignmentAxis:S}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:y.mainAxis||0,crossAxis:y.crossAxis||0,alignmentAxis:y.alignmentAxis};return f&&typeof S=="number"&&(w=f==="end"?S*-1:S),d?{x:w*m,y:b*h}:{x:b*h,y:w*m}}const _O=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var r,i;const{x:l,y:s,placement:c,middlewareData:f}=n,d=await NO(n,e);return c===((r=f.offset)==null?void 0:r.placement)&&(i=f.arrow)!=null&&i.alignmentOffset?{}:{x:l+d.x,y:s+d.y,data:{...d,placement:c}}}}},MO=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:r,y:i,placement:l}=n,{mainAxis:s=!0,crossAxis:c=!1,limiter:f={fn:A=>{let{x:T,y:N}=A;return{x:T,y:N}}},...d}=Vr(e,n),h={x:r,y:i},m=await Hl(n,d),y=mr($r(l)),b=gm(y);let w=h[b],S=h[y];if(s){const A=b==="y"?"top":"left",T=b==="y"?"bottom":"right",N=w+m[A],R=w-m[T];w=pp(N,w,R)}if(c){const A=y==="y"?"top":"left",T=y==="y"?"bottom":"right",N=S+m[A],R=S-m[T];S=pp(N,S,R)}const E=f.fn({...n,[b]:w,[y]:S});return{...E,data:{x:E.x-r,y:E.y-i,enabled:{[b]:s,[y]:c}}}}}},jO=function(e){return e===void 0&&(e={}),{options:e,fn(n){const{x:r,y:i,placement:l,rects:s,middlewareData:c}=n,{offset:f=0,mainAxis:d=!0,crossAxis:h=!0}=Vr(e,n),m={x:r,y:i},y=mr(l),b=gm(y);let w=m[b],S=m[y];const E=Vr(f,n),A=typeof E=="number"?{mainAxis:E,crossAxis:0}:{mainAxis:0,crossAxis:0,...E};if(d){const R=b==="y"?"height":"width",O=s.reference[b]-s.floating[R]+A.mainAxis,D=s.reference[b]+s.reference[R]-A.mainAxis;w<O?w=O:w>D&&(w=D)}if(h){var T,N;const R=b==="y"?"width":"height",O=$1.has($r(l)),D=s.reference[y]-s.floating[R]+(O&&((T=c.offset)==null?void 0:T[y])||0)+(O?0:A.crossAxis),j=s.reference[y]+s.reference[R]+(O?0:((N=c.offset)==null?void 0:N[y])||0)-(O?A.crossAxis:0);S<D?S=D:S>j&&(S=j)}return{[b]:w,[y]:S}}}},DO=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(n){var r,i;const{placement:l,rects:s,platform:c,elements:f}=n,{apply:d=()=>{},...h}=Vr(e,n),m=await Hl(n,h),y=$r(l),b=bo(l),w=mr(l)==="y",{width:S,height:E}=s.floating;let A,T;y==="top"||y==="bottom"?(A=y,T=b===(await(c.isRTL==null?void 0:c.isRTL(f.floating))?"start":"end")?"left":"right"):(T=y,A=b==="end"?"top":"bottom");const N=E-m.top-m.bottom,R=S-m.left-m.right,O=Aa(E-m[A],N),D=Aa(S-m[T],R),j=!n.middlewareData.shift;let B=O,F=D;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(F=R),(i=n.middlewareData.shift)!=null&&i.enabled.y&&(B=N),j&&!b){const L=Nn(m.left,0),W=Nn(m.right,0),J=Nn(m.top,0),ae=Nn(m.bottom,0);w?F=S-2*(L!==0||W!==0?L+W:Nn(m.left,m.right)):B=E-2*(J!==0||ae!==0?J+ae:Nn(m.top,m.bottom))}await d({...n,availableWidth:F,availableHeight:B});const Z=await c.getDimensions(f.floating);return S!==Z.width||E!==Z.height?{reset:{rects:!0}}:{}}}};function Pc(){return typeof window<"u"}function wo(e){return G1(e)?(e.nodeName||"").toLowerCase():"#document"}function _n(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function xr(e){var n;return(n=(G1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function G1(e){return Pc()?e instanceof Node||e instanceof _n(e).Node:!1}function rr(e){return Pc()?e instanceof Element||e instanceof _n(e).Element:!1}function vr(e){return Pc()?e instanceof HTMLElement||e instanceof _n(e).HTMLElement:!1}function Ub(e){return!Pc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof _n(e).ShadowRoot}const OO=new Set(["inline","contents"]);function as(e){const{overflow:n,overflowX:r,overflowY:i,display:l}=ar(e);return/auto|scroll|overlay|hidden|clip/.test(n+i+r)&&!OO.has(l)}const PO=new Set(["table","td","th"]);function LO(e){return PO.has(wo(e))}const zO=[":popover-open",":modal"];function Lc(e){return zO.some(n=>{try{return e.matches(n)}catch{return!1}})}const IO=["transform","translate","scale","rotate","perspective"],BO=["transform","translate","scale","rotate","perspective","filter"],UO=["paint","layout","strict","content"];function xm(e){const n=bm(),r=rr(e)?ar(e):e;return IO.some(i=>r[i]?r[i]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!n&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!n&&(r.filter?r.filter!=="none":!1)||BO.some(i=>(r.willChange||"").includes(i))||UO.some(i=>(r.contain||"").includes(i))}function HO(e){let n=Ta(e);for(;vr(n)&&!lo(n);){if(xm(n))return n;if(Lc(n))return null;n=Ta(n)}return null}function bm(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const FO=new Set(["html","body","#document"]);function lo(e){return FO.has(wo(e))}function ar(e){return _n(e).getComputedStyle(e)}function zc(e){return rr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ta(e){if(wo(e)==="html")return e;const n=e.assignedSlot||e.parentNode||Ub(e)&&e.host||xr(e);return Ub(n)?n.host:n}function Y1(e){const n=Ta(e);return lo(n)?e.ownerDocument?e.ownerDocument.body:e.body:vr(n)&&as(n)?n:Y1(n)}function Fl(e,n,r){var i;n===void 0&&(n=[]),r===void 0&&(r=!0);const l=Y1(e),s=l===((i=e.ownerDocument)==null?void 0:i.body),c=_n(l);if(s){const f=gp(c);return n.concat(c,c.visualViewport||[],as(l)?l:[],f&&r?Fl(f):[])}return n.concat(l,Fl(l,[],r))}function gp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function K1(e){const n=ar(e);let r=parseFloat(n.width)||0,i=parseFloat(n.height)||0;const l=vr(e),s=l?e.offsetWidth:r,c=l?e.offsetHeight:i,f=oc(r)!==s||oc(i)!==c;return f&&(r=s,i=c),{width:r,height:i,$:f}}function wm(e){return rr(e)?e:e.contextElement}function ao(e){const n=wm(e);if(!vr(n))return yr(1);const r=n.getBoundingClientRect(),{width:i,height:l,$:s}=K1(n);let c=(s?oc(r.width):r.width)/i,f=(s?oc(r.height):r.height)/l;return(!c||!Number.isFinite(c))&&(c=1),(!f||!Number.isFinite(f))&&(f=1),{x:c,y:f}}const qO=yr(0);function X1(e){const n=_n(e);return!bm()||!n.visualViewport?qO:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function VO(e,n,r){return n===void 0&&(n=!1),!r||n&&r!==_n(e)?!1:n}function ti(e,n,r,i){n===void 0&&(n=!1),r===void 0&&(r=!1);const l=e.getBoundingClientRect(),s=wm(e);let c=yr(1);n&&(i?rr(i)&&(c=ao(i)):c=ao(e));const f=VO(s,r,i)?X1(s):yr(0);let d=(l.left+f.x)/c.x,h=(l.top+f.y)/c.y,m=l.width/c.x,y=l.height/c.y;if(s){const b=_n(s),w=i&&rr(i)?_n(i):i;let S=b,E=gp(S);for(;E&&i&&w!==S;){const A=ao(E),T=E.getBoundingClientRect(),N=ar(E),R=T.left+(E.clientLeft+parseFloat(N.paddingLeft))*A.x,O=T.top+(E.clientTop+parseFloat(N.paddingTop))*A.y;d*=A.x,h*=A.y,m*=A.x,y*=A.y,d+=R,h+=O,S=_n(E),E=gp(S)}}return sc({width:m,height:y,x:d,y:h})}function Sm(e,n){const r=zc(e).scrollLeft;return n?n.left+r:ti(xr(e)).left+r}function Q1(e,n,r){r===void 0&&(r=!1);const i=e.getBoundingClientRect(),l=i.left+n.scrollLeft-(r?0:Sm(e,i)),s=i.top+n.scrollTop;return{x:l,y:s}}function $O(e){let{elements:n,rect:r,offsetParent:i,strategy:l}=e;const s=l==="fixed",c=xr(i),f=n?Lc(n.floating):!1;if(i===c||f&&s)return r;let d={scrollLeft:0,scrollTop:0},h=yr(1);const m=yr(0),y=vr(i);if((y||!y&&!s)&&((wo(i)!=="body"||as(c))&&(d=zc(i)),vr(i))){const w=ti(i);h=ao(i),m.x=w.x+i.clientLeft,m.y=w.y+i.clientTop}const b=c&&!y&&!s?Q1(c,d,!0):yr(0);return{width:r.width*h.x,height:r.height*h.y,x:r.x*h.x-d.scrollLeft*h.x+m.x+b.x,y:r.y*h.y-d.scrollTop*h.y+m.y+b.y}}function GO(e){return Array.from(e.getClientRects())}function YO(e){const n=xr(e),r=zc(e),i=e.ownerDocument.body,l=Nn(n.scrollWidth,n.clientWidth,i.scrollWidth,i.clientWidth),s=Nn(n.scrollHeight,n.clientHeight,i.scrollHeight,i.clientHeight);let c=-r.scrollLeft+Sm(e);const f=-r.scrollTop;return ar(i).direction==="rtl"&&(c+=Nn(n.clientWidth,i.clientWidth)-l),{width:l,height:s,x:c,y:f}}function KO(e,n){const r=_n(e),i=xr(e),l=r.visualViewport;let s=i.clientWidth,c=i.clientHeight,f=0,d=0;if(l){s=l.width,c=l.height;const h=bm();(!h||h&&n==="fixed")&&(f=l.offsetLeft,d=l.offsetTop)}return{width:s,height:c,x:f,y:d}}const XO=new Set(["absolute","fixed"]);function QO(e,n){const r=ti(e,!0,n==="fixed"),i=r.top+e.clientTop,l=r.left+e.clientLeft,s=vr(e)?ao(e):yr(1),c=e.clientWidth*s.x,f=e.clientHeight*s.y,d=l*s.x,h=i*s.y;return{width:c,height:f,x:d,y:h}}function Hb(e,n,r){let i;if(n==="viewport")i=KO(e,r);else if(n==="document")i=YO(xr(e));else if(rr(n))i=QO(n,r);else{const l=X1(e);i={x:n.x-l.x,y:n.y-l.y,width:n.width,height:n.height}}return sc(i)}function Z1(e,n){const r=Ta(e);return r===n||!rr(r)||lo(r)?!1:ar(r).position==="fixed"||Z1(r,n)}function ZO(e,n){const r=n.get(e);if(r)return r;let i=Fl(e,[],!1).filter(f=>rr(f)&&wo(f)!=="body"),l=null;const s=ar(e).position==="fixed";let c=s?Ta(e):e;for(;rr(c)&&!lo(c);){const f=ar(c),d=xm(c);!d&&f.position==="fixed"&&(l=null),(s?!d&&!l:!d&&f.position==="static"&&!!l&&XO.has(l.position)||as(c)&&!d&&Z1(e,c))?i=i.filter(m=>m!==c):l=f,c=Ta(c)}return n.set(e,i),i}function WO(e){let{element:n,boundary:r,rootBoundary:i,strategy:l}=e;const c=[...r==="clippingAncestors"?Lc(n)?[]:ZO(n,this._c):[].concat(r),i],f=c[0],d=c.reduce((h,m)=>{const y=Hb(n,m,l);return h.top=Nn(y.top,h.top),h.right=Aa(y.right,h.right),h.bottom=Aa(y.bottom,h.bottom),h.left=Nn(y.left,h.left),h},Hb(n,f,l));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function JO(e){const{width:n,height:r}=K1(e);return{width:n,height:r}}function e4(e,n,r){const i=vr(n),l=xr(n),s=r==="fixed",c=ti(e,!0,s,n);let f={scrollLeft:0,scrollTop:0};const d=yr(0);function h(){d.x=Sm(l)}if(i||!i&&!s)if((wo(n)!=="body"||as(l))&&(f=zc(n)),i){const w=ti(n,!0,s,n);d.x=w.x+n.clientLeft,d.y=w.y+n.clientTop}else l&&h();s&&!i&&l&&h();const m=l&&!i&&!s?Q1(l,f):yr(0),y=c.left+f.scrollLeft-d.x-m.x,b=c.top+f.scrollTop-d.y-m.y;return{x:y,y:b,width:c.width,height:c.height}}function jh(e){return ar(e).position==="static"}function Fb(e,n){if(!vr(e)||ar(e).position==="fixed")return null;if(n)return n(e);let r=e.offsetParent;return xr(e)===r&&(r=r.ownerDocument.body),r}function W1(e,n){const r=_n(e);if(Lc(e))return r;if(!vr(e)){let l=Ta(e);for(;l&&!lo(l);){if(rr(l)&&!jh(l))return l;l=Ta(l)}return r}let i=Fb(e,n);for(;i&&LO(i)&&jh(i);)i=Fb(i,n);return i&&lo(i)&&jh(i)&&!xm(i)?r:i||HO(e)||r}const t4=async function(e){const n=this.getOffsetParent||W1,r=this.getDimensions,i=await r(e.floating);return{reference:e4(e.reference,await n(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function n4(e){return ar(e).direction==="rtl"}const r4={convertOffsetParentRelativeRectToViewportRelativeRect:$O,getDocumentElement:xr,getClippingRect:WO,getOffsetParent:W1,getElementRects:t4,getClientRects:GO,getDimensions:JO,getScale:ao,isElement:rr,isRTL:n4};function J1(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}function a4(e,n){let r=null,i;const l=xr(e);function s(){var f;clearTimeout(i),(f=r)==null||f.disconnect(),r=null}function c(f,d){f===void 0&&(f=!1),d===void 0&&(d=1),s();const h=e.getBoundingClientRect(),{left:m,top:y,width:b,height:w}=h;if(f||n(),!b||!w)return;const S=zu(y),E=zu(l.clientWidth-(m+b)),A=zu(l.clientHeight-(y+w)),T=zu(m),R={rootMargin:-S+"px "+-E+"px "+-A+"px "+-T+"px",threshold:Nn(0,Aa(1,d))||1};let O=!0;function D(j){const B=j[0].intersectionRatio;if(B!==d){if(!O)return c();B?c(!1,B):i=setTimeout(()=>{c(!1,1e-7)},1e3)}B===1&&!J1(h,e.getBoundingClientRect())&&c(),O=!1}try{r=new IntersectionObserver(D,{...R,root:l.ownerDocument})}catch{r=new IntersectionObserver(D,R)}r.observe(e)}return c(!0),s}function i4(e,n,r,i){i===void 0&&(i={});const{ancestorScroll:l=!0,ancestorResize:s=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:d=!1}=i,h=wm(e),m=l||s?[...h?Fl(h):[],...Fl(n)]:[];m.forEach(T=>{l&&T.addEventListener("scroll",r,{passive:!0}),s&&T.addEventListener("resize",r)});const y=h&&f?a4(h,r):null;let b=-1,w=null;c&&(w=new ResizeObserver(T=>{let[N]=T;N&&N.target===h&&w&&(w.unobserve(n),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var R;(R=w)==null||R.observe(n)})),r()}),h&&!d&&w.observe(h),w.observe(n));let S,E=d?ti(e):null;d&&A();function A(){const T=ti(e);E&&!J1(E,T)&&r(),E=T,S=requestAnimationFrame(A)}return r(),()=>{var T;m.forEach(N=>{l&&N.removeEventListener("scroll",r),s&&N.removeEventListener("resize",r)}),y?.(),(T=w)==null||T.disconnect(),w=null,d&&cancelAnimationFrame(S)}}const o4=_O,l4=MO,s4=TO,u4=DO,c4=RO,qb=AO,f4=jO,d4=(e,n,r)=>{const i=new Map,l={platform:r4,...r},s={...l.platform,_c:i};return kO(e,n,{...l,platform:s})};var h4=typeof document<"u",p4=function(){},Xu=h4?x.useLayoutEffect:p4;function uc(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(typeof e=="function"&&e.toString()===n.toString())return!0;let r,i,l;if(e&&n&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==n.length)return!1;for(i=r;i--!==0;)if(!uc(e[i],n[i]))return!1;return!0}if(l=Object.keys(e),r=l.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!{}.hasOwnProperty.call(n,l[i]))return!1;for(i=r;i--!==0;){const s=l[i];if(!(s==="_owner"&&e.$$typeof)&&!uc(e[s],n[s]))return!1}return!0}return e!==e&&n!==n}function eS(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Vb(e,n){const r=eS(e);return Math.round(n*r)/r}function Dh(e){const n=x.useRef(e);return Xu(()=>{n.current=e}),n}function m4(e){e===void 0&&(e={});const{placement:n="bottom",strategy:r="absolute",middleware:i=[],platform:l,elements:{reference:s,floating:c}={},transform:f=!0,whileElementsMounted:d,open:h}=e,[m,y]=x.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[b,w]=x.useState(i);uc(b,i)||w(i);const[S,E]=x.useState(null),[A,T]=x.useState(null),N=x.useCallback(H=>{H!==j.current&&(j.current=H,E(H))},[]),R=x.useCallback(H=>{H!==B.current&&(B.current=H,T(H))},[]),O=s||S,D=c||A,j=x.useRef(null),B=x.useRef(null),F=x.useRef(m),Z=d!=null,L=Dh(d),W=Dh(l),J=Dh(h),ae=x.useCallback(()=>{if(!j.current||!B.current)return;const H={placement:n,strategy:r,middleware:b};W.current&&(H.platform=W.current),d4(j.current,B.current,H).then(re=>{const k={...re,isPositioned:J.current!==!1};K.current&&!uc(F.current,k)&&(F.current=k,mo.flushSync(()=>{y(k)}))})},[b,n,r,W,J]);Xu(()=>{h===!1&&F.current.isPositioned&&(F.current.isPositioned=!1,y(H=>({...H,isPositioned:!1})))},[h]);const K=x.useRef(!1);Xu(()=>(K.current=!0,()=>{K.current=!1}),[]),Xu(()=>{if(O&&(j.current=O),D&&(B.current=D),O&&D){if(L.current)return L.current(O,D,ae);ae()}},[O,D,ae,L,Z]);const ie=x.useMemo(()=>({reference:j,floating:B,setReference:N,setFloating:R}),[N,R]),z=x.useMemo(()=>({reference:O,floating:D}),[O,D]),X=x.useMemo(()=>{const H={position:r,left:0,top:0};if(!z.floating)return H;const re=Vb(z.floating,m.x),k=Vb(z.floating,m.y);return f?{...H,transform:"translate("+re+"px, "+k+"px)",...eS(z.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:re,top:k}},[r,f,z.floating,m.x,m.y]);return x.useMemo(()=>({...m,update:ae,refs:ie,elements:z,floatingStyles:X}),[m,ae,ie,z,X])}const g4=e=>{function n(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:i,padding:l}=typeof e=="function"?e(r):e;return i&&n(i)?i.current!=null?qb({element:i.current,padding:l}).fn(r):{}:i?qb({element:i,padding:l}).fn(r):{}}}},y4=(e,n)=>({...o4(e),options:[e,n]}),v4=(e,n)=>({...l4(e),options:[e,n]}),x4=(e,n)=>({...f4(e),options:[e,n]}),b4=(e,n)=>({...s4(e),options:[e,n]}),w4=(e,n)=>({...u4(e),options:[e,n]}),S4=(e,n)=>({...c4(e),options:[e,n]}),E4=(e,n)=>({...g4(e),options:[e,n]});var C4="Arrow",tS=x.forwardRef((e,n)=>{const{children:r,width:i=10,height:l=5,...s}=e;return g.jsx(Ne.svg,{...s,ref:n,width:i,height:l,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});tS.displayName=C4;var k4=tS;function nS(e){const[n,r]=x.useState(void 0);return qt(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const i=new ResizeObserver(l=>{if(!Array.isArray(l)||!l.length)return;const s=l[0];let c,f;if("borderBoxSize"in s){const d=s.borderBoxSize,h=Array.isArray(d)?d[0]:d;c=h.inlineSize,f=h.blockSize}else c=e.offsetWidth,f=e.offsetHeight;r({width:c,height:f})});return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}else r(void 0)},[e]),n}var Em="Popper",[rS,So]=Gn(Em),[A4,aS]=rS(Em),iS=e=>{const{__scopePopper:n,children:r}=e,[i,l]=x.useState(null);return g.jsx(A4,{scope:n,anchor:i,onAnchorChange:l,children:r})};iS.displayName=Em;var oS="PopperAnchor",lS=x.forwardRef((e,n)=>{const{__scopePopper:r,virtualRef:i,...l}=e,s=aS(oS,r),c=x.useRef(null),f=Be(n,c),d=x.useRef(null);return x.useEffect(()=>{const h=d.current;d.current=i?.current||c.current,h!==d.current&&s.onAnchorChange(d.current)}),i?null:g.jsx(Ne.div,{...l,ref:f})});lS.displayName=oS;var Cm="PopperContent",[T4,R4]=rS(Cm),sS=x.forwardRef((e,n)=>{const{__scopePopper:r,side:i="bottom",sideOffset:l=0,align:s="center",alignOffset:c=0,arrowPadding:f=0,avoidCollisions:d=!0,collisionBoundary:h=[],collisionPadding:m=0,sticky:y="partial",hideWhenDetached:b=!1,updatePositionStrategy:w="optimized",onPlaced:S,...E}=e,A=aS(Cm,r),[T,N]=x.useState(null),R=Be(n,se=>N(se)),[O,D]=x.useState(null),j=nS(O),B=j?.width??0,F=j?.height??0,Z=i+(s!=="center"?"-"+s:""),L=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},W=Array.isArray(h)?h:[h],J=W.length>0,ae={padding:L,boundary:W.filter(_4),altBoundary:J},{refs:K,floatingStyles:ie,placement:z,isPositioned:X,middlewareData:H}=m4({strategy:"fixed",placement:Z,whileElementsMounted:(...se)=>i4(...se,{animationFrame:w==="always"}),elements:{reference:A.anchor},middleware:[y4({mainAxis:l+F,alignmentAxis:c}),d&&v4({mainAxis:!0,crossAxis:!1,limiter:y==="partial"?x4():void 0,...ae}),d&&b4({...ae}),w4({...ae,apply:({elements:se,rects:ge,availableWidth:Oe,availableHeight:De})=>{const{width:Pe,height:Ue}=ge.reference,ft=se.floating.style;ft.setProperty("--radix-popper-available-width",`${Oe}px`),ft.setProperty("--radix-popper-available-height",`${De}px`),ft.setProperty("--radix-popper-anchor-width",`${Pe}px`),ft.setProperty("--radix-popper-anchor-height",`${Ue}px`)}}),O&&E4({element:O,padding:f}),M4({arrowWidth:B,arrowHeight:F}),b&&S4({strategy:"referenceHidden",...ae})]}),[re,k]=fS(z),Q=_t(S);qt(()=>{X&&Q?.()},[X,Q]);const le=H.arrow?.x,M=H.arrow?.y,ce=H.arrow?.centerOffset!==0,[Se,me]=x.useState();return qt(()=>{T&&me(window.getComputedStyle(T).zIndex)},[T]),g.jsx("div",{ref:K.setFloating,"data-radix-popper-content-wrapper":"",style:{...ie,transform:X?ie.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Se,"--radix-popper-transform-origin":[H.transformOrigin?.x,H.transformOrigin?.y].join(" "),...H.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:g.jsx(T4,{scope:r,placedSide:re,onArrowChange:D,arrowX:le,arrowY:M,shouldHideArrow:ce,children:g.jsx(Ne.div,{"data-side":re,"data-align":k,...E,ref:R,style:{...E.style,animation:X?void 0:"none"}})})})});sS.displayName=Cm;var uS="PopperArrow",N4={top:"bottom",right:"left",bottom:"top",left:"right"},cS=x.forwardRef(function(n,r){const{__scopePopper:i,...l}=n,s=R4(uS,i),c=N4[s.placedSide];return g.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:g.jsx(k4,{...l,ref:r,style:{...l.style,display:"block"}})})});cS.displayName=uS;function _4(e){return e!==null}var M4=e=>({name:"transformOrigin",options:e,fn(n){const{placement:r,rects:i,middlewareData:l}=n,c=l.arrow?.centerOffset!==0,f=c?0:e.arrowWidth,d=c?0:e.arrowHeight,[h,m]=fS(r),y={start:"0%",center:"50%",end:"100%"}[m],b=(l.arrow?.x??0)+f/2,w=(l.arrow?.y??0)+d/2;let S="",E="";return h==="bottom"?(S=c?y:`${b}px`,E=`${-d}px`):h==="top"?(S=c?y:`${b}px`,E=`${i.floating.height+d}px`):h==="right"?(S=`${-d}px`,E=c?y:`${w}px`):h==="left"&&(S=`${i.floating.width+d}px`,E=c?y:`${w}px`),{data:{x:S,y:E}}}});function fS(e){const[n,r="center"]=e.split("-");return[n,r]}var km=iS,Am=lS,Tm=sS,Rm=cS,[Ic,GU]=Gn("Tooltip",[So]),Bc=So(),dS="TooltipProvider",j4=700,yp="tooltip.open",[D4,Nm]=Ic(dS),hS=e=>{const{__scopeTooltip:n,delayDuration:r=j4,skipDelayDuration:i=300,disableHoverableContent:l=!1,children:s}=e,c=x.useRef(!0),f=x.useRef(!1),d=x.useRef(0);return x.useEffect(()=>{const h=d.current;return()=>window.clearTimeout(h)},[]),g.jsx(D4,{scope:n,isOpenDelayedRef:c,delayDuration:r,onOpen:x.useCallback(()=>{window.clearTimeout(d.current),c.current=!1},[]),onClose:x.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>c.current=!0,i)},[i]),isPointerInTransitRef:f,onPointerInTransitChange:x.useCallback(h=>{f.current=h},[]),disableHoverableContent:l,children:s})};hS.displayName=dS;var ql="Tooltip",[O4,Uc]=Ic(ql),pS=e=>{const{__scopeTooltip:n,children:r,open:i,defaultOpen:l,onOpenChange:s,disableHoverableContent:c,delayDuration:f}=e,d=Nm(ql,e.__scopeTooltip),h=Bc(n),[m,y]=x.useState(null),b=gr(),w=x.useRef(0),S=c??d.disableHoverableContent,E=f??d.delayDuration,A=x.useRef(!1),[T,N]=ka({prop:i,defaultProp:l??!1,onChange:B=>{B?(d.onOpen(),document.dispatchEvent(new CustomEvent(yp))):d.onClose(),s?.(B)},caller:ql}),R=x.useMemo(()=>T?A.current?"delayed-open":"instant-open":"closed",[T]),O=x.useCallback(()=>{window.clearTimeout(w.current),w.current=0,A.current=!1,N(!0)},[N]),D=x.useCallback(()=>{window.clearTimeout(w.current),w.current=0,N(!1)},[N]),j=x.useCallback(()=>{window.clearTimeout(w.current),w.current=window.setTimeout(()=>{A.current=!0,N(!0),w.current=0},E)},[E,N]);return x.useEffect(()=>()=>{w.current&&(window.clearTimeout(w.current),w.current=0)},[]),g.jsx(km,{...h,children:g.jsx(O4,{scope:n,contentId:b,open:T,stateAttribute:R,trigger:m,onTriggerChange:y,onTriggerEnter:x.useCallback(()=>{d.isOpenDelayedRef.current?j():O()},[d.isOpenDelayedRef,j,O]),onTriggerLeave:x.useCallback(()=>{S?D():(window.clearTimeout(w.current),w.current=0)},[D,S]),onOpen:O,onClose:D,disableHoverableContent:S,children:r})})};pS.displayName=ql;var vp="TooltipTrigger",mS=x.forwardRef((e,n)=>{const{__scopeTooltip:r,...i}=e,l=Uc(vp,r),s=Nm(vp,r),c=Bc(r),f=x.useRef(null),d=Be(n,f,l.onTriggerChange),h=x.useRef(!1),m=x.useRef(!1),y=x.useCallback(()=>h.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",y),[y]),g.jsx(Am,{asChild:!0,...c,children:g.jsx(Ne.button,{"aria-describedby":l.open?l.contentId:void 0,"data-state":l.stateAttribute,...i,ref:d,onPointerMove:pe(e.onPointerMove,b=>{b.pointerType!=="touch"&&!m.current&&!s.isPointerInTransitRef.current&&(l.onTriggerEnter(),m.current=!0)}),onPointerLeave:pe(e.onPointerLeave,()=>{l.onTriggerLeave(),m.current=!1}),onPointerDown:pe(e.onPointerDown,()=>{l.open&&l.onClose(),h.current=!0,document.addEventListener("pointerup",y,{once:!0})}),onFocus:pe(e.onFocus,()=>{h.current||l.onOpen()}),onBlur:pe(e.onBlur,l.onClose),onClick:pe(e.onClick,l.onClose)})})});mS.displayName=vp;var P4="TooltipPortal",[YU,L4]=Ic(P4,{forceMount:void 0}),so="TooltipContent",gS=x.forwardRef((e,n)=>{const r=L4(so,e.__scopeTooltip),{forceMount:i=r.forceMount,side:l="top",...s}=e,c=Uc(so,e.__scopeTooltip);return g.jsx(fn,{present:i||c.open,children:c.disableHoverableContent?g.jsx(yS,{side:l,...s,ref:n}):g.jsx(z4,{side:l,...s,ref:n})})}),z4=x.forwardRef((e,n)=>{const r=Uc(so,e.__scopeTooltip),i=Nm(so,e.__scopeTooltip),l=x.useRef(null),s=Be(n,l),[c,f]=x.useState(null),{trigger:d,onClose:h}=r,m=l.current,{onPointerInTransitChange:y}=i,b=x.useCallback(()=>{f(null),y(!1)},[y]),w=x.useCallback((S,E)=>{const A=S.currentTarget,T={x:S.clientX,y:S.clientY},N=F4(T,A.getBoundingClientRect()),R=q4(T,N),O=V4(E.getBoundingClientRect()),D=G4([...R,...O]);f(D),y(!0)},[y]);return x.useEffect(()=>()=>b(),[b]),x.useEffect(()=>{if(d&&m){const S=A=>w(A,m),E=A=>w(A,d);return d.addEventListener("pointerleave",S),m.addEventListener("pointerleave",E),()=>{d.removeEventListener("pointerleave",S),m.removeEventListener("pointerleave",E)}}},[d,m,w,b]),x.useEffect(()=>{if(c){const S=E=>{const A=E.target,T={x:E.clientX,y:E.clientY},N=d?.contains(A)||m?.contains(A),R=!$4(T,c);N?b():R&&(b(),h())};return document.addEventListener("pointermove",S),()=>document.removeEventListener("pointermove",S)}},[d,m,c,h,b]),g.jsx(yS,{...e,ref:s})}),[I4,B4]=Ic(ql,{isInside:!1}),U4=xw("TooltipContent"),yS=x.forwardRef((e,n)=>{const{__scopeTooltip:r,children:i,"aria-label":l,onEscapeKeyDown:s,onPointerDownOutside:c,...f}=e,d=Uc(so,r),h=Bc(r),{onClose:m}=d;return x.useEffect(()=>(document.addEventListener(yp,m),()=>document.removeEventListener(yp,m)),[m]),x.useEffect(()=>{if(d.trigger){const y=b=>{b.target?.contains(d.trigger)&&m()};return window.addEventListener("scroll",y,{capture:!0}),()=>window.removeEventListener("scroll",y,{capture:!0})}},[d.trigger,m]),g.jsx(yo,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:y=>y.preventDefault(),onDismiss:m,children:g.jsxs(Tm,{"data-state":d.stateAttribute,...h,...f,ref:n,style:{...f.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[g.jsx(U4,{children:i}),g.jsx(I4,{scope:r,isInside:!0,children:g.jsx(w_,{id:d.contentId,role:"tooltip",children:l||i})})]})})});gS.displayName=so;var vS="TooltipArrow",H4=x.forwardRef((e,n)=>{const{__scopeTooltip:r,...i}=e,l=Bc(r);return B4(vS,r).isInside?null:g.jsx(Rm,{...l,...i,ref:n})});H4.displayName=vS;function F4(e,n){const r=Math.abs(n.top-e.y),i=Math.abs(n.bottom-e.y),l=Math.abs(n.right-e.x),s=Math.abs(n.left-e.x);switch(Math.min(r,i,l,s)){case s:return"left";case l:return"right";case r:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function q4(e,n,r=5){const i=[];switch(n){case"top":i.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":i.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":i.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":i.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return i}function V4(e){const{top:n,right:r,bottom:i,left:l}=e;return[{x:l,y:n},{x:r,y:n},{x:r,y:i},{x:l,y:i}]}function $4(e,n){const{x:r,y:i}=e;let l=!1;for(let s=0,c=n.length-1;s<n.length;c=s++){const f=n[s],d=n[c],h=f.x,m=f.y,y=d.x,b=d.y;m>i!=b>i&&r<(y-h)*(i-m)/(b-m)+h&&(l=!l)}return l}function G4(e){const n=e.slice();return n.sort((r,i)=>r.x<i.x?-1:r.x>i.x?1:r.y<i.y?-1:r.y>i.y?1:0),Y4(n)}function Y4(e){if(e.length<=1)return e.slice();const n=[];for(let i=0;i<e.length;i++){const l=e[i];for(;n.length>=2;){const s=n[n.length-1],c=n[n.length-2];if((s.x-c.x)*(l.y-c.y)>=(s.y-c.y)*(l.x-c.x))n.pop();else break}n.push(l)}n.pop();const r=[];for(let i=e.length-1;i>=0;i--){const l=e[i];for(;r.length>=2;){const s=r[r.length-1],c=r[r.length-2];if((s.x-c.x)*(l.y-c.y)>=(s.y-c.y)*(l.x-c.x))r.pop();else break}r.push(l)}return r.pop(),n.length===1&&r.length===1&&n[0].x===r[0].x&&n[0].y===r[0].y?n:n.concat(r)}var K4=hS,X4=pS,Q4=mS,xS=gS;const Z4=K4,W4=X4,J4=Q4,bS=x.forwardRef(({className:e,sideOffset:n=4,...r},i)=>g.jsx(xS,{ref:i,sideOffset:n,className:ue("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));bS.displayName=xS.displayName;const eP="sidebar_state",tP=3600*24*7,nP="16rem",rP="18rem",aP="3rem",iP="b",wS=x.createContext(null);function Hc(){const e=x.useContext(wS);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const SS=x.forwardRef(({defaultOpen:e=!0,open:n,onOpenChange:r,className:i,style:l,children:s,...c},f)=>{const d=u1(),[h,m]=x.useState(!1),[y,b]=x.useState(e),w=n??y,S=x.useCallback(N=>{const R=typeof N=="function"?N(w):N;r?r(R):b(R),document.cookie=`${eP}=${R}; path=/; max-age=${tP}`},[r,w]),E=x.useCallback(()=>d?m(N=>!N):S(N=>!N),[d,S,m]);x.useEffect(()=>{const N=R=>{R.key===iP&&(R.metaKey||R.ctrlKey)&&(R.preventDefault(),E())};return window.addEventListener("keydown",N),()=>window.removeEventListener("keydown",N)},[E]);const A=w?"expanded":"collapsed",T=x.useMemo(()=>({state:A,open:w,setOpen:S,isMobile:d,openMobile:h,setOpenMobile:m,toggleSidebar:E}),[A,w,S,d,h,m,E]);return g.jsx(wS.Provider,{value:T,children:g.jsx(Z4,{delayDuration:0,children:g.jsx("div",{style:{"--sidebar-width":nP,"--sidebar-width-icon":aP,...l},className:ue("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",i),ref:f,...c,children:s})})})});SS.displayName="SidebarProvider";const ES=x.forwardRef(({side:e="left",variant:n="sidebar",collapsible:r="offcanvas",className:i,children:l,...s},c)=>{const{isMobile:f,state:d,openMobile:h,setOpenMobile:m}=Hc();return r==="none"?g.jsx("div",{className:ue("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",i),ref:c,...s,children:l}):f?g.jsx(H1,{open:h,onOpenChange:m,...s,children:g.jsxs(hm,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":rP},side:e,children:[g.jsxs(pm,{className:"sr-only",children:[g.jsx(mm,{children:"Sidebar"}),g.jsx(q1,{children:"Displays the mobile sidebar."})]}),g.jsx("div",{className:"flex h-full w-full flex-col",children:l})]})}):g.jsxs("div",{ref:c,className:"group peer hidden text-sidebar-foreground md:block","data-state":d,"data-collapsible":d==="collapsed"?r:"","data-variant":n,"data-side":e,children:[g.jsx("div",{className:ue("relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",n==="floating"||n==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),g.jsx("div",{className:ue("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",n==="floating"||n==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",i),...s,children:g.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:l})})]})});ES.displayName="Sidebar";const CS=x.forwardRef(({className:e,onClick:n,...r},i)=>{const{toggleSidebar:l}=Hc();return g.jsxs(kt,{ref:i,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:ue("h-7 w-7",e),onClick:s=>{n?.(s),l()},...r,children:[g.jsx(FM,{}),g.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});CS.displayName="SidebarTrigger";const oP=x.forwardRef(({className:e,...n},r)=>{const{toggleSidebar:i}=Hc();return g.jsx("button",{ref:r,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:i,title:"Toggle Sidebar",className:ue("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...n})});oP.displayName="SidebarRail";const kS=x.forwardRef(({className:e,...n},r)=>g.jsx("main",{ref:r,className:ue("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...n}));kS.displayName="SidebarInset";const lP=x.forwardRef(({className:e,...n},r)=>g.jsx(c1,{ref:r,"data-sidebar":"input",className:ue("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...n}));lP.displayName="SidebarInput";const AS=x.forwardRef(({className:e,...n},r)=>g.jsx("div",{ref:r,"data-sidebar":"header",className:ue("flex flex-col gap-2 p-2",e),...n}));AS.displayName="SidebarHeader";const TS=x.forwardRef(({className:e,...n},r)=>g.jsx("div",{ref:r,"data-sidebar":"footer",className:ue("flex flex-col gap-2 p-2",e),...n}));TS.displayName="SidebarFooter";const sP=x.forwardRef(({className:e,...n},r)=>g.jsx(h1,{ref:r,"data-sidebar":"separator",className:ue("mx-2 w-auto bg-sidebar-border",e),...n}));sP.displayName="SidebarSeparator";const RS=x.forwardRef(({className:e,...n},r)=>g.jsx("div",{ref:r,"data-sidebar":"content",className:ue("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...n}));RS.displayName="SidebarContent";const Qu=x.forwardRef(({className:e,...n},r)=>g.jsx("div",{ref:r,"data-sidebar":"group",className:ue("relative flex w-full min-w-0 flex-col p-2",e),...n}));Qu.displayName="SidebarGroup";const Zu=x.forwardRef(({className:e,asChild:n=!1,...r},i)=>{const l=n?go:"div";return g.jsx(l,{ref:i,"data-sidebar":"group-label",className:ue("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...r})});Zu.displayName="SidebarGroupLabel";const uP=x.forwardRef(({className:e,asChild:n=!1,...r},i)=>{const l=n?go:"button";return g.jsx(l,{ref:i,"data-sidebar":"group-action",className:ue("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...r})});uP.displayName="SidebarGroupAction";const Wu=x.forwardRef(({className:e,...n},r)=>g.jsx("div",{ref:r,"data-sidebar":"group-content",className:ue("w-full text-sm",e),...n}));Wu.displayName="SidebarGroupContent";const Wi=x.forwardRef(({className:e,...n},r)=>g.jsx("ul",{ref:r,"data-sidebar":"menu",className:ue("flex w-full min-w-0 flex-col gap-1",e),...n}));Wi.displayName="SidebarMenu";const Ji=x.forwardRef(({className:e,...n},r)=>g.jsx("li",{ref:r,"data-sidebar":"menu-item",className:ue("group/menu-item relative",e),...n}));Ji.displayName="SidebarMenuItem";const cP=Rc("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),eo=x.forwardRef(({asChild:e=!1,isActive:n=!1,variant:r="default",size:i="default",tooltip:l,className:s,...c},f)=>{const d=e?go:"button",{isMobile:h,state:m}=Hc(),y=g.jsx(d,{ref:f,"data-sidebar":"menu-button","data-size":i,"data-active":n,className:ue(cP({variant:r,size:i}),s),...c});return l?(typeof l=="string"&&(l={children:l}),g.jsxs(W4,{children:[g.jsx(J4,{asChild:!0,children:y}),g.jsx(bS,{side:"right",align:"center",hidden:m!=="collapsed"||h,...l})]})):y});eo.displayName="SidebarMenuButton";const fP=x.forwardRef(({className:e,asChild:n=!1,showOnHover:r=!1,...i},l)=>{const s=n?go:"button";return g.jsx(s,{ref:l,"data-sidebar":"menu-action",className:ue("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",r&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...i})});fP.displayName="SidebarMenuAction";const xp=x.forwardRef(({className:e,...n},r)=>g.jsx("div",{ref:r,"data-sidebar":"menu-badge",className:ue("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-full px-1.5 text-xs font-semibold tabular-nums shadow-sm","transition-all duration-200 ease-in-out hover:scale-110","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...n}));xp.displayName="SidebarMenuBadge";const dP=x.forwardRef(({className:e,showIcon:n=!1,...r},i)=>{const l=x.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return g.jsxs("div",{ref:i,"data-sidebar":"menu-skeleton",className:ue("flex h-8 items-center gap-2 rounded-md px-2",e),...r,children:[n&&g.jsx(Ob,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),g.jsx(Ob,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":l}})]})});dP.displayName="SidebarMenuSkeleton";const hP=x.forwardRef(({className:e,...n},r)=>g.jsx("ul",{ref:r,"data-sidebar":"menu-sub",className:ue("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...n}));hP.displayName="SidebarMenuSub";const pP=x.forwardRef(({...e},n)=>g.jsx("li",{ref:n,...e}));pP.displayName="SidebarMenuSubItem";const mP=x.forwardRef(({asChild:e=!1,size:n="md",isActive:r,className:i,...l},s)=>{const c=e?go:"a";return g.jsx(c,{ref:s,"data-sidebar":"menu-sub-button","data-size":n,"data-active":r,className:ue("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",n==="sm"&&"text-xs",n==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",i),...l})});mP.displayName="SidebarMenuSubButton";const gP="1.0.71-alpha.2",yP={version:gP};function vP({className:e}){return g.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,children:[g.jsx("path",{d:"M13 8c0-2.76-2.46-5-5.5-5S2 5.24 2 8h2l1-1 1 1h4"}),g.jsx("path",{d:"M13 7.14A5.82 5.82 0 0 1 16.5 6c3.04 0 5.5 2.24 5.5 5h-3l-1-1-1 1h-3"}),g.jsx("path",{d:"M5.89 9.71c-2.15 2.15-2.3 5.47-.35 7.43l4.24-4.25.7-.7.71-.71 2.12-2.12c-1.95-1.96-5.27-1.8-7.42.35"}),g.jsx("path",{d:"M11 15.5c.5 2.5-.17 4.5-1 6.5h4c2-5.5-.5-12-1-14"})]})}const xP=[{title:"Home",url:"/",icon:kM},{title:"Proposals",url:"/proposals",icon:hM},{title:"Agents",url:"/agents",icon:Ol},{title:"Code",url:"/code",icon:iM},{title:"Utilities",url:"/utilities",icon:yj}],bP=[{title:"Overview",url:"/context/project",icon:rc},{title:"Architecture",url:"/context/architecture",icon:QM},{title:"Knowledge",url:"/context/knowledge",icon:Y_},{title:"Resources",url:"/resources",icon:xM}],wP=[{title:"Source Control",url:"/git",icon:Yw},{title:"Terminal",url:"/terminal",icon:uj},{title:"Schedule",url:"/schedule",icon:X_},{title:"Identity",url:"/identity",icon:TM}],SP=[{title:"Documentation",url:"https://docs.coconut.dev/",icon:UM,external:!0},{title:"Settings",url:"/settings/user",icon:WM}];function EP(){const{badges:e}=qN();return g.jsxs(ES,{className:"bg-sidebar border-r border-sidebar-border",children:[g.jsx(AS,{children:g.jsx(Wi,{children:g.jsx(Ji,{children:g.jsx(eo,{size:"lg",asChild:!0,className:"[&>svg]:!size-8",children:g.jsxs(Hr,{to:"/",children:[g.jsx(vP,{className:"size-8"}),g.jsxs("div",{className:"flex flex-col gap-0.5",children:[g.jsxs("span",{className:"font-semibold",children:[g.jsx("span",{className:"bg-gradient-to-r from-amber-500 via-orange-500 to-yellow-600 bg-clip-text text-transparent",children:"Coconut"}),g.jsx("span",{children:" Studio"})]}),g.jsxs("span",{className:"text-xs text-muted-foreground",children:["v",yP.version]})]})]})})})})}),g.jsxs(RS,{children:[g.jsxs(Qu,{children:[g.jsx(Zu,{children:"Main"}),g.jsx(Wu,{children:g.jsx(Wi,{children:xP.map(n=>g.jsxs(Ji,{children:[g.jsx(eo,{asChild:!0,children:g.jsxs(Hr,{to:n.url,children:[g.jsx(n.icon,{}),g.jsx("span",{children:n.title})]})}),n.title==="Code"&&e.codeSessions>0&&g.jsx(xp,{className:"bg-blue-600 text-white dark:bg-blue-500",children:e.codeSessions})]},n.title))})})]}),g.jsxs(Qu,{children:[g.jsx(Zu,{children:"Project"}),g.jsx(Wu,{children:g.jsx(Wi,{children:bP.map(n=>g.jsx(Ji,{children:g.jsx(eo,{asChild:!0,children:g.jsxs(Hr,{to:n.url,children:[g.jsx(n.icon,{}),g.jsx("span",{children:n.title})]})})},n.title))})})]}),g.jsxs(Qu,{children:[g.jsx(Zu,{children:"System"}),g.jsx(Wu,{children:g.jsx(Wi,{children:wP.map(n=>{let r=0;return n.title==="Source Control"&&e.gitChanges>0?r=e.gitChanges:n.title==="Terminal"&&e.terminalSessions>0?r=e.terminalSessions:n.title==="Schedule"&&e.runningScheduledJobs>0&&(r=e.runningScheduledJobs),g.jsxs(Ji,{children:[g.jsx(eo,{asChild:!0,children:g.jsxs(Hr,{to:n.url,children:[g.jsx(n.icon,{}),g.jsx("span",{children:n.title})]})}),r>0&&g.jsx(xp,{className:"bg-blue-600 text-white dark:bg-blue-500",children:r})]},n.title)})})})]})]}),g.jsx(TS,{children:g.jsx(Wi,{children:SP.map(n=>g.jsx(Ji,{children:g.jsx(eo,{asChild:!0,children:n.external?g.jsxs("a",{href:n.url,target:"_blank",rel:"noopener noreferrer",children:[g.jsx(n.icon,{}),g.jsx("span",{children:n.title})]}):g.jsxs(Hr,{to:n.url,children:[g.jsx(n.icon,{}),g.jsx("span",{children:n.title})]})})},n.title))})})]})}function bp(e,[n,r]){return Math.min(r,Math.max(n,e))}var CP=x.createContext(void 0);function Fc(e){const n=x.useContext(CP);return e||n||"ltr"}function NS(e){const n=x.useRef({value:e,previous:e});return x.useMemo(()=>(n.current.value!==e&&(n.current.previous=n.current.value,n.current.value=e),n.current.previous),[e])}var kP=[" ","Enter","ArrowUp","ArrowDown"],AP=[" ","Enter"],ni="Select",[qc,Vc,TP]=kc(ni),[Eo,KU]=Gn(ni,[TP,So]),$c=So(),[RP,Ra]=Eo(ni),[NP,_P]=Eo(ni),_S=e=>{const{__scopeSelect:n,children:r,open:i,defaultOpen:l,onOpenChange:s,value:c,defaultValue:f,onValueChange:d,dir:h,name:m,autoComplete:y,disabled:b,required:w,form:S}=e,E=$c(n),[A,T]=x.useState(null),[N,R]=x.useState(null),[O,D]=x.useState(!1),j=Fc(h),[B,F]=ka({prop:i,defaultProp:l??!1,onChange:s,caller:ni}),[Z,L]=ka({prop:c,defaultProp:f,onChange:d,caller:ni}),W=x.useRef(null),J=A?S||!!A.closest("form"):!0,[ae,K]=x.useState(new Set),ie=Array.from(ae).map(z=>z.props.value).join(";");return g.jsx(km,{...E,children:g.jsxs(RP,{required:w,scope:n,trigger:A,onTriggerChange:T,valueNode:N,onValueNodeChange:R,valueNodeHasChildren:O,onValueNodeHasChildrenChange:D,contentId:gr(),value:Z,onValueChange:L,open:B,onOpenChange:F,dir:j,triggerPointerDownPosRef:W,disabled:b,children:[g.jsx(qc.Provider,{scope:n,children:g.jsx(NP,{scope:e.__scopeSelect,onNativeOptionAdd:x.useCallback(z=>{K(X=>new Set(X).add(z))},[]),onNativeOptionRemove:x.useCallback(z=>{K(X=>{const H=new Set(X);return H.delete(z),H})},[]),children:r})}),J?g.jsxs(eE,{"aria-hidden":!0,required:w,tabIndex:-1,name:m,autoComplete:y,value:Z,onChange:z=>L(z.target.value),disabled:b,form:S,children:[Z===void 0?g.jsx("option",{value:""}):null,Array.from(ae)]},ie):null]})})};_S.displayName=ni;var MS="SelectTrigger",jS=x.forwardRef((e,n)=>{const{__scopeSelect:r,disabled:i=!1,...l}=e,s=$c(r),c=Ra(MS,r),f=c.disabled||i,d=Be(n,c.onTriggerChange),h=Vc(r),m=x.useRef("touch"),[y,b,w]=nE(E=>{const A=h().filter(R=>!R.disabled),T=A.find(R=>R.value===c.value),N=rE(A,E,T);N!==void 0&&c.onValueChange(N.value)}),S=E=>{f||(c.onOpenChange(!0),w()),E&&(c.triggerPointerDownPosRef.current={x:Math.round(E.pageX),y:Math.round(E.pageY)})};return g.jsx(Am,{asChild:!0,...s,children:g.jsx(Ne.button,{type:"button",role:"combobox","aria-controls":c.contentId,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":"none",dir:c.dir,"data-state":c.open?"open":"closed",disabled:f,"data-disabled":f?"":void 0,"data-placeholder":tE(c.value)?"":void 0,...l,ref:d,onClick:pe(l.onClick,E=>{E.currentTarget.focus(),m.current!=="mouse"&&S(E)}),onPointerDown:pe(l.onPointerDown,E=>{m.current=E.pointerType;const A=E.target;A.hasPointerCapture(E.pointerId)&&A.releasePointerCapture(E.pointerId),E.button===0&&E.ctrlKey===!1&&E.pointerType==="mouse"&&(S(E),E.preventDefault())}),onKeyDown:pe(l.onKeyDown,E=>{const A=y.current!=="";!(E.ctrlKey||E.altKey||E.metaKey)&&E.key.length===1&&b(E.key),!(A&&E.key===" ")&&kP.includes(E.key)&&(S(),E.preventDefault())})})})});jS.displayName=MS;var DS="SelectValue",OS=x.forwardRef((e,n)=>{const{__scopeSelect:r,className:i,style:l,children:s,placeholder:c="",...f}=e,d=Ra(DS,r),{onValueNodeHasChildrenChange:h}=d,m=s!==void 0,y=Be(n,d.onValueNodeChange);return qt(()=>{h(m)},[h,m]),g.jsx(Ne.span,{...f,ref:y,style:{pointerEvents:"none"},children:tE(d.value)?g.jsx(g.Fragment,{children:c}):s})});OS.displayName=DS;var MP="SelectIcon",PS=x.forwardRef((e,n)=>{const{__scopeSelect:r,children:i,...l}=e;return g.jsx(Ne.span,{"aria-hidden":!0,...l,ref:n,children:i||"▼"})});PS.displayName=MP;var jP="SelectPortal",LS=e=>g.jsx(Wl,{asChild:!0,...e});LS.displayName=jP;var ri="SelectContent",zS=x.forwardRef((e,n)=>{const r=Ra(ri,e.__scopeSelect),[i,l]=x.useState();if(qt(()=>{l(new DocumentFragment)},[]),!r.open){const s=i;return s?mo.createPortal(g.jsx(IS,{scope:e.__scopeSelect,children:g.jsx(qc.Slot,{scope:e.__scopeSelect,children:g.jsx("div",{children:e.children})})}),s):null}return g.jsx(BS,{...e,ref:n})});zS.displayName=ri;var er=10,[IS,Na]=Eo(ri),DP="SelectContentImpl",OP=Ja("SelectContent.RemoveScroll"),BS=x.forwardRef((e,n)=>{const{__scopeSelect:r,position:i="item-aligned",onCloseAutoFocus:l,onEscapeKeyDown:s,onPointerDownOutside:c,side:f,sideOffset:d,align:h,alignOffset:m,arrowPadding:y,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:E,avoidCollisions:A,...T}=e,N=Ra(ri,r),[R,O]=x.useState(null),[D,j]=x.useState(null),B=Be(n,se=>O(se)),[F,Z]=x.useState(null),[L,W]=x.useState(null),J=Vc(r),[ae,K]=x.useState(!1),ie=x.useRef(!1);x.useEffect(()=>{if(R)return lm(R)},[R]),om();const z=x.useCallback(se=>{const[ge,...Oe]=J().map(Ue=>Ue.ref.current),[De]=Oe.slice(-1),Pe=document.activeElement;for(const Ue of se)if(Ue===Pe||(Ue?.scrollIntoView({block:"nearest"}),Ue===ge&&D&&(D.scrollTop=0),Ue===De&&D&&(D.scrollTop=D.scrollHeight),Ue?.focus(),document.activeElement!==Pe))return},[J,D]),X=x.useCallback(()=>z([F,R]),[z,F,R]);x.useEffect(()=>{ae&&X()},[ae,X]);const{onOpenChange:H,triggerPointerDownPosRef:re}=N;x.useEffect(()=>{if(R){let se={x:0,y:0};const ge=De=>{se={x:Math.abs(Math.round(De.pageX)-(re.current?.x??0)),y:Math.abs(Math.round(De.pageY)-(re.current?.y??0))}},Oe=De=>{se.x<=10&&se.y<=10?De.preventDefault():R.contains(De.target)||H(!1),document.removeEventListener("pointermove",ge),re.current=null};return re.current!==null&&(document.addEventListener("pointermove",ge),document.addEventListener("pointerup",Oe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ge),document.removeEventListener("pointerup",Oe,{capture:!0})}}},[R,H,re]),x.useEffect(()=>{const se=()=>H(!1);return window.addEventListener("blur",se),window.addEventListener("resize",se),()=>{window.removeEventListener("blur",se),window.removeEventListener("resize",se)}},[H]);const[k,Q]=nE(se=>{const ge=J().filter(Pe=>!Pe.disabled),Oe=ge.find(Pe=>Pe.ref.current===document.activeElement),De=rE(ge,se,Oe);De&&setTimeout(()=>De.ref.current.focus())}),le=x.useCallback((se,ge,Oe)=>{const De=!ie.current&&!Oe;(N.value!==void 0&&N.value===ge||De)&&(Z(se),De&&(ie.current=!0))},[N.value]),M=x.useCallback(()=>R?.focus(),[R]),ce=x.useCallback((se,ge,Oe)=>{const De=!ie.current&&!Oe;(N.value!==void 0&&N.value===ge||De)&&W(se)},[N.value]),Se=i==="popper"?wp:US,me=Se===wp?{side:f,sideOffset:d,align:h,alignOffset:m,arrowPadding:y,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:E,avoidCollisions:A}:{};return g.jsx(IS,{scope:r,content:R,viewport:D,onViewportChange:j,itemRefCallback:le,selectedItem:F,onItemLeave:M,itemTextRefCallback:ce,focusSelectedItem:X,selectedItemText:L,position:i,isPositioned:ae,searchRef:k,children:g.jsx(jc,{as:OP,allowPinchZoom:!0,children:g.jsx(_c,{asChild:!0,trapped:N.open,onMountAutoFocus:se=>{se.preventDefault()},onUnmountAutoFocus:pe(l,se=>{N.trigger?.focus({preventScroll:!0}),se.preventDefault()}),children:g.jsx(yo,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:se=>se.preventDefault(),onDismiss:()=>N.onOpenChange(!1),children:g.jsx(Se,{role:"listbox",id:N.contentId,"data-state":N.open?"open":"closed",dir:N.dir,onContextMenu:se=>se.preventDefault(),...T,...me,onPlaced:()=>K(!0),ref:B,style:{display:"flex",flexDirection:"column",outline:"none",...T.style},onKeyDown:pe(T.onKeyDown,se=>{const ge=se.ctrlKey||se.altKey||se.metaKey;if(se.key==="Tab"&&se.preventDefault(),!ge&&se.key.length===1&&Q(se.key),["ArrowUp","ArrowDown","Home","End"].includes(se.key)){let De=J().filter(Pe=>!Pe.disabled).map(Pe=>Pe.ref.current);if(["ArrowUp","End"].includes(se.key)&&(De=De.slice().reverse()),["ArrowUp","ArrowDown"].includes(se.key)){const Pe=se.target,Ue=De.indexOf(Pe);De=De.slice(Ue+1)}setTimeout(()=>z(De)),se.preventDefault()}})})})})})})});BS.displayName=DP;var PP="SelectItemAlignedPosition",US=x.forwardRef((e,n)=>{const{__scopeSelect:r,onPlaced:i,...l}=e,s=Ra(ri,r),c=Na(ri,r),[f,d]=x.useState(null),[h,m]=x.useState(null),y=Be(n,B=>m(B)),b=Vc(r),w=x.useRef(!1),S=x.useRef(!0),{viewport:E,selectedItem:A,selectedItemText:T,focusSelectedItem:N}=c,R=x.useCallback(()=>{if(s.trigger&&s.valueNode&&f&&h&&E&&A&&T){const B=s.trigger.getBoundingClientRect(),F=h.getBoundingClientRect(),Z=s.valueNode.getBoundingClientRect(),L=T.getBoundingClientRect();if(s.dir!=="rtl"){const Pe=L.left-F.left,Ue=Z.left-Pe,ft=B.left-Ue,Zt=B.width+ft,Vt=Math.max(Zt,F.width),lr=window.innerWidth-er,xt=bp(Ue,[er,Math.max(er,lr-Vt)]);f.style.minWidth=Zt+"px",f.style.left=xt+"px"}else{const Pe=F.right-L.right,Ue=window.innerWidth-Z.right-Pe,ft=window.innerWidth-B.right-Ue,Zt=B.width+ft,Vt=Math.max(Zt,F.width),lr=window.innerWidth-er,xt=bp(Ue,[er,Math.max(er,lr-Vt)]);f.style.minWidth=Zt+"px",f.style.right=xt+"px"}const W=b(),J=window.innerHeight-er*2,ae=E.scrollHeight,K=window.getComputedStyle(h),ie=parseInt(K.borderTopWidth,10),z=parseInt(K.paddingTop,10),X=parseInt(K.borderBottomWidth,10),H=parseInt(K.paddingBottom,10),re=ie+z+ae+H+X,k=Math.min(A.offsetHeight*5,re),Q=window.getComputedStyle(E),le=parseInt(Q.paddingTop,10),M=parseInt(Q.paddingBottom,10),ce=B.top+B.height/2-er,Se=J-ce,me=A.offsetHeight/2,se=A.offsetTop+me,ge=ie+z+se,Oe=re-ge;if(ge<=ce){const Pe=W.length>0&&A===W[W.length-1].ref.current;f.style.bottom="0px";const Ue=h.clientHeight-E.offsetTop-E.offsetHeight,ft=Math.max(Se,me+(Pe?M:0)+Ue+X),Zt=ge+ft;f.style.height=Zt+"px"}else{const Pe=W.length>0&&A===W[0].ref.current;f.style.top="0px";const ft=Math.max(ce,ie+E.offsetTop+(Pe?le:0)+me)+Oe;f.style.height=ft+"px",E.scrollTop=ge-ce+E.offsetTop}f.style.margin=`${er}px 0`,f.style.minHeight=k+"px",f.style.maxHeight=J+"px",i?.(),requestAnimationFrame(()=>w.current=!0)}},[b,s.trigger,s.valueNode,f,h,E,A,T,s.dir,i]);qt(()=>R(),[R]);const[O,D]=x.useState();qt(()=>{h&&D(window.getComputedStyle(h).zIndex)},[h]);const j=x.useCallback(B=>{B&&S.current===!0&&(R(),N?.(),S.current=!1)},[R,N]);return g.jsx(zP,{scope:r,contentWrapper:f,shouldExpandOnScrollRef:w,onScrollButtonChange:j,children:g.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:O},children:g.jsx(Ne.div,{...l,ref:y,style:{boxSizing:"border-box",maxHeight:"100%",...l.style}})})})});US.displayName=PP;var LP="SelectPopperPosition",wp=x.forwardRef((e,n)=>{const{__scopeSelect:r,align:i="start",collisionPadding:l=er,...s}=e,c=$c(r);return g.jsx(Tm,{...c,...s,ref:n,align:i,collisionPadding:l,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});wp.displayName=LP;var[zP,_m]=Eo(ri,{}),Sp="SelectViewport",HS=x.forwardRef((e,n)=>{const{__scopeSelect:r,nonce:i,...l}=e,s=Na(Sp,r),c=_m(Sp,r),f=Be(n,s.onViewportChange),d=x.useRef(0);return g.jsxs(g.Fragment,{children:[g.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),g.jsx(qc.Slot,{scope:r,children:g.jsx(Ne.div,{"data-radix-select-viewport":"",role:"presentation",...l,ref:f,style:{position:"relative",flex:1,overflow:"hidden auto",...l.style},onScroll:pe(l.onScroll,h=>{const m=h.currentTarget,{contentWrapper:y,shouldExpandOnScrollRef:b}=c;if(b?.current&&y){const w=Math.abs(d.current-m.scrollTop);if(w>0){const S=window.innerHeight-er*2,E=parseFloat(y.style.minHeight),A=parseFloat(y.style.height),T=Math.max(E,A);if(T<S){const N=T+w,R=Math.min(S,N),O=N-R;y.style.height=R+"px",y.style.bottom==="0px"&&(m.scrollTop=O>0?O:0,y.style.justifyContent="flex-end")}}}d.current=m.scrollTop})})})]})});HS.displayName=Sp;var FS="SelectGroup",[IP,BP]=Eo(FS),UP=x.forwardRef((e,n)=>{const{__scopeSelect:r,...i}=e,l=gr();return g.jsx(IP,{scope:r,id:l,children:g.jsx(Ne.div,{role:"group","aria-labelledby":l,...i,ref:n})})});UP.displayName=FS;var qS="SelectLabel",VS=x.forwardRef((e,n)=>{const{__scopeSelect:r,...i}=e,l=BP(qS,r);return g.jsx(Ne.div,{id:l.id,...i,ref:n})});VS.displayName=qS;var cc="SelectItem",[HP,$S]=Eo(cc),GS=x.forwardRef((e,n)=>{const{__scopeSelect:r,value:i,disabled:l=!1,textValue:s,...c}=e,f=Ra(cc,r),d=Na(cc,r),h=f.value===i,[m,y]=x.useState(s??""),[b,w]=x.useState(!1),S=Be(n,N=>d.itemRefCallback?.(N,i,l)),E=gr(),A=x.useRef("touch"),T=()=>{l||(f.onValueChange(i),f.onOpenChange(!1))};if(i==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return g.jsx(HP,{scope:r,value:i,disabled:l,textId:E,isSelected:h,onItemTextChange:x.useCallback(N=>{y(R=>R||(N?.textContent??"").trim())},[]),children:g.jsx(qc.ItemSlot,{scope:r,value:i,disabled:l,textValue:m,children:g.jsx(Ne.div,{role:"option","aria-labelledby":E,"data-highlighted":b?"":void 0,"aria-selected":h&&b,"data-state":h?"checked":"unchecked","aria-disabled":l||void 0,"data-disabled":l?"":void 0,tabIndex:l?void 0:-1,...c,ref:S,onFocus:pe(c.onFocus,()=>w(!0)),onBlur:pe(c.onBlur,()=>w(!1)),onClick:pe(c.onClick,()=>{A.current!=="mouse"&&T()}),onPointerUp:pe(c.onPointerUp,()=>{A.current==="mouse"&&T()}),onPointerDown:pe(c.onPointerDown,N=>{A.current=N.pointerType}),onPointerMove:pe(c.onPointerMove,N=>{A.current=N.pointerType,l?d.onItemLeave?.():A.current==="mouse"&&N.currentTarget.focus({preventScroll:!0})}),onPointerLeave:pe(c.onPointerLeave,N=>{N.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:pe(c.onKeyDown,N=>{d.searchRef?.current!==""&&N.key===" "||(AP.includes(N.key)&&T(),N.key===" "&&N.preventDefault())})})})})});GS.displayName=cc;var _l="SelectItemText",YS=x.forwardRef((e,n)=>{const{__scopeSelect:r,className:i,style:l,...s}=e,c=Ra(_l,r),f=Na(_l,r),d=$S(_l,r),h=_P(_l,r),[m,y]=x.useState(null),b=Be(n,T=>y(T),d.onItemTextChange,T=>f.itemTextRefCallback?.(T,d.value,d.disabled)),w=m?.textContent,S=x.useMemo(()=>g.jsx("option",{value:d.value,disabled:d.disabled,children:w},d.value),[d.disabled,d.value,w]),{onNativeOptionAdd:E,onNativeOptionRemove:A}=h;return qt(()=>(E(S),()=>A(S)),[E,A,S]),g.jsxs(g.Fragment,{children:[g.jsx(Ne.span,{id:d.textId,...s,ref:b}),d.isSelected&&c.valueNode&&!c.valueNodeHasChildren?mo.createPortal(s.children,c.valueNode):null]})});YS.displayName=_l;var KS="SelectItemIndicator",XS=x.forwardRef((e,n)=>{const{__scopeSelect:r,...i}=e;return $S(KS,r).isSelected?g.jsx(Ne.span,{"aria-hidden":!0,...i,ref:n}):null});XS.displayName=KS;var Ep="SelectScrollUpButton",QS=x.forwardRef((e,n)=>{const r=Na(Ep,e.__scopeSelect),i=_m(Ep,e.__scopeSelect),[l,s]=x.useState(!1),c=Be(n,i.onScrollButtonChange);return qt(()=>{if(r.viewport&&r.isPositioned){let f=function(){const h=d.scrollTop>0;s(h)};const d=r.viewport;return f(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[r.viewport,r.isPositioned]),l?g.jsx(WS,{...e,ref:c,onAutoScroll:()=>{const{viewport:f,selectedItem:d}=r;f&&d&&(f.scrollTop=f.scrollTop-d.offsetHeight)}}):null});QS.displayName=Ep;var Cp="SelectScrollDownButton",ZS=x.forwardRef((e,n)=>{const r=Na(Cp,e.__scopeSelect),i=_m(Cp,e.__scopeSelect),[l,s]=x.useState(!1),c=Be(n,i.onScrollButtonChange);return qt(()=>{if(r.viewport&&r.isPositioned){let f=function(){const h=d.scrollHeight-d.clientHeight,m=Math.ceil(d.scrollTop)<h;s(m)};const d=r.viewport;return f(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[r.viewport,r.isPositioned]),l?g.jsx(WS,{...e,ref:c,onAutoScroll:()=>{const{viewport:f,selectedItem:d}=r;f&&d&&(f.scrollTop=f.scrollTop+d.offsetHeight)}}):null});ZS.displayName=Cp;var WS=x.forwardRef((e,n)=>{const{__scopeSelect:r,onAutoScroll:i,...l}=e,s=Na("SelectScrollButton",r),c=x.useRef(null),f=Vc(r),d=x.useCallback(()=>{c.current!==null&&(window.clearInterval(c.current),c.current=null)},[]);return x.useEffect(()=>()=>d(),[d]),qt(()=>{f().find(m=>m.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[f]),g.jsx(Ne.div,{"aria-hidden":!0,...l,ref:n,style:{flexShrink:0,...l.style},onPointerDown:pe(l.onPointerDown,()=>{c.current===null&&(c.current=window.setInterval(i,50))}),onPointerMove:pe(l.onPointerMove,()=>{s.onItemLeave?.(),c.current===null&&(c.current=window.setInterval(i,50))}),onPointerLeave:pe(l.onPointerLeave,()=>{d()})})}),FP="SelectSeparator",JS=x.forwardRef((e,n)=>{const{__scopeSelect:r,...i}=e;return g.jsx(Ne.div,{"aria-hidden":!0,...i,ref:n})});JS.displayName=FP;var kp="SelectArrow",qP=x.forwardRef((e,n)=>{const{__scopeSelect:r,...i}=e,l=$c(r),s=Ra(kp,r),c=Na(kp,r);return s.open&&c.position==="popper"?g.jsx(Rm,{...l,...i,ref:n}):null});qP.displayName=kp;var VP="SelectBubbleInput",eE=x.forwardRef(({__scopeSelect:e,value:n,...r},i)=>{const l=x.useRef(null),s=Be(i,l),c=NS(n);return x.useEffect(()=>{const f=l.current;if(!f)return;const d=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(d,"value").set;if(c!==n&&m){const y=new Event("change",{bubbles:!0});m.call(f,n),f.dispatchEvent(y)}},[c,n]),g.jsx(Ne.select,{...r,style:{...Ew,...r.style},ref:s,defaultValue:n})});eE.displayName=VP;function tE(e){return e===""||e===void 0}function nE(e){const n=_t(e),r=x.useRef(""),i=x.useRef(0),l=x.useCallback(c=>{const f=r.current+c;n(f),(function d(h){r.current=h,window.clearTimeout(i.current),h!==""&&(i.current=window.setTimeout(()=>d(""),1e3))})(f)},[n]),s=x.useCallback(()=>{r.current="",window.clearTimeout(i.current)},[]);return x.useEffect(()=>()=>window.clearTimeout(i.current),[]),[r,l,s]}function rE(e,n,r){const l=n.length>1&&Array.from(n).every(h=>h===n[0])?n[0]:n,s=r?e.indexOf(r):-1;let c=$P(e,Math.max(s,0));l.length===1&&(c=c.filter(h=>h!==r));const d=c.find(h=>h.textValue.toLowerCase().startsWith(l.toLowerCase()));return d!==r?d:void 0}function $P(e,n){return e.map((r,i)=>e[(n+i)%e.length])}var GP=_S,aE=jS,YP=OS,KP=PS,XP=LS,iE=zS,QP=HS,oE=VS,lE=GS,ZP=YS,WP=XS,sE=QS,uE=ZS,cE=JS;const $b=GP,Gb=YP,Ap=x.forwardRef(({className:e,children:n,...r},i)=>g.jsxs(aE,{ref:i,className:ue("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[n,g.jsx(KP,{asChild:!0,children:g.jsx(Gw,{className:"h-4 w-4 opacity-50"})})]}));Ap.displayName=aE.displayName;const fE=x.forwardRef(({className:e,...n},r)=>g.jsx(sE,{ref:r,className:ue("flex cursor-default items-center justify-center py-1",e),...n,children:g.jsx(tM,{className:"h-4 w-4"})}));fE.displayName=sE.displayName;const dE=x.forwardRef(({className:e,...n},r)=>g.jsx(uE,{ref:r,className:ue("flex cursor-default items-center justify-center py-1",e),...n,children:g.jsx(Gw,{className:"h-4 w-4"})}));dE.displayName=uE.displayName;const Tp=x.forwardRef(({className:e,children:n,position:r="popper",...i},l)=>g.jsx(XP,{children:g.jsxs(iE,{ref:l,className:ue("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...i,children:[g.jsx(fE,{}),g.jsx(QP,{className:ue("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),g.jsx(dE,{})]})}));Tp.displayName=iE.displayName;const JP=x.forwardRef(({className:e,...n},r)=>g.jsx(oE,{ref:r,className:ue("px-2 py-1.5 text-sm font-semibold",e),...n}));JP.displayName=oE.displayName;const Wa=x.forwardRef(({className:e,children:n,...r},i)=>g.jsxs(lE,{ref:i,className:ue("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[g.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:g.jsx(WP,{children:g.jsx(Nc,{className:"h-4 w-4"})})}),g.jsx(ZP,{children:n})]}));Wa.displayName=lE.displayName;const eL=x.forwardRef(({className:e,...n},r)=>g.jsx(cE,{ref:r,className:ue("-mx-1 my-1 h-px bg-muted",e),...n}));eL.displayName=cE.displayName;const Gc=fm,XU=U1,tL=dm,hE=x.forwardRef(({className:e,...n},r)=>g.jsx(es,{ref:r,className:ue("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...n}));hE.displayName=es.displayName;const is=x.forwardRef(({className:e,children:n,...r},i)=>g.jsxs(tL,{children:[g.jsx(hE,{}),g.jsxs(ts,{ref:i,className:ue("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[n,g.jsxs(Oc,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[g.jsx(no,{className:"h-4 w-4"}),g.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));is.displayName=ts.displayName;const os=({className:e,...n})=>g.jsx("div",{className:ue("flex flex-col space-y-1.5 text-center sm:text-left",e),...n});os.displayName="DialogHeader";const pE=({className:e,...n})=>g.jsx("div",{className:ue("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...n});pE.displayName="DialogFooter";const ls=x.forwardRef(({className:e,...n},r)=>g.jsx(ns,{ref:r,className:ue("text-lg font-semibold leading-none tracking-tight",e),...n}));ls.displayName=ns.displayName;const Ml=x.forwardRef(({className:e,...n},r)=>g.jsx(rs,{ref:r,className:ue("text-sm text-muted-foreground",e),...n}));Ml.displayName=rs.displayName;function Oh({className:e,...n}){return g.jsx("kbd",{"data-slot":"kbd",className:ue("inline-flex h-5 items-center justify-center rounded border border-muted-foreground/30 bg-muted/50 px-1.5 font-sans text-[11px] font-medium text-muted-foreground shadow-sm",e),...n})}function QU({className:e,...n}){return g.jsx("span",{"data-slot":"kbd-group",className:ue("inline-flex items-center gap-0.5",e),...n})}function ZU(){}function WU(){}function JU(e){const n=[],r=String(e||"");let i=r.indexOf(","),l=0,s=!1;for(;!s;){i===-1&&(i=r.length,s=!0);const c=r.slice(l,i).trim();(c||!s)&&n.push(c),l=i+1,i=r.indexOf(",",l)}return n}function nL(e,n){const r=n||{};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const rL=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,aL=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,iL={};function Yb(e,n){return(iL.jsx?aL:rL).test(e)}const oL=/[ \t\n\f\r]/g;function lL(e){return typeof e=="object"?e.type==="text"?Kb(e.value):!1:Kb(e)}function Kb(e){return e.replace(oL,"")===""}class ss{constructor(n,r,i){this.normal=r,this.property=n,i&&(this.space=i)}}ss.prototype.normal={};ss.prototype.property={};ss.prototype.space=void 0;function mE(e,n){const r={},i={};for(const l of e)Object.assign(r,l.property),Object.assign(i,l.normal);return new ss(r,i,n)}function Rp(e){return e.toLowerCase()}class vn{constructor(n,r){this.attribute=r,this.property=n}}vn.prototype.attribute="";vn.prototype.booleanish=!1;vn.prototype.boolean=!1;vn.prototype.commaOrSpaceSeparated=!1;vn.prototype.commaSeparated=!1;vn.prototype.defined=!1;vn.prototype.mustUseProperty=!1;vn.prototype.number=!1;vn.prototype.overloadedBoolean=!1;vn.prototype.property="";vn.prototype.spaceSeparated=!1;vn.prototype.space=void 0;let sL=0;const Ie=ii(),Dt=ii(),Np=ii(),he=ii(),ht=ii(),io=ii(),Rn=ii();function ii(){return 2**++sL}const _p=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ie,booleanish:Dt,commaOrSpaceSeparated:Rn,commaSeparated:io,number:he,overloadedBoolean:Np,spaceSeparated:ht},Symbol.toStringTag,{value:"Module"})),Ph=Object.keys(_p);class Mm extends vn{constructor(n,r,i,l){let s=-1;if(super(n,r),Xb(this,"space",l),typeof i=="number")for(;++s<Ph.length;){const c=Ph[s];Xb(this,Ph[s],(i&_p[c])===_p[c])}}}Mm.prototype.defined=!0;function Xb(e,n,r){r&&(e[n]=r)}function Co(e){const n={},r={};for(const[i,l]of Object.entries(e.properties)){const s=new Mm(i,e.transform(e.attributes||{},i),l,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(s.mustUseProperty=!0),n[i]=s,r[Rp(i)]=i,r[Rp(s.attribute)]=i}return new ss(n,r,e.space)}const gE=Co({properties:{ariaActiveDescendant:null,ariaAtomic:Dt,ariaAutoComplete:null,ariaBusy:Dt,ariaChecked:Dt,ariaColCount:he,ariaColIndex:he,ariaColSpan:he,ariaControls:ht,ariaCurrent:null,ariaDescribedBy:ht,ariaDetails:null,ariaDisabled:Dt,ariaDropEffect:ht,ariaErrorMessage:null,ariaExpanded:Dt,ariaFlowTo:ht,ariaGrabbed:Dt,ariaHasPopup:null,ariaHidden:Dt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ht,ariaLevel:he,ariaLive:null,ariaModal:Dt,ariaMultiLine:Dt,ariaMultiSelectable:Dt,ariaOrientation:null,ariaOwns:ht,ariaPlaceholder:null,ariaPosInSet:he,ariaPressed:Dt,ariaReadOnly:Dt,ariaRelevant:null,ariaRequired:Dt,ariaRoleDescription:ht,ariaRowCount:he,ariaRowIndex:he,ariaRowSpan:he,ariaSelected:Dt,ariaSetSize:he,ariaSort:null,ariaValueMax:he,ariaValueMin:he,ariaValueNow:he,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function yE(e,n){return n in e?e[n]:n}function vE(e,n){return yE(e,n.toLowerCase())}const uL=Co({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:io,acceptCharset:ht,accessKey:ht,action:null,allow:null,allowFullScreen:Ie,allowPaymentRequest:Ie,allowUserMedia:Ie,alt:null,as:null,async:Ie,autoCapitalize:null,autoComplete:ht,autoFocus:Ie,autoPlay:Ie,blocking:ht,capture:null,charSet:null,checked:Ie,cite:null,className:ht,cols:he,colSpan:null,content:null,contentEditable:Dt,controls:Ie,controlsList:ht,coords:he|io,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ie,defer:Ie,dir:null,dirName:null,disabled:Ie,download:Np,draggable:Dt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ie,formTarget:null,headers:ht,height:he,hidden:Np,high:he,href:null,hrefLang:null,htmlFor:ht,httpEquiv:ht,id:null,imageSizes:null,imageSrcSet:null,inert:Ie,inputMode:null,integrity:null,is:null,isMap:Ie,itemId:null,itemProp:ht,itemRef:ht,itemScope:Ie,itemType:ht,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ie,low:he,manifest:null,max:null,maxLength:he,media:null,method:null,min:null,minLength:he,multiple:Ie,muted:Ie,name:null,nonce:null,noModule:Ie,noValidate:Ie,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ie,optimum:he,pattern:null,ping:ht,placeholder:null,playsInline:Ie,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ie,referrerPolicy:null,rel:ht,required:Ie,reversed:Ie,rows:he,rowSpan:he,sandbox:ht,scope:null,scoped:Ie,seamless:Ie,selected:Ie,shadowRootClonable:Ie,shadowRootDelegatesFocus:Ie,shadowRootMode:null,shape:null,size:he,sizes:null,slot:null,span:he,spellCheck:Dt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:he,step:null,style:null,tabIndex:he,target:null,title:null,translate:null,type:null,typeMustMatch:Ie,useMap:null,value:Dt,width:he,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ht,axis:null,background:null,bgColor:null,border:he,borderColor:null,bottomMargin:he,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ie,declare:Ie,event:null,face:null,frame:null,frameBorder:null,hSpace:he,leftMargin:he,link:null,longDesc:null,lowSrc:null,marginHeight:he,marginWidth:he,noResize:Ie,noHref:Ie,noShade:Ie,noWrap:Ie,object:null,profile:null,prompt:null,rev:null,rightMargin:he,rules:null,scheme:null,scrolling:Dt,standby:null,summary:null,text:null,topMargin:he,valueType:null,version:null,vAlign:null,vLink:null,vSpace:he,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ie,disableRemotePlayback:Ie,prefix:null,property:null,results:he,security:null,unselectable:null},space:"html",transform:vE}),cL=Co({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Rn,accentHeight:he,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:he,amplitude:he,arabicForm:null,ascent:he,attributeName:null,attributeType:null,azimuth:he,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:he,by:null,calcMode:null,capHeight:he,className:ht,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:he,diffuseConstant:he,direction:null,display:null,dur:null,divisor:he,dominantBaseline:null,download:Ie,dx:null,dy:null,edgeMode:null,editable:null,elevation:he,enableBackground:null,end:null,event:null,exponent:he,externalResourcesRequired:null,fill:null,fillOpacity:he,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:io,g2:io,glyphName:io,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:he,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:he,horizOriginX:he,horizOriginY:he,id:null,ideographic:he,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:he,k:he,k1:he,k2:he,k3:he,k4:he,kernelMatrix:Rn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:he,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:he,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:he,overlineThickness:he,paintOrder:null,panose1:null,path:null,pathLength:he,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ht,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:he,pointsAtY:he,pointsAtZ:he,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Rn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Rn,rev:Rn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Rn,requiredFeatures:Rn,requiredFonts:Rn,requiredFormats:Rn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:he,specularExponent:he,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:he,strikethroughThickness:he,string:null,stroke:null,strokeDashArray:Rn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:he,strokeOpacity:he,strokeWidth:null,style:null,surfaceScale:he,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Rn,tabIndex:he,tableValues:null,target:null,targetX:he,targetY:he,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Rn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:he,underlineThickness:he,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:he,values:null,vAlphabetic:he,vMathematical:he,vectorEffect:null,vHanging:he,vIdeographic:he,version:null,vertAdvY:he,vertOriginX:he,vertOriginY:he,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:he,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:yE}),xE=Co({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),bE=Co({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:vE}),wE=Co({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),fL={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},dL=/[A-Z]/g,Qb=/-[a-z]/g,hL=/^data[-\w.:]+$/i;function pL(e,n){const r=Rp(n);let i=n,l=vn;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&hL.test(n)){if(n.charAt(4)==="-"){const s=n.slice(5).replace(Qb,gL);i="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=n.slice(4);if(!Qb.test(s)){let c=s.replace(dL,mL);c.charAt(0)!=="-"&&(c="-"+c),n="data"+c}}l=Mm}return new l(i,n)}function mL(e){return"-"+e.toLowerCase()}function gL(e){return e.charAt(1).toUpperCase()}const yL=mE([gE,uL,xE,bE,wE],"html"),jm=mE([gE,cL,xE,bE,wE],"svg");function eH(e){const n=String(e||"").trim();return n?n.split(/[ \t\n\r\f]+/g):[]}function vL(e){return e.join(" ").trim()}var Qi={},Lh,Zb;function xL(){if(Zb)return Lh;Zb=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,d=`
355
+ For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return x.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},cO="DialogDescriptionWarning",fO=({contentRef:e,descriptionId:n})=>{const i=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${B1(cO).contentName}}.`;return x.useEffect(()=>{const l=e.current?.getAttribute("aria-describedby");n&&l&&(document.getElementById(n)||console.warn(i))},[i,e,n]),null},fm=k1,U1=T1,dm=N1,es=_1,ts=M1,ns=D1,rs=P1,Oc=z1;const H1=fm,dO=dm,F1=x.forwardRef(({className:e,...n},r)=>g.jsx(es,{className:ue("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...n,ref:r}));F1.displayName=es.displayName;const hO=Rc("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),hm=x.forwardRef(({side:e="right",className:n,children:r,...i},l)=>g.jsxs(dO,{children:[g.jsx(F1,{}),g.jsxs(ts,{ref:l,className:ue(hO({side:e}),n),...i,children:[r,g.jsxs(Oc,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[g.jsx(no,{className:"h-4 w-4"}),g.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));hm.displayName=ts.displayName;const pm=({className:e,...n})=>g.jsx("div",{className:ue("flex flex-col space-y-2 text-center sm:text-left",e),...n});pm.displayName="SheetHeader";const mm=x.forwardRef(({className:e,...n},r)=>g.jsx(ns,{ref:r,className:ue("text-lg font-semibold text-foreground",e),...n}));mm.displayName=ns.displayName;const q1=x.forwardRef(({className:e,...n},r)=>g.jsx(rs,{ref:r,className:ue("text-sm text-muted-foreground",e),...n}));q1.displayName=rs.displayName;function Ob({className:e,...n}){return g.jsx("div",{className:ue("animate-pulse rounded-md bg-muted",e),...n})}const pO=["top","right","bottom","left"],Aa=Math.min,Nn=Math.max,oc=Math.round,zu=Math.floor,yr=e=>({x:e,y:e}),mO={left:"right",right:"left",bottom:"top",top:"bottom"},gO={start:"end",end:"start"};function pp(e,n,r){return Nn(e,Aa(n,r))}function Vr(e,n){return typeof e=="function"?e(n):e}function $r(e){return e.split("-")[0]}function bo(e){return e.split("-")[1]}function gm(e){return e==="x"?"y":"x"}function ym(e){return e==="y"?"height":"width"}const yO=new Set(["top","bottom"]);function mr(e){return yO.has($r(e))?"y":"x"}function vm(e){return gm(mr(e))}function vO(e,n,r){r===void 0&&(r=!1);const i=bo(e),l=vm(e),s=ym(l);let c=l==="x"?i===(r?"end":"start")?"right":"left":i==="start"?"bottom":"top";return n.reference[s]>n.floating[s]&&(c=lc(c)),[c,lc(c)]}function xO(e){const n=lc(e);return[mp(e),n,mp(n)]}function mp(e){return e.replace(/start|end/g,n=>gO[n])}const Pb=["left","right"],Lb=["right","left"],bO=["top","bottom"],wO=["bottom","top"];function SO(e,n,r){switch(e){case"top":case"bottom":return r?n?Lb:Pb:n?Pb:Lb;case"left":case"right":return n?bO:wO;default:return[]}}function EO(e,n,r,i){const l=bo(e);let s=SO($r(e),r==="start",i);return l&&(s=s.map(c=>c+"-"+l),n&&(s=s.concat(s.map(mp)))),s}function lc(e){return e.replace(/left|right|bottom|top/g,n=>mO[n])}function CO(e){return{top:0,right:0,bottom:0,left:0,...e}}function V1(e){return typeof e!="number"?CO(e):{top:e,right:e,bottom:e,left:e}}function sc(e){const{x:n,y:r,width:i,height:l}=e;return{width:i,height:l,top:r,left:n,right:n+i,bottom:r+l,x:n,y:r}}function zb(e,n,r){let{reference:i,floating:l}=e;const s=mr(n),c=vm(n),f=ym(c),d=$r(n),h=s==="y",m=i.x+i.width/2-l.width/2,y=i.y+i.height/2-l.height/2,b=i[f]/2-l[f]/2;let w;switch(d){case"top":w={x:m,y:i.y-l.height};break;case"bottom":w={x:m,y:i.y+i.height};break;case"right":w={x:i.x+i.width,y};break;case"left":w={x:i.x-l.width,y};break;default:w={x:i.x,y:i.y}}switch(bo(n)){case"start":w[c]-=b*(r&&h?-1:1);break;case"end":w[c]+=b*(r&&h?-1:1);break}return w}const kO=async(e,n,r)=>{const{placement:i="bottom",strategy:l="absolute",middleware:s=[],platform:c}=r,f=s.filter(Boolean),d=await(c.isRTL==null?void 0:c.isRTL(n));let h=await c.getElementRects({reference:e,floating:n,strategy:l}),{x:m,y}=zb(h,i,d),b=i,w={},S=0;for(let E=0;E<f.length;E++){const{name:A,fn:T}=f[E],{x:N,y:R,data:O,reset:D}=await T({x:m,y,initialPlacement:i,placement:b,strategy:l,middlewareData:w,rects:h,platform:c,elements:{reference:e,floating:n}});m=N??m,y=R??y,w={...w,[A]:{...w[A],...O}},D&&S<=50&&(S++,typeof D=="object"&&(D.placement&&(b=D.placement),D.rects&&(h=D.rects===!0?await c.getElementRects({reference:e,floating:n,strategy:l}):D.rects),{x:m,y}=zb(h,b,d)),E=-1)}return{x:m,y,placement:b,strategy:l,middlewareData:w}};async function Hl(e,n){var r;n===void 0&&(n={});const{x:i,y:l,platform:s,rects:c,elements:f,strategy:d}=e,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:y="floating",altBoundary:b=!1,padding:w=0}=Vr(n,e),S=V1(w),A=f[b?y==="floating"?"reference":"floating":y],T=sc(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(A)))==null||r?A:A.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(f.floating)),boundary:h,rootBoundary:m,strategy:d})),N=y==="floating"?{x:i,y:l,width:c.floating.width,height:c.floating.height}:c.reference,R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(f.floating)),O=await(s.isElement==null?void 0:s.isElement(R))?await(s.getScale==null?void 0:s.getScale(R))||{x:1,y:1}:{x:1,y:1},D=sc(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:N,offsetParent:R,strategy:d}):N);return{top:(T.top-D.top+S.top)/O.y,bottom:(D.bottom-T.bottom+S.bottom)/O.y,left:(T.left-D.left+S.left)/O.x,right:(D.right-T.right+S.right)/O.x}}const AO=e=>({name:"arrow",options:e,async fn(n){const{x:r,y:i,placement:l,rects:s,platform:c,elements:f,middlewareData:d}=n,{element:h,padding:m=0}=Vr(e,n)||{};if(h==null)return{};const y=V1(m),b={x:r,y:i},w=vm(l),S=ym(w),E=await c.getDimensions(h),A=w==="y",T=A?"top":"left",N=A?"bottom":"right",R=A?"clientHeight":"clientWidth",O=s.reference[S]+s.reference[w]-b[w]-s.floating[S],D=b[w]-s.reference[w],j=await(c.getOffsetParent==null?void 0:c.getOffsetParent(h));let B=j?j[R]:0;(!B||!await(c.isElement==null?void 0:c.isElement(j)))&&(B=f.floating[R]||s.floating[S]);const F=O/2-D/2,Z=B/2-E[S]/2-1,L=Aa(y[T],Z),W=Aa(y[N],Z),J=L,ae=B-E[S]-W,K=B/2-E[S]/2+F,ie=pp(J,K,ae),z=!d.arrow&&bo(l)!=null&&K!==ie&&s.reference[S]/2-(K<J?L:W)-E[S]/2<0,X=z?K<J?K-J:K-ae:0;return{[w]:b[w]+X,data:{[w]:ie,centerOffset:K-ie-X,...z&&{alignmentOffset:X}},reset:z}}}),TO=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(n){var r,i;const{placement:l,middlewareData:s,rects:c,initialPlacement:f,platform:d,elements:h}=n,{mainAxis:m=!0,crossAxis:y=!0,fallbackPlacements:b,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:E=!0,...A}=Vr(e,n);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const T=$r(l),N=mr(f),R=$r(f)===f,O=await(d.isRTL==null?void 0:d.isRTL(h.floating)),D=b||(R||!E?[lc(f)]:xO(f)),j=S!=="none";!b&&j&&D.push(...EO(f,E,S,O));const B=[f,...D],F=await Hl(n,A),Z=[];let L=((i=s.flip)==null?void 0:i.overflows)||[];if(m&&Z.push(F[T]),y){const K=vO(l,c,O);Z.push(F[K[0]],F[K[1]])}if(L=[...L,{placement:l,overflows:Z}],!Z.every(K=>K<=0)){var W,J;const K=(((W=s.flip)==null?void 0:W.index)||0)+1,ie=B[K];if(ie&&(!(y==="alignment"?N!==mr(ie):!1)||L.every(H=>mr(H.placement)===N?H.overflows[0]>0:!0)))return{data:{index:K,overflows:L},reset:{placement:ie}};let z=(J=L.filter(X=>X.overflows[0]<=0).sort((X,H)=>X.overflows[1]-H.overflows[1])[0])==null?void 0:J.placement;if(!z)switch(w){case"bestFit":{var ae;const X=(ae=L.filter(H=>{if(j){const re=mr(H.placement);return re===N||re==="y"}return!0}).map(H=>[H.placement,H.overflows.filter(re=>re>0).reduce((re,k)=>re+k,0)]).sort((H,re)=>H[1]-re[1])[0])==null?void 0:ae[0];X&&(z=X);break}case"initialPlacement":z=f;break}if(l!==z)return{reset:{placement:z}}}return{}}}};function Ib(e,n){return{top:e.top-n.height,right:e.right-n.width,bottom:e.bottom-n.height,left:e.left-n.width}}function Bb(e){return pO.some(n=>e[n]>=0)}const RO=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(n){const{rects:r}=n,{strategy:i="referenceHidden",...l}=Vr(e,n);switch(i){case"referenceHidden":{const s=await Hl(n,{...l,elementContext:"reference"}),c=Ib(s,r.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Bb(c)}}}case"escaped":{const s=await Hl(n,{...l,altBoundary:!0}),c=Ib(s,r.floating);return{data:{escapedOffsets:c,escaped:Bb(c)}}}default:return{}}}}},$1=new Set(["left","top"]);async function NO(e,n){const{placement:r,platform:i,elements:l}=e,s=await(i.isRTL==null?void 0:i.isRTL(l.floating)),c=$r(r),f=bo(r),d=mr(r)==="y",h=$1.has(c)?-1:1,m=s&&d?-1:1,y=Vr(n,e);let{mainAxis:b,crossAxis:w,alignmentAxis:S}=typeof y=="number"?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:y.mainAxis||0,crossAxis:y.crossAxis||0,alignmentAxis:y.alignmentAxis};return f&&typeof S=="number"&&(w=f==="end"?S*-1:S),d?{x:w*m,y:b*h}:{x:b*h,y:w*m}}const _O=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var r,i;const{x:l,y:s,placement:c,middlewareData:f}=n,d=await NO(n,e);return c===((r=f.offset)==null?void 0:r.placement)&&(i=f.arrow)!=null&&i.alignmentOffset?{}:{x:l+d.x,y:s+d.y,data:{...d,placement:c}}}}},MO=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:r,y:i,placement:l}=n,{mainAxis:s=!0,crossAxis:c=!1,limiter:f={fn:A=>{let{x:T,y:N}=A;return{x:T,y:N}}},...d}=Vr(e,n),h={x:r,y:i},m=await Hl(n,d),y=mr($r(l)),b=gm(y);let w=h[b],S=h[y];if(s){const A=b==="y"?"top":"left",T=b==="y"?"bottom":"right",N=w+m[A],R=w-m[T];w=pp(N,w,R)}if(c){const A=y==="y"?"top":"left",T=y==="y"?"bottom":"right",N=S+m[A],R=S-m[T];S=pp(N,S,R)}const E=f.fn({...n,[b]:w,[y]:S});return{...E,data:{x:E.x-r,y:E.y-i,enabled:{[b]:s,[y]:c}}}}}},jO=function(e){return e===void 0&&(e={}),{options:e,fn(n){const{x:r,y:i,placement:l,rects:s,middlewareData:c}=n,{offset:f=0,mainAxis:d=!0,crossAxis:h=!0}=Vr(e,n),m={x:r,y:i},y=mr(l),b=gm(y);let w=m[b],S=m[y];const E=Vr(f,n),A=typeof E=="number"?{mainAxis:E,crossAxis:0}:{mainAxis:0,crossAxis:0,...E};if(d){const R=b==="y"?"height":"width",O=s.reference[b]-s.floating[R]+A.mainAxis,D=s.reference[b]+s.reference[R]-A.mainAxis;w<O?w=O:w>D&&(w=D)}if(h){var T,N;const R=b==="y"?"width":"height",O=$1.has($r(l)),D=s.reference[y]-s.floating[R]+(O&&((T=c.offset)==null?void 0:T[y])||0)+(O?0:A.crossAxis),j=s.reference[y]+s.reference[R]+(O?0:((N=c.offset)==null?void 0:N[y])||0)-(O?A.crossAxis:0);S<D?S=D:S>j&&(S=j)}return{[b]:w,[y]:S}}}},DO=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(n){var r,i;const{placement:l,rects:s,platform:c,elements:f}=n,{apply:d=()=>{},...h}=Vr(e,n),m=await Hl(n,h),y=$r(l),b=bo(l),w=mr(l)==="y",{width:S,height:E}=s.floating;let A,T;y==="top"||y==="bottom"?(A=y,T=b===(await(c.isRTL==null?void 0:c.isRTL(f.floating))?"start":"end")?"left":"right"):(T=y,A=b==="end"?"top":"bottom");const N=E-m.top-m.bottom,R=S-m.left-m.right,O=Aa(E-m[A],N),D=Aa(S-m[T],R),j=!n.middlewareData.shift;let B=O,F=D;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(F=R),(i=n.middlewareData.shift)!=null&&i.enabled.y&&(B=N),j&&!b){const L=Nn(m.left,0),W=Nn(m.right,0),J=Nn(m.top,0),ae=Nn(m.bottom,0);w?F=S-2*(L!==0||W!==0?L+W:Nn(m.left,m.right)):B=E-2*(J!==0||ae!==0?J+ae:Nn(m.top,m.bottom))}await d({...n,availableWidth:F,availableHeight:B});const Z=await c.getDimensions(f.floating);return S!==Z.width||E!==Z.height?{reset:{rects:!0}}:{}}}};function Pc(){return typeof window<"u"}function wo(e){return G1(e)?(e.nodeName||"").toLowerCase():"#document"}function _n(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function xr(e){var n;return(n=(G1(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function G1(e){return Pc()?e instanceof Node||e instanceof _n(e).Node:!1}function rr(e){return Pc()?e instanceof Element||e instanceof _n(e).Element:!1}function vr(e){return Pc()?e instanceof HTMLElement||e instanceof _n(e).HTMLElement:!1}function Ub(e){return!Pc()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof _n(e).ShadowRoot}const OO=new Set(["inline","contents"]);function as(e){const{overflow:n,overflowX:r,overflowY:i,display:l}=ar(e);return/auto|scroll|overlay|hidden|clip/.test(n+i+r)&&!OO.has(l)}const PO=new Set(["table","td","th"]);function LO(e){return PO.has(wo(e))}const zO=[":popover-open",":modal"];function Lc(e){return zO.some(n=>{try{return e.matches(n)}catch{return!1}})}const IO=["transform","translate","scale","rotate","perspective"],BO=["transform","translate","scale","rotate","perspective","filter"],UO=["paint","layout","strict","content"];function xm(e){const n=bm(),r=rr(e)?ar(e):e;return IO.some(i=>r[i]?r[i]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!n&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!n&&(r.filter?r.filter!=="none":!1)||BO.some(i=>(r.willChange||"").includes(i))||UO.some(i=>(r.contain||"").includes(i))}function HO(e){let n=Ta(e);for(;vr(n)&&!lo(n);){if(xm(n))return n;if(Lc(n))return null;n=Ta(n)}return null}function bm(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const FO=new Set(["html","body","#document"]);function lo(e){return FO.has(wo(e))}function ar(e){return _n(e).getComputedStyle(e)}function zc(e){return rr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ta(e){if(wo(e)==="html")return e;const n=e.assignedSlot||e.parentNode||Ub(e)&&e.host||xr(e);return Ub(n)?n.host:n}function Y1(e){const n=Ta(e);return lo(n)?e.ownerDocument?e.ownerDocument.body:e.body:vr(n)&&as(n)?n:Y1(n)}function Fl(e,n,r){var i;n===void 0&&(n=[]),r===void 0&&(r=!0);const l=Y1(e),s=l===((i=e.ownerDocument)==null?void 0:i.body),c=_n(l);if(s){const f=gp(c);return n.concat(c,c.visualViewport||[],as(l)?l:[],f&&r?Fl(f):[])}return n.concat(l,Fl(l,[],r))}function gp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function K1(e){const n=ar(e);let r=parseFloat(n.width)||0,i=parseFloat(n.height)||0;const l=vr(e),s=l?e.offsetWidth:r,c=l?e.offsetHeight:i,f=oc(r)!==s||oc(i)!==c;return f&&(r=s,i=c),{width:r,height:i,$:f}}function wm(e){return rr(e)?e:e.contextElement}function ao(e){const n=wm(e);if(!vr(n))return yr(1);const r=n.getBoundingClientRect(),{width:i,height:l,$:s}=K1(n);let c=(s?oc(r.width):r.width)/i,f=(s?oc(r.height):r.height)/l;return(!c||!Number.isFinite(c))&&(c=1),(!f||!Number.isFinite(f))&&(f=1),{x:c,y:f}}const qO=yr(0);function X1(e){const n=_n(e);return!bm()||!n.visualViewport?qO:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function VO(e,n,r){return n===void 0&&(n=!1),!r||n&&r!==_n(e)?!1:n}function ti(e,n,r,i){n===void 0&&(n=!1),r===void 0&&(r=!1);const l=e.getBoundingClientRect(),s=wm(e);let c=yr(1);n&&(i?rr(i)&&(c=ao(i)):c=ao(e));const f=VO(s,r,i)?X1(s):yr(0);let d=(l.left+f.x)/c.x,h=(l.top+f.y)/c.y,m=l.width/c.x,y=l.height/c.y;if(s){const b=_n(s),w=i&&rr(i)?_n(i):i;let S=b,E=gp(S);for(;E&&i&&w!==S;){const A=ao(E),T=E.getBoundingClientRect(),N=ar(E),R=T.left+(E.clientLeft+parseFloat(N.paddingLeft))*A.x,O=T.top+(E.clientTop+parseFloat(N.paddingTop))*A.y;d*=A.x,h*=A.y,m*=A.x,y*=A.y,d+=R,h+=O,S=_n(E),E=gp(S)}}return sc({width:m,height:y,x:d,y:h})}function Sm(e,n){const r=zc(e).scrollLeft;return n?n.left+r:ti(xr(e)).left+r}function Q1(e,n,r){r===void 0&&(r=!1);const i=e.getBoundingClientRect(),l=i.left+n.scrollLeft-(r?0:Sm(e,i)),s=i.top+n.scrollTop;return{x:l,y:s}}function $O(e){let{elements:n,rect:r,offsetParent:i,strategy:l}=e;const s=l==="fixed",c=xr(i),f=n?Lc(n.floating):!1;if(i===c||f&&s)return r;let d={scrollLeft:0,scrollTop:0},h=yr(1);const m=yr(0),y=vr(i);if((y||!y&&!s)&&((wo(i)!=="body"||as(c))&&(d=zc(i)),vr(i))){const w=ti(i);h=ao(i),m.x=w.x+i.clientLeft,m.y=w.y+i.clientTop}const b=c&&!y&&!s?Q1(c,d,!0):yr(0);return{width:r.width*h.x,height:r.height*h.y,x:r.x*h.x-d.scrollLeft*h.x+m.x+b.x,y:r.y*h.y-d.scrollTop*h.y+m.y+b.y}}function GO(e){return Array.from(e.getClientRects())}function YO(e){const n=xr(e),r=zc(e),i=e.ownerDocument.body,l=Nn(n.scrollWidth,n.clientWidth,i.scrollWidth,i.clientWidth),s=Nn(n.scrollHeight,n.clientHeight,i.scrollHeight,i.clientHeight);let c=-r.scrollLeft+Sm(e);const f=-r.scrollTop;return ar(i).direction==="rtl"&&(c+=Nn(n.clientWidth,i.clientWidth)-l),{width:l,height:s,x:c,y:f}}function KO(e,n){const r=_n(e),i=xr(e),l=r.visualViewport;let s=i.clientWidth,c=i.clientHeight,f=0,d=0;if(l){s=l.width,c=l.height;const h=bm();(!h||h&&n==="fixed")&&(f=l.offsetLeft,d=l.offsetTop)}return{width:s,height:c,x:f,y:d}}const XO=new Set(["absolute","fixed"]);function QO(e,n){const r=ti(e,!0,n==="fixed"),i=r.top+e.clientTop,l=r.left+e.clientLeft,s=vr(e)?ao(e):yr(1),c=e.clientWidth*s.x,f=e.clientHeight*s.y,d=l*s.x,h=i*s.y;return{width:c,height:f,x:d,y:h}}function Hb(e,n,r){let i;if(n==="viewport")i=KO(e,r);else if(n==="document")i=YO(xr(e));else if(rr(n))i=QO(n,r);else{const l=X1(e);i={x:n.x-l.x,y:n.y-l.y,width:n.width,height:n.height}}return sc(i)}function Z1(e,n){const r=Ta(e);return r===n||!rr(r)||lo(r)?!1:ar(r).position==="fixed"||Z1(r,n)}function ZO(e,n){const r=n.get(e);if(r)return r;let i=Fl(e,[],!1).filter(f=>rr(f)&&wo(f)!=="body"),l=null;const s=ar(e).position==="fixed";let c=s?Ta(e):e;for(;rr(c)&&!lo(c);){const f=ar(c),d=xm(c);!d&&f.position==="fixed"&&(l=null),(s?!d&&!l:!d&&f.position==="static"&&!!l&&XO.has(l.position)||as(c)&&!d&&Z1(e,c))?i=i.filter(m=>m!==c):l=f,c=Ta(c)}return n.set(e,i),i}function WO(e){let{element:n,boundary:r,rootBoundary:i,strategy:l}=e;const c=[...r==="clippingAncestors"?Lc(n)?[]:ZO(n,this._c):[].concat(r),i],f=c[0],d=c.reduce((h,m)=>{const y=Hb(n,m,l);return h.top=Nn(y.top,h.top),h.right=Aa(y.right,h.right),h.bottom=Aa(y.bottom,h.bottom),h.left=Nn(y.left,h.left),h},Hb(n,f,l));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function JO(e){const{width:n,height:r}=K1(e);return{width:n,height:r}}function e4(e,n,r){const i=vr(n),l=xr(n),s=r==="fixed",c=ti(e,!0,s,n);let f={scrollLeft:0,scrollTop:0};const d=yr(0);function h(){d.x=Sm(l)}if(i||!i&&!s)if((wo(n)!=="body"||as(l))&&(f=zc(n)),i){const w=ti(n,!0,s,n);d.x=w.x+n.clientLeft,d.y=w.y+n.clientTop}else l&&h();s&&!i&&l&&h();const m=l&&!i&&!s?Q1(l,f):yr(0),y=c.left+f.scrollLeft-d.x-m.x,b=c.top+f.scrollTop-d.y-m.y;return{x:y,y:b,width:c.width,height:c.height}}function jh(e){return ar(e).position==="static"}function Fb(e,n){if(!vr(e)||ar(e).position==="fixed")return null;if(n)return n(e);let r=e.offsetParent;return xr(e)===r&&(r=r.ownerDocument.body),r}function W1(e,n){const r=_n(e);if(Lc(e))return r;if(!vr(e)){let l=Ta(e);for(;l&&!lo(l);){if(rr(l)&&!jh(l))return l;l=Ta(l)}return r}let i=Fb(e,n);for(;i&&LO(i)&&jh(i);)i=Fb(i,n);return i&&lo(i)&&jh(i)&&!xm(i)?r:i||HO(e)||r}const t4=async function(e){const n=this.getOffsetParent||W1,r=this.getDimensions,i=await r(e.floating);return{reference:e4(e.reference,await n(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function n4(e){return ar(e).direction==="rtl"}const r4={convertOffsetParentRelativeRectToViewportRelativeRect:$O,getDocumentElement:xr,getClippingRect:WO,getOffsetParent:W1,getElementRects:t4,getClientRects:GO,getDimensions:JO,getScale:ao,isElement:rr,isRTL:n4};function J1(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}function a4(e,n){let r=null,i;const l=xr(e);function s(){var f;clearTimeout(i),(f=r)==null||f.disconnect(),r=null}function c(f,d){f===void 0&&(f=!1),d===void 0&&(d=1),s();const h=e.getBoundingClientRect(),{left:m,top:y,width:b,height:w}=h;if(f||n(),!b||!w)return;const S=zu(y),E=zu(l.clientWidth-(m+b)),A=zu(l.clientHeight-(y+w)),T=zu(m),R={rootMargin:-S+"px "+-E+"px "+-A+"px "+-T+"px",threshold:Nn(0,Aa(1,d))||1};let O=!0;function D(j){const B=j[0].intersectionRatio;if(B!==d){if(!O)return c();B?c(!1,B):i=setTimeout(()=>{c(!1,1e-7)},1e3)}B===1&&!J1(h,e.getBoundingClientRect())&&c(),O=!1}try{r=new IntersectionObserver(D,{...R,root:l.ownerDocument})}catch{r=new IntersectionObserver(D,R)}r.observe(e)}return c(!0),s}function i4(e,n,r,i){i===void 0&&(i={});const{ancestorScroll:l=!0,ancestorResize:s=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:d=!1}=i,h=wm(e),m=l||s?[...h?Fl(h):[],...Fl(n)]:[];m.forEach(T=>{l&&T.addEventListener("scroll",r,{passive:!0}),s&&T.addEventListener("resize",r)});const y=h&&f?a4(h,r):null;let b=-1,w=null;c&&(w=new ResizeObserver(T=>{let[N]=T;N&&N.target===h&&w&&(w.unobserve(n),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var R;(R=w)==null||R.observe(n)})),r()}),h&&!d&&w.observe(h),w.observe(n));let S,E=d?ti(e):null;d&&A();function A(){const T=ti(e);E&&!J1(E,T)&&r(),E=T,S=requestAnimationFrame(A)}return r(),()=>{var T;m.forEach(N=>{l&&N.removeEventListener("scroll",r),s&&N.removeEventListener("resize",r)}),y?.(),(T=w)==null||T.disconnect(),w=null,d&&cancelAnimationFrame(S)}}const o4=_O,l4=MO,s4=TO,u4=DO,c4=RO,qb=AO,f4=jO,d4=(e,n,r)=>{const i=new Map,l={platform:r4,...r},s={...l.platform,_c:i};return kO(e,n,{...l,platform:s})};var h4=typeof document<"u",p4=function(){},Xu=h4?x.useLayoutEffect:p4;function uc(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(typeof e=="function"&&e.toString()===n.toString())return!0;let r,i,l;if(e&&n&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==n.length)return!1;for(i=r;i--!==0;)if(!uc(e[i],n[i]))return!1;return!0}if(l=Object.keys(e),r=l.length,r!==Object.keys(n).length)return!1;for(i=r;i--!==0;)if(!{}.hasOwnProperty.call(n,l[i]))return!1;for(i=r;i--!==0;){const s=l[i];if(!(s==="_owner"&&e.$$typeof)&&!uc(e[s],n[s]))return!1}return!0}return e!==e&&n!==n}function eS(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Vb(e,n){const r=eS(e);return Math.round(n*r)/r}function Dh(e){const n=x.useRef(e);return Xu(()=>{n.current=e}),n}function m4(e){e===void 0&&(e={});const{placement:n="bottom",strategy:r="absolute",middleware:i=[],platform:l,elements:{reference:s,floating:c}={},transform:f=!0,whileElementsMounted:d,open:h}=e,[m,y]=x.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[b,w]=x.useState(i);uc(b,i)||w(i);const[S,E]=x.useState(null),[A,T]=x.useState(null),N=x.useCallback(H=>{H!==j.current&&(j.current=H,E(H))},[]),R=x.useCallback(H=>{H!==B.current&&(B.current=H,T(H))},[]),O=s||S,D=c||A,j=x.useRef(null),B=x.useRef(null),F=x.useRef(m),Z=d!=null,L=Dh(d),W=Dh(l),J=Dh(h),ae=x.useCallback(()=>{if(!j.current||!B.current)return;const H={placement:n,strategy:r,middleware:b};W.current&&(H.platform=W.current),d4(j.current,B.current,H).then(re=>{const k={...re,isPositioned:J.current!==!1};K.current&&!uc(F.current,k)&&(F.current=k,mo.flushSync(()=>{y(k)}))})},[b,n,r,W,J]);Xu(()=>{h===!1&&F.current.isPositioned&&(F.current.isPositioned=!1,y(H=>({...H,isPositioned:!1})))},[h]);const K=x.useRef(!1);Xu(()=>(K.current=!0,()=>{K.current=!1}),[]),Xu(()=>{if(O&&(j.current=O),D&&(B.current=D),O&&D){if(L.current)return L.current(O,D,ae);ae()}},[O,D,ae,L,Z]);const ie=x.useMemo(()=>({reference:j,floating:B,setReference:N,setFloating:R}),[N,R]),z=x.useMemo(()=>({reference:O,floating:D}),[O,D]),X=x.useMemo(()=>{const H={position:r,left:0,top:0};if(!z.floating)return H;const re=Vb(z.floating,m.x),k=Vb(z.floating,m.y);return f?{...H,transform:"translate("+re+"px, "+k+"px)",...eS(z.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:re,top:k}},[r,f,z.floating,m.x,m.y]);return x.useMemo(()=>({...m,update:ae,refs:ie,elements:z,floatingStyles:X}),[m,ae,ie,z,X])}const g4=e=>{function n(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:i,padding:l}=typeof e=="function"?e(r):e;return i&&n(i)?i.current!=null?qb({element:i.current,padding:l}).fn(r):{}:i?qb({element:i,padding:l}).fn(r):{}}}},y4=(e,n)=>({...o4(e),options:[e,n]}),v4=(e,n)=>({...l4(e),options:[e,n]}),x4=(e,n)=>({...f4(e),options:[e,n]}),b4=(e,n)=>({...s4(e),options:[e,n]}),w4=(e,n)=>({...u4(e),options:[e,n]}),S4=(e,n)=>({...c4(e),options:[e,n]}),E4=(e,n)=>({...g4(e),options:[e,n]});var C4="Arrow",tS=x.forwardRef((e,n)=>{const{children:r,width:i=10,height:l=5,...s}=e;return g.jsx(Ne.svg,{...s,ref:n,width:i,height:l,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});tS.displayName=C4;var k4=tS;function nS(e){const[n,r]=x.useState(void 0);return qt(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const i=new ResizeObserver(l=>{if(!Array.isArray(l)||!l.length)return;const s=l[0];let c,f;if("borderBoxSize"in s){const d=s.borderBoxSize,h=Array.isArray(d)?d[0]:d;c=h.inlineSize,f=h.blockSize}else c=e.offsetWidth,f=e.offsetHeight;r({width:c,height:f})});return i.observe(e,{box:"border-box"}),()=>i.unobserve(e)}else r(void 0)},[e]),n}var Em="Popper",[rS,So]=Gn(Em),[A4,aS]=rS(Em),iS=e=>{const{__scopePopper:n,children:r}=e,[i,l]=x.useState(null);return g.jsx(A4,{scope:n,anchor:i,onAnchorChange:l,children:r})};iS.displayName=Em;var oS="PopperAnchor",lS=x.forwardRef((e,n)=>{const{__scopePopper:r,virtualRef:i,...l}=e,s=aS(oS,r),c=x.useRef(null),f=Be(n,c),d=x.useRef(null);return x.useEffect(()=>{const h=d.current;d.current=i?.current||c.current,h!==d.current&&s.onAnchorChange(d.current)}),i?null:g.jsx(Ne.div,{...l,ref:f})});lS.displayName=oS;var Cm="PopperContent",[T4,R4]=rS(Cm),sS=x.forwardRef((e,n)=>{const{__scopePopper:r,side:i="bottom",sideOffset:l=0,align:s="center",alignOffset:c=0,arrowPadding:f=0,avoidCollisions:d=!0,collisionBoundary:h=[],collisionPadding:m=0,sticky:y="partial",hideWhenDetached:b=!1,updatePositionStrategy:w="optimized",onPlaced:S,...E}=e,A=aS(Cm,r),[T,N]=x.useState(null),R=Be(n,se=>N(se)),[O,D]=x.useState(null),j=nS(O),B=j?.width??0,F=j?.height??0,Z=i+(s!=="center"?"-"+s:""),L=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},W=Array.isArray(h)?h:[h],J=W.length>0,ae={padding:L,boundary:W.filter(_4),altBoundary:J},{refs:K,floatingStyles:ie,placement:z,isPositioned:X,middlewareData:H}=m4({strategy:"fixed",placement:Z,whileElementsMounted:(...se)=>i4(...se,{animationFrame:w==="always"}),elements:{reference:A.anchor},middleware:[y4({mainAxis:l+F,alignmentAxis:c}),d&&v4({mainAxis:!0,crossAxis:!1,limiter:y==="partial"?x4():void 0,...ae}),d&&b4({...ae}),w4({...ae,apply:({elements:se,rects:ge,availableWidth:Oe,availableHeight:De})=>{const{width:Pe,height:Ue}=ge.reference,ft=se.floating.style;ft.setProperty("--radix-popper-available-width",`${Oe}px`),ft.setProperty("--radix-popper-available-height",`${De}px`),ft.setProperty("--radix-popper-anchor-width",`${Pe}px`),ft.setProperty("--radix-popper-anchor-height",`${Ue}px`)}}),O&&E4({element:O,padding:f}),M4({arrowWidth:B,arrowHeight:F}),b&&S4({strategy:"referenceHidden",...ae})]}),[re,k]=fS(z),Q=_t(S);qt(()=>{X&&Q?.()},[X,Q]);const le=H.arrow?.x,M=H.arrow?.y,ce=H.arrow?.centerOffset!==0,[Se,me]=x.useState();return qt(()=>{T&&me(window.getComputedStyle(T).zIndex)},[T]),g.jsx("div",{ref:K.setFloating,"data-radix-popper-content-wrapper":"",style:{...ie,transform:X?ie.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Se,"--radix-popper-transform-origin":[H.transformOrigin?.x,H.transformOrigin?.y].join(" "),...H.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:g.jsx(T4,{scope:r,placedSide:re,onArrowChange:D,arrowX:le,arrowY:M,shouldHideArrow:ce,children:g.jsx(Ne.div,{"data-side":re,"data-align":k,...E,ref:R,style:{...E.style,animation:X?void 0:"none"}})})})});sS.displayName=Cm;var uS="PopperArrow",N4={top:"bottom",right:"left",bottom:"top",left:"right"},cS=x.forwardRef(function(n,r){const{__scopePopper:i,...l}=n,s=R4(uS,i),c=N4[s.placedSide];return g.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:g.jsx(k4,{...l,ref:r,style:{...l.style,display:"block"}})})});cS.displayName=uS;function _4(e){return e!==null}var M4=e=>({name:"transformOrigin",options:e,fn(n){const{placement:r,rects:i,middlewareData:l}=n,c=l.arrow?.centerOffset!==0,f=c?0:e.arrowWidth,d=c?0:e.arrowHeight,[h,m]=fS(r),y={start:"0%",center:"50%",end:"100%"}[m],b=(l.arrow?.x??0)+f/2,w=(l.arrow?.y??0)+d/2;let S="",E="";return h==="bottom"?(S=c?y:`${b}px`,E=`${-d}px`):h==="top"?(S=c?y:`${b}px`,E=`${i.floating.height+d}px`):h==="right"?(S=`${-d}px`,E=c?y:`${w}px`):h==="left"&&(S=`${i.floating.width+d}px`,E=c?y:`${w}px`),{data:{x:S,y:E}}}});function fS(e){const[n,r="center"]=e.split("-");return[n,r]}var km=iS,Am=lS,Tm=sS,Rm=cS,[Ic,GU]=Gn("Tooltip",[So]),Bc=So(),dS="TooltipProvider",j4=700,yp="tooltip.open",[D4,Nm]=Ic(dS),hS=e=>{const{__scopeTooltip:n,delayDuration:r=j4,skipDelayDuration:i=300,disableHoverableContent:l=!1,children:s}=e,c=x.useRef(!0),f=x.useRef(!1),d=x.useRef(0);return x.useEffect(()=>{const h=d.current;return()=>window.clearTimeout(h)},[]),g.jsx(D4,{scope:n,isOpenDelayedRef:c,delayDuration:r,onOpen:x.useCallback(()=>{window.clearTimeout(d.current),c.current=!1},[]),onClose:x.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>c.current=!0,i)},[i]),isPointerInTransitRef:f,onPointerInTransitChange:x.useCallback(h=>{f.current=h},[]),disableHoverableContent:l,children:s})};hS.displayName=dS;var ql="Tooltip",[O4,Uc]=Ic(ql),pS=e=>{const{__scopeTooltip:n,children:r,open:i,defaultOpen:l,onOpenChange:s,disableHoverableContent:c,delayDuration:f}=e,d=Nm(ql,e.__scopeTooltip),h=Bc(n),[m,y]=x.useState(null),b=gr(),w=x.useRef(0),S=c??d.disableHoverableContent,E=f??d.delayDuration,A=x.useRef(!1),[T,N]=ka({prop:i,defaultProp:l??!1,onChange:B=>{B?(d.onOpen(),document.dispatchEvent(new CustomEvent(yp))):d.onClose(),s?.(B)},caller:ql}),R=x.useMemo(()=>T?A.current?"delayed-open":"instant-open":"closed",[T]),O=x.useCallback(()=>{window.clearTimeout(w.current),w.current=0,A.current=!1,N(!0)},[N]),D=x.useCallback(()=>{window.clearTimeout(w.current),w.current=0,N(!1)},[N]),j=x.useCallback(()=>{window.clearTimeout(w.current),w.current=window.setTimeout(()=>{A.current=!0,N(!0),w.current=0},E)},[E,N]);return x.useEffect(()=>()=>{w.current&&(window.clearTimeout(w.current),w.current=0)},[]),g.jsx(km,{...h,children:g.jsx(O4,{scope:n,contentId:b,open:T,stateAttribute:R,trigger:m,onTriggerChange:y,onTriggerEnter:x.useCallback(()=>{d.isOpenDelayedRef.current?j():O()},[d.isOpenDelayedRef,j,O]),onTriggerLeave:x.useCallback(()=>{S?D():(window.clearTimeout(w.current),w.current=0)},[D,S]),onOpen:O,onClose:D,disableHoverableContent:S,children:r})})};pS.displayName=ql;var vp="TooltipTrigger",mS=x.forwardRef((e,n)=>{const{__scopeTooltip:r,...i}=e,l=Uc(vp,r),s=Nm(vp,r),c=Bc(r),f=x.useRef(null),d=Be(n,f,l.onTriggerChange),h=x.useRef(!1),m=x.useRef(!1),y=x.useCallback(()=>h.current=!1,[]);return x.useEffect(()=>()=>document.removeEventListener("pointerup",y),[y]),g.jsx(Am,{asChild:!0,...c,children:g.jsx(Ne.button,{"aria-describedby":l.open?l.contentId:void 0,"data-state":l.stateAttribute,...i,ref:d,onPointerMove:pe(e.onPointerMove,b=>{b.pointerType!=="touch"&&!m.current&&!s.isPointerInTransitRef.current&&(l.onTriggerEnter(),m.current=!0)}),onPointerLeave:pe(e.onPointerLeave,()=>{l.onTriggerLeave(),m.current=!1}),onPointerDown:pe(e.onPointerDown,()=>{l.open&&l.onClose(),h.current=!0,document.addEventListener("pointerup",y,{once:!0})}),onFocus:pe(e.onFocus,()=>{h.current||l.onOpen()}),onBlur:pe(e.onBlur,l.onClose),onClick:pe(e.onClick,l.onClose)})})});mS.displayName=vp;var P4="TooltipPortal",[YU,L4]=Ic(P4,{forceMount:void 0}),so="TooltipContent",gS=x.forwardRef((e,n)=>{const r=L4(so,e.__scopeTooltip),{forceMount:i=r.forceMount,side:l="top",...s}=e,c=Uc(so,e.__scopeTooltip);return g.jsx(fn,{present:i||c.open,children:c.disableHoverableContent?g.jsx(yS,{side:l,...s,ref:n}):g.jsx(z4,{side:l,...s,ref:n})})}),z4=x.forwardRef((e,n)=>{const r=Uc(so,e.__scopeTooltip),i=Nm(so,e.__scopeTooltip),l=x.useRef(null),s=Be(n,l),[c,f]=x.useState(null),{trigger:d,onClose:h}=r,m=l.current,{onPointerInTransitChange:y}=i,b=x.useCallback(()=>{f(null),y(!1)},[y]),w=x.useCallback((S,E)=>{const A=S.currentTarget,T={x:S.clientX,y:S.clientY},N=F4(T,A.getBoundingClientRect()),R=q4(T,N),O=V4(E.getBoundingClientRect()),D=G4([...R,...O]);f(D),y(!0)},[y]);return x.useEffect(()=>()=>b(),[b]),x.useEffect(()=>{if(d&&m){const S=A=>w(A,m),E=A=>w(A,d);return d.addEventListener("pointerleave",S),m.addEventListener("pointerleave",E),()=>{d.removeEventListener("pointerleave",S),m.removeEventListener("pointerleave",E)}}},[d,m,w,b]),x.useEffect(()=>{if(c){const S=E=>{const A=E.target,T={x:E.clientX,y:E.clientY},N=d?.contains(A)||m?.contains(A),R=!$4(T,c);N?b():R&&(b(),h())};return document.addEventListener("pointermove",S),()=>document.removeEventListener("pointermove",S)}},[d,m,c,h,b]),g.jsx(yS,{...e,ref:s})}),[I4,B4]=Ic(ql,{isInside:!1}),U4=xw("TooltipContent"),yS=x.forwardRef((e,n)=>{const{__scopeTooltip:r,children:i,"aria-label":l,onEscapeKeyDown:s,onPointerDownOutside:c,...f}=e,d=Uc(so,r),h=Bc(r),{onClose:m}=d;return x.useEffect(()=>(document.addEventListener(yp,m),()=>document.removeEventListener(yp,m)),[m]),x.useEffect(()=>{if(d.trigger){const y=b=>{b.target?.contains(d.trigger)&&m()};return window.addEventListener("scroll",y,{capture:!0}),()=>window.removeEventListener("scroll",y,{capture:!0})}},[d.trigger,m]),g.jsx(yo,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:y=>y.preventDefault(),onDismiss:m,children:g.jsxs(Tm,{"data-state":d.stateAttribute,...h,...f,ref:n,style:{...f.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[g.jsx(U4,{children:i}),g.jsx(I4,{scope:r,isInside:!0,children:g.jsx(w_,{id:d.contentId,role:"tooltip",children:l||i})})]})})});gS.displayName=so;var vS="TooltipArrow",H4=x.forwardRef((e,n)=>{const{__scopeTooltip:r,...i}=e,l=Bc(r);return B4(vS,r).isInside?null:g.jsx(Rm,{...l,...i,ref:n})});H4.displayName=vS;function F4(e,n){const r=Math.abs(n.top-e.y),i=Math.abs(n.bottom-e.y),l=Math.abs(n.right-e.x),s=Math.abs(n.left-e.x);switch(Math.min(r,i,l,s)){case s:return"left";case l:return"right";case r:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function q4(e,n,r=5){const i=[];switch(n){case"top":i.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":i.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":i.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":i.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return i}function V4(e){const{top:n,right:r,bottom:i,left:l}=e;return[{x:l,y:n},{x:r,y:n},{x:r,y:i},{x:l,y:i}]}function $4(e,n){const{x:r,y:i}=e;let l=!1;for(let s=0,c=n.length-1;s<n.length;c=s++){const f=n[s],d=n[c],h=f.x,m=f.y,y=d.x,b=d.y;m>i!=b>i&&r<(y-h)*(i-m)/(b-m)+h&&(l=!l)}return l}function G4(e){const n=e.slice();return n.sort((r,i)=>r.x<i.x?-1:r.x>i.x?1:r.y<i.y?-1:r.y>i.y?1:0),Y4(n)}function Y4(e){if(e.length<=1)return e.slice();const n=[];for(let i=0;i<e.length;i++){const l=e[i];for(;n.length>=2;){const s=n[n.length-1],c=n[n.length-2];if((s.x-c.x)*(l.y-c.y)>=(s.y-c.y)*(l.x-c.x))n.pop();else break}n.push(l)}n.pop();const r=[];for(let i=e.length-1;i>=0;i--){const l=e[i];for(;r.length>=2;){const s=r[r.length-1],c=r[r.length-2];if((s.x-c.x)*(l.y-c.y)>=(s.y-c.y)*(l.x-c.x))r.pop();else break}r.push(l)}return r.pop(),n.length===1&&r.length===1&&n[0].x===r[0].x&&n[0].y===r[0].y?n:n.concat(r)}var K4=hS,X4=pS,Q4=mS,xS=gS;const Z4=K4,W4=X4,J4=Q4,bS=x.forwardRef(({className:e,sideOffset:n=4,...r},i)=>g.jsx(xS,{ref:i,sideOffset:n,className:ue("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r}));bS.displayName=xS.displayName;const eP="sidebar_state",tP=3600*24*7,nP="16rem",rP="18rem",aP="3rem",iP="b",wS=x.createContext(null);function Hc(){const e=x.useContext(wS);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const SS=x.forwardRef(({defaultOpen:e=!0,open:n,onOpenChange:r,className:i,style:l,children:s,...c},f)=>{const d=u1(),[h,m]=x.useState(!1),[y,b]=x.useState(e),w=n??y,S=x.useCallback(N=>{const R=typeof N=="function"?N(w):N;r?r(R):b(R),document.cookie=`${eP}=${R}; path=/; max-age=${tP}`},[r,w]),E=x.useCallback(()=>d?m(N=>!N):S(N=>!N),[d,S,m]);x.useEffect(()=>{const N=R=>{R.key===iP&&(R.metaKey||R.ctrlKey)&&(R.preventDefault(),E())};return window.addEventListener("keydown",N),()=>window.removeEventListener("keydown",N)},[E]);const A=w?"expanded":"collapsed",T=x.useMemo(()=>({state:A,open:w,setOpen:S,isMobile:d,openMobile:h,setOpenMobile:m,toggleSidebar:E}),[A,w,S,d,h,m,E]);return g.jsx(wS.Provider,{value:T,children:g.jsx(Z4,{delayDuration:0,children:g.jsx("div",{style:{"--sidebar-width":nP,"--sidebar-width-icon":aP,...l},className:ue("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",i),ref:f,...c,children:s})})})});SS.displayName="SidebarProvider";const ES=x.forwardRef(({side:e="left",variant:n="sidebar",collapsible:r="offcanvas",className:i,children:l,...s},c)=>{const{isMobile:f,state:d,openMobile:h,setOpenMobile:m}=Hc();return r==="none"?g.jsx("div",{className:ue("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",i),ref:c,...s,children:l}):f?g.jsx(H1,{open:h,onOpenChange:m,...s,children:g.jsxs(hm,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":rP},side:e,children:[g.jsxs(pm,{className:"sr-only",children:[g.jsx(mm,{children:"Sidebar"}),g.jsx(q1,{children:"Displays the mobile sidebar."})]}),g.jsx("div",{className:"flex h-full w-full flex-col",children:l})]})}):g.jsxs("div",{ref:c,className:"group peer hidden text-sidebar-foreground md:block","data-state":d,"data-collapsible":d==="collapsed"?r:"","data-variant":n,"data-side":e,children:[g.jsx("div",{className:ue("relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",n==="floating"||n==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),g.jsx("div",{className:ue("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",n==="floating"||n==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",i),...s,children:g.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:l})})]})});ES.displayName="Sidebar";const CS=x.forwardRef(({className:e,onClick:n,...r},i)=>{const{toggleSidebar:l}=Hc();return g.jsxs(kt,{ref:i,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:ue("h-7 w-7",e),onClick:s=>{n?.(s),l()},...r,children:[g.jsx(FM,{}),g.jsx("span",{className:"sr-only",children:"Toggle Sidebar"})]})});CS.displayName="SidebarTrigger";const oP=x.forwardRef(({className:e,...n},r)=>{const{toggleSidebar:i}=Hc();return g.jsx("button",{ref:r,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:i,title:"Toggle Sidebar",className:ue("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...n})});oP.displayName="SidebarRail";const kS=x.forwardRef(({className:e,...n},r)=>g.jsx("main",{ref:r,className:ue("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...n}));kS.displayName="SidebarInset";const lP=x.forwardRef(({className:e,...n},r)=>g.jsx(c1,{ref:r,"data-sidebar":"input",className:ue("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...n}));lP.displayName="SidebarInput";const AS=x.forwardRef(({className:e,...n},r)=>g.jsx("div",{ref:r,"data-sidebar":"header",className:ue("flex flex-col gap-2 p-2",e),...n}));AS.displayName="SidebarHeader";const TS=x.forwardRef(({className:e,...n},r)=>g.jsx("div",{ref:r,"data-sidebar":"footer",className:ue("flex flex-col gap-2 p-2",e),...n}));TS.displayName="SidebarFooter";const sP=x.forwardRef(({className:e,...n},r)=>g.jsx(h1,{ref:r,"data-sidebar":"separator",className:ue("mx-2 w-auto bg-sidebar-border",e),...n}));sP.displayName="SidebarSeparator";const RS=x.forwardRef(({className:e,...n},r)=>g.jsx("div",{ref:r,"data-sidebar":"content",className:ue("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...n}));RS.displayName="SidebarContent";const Qu=x.forwardRef(({className:e,...n},r)=>g.jsx("div",{ref:r,"data-sidebar":"group",className:ue("relative flex w-full min-w-0 flex-col p-2",e),...n}));Qu.displayName="SidebarGroup";const Zu=x.forwardRef(({className:e,asChild:n=!1,...r},i)=>{const l=n?go:"div";return g.jsx(l,{ref:i,"data-sidebar":"group-label",className:ue("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...r})});Zu.displayName="SidebarGroupLabel";const uP=x.forwardRef(({className:e,asChild:n=!1,...r},i)=>{const l=n?go:"button";return g.jsx(l,{ref:i,"data-sidebar":"group-action",className:ue("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...r})});uP.displayName="SidebarGroupAction";const Wu=x.forwardRef(({className:e,...n},r)=>g.jsx("div",{ref:r,"data-sidebar":"group-content",className:ue("w-full text-sm",e),...n}));Wu.displayName="SidebarGroupContent";const Wi=x.forwardRef(({className:e,...n},r)=>g.jsx("ul",{ref:r,"data-sidebar":"menu",className:ue("flex w-full min-w-0 flex-col gap-1",e),...n}));Wi.displayName="SidebarMenu";const Ji=x.forwardRef(({className:e,...n},r)=>g.jsx("li",{ref:r,"data-sidebar":"menu-item",className:ue("group/menu-item relative",e),...n}));Ji.displayName="SidebarMenuItem";const cP=Rc("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),eo=x.forwardRef(({asChild:e=!1,isActive:n=!1,variant:r="default",size:i="default",tooltip:l,className:s,...c},f)=>{const d=e?go:"button",{isMobile:h,state:m}=Hc(),y=g.jsx(d,{ref:f,"data-sidebar":"menu-button","data-size":i,"data-active":n,className:ue(cP({variant:r,size:i}),s),...c});return l?(typeof l=="string"&&(l={children:l}),g.jsxs(W4,{children:[g.jsx(J4,{asChild:!0,children:y}),g.jsx(bS,{side:"right",align:"center",hidden:m!=="collapsed"||h,...l})]})):y});eo.displayName="SidebarMenuButton";const fP=x.forwardRef(({className:e,asChild:n=!1,showOnHover:r=!1,...i},l)=>{const s=n?go:"button";return g.jsx(s,{ref:l,"data-sidebar":"menu-action",className:ue("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",r&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...i})});fP.displayName="SidebarMenuAction";const xp=x.forwardRef(({className:e,...n},r)=>g.jsx("div",{ref:r,"data-sidebar":"menu-badge",className:ue("pointer-events-none absolute right-1 flex h-5 min-w-5 select-none items-center justify-center rounded-full px-1.5 text-xs font-semibold tabular-nums shadow-sm","transition-all duration-200 ease-in-out hover:scale-110","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...n}));xp.displayName="SidebarMenuBadge";const dP=x.forwardRef(({className:e,showIcon:n=!1,...r},i)=>{const l=x.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return g.jsxs("div",{ref:i,"data-sidebar":"menu-skeleton",className:ue("flex h-8 items-center gap-2 rounded-md px-2",e),...r,children:[n&&g.jsx(Ob,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),g.jsx(Ob,{className:"h-4 max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":l}})]})});dP.displayName="SidebarMenuSkeleton";const hP=x.forwardRef(({className:e,...n},r)=>g.jsx("ul",{ref:r,"data-sidebar":"menu-sub",className:ue("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...n}));hP.displayName="SidebarMenuSub";const pP=x.forwardRef(({...e},n)=>g.jsx("li",{ref:n,...e}));pP.displayName="SidebarMenuSubItem";const mP=x.forwardRef(({asChild:e=!1,size:n="md",isActive:r,className:i,...l},s)=>{const c=e?go:"a";return g.jsx(c,{ref:s,"data-sidebar":"menu-sub-button","data-size":n,"data-active":r,className:ue("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",n==="sm"&&"text-xs",n==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",i),...l})});mP.displayName="SidebarMenuSubButton";const gP="1.0.71-alpha.4",yP={version:gP};function vP({className:e}){return g.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:e,children:[g.jsx("path",{d:"M13 8c0-2.76-2.46-5-5.5-5S2 5.24 2 8h2l1-1 1 1h4"}),g.jsx("path",{d:"M13 7.14A5.82 5.82 0 0 1 16.5 6c3.04 0 5.5 2.24 5.5 5h-3l-1-1-1 1h-3"}),g.jsx("path",{d:"M5.89 9.71c-2.15 2.15-2.3 5.47-.35 7.43l4.24-4.25.7-.7.71-.71 2.12-2.12c-1.95-1.96-5.27-1.8-7.42.35"}),g.jsx("path",{d:"M11 15.5c.5 2.5-.17 4.5-1 6.5h4c2-5.5-.5-12-1-14"})]})}const xP=[{title:"Home",url:"/",icon:kM},{title:"Proposals",url:"/proposals",icon:hM},{title:"Agents",url:"/agents",icon:Ol},{title:"Code",url:"/code",icon:iM},{title:"Utilities",url:"/utilities",icon:yj}],bP=[{title:"Overview",url:"/context/project",icon:rc},{title:"Architecture",url:"/context/architecture",icon:QM},{title:"Knowledge",url:"/context/knowledge",icon:Y_},{title:"Resources",url:"/resources",icon:xM}],wP=[{title:"Source Control",url:"/git",icon:Yw},{title:"Terminal",url:"/terminal",icon:uj},{title:"Schedule",url:"/schedule",icon:X_},{title:"Identity",url:"/identity",icon:TM}],SP=[{title:"Documentation",url:"https://docs.coconut.dev/",icon:UM,external:!0},{title:"Settings",url:"/settings/user",icon:WM}];function EP(){const{badges:e}=qN();return g.jsxs(ES,{className:"bg-sidebar border-r border-sidebar-border",children:[g.jsx(AS,{children:g.jsx(Wi,{children:g.jsx(Ji,{children:g.jsx(eo,{size:"lg",asChild:!0,className:"[&>svg]:!size-8",children:g.jsxs(Hr,{to:"/",children:[g.jsx(vP,{className:"size-8"}),g.jsxs("div",{className:"flex flex-col gap-0.5",children:[g.jsxs("span",{className:"font-semibold",children:[g.jsx("span",{className:"bg-gradient-to-r from-amber-500 via-orange-500 to-yellow-600 bg-clip-text text-transparent",children:"Coconut"}),g.jsx("span",{children:" Studio"})]}),g.jsxs("span",{className:"text-xs text-muted-foreground",children:["v",yP.version]})]})]})})})})}),g.jsxs(RS,{children:[g.jsxs(Qu,{children:[g.jsx(Zu,{children:"Main"}),g.jsx(Wu,{children:g.jsx(Wi,{children:xP.map(n=>g.jsxs(Ji,{children:[g.jsx(eo,{asChild:!0,children:g.jsxs(Hr,{to:n.url,children:[g.jsx(n.icon,{}),g.jsx("span",{children:n.title})]})}),n.title==="Code"&&e.codeSessions>0&&g.jsx(xp,{className:"bg-blue-600 text-white dark:bg-blue-500",children:e.codeSessions})]},n.title))})})]}),g.jsxs(Qu,{children:[g.jsx(Zu,{children:"Project"}),g.jsx(Wu,{children:g.jsx(Wi,{children:bP.map(n=>g.jsx(Ji,{children:g.jsx(eo,{asChild:!0,children:g.jsxs(Hr,{to:n.url,children:[g.jsx(n.icon,{}),g.jsx("span",{children:n.title})]})})},n.title))})})]}),g.jsxs(Qu,{children:[g.jsx(Zu,{children:"System"}),g.jsx(Wu,{children:g.jsx(Wi,{children:wP.map(n=>{let r=0;return n.title==="Source Control"&&e.gitChanges>0?r=e.gitChanges:n.title==="Terminal"&&e.terminalSessions>0?r=e.terminalSessions:n.title==="Schedule"&&e.runningScheduledJobs>0&&(r=e.runningScheduledJobs),g.jsxs(Ji,{children:[g.jsx(eo,{asChild:!0,children:g.jsxs(Hr,{to:n.url,children:[g.jsx(n.icon,{}),g.jsx("span",{children:n.title})]})}),r>0&&g.jsx(xp,{className:"bg-blue-600 text-white dark:bg-blue-500",children:r})]},n.title)})})})]})]}),g.jsx(TS,{children:g.jsx(Wi,{children:SP.map(n=>g.jsx(Ji,{children:g.jsx(eo,{asChild:!0,children:n.external?g.jsxs("a",{href:n.url,target:"_blank",rel:"noopener noreferrer",children:[g.jsx(n.icon,{}),g.jsx("span",{children:n.title})]}):g.jsxs(Hr,{to:n.url,children:[g.jsx(n.icon,{}),g.jsx("span",{children:n.title})]})})},n.title))})})]})}function bp(e,[n,r]){return Math.min(r,Math.max(n,e))}var CP=x.createContext(void 0);function Fc(e){const n=x.useContext(CP);return e||n||"ltr"}function NS(e){const n=x.useRef({value:e,previous:e});return x.useMemo(()=>(n.current.value!==e&&(n.current.previous=n.current.value,n.current.value=e),n.current.previous),[e])}var kP=[" ","Enter","ArrowUp","ArrowDown"],AP=[" ","Enter"],ni="Select",[qc,Vc,TP]=kc(ni),[Eo,KU]=Gn(ni,[TP,So]),$c=So(),[RP,Ra]=Eo(ni),[NP,_P]=Eo(ni),_S=e=>{const{__scopeSelect:n,children:r,open:i,defaultOpen:l,onOpenChange:s,value:c,defaultValue:f,onValueChange:d,dir:h,name:m,autoComplete:y,disabled:b,required:w,form:S}=e,E=$c(n),[A,T]=x.useState(null),[N,R]=x.useState(null),[O,D]=x.useState(!1),j=Fc(h),[B,F]=ka({prop:i,defaultProp:l??!1,onChange:s,caller:ni}),[Z,L]=ka({prop:c,defaultProp:f,onChange:d,caller:ni}),W=x.useRef(null),J=A?S||!!A.closest("form"):!0,[ae,K]=x.useState(new Set),ie=Array.from(ae).map(z=>z.props.value).join(";");return g.jsx(km,{...E,children:g.jsxs(RP,{required:w,scope:n,trigger:A,onTriggerChange:T,valueNode:N,onValueNodeChange:R,valueNodeHasChildren:O,onValueNodeHasChildrenChange:D,contentId:gr(),value:Z,onValueChange:L,open:B,onOpenChange:F,dir:j,triggerPointerDownPosRef:W,disabled:b,children:[g.jsx(qc.Provider,{scope:n,children:g.jsx(NP,{scope:e.__scopeSelect,onNativeOptionAdd:x.useCallback(z=>{K(X=>new Set(X).add(z))},[]),onNativeOptionRemove:x.useCallback(z=>{K(X=>{const H=new Set(X);return H.delete(z),H})},[]),children:r})}),J?g.jsxs(eE,{"aria-hidden":!0,required:w,tabIndex:-1,name:m,autoComplete:y,value:Z,onChange:z=>L(z.target.value),disabled:b,form:S,children:[Z===void 0?g.jsx("option",{value:""}):null,Array.from(ae)]},ie):null]})})};_S.displayName=ni;var MS="SelectTrigger",jS=x.forwardRef((e,n)=>{const{__scopeSelect:r,disabled:i=!1,...l}=e,s=$c(r),c=Ra(MS,r),f=c.disabled||i,d=Be(n,c.onTriggerChange),h=Vc(r),m=x.useRef("touch"),[y,b,w]=nE(E=>{const A=h().filter(R=>!R.disabled),T=A.find(R=>R.value===c.value),N=rE(A,E,T);N!==void 0&&c.onValueChange(N.value)}),S=E=>{f||(c.onOpenChange(!0),w()),E&&(c.triggerPointerDownPosRef.current={x:Math.round(E.pageX),y:Math.round(E.pageY)})};return g.jsx(Am,{asChild:!0,...s,children:g.jsx(Ne.button,{type:"button",role:"combobox","aria-controls":c.contentId,"aria-expanded":c.open,"aria-required":c.required,"aria-autocomplete":"none",dir:c.dir,"data-state":c.open?"open":"closed",disabled:f,"data-disabled":f?"":void 0,"data-placeholder":tE(c.value)?"":void 0,...l,ref:d,onClick:pe(l.onClick,E=>{E.currentTarget.focus(),m.current!=="mouse"&&S(E)}),onPointerDown:pe(l.onPointerDown,E=>{m.current=E.pointerType;const A=E.target;A.hasPointerCapture(E.pointerId)&&A.releasePointerCapture(E.pointerId),E.button===0&&E.ctrlKey===!1&&E.pointerType==="mouse"&&(S(E),E.preventDefault())}),onKeyDown:pe(l.onKeyDown,E=>{const A=y.current!=="";!(E.ctrlKey||E.altKey||E.metaKey)&&E.key.length===1&&b(E.key),!(A&&E.key===" ")&&kP.includes(E.key)&&(S(),E.preventDefault())})})})});jS.displayName=MS;var DS="SelectValue",OS=x.forwardRef((e,n)=>{const{__scopeSelect:r,className:i,style:l,children:s,placeholder:c="",...f}=e,d=Ra(DS,r),{onValueNodeHasChildrenChange:h}=d,m=s!==void 0,y=Be(n,d.onValueNodeChange);return qt(()=>{h(m)},[h,m]),g.jsx(Ne.span,{...f,ref:y,style:{pointerEvents:"none"},children:tE(d.value)?g.jsx(g.Fragment,{children:c}):s})});OS.displayName=DS;var MP="SelectIcon",PS=x.forwardRef((e,n)=>{const{__scopeSelect:r,children:i,...l}=e;return g.jsx(Ne.span,{"aria-hidden":!0,...l,ref:n,children:i||"▼"})});PS.displayName=MP;var jP="SelectPortal",LS=e=>g.jsx(Wl,{asChild:!0,...e});LS.displayName=jP;var ri="SelectContent",zS=x.forwardRef((e,n)=>{const r=Ra(ri,e.__scopeSelect),[i,l]=x.useState();if(qt(()=>{l(new DocumentFragment)},[]),!r.open){const s=i;return s?mo.createPortal(g.jsx(IS,{scope:e.__scopeSelect,children:g.jsx(qc.Slot,{scope:e.__scopeSelect,children:g.jsx("div",{children:e.children})})}),s):null}return g.jsx(BS,{...e,ref:n})});zS.displayName=ri;var er=10,[IS,Na]=Eo(ri),DP="SelectContentImpl",OP=Ja("SelectContent.RemoveScroll"),BS=x.forwardRef((e,n)=>{const{__scopeSelect:r,position:i="item-aligned",onCloseAutoFocus:l,onEscapeKeyDown:s,onPointerDownOutside:c,side:f,sideOffset:d,align:h,alignOffset:m,arrowPadding:y,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:E,avoidCollisions:A,...T}=e,N=Ra(ri,r),[R,O]=x.useState(null),[D,j]=x.useState(null),B=Be(n,se=>O(se)),[F,Z]=x.useState(null),[L,W]=x.useState(null),J=Vc(r),[ae,K]=x.useState(!1),ie=x.useRef(!1);x.useEffect(()=>{if(R)return lm(R)},[R]),om();const z=x.useCallback(se=>{const[ge,...Oe]=J().map(Ue=>Ue.ref.current),[De]=Oe.slice(-1),Pe=document.activeElement;for(const Ue of se)if(Ue===Pe||(Ue?.scrollIntoView({block:"nearest"}),Ue===ge&&D&&(D.scrollTop=0),Ue===De&&D&&(D.scrollTop=D.scrollHeight),Ue?.focus(),document.activeElement!==Pe))return},[J,D]),X=x.useCallback(()=>z([F,R]),[z,F,R]);x.useEffect(()=>{ae&&X()},[ae,X]);const{onOpenChange:H,triggerPointerDownPosRef:re}=N;x.useEffect(()=>{if(R){let se={x:0,y:0};const ge=De=>{se={x:Math.abs(Math.round(De.pageX)-(re.current?.x??0)),y:Math.abs(Math.round(De.pageY)-(re.current?.y??0))}},Oe=De=>{se.x<=10&&se.y<=10?De.preventDefault():R.contains(De.target)||H(!1),document.removeEventListener("pointermove",ge),re.current=null};return re.current!==null&&(document.addEventListener("pointermove",ge),document.addEventListener("pointerup",Oe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ge),document.removeEventListener("pointerup",Oe,{capture:!0})}}},[R,H,re]),x.useEffect(()=>{const se=()=>H(!1);return window.addEventListener("blur",se),window.addEventListener("resize",se),()=>{window.removeEventListener("blur",se),window.removeEventListener("resize",se)}},[H]);const[k,Q]=nE(se=>{const ge=J().filter(Pe=>!Pe.disabled),Oe=ge.find(Pe=>Pe.ref.current===document.activeElement),De=rE(ge,se,Oe);De&&setTimeout(()=>De.ref.current.focus())}),le=x.useCallback((se,ge,Oe)=>{const De=!ie.current&&!Oe;(N.value!==void 0&&N.value===ge||De)&&(Z(se),De&&(ie.current=!0))},[N.value]),M=x.useCallback(()=>R?.focus(),[R]),ce=x.useCallback((se,ge,Oe)=>{const De=!ie.current&&!Oe;(N.value!==void 0&&N.value===ge||De)&&W(se)},[N.value]),Se=i==="popper"?wp:US,me=Se===wp?{side:f,sideOffset:d,align:h,alignOffset:m,arrowPadding:y,collisionBoundary:b,collisionPadding:w,sticky:S,hideWhenDetached:E,avoidCollisions:A}:{};return g.jsx(IS,{scope:r,content:R,viewport:D,onViewportChange:j,itemRefCallback:le,selectedItem:F,onItemLeave:M,itemTextRefCallback:ce,focusSelectedItem:X,selectedItemText:L,position:i,isPositioned:ae,searchRef:k,children:g.jsx(jc,{as:OP,allowPinchZoom:!0,children:g.jsx(_c,{asChild:!0,trapped:N.open,onMountAutoFocus:se=>{se.preventDefault()},onUnmountAutoFocus:pe(l,se=>{N.trigger?.focus({preventScroll:!0}),se.preventDefault()}),children:g.jsx(yo,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:se=>se.preventDefault(),onDismiss:()=>N.onOpenChange(!1),children:g.jsx(Se,{role:"listbox",id:N.contentId,"data-state":N.open?"open":"closed",dir:N.dir,onContextMenu:se=>se.preventDefault(),...T,...me,onPlaced:()=>K(!0),ref:B,style:{display:"flex",flexDirection:"column",outline:"none",...T.style},onKeyDown:pe(T.onKeyDown,se=>{const ge=se.ctrlKey||se.altKey||se.metaKey;if(se.key==="Tab"&&se.preventDefault(),!ge&&se.key.length===1&&Q(se.key),["ArrowUp","ArrowDown","Home","End"].includes(se.key)){let De=J().filter(Pe=>!Pe.disabled).map(Pe=>Pe.ref.current);if(["ArrowUp","End"].includes(se.key)&&(De=De.slice().reverse()),["ArrowUp","ArrowDown"].includes(se.key)){const Pe=se.target,Ue=De.indexOf(Pe);De=De.slice(Ue+1)}setTimeout(()=>z(De)),se.preventDefault()}})})})})})})});BS.displayName=DP;var PP="SelectItemAlignedPosition",US=x.forwardRef((e,n)=>{const{__scopeSelect:r,onPlaced:i,...l}=e,s=Ra(ri,r),c=Na(ri,r),[f,d]=x.useState(null),[h,m]=x.useState(null),y=Be(n,B=>m(B)),b=Vc(r),w=x.useRef(!1),S=x.useRef(!0),{viewport:E,selectedItem:A,selectedItemText:T,focusSelectedItem:N}=c,R=x.useCallback(()=>{if(s.trigger&&s.valueNode&&f&&h&&E&&A&&T){const B=s.trigger.getBoundingClientRect(),F=h.getBoundingClientRect(),Z=s.valueNode.getBoundingClientRect(),L=T.getBoundingClientRect();if(s.dir!=="rtl"){const Pe=L.left-F.left,Ue=Z.left-Pe,ft=B.left-Ue,Zt=B.width+ft,Vt=Math.max(Zt,F.width),lr=window.innerWidth-er,xt=bp(Ue,[er,Math.max(er,lr-Vt)]);f.style.minWidth=Zt+"px",f.style.left=xt+"px"}else{const Pe=F.right-L.right,Ue=window.innerWidth-Z.right-Pe,ft=window.innerWidth-B.right-Ue,Zt=B.width+ft,Vt=Math.max(Zt,F.width),lr=window.innerWidth-er,xt=bp(Ue,[er,Math.max(er,lr-Vt)]);f.style.minWidth=Zt+"px",f.style.right=xt+"px"}const W=b(),J=window.innerHeight-er*2,ae=E.scrollHeight,K=window.getComputedStyle(h),ie=parseInt(K.borderTopWidth,10),z=parseInt(K.paddingTop,10),X=parseInt(K.borderBottomWidth,10),H=parseInt(K.paddingBottom,10),re=ie+z+ae+H+X,k=Math.min(A.offsetHeight*5,re),Q=window.getComputedStyle(E),le=parseInt(Q.paddingTop,10),M=parseInt(Q.paddingBottom,10),ce=B.top+B.height/2-er,Se=J-ce,me=A.offsetHeight/2,se=A.offsetTop+me,ge=ie+z+se,Oe=re-ge;if(ge<=ce){const Pe=W.length>0&&A===W[W.length-1].ref.current;f.style.bottom="0px";const Ue=h.clientHeight-E.offsetTop-E.offsetHeight,ft=Math.max(Se,me+(Pe?M:0)+Ue+X),Zt=ge+ft;f.style.height=Zt+"px"}else{const Pe=W.length>0&&A===W[0].ref.current;f.style.top="0px";const ft=Math.max(ce,ie+E.offsetTop+(Pe?le:0)+me)+Oe;f.style.height=ft+"px",E.scrollTop=ge-ce+E.offsetTop}f.style.margin=`${er}px 0`,f.style.minHeight=k+"px",f.style.maxHeight=J+"px",i?.(),requestAnimationFrame(()=>w.current=!0)}},[b,s.trigger,s.valueNode,f,h,E,A,T,s.dir,i]);qt(()=>R(),[R]);const[O,D]=x.useState();qt(()=>{h&&D(window.getComputedStyle(h).zIndex)},[h]);const j=x.useCallback(B=>{B&&S.current===!0&&(R(),N?.(),S.current=!1)},[R,N]);return g.jsx(zP,{scope:r,contentWrapper:f,shouldExpandOnScrollRef:w,onScrollButtonChange:j,children:g.jsx("div",{ref:d,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:O},children:g.jsx(Ne.div,{...l,ref:y,style:{boxSizing:"border-box",maxHeight:"100%",...l.style}})})})});US.displayName=PP;var LP="SelectPopperPosition",wp=x.forwardRef((e,n)=>{const{__scopeSelect:r,align:i="start",collisionPadding:l=er,...s}=e,c=$c(r);return g.jsx(Tm,{...c,...s,ref:n,align:i,collisionPadding:l,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});wp.displayName=LP;var[zP,_m]=Eo(ri,{}),Sp="SelectViewport",HS=x.forwardRef((e,n)=>{const{__scopeSelect:r,nonce:i,...l}=e,s=Na(Sp,r),c=_m(Sp,r),f=Be(n,s.onViewportChange),d=x.useRef(0);return g.jsxs(g.Fragment,{children:[g.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),g.jsx(qc.Slot,{scope:r,children:g.jsx(Ne.div,{"data-radix-select-viewport":"",role:"presentation",...l,ref:f,style:{position:"relative",flex:1,overflow:"hidden auto",...l.style},onScroll:pe(l.onScroll,h=>{const m=h.currentTarget,{contentWrapper:y,shouldExpandOnScrollRef:b}=c;if(b?.current&&y){const w=Math.abs(d.current-m.scrollTop);if(w>0){const S=window.innerHeight-er*2,E=parseFloat(y.style.minHeight),A=parseFloat(y.style.height),T=Math.max(E,A);if(T<S){const N=T+w,R=Math.min(S,N),O=N-R;y.style.height=R+"px",y.style.bottom==="0px"&&(m.scrollTop=O>0?O:0,y.style.justifyContent="flex-end")}}}d.current=m.scrollTop})})})]})});HS.displayName=Sp;var FS="SelectGroup",[IP,BP]=Eo(FS),UP=x.forwardRef((e,n)=>{const{__scopeSelect:r,...i}=e,l=gr();return g.jsx(IP,{scope:r,id:l,children:g.jsx(Ne.div,{role:"group","aria-labelledby":l,...i,ref:n})})});UP.displayName=FS;var qS="SelectLabel",VS=x.forwardRef((e,n)=>{const{__scopeSelect:r,...i}=e,l=BP(qS,r);return g.jsx(Ne.div,{id:l.id,...i,ref:n})});VS.displayName=qS;var cc="SelectItem",[HP,$S]=Eo(cc),GS=x.forwardRef((e,n)=>{const{__scopeSelect:r,value:i,disabled:l=!1,textValue:s,...c}=e,f=Ra(cc,r),d=Na(cc,r),h=f.value===i,[m,y]=x.useState(s??""),[b,w]=x.useState(!1),S=Be(n,N=>d.itemRefCallback?.(N,i,l)),E=gr(),A=x.useRef("touch"),T=()=>{l||(f.onValueChange(i),f.onOpenChange(!1))};if(i==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return g.jsx(HP,{scope:r,value:i,disabled:l,textId:E,isSelected:h,onItemTextChange:x.useCallback(N=>{y(R=>R||(N?.textContent??"").trim())},[]),children:g.jsx(qc.ItemSlot,{scope:r,value:i,disabled:l,textValue:m,children:g.jsx(Ne.div,{role:"option","aria-labelledby":E,"data-highlighted":b?"":void 0,"aria-selected":h&&b,"data-state":h?"checked":"unchecked","aria-disabled":l||void 0,"data-disabled":l?"":void 0,tabIndex:l?void 0:-1,...c,ref:S,onFocus:pe(c.onFocus,()=>w(!0)),onBlur:pe(c.onBlur,()=>w(!1)),onClick:pe(c.onClick,()=>{A.current!=="mouse"&&T()}),onPointerUp:pe(c.onPointerUp,()=>{A.current==="mouse"&&T()}),onPointerDown:pe(c.onPointerDown,N=>{A.current=N.pointerType}),onPointerMove:pe(c.onPointerMove,N=>{A.current=N.pointerType,l?d.onItemLeave?.():A.current==="mouse"&&N.currentTarget.focus({preventScroll:!0})}),onPointerLeave:pe(c.onPointerLeave,N=>{N.currentTarget===document.activeElement&&d.onItemLeave?.()}),onKeyDown:pe(c.onKeyDown,N=>{d.searchRef?.current!==""&&N.key===" "||(AP.includes(N.key)&&T(),N.key===" "&&N.preventDefault())})})})})});GS.displayName=cc;var _l="SelectItemText",YS=x.forwardRef((e,n)=>{const{__scopeSelect:r,className:i,style:l,...s}=e,c=Ra(_l,r),f=Na(_l,r),d=$S(_l,r),h=_P(_l,r),[m,y]=x.useState(null),b=Be(n,T=>y(T),d.onItemTextChange,T=>f.itemTextRefCallback?.(T,d.value,d.disabled)),w=m?.textContent,S=x.useMemo(()=>g.jsx("option",{value:d.value,disabled:d.disabled,children:w},d.value),[d.disabled,d.value,w]),{onNativeOptionAdd:E,onNativeOptionRemove:A}=h;return qt(()=>(E(S),()=>A(S)),[E,A,S]),g.jsxs(g.Fragment,{children:[g.jsx(Ne.span,{id:d.textId,...s,ref:b}),d.isSelected&&c.valueNode&&!c.valueNodeHasChildren?mo.createPortal(s.children,c.valueNode):null]})});YS.displayName=_l;var KS="SelectItemIndicator",XS=x.forwardRef((e,n)=>{const{__scopeSelect:r,...i}=e;return $S(KS,r).isSelected?g.jsx(Ne.span,{"aria-hidden":!0,...i,ref:n}):null});XS.displayName=KS;var Ep="SelectScrollUpButton",QS=x.forwardRef((e,n)=>{const r=Na(Ep,e.__scopeSelect),i=_m(Ep,e.__scopeSelect),[l,s]=x.useState(!1),c=Be(n,i.onScrollButtonChange);return qt(()=>{if(r.viewport&&r.isPositioned){let f=function(){const h=d.scrollTop>0;s(h)};const d=r.viewport;return f(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[r.viewport,r.isPositioned]),l?g.jsx(WS,{...e,ref:c,onAutoScroll:()=>{const{viewport:f,selectedItem:d}=r;f&&d&&(f.scrollTop=f.scrollTop-d.offsetHeight)}}):null});QS.displayName=Ep;var Cp="SelectScrollDownButton",ZS=x.forwardRef((e,n)=>{const r=Na(Cp,e.__scopeSelect),i=_m(Cp,e.__scopeSelect),[l,s]=x.useState(!1),c=Be(n,i.onScrollButtonChange);return qt(()=>{if(r.viewport&&r.isPositioned){let f=function(){const h=d.scrollHeight-d.clientHeight,m=Math.ceil(d.scrollTop)<h;s(m)};const d=r.viewport;return f(),d.addEventListener("scroll",f),()=>d.removeEventListener("scroll",f)}},[r.viewport,r.isPositioned]),l?g.jsx(WS,{...e,ref:c,onAutoScroll:()=>{const{viewport:f,selectedItem:d}=r;f&&d&&(f.scrollTop=f.scrollTop+d.offsetHeight)}}):null});ZS.displayName=Cp;var WS=x.forwardRef((e,n)=>{const{__scopeSelect:r,onAutoScroll:i,...l}=e,s=Na("SelectScrollButton",r),c=x.useRef(null),f=Vc(r),d=x.useCallback(()=>{c.current!==null&&(window.clearInterval(c.current),c.current=null)},[]);return x.useEffect(()=>()=>d(),[d]),qt(()=>{f().find(m=>m.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[f]),g.jsx(Ne.div,{"aria-hidden":!0,...l,ref:n,style:{flexShrink:0,...l.style},onPointerDown:pe(l.onPointerDown,()=>{c.current===null&&(c.current=window.setInterval(i,50))}),onPointerMove:pe(l.onPointerMove,()=>{s.onItemLeave?.(),c.current===null&&(c.current=window.setInterval(i,50))}),onPointerLeave:pe(l.onPointerLeave,()=>{d()})})}),FP="SelectSeparator",JS=x.forwardRef((e,n)=>{const{__scopeSelect:r,...i}=e;return g.jsx(Ne.div,{"aria-hidden":!0,...i,ref:n})});JS.displayName=FP;var kp="SelectArrow",qP=x.forwardRef((e,n)=>{const{__scopeSelect:r,...i}=e,l=$c(r),s=Ra(kp,r),c=Na(kp,r);return s.open&&c.position==="popper"?g.jsx(Rm,{...l,...i,ref:n}):null});qP.displayName=kp;var VP="SelectBubbleInput",eE=x.forwardRef(({__scopeSelect:e,value:n,...r},i)=>{const l=x.useRef(null),s=Be(i,l),c=NS(n);return x.useEffect(()=>{const f=l.current;if(!f)return;const d=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(d,"value").set;if(c!==n&&m){const y=new Event("change",{bubbles:!0});m.call(f,n),f.dispatchEvent(y)}},[c,n]),g.jsx(Ne.select,{...r,style:{...Ew,...r.style},ref:s,defaultValue:n})});eE.displayName=VP;function tE(e){return e===""||e===void 0}function nE(e){const n=_t(e),r=x.useRef(""),i=x.useRef(0),l=x.useCallback(c=>{const f=r.current+c;n(f),(function d(h){r.current=h,window.clearTimeout(i.current),h!==""&&(i.current=window.setTimeout(()=>d(""),1e3))})(f)},[n]),s=x.useCallback(()=>{r.current="",window.clearTimeout(i.current)},[]);return x.useEffect(()=>()=>window.clearTimeout(i.current),[]),[r,l,s]}function rE(e,n,r){const l=n.length>1&&Array.from(n).every(h=>h===n[0])?n[0]:n,s=r?e.indexOf(r):-1;let c=$P(e,Math.max(s,0));l.length===1&&(c=c.filter(h=>h!==r));const d=c.find(h=>h.textValue.toLowerCase().startsWith(l.toLowerCase()));return d!==r?d:void 0}function $P(e,n){return e.map((r,i)=>e[(n+i)%e.length])}var GP=_S,aE=jS,YP=OS,KP=PS,XP=LS,iE=zS,QP=HS,oE=VS,lE=GS,ZP=YS,WP=XS,sE=QS,uE=ZS,cE=JS;const $b=GP,Gb=YP,Ap=x.forwardRef(({className:e,children:n,...r},i)=>g.jsxs(aE,{ref:i,className:ue("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...r,children:[n,g.jsx(KP,{asChild:!0,children:g.jsx(Gw,{className:"h-4 w-4 opacity-50"})})]}));Ap.displayName=aE.displayName;const fE=x.forwardRef(({className:e,...n},r)=>g.jsx(sE,{ref:r,className:ue("flex cursor-default items-center justify-center py-1",e),...n,children:g.jsx(tM,{className:"h-4 w-4"})}));fE.displayName=sE.displayName;const dE=x.forwardRef(({className:e,...n},r)=>g.jsx(uE,{ref:r,className:ue("flex cursor-default items-center justify-center py-1",e),...n,children:g.jsx(Gw,{className:"h-4 w-4"})}));dE.displayName=uE.displayName;const Tp=x.forwardRef(({className:e,children:n,position:r="popper",...i},l)=>g.jsx(XP,{children:g.jsxs(iE,{ref:l,className:ue("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...i,children:[g.jsx(fE,{}),g.jsx(QP,{className:ue("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),g.jsx(dE,{})]})}));Tp.displayName=iE.displayName;const JP=x.forwardRef(({className:e,...n},r)=>g.jsx(oE,{ref:r,className:ue("px-2 py-1.5 text-sm font-semibold",e),...n}));JP.displayName=oE.displayName;const Wa=x.forwardRef(({className:e,children:n,...r},i)=>g.jsxs(lE,{ref:i,className:ue("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[g.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:g.jsx(WP,{children:g.jsx(Nc,{className:"h-4 w-4"})})}),g.jsx(ZP,{children:n})]}));Wa.displayName=lE.displayName;const eL=x.forwardRef(({className:e,...n},r)=>g.jsx(cE,{ref:r,className:ue("-mx-1 my-1 h-px bg-muted",e),...n}));eL.displayName=cE.displayName;const Gc=fm,XU=U1,tL=dm,hE=x.forwardRef(({className:e,...n},r)=>g.jsx(es,{ref:r,className:ue("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...n}));hE.displayName=es.displayName;const is=x.forwardRef(({className:e,children:n,...r},i)=>g.jsxs(tL,{children:[g.jsx(hE,{}),g.jsxs(ts,{ref:i,className:ue("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[n,g.jsxs(Oc,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[g.jsx(no,{className:"h-4 w-4"}),g.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));is.displayName=ts.displayName;const os=({className:e,...n})=>g.jsx("div",{className:ue("flex flex-col space-y-1.5 text-center sm:text-left",e),...n});os.displayName="DialogHeader";const pE=({className:e,...n})=>g.jsx("div",{className:ue("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...n});pE.displayName="DialogFooter";const ls=x.forwardRef(({className:e,...n},r)=>g.jsx(ns,{ref:r,className:ue("text-lg font-semibold leading-none tracking-tight",e),...n}));ls.displayName=ns.displayName;const Ml=x.forwardRef(({className:e,...n},r)=>g.jsx(rs,{ref:r,className:ue("text-sm text-muted-foreground",e),...n}));Ml.displayName=rs.displayName;function Oh({className:e,...n}){return g.jsx("kbd",{"data-slot":"kbd",className:ue("inline-flex h-5 items-center justify-center rounded border border-muted-foreground/30 bg-muted/50 px-1.5 font-sans text-[11px] font-medium text-muted-foreground shadow-sm",e),...n})}function QU({className:e,...n}){return g.jsx("span",{"data-slot":"kbd-group",className:ue("inline-flex items-center gap-0.5",e),...n})}function ZU(){}function WU(){}function JU(e){const n=[],r=String(e||"");let i=r.indexOf(","),l=0,s=!1;for(;!s;){i===-1&&(i=r.length,s=!0);const c=r.slice(l,i).trim();(c||!s)&&n.push(c),l=i+1,i=r.indexOf(",",l)}return n}function nL(e,n){const r=n||{};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const rL=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,aL=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,iL={};function Yb(e,n){return(iL.jsx?aL:rL).test(e)}const oL=/[ \t\n\f\r]/g;function lL(e){return typeof e=="object"?e.type==="text"?Kb(e.value):!1:Kb(e)}function Kb(e){return e.replace(oL,"")===""}class ss{constructor(n,r,i){this.normal=r,this.property=n,i&&(this.space=i)}}ss.prototype.normal={};ss.prototype.property={};ss.prototype.space=void 0;function mE(e,n){const r={},i={};for(const l of e)Object.assign(r,l.property),Object.assign(i,l.normal);return new ss(r,i,n)}function Rp(e){return e.toLowerCase()}class vn{constructor(n,r){this.attribute=r,this.property=n}}vn.prototype.attribute="";vn.prototype.booleanish=!1;vn.prototype.boolean=!1;vn.prototype.commaOrSpaceSeparated=!1;vn.prototype.commaSeparated=!1;vn.prototype.defined=!1;vn.prototype.mustUseProperty=!1;vn.prototype.number=!1;vn.prototype.overloadedBoolean=!1;vn.prototype.property="";vn.prototype.spaceSeparated=!1;vn.prototype.space=void 0;let sL=0;const Ie=ii(),Dt=ii(),Np=ii(),he=ii(),ht=ii(),io=ii(),Rn=ii();function ii(){return 2**++sL}const _p=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ie,booleanish:Dt,commaOrSpaceSeparated:Rn,commaSeparated:io,number:he,overloadedBoolean:Np,spaceSeparated:ht},Symbol.toStringTag,{value:"Module"})),Ph=Object.keys(_p);class Mm extends vn{constructor(n,r,i,l){let s=-1;if(super(n,r),Xb(this,"space",l),typeof i=="number")for(;++s<Ph.length;){const c=Ph[s];Xb(this,Ph[s],(i&_p[c])===_p[c])}}}Mm.prototype.defined=!0;function Xb(e,n,r){r&&(e[n]=r)}function Co(e){const n={},r={};for(const[i,l]of Object.entries(e.properties)){const s=new Mm(i,e.transform(e.attributes||{},i),l,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(s.mustUseProperty=!0),n[i]=s,r[Rp(i)]=i,r[Rp(s.attribute)]=i}return new ss(n,r,e.space)}const gE=Co({properties:{ariaActiveDescendant:null,ariaAtomic:Dt,ariaAutoComplete:null,ariaBusy:Dt,ariaChecked:Dt,ariaColCount:he,ariaColIndex:he,ariaColSpan:he,ariaControls:ht,ariaCurrent:null,ariaDescribedBy:ht,ariaDetails:null,ariaDisabled:Dt,ariaDropEffect:ht,ariaErrorMessage:null,ariaExpanded:Dt,ariaFlowTo:ht,ariaGrabbed:Dt,ariaHasPopup:null,ariaHidden:Dt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ht,ariaLevel:he,ariaLive:null,ariaModal:Dt,ariaMultiLine:Dt,ariaMultiSelectable:Dt,ariaOrientation:null,ariaOwns:ht,ariaPlaceholder:null,ariaPosInSet:he,ariaPressed:Dt,ariaReadOnly:Dt,ariaRelevant:null,ariaRequired:Dt,ariaRoleDescription:ht,ariaRowCount:he,ariaRowIndex:he,ariaRowSpan:he,ariaSelected:Dt,ariaSetSize:he,ariaSort:null,ariaValueMax:he,ariaValueMin:he,ariaValueNow:he,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function yE(e,n){return n in e?e[n]:n}function vE(e,n){return yE(e,n.toLowerCase())}const uL=Co({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:io,acceptCharset:ht,accessKey:ht,action:null,allow:null,allowFullScreen:Ie,allowPaymentRequest:Ie,allowUserMedia:Ie,alt:null,as:null,async:Ie,autoCapitalize:null,autoComplete:ht,autoFocus:Ie,autoPlay:Ie,blocking:ht,capture:null,charSet:null,checked:Ie,cite:null,className:ht,cols:he,colSpan:null,content:null,contentEditable:Dt,controls:Ie,controlsList:ht,coords:he|io,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ie,defer:Ie,dir:null,dirName:null,disabled:Ie,download:Np,draggable:Dt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ie,formTarget:null,headers:ht,height:he,hidden:Np,high:he,href:null,hrefLang:null,htmlFor:ht,httpEquiv:ht,id:null,imageSizes:null,imageSrcSet:null,inert:Ie,inputMode:null,integrity:null,is:null,isMap:Ie,itemId:null,itemProp:ht,itemRef:ht,itemScope:Ie,itemType:ht,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ie,low:he,manifest:null,max:null,maxLength:he,media:null,method:null,min:null,minLength:he,multiple:Ie,muted:Ie,name:null,nonce:null,noModule:Ie,noValidate:Ie,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ie,optimum:he,pattern:null,ping:ht,placeholder:null,playsInline:Ie,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ie,referrerPolicy:null,rel:ht,required:Ie,reversed:Ie,rows:he,rowSpan:he,sandbox:ht,scope:null,scoped:Ie,seamless:Ie,selected:Ie,shadowRootClonable:Ie,shadowRootDelegatesFocus:Ie,shadowRootMode:null,shape:null,size:he,sizes:null,slot:null,span:he,spellCheck:Dt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:he,step:null,style:null,tabIndex:he,target:null,title:null,translate:null,type:null,typeMustMatch:Ie,useMap:null,value:Dt,width:he,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ht,axis:null,background:null,bgColor:null,border:he,borderColor:null,bottomMargin:he,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ie,declare:Ie,event:null,face:null,frame:null,frameBorder:null,hSpace:he,leftMargin:he,link:null,longDesc:null,lowSrc:null,marginHeight:he,marginWidth:he,noResize:Ie,noHref:Ie,noShade:Ie,noWrap:Ie,object:null,profile:null,prompt:null,rev:null,rightMargin:he,rules:null,scheme:null,scrolling:Dt,standby:null,summary:null,text:null,topMargin:he,valueType:null,version:null,vAlign:null,vLink:null,vSpace:he,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ie,disableRemotePlayback:Ie,prefix:null,property:null,results:he,security:null,unselectable:null},space:"html",transform:vE}),cL=Co({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Rn,accentHeight:he,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:he,amplitude:he,arabicForm:null,ascent:he,attributeName:null,attributeType:null,azimuth:he,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:he,by:null,calcMode:null,capHeight:he,className:ht,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:he,diffuseConstant:he,direction:null,display:null,dur:null,divisor:he,dominantBaseline:null,download:Ie,dx:null,dy:null,edgeMode:null,editable:null,elevation:he,enableBackground:null,end:null,event:null,exponent:he,externalResourcesRequired:null,fill:null,fillOpacity:he,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:io,g2:io,glyphName:io,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:he,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:he,horizOriginX:he,horizOriginY:he,id:null,ideographic:he,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:he,k:he,k1:he,k2:he,k3:he,k4:he,kernelMatrix:Rn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:he,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:he,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:he,overlineThickness:he,paintOrder:null,panose1:null,path:null,pathLength:he,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ht,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:he,pointsAtY:he,pointsAtZ:he,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Rn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Rn,rev:Rn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Rn,requiredFeatures:Rn,requiredFonts:Rn,requiredFormats:Rn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:he,specularExponent:he,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:he,strikethroughThickness:he,string:null,stroke:null,strokeDashArray:Rn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:he,strokeOpacity:he,strokeWidth:null,style:null,surfaceScale:he,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Rn,tabIndex:he,tableValues:null,target:null,targetX:he,targetY:he,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Rn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:he,underlineThickness:he,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:he,values:null,vAlphabetic:he,vMathematical:he,vectorEffect:null,vHanging:he,vIdeographic:he,version:null,vertAdvY:he,vertOriginX:he,vertOriginY:he,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:he,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:yE}),xE=Co({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),bE=Co({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:vE}),wE=Co({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),fL={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},dL=/[A-Z]/g,Qb=/-[a-z]/g,hL=/^data[-\w.:]+$/i;function pL(e,n){const r=Rp(n);let i=n,l=vn;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&hL.test(n)){if(n.charAt(4)==="-"){const s=n.slice(5).replace(Qb,gL);i="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=n.slice(4);if(!Qb.test(s)){let c=s.replace(dL,mL);c.charAt(0)!=="-"&&(c="-"+c),n="data"+c}}l=Mm}return new l(i,n)}function mL(e){return"-"+e.toLowerCase()}function gL(e){return e.charAt(1).toUpperCase()}const yL=mE([gE,uL,xE,bE,wE],"html"),jm=mE([gE,cL,xE,bE,wE],"svg");function eH(e){const n=String(e||"").trim();return n?n.split(/[ \t\n\r\f]+/g):[]}function vL(e){return e.join(" ").trim()}var Qi={},Lh,Zb;function xL(){if(Zb)return Lh;Zb=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,d=`
356
356
  `,h="/",m="*",y="",b="comment",w="declaration";Lh=function(E,A){if(typeof E!="string")throw new TypeError("First argument must be a string");if(!E)return[];A=A||{};var T=1,N=1;function R(ae){var K=ae.match(n);K&&(T+=K.length);var ie=ae.lastIndexOf(d);N=~ie?ae.length-ie:N+ae.length}function O(){var ae={line:T,column:N};return function(K){return K.position=new D(ae),F(),K}}function D(ae){this.start=ae,this.end={line:T,column:N},this.source=A.source}D.prototype.content=E;function j(ae){var K=new Error(A.source+":"+T+":"+N+": "+ae);if(K.reason=ae,K.filename=A.source,K.line=T,K.column=N,K.source=E,!A.silent)throw K}function B(ae){var K=ae.exec(E);if(K){var ie=K[0];return R(ie),E=E.slice(ie.length),K}}function F(){B(r)}function Z(ae){var K;for(ae=ae||[];K=L();)K!==!1&&ae.push(K);return ae}function L(){var ae=O();if(!(h!=E.charAt(0)||m!=E.charAt(1))){for(var K=2;y!=E.charAt(K)&&(m!=E.charAt(K)||h!=E.charAt(K+1));)++K;if(K+=2,y===E.charAt(K-1))return j("End of comment missing");var ie=E.slice(2,K-2);return N+=2,R(ie),E=E.slice(K),N+=2,ae({type:b,comment:ie})}}function W(){var ae=O(),K=B(i);if(K){if(L(),!B(l))return j("property missing ':'");var ie=B(s),z=ae({type:w,property:S(K[0].replace(e,y)),value:ie?S(ie[0].replace(e,y)):y});return B(c),z}}function J(){var ae=[];Z(ae);for(var K;K=W();)K!==!1&&(ae.push(K),Z(ae));return ae}return F(),J()};function S(E){return E?E.replace(f,y):y}return Lh}var Wb;function bL(){if(Wb)return Qi;Wb=1;var e=Qi&&Qi.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Qi,"__esModule",{value:!0}),Qi.default=r;var n=e(xL());function r(i,l){var s=null;if(!i||typeof i!="string")return s;var c=(0,n.default)(i),f=typeof l=="function";return c.forEach(function(d){if(d.type==="declaration"){var h=d.property,m=d.value;f?l(h,m,d):m&&(s=s||{},s[h]=m)}}),s}return Qi}var Al={},Jb;function wL(){if(Jb)return Al;Jb=1,Object.defineProperty(Al,"__esModule",{value:!0}),Al.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,s=function(h){return!h||r.test(h)||e.test(h)},c=function(h,m){return m.toUpperCase()},f=function(h,m){return"".concat(m,"-")},d=function(h,m){return m===void 0&&(m={}),s(h)?h:(h=h.toLowerCase(),m.reactCompat?h=h.replace(l,f):h=h.replace(i,f),h.replace(n,c))};return Al.camelCase=d,Al}var Tl,e0;function SL(){if(e0)return Tl;e0=1;var e=Tl&&Tl.__importDefault||function(l){return l&&l.__esModule?l:{default:l}},n=e(bL()),r=wL();function i(l,s){var c={};return!l||typeof l!="string"||(0,n.default)(l,function(f,d){f&&d&&(c[(0,r.camelCase)(f,s)]=d)}),c}return i.default=i,Tl=i,Tl}var EL=SL();const CL=vc(EL),SE=EE("end"),Dm=EE("start");function EE(e){return n;function n(r){const i=r&&r.position&&r.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function CE(e){const n=Dm(e),r=SE(e);if(n&&r)return{start:n,end:r}}function Pl(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?t0(e.position):"start"in e||"end"in e?t0(e):"line"in e||"column"in e?Mp(e):""}function Mp(e){return n0(e&&e.line)+":"+n0(e&&e.column)}function t0(e){return Mp(e&&e.start)+"-"+Mp(e&&e.end)}function n0(e){return e&&typeof e=="number"?e:1}class nn extends Error{constructor(n,r,i){super(),typeof r=="string"&&(i=r,r=void 0);let l="",s={},c=!1;if(r&&("line"in r&&"column"in r?s={place:r}:"start"in r&&"end"in r?s={place:r}:"type"in r?s={ancestors:[r],place:r.position}:s={...r}),typeof n=="string"?l=n:!s.cause&&n&&(c=!0,l=n.message,s.cause=n),!s.ruleId&&!s.source&&typeof i=="string"){const d=i.indexOf(":");d===-1?s.ruleId=i:(s.source=i.slice(0,d),s.ruleId=i.slice(d+1))}if(!s.place&&s.ancestors&&s.ancestors){const d=s.ancestors[s.ancestors.length-1];d&&(s.place=d.position)}const f=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=l,this.line=f?f.line:void 0,this.name=Pl(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=c&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}nn.prototype.file="";nn.prototype.name="";nn.prototype.reason="";nn.prototype.message="";nn.prototype.stack="";nn.prototype.column=void 0;nn.prototype.line=void 0;nn.prototype.ancestors=void 0;nn.prototype.cause=void 0;nn.prototype.fatal=void 0;nn.prototype.place=void 0;nn.prototype.ruleId=void 0;nn.prototype.source=void 0;const Om={}.hasOwnProperty,kL=new Map,AL=/[A-Z]/g,TL=new Set(["table","tbody","thead","tfoot","tr"]),RL=new Set(["td","th"]),kE="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function NL(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=n.filePath||void 0;let i;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=zL(r,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=LL(r,n.jsx,n.jsxs)}const l={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:i,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?jm:yL,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},s=AE(l,e,void 0);return s&&typeof s!="string"?s:l.create(e,l.Fragment,{children:s||void 0},void 0)}function AE(e,n,r){if(n.type==="element")return _L(e,n,r);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return ML(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return DL(e,n,r);if(n.type==="mdxjsEsm")return jL(e,n);if(n.type==="root")return OL(e,n,r);if(n.type==="text")return PL(e,n)}function _L(e,n,r){const i=e.schema;let l=i;n.tagName.toLowerCase()==="svg"&&i.space==="html"&&(l=jm,e.schema=l),e.ancestors.push(n);const s=RE(e,n.tagName,!1),c=IL(e,n);let f=Lm(e,n);return TL.has(n.tagName)&&(f=f.filter(function(d){return typeof d=="string"?!lL(d):!0})),TE(e,c,s,n),Pm(c,f),e.ancestors.pop(),e.schema=i,e.create(n,s,c,r)}function ML(e,n){if(n.data&&n.data.estree&&e.evaluater){const i=n.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}Vl(e,n.position)}function jL(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Vl(e,n.position)}function DL(e,n,r){const i=e.schema;let l=i;n.name==="svg"&&i.space==="html"&&(l=jm,e.schema=l),e.ancestors.push(n);const s=n.name===null?e.Fragment:RE(e,n.name,!0),c=BL(e,n),f=Lm(e,n);return TE(e,c,s,n),Pm(c,f),e.ancestors.pop(),e.schema=i,e.create(n,s,c,r)}function OL(e,n,r){const i={};return Pm(i,Lm(e,n)),e.create(n,e.Fragment,i,r)}function PL(e,n){return n.value}function TE(e,n,r,i){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(n.node=i)}function Pm(e,n){if(n.length>0){const r=n.length>1?n:n[0];r&&(e.children=r)}}function LL(e,n,r){return i;function i(l,s,c,f){const h=Array.isArray(c.children)?r:n;return f?h(s,c,f):h(s,c)}}function zL(e,n){return r;function r(i,l,s,c){const f=Array.isArray(s.children),d=Dm(i);return n(l,s,c,f,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function IL(e,n){const r={};let i,l;for(l in n.properties)if(l!=="children"&&Om.call(n.properties,l)){const s=UL(e,l,n.properties[l]);if(s){const[c,f]=s;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&RL.has(n.tagName)?i=f:r[c]=f}}if(i){const s=r.style||(r.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return r}function BL(e,n){const r={};for(const i of n.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const s=i.data.estree.body[0];s.type;const c=s.expression;c.type;const f=c.properties[0];f.type,Object.assign(r,e.evaluater.evaluateExpression(f.argument))}else Vl(e,n.position);else{const l=i.name;let s;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const f=i.value.data.estree.body[0];f.type,s=e.evaluater.evaluateExpression(f.expression)}else Vl(e,n.position);else s=i.value===null?!0:i.value;r[l]=s}return r}function Lm(e,n){const r=[];let i=-1;const l=e.passKeys?new Map:kL;for(;++i<n.children.length;){const s=n.children[i];let c;if(e.passKeys){const d=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(d){const h=l.get(d)||0;c=d+"-"+h,l.set(d,h+1)}}const f=AE(e,s,c);f!==void 0&&r.push(f)}return r}function UL(e,n,r){const i=pL(e.schema,n);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=i.commaSeparated?nL(r):vL(r)),i.property==="style"){let l=typeof r=="object"?r:HL(e,String(r));return e.stylePropertyNameCase==="css"&&(l=FL(l)),["style",l]}return[e.elementAttributeNameCase==="react"&&i.space?fL[i.property]||i.property:i.attribute,r]}}function HL(e,n){try{return CL(n,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const i=r,l=new nn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw l.file=e.filePath||void 0,l.url=kE+"#cannot-parse-style-attribute",l}}function RE(e,n,r){let i;if(!r)i={type:"Literal",value:n};else if(n.includes(".")){const l=n.split(".");let s=-1,c;for(;++s<l.length;){const f=Yb(l[s])?{type:"Identifier",name:l[s]}:{type:"Literal",value:l[s]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(s&&f.type==="Literal"),optional:!1}:f}i=c}else i=Yb(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(i.type==="Literal"){const l=i.value;return Om.call(e.components,l)?e.components[l]:l}if(e.evaluater)return e.evaluater.evaluateExpression(i);Vl(e)}function Vl(e,n){const r=new nn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=kE+"#cannot-handle-mdx-estrees-without-createevaluater",r}function FL(e){const n={};let r;for(r in e)Om.call(e,r)&&(n[qL(r)]=e[r]);return n}function qL(e){let n=e.replace(AL,VL);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function VL(e){return"-"+e.toLowerCase()}const zh={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},$L={};function zm(e,n){const r=$L,i=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,l=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return NE(e,i,l)}function NE(e,n,r){if(GL(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return r0(e.children,n,r)}return Array.isArray(e)?r0(e,n,r):""}function r0(e,n,r){const i=[];let l=-1;for(;++l<e.length;)i[l]=NE(e[l],n,r);return i.join("")}function GL(e){return!!(e&&typeof e=="object")}const a0=document.createElement("i");function Im(e){const n="&"+e+";";a0.innerHTML=n;const r=a0.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===n?!1:r}function Mn(e,n,r,i){const l=e.length;let s=0,c;if(n<0?n=-n>l?0:l+n:n=n>l?l:n,r=r>0?r:0,i.length<1e4)c=Array.from(i),c.unshift(n,r),e.splice(...c);else for(r&&e.splice(n,r);s<i.length;)c=i.slice(s,s+1e4),c.unshift(n,0),e.splice(...c),s+=1e4,n+=1e4}function Hn(e,n){return e.length>0?(Mn(e,e.length,0,n),e):n}const i0={}.hasOwnProperty;function _E(e){const n={};let r=-1;for(;++r<e.length;)YL(n,e[r]);return n}function YL(e,n){let r;for(r in n){const l=(i0.call(e,r)?e[r]:void 0)||(e[r]={}),s=n[r];let c;if(s)for(c in s){i0.call(l,c)||(l[c]=[]);const f=s[c];KL(l[c],Array.isArray(f)?f:f?[f]:[])}}}function KL(e,n){let r=-1;const i=[];for(;++r<n.length;)(n[r].add==="after"?e:i).push(n[r]);Mn(e,0,0,i)}function ME(e,n){const r=Number.parseInt(e,n);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function nr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const cn=_a(/[A-Za-z]/),tn=_a(/[\dA-Za-z]/),XL=_a(/[#-'*+\--9=?A-Z^-~]/);function fc(e){return e!==null&&(e<32||e===127)}const jp=_a(/\d/),QL=_a(/[\dA-Fa-f]/),ZL=_a(/[!-/:-@[-`{-~]/);function ke(e){return e!==null&&e<-2}function ct(e){return e!==null&&(e<0||e===32)}function Ke(e){return e===-2||e===-1||e===32}const Yc=_a(new RegExp("\\p{P}|\\p{S}","u")),ai=_a(/\s/);function _a(e){return n;function n(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function ko(e){const n=[];let r=-1,i=0,l=0;for(;++r<e.length;){const s=e.charCodeAt(r);let c="";if(s===37&&tn(e.charCodeAt(r+1))&&tn(e.charCodeAt(r+2)))l=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(c=String.fromCharCode(s));else if(s>55295&&s<57344){const f=e.charCodeAt(r+1);s<56320&&f>56319&&f<57344?(c=String.fromCharCode(s,f),l=1):c="�"}else c=String.fromCharCode(s);c&&(n.push(e.slice(i,r),encodeURIComponent(c)),i=r+l+1,c=""),l&&(r+=l,l=0)}return n.join("")+e.slice(i)}function We(e,n,r,i){const l=i?i-1:Number.POSITIVE_INFINITY;let s=0;return c;function c(d){return Ke(d)?(e.enter(r),f(d)):n(d)}function f(d){return Ke(d)&&s++<l?(e.consume(d),f):(e.exit(r),n(d))}}const WL={tokenize:JL};function JL(e){const n=e.attempt(this.parser.constructs.contentInitial,i,l);let r;return n;function i(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),We(e,n,"linePrefix")}function l(f){return e.enter("paragraph"),s(f)}function s(f){const d=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=d),r=d,c(f)}function c(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return ke(f)?(e.consume(f),e.exit("chunkText"),s):(e.consume(f),c)}}const ez={tokenize:tz},o0={tokenize:nz};function tz(e){const n=this,r=[];let i=0,l,s,c;return f;function f(R){if(i<r.length){const O=r[i];return n.containerState=O[1],e.attempt(O[0].continuation,d,h)(R)}return h(R)}function d(R){if(i++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,l&&N();const O=n.events.length;let D=O,j;for(;D--;)if(n.events[D][0]==="exit"&&n.events[D][1].type==="chunkFlow"){j=n.events[D][1].end;break}T(i);let B=O;for(;B<n.events.length;)n.events[B][1].end={...j},B++;return Mn(n.events,D+1,0,n.events.slice(O)),n.events.length=B,h(R)}return f(R)}function h(R){if(i===r.length){if(!l)return b(R);if(l.currentConstruct&&l.currentConstruct.concrete)return S(R);n.interrupt=!!(l.currentConstruct&&!l._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(o0,m,y)(R)}function m(R){return l&&N(),T(i),b(R)}function y(R){return n.parser.lazy[n.now().line]=i!==r.length,c=n.now().offset,S(R)}function b(R){return n.containerState={},e.attempt(o0,w,S)(R)}function w(R){return i++,r.push([n.currentConstruct,n.containerState]),b(R)}function S(R){if(R===null){l&&N(),T(0),e.consume(R);return}return l=l||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:l,contentType:"flow",previous:s}),E(R)}function E(R){if(R===null){A(e.exit("chunkFlow"),!0),T(0),e.consume(R);return}return ke(R)?(e.consume(R),A(e.exit("chunkFlow")),i=0,n.interrupt=void 0,f):(e.consume(R),E)}function A(R,O){const D=n.sliceStream(R);if(O&&D.push(null),R.previous=s,s&&(s.next=R),s=R,l.defineSkip(R.start),l.write(D),n.parser.lazy[R.start.line]){let j=l.events.length;for(;j--;)if(l.events[j][1].start.offset<c&&(!l.events[j][1].end||l.events[j][1].end.offset>c))return;const B=n.events.length;let F=B,Z,L;for(;F--;)if(n.events[F][0]==="exit"&&n.events[F][1].type==="chunkFlow"){if(Z){L=n.events[F][1].end;break}Z=!0}for(T(i),j=B;j<n.events.length;)n.events[j][1].end={...L},j++;Mn(n.events,F+1,0,n.events.slice(B)),n.events.length=j}}function T(R){let O=r.length;for(;O-- >R;){const D=r[O];n.containerState=D[1],D[0].exit.call(n,e)}r.length=R}function N(){l.write([null]),s=void 0,l=void 0,n.containerState._closeFlow=void 0}}function nz(e,n,r){return We(e,e.attempt(this.parser.constructs.document,n,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function uo(e){if(e===null||ct(e)||ai(e))return 1;if(Yc(e))return 2}function Kc(e,n,r){const i=[];let l=-1;for(;++l<e.length;){const s=e[l].resolveAll;s&&!i.includes(s)&&(n=s(n,r),i.push(s))}return n}const Dp={name:"attention",resolveAll:rz,tokenize:az};function rz(e,n){let r=-1,i,l,s,c,f,d,h,m;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(i=r;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&n.sliceSerialize(e[i][1]).charCodeAt(0)===n.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[i][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;d=e[i][1].end.offset-e[i][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const y={...e[i][1].end},b={...e[r][1].start};l0(y,-d),l0(b,d),c={type:d>1?"strongSequence":"emphasisSequence",start:y,end:{...e[i][1].end}},f={type:d>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:b},s={type:d>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[r][1].start}},l={type:d>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},e[i][1].end={...c.start},e[r][1].start={...f.end},h=[],e[i][1].end.offset-e[i][1].start.offset&&(h=Hn(h,[["enter",e[i][1],n],["exit",e[i][1],n]])),h=Hn(h,[["enter",l,n],["enter",c,n],["exit",c,n],["enter",s,n]]),h=Hn(h,Kc(n.parser.constructs.insideSpan.null,e.slice(i+1,r),n)),h=Hn(h,[["exit",s,n],["enter",f,n],["exit",f,n],["exit",l,n]]),e[r][1].end.offset-e[r][1].start.offset?(m=2,h=Hn(h,[["enter",e[r][1],n],["exit",e[r][1],n]])):m=0,Mn(e,i-1,r-i+3,h),r=i+h.length-m-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function az(e,n){const r=this.parser.constructs.attentionMarkers.null,i=this.previous,l=uo(i);let s;return c;function c(d){return s=d,e.enter("attentionSequence"),f(d)}function f(d){if(d===s)return e.consume(d),f;const h=e.exit("attentionSequence"),m=uo(d),y=!m||m===2&&l||r.includes(d),b=!l||l===2&&m||r.includes(i);return h._open=!!(s===42?y:y&&(l||!b)),h._close=!!(s===42?b:b&&(m||!y)),n(d)}}function l0(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const iz={name:"autolink",tokenize:oz};function oz(e,n,r){let i=0;return l;function l(w){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(w),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(w){return cn(w)?(e.consume(w),c):w===64?r(w):h(w)}function c(w){return w===43||w===45||w===46||tn(w)?(i=1,f(w)):h(w)}function f(w){return w===58?(e.consume(w),i=0,d):(w===43||w===45||w===46||tn(w))&&i++<32?(e.consume(w),f):(i=0,h(w))}function d(w){return w===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(w),e.exit("autolinkMarker"),e.exit("autolink"),n):w===null||w===32||w===60||fc(w)?r(w):(e.consume(w),d)}function h(w){return w===64?(e.consume(w),m):XL(w)?(e.consume(w),h):r(w)}function m(w){return tn(w)?y(w):r(w)}function y(w){return w===46?(e.consume(w),i=0,m):w===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(w),e.exit("autolinkMarker"),e.exit("autolink"),n):b(w)}function b(w){if((w===45||tn(w))&&i++<63){const S=w===45?b:y;return e.consume(w),S}return r(w)}}const us={partial:!0,tokenize:lz};function lz(e,n,r){return i;function i(s){return Ke(s)?We(e,l,"linePrefix")(s):l(s)}function l(s){return s===null||ke(s)?n(s):r(s)}}const jE={continuation:{tokenize:uz},exit:cz,name:"blockQuote",tokenize:sz};function sz(e,n,r){const i=this;return l;function l(c){if(c===62){const f=i.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),s}return r(c)}function s(c){return Ke(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(c))}}function uz(e,n,r){const i=this;return l;function l(c){return Ke(c)?We(e,s,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):s(c)}function s(c){return e.attempt(jE,n,r)(c)}}function cz(e){e.exit("blockQuote")}const DE={name:"characterEscape",tokenize:fz};function fz(e,n,r){return i;function i(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),l}function l(s){return ZL(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):r(s)}}const OE={name:"characterReference",tokenize:dz};function dz(e,n,r){const i=this;let l=0,s,c;return f;function f(y){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),d}function d(y){return y===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(y),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),s=31,c=tn,m(y))}function h(y){return y===88||y===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(y),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,c=QL,m):(e.enter("characterReferenceValue"),s=7,c=jp,m(y))}function m(y){if(y===59&&l){const b=e.exit("characterReferenceValue");return c===tn&&!Im(i.sliceSerialize(b))?r(y):(e.enter("characterReferenceMarker"),e.consume(y),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return c(y)&&l++<s?(e.consume(y),m):r(y)}}const s0={partial:!0,tokenize:pz},u0={concrete:!0,name:"codeFenced",tokenize:hz};function hz(e,n,r){const i=this,l={partial:!0,tokenize:D};let s=0,c=0,f;return d;function d(j){return h(j)}function h(j){const B=i.events[i.events.length-1];return s=B&&B[1].type==="linePrefix"?B[2].sliceSerialize(B[1],!0).length:0,f=j,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(j)}function m(j){return j===f?(c++,e.consume(j),m):c<3?r(j):(e.exit("codeFencedFenceSequence"),Ke(j)?We(e,y,"whitespace")(j):y(j))}function y(j){return j===null||ke(j)?(e.exit("codeFencedFence"),i.interrupt?n(j):e.check(s0,E,O)(j)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(j))}function b(j){return j===null||ke(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),y(j)):Ke(j)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),We(e,w,"whitespace")(j)):j===96&&j===f?r(j):(e.consume(j),b)}function w(j){return j===null||ke(j)?y(j):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(j))}function S(j){return j===null||ke(j)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),y(j)):j===96&&j===f?r(j):(e.consume(j),S)}function E(j){return e.attempt(l,O,A)(j)}function A(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),T}function T(j){return s>0&&Ke(j)?We(e,N,"linePrefix",s+1)(j):N(j)}function N(j){return j===null||ke(j)?e.check(s0,E,O)(j):(e.enter("codeFlowValue"),R(j))}function R(j){return j===null||ke(j)?(e.exit("codeFlowValue"),N(j)):(e.consume(j),R)}function O(j){return e.exit("codeFenced"),n(j)}function D(j,B,F){let Z=0;return L;function L(ie){return j.enter("lineEnding"),j.consume(ie),j.exit("lineEnding"),W}function W(ie){return j.enter("codeFencedFence"),Ke(ie)?We(j,J,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ie):J(ie)}function J(ie){return ie===f?(j.enter("codeFencedFenceSequence"),ae(ie)):F(ie)}function ae(ie){return ie===f?(Z++,j.consume(ie),ae):Z>=c?(j.exit("codeFencedFenceSequence"),Ke(ie)?We(j,K,"whitespace")(ie):K(ie)):F(ie)}function K(ie){return ie===null||ke(ie)?(j.exit("codeFencedFence"),B(ie)):F(ie)}}}function pz(e,n,r){const i=this;return l;function l(c){return c===null?r(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s)}function s(c){return i.parser.lazy[i.now().line]?r(c):n(c)}}const Ih={name:"codeIndented",tokenize:gz},mz={partial:!0,tokenize:yz};function gz(e,n,r){const i=this;return l;function l(h){return e.enter("codeIndented"),We(e,s,"linePrefix",5)(h)}function s(h){const m=i.events[i.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?c(h):r(h)}function c(h){return h===null?d(h):ke(h)?e.attempt(mz,c,d)(h):(e.enter("codeFlowValue"),f(h))}function f(h){return h===null||ke(h)?(e.exit("codeFlowValue"),c(h)):(e.consume(h),f)}function d(h){return e.exit("codeIndented"),n(h)}}function yz(e,n,r){const i=this;return l;function l(c){return i.parser.lazy[i.now().line]?r(c):ke(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),l):We(e,s,"linePrefix",5)(c)}function s(c){const f=i.events[i.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?n(c):ke(c)?l(c):r(c)}}const vz={name:"codeText",previous:bz,resolve:xz,tokenize:wz};function xz(e){let n=e.length-4,r=3,i,l;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(i=r;++i<n;)if(e[i][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[n][1].type="codeTextPadding",r+=2,n-=2;break}}for(i=r-1,n++;++i<=n;)l===void 0?i!==n&&e[i][1].type!=="lineEnding"&&(l=i):(i===n||e[i][1].type==="lineEnding")&&(e[l][1].type="codeTextData",i!==l+2&&(e[l][1].end=e[i-1][1].end,e.splice(l+2,i-l-2),n-=i-l-2,i=l+2),l=void 0);return e}function bz(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function wz(e,n,r){let i=0,l,s;return c;function c(y){return e.enter("codeText"),e.enter("codeTextSequence"),f(y)}function f(y){return y===96?(e.consume(y),i++,f):(e.exit("codeTextSequence"),d(y))}function d(y){return y===null?r(y):y===32?(e.enter("space"),e.consume(y),e.exit("space"),d):y===96?(s=e.enter("codeTextSequence"),l=0,m(y)):ke(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(y))}function h(y){return y===null||y===32||y===96||ke(y)?(e.exit("codeTextData"),d(y)):(e.consume(y),h)}function m(y){return y===96?(e.consume(y),l++,m):l===i?(e.exit("codeTextSequence"),e.exit("codeText"),n(y)):(s.type="codeTextData",h(y))}}class Sz{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,r){const i=r??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(n,i):n>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(n,r,i){const l=r||0;this.setCursor(Math.trunc(n));const s=this.right.splice(this.right.length-l,Number.POSITIVE_INFINITY);return i&&Rl(this.left,i),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),Rl(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Rl(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const r=this.left.splice(n,Number.POSITIVE_INFINITY);Rl(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);Rl(this.left,r.reverse())}}}function Rl(e,n){let r=0;if(n.length<1e4)e.push(...n);else for(;r<n.length;)e.push(...n.slice(r,r+1e4)),r+=1e4}function PE(e){const n={};let r=-1,i,l,s,c,f,d,h;const m=new Sz(e);for(;++r<m.length;){for(;r in n;)r=n[r];if(i=m.get(r),r&&i[1].type==="chunkFlow"&&m.get(r-1)[1].type==="listItemPrefix"&&(d=i[1]._tokenizer.events,s=0,s<d.length&&d[s][1].type==="lineEndingBlank"&&(s+=2),s<d.length&&d[s][1].type==="content"))for(;++s<d.length&&d[s][1].type!=="content";)d[s][1].type==="chunkText"&&(d[s][1]._isInFirstContentOfListItem=!0,s++);if(i[0]==="enter")i[1].contentType&&(Object.assign(n,Ez(m,r)),r=n[r],h=!0);else if(i[1]._container){for(s=r,l=void 0;s--;)if(c=m.get(s),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(l&&(m.get(l)[1].type="lineEndingBlank"),c[1].type="lineEnding",l=s);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;l&&(i[1].end={...m.get(l)[1].start},f=m.slice(l,r),f.unshift(i),m.splice(l,r-l+1,f))}}return Mn(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!h}function Ez(e,n){const r=e.get(n)[1],i=e.get(n)[2];let l=n-1;const s=[];let c=r._tokenizer;c||(c=i.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,d=[],h={};let m,y,b=-1,w=r,S=0,E=0;const A=[E];for(;w;){for(;e.get(++l)[1]!==w;);s.push(l),w._tokenizer||(m=i.sliceStream(w),w.next||m.push(null),y&&c.defineSkip(w.start),w._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(m),w._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),y=w,w=w.next}for(w=r;++b<f.length;)f[b][0]==="exit"&&f[b-1][0]==="enter"&&f[b][1].type===f[b-1][1].type&&f[b][1].start.line!==f[b][1].end.line&&(E=b+1,A.push(E),w._tokenizer=void 0,w.previous=void 0,w=w.next);for(c.events=[],w?(w._tokenizer=void 0,w.previous=void 0):A.pop(),b=A.length;b--;){const T=f.slice(A[b],A[b+1]),N=s.pop();d.push([N,N+T.length-1]),e.splice(N,2,T)}for(d.reverse(),b=-1;++b<d.length;)h[S+d[b][0]]=S+d[b][1],S+=d[b][1]-d[b][0]-1;return h}const Cz={resolve:Az,tokenize:Tz},kz={partial:!0,tokenize:Rz};function Az(e){return PE(e),e}function Tz(e,n){let r;return i;function i(f){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),l(f)}function l(f){return f===null?s(f):ke(f)?e.check(kz,c,s)(f):(e.consume(f),l)}function s(f){return e.exit("chunkContent"),e.exit("content"),n(f)}function c(f){return e.consume(f),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,l}}function Rz(e,n,r){const i=this;return l;function l(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),We(e,s,"linePrefix")}function s(c){if(c===null||ke(c))return r(c);const f=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?n(c):e.interrupt(i.parser.constructs.flow,r,n)(c)}}function LE(e,n,r,i,l,s,c,f,d){const h=d||Number.POSITIVE_INFINITY;let m=0;return y;function y(T){return T===60?(e.enter(i),e.enter(l),e.enter(s),e.consume(T),e.exit(s),b):T===null||T===32||T===41||fc(T)?r(T):(e.enter(i),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),E(T))}function b(T){return T===62?(e.enter(s),e.consume(T),e.exit(s),e.exit(l),e.exit(i),n):(e.enter(f),e.enter("chunkString",{contentType:"string"}),w(T))}function w(T){return T===62?(e.exit("chunkString"),e.exit(f),b(T)):T===null||T===60||ke(T)?r(T):(e.consume(T),T===92?S:w)}function S(T){return T===60||T===62||T===92?(e.consume(T),w):w(T)}function E(T){return!m&&(T===null||T===41||ct(T))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(i),n(T)):m<h&&T===40?(e.consume(T),m++,E):T===41?(e.consume(T),m--,E):T===null||T===32||T===40||fc(T)?r(T):(e.consume(T),T===92?A:E)}function A(T){return T===40||T===41||T===92?(e.consume(T),E):E(T)}}function zE(e,n,r,i,l,s){const c=this;let f=0,d;return h;function h(w){return e.enter(i),e.enter(l),e.consume(w),e.exit(l),e.enter(s),m}function m(w){return f>999||w===null||w===91||w===93&&!d||w===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?r(w):w===93?(e.exit(s),e.enter(l),e.consume(w),e.exit(l),e.exit(i),n):ke(w)?(e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),y(w))}function y(w){return w===null||w===91||w===93||ke(w)||f++>999?(e.exit("chunkString"),m(w)):(e.consume(w),d||(d=!Ke(w)),w===92?b:y)}function b(w){return w===91||w===92||w===93?(e.consume(w),f++,y):y(w)}}function IE(e,n,r,i,l,s){let c;return f;function f(b){return b===34||b===39||b===40?(e.enter(i),e.enter(l),e.consume(b),e.exit(l),c=b===40?41:b,d):r(b)}function d(b){return b===c?(e.enter(l),e.consume(b),e.exit(l),e.exit(i),n):(e.enter(s),h(b))}function h(b){return b===c?(e.exit(s),d(c)):b===null?r(b):ke(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),We(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===c||b===null||ke(b)?(e.exit("chunkString"),h(b)):(e.consume(b),b===92?y:m)}function y(b){return b===c||b===92?(e.consume(b),m):m(b)}}function Ll(e,n){let r;return i;function i(l){return ke(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),r=!0,i):Ke(l)?We(e,i,r?"linePrefix":"lineSuffix")(l):n(l)}}const Nz={name:"definition",tokenize:Mz},_z={partial:!0,tokenize:jz};function Mz(e,n,r){const i=this;let l;return s;function s(w){return e.enter("definition"),c(w)}function c(w){return zE.call(i,e,f,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(w)}function f(w){return l=nr(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),d):r(w)}function d(w){return ct(w)?Ll(e,h)(w):h(w)}function h(w){return LE(e,m,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(w)}function m(w){return e.attempt(_z,y,y)(w)}function y(w){return Ke(w)?We(e,b,"whitespace")(w):b(w)}function b(w){return w===null||ke(w)?(e.exit("definition"),i.parser.defined.push(l),n(w)):r(w)}}function jz(e,n,r){return i;function i(f){return ct(f)?Ll(e,l)(f):r(f)}function l(f){return IE(e,s,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function s(f){return Ke(f)?We(e,c,"whitespace")(f):c(f)}function c(f){return f===null||ke(f)?n(f):r(f)}}const Dz={name:"hardBreakEscape",tokenize:Oz};function Oz(e,n,r){return i;function i(s){return e.enter("hardBreakEscape"),e.consume(s),l}function l(s){return ke(s)?(e.exit("hardBreakEscape"),n(s)):r(s)}}const Pz={name:"headingAtx",resolve:Lz,tokenize:zz};function Lz(e,n){let r=e.length-2,i=3,l,s;return e[i][1].type==="whitespace"&&(i+=2),r-2>i&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(i===r-1||r-4>i&&e[r-2][1].type==="whitespace")&&(r-=i+1===r?2:4),r>i&&(l={type:"atxHeadingText",start:e[i][1].start,end:e[r][1].end},s={type:"chunkText",start:e[i][1].start,end:e[r][1].end,contentType:"text"},Mn(e,i,r-i+1,[["enter",l,n],["enter",s,n],["exit",s,n],["exit",l,n]])),e}function zz(e,n,r){let i=0;return l;function l(m){return e.enter("atxHeading"),s(m)}function s(m){return e.enter("atxHeadingSequence"),c(m)}function c(m){return m===35&&i++<6?(e.consume(m),c):m===null||ct(m)?(e.exit("atxHeadingSequence"),f(m)):r(m)}function f(m){return m===35?(e.enter("atxHeadingSequence"),d(m)):m===null||ke(m)?(e.exit("atxHeading"),n(m)):Ke(m)?We(e,f,"whitespace")(m):(e.enter("atxHeadingText"),h(m))}function d(m){return m===35?(e.consume(m),d):(e.exit("atxHeadingSequence"),f(m))}function h(m){return m===null||m===35||ct(m)?(e.exit("atxHeadingText"),f(m)):(e.consume(m),h)}}const Iz=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],c0=["pre","script","style","textarea"],Bz={concrete:!0,name:"htmlFlow",resolveTo:Fz,tokenize:qz},Uz={partial:!0,tokenize:$z},Hz={partial:!0,tokenize:Vz};function Fz(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function qz(e,n,r){const i=this;let l,s,c,f,d;return h;function h(M){return m(M)}function m(M){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(M),y}function y(M){return M===33?(e.consume(M),b):M===47?(e.consume(M),s=!0,E):M===63?(e.consume(M),l=3,i.interrupt?n:k):cn(M)?(e.consume(M),c=String.fromCharCode(M),A):r(M)}function b(M){return M===45?(e.consume(M),l=2,w):M===91?(e.consume(M),l=5,f=0,S):cn(M)?(e.consume(M),l=4,i.interrupt?n:k):r(M)}function w(M){return M===45?(e.consume(M),i.interrupt?n:k):r(M)}function S(M){const ce="CDATA[";return M===ce.charCodeAt(f++)?(e.consume(M),f===ce.length?i.interrupt?n:J:S):r(M)}function E(M){return cn(M)?(e.consume(M),c=String.fromCharCode(M),A):r(M)}function A(M){if(M===null||M===47||M===62||ct(M)){const ce=M===47,Se=c.toLowerCase();return!ce&&!s&&c0.includes(Se)?(l=1,i.interrupt?n(M):J(M)):Iz.includes(c.toLowerCase())?(l=6,ce?(e.consume(M),T):i.interrupt?n(M):J(M)):(l=7,i.interrupt&&!i.parser.lazy[i.now().line]?r(M):s?N(M):R(M))}return M===45||tn(M)?(e.consume(M),c+=String.fromCharCode(M),A):r(M)}function T(M){return M===62?(e.consume(M),i.interrupt?n:J):r(M)}function N(M){return Ke(M)?(e.consume(M),N):L(M)}function R(M){return M===47?(e.consume(M),L):M===58||M===95||cn(M)?(e.consume(M),O):Ke(M)?(e.consume(M),R):L(M)}function O(M){return M===45||M===46||M===58||M===95||tn(M)?(e.consume(M),O):D(M)}function D(M){return M===61?(e.consume(M),j):Ke(M)?(e.consume(M),D):R(M)}function j(M){return M===null||M===60||M===61||M===62||M===96?r(M):M===34||M===39?(e.consume(M),d=M,B):Ke(M)?(e.consume(M),j):F(M)}function B(M){return M===d?(e.consume(M),d=null,Z):M===null||ke(M)?r(M):(e.consume(M),B)}function F(M){return M===null||M===34||M===39||M===47||M===60||M===61||M===62||M===96||ct(M)?D(M):(e.consume(M),F)}function Z(M){return M===47||M===62||Ke(M)?R(M):r(M)}function L(M){return M===62?(e.consume(M),W):r(M)}function W(M){return M===null||ke(M)?J(M):Ke(M)?(e.consume(M),W):r(M)}function J(M){return M===45&&l===2?(e.consume(M),z):M===60&&l===1?(e.consume(M),X):M===62&&l===4?(e.consume(M),Q):M===63&&l===3?(e.consume(M),k):M===93&&l===5?(e.consume(M),re):ke(M)&&(l===6||l===7)?(e.exit("htmlFlowData"),e.check(Uz,le,ae)(M)):M===null||ke(M)?(e.exit("htmlFlowData"),ae(M)):(e.consume(M),J)}function ae(M){return e.check(Hz,K,le)(M)}function K(M){return e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),ie}function ie(M){return M===null||ke(M)?ae(M):(e.enter("htmlFlowData"),J(M))}function z(M){return M===45?(e.consume(M),k):J(M)}function X(M){return M===47?(e.consume(M),c="",H):J(M)}function H(M){if(M===62){const ce=c.toLowerCase();return c0.includes(ce)?(e.consume(M),Q):J(M)}return cn(M)&&c.length<8?(e.consume(M),c+=String.fromCharCode(M),H):J(M)}function re(M){return M===93?(e.consume(M),k):J(M)}function k(M){return M===62?(e.consume(M),Q):M===45&&l===2?(e.consume(M),k):J(M)}function Q(M){return M===null||ke(M)?(e.exit("htmlFlowData"),le(M)):(e.consume(M),Q)}function le(M){return e.exit("htmlFlow"),n(M)}}function Vz(e,n,r){const i=this;return l;function l(c){return ke(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):r(c)}function s(c){return i.parser.lazy[i.now().line]?r(c):n(c)}}function $z(e,n,r){return i;function i(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),e.attempt(us,n,r)}}const Gz={name:"htmlText",tokenize:Yz};function Yz(e,n,r){const i=this;let l,s,c;return f;function f(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),d}function d(k){return k===33?(e.consume(k),h):k===47?(e.consume(k),D):k===63?(e.consume(k),R):cn(k)?(e.consume(k),F):r(k)}function h(k){return k===45?(e.consume(k),m):k===91?(e.consume(k),s=0,S):cn(k)?(e.consume(k),N):r(k)}function m(k){return k===45?(e.consume(k),w):r(k)}function y(k){return k===null?r(k):k===45?(e.consume(k),b):ke(k)?(c=y,X(k)):(e.consume(k),y)}function b(k){return k===45?(e.consume(k),w):y(k)}function w(k){return k===62?z(k):k===45?b(k):y(k)}function S(k){const Q="CDATA[";return k===Q.charCodeAt(s++)?(e.consume(k),s===Q.length?E:S):r(k)}function E(k){return k===null?r(k):k===93?(e.consume(k),A):ke(k)?(c=E,X(k)):(e.consume(k),E)}function A(k){return k===93?(e.consume(k),T):E(k)}function T(k){return k===62?z(k):k===93?(e.consume(k),T):E(k)}function N(k){return k===null||k===62?z(k):ke(k)?(c=N,X(k)):(e.consume(k),N)}function R(k){return k===null?r(k):k===63?(e.consume(k),O):ke(k)?(c=R,X(k)):(e.consume(k),R)}function O(k){return k===62?z(k):R(k)}function D(k){return cn(k)?(e.consume(k),j):r(k)}function j(k){return k===45||tn(k)?(e.consume(k),j):B(k)}function B(k){return ke(k)?(c=B,X(k)):Ke(k)?(e.consume(k),B):z(k)}function F(k){return k===45||tn(k)?(e.consume(k),F):k===47||k===62||ct(k)?Z(k):r(k)}function Z(k){return k===47?(e.consume(k),z):k===58||k===95||cn(k)?(e.consume(k),L):ke(k)?(c=Z,X(k)):Ke(k)?(e.consume(k),Z):z(k)}function L(k){return k===45||k===46||k===58||k===95||tn(k)?(e.consume(k),L):W(k)}function W(k){return k===61?(e.consume(k),J):ke(k)?(c=W,X(k)):Ke(k)?(e.consume(k),W):Z(k)}function J(k){return k===null||k===60||k===61||k===62||k===96?r(k):k===34||k===39?(e.consume(k),l=k,ae):ke(k)?(c=J,X(k)):Ke(k)?(e.consume(k),J):(e.consume(k),K)}function ae(k){return k===l?(e.consume(k),l=void 0,ie):k===null?r(k):ke(k)?(c=ae,X(k)):(e.consume(k),ae)}function K(k){return k===null||k===34||k===39||k===60||k===61||k===96?r(k):k===47||k===62||ct(k)?Z(k):(e.consume(k),K)}function ie(k){return k===47||k===62||ct(k)?Z(k):r(k)}function z(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),n):r(k)}function X(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),H}function H(k){return Ke(k)?We(e,re,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):re(k)}function re(k){return e.enter("htmlTextData"),c(k)}}const Bm={name:"labelEnd",resolveAll:Zz,resolveTo:Wz,tokenize:Jz},Kz={tokenize:e3},Xz={tokenize:t3},Qz={tokenize:n3};function Zz(e){let n=-1;const r=[];for(;++n<e.length;){const i=e[n][1];if(r.push(e[n]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const l=i.type==="labelImage"?4:2;i.type="data",n+=l}}return e.length!==r.length&&Mn(e,0,e.length,r),e}function Wz(e,n){let r=e.length,i=0,l,s,c,f;for(;r--;)if(l=e[r][1],s){if(l.type==="link"||l.type==="labelLink"&&l._inactive)break;e[r][0]==="enter"&&l.type==="labelLink"&&(l._inactive=!0)}else if(c){if(e[r][0]==="enter"&&(l.type==="labelImage"||l.type==="labelLink")&&!l._balanced&&(s=r,l.type!=="labelLink")){i=2;break}}else l.type==="labelEnd"&&(c=r);const d={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[s][1].start},end:{...e[c][1].end}},m={type:"labelText",start:{...e[s+i+2][1].end},end:{...e[c-2][1].start}};return f=[["enter",d,n],["enter",h,n]],f=Hn(f,e.slice(s+1,s+i+3)),f=Hn(f,[["enter",m,n]]),f=Hn(f,Kc(n.parser.constructs.insideSpan.null,e.slice(s+i+4,c-3),n)),f=Hn(f,[["exit",m,n],e[c-2],e[c-1],["exit",h,n]]),f=Hn(f,e.slice(c+1)),f=Hn(f,[["exit",d,n]]),Mn(e,s,e.length,f),e}function Jz(e,n,r){const i=this;let l=i.events.length,s,c;for(;l--;)if((i.events[l][1].type==="labelImage"||i.events[l][1].type==="labelLink")&&!i.events[l][1]._balanced){s=i.events[l][1];break}return f;function f(b){return s?s._inactive?y(b):(c=i.parser.defined.includes(nr(i.sliceSerialize({start:s.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),d):r(b)}function d(b){return b===40?e.attempt(Kz,m,c?m:y)(b):b===91?e.attempt(Xz,m,c?h:y)(b):c?m(b):y(b)}function h(b){return e.attempt(Qz,m,y)(b)}function m(b){return n(b)}function y(b){return s._balanced=!0,r(b)}}function e3(e,n,r){return i;function i(y){return e.enter("resource"),e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),l}function l(y){return ct(y)?Ll(e,s)(y):s(y)}function s(y){return y===41?m(y):LE(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function c(y){return ct(y)?Ll(e,d)(y):m(y)}function f(y){return r(y)}function d(y){return y===34||y===39||y===40?IE(e,h,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):m(y)}function h(y){return ct(y)?Ll(e,m)(y):m(y)}function m(y){return y===41?(e.enter("resourceMarker"),e.consume(y),e.exit("resourceMarker"),e.exit("resource"),n):r(y)}}function t3(e,n,r){const i=this;return l;function l(f){return zE.call(i,e,s,c,"reference","referenceMarker","referenceString")(f)}function s(f){return i.parser.defined.includes(nr(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?n(f):r(f)}function c(f){return r(f)}}function n3(e,n,r){return i;function i(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),l}function l(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),n):r(s)}}const r3={name:"labelStartImage",resolveAll:Bm.resolveAll,tokenize:a3};function a3(e,n,r){const i=this;return l;function l(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),s}function s(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),c):r(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in i.parser.constructs?r(f):n(f)}}const i3={name:"labelStartLink",resolveAll:Bm.resolveAll,tokenize:o3};function o3(e,n,r){const i=this;return l;function l(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),s}function s(c){return c===94&&"_hiddenFootnoteSupport"in i.parser.constructs?r(c):n(c)}}const Bh={name:"lineEnding",tokenize:l3};function l3(e,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),We(e,n,"linePrefix")}}const Ju={name:"thematicBreak",tokenize:s3};function s3(e,n,r){let i=0,l;return s;function s(h){return e.enter("thematicBreak"),c(h)}function c(h){return l=h,f(h)}function f(h){return h===l?(e.enter("thematicBreakSequence"),d(h)):i>=3&&(h===null||ke(h))?(e.exit("thematicBreak"),n(h)):r(h)}function d(h){return h===l?(e.consume(h),i++,d):(e.exit("thematicBreakSequence"),Ke(h)?We(e,f,"whitespace")(h):f(h))}}const yn={continuation:{tokenize:d3},exit:p3,name:"list",tokenize:f3},u3={partial:!0,tokenize:m3},c3={partial:!0,tokenize:h3};function f3(e,n,r){const i=this,l=i.events[i.events.length-1];let s=l&&l[1].type==="linePrefix"?l[2].sliceSerialize(l[1],!0).length:0,c=0;return f;function f(w){const S=i.containerState.type||(w===42||w===43||w===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!i.containerState.marker||w===i.containerState.marker:jp(w)){if(i.containerState.type||(i.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),w===42||w===45?e.check(Ju,r,h)(w):h(w);if(!i.interrupt||w===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(w)}return r(w)}function d(w){return jp(w)&&++c<10?(e.consume(w),d):(!i.interrupt||c<2)&&(i.containerState.marker?w===i.containerState.marker:w===41||w===46)?(e.exit("listItemValue"),h(w)):r(w)}function h(w){return e.enter("listItemMarker"),e.consume(w),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||w,e.check(us,i.interrupt?r:m,e.attempt(u3,b,y))}function m(w){return i.containerState.initialBlankLine=!0,s++,b(w)}function y(w){return Ke(w)?(e.enter("listItemPrefixWhitespace"),e.consume(w),e.exit("listItemPrefixWhitespace"),b):r(w)}function b(w){return i.containerState.size=s+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(w)}}function d3(e,n,r){const i=this;return i.containerState._closeFlow=void 0,e.check(us,l,s);function l(f){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,We(e,n,"listItemIndent",i.containerState.size+1)(f)}function s(f){return i.containerState.furtherBlankLines||!Ke(f)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,c(f)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(c3,n,c)(f))}function c(f){return i.containerState._closeFlow=!0,i.interrupt=void 0,We(e,e.attempt(yn,n,r),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function h3(e,n,r){const i=this;return We(e,l,"listItemIndent",i.containerState.size+1);function l(s){const c=i.events[i.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===i.containerState.size?n(s):r(s)}}function p3(e){e.exit(this.containerState.type)}function m3(e,n,r){const i=this;return We(e,l,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function l(s){const c=i.events[i.events.length-1];return!Ke(s)&&c&&c[1].type==="listItemPrefixWhitespace"?n(s):r(s)}}const f0={name:"setextUnderline",resolveTo:g3,tokenize:y3};function g3(e,n){let r=e.length,i,l,s;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){i=r;break}e[r][1].type==="paragraph"&&(l=r)}else e[r][1].type==="content"&&e.splice(r,1),!s&&e[r][1].type==="definition"&&(s=r);const c={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[l][1].type="setextHeadingText",s?(e.splice(l,0,["enter",c,n]),e.splice(s+1,0,["exit",e[i][1],n]),e[i][1].end={...e[s][1].end}):e[i][1]=c,e.push(["exit",c,n]),e}function y3(e,n,r){const i=this;let l;return s;function s(h){let m=i.events.length,y;for(;m--;)if(i.events[m][1].type!=="lineEnding"&&i.events[m][1].type!=="linePrefix"&&i.events[m][1].type!=="content"){y=i.events[m][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||y)?(e.enter("setextHeadingLine"),l=h,c(h)):r(h)}function c(h){return e.enter("setextHeadingLineSequence"),f(h)}function f(h){return h===l?(e.consume(h),f):(e.exit("setextHeadingLineSequence"),Ke(h)?We(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||ke(h)?(e.exit("setextHeadingLine"),n(h)):r(h)}}const v3={tokenize:x3};function x3(e){const n=this,r=e.attempt(us,i,e.attempt(this.parser.constructs.flowInitial,l,We(e,e.attempt(this.parser.constructs.flow,l,e.attempt(Cz,l)),"linePrefix")));return r;function i(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),n.currentConstruct=void 0,r}function l(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n.currentConstruct=void 0,r}}const b3={resolveAll:UE()},w3=BE("string"),S3=BE("text");function BE(e){return{resolveAll:UE(e==="text"?E3:void 0),tokenize:n};function n(r){const i=this,l=this.parser.constructs[e],s=r.attempt(l,c,f);return c;function c(m){return h(m)?s(m):f(m)}function f(m){if(m===null){r.consume(m);return}return r.enter("data"),r.consume(m),d}function d(m){return h(m)?(r.exit("data"),s(m)):(r.consume(m),d)}function h(m){if(m===null)return!0;const y=l[m];let b=-1;if(y)for(;++b<y.length;){const w=y[b];if(!w.previous||w.previous.call(i,i.previous))return!0}return!1}}}function UE(e){return n;function n(r,i){let l=-1,s;for(;++l<=r.length;)s===void 0?r[l]&&r[l][1].type==="data"&&(s=l,l++):(!r[l]||r[l][1].type!=="data")&&(l!==s+2&&(r[s][1].end=r[l-1][1].end,r.splice(s+2,l-s-2),l=s+2),s=void 0);return e?e(r,i):r}}function E3(e,n){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const i=e[r-1][1],l=n.sliceStream(i);let s=l.length,c=-1,f=0,d;for(;s--;){const h=l[s];if(typeof h=="string"){for(c=h.length;h.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(h===-2)d=!0,f++;else if(h!==-1){s++;break}}if(n._contentTypeTextTrailing&&r===e.length&&(f=0),f){const h={type:r===e.length||d||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?c:i.start._bufferIndex+c,_index:i.start._index+s,line:i.end.line,column:i.end.column-f,offset:i.end.offset-f},end:{...i.end}};i.end={...h.start},i.start.offset===i.end.offset?Object.assign(i,h):(e.splice(r,0,["enter",h,n],["exit",h,n]),r+=2)}r++}return e}const C3={42:yn,43:yn,45:yn,48:yn,49:yn,50:yn,51:yn,52:yn,53:yn,54:yn,55:yn,56:yn,57:yn,62:jE},k3={91:Nz},A3={[-2]:Ih,[-1]:Ih,32:Ih},T3={35:Pz,42:Ju,45:[f0,Ju],60:Bz,61:f0,95:Ju,96:u0,126:u0},R3={38:OE,92:DE},N3={[-5]:Bh,[-4]:Bh,[-3]:Bh,33:r3,38:OE,42:Dp,60:[iz,Gz],91:i3,92:[Dz,DE],93:Bm,95:Dp,96:vz},_3={null:[Dp,b3]},M3={null:[42,95]},j3={null:[]},D3=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:M3,contentInitial:k3,disable:j3,document:C3,flow:T3,flowInitial:A3,insideSpan:_3,string:R3,text:N3},Symbol.toStringTag,{value:"Module"}));function O3(e,n,r){let i={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const l={},s=[];let c=[],f=[];const d={attempt:B(D),check:B(j),consume:N,enter:R,exit:O,interrupt:B(j,{interrupt:!0})},h={code:null,containerState:{},defineSkip:E,events:[],now:S,parser:e,previous:null,sliceSerialize:b,sliceStream:w,write:y};let m=n.tokenize.call(h,d);return n.resolveAll&&s.push(n),h;function y(W){return c=Hn(c,W),A(),c[c.length-1]!==null?[]:(F(n,0),h.events=Kc(s,h.events,h),h.events)}function b(W,J){return L3(w(W),J)}function w(W){return P3(c,W)}function S(){const{_bufferIndex:W,_index:J,line:ae,column:K,offset:ie}=i;return{_bufferIndex:W,_index:J,line:ae,column:K,offset:ie}}function E(W){l[W.line]=W.column,L()}function A(){let W;for(;i._index<c.length;){const J=c[i._index];if(typeof J=="string")for(W=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===W&&i._bufferIndex<J.length;)T(J.charCodeAt(i._bufferIndex));else T(J)}}function T(W){m=m(W)}function N(W){ke(W)?(i.line++,i.column=1,i.offset+=W===-3?2:1,L()):W!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===c[i._index].length&&(i._bufferIndex=-1,i._index++)),h.previous=W}function R(W,J){const ae=J||{};return ae.type=W,ae.start=S(),h.events.push(["enter",ae,h]),f.push(ae),ae}function O(W){const J=f.pop();return J.end=S(),h.events.push(["exit",J,h]),J}function D(W,J){F(W,J.from)}function j(W,J){J.restore()}function B(W,J){return ae;function ae(K,ie,z){let X,H,re,k;return Array.isArray(K)?le(K):"tokenize"in K?le([K]):Q(K);function Q(me){return se;function se(ge){const Oe=ge!==null&&me[ge],De=ge!==null&&me.null,Pe=[...Array.isArray(Oe)?Oe:Oe?[Oe]:[],...Array.isArray(De)?De:De?[De]:[]];return le(Pe)(ge)}}function le(me){return X=me,H=0,me.length===0?z:M(me[H])}function M(me){return se;function se(ge){return k=Z(),re=me,me.partial||(h.currentConstruct=me),me.name&&h.parser.constructs.disable.null.includes(me.name)?Se():me.tokenize.call(J?Object.assign(Object.create(h),J):h,d,ce,Se)(ge)}}function ce(me){return W(re,k),ie}function Se(me){return k.restore(),++H<X.length?M(X[H]):z}}}function F(W,J){W.resolveAll&&!s.includes(W)&&s.push(W),W.resolve&&Mn(h.events,J,h.events.length-J,W.resolve(h.events.slice(J),h)),W.resolveTo&&(h.events=W.resolveTo(h.events,h))}function Z(){const W=S(),J=h.previous,ae=h.currentConstruct,K=h.events.length,ie=Array.from(f);return{from:K,restore:z};function z(){i=W,h.previous=J,h.currentConstruct=ae,h.events.length=K,f=ie,L()}}function L(){i.line in l&&i.column<2&&(i.column=l[i.line],i.offset+=l[i.line]-1)}}function P3(e,n){const r=n.start._index,i=n.start._bufferIndex,l=n.end._index,s=n.end._bufferIndex;let c;if(r===l)c=[e[r].slice(i,s)];else{if(c=e.slice(r,l),i>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(i):c.shift()}s>0&&c.push(e[l].slice(0,s))}return c}function L3(e,n){let r=-1;const i=[];let l;for(;++r<e.length;){const s=e[r];let c;if(typeof s=="string")c=s;else switch(s){case-5:{c="\r";break}case-4:{c=`
357
357
  `;break}case-3:{c=`\r
358
358
  `;break}case-2:{c=n?" ":" ";break}case-1:{if(!n&&l)continue;c=" ";break}default:c=String.fromCharCode(s)}l=s===-2,i.push(c)}return i.join("")}function z3(e){const i={constructs:_E([D3,...(e||{}).extensions||[]]),content:l(WL),defined:[],document:l(ez),flow:l(v3),lazy:{},string:l(w3),text:l(S3)};return i;function l(s){return c;function c(f){return O3(i,s,f)}}}function I3(e){for(;!PE(e););return e}const d0=/[\0\t\n\r]/g;function B3(){let e=1,n="",r=!0,i;return l;function l(s,c,f){const d=[];let h,m,y,b,w;for(s=n+(typeof s=="string"?s.toString():new TextDecoder(c||void 0).decode(s)),y=0,n="",r&&(s.charCodeAt(0)===65279&&y++,r=void 0);y<s.length;){if(d0.lastIndex=y,h=d0.exec(s),b=h&&h.index!==void 0?h.index:s.length,w=s.charCodeAt(b),!h){n=s.slice(y);break}if(w===10&&y===b&&i)d.push(-3),i=void 0;else switch(i&&(d.push(-5),i=void 0),y<b&&(d.push(s.slice(y,b)),e+=b-y),w){case 0:{d.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,d.push(-2);e++<m;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:i=!0,e=1}y=b+1}return f&&(i&&d.push(-5),n&&d.push(n),d.push(null)),d}}const U3=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function H3(e){return e.replace(U3,F3)}function F3(e,n,r){if(n)return n;if(r.charCodeAt(0)===35){const l=r.charCodeAt(1),s=l===120||l===88;return ME(r.slice(s?2:1),s?16:10)}return Im(r)||e}const HE={}.hasOwnProperty;function q3(e,n,r){return typeof n!="string"&&(r=n,n=void 0),V3(r)(I3(z3(r).document().write(B3()(e,n,!0))))}function V3(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Ma),autolinkProtocol:Z,autolinkEmail:Z,atxHeading:s(Vt),blockQuote:s(De),characterEscape:Z,characterReference:Z,codeFenced:s(Pe),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:s(Pe,c),codeText:s(Ue,c),codeTextData:Z,data:Z,codeFlowValue:Z,definition:s(ft),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:s(Zt),hardBreakEscape:s(lr),hardBreakTrailing:s(lr),htmlFlow:s(xt,c),htmlFlowData:Z,htmlText:s(xt,c),htmlTextData:Z,image:s(Ao),label:c,link:s(Ma),listItem:s(Sr),listItemValue:b,listOrdered:s(Kr,y),listUnordered:s(Kr),paragraph:s(si),reference:M,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:s(Vt),strong:s(Er),thematicBreak:s(Ro)},exit:{atxHeading:d(),atxHeadingSequence:D,autolink:d(),autolinkEmail:Oe,autolinkProtocol:ge,blockQuote:d(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:Se,characterReferenceMarkerNumeric:Se,characterReferenceValue:me,characterReference:se,codeFenced:d(A),codeFencedFence:E,codeFencedFenceInfo:w,codeFencedFenceMeta:S,codeFlowValue:L,codeIndented:d(T),codeText:d(ie),codeTextData:L,data:L,definition:d(),definitionDestinationString:O,definitionLabelString:N,definitionTitleString:R,emphasis:d(),hardBreakEscape:d(J),hardBreakTrailing:d(J),htmlFlow:d(ae),htmlFlowData:L,htmlText:d(K),htmlTextData:L,image:d(X),label:re,labelText:H,lineEnding:W,link:d(z),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:ce,resourceDestinationString:k,resourceTitleString:Q,resource:le,setextHeading:d(F),setextHeadingLineSequence:B,setextHeadingText:j,strong:d(),thematicBreak:d()}};FE(n,(e||{}).mdastExtensions||[]);const r={};return i;function i(ee){let fe={type:"root",children:[]};const Ce={stack:[fe],tokenStack:[],config:n,enter:f,exit:h,buffer:c,resume:m,data:r},Ae=[];let tt=-1;for(;++tt<ee.length;)if(ee[tt][1].type==="listOrdered"||ee[tt][1].type==="listUnordered")if(ee[tt][0]==="enter")Ae.push(tt);else{const rn=Ae.pop();tt=l(ee,rn,tt)}for(tt=-1;++tt<ee.length;){const rn=n[ee[tt][0]];HE.call(rn,ee[tt][1].type)&&rn[ee[tt][1].type].call(Object.assign({sliceSerialize:ee[tt][2].sliceSerialize},Ce),ee[tt][1])}if(Ce.tokenStack.length>0){const rn=Ce.tokenStack[Ce.tokenStack.length-1];(rn[1]||h0).call(Ce,void 0,rn[0])}for(fe.position={start:ba(ee.length>0?ee[0][1].start:{line:1,column:1,offset:0}),end:ba(ee.length>0?ee[ee.length-2][1].end:{line:1,column:1,offset:0})},tt=-1;++tt<n.transforms.length;)fe=n.transforms[tt](fe)||fe;return fe}function l(ee,fe,Ce){let Ae=fe-1,tt=-1,rn=!1,Kn,Wt,xn,$t;for(;++Ae<=Ce;){const Tt=ee[Ae];switch(Tt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Tt[0]==="enter"?tt++:tt--,$t=void 0;break}case"lineEndingBlank":{Tt[0]==="enter"&&(Kn&&!$t&&!tt&&!xn&&(xn=Ae),$t=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:$t=void 0}if(!tt&&Tt[0]==="enter"&&Tt[1].type==="listItemPrefix"||tt===-1&&Tt[0]==="exit"&&(Tt[1].type==="listUnordered"||Tt[1].type==="listOrdered")){if(Kn){let Ot=Ae;for(Wt=void 0;Ot--;){const an=ee[Ot];if(an[1].type==="lineEnding"||an[1].type==="lineEndingBlank"){if(an[0]==="exit")continue;Wt&&(ee[Wt][1].type="lineEndingBlank",rn=!0),an[1].type="lineEnding",Wt=Ot}else if(!(an[1].type==="linePrefix"||an[1].type==="blockQuotePrefix"||an[1].type==="blockQuotePrefixWhitespace"||an[1].type==="blockQuoteMarker"||an[1].type==="listItemIndent"))break}xn&&(!Wt||xn<Wt)&&(Kn._spread=!0),Kn.end=Object.assign({},Wt?ee[Wt][1].start:Tt[1].end),ee.splice(Wt||Ae,0,["exit",Kn,Tt[2]]),Ae++,Ce++}if(Tt[1].type==="listItemPrefix"){const Ot={type:"listItem",_spread:!1,start:Object.assign({},Tt[1].start),end:void 0};Kn=Ot,ee.splice(Ae,0,["enter",Ot,Tt[2]]),Ae++,Ce++,xn=void 0,$t=!0}}}return ee[fe][1]._spread=rn,Ce}function s(ee,fe){return Ce;function Ce(Ae){f.call(this,ee(Ae),Ae),fe&&fe.call(this,Ae)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(ee,fe,Ce){this.stack[this.stack.length-1].children.push(ee),this.stack.push(ee),this.tokenStack.push([fe,Ce||void 0]),ee.position={start:ba(fe.start),end:void 0}}function d(ee){return fe;function fe(Ce){ee&&ee.call(this,Ce),h.call(this,Ce)}}function h(ee,fe){const Ce=this.stack.pop(),Ae=this.tokenStack.pop();if(Ae)Ae[0].type!==ee.type&&(fe?fe.call(this,ee,Ae[0]):(Ae[1]||h0).call(this,ee,Ae[0]));else throw new Error("Cannot close `"+ee.type+"` ("+Pl({start:ee.start,end:ee.end})+"): it’s not open");Ce.position.end=ba(ee.end)}function m(){return zm(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function b(ee){if(this.data.expectingFirstListItemValue){const fe=this.stack[this.stack.length-2];fe.start=Number.parseInt(this.sliceSerialize(ee),10),this.data.expectingFirstListItemValue=void 0}}function w(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.lang=ee}function S(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.meta=ee}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function A(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ee.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function T(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ee.replace(/(\r?\n|\r)$/g,"")}function N(ee){const fe=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=fe,Ce.identifier=nr(this.sliceSerialize(ee)).toLowerCase()}function R(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.title=ee}function O(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.url=ee}function D(ee){const fe=this.stack[this.stack.length-1];if(!fe.depth){const Ce=this.sliceSerialize(ee).length;fe.depth=Ce}}function j(){this.data.setextHeadingSlurpLineEnding=!0}function B(ee){const fe=this.stack[this.stack.length-1];fe.depth=this.sliceSerialize(ee).codePointAt(0)===61?1:2}function F(){this.data.setextHeadingSlurpLineEnding=void 0}function Z(ee){const Ce=this.stack[this.stack.length-1].children;let Ae=Ce[Ce.length-1];(!Ae||Ae.type!=="text")&&(Ae=To(),Ae.position={start:ba(ee.start),end:void 0},Ce.push(Ae)),this.stack.push(Ae)}function L(ee){const fe=this.stack.pop();fe.value+=this.sliceSerialize(ee),fe.position.end=ba(ee.end)}function W(ee){const fe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ce=fe.children[fe.children.length-1];Ce.position.end=ba(ee.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(fe.type)&&(Z.call(this,ee),L.call(this,ee))}function J(){this.data.atHardBreak=!0}function ae(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ee}function K(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ee}function ie(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ee}function z(){const ee=this.stack[this.stack.length-1];if(this.data.inReference){const fe=this.data.referenceType||"shortcut";ee.type+="Reference",ee.referenceType=fe,delete ee.url,delete ee.title}else delete ee.identifier,delete ee.label;this.data.referenceType=void 0}function X(){const ee=this.stack[this.stack.length-1];if(this.data.inReference){const fe=this.data.referenceType||"shortcut";ee.type+="Reference",ee.referenceType=fe,delete ee.url,delete ee.title}else delete ee.identifier,delete ee.label;this.data.referenceType=void 0}function H(ee){const fe=this.sliceSerialize(ee),Ce=this.stack[this.stack.length-2];Ce.label=H3(fe),Ce.identifier=nr(fe).toLowerCase()}function re(){const ee=this.stack[this.stack.length-1],fe=this.resume(),Ce=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ce.type==="link"){const Ae=ee.children;Ce.children=Ae}else Ce.alt=fe}function k(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.url=ee}function Q(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.title=ee}function le(){this.data.inReference=void 0}function M(){this.data.referenceType="collapsed"}function ce(ee){const fe=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=fe,Ce.identifier=nr(this.sliceSerialize(ee)).toLowerCase(),this.data.referenceType="full"}function Se(ee){this.data.characterReferenceType=ee.type}function me(ee){const fe=this.sliceSerialize(ee),Ce=this.data.characterReferenceType;let Ae;Ce?(Ae=ME(fe,Ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ae=Im(fe);const tt=this.stack[this.stack.length-1];tt.value+=Ae}function se(ee){const fe=this.stack.pop();fe.position.end=ba(ee.end)}function ge(ee){L.call(this,ee);const fe=this.stack[this.stack.length-1];fe.url=this.sliceSerialize(ee)}function Oe(ee){L.call(this,ee);const fe=this.stack[this.stack.length-1];fe.url="mailto:"+this.sliceSerialize(ee)}function De(){return{type:"blockquote",children:[]}}function Pe(){return{type:"code",lang:null,meta:null,value:""}}function Ue(){return{type:"inlineCode",value:""}}function ft(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Zt(){return{type:"emphasis",children:[]}}function Vt(){return{type:"heading",depth:0,children:[]}}function lr(){return{type:"break"}}function xt(){return{type:"html",value:""}}function Ao(){return{type:"image",title:null,url:"",alt:null}}function Ma(){return{type:"link",title:null,url:"",children:[]}}function Kr(ee){return{type:"list",ordered:ee.type==="listOrdered",start:null,spread:ee._spread,children:[]}}function Sr(ee){return{type:"listItem",spread:ee._spread,checked:null,children:[]}}function si(){return{type:"paragraph",children:[]}}function Er(){return{type:"strong",children:[]}}function To(){return{type:"text",value:""}}function Ro(){return{type:"thematicBreak"}}}function ba(e){return{line:e.line,column:e.column,offset:e.offset}}function FE(e,n){let r=-1;for(;++r<n.length;){const i=n[r];Array.isArray(i)?FE(e,i):$3(e,i)}}function $3(e,n){let r;for(r in n)if(HE.call(n,r))switch(r){case"canContainEols":{const i=n[r];i&&e[r].push(...i);break}case"transforms":{const i=n[r];i&&e[r].push(...i);break}case"enter":case"exit":{const i=n[r];i&&Object.assign(e[r],i);break}}}function h0(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+Pl({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+Pl({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+Pl({start:n.start,end:n.end})+") is still open")}function G3(e){const n=this;n.parser=r;function r(i){return q3(i,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function Y3(e,n){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,r),e.applyData(n,r)}function K3(e,n){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,r),[e.applyData(n,r),{type:"text",value:`
@@ -455,4 +455,4 @@ ${L.content||""}`;i(W)}else i(null)}catch(F){console.error("Error fetching propo
455
455
  ${l}`,r&&`=== PROPOSAL CONTENT ===
456
456
  ${r}`].filter(Boolean),L=Z.length>0?Z.join(`
457
457
 
458
- `):null;return{type:S.includes("/edit")?"proposals-edit":"proposals-view",content:L,displayId:j,contextFiles:F}}return{type:"proposals",content:l,contextFiles:"project.md"}}return S.includes("/context")?S.includes("/architecture")?{type:"context-architecture",content:c,contextFiles:"architecture.md"}:S.includes("/project")?{type:"context-project",content:l,contextFiles:"project.md"}:S.includes("/knowledge")?{type:"context-knowledge",content:null}:{type:"context",content:null}:S.includes("/settings")?S.includes("/agents")?{type:"settings-agents",content:null}:S.includes("/integrations")?{type:"settings-integrations",content:null}:S.includes("/prompts")?{type:"settings-prompts",content:null}:S.includes("/rules")?{type:"settings-rules",content:null}:S.includes("/user")?{type:"settings-user",content:null}:{type:"settings",content:null}:S.includes("/terminal")?{type:"terminal",content:null}:{type:"dashboard",content:null}};return g.jsx(SS,{children:g.jsxs("div",{className:"flex min-h-screen w-full overflow-hidden",children:[g.jsx(EP,{}),g.jsxs(kS,{className:ue("flex-1 min-w-0 transition-all duration-300 ease-in-out",e&&"mr-96"),children:[g.jsxs("header",{className:"flex h-16 shrink-0 items-center gap-2 border-b border-content-border px-4 bg-background",children:[g.jsx(CS,{className:"-ml-1"}),g.jsxs("div",{className:"flex items-center justify-between flex-1",children:[g.jsx("h1",{className:"text-lg font-semibold",children:d||"Coconut"}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(kt,{onClick:N,size:"icon",className:"h-8 w-8 rounded-full",children:g.jsx(up,{className:"h-4 w-4"})}),T&&E&&g.jsxs(K8,{children:[g.jsx(X8,{asChild:!0,children:g.jsx(kt,{size:"icon",variant:"outline",className:"h-8 w-8 rounded-full",children:g.jsx(mj,{className:"h-4 w-4"})})}),g.jsxs(x2,{align:"end",children:[g.jsx(w2,{children:g.jsxs("div",{className:"flex flex-col space-y-1",children:[g.jsx("p",{className:"text-sm font-medium leading-none",children:E.name}),g.jsx("p",{className:"text-xs leading-none text-muted-foreground",children:E.email})]})}),g.jsx(S2,{}),g.jsxs(b2,{onClick:R,children:[g.jsx(jM,{className:"mr-2 h-4 w-4"}),"Logout"]})]})]})]})]})]}),g.jsx("main",{className:"flex flex-1 flex-col gap-4 p-4 overflow-auto bg-content-background",children:g.jsx(tw,{})})]}),g.jsx(AB,{isOpen:e,onToggle:N,contextInfo:O(),discussDocument:m,onDiscussDocumentHandled:()=>y(null)})]})})}const tU=[{title:"Coconut Profile",href:"/settings/user",icon:hj,description:"Manage the Coconut's profile information."},{title:"User Preferences",href:"/settings/preferences",icon:nj,description:"Configure individual workspace preferences"},{title:"Authentication",href:"/settings/authentication",icon:ej,description:"Configure authentication and user access"},{title:"API Keys",href:"/settings/api-keys",icon:NM,description:"Manage API keys for programmatic access"},{title:"Symlinks",href:"/settings/rules",icon:rc,description:"Manage symlinks for easy access to project rules and configurations"},{title:"AI & LLM",href:"/settings/integrations",icon:VM,description:"Connect Coconut to LLM providers and automation hooks"},{title:"Git",href:"/settings/git",icon:Yw,description:"Configure repository defaults like worktree paths"},{title:"MCP",href:"/settings/mcp",icon:IM,description:"Model Context Protocol configuration and settings"}];function nU(){const e=$n();return g.jsxs("div",{className:"flex flex-col space-y-8 lg:flex-row lg:space-x-12 lg:space-y-0",children:[g.jsx("aside",{className:"lg:w-1/5",children:g.jsx("nav",{className:"flex overflow-x-auto pb-2 gap-1 lg:flex-col lg:gap-0 lg:space-y-1 lg:overflow-visible lg:pb-0",children:tU.map(n=>g.jsxs(Hr,{to:n.href,className:ue("inline-flex items-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 hover:text-accent-foreground h-9 px-2 sm:px-3 lg:px-4 py-2 hover:bg-accent justify-start flex-shrink-0",e.pathname===n.href?"bg-accent text-accent-foreground":"text-muted-foreground"),children:[g.jsx(n.icon,{className:"h-4 w-4 lg:mr-2"}),g.jsx("span",{className:"hidden lg:inline",children:n.title})]},n.href))})}),g.jsx("div",{className:"flex-1 lg:max-w-2xl",children:g.jsx("div",{className:"space-y-6",children:g.jsx(tw,{})})})]})}const rU=x.lazy(()=>Xe(()=>import("./DashboardPage-BXu-fikP.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]))),aU=x.lazy(()=>Xe(()=>import("./LoginPage-IIU6NAG9.js"),__vite__mapDeps([10,11,1,12]))),iU=x.lazy(()=>Xe(()=>import("./CallbackPage-CaAOpz4z.js"),__vite__mapDeps([13,5,14]))),oU=x.lazy(()=>Xe(()=>import("./ProposalsPage-DwQr1ycd.js"),__vite__mapDeps([15,1,2,9,16]))),lU=x.lazy(()=>Xe(()=>import("./ProposalDetailPage-KvjXUaaf.js"),__vite__mapDeps([17,18,1,2,11,19,20,21,4,7]))),sU=x.lazy(()=>Xe(()=>import("./ProposalEditPage-BmzkHL9a.js"),__vite__mapDeps([22,11,1,23,24,25,26,9,27,2,19])).then(e=>({default:e.ProposalEditPage}))),uU=x.lazy(()=>Xe(()=>import("./NewProposalPage-bFnfuuoA.js"),__vite__mapDeps([28,1,11,23,24,25,26,9,27,2,19])).then(e=>({default:e.NewProposalPage}))),cU=x.lazy(()=>Xe(()=>import("./TerminalPage-DsjOLnyY.js"),__vite__mapDeps([29,1,30,31,32,33,34,35,36]))),fU=x.lazy(()=>Xe(()=>import("./TerminalSessionPage-DQ065WYU.js"),__vite__mapDeps([37,1,2,38,25,11,30,32,33,39,40,34,35,9,41]))),dU=x.lazy(()=>Xe(()=>import("./UtilitiesPage-BmEW7eJ_.js"),__vite__mapDeps([42,1,30,36,35]))),hU=x.lazy(()=>Xe(()=>import("./CodePage-DEbgr8C1.js"),__vite__mapDeps([43,1,2,30,31,32,33,40,34,35]))),pU=x.lazy(()=>Xe(()=>import("./AgentsPage-D-Uy87Gh.js"),__vite__mapDeps([44,1,2,18,45,16,9,46]))),mU=x.lazy(()=>Xe(()=>import("./AgentDetailPage-DwWIjGx1.js"),__vite__mapDeps([47,1,2,19]))),gU=x.lazy(()=>Xe(()=>import("./NewAgentPage-DolltGy5.js"),__vite__mapDeps([48,1,11,2,18,19,20]))),yU=x.lazy(()=>Xe(()=>import("./AgentEditPage-BvVPfYR3.js"),__vite__mapDeps([49,1,11,2,18,19,20]))),vU=x.lazy(()=>Xe(()=>import("./ResourcesPage-B8Hm_j47.js"),__vite__mapDeps([50,1,11,2,18,21,6,4,9,16]))),xU=x.lazy(()=>Xe(()=>import("./KnowledgePage-CuuDTMa_.js"),__vite__mapDeps([51,1,2,18,45,16,9,52,39]))),bU=x.lazy(()=>Xe(()=>import("./KnowledgeDetailPage-DBOQQs3R.js"),__vite__mapDeps([53,1,2,18,19,4,46]))),wU=x.lazy(()=>Xe(()=>import("./KnowledgeEditPage-DHJxLPwi.js"),__vite__mapDeps([54,1,11,23,24,27,2,19]))),SU=x.lazy(()=>Xe(()=>import("./NewKnowledgePage-_jbUZqBU.js"),__vite__mapDeps([55,1,11,23,24,27,2,19]))),EU=x.lazy(()=>Xe(()=>import("./ProjectPage-DhwrnEq2.js"),__vite__mapDeps([56,1,2,18]))),CU=x.lazy(()=>Xe(()=>import("./ProjectEditPage-DTTjPnGj.js"),__vite__mapDeps([57,1,11,23,24,19,8]))),kU=x.lazy(()=>Xe(()=>import("./ArchitecturePage-ZjbdnDA7.js"),__vite__mapDeps([58,1,18]))),AU=x.lazy(()=>Xe(()=>import("./ArchitectureEditPage-BmAgJAMV.js"),__vite__mapDeps([59,1,11,23,24,19,8]))),TU=x.lazy(()=>Xe(()=>import("./IdentityPage-BR48gNhN.js"),__vite__mapDeps([60,1,11,2,61,12,41,62,9,20]))),q0=x.lazy(()=>Xe(()=>import("./UserSettingsPage-BZwb93B4.js"),__vite__mapDeps([63,1,11,20]))),RU=x.lazy(()=>Xe(()=>import("./AuthSettingsPage-_pXoewOB.js"),__vite__mapDeps([64,1,11,65,2,66]))),NU=x.lazy(()=>Xe(()=>import("./ApiKeysSettingsPage-Jug0kB7Z.js"),__vite__mapDeps([67,1,11,2,61,9,66]))),_U=x.lazy(()=>Xe(()=>import("./AgentsSettingsPage-CDuAvFxu.js"),__vite__mapDeps([68,1,11,2,9,69,35,41]))),MU=x.lazy(()=>Xe(()=>import("./IntegrationsSettingsPage-B1OHGlDC.js"),__vite__mapDeps([70,1,11]))),jU=x.lazy(()=>Xe(()=>import("./GitSettingsPage-D7GjdOnE.js"),__vite__mapDeps([71,1,11,38,34,5,14]))),DU=x.lazy(()=>Xe(()=>import("./McpSettingsPage-iz5gLGWt.js"),__vite__mapDeps([72,1,11,2,65,61,45,16,66,9,8]))),OU=x.lazy(()=>Xe(()=>import("./PromptsSettingsPage-DLOVysbE.js"),__vite__mapDeps([73,1,11,2,9,62,21]))),PU=x.lazy(()=>Xe(()=>import("./RulesSettingsPage-CsGXFTFY.js"),__vite__mapDeps([74,1,11,2,9]))),LU=x.lazy(()=>Xe(()=>import("./GitPage-B7qFcP-K.js"),__vite__mapDeps([75,1,11,12,5,14,39,52,34,66,3]))),zU=x.lazy(()=>Xe(()=>import("./SchedulePage-CY8GdQlp.js"),__vite__mapDeps([76,1,2,11,65,12,34,9,35,69,7]))),IU=x.lazy(()=>Xe(()=>import("./UserPreferencesPage-55VTrzfQ.js"),__vite__mapDeps([77,1,11])));function BU(){return g.jsxs($N,{children:[g.jsx(aN,{children:g.jsx(x.Suspense,{fallback:g.jsx(aD,{}),children:g.jsxs(OR,{children:[g.jsx(ze,{path:"/login",element:g.jsx(aU,{})}),g.jsx(ze,{path:"/auth/github/callback",element:g.jsx(iU,{})}),g.jsxs(ze,{path:"/",element:g.jsx(rD,{children:g.jsx(eU,{})}),children:[g.jsx(ze,{index:!0,element:g.jsx(rU,{})}),g.jsx(ze,{path:"proposals",element:g.jsx(oU,{})}),g.jsx(ze,{path:"proposals/new",element:g.jsx(uU,{})}),g.jsx(ze,{path:"proposals/:id",element:g.jsx(lU,{})}),g.jsx(ze,{path:"proposals/:id/edit",element:g.jsx(sU,{})}),g.jsx(ze,{path:"code",element:g.jsx(hU,{})}),g.jsx(ze,{path:"utilities",element:g.jsx(dU,{})}),g.jsx(ze,{path:"terminal",element:g.jsx(cU,{})}),g.jsx(ze,{path:"terminal/:proposalId",element:g.jsx(fU,{})}),g.jsx(ze,{path:"git",element:g.jsx(LU,{})}),g.jsx(ze,{path:"schedule",element:g.jsx(zU,{})}),g.jsx(ze,{path:"identity",element:g.jsx(TU,{})}),g.jsx(ze,{path:"agents",element:g.jsx(pU,{})}),g.jsx(ze,{path:"agents/new",element:g.jsx(gU,{})}),g.jsx(ze,{path:"agents/:id",element:g.jsx(mU,{})}),g.jsx(ze,{path:"agents/:id/edit",element:g.jsx(yU,{})}),g.jsx(ze,{path:"resources",element:g.jsx(vU,{})}),g.jsx(ze,{path:"context/project",element:g.jsx(EU,{})}),g.jsx(ze,{path:"context/project/edit",element:g.jsx(CU,{})}),g.jsx(ze,{path:"context/architecture",element:g.jsx(kU,{})}),g.jsx(ze,{path:"context/architecture/edit",element:g.jsx(AU,{})}),g.jsx(ze,{path:"context/knowledge",element:g.jsx(xU,{})}),g.jsx(ze,{path:"context/knowledge/new",element:g.jsx(SU,{})}),g.jsx(ze,{path:"context/knowledge/:filename",element:g.jsx(bU,{})}),g.jsx(ze,{path:"context/knowledge/:filename/edit",element:g.jsx(wU,{})}),g.jsxs(ze,{path:"settings",element:g.jsx(nU,{}),children:[g.jsx(ze,{index:!0,element:g.jsx(q0,{})}),g.jsx(ze,{path:"user",element:g.jsx(q0,{})}),g.jsx(ze,{path:"preferences",element:g.jsx(IU,{})}),g.jsx(ze,{path:"authentication",element:g.jsx(RU,{})}),g.jsx(ze,{path:"api-keys",element:g.jsx(NU,{})}),g.jsx(ze,{path:"agents",element:g.jsx(_U,{})}),g.jsx(ze,{path:"integrations",element:g.jsx(MU,{})}),g.jsx(ze,{path:"git",element:g.jsx(jU,{})}),g.jsx(ze,{path:"mcp",element:g.jsx(DU,{})}),g.jsx(ze,{path:"prompts",element:g.jsx(OU,{})}),g.jsx(ze,{path:"rules",element:g.jsx(PU,{})})]})]})]})})}),g.jsx(nD,{})]})}BT.createRoot(document.getElementById("root")).render(g.jsx(x.StrictMode,{children:g.jsx(BU,{})}));export{pE as $,At as A,kt as B,J_ as C,Gc as D,UU as E,hM as F,Yw as G,QN as H,c1 as I,ij as J,QU as K,Hr as L,Y9 as M,K9 as N,qC as O,VC as P,GC as Q,YC as R,Yl as S,fj as T,$C as U,XC as V,KC as W,no as X,ds as Y,mj as Z,XU as _,is as a,Fc as a$,xk as a0,h1 as a1,GM as a2,uj as a3,tD as a4,K8 as a5,X8 as a6,x2 as a7,w2 as a8,S2 as a9,pL as aA,ZU as aB,nL as aC,vL as aD,lL as aE,yL as aF,Rp as aG,Dm as aH,SE as aI,$l as aJ,a6 as aK,G3 as aL,U5 as aM,QE as aN,WU as aO,NL as aP,zh as aQ,wa as aR,nn as aS,N0 as aT,FU as aU,IM as aV,ej as aW,$i as aX,NM as aY,mB as aZ,wk as a_,b2 as aa,VU as ab,ec as ac,WM as ad,W8 as ae,yj as af,qN as ag,Nc as ah,lM as ai,up as aj,vb as ak,f6 as al,O9 as am,C9 as an,xM as ao,LM as ap,fM as aq,Qc as ar,vc as as,eH as at,JU as au,Im as av,Vm as aw,jm as ax,Op as ay,j5 as az,os as b,ka as b0,Gn as b1,zB as b2,Ne as b3,Be as b4,IB as b5,pe as b6,fn as b7,NS as b8,nS as b9,rM as ba,Rc as bb,gr as bc,qU as bd,X_ as be,EM as bf,je as c,ls as d,Ml as e,ue as f,rc as g,QM as h,Ol as i,g as j,iM as k,$n as l,gw as m,ac as n,HU as o,Oh as p,tM as q,x as r,Gw as s,ap as t,bc as u,$b as v,Ap as w,Gb as x,Tp as y,Wa as z};
458
+ `):null;return{type:S.includes("/edit")?"proposals-edit":"proposals-view",content:L,displayId:j,contextFiles:F}}return{type:"proposals",content:l,contextFiles:"project.md"}}return S.includes("/context")?S.includes("/architecture")?{type:"context-architecture",content:c,contextFiles:"architecture.md"}:S.includes("/project")?{type:"context-project",content:l,contextFiles:"project.md"}:S.includes("/knowledge")?{type:"context-knowledge",content:null}:{type:"context",content:null}:S.includes("/settings")?S.includes("/agents")?{type:"settings-agents",content:null}:S.includes("/integrations")?{type:"settings-integrations",content:null}:S.includes("/prompts")?{type:"settings-prompts",content:null}:S.includes("/rules")?{type:"settings-rules",content:null}:S.includes("/user")?{type:"settings-user",content:null}:{type:"settings",content:null}:S.includes("/terminal")?{type:"terminal",content:null}:{type:"dashboard",content:null}};return g.jsx(SS,{children:g.jsxs("div",{className:"flex min-h-screen w-full overflow-hidden",children:[g.jsx(EP,{}),g.jsxs(kS,{className:ue("flex-1 min-w-0 transition-all duration-300 ease-in-out",e&&"mr-96"),children:[g.jsxs("header",{className:"flex h-16 shrink-0 items-center gap-2 border-b border-content-border px-4 bg-background",children:[g.jsx(CS,{className:"-ml-1"}),g.jsxs("div",{className:"flex items-center justify-between flex-1",children:[g.jsx("h1",{className:"text-lg font-semibold",children:d||"Coconut"}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(kt,{onClick:N,size:"icon",className:"h-8 w-8 rounded-full",children:g.jsx(up,{className:"h-4 w-4"})}),T&&E&&g.jsxs(K8,{children:[g.jsx(X8,{asChild:!0,children:g.jsx(kt,{size:"icon",variant:"outline",className:"h-8 w-8 rounded-full",children:g.jsx(mj,{className:"h-4 w-4"})})}),g.jsxs(x2,{align:"end",children:[g.jsx(w2,{children:g.jsxs("div",{className:"flex flex-col space-y-1",children:[g.jsx("p",{className:"text-sm font-medium leading-none",children:E.name}),g.jsx("p",{className:"text-xs leading-none text-muted-foreground",children:E.email})]})}),g.jsx(S2,{}),g.jsxs(b2,{onClick:R,children:[g.jsx(jM,{className:"mr-2 h-4 w-4"}),"Logout"]})]})]})]})]})]}),g.jsx("main",{className:"flex flex-1 flex-col gap-4 p-4 overflow-auto bg-content-background",children:g.jsx(tw,{})})]}),g.jsx(AB,{isOpen:e,onToggle:N,contextInfo:O(),discussDocument:m,onDiscussDocumentHandled:()=>y(null)})]})})}const tU=[{title:"Coconut Profile",href:"/settings/user",icon:hj,description:"Manage the Coconut's profile information."},{title:"User Preferences",href:"/settings/preferences",icon:nj,description:"Configure individual workspace preferences"},{title:"Authentication",href:"/settings/authentication",icon:ej,description:"Configure authentication and user access"},{title:"API Keys",href:"/settings/api-keys",icon:NM,description:"Manage API keys for programmatic access"},{title:"Symlinks",href:"/settings/rules",icon:rc,description:"Manage symlinks for easy access to project rules and configurations"},{title:"AI & LLM",href:"/settings/integrations",icon:VM,description:"Connect Coconut to LLM providers and automation hooks"},{title:"Git",href:"/settings/git",icon:Yw,description:"Configure repository defaults like worktree paths"},{title:"MCP",href:"/settings/mcp",icon:IM,description:"Model Context Protocol configuration and settings"}];function nU(){const e=$n();return g.jsxs("div",{className:"flex flex-col space-y-8 lg:flex-row lg:space-x-12 lg:space-y-0",children:[g.jsx("aside",{className:"lg:w-1/5",children:g.jsx("nav",{className:"flex overflow-x-auto pb-2 gap-1 lg:flex-col lg:gap-0 lg:space-y-1 lg:overflow-visible lg:pb-0",children:tU.map(n=>g.jsxs(Hr,{to:n.href,className:ue("inline-flex items-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 hover:text-accent-foreground h-9 px-2 sm:px-3 lg:px-4 py-2 hover:bg-accent justify-start flex-shrink-0",e.pathname===n.href?"bg-accent text-accent-foreground":"text-muted-foreground"),children:[g.jsx(n.icon,{className:"h-4 w-4 lg:mr-2"}),g.jsx("span",{className:"hidden lg:inline",children:n.title})]},n.href))})}),g.jsx("div",{className:"flex-1 lg:max-w-2xl",children:g.jsx("div",{className:"space-y-6",children:g.jsx(tw,{})})})]})}const rU=x.lazy(()=>Xe(()=>import("./DashboardPage-Df-d3-fG.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]))),aU=x.lazy(()=>Xe(()=>import("./LoginPage-BnlCd8Cm.js"),__vite__mapDeps([10,11,1,12]))),iU=x.lazy(()=>Xe(()=>import("./CallbackPage-AxQqTxCV.js"),__vite__mapDeps([13,5,14]))),oU=x.lazy(()=>Xe(()=>import("./ProposalsPage-V8ut_TsU.js"),__vite__mapDeps([15,1,2,9,16]))),lU=x.lazy(()=>Xe(()=>import("./ProposalDetailPage-DC7NMuFi.js"),__vite__mapDeps([17,18,1,2,11,19,20,21,4,7]))),sU=x.lazy(()=>Xe(()=>import("./ProposalEditPage-CfUidv6D.js"),__vite__mapDeps([22,11,1,23,24,25,26,9,27,2,19])).then(e=>({default:e.ProposalEditPage}))),uU=x.lazy(()=>Xe(()=>import("./NewProposalPage-B1tUJIZz.js"),__vite__mapDeps([28,1,11,23,24,25,26,9,27,2,19])).then(e=>({default:e.NewProposalPage}))),cU=x.lazy(()=>Xe(()=>import("./TerminalPage-Iow1ciWG.js"),__vite__mapDeps([29,1,30,31,32,33,34,35,36]))),fU=x.lazy(()=>Xe(()=>import("./TerminalSessionPage-CZdzhFhY.js"),__vite__mapDeps([37,1,2,38,25,11,30,32,33,39,40,34,35,9,41]))),dU=x.lazy(()=>Xe(()=>import("./UtilitiesPage-OgkcmaOS.js"),__vite__mapDeps([42,1,30,36,35]))),hU=x.lazy(()=>Xe(()=>import("./CodePage-CfKZ52Zo.js"),__vite__mapDeps([43,1,2,30,31,32,33,40,34,35]))),pU=x.lazy(()=>Xe(()=>import("./AgentsPage-DW6eV7oU.js"),__vite__mapDeps([44,1,2,18,45,46,16,9,47]))),mU=x.lazy(()=>Xe(()=>import("./AgentDetailPage-BkWRFbPj.js"),__vite__mapDeps([48,1,2,19]))),gU=x.lazy(()=>Xe(()=>import("./NewAgentPage-Dtvey1oU.js"),__vite__mapDeps([49,1,11,2,18,19,20]))),yU=x.lazy(()=>Xe(()=>import("./AgentEditPage-DN0TouUG.js"),__vite__mapDeps([50,1,11,2,18,19,20]))),vU=x.lazy(()=>Xe(()=>import("./ResourcesPage-Cofgbx3H.js"),__vite__mapDeps([51,1,11,2,18,46,21,6,4,9,16]))),xU=x.lazy(()=>Xe(()=>import("./KnowledgePage-Dtq9BKZi.js"),__vite__mapDeps([52,1,2,18,45,46,16,9,53,39]))),bU=x.lazy(()=>Xe(()=>import("./KnowledgeDetailPage-BMnj1qiH.js"),__vite__mapDeps([54,1,2,18,19,4,47]))),wU=x.lazy(()=>Xe(()=>import("./KnowledgeEditPage-BZa4E2M9.js"),__vite__mapDeps([55,1,11,23,24,27,2,19]))),SU=x.lazy(()=>Xe(()=>import("./NewKnowledgePage-CbiRD2V3.js"),__vite__mapDeps([56,1,11,23,24,27,2,19]))),EU=x.lazy(()=>Xe(()=>import("./ProjectPage-BHa8M3vI.js"),__vite__mapDeps([57,1,2,18]))),CU=x.lazy(()=>Xe(()=>import("./ProjectEditPage-CwM8LXHy.js"),__vite__mapDeps([58,1,11,23,24,19,8]))),kU=x.lazy(()=>Xe(()=>import("./ArchitecturePage-BdQG779E.js"),__vite__mapDeps([59,1,18]))),AU=x.lazy(()=>Xe(()=>import("./ArchitectureEditPage-DWrvSS5U.js"),__vite__mapDeps([60,1,11,23,24,19,8]))),TU=x.lazy(()=>Xe(()=>import("./IdentityPage-DbsNwWtP.js"),__vite__mapDeps([61,1,11,2,62,12,41,63,9,20]))),q0=x.lazy(()=>Xe(()=>import("./UserSettingsPage-0j7ha-RI.js"),__vite__mapDeps([64,1,11,20]))),RU=x.lazy(()=>Xe(()=>import("./AuthSettingsPage-BXMn4xXd.js"),__vite__mapDeps([65,1,11,66,2,67]))),NU=x.lazy(()=>Xe(()=>import("./ApiKeysSettingsPage-ChFu9Eo6.js"),__vite__mapDeps([68,1,11,2,62,9,67]))),_U=x.lazy(()=>Xe(()=>import("./AgentsSettingsPage-BJKnn0R0.js"),__vite__mapDeps([69,1,11,2,9,70,35,41]))),MU=x.lazy(()=>Xe(()=>import("./IntegrationsSettingsPage-qvvsp1_G.js"),__vite__mapDeps([71,1,11]))),jU=x.lazy(()=>Xe(()=>import("./GitSettingsPage-CzGuiY9j.js"),__vite__mapDeps([72,1,11,38,34,5,14]))),DU=x.lazy(()=>Xe(()=>import("./McpSettingsPage-COPMqimV.js"),__vite__mapDeps([73,1,11,2,66,62,45,46,16,67,9,8]))),OU=x.lazy(()=>Xe(()=>import("./PromptsSettingsPage-CwGmsIAW.js"),__vite__mapDeps([74,1,11,2,9,63,21]))),PU=x.lazy(()=>Xe(()=>import("./RulesSettingsPage-BJ72X2Y3.js"),__vite__mapDeps([75,1,11,2,9]))),LU=x.lazy(()=>Xe(()=>import("./GitPage-DAWR8rrg.js"),__vite__mapDeps([76,1,11,12,5,14,39,53,34,67,3]))),zU=x.lazy(()=>Xe(()=>import("./SchedulePage-DBYxTZMb.js"),__vite__mapDeps([77,1,2,11,66,12,34,9,35,70,7]))),IU=x.lazy(()=>Xe(()=>import("./UserPreferencesPage-CAuJ7yO4.js"),__vite__mapDeps([78,1,11])));function BU(){return g.jsxs($N,{children:[g.jsx(aN,{children:g.jsx(x.Suspense,{fallback:g.jsx(aD,{}),children:g.jsxs(OR,{children:[g.jsx(ze,{path:"/login",element:g.jsx(aU,{})}),g.jsx(ze,{path:"/auth/github/callback",element:g.jsx(iU,{})}),g.jsxs(ze,{path:"/",element:g.jsx(rD,{children:g.jsx(eU,{})}),children:[g.jsx(ze,{index:!0,element:g.jsx(rU,{})}),g.jsx(ze,{path:"proposals",element:g.jsx(oU,{})}),g.jsx(ze,{path:"proposals/new",element:g.jsx(uU,{})}),g.jsx(ze,{path:"proposals/:id",element:g.jsx(lU,{})}),g.jsx(ze,{path:"proposals/:id/edit",element:g.jsx(sU,{})}),g.jsx(ze,{path:"code",element:g.jsx(hU,{})}),g.jsx(ze,{path:"utilities",element:g.jsx(dU,{})}),g.jsx(ze,{path:"terminal",element:g.jsx(cU,{})}),g.jsx(ze,{path:"terminal/:proposalId",element:g.jsx(fU,{})}),g.jsx(ze,{path:"git",element:g.jsx(LU,{})}),g.jsx(ze,{path:"schedule",element:g.jsx(zU,{})}),g.jsx(ze,{path:"identity",element:g.jsx(TU,{})}),g.jsx(ze,{path:"agents",element:g.jsx(pU,{})}),g.jsx(ze,{path:"agents/new",element:g.jsx(gU,{})}),g.jsx(ze,{path:"agents/:id",element:g.jsx(mU,{})}),g.jsx(ze,{path:"agents/:id/edit",element:g.jsx(yU,{})}),g.jsx(ze,{path:"resources",element:g.jsx(vU,{})}),g.jsx(ze,{path:"context/project",element:g.jsx(EU,{})}),g.jsx(ze,{path:"context/project/edit",element:g.jsx(CU,{})}),g.jsx(ze,{path:"context/architecture",element:g.jsx(kU,{})}),g.jsx(ze,{path:"context/architecture/edit",element:g.jsx(AU,{})}),g.jsx(ze,{path:"context/knowledge",element:g.jsx(xU,{})}),g.jsx(ze,{path:"context/knowledge/new",element:g.jsx(SU,{})}),g.jsx(ze,{path:"context/knowledge/:filename",element:g.jsx(bU,{})}),g.jsx(ze,{path:"context/knowledge/:filename/edit",element:g.jsx(wU,{})}),g.jsxs(ze,{path:"settings",element:g.jsx(nU,{}),children:[g.jsx(ze,{index:!0,element:g.jsx(q0,{})}),g.jsx(ze,{path:"user",element:g.jsx(q0,{})}),g.jsx(ze,{path:"preferences",element:g.jsx(IU,{})}),g.jsx(ze,{path:"authentication",element:g.jsx(RU,{})}),g.jsx(ze,{path:"api-keys",element:g.jsx(NU,{})}),g.jsx(ze,{path:"agents",element:g.jsx(_U,{})}),g.jsx(ze,{path:"integrations",element:g.jsx(MU,{})}),g.jsx(ze,{path:"git",element:g.jsx(jU,{})}),g.jsx(ze,{path:"mcp",element:g.jsx(DU,{})}),g.jsx(ze,{path:"prompts",element:g.jsx(OU,{})}),g.jsx(ze,{path:"rules",element:g.jsx(PU,{})})]})]})]})})}),g.jsx(nD,{})]})}BT.createRoot(document.getElementById("root")).render(g.jsx(x.StrictMode,{children:g.jsx(BU,{})}));export{pE as $,At as A,kt as B,J_ as C,Gc as D,UU as E,hM as F,Yw as G,QN as H,c1 as I,ij as J,QU as K,Hr as L,Y9 as M,K9 as N,qC as O,VC as P,GC as Q,YC as R,Yl as S,fj as T,$C as U,XC as V,KC as W,no as X,ds as Y,mj as Z,XU as _,is as a,Fc as a$,xk as a0,h1 as a1,GM as a2,uj as a3,tD as a4,K8 as a5,X8 as a6,x2 as a7,w2 as a8,S2 as a9,pL as aA,ZU as aB,nL as aC,vL as aD,lL as aE,yL as aF,Rp as aG,Dm as aH,SE as aI,$l as aJ,a6 as aK,G3 as aL,U5 as aM,QE as aN,WU as aO,NL as aP,zh as aQ,wa as aR,nn as aS,N0 as aT,FU as aU,IM as aV,ej as aW,$i as aX,NM as aY,mB as aZ,wk as a_,b2 as aa,VU as ab,ec as ac,WM as ad,W8 as ae,yj as af,qN as ag,Nc as ah,lM as ai,up as aj,vb as ak,f6 as al,O9 as am,C9 as an,xM as ao,LM as ap,fM as aq,Qc as ar,vc as as,eH as at,JU as au,Im as av,Vm as aw,jm as ax,Op as ay,j5 as az,os as b,ka as b0,Gn as b1,zB as b2,Ne as b3,Be as b4,IB as b5,pe as b6,fn as b7,NS as b8,nS as b9,rM as ba,Rc as bb,gr as bc,qU as bd,X_ as be,EM as bf,je as c,ls as d,Ml as e,ue as f,rc as g,QM as h,Ol as i,g as j,iM as k,$n as l,gw as m,ac as n,HU as o,Oh as p,tM as q,x as r,Gw as s,ap as t,bc as u,$b as v,Ap as w,Gb as x,Tp as y,Wa as z};