@agent-spaces/server 0.3.62 → 0.3.63

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 (315) hide show
  1. package/dist/adapters/agent-runtime-types.js +12 -0
  2. package/dist/adapters/claude-code-runtime/index.js +3 -0
  3. package/dist/adapters/codex-runtime.js +2 -2
  4. package/dist/adapters/langchain-runtime.js +2 -2
  5. package/dist/adapters/open-agent-sdk-runtime.js +2 -2
  6. package/dist/agents/commit-agent.js +1 -0
  7. package/dist/agents/issue-agent-progress.js +4 -2
  8. package/dist/agents/issue-agent-runner.js +5 -5
  9. package/dist/agents/issue-task-controller.js +95 -14
  10. package/dist/app.js +74 -5
  11. package/dist/package.json +1 -1
  12. package/dist/routes/agent-sse.js +4 -2
  13. package/dist/routes/hooks.js +88 -0
  14. package/dist/routes/issue.js +59 -1
  15. package/dist/routes/output-style.js +48 -0
  16. package/dist/routes/prompt-template.js +2 -2
  17. package/dist/routes/skill.js +86 -15
  18. package/dist/routes/task.js +13 -1
  19. package/dist/services/hook-engine.js +118 -0
  20. package/dist/services/issue.js +6 -0
  21. package/dist/services/notification-hub/bot-agent.js +1 -0
  22. package/dist/services/output-style.js +134 -0
  23. package/dist/services/prompt-template.js +2 -2
  24. package/dist/services/skill.js +148 -35
  25. package/dist/storage/hook-store.js +55 -0
  26. package/dist/web/404.html +1 -1
  27. package/dist/web/__next.__PAGE__.txt +4 -4
  28. package/dist/web/__next._full.txt +25 -24
  29. package/dist/web/__next._head.txt +4 -4
  30. package/dist/web/__next._index.txt +13 -13
  31. package/dist/web/__next._tree.txt +2 -2
  32. package/dist/web/_next/static/chunks/0-1bfvfwifh-m.js +1 -0
  33. package/dist/web/_next/static/chunks/0-f~0xmwl__u5.js +1 -0
  34. package/dist/web/_next/static/chunks/0.n~yfwf4~6w-.js +1 -0
  35. package/dist/web/_next/static/chunks/002_j970b9gdx.js +1 -0
  36. package/dist/web/_next/static/chunks/014x2qbuiszni.js +3 -0
  37. package/dist/web/_next/static/chunks/01iqv28_snwus.js +1 -0
  38. package/dist/web/_next/static/chunks/02c22g~xd-y30.js +19 -0
  39. package/dist/web/_next/static/chunks/02mf61htij8g0.js +31 -0
  40. package/dist/web/_next/static/chunks/03scq1-0ykve3.js +1 -0
  41. package/dist/web/_next/static/chunks/046me66nilkff.js +1 -0
  42. package/dist/web/_next/static/chunks/04v-pqqs-2lvp.css +1 -0
  43. package/dist/web/_next/static/chunks/{0zd1o3u04~qvo.js → 05psi2gtx~bev.js} +7 -7
  44. package/dist/web/_next/static/chunks/{12odetnu-lyrr.js → 06whz1~s_7pva.js} +12 -12
  45. package/dist/web/_next/static/chunks/06w~.izyfylap.js +1 -0
  46. package/dist/web/_next/static/chunks/09t62a89~jesc.js +3 -0
  47. package/dist/web/_next/static/chunks/09y_3krccdd~u.js +1 -0
  48. package/dist/web/_next/static/chunks/{0njy89g5coeyi.js → 0_8dm7bxp18xo.js} +6 -6
  49. package/dist/web/_next/static/chunks/0_e~hmntdfop9.js +1 -0
  50. package/dist/web/_next/static/chunks/0_udc.6.tueey.js +1 -0
  51. package/dist/web/_next/static/chunks/0_vi1a~g4wx46.js +3 -0
  52. package/dist/web/_next/static/chunks/{0rke_patcovgr.js → 0aa6bcdmtpekn.js} +1 -1
  53. package/dist/web/_next/static/chunks/{0tvd~rxgf0oh_.js → 0bbmx45w_h5np.js} +1 -1
  54. package/dist/web/_next/static/chunks/0cke33d38fnby.js +90 -0
  55. package/dist/web/_next/static/chunks/{07a0rktf_nr5h.js → 0ctg5qmw7uu.1.js} +2 -2
  56. package/dist/web/_next/static/chunks/0cyq~8xb~r5fc.js +1 -0
  57. package/dist/web/_next/static/chunks/0ewceguykiut5.js +1 -0
  58. package/dist/web/_next/static/chunks/0fxa1edqr7dve.js +1 -0
  59. package/dist/web/_next/static/chunks/{0202ia13sijwb.js → 0h18ej5yf974e.js} +1 -1
  60. package/dist/web/_next/static/chunks/0hra80eyuu37u.js +1 -0
  61. package/dist/web/_next/static/chunks/0i39jifmxla7q.js +1 -0
  62. package/dist/web/_next/static/chunks/0ie7y4k2ncvnn.js +1 -0
  63. package/dist/web/_next/static/chunks/0igc~uli58ncw.js +2 -0
  64. package/dist/web/_next/static/chunks/0kof5qdg8c2-k.js +71 -0
  65. package/dist/web/_next/static/chunks/{08o-zmr-40r5g.js → 0m11vvph7q94-.js} +1 -1
  66. package/dist/web/_next/static/chunks/0msb2mi3hiu5_.js +67 -0
  67. package/dist/web/_next/static/chunks/0np.d~hc1-pmh.js +4 -0
  68. package/dist/web/_next/static/chunks/{0qpq0~_58fe9a.js → 0oaq67r7ix.vg.js} +1 -1
  69. package/dist/web/_next/static/chunks/0ogpc3f3keopc.js +3 -0
  70. package/dist/web/_next/static/chunks/{0d_dp_4ofz0l3.css → 0ojcao3hdm36s.css} +0 -1
  71. package/dist/web/_next/static/chunks/0p1n8bvfnpl41.js +1 -0
  72. package/dist/web/_next/static/chunks/{0gig.k.rq8d0x.js → 0ppr271hz0xoq.js} +1 -1
  73. package/dist/web/_next/static/chunks/0s_dva~eh2yhi.js +3 -0
  74. package/dist/web/_next/static/chunks/0typj55ox8d5i.js +1 -0
  75. package/dist/web/_next/static/chunks/0w2p4ldi2aymp.js +1 -0
  76. package/dist/web/_next/static/chunks/{0..g0jl-8qup7.js → 0xoo17yef_b8g.js} +1 -1
  77. package/dist/web/_next/static/chunks/0xt-8wk21gs7g.js +1 -0
  78. package/dist/web/_next/static/chunks/0y09i51u6ixq5.js +1 -0
  79. package/dist/web/_next/static/chunks/0za1r07-6az6w.js +1 -0
  80. package/dist/web/_next/static/chunks/0zc0xgp5ourcn.js +1 -0
  81. package/dist/web/_next/static/chunks/0zmhdridea1s5.js +90 -0
  82. package/dist/web/_next/static/chunks/0~u.5r3-t7179.js +1 -0
  83. package/dist/web/_next/static/chunks/10.alq.6stmld.js +1 -0
  84. package/dist/web/_next/static/chunks/11-czmcci_55y.js +1 -0
  85. package/dist/web/_next/static/chunks/11b3zgk1etlkw.js +7 -0
  86. package/dist/web/_next/static/chunks/11k-.49r~1mfm.js +1 -0
  87. package/dist/web/_next/static/chunks/11qp8r5dotf7d.js +1 -0
  88. package/dist/web/_next/static/chunks/{0k.8qdk7oi_os.js → 128ugqd34tr_-.js} +1 -1
  89. package/dist/web/_next/static/chunks/12mxlicp247c8.js +1 -0
  90. package/dist/web/_next/static/chunks/135w27dd8c19s.js +5 -0
  91. package/dist/web/_next/static/chunks/13~y-b.b9rrw4.js +1 -0
  92. package/dist/web/_next/static/chunks/{0jokpgh485~28.js → 14hqmid8q4apf.js} +11 -11
  93. package/dist/web/_next/static/chunks/16sg-lflc8csx.js +1 -0
  94. package/dist/web/_next/static/chunks/176dc-dtokxxi.js +16 -0
  95. package/dist/web/_next/static/chunks/17g-0pqre.anw.js +1 -0
  96. package/dist/web/_next/static/chunks/17oc2l.ekcs8b.css +1 -0
  97. package/dist/web/_next/static/chunks/{turbopack-0lrdxynxb9-1t.js → turbopack-0ndm2zc_pdptk.js} +1 -1
  98. package/dist/web/_not-found/__next._full.txt +29 -30
  99. package/dist/web/_not-found/__next._head.txt +4 -4
  100. package/dist/web/_not-found/__next._index.txt +13 -13
  101. package/dist/web/_not-found/__next._not-found.__PAGE__.txt +2 -2
  102. package/dist/web/_not-found/__next._not-found.txt +3 -3
  103. package/dist/web/_not-found/__next._tree.txt +2 -2
  104. package/dist/web/_not-found.html +1 -1
  105. package/dist/web/_not-found.txt +29 -30
  106. package/dist/web/index.html +1 -1
  107. package/dist/web/index.txt +25 -24
  108. package/dist/web/login/__next._full.txt +29 -29
  109. package/dist/web/login/__next._head.txt +4 -4
  110. package/dist/web/login/__next._index.txt +13 -13
  111. package/dist/web/login/__next._tree.txt +2 -2
  112. package/dist/web/login/__next.login.__PAGE__.txt +4 -4
  113. package/dist/web/login/__next.login.txt +3 -3
  114. package/dist/web/login.html +1 -1
  115. package/dist/web/login.txt +29 -29
  116. package/dist/web/settings/__next._full.txt +28 -28
  117. package/dist/web/settings/__next._head.txt +4 -4
  118. package/dist/web/settings/__next._index.txt +13 -13
  119. package/dist/web/settings/__next._tree.txt +2 -2
  120. package/dist/web/settings/__next.settings.__PAGE__.txt +4 -4
  121. package/dist/web/settings/__next.settings.txt +5 -5
  122. package/dist/web/settings/agents/__next._full.txt +24 -24
  123. package/dist/web/settings/agents/__next._head.txt +4 -4
  124. package/dist/web/settings/agents/__next._index.txt +13 -13
  125. package/dist/web/settings/agents/__next._tree.txt +2 -2
  126. package/dist/web/settings/agents/__next.settings.agents.__PAGE__.txt +4 -4
  127. package/dist/web/settings/agents/__next.settings.agents.txt +3 -3
  128. package/dist/web/settings/agents/__next.settings.txt +5 -5
  129. package/dist/web/settings/agents.html +1 -1
  130. package/dist/web/settings/agents.txt +24 -24
  131. package/dist/web/settings/mcps/__next._full.txt +24 -24
  132. package/dist/web/settings/mcps/__next._head.txt +4 -4
  133. package/dist/web/settings/mcps/__next._index.txt +13 -13
  134. package/dist/web/settings/mcps/__next._tree.txt +2 -2
  135. package/dist/web/settings/mcps/__next.settings.mcps.__PAGE__.txt +4 -4
  136. package/dist/web/settings/mcps/__next.settings.mcps.txt +3 -3
  137. package/dist/web/settings/mcps/__next.settings.txt +5 -5
  138. package/dist/web/settings/mcps.html +1 -1
  139. package/dist/web/settings/mcps.txt +24 -24
  140. package/dist/web/settings/models/__next._full.txt +24 -24
  141. package/dist/web/settings/models/__next._head.txt +4 -4
  142. package/dist/web/settings/models/__next._index.txt +13 -13
  143. package/dist/web/settings/models/__next._tree.txt +2 -2
  144. package/dist/web/settings/models/__next.settings.models.__PAGE__.txt +4 -4
  145. package/dist/web/settings/models/__next.settings.models.txt +3 -3
  146. package/dist/web/settings/models/__next.settings.txt +5 -5
  147. package/dist/web/settings/models.html +1 -1
  148. package/dist/web/settings/models.txt +24 -24
  149. package/dist/web/settings/output-styles/__next._full.txt +43 -0
  150. package/dist/web/settings/output-styles/__next._head.txt +6 -0
  151. package/dist/web/settings/output-styles/__next._index.txt +15 -0
  152. package/dist/web/settings/output-styles/__next._tree.txt +8 -0
  153. package/dist/web/settings/output-styles/__next.settings.output-styles.__PAGE__.txt +9 -0
  154. package/dist/web/settings/output-styles/__next.settings.output-styles.txt +5 -0
  155. package/dist/web/settings/output-styles/__next.settings.txt +7 -0
  156. package/dist/web/settings/output-styles.html +1 -0
  157. package/dist/web/settings/output-styles.txt +43 -0
  158. package/dist/web/settings/prompts/__next._full.txt +24 -24
  159. package/dist/web/settings/prompts/__next._head.txt +4 -4
  160. package/dist/web/settings/prompts/__next._index.txt +13 -13
  161. package/dist/web/settings/prompts/__next._tree.txt +2 -2
  162. package/dist/web/settings/prompts/__next.settings.prompts.__PAGE__.txt +4 -4
  163. package/dist/web/settings/prompts/__next.settings.prompts.txt +3 -3
  164. package/dist/web/settings/prompts/__next.settings.txt +5 -5
  165. package/dist/web/settings/prompts.html +1 -1
  166. package/dist/web/settings/prompts.txt +24 -24
  167. package/dist/web/settings/providers/__next._full.txt +24 -24
  168. package/dist/web/settings/providers/__next._head.txt +4 -4
  169. package/dist/web/settings/providers/__next._index.txt +13 -13
  170. package/dist/web/settings/providers/__next._tree.txt +2 -2
  171. package/dist/web/settings/providers/__next.settings.providers.__PAGE__.txt +4 -4
  172. package/dist/web/settings/providers/__next.settings.providers.txt +3 -3
  173. package/dist/web/settings/providers/__next.settings.txt +5 -5
  174. package/dist/web/settings/providers.html +1 -1
  175. package/dist/web/settings/providers.txt +24 -24
  176. package/dist/web/settings/skills/__next._full.txt +24 -24
  177. package/dist/web/settings/skills/__next._head.txt +4 -4
  178. package/dist/web/settings/skills/__next._index.txt +13 -13
  179. package/dist/web/settings/skills/__next._tree.txt +2 -2
  180. package/dist/web/settings/skills/__next.settings.skills.__PAGE__.txt +4 -4
  181. package/dist/web/settings/skills/__next.settings.skills.txt +3 -3
  182. package/dist/web/settings/skills/__next.settings.txt +5 -5
  183. package/dist/web/settings/skills.html +1 -1
  184. package/dist/web/settings/skills.txt +24 -24
  185. package/dist/web/settings.html +1 -1
  186. package/dist/web/settings.txt +28 -28
  187. package/dist/web/workflows/__next._full.txt +32 -31
  188. package/dist/web/workflows/__next._head.txt +4 -4
  189. package/dist/web/workflows/__next._index.txt +13 -13
  190. package/dist/web/workflows/__next._tree.txt +2 -2
  191. package/dist/web/workflows/__next.workflows.__PAGE__.txt +4 -4
  192. package/dist/web/workflows/__next.workflows.txt +3 -3
  193. package/dist/web/workflows.html +1 -1
  194. package/dist/web/workflows.txt +32 -31
  195. package/dist/web/workspace/_/__next._full.txt +30 -71
  196. package/dist/web/workspace/_/__next._head.txt +4 -4
  197. package/dist/web/workspace/_/__next._index.txt +13 -13
  198. package/dist/web/workspace/_/__next._tree.txt +2 -17
  199. package/dist/web/workspace/_/__next.workspace.$d$id.__PAGE__.txt +3 -18
  200. package/dist/web/workspace/_/__next.workspace.$d$id.txt +3 -3
  201. package/dist/web/workspace/_/__next.workspace.txt +3 -3
  202. package/dist/web/workspace/_.html +1 -1
  203. package/dist/web/workspace/_.txt +30 -71
  204. package/dist/web/workspaces/__next._full.txt +31 -32
  205. package/dist/web/workspaces/__next._head.txt +4 -4
  206. package/dist/web/workspaces/__next._index.txt +13 -13
  207. package/dist/web/workspaces/__next._tree.txt +2 -2
  208. package/dist/web/workspaces/__next.workspaces.__PAGE__.txt +4 -4
  209. package/dist/web/workspaces/__next.workspaces.txt +3 -3
  210. package/dist/web/workspaces.html +1 -1
  211. package/dist/web/workspaces.txt +31 -32
  212. package/dist/ws/agent-runner.js +4 -2
  213. package/package.json +1 -1
  214. package/public/output-styles/carmack-mode.md +381 -0
  215. package/public/output-styles/codex-rigor-mode.md +114 -0
  216. package/public/output-styles/dhh-mode.md +265 -0
  217. package/public/output-styles/evan-you-mode.md +539 -0
  218. package/public/output-styles/index.json +37 -0
  219. package/public/output-styles/jobs-mode.md +369 -0
  220. package/public/output-styles/linus-mode.md +135 -0
  221. package/public/output-styles/uncle-bob-mode.md +221 -0
  222. package/public/prompt/andrej-karpathy-skills.md +65 -0
  223. package/public/prompt/claude-token-efficient-coding.md +35 -0
  224. package/public/prompt/index.json +12 -0
  225. package/public/skills/index.json +92 -0
  226. package/public/skills/planning-with-files/planning-with-files-zh/SKILL.md +243 -0
  227. package/public/skills/planning-with-files/planning-with-files-zh/scripts/check-complete.ps1 +44 -0
  228. package/public/skills/planning-with-files/planning-with-files-zh/scripts/check-complete.sh +46 -0
  229. package/public/skills/planning-with-files/planning-with-files-zh/scripts/init-session.ps1 +124 -0
  230. package/public/skills/planning-with-files/planning-with-files-zh/scripts/init-session.sh +124 -0
  231. package/public/skills/planning-with-files/planning-with-files-zh/scripts/session-catchup.py +438 -0
  232. package/public/skills/planning-with-files/planning-with-files-zh/templates/findings.md +29 -0
  233. package/public/skills/planning-with-files/planning-with-files-zh/templates/progress.md +40 -0
  234. package/public/skills/planning-with-files/planning-with-files-zh/templates/task_plan.md +58 -0
  235. package/public/skills/superpowers/brainstorming/SKILL.md +164 -0
  236. package/public/skills/superpowers/brainstorming/scripts/frame-template.html +214 -0
  237. package/public/skills/superpowers/brainstorming/scripts/helper.js +88 -0
  238. package/public/skills/superpowers/brainstorming/scripts/server.cjs +354 -0
  239. package/public/skills/superpowers/brainstorming/scripts/start-server.sh +148 -0
  240. package/public/skills/superpowers/brainstorming/scripts/stop-server.sh +56 -0
  241. package/public/skills/superpowers/brainstorming/spec-document-reviewer-prompt.md +49 -0
  242. package/public/skills/superpowers/brainstorming/visual-companion.md +287 -0
  243. package/public/skills/superpowers/dispatching-parallel-agents/SKILL.md +182 -0
  244. package/public/skills/superpowers/executing-plans/SKILL.md +70 -0
  245. package/public/skills/superpowers/finishing-a-development-branch/SKILL.md +251 -0
  246. package/public/skills/superpowers/receiving-code-review/SKILL.md +213 -0
  247. package/public/skills/superpowers/requesting-code-review/SKILL.md +103 -0
  248. package/public/skills/superpowers/requesting-code-review/code-reviewer.md +168 -0
  249. package/public/skills/superpowers/subagent-driven-development/SKILL.md +279 -0
  250. package/public/skills/superpowers/subagent-driven-development/code-quality-reviewer-prompt.md +25 -0
  251. package/public/skills/superpowers/subagent-driven-development/implementer-prompt.md +113 -0
  252. package/public/skills/superpowers/subagent-driven-development/spec-reviewer-prompt.md +61 -0
  253. package/public/skills/superpowers/systematic-debugging/CREATION-LOG.md +119 -0
  254. package/public/skills/superpowers/systematic-debugging/SKILL.md +296 -0
  255. package/public/skills/superpowers/systematic-debugging/condition-based-waiting-example.ts +158 -0
  256. package/public/skills/superpowers/systematic-debugging/condition-based-waiting.md +115 -0
  257. package/public/skills/superpowers/systematic-debugging/defense-in-depth.md +122 -0
  258. package/public/skills/superpowers/systematic-debugging/find-polluter.sh +63 -0
  259. package/public/skills/superpowers/systematic-debugging/root-cause-tracing.md +169 -0
  260. package/public/skills/superpowers/systematic-debugging/test-academic.md +14 -0
  261. package/public/skills/superpowers/systematic-debugging/test-pressure-1.md +58 -0
  262. package/public/skills/superpowers/systematic-debugging/test-pressure-2.md +68 -0
  263. package/public/skills/superpowers/systematic-debugging/test-pressure-3.md +69 -0
  264. package/public/skills/superpowers/test-driven-development/SKILL.md +371 -0
  265. package/public/skills/superpowers/test-driven-development/testing-anti-patterns.md +299 -0
  266. package/public/skills/superpowers/using-git-worktrees/SKILL.md +215 -0
  267. package/public/skills/superpowers/using-superpowers/SKILL.md +117 -0
  268. package/public/skills/superpowers/using-superpowers/references/codex-tools.md +59 -0
  269. package/public/skills/superpowers/using-superpowers/references/copilot-tools.md +42 -0
  270. package/public/skills/superpowers/using-superpowers/references/gemini-tools.md +51 -0
  271. package/public/skills/superpowers/verification-before-completion/SKILL.md +139 -0
  272. package/public/skills/superpowers/writing-plans/SKILL.md +152 -0
  273. package/public/skills/superpowers/writing-plans/plan-document-reviewer-prompt.md +49 -0
  274. package/public/skills/superpowers/writing-skills/SKILL.md +655 -0
  275. package/public/skills/superpowers/writing-skills/anthropic-best-practices.md +1150 -0
  276. package/public/skills/superpowers/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
  277. package/public/skills/superpowers/writing-skills/graphviz-conventions.dot +172 -0
  278. package/public/skills/superpowers/writing-skills/persuasion-principles.md +187 -0
  279. package/public/skills/superpowers/writing-skills/render-graphs.js +168 -0
  280. package/public/skills/superpowers/writing-skills/testing-skills-with-subagents.md +384 -0
  281. package/dist/web/_next/static/chunks/0-81wi7xr2nd-.js +0 -270
  282. package/dist/web/_next/static/chunks/00lca9lsasdm7.js +0 -1
  283. package/dist/web/_next/static/chunks/01gi~q0c6ez6..js +0 -1
  284. package/dist/web/_next/static/chunks/02shswpmybici.js +0 -1
  285. package/dist/web/_next/static/chunks/05tx6hzdtkgi9.js +0 -2
  286. package/dist/web/_next/static/chunks/07nbyndvzftr1.js +0 -3
  287. package/dist/web/_next/static/chunks/0bn~onkv~9xza.js +0 -1
  288. package/dist/web/_next/static/chunks/0g-0n6glz_z6w.js +0 -1
  289. package/dist/web/_next/static/chunks/0gyede80jpy3n.js +0 -4
  290. package/dist/web/_next/static/chunks/0hrbuvzuxrjfl.js +0 -1
  291. package/dist/web/_next/static/chunks/0i51q.5s_-.vh.css +0 -1
  292. package/dist/web/_next/static/chunks/0qf163pbrwy4z.js +0 -1
  293. package/dist/web/_next/static/chunks/0rnt-f3pjxb-d.js +0 -5
  294. package/dist/web/_next/static/chunks/0tgbcgsca9mrg.js +0 -1
  295. package/dist/web/_next/static/chunks/0tyhv6.y7~yxd.js +0 -1
  296. package/dist/web/_next/static/chunks/0u7_qd9hzqwac.js +0 -1
  297. package/dist/web/_next/static/chunks/0vuvql8rloda5.js +0 -1
  298. package/dist/web/_next/static/chunks/0wv0h27jafag4.js +0 -1
  299. package/dist/web/_next/static/chunks/0wwvc4zc2q6bn.js +0 -1
  300. package/dist/web/_next/static/chunks/0xmmk3vebw8xs.js +0 -1
  301. package/dist/web/_next/static/chunks/0xwqf.llmm_u2.js +0 -31
  302. package/dist/web/_next/static/chunks/0yo22_w53mo~5.js +0 -1
  303. package/dist/web/_next/static/chunks/12c0jp0qvlr1t.js +0 -1
  304. package/dist/web/_next/static/chunks/12pg1nn3v~~5k.js +0 -1
  305. package/dist/web/_next/static/chunks/16cyr8ilpx1nn.js +0 -1
  306. package/public/avatars/1777813826407-bea0ja-minimax.svg +0 -1
  307. package/public/avatars/1777813967088-3xlvd0-minimax.svg +0 -1
  308. package/public/avatars/1777814041714-yp0qeq-minimax.svg +0 -1
  309. package/public/avatars/1777904986095-rg26je-icon.png +0 -0
  310. package/public/avatars/1778953228323-5je54x-user.jpg +0 -0
  311. package/public/avatars/1778954057880-g01q6y-user.jpg +0 -0
  312. /package/dist/web/_next/static/{GS3b40oeaeLxm7i9-ibaj → OoXAsPtrUWjC1l898FSvI}/_buildManifest.js +0 -0
  313. /package/dist/web/_next/static/{GS3b40oeaeLxm7i9-ibaj → OoXAsPtrUWjC1l898FSvI}/_clientMiddlewareManifest.js +0 -0
  314. /package/dist/web/_next/static/{GS3b40oeaeLxm7i9-ibaj → OoXAsPtrUWjC1l898FSvI}/_ssgManifest.js +0 -0
  315. /package/public/avatars/{1777815865622-08wp9m-user.jpg → user.jpg} +0 -0
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,837121,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"warnOnce",{enumerable:!0,get:function(){return a}});let a=e=>{}},361031,e=>{"use strict";let t=(0,e.i(816709).create)(e=>({workspaces:[],setWorkspaces:t=>e({workspaces:t}),upsertWorkspace:t=>{e(e=>{let n=e.workspaces.findIndex(e=>e.id===t.id);if(-1===n)return{workspaces:[...e.workspaces,t]};let a=[...e.workspaces];return a[n]=t,{workspaces:a}})},removeWorkspace:t=>{e(e=>({workspaces:e.workspaces.filter(e=>e.id!==t)}))}}));e.s(["useWorkspaceStore",0,t])},227634,e=>{"use strict";let t=(0,e.i(433721).default)("hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);e.s(["Hash",0,t],227634)},210,e=>{"use strict";let t=(0,e.i(433721).default)("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);e.s(["Settings2",0,t],210)},601039,e=>{"use strict";let t=(0,e.i(433721).default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",0,t],601039)},383171,415955,e=>{"use strict";var t=e.i(220336);e.s(["FolderIcon",()=>t.default],383171);var n=e.i(680422);e.s(["FolderOpenIcon",()=>n.default],415955)},517432,e=>{"use strict";var t=e.i(56032),n=e.i(863728);function a(){return n.NOOP}function r(){return!1}function s(){return!0}e.s(["useIsHydrating",0,function(){return(0,t.useSyncExternalStore)(a,r,s)}])},551157,e=>{"use strict";let t=(0,e.i(433721).default)("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);e.s(["default",0,t])},882469,e=>{"use strict";var t=e.i(551157);e.s(["Globe",()=>t.default])},327962,e=>{"use strict";let t=(0,e.i(433721).default)("git-branch",[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]]);e.s(["GitBranch",0,t],327962)},964970,e=>{"use strict";var t=e.i(344180),n=e.i(764556),a=e.i(244073),r=e.i(260218),s=e.i(681622),i=e.i(817854),o=e.i(360112),l=e.i(437122);e.s(["GitSettingsForm",0,function({scope:e,workspaceId:c}){let d=(0,a.useTranslations)("git.settings"),u=(0,a.useTranslations)("common"),[p,m]=(0,n.useState)(""),[h,f]=(0,n.useState)(""),[g,x]=(0,n.useState)(""),[y,v]=(0,n.useState)(""),[b,j]=(0,n.useState)(!0),[w,k]=(0,n.useState)(!1),S=(0,n.useCallback)(async()=>{j(!0);try{let t="global"===e?"/api/git-config":`/api/workspaces/${c}/git/config`,n=await fetch(t,{headers:(0,l.authHeaders)()});if(n.ok){let e=await n.json();m(e.name??""),f(e.email??""),x(e.proxy??"")}if("local"===e&&c){let e=await fetch(`/api/workspaces/${c}/git/remote-url`,{headers:(0,l.authHeaders)()});if(e.ok){let t=await e.json();v(t.url??"")}}}catch{}j(!1)},[e,c]);(0,n.useEffect)(()=>{S()},[e,c,S]);let N=async()=>{k(!0);try{let t="global"===e?"/api/git-config":`/api/workspaces/${c}/git/config`;if(!(await fetch(t,{method:"POST",headers:{"Content-Type":"application/json",...(0,l.authHeaders)()},body:JSON.stringify({name:p,email:h,proxy:g})})).ok){o.toast.error(d("saveFailed")),k(!1);return}"local"===e&&c&&y&&await fetch(`/api/workspaces/${c}/git/remotes`,{method:"POST",headers:{"Content-Type":"application/json",...(0,l.authHeaders)()},body:JSON.stringify({name:"origin",url:y})}),o.toast.success(d("saved"))}catch{o.toast.error(d("saveFailed"))}k(!1)};return b?(0,t.jsx)("div",{className:"text-xs text-muted-foreground",children:d("loading")}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:"global"===e?d("globalScopeDescription"):d("localScopeDescription")}),(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(i.Label,{className:"text-xs text-muted-foreground",children:d("name")}),(0,t.jsx)(s.Input,{className:"h-7 text-xs",value:p,onChange:e=>m(e.target.value),placeholder:d("namePlaceholder")})]}),(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(i.Label,{className:"text-xs text-muted-foreground",children:d("email")}),(0,t.jsx)(s.Input,{className:"h-7 text-xs",value:h,onChange:e=>f(e.target.value),placeholder:d("emailPlaceholder")})]}),(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(i.Label,{className:"text-xs text-muted-foreground",children:d("proxy")}),(0,t.jsx)(s.Input,{className:"h-7 text-xs",value:g,onChange:e=>x(e.target.value),placeholder:d("proxyPlaceholder")})]}),"local"===e&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(i.Label,{className:"text-xs text-muted-foreground",children:d("remoteUrl")}),(0,t.jsx)(s.Input,{className:"h-7 text-xs",value:y,onChange:e=>v(e.target.value),placeholder:d("remoteUrlPlaceholder")})]}),(0,t.jsx)(r.Button,{size:"sm",className:"text-xs",onClick:N,disabled:w,children:u(w?"loading":"save")})]})}])},307858,e=>{"use strict";let t=(0,e.i(433721).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",0,t],307858)},951841,e=>{"use strict";let t;var n=e.i(764556);let a=new Set;e.s(["setCachedUserAvatarUrl",0,function(e){t=e,a.forEach(t=>t(e))},"useUserAvatar",0,function(){let[e,r]=(0,n.useState)(()=>void 0!==t?t:null);return(0,n.useEffect)(()=>(void 0===t&&fetch("/api/user/settings").then(e=>e.json()).then(e=>{e.avatarUrl&&(t=e.avatarUrl,r(e.avatarUrl))}).catch(()=>{}),a.add(r),()=>{a.delete(r)}),[]),e}])},14452,e=>{"use strict";var t=e.i(344180),n=e.i(764556),a=e.i(724966),r=e.i(465458),s=e.i(260218),i=e.i(422373),o=e.i(250226);function l({...e}){return(0,t.jsx)(a.Dialog.Portal,{"data-slot":"sheet-portal",...e})}function c({className:e,...n}){return(0,t.jsx)(a.Dialog.Backdrop,{"data-slot":"sheet-overlay",className:(0,r.cn)("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",e),...n})}e.s(["Sheet",0,function({ignoreBack:e=!1,...r}){let s=n.useId(),i=(0,o.useMobilePanelStore)(e=>e.registerOverlay),l=(0,o.useMobilePanelStore)(e=>e.unregisterOverlay),c="open"in r?r.open:"defaultOpen"in r?r.defaultOpen:void 0,d=r.onOpenChange,u=n.useRef(d);return n.useEffect(()=>{u.current=d},[d]),n.useEffect(()=>c&&!e&&u.current?(i(s,()=>u.current?.(!1,{reason:void 0})),()=>l(s)):void l(s),[e,c,s,i,l]),(0,t.jsx)(a.Dialog.Root,{"data-slot":"sheet",...r})},"SheetContent",0,function({className:e,children:n,side:o="right",showCloseButton:d=!0,...u}){return(0,t.jsxs)(l,{children:[(0,t.jsx)(c,{}),(0,t.jsxs)(a.Dialog.Popup,{"data-slot":"sheet-content","data-side":o,className:(0,r.cn)("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:top-[var(--app-top-inset)] data-[side=left]:bottom-0 data-[side=left]:left-0 data-[side=left]:h-[calc(100dvh-var(--app-top-inset))] data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:top-[var(--app-top-inset)] data-[side=right]:right-0 data-[side=right]:bottom-0 data-[side=right]:h-[calc(100dvh-var(--app-top-inset))] data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-[var(--app-top-inset)] data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",e),...u,children:[n,d&&(0,t.jsxs)(a.Dialog.Close,{"data-slot":"sheet-close",render:(0,t.jsx)(s.Button,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm"}),children:[(0,t.jsx)(i.XIcon,{}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})},"SheetDescription",0,function({className:e,...n}){return(0,t.jsx)(a.Dialog.Description,{"data-slot":"sheet-description",className:(0,r.cn)("text-sm text-muted-foreground",e),...n})},"SheetHeader",0,function({className:e,...n}){return(0,t.jsx)("div",{"data-slot":"sheet-header",className:(0,r.cn)("flex flex-col gap-0.5 p-4",e),...n})},"SheetTitle",0,function({className:e,...n}){return(0,t.jsx)(a.Dialog.Title,{"data-slot":"sheet-title",className:(0,r.cn)("font-heading text-base font-medium text-foreground",e),...n})}])},380797,e=>{"use strict";let t=(0,e.i(433721).default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s(["default",0,t])},249673,e=>{"use strict";var t=e.i(380797);e.s(["ChevronUp",()=>t.default])},157408,e=>{"use strict";var t=e.i(523592),n=e.i(437122);class a{workspaceId;ws;handlers;reconnectTimer;url;disposed;constructor(e){this.workspaceId=e,this.ws=null,this.handlers=new Map,this.reconnectTimer=null,this.disposed=!1,this.onVisibilityChange=()=>{"visible"!==document.visibilityState||this.disposed||this.ws&&this.ws.readyState!==WebSocket.CLOSED&&this.ws.readyState!==WebSocket.CLOSING||(console.log("[WS] page visible, reconnecting..."),this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.reconnectTimer=null,this.connect())};const a=(0,t.getActiveServerUrl)(),r=(0,n.getToken)(),s=new URL("/ws",a??window.location.origin);s.protocol="https:"===s.protocol?"wss:":"ws:",s.searchParams.set("workspaceId",e),r&&s.searchParams.set("token",r),this.url=s.toString(),document.addEventListener("visibilitychange",this.onVisibilityChange)}connect(){this.ws=new WebSocket(this.url),this.ws.onopen=()=>{console.log("[WS] connected");let e=this.handlers.get("connected");if(e)for(let t of e)t(void 0)},this.ws.onmessage=e=>{try{let t=JSON.parse(e.data),n=this.handlers.get(t.event);if(n)for(let e of n)e(t.data)}catch{console.error("[WS] parse error")}},this.ws.onclose=e=>{console.log(`[WS] disconnected (${e.code}${e.reason?`: ${e.reason}`:""}), reconnecting...`),this.reconnectTimer=setTimeout(()=>this.connect(),3e3)},this.ws.onerror=()=>{this.ws?.close()}}onVisibilityChange;disconnect(){this.disposed=!0,document.removeEventListener("visibilitychange",this.onVisibilityChange),this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.ws?.close(),this.ws=null}send(e,t){this.ws?.readyState===WebSocket.OPEN&&this.ws.send(JSON.stringify({event:e,data:t}))}on(e,t){return this.handlers.has(e)||this.handlers.set(e,new Set),this.handlers.get(e).add(t),()=>this.handlers.get(e)?.delete(t)}off(e,t){this.handlers.get(e)?.delete(t)}}let r=null;e.s(["getWS",0,function(e){return r&&r.workspaceId!==e&&(r.disconnect(),r=null),r||(r=new a(e)).connect(),r}])},31807,e=>{"use strict";var t=e.i(816709),n=e.i(157408);let a="agent-spaces:channel:",r=(0,t.create)((e,t)=>({workspaceId:null,channels:[],activeChannelId:null,channelSelectSeq:0,messages:{},loadChannels:async t=>{let n=await fetch(`/api/workspaces/${t}/channels`),r=await n.json(),s=function(e,t){try{let n=localStorage.getItem(a+e);if(n&&t.some(e=>e.id===n))return n}catch{}return t[0]?.id??null}(t,r);e({workspaceId:t,channels:r,activeChannelId:s})},createChannel:async(t,n,a="general",r)=>{let s=await fetch(`/api/workspaces/${t}/channels`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:n,type:a,members:r})}),i=await s.json();e(e=>({channels:e.channels.some(e=>e.id===i.id)?e.channels.map(e=>e.id===i.id?i:e):[...e.channels,i],activeChannelId:i.id}))},updateChannel:async(t,n,a)=>{let r=await fetch(`/api/workspaces/${t}/channels/${n}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!r.ok)throw Error("Failed to update channel");let s=await r.json();return e(e=>({channels:e.channels.map(e=>e.id===n?s:e)})),s},setActiveChannel:t=>{let{workspaceId:n}=r.getState();if(n)try{localStorage.setItem(a+n,t)}catch{}e(e=>({activeChannelId:t,channelSelectSeq:e.channelSelectSeq+1}))},loadMessages:async(t,n)=>{let a=await fetch(`/api/workspaces/${t}/channels/${n}/messages`),r=await a.json();e(e=>({messages:{...e.messages,[n]:r}}))},loadChannelState:async(e,t)=>{let n=await fetch(`/api/workspaces/${e}/channels/${t}/state`);return n.ok?await n.json():null},sendMessage:(e,t,a,r=[],s=[],i)=>{(0,n.getWS)(e).send("channel.message",{channelId:t,content:a,mentions:r,attachments:s,replyToMessageId:i})},addMessage:(t,n)=>{e(e=>({messages:{...e.messages,[t]:[...e.messages[t]||[],n]}}))},updateMessage:(t,n)=>{e(e=>({messages:{...e.messages,[t]:(e.messages[t]||[]).map(e=>e.id===n.id?n:e)}}))},stopProcessingMessages:t=>{e(e=>({messages:{...e.messages,[t]:(e.messages[t]||[]).map(e=>"pending"===e.status||"streaming"===e.status||"waiting_for_user"===e.status?{...e,status:"error",content:e.content||"Stopped by user"}:e)}}))},deleteMessage:(t,n)=>{e(e=>({messages:{...e.messages,[t]:(e.messages[t]||[]).filter(e=>e.id!==n)}}))},clearMessages:async(t,n)=>{await fetch(`/api/workspaces/${t}/channels/${n}/messages`,{method:"DELETE"}),e(e=>({messages:{...e.messages,[n]:[]}}))},deleteChannel:async(e,n)=>{await fetch(`/api/workspaces/${e}/channels/${n}`,{method:"DELETE"}),t().removeChannelLocal(n)},removeChannelLocal:t=>{e(e=>{let n=e.channels.filter(e=>e.id!==t),a={...e.messages};return delete a[t],{channels:n,activeChannelId:e.activeChannelId===t?n[0]?.id??null:e.activeChannelId,messages:a}})},upsertChannel:t=>{e(e=>{let n=e.channels.findIndex(e=>e.id===t.id);if(n<0)return"string"==typeof t.workspaceId&&"string"==typeof t.name&&("general"===t.type||"issue"===t.type||"agent"===t.type)&&Array.isArray(t.members)&&"string"==typeof t.createdAt?{channels:[...e.channels,t]}:{channels:e.channels};let a=[...e.channels],r=a[n];return a[n]={...r,...t,members:Array.isArray(t.members)?t.members:r.members},{channels:a}})},saveDraft:async(t,n,a)=>{let s=r.getState().channels.find(e=>e.id===n);if(s?.draft?.content===a)return;let i={content:a,updatedAt:new Date().toISOString()};e(e=>({channels:e.channels.map(e=>e.id===n?{...e,draft:i}:e)})),await fetch(`/api/workspaces/${t}/channels/${n}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({draft:i})})},clearDraft:async(t,n)=>{e(e=>({channels:e.channels.map(e=>e.id===n?{...e,draft:void 0}:e)})),await fetch(`/api/workspaces/${t}/channels/${n}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({draft:null})})},ensureAndActivateChannel:async(n,a)=>{let{channels:r}=t();if(!r.some(e=>e.id===a)){let t=await fetch(`/api/workspaces/${n}/channels`);t.ok&&e({channels:await t.json()})}t().setActiveChannel(a)}}));e.s(["useChannelStore",0,r])},873111,e=>{"use strict";let t=(0,e.i(816709).create)((e,t)=>({tasks:[],loading:!1,loadTasks:async(t,n)=>{e({loading:!0});try{let a=n?`?issueId=${n}`:"",r=await fetch(`/api/workspaces/${t}/tasks${a}`),s=await r.json();e({tasks:s,loading:!1})}catch{e({loading:!1})}},createTask:async(e,n,a,r,s)=>{let i=await fetch(`/api/workspaces/${e}/tasks`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({issueId:n,title:a,description:r,agentConfigId:s})}),o=await i.json();return t().upsertTask(o),o},updateTask:async(e,n,a)=>{let r=await fetch(`/api/workspaces/${e}/tasks/${n}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),s=await r.json();t().upsertTask(s)},deleteTask:async(t,n)=>{await fetch(`/api/workspaces/${t}/tasks/${n}`,{method:"DELETE"}),e(e=>({tasks:e.tasks.filter(e=>e.id!==n)}))},retryTask:async(e,n)=>{let a=await fetch(`/api/workspaces/${e}/tasks/${n}/retry`,{method:"POST"}),r=await a.json();t().upsertTask(r)},cancelTask:async(e,n)=>{let a=await fetch(`/api/workspaces/${e}/tasks/${n}/cancel`,{method:"POST"}),r=await a.json();t().upsertTask(r)},reorderTasks:async(e,t,n)=>{await fetch(`/api/workspaces/${e}/tasks/reorder`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({issueId:t,taskIds:n})})},upsertTask:t=>{e(e=>{let n=e.tasks.findIndex(e=>e.id===t.id);if(n>=0){let a=[...e.tasks];return a[n]=t,{tasks:a}}return{tasks:[...e.tasks,t]}})}}));e.s(["useTaskStore",0,t])},327964,e=>{"use strict";var t=e.i(816709),n=e.i(31807),a=e.i(873111);let r="agent-spaces:issue:",s=(0,t.create)((t,i)=>({workspaceId:null,issues:[],activeIssueId:null,issueSelectSeq:0,loading:!1,loadIssues:async e=>{t({loading:!0});try{let n=await fetch(`/api/workspaces/${e}/issues`),a=await n.json(),s=function(e,t){try{let n=localStorage.getItem(r+e);if(n&&t.some(e=>e.id===n))return n}catch{}return null}(e,a);t({workspaceId:e,issues:a,activeIssueId:s,loading:!1})}catch{t({loading:!1})}},createIssue:async(e,t,n,a,r)=>{let s=await fetch(`/api/workspaces/${e}/issues`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:t,description:n,members:a,workflowId:r})}),o=await s.json();i().upsertIssue(o),i().setActiveIssue(o.id)},setActiveIssue:e=>{let{workspaceId:n}=s.getState();if(n&&e)try{localStorage.setItem(r+n,e)}catch{}t(t=>({activeIssueId:e,issueSelectSeq:t.issueSelectSeq+1}))},updateIssue:async(e,t,n)=>{let a=await fetch(`/api/workspaces/${e}/issues/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}),r=await a.json();i().upsertIssue(r)},updateIssueStatus:async(e,t,n)=>{await fetch(`/api/workspaces/${e}/issues/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:n})})},startIssue:async(t,n)=>{let a=await fetch(`/api/workspaces/${t}/issues/${n}/start`,{method:"POST"});if(!a.ok){let t=await a.json(),{toast:n}=await e.A(930010);n.error(t.error||t.message||"Failed to start issue");return}let r=await a.json();i().upsertIssue(r)},resumeIssue:async(e,t)=>{let n=await fetch(`/api/workspaces/${e}/issues/${t}/resume`,{method:"POST"}),a=await n.json();i().upsertIssue(a)},continueIssue:async(e,t)=>{let n=await fetch(`/api/workspaces/${e}/issues/${t}/continue`,{method:"POST"});if(!n.ok)return;let a=await n.json();i().upsertIssue(a)},interruptIssue:async(e,t)=>{let n=await fetch(`/api/workspaces/${e}/issues/${t}/interrupt`,{method:"POST"});if(!n.ok)return;let a=await n.json();i().upsertIssue(a)},deleteIssue:async(e,t)=>{let r=i().issues.find(e=>e.id===t);if(await fetch(`/api/workspaces/${e}/issues/${t}`,{method:"DELETE"}),i().removeIssue(t),r?.channelId){let{removeChannelLocal:e}=n.useChannelStore.getState();e(r.channelId)}let{tasks:s}=a.useTaskStore.getState(),o=s.filter(e=>e.issueId===t);if(o.length>0){let e=new Set(o.map(e=>e.id));a.useTaskStore.setState(t=>({tasks:t.tasks.filter(t=>!e.has(t.id))}))}},upsertIssue:e=>{t(t=>{let n=t.issues.findIndex(t=>t.id===e.id);if(n>=0){let a=[...t.issues];return a[n]=e,{issues:a}}return{issues:[...t.issues,e]}})},removeIssue:e=>{t(t=>({issues:t.issues.filter(t=>t.id!==e),activeIssueId:t.activeIssueId===e?null:t.activeIssueId}))}}));e.s(["useIssueStore",0,s])},592039,e=>{"use strict";let t=(0,e.i(433721).default)("circle-dot",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]);e.s(["CircleDot",0,t],592039)},381253,e=>{"use strict";let t=(0,e.i(433721).default)("file-code",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]]);e.s(["FileCode",0,t],381253)},950396,e=>{"use strict";var t=e.i(344180),n=e.i(764556),a=e.i(799543);let r=(0,n.createContext)({theme:"system",setTheme:()=>{},resolvedTheme:"light"}),s="agent-spaces-theme",i={light:"#ffffff",dark:"#0f1117"};function o(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function l(e){var t;let n,a="system"===e?o():e,r=document.documentElement;r.classList.remove("light","dark"),r.classList.add(a),r.style.colorScheme=a,t=a,(n=document.querySelector('meta[name="theme-color"]'))||((n=document.createElement("meta")).name="theme-color",document.head.appendChild(n)),n.content=i[t],window.AgentSpacesStatusBar?.setTheme(t)}e.s(["ThemeProvider",0,function({children:e,defaultTheme:c="system"}){(0,a.useServerInsertedHTML)(()=>(0,t.jsx)("script",{dangerouslySetInnerHTML:{__html:`(function(){try{var t=localStorage.getItem('${s}');var d=t==='dark'||((!t||t==='system')&&matchMedia('(prefers-color-scheme:dark)').matches);var r=d?'dark':'light';document.documentElement.classList.add(r);document.documentElement.style.colorScheme=r;var m=document.querySelector('meta[name="theme-color"]');if(!m){m=document.createElement('meta');m.name='theme-color';document.head.appendChild(m)}m.content=d?'${i.dark}':'${i.light}';if(window.AgentSpacesStatusBar){window.AgentSpacesStatusBar.setTheme(r)}}catch(e){}})()`}},"theme-init"));let d=(0,n.useSyncExternalStore)(e=>{let t=window.matchMedia("(prefers-color-scheme: dark)");return t.addEventListener("change",e),()=>t.removeEventListener("change",e)},()=>o(),()=>"light"),u=(0,n.useSyncExternalStore)(e=>(window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)),()=>localStorage.getItem(s)||c,()=>c),p="system"===u?d:u,m=(0,n.useCallback)(e=>{localStorage.setItem(s,e),l(e),window.dispatchEvent(new StorageEvent("storage",{key:s}))},[]);return(0,n.useEffect)(()=>{l(u)},[u,d]),(0,t.jsx)(r.Provider,{value:{theme:u,setTheme:m,resolvedTheme:p},children:e})},"useTheme",0,function(){return(0,n.useContext)(r)}])},974267,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"BailoutToCSR",{enumerable:!0,get:function(){return r}});let a=e.r(981225);function r({reason:e,children:t}){if("u"<typeof window)throw Object.defineProperty(new a.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},404590,(e,t,n)=>{"use strict";function a(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"encodeURIPath",{enumerable:!0,get:function(){return a}})},172441,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"PreloadChunks",{enumerable:!0,get:function(){return l}});let a=e.r(344180),r=e.r(106206),s=e.r(94932),i=e.r(404590),o=e.r(745137);function l({moduleIds:e}){if("u">typeof window)return null;let t=s.workAsyncStorage.getStore();if(void 0===t)return null;let n=[];if(t.reactLoadableManifest&&e){let a=t.reactLoadableManifest;for(let t of e){if(!a[t])continue;let e=a[t].files;n.push(...e)}}if(0===n.length)return null;let c=(0,o.getAssetTokenQuery)();return(0,a.jsx)(a.Fragment,{children:n.map(e=>{let n=`${t.assetPrefix}/_next/${(0,i.encodeURIPath)(e)}${c}`;return e.endsWith(".css")?(0,a.jsx)("link",{precedence:"dynamic",href:n,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,r.preload)(n,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},672479,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return c}});let a=e.r(344180),r=e.r(764556),s=e.r(974267),i=e.r(172441);function o(e){return{default:e&&"default"in e?e.default:e}}let l={loader:()=>Promise.resolve(o(()=>null)),loading:null,ssr:!0},c=function(e){let t={...l,...e},n=(0,r.lazy)(()=>t.loader().then(o)),c=t.loading;function d(e){let o=c?(0,a.jsx)(c,{isLoading:!0,pastDelay:!0,error:null}):null,l=!t.ssr||!!t.loading,d=l?r.Suspense:r.Fragment,u=t.ssr?(0,a.jsxs)(a.Fragment,{children:["u"<typeof window?(0,a.jsx)(i.PreloadChunks,{moduleIds:t.modules}):null,(0,a.jsx)(n,{...e})]}):(0,a.jsx)(s.BailoutToCSR,{reason:"next/dynamic",children:(0,a.jsx)(n,{...e})});return(0,a.jsx)(d,{...l?{fallback:o}:{},children:u})}return d.displayName="LoadableComponent",d}},887836,(e,t,n)=>{"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return r}});let a=e.r(481258)._(e.r(672479));function r(e,t){let n={};"function"==typeof e&&(n.loader=e);let r={...n,...t};return(0,a.default)({...r,modules:r.loadableGenerated?.modules})}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),t.exports=n.default)},564822,e=>{"use strict";var t=e.i(764556);e.s(["useIsMobile",0,function(){let[e,n]=t.useState(void 0);return t.useEffect(()=>{let e=window.matchMedia("(max-width: 767px)"),t=()=>{n(window.innerWidth<768)};return e.addEventListener("change",t),n(window.innerWidth<768),()=>e.removeEventListener("change",t)},[]),!!e}])},304271,485599,e=>{"use strict";function t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,a)}return n}function a(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?n(Object(a),!0).forEach(function(t){var n,r;n=t,r=a[t],(n=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t);if("object"!=typeof a)return a;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):n(Object(a)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,a)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach(function(t){var a;a=n[t],t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function i(e){return function t(){for(var n=this,a=arguments.length,r=Array(a),s=0;s<a;s++)r[s]=arguments[s];return r.length>=e.length?e.apply(this,r):function(){for(var e=arguments.length,a=Array(e),s=0;s<e;s++)a[s]=arguments[s];return t.apply(n,[].concat(r,a))}}}function o(e){return({}).toString.call(e).includes("Object")}function l(e){return"function"==typeof e}var c,d,u=i(function(e,t){throw Error(e[t]||e.default)})({initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"}),p=function(e,t){return o(t)||u("changeType"),Object.keys(t).some(function(t){return!Object.prototype.hasOwnProperty.call(e,t)})&&u("changeField"),t},m=function(e){l(e)||u("selectorType")},h=function(e){l(e)||o(e)||u("handlerType"),o(e)&&Object.values(e).some(function(e){return!l(e)})&&u("handlersType")},f=function(e){e||u("initialIsRequired"),o(e)||u("initialType"),Object.keys(e).length||u("initialContent")};function g(e,t){return l(t)?t(e.current):t}function x(e,t){return e.current=s(s({},e.current),t),t}function y(e,t,n){return l(t)?t(e.current):Object.keys(n).forEach(function(n){var a;return null==(a=t[n])?void 0:a.call(t,e.current[n])}),n}var v={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:"Deprecation warning!\n You are using deprecated way of configuration.\n\n Instead of using\n monaco.config({ urls: { monacoBase: '...' } })\n use\n monaco.config({ paths: { vs: '...' } })\n\n For more please check the link https://github.com/suren-atoyan/monaco-loader#config\n "},b=(c=function(e,t){throw Error(e[t]||e.default)},function e(){for(var t=this,n=arguments.length,a=Array(n),r=0;r<n;r++)a[r]=arguments[r];return a.length>=c.length?c.apply(this,a):function(){for(var n=arguments.length,r=Array(n),s=0;s<n;s++)r[s]=arguments[s];return e.apply(t,[].concat(a,r))}})(v),j=function(e){return(e||b("configIsRequired"),({}).toString.call(e).includes("Object")||b("configType"),e.urls)?(console.warn(v.deprecation),{paths:{vs:e.urls.monacoBase}}):e},w=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}},k={type:"cancelation",msg:"operation is manually canceled"};function S(e){var t=!1,n=new Promise(function(n,a){e.then(function(e){return t?a(k):n(e)}),e.catch(a)});return n.cancel=function(){return t=!0},n}var N=["monaco"],C=function(e){if(Array.isArray(e))return e}(d=({create:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};f(e),h(t);var n={current:e},a=i(y)(n,t),r=i(x)(n),s=i(p)(e),o=i(g)(n);return[function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(e){return e};return m(e),e(n.current)},function(e){(function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduceRight(function(e,t){return t(e)},e)}})(a,r,s,o)(e)}]}}).create({config:{paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}},isInitialized:!1,resolve:null,reject:null,monaco:null}))||function(e){var t=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,a,r,s,i=[],o=!0,l=!1;try{r=(t=t.call(e)).next,!1;for(;!(o=(n=r.call(t)).done)&&(i.push(n.value),2!==i.length);o=!0);}catch(e){l=!0,a=e}finally{try{if(!o&&null!=t.return&&(s=t.return(),Object(s)!==s))return}finally{if(l)throw a}}return i}}(d)||function(e){if(e){if("string"==typeof e)return t(e,2);var n=({}).toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(e,2):void 0}}(d)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),P=C[0],T=C[1];function M(e){return document.body.appendChild(e)}function O(e){var t,n,a=P(function(e){return{config:e.config,reject:e.reject}}),r=(t="".concat(a.config.paths.vs,"/loader.js"),n=document.createElement("script"),t&&(n.src=t),n);return r.onload=function(){return e()},r.onerror=a.reject,r}function E(){var e=P(function(e){return{config:e.config,resolve:e.resolve,reject:e.reject}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(t){var n=t.m||t;I(n),e.resolve(n)},function(t){e.reject(t)})}function I(e){P().monaco||T({monaco:e})}var D=new Promise(function(e,t){return T({resolve:e,reject:t})}),A={config:function(e){var t=j(e),n=t.monaco,r=function(e,t){if(null==e)return{};var n,a,r=function(e,t){if(null==e)return{};var n={};for(var a in e)if(({}).hasOwnProperty.call(e,a)){if(-1!==t.indexOf(a))continue;n[a]=e[a]}return n}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(a=0;a<s.length;a++)n=s[a],-1===t.indexOf(n)&&({}).propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(t,N);T(function(e){return{config:function e(t,n){return Object.keys(n).forEach(function(a){n[a]instanceof Object&&t[a]&&Object.assign(n[a],e(t[a],n[a]))}),a(a({},t),n)}(e.config,r),monaco:n}})},init:function(){var e=P(function(e){return{monaco:e.monaco,isInitialized:e.isInitialized,resolve:e.resolve}});if(!e.isInitialized){if(T({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),S(D);if(window.monaco&&window.monaco.editor)return I(window.monaco),e.resolve(window.monaco),S(D);w(M,O)(E)}return S(D)},__getMonacoInstance:function(){return P(function(e){return e.monaco})}};e.s(["default",0,A],485599);var R=e.i(764556),z={display:"flex",position:"relative",textAlign:"initial"},$={width:"100%"},F={display:"none"},L={display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"},W=function({children:e}){return R.default.createElement("div",{style:L},e)},B=(0,R.memo)(function({width:e,height:t,isEditorReady:n,loading:a,_ref:r,className:s,wrapperProps:i}){return R.default.createElement("section",{style:{...z,width:e,height:t},...i},!n&&R.default.createElement(W,null,a),R.default.createElement("div",{ref:r,style:{...$,...!n&&F},className:s}))}),U=function(e){(0,R.useEffect)(e,[])},H=function(e,t,n=!0){let a=(0,R.useRef)(!0);(0,R.useEffect)(a.current||!n?()=>{a.current=!1}:e,t)};function V(){}function _(e,t,n,a){var r,s,i,o,l,c;return r=e,s=a,r.editor.getModel(q(r,s))||(i=e,o=t,l=n,c=a,i.editor.createModel(o,l,c?q(i,c):void 0))}function q(e,t){return e.Uri.parse(t)}var J=(0,R.memo)(function({original:e,modified:t,language:n,originalLanguage:a,modifiedLanguage:r,originalModelPath:s,modifiedModelPath:i,keepCurrentOriginalModel:o=!1,keepCurrentModifiedModel:l=!1,theme:c="light",loading:d="Loading...",options:u={},height:p="100%",width:m="100%",className:h,wrapperProps:f={},beforeMount:g=V,onMount:x=V}){let[y,v]=(0,R.useState)(!1),[b,j]=(0,R.useState)(!0),w=(0,R.useRef)(null),k=(0,R.useRef)(null),S=(0,R.useRef)(null),N=(0,R.useRef)(x),C=(0,R.useRef)(g),P=(0,R.useRef)(!1);U(()=>{let e=A.init();return e.then(e=>(k.current=e)&&j(!1)).catch(e=>e?.type!=="cancelation"&&console.error("Monaco initialization: error:",e)),()=>{let t;return w.current?(t=w.current?.getModel(),void(o||t?.original?.dispose(),l||t?.modified?.dispose(),w.current?.dispose())):e.cancel()}}),H(()=>{if(w.current&&k.current){let t=w.current.getOriginalEditor(),r=_(k.current,e||"",a||n||"text",s||"");r!==t.getModel()&&t.setModel(r)}},[s],y),H(()=>{if(w.current&&k.current){let e=w.current.getModifiedEditor(),a=_(k.current,t||"",r||n||"text",i||"");a!==e.getModel()&&e.setModel(a)}},[i],y),H(()=>{let e=w.current.getModifiedEditor();e.getOption(k.current.editor.EditorOption.readOnly)?e.setValue(t||""):t!==e.getValue()&&(e.executeEdits("",[{range:e.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),e.pushUndoStop())},[t],y),H(()=>{w.current?.getModel()?.original.setValue(e||"")},[e],y),H(()=>{let{original:e,modified:t}=w.current.getModel();k.current.editor.setModelLanguage(e,a||n||"text"),k.current.editor.setModelLanguage(t,r||n||"text")},[n,a,r],y),H(()=>{k.current?.editor.setTheme(c)},[c],y),H(()=>{w.current?.updateOptions(u)},[u],y);let T=(0,R.useCallback)(()=>{if(!k.current)return;C.current(k.current);let o=_(k.current,e||"",a||n||"text",s||""),l=_(k.current,t||"",r||n||"text",i||"");w.current?.setModel({original:o,modified:l})},[n,t,r,e,a,s,i]),M=(0,R.useCallback)(()=>{!P.current&&S.current&&(w.current=k.current.editor.createDiffEditor(S.current,{automaticLayout:!0,...u}),T(),k.current?.editor.setTheme(c),v(!0),P.current=!0)},[u,c,T]);return(0,R.useEffect)(()=>{y&&N.current(w.current,k.current)},[y]),(0,R.useEffect)(()=>{b||y||M()},[b,y,M]),R.default.createElement(B,{width:m,height:p,isEditorReady:y,loading:d,_ref:S,className:h,wrapperProps:f})}),K=function(e){let t=(0,R.useRef)();return(0,R.useEffect)(()=>{t.current=e},[e]),t.current},X=new Map,Y=(0,R.memo)(function({defaultValue:e,defaultLanguage:t,defaultPath:n,value:a,language:r,path:s,theme:i="light",line:o,loading:l="Loading...",options:c={},overrideServices:d={},saveViewState:u=!0,keepCurrentModel:p=!1,width:m="100%",height:h="100%",className:f,wrapperProps:g={},beforeMount:x=V,onMount:y=V,onChange:v,onValidate:b=V}){let[j,w]=(0,R.useState)(!1),[k,S]=(0,R.useState)(!0),N=(0,R.useRef)(null),C=(0,R.useRef)(null),P=(0,R.useRef)(null),T=(0,R.useRef)(y),M=(0,R.useRef)(x),O=(0,R.useRef)(),E=(0,R.useRef)(a),I=K(s),D=(0,R.useRef)(!1),z=(0,R.useRef)(!1);U(()=>{let e=A.init();return e.then(e=>(N.current=e)&&S(!1)).catch(e=>e?.type!=="cancelation"&&console.error("Monaco initialization: error:",e)),()=>C.current?void(O.current?.dispose(),p?u&&X.set(s,C.current.saveViewState()):C.current.getModel()?.dispose(),C.current.dispose()):e.cancel()}),H(()=>{let i=_(N.current,e||a||"",t||r||"",s||n||"");i!==C.current?.getModel()&&(u&&X.set(I,C.current?.saveViewState()),C.current?.setModel(i),u&&C.current?.restoreViewState(X.get(s)))},[s],j),H(()=>{C.current?.updateOptions(c)},[c],j),H(()=>{C.current&&void 0!==a&&(C.current.getOption(N.current.editor.EditorOption.readOnly)?C.current.setValue(a):a!==C.current.getValue()&&(z.current=!0,C.current.executeEdits("",[{range:C.current.getModel().getFullModelRange(),text:a,forceMoveMarkers:!0}]),C.current.pushUndoStop(),z.current=!1))},[a],j),H(()=>{let e=C.current?.getModel();e&&r&&N.current?.editor.setModelLanguage(e,r)},[r],j),H(()=>{void 0!==o&&C.current?.revealLine(o)},[o],j),H(()=>{N.current?.editor.setTheme(i)},[i],j);let $=(0,R.useCallback)(()=>{if(!(!P.current||!N.current)&&!D.current){M.current(N.current);let l=s||n,p=_(N.current,a||e||"",t||r||"",l||"");C.current=N.current?.editor.create(P.current,{model:p,automaticLayout:!0,...c},d),u&&C.current.restoreViewState(X.get(l)),N.current.editor.setTheme(i),void 0!==o&&C.current.revealLine(o),w(!0),D.current=!0}},[e,t,n,a,r,s,c,d,u,i,o]);return(0,R.useEffect)(()=>{j&&T.current(C.current,N.current)},[j]),(0,R.useEffect)(()=>{k||j||$()},[k,j,$]),E.current=a,(0,R.useEffect)(()=>{j&&v&&(O.current?.dispose(),O.current=C.current?.onDidChangeModelContent(e=>{z.current||v(C.current.getValue(),e)}))},[j,v]),(0,R.useEffect)(()=>{if(j){let e=N.current.editor.onDidChangeMarkers(e=>{let t=C.current.getModel()?.uri;if(t&&e.find(e=>e.path===t.path)){let e=N.current.editor.getModelMarkers({resource:t});b?.(e)}});return()=>{e?.dispose()}}return()=>{}},[j,b]),R.default.createElement(B,{width:m,height:h,isEditorReady:j,loading:l,_ref:P,className:f,wrapperProps:g})});e.s(["DiffEditor",0,J,"Editor",0,Y,"default",0,Y,"useMonaco",0,function(){let[e,t]=(0,R.useState)(A.__getMonacoInstance());return U(()=>{let n;return e||(n=A.init()).then(e=>{t(e)}),()=>n?.cancel()}),e}],304271)},462506,e=>{"use strict";e.i(304271);var t=e.i(485599),t=t;t.default.config({paths:{vs:"/monaco/vs"}}),e.s([],462506)},184591,e=>{"use strict";let t=(0,e.i(433721).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["default",0,t])},683640,e=>{"use strict";var t=e.i(184591);e.s(["Terminal",()=>t.default])},267624,e=>{"use strict";let t=(0,e.i(433721).default)("layout-grid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]);e.s(["LayoutGrid",0,t],267624)},506037,e=>{"use strict";var t=e.i(816709),n=e.i(437122);let a=(0,t.create)((e,t)=>({notifications:[],loaded:!1,load:async t=>{try{let a=await (0,n.fetchWithAuth)(`/api/workspaces/${t}/notifications`),r=await a.json();e({notifications:r,loaded:!0})}catch{e({loaded:!0})}},addNotification:t=>{e(e=>({notifications:[t,...e.notifications]}))},clearAll:async t=>{await (0,n.fetchWithAuth)(`/api/workspaces/${t}/notifications`,{method:"DELETE"}),e({notifications:[]})},markRead:async(t,a)=>{await (0,n.fetchWithAuth)(`/api/workspaces/${t}/notifications/${a}/read`,{method:"PUT"}),e(e=>({notifications:e.notifications.map(e=>e.id===a?{...e,read:!0}:e)}))},markAllRead:async t=>{await (0,n.fetchWithAuth)(`/api/workspaces/${t}/notifications/read-all`,{method:"PUT"}),e(e=>({notifications:e.notifications.map(e=>({...e,read:!0}))}))},reset:()=>e({notifications:[],loaded:!1})}));e.s(["useNotificationStore",0,a])},100559,e=>{"use strict";let t=(0,e.i(433721).default)("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);e.s(["Server",0,t],100559)},894920,e=>{"use strict";var t=e.i(344180),n=e.i(764556),a=e.i(209988),r=e.i(260218),s=e.i(681622),i=e.i(788010),o=e.i(344118),l=e.i(962562),c=e.i(953700),d=e.i(100559),u=e.i(137340);let p=(0,e.i(433721).default)("wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);var m=e.i(244073);e.s(["ServerManagerDialog",0,function({open:e,onOpenChange:h,servers:f,activeId:g,onUpdate:x,onRemove:y,onSwitch:v}){let b=(0,m.useTranslations)("sidebar"),j=(0,m.useTranslations)("common"),[w,k]=n.useState(null),[S,N]=n.useState(""),[C,P]=n.useState(""),[T,M]=n.useState(""),[O,E]=n.useState(""),[I,D]=n.useState(""),[A,R]=n.useState(""),[z,$]=n.useState(""),[F,L]=n.useState(null),W=()=>{k(null),N(""),P(""),M("")},B=()=>{if(!S.trim()||!C.trim())return;let e=C.trim().replace(/\/$/,"");/^https?:\/\//.test(e)||(e="http://"+e),x(f.map(t=>t.id===w?{...t,name:S.trim(),url:e,secret:T.trim()||void 0}:t)),W()},U=n.useCallback(e=>{console.log(`[server-diagnostic] ${e}`),$(t=>`${t}${t?"\n":""}${e}`)},[]),H=async e=>{L(e.id),$("");let t=e.url.replace(/\/$/,""),n=`${t}/api/health`,a=new URL("/ws",t);a.protocol="https:"===a.protocol?"wss:":"ws:",a.searchParams.set("workspaceId","__diagnostic__"),a.searchParams.set("token",e.secret||"__diagnostic__"),U(`time: ${new Date().toISOString()}`),U(`window.origin: ${window.location.origin}`),U(`window.href: ${window.location.href}`),U(`navigator.onLine: ${navigator.onLine}`),U(`target: ${t}`),U(`health: ${n}`);let r=performance.now();try{let e=new AbortController,t=window.setTimeout(()=>e.abort(),1e4),a=await fetch(n,{method:"GET",cache:"no-store",mode:"cors",signal:e.signal});window.clearTimeout(t);let s=await a.text();U(`fetch /api/health: OK ${a.status} ${a.statusText} (${Math.round(performance.now()-r)}ms)`),U(`fetch response: ${s.slice(0,500)||"<empty>"}`)}catch(t){let e=t instanceof Error?t:Error(String(t));U(`fetch /api/health: FAILED ${e.name}: ${e.message} (${Math.round(performance.now()-r)}ms)`)}U(`websocket: ${a.toString()}`),await new Promise(e=>{let t=performance.now(),n=!1,r=(a,r)=>{if(!n){n=!0,U(`${a} (${Math.round(performance.now()-t)}ms)`);try{r?.close()}catch{}e()}};try{let e=new WebSocket(a.toString()),t=window.setTimeout(()=>r("websocket: TIMEOUT",e),1e4);e.onopen=()=>{window.clearTimeout(t),r("websocket: OPEN",e)},e.onerror=()=>{window.clearTimeout(t),r("websocket: ERROR",e)},e.onclose=n=>{window.clearTimeout(t),r(`websocket: CLOSE code=${n.code} reason=${n.reason||"<empty>"}`,e)}}catch(t){let e=t instanceof Error?t:Error(String(t));r(`websocket: FAILED ${e.name}: ${e.message}`)}}),L(null)};return(0,t.jsx)(a.Dialog,{open:e,onOpenChange:e=>{h(e),e||W()},children:(0,t.jsxs)(a.DialogContent,{className:"max-w-md",children:[(0,t.jsxs)(a.DialogHeader,{children:[(0,t.jsx)(a.DialogTitle,{children:b("server.manageServers")}),(0,t.jsx)(a.DialogDescription,{children:b("server.manageDescription")})]}),(0,t.jsx)("div",{className:"space-y-1",children:f.map(e=>(0,t.jsxs)("div",{className:"flex items-center gap-3 rounded-md border px-3 py-2",children:[(0,t.jsx)(d.Server,{className:"size-4 shrink-0 text-muted-foreground"}),w===e.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.Input,{className:"h-7 text-sm flex-1",value:S,onChange:e=>N(e.target.value),placeholder:"Name",autoFocus:!0}),(0,t.jsx)(s.Input,{className:"h-7 text-sm flex-[1.5]",value:C,onChange:e=>P(e.target.value),placeholder:"http://...",onKeyDown:e=>"Enter"===e.key&&e.preventDefault()}),(0,t.jsx)(r.Button,{size:"sm",variant:"ghost",onClick:B,className:"h-7 px-2",children:j("save")}),(0,t.jsx)(r.Button,{size:"sm",variant:"ghost",onClick:W,className:"h-7 px-2",children:j("cancel")})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0 cursor-pointer",onClick:()=>{e.id!==g&&v(e)},children:[(0,t.jsx)("div",{className:"text-sm font-medium truncate",children:e.name}),(0,t.jsx)("div",{className:"text-xs text-muted-foreground truncate",children:e.url})]}),e.id===g?(0,t.jsx)(o.Check,{className:"size-4 shrink-0 text-primary"}):(0,t.jsx)(r.Button,{size:"sm",variant:"ghost",onClick:()=>v(e),className:"h-7 px-2 text-xs shrink-0",children:b("server.switch")}),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p,{className:"size-3.5 shrink-0 text-muted-foreground cursor-pointer hover:text-foreground",onClick:()=>H(e)}),(0,t.jsx)(l.Pencil,{className:"size-3.5 shrink-0 text-muted-foreground cursor-pointer hover:text-foreground",onClick:()=>{k(e.id),N(e.name),P(e.url),M(e.secret||"")}}),"default"!==e.id&&(0,t.jsx)(u.Trash2,{className:"size-3.5 shrink-0 text-muted-foreground cursor-pointer hover:text-destructive",onClick:()=>y(e.id)})]})]})]},e.id))}),null===w&&(0,t.jsxs)("div",{className:"border-t pt-3 mt-2 space-y-2",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-muted-foreground mb-2",children:b("server.newServer")}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(s.Input,{className:"h-8 text-sm",value:O,onChange:e=>E(e.target.value),placeholder:"Name"}),(0,t.jsx)(r.Button,{size:"sm",onClick:()=>{if(!O.trim()||!I.trim())return;let e=I.trim().replace(/\/$/,"");/^https?:\/\//.test(e)||(e="http://"+e),x([...f,{id:Date.now().toString(),name:O.trim(),url:e,secret:A.trim()||void 0}]),E(""),D(""),R("")},disabled:!O.trim()||!I.trim(),children:(0,t.jsx)(c.Plus,{className:"size-4"})})]}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsx)(s.Input,{className:"h-8 text-sm flex-1",value:I,onChange:e=>D(e.target.value),placeholder:"http://..."})}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsx)(s.Input,{className:"h-8 text-sm flex-1",type:"password",value:A,onChange:e=>R(e.target.value),placeholder:b("server.secretOptionalPlaceholder"),onKeyDown:e=>"Enter"===e.key&&e.preventDefault()})})]}),(0,t.jsxs)("div",{className:"border-t pt-3 mt-2 space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-muted-foreground",children:"Network diagnostics"}),(0,t.jsx)(r.Button,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs",disabled:!f.find(e=>e.id===g)||null!==F,onClick:()=>{let e=f.find(e=>e.id===g);e&&H(e)},children:F?"Testing...":"Test active"})]}),(0,t.jsx)(i.Textarea,{readOnly:!0,value:z||"Tap the Wi-Fi icon next to a server, or use Test active.",className:"h-36 resize-none font-mono text-[11px]"})]})]})})}],894920)},757106,e=>{"use strict";let t=(0,e.i(433721).default)("brain",[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]]);e.s(["default",0,t])},990336,e=>{"use strict";var t=e.i(757106);e.s(["Brain",()=>t.default])},549705,e=>{"use strict";var t=e.i(344180),n=e.i(764556),a=e.i(244073),r=e.i(209988),s=e.i(260218),i=e.i(681622),o=e.i(562918),l=e.i(767467),c=e.i(100559),d=e.i(953700),u=e.i(137340),p=e.i(990336),m=e.i(307858),h=e.i(368942);let f={vision:"bg-blue-500/10 text-blue-600 border-blue-200",reasoning:"bg-purple-500/10 text-purple-600 border-purple-200",embedding:"bg-green-500/10 text-green-600 border-green-200"};function g({providers:e,providerModels:n,onEdit:r,onDelete:i,onAddModel:l}){let d=(0,a.useTranslations)("providers");return(0,t.jsxs)("div",{className:"flex flex-col p-2",children:[e.map(e=>{let a=n.find(t=>t.id===e.id),h=a?.models??[];return(0,t.jsxs)("div",{className:"group rounded-lg px-3 py-2.5 hover:bg-muted/50 cursor-pointer transition-colors",onClick:()=>r(e),children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"flex size-8 items-center justify-center rounded-lg bg-primary/10",children:(0,t.jsx)(c.Server,{className:"size-4 text-primary"})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("span",{className:"text-sm font-medium",children:e.name}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground truncate",children:e.apiBase||d("list.noApiBase")})]}),(0,t.jsxs)(o.Badge,{variant:"outline",className:"text-[10px] h-4 px-1.5",children:[h.length," ",d("list.modelsCount")]}),(0,t.jsx)(s.Button,{variant:"ghost",size:"icon-xs",className:"opacity-0 group-hover:opacity-100 transition-opacity",onClick:t=>{t.stopPropagation(),i(e.id)},children:(0,t.jsx)(u.Trash2,{className:"size-3 text-destructive"})})]}),h.length>0&&(0,t.jsx)("div",{className:"mt-2 ml-11 flex flex-wrap gap-1",children:h.map(e=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-0.5 text-[11px] text-muted-foreground",children:[(0,t.jsx)(p.Brain,{className:"size-3"}),e.name,["vision","reasoning","embedding"].map(n=>e[n]?(0,t.jsx)("span",{className:`inline-block rounded px-1 text-[9px] font-medium border ${f[n]}`,children:n[0].toUpperCase()},n):null)]},e.id))}),(0,t.jsxs)(s.Button,{variant:"ghost",size:"xs",className:"mt-1 ml-11 h-6 text-[11px] text-muted-foreground",onClick:t=>{t.stopPropagation(),l(e.name)},children:[(0,t.jsx)(m.ExternalLink,{className:"size-3"}),d("list.addModel")]})]},e.id)}),0===e.length&&(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-muted-foreground",children:[(0,t.jsx)(c.Server,{className:"size-10 mb-2 opacity-30"}),(0,t.jsx)("p",{className:"text-sm",children:d("list.empty")})]})]})}function x({draft:e,onChange:n}){let r=(0,a.useTranslations)("providers");return(0,t.jsx)("div",{className:"flex flex-col gap-5 p-5",children:(0,t.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:r("form.connection")}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground",children:r("form.name")}),(0,t.jsx)(i.Input,{value:e.name||"",onChange:e=>n("name",e.target.value),placeholder:r("form.namePlaceholder")})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground",children:r("form.apiBase")}),(0,t.jsx)(i.Input,{value:e.apiBase||"",onChange:e=>n("apiBase",e.target.value),placeholder:r("form.apiBasePlaceholder")})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground",children:r("form.apiKey")}),(0,t.jsx)(i.Input,{type:"password",value:e.apiKey||"",onChange:e=>n("apiKey",e.target.value),placeholder:r("form.apiKeyPlaceholder")})]})]})})}e.s(["ProvidersDialog",0,function({open:e,onOpenChange:i,onAddModel:o,standalone:c}){let u=(0,a.useTranslations)("providers"),p=(0,a.useTranslations)("common"),{models:m,providers:f,ensure:y,addProvider:v,updateProvider:b,removeProvider:j}=(0,h.useLLMStore)(),[w,k]=(0,n.useState)(null),[S,N]=(0,n.useState)(null),[C,P]=(0,n.useState)(!1),[T,M]=(0,n.useState)(!1),[O,E]=(0,n.useState)(null);(0,n.useEffect)(()=>{e&&(P(!0),E(null),y().finally(()=>P(!1)))},[e,y]);let I=()=>{k(null),N(null)},D=()=>{k(null),N({name:"",apiBase:"",apiKey:""})},A=async()=>{if(S&&S.name){M(!0),E(null);try{let e=!w,t=await fetch(e?"/api/providers":`/api/providers/${w.id}`,{method:e?"POST":"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(S)});if(!t.ok)throw Error();let n=await t.json();e?v(n):b(n),I()}catch{E(u("error.saveFailed"))}finally{M(!1)}}},R=async e=>{if(confirm(u("confirm.delete"))){M(!0);try{if(!(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok)throw Error();j(e),w?.id===e&&I()}catch{E(u("error.deleteFailed"))}finally{M(!1)}}},z=(0,t.jsxs)(t.Fragment,{children:[!c&&(0,t.jsxs)("div",{className:"flex items-center gap-3 border-b px-5 py-4",children:[S&&(0,t.jsx)(s.Button,{variant:"ghost",size:"icon-sm",onClick:I,children:(0,t.jsx)(l.ArrowLeft,{className:"size-4"})}),(0,t.jsxs)(r.DialogHeader,{className:"flex-1 space-y-0",children:[(0,t.jsx)(r.DialogTitle,{className:"text-base",children:S?w?u("dialog.editTitle"):u("dialog.addTitle"):u("dialog.title")}),(0,t.jsx)(r.DialogDescription,{className:"text-xs",children:S?u("dialog.editDescription"):u("dialog.listDescription")})]}),!S&&(0,t.jsxs)(s.Button,{variant:"outline",size:"sm",onClick:D,className:"mr-6",children:[(0,t.jsx)(d.Plus,{className:"size-3.5"}),u("dialog.add")]})]}),c&&!S&&(0,t.jsx)("div",{className:"flex items-center justify-end px-5 py-3 border-b",children:(0,t.jsxs)(s.Button,{variant:"outline",size:"sm",onClick:D,children:[(0,t.jsx)(d.Plus,{className:"size-3.5"}),u("dialog.add")]})}),c&&S&&(0,t.jsxs)("div",{className:"flex items-center gap-3 px-5 py-3 border-b",children:[(0,t.jsx)(s.Button,{variant:"ghost",size:"icon-sm",onClick:I,children:(0,t.jsx)(l.ArrowLeft,{className:"size-4"})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("h2",{className:"text-base font-medium truncate",children:w?u("dialog.editTitle"):u("dialog.addTitle")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:u("dialog.editDescription")})]})]}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto",children:[O&&(0,t.jsx)("div",{className:"mx-5 mt-4 rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-xs text-destructive",children:O}),C?(0,t.jsx)("div",{className:"py-12 text-center text-sm text-muted-foreground",children:u("dialog.loading")}):S?(0,t.jsx)(x,{draft:S,onChange:(e,t)=>{N(n=>n?{...n,[e]:t}:n)}}):(0,t.jsx)(g,{providers:f,providerModels:f.map(e=>{let t;return{id:e.id,models:(t=e.name,m.filter(e=>e.provider===t))}}),onEdit:e=>{k(e),N({...e})},onDelete:R,onAddModel:e=>{c||i(!1),o(e)}})]}),S&&(0,t.jsxs)("div",{className:"flex justify-end gap-2 border-t px-5 py-3",children:[(0,t.jsx)(s.Button,{variant:"outline",size:"sm",onClick:I,disabled:T,children:p("cancel")}),(0,t.jsx)(s.Button,{size:"sm",onClick:A,disabled:T||!S.name,children:p(T?"saving":"save")})]})]});return c?(0,t.jsx)("div",{className:"h-full flex flex-col",children:z}):(0,t.jsx)(r.Dialog,{open:e,onOpenChange:e=>{e||I(),i(e)},children:(0,t.jsx)(r.DialogContent,{className:"sm:max-w-2xl max-h-[85vh] flex flex-col p-0 gap-0",children:z})})}])},842809,203922,e=>{"use strict";let t=new Map;function n(e,n,a){return null==e?"":(function(e,n){let a=JSON.stringify({locale:e,options:n}),r=t.get(a);if(r)return r;let s=new Intl.NumberFormat(e,n);return t.set(a,s),s})(n,a).format(e)}e.s(["formatNumber",0,n,"formatNumberValue",0,function(e,t,a){return null==e?"":a?n(e,t,a):n(e/100,t,{style:"percent"})}],842809),e.s(["valueToPercent",0,function(e,t,n){return(e-t)*100/(n-t)}],203922)},953700,e=>{"use strict";let t=(0,e.i(433721).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,t],953700)},344118,e=>{"use strict";var t=e.i(50153);e.s(["Check",()=>t.default])},515104,e=>{"use strict";function t(){return"__FLUTTER_INTERNALS__"in window}function n(){return t()&&"u">typeof navigator&&/android/i.test(navigator.userAgent)}async function a(){return t()?d():"Notification"in window?l(Notification.permission):"unsupported"}async function r(){return t()?u():o()}async function s(e,n,a={}){return t()?p(e,n,a):function(e,t){if(!("Notification"in window))throw Error("Notification API not available");if("granted"!==Notification.permission)throw Error(`Notification permission is "${Notification.permission}", not "granted"`);try{new Notification(e,{body:t,icon:"/favicon.ico"}).onerror=()=>{console.warn("[NativeNotification] browser notification error event")}}catch(e){throw Error(`Failed to create Notification: ${e instanceof Error?e.message:e}`)}}(e,n)}async function i(e){if(n())return s("Agent Spaces",e,{id:10001,ongoing:!0})}async function o(){return"Notification"in window?l(await Notification.requestPermission()):"unsupported"}function l(e){switch(e){case"granted":return"granted";case"denied":return"denied";default:return"default"}}function c(){return window.__flutterBridge??null}async function d(){try{let e=c();if(!e)return"unsupported";let t=await e.invoke("getNotificationPermission",null);return!0===t?"granted":"default"}catch{return"unsupported"}}async function u(){try{let e=c();if(!e)return"unsupported";let t=await e.invoke("requestNotificationPermission",null);return!0===t?"granted":"denied"}catch{return"unsupported"}}async function p(e,t,n){try{let a=c();if(!a)return;await a.invoke("sendNotification",{title:e,body:t,...n})}catch{}}e.s(["getNotificationPermission",0,a,"isFlutterEnvironment",0,t,"isNativeAndroidEnvironment",0,n,"isNativeEnvironment",0,function(){return t()},"requestNotificationPermission",0,r,"sendAndroidOngoingTaskNotification",0,i,"sendNativeNotification",0,s])},233297,e=>{"use strict";var t=e.i(515104);function n(e){let[t,n=""]=e.split("#",2),[a,r=""]=t.split("?",2);if(!a.startsWith("/")||a.startsWith("/api/"))return e;if("/"===a)return`/${r?`?${r}`:""}${n?`#${n}`:""}`;if(a.startsWith("/workspace/")){let e=a.slice(11).split("/")[0],t=new URLSearchParams(r);return t.set("workspaceId",e),`/workspace/_.html${t.toString()?`?${t.toString()}`:""}${n?`#${n}`:""}`}let s=a.endsWith(".html")?a:`${a}.html`;return`${s}${r?`?${r}`:""}${n?`#${n}`:""}`}e.s(["tauriNavigate",0,function(e,a,r=!1){let s=(0,t.isFlutterEnvironment)()&&"8080"===window.location.port;(0,t.isFlutterEnvironment)()&&!s?r?e.replace(a):e.push(a):(a=n(a),r?window.location.replace(a):window.location.href=a)},"toStaticHref",0,n])},437122,286117,e=>{"use strict";var t=e.i(523592),n=e.i(233297);function a(e){return"/index.html"===e?"/":e.endsWith(".html")?e.slice(0,-5):e}function r(e){return"/login"===a(e)}e.s(["isLoginPath",0,r,"isWorkspacePath",0,function(e){return a(e).startsWith("/workspace/")},"workspaceIdFromLocation",0,function(e,t){let n=new URLSearchParams(t).get("workspaceId");if(n)return n;let r=a(e).match(/^\/workspace\/([^/]+)/);return r?.[1]??null}],286117);let s="agent-spaces-token",i="agent-spaces-auth-verified";function o(){return`${s}:${(0,t.loadActiveId)()}`}function l(){let e=localStorage.getItem(o());if(null!==e)return e;let n=(0,t.getActiveServer)()?.secret;return void 0!==n?n:null}function c(){localStorage.removeItem(o()),localStorage.removeItem(i)}function d(){let e=l();return null===e?{}:{Authorization:`Bearer ${e}`}}async function u(e,a){let s=function(e){if("string"!=typeof e||e.startsWith("http"))return e;let n=(0,t.getActiveServerUrl)();return n?`${n}${e.startsWith("/")?"":"/"}${e}`:e}(e),i={...d(),...a?.headers},o=await fetch(s,{...a,headers:i});return(401===o.status||403===o.status)&&(c(),r(window.location.pathname)||window.location.replace((0,n.toStaticHref)("/login"))),o}e.s(["authHeaders",0,d,"fetchWithAuth",0,u,"getToken",0,l,"isAuthenticated",0,function(){return"1"===localStorage.getItem(i)},"removeToken",0,c,"setToken",0,function(e){localStorage.setItem(o(),e),localStorage.setItem(i,"1"),localStorage.removeItem(s)}],437122)},962562,995684,e=>{"use strict";let t=(0,e.i(433721).default)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);e.s(["default",0,t],995684),e.s(["Pencil",0,t],962562)},612505,e=>{"use strict";let t=(0,e.i(433721).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["default",0,t])},511800,e=>{"use strict";var t=e.i(612505);e.s(["AlertCircle",()=>t.default])},660748,e=>{"use strict";var t,n=e.i(344180);e.s([],606106),e.i(606106),e.i(8890);var a=e.i(764556),r=e.i(106045),s=e.i(236706),i=e.i(842809),o=e.i(969490),l=e.i(267805);let c=a.createContext(void 0);function d(){let e=a.useContext(c);if(void 0===e)throw Error((0,l.default)(51));return e}let u=((t={}).complete="data-complete",t.indeterminate="data-indeterminate",t.progressing="data-progressing",t),p={status:e=>"progressing"===e?{[u.progressing]:""}:"complete"===e?{[u.complete]:""}:"indeterminate"===e?{[u.indeterminate]:""}:null};function m(e,t){return null==t?"indeterminate progress":e||`${t}%`}let h=a.forwardRef(function(e,t){let{format:l,getAriaValueText:d=m,locale:u,max:h=100,min:f=0,value:g,render:x,className:y,children:v,style:b,...j}=e,[w,k]=a.useState(),S=(0,r.useValueAsRef)(l),N="indeterminate";Number.isFinite(g)&&(N=g===h?"complete":"progressing");let C=(0,i.formatNumberValue)(g,u,S.current),P=a.useMemo(()=>({status:N}),[N]),T={"aria-labelledby":w,"aria-valuemax":h,"aria-valuemin":f,"aria-valuenow":g??void 0,"aria-valuetext":d(C,g),role:"progressbar",children:(0,n.jsxs)(a.Fragment,{children:[v,(0,n.jsx)("span",{role:"presentation",style:s.visuallyHidden,children:"x"})]})},M=a.useMemo(()=>({formattedValue:C,max:h,min:f,setLabelId:k,state:P,status:N,value:g}),[C,h,f,k,P,N,g]),O=(0,o.useRenderElement)("div",e,{state:P,ref:t,props:[T,j],stateAttributesMapping:p});return(0,n.jsx)(c.Provider,{value:M,children:O})}),f=a.forwardRef(function(e,t){let{render:n,className:a,style:r,...s}=e,{state:i}=d();return(0,o.useRenderElement)("div",e,{state:i,ref:t,props:s,stateAttributesMapping:p})});var g=e.i(203922);let x=a.forwardRef(function(e,t){let{render:n,className:r,style:s,...i}=e,{max:l,min:c,value:u,state:m}=d(),h=Number.isFinite(u)&&null!==u?(0,g.valueToPercent)(u,c,l):null,f=a.useCallback(()=>null==h?{}:{insetInlineStart:0,height:"inherit",width:`${h}%`},[h]);return(0,o.useRenderElement)("div",e,{state:m,ref:t,props:[{style:f()},i],stateAttributesMapping:p})}),y=a.forwardRef(function(e,t){let{className:n,render:a,children:r,style:s,...i}=e,{value:l,formattedValue:c,state:u}=d(),m=null==l?"indeterminate":c,h=null==l?null:c;return(0,o.useRenderElement)("span",e,{state:u,ref:t,props:[{"aria-hidden":!0,children:"function"==typeof r?r(m,l):h},i],stateAttributesMapping:p})});var v=e.i(559713);let b=a.forwardRef(function(e,t){let{render:n,className:a,style:r,id:s,...i}=e,{setLabelId:l,state:c}=d(),u=(0,v.useRegisteredLabelId)(s,l);return(0,o.useRenderElement)("span",e,{state:c,ref:t,props:[{id:u,role:"presentation"},i],stateAttributesMapping:p})});e.s(["Indicator",0,x,"Label",0,b,"Root",0,h,"Track",0,f,"Value",0,y],729535);var j=e.i(729535),j=j,w=e.i(465458);function k({className:e,...t}){return(0,n.jsx)(j.Track,{className:(0,w.cn)("relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted",e),"data-slot":"progress-track",...t})}function S({className:e,...t}){return(0,n.jsx)(j.Indicator,{"data-slot":"progress-indicator",className:(0,w.cn)("h-full bg-primary transition-all",e),...t})}e.s(["Progress",0,function({className:e,children:t,value:a,...r}){return(0,n.jsxs)(j.Root,{value:a,"data-slot":"progress",className:(0,w.cn)("flex flex-wrap gap-3",e),...r,children:[t,(0,n.jsx)(k,{children:(0,n.jsx)(S,{})})]})},"ProgressIndicator",0,S,"ProgressLabel",0,function({className:e,...t}){return(0,n.jsx)(j.Label,{className:(0,w.cn)("text-sm font-medium",e),"data-slot":"progress-label",...t})},"ProgressTrack",0,k],660748)},361421,e=>{"use strict";let t=(0,e.i(433721).default)("folder-search",[["path",{d:"M10.7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v4.1",key:"1bw5m7"}],["path",{d:"m21 21-1.9-1.9",key:"1g2n9r"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}]]);e.s(["default",0,t])},244644,e=>{"use strict";var t=e.i(361421);e.s(["FolderSearch",()=>t.default])},841734,e=>{"use strict";var t=e.i(344180),n=e.i(764556),a=e.i(244073),r=e.i(887836),s=e.i(209988),i=e.i(260218),o=e.i(681622),l=e.i(191118),c=e.i(239340),d=e.i(460578),u=e.i(996652),p=e.i(917955),m=e.i(887354),h=e.i(401058),f=e.i(137340),g=e.i(953700),x=e.i(962562),y=e.i(129981),v=e.i(193251),b=e.i(977694),j=e.i(513501),w=e.i(989484);let k=(0,r.default)(()=>e.A(863812).then(e=>e.default),{loadableGenerated:{modules:[158480]},ssr:!1,loading:()=>(0,t.jsx)("div",{className:"flex items-center justify-center h-full text-muted-foreground text-sm",children:"Loading editor..."})});e.s(["OutputStylesDialog",0,function({open:e,onOpenChange:r,standalone:S}){let N=(0,a.useTranslations)("outputStyles"),C=(0,a.useTranslations)("common"),[P,T]=(0,n.useState)("local"),[M,O]=(0,n.useState)([]),[E,I]=(0,n.useState)([]),[D,A]=(0,n.useState)(!1),[R,z]=(0,n.useState)(""),[$,F]=(0,n.useState)([]),[L,W]=(0,n.useState)(!1),[B,U]=(0,n.useState)(new Set),[H,V]=(0,n.useState)(!1),[_,q]=(0,n.useState)([]),[J,K]=(0,n.useState)(null),[X,Y]=(0,n.useState)(!1),[G,Q]=(0,n.useState)(""),[Z,ee]=(0,n.useState)(""),[et,en]=(0,n.useState)(""),[ea,er]=(0,n.useState)(!1),[es,ei]=(0,n.useState)(null),[eo,el]=(0,n.useState)([]),[ec,ed]=(0,n.useState)(!1),eu=(0,n.useCallback)(async()=>{A(!0);try{let e=await fetch("/api/output-styles");e.ok&&O(await e.json())}catch{}A(!1)},[]),ep=(0,n.useCallback)(async()=>{try{let e=await fetch("/api/output-styles/agents");e.ok&&I(await e.json())}catch{}},[]),em=(0,n.useCallback)(async()=>{W(!0);try{let e=await fetch("/public/output-styles/index.json");e.ok&&F(await e.json())}catch{}W(!1)},[]);(0,n.useEffect)(()=>{(e||S)&&(eu(),ep(),em())},[e,S,eu,ep,em]);let eh=new Set(M.filter(e=>e.storeId).map(e=>e.storeId));function ef(e){let t=e.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n?/);if(!t)return{content:e};let n=t[1],a=e.slice(t[0].length),r=n.match(/^name:\s*(.+)$/m),s=n.match(/^description:\s*(.+)$/m);return{name:r?.[1]?.trim(),description:s?.[1]?.trim(),content:a}}let eg=async()=>{if(0!==_.length){if(1===_.length){let e=await _[0].file.text(),t=ef(e),n=t.name||_[0].file.name.replace(/\.(md|txt|markdown)$/i,"");q([]),V(!1),K(null),Y(!0),Q(n),ee(t.description||""),en(t.content||e);return}for(let e of _){let t=await e.file.text(),n=ef(t),a=n.name||e.file.name.replace(/\.(md|txt|markdown)$/i,"");await fetch("/api/output-styles",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:a,content:n.content||t,description:n.description})})}q([]),V(!1),eu()}},ex=async e=>{if(!(eh.has(e.id)||B.has(e.id))){U(t=>new Set(t).add(e.id));try{let t=await fetch(`/public/output-styles/${e.filename}`);if(!t.ok)return;let n=await t.text(),a=ef(n),r=await fetch("/api/output-styles",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e.name,content:a.content||n,storeId:e.id,description:a.description})});if(r.ok){let e=await r.json();O(t=>[...t,e])}}catch{}U(t=>{let n=new Set(t);return n.delete(e.id),n})}},ey=()=>{K(null),Y(!1),Q(""),ee(""),en("")},ev=async()=>{if(G.trim()&&et.trim()){er(!0);try{let e=J?`/api/output-styles/${J.id}`:"/api/output-styles",t=J?"PUT":"POST",n=await fetch(e,{method:t,headers:{"Content-Type":"application/json"},body:JSON.stringify({name:G,content:et,description:Z||void 0})});if(n.ok){let e=await n.json();O(t=>J?t.map(t=>t.id===e.id?e:t):[...t,e]),ey()}}catch{}er(!1)}},eb=async e=>{try{(await fetch(`/api/output-styles/${e.id}`,{method:"DELETE"})).ok&&O(t=>t.filter(t=>t.id!==e.id))}catch{}},ej=async()=>{if(es&&0!==eo.length){ed(!0);try{await fetch(`/api/output-styles/${es.id}/apply`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agentIds:eo})}),ei(null)}catch{}ed(!1)}},ew=M.filter(e=>{if(!R)return!0;let t=R.toLowerCase();return e.name.toLowerCase().includes(t)||e.content.toLowerCase().includes(t)}),ek=$.filter(e=>{if(!R)return!0;let t=R.toLowerCase();return e.name.toLowerCase().includes(t)||e.id.toLowerCase().includes(t)}),eS=(S||e)&&!es&&!J&&!X,eN=(0,t.jsx)("div",{className:"flex items-center gap-1 border-b border-border px-1",children:[["local",w.FileText,N("tabLocal")],["store",j.Store,N("tabStore")]].map(([e,n,a])=>(0,t.jsxs)("button",{onClick:()=>T(e),className:`flex items-center gap-1.5 px-3 py-2 text-sm font-medium border-b-2 transition-colors ${P===e?"border-primary text-foreground":"border-transparent text-muted-foreground hover:text-foreground"}`,children:[(0,t.jsx)(n,{className:"size-3.5"}),a]},e))}),eC=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 ml-auto shrink-0 pt-2",children:[(0,t.jsxs)(u.Popover,{open:H,onOpenChange:V,children:[(0,t.jsx)(u.PopoverTrigger,{render:(0,t.jsxs)(i.Button,{variant:"outline",size:"sm",children:[(0,t.jsx)(y.Upload,{className:"size-3.5 mr-1"}),N("import")]})}),(0,t.jsx)(u.PopoverContent,{className:"w-80",align:"end",children:(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:N("importTitle")}),(0,t.jsx)(d.FileUpload,{value:_,onChange:q,accept:{"text/markdown":[".md",".txt"],"":[".md",".txt"]},placeholder:N("importPlaceholder"),maxFiles:10}),(0,t.jsx)(i.Button,{size:"sm",onClick:eg,disabled:0===_.length,className:"w-full",children:N("importConfirm")})]})})]}),(0,t.jsxs)(i.Button,{variant:"outline",size:"sm",onClick:()=>{K(null),Y(!0),Q(""),ee(""),en("")},children:[(0,t.jsx)(g.Plus,{className:"size-3.5 mr-1"}),N("create")]})]}),(0,t.jsx)(l.ScrollArea,{className:"flex-1",children:D?(0,t.jsx)("div",{className:"flex items-center justify-center py-12 text-muted-foreground text-sm",children:C("loading")}):0===ew.length?(0,t.jsx)("div",{className:"flex items-center justify-center py-12 text-muted-foreground text-sm",children:N("empty")}):(0,t.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 pr-2",children:ew.map(e=>(0,t.jsx)("div",{className:"rounded-xl border border-border bg-background p-4 hover:bg-accent/30 transition-colors cursor-pointer",onClick:()=>{K(e),Y(!1),Q(e.name),ee(e.description||""),en(e.content)},children:(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,t.jsx)(x.Pencil,{className:"size-3.5 text-muted-foreground shrink-0"}),(0,t.jsx)("span",{className:"font-medium text-sm truncate",children:e.name})]}),(0,t.jsxs)("div",{className:"flex items-center gap-0.5 shrink-0",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)(i.Button,{variant:"outline",size:"sm",className:"h-6 px-1.5 text-xs",onClick:()=>{ei(e),el([])},children:[(0,t.jsx)(b.Rocket,{className:"size-3 mr-0.5"}),N("apply")]}),(0,t.jsxs)(p.DropdownMenu,{children:[(0,t.jsx)(p.DropdownMenuTrigger,{render:(0,t.jsx)(i.Button,{variant:"ghost",size:"icon",className:"size-6"}),children:(0,t.jsx)(h.MoreVertical,{className:"size-3"})}),(0,t.jsx)(p.DropdownMenuContent,{align:"end",children:(0,t.jsxs)(p.DropdownMenuItem,{className:"text-destructive focus:text-destructive",onClick:()=>eb(e),children:[(0,t.jsx)(f.Trash2,{className:"size-3 mr-1.5"}),N("delete")]})})]})]})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-3",children:e.description||e.content.slice(0,200)})]})},e.id))})})]}),eP=(0,t.jsx)(l.ScrollArea,{className:"flex-1",children:L?(0,t.jsx)("div",{className:"flex items-center justify-center py-12 text-muted-foreground text-sm",children:C("loading")}):0===ek.length?(0,t.jsx)("div",{className:"flex items-center justify-center py-12 text-muted-foreground text-sm",children:N("storeEmpty")}):(0,t.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 pr-2",children:ek.map(e=>{let n=eh.has(e.id),a=B.has(e.id);return(0,t.jsx)("div",{className:"rounded-xl border border-border bg-background p-4 hover:bg-accent/30 transition-colors",children:(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,t.jsx)(j.Store,{className:"size-3.5 text-muted-foreground shrink-0"}),(0,t.jsx)("span",{className:"font-medium text-sm truncate",children:e.name})]}),(0,t.jsx)(i.Button,{variant:n?"ghost":"outline",size:"sm",className:"h-6 px-1.5 text-xs shrink-0",disabled:n||a,onClick:()=>ex(e),children:n?(0,t.jsx)(t.Fragment,{children:N("imported")}):a?(0,t.jsx)(t.Fragment,{children:N("importing")}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(v.Download,{className:"size-3 mr-0.5"}),N("importTo")]})})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:e.id})]})},e.id)})})}),eT=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.DialogHeader,{children:(0,t.jsx)("div",{className:"flex items-center justify-between pr-8",children:(0,t.jsxs)("div",{className:"hidden md:block",children:[S?(0,t.jsx)("h2",{className:"text-base font-semibold",children:N("title")}):(0,t.jsx)(s.DialogTitle,{children:N("title")}),S?(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:N("description")}):(0,t.jsx)(s.DialogDescription,{children:N("description")})]})})}),eN,(0,t.jsx)("div",{className:"flex flex-1 min-h-0 gap-4 pt-2",children:(0,t.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-3",children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(m.Search,{className:"size-3.5 absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),(0,t.jsx)(o.Input,{value:R,onChange:e=>z(e.target.value),placeholder:N("search"),className:"pl-8"})]}),"local"===P?eC:eP]})})]});return(0,t.jsxs)(t.Fragment,{children:[S&&eS&&(0,t.jsx)("div",{className:"h-full flex flex-col",children:eT}),!S&&(0,t.jsx)(s.Dialog,{open:eS,onOpenChange:r,children:(0,t.jsx)(s.DialogContent,{className:"!w-[80vw] !max-w-[80vw] !h-[80vh] flex flex-col",children:eT})}),(0,t.jsx)(s.Dialog,{open:!!J||X,onOpenChange:e=>{e||ey()},children:(0,t.jsxs)(s.DialogContent,{className:"sm:max-w-2xl h-[80vh] flex flex-col",children:[(0,t.jsxs)(s.DialogHeader,{children:[(0,t.jsx)(s.DialogTitle,{children:J?N("editTitle",{name:J.name}):N("createTitle")}),(0,t.jsx)(s.DialogDescription,{children:N("editDescription")})]}),(0,t.jsx)(o.Input,{value:G,onChange:e=>Q(e.target.value),placeholder:N("namePlaceholder")}),(0,t.jsx)(o.Input,{value:Z,onChange:e=>ee(e.target.value),placeholder:N("descriptionPlaceholder")}),(0,t.jsx)("div",{className:"flex-1 min-h-0 overflow-hidden rounded-md border border-border",children:(0,t.jsx)(k,{height:"100%",language:"markdown",value:et,onChange:e=>en(e||""),theme:"vs-dark",options:{fontSize:13,minimap:{enabled:!1},scrollBeyondLastLine:!1,padding:{top:8},renderLineHighlight:"gutter",wordWrap:"on"}})}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,t.jsx)(i.Button,{variant:"outline",onClick:ey,disabled:ea,children:C("cancel")}),(0,t.jsx)(i.Button,{onClick:ev,disabled:ea||!G.trim()||!et.trim(),children:C(ea?"saving":"save")})]})]})}),(0,t.jsx)(c.AgentPickerDialog,{open:!!es,onClose:()=>ei(null),onConfirm:ej,title:N("applyTitle",{name:es?.name||""}),description:N("applyDescription"),agents:E.map(e=>({id:e.id,name:e.name,avatarUrl:e.avatarUrl,description:e.description})),selected:eo,onToggle:e=>el(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]),cancelText:C("cancel"),confirmText:N("applyConfirm",{count:eo.length}),loading:ec})]})}])},255742,e=>{"use strict";let t=(0,e.i(433721).default)("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);e.s(["Star",0,t],255742)},111343,e=>{"use strict";let t=(0,e.i(433721).default)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);e.s(["Save",0,t],111343)},973767,e=>{"use strict";let t=(0,e.i(433721).default)("star-off",[["path",{d:"m10.344 4.688 1.181-2.393a.53.53 0 0 1 .95 0l2.31 4.679a2.12 2.12 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.237 3.152",key:"19ctli"}],["path",{d:"m17.945 17.945.43 2.505a.53.53 0 0 1-.771.56l-4.618-2.428a2.12 2.12 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.12 2.12 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a8 8 0 0 0 .4-.099",key:"ptqqvy"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);e.s(["StarOff",0,t],973767)},22906,191202,e=>{"use strict";var t=e.i(344180),n=e.i(764556),a=e.i(244073),r=e.i(887836),s=e.i(209988),i=e.i(260218),o=e.i(681622),l=e.i(788010),c=e.i(191118),d=e.i(917955),u=e.i(996652),p=e.i(188815),m=e.i(611176),h=e.i(239340),f=e.i(255742),g=e.i(973767),x=e.i(129981),y=e.i(887354);let v=(0,e.i(433721).default)("plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]]);e.s(["Plug",0,v],191202);var b=e.i(401058),j=e.i(137340),w=e.i(977694),k=e.i(111343),S=e.i(465458);e.i(462506);let N=(0,r.default)(()=>e.A(863812).then(e=>e.default),{loadableGenerated:{modules:[158480]},ssr:!1,loading:()=>(0,t.jsx)("div",{className:"flex items-center justify-center h-full text-muted-foreground text-sm",children:"Loading editor..."})});e.s(["McpsDialog",0,function({open:e,onOpenChange:r,standalone:C}){let P=(0,a.useTranslations)("mcps"),T=(0,a.useTranslations)("common"),[M,O]=(0,n.useState)([]),[E,I]=(0,n.useState)([]),[D,A]=(0,n.useState)(!1),[R,z]=(0,n.useState)(""),[$,F]=(0,n.useState)("all"),[L,W]=(0,n.useState)(""),[B,U]=(0,n.useState)(!1),[H,V]=(0,n.useState)(""),[_,q]=(0,n.useState)(""),[J,K]=(0,n.useState)(null),[X,Y]=(0,n.useState)([]),[G,Q]=(0,n.useState)(null),[Z,ee]=(0,n.useState)(""),et=(0,n.useCallback)(async()=>{A(!0);try{let e=await fetch("/api/mcps");e.ok&&O(await e.json())}catch{}A(!1)},[]),en=(0,n.useCallback)(async()=>{try{let e=await fetch("/api/agents/presets");if(e.ok){let t=await e.json();I(t.map(e=>({id:e.id,name:e.name,avatarUrl:e.avatarUrl,description:e.description})))}}catch{}},[]);(0,n.useEffect)(()=>{(e||C)&&(et(),en())},[e,C,et,en]);let ea=async e=>{try{let t=await fetch(`/api/mcps/${encodeURIComponent(e.name)}/favorite`,{method:"POST"});if(t.ok){let{favorited:n}=await t.json();O(t=>t.map(t=>t.name===e.name?{...t,favorited:n}:t))}}catch{}},er=async()=>{q("");try{JSON.parse(H)}catch{q(P("importInvalidJson"));return}try{let e=await fetch("/api/mcps/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonText:H})});if(e.ok)V(""),U(!1),et();else{let t=await e.json();q(t.error||P("importFailed"))}}catch{q(P("importFailed"))}},es=async()=>{let e;if(G){try{e=JSON.parse(Z)}catch{return}try{(await fetch(`/api/mcps/${encodeURIComponent(G.name)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({config:e})})).ok&&(O(t=>t.map(t=>t.name===G.name?{...t,config:e}:t)),Q(null))}catch{}}},ei=async e=>{try{(await fetch(`/api/mcps/${encodeURIComponent(e.name)}`,{method:"DELETE"})).ok&&O(t=>t.filter(t=>t.name!==e.name))}catch{}},eo=async()=>{if(J){for(let e of E){let t=J.boundAgents.some(t=>t.id===e.id),n=X.includes(e.id);if(t&&!n){let t=await fetch(`/api/agents/presets/${e.id}`);if(!t.ok)continue;let n=await t.json(),a=n.mcps||{},r={...a.mcpServers||{}};delete r[J.name],await fetch(`/api/agents/presets/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({...n,mcps:{...a,mcpServers:r}})})}else if(!t&&n){let t=await fetch(`/api/agents/presets/${e.id}`);if(!t.ok)continue;let n=await t.json(),a=n.mcps||{},r={...a.mcpServers||{}};J.name in r||(r[J.name]=J.config,await fetch(`/api/agents/presets/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({...n,mcps:{...a,mcpServers:r}})}))}}K(null),et()}},el=M.filter(e=>{if(R){let t=R.toLowerCase();if(!e.name.toLowerCase().includes(t)&&!e.description.toLowerCase().includes(t))return!1}return("favorites"!==$||!!e.favorited)&&("agent"!==$||!L||!!e.boundAgents.some(e=>e.id===L))}),ec=(C||e)&&!J&&!G,ed=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.DialogHeader,{children:(0,t.jsxs)("div",{className:"flex items-center justify-end pr-8 pt-2",children:[(0,t.jsxs)("div",{className:"hidden md:block",children:[C?(0,t.jsx)("h2",{className:"text-base font-semibold",children:P("title")}):(0,t.jsx)(s.DialogTitle,{children:P("title")}),C?(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:P("description")}):(0,t.jsx)(s.DialogDescription,{children:P("description")})]}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsxs)(u.Popover,{open:B,onOpenChange:U,children:[(0,t.jsx)(u.PopoverTrigger,{render:(0,t.jsxs)(i.Button,{variant:"outline",size:"sm",children:[(0,t.jsx)(x.Upload,{className:"size-3.5 mr-1"}),P("import")]})}),(0,t.jsx)(u.PopoverContent,{className:"w-96",align:"end",children:(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:P("importTitle")}),(0,t.jsx)(l.Textarea,{value:H,onChange:e=>{V(e.target.value),q("")},placeholder:'{\n "mcpServers": {\n "server-name": {\n "command": "npx",\n "args": ["-y", "package"],\n "env": {}\n }\n }\n}',className:"font-mono text-xs min-h-[180px] resize-none"}),_&&(0,t.jsx)("p",{className:"text-xs text-destructive",children:_}),(0,t.jsx)(i.Button,{size:"sm",onClick:er,disabled:!H.trim(),className:"w-full",children:P("importConfirm")})]})})]})})]})}),(0,t.jsxs)("div",{className:"flex flex-1 min-h-0 gap-4 pt-2",children:[(0,t.jsxs)("div",{className:"hidden md:flex w-44 shrink-0 flex-col gap-3",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)(i.Button,{variant:"all"===$?"secondary":"ghost",size:"sm",className:"w-full justify-start",onClick:()=>{F("all"),W("")},children:[(0,t.jsx)(v,{className:"size-3.5 mr-1.5"}),P("filterAll")]}),(0,t.jsxs)(i.Button,{variant:"favorites"===$?"secondary":"ghost",size:"sm",className:"w-full justify-start",onClick:()=>{F("favorites"),W("")},children:[(0,t.jsx)(f.Star,{className:"size-3.5 mr-1.5"}),P("filterFavorites")]})]}),E.length>0&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("p",{className:"text-xs font-medium text-muted-foreground px-2",children:P("filterByAgent")}),(0,t.jsx)(c.ScrollArea,{className:"max-h-48",children:E.map(e=>(0,t.jsxs)(i.Button,{variant:"agent"===$&&L===e.id?"secondary":"ghost",size:"sm",className:"w-full justify-start",onClick:()=>{F("agent"),W(e.id)},children:[(0,t.jsx)(m.AgentIcon,{agentId:e.id,name:e.name,avatarUrl:e.avatarUrl,className:"size-4 mr-1.5 rounded-full"}),(0,t.jsx)("span",{className:"truncate",children:e.name})]},e.id))})]})]}),(0,t.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-3",children:[(0,t.jsxs)("div",{className:"flex md:hidden flex-col gap-2",children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(y.Search,{className:"size-3.5 absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),(0,t.jsx)(o.Input,{value:R,onChange:e=>z(e.target.value),placeholder:P("search"),className:"pl-8"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("div",{className:"flex rounded-lg border border-input p-0.5",children:[(0,t.jsx)("button",{type:"button",className:(0,S.cn)("px-2.5 py-1 rounded-md text-xs font-medium transition-colors","all"===$?"bg-muted":"text-muted-foreground hover:text-foreground"),onClick:()=>{F("all"),W("")},children:P("filterAll")}),(0,t.jsxs)("button",{type:"button",className:(0,S.cn)("px-2.5 py-1 rounded-md text-xs font-medium transition-colors","favorites"===$?"bg-muted":"text-muted-foreground hover:text-foreground"),onClick:()=>{F("favorites"),W("")},children:[(0,t.jsx)(f.Star,{className:"size-3 inline-block mr-0.5 -mt-px"}),P("filterFavorites")]})]}),E.length>0&&(0,t.jsx)(p.SearchSelect,{value:"agent"===$?L:"",onChange:e=>{e?(F("agent"),W(e)):(F("all"),W(""))},options:E.map(e=>({value:e.id,label:e.name})),placeholder:P("filterByAgent"),allowCustom:!1,className:"flex-1 min-w-0"})]})]}),(0,t.jsxs)("div",{className:"hidden md:block relative",children:[(0,t.jsx)(y.Search,{className:"size-3.5 absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),(0,t.jsx)(o.Input,{value:R,onChange:e=>z(e.target.value),placeholder:P("search"),className:"pl-8"})]}),(0,t.jsx)(c.ScrollArea,{className:"flex-1",children:D?(0,t.jsx)("div",{className:"flex items-center justify-center py-12 text-muted-foreground text-sm",children:T("loading")}):0===el.length?(0,t.jsx)("div",{className:"flex items-center justify-center py-12 text-muted-foreground text-sm",children:P("empty")}):(0,t.jsx)("div",{className:"grid grid-cols-1 gap-3 pr-2",children:el.map(e=>(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-background p-4 hover:bg-accent/30 transition-colors cursor-pointer",onClick:()=>{Q(e),ee(JSON.stringify(e.config,null,2))},children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(v,{className:"size-3.5 text-muted-foreground"}),(0,t.jsx)("span",{className:"font-medium text-sm",children:e.name}),(0,t.jsx)("button",{type:"button",className:"flex items-center justify-center size-5 rounded hover:bg-accent",onClick:t=>{t.stopPropagation(),ea(e)},children:e.favorited?(0,t.jsx)(f.Star,{className:"size-3.5 text-yellow-500 fill-yellow-500"}):(0,t.jsx)(g.StarOff,{className:"size-3.5 text-muted-foreground"})})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:e.description||e.config.command||e.config.url||JSON.stringify(e.config).slice(0,100)})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 shrink-0",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)(i.Button,{variant:"outline",size:"sm",onClick:()=>{K(e),Y(e.boundAgents.map(e=>e.id))},children:[(0,t.jsx)(w.Rocket,{className:"size-3.5 mr-1"}),P("apply")]}),(0,t.jsxs)(d.DropdownMenu,{children:[(0,t.jsx)(d.DropdownMenuTrigger,{render:(0,t.jsx)(i.Button,{variant:"ghost",size:"icon",className:"size-7"}),children:(0,t.jsx)(b.MoreVertical,{className:"size-3.5"})}),(0,t.jsx)(d.DropdownMenuContent,{align:"end",children:(0,t.jsxs)(d.DropdownMenuItem,{className:"text-destructive focus:text-destructive",onClick:()=>ei(e),children:[(0,t.jsx)(j.Trash2,{className:"size-3.5 mr-1.5"}),P("delete")]})})]})]})]}),e.boundAgents.length>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mt-2.5 pt-2.5 border-t border-border/50",children:[e.boundAgents.map(e=>(0,t.jsx)(m.AgentIcon,{agentId:e.id,name:e.name,avatarUrl:e.avatarUrl,className:"size-5 rounded-full"},e.id)),(0,t.jsx)("span",{className:"text-xs text-muted-foreground ml-1",children:e.boundAgents.length})]})]},e.name))})})]})]})]});return(0,t.jsxs)(t.Fragment,{children:[C&&ec&&(0,t.jsx)("div",{className:"h-full flex flex-col",children:ed}),!C&&(0,t.jsx)(s.Dialog,{open:ec,onOpenChange:r,children:(0,t.jsx)(s.DialogContent,{className:"!w-[80vw] !max-w-[80vw] !h-[80vh] flex flex-col",children:ed})}),(0,t.jsx)(s.Dialog,{open:!!G,onOpenChange:e=>{e||Q(null)},children:(0,t.jsxs)(s.DialogContent,{className:"!w-[80vw] !max-w-[80vw] !h-[80vh] flex flex-col",children:[(0,t.jsx)(s.DialogHeader,{children:(0,t.jsxs)("div",{className:"flex items-center justify-between pr-8",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(s.DialogTitle,{children:P("editTitle",{name:G?.name||""})}),(0,t.jsx)(s.DialogDescription,{children:P("editDescription")})]}),(0,t.jsxs)(i.Button,{size:"sm",onClick:es,children:[(0,t.jsx)(k.Save,{className:"size-3.5 mr-1"}),T("save")]})]})}),(0,t.jsx)("div",{className:"flex-1 min-h-0 pt-2",children:(0,t.jsx)(N,{height:"100%",language:"json",value:Z,onChange:e=>ee(e||""),theme:"vs-dark",options:{fontSize:13,minimap:{enabled:!1},scrollBeyondLastLine:!1,padding:{top:8},renderLineHighlight:"gutter",wordWrap:"on",formatOnPaste:!0}})})]})}),(0,t.jsx)(h.AgentPickerDialog,{open:!!J,onClose:()=>K(null),onConfirm:eo,title:P("bindTitle",{name:J?.name||""}),description:P("bindDescription"),agents:E,selected:X,onToggle:e=>{Y(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},cancelText:T("cancel"),confirmText:T("confirm")})]})}],22906)},315775,e=>{"use strict";var t=e.i(226651);e.s(["MoreHorizontal",()=>t.default])},790766,e=>{"use strict";e.s([])},257295,619279,415279,439485,e=>{"use strict";var t,n,a=e.i(764556),r=e.i(535270),s=e.i(277642),i=e.i(29905),o=e.i(139236),l=e.i(602453),c=e.i(742665),d=e.i(427708),u=e.i(254891);e.s(["useCollapsibleRoot",0,function(e){let{open:t,defaultOpen:n,onOpenChange:p,disabled:m}=e,h=void 0!==t,[f,g]=(0,r.useControlled)({controlled:t,default:n,name:"Collapsible",state:"open"}),{mounted:x,setMounted:y,transitionStatus:v}=(0,u.useTransitionStatus)(f,!0,!0),[b,j]=a.useState(f),[{height:w,width:k},S]=a.useState({height:void 0,width:void 0}),N=(0,o.useBaseUiId)(),[C,P]=a.useState(),T=C??N,[M,O]=a.useState(!1),[E,I]=a.useState(!1),D=a.useRef(null),A=a.useRef(null),R=a.useRef(null),z=a.useRef(null),$=(0,d.useAnimationsFinished)(z,!1),F=(0,i.useStableCallback)(e=>{let t=!f,n=(0,l.createChangeEventDetails)(c.REASONS.triggerPress,e.nativeEvent);if(p(t,n),n.isCanceled)return;let a=z.current;"css-animation"===A.current&&null!=a&&a.style.removeProperty("animation-name"),M||E||(null!=A.current&&"css-animation"!==A.current&&!x&&t&&y(!0),"css-animation"===A.current&&(!b&&t&&j(!0),!x&&t&&y(!0))),g(t),"none"===A.current&&x&&!t&&y(!1)});return(0,s.useIsoLayoutEffect)(()=>{h&&"none"===A.current&&!f&&y(!1)},[h,f,t,y]),a.useMemo(()=>({abortControllerRef:D,animationTypeRef:A,disabled:m,handleTrigger:F,height:w,mounted:x,open:f,panelId:T,panelRef:z,runOnceAnimationsFinish:$,setDimensions:S,setHiddenUntilFound:O,setKeepMounted:I,setMounted:y,setOpen:g,setPanelIdState:P,setVisible:j,transitionDimensionRef:R,transitionStatus:v,visible:b,width:k}),[D,A,m,F,w,x,f,T,z,$,S,O,I,y,g,j,R,v,b,k])}],257295),e.i(8890);var p=e.i(267805);let m=a.createContext(void 0);e.s(["CollapsibleRootContext",0,m,"useCollapsibleRootContext",0,function(){let e=a.useContext(m);if(void 0===e)throw Error((0,p.default)(15));return e}],619279);var h=e.i(282458);let f=((t={}).open="data-open",t.closed="data-closed",t[t.startingStyle=h.TransitionStatusDataAttributes.startingStyle]="startingStyle",t[t.endingStyle=h.TransitionStatusDataAttributes.endingStyle]="endingStyle",t);e.s(["CollapsiblePanelDataAttributes",0,f],415279);let g=((n={}).panelOpen="data-panel-open",n),x={[f.open]:""},y={[f.closed]:""};e.s(["collapsibleOpenStateMapping",0,{open:e=>e?x:y},"triggerOpenStateMapping",0,{open:e=>e?{[g.panelOpen]:""}:null}],439485)},998723,406899,134319,e=>{"use strict";e.i(8890);var t=e.i(764556),n=e.i(29905),a=e.i(969490),r=e.i(257295),s=e.i(619279),i=e.i(439485),o=e.i(282458);let l={...i.collapsibleOpenStateMapping,...o.transitionStatusMapping};e.s(["collapsibleStateAttributesMapping",0,l],406899);var c=e.i(344180);let d=t.forwardRef(function(e,i){let{render:o,className:d,defaultOpen:u=!1,disabled:p=!1,onOpenChange:m,open:h,style:f,...g}=e,x=(0,n.useStableCallback)(m),y=(0,r.useCollapsibleRoot)({open:h,defaultOpen:u,onOpenChange:x,disabled:p}),v=t.useMemo(()=>({open:y.open,disabled:y.disabled,transitionStatus:y.transitionStatus}),[y.open,y.disabled,y.transitionStatus]),b=t.useMemo(()=>({...y,onOpenChange:x,state:v}),[y,x,v]),j=(0,a.useRenderElement)("div",e,{state:v,ref:i,props:g,stateAttributesMapping:l});return(0,c.jsx)(s.CollapsibleRootContext.Provider,{value:b,children:j})});e.s(["CollapsibleRoot",0,d],998723);var u=e.i(931709);let p={...i.triggerOpenStateMapping,...o.transitionStatusMapping},m=t.forwardRef(function(e,n){let{panelId:r,open:i,handleTrigger:o,state:l,disabled:c}=(0,s.useCollapsibleRootContext)(),{className:d,disabled:m=c,id:h,render:f,nativeButton:g=!0,style:x,...y}=e,{getButtonProps:v,buttonRef:b}=(0,u.useButton)({disabled:m,focusableWhenDisabled:!0,native:g}),j=t.useMemo(()=>({"aria-controls":i?r:void 0,"aria-expanded":i,onClick:o}),[r,i,o]);return(0,a.useRenderElement)("button",e,{state:l,ref:[n,b],props:[j,y,v],stateAttributesMapping:p})});e.s(["CollapsibleTrigger",0,m],134319)},18158,e=>{"use strict";e.i(8890);var t,n=e.i(764556),a=e.i(422561),r=e.i(277642),s=e.i(29905),i=e.i(204133),o=e.i(130522),l=e.i(859092),c=e.i(602453),d=e.i(742665),u=e.i(415279);let p=((t={}).disabled="data-disabled",t.orientation="data-orientation",t);e.s(["useCollapsiblePanel",0,function(e){let{abortControllerRef:t,animationTypeRef:m,externalRef:h,height:f,hiddenUntilFound:g,keepMounted:x,id:y,mounted:v,onOpenChange:b,open:j,panelRef:w,runOnceAnimationsFinish:k,setDimensions:S,setMounted:N,setOpen:C,setVisible:P,transitionDimensionRef:T,visible:M,width:O}=e,E=n.useRef(!1),I=n.useRef(null),D=n.useRef(j),A=n.useRef(j),R=(0,l.useAnimationFrame)(),z=n.useMemo(()=>"css-animation"===m.current?!M:!j&&!v,[j,v,M,m]),$=(0,s.useStableCallback)(e=>{if(!e)return;if(null==m.current||null==T.current){let t=getComputedStyle(e),n="none"!==t.animationName&&""!==t.animationName,a="0s"!==t.transitionDuration&&""!==t.transitionDuration;n&&a||("none"===t.animationName&&"0s"!==t.transitionDuration?m.current="css-transition":"none"!==t.animationName&&"0s"===t.transitionDuration?m.current="css-animation":m.current="none"),"horizontal"===e.getAttribute(p.orientation)||t.transitionProperty.indexOf("width")>-1?T.current="width":T.current="height"}if("css-transition"!==m.current)return;(void 0===f||void 0===O)&&(S({height:e.scrollHeight,width:e.scrollWidth}),A.current&&e.style.setProperty("transition-duration","0s"));let t=-1,n=-1;return t=l.AnimationFrame.request(()=>{A.current=!1,n=l.AnimationFrame.request(()=>{setTimeout(()=>{e.style.removeProperty("transition-duration")})})}),()=>{l.AnimationFrame.cancel(t),l.AnimationFrame.cancel(n)}}),F=(0,i.useMergedRefs)(h,w,$);return(0,r.useIsoLayoutEffect)(()=>{if("css-transition"!==m.current)return;let e=w.current;if(!e)return;let n=-1;if(null!=t.current&&(t.current.abort(),t.current=null),j){let t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(t=>{e.style.setProperty(t,"initial","important")}),A.current||x||e.setAttribute(u.CollapsiblePanelDataAttributes.startingStyle,""),S({height:e.scrollHeight,width:e.scrollWidth}),n=l.AnimationFrame.request(()=>{Object.entries(t).forEach(([t,n])=>{""===n?e.style.removeProperty(t):e.style.setProperty(t,n)})})}else{if(0===e.scrollHeight&&0===e.scrollWidth)return;S({height:e.scrollHeight,width:e.scrollWidth});let n=new AbortController;t.current=n;let a=n.signal,r=null,s=u.CollapsiblePanelDataAttributes.endingStyle;return(r=new MutationObserver(i=>{i.some(e=>"attributes"===e.type&&e.attributeName===s)&&(r?.disconnect(),r=null,k(()=>{S({height:0,width:0}),e.style.removeProperty("content-visibility"),N(!1),t.current===n&&(t.current=null)},a))})).observe(e,{attributes:!0,attributeFilter:[s]}),()=>{r?.disconnect(),R.cancel(),t.current===n&&(n.abort(),t.current=null)}}return()=>{l.AnimationFrame.cancel(n)}},[t,m,R,g,x,v,j,w,k,S,N]),(0,r.useIsoLayoutEffect)(()=>{if("css-animation"!==m.current)return;let e=w.current;e&&(I.current=e.style.animationName||I.current,e.style.setProperty("animation-name","none"),S({height:e.scrollHeight,width:e.scrollWidth}),D.current||E.current||e.style.removeProperty("animation-name"),j?(null!=t.current&&(t.current.abort(),t.current=null),N(!0),P(!0)):(t.current=new AbortController,k(()=>{N(!1),P(!1),t.current=null},t.current.signal)))},[t,m,j,w,k,S,N,P,M]),(0,o.useOnMount)(()=>{let e=l.AnimationFrame.request(()=>{D.current=!1});return()=>l.AnimationFrame.cancel(e)}),(0,r.useIsoLayoutEffect)(()=>{if(!g)return;let e=w.current;if(!e)return;let t=-1,n=-1;return j&&E.current&&(e.style.transitionDuration="0s",S({height:e.scrollHeight,width:e.scrollWidth}),t=l.AnimationFrame.request(()=>{E.current=!1,n=l.AnimationFrame.request(()=>{setTimeout(()=>{e.style.removeProperty("transition-duration")})})})),()=>{l.AnimationFrame.cancel(t),l.AnimationFrame.cancel(n)}},[g,j,w,S]),(0,r.useIsoLayoutEffect)(()=>{let e=w.current;e&&g&&z&&(e.setAttribute("hidden","until-found"),"css-transition"===m.current&&e.setAttribute(u.CollapsiblePanelDataAttributes.startingStyle,""))},[g,z,m,w]),n.useEffect(function(){let e=w.current;if(e)return(0,a.addEventListener)(e,"beforematch",function(e){E.current=!0,C(!0),b(!0,(0,c.createChangeEventDetails)(d.REASONS.none,e))})},[b,w,C]),n.useMemo(()=>({props:{hidden:z,id:y,ref:F}}),[z,y,F])}],18158)},256186,e=>{"use strict";var t,n=e.i(344180);e.i(790766);var a=e.i(998723),r=e.i(134319);e.i(8890);var s=e.i(764556),i=e.i(277642),o=e.i(969490),l=e.i(619279),c=e.i(406899),d=e.i(18158);let u=((t={}).collapsiblePanelHeight="--collapsible-panel-height",t.collapsiblePanelWidth="--collapsible-panel-width",t);var p=e.i(273598);let m=s.forwardRef(function(e,t){let{className:n,hiddenUntilFound:a,keepMounted:r,render:m,id:h,style:f,...g}=e,{abortControllerRef:x,animationTypeRef:y,height:v,mounted:b,onOpenChange:j,open:w,panelId:k,panelRef:S,runOnceAnimationsFinish:N,setDimensions:C,setHiddenUntilFound:P,setKeepMounted:T,setMounted:M,setPanelIdState:O,setOpen:E,setVisible:I,state:D,transitionDimensionRef:A,visible:R,width:z,transitionStatus:$}=(0,l.useCollapsibleRootContext)(),F=a??!1,L=r??!1;(0,i.useIsoLayoutEffect)(()=>{if(h)return O(h),()=>{O(void 0)}},[h,O]),(0,i.useIsoLayoutEffect)(()=>{P(F)},[P,F]),(0,i.useIsoLayoutEffect)(()=>{T(L)},[T,L]);let{props:W}=(0,d.useCollapsiblePanel)({abortControllerRef:x,animationTypeRef:y,externalRef:t,height:v,hiddenUntilFound:F,id:k,keepMounted:L,mounted:b,onOpenChange:j,open:w,panelRef:S,runOnceAnimationsFinish:N,setDimensions:C,setMounted:M,setOpen:E,setVisible:I,transitionDimensionRef:A,visible:R,width:z});(0,p.useOpenChangeComplete)({open:w&&"idle"===$,ref:S,onComplete(){w&&C({height:void 0,width:void 0})}});let B=s.useMemo(()=>({...D,transitionStatus:$}),[D,$]),U=(0,o.useRenderElement)("div",e,{state:B,ref:[t,S],props:[W,{style:{[u.collapsiblePanelHeight]:void 0===v?"auto":`${v}px`,[u.collapsiblePanelWidth]:void 0===z?"auto":`${z}px`}},g],stateAttributesMapping:c.collapsibleStateAttributesMapping});return L||F||b?U:null});e.s(["Panel",0,m,"Root",()=>a.CollapsibleRoot,"Trigger",()=>r.CollapsibleTrigger],917853);var h=e.i(917853),h=h;e.s(["Collapsible",0,function({...e}){return(0,n.jsx)(h.Root,{"data-slot":"collapsible",...e})},"CollapsibleContent",0,function({...e}){return(0,n.jsx)(h.Panel,{"data-slot":"collapsible-content",...e})},"CollapsibleTrigger",0,function({...e}){return(0,n.jsx)(h.Trigger,{"data-slot":"collapsible-trigger",...e})}],256186)},613087,e=>{"use strict";var t=e.i(344180),n=e.i(465458);e.s(["Skeleton",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"skeleton",className:(0,n.cn)("animate-pulse rounded-md bg-muted",e),...a})},"SkeletonGroup",0,function({count:e=3,children:n}){return(0,t.jsx)(t.Fragment,{children:Array.from({length:e},(e,a)=>(0,t.jsx)("div",{children:n(a)},a))})}])},992764,e=>{"use strict";var t=e.i(942917);e.s(["ChevronRight",()=>t.default])},226651,e=>{"use strict";let t=(0,e.i(433721).default)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);e.s(["default",0,t])},938306,e=>{"use strict";let t=(0,e.i(433721).default)("message-circle",[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]);e.s(["MessageCircle",0,t],938306)},384389,e=>{"use strict";var t=e.i(764556),n=e.i(106206),a=e.i(128108),r=e.i(344180);let s=t.forwardRef(function(e,s){let{children:i,container:o,className:l,render:c,style:d,...u}=e,{portalNode:p,portalSubtree:m}=(0,a.useFloatingPortalNode)({container:o,ref:s,componentProps:e,elementProps:u});return m||p?(0,r.jsxs)(t.Fragment,{children:[m,p&&n.createPortal(i,p)]}):null});e.s(["FloatingPortalLite",0,s])},638322,e=>{"use strict";var t,n,a=e.i(344180);e.s([],935002),e.i(935002),e.i(8890);var r=e.i(764556),s=e.i(155461),i=e.i(166392),o=e.i(277642),l=e.i(267805);let c=r.createContext(void 0);function d(e){let t=r.useContext(c);if(void 0===t&&!e)throw Error((0,l.default)(72));return t}var u=e.i(92615),p=e.i(422561),m=e.i(29905),h=e.i(410421),f=e.i(150129);function g(e){return null!=e&&null!=e.clientX}var x=e.i(538501),y=e.i(427396),v=e.i(602453),b=e.i(279501),j=e.i(106206),w=e.i(332976),k=e.i(493696),S=e.i(549154),N=e.i(107164),C=e.i(742665),P=e.i(695011),T=e.i(561213);let M={...P.popupStoreSelectors,disabled:(0,w.createSelector)(e=>e.disabled),instantType:(0,w.createSelector)(e=>e.instantType),isInstantPhase:(0,w.createSelector)(e=>e.isInstantPhase),trackCursorAxis:(0,w.createSelector)(e=>e.trackCursorAxis),disableHoverablePopup:(0,w.createSelector)(e=>e.disableHoverablePopup),lastOpenChangeReason:(0,w.createSelector)(e=>e.openChangeReason),closeOnClick:(0,w.createSelector)(e=>e.closeOnClick),closeDelay:(0,w.createSelector)(e=>e.closeDelay),hasViewport:(0,w.createSelector)(e=>e.hasViewport)};class O extends k.ReactStore{constructor(e){super({...(0,P.createInitialPopupStoreState)(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1,...e},{popupRef:r.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new T.PopupTriggerMap},M)}setOpen=(e,t)=>{let n=t.reason,a=n===C.REASONS.triggerHover,r=e&&n===C.REASONS.triggerFocus,s=!e&&(n===C.REASONS.triggerPress||n===C.REASONS.escapeKey);if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let i=()=>{let a={open:e,openChangeReason:n};r?a.instantType="focus":s?a.instantType="dismiss":n===C.REASONS.triggerHover&&(a.instantType=void 0);let i=t.trigger?.id??null;(i||e)&&(a.activeTriggerId=i,a.activeTriggerElement=t.trigger??null),this.update(a)};a?j.flushSync(i):i()};static useStore(e,t){let n=(0,S.useRefWithInit)(()=>new O(t)).current,a=e??n,r=(0,N.useSyncedFloatingRootContext)({popupStore:a,onOpenChange:a.setOpen});return a.state.floatingRootContext=r,a}}let E=(0,s.fastComponent)(function(e){let{disabled:t=!1,defaultOpen:n=!1,open:s,disableHoverablePopup:l=!1,trackCursorAxis:d="none",actionsRef:j,onOpenChange:w,onOpenChangeComplete:k,handle:S,triggerId:N,defaultTriggerId:P=null,children:T}=e,M=O.useStore(S?.store,{open:n,openProp:s,activeTriggerId:P,triggerIdProp:N});(0,i.useOnFirstRender)(()=>{void 0===s&&!1===M.state.open&&!0===n&&M.update({open:!0,activeTriggerId:P})}),M.useControlledProp("openProp",s),M.useControlledProp("triggerIdProp",N),M.useContextCallback("onOpenChange",w),M.useContextCallback("onOpenChangeComplete",k);let E=M.useState("open"),I=!t&&E,D=M.useState("activeTriggerId"),A=M.useState("payload");M.useSyncedValues({trackCursorAxis:d,disableHoverablePopup:l}),(0,o.useIsoLayoutEffect)(()=>{E&&t&&M.setOpen(!1,(0,v.createChangeEventDetails)(C.REASONS.disabled))},[E,t,M]),M.useSyncedValue("disabled",t),(0,b.useImplicitActiveTrigger)(M);let{forceUnmount:R,transitionStatus:z}=(0,b.useOpenStateTransitions)(I,M),$=M.select("floatingRootContext"),F=M.useState("isInstantPhase"),L=M.useState("instantType"),W=M.useState("lastOpenChangeReason"),B=r.useRef(null);(0,o.useIsoLayoutEffect)(()=>{"ending"===z&&W===C.REASONS.none||"ending"!==z&&F?("delay"!==L&&(B.current=L),M.set("instantType","delay")):null!==B.current&&(M.set("instantType",B.current),B.current=null)},[z,F,W,L,M]),(0,o.useIsoLayoutEffect)(()=>{I&&null==D&&M.set("payload",void 0)},[M,D,I]);let U=r.useCallback(()=>{M.setOpen(!1,(0,v.createChangeEventDetails)(C.REASONS.imperativeAction))},[M]);r.useImperativeHandle(j,()=>({unmount:R,close:U}),[R,U]);let H=(0,x.useDismiss)($,{enabled:!t,referencePress:()=>M.select("closeOnClick")}),V=function(e,t={}){let n="rootStore"in e?e.rootStore:e,a=n.useState("open"),s=n.useState("floatingElement"),i=n.useState("domReferenceElement"),o=n.context.dataRef,{enabled:l=!0,axis:c="both"}=t,d=r.useRef(!1),x=r.useRef(null),[y,v]=r.useState(),[b,j]=r.useState([]),w=(0,m.useStableCallback)((e,t,a)=>{if(!d.current&&(!o.current.openEvent||g(o.current.openEvent))){var r,s;let l,d,u;n.set("positionReference",(r=a??i,s={x:e,y:t,axis:c,dataRef:o,pointerType:y},l=null,d=null,u=!1,{contextElement:r||void 0,getBoundingClientRect(){let e=r?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},t="x"===s.axis||"both"===s.axis,n="y"===s.axis||"both"===s.axis,a=["mouseenter","mousemove"].includes(s.dataRef.current.openEvent?.type||"")&&"touch"!==s.pointerType,i=e.width,o=e.height,c=e.x,p=e.y;return null==l&&s.x&&t&&(l=e.x-s.x),null==d&&s.y&&n&&(d=e.y-s.y),c-=l||0,p-=d||0,i=0,o=0,!u||a?(i="y"===s.axis?e.width:0,o="x"===s.axis?e.height:0,c=t&&null!=s.x?s.x:c,p=n&&null!=s.y?s.y:p):u&&!a&&(o="x"===s.axis?e.height:o,i="y"===s.axis?e.width:i),u=!0,{width:i,height:o,x:c,y:p,top:p,right:c+i,bottom:p+o,left:c}}}))}}),k=(0,m.useStableCallback)(e=>{a?x.current||j([]):w(e.clientX,e.clientY,e.currentTarget)}),S=(0,f.isMouseLikePointerType)(y)?s:a,N=r.useCallback(()=>{if(!S||!l)return;let e=(0,u.getWindow)(s);if(!o.current.openEvent||g(o.current.openEvent))return x.current=(0,p.addEventListener)(e,"mousemove",function(e){let t=(0,h.getTarget)(e);(0,h.contains)(s,t)?(x.current?.(),x.current=null):w(e.clientX,e.clientY)}),()=>{x.current?.(),x.current=null};n.set("positionReference",i)},[S,l,s,o,i,n,w]);r.useEffect(()=>N(),[N,b]),r.useEffect(()=>{l&&!s&&(d.current=!1)},[l,s]),r.useEffect(()=>{!l&&a&&(d.current=!0)},[l,a]);let C=r.useMemo(()=>{function e(e){v(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:k,onMouseEnter:k}},[k]);return r.useMemo(()=>l?{reference:C,trigger:C}:{},[l,C])}($,{enabled:!t&&"none"!==d,axis:"none"===d?void 0:d}),{getReferenceProps:_,getFloatingProps:q,getTriggerProps:J}=(0,y.useInteractions)([H,V]),K=r.useMemo(()=>_(),[_]),X=r.useMemo(()=>J(),[J]),Y=r.useMemo(()=>q(),[q]);return M.useSyncedValues({activeTriggerProps:K,inactiveTriggerProps:X,popupProps:Y}),(0,a.jsx)(c.Provider,{value:M,children:"function"==typeof T?T({payload:A}):T})});var I=e.i(817955),D=e.i(969490),A=e.i(139236);let R=r.createContext(void 0);var z=e.i(499198),$=e.i(232449),F=e.i(49863);let L=r.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new $.Timeout,currentIdRef:{current:null},currentContextRef:{current:null}});function W(e){let{children:t,delay:n,timeoutMs:s=0}=e,i=r.useRef(n),o=r.useRef(n),l=r.useRef(null),c=r.useRef(null),d=(0,$.useTimeout)();return(0,a.jsx)(L.Provider,{value:r.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:o,currentIdRef:l,timeoutMs:s,currentContextRef:c,timeout:d}),[s,d]),children:t})}var B=e.i(604921),U=e.i(480283);let H=((t={})[t.popupOpen=I.CommonTriggerDataAttributes.popupOpen]="popupOpen",t.triggerDisabled="data-trigger-disabled",t),V=(0,s.fastComponentRef)(function(e,t){let{className:n,render:a,handle:s,payload:i,disabled:c,delay:u,closeOnClick:p=!0,closeDelay:m,id:h,style:f,...g}=e,x=d(!0),y=s?.store??x;if(!y)throw Error((0,l.default)(82));let j=(0,A.useBaseUiId)(h),w=y.useState("isTriggerActive",j),k=y.useState("isOpenedByTrigger",j),S=y.useState("floatingRootContext"),N=r.useRef(null),P=u??600,T=m??0,{registerTrigger:M,isMountedByThisTrigger:O}=(0,b.useTriggerDataForwarding)(j,N,y,{payload:i,closeOnClick:p,closeDelay:T}),E=r.useContext(R),{delayRef:$,isInstantPhase:W,hasProvider:V}=function(e,t={open:!1}){let n="rootStore"in e?e.rootStore:e,a=n.useState("floatingId"),{open:s}=t,{currentIdRef:i,delayRef:l,timeoutMs:c,initialDelayRef:d,currentContextRef:u,hasProvider:p,timeout:m}=r.useContext(L),[h,f]=r.useState(!1);return(0,o.useIsoLayoutEffect)(()=>{function e(){f(!1),u.current?.setIsInstantPhase(!1),i.current=null,u.current=null,l.current=d.current}if(i.current&&!s&&i.current===a){if(f(!1),c)return m.start(c,()=>{n.select("open")||i.current&&i.current!==a||e()}),()=>{m.clear()};e()}},[s,a,i,l,c,d,u,m,n]),(0,o.useIsoLayoutEffect)(()=>{if(!s)return;let e=u.current,t=i.current;m.clear(),u.current={onOpenChange:n.setOpen,setIsInstantPhase:f},i.current=a,l.current={open:0,close:(0,F.getDelay)(d.current,"close")},null!==t&&t!==a?(f(!0),e?.setIsInstantPhase(!0),e?.onOpenChange(!1,(0,v.createChangeEventDetails)(C.REASONS.none))):(f(!1),e?.setIsInstantPhase(!1))},[s,a,n,i,l,c,d,u,m]),(0,o.useIsoLayoutEffect)(()=>()=>{u.current=null},[u]),r.useMemo(()=>({hasProvider:p,delayRef:l,isInstantPhase:h}),[p,l,h])}(S,{open:k});y.useSyncedValue("isInstantPhase",W);let _=y.useState("disabled"),q=c??_,J=y.useState("trackCursorAxis"),K=y.useState("disableHoverablePopup"),X=(0,U.useHoverReferenceInteraction)(S,{enabled:!q,mouseOnly:!0,move:!1,handleClose:K||"both"===J?null:(0,z.safePolygon)(),restMs(){let e=E?.delay,t="object"==typeof $.current?$.current.open:void 0,n=P;return V&&(n=0!==t?u??e??P:0),n},delay(){let e="object"==typeof $.current?$.current.close:void 0,t=T;return null==m&&V&&(t=e),{close:t}},triggerElementRef:N,isActiveTrigger:w,isClosing:()=>"ending"===y.select("transitionStatus")}),Y=(0,B.useFocus)(S,{enabled:!q}).reference,G=y.useState("triggerProps",O);return(0,D.useRenderElement)("button",e,{state:{open:k},ref:[t,M,N],props:[X,Y,G,{onPointerDown(){y.set("closeOnClick",p)},id:j,[H.triggerDisabled]:q?"":void 0},g],stateAttributesMapping:I.triggerOpenStateMapping})}),_=r.createContext(void 0);var q=e.i(384389);let J=r.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return d().useState("mounted")||n?(0,a.jsx)(_.Provider,{value:n,children:(0,a.jsx)(q.FloatingPortalLite,{ref:t,...r})}):null}),K=r.createContext(void 0);function X(){let e=r.useContext(K);if(void 0===e)throw Error((0,l.default)(71));return e}var Y=e.i(576557),G=e.i(576487),Q=e.i(909852),Z=e.i(263635);let ee=r.forwardRef(function(e,t){let{render:n,className:s,anchor:i,positionMethod:o="absolute",side:c="top",align:u="center",sideOffset:p=0,alignOffset:m=0,collisionBoundary:h="clipping-ancestors",collisionPadding:f=5,arrowPadding:g=5,sticky:x=!1,disableAnchorTracking:y=!1,collisionAvoidance:v=G.POPUP_COLLISION_AVOIDANCE,style:b,...j}=e,w=d(),k=function(){let e=r.useContext(_);if(void 0===e)throw Error((0,l.default)(70));return e}(),S=w.useState("open"),N=w.useState("mounted"),C=w.useState("trackCursorAxis"),P=w.useState("disableHoverablePopup"),T=w.useState("floatingRootContext"),M=w.useState("instantType"),O=w.useState("transitionStatus"),E=w.useState("hasViewport"),I=(0,Y.useAnchorPositioning)({anchor:i,positionMethod:o,floatingRootContext:T,mounted:N,side:c,sideOffset:p,align:u,alignOffset:m,collisionBoundary:h,collisionPadding:f,sticky:x,arrowPadding:g,disableAnchorTracking:y,keepMounted:k,collisionAvoidance:v,adaptiveOrigin:E?Q.adaptiveOrigin:void 0}),D=r.useMemo(()=>({open:S,side:I.side,align:I.align,anchorHidden:I.anchorHidden,instant:"none"!==C?"tracking-cursor":M}),[S,I.side,I.align,I.anchorHidden,C,M]),A=(0,Z.usePositioner)(e,D,{styles:I.positionerStyles,transitionStatus:O,props:j,refs:[t,w.useStateSetter("positionerElement")],hidden:!N,inert:!S||"both"===C||P});return(0,a.jsx)(K.Provider,{value:I,children:A})});var et=e.i(282458),en=e.i(273598),ea=e.i(328657),er=e.i(795914);let es={...I.popupStateMapping,...et.transitionStatusMapping},ei=r.forwardRef(function(e,t){let{className:n,render:a,style:r,...s}=e,i=d(),{side:o,align:l}=X(),c=i.useState("open"),u=i.useState("instantType"),p=i.useState("transitionStatus"),m=i.useState("popupProps"),h=i.useState("floatingRootContext");(0,en.useOpenChangeComplete)({open:c,ref:i.context.popupRef,onComplete(){c&&i.context.onOpenChangeComplete?.(!0)}});let f=i.useState("disabled"),g=i.useState("closeDelay");return(0,er.useHoverFloatingInteraction)(h,{enabled:!f,closeDelay:g}),(0,D.useRenderElement)("div",e,{state:{open:c,side:o,align:l,instant:u,transitionStatus:p},ref:[t,i.context.popupRef,i.useStateSetter("popupElement")],props:[m,(0,ea.getDisabledMountTransitionStyles)(p),s],stateAttributesMapping:es})}),eo=r.forwardRef(function(e,t){let{className:n,render:a,style:r,...s}=e,i=d(),o=i.useState("open"),l=i.useState("instantType"),{arrowRef:c,side:u,align:p,arrowUncentered:m,arrowStyles:h}=X();return(0,D.useRenderElement)("div",e,{state:{open:o,side:u,align:p,uncentered:m,instant:l},ref:[t,c],props:[{style:h,"aria-hidden":!0},s],stateAttributesMapping:I.popupStateMapping})}),el=((n={}).popupWidth="--popup-width",n.popupHeight="--popup-height",n);var ec=e.i(3310);let ed={activationDirection:e=>e?{"data-activation-direction":e}:null},eu=r.forwardRef(function(e,t){let{render:n,className:a,style:r,children:s,...i}=e,o=d(),l=X(),c=o.useState("instantType"),{children:u,state:p}=(0,ec.usePopupViewport)({store:o,side:l.side,cssVars:el,children:s}),m={activationDirection:p.activationDirection,transitioning:p.transitioning,instant:c};return(0,D.useRenderElement)("div",e,{state:m,ref:t,props:[i,{children:u}],stateAttributesMapping:ed})});class ep{constructor(){this.store=new O}open(e){let t=e?this.store.context.triggerElements.getById(e):void 0;if(e&&!t)throw Error((0,l.default)(81,e));this.store.setOpen(!0,(0,v.createChangeEventDetails)(C.REASONS.imperativeAction,void 0,t))}close(){this.store.setOpen(!1,(0,v.createChangeEventDetails)(C.REASONS.imperativeAction,void 0,void 0))}get isOpen(){return this.store.state.open}}e.s(["Arrow",0,eo,"Handle",0,ep,"Popup",0,ei,"Portal",0,J,"Positioner",0,ee,"Provider",0,function(e){let{delay:t,closeDelay:n,timeout:s=400}=e,i=r.useMemo(()=>({delay:t,closeDelay:n}),[t,n]),o=r.useMemo(()=>({open:t,close:n}),[t,n]);return(0,a.jsx)(R.Provider,{value:i,children:(0,a.jsx)(W,{delay:o,timeoutMs:s,children:e.children})})},"Root",0,E,"Trigger",0,V,"Viewport",0,eu,"createHandle",0,function(){return new ep}],638295);var em=e.i(638295),em=em,eh=e.i(465458);e.s(["Tooltip",0,function({...e}){return(0,a.jsx)(em.Root,{"data-slot":"tooltip",...e})},"TooltipContent",0,function({className:e,side:t="top",sideOffset:n=4,align:r="center",alignOffset:s=0,children:i,...o}){return(0,a.jsx)(em.Portal,{children:(0,a.jsx)(em.Positioner,{align:r,alignOffset:s,side:t,sideOffset:n,className:"isolate z-50",children:(0,a.jsxs)(em.Popup,{"data-slot":"tooltip-content",className:(0,eh.cn)("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...o,children:[i,(0,a.jsx)(em.Arrow,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"})]})})})},"TooltipProvider",0,function({delay:e=0,...t}){return(0,a.jsx)(em.Provider,{"data-slot":"tooltip-provider",delay:e,...t})},"TooltipTrigger",0,function({...e}){return(0,a.jsx)(em.Trigger,{"data-slot":"tooltip-trigger",...e})}],638322)},817854,e=>{"use strict";var t=e.i(344180),n=e.i(465458);e.s(["Label",0,function({className:e,...a}){return(0,t.jsx)("label",{"data-slot":"label",className:(0,n.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...a})}])},92457,e=>{"use strict";let t=(0,e.i(433721).default)("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);e.s(["Monitor",0,t],92457)},36539,e=>{"use strict";let t=(0,e.i(433721).default)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]);e.s(["default",0,t])},378371,e=>{"use strict";let t=(0,e.i(433721).default)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);e.s(["ArrowUp",0,t],378371)},451534,680422,e=>{"use strict";let t=(0,e.i(433721).default)("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);e.s(["default",0,t],680422),e.s(["FolderOpen",0,t],451534)},62669,e=>{"use strict";let t=(0,e.i(433721).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",0,t],62669)},973370,220336,e=>{"use strict";let t=(0,e.i(433721).default)("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);e.s(["default",0,t],220336),e.s(["Folder",0,t],973370)},411649,e=>{"use strict";let t=(0,e.i(433721).default)("house",[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]]);e.s(["Home",0,t],411649)},550080,e=>{"use strict";var t=e.i(144988);e.s(["File",()=>t.default])},198699,e=>{"use strict";let t=(0,e.i(433721).default)("folder-plus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);e.s(["FolderPlus",0,t],198699)},434805,e=>{"use strict";var t=e.i(344180),n=e.i(764556),a=e.i(244073),r=e.i(550080),s=e.i(973370),i=e.i(451534),o=e.i(992764),l=e.i(378371),c=e.i(411649),d=e.i(62669),u=e.i(198699),p=e.i(344118),m=e.i(972846),h=e.i(433721);let f=(0,h.default)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),g=(0,h.default)("shield-alert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]),x=(0,h.default)("shield-off",[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71",key:"1jlk70"}],["path",{d:"M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264",key:"18rp1v"}]]);var y=e.i(465458),v=e.i(681622),b=e.i(996652);e.s(["FolderPicker",0,function({value:e,onChange:h,className:j,placeholder:w="/path/to/project",allowFiles:k=!1,fileFilter:S}){let[N,C]=(0,n.useState)(!1),[P,T]=(0,n.useState)(e||""),[M,O]=(0,n.useState)([]),[E,I]=(0,n.useState)([]),D=(0,a.useTranslations)("folderPicker"),[A,R]=(0,n.useState)(null),[z,$]=(0,n.useState)(!1),[F,L]=(0,n.useState)(""),[W,B]=(0,n.useState)(!1),[U,H]=(0,n.useState)(""),[V,_]=(0,n.useState)(null),[q,J]=(0,n.useState)(!1),K=(0,n.useRef)(null),X=(0,n.useRef)(null),Y=(0,n.useRef)(null),G=(0,n.useCallback)(async e=>{if(!e)return void _(null);J(!0);try{let t=await fetch(`/api/folder/check-permissions?path=${encodeURIComponent(e)}`);if(!t.ok)return void _(null);let n=await t.json();_(n)}catch{_(null)}finally{J(!1)}},[]),Q=(0,n.useCallback)(async e=>{$(!0),L("");try{let t=`/api/folder/browse?path=${encodeURIComponent(e)}`;k&&(t+="&files=1",S&&(t+=`&fileFilter=${encodeURIComponent(S)}`));let n=await fetch(t);if(!n.ok)throw Error((await n.json()).error||"Failed to browse");let a=await n.json();T(a.path),O(a.directories),I(a.files??[]),R(a.parent),G(a.path)}catch(e){L(e instanceof Error?e.message:String(e))}finally{$(!1)}},[G,k,S]);(0,n.useEffect)(()=>{N&&Q(e||"")},[N,Q,e]),(0,n.useEffect)(()=>{W&&Y.current&&Y.current.focus()},[W]);let Z=e=>{Q(e)},ee=async()=>{let e=U.trim();if(!e)return;let t=P.includes("/")?"/":"\\",n=P?`${P}${t}${e}`:e;try{let e=await fetch("/api/folder/create",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:n})});if(!e.ok)throw Error((await e.json()).error||"Failed to create folder");B(!1),H(""),h(n),T(n),C(!1)}catch(e){L(e instanceof Error?e.message:String(e))}},et=M.length>0||E.length>0;return(0,t.jsx)("div",{className:(0,y.cn)("relative",j),children:(0,t.jsxs)("div",{className:"flex gap-1.5",children:[(0,t.jsx)(v.Input,{className:"rounded-xl py-2.5",placeholder:w,value:e,onChange:e=>{h(e.target.value)},onKeyDown:t=>{"Enter"===t.key&&(t.preventDefault(),Q(e))},ref:K}),(0,t.jsxs)(b.Popover,{open:N,onOpenChange:e=>{C(e),e||(B(!1),H(""))},children:[(0,t.jsxs)(b.PopoverTrigger,{className:(0,y.cn)("flex items-center gap-1.5 rounded-xl border px-3 py-2.5 text-sm transition-colors",N?"border-primary bg-primary/5 text-primary":"border-border bg-background text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:[(0,t.jsx)(i.FolderOpen,{className:"size-4"}),"Browse"]}),(0,t.jsx)(b.PopoverContent,{align:"start",className:"w-[var(--radix-popover-trigger-width)] p-0 overflow-hidden rounded-xl",style:{height:360},children:(0,t.jsxs)("div",{className:"flex h-full flex-col",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 border-b border-border px-3 py-2",children:[(0,t.jsx)("button",{type:"button",onClick:()=>Z(""),className:"flex size-7 items-center justify-center rounded-md hover:bg-accent transition-colors",title:"Home",children:(0,t.jsx)(c.Home,{className:"size-3.5"})}),(0,t.jsx)("button",{type:"button",onClick:()=>{A&&Q(A)},className:"flex size-7 items-center justify-center rounded-md hover:bg-accent transition-colors",title:"Go up",children:(0,t.jsx)(l.ArrowUp,{className:"size-3.5"})}),(0,t.jsx)(v.Input,{className:"truncate bg-muted text-xs text-muted-foreground font-mono focus-visible:bg-background h-7",value:P,onChange:e=>T(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),Q(P))}}),(0,t.jsx)("button",{type:"button",onClick:()=>{B(!0),H("")},className:"flex size-7 items-center justify-center rounded-md hover:bg-accent transition-colors",title:D("newFolder"),children:(0,t.jsx)(u.FolderPlus,{className:"size-3.5"})}),!k&&(0,t.jsx)("button",{type:"button",onClick:()=>{h(P),C(!1)},className:"rounded-lg bg-primary px-3 py-1 text-xs font-medium text-primary-foreground hover:bg-primary/90 transition-colors",children:D("select")})]}),W&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5 border-b border-border px-3 py-1.5",children:[(0,t.jsx)(u.FolderPlus,{className:"size-4 text-muted-foreground shrink-0"}),(0,t.jsx)(v.Input,{ref:Y,className:"flex-1 h-7 text-sm",placeholder:D("folderNamePlaceholder"),value:U,onChange:e=>H(e.target.value),onKeyDown:e=>{"Enter"===e.key?(e.preventDefault(),ee()):"Escape"===e.key&&(B(!1),H(""))}}),(0,t.jsx)("button",{type:"button",onClick:ee,className:"flex size-6 items-center justify-center rounded-md hover:bg-accent transition-colors",disabled:!U.trim(),children:(0,t.jsx)(p.Check,{className:"size-3.5 text-primary"})}),(0,t.jsx)("button",{type:"button",onClick:()=>{B(!1),H("")},className:"flex size-6 items-center justify-center rounded-md hover:bg-accent transition-colors",children:(0,t.jsx)(m.X,{className:"size-3.5 text-muted-foreground"})})]}),(0,t.jsx)("div",{ref:X,className:"flex-1 overflow-y-auto p-1.5",children:z?(0,t.jsxs)("div",{className:"flex items-center justify-center py-8 text-muted-foreground",children:[(0,t.jsx)(d.Loader2,{className:"size-4 animate-spin mr-2"}),"Loading..."]}):F?(0,t.jsx)("div",{className:"px-3 py-8 text-center text-xs text-destructive",children:F}):et?(0,t.jsxs)(t.Fragment,{children:[M.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>Z(e.path),onDoubleClick:()=>{h(e.path),C(!1)},className:"flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-sm hover:bg-accent transition-colors text-left",children:[(0,t.jsx)(s.Folder,{className:"size-4 text-muted-foreground shrink-0"}),(0,t.jsx)("span",{className:"flex-1 truncate",children:e.name}),(0,t.jsx)(o.ChevronRight,{className:"size-3 text-muted-foreground shrink-0"})]},e.path)),E.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>{h(e.path),C(!1)},className:"flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-sm hover:bg-accent transition-colors text-left",children:[(0,t.jsx)(r.File,{className:"size-4 text-muted-foreground shrink-0"}),(0,t.jsx)("span",{className:"flex-1 truncate font-mono text-xs",children:e.name})]},e.path))]}):(0,t.jsx)("div",{className:"px-3 py-8 text-center text-xs text-muted-foreground",children:"No subdirectories"})}),(0,t.jsx)("div",{className:"border-t border-border px-3 py-1.5 flex items-center gap-2 text-xs",children:q?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(d.Loader2,{className:"size-3 animate-spin text-muted-foreground"}),(0,t.jsx)("span",{className:"text-muted-foreground",children:"Checking permissions..."})]}):V?(0,t.jsx)(t.Fragment,{children:V.readable&&V.writable?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(f,{className:"size-3.5 text-green-500"}),(0,t.jsx)("span",{className:"text-green-600 dark:text-green-400",children:"Read/Write"})]}):V.readable&&!V.writable?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(g,{className:"size-3.5 text-amber-500"}),(0,t.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Read-only — files cannot be written here"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(x,{className:"size-3.5 text-destructive"}),(0,t.jsx)("span",{className:"text-destructive",children:V.error||"No access"})]})}):(0,t.jsx)("span",{className:"text-muted-foreground",children:D("selectDirectory")})})]})})]})]})})}],434805)},524,e=>{"use strict";var t=e.i(344180),n=e.i(764556),a=e.i(209988),r=e.i(260218),s=e.i(355819),i=e.i(193251),o=e.i(62669),l=e.i(511800),c=e.i(681622),d=e.i(434805),u=e.i(660748),p=e.i(244073);function m({open:e,onOpenChange:h,workspace:f,onSubmit:g}){let x=(0,p.useTranslations)("workspace"),y=(0,p.useTranslations)("common"),v=(0,s.useAgentStore)(e=>e.agents),[b,j]=(0,n.useState)(f?.name??""),[w,k]=(0,n.useState)(f?.boundDirs[0]??""),[S,N]=(0,n.useState)(!1),[C,P]=(0,n.useState)(!1),[T,M]=(0,n.useState)(""),[O,E]=(0,n.useState)(!1),[I,D]=(0,n.useState)(null),A=!!f,R=async()=>{if(b&&w){N(!0);try{await g({name:b,boundDirs:[w]}),h(!1)}finally{N(!1)}}},z=(0,n.useCallback)(async()=>{if(T&&w){E(!0),D(null);try{let e=await fetch("/api/workspaces/clone",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:T,targetDir:w})});if(!e.ok){let t=await e.json();D({phase:"error",progress:0,error:t.error||x("clone.cloneFailed")}),E(!1);return}let t=e.body?.getReader();if(!t){D({phase:"error",progress:0,error:x("clone.noResponseBody")}),E(!1);return}let n=new TextDecoder,a="";for(;;){let{done:e,value:r}=await t.read();if(e)break;let s=(a+=n.decode(r,{stream:!0})).split("\n");for(let e of(a=s.pop()||"",s))if(e.startsWith("data: "))try{let t=JSON.parse(e.slice(6));D(t),("done"===t.phase||"error"===t.phase)&&(E(!1),"done"===t.phase&&t.cloneDir&&(k(t.cloneDir),b||j(T.split("/").pop()?.replace(".git","")||""),P(!1),M(""),D(null)))}catch{}}}catch(e){D({phase:"error",progress:0,error:e instanceof Error?e.message:String(e)}),E(!1)}}},[T,w,b,x]);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.Dialog,{open:e,onOpenChange:h,children:(0,t.jsxs)(a.DialogContent,{children:[(0,t.jsxs)(a.DialogHeader,{children:[(0,t.jsx)(a.DialogTitle,{children:A?x("dialog.editTitle"):x("dialog.newTitle")}),(0,t.jsx)(a.DialogDescription,{children:A?x("dialog.editDescription"):x("dialog.newDescription")})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 py-2",children:[(0,t.jsx)(c.Input,{className:"rounded-xl py-2.5",placeholder:x("dialog.namePlaceholder"),value:b,onChange:e=>j(e.target.value),onKeyDown:e=>"Enter"===e.key&&e.preventDefault()}),(0,t.jsx)("div",{children:(0,t.jsx)(d.FolderPicker,{value:w,onChange:k,placeholder:"/path/to/project"})}),!A&&(0,t.jsxs)(r.Button,{type:"button",variant:"outline",size:"sm",className:"w-full gap-1.5",onClick:()=>P(!0),disabled:!w,title:w?x("clone.fromGitTooltip"):x("clone.selectFolderFirst"),children:[(0,t.jsx)(i.Download,{className:"size-4"}),x("clone.createFromGit")]}),A&&v.length>0&&(0,t.jsxs)("div",{className:"rounded-xl border border-border p-3",children:[(0,t.jsxs)("div",{className:"mb-2 flex items-center gap-2 text-sm font-medium",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:v.length}),(0,t.jsx)("span",{children:x("agents")})]}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:v.map(e=>(0,t.jsx)("span",{className:"inline-flex items-center gap-1 rounded-md bg-muted px-2 py-0.5 text-xs",children:e.name||e.role},e.id))})]})]}),(0,t.jsxs)(a.DialogFooter,{children:[(0,t.jsx)(r.Button,{variant:"outline",onClick:()=>h(!1),disabled:S,children:y("cancel")}),(0,t.jsx)(r.Button,{onClick:R,disabled:!b||!w||S,children:y(A?"save":"create")})]})]})}),(0,t.jsx)(a.Dialog,{open:C,onOpenChange:e=>{O||P(e)},children:(0,t.jsxs)(a.DialogContent,{children:[(0,t.jsxs)(a.DialogHeader,{children:[(0,t.jsx)(a.DialogTitle,{children:x("clone.title")}),(0,t.jsx)(a.DialogDescription,{children:x("clone.description")})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 py-2",children:[(0,t.jsx)(c.Input,{className:"rounded-xl py-2.5",placeholder:"https://github.com/user/repo.git",value:T,onChange:e=>M(e.target.value),onKeyDown:e=>"Enter"===e.key&&e.preventDefault(),disabled:O}),(0,t.jsxs)("p",{className:"text-xs text-muted-foreground",children:[x("clone.cloneTo"),w,"/",T?T.split("/").pop()?.replace(".git","")||"repo":"..."]}),I&&"done"!==I.phase&&"error"!==I.phase&&(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsxs)(u.Progress,{value:I.progress,children:[(0,t.jsx)(u.ProgressLabel,{children:x(`clone.phase.${I.phase}`)}),(0,t.jsxs)("span",{className:"ml-auto text-sm text-muted-foreground tabular-nums",children:[I.progress,"%"]}),(0,t.jsx)(u.ProgressTrack,{children:(0,t.jsx)(u.ProgressIndicator,{})})]}),null!=I.received&&null!=I.total&&(0,t.jsxs)("p",{className:"text-xs text-muted-foreground",children:[I.received," / ",I.total," ",x("clone.objects")]})]}),I?.phase==="error"&&(0,t.jsxs)("div",{className:"flex items-start gap-2 rounded-lg border border-destructive/50 bg-destructive/5 p-3",children:[(0,t.jsx)(l.AlertCircle,{className:"size-4 mt-0.5 shrink-0 text-destructive"}),(0,t.jsx)("p",{className:"text-sm text-destructive",children:I.error})]})]}),(0,t.jsxs)(a.DialogFooter,{children:[(0,t.jsx)(r.Button,{variant:"outline",onClick:()=>{O||P(!1)},disabled:O,children:y("cancel")}),(0,t.jsx)(r.Button,{onClick:z,disabled:!T||O,children:O?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.Loader2,{className:"size-4 animate-spin"}),x("clone.cloning")]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.Download,{className:"size-4"}),x("clone.clone")]})})]})]})})]})}e.s(["WorkspaceDialog",0,function({open:e,onOpenChange:n,workspace:a,onSubmit:r}){return(0,t.jsx)(m,{open:e,onOpenChange:n,workspace:a,onSubmit:r},e?a?.id??"new":"closed")}])},164202,511518,487122,e=>{"use strict";let t=(0,e.i(433721).default)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);e.s(["Zap",0,t],164202);let n=Symbol.for("constructDateFrom");e.s(["constructFromSymbol",0,n,"millisecondsInDay",0,864e5,"millisecondsInWeek",0,6048e5,"minutesInDay",0,1440,"minutesInMonth",0,43200],511518),e.s(["constructFrom",0,function(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&n in e?e[n](t):e instanceof Date?new e.constructor(t):new Date(t)}],487122)},238153,244874,e=>{"use strict";var t;let n={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function a(e){return (t={})=>{let n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}let r={date:a({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:a({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:a({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},s={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function i(e){return(t,n)=>{let a;if("formatting"===(n?.context?String(n.context):"standalone")&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,r=n?.width?String(n.width):t;a=e.formattingValues[r]||e.formattingValues[t]}else{let t=e.defaultWidth,r=n?.width?String(n.width):e.defaultWidth;a=e.values[r]||e.values[t]}return a[e.argumentCallback?e.argumentCallback(t):t]}}function o(e){return(t,n={})=>{let a,r=n.width,s=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(s);if(!i)return null;let o=i[0],l=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(l)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}(l,e=>e.test(o)):function(e,t){for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}(l,e=>e.test(o));return a=e.valueCallback?e.valueCallback(c):c,{value:a=n.valueCallback?n.valueCallback(a):a,rest:t.slice(o.length)}}}let l={code:"en-US",formatDistance:(e,t,a)=>{let r,s=n[e];if(r="string"==typeof s?s:1===t?s.one:s.other.replace("{{count}}",t.toString()),a?.addSuffix)if(a.comparison&&a.comparison>0)return"in "+r;else return r+" ago";return r},formatLong:r,formatRelative:(e,t,n,a)=>s[e],localize:{ordinalNumber:(e,t)=>{let n=Number(e),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:i({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:i({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:i({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:i({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:i({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(t={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,n={})=>{let a=e.match(t.matchPattern);if(!a)return null;let r=a[0],s=e.match(t.parsePattern);if(!s)return null;let i=t.valueCallback?t.valueCallback(s[0]):s[0];return{value:i=n.valueCallback?n.valueCallback(i):i,rest:e.slice(r.length)}}),era:o({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:o({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:o({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:o({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:o({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};e.s(["enUS",0,l],244874),e.s(["defaultLocale",0,l],238153)},492421,e=>{"use strict";let t={};e.s(["getDefaultOptions",0,function(){return t}])},632713,516467,e=>{"use strict";var t=e.i(487122);function n(e,n){return(0,t.constructFrom)(n||e,e)}e.s(["toDate",0,n],516467),e.s(["getTimezoneOffsetInMilliseconds",0,function(e){let t=n(e),a=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return a.setUTCFullYear(t.getFullYear()),e-a}],632713)},539392,e=>{"use strict";var t=e.i(487122);e.s(["normalizeDates",0,function(e,...n){let a=t.constructFrom.bind(null,e||n.find(e=>"object"==typeof e));return n.map(a)}])},731285,e=>{"use strict";var t=e.i(539392);e.s(["differenceInCalendarMonths",0,function(e,n,a){let[r,s]=(0,t.normalizeDates)(a?.in,e,n);return 12*(r.getFullYear()-s.getFullYear())+(r.getMonth()-s.getMonth())}])},936765,e=>{"use strict";var t=e.i(516467);e.s(["endOfMonth",0,function(e,n){let a=(0,t.toDate)(e,n?.in),r=a.getMonth();return a.setFullYear(a.getFullYear(),r+1,0),a.setHours(23,59,59,999),a}])},980476,e=>{e.v(t=>Promise.all(["static/chunks/05f8cnmzqd5wb.js","static/chunks/128ugqd34tr_-.js"].map(t=>e.l(t))).then(()=>t(65666)))},863812,e=>{e.v(t=>Promise.all(["static/chunks/168ojsxhm7ypc.js"].map(t=>e.l(t))).then(()=>t(158480)))},930010,e=>{e.v(e=>Promise.resolve().then(()=>e(360112)))}]);
@@ -0,0 +1,3 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,940361,e=>{"use strict";var t=e.i(344180);e.s([],2365),e.i(2365);var i=e.i(764556),n=e.i(394822),r=e.i(174465),o=e.i(648224),a=e.i(35359);e.i(8890);var l=e.i(422561),s=e.i(526850),u=e.i(232449),d=e.i(410421),c=e.i(150129),f=e.i(969490),p=e.i(602453),_=e.i(817955),g=e.i(742665),y=e.i(87709);let m=i.forwardRef(function(e,t){let{render:n,className:o,style:m,...b}=e,{setAnchor:h,actionsRef:v,internalBackdropRef:x,backdropRef:R,positionerRef:w,allowMouseUpTriggerRef:C,initialCursorPointRef:j,rootId:S}=(0,r.useContextMenuRootContext)(!1),{store:E}=(0,a.useMenuRootContext)(!1),I=E.useState("open"),M=E.useState("disabled"),k=i.useRef(null),O=i.useRef(null),T=(0,u.useTimeout)(),P=(0,u.useTimeout)(),z=i.useRef(!1);function A(e,t,i){let n=i.type.startsWith("touch");j.current={x:e,y:t},h({getBoundingClientRect:()=>DOMRect.fromRect({width:10*!!n,height:10*!!n,x:e,y:t})}),z.current=!1,v.current?.setOpen(!0,(0,p.createChangeEventDetails)(g.REASONS.triggerPress,i)),P.start(500,()=>{z.current=!0})}function D(){T.clear(),O.current=null}return i.useEffect(()=>{let e=(0,s.ownerDocument)(k.current);return(0,l.addEventListener)(e,"contextmenu",function(e){if(M)return;let t=(0,d.getTarget)(e);((0,d.contains)(k.current,t)||(0,d.contains)(x.current,t)||(0,d.contains)(R.current,t))&&e.preventDefault()})},[R,M,x]),(0,f.useRenderElement)("div",e,{state:{open:I},ref:[k,t],props:[{onContextMenu:function(e){if(M)return;C.current=!0,(0,c.stopEvent)(e),A(e.clientX,e.clientY,e.nativeEvent);let t=(0,s.ownerDocument)(k.current);(0,l.addEventListener)(t,"mouseup",e=>{if(C.current=!1,!z.current)return;P.clear(),z.current=!1;let t=(0,d.getTarget)(e);(0,d.contains)(w.current,t)||S&&t&&(0,y.findRootOwnerId)(t)===S||v.current?.setOpen(!1,(0,p.createChangeEventDetails)(g.REASONS.cancelOpen,e))},{once:!0})},onTouchStart:function(e){if(!M&&(C.current=!1,1===e.touches.length)){e.stopPropagation();let t=e.touches[0];O.current={x:t.clientX,y:t.clientY},T.start(500,()=>{O.current&&A(O.current.x,O.current.y,e.nativeEvent)})}},onTouchMove:function(e){if(T.isStarted()&&O.current&&1===e.touches.length){let t=e.touches[0],i=Math.abs(t.clientX-O.current.x),n=Math.abs(t.clientY-O.current.y);(i>10||n>10)&&T.clear()}},onTouchEnd:D,onTouchCancel:D,style:{WebkitTouchCallout:"none"}},b],stateAttributesMapping:_.pressableTriggerOpenStateMapping})});var b=e.i(487455),h=e.i(293209),v=e.i(503662),x=e.i(33427),R=e.i(324573),w=e.i(582883),C=e.i(277658),j=e.i(349204),S=e.i(28051),E=e.i(597375),I=e.i(81752),M=e.i(59354),k=e.i(300637),O=e.i(281478),T=e.i(65255),P=e.i(327794),z=e.i(362962);e.s(["Arrow",()=>R.MenuArrow,"Backdrop",()=>b.MenuBackdrop,"CheckboxItem",()=>S.MenuCheckboxItem,"CheckboxItemIndicator",()=>E.MenuCheckboxItemIndicator,"Group",()=>w.MenuGroup,"GroupLabel",()=>C.MenuGroupLabel,"Item",()=>j.MenuItem,"LinkItem",()=>I.MenuLinkItem,"Popup",()=>x.MenuPopup,"Portal",()=>h.MenuPortal,"Positioner",()=>v.MenuPositioner,"RadioGroup",()=>M.MenuRadioGroup,"RadioItem",()=>k.MenuRadioItem,"RadioItemIndicator",()=>O.MenuRadioItemIndicator,"Root",0,function(e){let[l,s]=i.useState({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,x:0,y:0})}),u=i.useRef(null),d=i.useRef(null),c=i.useRef(null),f=i.useRef(null),p=i.useRef(!0),_=i.useRef(null),g=(0,n.useId)(),y=i.useMemo(()=>({anchor:l,setAnchor:s,actionsRef:c,backdropRef:u,internalBackdropRef:d,positionerRef:f,allowMouseUpTriggerRef:p,initialCursorPointRef:_,rootId:g}),[l,g]);return(0,t.jsx)(r.ContextMenuRootContext.Provider,{value:y,children:(0,t.jsx)(a.MenuRootContext.Provider,{value:void 0,children:(0,t.jsx)(o.Menu.Root,{...e})})})},"Separator",()=>z.Separator,"SubmenuRoot",()=>T.MenuSubmenuRoot,"SubmenuTrigger",()=>P.MenuSubmenuTrigger,"Trigger",0,m],912001);var A=e.i(912001),A=A,D=e.i(465458),L=e.i(932031);function N({className:e,align:i="start",alignOffset:n=4,side:r="right",sideOffset:o=0,...a}){return(0,t.jsx)(A.Portal,{children:(0,t.jsx)(A.Positioner,{className:"isolate z-50 outline-none",align:i,alignOffset:n,side:r,sideOffset:o,children:(0,t.jsx)(A.Popup,{"data-slot":"context-menu-content",className:(0,D.cn)("z-50 max-h-(--available-height) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...a})})})}e.i(299648),e.s(["ContextMenu",0,function({...e}){return(0,t.jsx)(A.Root,{"data-slot":"context-menu",...e})},"ContextMenuContent",0,N,"ContextMenuItem",0,function({className:e,inset:i,variant:n="default",...r}){return(0,t.jsx)(A.Item,{"data-slot":"context-menu-item","data-inset":i,"data-variant":n,className:(0,D.cn)("group/context-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive",e),...r})},"ContextMenuSeparator",0,function({className:e,...i}){return(0,t.jsx)(A.Separator,{"data-slot":"context-menu-separator",className:(0,D.cn)("-mx-1 my-1 h-px bg-border",e),...i})},"ContextMenuSub",0,function({...e}){return(0,t.jsx)(A.SubmenuRoot,{"data-slot":"context-menu-sub",...e})},"ContextMenuSubContent",0,function({...e}){return(0,t.jsx)(N,{"data-slot":"context-menu-sub-content",className:"shadow-lg",side:"right",...e})},"ContextMenuSubTrigger",0,function({className:e,inset:i,children:n,...r}){return(0,t.jsxs)(A.SubmenuTrigger,{"data-slot":"context-menu-sub-trigger","data-inset":i,className:(0,D.cn)("flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...r,children:[n,(0,t.jsx)(L.ChevronRightIcon,{className:"ml-auto"})]})},"ContextMenuTrigger",0,function({className:e,...i}){return(0,t.jsx)(A.Trigger,{"data-slot":"context-menu-trigger",className:(0,D.cn)("select-none",e),...i})}],940361)},236634,725487,668316,964873,9174,223328,865332,834691,315806,e=>{"use strict";e.s([],236634),e.i(8890);var t,i,n,r=e.i(764556),o=e.i(535270),a=e.i(277642),l=e.i(29905),s=e.i(969490),u=e.i(756432),d=e.i(267805);let c=r.createContext(void 0);function f(){let e=r.useContext(c);if(void 0===e)throw Error((0,d.default)(64));return e}e.s(["TabsRootContext",0,c,"useTabsRootContext",0,f],725487);let p=((t={}).activationDirection="data-activation-direction",t.orientation="data-orientation",t),_={tabActivationDirection:e=>({[p.activationDirection]:e})};e.s(["tabsStateAttributesMapping",0,_],668316);var g=e.i(344180);let y=r.forwardRef(function(e,t){let{className:i,defaultValue:n=0,onValueChange:d,orientation:f="horizontal",render:p,value:y,style:b,...h}=e,v=Object.hasOwn(e,"defaultValue"),x=r.useRef([]),[R,w]=r.useState(()=>new Map),[C,j]=(0,o.useControlled)({controlled:y,default:n,name:"Tabs",state:"value"}),S=void 0!==y,[E,I]=r.useState(()=>new Map),M=r.useCallback(e=>{if(void 0===e)return null;for(let[t,i]of E.entries())if(null!=i&&e===(i.value??i.index))return t;return null},[E]),[k,O]=r.useState(()=>({previousValue:C,tabActivationDirection:"none"})),{previousValue:T,tabActivationDirection:P}=k,z=P,A=!1;T!==C&&(z=m(T,C,f,E),A=null!=T&&null!=C&&null==M(C));let D=A?T:C,L=T!==D||P!==z;(0,a.useIsoLayoutEffect)(()=>{L&&O({previousValue:D,tabActivationDirection:z})},[D,L,z]);let N=(0,l.useStableCallback)((e,t)=>{t.activationDirection=m(C,e,f,E),d?.(e,t),t.isCanceled||j(e)}),W=(0,l.useStableCallback)((e,t)=>{w(i=>{if(i.get(e)===t)return i;let n=new Map(i);return n.set(e,t),n})}),$=(0,l.useStableCallback)((e,t)=>{w(i=>{if(!i.has(e)||i.get(e)!==t)return i;let n=new Map(i);return n.delete(e),n})}),B=r.useCallback(e=>R.get(e),[R]),H=r.useCallback(e=>{for(let t of E.values())if(e===t?.value)return t?.id},[E]),F=r.useMemo(()=>({getTabElementBySelectedValue:M,getTabIdByPanelValue:H,getTabPanelIdByValue:B,onValueChange:N,orientation:f,registerMountedTabPanel:W,setTabMap:I,unregisterMountedTabPanel:$,tabActivationDirection:z,value:C}),[M,H,B,N,f,W,I,$,z,C]),G=r.useMemo(()=>{for(let e of E.values())if(null!=e&&e.value===C)return e},[E,C]),Y=r.useMemo(()=>{for(let e of E.values())if(null!=e&&!e.disabled)return e.value},[E]);(0,a.useIsoLayoutEffect)(()=>{if(S||0===E.size)return;let e=G?.disabled,t=null==G&&null!==C;if(v&&e&&C===n||!e&&!t)return;let i=Y??null;C!==i&&(j(i),O(e=>"none"===e.tabActivationDirection?e:{...e,tabActivationDirection:"none"}))},[n,Y,v,S,G,j,E,C]);let q={orientation:f,tabActivationDirection:z},U=(0,s.useRenderElement)("div",e,{state:q,ref:t,props:h,stateAttributesMapping:_});return(0,g.jsx)(c.Provider,{value:F,children:(0,g.jsx)(u.CompositeList,{elementsRef:x,children:U})})});function m(e,t,i,n){if(null==e||null==t)return"none";let r=null,o=null;for(let[i,a]of n.entries()){if(null==a)continue;let n=a.value??a.index;if(e===n&&(r=i),t===n&&(o=i),null!=r&&null!=o)break}if(null==r||null==o)return r!==o&&("number"==typeof e||"string"==typeof e)&&typeof e==typeof t?"horizontal"===i?t>e?"right":"left":t>e?"down":"up":"none";let a=r.getBoundingClientRect(),l=o.getBoundingClientRect();if("horizontal"===i){if(l.left<a.left)return"left";if(l.left>a.left)return"right"}else{if(l.top<a.top)return"up";if(l.top>a.top)return"down"}return"none"}e.s(["TabsRoot",0,y],964873);var b=e.i(526850),h=e.i(139236),v=e.i(931709);let x="data-composite-item-active";e.s(["ACTIVE_COMPOSITE_ITEM",0,x],9174);var R=e.i(530909);let w=r.createContext(void 0);function C(){let e=r.useContext(w);if(void 0===e)throw Error((0,d.default)(65));return e}e.s(["TabsListContext",0,w,"useTabsListContext",0,C],223328);var j=e.i(602453),S=e.i(742665),E=e.i(410421);let I=r.forwardRef(function(e,t){let{className:i,disabled:n=!1,render:o,value:l,id:u,nativeButton:d=!0,style:c,...p}=e,{value:_,getTabPanelIdByValue:g,orientation:y}=f(),{activateOnFocus:m,highlightedTabIndex:w,onTabActivation:I,registerTabResizeObserverElement:M,setHighlightedTabIndex:k,tabsListElement:O}=C(),T=(0,h.useBaseUiId)(u),P=r.useMemo(()=>({disabled:n,id:T,value:l}),[n,T,l]),{compositeProps:z,compositeRef:A,index:D}=(0,R.useCompositeItem)({metadata:P}),L=l===_,N=r.useRef(!1),W=r.useRef(null);r.useEffect(()=>{let e=W.current;if(e)return M(e)},[M]),(0,a.useIsoLayoutEffect)(()=>{if(N.current){N.current=!1;return}if(L&&D>-1&&w!==D){if(null!=O){let e=(0,E.activeElement)((0,b.ownerDocument)(O));if(e&&(0,E.contains)(O,e))return}n||k(D)}},[L,D,w,k,n,O]);let{getButtonProps:$,buttonRef:B}=(0,v.useButton)({disabled:n,native:d,focusableWhenDisabled:!0}),H=g(l),F=r.useRef(!1),G=r.useRef(!1);return(0,s.useRenderElement)("button",e,{state:{disabled:n,active:L,orientation:y},ref:[t,B,A,W],props:[z,{role:"tab","aria-controls":H,"aria-selected":L,id:T,onClick:function(e){L||n||I(l,(0,j.createChangeEventDetails)(S.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"}))},onFocus:function(e){L||(D>-1&&!n&&k(D),!n&&m&&(!F.current||F.current&&G.current)&&I(l,(0,j.createChangeEventDetails)(S.REASONS.none,e.nativeEvent,void 0,{activationDirection:"none"})))},onPointerDown:function(e){L||n||(F.current=!0,e.button&&0!==e.button||(G.current=!0,(0,b.ownerDocument)(e.currentTarget).addEventListener("pointerup",function(){F.current=!1,G.current=!1},{once:!0})))},[x]:L?"":void 0,onKeyDownCapture(){N.current=!0}},p,$]})});e.s(["TabsTab",0,I],865332);var M=e.i(730774),k=e.i(517432);let O=((i={}).activeTabLeft="--active-tab-left",i.activeTabRight="--active-tab-right",i.activeTabTop="--active-tab-top",i.activeTabBottom="--active-tab-bottom",i.activeTabWidth="--active-tab-width",i.activeTabHeight="--active-tab-height",i);var T=e.i(394394);let P={..._,activeTabPosition:()=>null,activeTabSize:()=>null},z=r.forwardRef(function(e,t){let{className:i,render:n,renderBeforeHydration:o=!1,style:a,...l}=e,{nonce:u}=(0,T.useCSPContext)(),{getTabElementBySelectedValue:d,orientation:c,tabActivationDirection:p,value:_}=f(),{tabsListElement:y,registerIndicatorUpdateListener:m}=C(),b=(0,k.useIsHydrating)(),h=function(){let[,e]=r.useState({});return r.useCallback(()=>{e({})},[])}();r.useEffect(()=>m(h),[m,h]);let v=0,x=0,R=0,w=0,j=0,S=0,E=!1;if(null!=_&&null!=y){let e=d(_);if(E=!0,null!=e){let{width:t,height:i}=(0,M.getCssDimensions)(e),{width:n,height:r}=(0,M.getCssDimensions)(y),o=e.getBoundingClientRect(),a=y.getBoundingClientRect(),l=n>0?a.width/n:1,s=r>0?a.height/r:1;if(Math.abs(l)>Number.EPSILON&&Math.abs(s)>Number.EPSILON){let e=o.left-a.left,t=o.top-a.top;v=e/l+y.scrollLeft-y.clientLeft,R=t/s+y.scrollTop-y.clientTop}else v=e.offsetLeft,R=e.offsetTop;j=t,S=i,x=y.scrollWidth-v-j,w=y.scrollHeight-R-S}}let I=r.useMemo(()=>E?{left:v,right:x,top:R,bottom:w}:null,[v,x,R,w,E]),z=r.useMemo(()=>E?{width:j,height:S}:null,[j,S,E]),A=r.useMemo(()=>{if(E)return{[O.activeTabLeft]:`${v}px`,[O.activeTabRight]:`${x}px`,[O.activeTabTop]:`${R}px`,[O.activeTabBottom]:`${w}px`,[O.activeTabWidth]:`${j}px`,[O.activeTabHeight]:`${S}px`}},[v,x,R,w,j,S,E]),D=E&&j>0&&S>0,L=(0,s.useRenderElement)("span",e,{state:{orientation:c,activeTabPosition:I,activeTabSize:z,tabActivationDirection:p},ref:t,props:[{role:"presentation",style:A,hidden:!D},l,{suppressHydrationWarning:!0}],stateAttributesMapping:P});return null==_?null:(0,g.jsxs)(r.Fragment,{children:[L,b&&o&&(0,g.jsx)("script",{nonce:u,dangerouslySetInnerHTML:{__html:'!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const i=e.querySelector("[data-active]");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c("left",o),c("right",n),c("top",h),c("bottom",l),c("width",r),c("height",f),r>0&&f>0&&t.removeAttribute("hidden")}();'},suppressHydrationWarning:!0})]})});e.s(["TabsIndicator",0,z],834691);var A=e.i(677822),D=e.i(282458),L=e.i(273598),N=e.i(254891),W=e.i(296615);let $=((n={}).index="data-index",n.activationDirection="data-activation-direction",n.orientation="data-orientation",n.hidden="data-hidden",n[n.startingStyle=D.TransitionStatusDataAttributes.startingStyle]="startingStyle",n[n.endingStyle=D.TransitionStatusDataAttributes.endingStyle]="endingStyle",n),B={..._,...D.transitionStatusMapping},H=r.forwardRef(function(e,t){let{className:i,value:n,render:o,keepMounted:l=!1,style:u,...d}=e,{value:c,getTabIdByPanelValue:p,orientation:_,tabActivationDirection:g,registerMountedTabPanel:y,unregisterMountedTabPanel:m}=f(),b=(0,h.useBaseUiId)(),v=r.useMemo(()=>({id:b,value:n}),[b,n]),{ref:x,index:R}=(0,W.useCompositeListItem)({metadata:v}),w=n===c,{mounted:C,transitionStatus:j,setMounted:S}=(0,N.useTransitionStatus)(w),E=!C,I=p(n),M=r.useRef(null),k=(0,s.useRenderElement)("div",e,{state:{hidden:E,orientation:_,tabActivationDirection:g,transitionStatus:j},ref:[t,x,M],props:[{"aria-labelledby":I,hidden:E,id:b,role:"tabpanel",tabIndex:w?0:-1,inert:(0,A.inertValue)(!w),[$.index]:R},d],stateAttributesMapping:B});return((0,L.useOpenChangeComplete)({open:w,ref:M,onComplete(){w||S(!1)}}),(0,a.useIsoLayoutEffect)(()=>{if((!E||l)&&null!=b)return y(n,b),()=>{m(n,b)}},[E,l,n,b,y,m]),l||C)?k:null});e.s(["TabsPanel",0,H],315806)},568769,e=>{"use strict";e.s(["isElementDisabled",0,function(e){return null==e||e.hasAttribute("disabled")||"true"===e.getAttribute("aria-disabled")}])},812057,e=>{"use strict";var t=e.i(344180);e.i(236634);var i=e.i(964873),n=e.i(865332),r=e.i(834691),o=e.i(315806);e.i(8890);var a=e.i(764556),l=e.i(29905),s=e.i(863728),u=e.i(756432),d=e.i(568769),c=e.i(204133),f=e.i(100229),p=e.i(877580),_=e.i(9174),g=e.i(410421);let y=[];var m=e.i(352360),b=e.i(969490),h=e.i(189131);function v(e){let{render:i,className:n,style:r,refs:o=s.EMPTY_ARRAY,props:v=s.EMPTY_ARRAY,state:x=s.EMPTY_OBJECT,stateAttributesMapping:R,highlightedIndex:w,onHighlightedIndexChange:C,orientation:j,dense:S,itemSizes:E,loopFocus:I,onLoop:M,cols:k,enableHomeAndEndKeys:O,onMapChange:T,stopEventPropagation:P=!0,rootRef:z,disabledIndices:A,modifierKeys:D,highlightItemOnHover:L=!1,tag:N="div",...W}=e,{props:$,highlightedIndex:B,onHighlightedIndexChange:H,elementsRef:F,onMapChange:G,relayKeyboardEvent:Y}=function(e){let{itemSizes:t,cols:i=1,loopFocus:n=!0,onLoop:r,dense:o=!1,orientation:s="both",direction:u,highlightedIndex:m,onHighlightedIndexChange:b,rootRef:h,enableHomeAndEndKeys:v=!1,stopEventPropagation:x=!1,disabledIndices:R,modifierKeys:w=y}=e,[C,j]=a.useState(0),S=i>1,E=a.useRef(null),I=(0,c.useMergedRefs)(E,h),M=a.useRef([]),k=a.useRef(!1),O=m??C,T=(0,l.useStableCallback)((e,t=!1)=>{if((b??j)(e),t){let t=M.current[e];(0,f.scrollIntoViewIfNeeded)(E.current,t,u,s)}}),P=(0,l.useStableCallback)(e=>{if(0===e.size||k.current)return;k.current=!0;let t=Array.from(e.keys()),i=t.find(e=>e?.hasAttribute(_.ACTIVE_COMPOSITE_ITEM))??null,n=i?t.indexOf(i):-1;-1!==n&&T(n),(0,f.scrollIntoViewIfNeeded)(E.current,i,u,s)}),z=(0,l.useStableCallback)((e,t,i)=>r?r?.(e,t,i,M):i),A=a.useMemo(()=>({"aria-orientation":"both"===s?void 0:s,ref:I,onFocus(e){let t=E.current,i=(0,g.getTarget)(e.nativeEvent);t&&null!=i&&(0,f.isNativeInput)(i)&&i.setSelectionRange(0,i.value.length??0)},onKeyDown(e){let a=v?f.ALL_KEYS:f.ARROW_KEYS;if(!a.has(e.key)||function(e,t){for(let i of f.MODIFIER_KEYS.values())if(!t.includes(i)&&e.getModifierState(i))return!0;return!1}(e,w)||!E.current)return;let l="rtl"===u,c=l?f.ARROW_LEFT:f.ARROW_RIGHT,_={horizontal:c,vertical:f.ARROW_DOWN,both:c}[s],y=l?f.ARROW_RIGHT:f.ARROW_LEFT,m={horizontal:y,vertical:f.ARROW_UP,both:y}[s],b=(0,g.getTarget)(e.nativeEvent);if(null!=b&&(0,f.isNativeInput)(b)&&!(0,d.isElementDisabled)(b)){let t=b.selectionStart,i=b.selectionEnd,n=b.value??"";if(null==t||e.shiftKey||t!==i||e.key!==m&&t<n.length||e.key!==_&&t>0)return}let h=O,C=(0,p.getMinListIndex)(M,R),j=(0,p.getMaxListIndex)(M,R);if(S){let r=t||Array.from({length:M.current.length},()=>({width:1,height:1})),a=(0,p.createGridCellMap)(r,i,o),u=a.findIndex(e=>null!=e&&!(0,p.isListIndexDisabled)(M.current,e,R)),d=a.reduce((e,t,i)=>null==t||(0,p.isListIndexDisabled)(M.current,t,R)?e:i,-1);h=a[(0,p.getGridNavigatedIndex)(a.map(e=>null!=e?M.current[e]:null),{event:e,orientation:s,loopFocus:n,onLoop:z,cols:i,disabledIndices:(0,p.getGridCellIndices)([...R||M.current.map((e,t)=>(0,p.isListIndexDisabled)(M.current,t)?t:void 0),void 0],a),minIndex:u,maxIndex:d,prevIndex:(0,p.getGridCellIndexOfCorner)(O>j?C:O,r,a,i,e.key===f.ARROW_DOWN?"bl":e.key===f.ARROW_RIGHT?"tr":"tl"),rtl:l})]}let I={horizontal:[c],vertical:[f.ARROW_DOWN],both:[c,f.ARROW_DOWN]}[s],k={horizontal:[y],vertical:[f.ARROW_UP],both:[y,f.ARROW_UP]}[s],P=S?a:({horizontal:v?f.HORIZONTAL_KEYS_WITH_EXTRA_KEYS:f.HORIZONTAL_KEYS,vertical:v?f.VERTICAL_KEYS_WITH_EXTRA_KEYS:f.VERTICAL_KEYS,both:a})[s];v&&(e.key===f.HOME?h=C:e.key===f.END&&(h=j)),h===O&&(I.includes(e.key)||k.includes(e.key))&&(n&&h===j&&I.includes(e.key)?(h=C,r&&(h=r(e,O,h,M))):n&&h===C&&k.includes(e.key)?(h=j,r&&(h=r(e,O,h,M))):h=(0,p.findNonDisabledListIndex)(M.current,{startingIndex:h,decrement:k.includes(e.key),disabledIndices:R})),h===O||(0,p.isIndexOutOfListBounds)(M.current,h)||(x&&e.stopPropagation(),P.has(e.key)&&e.preventDefault(),T(h,!0),queueMicrotask(()=>{M.current[h]?.focus()}))}}),[i,o,u,R,M,v,O,S,t,n,r,z,I,w,T,s,x]);return a.useMemo(()=>({props:A,highlightedIndex:O,onHighlightedIndexChange:T,elementsRef:M,disabledIndices:R,onMapChange:P,relayKeyboardEvent:A.onKeyDown}),[A,O,T,M,R,P])}({itemSizes:E,cols:k,loopFocus:I,onLoop:M,dense:S,orientation:j,highlightedIndex:w,onHighlightedIndexChange:C,rootRef:z,stopEventPropagation:P,enableHomeAndEndKeys:O,direction:(0,h.useDirection)(),disabledIndices:A,modifierKeys:D}),q=(0,b.useRenderElement)(N,e,{state:x,ref:o,props:[$,...v,W],stateAttributesMapping:R}),U=a.useMemo(()=>({highlightedIndex:B,onHighlightedIndexChange:H,highlightItemOnHover:L,relayKeyboardEvent:Y}),[B,H,L,Y]);return(0,t.jsx)(m.CompositeRootContext.Provider,{value:U,children:(0,t.jsx)(u.CompositeList,{elementsRef:F,onMapChange:e=>{T?.(e),G(e)},children:q})})}var x=e.i(668316),R=e.i(725487),w=e.i(223328);let C=a.forwardRef(function(e,i){let{activateOnFocus:n=!1,className:r,loopFocus:o=!0,render:u,style:d,...c}=e,{onValueChange:f,orientation:p,value:_,setTabMap:g,tabActivationDirection:y}=(0,R.useTabsRootContext)(),[m,b]=a.useState(0),[h,C]=a.useState(null),j=a.useRef(new Set),S=a.useRef(new Set),E=a.useRef(null),I=(0,l.useStableCallback)(()=>{j.current.forEach(e=>{e()})});a.useEffect(()=>{if("u"<typeof ResizeObserver)return;let e=new ResizeObserver(()=>{j.current.size&&I()});return E.current=e,h&&e.observe(h),S.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),E.current=null}},[h,I]);let M=(0,l.useStableCallback)(e=>(j.current.add(e),()=>{j.current.delete(e)})),k=(0,l.useStableCallback)(e=>(S.current.add(e),E.current?.observe(e),()=>{S.current.delete(e),E.current?.unobserve(e)})),O=(0,l.useStableCallback)((e,t)=>{e!==_&&f(e,t)}),T=a.useMemo(()=>({activateOnFocus:n,highlightedTabIndex:m,registerIndicatorUpdateListener:M,registerTabResizeObserverElement:k,onTabActivation:O,setHighlightedTabIndex:b,tabsListElement:h}),[n,m,M,k,O,b,h]);return(0,t.jsx)(w.TabsListContext.Provider,{value:T,children:(0,t.jsx)(v,{render:u,className:r,style:d,state:{orientation:p,tabActivationDirection:y},refs:[i,C],props:[{"aria-orientation":"vertical"===p?"vertical":void 0,role:"tablist"},c],stateAttributesMapping:x.tabsStateAttributesMapping,highlightedIndex:m,enableHomeAndEndKeys:!0,loopFocus:o,orientation:p,onHighlightedIndexChange:b,onMapChange:g,disabledIndices:s.EMPTY_ARRAY})})});e.s(["Indicator",()=>r.TabsIndicator,"List",0,C,"Panel",()=>o.TabsPanel,"Root",()=>i.TabsRoot,"Tab",()=>n.TabsTab],227146);var j=e.i(227146),j=j,S=e.i(294237),E=e.i(465458);let I=(0,S.cva)("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});e.s(["Tabs",0,function({className:e,orientation:i="horizontal",...n}){return(0,t.jsx)(j.Root,{"data-slot":"tabs","data-orientation":i,className:(0,E.cn)("group/tabs flex gap-2 data-horizontal:flex-col",e),...n})},"TabsContent",0,function({className:e,...i}){return(0,t.jsx)(j.Panel,{"data-slot":"tabs-content",className:(0,E.cn)("flex-1 text-sm outline-none",e),...i})},"TabsList",0,function({className:e,variant:i="default",...n}){return(0,t.jsx)(j.List,{"data-slot":"tabs-list","data-variant":i,className:(0,E.cn)(I({variant:i}),e),...n})},"TabsTrigger",0,function({className:e,...i}){return(0,t.jsx)(j.Tab,{"data-slot":"tabs-trigger",className:(0,E.cn)("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent","data-active:bg-background data-active:text-foreground dark:data-active:border-input dark:data-active:bg-input/30 dark:data-active:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100",e),...i})}],812057)},843982,(e,t,i)=>{"use strict";function n({widthInt:e,heightInt:t,blurWidth:i,blurHeight:r,blurDataURL:o,objectFit:a}){let l=i?40*i:e,s=r?40*r:t,u=l&&s?`viewBox='0 0 ${l} ${s}'`:"";return`%3Csvg xmlns='http://www.w3.org/2000/svg' ${u}%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='${u?"none":"contain"===a?"xMidYMid":"cover"===a?"xMidYMid slice":"none"}' style='filter: url(%23b);' href='${o}'/%3E%3C/svg%3E`}Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"getImageBlurSvg",{enumerable:!0,get:function(){return n}})},500680,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n={VALID_LOADERS:function(){return o},imageConfigDefault:function(){return a}};for(var r in n)Object.defineProperty(i,r,{enumerable:!0,get:n[r]});let o=["default","imgix","cloudinary","akamai","custom"],a={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:14400,formats:["image/webp"],maximumDiskCacheSize:void 0,maximumRedirects:3,maximumResponseBody:5e7,dangerouslyAllowLocalIP:!1,dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:[75],unoptimized:!1,customCacheHandler:!1}},622398,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"getImgProps",{enumerable:!0,get:function(){return u}}),e.r(837121);let n=e.r(745137),r=e.r(843982),o=e.r(500680),a=["-moz-initial","fill","none","scale-down",void 0];function l(e){return void 0!==e.default}function s(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function u({src:e,sizes:t,unoptimized:i=!1,priority:d=!1,preload:c=!1,loading:f,className:p,quality:_,width:g,height:y,fill:m=!1,style:b,overrideSrc:h,onLoad:v,onLoadingComplete:x,placeholder:R="empty",blurDataURL:w,fetchPriority:C,decoding:j="async",layout:S,objectFit:E,objectPosition:I,lazyBoundary:M,lazyRoot:k,...O},T){var P;let z,A,D,{imgConf:L,showAltText:N,blurComplete:W,defaultLoader:$}=T,B=L||o.imageConfigDefault;if("allSizes"in B)z=B;else{let e=[...B.deviceSizes,...B.imageSizes].sort((e,t)=>e-t),t=B.deviceSizes.sort((e,t)=>e-t),i=B.qualities?.sort((e,t)=>e-t);z={...B,allSizes:e,deviceSizes:t,qualities:i}}if(void 0===$)throw Object.defineProperty(Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config"),"__NEXT_ERROR_CODE",{value:"E163",enumerable:!1,configurable:!0});let H=O.loader||$;delete O.loader,delete O.srcSet;let F="__next_img_default"in H;if(F){if("custom"===z.loader)throw Object.defineProperty(Error(`Image with src "${e}" is missing "loader" prop.
2
+ Read more: https://nextjs.org/docs/messages/next-image-missing-loader`),"__NEXT_ERROR_CODE",{value:"E252",enumerable:!1,configurable:!0})}else{let e=H;H=t=>{let{config:i,...n}=t;return e(n)}}if(S){"fill"===S&&(m=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[S];e&&(b={...b,...e});let i={responsive:"100vw",fill:"100vw"}[S];i&&!t&&(t=i)}let G="",Y=s(g),q=s(y);if((P=e)&&"object"==typeof P&&(l(P)||void 0!==P.src)){let t=l(e)?e.default:e;if(!t.src)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E460",enumerable:!1,configurable:!0});if(!t.height||!t.width)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E48",enumerable:!1,configurable:!0});if(A=t.blurWidth,D=t.blurHeight,w=w||t.blurDataURL,G=t.src,!m)if(Y||q){if(Y&&!q){let e=Y/t.width;q=Math.round(t.height*e)}else if(!Y&&q){let e=q/t.height;Y=Math.round(t.width*e)}}else Y=t.width,q=t.height}let U=!d&&!c&&("lazy"===f||void 0===f);(!(e="string"==typeof e?e:G)||e.startsWith("data:")||e.startsWith("blob:"))&&(i=!0,U=!1),z.unoptimized&&(i=!0),F&&!z.dangerouslyAllowSVG&&e.split("?",1)[0].endsWith(".svg")&&(i=!0);let V=s(_),K=Object.assign(m?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:E,objectPosition:I}:{},N?{}:{color:"transparent"},b),X=W||"empty"===R?null:"blur"===R?`url("data:image/svg+xml;charset=utf-8,${(0,r.getImageBlurSvg)({widthInt:Y,heightInt:q,blurWidth:A,blurHeight:D,blurDataURL:w||"",objectFit:K.objectFit})}")`:`url("${R}")`,J=a.includes(K.objectFit)?"fill"===K.objectFit?"100% 100%":"cover":K.objectFit,Q=X?{backgroundSize:J,backgroundPosition:K.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:X}:{},Z=function({config:e,src:t,unoptimized:i,width:r,quality:o,sizes:a,loader:l}){if(i){if(t.startsWith("/")&&!t.startsWith("//")){let e=(0,n.getDeploymentId)();if(e){let i=t.indexOf("?");if(-1!==i){let n=new URLSearchParams(t.slice(i+1));n.get("dpl")||(n.append("dpl",e),t=t.slice(0,i)+"?"+n.toString())}else t+=`?dpl=${e}`}}return{src:t,srcSet:void 0,sizes:void 0}}let{widths:s,kind:u}=function({deviceSizes:e,allSizes:t},i,n){if(n){let i=/(^|\s)(1?\d?\d)vw/g,r=[];for(let e;e=i.exec(n);)r.push(parseInt(e[2]));if(r.length){let i=.01*Math.min(...r);return{widths:t.filter(t=>t>=e[0]*i),kind:"w"}}return{widths:t,kind:"w"}}return"number"!=typeof i?{widths:e,kind:"w"}:{widths:[...new Set([i,2*i].map(e=>t.find(t=>t>=e)||t[t.length-1]))],kind:"x"}}(e,r,a),d=s.length-1;return{sizes:a||"w"!==u?a:"100vw",srcSet:s.map((i,n)=>`${l({config:e,src:t,quality:o,width:i})} ${"w"===u?i:n+1}${u}`).join(", "),src:l({config:e,src:t,quality:o,width:s[d]})}}({config:z,src:e,unoptimized:i,width:Y,quality:V,sizes:t,loader:H}),ee=U?"lazy":f;return{props:{...O,loading:ee,fetchPriority:C,width:Y,height:q,decoding:j,className:p,style:{...K,...Q},sizes:Z.sizes,srcSet:Z.srcSet,src:h||Z.src},meta:{unoptimized:i,preload:c||d,placeholder:R,fill:m}}}},852824,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"default",{enumerable:!0,get:function(){return l}});let n=e.r(764556),r="u"<typeof window,o=r?()=>{}:n.useLayoutEffect,a=r?()=>{}:n.useEffect;function l(e){let{headManager:t,reduceComponentsToState:i}=e;function l(){if(t&&t.mountedInstances){let e=n.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(i(e))}}return r&&(t?.mountedInstances?.add(e.children),l()),o(()=>(t?.mountedInstances?.add(e.children),()=>{t?.mountedInstances?.delete(e.children)})),o(()=>(t&&(t._pendingUpdate=l),()=>{t&&(t._pendingUpdate=l)})),a(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},120333,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n={default:function(){return g},defaultHead:function(){return c}};for(var r in n)Object.defineProperty(i,r,{enumerable:!0,get:n[r]});let o=e.r(481258),a=e.r(744066),l=e.r(344180),s=a._(e.r(764556)),u=o._(e.r(852824)),d=e.r(57426);function c(){return[(0,l.jsx)("meta",{charSet:"utf-8"},"charset"),(0,l.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")]}function f(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===s.default.Fragment?e.concat(s.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}e.r(837121);let p=["name","httpEquiv","charSet","itemProp"];function _(e){let t,i,n,r;return e.reduce(f,[]).reverse().concat(c().reverse()).filter((t=new Set,i=new Set,n=new Set,r={},e=>{let o=!0,a=!1;if(e.key&&"number"!=typeof e.key&&e.key.indexOf("$")>0){a=!0;let i=e.key.slice(e.key.indexOf("$")+1);t.has(i)?o=!1:t.add(i)}switch(e.type){case"title":case"base":i.has(e.type)?o=!1:i.add(e.type);break;case"meta":for(let t=0,i=p.length;t<i;t++){let i=p[t];if(e.props.hasOwnProperty(i))if("charSet"===i)n.has(i)?o=!1:n.add(i);else{let t=e.props[i],n=r[i]||new Set;("name"!==i||!a)&&n.has(t)?o=!1:(n.add(t),r[i]=n)}}}return o})).reverse().map((e,t)=>{let i=e.key||t;return s.default.cloneElement(e,{key:i})})}let g=function({children:e}){let t=(0,s.useContext)(d.HeadManagerContext);return(0,l.jsx)(u.default,{reduceComponentsToState:_,headManager:t,children:e})};("function"==typeof i.default||"object"==typeof i.default&&null!==i.default)&&void 0===i.default.__esModule&&(Object.defineProperty(i.default,"__esModule",{value:!0}),Object.assign(i.default,i),t.exports=i.default)},914272,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"ImageConfigContext",{enumerable:!0,get:function(){return o}});let n=e.r(481258)._(e.r(764556)),r=e.r(500680),o=n.default.createContext(r.imageConfigDefault)},338431,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"RouterContext",{enumerable:!0,get:function(){return n}});let n=e.r(481258)._(e.r(764556)).default.createContext(null)},741186,(e,t,i)=>{"use strict";function n(e,t){let i=e||75;return t?.qualities?.length?t.qualities.reduce((e,t)=>Math.abs(t-i)<Math.abs(e-i)?t:e,t.qualities[0]):i}Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"findClosestQuality",{enumerable:!0,get:function(){return n}})},99552,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"default",{enumerable:!0,get:function(){return a}});let n=e.r(741186),r=e.r(745137);function o({config:e,src:t,width:i,quality:a}){let l=(0,r.getDeploymentId)();if(t.startsWith("/")&&!t.startsWith("//")){let e=t.indexOf("?");if(-1!==e){let i=new URLSearchParams(t.slice(e+1)),n=i.get("dpl");if(n){l=n,i.delete("dpl");let r=i.toString();t=t.slice(0,e)+(r?"?"+r:"")}}}if(t.startsWith("/")&&t.includes("?")&&e.localPatterns?.length===1&&"**"===e.localPatterns[0].pathname&&""===e.localPatterns[0].search)throw Object.defineProperty(Error(`Image with src "${t}" is using a query string which is not configured in images.localPatterns.
3
+ Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`),"__NEXT_ERROR_CODE",{value:"E871",enumerable:!1,configurable:!0});let s=(0,n.findClosestQuality)(a,e);return`${e.path}?url=${encodeURIComponent(t)}&w=${i}&q=${s}${t.startsWith("/")&&l?`&dpl=${l}`:""}`}o.__next_img_default=!0;let a=o},822862,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"useMergedRef",{enumerable:!0,get:function(){return r}});let n=e.r(764556);function r(e,t){let i=(0,n.useRef)(null),r=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=i.current;e&&(i.current=null,e());let t=r.current;t&&(r.current=null,t())}else e&&(i.current=o(e,n)),t&&(r.current=o(t,n))},[e,t])}function o(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let i=e(t);return"function"==typeof i?i:()=>e(null)}}("function"==typeof i.default||"object"==typeof i.default&&null!==i.default)&&void 0===i.default.__esModule&&(Object.defineProperty(i.default,"__esModule",{value:!0}),Object.assign(i.default,i),t.exports=i.default)},810034,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"Image",{enumerable:!0,get:function(){return v}});let n=e.r(481258),r=e.r(744066),o=e.r(344180),a=r._(e.r(764556)),l=n._(e.r(106206)),s=n._(e.r(120333)),u=e.r(622398),d=e.r(500680),c=e.r(914272);e.r(837121);let f=e.r(338431),p=n._(e.r(99552)),_=e.r(822862),g={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1};function y(e,t,i,n,r,o,a){let l=e?.src;e&&e["data-loaded-src"]!==l&&(e["data-loaded-src"]=l,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&r(!0),i?.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let n=!1,r=!1;i.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>n,isPropagationStopped:()=>r,persist:()=>{},preventDefault:()=>{n=!0,t.preventDefault()},stopPropagation:()=>{r=!0,t.stopPropagation()}})}n?.current&&n.current(e)}}))}function m(e){return a.use?{fetchPriority:e}:{fetchpriority:e}}"u"<typeof window&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);let b=(0,a.forwardRef)(({src:e,srcSet:t,sizes:i,height:n,width:r,decoding:l,className:s,style:u,fetchPriority:d,placeholder:c,loading:f,unoptimized:p,fill:g,onLoadRef:b,onLoadingCompleteRef:h,setBlurComplete:v,setShowAltText:x,sizesInput:R,onLoad:w,onError:C,...j},S)=>{let E=(0,a.useCallback)(e=>{e&&(C&&(e.src=e.src),e.complete&&y(e,c,b,h,v,p,R))},[e,c,b,h,v,C,p,R]),I=(0,_.useMergedRef)(S,E);return(0,o.jsx)("img",{...j,...m(d),loading:f,width:r,height:n,decoding:l,"data-nimg":g?"fill":"1",className:s,style:u,sizes:i,srcSet:t,src:e,ref:I,onLoad:e=>{y(e.currentTarget,c,b,h,v,p,R)},onError:e=>{x(!0),"empty"!==c&&v(!0),C&&C(e)}})});function h({isAppRouter:e,imgAttributes:t}){let i={as:"image",imageSrcSet:t.srcSet,imageSizes:t.sizes,crossOrigin:t.crossOrigin,referrerPolicy:t.referrerPolicy,...m(t.fetchPriority)};return e&&l.default.preload?(l.default.preload(t.src,i),null):(0,o.jsx)(s.default,{children:(0,o.jsx)("link",{rel:"preload",href:t.srcSet?void 0:t.src,...i},"__nimg-"+t.src+t.srcSet+t.sizes)})}let v=(0,a.forwardRef)((e,t)=>{let i=(0,a.useContext)(f.RouterContext),n=(0,a.useContext)(c.ImageConfigContext),r=(0,a.useMemo)(()=>{let e=g||n||d.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),i=e.deviceSizes.sort((e,t)=>e-t),r=e.qualities?.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:i,qualities:r,localPatterns:"u"<typeof window?n?.localPatterns:e.localPatterns}},[n]),{onLoad:l,onLoadingComplete:s}=e,_=(0,a.useRef)(l);(0,a.useEffect)(()=>{_.current=l},[l]);let y=(0,a.useRef)(s);(0,a.useEffect)(()=>{y.current=s},[s]);let[m,v]=(0,a.useState)(!1),[x,R]=(0,a.useState)(!1),{props:w,meta:C}=(0,u.getImgProps)(e,{defaultLoader:p.default,imgConf:r,blurComplete:m,showAltText:x});return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(b,{...w,unoptimized:C.unoptimized,placeholder:C.placeholder,fill:C.fill,onLoadRef:_,onLoadingCompleteRef:y,setBlurComplete:v,setShowAltText:R,sizesInput:e.sizes,ref:t}),C.preload?(0,o.jsx)(h,{isAppRouter:!i,imgAttributes:w}):null]})});("function"==typeof i.default||"object"==typeof i.default&&null!==i.default)&&void 0===i.default.__esModule&&(Object.defineProperty(i.default,"__esModule",{value:!0}),Object.assign(i.default,i),t.exports=i.default)},776785,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n={default:function(){return d},getImageProps:function(){return u}};for(var r in n)Object.defineProperty(i,r,{enumerable:!0,get:n[r]});let o=e.r(481258),a=e.r(622398),l=e.r(810034),s=o._(e.r(99552));function u(e){let{props:t}=(0,a.getImgProps)(e,{defaultLoader:s.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,i]of Object.entries(t))void 0===i&&delete t[e];return{props:t}}let d=l.Image},253937,(e,t,i)=>{t.exports=e.r(776785)},359209,e=>{"use strict";var t=e.i(344180),i=e.i(253937);let n={".ts":"file_type_typescript",".tsx":"file_type_reactts",".js":"file_type_js",".jsx":"file_type_reactjs",".mjs":"file_type_js",".cjs":"file_type_js",".json":"file_type_json",".json5":"file_type_json5",".jsonc":"file_type_json",".md":"file_type_markdown",".mdx":"file_type_mdx",".css":"file_type_css",".scss":"file_type_scss",".less":"file_type_less",".html":"file_type_html",".svg":"file_type_svg",".png":"file_type_image",".jpg":"file_type_image",".jpeg":"file_type_image",".gif":"file_type_image",".webp":"file_type_webp",".ico":"file_type_favicon",".yaml":"file_type_yaml",".yml":"file_type_yaml",".toml":"file_type_toml",".xml":"file_type_xml",".graphql":"file_type_graphql",".gql":"file_type_graphql",".prisma":"file_type_prisma",".sql":"file_type_sql",".sh":"file_type_shell",".bash":"file_type_shell",".zsh":"file_type_shell",".py":"file_type_python",".rb":"file_type_ruby",".go":"file_type_go",".rs":"file_type_rust",".java":"file_type_java",".kt":"file_type_kotlin",".swift":"file_type_swift",".c":"file_type_c",".cpp":"file_type_cpp",".h":"file_type_cheader",".hpp":"file_type_cppheader",".cs":"file_type_csharp",".php":"file_type_php",".vue":"file_type_vue",".svelte":"file_type_svelte",".dart":"file_type_dartlang",".lua":"file_type_lua",".r":"file_type_r",".ex":"file_type_elixir",".exs":"file_type_elixir",".erl":"file_type_erlang",".hs":"file_type_haskell",".scala":"file_type_scala",".clj":"file_type_clojure",".cljs":"file_type_clojurescript",".coffee":"file_type_coffeescript",".dockerfile":"file_type_docker",".makefile":"file_type_makefile",".txt":"file_type_text",".log":"file_type_log",".env":"file_type_config",".gitignore":"file_type_git",".editorconfig":"file_type_editorconfig",".prettierrc":"file_type_prettier",".eslintrc":"file_type_eslint",".lock":"file_type_lock",".wasm":"file_type_wasm",".pdf":"file_type_pdf",".mp4":"file_type_video",".webm":"file_type_video",".mov":"file_type_video",".avi":"file_type_video",".mkv":"file_type_video",".flv":"file_type_video",".mp3":"file_type_audio",".wav":"file_type_audio",".ogg":"file_type_audio",".flac":"file_type_audio",".aac":"file_type_audio",".m4a":"file_type_audio",".wma":"file_type_audio",".zip":"file_type_zip",".tar":"file_type_zip",".gz":"file_type_zip"},r={"tsconfig.json":"file_type_tsconfig","tsconfig.build.json":"file_type_tsconfig","jsconfig.json":"file_type_jsconfig","package.json":"file_type_npm","package-lock.json":"file_type_npm","pnpm-lock.yaml":"file_type_pnpm","pnpm-workspace.yaml":"file_type_pnpm",".pnpmfile.cjs":"file_type_pnpm","yarn.lock":"file_type_yarn",".yarnrc":"file_type_yarn","next.config.ts":"file_type_next","next.config.js":"file_type_next","next.config.mjs":"file_type_next","vite.config.ts":"file_type_vite","vite.config.js":"file_type_vite","tailwind.config.ts":"file_type_tailwind","tailwind.config.js":"file_type_tailwind","postcss.config.mjs":"file_type_postcss","postcss.config.js":"file_type_postcss",".eslintrc":"file_type_eslint",".eslintrc.js":"file_type_eslint",".eslintrc.json":"file_type_eslint",".eslintrc.cjs":"file_type_eslint",".prettierrc":"file_type_prettier",".prettierrc.js":"file_type_prettier",".prettierrc.json":"file_type_prettier",".gitignore":"file_type_git",".gitattributes":"file_type_git",".editorconfig":"file_type_editorconfig",dockerfile:"file_type_docker","docker-compose.yml":"file_type_docker","docker-compose.yaml":"file_type_docker",makefile:"file_type_makefile","readme.md":"file_type_markdown",license:"file_type_license","license.md":"file_type_license",".env":"file_type_config",".env.local":"file_type_config",".env.development":"file_type_config",".env.production":"file_type_config",".env.test":"file_type_config",".npmrc":"file_type_npm",".babelrc":"file_type_babel","babel.config.js":"file_type_babel","babel.config.json":"file_type_babel",".babelrc.js":"file_type_babel",".babelrc.json":"file_type_babel","jest.config.ts":"file_type_jest","jest.config.js":"file_type_jest","vitest.config.ts":"file_type_vite","vitest.config.js":"file_type_vite","webpack.config.js":"file_type_webpack","webpack.config.ts":"file_type_webpack","rollup.config.js":"file_type_rollup","rollup.config.ts":"file_type_rollup","renovate.json":"file_type_renovate",".prettierignore":"file_type_prettier",".eslintignore":"file_type_eslint",".dockerignore":"file_type_docker",prisma:"file_type_prisma"},o={src:"folder_type_src",lib:"folder_type_library",dist:"folder_type_dist",build:"folder_type_dist",out:"folder_type_dist",public:"folder_type_public",assets:"folder_type_asset",static:"folder_type_asset",components:"folder_type_component",pages:"folder_type_view",views:"folder_type_view",routes:"folder_type_route",api:"folder_type_api",server:"folder_type_server",client:"folder_type_client",test:"folder_type_test",tests:"folder_type_test",__tests__:"folder_type_test",spec:"folder_type_test",specs:"folder_type_test",e2e:"folder_type_e2e",docs:"folder_type_docs",config:"folder_type_config",configs:"folder_type_config",scripts:"folder_type_script",styles:"folder_type_style",css:"folder_type_css",images:"folder_type_images",img:"folder_type_images",icons:"folder_type_images",fonts:"folder_type_fonts",types:"folder_type_typescript",typings:"folder_type_typings",hooks:"folder_type_hook",utils:"folder_type_helper",helpers:"folder_type_helper",tools:"folder_type_tools",services:"folder_type_services",middleware:"folder_type_middleware",models:"folder_type_model",store:"folder_type_redux",stores:"folder_type_redux",state:"folder_type_redux",node_modules:"folder_type_node",".git":"folder_type_git",".github":"folder_type_github",".vscode":"folder_type_vscode",".idea":"folder_type_idea",docker:"folder_type_docker",".docker":"folder_type_docker",kubernetes:"folder_type_kubernetes",k8s:"folder_type_kubernetes",".husky":"folder_type_husky",coverage:"folder_type_coverage",".next":"folder_type_next",".nuxt":"folder_type_nuxt",ios:"folder_type_ios",android:"folder_type_android",app:"folder_type_app",packages:"folder_type_package",modules:"folder_type_module",plugins:"folder_type_plugin",templates:"folder_type_template",i18n:"folder_type_locale",locales:"folder_type_locale",lang:"folder_type_locale",translations:"folder_type_locale",prisma:"folder_type_db",db:"folder_type_db",database:"folder_type_db",migrations:"folder_type_db",seeds:"folder_type_db",storybook:"folder_type_story",stories:"folder_type_story",".storybook":"folder_type_story",".cache":"folder_type_temp",temp:"folder_type_temp",tmp:"folder_type_temp"};e.s(["FileIconImg",0,function({name:e}){return(0,t.jsx)(i.default,{src:function(e){let t,i=e.toLowerCase();if(r[i])return`/icons/${r[i]}.svg`;let o=(t=e.lastIndexOf("."))>=0?e.slice(t).toLowerCase():"";return o&&n[o]?`/icons/${n[o]}.svg`:"/icons/default_file.svg"}(e),alt:e,width:16,height:16,className:"size-4 shrink-0",unoptimized:!0})},"FolderIconImg",0,function({name:e,isOpen:n}){let r;return(0,t.jsx)(i.default,{src:(r=o[e.toLowerCase()])?`/icons/${r}${n?"_opened":""}.svg`:n?"/icons/default_folder_opened.svg":"/icons/default_folder.svg",alt:e,width:16,height:16,className:"size-4 shrink-0",unoptimized:!0})}])}]);