@jlongo78/agent-spaces 0.9.8 → 0.9.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (356) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-path-routes-manifest.json +3 -0
  3. package/.next/standalone/.next/build-manifest.json +2 -2
  4. package/.next/standalone/.next/prerender-manifest.json +3 -3
  5. package/.next/standalone/.next/routes-manifest.json +23 -0
  6. package/.next/standalone/.next/server/app/(desktop)/admin/analytics/page.js.nft.json +1 -1
  7. package/.next/standalone/.next/server/app/(desktop)/admin/analytics/page_client-reference-manifest.js +1 -1
  8. package/.next/standalone/.next/server/app/(desktop)/admin/users/page_client-reference-manifest.js +1 -1
  9. package/.next/standalone/.next/server/app/(desktop)/analytics/page_client-reference-manifest.js +1 -1
  10. package/.next/standalone/.next/server/app/(desktop)/cortex/page_client-reference-manifest.js +1 -1
  11. package/.next/standalone/.next/server/app/(desktop)/network/page_client-reference-manifest.js +1 -1
  12. package/.next/standalone/.next/server/app/(desktop)/page_client-reference-manifest.js +1 -1
  13. package/.next/standalone/.next/server/app/(desktop)/projects/page_client-reference-manifest.js +1 -1
  14. package/.next/standalone/.next/server/app/(desktop)/sessions/[id]/page_client-reference-manifest.js +1 -1
  15. package/.next/standalone/.next/server/app/(desktop)/sessions/page_client-reference-manifest.js +1 -1
  16. package/.next/standalone/.next/server/app/(desktop)/settings/page_client-reference-manifest.js +1 -1
  17. package/.next/standalone/.next/server/app/(desktop)/terminal/page.js.nft.json +1 -1
  18. package/.next/standalone/.next/server/app/(desktop)/terminal/page_client-reference-manifest.js +1 -1
  19. package/.next/standalone/.next/server/app/(desktop)/terminal/pane/[id]/page_client-reference-manifest.js +1 -1
  20. package/.next/standalone/.next/server/app/(desktop)/terminal/remote/[nodeId]/[workspaceId]/page_client-reference-manifest.js +1 -1
  21. package/.next/standalone/.next/server/app/(desktop)/workspaces/page_client-reference-manifest.js +1 -1
  22. package/.next/standalone/.next/server/app/_global-error.html +2 -2
  23. package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
  24. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  25. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  26. package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  27. package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  28. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  29. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  30. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  31. package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
  32. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  33. package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  34. package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  35. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  36. package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  37. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  38. package/.next/standalone/.next/server/app/admin/analytics.html +1 -1
  39. package/.next/standalone/.next/server/app/admin/analytics.rsc +3 -3
  40. package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap/admin/analytics/__PAGE__.segment.rsc +2 -2
  41. package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap/admin/analytics.segment.rsc +1 -1
  42. package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap/admin.segment.rsc +1 -1
  43. package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
  44. package/.next/standalone/.next/server/app/admin/analytics.segments/_full.segment.rsc +3 -3
  45. package/.next/standalone/.next/server/app/admin/analytics.segments/_head.segment.rsc +1 -1
  46. package/.next/standalone/.next/server/app/admin/analytics.segments/_index.segment.rsc +2 -2
  47. package/.next/standalone/.next/server/app/admin/analytics.segments/_tree.segment.rsc +2 -2
  48. package/.next/standalone/.next/server/app/admin/users.html +1 -1
  49. package/.next/standalone/.next/server/app/admin/users.rsc +2 -2
  50. package/.next/standalone/.next/server/app/admin/users.segments/!KGRlc2t0b3Ap/admin/users/__PAGE__.segment.rsc +1 -1
  51. package/.next/standalone/.next/server/app/admin/users.segments/!KGRlc2t0b3Ap/admin/users.segment.rsc +1 -1
  52. package/.next/standalone/.next/server/app/admin/users.segments/!KGRlc2t0b3Ap/admin.segment.rsc +1 -1
  53. package/.next/standalone/.next/server/app/admin/users.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
  54. package/.next/standalone/.next/server/app/admin/users.segments/_full.segment.rsc +2 -2
  55. package/.next/standalone/.next/server/app/admin/users.segments/_head.segment.rsc +1 -1
  56. package/.next/standalone/.next/server/app/admin/users.segments/_index.segment.rsc +2 -2
  57. package/.next/standalone/.next/server/app/admin/users.segments/_tree.segment.rsc +2 -2
  58. package/.next/standalone/.next/server/app/analytics.html +1 -1
  59. package/.next/standalone/.next/server/app/analytics.rsc +2 -2
  60. package/.next/standalone/.next/server/app/analytics.segments/!KGRlc2t0b3Ap/analytics/__PAGE__.segment.rsc +1 -1
  61. package/.next/standalone/.next/server/app/analytics.segments/!KGRlc2t0b3Ap/analytics.segment.rsc +1 -1
  62. package/.next/standalone/.next/server/app/analytics.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
  63. package/.next/standalone/.next/server/app/analytics.segments/_full.segment.rsc +2 -2
  64. package/.next/standalone/.next/server/app/analytics.segments/_head.segment.rsc +1 -1
  65. package/.next/standalone/.next/server/app/analytics.segments/_index.segment.rsc +2 -2
  66. package/.next/standalone/.next/server/app/analytics.segments/_tree.segment.rsc +2 -2
  67. package/.next/standalone/.next/server/app/api/claude/usage/route/app-paths-manifest.json +3 -0
  68. package/.next/standalone/.next/server/app/api/claude/usage/route/build-manifest.json +11 -0
  69. package/.next/standalone/.next/server/app/api/claude/usage/route/server-reference-manifest.json +4 -0
  70. package/.next/standalone/.next/server/app/api/claude/usage/route.js +8 -0
  71. package/.next/standalone/.next/server/app/api/claude/usage/route.js.map +5 -0
  72. package/.next/standalone/.next/server/app/api/claude/usage/route.js.nft.json +1 -0
  73. package/.next/standalone/.next/server/app/api/claude/usage/route_client-reference-manifest.js +2 -0
  74. package/.next/standalone/.next/server/app/api/whisper/route.js.nft.json +1 -1
  75. package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/[todoId]/route/app-paths-manifest.json +3 -0
  76. package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/[todoId]/route/build-manifest.json +11 -0
  77. package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/[todoId]/route/server-reference-manifest.json +4 -0
  78. package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/[todoId]/route.js +8 -0
  79. package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/[todoId]/route.js.map +5 -0
  80. package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/[todoId]/route.js.nft.json +1 -0
  81. package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/[todoId]/route_client-reference-manifest.js +2 -0
  82. package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/route/app-paths-manifest.json +3 -0
  83. package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/route/build-manifest.json +11 -0
  84. package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/route/server-reference-manifest.json +4 -0
  85. package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/route.js +8 -0
  86. package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/route.js.map +5 -0
  87. package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/route.js.nft.json +1 -0
  88. package/.next/standalone/.next/server/app/api/workspaces/[id]/todos/route_client-reference-manifest.js +2 -0
  89. package/.next/standalone/.next/server/app/cortex.html +1 -1
  90. package/.next/standalone/.next/server/app/cortex.rsc +2 -2
  91. package/.next/standalone/.next/server/app/cortex.segments/!KGRlc2t0b3Ap/cortex/__PAGE__.segment.rsc +1 -1
  92. package/.next/standalone/.next/server/app/cortex.segments/!KGRlc2t0b3Ap/cortex.segment.rsc +1 -1
  93. package/.next/standalone/.next/server/app/cortex.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
  94. package/.next/standalone/.next/server/app/cortex.segments/_full.segment.rsc +2 -2
  95. package/.next/standalone/.next/server/app/cortex.segments/_head.segment.rsc +1 -1
  96. package/.next/standalone/.next/server/app/cortex.segments/_index.segment.rsc +2 -2
  97. package/.next/standalone/.next/server/app/cortex.segments/_tree.segment.rsc +2 -2
  98. package/.next/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
  99. package/.next/standalone/.next/server/app/login.html +1 -1
  100. package/.next/standalone/.next/server/app/login.rsc +2 -2
  101. package/.next/standalone/.next/server/app/login.segments/_full.segment.rsc +2 -2
  102. package/.next/standalone/.next/server/app/login.segments/_head.segment.rsc +1 -1
  103. package/.next/standalone/.next/server/app/login.segments/_index.segment.rsc +2 -2
  104. package/.next/standalone/.next/server/app/login.segments/_tree.segment.rsc +2 -2
  105. package/.next/standalone/.next/server/app/login.segments/login/__PAGE__.segment.rsc +1 -1
  106. package/.next/standalone/.next/server/app/login.segments/login.segment.rsc +1 -1
  107. package/.next/standalone/.next/server/app/m/page_client-reference-manifest.js +1 -1
  108. package/.next/standalone/.next/server/app/m/projects/page_client-reference-manifest.js +1 -1
  109. package/.next/standalone/.next/server/app/m/projects.html +1 -1
  110. package/.next/standalone/.next/server/app/m/projects.rsc +2 -2
  111. package/.next/standalone/.next/server/app/m/projects.segments/_full.segment.rsc +2 -2
  112. package/.next/standalone/.next/server/app/m/projects.segments/_head.segment.rsc +1 -1
  113. package/.next/standalone/.next/server/app/m/projects.segments/_index.segment.rsc +2 -2
  114. package/.next/standalone/.next/server/app/m/projects.segments/_tree.segment.rsc +2 -2
  115. package/.next/standalone/.next/server/app/m/projects.segments/m/projects/__PAGE__.segment.rsc +1 -1
  116. package/.next/standalone/.next/server/app/m/projects.segments/m/projects.segment.rsc +1 -1
  117. package/.next/standalone/.next/server/app/m/projects.segments/m.segment.rsc +1 -1
  118. package/.next/standalone/.next/server/app/m/sessions/[id]/page_client-reference-manifest.js +1 -1
  119. package/.next/standalone/.next/server/app/m/sessions/page_client-reference-manifest.js +1 -1
  120. package/.next/standalone/.next/server/app/m/sessions.html +1 -1
  121. package/.next/standalone/.next/server/app/m/sessions.rsc +2 -2
  122. package/.next/standalone/.next/server/app/m/sessions.segments/_full.segment.rsc +2 -2
  123. package/.next/standalone/.next/server/app/m/sessions.segments/_head.segment.rsc +1 -1
  124. package/.next/standalone/.next/server/app/m/sessions.segments/_index.segment.rsc +2 -2
  125. package/.next/standalone/.next/server/app/m/sessions.segments/_tree.segment.rsc +2 -2
  126. package/.next/standalone/.next/server/app/m/sessions.segments/m/sessions/__PAGE__.segment.rsc +1 -1
  127. package/.next/standalone/.next/server/app/m/sessions.segments/m/sessions.segment.rsc +1 -1
  128. package/.next/standalone/.next/server/app/m/sessions.segments/m.segment.rsc +1 -1
  129. package/.next/standalone/.next/server/app/m/settings/page_client-reference-manifest.js +1 -1
  130. package/.next/standalone/.next/server/app/m/settings.html +1 -1
  131. package/.next/standalone/.next/server/app/m/settings.rsc +2 -2
  132. package/.next/standalone/.next/server/app/m/settings.segments/_full.segment.rsc +2 -2
  133. package/.next/standalone/.next/server/app/m/settings.segments/_head.segment.rsc +1 -1
  134. package/.next/standalone/.next/server/app/m/settings.segments/_index.segment.rsc +2 -2
  135. package/.next/standalone/.next/server/app/m/settings.segments/_tree.segment.rsc +2 -2
  136. package/.next/standalone/.next/server/app/m/settings.segments/m/settings/__PAGE__.segment.rsc +1 -1
  137. package/.next/standalone/.next/server/app/m/settings.segments/m/settings.segment.rsc +1 -1
  138. package/.next/standalone/.next/server/app/m/settings.segments/m.segment.rsc +1 -1
  139. package/.next/standalone/.next/server/app/m/terminal/page_client-reference-manifest.js +1 -1
  140. package/.next/standalone/.next/server/app/m/terminal.html +1 -1
  141. package/.next/standalone/.next/server/app/m/terminal.rsc +2 -2
  142. package/.next/standalone/.next/server/app/m/terminal.segments/_full.segment.rsc +2 -2
  143. package/.next/standalone/.next/server/app/m/terminal.segments/_head.segment.rsc +1 -1
  144. package/.next/standalone/.next/server/app/m/terminal.segments/_index.segment.rsc +2 -2
  145. package/.next/standalone/.next/server/app/m/terminal.segments/_tree.segment.rsc +2 -2
  146. package/.next/standalone/.next/server/app/m/terminal.segments/m/terminal/__PAGE__.segment.rsc +1 -1
  147. package/.next/standalone/.next/server/app/m/terminal.segments/m/terminal.segment.rsc +1 -1
  148. package/.next/standalone/.next/server/app/m/terminal.segments/m.segment.rsc +1 -1
  149. package/.next/standalone/.next/server/app/m.html +1 -1
  150. package/.next/standalone/.next/server/app/m.rsc +2 -2
  151. package/.next/standalone/.next/server/app/m.segments/_full.segment.rsc +2 -2
  152. package/.next/standalone/.next/server/app/m.segments/_head.segment.rsc +1 -1
  153. package/.next/standalone/.next/server/app/m.segments/_index.segment.rsc +2 -2
  154. package/.next/standalone/.next/server/app/m.segments/_tree.segment.rsc +2 -2
  155. package/.next/standalone/.next/server/app/m.segments/m/__PAGE__.segment.rsc +1 -1
  156. package/.next/standalone/.next/server/app/m.segments/m.segment.rsc +1 -1
  157. package/.next/standalone/.next/server/app/network.html +1 -1
  158. package/.next/standalone/.next/server/app/network.rsc +2 -2
  159. package/.next/standalone/.next/server/app/network.segments/!KGRlc2t0b3Ap/network/__PAGE__.segment.rsc +1 -1
  160. package/.next/standalone/.next/server/app/network.segments/!KGRlc2t0b3Ap/network.segment.rsc +1 -1
  161. package/.next/standalone/.next/server/app/network.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
  162. package/.next/standalone/.next/server/app/network.segments/_full.segment.rsc +2 -2
  163. package/.next/standalone/.next/server/app/network.segments/_head.segment.rsc +1 -1
  164. package/.next/standalone/.next/server/app/network.segments/_index.segment.rsc +2 -2
  165. package/.next/standalone/.next/server/app/network.segments/_tree.segment.rsc +2 -2
  166. package/.next/standalone/.next/server/app/projects.html +1 -1
  167. package/.next/standalone/.next/server/app/projects.rsc +2 -2
  168. package/.next/standalone/.next/server/app/projects.segments/!KGRlc2t0b3Ap/projects/__PAGE__.segment.rsc +1 -1
  169. package/.next/standalone/.next/server/app/projects.segments/!KGRlc2t0b3Ap/projects.segment.rsc +1 -1
  170. package/.next/standalone/.next/server/app/projects.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
  171. package/.next/standalone/.next/server/app/projects.segments/_full.segment.rsc +2 -2
  172. package/.next/standalone/.next/server/app/projects.segments/_head.segment.rsc +1 -1
  173. package/.next/standalone/.next/server/app/projects.segments/_index.segment.rsc +2 -2
  174. package/.next/standalone/.next/server/app/projects.segments/_tree.segment.rsc +2 -2
  175. package/.next/standalone/.next/server/app/sessions.html +1 -1
  176. package/.next/standalone/.next/server/app/sessions.rsc +2 -2
  177. package/.next/standalone/.next/server/app/sessions.segments/!KGRlc2t0b3Ap/sessions/__PAGE__.segment.rsc +1 -1
  178. package/.next/standalone/.next/server/app/sessions.segments/!KGRlc2t0b3Ap/sessions.segment.rsc +1 -1
  179. package/.next/standalone/.next/server/app/sessions.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
  180. package/.next/standalone/.next/server/app/sessions.segments/_full.segment.rsc +2 -2
  181. package/.next/standalone/.next/server/app/sessions.segments/_head.segment.rsc +1 -1
  182. package/.next/standalone/.next/server/app/sessions.segments/_index.segment.rsc +2 -2
  183. package/.next/standalone/.next/server/app/sessions.segments/_tree.segment.rsc +2 -2
  184. package/.next/standalone/.next/server/app/settings.html +1 -1
  185. package/.next/standalone/.next/server/app/settings.rsc +3 -3
  186. package/.next/standalone/.next/server/app/settings.segments/!KGRlc2t0b3Ap/settings/__PAGE__.segment.rsc +2 -2
  187. package/.next/standalone/.next/server/app/settings.segments/!KGRlc2t0b3Ap/settings.segment.rsc +1 -1
  188. package/.next/standalone/.next/server/app/settings.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
  189. package/.next/standalone/.next/server/app/settings.segments/_full.segment.rsc +3 -3
  190. package/.next/standalone/.next/server/app/settings.segments/_head.segment.rsc +1 -1
  191. package/.next/standalone/.next/server/app/settings.segments/_index.segment.rsc +2 -2
  192. package/.next/standalone/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
  193. package/.next/standalone/.next/server/app/terminal.html +1 -1
  194. package/.next/standalone/.next/server/app/terminal.rsc +3 -3
  195. package/.next/standalone/.next/server/app/terminal.segments/!KGRlc2t0b3Ap/terminal/__PAGE__.segment.rsc +2 -2
  196. package/.next/standalone/.next/server/app/terminal.segments/!KGRlc2t0b3Ap/terminal.segment.rsc +1 -1
  197. package/.next/standalone/.next/server/app/terminal.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
  198. package/.next/standalone/.next/server/app/terminal.segments/_full.segment.rsc +3 -3
  199. package/.next/standalone/.next/server/app/terminal.segments/_head.segment.rsc +1 -1
  200. package/.next/standalone/.next/server/app/terminal.segments/_index.segment.rsc +2 -2
  201. package/.next/standalone/.next/server/app/terminal.segments/_tree.segment.rsc +2 -2
  202. package/.next/standalone/.next/server/app/vr/page_client-reference-manifest.js +1 -1
  203. package/.next/standalone/.next/server/app/vr.html +1 -1
  204. package/.next/standalone/.next/server/app/vr.rsc +2 -2
  205. package/.next/standalone/.next/server/app/vr.segments/_full.segment.rsc +2 -2
  206. package/.next/standalone/.next/server/app/vr.segments/_head.segment.rsc +1 -1
  207. package/.next/standalone/.next/server/app/vr.segments/_index.segment.rsc +2 -2
  208. package/.next/standalone/.next/server/app/vr.segments/_tree.segment.rsc +2 -2
  209. package/.next/standalone/.next/server/app/vr.segments/vr/__PAGE__.segment.rsc +1 -1
  210. package/.next/standalone/.next/server/app/vr.segments/vr.segment.rsc +1 -1
  211. package/.next/standalone/.next/server/app/workspaces.html +1 -1
  212. package/.next/standalone/.next/server/app/workspaces.rsc +2 -2
  213. package/.next/standalone/.next/server/app/workspaces.segments/!KGRlc2t0b3Ap/workspaces/__PAGE__.segment.rsc +1 -1
  214. package/.next/standalone/.next/server/app/workspaces.segments/!KGRlc2t0b3Ap/workspaces.segment.rsc +1 -1
  215. package/.next/standalone/.next/server/app/workspaces.segments/!KGRlc2t0b3Ap.segment.rsc +1 -1
  216. package/.next/standalone/.next/server/app/workspaces.segments/_full.segment.rsc +2 -2
  217. package/.next/standalone/.next/server/app/workspaces.segments/_head.segment.rsc +1 -1
  218. package/.next/standalone/.next/server/app/workspaces.segments/_index.segment.rsc +2 -2
  219. package/.next/standalone/.next/server/app/workspaces.segments/_tree.segment.rsc +2 -2
  220. package/.next/standalone/.next/server/app-paths-manifest.json +3 -0
  221. package/.next/standalone/.next/server/chunks/[root-of-the-server]__00e90fc6._.js +15 -2
  222. package/.next/standalone/.next/server/chunks/[root-of-the-server]__01ab8675._.js +15 -2
  223. package/.next/standalone/.next/server/chunks/[root-of-the-server]__03974f05._.js +15 -2
  224. package/.next/standalone/.next/server/chunks/[root-of-the-server]__046c9b91._.js +15 -2
  225. package/.next/standalone/.next/server/chunks/[root-of-the-server]__04ae6bf0._.js +15 -2
  226. package/.next/standalone/.next/server/chunks/[root-of-the-server]__056fa416._.js +1 -1
  227. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0ac4ea3f._.js +1 -1
  228. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0b8e64cb._.js +15 -2
  229. package/.next/standalone/.next/server/chunks/[root-of-the-server]__0facd39e._.js +15 -2
  230. package/.next/standalone/.next/server/chunks/[root-of-the-server]__10bc76a3._.js +1 -1
  231. package/.next/standalone/.next/server/chunks/[root-of-the-server]__115f3934._.js +15 -2
  232. package/.next/standalone/.next/server/chunks/[root-of-the-server]__11f155f1._.js +1 -1
  233. package/.next/standalone/.next/server/chunks/[root-of-the-server]__160e7c73._.js +52 -24
  234. package/.next/standalone/.next/server/chunks/[root-of-the-server]__17a3b966._.js +15 -2
  235. package/.next/standalone/.next/server/chunks/[root-of-the-server]__17d3a2b2._.js +15 -2
  236. package/.next/standalone/.next/server/chunks/[root-of-the-server]__1a86c055._.js +15 -2
  237. package/.next/standalone/.next/server/chunks/[root-of-the-server]__20b5e9c4._.js +1 -1
  238. package/.next/standalone/.next/server/chunks/[root-of-the-server]__28d6fbd8._.js +15 -2
  239. package/.next/standalone/.next/server/chunks/[root-of-the-server]__2a3f866b._.js +16 -3
  240. package/.next/standalone/.next/server/chunks/[root-of-the-server]__316617e7._.js +2 -2
  241. package/.next/standalone/.next/server/chunks/[root-of-the-server]__32ad8f71._.js +15 -2
  242. package/.next/standalone/.next/server/chunks/[root-of-the-server]__35457394._.js +15 -2
  243. package/.next/standalone/.next/server/chunks/[root-of-the-server]__35de78e6._.js +15 -2
  244. package/.next/standalone/.next/server/chunks/[root-of-the-server]__3685ffcb._.js +15 -2
  245. package/.next/standalone/.next/server/chunks/[root-of-the-server]__38954988._.js +15 -2
  246. package/.next/standalone/.next/server/chunks/[root-of-the-server]__3a32b624._.js +111 -0
  247. package/.next/standalone/.next/server/chunks/[root-of-the-server]__426ad936._.js +17 -4
  248. package/.next/standalone/.next/server/chunks/[root-of-the-server]__4985c034._.js +15 -2
  249. package/.next/standalone/.next/server/chunks/[root-of-the-server]__5c6ce9ed._.js +16 -3
  250. package/.next/standalone/.next/server/chunks/[root-of-the-server]__5cebe58a._.js +15 -2
  251. package/.next/standalone/.next/server/chunks/[root-of-the-server]__5d5e4789._.js +15 -2
  252. package/.next/standalone/.next/server/chunks/[root-of-the-server]__65676930._.js +1 -1
  253. package/.next/standalone/.next/server/chunks/[root-of-the-server]__67cab326._.js +2 -2
  254. package/.next/standalone/.next/server/chunks/[root-of-the-server]__698c6f01._.js +16 -3
  255. package/.next/standalone/.next/server/chunks/[root-of-the-server]__6c64af29._.js +22 -9
  256. package/.next/standalone/.next/server/chunks/[root-of-the-server]__73aed9f5._.js +15 -2
  257. package/.next/standalone/.next/server/chunks/[root-of-the-server]__79b6a9bb._.js +15 -2
  258. package/.next/standalone/.next/server/chunks/[root-of-the-server]__7db704c6._.js +17 -4
  259. package/.next/standalone/.next/server/chunks/[root-of-the-server]__812ca02b._.js +15 -2
  260. package/.next/standalone/.next/server/chunks/[root-of-the-server]__821f50fa._.js +15 -2
  261. package/.next/standalone/.next/server/chunks/[root-of-the-server]__8716b86e._.js +15 -2
  262. package/.next/standalone/.next/server/chunks/[root-of-the-server]__884ef754._.js +15 -2
  263. package/.next/standalone/.next/server/chunks/[root-of-the-server]__88cdbd68._.js +15 -2
  264. package/.next/standalone/.next/server/chunks/[root-of-the-server]__89d9aba9._.js +15 -2
  265. package/.next/standalone/.next/server/chunks/[root-of-the-server]__8c2e1260._.js +111 -0
  266. package/.next/standalone/.next/server/chunks/[root-of-the-server]__8d536cb5._.js +15 -2
  267. package/.next/standalone/.next/server/chunks/[root-of-the-server]__8df8c5d1._.js +15 -2
  268. package/.next/standalone/.next/server/chunks/[root-of-the-server]__8f2ccc41._.js +15 -2
  269. package/.next/standalone/.next/server/chunks/[root-of-the-server]__95c9d682._.js +15 -2
  270. package/.next/standalone/.next/server/chunks/[root-of-the-server]__9e5d7774._.js +15 -2
  271. package/.next/standalone/.next/server/chunks/[root-of-the-server]__9edcff87._.js +15 -2
  272. package/.next/standalone/.next/server/chunks/[root-of-the-server]__a049dfc2._.js +15 -2
  273. package/.next/standalone/.next/server/chunks/[root-of-the-server]__a5b4bb9a._.js +16 -3
  274. package/.next/standalone/.next/server/chunks/[root-of-the-server]__a83262a1._.js +15 -2
  275. package/.next/standalone/.next/server/chunks/[root-of-the-server]__a9cd1240._.js +15 -2
  276. package/.next/standalone/.next/server/chunks/[root-of-the-server]__a9d7f822._.js +15 -2
  277. package/.next/standalone/.next/server/chunks/[root-of-the-server]__ad08c221._.js +15 -2
  278. package/.next/standalone/.next/server/chunks/[root-of-the-server]__ad585f2f._.js +15 -2
  279. package/.next/standalone/.next/server/chunks/[root-of-the-server]__afcb8f7d._.js +15 -2
  280. package/.next/standalone/.next/server/chunks/[root-of-the-server]__bc250d43._.js +15 -2
  281. package/.next/standalone/.next/server/chunks/[root-of-the-server]__bce2a6e7._.js +15 -2
  282. package/.next/standalone/.next/server/chunks/[root-of-the-server]__c011bf91._.js +15 -2
  283. package/.next/standalone/.next/server/chunks/[root-of-the-server]__c37d6380._.js +1 -1
  284. package/.next/standalone/.next/server/chunks/[root-of-the-server]__cae392eb._.js +15 -2
  285. package/.next/standalone/.next/server/chunks/[root-of-the-server]__cc2616bb._.js +16 -3
  286. package/.next/standalone/.next/server/chunks/[root-of-the-server]__d501fa9b._.js +15 -2
  287. package/.next/standalone/.next/server/chunks/[root-of-the-server]__d59c6c15._.js +16 -3
  288. package/.next/standalone/.next/server/chunks/[root-of-the-server]__d5c1db32._.js +15 -2
  289. package/.next/standalone/.next/server/chunks/[root-of-the-server]__dba60c86._.js +15 -2
  290. package/.next/standalone/.next/server/chunks/[root-of-the-server]__de14b9ae._.js +15 -2
  291. package/.next/standalone/.next/server/chunks/[root-of-the-server]__e10643d1._.js +15 -2
  292. package/.next/standalone/.next/server/chunks/[root-of-the-server]__e2a996e5._.js +23 -10
  293. package/.next/standalone/.next/server/chunks/[root-of-the-server]__e3477417._.js +15 -2
  294. package/.next/standalone/.next/server/chunks/[root-of-the-server]__e4db362e._.js +1 -1
  295. package/.next/standalone/.next/server/chunks/[root-of-the-server]__e4e70b86._.js +15 -2
  296. package/.next/standalone/.next/server/chunks/[root-of-the-server]__e54925af._.js +15 -2
  297. package/.next/standalone/.next/server/chunks/[root-of-the-server]__e8cbeaca._.js +111 -0
  298. package/.next/standalone/.next/server/chunks/[root-of-the-server]__e8edc5b0._.js +15 -2
  299. package/.next/standalone/.next/server/chunks/[root-of-the-server]__eab4d83b._.js +15 -2
  300. package/.next/standalone/.next/server/chunks/[root-of-the-server]__ead29015._.js +1 -1
  301. package/.next/standalone/.next/server/chunks/[root-of-the-server]__f056fd83._.js +15 -2
  302. package/.next/standalone/.next/server/chunks/[root-of-the-server]__f0e99572._.js +15 -2
  303. package/.next/standalone/.next/server/chunks/[root-of-the-server]__fe1e16d0._.js +15 -2
  304. package/.next/standalone/.next/server/chunks/[root-of-the-server]__ff9cd277._.js +15 -2
  305. package/.next/standalone/.next/server/chunks/[root-of-the-server]__ffaea2ce._.js +15 -2
  306. package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_claude_usage_route_actions_fe002ec1.js +3 -0
  307. package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_workspaces_[id]_todos_route_actions_0d4ffac5.js +3 -0
  308. package/.next/standalone/.next/server/chunks/ce889_server_app_api_workspaces_[id]_todos_[todoId]_route_actions_754fe6b9.js +3 -0
  309. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__66aca5d4._.js +1 -1
  310. package/.next/standalone/.next/server/chunks/ssr/{_17b946fd._.js → _20c2cf3a._.js} +2 -2
  311. package/.next/standalone/.next/server/chunks/ssr/_5f55bf8f._.js +3 -0
  312. package/.next/standalone/.next/server/chunks/ssr/src_app_(desktop)_settings_page_tsx_f74824b3._.js +1 -1
  313. package/.next/standalone/.next/server/chunks/ssr/src_app_(desktop)_terminal_page_tsx_de5e8d85._.js +1 -1
  314. package/.next/standalone/.next/server/edge/chunks/[root-of-the-server]__90eeddae._.js +1 -1
  315. package/.next/standalone/.next/server/middleware-manifest.json +5 -5
  316. package/.next/standalone/.next/server/pages/404.html +1 -1
  317. package/.next/standalone/.next/server/pages/500.html +2 -2
  318. package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
  319. package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
  320. package/.next/standalone/.next/static/chunks/14216197f9dcbe5b.css +3 -0
  321. package/.next/standalone/.next/static/chunks/{0852575eb90c1e8d.js → 4c9fb0a38f041a3d.js} +2 -2
  322. package/.next/standalone/.next/static/chunks/8f6f93ab45a5ff5b.js +1 -0
  323. package/.next/standalone/.next/static/chunks/{e62bb488d02db247.js → d2566c2dcf53fef3.js} +1 -1
  324. package/.next/standalone/.next/static/chunks/{7f6a14f1849fa94d.js → ff7d85dade44d1f3.js} +1 -1
  325. package/.next/standalone/cortex-hook-debug.log +61 -0
  326. package/.next/standalone/docs/features/claude-usage.md +105 -0
  327. package/.next/standalone/docs/features/workspace-todos.md +127 -0
  328. package/.next/standalone/docs/superpowers/plans/2026-04-21-workspace-todos.md +1097 -0
  329. package/.next/standalone/docs/superpowers/plans/2026-04-22-claude-usage-display.md +749 -0
  330. package/.next/standalone/docs/superpowers/specs/2026-04-21-workspace-todos-design.md +180 -0
  331. package/.next/standalone/docs/superpowers/specs/2026-04-22-claude-usage-display-design.md +183 -0
  332. package/.next/standalone/package-lock.json +2 -2
  333. package/.next/standalone/package.json +1 -1
  334. package/.next/standalone/src/app/(desktop)/settings/page.tsx +40 -1
  335. package/.next/standalone/src/app/(desktop)/terminal/page.tsx +54 -2
  336. package/.next/standalone/src/app/api/claude/usage/route.ts +33 -0
  337. package/.next/standalone/src/app/api/config/route.ts +3 -0
  338. package/.next/standalone/src/app/api/workspaces/[id]/todos/[todoId]/route.ts +55 -0
  339. package/.next/standalone/src/app/api/workspaces/[id]/todos/route.ts +43 -0
  340. package/.next/standalone/src/components/claude/claude-usage-strip.tsx +175 -0
  341. package/.next/standalone/src/components/workspace/workspace-todos.tsx +265 -0
  342. package/.next/standalone/src/hooks/use-claude-usage.ts +66 -0
  343. package/.next/standalone/src/lib/claude/credentials.ts +36 -0
  344. package/.next/standalone/src/lib/claude/usage.ts +69 -0
  345. package/.next/standalone/src/lib/config.ts +3 -0
  346. package/.next/standalone/src/lib/db/queries.ts +103 -1
  347. package/.next/standalone/src/lib/db/schema.ts +18 -0
  348. package/.next/standalone/src/types/claude.ts +39 -0
  349. package/.next/standalone/tests/db/workspace-todos.test.ts +156 -0
  350. package/package.json +1 -1
  351. package/.next/standalone/.next/server/chunks/ssr/_3ba93bdd._.js +0 -3
  352. package/.next/standalone/.next/static/chunks/074df89a63b6a854.js +0 -1
  353. package/.next/standalone/.next/static/chunks/2b769d1597e4fc1c.css +0 -3
  354. /package/.next/standalone/.next/static/{u1pHON3drz1mBi7owkbBP → bAQs2gDlFrq3e8w9ni9tr}/_buildManifest.js +0 -0
  355. /package/.next/standalone/.next/static/{u1pHON3drz1mBi7owkbBP → bAQs2gDlFrq3e8w9ni9tr}/_clientMiddlewareManifest.json +0 -0
  356. /package/.next/standalone/.next/static/{u1pHON3drz1mBi7owkbBP → bAQs2gDlFrq3e8w9ni9tr}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,531278,e=>{"use strict";let t=(0,e.i(475254).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",()=>t],531278)},503116,e=>{"use strict";let t=(0,e.i(475254).default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);e.s(["Clock",()=>t],503116)},755838,(e,t,r)=>{"use strict";var n=e.r(271645),a="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=n.useState,l=n.useEffect,s=n.useLayoutEffect,o=n.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!a(e,r)}catch(e){return!0}}var u="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=i({inst:{value:r,getSnapshot:t}}),a=n[0].inst,u=n[1];return s(function(){a.value=r,a.getSnapshot=t,c(a)&&u({inst:a})},[e,r,t]),l(function(){return c(a)&&u({inst:a}),e(function(){c(a)&&u({inst:a})})},[e]),o(r),r};r.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:u},802239,(e,t,r)=>{"use strict";t.exports=e.r(755838)},752822,(e,t,r)=>{"use strict";var n=e.r(271645),a=e.r(802239),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},l=a.useSyncExternalStore,s=n.useRef,o=n.useEffect,c=n.useMemo,u=n.useDebugValue;r.useSyncExternalStoreWithSelector=function(e,t,r,n,a){var d=s(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;var h=l(e,(d=c(function(){function e(e){if(!o){if(o=!0,l=e,e=n(e),void 0!==a&&f.hasValue){var t=f.value;if(a(t,e))return s=t}return s=e}if(t=s,i(l,e))return t;var r=n(e);return void 0!==a&&a(t,r)?(l=e,t):(l=e,s=r)}var l,s,o=!1,c=void 0===r?null:r;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]},[t,r,n,a]))[0],d[1]);return o(function(){f.hasValue=!0,f.value=h},[h]),u(h),h}},430224,(e,t,r)=>{"use strict";t.exports=e.r(752822)},365332,e=>{"use strict";function t(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}function r(e,t){switch(arguments.length){case 0:break;case 1:"function"==typeof e?this.interpolator(e):this.range(e);break;default:this.domain(e),"function"==typeof t?this.interpolator(t):this.range(t)}return this}e.s(["initInterpolator",()=>r,"initRange",()=>t])},451381,e=>{"use strict";class t extends Map{constructor(e,t=n){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(const[t,r]of e)this.set(t,r)}get(e){return super.get(r(this,e))}has(e){return super.has(r(this,e))}set(e,t){return super.set(function({_intern:e,_key:t},r){let n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}(this,e),t)}delete(e){return super.delete(function({_intern:e,_key:t},r){let n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}(this,e))}}function r({_intern:e,_key:t},r){let n=t(r);return e.has(n)?e.get(n):r}function n(e){return null!==e&&"object"==typeof e?e.valueOf():e}e.s(["InternMap",()=>t])},65232,e=>{"use strict";var t=e.i(451381),r=e.i(365332);let n=Symbol("implicit");e.s(["default",()=>function e(){var a=new t.InternMap,i=[],l=[],s=n;function o(e){let t=a.get(e);if(void 0===t){if(s!==n)return s;a.set(e,t=i.push(e)-1)}return l[t%l.length]}return o.domain=function(e){if(!arguments.length)return i.slice();for(let r of(i=[],a=new t.InternMap,e))a.has(r)||a.set(r,i.push(r)-1);return o},o.range=function(e){return arguments.length?(l=Array.from(e),o):l.slice()},o.unknown=function(e){return arguments.length?(s=e,o):s},o.copy=function(){return e(i,l).unknown(s)},r.initRange.apply(o,arguments),o},"implicit",0,n])},479996,47238,e=>{"use strict";function t(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function r(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function n(){}var a="\\s*([+-]?\\d+)\\s*",i="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",l="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",s=/^#([0-9a-f]{3,8})$/,o=RegExp(`^rgb\\(${a},${a},${a}\\)$`),c=RegExp(`^rgb\\(${l},${l},${l}\\)$`),u=RegExp(`^rgba\\(${a},${a},${a},${i}\\)$`),d=RegExp(`^rgba\\(${l},${l},${l},${i}\\)$`),f=RegExp(`^hsl\\(${i},${l},${l}\\)$`),h=RegExp(`^hsla\\(${i},${l},${l},${i}\\)$`),p={aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32};function m(){return this.rgb().formatHex()}function x(){return this.rgb().formatRgb()}function y(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=s.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?g(t):3===r?new N(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?b(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?b(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=o.exec(e))?new N(t[1],t[2],t[3],1):(t=c.exec(e))?new N(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=u.exec(e))?b(t[1],t[2],t[3],t[4]):(t=d.exec(e))?b(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=f.exec(e))?O(t[1],t[2]/100,t[3]/100,1):(t=h.exec(e))?O(t[1],t[2]/100,t[3]/100,t[4]):p.hasOwnProperty(e)?g(p[e]):"transparent"===e?new N(NaN,NaN,NaN,0):null}function g(e){return new N(e>>16&255,e>>8&255,255&e,1)}function b(e,t,r,n){return n<=0&&(e=t=r=NaN),new N(e,t,r,n)}function v(e,t,r,a){var i;return 1==arguments.length?((i=e)instanceof n||(i=y(i)),i)?new N((i=i.rgb()).r,i.g,i.b,i.opacity):new N:new N(e,t,r,null==a?1:a)}function N(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function j(){return`#${P(this.r)}${P(this.g)}${P(this.b)}`}function w(){let e=k(this.opacity);return`${1===e?"rgb(":"rgba("}${E(this.r)}, ${E(this.g)}, ${E(this.b)}${1===e?")":`, ${e})`}`}function k(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function E(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function P(e){return((e=E(e))<16?"0":"")+e.toString(16)}function O(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new A(e,t,r,n)}function S(e){if(e instanceof A)return new A(e.h,e.s,e.l,e.opacity);if(e instanceof n||(e=y(e)),!e)return new A;if(e instanceof A)return e;var t=(e=e.rgb()).r/255,r=e.g/255,a=e.b/255,i=Math.min(t,r,a),l=Math.max(t,r,a),s=NaN,o=l-i,c=(l+i)/2;return o?(s=t===l?(r-a)/o+(r<a)*6:r===l?(a-t)/o+2:(t-r)/o+4,o/=c<.5?l+i:2-l-i,s*=60):o=c>0&&c<1?0:s,new A(s,o,c,e.opacity)}function A(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function I(e){return(e=(e||0)%360)<0?e+360:e}function z(e){return Math.max(0,Math.min(1,e||0))}function C(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}t(n,y,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:m,formatHex:m,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return S(this).formatHsl()},formatRgb:x,toString:x}),t(N,v,r(n,{brighter(e){return e=null==e?1.4285714285714286:Math.pow(1.4285714285714286,e),new N(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new N(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new N(E(this.r),E(this.g),E(this.b),k(this.opacity))},displayable(){return -.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:j,formatHex:j,formatHex8:function(){return`#${P(this.r)}${P(this.g)}${P(this.b)}${P((isNaN(this.opacity)?1:this.opacity)*255)}`},formatRgb:w,toString:w})),t(A,function(e,t,r,n){return 1==arguments.length?S(e):new A(e,t,r,null==n?1:n)},r(n,{brighter(e){return e=null==e?1.4285714285714286:Math.pow(1.4285714285714286,e),new A(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new A(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,a=2*r-n;return new N(C(e>=240?e-240:e+120,a,n),C(e,a,n),C(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new A(I(this.h),z(this.s),z(this.l),k(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=k(this.opacity);return`${1===e?"hsl(":"hsla("}${I(this.h)}, ${100*z(this.s)}%, ${100*z(this.l)}%${1===e?")":`, ${e})`}`}})),e.s(["default",()=>y,"rgb",()=>v],47238),e.s(["color",()=>y],479996)},565445,100625,e=>{"use strict";var t=e.i(47238);function r(e,t,r,n,a){var i=e*e,l=i*e;return((1-3*e+3*i-l)*t+(4-6*i+3*l)*r+(1+3*e+3*i-3*l)*n+l*a)/6}let n=e=>()=>e;function a(e,t){var r=t-e;return r?function(t){return e+t*r}:n(isNaN(e)?t:e)}e.s(["default",0,n],100625);let i=function e(r){var i,l=1==(i=+r)?a:function(e,t){var r,a,l;return t-e?(r=e,a=t,r=Math.pow(r,l=i),a=Math.pow(a,l)-r,l=1/l,function(e){return Math.pow(r+e*a,l)}):n(isNaN(e)?t:e)};function s(e,r){var n=l((e=(0,t.rgb)(e)).r,(r=(0,t.rgb)(r)).r),i=l(e.g,r.g),s=l(e.b,r.b),o=a(e.opacity,r.opacity);return function(t){return e.r=n(t),e.g=i(t),e.b=s(t),e.opacity=o(t),e+""}}return s.gamma=e,s}(1);function l(e){return function(r){var n,a,i=r.length,l=Array(i),s=Array(i),o=Array(i);for(n=0;n<i;++n)a=(0,t.rgb)(r[n]),l[n]=a.r||0,s[n]=a.g||0,o[n]=a.b||0;return l=e(l),s=e(s),o=e(o),a.opacity=1,function(e){return a.r=l(e),a.g=s(e),a.b=o(e),a+""}}}l(function(e){var t=e.length-1;return function(n){var a=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[a],l=e[a+1],s=a>0?e[a-1]:2*i-l,o=a<t-1?e[a+2]:2*l-i;return r((n-a/t)*t,s,i,l,o)}}),l(function(e){var t=e.length;return function(n){var a=Math.floor(((n%=1)<0?++n:n)*t),i=e[(a+t-1)%t],l=e[a%t],s=e[(a+1)%t],o=e[(a+2)%t];return r((n-a/t)*t,i,l,s,o)}}),e.s(["default",0,i],565445)},668593,e=>{"use strict";e.s(["default",0,function(e,t){return e*=1,t*=1,function(r){return e*(1-r)+t*r}}])},935204,e=>{"use strict";var t=e.i(668593),r=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,n=RegExp(r.source,"g");e.s(["default",0,function(e,a){var i,l,s,o,c,u=r.lastIndex=n.lastIndex=0,d=-1,f=[],h=[];for(e+="",a+="";(s=r.exec(e))&&(o=n.exec(a));)(c=o.index)>u&&(c=a.slice(u,c),f[d]?f[d]+=c:f[++d]=c),(s=s[0])===(o=o[0])?f[d]?f[d]+=o:f[++d]=o:(f[++d]=null,h.push({i:d,x:(0,t.default)(s,o)})),u=n.lastIndex;return u<a.length&&(c=a.slice(u),f[d]?f[d]+=c:f[++d]=c),f.length<2?h[0]?(i=h[0].x,function(e){return i(e)+""}):(l=a,function(){return l}):(a=h.length,function(e){for(var t,r=0;r<a;++r)f[(t=h[r]).i]=t.x(e);return f.join("")})}])},552491,e=>{"use strict";var t=e.i(668593);e.s(["interpolateNumber",()=>t.default])},789785,e=>{"use strict";function t(e,t){let r;if(void 0===t)for(let t of e)null!=t&&(r<t||void 0===r&&t>=t)&&(r=t);else{let n=-1;for(let a of e)null!=(a=t(a,++n,e))&&(r<a||void 0===r&&a>=a)&&(r=a)}return r}e.s(["default",()=>t])},265993,e=>{"use strict";function t(e,t){let r;if(void 0===t)for(let t of e)null!=t&&(r>t||void 0===r&&t>=t)&&(r=t);else{let n=-1;for(let a of e)null!=(a=t(a,++n,e))&&(r>a||void 0===r&&a>=a)&&(r=a)}return r}e.s(["default",()=>t])},204997,e=>{"use strict";let t=(0,e.i(475254).default)("log-in",[["path",{d:"m10 17 5-5-5-5",key:"1bsop3"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}]]);e.s(["LogIn",()=>t],204997)},39312,e=>{"use strict";let t=(0,e.i(475254).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",()=>t],39312)},101725,e=>{"use strict";var t=e.i(271645),r=e.i(925949),n=e.i(433369),a=["axis"],i=(0,t.forwardRef)((e,i)=>t.createElement(n.CartesianChart,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:a,tooltipPayloadSearcher:r.arrayTooltipSearcher,categoricalChartProps:e,ref:i}));e.s(["AreaChart",()=>i])},400237,e=>{"use strict";e.s(["Area",()=>ek,"computeArea",()=>ew],400237);var t=e.i(271645),r=e.i(207670),n=e.i(372733),a=e.i(997865),i=e.i(969212),l=e.i(373393),s=e.i(257999),o=e.i(794395);function c(){return(c=Object.assign.bind()).apply(null,arguments)}var u=e=>{var{cx:n,cy:a,r:i,className:u}=e,d=(0,r.clsx)("recharts-dot",u);return(0,o.isNumber)(n)&&(0,o.isNumber)(a)&&(0,o.isNumber)(i)?t.createElement("circle",c({},(0,s.svgPropertiesNoEvents)(e),(0,l.adaptEventHandlers)(e),{className:d,cx:n,cy:a,r:i})):null},d=e.i(781977),f=e.i(43404),h=e.i(629601),p=e.i(318457),m=["points"];function x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?x(Object(r),!0).forEach(function(t){var n,a,i;n=e,a=t,i=r[t],(a=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(a))in n?Object.defineProperty(n,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[a]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function g(){return(g=Object.assign.bind()).apply(null,arguments)}function b(e){var{option:n,dotProps:a,className:i}=e;if((0,t.isValidElement)(n))return(0,t.cloneElement)(n,a);if("function"==typeof n)return n(a);var l=(0,r.clsx)(i,"boolean"!=typeof n?n.className:""),s=null!=a?a:{},{points:o}=s,c=function(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}(s,m);return t.createElement(u,g({},c,{className:l}))}function v(e){var{points:r,dot:n,className:i,dotClassName:l,dataKey:s,baseProps:o,needClip:c,clipPathId:u,zIndex:m=p.DefaultZIndexes.scatter}=e;if(null==r||!n&&1!==r.length)return null;var x=(0,d.isClipDot)(n),v=(0,f.svgPropertiesAndEventsFromUnknown)(n),N=r.map((e,a)=>{var i,c,u=y(y(y({r:3},o),v),{},{index:a,cx:null!=(i=e.x)?i:void 0,cy:null!=(c=e.y)?c:void 0,dataKey:s,value:e.value,payload:e.payload,points:r});return t.createElement(b,{key:"dot-".concat(a),option:n,dotProps:u,className:l})}),j={};return c&&null!=u&&(j.clipPath="url(#clipPath-".concat(x?"":"dots-").concat(u,")")),t.createElement(h.ZIndexLayer,{zIndex:m},t.createElement(a.Layer,g({className:i},j),N))}var N=e.i(562728),j=e.i(779812),w=e.i(127241),k=e.i(676735),E=e.i(352734);function P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function O(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?P(Object(r),!0).forEach(function(t){var n,a,i;n=e,a=t,i=r[t],(a=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(a))in n?Object.defineProperty(n,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[a]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}var S=e=>{var r,{point:n,childIndex:i,mainColor:o,activeDot:c,dataKey:d,clipPath:f}=e;if(!1===c||null==n.x||null==n.y)return null;var h=O(O(O({},{index:i,dataKey:d,cx:n.x,cy:n.y,r:4,fill:null!=o?o:"none",strokeWidth:2,stroke:"#fff",payload:n.payload,value:n.value}),(0,s.svgPropertiesNoEventsFromUnknown)(c)),(0,l.adaptEventHandlers)(c));return r=(0,t.isValidElement)(c)?(0,t.cloneElement)(c,h):"function"==typeof c?c(h):t.createElement(u,h),t.createElement(a.Layer,{className:"recharts-active-dot",clipPath:f},r)};function A(e){var{points:r,mainColor:n,activeDot:a,itemDataKey:i,clipPath:l,zIndex:s=p.DefaultZIndexes.activeDot}=e,c=(0,w.useAppSelector)(k.selectActiveTooltipIndex),u=(0,E.useActiveTooltipDataPoints)();if(null==r||null==u)return null;var d=r.find(e=>u.includes(e.payload));return(0,o.isNullish)(d)?null:t.createElement(h.ZIndexLayer,{zIndex:s},t.createElement(S,{point:d,childIndex:Number(c),mainColor:n,dataKey:i,activeDot:a,clipPath:l}))}var I=e.i(844),z=e.i(659798),C=e.i(661849),$=e.i(661764),M=e.i(846710),L=e.i(992860),D=e.i(291526),T=e.i(377320),R=e.i(142221),W=(e,t,r)=>(0,$.selectAxisWithScale)(e,"xAxis",(0,R.selectXAxisIdFromGraphicalItemId)(e,t),r),K=(e,t,r)=>(0,$.selectTicksOfGraphicalItem)(e,"xAxis",(0,R.selectXAxisIdFromGraphicalItemId)(e,t),r),B=(e,t,r)=>(0,$.selectAxisWithScale)(e,"yAxis",(0,R.selectYAxisIdFromGraphicalItemId)(e,t),r),V=(e,t,r)=>(0,$.selectTicksOfGraphicalItem)(e,"yAxis",(0,R.selectYAxisIdFromGraphicalItemId)(e,t),r),F=(0,C.createSelector)([M.selectChartLayout,W,B,K,V],(e,t,r,n,a)=>(0,j.isCategoricalAxis)(e,"xAxis")?(0,j.getBandSizeOfAxis)(t,n,!1):(0,j.getBandSizeOfAxis)(r,a,!1)),U=(0,C.createSelector)([$.selectUnfilteredCartesianItems,(e,t)=>t],(e,t)=>e.filter(e=>"area"===e.type).find(e=>e.id===t)),G=e=>{var t=(0,M.selectChartLayout)(e);return(0,j.isCategoricalAxis)(t,"xAxis")?"yAxis":"xAxis"},q=(0,C.createSelector)([U,(e,t,r)=>(0,$.selectStackGroups)(e,G(e),"yAxis"===G(e)?(0,R.selectYAxisIdFromGraphicalItemId)(e,t):(0,R.selectXAxisIdFromGraphicalItemId)(e,t),r)],(e,t)=>{if(null!=e&&null!=t){var r,{stackId:n}=e,a=(0,D.getStackSeriesIdentifier)(e);if(null!=n&&null!=a){var i=null==(r=t[n])?void 0:r.stackedData,l=null==i?void 0:i.find(e=>e.key===a);if(null!=l)return l.map(e=>[e[0],e[1]])}}}),H=(0,C.createSelector)([M.selectChartLayout,W,B,K,V,q,L.selectChartDataWithIndexesIfNotInPanoramaPosition3,F,U,T.selectChartBaseValue],(e,t,r,n,a,i,l,s,o,c)=>{var u,{chartData:d,dataStartIndex:f,dataEndIndex:h}=l;if(null!=o&&("horizontal"===e||"vertical"===e)&&null!=t&&null!=r&&null!=n&&null!=a&&0!==n.length&&0!==a.length&&null!=s){var{data:p}=o;if(null!=(u=p&&p.length>0?p:null==d?void 0:d.slice(f,h+1)))return ew({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:a,dataStartIndex:f,areaSettings:o,stackedData:i,displayedData:u,chartBaseValue:c,bandSize:s})}}),Z=e.i(375337),_=e.i(275502),X=e.i(795146),Y=e.i(440657),J=e.i(51883),Q=e.i(822075),ee=e.i(415549),et=e.i(591187),er=e.i(466576),en=e.i(920135),ea=["id"],ei=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function el(){return(el=Object.assign.bind()).apply(null,arguments)}function es(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r={};for(var n in e)if(({}).hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],-1===t.indexOf(r)&&({}).propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function eo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function ec(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?eo(Object(r),!0).forEach(function(t){var n,a,i;n=e,a=t,i=r[t],(a=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(a))in n?Object.defineProperty(n,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[a]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):eo(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function eu(e,t){return e&&"none"!==e?e:t}var ed=t.memo(e=>{var{dataKey:r,data:n,stroke:a,strokeWidth:i,fill:l,name:s,hide:c,unit:u,tooltipType:d,id:f}=e,h={dataDefinedOnItem:n,getPosition:o.noop,settings:{stroke:a,strokeWidth:i,fill:l,dataKey:r,nameKey:void 0,name:(0,j.getTooltipNameProp)(s,r),hide:c,type:d,color:eu(a,l),unit:u,graphicalItemId:f}};return t.createElement(I.SetTooltipEntrySettings,{tooltipEntrySettings:h})});function ef(e){var{clipPathId:r,points:n,props:a}=e,{needClip:i,dot:l,dataKey:o}=a,c=(0,s.svgPropertiesNoEvents)(a);return t.createElement(v,{points:n,dot:l,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:o,baseProps:c,needClip:i,clipPathId:r})}function eh(e){var{showLabels:r,children:n,points:a}=e,l=a.map(e=>{var t,r,n={x:null!=(t=e.x)?t:0,y:null!=(r=e.y)?r:0,width:0,lowerWidth:0,upperWidth:0,height:0};return ec(ec({},n),{},{value:e.value,payload:e.payload,parentViewBox:void 0,viewBox:n,fill:void 0})});return t.createElement(i.CartesianLabelListContextProvider,{value:r?l:void 0},n)}function ep(e){var{points:r,baseLine:i,needClip:l,clipPathId:o,props:c}=e,{layout:u,type:d,stroke:h,connectNulls:p,isRange:m}=c,{id:x}=c,y=es(c,ea),g=(0,s.svgPropertiesNoEvents)(y),b=(0,f.svgPropertiesAndEvents)(y);return t.createElement(t.Fragment,null,(null==r?void 0:r.length)>1&&t.createElement(a.Layer,{clipPath:l?"url(#clipPath-".concat(o,")"):void 0},t.createElement(n.Curve,el({},b,{id:x,points:r,connectNulls:p,type:d,baseLine:i,layout:u,stroke:"none",className:"recharts-area-area"})),"none"!==h&&t.createElement(n.Curve,el({},g,{className:"recharts-area-curve",layout:u,type:d,connectNulls:p,fill:"none",points:r})),"none"!==h&&m&&t.createElement(n.Curve,el({},g,{className:"recharts-area-curve",layout:u,type:d,connectNulls:p,fill:"none",points:i}))),t.createElement(ef,{points:r,props:y,clipPathId:o}))}function em(e){var r,n,{alpha:a,baseLine:i,points:l,strokeWidth:s}=e,c=null==(r=l[0])?void 0:r.y,u=null==(n=l[l.length-1])?void 0:n.y;if(!(0,Q.isWellBehavedNumber)(c)||!(0,Q.isWellBehavedNumber)(u))return null;var d=a*Math.abs(c-u),f=Math.max(...l.map(e=>e.x||0));return((0,o.isNumber)(i)?f=Math.max(i,f):i&&Array.isArray(i)&&i.length&&(f=Math.max(...i.map(e=>e.x||0),f)),(0,o.isNumber)(f))?t.createElement("rect",{x:0,y:c<u?c:c-d,width:f+(s?parseInt("".concat(s),10):1),height:Math.floor(d)}):null}function ex(e){var r,n,{alpha:a,baseLine:i,points:l,strokeWidth:s}=e,c=null==(r=l[0])?void 0:r.x,u=null==(n=l[l.length-1])?void 0:n.x;if(!(0,Q.isWellBehavedNumber)(c)||!(0,Q.isWellBehavedNumber)(u))return null;var d=a*Math.abs(c-u),f=Math.max(...l.map(e=>e.y||0));return((0,o.isNumber)(i)?f=Math.max(i,f):i&&Array.isArray(i)&&i.length&&(f=Math.max(...i.map(e=>e.y||0),f)),(0,o.isNumber)(f))?t.createElement("rect",{x:c<u?c:c-d,y:0,width:d,height:Math.floor(f+(s?parseInt("".concat(s),10):1))}):null}function ey(e){var{alpha:r,layout:n,points:a,baseLine:i,strokeWidth:l}=e;return"vertical"===n?t.createElement(em,{alpha:r,points:a,baseLine:i,strokeWidth:l}):t.createElement(ex,{alpha:r,points:a,baseLine:i,strokeWidth:l})}function eg(e){var{needClip:r,clipPathId:n,props:l,previousPointsRef:s,previousBaselineRef:c}=e,{points:u,baseLine:d,isAnimationActive:f,animationBegin:h,animationDuration:p,animationEasing:m,onAnimationStart:x,onAnimationEnd:y}=l,g=(0,t.useMemo)(()=>({points:u,baseLine:d}),[u,d]),b=(0,Y.useAnimationId)(g,"recharts-area-"),v=(0,M.useCartesianChartLayout)(),[N,j]=(0,t.useState)(!1),w=(0,t.useCallback)(()=>{"function"==typeof y&&y(),j(!1)},[y]),k=(0,t.useCallback)(()=>{"function"==typeof x&&x(),j(!0)},[x]);if(null==v)return null;var E=s.current,P=c.current;return t.createElement(eh,{showLabels:!N,points:u},l.children,t.createElement(er.JavascriptAnimate,{animationId:b,begin:h,duration:p,isActive:f,easing:m,onAnimationEnd:w,onAnimationStart:k,key:b},e=>{if(E){var i,h=E.length/u.length,p=1===e?u:u.map((t,r)=>{var n=Math.floor(r*h);if(E[n]){var a=E[n];return ec(ec({},t),{},{x:(0,o.interpolate)(a.x,t.x,e),y:(0,o.interpolate)(a.y,t.y,e)})}return t});return i=(0,o.isNumber)(d)?(0,o.interpolate)(P,d,e):(0,o.isNullish)(d)||(0,o.isNan)(d)?(0,o.interpolate)(P,0,e):d.map((t,r)=>{var n=Math.floor(r*h);if(Array.isArray(P)&&P[n]){var a=P[n];return ec(ec({},t),{},{x:(0,o.interpolate)(a.x,t.x,e),y:(0,o.interpolate)(a.y,t.y,e)})}return t}),e>0&&(s.current=p,c.current=i),t.createElement(ep,{points:p,baseLine:i,needClip:r,clipPathId:n,props:l})}return e>0&&(s.current=u,c.current=d),t.createElement(a.Layer,null,f&&t.createElement("defs",null,t.createElement("clipPath",{id:"animationClipPath-".concat(n)},t.createElement(ey,{alpha:e,points:u,baseLine:d,layout:v,strokeWidth:l.strokeWidth}))),t.createElement(a.Layer,{clipPath:"url(#animationClipPath-".concat(n,")")},t.createElement(ep,{points:u,baseLine:d,needClip:r,clipPathId:n,props:l})))}),t.createElement(i.LabelListFromLabelProp,{label:l.label}))}function eb(e){var{needClip:r,clipPathId:n,props:a}=e,i=(0,t.useRef)(null),l=(0,t.useRef)();return t.createElement(eg,{needClip:r,clipPathId:n,props:a,previousPointsRef:i,previousBaselineRef:l})}class ev extends t.PureComponent{render(){var{hide:e,dot:n,points:i,className:l,top:o,left:c,needClip:u,xAxisId:f,yAxisId:p,width:m,height:x,id:y,baseLine:g,zIndex:b}=this.props;if(e)return null;var v=(0,r.clsx)("recharts-area",l),{r:N,strokeWidth:j}=function(e){var t=(0,s.svgPropertiesNoEventsFromUnknown)(e);if(null!=t){var{r,strokeWidth:n}=t,a=Number(r),i=Number(n);return(Number.isNaN(a)||a<0)&&(a=3),(Number.isNaN(i)||i<0)&&(i=2),{r:a,strokeWidth:i}}return{r:3,strokeWidth:2}}(n),w=(0,d.isClipDot)(n),k=2*N+j,E=u?"url(#clipPath-".concat(w?"":"dots-").concat(y,")"):void 0;return t.createElement(h.ZIndexLayer,{zIndex:b},t.createElement(a.Layer,{className:v},u&&t.createElement("defs",null,t.createElement(z.GraphicalItemClipPath,{clipPathId:y,xAxisId:f,yAxisId:p}),!w&&t.createElement("clipPath",{id:"clipPath-dots-".concat(y)},t.createElement("rect",{x:c-k/2,y:o-k/2,width:m+k,height:x+k}))),t.createElement(eb,{needClip:u,clipPathId:y,props:this.props})),t.createElement(A,{points:i,mainColor:eu(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:E}),this.props.isRange&&Array.isArray(g)&&t.createElement(A,{points:g,mainColor:eu(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:E}))}}var eN={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,xAxisId:0,yAxisId:0,zIndex:p.DefaultZIndexes.area};function ej(e){var r,n=(0,J.resolveDefaultProps)(e,eN),{activeDot:a,animationBegin:i,animationDuration:l,animationEasing:s,connectNulls:o,dot:c,fill:u,fillOpacity:d,hide:f,isAnimationActive:h,legendType:p,stroke:m,xAxisId:x,yAxisId:y}=n,g=es(n,ei),b=(0,M.useChartLayout)(),v=(0,_.useChartName)(),{needClip:j}=(0,z.useNeedsClip)(x,y),k=(0,Z.useIsPanorama)(),{points:P,isRange:O,baseLine:S}=null!=(r=(0,w.useAppSelector)(t=>H(t,e.id,k)))?r:{},A=(0,E.usePlotArea)();if("horizontal"!==b&&"vertical"!==b||null==A||"AreaChart"!==v&&"ComposedChart"!==v)return null;var{height:I,width:C,x:$,y:L}=A;return P&&P.length?t.createElement(ev,el({},g,{activeDot:a,animationBegin:i,animationDuration:l,animationEasing:s,baseLine:S,connectNulls:o,dot:c,fill:u,fillOpacity:d,height:I,hide:f,layout:b,isAnimationActive:"auto"===h?!N.Global.isSsr:h,isRange:O,legendType:p,needClip:j,points:P,stroke:m,width:C,left:$,top:L,xAxisId:x,yAxisId:y})):null}function ew(e){var t,{areaSettings:{connectNulls:r,baseValue:n,dataKey:a},stackedData:i,layout:l,chartBaseValue:s,xAxis:c,yAxis:u,displayedData:d,dataStartIndex:f,xAxisTicks:h,yAxisTicks:p,bandSize:m}=e,x=i&&i.length,y=((e,t,r,n,a)=>{var i=null!=r?r:t;if((0,o.isNumber)(i))return i;var l="horizontal"===e?a:n,s=l.scale.domain();if("number"===l.type){var c=Math.max(s[0],s[1]),u=Math.min(s[0],s[1]);return"dataMin"===i?u:"dataMax"===i||c<0?c:Math.max(Math.min(s[0],s[1]),0)}return"dataMin"===i?s[0]:"dataMax"===i?s[1]:s[0]})(l,s,n,c,u),g="horizontal"===l,b=!1,v=d.map((e,t)=>{if(x)o=i[f+t];else{var n,l,s,o,d,v=(0,j.getValueByDataKey)(e,a);Array.isArray(v)?(o=v,b=!0):o=[y,v]}var N=null!=(n=null==(l=o)?void 0:l[1])?n:null,w=null==N||x&&!r&&null==(0,j.getValueByDataKey)(e,a);return g?{x:(0,j.getCateCoordinateOfLine)({axis:c,ticks:h,bandSize:m,entry:e,index:t}),y:w?null:null!=(d=u.scale.map(N))?d:null,value:o,payload:e}:{x:w?null:null!=(s=c.scale.map(N))?s:null,y:(0,j.getCateCoordinateOfLine)({axis:u,ticks:p,bandSize:m,entry:e,index:t}),value:o,payload:e}});return t=x||b?v.map(e=>{var t,r,n=Array.isArray(e.value)?e.value[0]:null;return g?{x:e.x,y:null!=n&&null!=e.y&&null!=(r=u.scale.map(n))?r:null,payload:e.payload}:{x:null!=n&&null!=(t=c.scale.map(n))?t:null,y:e.y,payload:e.payload}}):g?u.scale.map(y):c.scale.map(y),{points:v,baseLine:null!=t?t:0,isRange:b}}var ek=t.memo(function(e){var r=(0,J.resolveDefaultProps)(e,eN),n=(0,Z.useIsPanorama)();return t.createElement(ee.RegisterGraphicalItemId,{id:r.id,type:"area"},e=>t.createElement(t.Fragment,null,t.createElement(X.SetLegendPayload,{legendPayload:(e=>{var{dataKey:t,name:r,stroke:n,fill:a,legendType:i,hide:l}=e;return[{inactive:l,dataKey:t,type:i,color:eu(n,a),value:(0,j.getTooltipNameProp)(r,t),payload:e}]})(r)}),t.createElement(ed,{dataKey:r.dataKey,data:r.data,stroke:r.stroke,strokeWidth:r.strokeWidth,fill:r.fill,name:r.name,hide:r.hide,unit:r.unit,tooltipType:r.tooltipType,id:e}),t.createElement(et.SetCartesianGraphicalItem,{type:"area",id:e,data:r.data,dataKey:r.dataKey,xAxisId:r.xAxisId,yAxisId:r.yAxisId,zAxisId:0,stackId:(0,j.getNormalizedStackId)(r.stackId),hide:r.hide,barSize:void 0,baseValue:r.baseValue,isPanorama:n,connectNulls:r.connectNulls}),t.createElement(ej,el({},r,{id:e}))))},en.propsAreEqual);ek.displayName="Area"},158537,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(21218),a=e.i(531278),i=e.i(204997),l=e.i(503116),s=e.i(761911),o=e.i(39312),c=e.i(509694),u=e.i(475225),d=e.i(101725),f=e.i(400237),h=e.i(785183),p=e.i(93230),m=e.i(234239),x=e.i(731195),y=e.i(209165);function g(){let[e,g]=(0,r.useState)(null),[j,w]=(0,r.useState)(!0),[k,E]=(0,r.useState)(""),[P,O]=(0,r.useState)(30);if((0,r.useEffect)(()=>{w(!0),fetch((0,y.api)(`/api/admin/analytics?days=${P}`)).then(e=>{if(!e.ok)throw Error(403===e.status?"Forbidden":"Failed to load analytics");return e.json()}).then(e=>{g(e),E("")}).catch(e=>E(e.message)).finally(()=>w(!1))},[P]),j)return(0,t.jsxs)("div",{className:"p-6 flex items-center gap-2 text-zinc-400",children:[(0,t.jsx)(a.Loader2,{className:"w-4 h-4 animate-spin"}),"Loading activity data..."]});if(k)return(0,t.jsx)("div",{className:"p-6",children:(0,t.jsx)("p",{className:"text-red-400 text-sm",children:k})});if(!e)return null;let S=new Set(e.userSummary.map(e=>e.username)).size,A=e.dailyLogins.map(e=>({date:new Date(e.date+"T00:00:00").toLocaleDateString("en-US",{month:"short",day:"numeric"}),logins:e.count})),I=e.dailySessionTime.map(e=>({date:new Date(e.date+"T00:00:00").toLocaleDateString("en-US",{month:"short",day:"numeric"}),hours:Math.round(e.minutes/6)/10}));return(0,t.jsxs)("div",{className:"p-6 space-y-6 max-w-7xl",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("h1",{className:"text-2xl font-bold flex items-center gap-2",children:[(0,t.jsx)(n.Activity,{className:"w-6 h-6"}),"Team Activity"]}),(0,t.jsx)("p",{className:"text-muted-foreground text-sm mt-1",children:"Login and terminal session analytics across all users"})]}),(0,t.jsx)("div",{className:"flex items-center gap-1 bg-zinc-100 dark:bg-zinc-800 rounded-lg p-1",children:[7,30,90].map(e=>(0,t.jsxs)("button",{onClick:()=>O(e),className:`px-3 py-1.5 text-xs rounded-md transition-colors ${P===e?"bg-white dark:bg-zinc-700 text-zinc-900 dark:text-zinc-100 shadow-sm font-medium":"text-zinc-500 hover:text-zinc-700 dark:hover:text-zinc-300"}`,children:[e,"d"]},e))})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[(0,t.jsx)(b,{icon:(0,t.jsx)(o.Zap,{className:"w-4 h-4 text-green-500"}),label:"Active Now",value:e.activeSessions}),(0,t.jsx)(b,{icon:(0,t.jsx)(i.LogIn,{className:"w-4 h-4 text-indigo-500"}),label:"Total Logins",value:e.totalLogins}),(0,t.jsx)(b,{icon:(0,t.jsx)(l.Clock,{className:"w-4 h-4 text-violet-500"}),label:"Total Vibe Time",value:v(e.totalSessionMinutes)}),(0,t.jsx)(b,{icon:(0,t.jsx)(s.Users,{className:"w-4 h-4 text-amber-500"}),label:"Unique Users",value:S})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[(0,t.jsxs)("div",{className:"bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-lg p-4",children:[(0,t.jsx)("h3",{className:"font-semibold mb-4",children:"Daily Logins"}),0===A.length?(0,t.jsx)("p",{className:"text-sm text-muted-foreground h-[200px] flex items-center justify-center",children:"No login data yet"}):(0,t.jsx)(x.ResponsiveContainer,{width:"100%",height:200,children:(0,t.jsxs)(c.BarChart,{data:A,children:[(0,t.jsx)(h.XAxis,{dataKey:"date",tick:{fontSize:11}}),(0,t.jsx)(p.YAxis,{tick:{fontSize:11},allowDecimals:!1}),(0,t.jsx)(m.Tooltip,{contentStyle:{background:"var(--background)",border:"1px solid var(--border)",borderRadius:"0.5rem",fontSize:"12px"}}),(0,t.jsx)(u.Bar,{dataKey:"logins",fill:"#6366f1",radius:[2,2,0,0]})]})})]}),(0,t.jsxs)("div",{className:"bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-lg p-4",children:[(0,t.jsx)("h3",{className:"font-semibold mb-4",children:"Daily Vibe Time"}),0===I.length?(0,t.jsx)("p",{className:"text-sm text-muted-foreground h-[200px] flex items-center justify-center",children:"No session data yet"}):(0,t.jsx)(x.ResponsiveContainer,{width:"100%",height:200,children:(0,t.jsxs)(d.AreaChart,{data:I,children:[(0,t.jsx)(h.XAxis,{dataKey:"date",tick:{fontSize:11}}),(0,t.jsx)(p.YAxis,{tick:{fontSize:11},tickFormatter:e=>`${e}h`}),(0,t.jsx)(m.Tooltip,{formatter:e=>[`${e}h`,"Time"],contentStyle:{background:"var(--background)",border:"1px solid var(--border)",borderRadius:"0.5rem",fontSize:"12px"}}),(0,t.jsx)(f.Area,{type:"monotone",dataKey:"hours",fill:"#8b5cf6",fillOpacity:.2,stroke:"#8b5cf6"})]})})]})]}),(0,t.jsxs)("div",{className:"bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-lg overflow-hidden",children:[(0,t.jsx)("div",{className:"p-4 border-b border-zinc-200 dark:border-zinc-800",children:(0,t.jsx)("h3",{className:"font-semibold",children:"User Leaderboard"})}),(0,t.jsxs)("table",{className:"w-full text-sm",children:[(0,t.jsx)("thead",{className:"bg-zinc-50 dark:bg-zinc-800/50",children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{className:"text-left px-4 py-3 font-medium text-zinc-500",children:"Username"}),(0,t.jsx)("th",{className:"text-right px-4 py-3 font-medium text-zinc-500",children:"Sessions"}),(0,t.jsx)("th",{className:"text-right px-4 py-3 font-medium text-zinc-500",children:"Total Time"}),(0,t.jsx)("th",{className:"text-right px-4 py-3 font-medium text-zinc-500",children:"Last Login"})]})}),(0,t.jsxs)("tbody",{className:"divide-y divide-zinc-100 dark:divide-zinc-800",children:[e.userSummary.map(e=>(0,t.jsxs)("tr",{className:"hover:bg-zinc-50 dark:hover:bg-zinc-800/30",children:[(0,t.jsx)("td",{className:"px-4 py-3 font-mono",children:e.username}),(0,t.jsx)("td",{className:"px-4 py-3 text-right text-zinc-400",children:e.session_count}),(0,t.jsx)("td",{className:"px-4 py-3 text-right text-zinc-400",children:v(Math.round(e.total_minutes))}),(0,t.jsx)("td",{className:"px-4 py-3 text-right text-zinc-400 text-xs",children:e.last_login?N(e.last_login):"-"})]},e.username)),0===e.userSummary.length&&(0,t.jsx)("tr",{children:(0,t.jsx)("td",{colSpan:4,className:"px-4 py-8 text-center text-zinc-500",children:"No session data yet"})})]})]})]}),(0,t.jsxs)("div",{className:"bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-lg overflow-hidden",children:[(0,t.jsx)("div",{className:"p-4 border-b border-zinc-200 dark:border-zinc-800",children:(0,t.jsx)("h3",{className:"font-semibold",children:"Recent Logins"})}),(0,t.jsxs)("table",{className:"w-full text-sm",children:[(0,t.jsx)("thead",{className:"bg-zinc-50 dark:bg-zinc-800/50",children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{className:"text-left px-4 py-3 font-medium text-zinc-500",children:"Username"}),(0,t.jsx)("th",{className:"text-left px-4 py-3 font-medium text-zinc-500",children:"Time"}),(0,t.jsx)("th",{className:"text-left px-4 py-3 font-medium text-zinc-500",children:"IP Address"})]})}),(0,t.jsxs)("tbody",{className:"divide-y divide-zinc-100 dark:divide-zinc-800",children:[e.recentLogins.slice(0,25).map((e,r)=>(0,t.jsxs)("tr",{className:"hover:bg-zinc-50 dark:hover:bg-zinc-800/30",children:[(0,t.jsx)("td",{className:"px-4 py-3 font-mono",children:e.username}),(0,t.jsx)("td",{className:"px-4 py-3 text-zinc-400 text-xs",children:N(e.timestamp)}),(0,t.jsx)("td",{className:"px-4 py-3 text-zinc-400 font-mono text-xs",children:e.ip_address||"-"})]},r)),0===e.recentLogins.length&&(0,t.jsx)("tr",{children:(0,t.jsx)("td",{colSpan:3,className:"px-4 py-8 text-center text-zinc-500",children:"No login events yet"})})]})]})]})]})}function b({icon:e,label:r,value:n}){return(0,t.jsxs)("div",{className:"bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-lg p-4",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs text-zinc-500 mb-2",children:[e,r]}),(0,t.jsx)("div",{className:"text-2xl font-bold",children:n})]})}function v(e){if(e<60)return`${e}m`;let t=Math.floor(e/60),r=e%60;return r>0?`${t}h ${r}m`:`${t}h`}function N(e){try{return new Date(e.includes("T")?e:e+"Z").toLocaleString("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}catch{return e}}e.s(["default",()=>g])}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,531278,e=>{"use strict";let t=(0,e.i(475254).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",()=>t],531278)},266027,954616,e=>{"use strict";let t;var s=e.i(175555),i=e.i(540143),a=e.i(286491),r=e.i(915823),n=e.i(793803),o=e.i(619273),c=e.i(180166),l=class extends r.Subscribable{constructor(e,t){super(),this.options=t,this.#e=e,this.#t=null,this.#s=(0,n.pendingThenable)(),this.bindMethods(),this.setOptions(t)}#e;#i=void 0;#a=void 0;#r=void 0;#n;#o;#s;#t;#c;#l;#u;#d;#h;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#i.addObserver(this),u(this.#i,this.options)?this.#y():this.updateResult(),this.#x())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return d(this.#i,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return d(this.#i,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#f(),this.#g(),this.#i.removeObserver(this)}setOptions(e){let t=this.options,s=this.#i;if(this.options=this.#e.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,o.resolveEnabled)(this.options.enabled,this.#i))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#b(),this.#i.setOptions(this.options),t._defaulted&&!(0,o.shallowEqualObjects)(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#i,observer:this});let i=this.hasListeners();i&&h(this.#i,s,this.options,t)&&this.#y(),this.updateResult(),i&&(this.#i!==s||(0,o.resolveEnabled)(this.options.enabled,this.#i)!==(0,o.resolveEnabled)(t.enabled,this.#i)||(0,o.resolveStaleTime)(this.options.staleTime,this.#i)!==(0,o.resolveStaleTime)(t.staleTime,this.#i))&&this.#j();let a=this.#v();i&&(this.#i!==s||(0,o.resolveEnabled)(this.options.enabled,this.#i)!==(0,o.resolveEnabled)(t.enabled,this.#i)||a!==this.#p)&&this.#N(a)}getOptimisticResult(e){var t,s;let i=this.#e.getQueryCache().build(this.#e,e),a=this.createResult(i,e);return t=this,s=a,(0,o.shallowEqualObjects)(t.getCurrentResult(),s)||(this.#r=a,this.#o=this.options,this.#n=this.#i.state),a}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,s)=>(this.trackProp(s),t?.(s),"promise"===s&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#s.status||this.#s.reject(Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,s))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#i}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),s=this.#e.getQueryCache().build(this.#e,t);return s.fetch().then(()=>this.createResult(s,t))}fetch(e){return this.#y({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#y(e){this.#b();let t=this.#i.fetch(this.options,e);return e?.throwOnError||(t=t.catch(o.noop)),t}#j(){this.#f();let e=(0,o.resolveStaleTime)(this.options.staleTime,this.#i);if(o.isServer||this.#r.isStale||!(0,o.isValidTimeout)(e))return;let t=(0,o.timeUntilStale)(this.#r.dataUpdatedAt,e);this.#d=c.timeoutManager.setTimeout(()=>{this.#r.isStale||this.updateResult()},t+1)}#v(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#i):this.options.refetchInterval)??!1}#N(e){this.#g(),this.#p=e,!o.isServer&&!1!==(0,o.resolveEnabled)(this.options.enabled,this.#i)&&(0,o.isValidTimeout)(this.#p)&&0!==this.#p&&(this.#h=c.timeoutManager.setInterval(()=>{(this.options.refetchIntervalInBackground||s.focusManager.isFocused())&&this.#y()},this.#p))}#x(){this.#j(),this.#N(this.#v())}#f(){this.#d&&(c.timeoutManager.clearTimeout(this.#d),this.#d=void 0)}#g(){this.#h&&(c.timeoutManager.clearInterval(this.#h),this.#h=void 0)}createResult(e,t){let s,i=this.#i,r=this.options,c=this.#r,l=this.#n,d=this.#o,m=e!==i?e.state:this.#a,{state:y}=e,x={...y},f=!1;if(t._optimisticResults){let s=this.hasListeners(),n=!s&&u(e,t),o=s&&h(e,i,t,r);(n||o)&&(x={...x,...(0,a.fetchState)(y.data,e.options)}),"isRestoring"===t._optimisticResults&&(x.fetchStatus="idle")}let{error:g,errorUpdatedAt:b,status:j}=x;s=x.data;let v=!1;if(void 0!==t.placeholderData&&void 0===s&&"pending"===j){let e;c?.isPlaceholderData&&t.placeholderData===d?.placeholderData?(e=c.data,v=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,void 0!==e&&(j="success",s=(0,o.replaceData)(c?.data,e,t),f=!0)}if(t.select&&void 0!==s&&!v)if(c&&s===l?.data&&t.select===this.#c)s=this.#l;else try{this.#c=t.select,s=t.select(s),s=(0,o.replaceData)(c?.data,s,t),this.#l=s,this.#t=null}catch(e){this.#t=e}this.#t&&(g=this.#t,s=this.#l,b=Date.now(),j="error");let N="fetching"===x.fetchStatus,w="pending"===j,k="error"===j,S=w&&N,C=void 0!==s,R={status:j,fetchStatus:x.fetchStatus,isPending:w,isSuccess:"success"===j,isError:k,isInitialLoading:S,isLoading:S,data:s,dataUpdatedAt:x.dataUpdatedAt,error:g,errorUpdatedAt:b,failureCount:x.fetchFailureCount,failureReason:x.fetchFailureReason,errorUpdateCount:x.errorUpdateCount,isFetched:x.dataUpdateCount>0||x.errorUpdateCount>0,isFetchedAfterMount:x.dataUpdateCount>m.dataUpdateCount||x.errorUpdateCount>m.errorUpdateCount,isFetching:N,isRefetching:N&&!w,isLoadingError:k&&!C,isPaused:"paused"===x.fetchStatus,isPlaceholderData:f,isRefetchError:k&&C,isStale:p(e,t),refetch:this.refetch,promise:this.#s,isEnabled:!1!==(0,o.resolveEnabled)(t.enabled,e)};if(this.options.experimental_prefetchInRender){let t=void 0!==R.data,s="error"===R.status&&!t,a=e=>{s?e.reject(R.error):t&&e.resolve(R.data)},r=()=>{a(this.#s=R.promise=(0,n.pendingThenable)())},o=this.#s;switch(o.status){case"pending":e.queryHash===i.queryHash&&a(o);break;case"fulfilled":(s||R.data!==o.value)&&r();break;case"rejected":s&&R.error===o.reason||r()}}return R}updateResult(){let e=this.#r,t=this.createResult(this.#i,this.options);if(this.#n=this.#i.state,this.#o=this.options,void 0!==this.#n.data&&(this.#u=this.#i),(0,o.shallowEqualObjects)(t,e))return;this.#r=t;let s=()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,s="function"==typeof t?t():t;if("all"===s||!s&&!this.#m.size)return!0;let i=new Set(s??this.#m);return this.options.throwOnError&&i.add("error"),Object.keys(this.#r).some(t=>this.#r[t]!==e[t]&&i.has(t))};this.#w({listeners:s()})}#b(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#i)return;let t=this.#i;this.#i=e,this.#a=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#x()}#w(e){i.notifyManager.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#i,type:"observerResultsUpdated"})})}};function u(e,t){return!1!==(0,o.resolveEnabled)(t.enabled,e)&&void 0===e.state.data&&("error"!==e.state.status||!1!==t.retryOnMount)||void 0!==e.state.data&&d(e,t,t.refetchOnMount)}function d(e,t,s){if(!1!==(0,o.resolveEnabled)(t.enabled,e)&&"static"!==(0,o.resolveStaleTime)(t.staleTime,e)){let i="function"==typeof s?s(e):s;return"always"===i||!1!==i&&p(e,t)}return!1}function h(e,t,s,i){return(e!==t||!1===(0,o.resolveEnabled)(i.enabled,e))&&(!s.suspense||"error"!==e.state.status)&&p(e,s)}function p(e,t){return!1!==(0,o.resolveEnabled)(t.enabled,e)&&e.isStaleByTime((0,o.resolveStaleTime)(t.staleTime,e))}e.i(247167);var m=e.i(271645),y=e.i(912598);e.i(843476);var x=m.createContext((t=!1,{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t})),f=m.createContext(!1);f.Provider;var g=(e,t,s)=>t.fetchOptimistic(e).catch(()=>{s.clearReset()});function b(e,t){return function(e,t,s){let a,r=m.useContext(f),n=m.useContext(x),c=(0,y.useQueryClient)(s),l=c.defaultQueryOptions(e);c.getDefaultOptions().queries?._experimental_beforeQuery?.(l);let u=c.getQueryCache().get(l.queryHash);if(l._optimisticResults=r?"isRestoring":"optimistic",l.suspense){let e=e=>"static"===e?e:Math.max(e??1e3,1e3),t=l.staleTime;l.staleTime="function"==typeof t?(...s)=>e(t(...s)):e(t),"number"==typeof l.gcTime&&(l.gcTime=Math.max(l.gcTime,1e3))}a=u?.state.error&&"function"==typeof l.throwOnError?(0,o.shouldThrowError)(l.throwOnError,[u.state.error,u]):l.throwOnError,(l.suspense||l.experimental_prefetchInRender||a)&&!n.isReset()&&(l.retryOnMount=!1),m.useEffect(()=>{n.clearReset()},[n]);let d=!c.getQueryCache().get(l.queryHash),[h]=m.useState(()=>new t(c,l)),p=h.getOptimisticResult(l),b=!r&&!1!==e.subscribed;if(m.useSyncExternalStore(m.useCallback(e=>{let t=b?h.subscribe(i.notifyManager.batchCalls(e)):o.noop;return h.updateResult(),t},[h,b]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),m.useEffect(()=>{h.setOptions(l)},[l,h]),l?.suspense&&p.isPending)throw g(l,h,n);if((({result:e,errorResetBoundary:t,throwOnError:s,query:i,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&i&&(a&&void 0===e.data||(0,o.shouldThrowError)(s,[e.error,i])))({result:p,errorResetBoundary:n,throwOnError:l.throwOnError,query:u,suspense:l.suspense}))throw p.error;if(c.getDefaultOptions().queries?._experimental_afterQuery?.(l,p),l.experimental_prefetchInRender&&!o.isServer&&p.isLoading&&p.isFetching&&!r){let e=d?g(l,h,n):u?.promise;e?.catch(o.noop).finally(()=>{h.updateResult()})}return l.notifyOnChangeProps?p:h.trackResult(p)}(e,l,t)}e.s(["useQuery",()=>b],266027);var j=e.i(114272),v=r,N=class extends v.Subscribable{#e;#r=void 0;#k;#S;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#C()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,o.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#k,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,o.hashKey)(t.mutationKey)!==(0,o.hashKey)(this.options.mutationKey)?this.reset():this.#k?.state.status==="pending"&&this.#k.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#k?.removeObserver(this)}onMutationUpdate(e){this.#C(),this.#w(e)}getCurrentResult(){return this.#r}reset(){this.#k?.removeObserver(this),this.#k=void 0,this.#C(),this.#w()}mutate(e,t){return this.#S=t,this.#k?.removeObserver(this),this.#k=this.#e.getMutationCache().build(this.#e,this.options),this.#k.addObserver(this),this.#k.execute(e)}#C(){let e=this.#k?.state??(0,j.getDefaultState)();this.#r={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#w(e){i.notifyManager.batch(()=>{if(this.#S&&this.hasListeners()){let t=this.#r.variables,s=this.#r.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#S.onSuccess?.(e.data,t,s,i)}catch(e){Promise.reject(e)}try{this.#S.onSettled?.(e.data,null,t,s,i)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#S.onError?.(e.error,t,s,i)}catch(e){Promise.reject(e)}try{this.#S.onSettled?.(void 0,e.error,t,s,i)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#r)})})}};function w(e,t){let s=(0,y.useQueryClient)(t),[a]=m.useState(()=>new N(s,e));m.useEffect(()=>{a.setOptions(e)},[a,e]);let r=m.useSyncExternalStore(m.useCallback(e=>a.subscribe(i.notifyManager.batchCalls(e)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),n=m.useCallback((e,t)=>{a.mutate(e,t).catch(o.noop)},[a]);if(r.error&&(0,o.shouldThrowError)(a.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:n,mutateAsync:r.mutate}}e.s(["useMutation",()=>w],954616)},203999,e=>{"use strict";var t=e.i(266027),s=e.i(954616),i=e.i(912598),a=e.i(209165);function r(e={}){return(0,t.useQuery)({queryKey:["sessions",e],queryFn:async()=>{let t=new URLSearchParams;return e.projectId&&t.set("projectId",e.projectId),void 0!==e.starred&&t.set("starred",String(e.starred)),e.search&&t.set("search",e.search),e.agentType&&t.set("agentType",e.agentType),e.sortBy&&t.set("sortBy",e.sortBy),e.sortDir&&t.set("sortDir",e.sortDir),void 0!==e.offset&&t.set("offset",String(e.offset)),void 0!==e.limit&&t.set("limit",String(e.limit)),"all"===e.nodeFilter&&t.set("nodes","all"),(await fetch((0,a.api)(`/api/sessions?${t}`))).json()}})}function n(e){return(0,t.useQuery)({queryKey:["session",e],queryFn:async()=>{let t=await fetch((0,a.api)(`/api/sessions/${e}`));if(!t.ok)throw Error("Session not found");return t.json()},enabled:!!e})}function o(e,s=0,i=50,r){return(0,t.useQuery)({queryKey:["messages",e,s,i,r],queryFn:async()=>{let t=r?(0,a.api)(`/api/network/proxy/${r}/sessions/${e}/messages?offset=${s}&limit=${i}`):(0,a.api)(`/api/sessions/${e}/messages?offset=${s}&limit=${i}`);return(await fetch(t)).json()},enabled:!!e})}function c(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>(await fetch((0,a.api)(`/api/sessions/${e}`),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"star"})})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["sessions"]}),e.invalidateQueries({queryKey:["session"]})}})}function l(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async({sessionId:e,notes:t})=>(await fetch((0,a.api)(`/api/sessions/${e}`),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"notes",notes:t})})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["session"]})}})}function u(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async({sessionId:e,tagName:t})=>(await fetch((0,a.api)(`/api/sessions/${e}`),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"tag",tagName:t})})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["sessions"]}),e.invalidateQueries({queryKey:["session"]}),e.invalidateQueries({queryKey:["tags"]})}})}function d(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async({sessionId:e,tagName:t})=>(await fetch((0,a.api)(`/api/sessions/${e}`),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"removeTag",tagName:t})})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["sessions"]}),e.invalidateQueries({queryKey:["session"]}),e.invalidateQueries({queryKey:["tags"]})}})}function h(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async({sessionId:e,name:t})=>(await fetch((0,a.api)(`/api/sessions/${e}`),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"rename",name:t})})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["sessions"]}),e.invalidateQueries({queryKey:["session"]})}})}function p(){return(0,t.useQuery)({queryKey:["tags"],queryFn:async()=>(await fetch((0,a.api)("/api/tags"))).json()})}function m(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>(await fetch((0,a.api)("/api/tags"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"delete",tagId:e})})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["tags"]}),e.invalidateQueries({queryKey:["sessions"]}),e.invalidateQueries({queryKey:["session"]})}})}function y(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async({tagId:e,color:t})=>(await fetch((0,a.api)("/api/tags"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"updateColor",tagId:e,color:t})})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["tags"]}),e.invalidateQueries({queryKey:["sessions"]}),e.invalidateQueries({queryKey:["session"]})}})}function x(){return(0,t.useQuery)({queryKey:["workspaces"],queryFn:async()=>(await fetch((0,a.api)("/api/workspaces"))).json()})}function f(){return(0,t.useQuery)({queryKey:["workspaces","remote"],queryFn:async()=>(await fetch((0,a.api)("/api/workspaces?nodes=all"))).json()})}function g(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async({workspaceId:e,sessionId:t,nodeId:s,title:i,cwd:r,agentType:n})=>{let o=await fetch((0,a.api)(`/api/workspaces/${e}/sessions`),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:t,nodeId:s,title:i,cwd:r,agentType:n})});if(!o.ok)throw Error("Failed to add session to workspace");return o.json()},onSuccess:()=>{e.invalidateQueries({queryKey:["workspaces"]}),e.invalidateQueries({queryKey:["workspace-sessions"]}),e.invalidateQueries({queryKey:["sessions"]}),e.invalidateQueries({queryKey:["session"]})}})}function b(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async({workspaceId:e,sessionId:t})=>{let s=await fetch((0,a.api)(`/api/workspaces/${e}/sessions`),{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:t})});if(!s.ok)throw Error("Failed to remove session from workspace");return s.json()},onSuccess:()=>{e.invalidateQueries({queryKey:["workspaces"]}),e.invalidateQueries({queryKey:["workspace-sessions"]}),e.invalidateQueries({queryKey:["sessions"]}),e.invalidateQueries({queryKey:["session"]})}})}function j(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>(await fetch((0,a.api)("/api/bulk"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["sessions"]}),e.invalidateQueries({queryKey:["workspaces"]}),e.invalidateQueries({queryKey:["tags"]})}})}function v(){return(0,t.useQuery)({queryKey:["projects"],queryFn:async()=>(await fetch((0,a.api)("/api/projects"))).json()})}function N(){return(0,t.useQuery)({queryKey:["analytics"],queryFn:async()=>(await fetch((0,a.api)("/api/analytics/overview"))).json()})}function w(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async()=>(await fetch((0,a.api)("/api/sync"),{method:"POST"})).json(),onSuccess:()=>{e.invalidateQueries()}})}e.s(["useAddSessionToWorkspace",()=>g,"useAddTag",()=>u,"useAnalytics",()=>N,"useBulkAction",()=>j,"useDeleteTag",()=>m,"useMessages",()=>o,"useProjects",()=>v,"useRemoteWorkspaces",()=>f,"useRemoveSessionFromWorkspace",()=>b,"useRemoveTag",()=>d,"useRenameSession",()=>h,"useSession",()=>n,"useSessions",()=>r,"useSync",()=>w,"useTags",()=>p,"useToggleStar",()=>c,"useUpdateNotes",()=>l,"useUpdateTagColor",()=>y,"useWorkspaces",()=>x])},107233,e=>{"use strict";let t=(0,e.i(475254).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",()=>t],107233)},16715,e=>{"use strict";let t=(0,e.i(475254).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",()=>t],16715)},98919,e=>{"use strict";let t=(0,e.i(475254).default)("shield",[["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"}]]);e.s(["Shield",()=>t],98919)},595468,911588,e=>{"use strict";var t=e.i(475254);let s=(0,t.default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["CheckCircle2",()=>s],595468);let i=(0,t.default)("folder-code",[["path",{d:"M10 10.5 8 13l2 2.5",key:"m4t9c1"}],["path",{d:"m14 10.5 2 2.5-2 2.5",key:"14w2eb"}],["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:"1u1bxd"}]]);e.s(["FolderCode",()=>i],911588)},349889,e=>{"use strict";var t=e.i(843476),s=e.i(271645),i=e.i(209165);function a(){let[e,a]=(0,s.useState)(null),[r,n]=(0,s.useState)(null),[o,c]=(0,s.useState)(null),[l,u]=(0,s.useState)(!1),[d,h]=(0,s.useState)({});(0,s.useEffect)(()=>{fetch((0,i.api)("/api/cortex/settings")).then(e=>e.json()).then(a).catch(()=>{}),fetch((0,i.api)("/api/cortex/usage")).then(e=>e.json()).then(c).catch(()=>{})},[]);let p=async e=>{u(!0);try{if((await fetch((0,i.api)("/api/cortex/settings"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok){let t={...e};for(let e of["anthropic_api_key","openai_api_key","voyage_api_key","groq_api_key"])t[e]&&(t[e]=`…${t[e].slice(-4)}`);a(e=>({...e,...t}))}}catch{}finally{u(!1)}},m=async(e=!1)=>{if(e&&!confirm("This will delete all existing knowledge and re-ingest from session files. Continue?"))return;await fetch((0,i.api)("/api/cortex/ingest/bootstrap"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clean:e})});let t=setInterval(async()=>{let e=await fetch((0,i.api)("/api/cortex/ingest/status")),s=await e.json();n(s),("complete"===s.status||"error"===s.status)&&(clearInterval(t),fetch((0,i.api)("/api/cortex/usage")).then(e=>e.json()).then(c).catch(()=>{}))},2e3)},y=e?.enabled??!1,x=y?"":"opacity-40 pointer-events-none";return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("h3",{className:"text-sm font-medium text-gray-200",children:["Cortex",(0,t.jsx)("span",{className:"ml-2 text-[9px] font-medium uppercase tracking-wider text-purple-400 bg-purple-400/10 px-1.5 py-0.5 rounded",children:"Beta"})]}),(0,t.jsxs)("label",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"Enable Cortex"}),(0,t.jsx)("input",{type:"checkbox",checked:y,disabled:!e,onChange:e=>p({enabled:e.target.checked}),className:"accent-purple-500"})]}),!e&&(0,t.jsx)("p",{className:"text-[10px] text-gray-500",children:"Loading…"}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("span",{className:"text-xs text-gray-300 font-medium",children:"API Keys"}),(0,t.jsx)("p",{className:"text-[10px] text-gray-600 -mt-2",children:"Keys configured here override environment variables. Stored in ~/.spaces/config.json."}),[{key:"anthropic_api_key",label:"Anthropic",placeholder:"sk-ant-…",hint:"LLM distillation (Claude Haiku)"},{key:"voyage_api_key",label:"Voyage AI",placeholder:"pa-…",hint:"Embeddings — best for code/technical retrieval"},{key:"openai_api_key",label:"OpenAI",placeholder:"sk-proj-…",hint:"Embeddings fallback + transcription fallback"},{key:"groq_api_key",label:"Groq",placeholder:"gsk_…",hint:"Speech transcription (Quest voice input)"}].map(({key:s,label:i,placeholder:a,hint:r})=>(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("span",{className:"text-xs text-gray-400",children:i}),e?.[s]?(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 font-mono",children:e[s]}),(0,t.jsx)("button",{onClick:()=>p({[s]:""}),className:"text-[10px] text-gray-600 hover:text-red-400",children:"remove"})]}):(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsx)("input",{type:"password",value:d[s]||"",onChange:e=>h(t=>({...t,[s]:e.target.value})),placeholder:a,className:"flex-1 text-xs bg-white/5 border border-white/10 rounded px-2 py-1 text-gray-300 placeholder-gray-600"}),(0,t.jsx)("button",{onClick:()=>{d[s]&&(p({[s]:d[s]}),h(e=>({...e,[s]:""})))},disabled:!d[s],className:"text-xs px-2 py-1 bg-purple-600 hover:bg-purple-500 text-white rounded disabled:opacity-30",children:"Save"})]}),(0,t.jsx)("p",{className:"text-[10px] text-gray-600",children:r})]},s))]}),(0,t.jsxs)("label",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"Debug logging"}),(0,t.jsx)("p",{className:"text-[10px] text-gray-600",children:"Verbose memory, LanceDB, embedding, and distillation logs in server console"})]}),(0,t.jsx)("input",{type:"checkbox",checked:e?.debug??!1,onChange:e=>p({debug:e.target.checked}),className:"accent-purple-500 shrink-0 ml-3"})]}),(0,t.jsxs)("div",{className:`block ${x}`,children:[(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"Embedding provider"}),(0,t.jsx)("p",{className:"text-[10px] text-gray-500",children:"Voyage AI — voyage-3-lite (512-dim)"})]}),(0,t.jsxs)("div",{className:`block ${x}`,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"Context injection budget"}),(0,t.jsxs)("span",{className:"text-[10px] text-gray-500",children:[e?.injection?.max_tokens||2e3," tokens"]})]}),(0,t.jsx)("input",{type:"range",min:500,max:2e4,step:500,value:e?.injection?.max_tokens||2e3,onChange:e=>p({injection:{max_tokens:parseInt(e.target.value)}}),className:"w-full"}),(0,t.jsx)("p",{className:"text-[10px] text-gray-600 mt-0.5",children:"Tokens of retrieved knowledge injected per prompt (Claude context: 200K)"})]}),(0,t.jsxs)("label",{className:`flex items-center justify-between ${x}`,children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"LLM distillation"}),(0,t.jsx)("p",{className:"text-[10px] text-gray-600",children:"4 Haiku API calls per session end — cleaner knowledge at ~$0.03–0.05/session"})]}),(0,t.jsx)("input",{type:"checkbox",checked:e?.ingestion?.distillation??!0,onChange:e=>p({ingestion:{distillation:e.target.checked}}),className:"accent-purple-500 shrink-0 ml-3"})]}),(0,t.jsxs)("div",{className:`block ${x}`,children:[(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"Federation sync mode"}),(0,t.jsx)("p",{className:"text-[10px] text-gray-600 mb-1",children:"How knowledge is shared across multiple Spaces instances"}),(0,t.jsxs)("select",{value:e?.federation?.sync_mode||"query-only",onChange:e=>p({federation:{sync_mode:e.target.value}}),className:"w-full text-xs bg-white/5 border border-white/10 rounded px-2 py-1 text-gray-300",children:[(0,t.jsx)("option",{value:"query-only",children:"Query Only — read from remotes, no push"}),(0,t.jsx)("option",{value:"background-sync",children:"Background Sync — periodic two-way sync"}),(0,t.jsx)("option",{value:"real-time-sync",children:"Real-time Sync — sync on every store"})]})]}),o&&o.distillation?.calls>0&&(0,t.jsxs)("div",{className:"pt-2 border-t border-white/5",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"Distillation usage"}),(0,t.jsx)("button",{onClick:()=>fetch((0,i.api)("/api/cortex/usage"),{method:"DELETE"}).then(()=>c(null)),className:"text-[10px] text-gray-600 hover:text-gray-400",children:"reset"})]}),(0,t.jsxs)("div",{className:"text-[10px] text-gray-500 space-y-0.5",children:[(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)("span",{children:"API calls"}),(0,t.jsx)("span",{className:"text-gray-400",children:o.distillation.calls.toLocaleString()})]}),(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)("span",{children:"Tokens in / out"}),(0,t.jsxs)("span",{className:"text-gray-400",children:[(o.distillation.input_tokens/1e3).toFixed(1),"K / ",(o.distillation.output_tokens/1e3).toFixed(1),"K"]})]}),(0,t.jsxs)("div",{className:"flex justify-between font-medium",children:[(0,t.jsx)("span",{children:"Estimated cost"}),(0,t.jsxs)("span",{className:"text-purple-400",children:["$",o.distillation.estimated_cost_usd.toFixed(4)]})]})]})]}),(0,t.jsxs)("div",{className:`pt-2 border-t border-white/5 ${x}`,children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("button",{onClick:()=>m(!1),disabled:r?.status==="running",className:"text-xs px-3 py-1.5 bg-purple-600 hover:bg-purple-500 text-white rounded disabled:opacity-50",children:r?.status==="running"?"Ingesting...":"Incremental Ingest"}),(0,t.jsx)("button",{onClick:()=>m(!0),disabled:r?.status==="running",className:"text-xs px-3 py-1.5 bg-zinc-700 hover:bg-zinc-600 text-white rounded disabled:opacity-50",children:"Clean Re-ingest"})]}),(0,t.jsx)("p",{className:"text-[10px] text-gray-600 mt-1",children:"Incremental adds new sessions. Clean wipes all knowledge and re-processes everything."}),(r?.status==="running"||r?.status==="complete"||r?.status==="error")&&(0,t.jsxs)("div",{className:"mt-3 space-y-1.5",children:[(0,t.jsx)("div",{className:"w-full h-1.5 bg-white/5 rounded-full overflow-hidden",children:(0,t.jsx)("div",{className:`h-full rounded-full transition-all ${"error"===r.status?"bg-red-500":"complete"===r.status?"bg-green-500":"bg-purple-500"}`,style:{width:`${r.processedFiles/Math.max(r.totalFiles,1)*100}%`}})}),(0,t.jsxs)("div",{className:"text-[10px] text-gray-500",children:[r.phase&&(0,t.jsxs)("span",{className:"text-gray-400",children:[r.phase," · "]}),r.processedFiles,"/",r.totalFiles," files",r.skippedFiles>0&&(0,t.jsxs)("span",{children:[" · ",r.skippedFiles," skipped"]}),r.totalChunks>0&&(0,t.jsxs)("span",{children:[" · ",r.totalChunks," chunks stored"]}),r.chunksSkipped>0&&(0,t.jsxs)("span",{children:[" · ",r.chunksSkipped," deduped"]})]}),r.errors?.length>0&&(0,t.jsxs)("div",{className:"text-[10px] text-red-400 max-h-20 overflow-y-auto space-y-0.5",children:[r.errors.slice(0,5).map((e,s)=>(0,t.jsx)("div",{className:"truncate",children:e},s)),r.errors.length>5&&(0,t.jsxs)("div",{className:"text-gray-500",children:["+",r.errors.length-5," more errors"]})]}),"complete"===r.status&&(0,t.jsxs)("div",{className:"text-[10px] text-green-400",children:["Complete — ",r.totalChunks," knowledge units from ",r.processedFiles-r.skippedFiles," sessions"]})]})]})]})}e.s(["CortexSettings",()=>a])},438090,e=>{"use strict";var t=e.i(843476),s=e.i(271645),i=e.i(203999),a=e.i(239616),r=e.i(16715),n=e.i(75505),o=e.i(531278),c=e.i(98919),l=e.i(595468),u=e.i(217923),d=e.i(107233),h=e.i(37727),p=e.i(911588),m=e.i(209165),y=e.i(209593),x=e.i(28916),f=e.i(349889);function g(){let{hasAuth:e,tier:g,version:b,hasCortex:j,cortexTierEnabled:v}=(0,x.useTier)(),N="u">typeof document&&document.cookie.includes("spaces-session="),w=(0,i.useSync)(),[k,S]=(0,s.useState)(""),[C,R]=(0,s.useState)(!1),[Q,T]=(0,s.useState)(!0),[O,E]=(0,s.useState)(!1),[q,F]=(0,s.useState)(""),[I,M]=(0,s.useState)(""),[z,K]=(0,s.useState)(""),[P,D]=(0,s.useState)(""),[_,A]=(0,s.useState)(!1),U=(0,s.useRef)(null),[L,$]=(0,s.useState)(null),[J,W]=(0,s.useState)([]),[B,H]=(0,s.useState)(""),[V,G]=(0,s.useState)(!1),[Y,Z]=(0,s.useState)(!0);(0,s.useEffect)(()=>{e?N?fetch((0,m.api)("/api/auth/me")).then(e=>e.json()).then(e=>{$(e),T(!1)}).catch(()=>T(!1)):fetch((0,m.api)("/api/auth/totp/status")).then(e=>e.json()).then(e=>{R(e.enabled),T(!1)}).catch(()=>T(!1)):T(!1)},[e,N]),(0,s.useEffect)(()=>{fetch((0,m.api)("/api/config")).then(e=>e.json()).then(e=>{G(e.telemetryOptOut),W(e.devDirectories||[]),Z(!1)}).catch(()=>Z(!1))},[]);let X=async e=>{W(e),await fetch((0,m.api)("/api/config"),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({devDirectories:e})})},ee=()=>{let e=B.trim();!e||J.includes(e)||(e.startsWith("/")||/^[A-Za-z]:[\\/]/.test(e))&&(X([...J,e]),H(""))},et=async()=>{let e=await w.mutateAsync();S(`Synced ${e.projects} projects, ${e.sessions} sessions, enriched ${e.enriched}`),(0,y.track)("sync_completed",{projects:e.projects,sessions:e.sessions,enriched:e.enriched})},es=async()=>{let e=!V;G(e),(0,y.setOptOut)(e),(0,y.track)("telemetry_toggled",{enabled:!e}),await fetch((0,m.api)("/api/config"),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({telemetryOptOut:e})})},ei=async()=>{E(!0),D(""),K("");let e=await fetch((0,m.api)("/api/auth/totp/setup"),{method:"POST"}),t=await e.json();F(t.qrDataUrl),M(t.secret),setTimeout(()=>U.current?.focus(),100)},ea=async e=>{if(6!==e.length)return;A(!0),D("");let t=await fetch((0,m.api)("/api/auth/totp/verify"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:e,action:"enable"})}),s=await t.json();A(!1),s.success?(R(!0),E(!1),F(""),M(""),K("")):(D(s.error||"Invalid code"),K(""),U.current?.focus())},er=async()=>{confirm("Disable 2FA? You will need to set it up again to use terminals.")&&(await fetch((0,m.api)("/api/auth/totp/setup"),{method:"POST"}),R(!1),E(!1))};return(0,t.jsxs)("div",{className:"p-6 max-w-3xl",children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold",children:"Settings"}),(0,t.jsx)("p",{className:"text-muted-foreground text-sm mt-1",children:"Configure Spaces"})]}),(0,t.jsxs)("div",{className:"space-y-6",children:[e&&(0,t.jsxs)("div",{className:"bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-lg p-5",children:[(0,t.jsxs)("h3",{className:"font-semibold flex items-center gap-2 mb-3",children:[(0,t.jsx)(c.Shield,{className:"w-4 h-4"}),"Terminal Security"]}),Q?(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm text-zinc-400",children:[(0,t.jsx)(o.Loader2,{className:"w-4 h-4 animate-spin"}),"Loading..."]}):N?(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.CheckCircle2,{className:"w-5 h-5 text-green-500"}),(0,t.jsx)("span",{className:"text-sm font-medium text-green-500",children:"2FA Enabled"})]}),(0,t.jsx)("p",{className:"text-xs text-zinc-500",children:"Two-factor authentication is required at login. TOTP is managed through the login flow. Contact an admin to reset your 2FA if needed."})]}):C&&!O?(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.CheckCircle2,{className:"w-5 h-5 text-green-500"}),(0,t.jsx)("span",{className:"text-sm font-medium text-green-500",children:"2FA Enabled"})]}),(0,t.jsx)("p",{className:"text-xs text-zinc-500",children:"Two-factor authentication is required each time you open a terminal session. Tokens are valid for 8 hours."}),(0,t.jsx)("button",{onClick:er,className:"text-xs text-zinc-500 hover:text-red-400 transition-colors",children:"Disable 2FA"})]}):O?(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("p",{className:"text-sm text-zinc-400",children:"Scan this QR code with your authenticator app (Google Authenticator, Authy, etc.)"}),q?(0,t.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,t.jsx)("div",{className:"bg-white p-3 rounded-lg",children:(0,t.jsx)("img",{src:q,alt:"TOTP QR Code",width:200,height:200})}),(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("p",{className:"text-[10px] text-zinc-600 mb-1",children:"Manual entry key:"}),(0,t.jsx)("code",{className:"text-xs bg-zinc-800 px-2 py-1 rounded font-mono select-all",children:I})]})]}):(0,t.jsx)("div",{className:"flex justify-center py-8",children:(0,t.jsx)(o.Loader2,{className:"w-6 h-6 animate-spin text-zinc-400"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs text-zinc-400 block mb-1.5",children:"Enter the 6-digit code from your authenticator"}),(0,t.jsx)("input",{ref:U,type:"text",inputMode:"numeric",autoComplete:"one-time-code",placeholder:"000000",value:z,onChange:e=>{let t;K(t=e.target.value.replace(/\D/g,"").slice(0,6)),D(""),6===t.length&&ea(t)},disabled:_,className:"w-40 px-3 py-2 text-lg font-mono tracking-[0.3em] text-center bg-zinc-800 border border-zinc-700 rounded-md focus:outline-none focus:border-indigo-500 text-white disabled:opacity-50"}),_&&(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-2 text-xs text-zinc-400",children:[(0,t.jsx)(o.Loader2,{className:"w-3 h-3 animate-spin"}),"Verifying..."]}),P&&(0,t.jsx)("p",{className:"text-xs text-red-400 mt-2",children:P})]}),(0,t.jsx)("button",{onClick:()=>{E(!1),F(""),M("")},className:"text-xs text-zinc-500 hover:text-white transition-colors",children:"Cancel"})]}):(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("p",{className:"text-sm text-zinc-400",children:"Two-factor authentication adds an extra layer of security to terminal access. You'll need an authenticator app to generate codes."}),(0,t.jsxs)("button",{onClick:ei,className:"flex items-center gap-2 px-4 py-2 text-sm bg-indigo-500 text-white rounded-md hover:bg-indigo-600",children:[(0,t.jsx)(c.Shield,{className:"w-4 h-4"}),"Set up 2FA"]})]})]}),(0,t.jsxs)("div",{className:"bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-lg p-5",children:[(0,t.jsxs)("h3",{className:"font-semibold flex items-center gap-2 mb-3",children:[(0,t.jsx)(n.FolderOpen,{className:"w-4 h-4"}),"Data Source"]}),(0,t.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-muted-foreground text-xs",children:"Agent Data Directories"}),(0,t.jsxs)("div",{className:"font-mono text-xs mt-1 p-2 bg-zinc-50 dark:bg-zinc-800 rounded space-y-1",children:[(0,t.jsx)("p",{children:"~/.claude/"}),(0,t.jsx)("p",{children:"~/.codex/"}),(0,t.jsx)("p",{children:"~/.gemini/"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-muted-foreground text-xs",children:"Spaces Database"}),(0,t.jsx)("p",{className:"font-mono text-xs mt-1 p-2 bg-zinc-50 dark:bg-zinc-800 rounded",children:"~/.spaces/spaces.db"})]})]})]}),(0,t.jsxs)("div",{className:"bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-lg p-5",children:[(0,t.jsxs)("h3",{className:"font-semibold flex items-center gap-2 mb-3",children:[(0,t.jsx)(p.FolderCode,{className:"w-4 h-4"}),"Development Directories"]}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground mb-3",children:"Restrict terminal pane creation to these project roots. Paths must be absolute."}),J.length>0&&(0,t.jsx)("div",{className:"space-y-1.5 mb-3",children:J.map(e=>(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-1.5 bg-zinc-50 dark:bg-zinc-800 rounded-md group",children:[(0,t.jsx)(n.FolderOpen,{className:"w-3.5 h-3.5 text-amber-500/70 flex-shrink-0"}),(0,t.jsx)("span",{className:"font-mono text-xs flex-1 truncate",children:e}),(0,t.jsx)("button",{onClick:()=>{X(J.filter(t=>t!==e))},className:"text-zinc-400 hover:text-red-400 opacity-0 group-hover:opacity-100 transition-opacity",title:"Remove",children:(0,t.jsx)(h.X,{className:"w-3.5 h-3.5"})})]},e))}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("input",{type:"text",placeholder:"u">typeof navigator&&navigator.platform?.startsWith("Win")?"C:\\Users\\you\\projects":"/home/user/projects",value:B,onChange:e=>H(e.target.value),onKeyDown:e=>"Enter"===e.key&&ee(),className:"flex-1 px-3 py-1.5 text-sm bg-zinc-50 dark:bg-zinc-800 border border-zinc-200 dark:border-zinc-700 rounded-md focus:outline-none focus:border-indigo-500 font-mono"}),(0,t.jsxs)("button",{onClick:ee,disabled:!B.trim()||!(B.trim().startsWith("/")||/^[A-Za-z]:[\\/]/.test(B.trim())),className:"flex items-center gap-1.5 px-3 py-1.5 text-sm bg-indigo-500 text-white rounded-md hover:bg-indigo-600 disabled:opacity-50",children:[(0,t.jsx)(d.Plus,{className:"w-3.5 h-3.5"}),"Add"]})]})]}),(0,t.jsxs)("div",{className:"bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-lg p-5",children:[(0,t.jsxs)("h3",{className:"font-semibold flex items-center gap-2 mb-3",children:[(0,t.jsx)(r.RefreshCw,{className:"w-4 h-4"}),"Data Sync"]}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground mb-3",children:"Force a full re-scan of all agent sessions. This rebuilds the index from scratch."}),(0,t.jsxs)("button",{onClick:et,disabled:w.isPending,className:"flex items-center gap-2 px-4 py-2 text-sm bg-indigo-500 text-white rounded-md hover:bg-indigo-600 disabled:opacity-50",children:[w.isPending?(0,t.jsx)(o.Loader2,{className:"w-4 h-4 animate-spin"}):(0,t.jsx)(r.RefreshCw,{className:"w-4 h-4"}),"Re-sync Now"]}),k&&(0,t.jsx)("p",{className:"text-xs text-green-600 mt-2",children:k})]}),(0,t.jsxs)("div",{className:"bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-lg p-5",children:[(0,t.jsxs)("h3",{className:"font-semibold flex items-center gap-2 mb-3",children:[(0,t.jsx)(u.BarChart3,{className:"w-4 h-4"}),"Telemetry"]}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground mb-3",children:"Anonymous usage data helps us understand how Spaces is used and improve the product. No file paths, session content, or personal information is ever collected."}),Y?(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm text-zinc-400",children:[(0,t.jsx)(o.Loader2,{className:"w-4 h-4 animate-spin"}),"Loading..."]}):(0,t.jsxs)("label",{className:"flex items-center gap-3 cursor-pointer",children:[(0,t.jsx)("input",{type:"checkbox",checked:!V,onChange:es,className:"w-4 h-4 rounded border-zinc-300 dark:border-zinc-700 text-indigo-500 focus:ring-indigo-500"}),(0,t.jsx)("span",{className:"text-sm",children:"Send anonymous usage data"})]})]}),v&&(0,t.jsx)("div",{className:"bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-lg p-5",children:(0,t.jsx)(f.CortexSettings,{})}),(0,t.jsxs)("div",{className:"bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-lg p-5",children:[(0,t.jsxs)("h3",{className:"font-semibold flex items-center gap-2 mb-3",children:[(0,t.jsx)(a.Settings,{className:"w-4 h-4"}),"About"]}),(0,t.jsxs)("div",{className:"text-sm space-y-1",children:[(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"Version:"})," ",b||"..."]}),(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"Tier:"})," ",(0,t.jsx)("span",{className:"capitalize",children:g})]}),(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"Data access:"})," Read-only (never modifies agent data directories)"]}),(0,t.jsx)("p",{className:"text-muted-foreground text-xs mt-2",children:"Spaces is an open-source agent workspace manager. All session data stays local on your machine."})]})]})]})]})}e.s(["default",()=>g])}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,531278,e=>{"use strict";let t=(0,e.i(475254).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",()=>t],531278)},266027,954616,e=>{"use strict";let t;var s=e.i(175555),i=e.i(540143),a=e.i(286491),r=e.i(915823),n=e.i(793803),o=e.i(619273),c=e.i(180166),l=class extends r.Subscribable{constructor(e,t){super(),this.options=t,this.#e=e,this.#t=null,this.#s=(0,n.pendingThenable)(),this.bindMethods(),this.setOptions(t)}#e;#i=void 0;#a=void 0;#r=void 0;#n;#o;#s;#t;#c;#l;#u;#d;#h;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#i.addObserver(this),u(this.#i,this.options)?this.#x():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return d(this.#i,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return d(this.#i,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#f(),this.#g(),this.#i.removeObserver(this)}setOptions(e){let t=this.options,s=this.#i;if(this.options=this.#e.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,o.resolveEnabled)(this.options.enabled,this.#i))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#b(),this.#i.setOptions(this.options),t._defaulted&&!(0,o.shallowEqualObjects)(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#i,observer:this});let i=this.hasListeners();i&&h(this.#i,s,this.options,t)&&this.#x(),this.updateResult(),i&&(this.#i!==s||(0,o.resolveEnabled)(this.options.enabled,this.#i)!==(0,o.resolveEnabled)(t.enabled,this.#i)||(0,o.resolveStaleTime)(this.options.staleTime,this.#i)!==(0,o.resolveStaleTime)(t.staleTime,this.#i))&&this.#j();let a=this.#v();i&&(this.#i!==s||(0,o.resolveEnabled)(this.options.enabled,this.#i)!==(0,o.resolveEnabled)(t.enabled,this.#i)||a!==this.#p)&&this.#N(a)}getOptimisticResult(e){var t,s;let i=this.#e.getQueryCache().build(this.#e,e),a=this.createResult(i,e);return t=this,s=a,(0,o.shallowEqualObjects)(t.getCurrentResult(),s)||(this.#r=a,this.#o=this.options,this.#n=this.#i.state),a}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,s)=>(this.trackProp(s),t?.(s),"promise"===s&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#s.status||this.#s.reject(Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,s))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#i}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),s=this.#e.getQueryCache().build(this.#e,t);return s.fetch().then(()=>this.createResult(s,t))}fetch(e){return this.#x({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#x(e){this.#b();let t=this.#i.fetch(this.options,e);return e?.throwOnError||(t=t.catch(o.noop)),t}#j(){this.#f();let e=(0,o.resolveStaleTime)(this.options.staleTime,this.#i);if(o.isServer||this.#r.isStale||!(0,o.isValidTimeout)(e))return;let t=(0,o.timeUntilStale)(this.#r.dataUpdatedAt,e);this.#d=c.timeoutManager.setTimeout(()=>{this.#r.isStale||this.updateResult()},t+1)}#v(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#i):this.options.refetchInterval)??!1}#N(e){this.#g(),this.#p=e,!o.isServer&&!1!==(0,o.resolveEnabled)(this.options.enabled,this.#i)&&(0,o.isValidTimeout)(this.#p)&&0!==this.#p&&(this.#h=c.timeoutManager.setInterval(()=>{(this.options.refetchIntervalInBackground||s.focusManager.isFocused())&&this.#x()},this.#p))}#y(){this.#j(),this.#N(this.#v())}#f(){this.#d&&(c.timeoutManager.clearTimeout(this.#d),this.#d=void 0)}#g(){this.#h&&(c.timeoutManager.clearInterval(this.#h),this.#h=void 0)}createResult(e,t){let s,i=this.#i,r=this.options,c=this.#r,l=this.#n,d=this.#o,m=e!==i?e.state:this.#a,{state:x}=e,y={...x},f=!1;if(t._optimisticResults){let s=this.hasListeners(),n=!s&&u(e,t),o=s&&h(e,i,t,r);(n||o)&&(y={...y,...(0,a.fetchState)(x.data,e.options)}),"isRestoring"===t._optimisticResults&&(y.fetchStatus="idle")}let{error:g,errorUpdatedAt:b,status:j}=y;s=y.data;let v=!1;if(void 0!==t.placeholderData&&void 0===s&&"pending"===j){let e;c?.isPlaceholderData&&t.placeholderData===d?.placeholderData?(e=c.data,v=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,void 0!==e&&(j="success",s=(0,o.replaceData)(c?.data,e,t),f=!0)}if(t.select&&void 0!==s&&!v)if(c&&s===l?.data&&t.select===this.#c)s=this.#l;else try{this.#c=t.select,s=t.select(s),s=(0,o.replaceData)(c?.data,s,t),this.#l=s,this.#t=null}catch(e){this.#t=e}this.#t&&(g=this.#t,s=this.#l,b=Date.now(),j="error");let N="fetching"===y.fetchStatus,w="pending"===j,k="error"===j,S=w&&N,C=void 0!==s,R={status:j,fetchStatus:y.fetchStatus,isPending:w,isSuccess:"success"===j,isError:k,isInitialLoading:S,isLoading:S,data:s,dataUpdatedAt:y.dataUpdatedAt,error:g,errorUpdatedAt:b,failureCount:y.fetchFailureCount,failureReason:y.fetchFailureReason,errorUpdateCount:y.errorUpdateCount,isFetched:y.dataUpdateCount>0||y.errorUpdateCount>0,isFetchedAfterMount:y.dataUpdateCount>m.dataUpdateCount||y.errorUpdateCount>m.errorUpdateCount,isFetching:N,isRefetching:N&&!w,isLoadingError:k&&!C,isPaused:"paused"===y.fetchStatus,isPlaceholderData:f,isRefetchError:k&&C,isStale:p(e,t),refetch:this.refetch,promise:this.#s,isEnabled:!1!==(0,o.resolveEnabled)(t.enabled,e)};if(this.options.experimental_prefetchInRender){let t=void 0!==R.data,s="error"===R.status&&!t,a=e=>{s?e.reject(R.error):t&&e.resolve(R.data)},r=()=>{a(this.#s=R.promise=(0,n.pendingThenable)())},o=this.#s;switch(o.status){case"pending":e.queryHash===i.queryHash&&a(o);break;case"fulfilled":(s||R.data!==o.value)&&r();break;case"rejected":s&&R.error===o.reason||r()}}return R}updateResult(){let e=this.#r,t=this.createResult(this.#i,this.options);if(this.#n=this.#i.state,this.#o=this.options,void 0!==this.#n.data&&(this.#u=this.#i),(0,o.shallowEqualObjects)(t,e))return;this.#r=t;let s=()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,s="function"==typeof t?t():t;if("all"===s||!s&&!this.#m.size)return!0;let i=new Set(s??this.#m);return this.options.throwOnError&&i.add("error"),Object.keys(this.#r).some(t=>this.#r[t]!==e[t]&&i.has(t))};this.#w({listeners:s()})}#b(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#i)return;let t=this.#i;this.#i=e,this.#a=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#w(e){i.notifyManager.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#i,type:"observerResultsUpdated"})})}};function u(e,t){return!1!==(0,o.resolveEnabled)(t.enabled,e)&&void 0===e.state.data&&("error"!==e.state.status||!1!==t.retryOnMount)||void 0!==e.state.data&&d(e,t,t.refetchOnMount)}function d(e,t,s){if(!1!==(0,o.resolveEnabled)(t.enabled,e)&&"static"!==(0,o.resolveStaleTime)(t.staleTime,e)){let i="function"==typeof s?s(e):s;return"always"===i||!1!==i&&p(e,t)}return!1}function h(e,t,s,i){return(e!==t||!1===(0,o.resolveEnabled)(i.enabled,e))&&(!s.suspense||"error"!==e.state.status)&&p(e,s)}function p(e,t){return!1!==(0,o.resolveEnabled)(t.enabled,e)&&e.isStaleByTime((0,o.resolveStaleTime)(t.staleTime,e))}e.i(247167);var m=e.i(271645),x=e.i(912598);e.i(843476);var y=m.createContext((t=!1,{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t})),f=m.createContext(!1);f.Provider;var g=(e,t,s)=>t.fetchOptimistic(e).catch(()=>{s.clearReset()});function b(e,t){return function(e,t,s){let a,r=m.useContext(f),n=m.useContext(y),c=(0,x.useQueryClient)(s),l=c.defaultQueryOptions(e);c.getDefaultOptions().queries?._experimental_beforeQuery?.(l);let u=c.getQueryCache().get(l.queryHash);if(l._optimisticResults=r?"isRestoring":"optimistic",l.suspense){let e=e=>"static"===e?e:Math.max(e??1e3,1e3),t=l.staleTime;l.staleTime="function"==typeof t?(...s)=>e(t(...s)):e(t),"number"==typeof l.gcTime&&(l.gcTime=Math.max(l.gcTime,1e3))}a=u?.state.error&&"function"==typeof l.throwOnError?(0,o.shouldThrowError)(l.throwOnError,[u.state.error,u]):l.throwOnError,(l.suspense||l.experimental_prefetchInRender||a)&&!n.isReset()&&(l.retryOnMount=!1),m.useEffect(()=>{n.clearReset()},[n]);let d=!c.getQueryCache().get(l.queryHash),[h]=m.useState(()=>new t(c,l)),p=h.getOptimisticResult(l),b=!r&&!1!==e.subscribed;if(m.useSyncExternalStore(m.useCallback(e=>{let t=b?h.subscribe(i.notifyManager.batchCalls(e)):o.noop;return h.updateResult(),t},[h,b]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),m.useEffect(()=>{h.setOptions(l)},[l,h]),l?.suspense&&p.isPending)throw g(l,h,n);if((({result:e,errorResetBoundary:t,throwOnError:s,query:i,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&i&&(a&&void 0===e.data||(0,o.shouldThrowError)(s,[e.error,i])))({result:p,errorResetBoundary:n,throwOnError:l.throwOnError,query:u,suspense:l.suspense}))throw p.error;if(c.getDefaultOptions().queries?._experimental_afterQuery?.(l,p),l.experimental_prefetchInRender&&!o.isServer&&p.isLoading&&p.isFetching&&!r){let e=d?g(l,h,n):u?.promise;e?.catch(o.noop).finally(()=>{h.updateResult()})}return l.notifyOnChangeProps?p:h.trackResult(p)}(e,l,t)}e.s(["useQuery",()=>b],266027);var j=e.i(114272),v=r,N=class extends v.Subscribable{#e;#r=void 0;#k;#S;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#C()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,o.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#k,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,o.hashKey)(t.mutationKey)!==(0,o.hashKey)(this.options.mutationKey)?this.reset():this.#k?.state.status==="pending"&&this.#k.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#k?.removeObserver(this)}onMutationUpdate(e){this.#C(),this.#w(e)}getCurrentResult(){return this.#r}reset(){this.#k?.removeObserver(this),this.#k=void 0,this.#C(),this.#w()}mutate(e,t){return this.#S=t,this.#k?.removeObserver(this),this.#k=this.#e.getMutationCache().build(this.#e,this.options),this.#k.addObserver(this),this.#k.execute(e)}#C(){let e=this.#k?.state??(0,j.getDefaultState)();this.#r={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#w(e){i.notifyManager.batch(()=>{if(this.#S&&this.hasListeners()){let t=this.#r.variables,s=this.#r.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#S.onSuccess?.(e.data,t,s,i)}catch(e){Promise.reject(e)}try{this.#S.onSettled?.(e.data,null,t,s,i)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#S.onError?.(e.error,t,s,i)}catch(e){Promise.reject(e)}try{this.#S.onSettled?.(void 0,e.error,t,s,i)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#r)})})}};function w(e,t){let s=(0,x.useQueryClient)(t),[a]=m.useState(()=>new N(s,e));m.useEffect(()=>{a.setOptions(e)},[a,e]);let r=m.useSyncExternalStore(m.useCallback(e=>a.subscribe(i.notifyManager.batchCalls(e)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),n=m.useCallback((e,t)=>{a.mutate(e,t).catch(o.noop)},[a]);if(r.error&&(0,o.shouldThrowError)(a.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:n,mutateAsync:r.mutate}}e.s(["useMutation",()=>w],954616)},203999,e=>{"use strict";var t=e.i(266027),s=e.i(954616),i=e.i(912598),a=e.i(209165);function r(e={}){return(0,t.useQuery)({queryKey:["sessions",e],queryFn:async()=>{let t=new URLSearchParams;return e.projectId&&t.set("projectId",e.projectId),void 0!==e.starred&&t.set("starred",String(e.starred)),e.search&&t.set("search",e.search),e.agentType&&t.set("agentType",e.agentType),e.sortBy&&t.set("sortBy",e.sortBy),e.sortDir&&t.set("sortDir",e.sortDir),void 0!==e.offset&&t.set("offset",String(e.offset)),void 0!==e.limit&&t.set("limit",String(e.limit)),"all"===e.nodeFilter&&t.set("nodes","all"),(await fetch((0,a.api)(`/api/sessions?${t}`))).json()}})}function n(e){return(0,t.useQuery)({queryKey:["session",e],queryFn:async()=>{let t=await fetch((0,a.api)(`/api/sessions/${e}`));if(!t.ok)throw Error("Session not found");return t.json()},enabled:!!e})}function o(e,s=0,i=50,r){return(0,t.useQuery)({queryKey:["messages",e,s,i,r],queryFn:async()=>{let t=r?(0,a.api)(`/api/network/proxy/${r}/sessions/${e}/messages?offset=${s}&limit=${i}`):(0,a.api)(`/api/sessions/${e}/messages?offset=${s}&limit=${i}`);return(await fetch(t)).json()},enabled:!!e})}function c(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>(await fetch((0,a.api)(`/api/sessions/${e}`),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"star"})})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["sessions"]}),e.invalidateQueries({queryKey:["session"]})}})}function l(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async({sessionId:e,notes:t})=>(await fetch((0,a.api)(`/api/sessions/${e}`),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"notes",notes:t})})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["session"]})}})}function u(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async({sessionId:e,tagName:t})=>(await fetch((0,a.api)(`/api/sessions/${e}`),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"tag",tagName:t})})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["sessions"]}),e.invalidateQueries({queryKey:["session"]}),e.invalidateQueries({queryKey:["tags"]})}})}function d(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async({sessionId:e,tagName:t})=>(await fetch((0,a.api)(`/api/sessions/${e}`),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"removeTag",tagName:t})})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["sessions"]}),e.invalidateQueries({queryKey:["session"]}),e.invalidateQueries({queryKey:["tags"]})}})}function h(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async({sessionId:e,name:t})=>(await fetch((0,a.api)(`/api/sessions/${e}`),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"rename",name:t})})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["sessions"]}),e.invalidateQueries({queryKey:["session"]})}})}function p(){return(0,t.useQuery)({queryKey:["tags"],queryFn:async()=>(await fetch((0,a.api)("/api/tags"))).json()})}function m(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>(await fetch((0,a.api)("/api/tags"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"delete",tagId:e})})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["tags"]}),e.invalidateQueries({queryKey:["sessions"]}),e.invalidateQueries({queryKey:["session"]})}})}function x(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async({tagId:e,color:t})=>(await fetch((0,a.api)("/api/tags"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"updateColor",tagId:e,color:t})})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["tags"]}),e.invalidateQueries({queryKey:["sessions"]}),e.invalidateQueries({queryKey:["session"]})}})}function y(){return(0,t.useQuery)({queryKey:["workspaces"],queryFn:async()=>(await fetch((0,a.api)("/api/workspaces"))).json()})}function f(){return(0,t.useQuery)({queryKey:["workspaces","remote"],queryFn:async()=>(await fetch((0,a.api)("/api/workspaces?nodes=all"))).json()})}function g(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async({workspaceId:e,sessionId:t,nodeId:s,title:i,cwd:r,agentType:n})=>{let o=await fetch((0,a.api)(`/api/workspaces/${e}/sessions`),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:t,nodeId:s,title:i,cwd:r,agentType:n})});if(!o.ok)throw Error("Failed to add session to workspace");return o.json()},onSuccess:()=>{e.invalidateQueries({queryKey:["workspaces"]}),e.invalidateQueries({queryKey:["workspace-sessions"]}),e.invalidateQueries({queryKey:["sessions"]}),e.invalidateQueries({queryKey:["session"]})}})}function b(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async({workspaceId:e,sessionId:t})=>{let s=await fetch((0,a.api)(`/api/workspaces/${e}/sessions`),{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:t})});if(!s.ok)throw Error("Failed to remove session from workspace");return s.json()},onSuccess:()=>{e.invalidateQueries({queryKey:["workspaces"]}),e.invalidateQueries({queryKey:["workspace-sessions"]}),e.invalidateQueries({queryKey:["sessions"]}),e.invalidateQueries({queryKey:["session"]})}})}function j(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>(await fetch((0,a.api)("/api/bulk"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["sessions"]}),e.invalidateQueries({queryKey:["workspaces"]}),e.invalidateQueries({queryKey:["tags"]})}})}function v(){return(0,t.useQuery)({queryKey:["projects"],queryFn:async()=>(await fetch((0,a.api)("/api/projects"))).json()})}function N(){return(0,t.useQuery)({queryKey:["analytics"],queryFn:async()=>(await fetch((0,a.api)("/api/analytics/overview"))).json()})}function w(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async()=>(await fetch((0,a.api)("/api/sync"),{method:"POST"})).json(),onSuccess:()=>{e.invalidateQueries()}})}e.s(["useAddSessionToWorkspace",()=>g,"useAddTag",()=>u,"useAnalytics",()=>N,"useBulkAction",()=>j,"useDeleteTag",()=>m,"useMessages",()=>o,"useProjects",()=>v,"useRemoteWorkspaces",()=>f,"useRemoveSessionFromWorkspace",()=>b,"useRemoveTag",()=>d,"useRenameSession",()=>h,"useSession",()=>n,"useSessions",()=>r,"useSync",()=>w,"useTags",()=>p,"useToggleStar",()=>c,"useUpdateNotes",()=>l,"useUpdateTagColor",()=>x,"useWorkspaces",()=>y])},107233,e=>{"use strict";let t=(0,e.i(475254).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",()=>t],107233)},16715,e=>{"use strict";let t=(0,e.i(475254).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",()=>t],16715)},98919,e=>{"use strict";let t=(0,e.i(475254).default)("shield",[["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"}]]);e.s(["Shield",()=>t],98919)},595468,911588,e=>{"use strict";var t=e.i(475254);let s=(0,t.default)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["CheckCircle2",()=>s],595468);let i=(0,t.default)("folder-code",[["path",{d:"M10 10.5 8 13l2 2.5",key:"m4t9c1"}],["path",{d:"m14 10.5 2 2.5-2 2.5",key:"14w2eb"}],["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:"1u1bxd"}]]);e.s(["FolderCode",()=>i],911588)},349889,e=>{"use strict";var t=e.i(843476),s=e.i(271645),i=e.i(209165);function a(){let[e,a]=(0,s.useState)(null),[r,n]=(0,s.useState)(null),[o,c]=(0,s.useState)(null),[l,u]=(0,s.useState)(!1),[d,h]=(0,s.useState)({});(0,s.useEffect)(()=>{fetch((0,i.api)("/api/cortex/settings")).then(e=>e.json()).then(a).catch(()=>{}),fetch((0,i.api)("/api/cortex/usage")).then(e=>e.json()).then(c).catch(()=>{})},[]);let p=async e=>{u(!0);try{if((await fetch((0,i.api)("/api/cortex/settings"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok){let t={...e};for(let e of["anthropic_api_key","openai_api_key","voyage_api_key","groq_api_key"])t[e]&&(t[e]=`…${t[e].slice(-4)}`);a(e=>({...e,...t}))}}catch{}finally{u(!1)}},m=async(e=!1)=>{if(e&&!confirm("This will delete all existing knowledge and re-ingest from session files. Continue?"))return;await fetch((0,i.api)("/api/cortex/ingest/bootstrap"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({clean:e})});let t=setInterval(async()=>{let e=await fetch((0,i.api)("/api/cortex/ingest/status")),s=await e.json();n(s),("complete"===s.status||"error"===s.status)&&(clearInterval(t),fetch((0,i.api)("/api/cortex/usage")).then(e=>e.json()).then(c).catch(()=>{}))},2e3)},x=e?.enabled??!1,y=x?"":"opacity-40 pointer-events-none";return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("h3",{className:"text-sm font-medium text-gray-200",children:["Cortex",(0,t.jsx)("span",{className:"ml-2 text-[9px] font-medium uppercase tracking-wider text-purple-400 bg-purple-400/10 px-1.5 py-0.5 rounded",children:"Beta"})]}),(0,t.jsxs)("label",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"Enable Cortex"}),(0,t.jsx)("input",{type:"checkbox",checked:x,disabled:!e,onChange:e=>p({enabled:e.target.checked}),className:"accent-purple-500"})]}),!e&&(0,t.jsx)("p",{className:"text-[10px] text-gray-500",children:"Loading…"}),(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("span",{className:"text-xs text-gray-300 font-medium",children:"API Keys"}),(0,t.jsx)("p",{className:"text-[10px] text-gray-600 -mt-2",children:"Keys configured here override environment variables. Stored in ~/.spaces/config.json."}),[{key:"anthropic_api_key",label:"Anthropic",placeholder:"sk-ant-…",hint:"LLM distillation (Claude Haiku)"},{key:"voyage_api_key",label:"Voyage AI",placeholder:"pa-…",hint:"Embeddings — best for code/technical retrieval"},{key:"openai_api_key",label:"OpenAI",placeholder:"sk-proj-…",hint:"Embeddings fallback + transcription fallback"},{key:"groq_api_key",label:"Groq",placeholder:"gsk_…",hint:"Speech transcription (Quest voice input)"}].map(({key:s,label:i,placeholder:a,hint:r})=>(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("span",{className:"text-xs text-gray-400",children:i}),e?.[s]?(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-xs text-gray-500 font-mono",children:e[s]}),(0,t.jsx)("button",{onClick:()=>p({[s]:""}),className:"text-[10px] text-gray-600 hover:text-red-400",children:"remove"})]}):(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsx)("input",{type:"password",value:d[s]||"",onChange:e=>h(t=>({...t,[s]:e.target.value})),placeholder:a,className:"flex-1 text-xs bg-white/5 border border-white/10 rounded px-2 py-1 text-gray-300 placeholder-gray-600"}),(0,t.jsx)("button",{onClick:()=>{d[s]&&(p({[s]:d[s]}),h(e=>({...e,[s]:""})))},disabled:!d[s],className:"text-xs px-2 py-1 bg-purple-600 hover:bg-purple-500 text-white rounded disabled:opacity-30",children:"Save"})]}),(0,t.jsx)("p",{className:"text-[10px] text-gray-600",children:r})]},s))]}),(0,t.jsxs)("label",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"Debug logging"}),(0,t.jsx)("p",{className:"text-[10px] text-gray-600",children:"Verbose memory, LanceDB, embedding, and distillation logs in server console"})]}),(0,t.jsx)("input",{type:"checkbox",checked:e?.debug??!1,onChange:e=>p({debug:e.target.checked}),className:"accent-purple-500 shrink-0 ml-3"})]}),(0,t.jsxs)("div",{className:`block ${y}`,children:[(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"Embedding provider"}),(0,t.jsx)("p",{className:"text-[10px] text-gray-500",children:"Voyage AI — voyage-3-lite (512-dim)"})]}),(0,t.jsxs)("div",{className:`block ${y}`,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"Context injection budget"}),(0,t.jsxs)("span",{className:"text-[10px] text-gray-500",children:[e?.injection?.max_tokens||2e3," tokens"]})]}),(0,t.jsx)("input",{type:"range",min:500,max:2e4,step:500,value:e?.injection?.max_tokens||2e3,onChange:e=>p({injection:{max_tokens:parseInt(e.target.value)}}),className:"w-full"}),(0,t.jsx)("p",{className:"text-[10px] text-gray-600 mt-0.5",children:"Tokens of retrieved knowledge injected per prompt (Claude context: 200K)"})]}),(0,t.jsxs)("label",{className:`flex items-center justify-between ${y}`,children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"LLM distillation"}),(0,t.jsx)("p",{className:"text-[10px] text-gray-600",children:"4 Haiku API calls per session end — cleaner knowledge at ~$0.03–0.05/session"})]}),(0,t.jsx)("input",{type:"checkbox",checked:e?.ingestion?.distillation??!0,onChange:e=>p({ingestion:{distillation:e.target.checked}}),className:"accent-purple-500 shrink-0 ml-3"})]}),(0,t.jsxs)("div",{className:`block ${y}`,children:[(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"Federation sync mode"}),(0,t.jsx)("p",{className:"text-[10px] text-gray-600 mb-1",children:"How knowledge is shared across multiple Spaces instances"}),(0,t.jsxs)("select",{value:e?.federation?.sync_mode||"query-only",onChange:e=>p({federation:{sync_mode:e.target.value}}),className:"w-full text-xs bg-white/5 border border-white/10 rounded px-2 py-1 text-gray-300",children:[(0,t.jsx)("option",{value:"query-only",children:"Query Only — read from remotes, no push"}),(0,t.jsx)("option",{value:"background-sync",children:"Background Sync — periodic two-way sync"}),(0,t.jsx)("option",{value:"real-time-sync",children:"Real-time Sync — sync on every store"})]})]}),o&&o.distillation?.calls>0&&(0,t.jsxs)("div",{className:"pt-2 border-t border-white/5",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,t.jsx)("span",{className:"text-xs text-gray-400",children:"Distillation usage"}),(0,t.jsx)("button",{onClick:()=>fetch((0,i.api)("/api/cortex/usage"),{method:"DELETE"}).then(()=>c(null)),className:"text-[10px] text-gray-600 hover:text-gray-400",children:"reset"})]}),(0,t.jsxs)("div",{className:"text-[10px] text-gray-500 space-y-0.5",children:[(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)("span",{children:"API calls"}),(0,t.jsx)("span",{className:"text-gray-400",children:o.distillation.calls.toLocaleString()})]}),(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)("span",{children:"Tokens in / out"}),(0,t.jsxs)("span",{className:"text-gray-400",children:[(o.distillation.input_tokens/1e3).toFixed(1),"K / ",(o.distillation.output_tokens/1e3).toFixed(1),"K"]})]}),(0,t.jsxs)("div",{className:"flex justify-between font-medium",children:[(0,t.jsx)("span",{children:"Estimated cost"}),(0,t.jsxs)("span",{className:"text-purple-400",children:["$",o.distillation.estimated_cost_usd.toFixed(4)]})]})]})]}),(0,t.jsxs)("div",{className:`pt-2 border-t border-white/5 ${y}`,children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("button",{onClick:()=>m(!1),disabled:r?.status==="running",className:"text-xs px-3 py-1.5 bg-purple-600 hover:bg-purple-500 text-white rounded disabled:opacity-50",children:r?.status==="running"?"Ingesting...":"Incremental Ingest"}),(0,t.jsx)("button",{onClick:()=>m(!0),disabled:r?.status==="running",className:"text-xs px-3 py-1.5 bg-zinc-700 hover:bg-zinc-600 text-white rounded disabled:opacity-50",children:"Clean Re-ingest"})]}),(0,t.jsx)("p",{className:"text-[10px] text-gray-600 mt-1",children:"Incremental adds new sessions. Clean wipes all knowledge and re-processes everything."}),(r?.status==="running"||r?.status==="complete"||r?.status==="error")&&(0,t.jsxs)("div",{className:"mt-3 space-y-1.5",children:[(0,t.jsx)("div",{className:"w-full h-1.5 bg-white/5 rounded-full overflow-hidden",children:(0,t.jsx)("div",{className:`h-full rounded-full transition-all ${"error"===r.status?"bg-red-500":"complete"===r.status?"bg-green-500":"bg-purple-500"}`,style:{width:`${r.processedFiles/Math.max(r.totalFiles,1)*100}%`}})}),(0,t.jsxs)("div",{className:"text-[10px] text-gray-500",children:[r.phase&&(0,t.jsxs)("span",{className:"text-gray-400",children:[r.phase," · "]}),r.processedFiles,"/",r.totalFiles," files",r.skippedFiles>0&&(0,t.jsxs)("span",{children:[" · ",r.skippedFiles," skipped"]}),r.totalChunks>0&&(0,t.jsxs)("span",{children:[" · ",r.totalChunks," chunks stored"]}),r.chunksSkipped>0&&(0,t.jsxs)("span",{children:[" · ",r.chunksSkipped," deduped"]})]}),r.errors?.length>0&&(0,t.jsxs)("div",{className:"text-[10px] text-red-400 max-h-20 overflow-y-auto space-y-0.5",children:[r.errors.slice(0,5).map((e,s)=>(0,t.jsx)("div",{className:"truncate",children:e},s)),r.errors.length>5&&(0,t.jsxs)("div",{className:"text-gray-500",children:["+",r.errors.length-5," more errors"]})]}),"complete"===r.status&&(0,t.jsxs)("div",{className:"text-[10px] text-green-400",children:["Complete — ",r.totalChunks," knowledge units from ",r.processedFiles-r.skippedFiles," sessions"]})]})]})]})}e.s(["CortexSettings",()=>a])},438090,e=>{"use strict";var t=e.i(843476),s=e.i(271645),i=e.i(203999),a=e.i(239616),r=e.i(16715),n=e.i(75505),o=e.i(531278),c=e.i(98919),l=e.i(595468),u=e.i(217923),d=e.i(107233),h=e.i(37727),p=e.i(911588);let m=(0,e.i(475254).default)("list-todo",[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]]);var x=e.i(209165),y=e.i(209593),f=e.i(28916),g=e.i(349889);function b(){let{hasAuth:e,tier:b,version:j,hasCortex:v,cortexTierEnabled:N}=(0,f.useTier)(),w="u">typeof document&&document.cookie.includes("spaces-session="),k=(0,i.useSync)(),[S,C]=(0,s.useState)(""),[R,T]=(0,s.useState)(!1),[Q,O]=(0,s.useState)(!0),[E,q]=(0,s.useState)(!1),[z,M]=(0,s.useState)(""),[F,I]=(0,s.useState)(""),[K,P]=(0,s.useState)(""),[D,_]=(0,s.useState)(""),[A,U]=(0,s.useState)(!1),L=(0,s.useRef)(null),[$,J]=(0,s.useState)(null),[W,B]=(0,s.useState)([]),[H,V]=(0,s.useState)(""),[G,Y]=(0,s.useState)(!1),[Z,X]=(0,s.useState)(!0),[ee,et]=(0,s.useState)(!1);(0,s.useEffect)(()=>{e?w?fetch((0,x.api)("/api/auth/me")).then(e=>e.json()).then(e=>{J(e),O(!1)}).catch(()=>O(!1)):fetch((0,x.api)("/api/auth/totp/status")).then(e=>e.json()).then(e=>{T(e.enabled),O(!1)}).catch(()=>O(!1)):O(!1)},[e,w]),(0,s.useEffect)(()=>{fetch((0,x.api)("/api/config")).then(e=>e.json()).then(e=>{Y(e.telemetryOptOut),B(e.devDirectories||[]),et(!!e.todosEnabled),X(!1)}).catch(()=>X(!1))},[]);let es=async()=>{let e=!ee;et(e),await fetch((0,x.api)("/api/config"),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({todosEnabled:e})})},ei=async e=>{B(e),await fetch((0,x.api)("/api/config"),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({devDirectories:e})})},ea=()=>{let e=H.trim();!e||W.includes(e)||(e.startsWith("/")||/^[A-Za-z]:[\\/]/.test(e))&&(ei([...W,e]),V(""))},er=async()=>{let e=await k.mutateAsync();C(`Synced ${e.projects} projects, ${e.sessions} sessions, enriched ${e.enriched}`),(0,y.track)("sync_completed",{projects:e.projects,sessions:e.sessions,enriched:e.enriched})},en=async()=>{let e=!G;Y(e),(0,y.setOptOut)(e),(0,y.track)("telemetry_toggled",{enabled:!e}),await fetch((0,x.api)("/api/config"),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({telemetryOptOut:e})})},eo=async()=>{q(!0),_(""),P("");let e=await fetch((0,x.api)("/api/auth/totp/setup"),{method:"POST"}),t=await e.json();M(t.qrDataUrl),I(t.secret),setTimeout(()=>L.current?.focus(),100)},ec=async e=>{if(6!==e.length)return;U(!0),_("");let t=await fetch((0,x.api)("/api/auth/totp/verify"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:e,action:"enable"})}),s=await t.json();U(!1),s.success?(T(!0),q(!1),M(""),I(""),P("")):(_(s.error||"Invalid code"),P(""),L.current?.focus())},el=async()=>{confirm("Disable 2FA? You will need to set it up again to use terminals.")&&(await fetch((0,x.api)("/api/auth/totp/setup"),{method:"POST"}),T(!1),q(!1))};return(0,t.jsxs)("div",{className:"p-6 max-w-3xl",children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsx)("h1",{className:"text-2xl font-bold",children:"Settings"}),(0,t.jsx)("p",{className:"text-muted-foreground text-sm mt-1",children:"Configure Spaces"})]}),(0,t.jsxs)("div",{className:"space-y-6",children:[e&&(0,t.jsxs)("div",{className:"bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-lg p-5",children:[(0,t.jsxs)("h3",{className:"font-semibold flex items-center gap-2 mb-3",children:[(0,t.jsx)(c.Shield,{className:"w-4 h-4"}),"Terminal Security"]}),Q?(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm text-zinc-400",children:[(0,t.jsx)(o.Loader2,{className:"w-4 h-4 animate-spin"}),"Loading..."]}):w?(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.CheckCircle2,{className:"w-5 h-5 text-green-500"}),(0,t.jsx)("span",{className:"text-sm font-medium text-green-500",children:"2FA Enabled"})]}),(0,t.jsx)("p",{className:"text-xs text-zinc-500",children:"Two-factor authentication is required at login. TOTP is managed through the login flow. Contact an admin to reset your 2FA if needed."})]}):R&&!E?(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(l.CheckCircle2,{className:"w-5 h-5 text-green-500"}),(0,t.jsx)("span",{className:"text-sm font-medium text-green-500",children:"2FA Enabled"})]}),(0,t.jsx)("p",{className:"text-xs text-zinc-500",children:"Two-factor authentication is required each time you open a terminal session. Tokens are valid for 8 hours."}),(0,t.jsx)("button",{onClick:el,className:"text-xs text-zinc-500 hover:text-red-400 transition-colors",children:"Disable 2FA"})]}):E?(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("p",{className:"text-sm text-zinc-400",children:"Scan this QR code with your authenticator app (Google Authenticator, Authy, etc.)"}),z?(0,t.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,t.jsx)("div",{className:"bg-white p-3 rounded-lg",children:(0,t.jsx)("img",{src:z,alt:"TOTP QR Code",width:200,height:200})}),(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)("p",{className:"text-[10px] text-zinc-600 mb-1",children:"Manual entry key:"}),(0,t.jsx)("code",{className:"text-xs bg-zinc-800 px-2 py-1 rounded font-mono select-all",children:F})]})]}):(0,t.jsx)("div",{className:"flex justify-center py-8",children:(0,t.jsx)(o.Loader2,{className:"w-6 h-6 animate-spin text-zinc-400"})}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-xs text-zinc-400 block mb-1.5",children:"Enter the 6-digit code from your authenticator"}),(0,t.jsx)("input",{ref:L,type:"text",inputMode:"numeric",autoComplete:"one-time-code",placeholder:"000000",value:K,onChange:e=>{let t;P(t=e.target.value.replace(/\D/g,"").slice(0,6)),_(""),6===t.length&&ec(t)},disabled:A,className:"w-40 px-3 py-2 text-lg font-mono tracking-[0.3em] text-center bg-zinc-800 border border-zinc-700 rounded-md focus:outline-none focus:border-indigo-500 text-white disabled:opacity-50"}),A&&(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-2 text-xs text-zinc-400",children:[(0,t.jsx)(o.Loader2,{className:"w-3 h-3 animate-spin"}),"Verifying..."]}),D&&(0,t.jsx)("p",{className:"text-xs text-red-400 mt-2",children:D})]}),(0,t.jsx)("button",{onClick:()=>{q(!1),M(""),I("")},className:"text-xs text-zinc-500 hover:text-white transition-colors",children:"Cancel"})]}):(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("p",{className:"text-sm text-zinc-400",children:"Two-factor authentication adds an extra layer of security to terminal access. You'll need an authenticator app to generate codes."}),(0,t.jsxs)("button",{onClick:eo,className:"flex items-center gap-2 px-4 py-2 text-sm bg-indigo-500 text-white rounded-md hover:bg-indigo-600",children:[(0,t.jsx)(c.Shield,{className:"w-4 h-4"}),"Set up 2FA"]})]})]}),(0,t.jsxs)("div",{className:"bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-lg p-5",children:[(0,t.jsxs)("h3",{className:"font-semibold flex items-center gap-2 mb-3",children:[(0,t.jsx)(n.FolderOpen,{className:"w-4 h-4"}),"Data Source"]}),(0,t.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-muted-foreground text-xs",children:"Agent Data Directories"}),(0,t.jsxs)("div",{className:"font-mono text-xs mt-1 p-2 bg-zinc-50 dark:bg-zinc-800 rounded space-y-1",children:[(0,t.jsx)("p",{children:"~/.claude/"}),(0,t.jsx)("p",{children:"~/.codex/"}),(0,t.jsx)("p",{children:"~/.gemini/"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-muted-foreground text-xs",children:"Spaces Database"}),(0,t.jsx)("p",{className:"font-mono text-xs mt-1 p-2 bg-zinc-50 dark:bg-zinc-800 rounded",children:"~/.spaces/spaces.db"})]})]})]}),(0,t.jsxs)("div",{className:"bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-lg p-5",children:[(0,t.jsxs)("h3",{className:"font-semibold flex items-center gap-2 mb-3",children:[(0,t.jsx)(p.FolderCode,{className:"w-4 h-4"}),"Development Directories"]}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground mb-3",children:"Restrict terminal pane creation to these project roots. Paths must be absolute."}),W.length>0&&(0,t.jsx)("div",{className:"space-y-1.5 mb-3",children:W.map(e=>(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-1.5 bg-zinc-50 dark:bg-zinc-800 rounded-md group",children:[(0,t.jsx)(n.FolderOpen,{className:"w-3.5 h-3.5 text-amber-500/70 flex-shrink-0"}),(0,t.jsx)("span",{className:"font-mono text-xs flex-1 truncate",children:e}),(0,t.jsx)("button",{onClick:()=>{ei(W.filter(t=>t!==e))},className:"text-zinc-400 hover:text-red-400 opacity-0 group-hover:opacity-100 transition-opacity",title:"Remove",children:(0,t.jsx)(h.X,{className:"w-3.5 h-3.5"})})]},e))}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("input",{type:"text",placeholder:"u">typeof navigator&&navigator.platform?.startsWith("Win")?"C:\\Users\\you\\projects":"/home/user/projects",value:H,onChange:e=>V(e.target.value),onKeyDown:e=>"Enter"===e.key&&ea(),className:"flex-1 px-3 py-1.5 text-sm bg-zinc-50 dark:bg-zinc-800 border border-zinc-200 dark:border-zinc-700 rounded-md focus:outline-none focus:border-indigo-500 font-mono"}),(0,t.jsxs)("button",{onClick:ea,disabled:!H.trim()||!(H.trim().startsWith("/")||/^[A-Za-z]:[\\/]/.test(H.trim())),className:"flex items-center gap-1.5 px-3 py-1.5 text-sm bg-indigo-500 text-white rounded-md hover:bg-indigo-600 disabled:opacity-50",children:[(0,t.jsx)(d.Plus,{className:"w-3.5 h-3.5"}),"Add"]})]})]}),(0,t.jsxs)("div",{className:"bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-lg p-5",children:[(0,t.jsxs)("h3",{className:"font-semibold flex items-center gap-2 mb-3",children:[(0,t.jsx)(r.RefreshCw,{className:"w-4 h-4"}),"Data Sync"]}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground mb-3",children:"Force a full re-scan of all agent sessions. This rebuilds the index from scratch."}),(0,t.jsxs)("button",{onClick:er,disabled:k.isPending,className:"flex items-center gap-2 px-4 py-2 text-sm bg-indigo-500 text-white rounded-md hover:bg-indigo-600 disabled:opacity-50",children:[k.isPending?(0,t.jsx)(o.Loader2,{className:"w-4 h-4 animate-spin"}):(0,t.jsx)(r.RefreshCw,{className:"w-4 h-4"}),"Re-sync Now"]}),S&&(0,t.jsx)("p",{className:"text-xs text-green-600 mt-2",children:S})]}),(0,t.jsxs)("div",{className:"bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-lg p-5",children:[(0,t.jsxs)("h3",{className:"font-semibold flex items-center gap-2 mb-3",children:[(0,t.jsx)(m,{className:"w-4 h-4"}),"Experimental"]}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground mb-3",children:"Opt-in to features that are still being shaped."}),(0,t.jsxs)("label",{className:"flex items-start gap-3 cursor-pointer",children:[(0,t.jsx)("input",{type:"checkbox",checked:ee,onChange:es,className:"mt-0.5 w-4 h-4 rounded border-zinc-300 dark:border-zinc-700 text-indigo-500 focus:ring-indigo-500"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-sm",children:"Workspace todos"}),(0,t.jsx)("div",{className:"text-xs text-muted-foreground mt-0.5",children:"Show a horizontal row of todo chips above the pane grid in each workspace."})]})]})]}),(0,t.jsxs)("div",{className:"bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-lg p-5",children:[(0,t.jsxs)("h3",{className:"font-semibold flex items-center gap-2 mb-3",children:[(0,t.jsx)(u.BarChart3,{className:"w-4 h-4"}),"Telemetry"]}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground mb-3",children:"Anonymous usage data helps us understand how Spaces is used and improve the product. No file paths, session content, or personal information is ever collected."}),Z?(0,t.jsxs)("div",{className:"flex items-center gap-2 text-sm text-zinc-400",children:[(0,t.jsx)(o.Loader2,{className:"w-4 h-4 animate-spin"}),"Loading..."]}):(0,t.jsxs)("label",{className:"flex items-center gap-3 cursor-pointer",children:[(0,t.jsx)("input",{type:"checkbox",checked:!G,onChange:en,className:"w-4 h-4 rounded border-zinc-300 dark:border-zinc-700 text-indigo-500 focus:ring-indigo-500"}),(0,t.jsx)("span",{className:"text-sm",children:"Send anonymous usage data"})]})]}),N&&(0,t.jsx)("div",{className:"bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-lg p-5",children:(0,t.jsx)(g.CortexSettings,{})}),(0,t.jsxs)("div",{className:"bg-white dark:bg-zinc-900 border border-zinc-200 dark:border-zinc-800 rounded-lg p-5",children:[(0,t.jsxs)("h3",{className:"font-semibold flex items-center gap-2 mb-3",children:[(0,t.jsx)(a.Settings,{className:"w-4 h-4"}),"About"]}),(0,t.jsxs)("div",{className:"text-sm space-y-1",children:[(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"Version:"})," ",j||"..."]}),(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"Tier:"})," ",(0,t.jsx)("span",{className:"capitalize",children:b})]}),(0,t.jsxs)("p",{children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:"Data access:"})," Read-only (never modifies agent data directories)"]}),(0,t.jsx)("p",{className:"text-muted-foreground text-xs mt-2",children:"Spaces is an open-source agent workspace manager. All session data stays local on your machine."})]})]})]})]})}e.s(["default",()=>b],438090)}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,531278,e=>{"use strict";let t=(0,e.i(475254).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",()=>t],531278)},266027,954616,e=>{"use strict";let t;var s=e.i(175555),i=e.i(540143),r=e.i(286491),n=e.i(915823),a=e.i(793803),o=e.i(619273),u=e.i(180166),c=class extends n.Subscribable{constructor(e,t){super(),this.options=t,this.#e=e,this.#t=null,this.#s=(0,a.pendingThenable)(),this.bindMethods(),this.setOptions(t)}#e;#i=void 0;#r=void 0;#n=void 0;#a;#o;#s;#t;#u;#c;#l;#h;#d;#p;#y=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#i.addObserver(this),l(this.#i,this.options)?this.#f():this.updateResult(),this.#m())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return h(this.#i,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return h(this.#i,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#v(),this.#g(),this.#i.removeObserver(this)}setOptions(e){let t=this.options,s=this.#i;if(this.options=this.#e.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,o.resolveEnabled)(this.options.enabled,this.#i))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#b(),this.#i.setOptions(this.options),t._defaulted&&!(0,o.shallowEqualObjects)(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#i,observer:this});let i=this.hasListeners();i&&d(this.#i,s,this.options,t)&&this.#f(),this.updateResult(),i&&(this.#i!==s||(0,o.resolveEnabled)(this.options.enabled,this.#i)!==(0,o.resolveEnabled)(t.enabled,this.#i)||(0,o.resolveStaleTime)(this.options.staleTime,this.#i)!==(0,o.resolveStaleTime)(t.staleTime,this.#i))&&this.#k();let r=this.#w();i&&(this.#i!==s||(0,o.resolveEnabled)(this.options.enabled,this.#i)!==(0,o.resolveEnabled)(t.enabled,this.#i)||r!==this.#p)&&this.#Q(r)}getOptimisticResult(e){var t,s;let i=this.#e.getQueryCache().build(this.#e,e),r=this.createResult(i,e);return t=this,s=r,(0,o.shallowEqualObjects)(t.getCurrentResult(),s)||(this.#n=r,this.#o=this.options,this.#a=this.#i.state),r}getCurrentResult(){return this.#n}trackResult(e,t){return new Proxy(e,{get:(e,s)=>(this.trackProp(s),t?.(s),"promise"===s&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#s.status||this.#s.reject(Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,s))})}trackProp(e){this.#y.add(e)}getCurrentQuery(){return this.#i}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),s=this.#e.getQueryCache().build(this.#e,t);return s.fetch().then(()=>this.createResult(s,t))}fetch(e){return this.#f({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#f(e){this.#b();let t=this.#i.fetch(this.options,e);return e?.throwOnError||(t=t.catch(o.noop)),t}#k(){this.#v();let e=(0,o.resolveStaleTime)(this.options.staleTime,this.#i);if(o.isServer||this.#n.isStale||!(0,o.isValidTimeout)(e))return;let t=(0,o.timeUntilStale)(this.#n.dataUpdatedAt,e);this.#h=u.timeoutManager.setTimeout(()=>{this.#n.isStale||this.updateResult()},t+1)}#w(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#i):this.options.refetchInterval)??!1}#Q(e){this.#g(),this.#p=e,!o.isServer&&!1!==(0,o.resolveEnabled)(this.options.enabled,this.#i)&&(0,o.isValidTimeout)(this.#p)&&0!==this.#p&&(this.#d=u.timeoutManager.setInterval(()=>{(this.options.refetchIntervalInBackground||s.focusManager.isFocused())&&this.#f()},this.#p))}#m(){this.#k(),this.#Q(this.#w())}#v(){this.#h&&(u.timeoutManager.clearTimeout(this.#h),this.#h=void 0)}#g(){this.#d&&(u.timeoutManager.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let s,i=this.#i,n=this.options,u=this.#n,c=this.#a,h=this.#o,y=e!==i?e.state:this.#r,{state:f}=e,m={...f},v=!1;if(t._optimisticResults){let s=this.hasListeners(),a=!s&&l(e,t),o=s&&d(e,i,t,n);(a||o)&&(m={...m,...(0,r.fetchState)(f.data,e.options)}),"isRestoring"===t._optimisticResults&&(m.fetchStatus="idle")}let{error:g,errorUpdatedAt:b,status:k}=m;s=m.data;let w=!1;if(void 0!==t.placeholderData&&void 0===s&&"pending"===k){let e;u?.isPlaceholderData&&t.placeholderData===h?.placeholderData?(e=u.data,w=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,void 0!==e&&(k="success",s=(0,o.replaceData)(u?.data,e,t),v=!0)}if(t.select&&void 0!==s&&!w)if(u&&s===c?.data&&t.select===this.#u)s=this.#c;else try{this.#u=t.select,s=t.select(s),s=(0,o.replaceData)(u?.data,s,t),this.#c=s,this.#t=null}catch(e){this.#t=e}this.#t&&(g=this.#t,s=this.#c,b=Date.now(),k="error");let Q="fetching"===m.fetchStatus,R="pending"===k,S="error"===k,C=R&&Q,T=void 0!==s,x={status:k,fetchStatus:m.fetchStatus,isPending:R,isSuccess:"success"===k,isError:S,isInitialLoading:C,isLoading:C,data:s,dataUpdatedAt:m.dataUpdatedAt,error:g,errorUpdatedAt:b,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>y.dataUpdateCount||m.errorUpdateCount>y.errorUpdateCount,isFetching:Q,isRefetching:Q&&!R,isLoadingError:S&&!T,isPaused:"paused"===m.fetchStatus,isPlaceholderData:v,isRefetchError:S&&T,isStale:p(e,t),refetch:this.refetch,promise:this.#s,isEnabled:!1!==(0,o.resolveEnabled)(t.enabled,e)};if(this.options.experimental_prefetchInRender){let t=void 0!==x.data,s="error"===x.status&&!t,r=e=>{s?e.reject(x.error):t&&e.resolve(x.data)},n=()=>{r(this.#s=x.promise=(0,a.pendingThenable)())},o=this.#s;switch(o.status){case"pending":e.queryHash===i.queryHash&&r(o);break;case"fulfilled":(s||x.data!==o.value)&&n();break;case"rejected":s&&x.error===o.reason||n()}}return x}updateResult(){let e=this.#n,t=this.createResult(this.#i,this.options);if(this.#a=this.#i.state,this.#o=this.options,void 0!==this.#a.data&&(this.#l=this.#i),(0,o.shallowEqualObjects)(t,e))return;this.#n=t;let s=()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,s="function"==typeof t?t():t;if("all"===s||!s&&!this.#y.size)return!0;let i=new Set(s??this.#y);return this.options.throwOnError&&i.add("error"),Object.keys(this.#n).some(t=>this.#n[t]!==e[t]&&i.has(t))};this.#R({listeners:s()})}#b(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#i)return;let t=this.#i;this.#i=e,this.#r=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#m()}#R(e){i.notifyManager.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#n)}),this.#e.getQueryCache().notify({query:this.#i,type:"observerResultsUpdated"})})}};function l(e,t){return!1!==(0,o.resolveEnabled)(t.enabled,e)&&void 0===e.state.data&&("error"!==e.state.status||!1!==t.retryOnMount)||void 0!==e.state.data&&h(e,t,t.refetchOnMount)}function h(e,t,s){if(!1!==(0,o.resolveEnabled)(t.enabled,e)&&"static"!==(0,o.resolveStaleTime)(t.staleTime,e)){let i="function"==typeof s?s(e):s;return"always"===i||!1!==i&&p(e,t)}return!1}function d(e,t,s,i){return(e!==t||!1===(0,o.resolveEnabled)(i.enabled,e))&&(!s.suspense||"error"!==e.state.status)&&p(e,s)}function p(e,t){return!1!==(0,o.resolveEnabled)(t.enabled,e)&&e.isStaleByTime((0,o.resolveStaleTime)(t.staleTime,e))}e.i(247167);var y=e.i(271645),f=e.i(912598);e.i(843476);var m=y.createContext((t=!1,{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t})),v=y.createContext(!1);v.Provider;var g=(e,t,s)=>t.fetchOptimistic(e).catch(()=>{s.clearReset()});function b(e,t){return function(e,t,s){let r,n=y.useContext(v),a=y.useContext(m),u=(0,f.useQueryClient)(s),c=u.defaultQueryOptions(e);u.getDefaultOptions().queries?._experimental_beforeQuery?.(c);let l=u.getQueryCache().get(c.queryHash);if(c._optimisticResults=n?"isRestoring":"optimistic",c.suspense){let e=e=>"static"===e?e:Math.max(e??1e3,1e3),t=c.staleTime;c.staleTime="function"==typeof t?(...s)=>e(t(...s)):e(t),"number"==typeof c.gcTime&&(c.gcTime=Math.max(c.gcTime,1e3))}r=l?.state.error&&"function"==typeof c.throwOnError?(0,o.shouldThrowError)(c.throwOnError,[l.state.error,l]):c.throwOnError,(c.suspense||c.experimental_prefetchInRender||r)&&!a.isReset()&&(c.retryOnMount=!1),y.useEffect(()=>{a.clearReset()},[a]);let h=!u.getQueryCache().get(c.queryHash),[d]=y.useState(()=>new t(u,c)),p=d.getOptimisticResult(c),b=!n&&!1!==e.subscribed;if(y.useSyncExternalStore(y.useCallback(e=>{let t=b?d.subscribe(i.notifyManager.batchCalls(e)):o.noop;return d.updateResult(),t},[d,b]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),y.useEffect(()=>{d.setOptions(c)},[c,d]),c?.suspense&&p.isPending)throw g(c,d,a);if((({result:e,errorResetBoundary:t,throwOnError:s,query:i,suspense:r})=>e.isError&&!t.isReset()&&!e.isFetching&&i&&(r&&void 0===e.data||(0,o.shouldThrowError)(s,[e.error,i])))({result:p,errorResetBoundary:a,throwOnError:c.throwOnError,query:l,suspense:c.suspense}))throw p.error;if(u.getDefaultOptions().queries?._experimental_afterQuery?.(c,p),c.experimental_prefetchInRender&&!o.isServer&&p.isLoading&&p.isFetching&&!n){let e=h?g(c,d,a):l?.promise;e?.catch(o.noop).finally(()=>{d.updateResult()})}return c.notifyOnChangeProps?p:d.trackResult(p)}(e,c,t)}e.s(["useQuery",()=>b],266027);var k=e.i(114272),w=n,Q=class extends w.Subscribable{#e;#n=void 0;#S;#C;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#T()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,o.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#S,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,o.hashKey)(t.mutationKey)!==(0,o.hashKey)(this.options.mutationKey)?this.reset():this.#S?.state.status==="pending"&&this.#S.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#S?.removeObserver(this)}onMutationUpdate(e){this.#T(),this.#R(e)}getCurrentResult(){return this.#n}reset(){this.#S?.removeObserver(this),this.#S=void 0,this.#T(),this.#R()}mutate(e,t){return this.#C=t,this.#S?.removeObserver(this),this.#S=this.#e.getMutationCache().build(this.#e,this.options),this.#S.addObserver(this),this.#S.execute(e)}#T(){let e=this.#S?.state??(0,k.getDefaultState)();this.#n={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#R(e){i.notifyManager.batch(()=>{if(this.#C&&this.hasListeners()){let t=this.#n.variables,s=this.#n.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#C.onSuccess?.(e.data,t,s,i)}catch(e){Promise.reject(e)}try{this.#C.onSettled?.(e.data,null,t,s,i)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#C.onError?.(e.error,t,s,i)}catch(e){Promise.reject(e)}try{this.#C.onSettled?.(void 0,e.error,t,s,i)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#n)})})}};function R(e,t){let s=(0,f.useQueryClient)(t),[r]=y.useState(()=>new Q(s,e));y.useEffect(()=>{r.setOptions(e)},[r,e]);let n=y.useSyncExternalStore(y.useCallback(e=>r.subscribe(i.notifyManager.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=y.useCallback((e,t)=>{r.mutate(e,t).catch(o.noop)},[r]);if(n.error&&(0,o.shouldThrowError)(r.options.throwOnError,[n.error]))throw n.error;return{...n,mutate:a,mutateAsync:n.mutate}}e.s(["useMutation",()=>R],954616)},203999,e=>{"use strict";var t=e.i(266027),s=e.i(954616),i=e.i(912598),r=e.i(209165);function n(e={}){return(0,t.useQuery)({queryKey:["sessions",e],queryFn:async()=>{let t=new URLSearchParams;return e.projectId&&t.set("projectId",e.projectId),void 0!==e.starred&&t.set("starred",String(e.starred)),e.search&&t.set("search",e.search),e.agentType&&t.set("agentType",e.agentType),e.sortBy&&t.set("sortBy",e.sortBy),e.sortDir&&t.set("sortDir",e.sortDir),void 0!==e.offset&&t.set("offset",String(e.offset)),void 0!==e.limit&&t.set("limit",String(e.limit)),"all"===e.nodeFilter&&t.set("nodes","all"),(await fetch((0,r.api)(`/api/sessions?${t}`))).json()}})}function a(e){return(0,t.useQuery)({queryKey:["session",e],queryFn:async()=>{let t=await fetch((0,r.api)(`/api/sessions/${e}`));if(!t.ok)throw Error("Session not found");return t.json()},enabled:!!e})}function o(e,s=0,i=50,n){return(0,t.useQuery)({queryKey:["messages",e,s,i,n],queryFn:async()=>{let t=n?(0,r.api)(`/api/network/proxy/${n}/sessions/${e}/messages?offset=${s}&limit=${i}`):(0,r.api)(`/api/sessions/${e}/messages?offset=${s}&limit=${i}`);return(await fetch(t)).json()},enabled:!!e})}function u(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>(await fetch((0,r.api)(`/api/sessions/${e}`),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"star"})})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["sessions"]}),e.invalidateQueries({queryKey:["session"]})}})}function c(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async({sessionId:e,notes:t})=>(await fetch((0,r.api)(`/api/sessions/${e}`),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"notes",notes:t})})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["session"]})}})}function l(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async({sessionId:e,tagName:t})=>(await fetch((0,r.api)(`/api/sessions/${e}`),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"tag",tagName:t})})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["sessions"]}),e.invalidateQueries({queryKey:["session"]}),e.invalidateQueries({queryKey:["tags"]})}})}function h(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async({sessionId:e,tagName:t})=>(await fetch((0,r.api)(`/api/sessions/${e}`),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"removeTag",tagName:t})})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["sessions"]}),e.invalidateQueries({queryKey:["session"]}),e.invalidateQueries({queryKey:["tags"]})}})}function d(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async({sessionId:e,name:t})=>(await fetch((0,r.api)(`/api/sessions/${e}`),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"rename",name:t})})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["sessions"]}),e.invalidateQueries({queryKey:["session"]})}})}function p(){return(0,t.useQuery)({queryKey:["tags"],queryFn:async()=>(await fetch((0,r.api)("/api/tags"))).json()})}function y(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>(await fetch((0,r.api)("/api/tags"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"delete",tagId:e})})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["tags"]}),e.invalidateQueries({queryKey:["sessions"]}),e.invalidateQueries({queryKey:["session"]})}})}function f(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async({tagId:e,color:t})=>(await fetch((0,r.api)("/api/tags"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"updateColor",tagId:e,color:t})})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["tags"]}),e.invalidateQueries({queryKey:["sessions"]}),e.invalidateQueries({queryKey:["session"]})}})}function m(){return(0,t.useQuery)({queryKey:["workspaces"],queryFn:async()=>(await fetch((0,r.api)("/api/workspaces"))).json()})}function v(){return(0,t.useQuery)({queryKey:["workspaces","remote"],queryFn:async()=>(await fetch((0,r.api)("/api/workspaces?nodes=all"))).json()})}function g(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async({workspaceId:e,sessionId:t,nodeId:s,title:i,cwd:n,agentType:a})=>{let o=await fetch((0,r.api)(`/api/workspaces/${e}/sessions`),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:t,nodeId:s,title:i,cwd:n,agentType:a})});if(!o.ok)throw Error("Failed to add session to workspace");return o.json()},onSuccess:()=>{e.invalidateQueries({queryKey:["workspaces"]}),e.invalidateQueries({queryKey:["workspace-sessions"]}),e.invalidateQueries({queryKey:["sessions"]}),e.invalidateQueries({queryKey:["session"]})}})}function b(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async({workspaceId:e,sessionId:t})=>{let s=await fetch((0,r.api)(`/api/workspaces/${e}/sessions`),{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:t})});if(!s.ok)throw Error("Failed to remove session from workspace");return s.json()},onSuccess:()=>{e.invalidateQueries({queryKey:["workspaces"]}),e.invalidateQueries({queryKey:["workspace-sessions"]}),e.invalidateQueries({queryKey:["sessions"]}),e.invalidateQueries({queryKey:["session"]})}})}function k(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>(await fetch((0,r.api)("/api/bulk"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["sessions"]}),e.invalidateQueries({queryKey:["workspaces"]}),e.invalidateQueries({queryKey:["tags"]})}})}function w(){return(0,t.useQuery)({queryKey:["projects"],queryFn:async()=>(await fetch((0,r.api)("/api/projects"))).json()})}function Q(){return(0,t.useQuery)({queryKey:["analytics"],queryFn:async()=>(await fetch((0,r.api)("/api/analytics/overview"))).json()})}function R(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async()=>(await fetch((0,r.api)("/api/sync"),{method:"POST"})).json(),onSuccess:()=>{e.invalidateQueries()}})}e.s(["useAddSessionToWorkspace",()=>g,"useAddTag",()=>l,"useAnalytics",()=>Q,"useBulkAction",()=>k,"useDeleteTag",()=>y,"useMessages",()=>o,"useProjects",()=>w,"useRemoteWorkspaces",()=>v,"useRemoveSessionFromWorkspace",()=>b,"useRemoveTag",()=>h,"useRenameSession",()=>d,"useSession",()=>a,"useSessions",()=>n,"useSync",()=>R,"useTags",()=>p,"useToggleStar",()=>u,"useUpdateNotes",()=>c,"useUpdateTagColor",()=>f,"useWorkspaces",()=>m])},871689,e=>{"use strict";let t=(0,e.i(475254).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",()=>t],871689)},503116,e=>{"use strict";let t=(0,e.i(475254).default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);e.s(["Clock",()=>t],503116)},107233,e=>{"use strict";let t=(0,e.i(475254).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",()=>t],107233)},727612,e=>{"use strict";let t=(0,e.i(475254).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",()=>t],727612)},768407,e=>{"use strict";var t=e.i(266027),s=e.i(954616),i=e.i(912598),r=e.i(209165);function n(){return(0,t.useQuery)({queryKey:["node-identity"],queryFn:async()=>(await fetch((0,r.api)("/api/network/identity"))).json()})}function a(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>(await fetch((0,r.api)("/api/network/identity"),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e})})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["node-identity"]})}})}function o(e=!0){return(0,t.useQuery)({queryKey:["network-nodes"],queryFn:async()=>{let e=await fetch((0,r.api)("/api/network/nodes"));if(!e.ok)return[];let t=await e.json();return Array.isArray(t)?t:[]},enabled:e})}function u(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>{let t=await fetch((0,r.api)("/api/network/nodes"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw Error((await t.json()).error||"Failed to add node");return t.json()},onSuccess:()=>{e.invalidateQueries({queryKey:["network-nodes"]})}})}function c(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>{let t=await fetch((0,r.api)("/api/network/nodes"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:e.url,apiKey:e.apiKey,name:e.name})});if(!t.ok)throw Error((await t.json()).error||"Failed to connect");return t.json()},onSuccess:()=>{e.invalidateQueries({queryKey:["network-nodes"]})}})}function l(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>(await fetch((0,r.api)(`/api/network/nodes/${e}`),{method:"DELETE"})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["network-nodes"]})}})}function h(){return(0,t.useQuery)({queryKey:["network-api-keys"],queryFn:async()=>(await fetch((0,r.api)("/api/network/keys"))).json()})}function d(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>(await fetch((0,r.api)("/api/network/keys"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["network-api-keys"]})}})}function p(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>(await fetch((0,r.api)(`/api/network/keys/${e}`),{method:"DELETE"})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["network-api-keys"]})}})}function y(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async()=>(await fetch((0,r.api)("/api/network/nodes/check"),{method:"POST"})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["network-nodes"]})}})}function f(){return(0,t.useQuery)({queryKey:["connection-requests"],queryFn:async()=>{let e=await fetch((0,r.api)("/api/network/connect-request"));return e.ok?e.json():{incoming:[],outgoing:[]}},refetchInterval:5e3})}function m(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>{let t=await fetch((0,r.api)("/api/network/connect-request"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({_sendRequest:!0,targetNodeId:e.nodeId,targetNodeName:e.nodeName,targetNodeUrl:e.nodeUrl})});if(!t.ok)throw Error((await t.json().catch(()=>({error:"Request failed"}))).error||`Request failed (${t.status})`);return t.json()},onSuccess:()=>{e.invalidateQueries({queryKey:["connection-requests"]})}})}function v(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>{let t=await fetch((0,r.api)(`/api/network/connect-request/${e.id}`),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e.action})});if(!t.ok)throw Error((await t.json().catch(()=>({error:"Failed"}))).error||"Failed to respond");return t.json()},onSuccess:()=>{e.invalidateQueries({queryKey:["connection-requests"]}),e.invalidateQueries({queryKey:["network-nodes"]})}})}e.s(["useAddNode",()=>u,"useApiKeys",()=>h,"useCheckHealth",()=>y,"useConnectDiscoveredNode",()=>c,"useConnectionRequests",()=>f,"useCreateApiKey",()=>d,"useNodeIdentity",()=>n,"useNodes",()=>o,"useRemoveNode",()=>l,"useRespondToRequest",()=>v,"useRevokeApiKey",()=>p,"useSendConnectionRequest",()=>m,"useUpdateNodeName",()=>a])},694351,e=>{"use strict";let t=(0,e.i(475254).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",()=>t],694351)},77705,e=>{"use strict";let t=(0,e.i(475254).default)("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);e.s(["EyeOff",()=>t],77705)},286536,e=>{"use strict";let t=(0,e.i(475254).default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",()=>t],286536)},664659,e=>{"use strict";let t=(0,e.i(475254).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["ChevronDown",()=>t],664659)},463059,e=>{"use strict";let t=(0,e.i(475254).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",()=>t],463059)},514764,e=>{"use strict";let t=(0,e.i(475254).default)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);e.s(["Send",()=>t],514764)},788699,e=>{"use strict";let t=(0,e.i(475254).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(["Pencil",()=>t],788699)},643531,e=>{"use strict";let t=(0,e.i(475254).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Check",()=>t],643531)},174886,e=>{"use strict";let t=(0,e.i(475254).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",()=>t],174886)},868054,e=>{"use strict";let t=(0,e.i(475254).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",()=>t],868054)},178583,e=>{"use strict";let t=(0,e.i(475254).default)("file-text",[["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 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);e.s(["FileText",()=>t],178583)},751975,e=>{"use strict";let t=(0,e.i(475254).default)("tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);e.s(["Tag",()=>t],751975)},655900,e=>{"use strict";let t=(0,e.i(475254).default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s(["ChevronUp",()=>t],655900)},398003,e=>{"use strict";var t=e.i(843476),s=e.i(975157);let i=["#ef4444","#f97316","#f59e0b","#eab308","#84cc16","#22c55e","#14b8a6","#06b6d4","#3b82f6","#6366f1","#8b5cf6","#a855f7","#d946ef","#ec4899","#f43f5e","#78716c"];function r({value:e,onChange:r,className:n}){return(0,t.jsx)("div",{className:(0,s.cn)("grid grid-cols-8 gap-1.5",n),children:i.map(i=>(0,t.jsx)("button",{onClick:()=>r(i),className:(0,s.cn)("w-6 h-6 rounded-full border-2 transition-transform hover:scale-110",e===i?"border-foreground scale-110":"border-transparent"),style:{backgroundColor:i},title:i},i))})}e.s(["ColorPicker",()=>r])},569074,e=>{"use strict";let t=(0,e.i(475254).default)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);e.s(["Upload",()=>t],569074)},387951,687246,e=>{"use strict";var t=e.i(475254);let s=(0,t.default)("mic",[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]]);e.s(["Mic",()=>s],387951);let i=(0,t.default)("mic-off",[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33",key:"1gzdoj"}],["path",{d:"M16.95 16.95A7 7 0 0 1 5 12v-2",key:"cqa7eg"}],["path",{d:"M18.89 13.23A7 7 0 0 0 19 12v-2",key:"16hl24"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12",key:"r2i35w"}]]);e.s(["MicOff",()=>i],687246)},73359,e=>{"use strict";let t={claude:{id:"claude",name:"Claude Code",command:"claude",resumeFlag:"--resume",supportsResume:!0,color:"#d97706",description:"Anthropic Claude Code CLI"},codex:{id:"codex",name:"Codex CLI",command:"codex",resumeFlag:"resume",supportsResume:!0,color:"#10b981",description:"OpenAI Codex CLI"},gemini:{id:"gemini",name:"Gemini CLI",command:"gemini",resumeFlag:"--resume",supportsResume:!0,color:"#3b82f6",description:"Google Gemini CLI"},aider:{id:"aider",name:"Aider",command:"aider",resumeFlag:"",supportsResume:!1,color:"#8b5cf6",description:"AI pair programming in your terminal"},forge:{id:"forge",name:"Forge",command:"forge",resumeFlag:"--cid",supportsResume:!0,color:"#f43f5e",description:"ForgeCode.dev agentic CLI"},copilot:{id:"copilot",name:"Copilot CLI",command:"copilot",resumeFlag:"--resume",supportsResume:!0,color:"#6366f1",description:"GitHub Copilot CLI - agentic coding in your terminal"},pi:{id:"pi",name:"Pi",command:"pi",resumeFlag:"--continue",supportsResume:!0,color:"#f97316",description:"Pi Coding Agent - extensible AI development CLI"},shell:{id:"shell",name:"Shell",command:"",resumeFlag:"",supportsResume:!1,color:"#71717a",description:"Plain terminal shell"},custom:{id:"custom",name:"Custom",command:"",resumeFlag:"",supportsResume:!1,color:"#ec4899",description:"Custom command"}},s=Object.values(t);e.s(["AGENT_LIST",0,s,"AGENT_TYPES",0,t])},534623,e=>{"use strict";var t=e.i(843476),s=e.i(271645),i=e.i(531278),r=e.i(239616),n=e.i(618566),a=e.i(209165),o=e.i(28916);let u="spaces-terminal-token";function c({children:e}){let c=(0,n.useRouter)(),{isDesktop:l,basePath:h}=(0,o.useTier)(),[d,p]=(0,s.useState)("loading"),[y,f]=(0,s.useState)(""),[m,v]=(0,s.useState)(""),[g,b]=(0,s.useState)(""),[k,w]=(0,s.useState)(!1),Q=(0,s.useRef)(null),R=`${h}/spaces_icon.png`;(0,s.useEffect)(()=>{if(l){f("desktop-local"),p("authorized");return}function e(){let e=sessionStorage.getItem(u);if(e){f(e),p("authorized");return}fetch((0,a.api)("/api/auth/totp/status")).then(e=>e.json()).then(e=>{e.enabled?(p("prompt"),setTimeout(()=>Q.current?.focus(),100)):p("not-setup")}).catch(()=>p("not-setup"))}fetch((0,a.api)("/api/auth/me")).then(t=>{if(t.ok){f("session-auth"),p("authorized");return}return e()}).catch(()=>e())},[l]);let S=(0,s.useCallback)(async e=>{if(6!==e.length)return;w(!0),b("");let t=await fetch((0,a.api)("/api/auth/totp/verify"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:e,action:"verify"})}),s=await t.json();w(!1),s.success&&s.terminalToken?(sessionStorage.setItem(u,s.terminalToken),f(s.terminalToken),p("authorized")):(b(s.error||"Invalid code"),v(""),Q.current?.focus())},[]);return"loading"===d?(0,t.jsx)("div",{className:"flex items-center justify-center h-screen bg-zinc-950",children:(0,t.jsx)(i.Loader2,{className:"w-6 h-6 animate-spin text-indigo-500"})}):"authorized"===d?(0,t.jsx)(t.Fragment,{children:e(y)}):"not-setup"===d?(0,t.jsx)("div",{className:"flex items-center justify-center h-screen bg-zinc-950",children:(0,t.jsxs)("div",{className:"text-center space-y-4 max-w-sm",children:[(0,t.jsx)("img",{src:R,alt:"Spaces",className:"w-12 h-12 mx-auto opacity-40"}),(0,t.jsx)("h2",{className:"text-lg font-semibold text-white",children:"2FA Required"}),(0,t.jsx)("p",{className:"text-sm text-zinc-400",children:"Two-factor authentication must be set up before you can use terminals."}),(0,t.jsxs)("button",{onClick:()=>c.push("/settings"),className:"inline-flex items-center gap-2 px-4 py-2 text-sm bg-indigo-600 text-white rounded-md hover:bg-indigo-500",children:[(0,t.jsx)(r.Settings,{className:"w-4 h-4"}),"Go to Settings"]})]})}):(0,t.jsx)("div",{className:"flex items-center justify-center h-screen bg-zinc-950",children:(0,t.jsxs)("div",{className:"text-center space-y-4 max-w-sm",children:[(0,t.jsx)("img",{src:R,alt:"Spaces",className:"w-12 h-12 mx-auto"}),(0,t.jsx)("h2",{className:"text-lg font-semibold text-white",children:"Terminal Verification"}),(0,t.jsx)("p",{className:"text-sm text-zinc-400",children:"Enter the 6-digit code from your authenticator app."}),(0,t.jsxs)("div",{children:[(0,t.jsx)("input",{ref:Q,type:"text",inputMode:"numeric",autoComplete:"one-time-code",placeholder:"000000",value:m,onChange:e=>{let t;v(t=e.target.value.replace(/\D/g,"").slice(0,6)),b(""),6===t.length&&S(t)},disabled:k,className:"w-48 px-3 py-3 text-2xl font-mono tracking-[0.4em] text-center bg-zinc-800 border border-zinc-700 rounded-lg focus:outline-none focus:border-indigo-500 text-white disabled:opacity-50",autoFocus:!0}),k&&(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2 mt-3 text-xs text-zinc-400",children:[(0,t.jsx)(i.Loader2,{className:"w-3 h-3 animate-spin"}),"Verifying..."]}),g&&(0,t.jsx)("p",{className:"text-sm text-red-400 mt-3",children:g})]}),(0,t.jsx)("p",{className:"text-[11px] text-zinc-600",children:"Token is valid for 8 hours after verification."})]})})}e.s(["TotpGate",()=>c])},87309,e=>{"use strict";let t=(0,e.i(475254).default)("audio-lines",[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]]);e.s(["AudioLines",()=>t],87309)},63209,e=>{"use strict";let t=(0,e.i(475254).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(["AlertCircle",()=>t],63209)},116049,e=>{e.v(t=>Promise.all(["static/chunks/bebf086f02319b11.js"].map(t=>e.l(t))).then(()=>t(444908)))},359439,e=>{e.v(t=>Promise.all(["static/chunks/30b061a140b8f71b.js"].map(t=>e.l(t))).then(()=>t(193309)))},816091,e=>{e.v(t=>Promise.all(["static/chunks/7eed72a821b1dbb6.js"].map(t=>e.l(t))).then(()=>t(152216)))}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,531278,e=>{"use strict";let t=(0,e.i(475254).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",()=>t],531278)},266027,954616,e=>{"use strict";let t;var s=e.i(175555),i=e.i(540143),r=e.i(286491),n=e.i(915823),a=e.i(793803),o=e.i(619273),u=e.i(180166),c=class extends n.Subscribable{constructor(e,t){super(),this.options=t,this.#e=e,this.#t=null,this.#s=(0,a.pendingThenable)(),this.bindMethods(),this.setOptions(t)}#e;#i=void 0;#r=void 0;#n=void 0;#a;#o;#s;#t;#u;#c;#l;#h;#d;#p;#y=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#i.addObserver(this),l(this.#i,this.options)?this.#f():this.updateResult(),this.#m())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return h(this.#i,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return h(this.#i,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#v(),this.#g(),this.#i.removeObserver(this)}setOptions(e){let t=this.options,s=this.#i;if(this.options=this.#e.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,o.resolveEnabled)(this.options.enabled,this.#i))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#b(),this.#i.setOptions(this.options),t._defaulted&&!(0,o.shallowEqualObjects)(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#i,observer:this});let i=this.hasListeners();i&&d(this.#i,s,this.options,t)&&this.#f(),this.updateResult(),i&&(this.#i!==s||(0,o.resolveEnabled)(this.options.enabled,this.#i)!==(0,o.resolveEnabled)(t.enabled,this.#i)||(0,o.resolveStaleTime)(this.options.staleTime,this.#i)!==(0,o.resolveStaleTime)(t.staleTime,this.#i))&&this.#k();let r=this.#w();i&&(this.#i!==s||(0,o.resolveEnabled)(this.options.enabled,this.#i)!==(0,o.resolveEnabled)(t.enabled,this.#i)||r!==this.#p)&&this.#Q(r)}getOptimisticResult(e){var t,s;let i=this.#e.getQueryCache().build(this.#e,e),r=this.createResult(i,e);return t=this,s=r,(0,o.shallowEqualObjects)(t.getCurrentResult(),s)||(this.#n=r,this.#o=this.options,this.#a=this.#i.state),r}getCurrentResult(){return this.#n}trackResult(e,t){return new Proxy(e,{get:(e,s)=>(this.trackProp(s),t?.(s),"promise"===s&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#s.status||this.#s.reject(Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,s))})}trackProp(e){this.#y.add(e)}getCurrentQuery(){return this.#i}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),s=this.#e.getQueryCache().build(this.#e,t);return s.fetch().then(()=>this.createResult(s,t))}fetch(e){return this.#f({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#f(e){this.#b();let t=this.#i.fetch(this.options,e);return e?.throwOnError||(t=t.catch(o.noop)),t}#k(){this.#v();let e=(0,o.resolveStaleTime)(this.options.staleTime,this.#i);if(o.isServer||this.#n.isStale||!(0,o.isValidTimeout)(e))return;let t=(0,o.timeUntilStale)(this.#n.dataUpdatedAt,e);this.#h=u.timeoutManager.setTimeout(()=>{this.#n.isStale||this.updateResult()},t+1)}#w(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#i):this.options.refetchInterval)??!1}#Q(e){this.#g(),this.#p=e,!o.isServer&&!1!==(0,o.resolveEnabled)(this.options.enabled,this.#i)&&(0,o.isValidTimeout)(this.#p)&&0!==this.#p&&(this.#d=u.timeoutManager.setInterval(()=>{(this.options.refetchIntervalInBackground||s.focusManager.isFocused())&&this.#f()},this.#p))}#m(){this.#k(),this.#Q(this.#w())}#v(){this.#h&&(u.timeoutManager.clearTimeout(this.#h),this.#h=void 0)}#g(){this.#d&&(u.timeoutManager.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let s,i=this.#i,n=this.options,u=this.#n,c=this.#a,h=this.#o,y=e!==i?e.state:this.#r,{state:f}=e,m={...f},v=!1;if(t._optimisticResults){let s=this.hasListeners(),a=!s&&l(e,t),o=s&&d(e,i,t,n);(a||o)&&(m={...m,...(0,r.fetchState)(f.data,e.options)}),"isRestoring"===t._optimisticResults&&(m.fetchStatus="idle")}let{error:g,errorUpdatedAt:b,status:k}=m;s=m.data;let w=!1;if(void 0!==t.placeholderData&&void 0===s&&"pending"===k){let e;u?.isPlaceholderData&&t.placeholderData===h?.placeholderData?(e=u.data,w=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,void 0!==e&&(k="success",s=(0,o.replaceData)(u?.data,e,t),v=!0)}if(t.select&&void 0!==s&&!w)if(u&&s===c?.data&&t.select===this.#u)s=this.#c;else try{this.#u=t.select,s=t.select(s),s=(0,o.replaceData)(u?.data,s,t),this.#c=s,this.#t=null}catch(e){this.#t=e}this.#t&&(g=this.#t,s=this.#c,b=Date.now(),k="error");let Q="fetching"===m.fetchStatus,R="pending"===k,S="error"===k,C=R&&Q,T=void 0!==s,x={status:k,fetchStatus:m.fetchStatus,isPending:R,isSuccess:"success"===k,isError:S,isInitialLoading:C,isLoading:C,data:s,dataUpdatedAt:m.dataUpdatedAt,error:g,errorUpdatedAt:b,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>y.dataUpdateCount||m.errorUpdateCount>y.errorUpdateCount,isFetching:Q,isRefetching:Q&&!R,isLoadingError:S&&!T,isPaused:"paused"===m.fetchStatus,isPlaceholderData:v,isRefetchError:S&&T,isStale:p(e,t),refetch:this.refetch,promise:this.#s,isEnabled:!1!==(0,o.resolveEnabled)(t.enabled,e)};if(this.options.experimental_prefetchInRender){let t=void 0!==x.data,s="error"===x.status&&!t,r=e=>{s?e.reject(x.error):t&&e.resolve(x.data)},n=()=>{r(this.#s=x.promise=(0,a.pendingThenable)())},o=this.#s;switch(o.status){case"pending":e.queryHash===i.queryHash&&r(o);break;case"fulfilled":(s||x.data!==o.value)&&n();break;case"rejected":s&&x.error===o.reason||n()}}return x}updateResult(){let e=this.#n,t=this.createResult(this.#i,this.options);if(this.#a=this.#i.state,this.#o=this.options,void 0!==this.#a.data&&(this.#l=this.#i),(0,o.shallowEqualObjects)(t,e))return;this.#n=t;let s=()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,s="function"==typeof t?t():t;if("all"===s||!s&&!this.#y.size)return!0;let i=new Set(s??this.#y);return this.options.throwOnError&&i.add("error"),Object.keys(this.#n).some(t=>this.#n[t]!==e[t]&&i.has(t))};this.#R({listeners:s()})}#b(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#i)return;let t=this.#i;this.#i=e,this.#r=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#m()}#R(e){i.notifyManager.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#n)}),this.#e.getQueryCache().notify({query:this.#i,type:"observerResultsUpdated"})})}};function l(e,t){return!1!==(0,o.resolveEnabled)(t.enabled,e)&&void 0===e.state.data&&("error"!==e.state.status||!1!==t.retryOnMount)||void 0!==e.state.data&&h(e,t,t.refetchOnMount)}function h(e,t,s){if(!1!==(0,o.resolveEnabled)(t.enabled,e)&&"static"!==(0,o.resolveStaleTime)(t.staleTime,e)){let i="function"==typeof s?s(e):s;return"always"===i||!1!==i&&p(e,t)}return!1}function d(e,t,s,i){return(e!==t||!1===(0,o.resolveEnabled)(i.enabled,e))&&(!s.suspense||"error"!==e.state.status)&&p(e,s)}function p(e,t){return!1!==(0,o.resolveEnabled)(t.enabled,e)&&e.isStaleByTime((0,o.resolveStaleTime)(t.staleTime,e))}e.i(247167);var y=e.i(271645),f=e.i(912598);e.i(843476);var m=y.createContext((t=!1,{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t})),v=y.createContext(!1);v.Provider;var g=(e,t,s)=>t.fetchOptimistic(e).catch(()=>{s.clearReset()});function b(e,t){return function(e,t,s){let r,n=y.useContext(v),a=y.useContext(m),u=(0,f.useQueryClient)(s),c=u.defaultQueryOptions(e);u.getDefaultOptions().queries?._experimental_beforeQuery?.(c);let l=u.getQueryCache().get(c.queryHash);if(c._optimisticResults=n?"isRestoring":"optimistic",c.suspense){let e=e=>"static"===e?e:Math.max(e??1e3,1e3),t=c.staleTime;c.staleTime="function"==typeof t?(...s)=>e(t(...s)):e(t),"number"==typeof c.gcTime&&(c.gcTime=Math.max(c.gcTime,1e3))}r=l?.state.error&&"function"==typeof c.throwOnError?(0,o.shouldThrowError)(c.throwOnError,[l.state.error,l]):c.throwOnError,(c.suspense||c.experimental_prefetchInRender||r)&&!a.isReset()&&(c.retryOnMount=!1),y.useEffect(()=>{a.clearReset()},[a]);let h=!u.getQueryCache().get(c.queryHash),[d]=y.useState(()=>new t(u,c)),p=d.getOptimisticResult(c),b=!n&&!1!==e.subscribed;if(y.useSyncExternalStore(y.useCallback(e=>{let t=b?d.subscribe(i.notifyManager.batchCalls(e)):o.noop;return d.updateResult(),t},[d,b]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),y.useEffect(()=>{d.setOptions(c)},[c,d]),c?.suspense&&p.isPending)throw g(c,d,a);if((({result:e,errorResetBoundary:t,throwOnError:s,query:i,suspense:r})=>e.isError&&!t.isReset()&&!e.isFetching&&i&&(r&&void 0===e.data||(0,o.shouldThrowError)(s,[e.error,i])))({result:p,errorResetBoundary:a,throwOnError:c.throwOnError,query:l,suspense:c.suspense}))throw p.error;if(u.getDefaultOptions().queries?._experimental_afterQuery?.(c,p),c.experimental_prefetchInRender&&!o.isServer&&p.isLoading&&p.isFetching&&!n){let e=h?g(c,d,a):l?.promise;e?.catch(o.noop).finally(()=>{d.updateResult()})}return c.notifyOnChangeProps?p:d.trackResult(p)}(e,c,t)}e.s(["useQuery",()=>b],266027);var k=e.i(114272),w=n,Q=class extends w.Subscribable{#e;#n=void 0;#S;#C;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#T()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,o.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#S,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,o.hashKey)(t.mutationKey)!==(0,o.hashKey)(this.options.mutationKey)?this.reset():this.#S?.state.status==="pending"&&this.#S.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#S?.removeObserver(this)}onMutationUpdate(e){this.#T(),this.#R(e)}getCurrentResult(){return this.#n}reset(){this.#S?.removeObserver(this),this.#S=void 0,this.#T(),this.#R()}mutate(e,t){return this.#C=t,this.#S?.removeObserver(this),this.#S=this.#e.getMutationCache().build(this.#e,this.options),this.#S.addObserver(this),this.#S.execute(e)}#T(){let e=this.#S?.state??(0,k.getDefaultState)();this.#n={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#R(e){i.notifyManager.batch(()=>{if(this.#C&&this.hasListeners()){let t=this.#n.variables,s=this.#n.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#C.onSuccess?.(e.data,t,s,i)}catch(e){Promise.reject(e)}try{this.#C.onSettled?.(e.data,null,t,s,i)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#C.onError?.(e.error,t,s,i)}catch(e){Promise.reject(e)}try{this.#C.onSettled?.(void 0,e.error,t,s,i)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#n)})})}};function R(e,t){let s=(0,f.useQueryClient)(t),[r]=y.useState(()=>new Q(s,e));y.useEffect(()=>{r.setOptions(e)},[r,e]);let n=y.useSyncExternalStore(y.useCallback(e=>r.subscribe(i.notifyManager.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=y.useCallback((e,t)=>{r.mutate(e,t).catch(o.noop)},[r]);if(n.error&&(0,o.shouldThrowError)(r.options.throwOnError,[n.error]))throw n.error;return{...n,mutate:a,mutateAsync:n.mutate}}e.s(["useMutation",()=>R],954616)},203999,e=>{"use strict";var t=e.i(266027),s=e.i(954616),i=e.i(912598),r=e.i(209165);function n(e={}){return(0,t.useQuery)({queryKey:["sessions",e],queryFn:async()=>{let t=new URLSearchParams;return e.projectId&&t.set("projectId",e.projectId),void 0!==e.starred&&t.set("starred",String(e.starred)),e.search&&t.set("search",e.search),e.agentType&&t.set("agentType",e.agentType),e.sortBy&&t.set("sortBy",e.sortBy),e.sortDir&&t.set("sortDir",e.sortDir),void 0!==e.offset&&t.set("offset",String(e.offset)),void 0!==e.limit&&t.set("limit",String(e.limit)),"all"===e.nodeFilter&&t.set("nodes","all"),(await fetch((0,r.api)(`/api/sessions?${t}`))).json()}})}function a(e){return(0,t.useQuery)({queryKey:["session",e],queryFn:async()=>{let t=await fetch((0,r.api)(`/api/sessions/${e}`));if(!t.ok)throw Error("Session not found");return t.json()},enabled:!!e})}function o(e,s=0,i=50,n){return(0,t.useQuery)({queryKey:["messages",e,s,i,n],queryFn:async()=>{let t=n?(0,r.api)(`/api/network/proxy/${n}/sessions/${e}/messages?offset=${s}&limit=${i}`):(0,r.api)(`/api/sessions/${e}/messages?offset=${s}&limit=${i}`);return(await fetch(t)).json()},enabled:!!e})}function u(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>(await fetch((0,r.api)(`/api/sessions/${e}`),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"star"})})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["sessions"]}),e.invalidateQueries({queryKey:["session"]})}})}function c(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async({sessionId:e,notes:t})=>(await fetch((0,r.api)(`/api/sessions/${e}`),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"notes",notes:t})})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["session"]})}})}function l(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async({sessionId:e,tagName:t})=>(await fetch((0,r.api)(`/api/sessions/${e}`),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"tag",tagName:t})})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["sessions"]}),e.invalidateQueries({queryKey:["session"]}),e.invalidateQueries({queryKey:["tags"]})}})}function h(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async({sessionId:e,tagName:t})=>(await fetch((0,r.api)(`/api/sessions/${e}`),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"removeTag",tagName:t})})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["sessions"]}),e.invalidateQueries({queryKey:["session"]}),e.invalidateQueries({queryKey:["tags"]})}})}function d(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async({sessionId:e,name:t})=>(await fetch((0,r.api)(`/api/sessions/${e}`),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"rename",name:t})})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["sessions"]}),e.invalidateQueries({queryKey:["session"]})}})}function p(){return(0,t.useQuery)({queryKey:["tags"],queryFn:async()=>(await fetch((0,r.api)("/api/tags"))).json()})}function y(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>(await fetch((0,r.api)("/api/tags"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"delete",tagId:e})})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["tags"]}),e.invalidateQueries({queryKey:["sessions"]}),e.invalidateQueries({queryKey:["session"]})}})}function f(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async({tagId:e,color:t})=>(await fetch((0,r.api)("/api/tags"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"updateColor",tagId:e,color:t})})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["tags"]}),e.invalidateQueries({queryKey:["sessions"]}),e.invalidateQueries({queryKey:["session"]})}})}function m(){return(0,t.useQuery)({queryKey:["workspaces"],queryFn:async()=>(await fetch((0,r.api)("/api/workspaces"))).json()})}function v(){return(0,t.useQuery)({queryKey:["workspaces","remote"],queryFn:async()=>(await fetch((0,r.api)("/api/workspaces?nodes=all"))).json()})}function g(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async({workspaceId:e,sessionId:t,nodeId:s,title:i,cwd:n,agentType:a})=>{let o=await fetch((0,r.api)(`/api/workspaces/${e}/sessions`),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:t,nodeId:s,title:i,cwd:n,agentType:a})});if(!o.ok)throw Error("Failed to add session to workspace");return o.json()},onSuccess:()=>{e.invalidateQueries({queryKey:["workspaces"]}),e.invalidateQueries({queryKey:["workspace-sessions"]}),e.invalidateQueries({queryKey:["sessions"]}),e.invalidateQueries({queryKey:["session"]})}})}function b(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async({workspaceId:e,sessionId:t})=>{let s=await fetch((0,r.api)(`/api/workspaces/${e}/sessions`),{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:t})});if(!s.ok)throw Error("Failed to remove session from workspace");return s.json()},onSuccess:()=>{e.invalidateQueries({queryKey:["workspaces"]}),e.invalidateQueries({queryKey:["workspace-sessions"]}),e.invalidateQueries({queryKey:["sessions"]}),e.invalidateQueries({queryKey:["session"]})}})}function k(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>(await fetch((0,r.api)("/api/bulk"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["sessions"]}),e.invalidateQueries({queryKey:["workspaces"]}),e.invalidateQueries({queryKey:["tags"]})}})}function w(){return(0,t.useQuery)({queryKey:["projects"],queryFn:async()=>(await fetch((0,r.api)("/api/projects"))).json()})}function Q(){return(0,t.useQuery)({queryKey:["analytics"],queryFn:async()=>(await fetch((0,r.api)("/api/analytics/overview"))).json()})}function R(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async()=>(await fetch((0,r.api)("/api/sync"),{method:"POST"})).json(),onSuccess:()=>{e.invalidateQueries()}})}e.s(["useAddSessionToWorkspace",()=>g,"useAddTag",()=>l,"useAnalytics",()=>Q,"useBulkAction",()=>k,"useDeleteTag",()=>y,"useMessages",()=>o,"useProjects",()=>w,"useRemoteWorkspaces",()=>v,"useRemoveSessionFromWorkspace",()=>b,"useRemoveTag",()=>h,"useRenameSession",()=>d,"useSession",()=>a,"useSessions",()=>n,"useSync",()=>R,"useTags",()=>p,"useToggleStar",()=>u,"useUpdateNotes",()=>c,"useUpdateTagColor",()=>f,"useWorkspaces",()=>m])},871689,e=>{"use strict";let t=(0,e.i(475254).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",()=>t],871689)},503116,e=>{"use strict";let t=(0,e.i(475254).default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);e.s(["Clock",()=>t],503116)},107233,e=>{"use strict";let t=(0,e.i(475254).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",()=>t],107233)},727612,e=>{"use strict";let t=(0,e.i(475254).default)("trash-2",[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]]);e.s(["Trash2",()=>t],727612)},768407,e=>{"use strict";var t=e.i(266027),s=e.i(954616),i=e.i(912598),r=e.i(209165);function n(){return(0,t.useQuery)({queryKey:["node-identity"],queryFn:async()=>(await fetch((0,r.api)("/api/network/identity"))).json()})}function a(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>(await fetch((0,r.api)("/api/network/identity"),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e})})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["node-identity"]})}})}function o(e=!0){return(0,t.useQuery)({queryKey:["network-nodes"],queryFn:async()=>{let e=await fetch((0,r.api)("/api/network/nodes"));if(!e.ok)return[];let t=await e.json();return Array.isArray(t)?t:[]},enabled:e})}function u(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>{let t=await fetch((0,r.api)("/api/network/nodes"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw Error((await t.json()).error||"Failed to add node");return t.json()},onSuccess:()=>{e.invalidateQueries({queryKey:["network-nodes"]})}})}function c(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>{let t=await fetch((0,r.api)("/api/network/nodes"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:e.url,apiKey:e.apiKey,name:e.name})});if(!t.ok)throw Error((await t.json()).error||"Failed to connect");return t.json()},onSuccess:()=>{e.invalidateQueries({queryKey:["network-nodes"]})}})}function l(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>(await fetch((0,r.api)(`/api/network/nodes/${e}`),{method:"DELETE"})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["network-nodes"]})}})}function h(){return(0,t.useQuery)({queryKey:["network-api-keys"],queryFn:async()=>(await fetch((0,r.api)("/api/network/keys"))).json()})}function d(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>(await fetch((0,r.api)("/api/network/keys"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["network-api-keys"]})}})}function p(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>(await fetch((0,r.api)(`/api/network/keys/${e}`),{method:"DELETE"})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["network-api-keys"]})}})}function y(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async()=>(await fetch((0,r.api)("/api/network/nodes/check"),{method:"POST"})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["network-nodes"]})}})}function f(){return(0,t.useQuery)({queryKey:["connection-requests"],queryFn:async()=>{let e=await fetch((0,r.api)("/api/network/connect-request"));return e.ok?e.json():{incoming:[],outgoing:[]}},refetchInterval:5e3})}function m(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>{let t=await fetch((0,r.api)("/api/network/connect-request"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({_sendRequest:!0,targetNodeId:e.nodeId,targetNodeName:e.nodeName,targetNodeUrl:e.nodeUrl})});if(!t.ok)throw Error((await t.json().catch(()=>({error:"Request failed"}))).error||`Request failed (${t.status})`);return t.json()},onSuccess:()=>{e.invalidateQueries({queryKey:["connection-requests"]})}})}function v(){let e=(0,i.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>{let t=await fetch((0,r.api)(`/api/network/connect-request/${e.id}`),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:e.action})});if(!t.ok)throw Error((await t.json().catch(()=>({error:"Failed"}))).error||"Failed to respond");return t.json()},onSuccess:()=>{e.invalidateQueries({queryKey:["connection-requests"]}),e.invalidateQueries({queryKey:["network-nodes"]})}})}e.s(["useAddNode",()=>u,"useApiKeys",()=>h,"useCheckHealth",()=>y,"useConnectDiscoveredNode",()=>c,"useConnectionRequests",()=>f,"useCreateApiKey",()=>d,"useNodeIdentity",()=>n,"useNodes",()=>o,"useRemoveNode",()=>l,"useRespondToRequest",()=>v,"useRevokeApiKey",()=>p,"useSendConnectionRequest",()=>m,"useUpdateNodeName",()=>a])},694351,e=>{"use strict";let t=(0,e.i(475254).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",()=>t],694351)},77705,e=>{"use strict";let t=(0,e.i(475254).default)("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);e.s(["EyeOff",()=>t],77705)},39312,e=>{"use strict";let t=(0,e.i(475254).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",()=>t],39312)},204997,e=>{"use strict";let t=(0,e.i(475254).default)("log-in",[["path",{d:"m10 17 5-5-5-5",key:"1bsop3"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}]]);e.s(["LogIn",()=>t],204997)},286536,e=>{"use strict";let t=(0,e.i(475254).default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Eye",()=>t],286536)},664659,e=>{"use strict";let t=(0,e.i(475254).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["ChevronDown",()=>t],664659)},463059,e=>{"use strict";let t=(0,e.i(475254).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",()=>t],463059)},514764,e=>{"use strict";let t=(0,e.i(475254).default)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);e.s(["Send",()=>t],514764)},788699,e=>{"use strict";let t=(0,e.i(475254).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(["Pencil",()=>t],788699)},643531,e=>{"use strict";let t=(0,e.i(475254).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Check",()=>t],643531)},174886,e=>{"use strict";let t=(0,e.i(475254).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",()=>t],174886)},868054,e=>{"use strict";let t=(0,e.i(475254).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",()=>t],868054)},178583,e=>{"use strict";let t=(0,e.i(475254).default)("file-text",[["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 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);e.s(["FileText",()=>t],178583)},751975,e=>{"use strict";let t=(0,e.i(475254).default)("tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);e.s(["Tag",()=>t],751975)},655900,e=>{"use strict";let t=(0,e.i(475254).default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s(["ChevronUp",()=>t],655900)},398003,e=>{"use strict";var t=e.i(843476),s=e.i(975157);let i=["#ef4444","#f97316","#f59e0b","#eab308","#84cc16","#22c55e","#14b8a6","#06b6d4","#3b82f6","#6366f1","#8b5cf6","#a855f7","#d946ef","#ec4899","#f43f5e","#78716c"];function r({value:e,onChange:r,className:n}){return(0,t.jsx)("div",{className:(0,s.cn)("grid grid-cols-8 gap-1.5",n),children:i.map(i=>(0,t.jsx)("button",{onClick:()=>r(i),className:(0,s.cn)("w-6 h-6 rounded-full border-2 transition-transform hover:scale-110",e===i?"border-foreground scale-110":"border-transparent"),style:{backgroundColor:i},title:i},i))})}e.s(["ColorPicker",()=>r])},569074,e=>{"use strict";let t=(0,e.i(475254).default)("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);e.s(["Upload",()=>t],569074)},387951,687246,e=>{"use strict";var t=e.i(475254);let s=(0,t.default)("mic",[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]]);e.s(["Mic",()=>s],387951);let i=(0,t.default)("mic-off",[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33",key:"1gzdoj"}],["path",{d:"M16.95 16.95A7 7 0 0 1 5 12v-2",key:"cqa7eg"}],["path",{d:"M18.89 13.23A7 7 0 0 0 19 12v-2",key:"16hl24"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12",key:"r2i35w"}]]);e.s(["MicOff",()=>i],687246)},73359,e=>{"use strict";let t={claude:{id:"claude",name:"Claude Code",command:"claude",resumeFlag:"--resume",supportsResume:!0,color:"#d97706",description:"Anthropic Claude Code CLI"},codex:{id:"codex",name:"Codex CLI",command:"codex",resumeFlag:"resume",supportsResume:!0,color:"#10b981",description:"OpenAI Codex CLI"},gemini:{id:"gemini",name:"Gemini CLI",command:"gemini",resumeFlag:"--resume",supportsResume:!0,color:"#3b82f6",description:"Google Gemini CLI"},aider:{id:"aider",name:"Aider",command:"aider",resumeFlag:"",supportsResume:!1,color:"#8b5cf6",description:"AI pair programming in your terminal"},forge:{id:"forge",name:"Forge",command:"forge",resumeFlag:"--cid",supportsResume:!0,color:"#f43f5e",description:"ForgeCode.dev agentic CLI"},copilot:{id:"copilot",name:"Copilot CLI",command:"copilot",resumeFlag:"--resume",supportsResume:!0,color:"#6366f1",description:"GitHub Copilot CLI - agentic coding in your terminal"},pi:{id:"pi",name:"Pi",command:"pi",resumeFlag:"--continue",supportsResume:!0,color:"#f97316",description:"Pi Coding Agent - extensible AI development CLI"},shell:{id:"shell",name:"Shell",command:"",resumeFlag:"",supportsResume:!1,color:"#71717a",description:"Plain terminal shell"},custom:{id:"custom",name:"Custom",command:"",resumeFlag:"",supportsResume:!1,color:"#ec4899",description:"Custom command"}},s=Object.values(t);e.s(["AGENT_LIST",0,s,"AGENT_TYPES",0,t])},534623,e=>{"use strict";var t=e.i(843476),s=e.i(271645),i=e.i(531278),r=e.i(239616),n=e.i(618566),a=e.i(209165),o=e.i(28916);let u="spaces-terminal-token";function c({children:e}){let c=(0,n.useRouter)(),{isDesktop:l,basePath:h}=(0,o.useTier)(),[d,p]=(0,s.useState)("loading"),[y,f]=(0,s.useState)(""),[m,v]=(0,s.useState)(""),[g,b]=(0,s.useState)(""),[k,w]=(0,s.useState)(!1),Q=(0,s.useRef)(null),R=`${h}/spaces_icon.png`;(0,s.useEffect)(()=>{if(l){f("desktop-local"),p("authorized");return}function e(){let e=sessionStorage.getItem(u);if(e){f(e),p("authorized");return}fetch((0,a.api)("/api/auth/totp/status")).then(e=>e.json()).then(e=>{e.enabled?(p("prompt"),setTimeout(()=>Q.current?.focus(),100)):p("not-setup")}).catch(()=>p("not-setup"))}fetch((0,a.api)("/api/auth/me")).then(t=>{if(t.ok){f("session-auth"),p("authorized");return}return e()}).catch(()=>e())},[l]);let S=(0,s.useCallback)(async e=>{if(6!==e.length)return;w(!0),b("");let t=await fetch((0,a.api)("/api/auth/totp/verify"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:e,action:"verify"})}),s=await t.json();w(!1),s.success&&s.terminalToken?(sessionStorage.setItem(u,s.terminalToken),f(s.terminalToken),p("authorized")):(b(s.error||"Invalid code"),v(""),Q.current?.focus())},[]);return"loading"===d?(0,t.jsx)("div",{className:"flex items-center justify-center h-screen bg-zinc-950",children:(0,t.jsx)(i.Loader2,{className:"w-6 h-6 animate-spin text-indigo-500"})}):"authorized"===d?(0,t.jsx)(t.Fragment,{children:e(y)}):"not-setup"===d?(0,t.jsx)("div",{className:"flex items-center justify-center h-screen bg-zinc-950",children:(0,t.jsxs)("div",{className:"text-center space-y-4 max-w-sm",children:[(0,t.jsx)("img",{src:R,alt:"Spaces",className:"w-12 h-12 mx-auto opacity-40"}),(0,t.jsx)("h2",{className:"text-lg font-semibold text-white",children:"2FA Required"}),(0,t.jsx)("p",{className:"text-sm text-zinc-400",children:"Two-factor authentication must be set up before you can use terminals."}),(0,t.jsxs)("button",{onClick:()=>c.push("/settings"),className:"inline-flex items-center gap-2 px-4 py-2 text-sm bg-indigo-600 text-white rounded-md hover:bg-indigo-500",children:[(0,t.jsx)(r.Settings,{className:"w-4 h-4"}),"Go to Settings"]})]})}):(0,t.jsx)("div",{className:"flex items-center justify-center h-screen bg-zinc-950",children:(0,t.jsxs)("div",{className:"text-center space-y-4 max-w-sm",children:[(0,t.jsx)("img",{src:R,alt:"Spaces",className:"w-12 h-12 mx-auto"}),(0,t.jsx)("h2",{className:"text-lg font-semibold text-white",children:"Terminal Verification"}),(0,t.jsx)("p",{className:"text-sm text-zinc-400",children:"Enter the 6-digit code from your authenticator app."}),(0,t.jsxs)("div",{children:[(0,t.jsx)("input",{ref:Q,type:"text",inputMode:"numeric",autoComplete:"one-time-code",placeholder:"000000",value:m,onChange:e=>{let t;v(t=e.target.value.replace(/\D/g,"").slice(0,6)),b(""),6===t.length&&S(t)},disabled:k,className:"w-48 px-3 py-3 text-2xl font-mono tracking-[0.4em] text-center bg-zinc-800 border border-zinc-700 rounded-lg focus:outline-none focus:border-indigo-500 text-white disabled:opacity-50",autoFocus:!0}),k&&(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2 mt-3 text-xs text-zinc-400",children:[(0,t.jsx)(i.Loader2,{className:"w-3 h-3 animate-spin"}),"Verifying..."]}),g&&(0,t.jsx)("p",{className:"text-sm text-red-400 mt-3",children:g})]}),(0,t.jsx)("p",{className:"text-[11px] text-zinc-600",children:"Token is valid for 8 hours after verification."})]})})}e.s(["TotpGate",()=>c])},87309,e=>{"use strict";let t=(0,e.i(475254).default)("audio-lines",[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]]);e.s(["AudioLines",()=>t],87309)},63209,e=>{"use strict";let t=(0,e.i(475254).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(["AlertCircle",()=>t],63209)},116049,e=>{e.v(t=>Promise.all(["static/chunks/bebf086f02319b11.js"].map(t=>e.l(t))).then(()=>t(444908)))},359439,e=>{e.v(t=>Promise.all(["static/chunks/30b061a140b8f71b.js"].map(t=>e.l(t))).then(()=>t(193309)))},816091,e=>{e.v(t=>Promise.all(["static/chunks/7eed72a821b1dbb6.js"].map(t=>e.l(t))).then(()=>t(152216)))}]);