@jlongo78/agent-spaces 0.3.6 → 0.4.0
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.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/app-path-routes-manifest.json +5 -0
- package/.next/standalone/.next/build-manifest.json +4 -4
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/required-server-files.json +30 -25
- package/.next/standalone/.next/routes-manifest.json +40 -0
- package/.next/standalone/.next/server/app/(desktop)/admin/analytics/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/(desktop)/admin/analytics/page.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/admin/analytics/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(desktop)/admin/analytics/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/admin/users/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/(desktop)/admin/users/page.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/admin/users/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(desktop)/admin/users/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/analytics/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/(desktop)/analytics/page.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/analytics/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(desktop)/analytics/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/network/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/(desktop)/network/page.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/network/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(desktop)/network/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/(desktop)/page.js +2 -2
- package/.next/standalone/.next/server/app/(desktop)/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(desktop)/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/projects/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/(desktop)/projects/page.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/projects/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(desktop)/projects/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/sessions/[id]/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/(desktop)/sessions/[id]/page.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/sessions/[id]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(desktop)/sessions/[id]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/sessions/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/(desktop)/sessions/page.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/sessions/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(desktop)/sessions/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/settings/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/(desktop)/settings/page.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/settings/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(desktop)/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/terminal/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/(desktop)/terminal/page.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/terminal/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(desktop)/terminal/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/terminal/pane/[id]/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/(desktop)/terminal/pane/[id]/page.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/terminal/pane/[id]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(desktop)/terminal/pane/[id]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/terminal/remote/[nodeId]/[workspaceId]/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/(desktop)/terminal/remote/[nodeId]/[workspaceId]/page.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/terminal/remote/[nodeId]/[workspaceId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(desktop)/terminal/remote/[nodeId]/[workspaceId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/workspaces/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/(desktop)/workspaces/page.js +1 -1
- package/.next/standalone/.next/server/app/(desktop)/workspaces/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/(desktop)/workspaces/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_global-error/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/_global-error/page.js +1 -1
- package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_global-error.html +2 -2
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/_not-found/page.js +1 -1
- package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +4 -4
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/admin/analytics.html +1 -1
- package/.next/standalone/.next/server/app/admin/analytics.rsc +6 -6
- package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap/admin/analytics/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap/admin/analytics.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap/admin.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/analytics.segments/!KGRlc2t0b3Ap.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/admin/analytics.segments/_full.segment.rsc +6 -6
- package/.next/standalone/.next/server/app/admin/analytics.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/analytics.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/admin/analytics.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/admin/users.html +1 -1
- package/.next/standalone/.next/server/app/admin/users.rsc +6 -6
- package/.next/standalone/.next/server/app/admin/users.segments/!KGRlc2t0b3Ap/admin/users/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/admin/users.segments/!KGRlc2t0b3Ap/admin/users.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/users.segments/!KGRlc2t0b3Ap/admin.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/users.segments/!KGRlc2t0b3Ap.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/admin/users.segments/_full.segment.rsc +6 -6
- package/.next/standalone/.next/server/app/admin/users.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/admin/users.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/admin/users.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/analytics.html +1 -1
- package/.next/standalone/.next/server/app/analytics.rsc +6 -6
- package/.next/standalone/.next/server/app/analytics.segments/!KGRlc2t0b3Ap/analytics/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/analytics.segments/!KGRlc2t0b3Ap/analytics.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/analytics.segments/!KGRlc2t0b3Ap.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/analytics.segments/_full.segment.rsc +6 -6
- package/.next/standalone/.next/server/app/analytics.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/analytics.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/analytics.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/api/admin/analytics/route.js +1 -1
- package/.next/standalone/.next/server/app/api/admin/analytics/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/admin/users/[id]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/admin/users/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/admin/users/route.js +1 -1
- package/.next/standalone/.next/server/app/api/admin/users/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/analytics/overview/route.js +2 -2
- package/.next/standalone/.next/server/app/api/analytics/overview/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/login/route.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/login/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/logout/route.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/me/route.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/me/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/totp/setup/route.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/totp/setup/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/totp/status/route.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/totp/status/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/totp/verify/route.js +1 -1
- package/.next/standalone/.next/server/app/api/auth/totp/verify/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/bulk/route.js +2 -2
- package/.next/standalone/.next/server/app/api/bulk/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/chat/route.js +1 -1
- package/.next/standalone/.next/server/app/api/chat/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/config/route.js +1 -1
- package/.next/standalone/.next/server/app/api/config/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/events/route.js +2 -2
- package/.next/standalone/.next/server/app/api/events/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/folders/route.js +1 -1
- package/.next/standalone/.next/server/app/api/folders/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/discovered/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/discovered/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/handshake/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/handshake/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/health/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/health/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/identity/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/identity/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/keys/[id]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/keys/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/keys/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/keys/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/nodes/[id]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/nodes/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/nodes/check/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/nodes/check/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/nodes/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/nodes/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/projects/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/projects/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/proxy/[nodeId]/[...path]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/proxy/[nodeId]/[...path]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/search/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/search/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/sessions/[id]/messages/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/sessions/[id]/messages/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/sessions/[id]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/sessions/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/sessions/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/sessions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/terminal/token/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/terminal/token/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/workspaces/[id]/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/workspaces/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/network/workspaces/route.js +1 -1
- package/.next/standalone/.next/server/app/api/network/workspaces/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/panes/[id]/route.js +2 -2
- package/.next/standalone/.next/server/app/api/panes/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/panes/route.js +2 -2
- package/.next/standalone/.next/server/app/api/panes/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/projects/route.js +2 -2
- package/.next/standalone/.next/server/app/api/projects/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/search/route.js +2 -2
- package/.next/standalone/.next/server/app/api/search/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/sessions/[id]/chat/route.js +2 -2
- package/.next/standalone/.next/server/app/api/sessions/[id]/chat/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/sessions/[id]/messages/route.js +2 -2
- package/.next/standalone/.next/server/app/api/sessions/[id]/messages/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/sessions/[id]/route.js +2 -2
- package/.next/standalone/.next/server/app/api/sessions/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/sessions/route.js +2 -2
- package/.next/standalone/.next/server/app/api/sessions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/sync/route.js +3 -3
- package/.next/standalone/.next/server/app/api/sync/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tags/route.js +2 -2
- package/.next/standalone/.next/server/app/api/tags/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/tier/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/tier/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/tier/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/tier/route.js +7 -0
- package/.next/standalone/.next/server/app/api/tier/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/tier/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/tier/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/context/[key]/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/context/[key]/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/context/[key]/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/context/[key]/route.js +7 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/context/[key]/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/context/[key]/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/context/[key]/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/context/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/context/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/context/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/context/route.js +7 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/context/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/context/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/context/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/[msgId]/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/[msgId]/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/[msgId]/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/[msgId]/route.js +7 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/[msgId]/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/[msgId]/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/[msgId]/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/route/app-paths-manifest.json +3 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/route/build-manifest.json +11 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/route/server-reference-manifest.json +4 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/route.js +7 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/route.js.map +5 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/route.js.nft.json +1 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/messages/route_client-reference-manifest.js +2 -0
- package/.next/standalone/.next/server/app/api/workspaces/[id]/route.js +2 -2
- package/.next/standalone/.next/server/app/api/workspaces/[id]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/workspaces/[id]/sessions/route.js +2 -2
- package/.next/standalone/.next/server/app/api/workspaces/[id]/sessions/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/workspaces/route.js +2 -2
- package/.next/standalone/.next/server/app/api/workspaces/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/login/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/login/page.js +1 -1
- package/.next/standalone/.next/server/app/login/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/login.html +1 -1
- package/.next/standalone/.next/server/app/login.rsc +5 -5
- package/.next/standalone/.next/server/app/login.segments/_full.segment.rsc +5 -5
- package/.next/standalone/.next/server/app/login.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/login.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/login.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/login.segments/login.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/m/page.js +1 -1
- package/.next/standalone/.next/server/app/m/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/m/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/m/projects/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/m/projects/page.js +1 -1
- package/.next/standalone/.next/server/app/m/projects/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/m/projects/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/m/projects.html +1 -1
- package/.next/standalone/.next/server/app/m/projects.rsc +6 -6
- package/.next/standalone/.next/server/app/m/projects.segments/_full.segment.rsc +6 -6
- package/.next/standalone/.next/server/app/m/projects.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/projects.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/m/projects.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/projects.segments/m/projects/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/projects.segments/m/projects.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/projects.segments/m.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/sessions/[id]/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/m/sessions/[id]/page.js +1 -1
- package/.next/standalone/.next/server/app/m/sessions/[id]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/m/sessions/[id]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/m/sessions/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/m/sessions/page.js +1 -1
- package/.next/standalone/.next/server/app/m/sessions/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/m/sessions/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/m/sessions.html +1 -1
- package/.next/standalone/.next/server/app/m/sessions.rsc +6 -6
- package/.next/standalone/.next/server/app/m/sessions.segments/_full.segment.rsc +6 -6
- package/.next/standalone/.next/server/app/m/sessions.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/sessions.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/m/sessions.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/sessions.segments/m/sessions/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/sessions.segments/m/sessions.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/sessions.segments/m.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/settings/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/m/settings/page.js +1 -1
- package/.next/standalone/.next/server/app/m/settings/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/m/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/m/settings.html +1 -1
- package/.next/standalone/.next/server/app/m/settings.rsc +6 -6
- package/.next/standalone/.next/server/app/m/settings.segments/_full.segment.rsc +6 -6
- package/.next/standalone/.next/server/app/m/settings.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/settings.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/m/settings.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/settings.segments/m/settings/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/settings.segments/m/settings.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/settings.segments/m.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/terminal/page/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/m/terminal/page.js +1 -1
- package/.next/standalone/.next/server/app/m/terminal/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/m/terminal/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/m/terminal.html +1 -1
- package/.next/standalone/.next/server/app/m/terminal.rsc +6 -6
- package/.next/standalone/.next/server/app/m/terminal.segments/_full.segment.rsc +6 -6
- package/.next/standalone/.next/server/app/m/terminal.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/terminal.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/m/terminal.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/terminal.segments/m/terminal/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m/terminal.segments/m/terminal.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m/terminal.segments/m.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m.html +1 -1
- package/.next/standalone/.next/server/app/m.rsc +6 -6
- package/.next/standalone/.next/server/app/m.segments/_full.segment.rsc +6 -6
- package/.next/standalone/.next/server/app/m.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/m.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/m.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m.segments/m/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/m.segments/m.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/network.html +1 -1
- package/.next/standalone/.next/server/app/network.rsc +6 -6
- package/.next/standalone/.next/server/app/network.segments/!KGRlc2t0b3Ap/network/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/network.segments/!KGRlc2t0b3Ap/network.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/network.segments/!KGRlc2t0b3Ap.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/network.segments/_full.segment.rsc +6 -6
- package/.next/standalone/.next/server/app/network.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/network.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/network.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/projects.html +1 -1
- package/.next/standalone/.next/server/app/projects.rsc +6 -6
- package/.next/standalone/.next/server/app/projects.segments/!KGRlc2t0b3Ap/projects/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/projects.segments/!KGRlc2t0b3Ap/projects.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/projects.segments/!KGRlc2t0b3Ap.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/projects.segments/_full.segment.rsc +6 -6
- package/.next/standalone/.next/server/app/projects.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/projects.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/projects.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/sessions.html +1 -1
- package/.next/standalone/.next/server/app/sessions.rsc +6 -6
- package/.next/standalone/.next/server/app/sessions.segments/!KGRlc2t0b3Ap/sessions/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/sessions.segments/!KGRlc2t0b3Ap/sessions.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/sessions.segments/!KGRlc2t0b3Ap.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/sessions.segments/_full.segment.rsc +6 -6
- package/.next/standalone/.next/server/app/sessions.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/sessions.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/sessions.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/settings.html +1 -1
- package/.next/standalone/.next/server/app/settings.rsc +6 -6
- package/.next/standalone/.next/server/app/settings.segments/!KGRlc2t0b3Ap/settings/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/settings.segments/!KGRlc2t0b3Ap/settings.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/settings.segments/!KGRlc2t0b3Ap.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/settings.segments/_full.segment.rsc +6 -6
- package/.next/standalone/.next/server/app/settings.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/settings.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/terminal.html +1 -1
- package/.next/standalone/.next/server/app/terminal.rsc +6 -6
- package/.next/standalone/.next/server/app/terminal.segments/!KGRlc2t0b3Ap/terminal/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/terminal.segments/!KGRlc2t0b3Ap/terminal.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/terminal.segments/!KGRlc2t0b3Ap.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/terminal.segments/_full.segment.rsc +6 -6
- package/.next/standalone/.next/server/app/terminal.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/terminal.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/terminal.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/workspaces.html +1 -1
- package/.next/standalone/.next/server/app/workspaces.rsc +6 -6
- package/.next/standalone/.next/server/app/workspaces.segments/!KGRlc2t0b3Ap/workspaces/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/workspaces.segments/!KGRlc2t0b3Ap/workspaces.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/workspaces.segments/!KGRlc2t0b3Ap.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/workspaces.segments/_full.segment.rsc +6 -6
- package/.next/standalone/.next/server/app/workspaces.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/workspaces.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/workspaces.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app-paths-manifest.json +5 -0
- package/.next/standalone/.next/server/chunks/[externals]_chokidar_a0cd9157._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__025cd038._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__042ba2bc._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__07cc153d._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__08e411dd._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0add852f._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0c113ed0._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0cf032ab._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__11293532._.js +13 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1194f2c1._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__19c2d094._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__19c3ad21._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1ebc634e._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__24197539._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__2891c969._.js +11 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__2c6e6625._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__2fe2b40e._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__318f12c6._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__32df12e4._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__34e7cb21._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__49c92d87._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__52bde30c._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__53090a81._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__57193cf5._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5c33078d._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5f8c694a._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__630b9a6a._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__727d05f1._.js +3 -0
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__b71497ab._.js → [root-of-the-server]__75a774f0._.js} +19 -18
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__89124c96._.js → [root-of-the-server]__7f0bc701._.js} +19 -18
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__8915603e._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__8afe4d5e._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__9d15de27._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__a1fbc199._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__a1fe6070._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__a3f604d6._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__a5504205._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__abf53d11._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__b78eeead._.js +11 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__c1b8f8f6._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__c3c74ca4._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__c79824d9._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__c9db5d8a._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__cbd9cb15._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ccb4e920._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d15515e3._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d490583e._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d9c106a9._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__de2c3bf8._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__dfbf7bdd._.js +19 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e1e26f47._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ee9346bf._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__fea012d6._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ff1b0769._.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_tier_route_actions_6186023b.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_workspaces_[id]_context_route_actions_e9cb4bed.js +3 -0
- package/.next/standalone/.next/server/chunks/_next-internal_server_app_api_workspaces_[id]_messages_route_actions_0cf1d576.js +3 -0
- package/.next/standalone/.next/server/chunks/ce889_server_app_api_workspaces_[id]_context_[key]_route_actions_8e11e764.js +3 -0
- package/.next/standalone/.next/server/chunks/ce889_server_app_api_workspaces_[id]_messages_[msgId]_route_actions_008a0317.js +3 -0
- package/.next/standalone/.next/server/chunks/src_lib_events_sse_ts_1ad73980._.js +6 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__ea64930e._.js → [root-of-the-server]__2b4e2acc._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__36a11bc9._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__63c35e0f._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__650a172d._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__ba1024f6._.js → [root-of-the-server]__67234962._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__72acd514._.js → [root-of-the-server]__c73bef9a._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__e921fdfc._.js +5 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__eac7aeff._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_548abc09._.js → _0946fdc3._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_1f12caba._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_2230ad2d._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_3b54193d._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_43e7e611._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_5ac43c5d._.js +1 -3
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__3611990a._.js → _cd0986af._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_cd50a174._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/{_7e741697._.js → _de57b857._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_ef42f47a._.js +3 -0
- package/.next/standalone/.next/server/chunks/ssr/_f67f58f1._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_dd004864._.js → _fbc5e000._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/node_modules_861e98fe._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_(desktop)_terminal_page_tsx_de5e8d85._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_app_m_terminal_page_tsx_553a0130._.js +2 -2
- package/.next/standalone/.next/server/edge/chunks/{[root-of-the-server]__6154bdc0._.js → [root-of-the-server]__32a0045c._.js} +3 -5
- package/.next/standalone/.next/server/edge/chunks/{turbopack-node_modules_next_dist_esm_build_templates_edge-wrapper_03b33eff.js → turbopack-node_modules_next_dist_esm_build_templates_edge-wrapper_a5230bba.js} +2 -2
- package/.next/standalone/.next/server/middleware-build-manifest.js +2 -2
- package/.next/standalone/.next/server/middleware-manifest.json +7 -7
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +2 -2
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/static/chunks/{4bd6943fa4082aa9.js → 3165c61fb2e4045d.js} +1 -1
- package/.next/standalone/.next/static/chunks/{f58f62604604c529.js → 31f45c67350373f2.js} +2 -2
- package/.next/standalone/.next/static/chunks/3c4ee171d96760e8.js +5 -0
- package/.next/standalone/.next/static/chunks/4e792c3078e37704.js +5 -0
- package/.next/standalone/.next/static/chunks/65afda485a466977.js +1 -0
- package/.next/standalone/.next/static/chunks/780381483091d8fb.js +1 -0
- package/.next/standalone/.next/static/chunks/7c1e6d7f1d3b4173.js +5 -0
- package/.next/standalone/.next/static/chunks/806334ea0f6ca92a.css +3 -0
- package/.next/standalone/.next/static/chunks/{0b733ac17fcb2bef.js → 8cc07e8d950d6962.js} +1 -1
- package/.next/standalone/.next/static/chunks/d0c839c82cf232b8.js +1 -0
- package/.next/standalone/.next/static/chunks/e6134a48180c8a36.js +1 -0
- package/.next/standalone/.next/static/chunks/{7de9141b1af425c3.js → e7772d64463868eb.js} +1 -1
- package/.next/standalone/.next/static/chunks/{e94f6965199a47e7.js → eb780226f5bd3892.js} +1 -1
- package/.next/standalone/.next/static/chunks/f2b58d718b34646d.js +1 -0
- package/.next/standalone/.next/static/chunks/f789a1d0736e1154.js +1 -0
- package/.next/standalone/.next/static/chunks/{turbopack-947de56768b27172.js → turbopack-ea18b8255590c757.js} +1 -1
- package/.next/standalone/node_modules/@img/sharp-libvips-linux-x64/README.md +46 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linux-x64/lib/glib-2.0/include/glibconfig.h +221 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linux-x64/lib/index.js +1 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linux-x64/lib/libvips-cpp.so.8.17.3 +0 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linux-x64/package.json +42 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/README.md +46 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/glib-2.0/include/glibconfig.h +221 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/index.js +1 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/libvips-cpp.so.8.17.3 +0 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/package.json +42 -0
- package/.next/standalone/node_modules/@img/sharp-libvips-linuxmusl-x64/versions.json +30 -0
- package/.next/standalone/node_modules/@img/sharp-linux-x64/lib/sharp-linux-x64.node +0 -0
- package/.next/standalone/node_modules/@img/{sharp-win32-x64 → sharp-linux-x64}/package.json +46 -39
- package/.next/standalone/node_modules/@img/sharp-linuxmusl-x64/lib/sharp-linuxmusl-x64.node +0 -0
- package/.next/standalone/node_modules/@img/sharp-linuxmusl-x64/package.json +46 -0
- package/.next/standalone/node_modules/chokidar/LICENSE +21 -0
- package/.next/standalone/node_modules/chokidar/README.md +305 -0
- package/.next/standalone/node_modules/chokidar/handler.js +632 -0
- package/.next/standalone/node_modules/chokidar/index.js +822 -0
- package/.next/standalone/node_modules/chokidar/package.json +63 -0
- package/.next/standalone/node_modules/readdirp/LICENSE +21 -0
- package/.next/standalone/node_modules/readdirp/README.md +120 -0
- package/.next/standalone/node_modules/readdirp/index.js +272 -0
- package/.next/standalone/node_modules/readdirp/package.json +66 -0
- package/.next/standalone/package.json +91 -90
- package/.next/standalone/server.js +1 -1
- package/.next/standalone/tsconfig.json +34 -34
- package/LICENSE +661 -21
- package/README.md +131 -121
- package/bin/fix-standalone-externals.js +79 -53
- package/bin/lib/auto-setup.js +101 -0
- package/bin/mdns-service.js +171 -171
- package/bin/postinstall.js +35 -0
- package/bin/setup-admin.js +189 -189
- package/bin/spaces-dev.js +173 -108
- package/bin/spaces-setup.js +242 -0
- package/bin/spaces.js +318 -155
- package/bin/terminal-server.js +1051 -990
- package/package.json +91 -90
- package/.next/standalone/.next/server/chunks/[externals]_node +0 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__01c98454._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__18b8f7d9._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__193cb667._.js +0 -5
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__25b4d5ca._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__280398d8._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__2a4c2db6._.js +0 -13
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__3fd6439e._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__40c21d75._.js +0 -5
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__4375a280._.js +0 -5
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__4950da9c._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__4a77d855._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__4d551a41._.js +0 -5
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5420fbcd._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__586418c6._.js +0 -5
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5c2f4a8e._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5eaa589f._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5f4dc1dd._.js +0 -5
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__5ff6b7d9._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__65509457._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__65620687._.js +0 -5
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__76e7a7b9._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__7fae7bd7._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__821ffcfb._.js +0 -5
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__83676993._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__86e02dd1._.js +0 -5
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__8a7fae80._.js +0 -5
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__8af8821a._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__93e1af64._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__94f437bd._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__9e9f597a._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__aae49c2b._.js +0 -15
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ab25b881._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__aef285c3._.js +0 -5
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__b52523c7._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__b607a85c._.js +0 -5
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__b950ac1e._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__c6355fd6._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d1771755._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d55d3167._.js +0 -12
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d9533783._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__d9540965._.js +0 -21
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ddbb7b16._.js +0 -5
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e4989332._.js +0 -5
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__e7a6a584._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__ed0f1148._.js +0 -5
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__f1436778._.js +0 -5
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__fe65bfb1._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__17ba2e09._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__6bd17d85._.js +0 -5
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__7e604f3d._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__a923e475._.js +0 -5
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__d23f4926._.js +0 -5
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__e3bf6054._.js +0 -5
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__f08a4c64._.js +0 -3
- package/.next/standalone/.next/static/chunks/01580b24a27526a9.css +0 -3
- package/.next/standalone/.next/static/chunks/06e3af139a18e326.js +0 -5
- package/.next/standalone/.next/static/chunks/13c233fe06728b88.js +0 -1
- package/.next/standalone/.next/static/chunks/1f4937830aceaae2.js +0 -1
- package/.next/standalone/.next/static/chunks/6b8fb2027281ae5d.js +0 -3
- package/.next/standalone/.next/static/chunks/76698b8c3d5cae75.js +0 -1
- package/.next/standalone/.next/static/chunks/7fbc5bdede00e3c9.js +0 -1
- package/.next/standalone/.next/static/chunks/acbcf40fb5a2ca5e.js +0 -1
- package/.next/standalone/.next/static/chunks/db03df936139672b.js +0 -1
- package/.next/standalone/.next/static/chunks/e7ac38524a30e234.js +0 -5
- package/.next/standalone/.next/static/chunks/f8cf8e5a643bd23f.js +0 -5
- package/.next/standalone/node_modules/@img/sharp-win32-x64/lib/sharp-win32-x64.node +0 -0
- package/.next/standalone/node_modules/better-sqlite3/build/Release/better_sqlite3.node +0 -0
- package/.next/standalone/node_modules/better-sqlite3/lib/database.js +0 -90
- package/.next/standalone/node_modules/better-sqlite3/lib/index.js +0 -3
- package/.next/standalone/node_modules/better-sqlite3/lib/methods/aggregate.js +0 -43
- package/.next/standalone/node_modules/better-sqlite3/lib/methods/backup.js +0 -67
- package/.next/standalone/node_modules/better-sqlite3/lib/methods/function.js +0 -31
- package/.next/standalone/node_modules/better-sqlite3/lib/methods/inspect.js +0 -7
- package/.next/standalone/node_modules/better-sqlite3/lib/methods/pragma.js +0 -12
- package/.next/standalone/node_modules/better-sqlite3/lib/methods/serialize.js +0 -16
- package/.next/standalone/node_modules/better-sqlite3/lib/methods/table.js +0 -189
- package/.next/standalone/node_modules/better-sqlite3/lib/methods/transaction.js +0 -78
- package/.next/standalone/node_modules/better-sqlite3/lib/methods/wrappers.js +0 -54
- package/.next/standalone/node_modules/better-sqlite3/lib/sqlite-error.js +0 -20
- package/.next/standalone/node_modules/better-sqlite3/lib/util.js +0 -12
- package/.next/standalone/node_modules/better-sqlite3/package.json +0 -59
- package/.next/standalone/node_modules/bindings/bindings.js +0 -221
- package/.next/standalone/node_modules/bindings/package.json +0 -28
- package/.next/standalone/node_modules/detect-libc/lib/detect-libc.js +0 -313
- package/.next/standalone/node_modules/detect-libc/lib/elf.js +0 -39
- package/.next/standalone/node_modules/detect-libc/lib/filesystem.js +0 -51
- package/.next/standalone/node_modules/detect-libc/lib/process.js +0 -24
- package/.next/standalone/node_modules/detect-libc/package.json +0 -44
- package/.next/standalone/node_modules/file-uri-to-path/index.js +0 -66
- package/.next/standalone/node_modules/file-uri-to-path/package.json +0 -32
- /package/.next/standalone/.next/static/{PuVTvEgStc9tACVRts-l5 → k4gRsS979E-cbl1AWcHhx}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{PuVTvEgStc9tACVRts-l5 → k4gRsS979E-cbl1AWcHhx}/_clientMiddlewareManifest.json +0 -0
- /package/.next/standalone/.next/static/{PuVTvEgStc9tACVRts-l5 → k4gRsS979E-cbl1AWcHhx}/_ssgManifest.js +0 -0
- /package/.next/standalone/node_modules/@img/{sharp-win32-x64 → sharp-libvips-linux-x64}/versions.json +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,31278,e=>{"use strict";let t=(0,e.i(75254).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",()=>t],31278)},66027,54616,e=>{"use strict";let t;var s=e.i(75555),r=e.i(40143),i=e.i(86491),n=e.i(15823),a=e.i(93803),o=e.i(19273),u=e.i(80166),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;#r=void 0;#i=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.#r.addObserver(this),l(this.#r,this.options)?this.#f():this.updateResult(),this.#m())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return h(this.#r,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return h(this.#r,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#g(),this.#r.removeObserver(this)}setOptions(e){let t=this.options,s=this.#r;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.#r))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#v(),this.#r.setOptions(this.options),t._defaulted&&!(0,o.shallowEqualObjects)(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#r,observer:this});let r=this.hasListeners();r&&d(this.#r,s,this.options,t)&&this.#f(),this.updateResult(),r&&(this.#r!==s||(0,o.resolveEnabled)(this.options.enabled,this.#r)!==(0,o.resolveEnabled)(t.enabled,this.#r)||(0,o.resolveStaleTime)(this.options.staleTime,this.#r)!==(0,o.resolveStaleTime)(t.staleTime,this.#r))&&this.#x();let i=this.#w();r&&(this.#r!==s||(0,o.resolveEnabled)(this.options.enabled,this.#r)!==(0,o.resolveEnabled)(t.enabled,this.#r)||i!==this.#p)&&this.#k(i)}getOptimisticResult(e){var t,s;let r=this.#e.getQueryCache().build(this.#e,e),i=this.createResult(r,e);return t=this,s=i,(0,o.shallowEqualObjects)(t.getCurrentResult(),s)||(this.#n=i,this.#o=this.options,this.#a=this.#r.state),i}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.#r}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.#v();let t=this.#r.fetch(this.options,e);return e?.throwOnError||(t=t.catch(o.noop)),t}#x(){this.#b();let e=(0,o.resolveStaleTime)(this.options.staleTime,this.#r);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.#r):this.options.refetchInterval)??!1}#k(e){this.#g(),this.#p=e,!o.isServer&&!1!==(0,o.resolveEnabled)(this.options.enabled,this.#r)&&(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.#x(),this.#k(this.#w())}#b(){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,r=this.#r,n=this.options,u=this.#n,c=this.#a,h=this.#o,y=e!==r?e.state:this.#i,{state:f}=e,m={...f},b=!1;if(t._optimisticResults){let s=this.hasListeners(),a=!s&&l(e,t),o=s&&d(e,r,t,n);(a||o)&&(m={...m,...(0,i.fetchState)(f.data,e.options)}),"isRestoring"===t._optimisticResults&&(m.fetchStatus="idle")}let{error:g,errorUpdatedAt:v,status:x}=m;s=m.data;let w=!1;if(void 0!==t.placeholderData&&void 0===s&&"pending"===x){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&&(x="success",s=(0,o.replaceData)(u?.data,e,t),b=!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,v=Date.now(),x="error");let k="fetching"===m.fetchStatus,S="pending"===x,R="error"===x,T=S&&k,C=void 0!==s,j={status:x,fetchStatus:m.fetchStatus,isPending:S,isSuccess:"success"===x,isError:R,isInitialLoading:T,isLoading:T,data:s,dataUpdatedAt:m.dataUpdatedAt,error:g,errorUpdatedAt:v,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:k,isRefetching:k&&!S,isLoadingError:R&&!C,isPaused:"paused"===m.fetchStatus,isPlaceholderData:b,isRefetchError:R&&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!==j.data,s="error"===j.status&&!t,i=e=>{s?e.reject(j.error):t&&e.resolve(j.data)},n=()=>{i(this.#s=j.promise=(0,a.pendingThenable)())},o=this.#s;switch(o.status){case"pending":e.queryHash===r.queryHash&&i(o);break;case"fulfilled":(s||j.data!==o.value)&&n();break;case"rejected":s&&j.error===o.reason||n()}}return j}updateResult(){let e=this.#n,t=this.createResult(this.#r,this.options);if(this.#a=this.#r.state,this.#o=this.options,void 0!==this.#a.data&&(this.#l=this.#r),(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 r=new Set(s??this.#y);return this.options.throwOnError&&r.add("error"),Object.keys(this.#n).some(t=>this.#n[t]!==e[t]&&r.has(t))};this.#S({listeners:s()})}#v(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#r)return;let t=this.#r;this.#r=e,this.#i=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#m()}#S(e){r.notifyManager.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#n)}),this.#e.getQueryCache().notify({query:this.#r,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 r="function"==typeof s?s(e):s;return"always"===r||!1!==r&&p(e,t)}return!1}function d(e,t,s,r){return(e!==t||!1===(0,o.resolveEnabled)(r.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(47167);var y=e.i(71645),f=e.i(12598);e.i(18050);var m=y.createContext((t=!1,{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t})),b=y.createContext(!1);b.Provider;var g=(e,t,s)=>t.fetchOptimistic(e).catch(()=>{s.clearReset()});function v(e,t){return function(e,t,s){let i,n=y.useContext(b),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))}i=l?.state.error&&"function"==typeof c.throwOnError?(0,o.shouldThrowError)(c.throwOnError,[l.state.error,l]):c.throwOnError,(c.suspense||c.experimental_prefetchInRender||i)&&!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),v=!n&&!1!==e.subscribed;if(y.useSyncExternalStore(y.useCallback(e=>{let t=v?d.subscribe(r.notifyManager.batchCalls(e)):o.noop;return d.updateResult(),t},[d,v]),()=>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:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&void 0===e.data||(0,o.shouldThrowError)(s,[e.error,r])))({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",()=>v],66027);var x=e.i(14272),w=n,k=class extends w.Subscribable{#e;#n=void 0;#R;#T;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.#R,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,o.hashKey)(t.mutationKey)!==(0,o.hashKey)(this.options.mutationKey)?this.reset():this.#R?.state.status==="pending"&&this.#R.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#R?.removeObserver(this)}onMutationUpdate(e){this.#C(),this.#S(e)}getCurrentResult(){return this.#n}reset(){this.#R?.removeObserver(this),this.#R=void 0,this.#C(),this.#S()}mutate(e,t){return this.#T=t,this.#R?.removeObserver(this),this.#R=this.#e.getMutationCache().build(this.#e,this.options),this.#R.addObserver(this),this.#R.execute(e)}#C(){let e=this.#R?.state??(0,x.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}}#S(e){r.notifyManager.batch(()=>{if(this.#T&&this.hasListeners()){let t=this.#n.variables,s=this.#n.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#T.onSuccess?.(e.data,t,s,r)}catch(e){Promise.reject(e)}try{this.#T.onSettled?.(e.data,null,t,s,r)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#T.onError?.(e.error,t,s,r)}catch(e){Promise.reject(e)}try{this.#T.onSettled?.(void 0,e.error,t,s,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#n)})})}};function S(e,t){let s=(0,f.useQueryClient)(t),[i]=y.useState(()=>new k(s,e));y.useEffect(()=>{i.setOptions(e)},[i,e]);let n=y.useSyncExternalStore(y.useCallback(e=>i.subscribe(r.notifyManager.batchCalls(e)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),a=y.useCallback((e,t)=>{i.mutate(e,t).catch(o.noop)},[i]);if(n.error&&(0,o.shouldThrowError)(i.options.throwOnError,[n.error]))throw n.error;return{...n,mutate:a,mutateAsync:n.mutate}}e.s(["useMutation",()=>S],54616)},3999,e=>{"use strict";var t=e.i(66027),s=e.i(54616),r=e.i(12598),i=e.i(9165);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,i.api)(`/api/sessions?${t}`))).json()}})}function a(e){return(0,t.useQuery)({queryKey:["session",e],queryFn:async()=>{let t=await fetch((0,i.api)(`/api/sessions/${e}`));if(!t.ok)throw Error("Session not found");return t.json()},enabled:!!e})}function o(e,s=0,r=50,n){return(0,t.useQuery)({queryKey:["messages",e,s,r,n],queryFn:async()=>{let t=n?(0,i.api)(`/api/network/proxy/${n}/sessions/${e}/messages?offset=${s}&limit=${r}`):(0,i.api)(`/api/sessions/${e}/messages?offset=${s}&limit=${r}`);return(await fetch(t)).json()},enabled:!!e})}function u(){let e=(0,r.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>(await fetch((0,i.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,r.useQueryClient)();return(0,s.useMutation)({mutationFn:async({sessionId:e,notes:t})=>(await fetch((0,i.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,r.useQueryClient)();return(0,s.useMutation)({mutationFn:async({sessionId:e,tagName:t})=>(await fetch((0,i.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,r.useQueryClient)();return(0,s.useMutation)({mutationFn:async({sessionId:e,tagName:t})=>(await fetch((0,i.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,r.useQueryClient)();return(0,s.useMutation)({mutationFn:async({sessionId:e,name:t})=>(await fetch((0,i.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,i.api)("/api/tags"))).json()})}function y(){let e=(0,r.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>(await fetch((0,i.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,r.useQueryClient)();return(0,s.useMutation)({mutationFn:async({tagId:e,color:t})=>(await fetch((0,i.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,i.api)("/api/workspaces"))).json()})}function b(){return(0,t.useQuery)({queryKey:["workspaces","remote"],queryFn:async()=>(await fetch((0,i.api)("/api/workspaces?nodes=all"))).json()})}function g(){let e=(0,r.useQueryClient)();return(0,s.useMutation)({mutationFn:async({workspaceId:e,sessionId:t,nodeId:s,title:r,cwd:n,agentType:a})=>{let o=await fetch((0,i.api)(`/api/workspaces/${e}/sessions`),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:t,nodeId:s,title:r,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 v(){let e=(0,r.useQueryClient)();return(0,s.useMutation)({mutationFn:async({workspaceId:e,sessionId:t})=>{let s=await fetch((0,i.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 x(){let e=(0,r.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>(await fetch((0,i.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,i.api)("/api/projects"))).json()})}function k(){return(0,t.useQuery)({queryKey:["analytics"],queryFn:async()=>(await fetch((0,i.api)("/api/analytics/overview"))).json()})}function S(){let e=(0,r.useQueryClient)();return(0,s.useMutation)({mutationFn:async()=>(await fetch((0,i.api)("/api/sync"),{method:"POST"})).json(),onSuccess:()=>{e.invalidateQueries()}})}e.s(["useAddSessionToWorkspace",()=>g,"useAddTag",()=>l,"useAnalytics",()=>k,"useBulkAction",()=>x,"useDeleteTag",()=>y,"useMessages",()=>o,"useProjects",()=>w,"useRemoteWorkspaces",()=>b,"useRemoveSessionFromWorkspace",()=>v,"useRemoveTag",()=>h,"useRenameSession",()=>d,"useSession",()=>a,"useSessions",()=>n,"useSync",()=>S,"useTags",()=>p,"useToggleStar",()=>u,"useUpdateNotes",()=>c,"useUpdateTagColor",()=>f,"useWorkspaces",()=>m])},3116,e=>{"use strict";let t=(0,e.i(75254).default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);e.s(["Clock",()=>t],3116)},7233,e=>{"use strict";let t=(0,e.i(75254).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",()=>t],7233)},27612,e=>{"use strict";let t=(0,e.i(75254).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],27612)},68407,e=>{"use strict";var t=e.i(66027),s=e.i(54616),r=e.i(12598),i=e.i(9165);function n(){return(0,t.useQuery)({queryKey:["node-identity"],queryFn:async()=>(await fetch((0,i.api)("/api/network/identity"))).json()})}function a(){let e=(0,r.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>(await fetch((0,i.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,i.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,r.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>{let t=await fetch((0,i.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,r.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>(await fetch((0,i.api)(`/api/network/nodes/${e}`),{method:"DELETE"})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["network-nodes"]})}})}function l(){return(0,t.useQuery)({queryKey:["network-api-keys"],queryFn:async()=>(await fetch((0,i.api)("/api/network/keys"))).json()})}function h(){let e=(0,r.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>(await fetch((0,i.api)("/api/network/keys"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["network-api-keys"]})}})}function d(){let e=(0,r.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>(await fetch((0,i.api)(`/api/network/keys/${e}`),{method:"DELETE"})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["network-api-keys"]})}})}function p(){let e=(0,r.useQueryClient)();return(0,s.useMutation)({mutationFn:async()=>(await fetch((0,i.api)("/api/network/nodes/check"),{method:"POST"})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["network-nodes"]})}})}e.s(["useAddNode",()=>u,"useApiKeys",()=>l,"useCheckHealth",()=>p,"useCreateApiKey",()=>h,"useNodeIdentity",()=>n,"useNodes",()=>o,"useRemoveNode",()=>c,"useRevokeApiKey",()=>d,"useUpdateNodeName",()=>a])},94351,e=>{"use strict";let t=(0,e.i(75254).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],94351)},64659,e=>{"use strict";let t=(0,e.i(75254).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["ChevronDown",()=>t],64659)},63059,e=>{"use strict";let t=(0,e.i(75254).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",()=>t],63059)},68054,e=>{"use strict";let t=(0,e.i(75254).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",()=>t],68054)},74886,e=>{"use strict";let t=(0,e.i(75254).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],74886)},98003,e=>{"use strict";var t=e.i(18050),s=e.i(75157);let r=["#ef4444","#f97316","#f59e0b","#eab308","#84cc16","#22c55e","#14b8a6","#06b6d4","#3b82f6","#6366f1","#8b5cf6","#a855f7","#d946ef","#ec4899","#f43f5e","#78716c"];function i({value:e,onChange:i,className:n}){return(0,t.jsx)("div",{className:(0,s.cn)("grid grid-cols-8 gap-1.5",n),children:r.map(r=>(0,t.jsx)("button",{onClick:()=>i(r),className:(0,s.cn)("w-6 h-6 rounded-full border-2 transition-transform hover:scale-110",e===r?"border-foreground scale-110":"border-transparent"),style:{backgroundColor:r},title:r},r))})}e.s(["ColorPicker",()=>i])},55900,e=>{"use strict";let t=(0,e.i(75254).default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s(["ChevronUp",()=>t],55900)},43531,e=>{"use strict";let t=(0,e.i(75254).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Check",()=>t],43531)},37727,e=>{"use strict";let t=(0,e.i(75254).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["X",()=>t],37727)},88699,e=>{"use strict";let t=(0,e.i(75254).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],88699)},73359,e=>{"use strict";let t={shell:{id:"shell",name:"Shell",command:"",resumeFlag:"",supportsResume:!1,color:"#71717a",description:"Plain terminal shell"},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"},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])},34623,e=>{"use strict";var t=e.i(47167),s=e.i(18050),r=e.i(71645),i=e.i(31278),n=e.i(39616),a=e.i(18566),o=e.i(9165),u=e.i(83774);let c=`${t.default.env.NEXT_PUBLIC_BASE_PATH||""}/spaces_icon.png`,l="spaces-terminal-token";function h({children:e}){let t=(0,a.useRouter)(),[h,d]=(0,r.useState)("loading"),[p,y]=(0,r.useState)(""),[f,m]=(0,r.useState)(""),[b,g]=(0,r.useState)(""),[v,x]=(0,r.useState)(!1),w=(0,r.useRef)(null);(0,r.useEffect)(()=>{if(u.IS_DESKTOP){y("desktop-local"),d("authorized");return}function e(){let e=sessionStorage.getItem(l);if(e){y(e),d("authorized");return}fetch((0,o.api)("/api/auth/totp/status")).then(e=>e.json()).then(e=>{e.enabled?(d("prompt"),setTimeout(()=>w.current?.focus(),100)):d("not-setup")}).catch(()=>d("not-setup"))}fetch((0,o.api)("/api/auth/me")).then(t=>{if(t.ok){y("session-auth"),d("authorized");return}return e()}).catch(()=>e())},[]);let k=(0,r.useCallback)(async e=>{if(6!==e.length)return;x(!0),g("");let t=await fetch((0,o.api)("/api/auth/totp/verify"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:e,action:"verify"})}),s=await t.json();x(!1),s.success&&s.terminalToken?(sessionStorage.setItem(l,s.terminalToken),y(s.terminalToken),d("authorized")):(g(s.error||"Invalid code"),m(""),w.current?.focus())},[]);return"loading"===h?(0,s.jsx)("div",{className:"flex items-center justify-center h-screen bg-zinc-950",children:(0,s.jsx)(i.Loader2,{className:"w-6 h-6 animate-spin text-indigo-500"})}):"authorized"===h?(0,s.jsx)(s.Fragment,{children:e(p)}):"not-setup"===h?(0,s.jsx)("div",{className:"flex items-center justify-center h-screen bg-zinc-950",children:(0,s.jsxs)("div",{className:"text-center space-y-4 max-w-sm",children:[(0,s.jsx)("img",{src:c,alt:"Spaces",className:"w-12 h-12 mx-auto opacity-40"}),(0,s.jsx)("h2",{className:"text-lg font-semibold text-white",children:"2FA Required"}),(0,s.jsx)("p",{className:"text-sm text-zinc-400",children:"Two-factor authentication must be set up before you can use terminals."}),(0,s.jsxs)("button",{onClick:()=>t.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,s.jsx)(n.Settings,{className:"w-4 h-4"}),"Go to Settings"]})]})}):(0,s.jsx)("div",{className:"flex items-center justify-center h-screen bg-zinc-950",children:(0,s.jsxs)("div",{className:"text-center space-y-4 max-w-sm",children:[(0,s.jsx)("img",{src:c,alt:"Spaces",className:"w-12 h-12 mx-auto"}),(0,s.jsx)("h2",{className:"text-lg font-semibold text-white",children:"Terminal Verification"}),(0,s.jsx)("p",{className:"text-sm text-zinc-400",children:"Enter the 6-digit code from your authenticator app."}),(0,s.jsxs)("div",{children:[(0,s.jsx)("input",{ref:w,type:"text",inputMode:"numeric",autoComplete:"one-time-code",placeholder:"000000",value:f,onChange:e=>{let t;m(t=e.target.value.replace(/\D/g,"").slice(0,6)),g(""),6===t.length&&k(t)},disabled:v,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}),v&&(0,s.jsxs)("div",{className:"flex items-center justify-center gap-2 mt-3 text-xs text-zinc-400",children:[(0,s.jsx)(i.Loader2,{className:"w-3 h-3 animate-spin"}),"Verifying..."]}),b&&(0,s.jsx)("p",{className:"text-sm text-red-400 mt-3",children:b})]}),(0,s.jsx)("p",{className:"text-[11px] text-zinc-600",children:"Token is valid for 8 hours after verification."})]})})}e.s(["TotpGate",()=>h])},24134,e=>{"use strict";var t=e.i(47167),s=e.i(18050),r=e.i(71645),i=e.i(74080),n=e.i(37727),a=e.i(88699),o=e.i(43531),u=e.i(75254);let c=(0,u.default)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]),l=(0,u.default)("maximize-2",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]]),h=(0,u.default)("minimize-2",[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]]),d=(0,u.default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);var p=e.i(48256),y=e.i(75157),f=e.i(73359);let m=t.default.env.NEXT_PUBLIC_WS_PATH;function b({pane:t,onClose:u,onUpdate:b,isMaximized:g,onToggleMaximize:v,onPopout:x,isPopout:w,terminalToken:k}){let S=(0,r.useRef)(null),R=(0,r.useRef)(null),T=(0,r.useRef)(null),C=(0,r.useRef)(null),[j,Q]=(0,r.useState)(!1),[O,E]=(0,r.useState)(!1),[M,N]=(0,r.useState)(t.title),[q,I]=(0,r.useState)(!1),[F,P]=(0,r.useState)({x:0,y:0}),K=(0,r.useRef)(null),z=(0,r.useRef)(null),[A,U]=(0,r.useState)(!1),D=(0,r.useRef)(t);D.current=t;let $=(0,r.useRef)(b);$.current=b;let L=(0,r.useRef)(k);L.current=k;let _=(0,r.useRef)(!1),J=(0,r.useRef)(!1),B=(0,r.useRef)(null),W=(0,r.useRef)(0),H=(0,r.useCallback)(async()=>{if(!S.current)return;D.current,J.current=!1,W.current=0;let{Terminal:t}=await e.A(16049),{FitAddon:s}=await e.A(59439),{WebLinksAddon:r}=await e.A(16091);R.current&&R.current.dispose();let i=new t({cursorBlink:!0,fontSize:13,fontFamily:"'Cascadia Code', 'Fira Code', 'JetBrains Mono', Consolas, monospace",theme:{background:"#0a0a0a",foreground:"#e4e4e7",cursor:"#6366f1",selectionBackground:"#6366f133",black:"#18181b",red:"#ef4444",green:"#22c55e",yellow:"#eab308",blue:"#3b82f6",magenta:"#a855f7",cyan:"#06b6d4",white:"#e4e4e7",brightBlack:"#52525b",brightRed:"#f87171",brightGreen:"#4ade80",brightYellow:"#facc15",brightBlue:"#60a5fa",brightMagenta:"#c084fc",brightCyan:"#22d3ee",brightWhite:"#fafafa"},allowProposedApi:!0}),n=new s,a=new r;i.loadAddon(n),i.loadAddon(a),await new Promise(e=>requestAnimationFrame(()=>{if(S.current){i.open(S.current);try{n.fit()}catch{}}e()})),R.current=i,C.current=n;let o=()=>{let e,t,s,r;if(J.current)return;W.current>0&&(i.write("\x1b[2J\x1b[H"),i.clear());let n=new WebSocket((t=new URLSearchParams({paneId:(e=D.current).id,cwd:e.cwd,agentType:e.agentType||"shell",cols:String(i.cols),rows:String(i.rows)}),e.claudeSessionId&&t.set("agentSession",e.claudeSessionId),e.customCommand&&t.set("customCommand",e.customCommand),e.nodeId&&t.set("nodeId",e.nodeId),(s=L.current)&&t.set("terminalToken",s),r="https:"===location.protocol?"wss:":"ws:",`${r}//${location.host}${m||"/ws"}?${t}`));T.current=n,n.onopen=()=>{Q(!0),U(!1),_.current=!1,W.current=0,setTimeout(()=>{if(C.current)try{C.current.fit()}catch{}},150)},n.onmessage=e=>{try{let t=JSON.parse(e.data);if("data"===t.type)i.write(t.data);else if("exit"===t.type){U(!0),_.current=!0;let e=t.reason?` — ${t.reason}`:"";i.write(`\r
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,31278,e=>{"use strict";let t=(0,e.i(75254).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",()=>t],31278)},66027,54616,e=>{"use strict";let t;var s=e.i(75555),r=e.i(40143),i=e.i(86491),n=e.i(15823),a=e.i(93803),o=e.i(19273),u=e.i(80166),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;#r=void 0;#i=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.#r.addObserver(this),l(this.#r,this.options)?this.#f():this.updateResult(),this.#m())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return h(this.#r,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return h(this.#r,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#g(),this.#r.removeObserver(this)}setOptions(e){let t=this.options,s=this.#r;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.#r))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#v(),this.#r.setOptions(this.options),t._defaulted&&!(0,o.shallowEqualObjects)(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#r,observer:this});let r=this.hasListeners();r&&d(this.#r,s,this.options,t)&&this.#f(),this.updateResult(),r&&(this.#r!==s||(0,o.resolveEnabled)(this.options.enabled,this.#r)!==(0,o.resolveEnabled)(t.enabled,this.#r)||(0,o.resolveStaleTime)(this.options.staleTime,this.#r)!==(0,o.resolveStaleTime)(t.staleTime,this.#r))&&this.#x();let i=this.#w();r&&(this.#r!==s||(0,o.resolveEnabled)(this.options.enabled,this.#r)!==(0,o.resolveEnabled)(t.enabled,this.#r)||i!==this.#p)&&this.#k(i)}getOptimisticResult(e){var t,s;let r=this.#e.getQueryCache().build(this.#e,e),i=this.createResult(r,e);return t=this,s=i,(0,o.shallowEqualObjects)(t.getCurrentResult(),s)||(this.#n=i,this.#o=this.options,this.#a=this.#r.state),i}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.#r}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.#v();let t=this.#r.fetch(this.options,e);return e?.throwOnError||(t=t.catch(o.noop)),t}#x(){this.#b();let e=(0,o.resolveStaleTime)(this.options.staleTime,this.#r);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.#r):this.options.refetchInterval)??!1}#k(e){this.#g(),this.#p=e,!o.isServer&&!1!==(0,o.resolveEnabled)(this.options.enabled,this.#r)&&(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.#x(),this.#k(this.#w())}#b(){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,r=this.#r,n=this.options,u=this.#n,c=this.#a,h=this.#o,y=e!==r?e.state:this.#i,{state:f}=e,m={...f},b=!1;if(t._optimisticResults){let s=this.hasListeners(),a=!s&&l(e,t),o=s&&d(e,r,t,n);(a||o)&&(m={...m,...(0,i.fetchState)(f.data,e.options)}),"isRestoring"===t._optimisticResults&&(m.fetchStatus="idle")}let{error:g,errorUpdatedAt:v,status:x}=m;s=m.data;let w=!1;if(void 0!==t.placeholderData&&void 0===s&&"pending"===x){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&&(x="success",s=(0,o.replaceData)(u?.data,e,t),b=!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,v=Date.now(),x="error");let k="fetching"===m.fetchStatus,S="pending"===x,C="error"===x,R=S&&k,j=void 0!==s,T={status:x,fetchStatus:m.fetchStatus,isPending:S,isSuccess:"success"===x,isError:C,isInitialLoading:R,isLoading:R,data:s,dataUpdatedAt:m.dataUpdatedAt,error:g,errorUpdatedAt:v,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:k,isRefetching:k&&!S,isLoadingError:C&&!j,isPaused:"paused"===m.fetchStatus,isPlaceholderData:b,isRefetchError:C&&j,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!==T.data,s="error"===T.status&&!t,i=e=>{s?e.reject(T.error):t&&e.resolve(T.data)},n=()=>{i(this.#s=T.promise=(0,a.pendingThenable)())},o=this.#s;switch(o.status){case"pending":e.queryHash===r.queryHash&&i(o);break;case"fulfilled":(s||T.data!==o.value)&&n();break;case"rejected":s&&T.error===o.reason||n()}}return T}updateResult(){let e=this.#n,t=this.createResult(this.#r,this.options);if(this.#a=this.#r.state,this.#o=this.options,void 0!==this.#a.data&&(this.#l=this.#r),(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 r=new Set(s??this.#y);return this.options.throwOnError&&r.add("error"),Object.keys(this.#n).some(t=>this.#n[t]!==e[t]&&r.has(t))};this.#S({listeners:s()})}#v(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#r)return;let t=this.#r;this.#r=e,this.#i=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#m()}#S(e){r.notifyManager.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#n)}),this.#e.getQueryCache().notify({query:this.#r,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 r="function"==typeof s?s(e):s;return"always"===r||!1!==r&&p(e,t)}return!1}function d(e,t,s,r){return(e!==t||!1===(0,o.resolveEnabled)(r.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(47167);var y=e.i(71645),f=e.i(12598);e.i(18050);var m=y.createContext((t=!1,{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t})),b=y.createContext(!1);b.Provider;var g=(e,t,s)=>t.fetchOptimistic(e).catch(()=>{s.clearReset()});function v(e,t){return function(e,t,s){let i,n=y.useContext(b),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))}i=l?.state.error&&"function"==typeof c.throwOnError?(0,o.shouldThrowError)(c.throwOnError,[l.state.error,l]):c.throwOnError,(c.suspense||c.experimental_prefetchInRender||i)&&!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),v=!n&&!1!==e.subscribed;if(y.useSyncExternalStore(y.useCallback(e=>{let t=v?d.subscribe(r.notifyManager.batchCalls(e)):o.noop;return d.updateResult(),t},[d,v]),()=>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:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&void 0===e.data||(0,o.shouldThrowError)(s,[e.error,r])))({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",()=>v],66027);var x=e.i(14272),w=n,k=class extends w.Subscribable{#e;#n=void 0;#C;#R;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#j()}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.#C,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,o.hashKey)(t.mutationKey)!==(0,o.hashKey)(this.options.mutationKey)?this.reset():this.#C?.state.status==="pending"&&this.#C.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#C?.removeObserver(this)}onMutationUpdate(e){this.#j(),this.#S(e)}getCurrentResult(){return this.#n}reset(){this.#C?.removeObserver(this),this.#C=void 0,this.#j(),this.#S()}mutate(e,t){return this.#R=t,this.#C?.removeObserver(this),this.#C=this.#e.getMutationCache().build(this.#e,this.options),this.#C.addObserver(this),this.#C.execute(e)}#j(){let e=this.#C?.state??(0,x.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}}#S(e){r.notifyManager.batch(()=>{if(this.#R&&this.hasListeners()){let t=this.#n.variables,s=this.#n.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#R.onSuccess?.(e.data,t,s,r)}catch(e){Promise.reject(e)}try{this.#R.onSettled?.(e.data,null,t,s,r)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#R.onError?.(e.error,t,s,r)}catch(e){Promise.reject(e)}try{this.#R.onSettled?.(void 0,e.error,t,s,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#n)})})}};function S(e,t){let s=(0,f.useQueryClient)(t),[i]=y.useState(()=>new k(s,e));y.useEffect(()=>{i.setOptions(e)},[i,e]);let n=y.useSyncExternalStore(y.useCallback(e=>i.subscribe(r.notifyManager.batchCalls(e)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),a=y.useCallback((e,t)=>{i.mutate(e,t).catch(o.noop)},[i]);if(n.error&&(0,o.shouldThrowError)(i.options.throwOnError,[n.error]))throw n.error;return{...n,mutate:a,mutateAsync:n.mutate}}e.s(["useMutation",()=>S],54616)},3999,e=>{"use strict";var t=e.i(66027),s=e.i(54616),r=e.i(12598),i=e.i(9165);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,i.api)(`/api/sessions?${t}`))).json()}})}function a(e){return(0,t.useQuery)({queryKey:["session",e],queryFn:async()=>{let t=await fetch((0,i.api)(`/api/sessions/${e}`));if(!t.ok)throw Error("Session not found");return t.json()},enabled:!!e})}function o(e,s=0,r=50,n){return(0,t.useQuery)({queryKey:["messages",e,s,r,n],queryFn:async()=>{let t=n?(0,i.api)(`/api/network/proxy/${n}/sessions/${e}/messages?offset=${s}&limit=${r}`):(0,i.api)(`/api/sessions/${e}/messages?offset=${s}&limit=${r}`);return(await fetch(t)).json()},enabled:!!e})}function u(){let e=(0,r.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>(await fetch((0,i.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,r.useQueryClient)();return(0,s.useMutation)({mutationFn:async({sessionId:e,notes:t})=>(await fetch((0,i.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,r.useQueryClient)();return(0,s.useMutation)({mutationFn:async({sessionId:e,tagName:t})=>(await fetch((0,i.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,r.useQueryClient)();return(0,s.useMutation)({mutationFn:async({sessionId:e,tagName:t})=>(await fetch((0,i.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,r.useQueryClient)();return(0,s.useMutation)({mutationFn:async({sessionId:e,name:t})=>(await fetch((0,i.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,i.api)("/api/tags"))).json()})}function y(){let e=(0,r.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>(await fetch((0,i.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,r.useQueryClient)();return(0,s.useMutation)({mutationFn:async({tagId:e,color:t})=>(await fetch((0,i.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,i.api)("/api/workspaces"))).json()})}function b(){return(0,t.useQuery)({queryKey:["workspaces","remote"],queryFn:async()=>(await fetch((0,i.api)("/api/workspaces?nodes=all"))).json()})}function g(){let e=(0,r.useQueryClient)();return(0,s.useMutation)({mutationFn:async({workspaceId:e,sessionId:t,nodeId:s,title:r,cwd:n,agentType:a})=>{let o=await fetch((0,i.api)(`/api/workspaces/${e}/sessions`),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:t,nodeId:s,title:r,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 v(){let e=(0,r.useQueryClient)();return(0,s.useMutation)({mutationFn:async({workspaceId:e,sessionId:t})=>{let s=await fetch((0,i.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 x(){let e=(0,r.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>(await fetch((0,i.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,i.api)("/api/projects"))).json()})}function k(){return(0,t.useQuery)({queryKey:["analytics"],queryFn:async()=>(await fetch((0,i.api)("/api/analytics/overview"))).json()})}function S(){let e=(0,r.useQueryClient)();return(0,s.useMutation)({mutationFn:async()=>(await fetch((0,i.api)("/api/sync"),{method:"POST"})).json(),onSuccess:()=>{e.invalidateQueries()}})}e.s(["useAddSessionToWorkspace",()=>g,"useAddTag",()=>l,"useAnalytics",()=>k,"useBulkAction",()=>x,"useDeleteTag",()=>y,"useMessages",()=>o,"useProjects",()=>w,"useRemoteWorkspaces",()=>b,"useRemoveSessionFromWorkspace",()=>v,"useRemoveTag",()=>h,"useRenameSession",()=>d,"useSession",()=>a,"useSessions",()=>n,"useSync",()=>S,"useTags",()=>p,"useToggleStar",()=>u,"useUpdateNotes",()=>c,"useUpdateTagColor",()=>f,"useWorkspaces",()=>m])},3116,e=>{"use strict";let t=(0,e.i(75254).default)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]);e.s(["Clock",()=>t],3116)},7233,e=>{"use strict";let t=(0,e.i(75254).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",()=>t],7233)},27612,e=>{"use strict";let t=(0,e.i(75254).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],27612)},68407,e=>{"use strict";var t=e.i(66027),s=e.i(54616),r=e.i(12598),i=e.i(9165);function n(){return(0,t.useQuery)({queryKey:["node-identity"],queryFn:async()=>(await fetch((0,i.api)("/api/network/identity"))).json()})}function a(){let e=(0,r.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>(await fetch((0,i.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,i.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,r.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>{let t=await fetch((0,i.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,r.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>(await fetch((0,i.api)(`/api/network/nodes/${e}`),{method:"DELETE"})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["network-nodes"]})}})}function l(){return(0,t.useQuery)({queryKey:["network-api-keys"],queryFn:async()=>(await fetch((0,i.api)("/api/network/keys"))).json()})}function h(){let e=(0,r.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>(await fetch((0,i.api)("/api/network/keys"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["network-api-keys"]})}})}function d(){let e=(0,r.useQueryClient)();return(0,s.useMutation)({mutationFn:async e=>(await fetch((0,i.api)(`/api/network/keys/${e}`),{method:"DELETE"})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["network-api-keys"]})}})}function p(){let e=(0,r.useQueryClient)();return(0,s.useMutation)({mutationFn:async()=>(await fetch((0,i.api)("/api/network/nodes/check"),{method:"POST"})).json(),onSuccess:()=>{e.invalidateQueries({queryKey:["network-nodes"]})}})}e.s(["useAddNode",()=>u,"useApiKeys",()=>l,"useCheckHealth",()=>p,"useCreateApiKey",()=>h,"useNodeIdentity",()=>n,"useNodes",()=>o,"useRemoveNode",()=>c,"useRevokeApiKey",()=>d,"useUpdateNodeName",()=>a])},94351,e=>{"use strict";let t=(0,e.i(75254).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],94351)},74886,e=>{"use strict";let t=(0,e.i(75254).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],74886)},68054,e=>{"use strict";let t=(0,e.i(75254).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",()=>t],68054)},64659,e=>{"use strict";let t=(0,e.i(75254).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["ChevronDown",()=>t],64659)},14764,e=>{"use strict";let t=(0,e.i(75254).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],14764)},63059,e=>{"use strict";let t=(0,e.i(75254).default)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);e.s(["ChevronRight",()=>t],63059)},98003,e=>{"use strict";var t=e.i(18050),s=e.i(75157);let r=["#ef4444","#f97316","#f59e0b","#eab308","#84cc16","#22c55e","#14b8a6","#06b6d4","#3b82f6","#6366f1","#8b5cf6","#a855f7","#d946ef","#ec4899","#f43f5e","#78716c"];function i({value:e,onChange:i,className:n}){return(0,t.jsx)("div",{className:(0,s.cn)("grid grid-cols-8 gap-1.5",n),children:r.map(r=>(0,t.jsx)("button",{onClick:()=>i(r),className:(0,s.cn)("w-6 h-6 rounded-full border-2 transition-transform hover:scale-110",e===r?"border-foreground scale-110":"border-transparent"),style:{backgroundColor:r},title:r},r))})}e.s(["ColorPicker",()=>i])},55900,e=>{"use strict";let t=(0,e.i(75254).default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s(["ChevronUp",()=>t],55900)},43531,e=>{"use strict";let t=(0,e.i(75254).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Check",()=>t],43531)},37727,e=>{"use strict";let t=(0,e.i(75254).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["X",()=>t],37727)},88699,e=>{"use strict";let t=(0,e.i(75254).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],88699)},73359,e=>{"use strict";let t={shell:{id:"shell",name:"Shell",command:"",resumeFlag:"",supportsResume:!1,color:"#71717a",description:"Plain terminal shell"},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"},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])},34623,e=>{"use strict";var t=e.i(18050),s=e.i(71645),r=e.i(31278),i=e.i(39616),n=e.i(18566),a=e.i(9165),o=e.i(29320);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,b]=(0,s.useState)(""),[g,v]=(0,s.useState)(""),[x,w]=(0,s.useState)(!1),k=(0,s.useRef)(null),S=`${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(()=>k.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 C=(0,s.useCallback)(async e=>{if(6!==e.length)return;w(!0),v("");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")):(v(s.error||"Invalid code"),b(""),k.current?.focus())},[]);return"loading"===d?(0,t.jsx)("div",{className:"flex items-center justify-center h-screen bg-zinc-950",children:(0,t.jsx)(r.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:S,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)(i.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:S,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:k,type:"text",inputMode:"numeric",autoComplete:"one-time-code",placeholder:"000000",value:m,onChange:e=>{let t;b(t=e.target.value.replace(/\D/g,"").slice(0,6)),v(""),6===t.length&&C(t)},disabled:x,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}),x&&(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2 mt-3 text-xs text-zinc-400",children:[(0,t.jsx)(r.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])},24134,e=>{"use strict";var t=e.i(47167),s=e.i(18050),r=e.i(71645),i=e.i(74080),n=e.i(37727),a=e.i(88699),o=e.i(43531),u=e.i(75254);let c=(0,u.default)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]),l=(0,u.default)("maximize-2",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]]),h=(0,u.default)("minimize-2",[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]]),d=(0,u.default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);var p=e.i(48256),y=e.i(61911),f=e.i(75157),m=e.i(73359);let b=t.default.env.NEXT_PUBLIC_WS_PATH;function g({pane:t,onClose:u,onUpdate:g,isMaximized:v,onToggleMaximize:x,onPopout:w,isPopout:k,terminalToken:S,workspaceCollaboration:C}){let R=(0,r.useRef)(null),j=(0,r.useRef)(null),T=(0,r.useRef)(null),Q=(0,r.useRef)(null),[O,M]=(0,r.useState)(!1),[N,E]=(0,r.useState)(!1),[q,I]=(0,r.useState)(t.title),[F,P]=(0,r.useState)(!1),[K,z]=(0,r.useState)({x:0,y:0}),A=(0,r.useRef)(null),U=(0,r.useRef)(null),[D,$]=(0,r.useState)(!1),L=(0,r.useRef)(t);L.current=t;let _=(0,r.useRef)(g);_.current=g;let J=(0,r.useRef)(S);J.current=S;let B=(0,r.useRef)(!1),W=(0,r.useRef)(!1),H=(0,r.useRef)(null),G=(0,r.useRef)(0),V=(0,r.useCallback)(async()=>{if(!R.current)return;L.current,W.current=!1,G.current=0;let{Terminal:t}=await e.A(16049),{FitAddon:s}=await e.A(59439),{WebLinksAddon:r}=await e.A(16091);j.current&&j.current.dispose();let i=new t({cursorBlink:!0,fontSize:13,fontFamily:"'Cascadia Code', 'Fira Code', 'JetBrains Mono', Consolas, monospace",theme:{background:"#0a0a0a",foreground:"#e4e4e7",cursor:"#6366f1",selectionBackground:"#6366f133",black:"#18181b",red:"#ef4444",green:"#22c55e",yellow:"#eab308",blue:"#3b82f6",magenta:"#a855f7",cyan:"#06b6d4",white:"#e4e4e7",brightBlack:"#52525b",brightRed:"#f87171",brightGreen:"#4ade80",brightYellow:"#facc15",brightBlue:"#60a5fa",brightMagenta:"#c084fc",brightCyan:"#22d3ee",brightWhite:"#fafafa"},allowProposedApi:!0}),n=new s,a=new r;i.loadAddon(n),i.loadAddon(a),await new Promise(e=>requestAnimationFrame(()=>{if(R.current){i.open(R.current);try{n.fit()}catch{}}e()})),j.current=i,Q.current=n;let o=()=>{try{n.fit()}catch{}};requestAnimationFrame(()=>requestAnimationFrame(o)),setTimeout(o,300);let u=()=>{let e,t,s,r,n;if(W.current)return;G.current>0&&(i.write("\x1b[2J\x1b[H"),i.clear());let a=new WebSocket((t=new URLSearchParams({paneId:(e=L.current).id,cwd:e.cwd,agentType:e.agentType||"shell",cols:String(i.cols),rows:String(i.rows)}),e.claudeSessionId&&t.set("agentSession",e.claudeSessionId),e.customCommand&&t.set("customCommand",e.customCommand),e.nodeId&&t.set("nodeId",e.nodeId),(s=J.current)&&t.set("terminalToken",s),r=b||"/ws",n="https:"===location.protocol?"wss:":"ws:",`${n}//${location.host}${r}?${t}`));T.current=a,a.onopen=()=>{M(!0),$(!1),B.current=!1,G.current=0,setTimeout(()=>{if(Q.current)try{Q.current.fit()}catch{}},150)},a.onmessage=e=>{try{let t=JSON.parse(e.data);if("data"===t.type)i.write(t.data);else if("exit"===t.type){$(!0),B.current=!0;let e=t.reason?` — ${t.reason}`:"";i.write(`\r
|
|
2
2
|
\x1b[90m[Process exited with code ${t.exitCode}${e}]\x1b[0m\r
|
|
3
3
|
`)}else"error"===t.type?i.write(`\r
|
|
4
4
|
\x1b[31m${t.data}\x1b[0m\r
|
|
5
|
-
`):"session-detected"===t.type
|
|
5
|
+
`):"session-detected"===t.type&&_.current(L.current.id,{claudeSessionId:t.sessionId})}catch{}},a.onclose=()=>{if(M(!1),!B.current&&!W.current){let e=G.current;if(e<20){let t=Math.min(1e3*Math.pow(1.5,e),3e4);G.current=e+1,H.current=setTimeout(u,t)}}},a.onerror=()=>{M(!1)}};i.onData(e=>{T.current?.readyState===WebSocket.OPEN&&T.current.send(JSON.stringify({type:"data",data:e}))}),i.onResize(({cols:e,rows:t})=>{T.current?.readyState===WebSocket.OPEN&&T.current.send(JSON.stringify({type:"resize",cols:e,rows:t}))}),u()},[]);(0,r.useEffect)(()=>(V(),()=>{W.current=!0,H.current&&clearTimeout(H.current),T.current?.close(),j.current?.dispose()}),[V]),(0,r.useEffect)(()=>{let e,t=new ResizeObserver(()=>{cancelAnimationFrame(e),e=requestAnimationFrame(()=>{if(Q.current)try{Q.current.fit()}catch{}})});return R.current&&t.observe(R.current),()=>{cancelAnimationFrame(e),t.disconnect()}},[]),(0,r.useEffect)(()=>{setTimeout(()=>{if(Q.current)try{Q.current.fit()}catch{}},50)},[v]);let Y=()=>{g(t.id,{title:q}),E(!1)};return(0,r.useEffect)(()=>{if(!F)return;let e=e=>{let t=e.target;A.current&&!A.current.contains(t)&&U.current&&!U.current.contains(t)&&P(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[F]),(0,s.jsxs)("div",{className:(0,f.cn)("flex flex-col border rounded-lg overflow-hidden",v?"fixed inset-2 z-50":"","border-zinc-700"),style:{borderColor:`${t.color}60`},children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-3 py-1.5 text-xs select-none flex-shrink-0",style:{backgroundColor:`${t.color}60`},children:[(0,s.jsxs)("div",{ref:A,className:"flex-shrink-0",children:[(0,s.jsx)("button",{onClick:e=>{let t=e.currentTarget.getBoundingClientRect();z({x:t.left,y:t.bottom+6}),P(!F)},className:"w-3 h-3 rounded-full hover:ring-2 hover:ring-zinc-500 ring-offset-1 ring-offset-zinc-900 transition-shadow cursor-pointer",style:{backgroundColor:t.color},title:"Change color"}),F&&(0,i.createPortal)((0,s.jsx)("div",{ref:U,className:"fixed z-[9999] bg-zinc-800 border border-zinc-600 rounded-xl p-3 shadow-2xl",style:{left:K.x,top:K.y},children:(0,s.jsx)("div",{className:"grid grid-cols-4 gap-2.5",style:{width:132},children:["#ef4444","#f97316","#f59e0b","#eab308","#84cc16","#22c55e","#14b8a6","#06b6d4","#3b82f6","#6366f1","#8b5cf6","#a855f7","#d946ef","#ec4899","#f43f5e","#78716c"].map(e=>(0,s.jsx)("button",{onClick:()=>{g(t.id,{color:e}),P(!1)},className:`w-7 h-7 rounded-full border-2 transition-all hover:scale-110 ${t.color===e?"border-white scale-110 shadow-lg":"border-transparent hover:border-zinc-500"}`,style:{backgroundColor:e}},e))})}),document.body)]}),N?(0,s.jsxs)("div",{className:"flex items-center gap-1 flex-1",children:[(0,s.jsx)("input",{autoFocus:!0,value:q,onChange:e=>I(e.target.value),onKeyDown:e=>{"Enter"===e.key&&Y(),"Escape"===e.key&&(I(t.title),E(!1))},className:"flex-1 bg-transparent border border-zinc-600 rounded px-1.5 py-0.5 text-xs focus:outline-none focus:border-indigo-400"}),(0,s.jsx)("button",{onClick:Y,className:"text-green-400 hover:text-green-300",children:(0,s.jsx)(o.Check,{className:"w-3 h-3"})})]}):(0,s.jsxs)("div",{className:"flex items-center gap-1 flex-1 min-w-0 group/title",children:[(0,s.jsx)("span",{onDoubleClick:()=>E(!0),className:"truncate text-zinc-300 font-medium cursor-default",children:t.title}),(0,s.jsx)("button",{onClick:()=>E(!0),className:"text-zinc-600 hover:text-zinc-300 opacity-0 group-hover/title:opacity-100 transition-opacity flex-shrink-0",title:"Rename",children:(0,s.jsx)(a.Pencil,{className:"w-2.5 h-2.5"})})]}),(0,s.jsx)("span",{className:"text-[10px] text-zinc-500 truncate max-w-[120px]",title:t.cwd,children:t.cwd.split(/[/\\]/).pop()}),t.agentType&&"shell"!==t.agentType&&(0,s.jsx)("span",{className:"text-[9px] px-1.5 py-0.5 rounded font-medium",style:{backgroundColor:`${m.AGENT_TYPES[t.agentType]?.color||"#6366f1"}20`,color:m.AGENT_TYPES[t.agentType]?.color||"#6366f1"},children:m.AGENT_TYPES[t.agentType]?.name||t.agentType}),t.nodeId&&(0,s.jsxs)("span",{className:"text-[9px] px-1.5 py-0.5 rounded font-medium bg-blue-500/10 text-blue-400 flex items-center gap-0.5",children:[(0,s.jsx)(p.Globe,{className:"w-2.5 h-2.5"}),"remote"]}),C&&"shell"!==t.agentType&&(0,s.jsx)("button",{onClick:()=>g(t.id,{isCollaborating:!t.isCollaborating}),className:`transition-colors ${t.isCollaborating?"text-indigo-400 hover:text-indigo-300":"text-zinc-600 hover:text-zinc-400"}`,title:t.isCollaborating?"Collaborating — click to opt out":"Not collaborating — click to opt in",children:(0,s.jsx)(y.Users,{className:"w-3 h-3"})}),!O&&!D&&(0,s.jsx)("span",{className:"text-[10px] text-yellow-500",children:"connecting..."}),D&&(0,s.jsx)("button",{onClick:()=>{W.current=!0,H.current&&clearTimeout(H.current),T.current?.close(),j.current?.dispose(),$(!1),B.current=!1,setTimeout(V,100)},className:"text-zinc-400 hover:text-white",title:"Restart",children:(0,s.jsx)(c,{className:"w-3 h-3"})}),!k&&w&&(0,s.jsx)("button",{onClick:()=>{w&&(W.current=!0,H.current&&clearTimeout(H.current),T.current?.close(),j.current?.dispose(),w(t.id))},className:"text-zinc-400 hover:text-white",title:"Pop out to new window",children:(0,s.jsx)(d,{className:"w-3 h-3"})}),(0,s.jsx)("button",{onClick:()=>x(t.id),className:"text-zinc-400 hover:text-white",title:v?"Restore":"Maximize",children:v?(0,s.jsx)(h,{className:"w-3 h-3"}):(0,s.jsx)(l,{className:"w-3 h-3"})}),(0,s.jsx)("button",{onClick:()=>{confirm("Close this terminal?")&&u(t.id)},className:"text-zinc-400 hover:text-red-400",title:"Close",children:(0,s.jsx)(n.X,{className:"w-3 h-3"})})]}),(0,s.jsx)("div",{ref:R,className:"flex-1 bg-[#0a0a0a]",style:{minHeight:v?"calc(100vh - 100px)":"300px"}})]})}e.s(["TerminalPane",()=>g],24134)},63209,e=>{"use strict";let t=(0,e.i(75254).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)},16049,e=>{e.v(t=>Promise.all(["static/chunks/e40d2bd3b4ce8192.js"].map(t=>e.l(t))).then(()=>t(44908)))},59439,e=>{e.v(t=>Promise.all(["static/chunks/af8bfb72187b7cbf.js"].map(t=>e.l(t))).then(()=>t(93309)))},16091,e=>{e.v(t=>Promise.all(["static/chunks/9768207ca0a51abd.js"].map(t=>e.l(t))).then(()=>t(52216)))}]);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,71689,e=>{"use strict";let t=(0,e.i(75254).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",()=>t],71689)},68054,e=>{"use strict";let t=(0,e.i(75254).default)("terminal",[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]);e.s(["Terminal",()=>t],68054)},43531,e=>{"use strict";let t=(0,e.i(75254).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);e.s(["Check",()=>t],43531)},31278,e=>{"use strict";let t=(0,e.i(75254).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",()=>t],31278)},37727,e=>{"use strict";let t=(0,e.i(75254).default)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);e.s(["X",()=>t],37727)},88699,e=>{"use strict";let t=(0,e.i(75254).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],88699)},73359,e=>{"use strict";let t={shell:{id:"shell",name:"Shell",command:"",resumeFlag:"",supportsResume:!1,color:"#71717a",description:"Plain terminal shell"},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"},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])},34623,e=>{"use strict";var t=e.i(18050),s=e.i(71645),r=e.i(31278),a=e.i(39616),n=e.i(18566),i=e.i(9165),c=e.i(29320);let l="spaces-terminal-token";function o({children:e}){let o=(0,n.useRouter)(),{isDesktop:d,basePath:u}=(0,c.useTier)(),[m,x]=(0,s.useState)("loading"),[h,p]=(0,s.useState)(""),[f,g]=(0,s.useState)(""),[b,y]=(0,s.useState)(""),[w,j]=(0,s.useState)(!1),k=(0,s.useRef)(null),N=`${u}/spaces_icon.png`;(0,s.useEffect)(()=>{if(d){p("desktop-local"),x("authorized");return}function e(){let e=sessionStorage.getItem(l);if(e){p(e),x("authorized");return}fetch((0,i.api)("/api/auth/totp/status")).then(e=>e.json()).then(e=>{e.enabled?(x("prompt"),setTimeout(()=>k.current?.focus(),100)):x("not-setup")}).catch(()=>x("not-setup"))}fetch((0,i.api)("/api/auth/me")).then(t=>{if(t.ok){p("session-auth"),x("authorized");return}return e()}).catch(()=>e())},[d]);let v=(0,s.useCallback)(async e=>{if(6!==e.length)return;j(!0),y("");let t=await fetch((0,i.api)("/api/auth/totp/verify"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:e,action:"verify"})}),s=await t.json();j(!1),s.success&&s.terminalToken?(sessionStorage.setItem(l,s.terminalToken),p(s.terminalToken),x("authorized")):(y(s.error||"Invalid code"),g(""),k.current?.focus())},[]);return"loading"===m?(0,t.jsx)("div",{className:"flex items-center justify-center h-screen bg-zinc-950",children:(0,t.jsx)(r.Loader2,{className:"w-6 h-6 animate-spin text-indigo-500"})}):"authorized"===m?(0,t.jsx)(t.Fragment,{children:e(h)}):"not-setup"===m?(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:N,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:()=>o.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)(a.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:N,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:k,type:"text",inputMode:"numeric",autoComplete:"one-time-code",placeholder:"000000",value:f,onChange:e=>{let t;g(t=e.target.value.replace(/\D/g,"").slice(0,6)),y(""),6===t.length&&v(t)},disabled:w,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}),w&&(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2 mt-3 text-xs text-zinc-400",children:[(0,t.jsx)(r.Loader2,{className:"w-3 h-3 animate-spin"}),"Verifying..."]}),b&&(0,t.jsx)("p",{className:"text-sm text-red-400 mt-3",children:b})]}),(0,t.jsx)("p",{className:"text-[11px] text-zinc-600",children:"Token is valid for 8 hours after verification."})]})})}e.s(["TotpGate",()=>o])},24134,e=>{"use strict";var t=e.i(47167),s=e.i(18050),r=e.i(71645),a=e.i(74080),n=e.i(37727),i=e.i(88699),c=e.i(43531),l=e.i(75254);let o=(0,l.default)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]),d=(0,l.default)("maximize-2",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]]),u=(0,l.default)("minimize-2",[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]]),m=(0,l.default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);var x=e.i(48256),h=e.i(61911),p=e.i(75157),f=e.i(73359);let g=t.default.env.NEXT_PUBLIC_WS_PATH;function b({pane:t,onClose:l,onUpdate:b,isMaximized:y,onToggleMaximize:w,onPopout:j,isPopout:k,terminalToken:N,workspaceCollaboration:v}){let C=(0,r.useRef)(null),z=(0,r.useRef)(null),T=(0,r.useRef)(null),S=(0,r.useRef)(null),[R,A]=(0,r.useState)(!1),[P,E]=(0,r.useState)(!1),[I,M]=(0,r.useState)(t.title),[F,L]=(0,r.useState)(!1),[$,G]=(0,r.useState)({x:0,y:0}),O=(0,r.useRef)(null),q=(0,r.useRef)(null),[B,_]=(0,r.useState)(!1),H=(0,r.useRef)(t);H.current=t;let J=(0,r.useRef)(b);J.current=b;let U=(0,r.useRef)(N);U.current=N;let W=(0,r.useRef)(!1),Y=(0,r.useRef)(!1),D=(0,r.useRef)(null),V=(0,r.useRef)(0),K=(0,r.useCallback)(async()=>{if(!C.current)return;H.current,Y.current=!1,V.current=0;let{Terminal:t}=await e.A(16049),{FitAddon:s}=await e.A(59439),{WebLinksAddon:r}=await e.A(16091);z.current&&z.current.dispose();let a=new t({cursorBlink:!0,fontSize:13,fontFamily:"'Cascadia Code', 'Fira Code', 'JetBrains Mono', Consolas, monospace",theme:{background:"#0a0a0a",foreground:"#e4e4e7",cursor:"#6366f1",selectionBackground:"#6366f133",black:"#18181b",red:"#ef4444",green:"#22c55e",yellow:"#eab308",blue:"#3b82f6",magenta:"#a855f7",cyan:"#06b6d4",white:"#e4e4e7",brightBlack:"#52525b",brightRed:"#f87171",brightGreen:"#4ade80",brightYellow:"#facc15",brightBlue:"#60a5fa",brightMagenta:"#c084fc",brightCyan:"#22d3ee",brightWhite:"#fafafa"},allowProposedApi:!0}),n=new s,i=new r;a.loadAddon(n),a.loadAddon(i),await new Promise(e=>requestAnimationFrame(()=>{if(C.current){a.open(C.current);try{n.fit()}catch{}}e()})),z.current=a,S.current=n;let c=()=>{try{n.fit()}catch{}};requestAnimationFrame(()=>requestAnimationFrame(c)),setTimeout(c,300);let l=()=>{let e,t,s,r,n;if(Y.current)return;V.current>0&&(a.write("\x1b[2J\x1b[H"),a.clear());let i=new WebSocket((t=new URLSearchParams({paneId:(e=H.current).id,cwd:e.cwd,agentType:e.agentType||"shell",cols:String(a.cols),rows:String(a.rows)}),e.claudeSessionId&&t.set("agentSession",e.claudeSessionId),e.customCommand&&t.set("customCommand",e.customCommand),e.nodeId&&t.set("nodeId",e.nodeId),(s=U.current)&&t.set("terminalToken",s),r=g||"/ws",n="https:"===location.protocol?"wss:":"ws:",`${n}//${location.host}${r}?${t}`));T.current=i,i.onopen=()=>{A(!0),_(!1),W.current=!1,V.current=0,setTimeout(()=>{if(S.current)try{S.current.fit()}catch{}},150)},i.onmessage=e=>{try{let t=JSON.parse(e.data);if("data"===t.type)a.write(t.data);else if("exit"===t.type){_(!0),W.current=!0;let e=t.reason?` — ${t.reason}`:"";a.write(`\r
|
|
2
|
+
\x1b[90m[Process exited with code ${t.exitCode}${e}]\x1b[0m\r
|
|
3
|
+
`)}else"error"===t.type?a.write(`\r
|
|
4
|
+
\x1b[31m${t.data}\x1b[0m\r
|
|
5
|
+
`):"session-detected"===t.type&&J.current(H.current.id,{claudeSessionId:t.sessionId})}catch{}},i.onclose=()=>{if(A(!1),!W.current&&!Y.current){let e=V.current;if(e<20){let t=Math.min(1e3*Math.pow(1.5,e),3e4);V.current=e+1,D.current=setTimeout(l,t)}}},i.onerror=()=>{A(!1)}};a.onData(e=>{T.current?.readyState===WebSocket.OPEN&&T.current.send(JSON.stringify({type:"data",data:e}))}),a.onResize(({cols:e,rows:t})=>{T.current?.readyState===WebSocket.OPEN&&T.current.send(JSON.stringify({type:"resize",cols:e,rows:t}))}),l()},[]);(0,r.useEffect)(()=>(K(),()=>{Y.current=!0,D.current&&clearTimeout(D.current),T.current?.close(),z.current?.dispose()}),[K]),(0,r.useEffect)(()=>{let e,t=new ResizeObserver(()=>{cancelAnimationFrame(e),e=requestAnimationFrame(()=>{if(S.current)try{S.current.fit()}catch{}})});return C.current&&t.observe(C.current),()=>{cancelAnimationFrame(e),t.disconnect()}},[]),(0,r.useEffect)(()=>{setTimeout(()=>{if(S.current)try{S.current.fit()}catch{}},50)},[y]);let X=()=>{b(t.id,{title:I}),E(!1)};return(0,r.useEffect)(()=>{if(!F)return;let e=e=>{let t=e.target;O.current&&!O.current.contains(t)&&q.current&&!q.current.contains(t)&&L(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[F]),(0,s.jsxs)("div",{className:(0,p.cn)("flex flex-col border rounded-lg overflow-hidden",y?"fixed inset-2 z-50":"","border-zinc-700"),style:{borderColor:`${t.color}60`},children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-3 py-1.5 text-xs select-none flex-shrink-0",style:{backgroundColor:`${t.color}60`},children:[(0,s.jsxs)("div",{ref:O,className:"flex-shrink-0",children:[(0,s.jsx)("button",{onClick:e=>{let t=e.currentTarget.getBoundingClientRect();G({x:t.left,y:t.bottom+6}),L(!F)},className:"w-3 h-3 rounded-full hover:ring-2 hover:ring-zinc-500 ring-offset-1 ring-offset-zinc-900 transition-shadow cursor-pointer",style:{backgroundColor:t.color},title:"Change color"}),F&&(0,a.createPortal)((0,s.jsx)("div",{ref:q,className:"fixed z-[9999] bg-zinc-800 border border-zinc-600 rounded-xl p-3 shadow-2xl",style:{left:$.x,top:$.y},children:(0,s.jsx)("div",{className:"grid grid-cols-4 gap-2.5",style:{width:132},children:["#ef4444","#f97316","#f59e0b","#eab308","#84cc16","#22c55e","#14b8a6","#06b6d4","#3b82f6","#6366f1","#8b5cf6","#a855f7","#d946ef","#ec4899","#f43f5e","#78716c"].map(e=>(0,s.jsx)("button",{onClick:()=>{b(t.id,{color:e}),L(!1)},className:`w-7 h-7 rounded-full border-2 transition-all hover:scale-110 ${t.color===e?"border-white scale-110 shadow-lg":"border-transparent hover:border-zinc-500"}`,style:{backgroundColor:e}},e))})}),document.body)]}),P?(0,s.jsxs)("div",{className:"flex items-center gap-1 flex-1",children:[(0,s.jsx)("input",{autoFocus:!0,value:I,onChange:e=>M(e.target.value),onKeyDown:e=>{"Enter"===e.key&&X(),"Escape"===e.key&&(M(t.title),E(!1))},className:"flex-1 bg-transparent border border-zinc-600 rounded px-1.5 py-0.5 text-xs focus:outline-none focus:border-indigo-400"}),(0,s.jsx)("button",{onClick:X,className:"text-green-400 hover:text-green-300",children:(0,s.jsx)(c.Check,{className:"w-3 h-3"})})]}):(0,s.jsxs)("div",{className:"flex items-center gap-1 flex-1 min-w-0 group/title",children:[(0,s.jsx)("span",{onDoubleClick:()=>E(!0),className:"truncate text-zinc-300 font-medium cursor-default",children:t.title}),(0,s.jsx)("button",{onClick:()=>E(!0),className:"text-zinc-600 hover:text-zinc-300 opacity-0 group-hover/title:opacity-100 transition-opacity flex-shrink-0",title:"Rename",children:(0,s.jsx)(i.Pencil,{className:"w-2.5 h-2.5"})})]}),(0,s.jsx)("span",{className:"text-[10px] text-zinc-500 truncate max-w-[120px]",title:t.cwd,children:t.cwd.split(/[/\\]/).pop()}),t.agentType&&"shell"!==t.agentType&&(0,s.jsx)("span",{className:"text-[9px] px-1.5 py-0.5 rounded font-medium",style:{backgroundColor:`${f.AGENT_TYPES[t.agentType]?.color||"#6366f1"}20`,color:f.AGENT_TYPES[t.agentType]?.color||"#6366f1"},children:f.AGENT_TYPES[t.agentType]?.name||t.agentType}),t.nodeId&&(0,s.jsxs)("span",{className:"text-[9px] px-1.5 py-0.5 rounded font-medium bg-blue-500/10 text-blue-400 flex items-center gap-0.5",children:[(0,s.jsx)(x.Globe,{className:"w-2.5 h-2.5"}),"remote"]}),v&&"shell"!==t.agentType&&(0,s.jsx)("button",{onClick:()=>b(t.id,{isCollaborating:!t.isCollaborating}),className:`transition-colors ${t.isCollaborating?"text-indigo-400 hover:text-indigo-300":"text-zinc-600 hover:text-zinc-400"}`,title:t.isCollaborating?"Collaborating — click to opt out":"Not collaborating — click to opt in",children:(0,s.jsx)(h.Users,{className:"w-3 h-3"})}),!R&&!B&&(0,s.jsx)("span",{className:"text-[10px] text-yellow-500",children:"connecting..."}),B&&(0,s.jsx)("button",{onClick:()=>{Y.current=!0,D.current&&clearTimeout(D.current),T.current?.close(),z.current?.dispose(),_(!1),W.current=!1,setTimeout(K,100)},className:"text-zinc-400 hover:text-white",title:"Restart",children:(0,s.jsx)(o,{className:"w-3 h-3"})}),!k&&j&&(0,s.jsx)("button",{onClick:()=>{j&&(Y.current=!0,D.current&&clearTimeout(D.current),T.current?.close(),z.current?.dispose(),j(t.id))},className:"text-zinc-400 hover:text-white",title:"Pop out to new window",children:(0,s.jsx)(m,{className:"w-3 h-3"})}),(0,s.jsx)("button",{onClick:()=>w(t.id),className:"text-zinc-400 hover:text-white",title:y?"Restore":"Maximize",children:y?(0,s.jsx)(u,{className:"w-3 h-3"}):(0,s.jsx)(d,{className:"w-3 h-3"})}),(0,s.jsx)("button",{onClick:()=>{confirm("Close this terminal?")&&l(t.id)},className:"text-zinc-400 hover:text-red-400",title:"Close",children:(0,s.jsx)(n.X,{className:"w-3 h-3"})})]}),(0,s.jsx)("div",{ref:C,className:"flex-1 bg-[#0a0a0a]",style:{minHeight:y?"calc(100vh - 100px)":"300px"}})]})}e.s(["TerminalPane",()=>b],24134)},63209,e=>{"use strict";let t=(0,e.i(75254).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)},10160,e=>{"use strict";var t=e.i(18050),s=e.i(71645),r=e.i(18566),a=e.i(31278),n=e.i(71689),i=e.i(48256),c=e.i(68054),l=e.i(63209),o=e.i(24134),d=e.i(34623),u=e.i(9165);function m({params:e}){return(0,t.jsx)(d.TotpGate,{children:s=>(0,t.jsx)(x,{params:e,terminalToken:s})})}function x({params:e,terminalToken:d}){let m=(0,r.useRouter)(),[x,h]=(0,s.useState)(null),[p,f]=(0,s.useState)(null),[g,b]=(0,s.useState)([]),[y,w]=(0,s.useState)(""),[j,k]=(0,s.useState)("#6366f1"),[N,v]=(0,s.useState)(""),[C,z]=(0,s.useState)(!0),[T,S]=(0,s.useState)(null),[R,A]=(0,s.useState)(null);(0,s.useEffect)(()=>{e.then(e=>{h(e.nodeId),f(e.workspaceId)})},[e]),(0,s.useEffect)(()=>{x&&p&&Promise.all([fetch((0,u.api)(`/api/network/proxy/${x}/workspaces/${p}`)).then(e=>{if(!e.ok)throw Error(`Failed to fetch workspace (${e.status})`);return e.json()}),fetch((0,u.api)(`/api/network/proxy/${x}/workspaces`)).then(e=>{if(!e.ok)throw Error(`Failed to fetch workspaces (${e.status})`);return e.json()})]).then(([e,t])=>{b((e.panes||[]).map(e=>({...e,nodeId:x,isPopout:!!e.isPopout})));let s=t.workspaces?.find(e=>String(e.id)===p);s&&(w(s.name),k(s.color),v(s.nodeName||"")),z(!1)}).catch(e=>{S(e.message),z(!1)})},[x,p]);let P=(0,s.useCallback)(()=>{},[]),E=(0,s.useCallback)(()=>{},[]),I=(0,s.useCallback)(e=>{A(t=>t===e?null:e)},[]);if(C)return(0,t.jsx)("div",{className:"flex items-center justify-center h-screen bg-zinc-950",children:(0,t.jsx)(a.Loader2,{className:"w-6 h-6 animate-spin text-indigo-500"})});if(T)return(0,t.jsxs)("div",{className:"h-screen flex flex-col items-center justify-center bg-zinc-950 text-zinc-100",children:[(0,t.jsx)(l.AlertCircle,{className:"w-8 h-8 text-red-500 mb-3"}),(0,t.jsx)("p",{className:"text-sm text-zinc-400 mb-4",children:T}),(0,t.jsxs)("button",{onClick:()=>m.push("/terminal"),className:"flex items-center gap-2 px-4 py-2 text-sm border border-zinc-700 text-zinc-400 rounded-lg hover:text-white hover:border-zinc-500 transition-colors",children:[(0,t.jsx)(n.ArrowLeft,{className:"w-4 h-4"}),"Back to Spaces"]})]});let M=g.filter(e=>!e.isPopout);return(0,t.jsxs)("div",{className:"h-screen flex flex-col bg-zinc-950 text-zinc-100",children:[(0,t.jsx)("div",{className:"flex items-center justify-between px-4 py-2 border-b border-zinc-800 flex-shrink-0",children:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("button",{onClick:()=>m.push("/terminal"),className:"p-1.5 -ml-1 text-zinc-500 hover:text-white hover:bg-zinc-800 rounded-md transition-colors",title:"Back to Spaces",children:(0,t.jsx)(n.ArrowLeft,{className:"w-4 h-4"})}),(0,t.jsx)("div",{className:"w-px h-4 bg-zinc-800"}),(0,t.jsx)(i.Globe,{className:"w-3.5 h-3.5 text-zinc-500"}),(0,t.jsx)("span",{className:"w-2.5 h-2.5 rounded-full flex-shrink-0",style:{backgroundColor:j}}),(0,t.jsx)("span",{className:"text-sm font-semibold",children:y||"Remote Workspace"}),N&&(0,t.jsxs)("span",{className:"text-xs text-zinc-500",children:["on ",N]}),(0,t.jsxs)("span",{className:"text-[11px] text-zinc-500",children:[M.length," pane",1!==M.length?"s":""]})]})}),0===M.length?(0,t.jsx)("div",{className:"flex-1 flex items-center justify-center",children:(0,t.jsxs)("div",{className:"text-center space-y-2",children:[(0,t.jsx)(c.Terminal,{className:"w-10 h-10 text-zinc-700 mx-auto"}),(0,t.jsx)("p",{className:"text-zinc-500 text-sm",children:"This remote workspace has no panes."})]})}):(0,t.jsx)("div",{className:"flex-1 p-2 gap-2 overflow-auto",style:{display:"grid",gridTemplateColumns:1===M.length?"1fr":M.length<=2||M.length<=4?"repeat(2, 1fr)":"repeat(3, 1fr)",gridAutoRows:M.length<=2?"1fr":"minmax(300px, 1fr)"},children:M.map(e=>R&&R!==e.id?null:(0,t.jsx)(o.TerminalPane,{pane:e,onClose:P,onUpdate:E,isMaximized:R===e.id,onToggleMaximize:I,terminalToken:d},e.id))})]})}e.s(["default",()=>m])},16049,e=>{e.v(t=>Promise.all(["static/chunks/e40d2bd3b4ce8192.js"].map(t=>e.l(t))).then(()=>t(44908)))},59439,e=>{e.v(t=>Promise.all(["static/chunks/af8bfb72187b7cbf.js"].map(t=>e.l(t))).then(()=>t(93309)))},16091,e=>{e.v(t=>Promise.all(["static/chunks/9768207ca0a51abd.js"].map(t=>e.l(t))).then(()=>t(52216)))}]);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,31278,e=>{"use strict";let t=(0,e.i(75254).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",()=>t],31278)},7233,e=>{"use strict";let t=(0,e.i(75254).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",()=>t],7233)},27612,e=>{"use strict";let t=(0,e.i(75254).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],27612)},64659,e=>{"use strict";let t=(0,e.i(75254).default)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);e.s(["ChevronDown",()=>t],64659)},14764,e=>{"use strict";let t=(0,e.i(75254).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],14764)},73359,e=>{"use strict";let t={shell:{id:"shell",name:"Shell",command:"",resumeFlag:"",supportsResume:!1,color:"#71717a",description:"Plain terminal shell"},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"},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])},34623,e=>{"use strict";var t=e.i(18050),s=e.i(71645),a=e.i(31278),n=e.i(39616),r=e.i(18566),i=e.i(9165),l=e.i(29320);let c="spaces-terminal-token";function o({children:e}){let o=(0,r.useRouter)(),{isDesktop:u,basePath:d}=(0,l.useTier)(),[m,x]=(0,s.useState)("loading"),[h,p]=(0,s.useState)(""),[f,b]=(0,s.useState)(""),[g,w]=(0,s.useState)(""),[j,y]=(0,s.useState)(!1),k=(0,s.useRef)(null),N=`${d}/spaces_icon.png`;(0,s.useEffect)(()=>{if(u){p("desktop-local"),x("authorized");return}function e(){let e=sessionStorage.getItem(c);if(e){p(e),x("authorized");return}fetch((0,i.api)("/api/auth/totp/status")).then(e=>e.json()).then(e=>{e.enabled?(x("prompt"),setTimeout(()=>k.current?.focus(),100)):x("not-setup")}).catch(()=>x("not-setup"))}fetch((0,i.api)("/api/auth/me")).then(t=>{if(t.ok){p("session-auth"),x("authorized");return}return e()}).catch(()=>e())},[u]);let v=(0,s.useCallback)(async e=>{if(6!==e.length)return;y(!0),w("");let t=await fetch((0,i.api)("/api/auth/totp/verify"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:e,action:"verify"})}),s=await t.json();y(!1),s.success&&s.terminalToken?(sessionStorage.setItem(c,s.terminalToken),p(s.terminalToken),x("authorized")):(w(s.error||"Invalid code"),b(""),k.current?.focus())},[]);return"loading"===m?(0,t.jsx)("div",{className:"flex items-center justify-center h-screen bg-zinc-950",children:(0,t.jsx)(a.Loader2,{className:"w-6 h-6 animate-spin text-indigo-500"})}):"authorized"===m?(0,t.jsx)(t.Fragment,{children:e(h)}):"not-setup"===m?(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:N,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:()=>o.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)(n.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:N,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:k,type:"text",inputMode:"numeric",autoComplete:"one-time-code",placeholder:"000000",value:f,onChange:e=>{let t;b(t=e.target.value.replace(/\D/g,"").slice(0,6)),w(""),6===t.length&&v(t)},disabled:j,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}),j&&(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2 mt-3 text-xs text-zinc-400",children:[(0,t.jsx)(a.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",()=>o])},94351,e=>{"use strict";let t=(0,e.i(75254).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],94351)},14661,e=>{"use strict";var t=e.i(18050),s=e.i(71645),a=e.i(75254);let n=(0,a.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"}]]),r=(0,a.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"}]]);var i=e.i(75157);function l({onTranscript:e}){let{isListening:a,isSupported:l,transcript:c,interimTranscript:o,startListening:u,stopListening:d}=function(){let[e,t]=(0,s.useState)(!1),[a,n]=(0,s.useState)(!1),[r,i]=(0,s.useState)(""),[l,c]=(0,s.useState)(""),o=(0,s.useRef)(null);(0,s.useEffect)(()=>{let e=window.SpeechRecognition||window.webkitSpeechRecognition;if(n(!!e),!e)return;let s=new e;s.continuous=!1,s.interimResults=!0,s.lang="en-US",s.onresult=e=>{let t="",s="";for(let a=e.resultIndex;a<e.results.length;a++){let n=e.results[a];n.isFinal?s+=n[0].transcript:t+=n[0].transcript}s?(i(s),c("")):c(t)},s.onerror=()=>{t(!1)},s.onend=()=>{t(!1)},o.current=s},[]);let u=(0,s.useCallback)(()=>{if(o.current&&!e){i(""),c("");try{o.current.start(),t(!0)}catch{}}},[e]);return{isListening:e,isSupported:a,transcript:r,interimTranscript:l,startListening:u,stopListening:(0,s.useCallback)(()=>{if(o.current){try{o.current.stop()}catch{}t(!1)}},[]),resetTranscript:(0,s.useCallback)(()=>{i(""),c("")},[])}}();return((0,s.useEffect)(()=>{c&&e(c)},[c,e]),l)?(0,t.jsxs)("div",{className:"relative flex-shrink-0",children:[(0,t.jsx)("button",{onClick:a?d:u,className:(0,i.cn)("p-2.5 rounded-xl transition-colors",a?"bg-red-500 text-white animate-pulse":"bg-zinc-800 text-zinc-400 hover:text-white"),children:a?(0,t.jsx)(r,{className:"w-4 h-4"}):(0,t.jsx)(n,{className:"w-4 h-4"})}),a&&o&&(0,t.jsx)("div",{className:"absolute bottom-full left-0 mb-2 px-3 py-1.5 bg-zinc-800 border border-zinc-700 rounded-lg text-xs text-zinc-300 whitespace-nowrap max-w-[200px] truncate shadow-xl",children:o})]}):null}e.s(["VoiceInput",()=>l],14661)},19027,e=>{"use strict";var t=e.i(18050),s=e.i(71645),a=e.i(7233),n=e.i(31278),r=e.i(64659),i=e.i(27612),l=e.i(94351),c=e.i(52008),o=e.i(47167),u=e.i(14661);let d=[{label:"Ctrl",data:null,modifier:"ctrl"},{label:"Esc",data:"\x1b"},{label:"Tab",data:" "},{label:"|",data:"|"},{label:"~",data:"~"},{label:"↑",data:"\x1b[A"},{label:"↓",data:"\x1b[B"},{label:"←",data:"\x1b[D"},{label:"→",data:"\x1b[C"}];function m({onSend:e}){let s=t=>{"ctrl"===t.modifier?e("\0"):t.data&&e(t.data)};return(0,t.jsxs)("div",{className:"flex items-center gap-1 px-2 py-1.5 bg-zinc-900 border-t border-zinc-800 overflow-x-auto",children:[d.map(e=>(0,t.jsx)("button",{onTouchStart:t=>{t.preventDefault(),s(e)},onClick:()=>s(e),className:"flex-shrink-0 px-3 py-1.5 text-xs font-mono bg-zinc-800 border border-zinc-700 rounded text-zinc-300 active:bg-zinc-700 select-none",children:e.label},e.label)),(0,t.jsx)(u.VoiceInput,{onTranscript:e})]})}var x=e.i(14764),h=e.i(75157);function p({onSend:e}){let[a,n]=(0,s.useState)(""),r=(0,s.useRef)(null);(0,s.useEffect)(()=>{r.current&&(r.current.style.height="auto",r.current.style.height=`${Math.min(r.current.scrollHeight,96)}px`)},[a]);let i=(0,s.useCallback)(()=>{a.trim()&&(e(a+"\r"),n(""),r.current?.focus())},[a,e]),l=(0,s.useCallback)(e=>{n(t=>t?`${t} ${e}`:e),r.current?.focus()},[]);return(0,t.jsx)("div",{className:"flex-shrink-0 border-t border-zinc-800 bg-zinc-950 pb-[env(safe-area-inset-bottom)]",children:(0,t.jsxs)("div",{className:"flex items-end gap-2 px-3 py-2",children:[(0,t.jsx)(u.VoiceInput,{onTranscript:l}),(0,t.jsx)("textarea",{ref:r,value:a,onChange:e=>n(e.target.value),placeholder:"Type a command...",rows:1,className:(0,h.cn)("flex-1 resize-none rounded-xl border px-3 py-2 text-sm bg-zinc-900","focus:outline-none focus:ring-1 focus:ring-indigo-500","placeholder:text-zinc-600 border-zinc-700","max-h-[96px]")}),(0,t.jsx)("button",{onClick:i,disabled:!a.trim(),className:(0,h.cn)("p-2.5 rounded-xl flex-shrink-0",a.trim()?"bg-indigo-500 text-white":"bg-zinc-800 text-zinc-600"),children:(0,t.jsx)(x.Send,{className:"w-4 h-4"})})]})})}let f=o.default.env.NEXT_PUBLIC_WS_PATH;function b({pane:a,terminalToken:n,isVisible:r,onIdleChange:i,onUserInput:l}){let c=(0,s.useRef)(null),o=(0,s.useRef)(null),u=(0,s.useRef)(null),d=(0,s.useRef)(null),[x,h]=(0,s.useState)(!1),[b,g]=(0,s.useState)(!1),w=(0,s.useRef)(a);w.current=a;let j=(0,s.useRef)(n);j.current=n;let y=(0,s.useRef)(l);y.current=l;let{idleState:k,markConnected:N,markDataReceived:v,markUserInput:C,markDisconnected:z}=function({paneId:e,onIdleChange:t}){let[a,n]=(0,s.useState)("initializing"),r=(0,s.useRef)(null),i=(0,s.useRef)(null),l=(0,s.useRef)(!1),c=(0,s.useRef)("initializing"),o=(0,s.useRef)(t);o.current=t;let u=(0,s.useRef)(e);u.current=e;let d=(0,s.useCallback)(e=>{c.current!==e&&(c.current=e,n(e),o.current?.(u.current,e))},[]),m=(0,s.useCallback)(()=>{r.current&&(clearTimeout(r.current),r.current=null),i.current&&(clearTimeout(i.current),i.current=null)},[]),x=(0,s.useCallback)(()=>{r.current&&clearTimeout(r.current),r.current=setTimeout(()=>{d("idle")},1500)},[d]),h=(0,s.useCallback)(()=>{m(),l.current=!0,d("initializing"),i.current=setTimeout(()=>{l.current=!1,"initializing"===c.current&&x()},3e3)},[m,d,x]),p=(0,s.useCallback)(()=>{l.current||(d("busy"),x())},[d,x]);return{idleState:a,markConnected:h,markDataReceived:p,markUserInput:(0,s.useCallback)(()=>{!l.current&&(d("busy"),r.current&&(clearTimeout(r.current),r.current=null))},[d]),markDisconnected:(0,s.useCallback)(()=>{m(),l.current=!1,d("initializing")},[m,d])}}({paneId:a.id,onIdleChange:i}),S=(0,s.useRef)(!1),T=(0,s.useRef)(!1),R=(0,s.useRef)(null),A=(0,s.useRef)(0),E=(0,s.useCallback)(async()=>{if(!c.current)return;w.current,T.current=!1,A.current=0;let{Terminal:t}=await e.A(16049),{FitAddon:s}=await e.A(59439),{WebLinksAddon:a}=await e.A(16091);o.current&&o.current.dispose();let n=new t({cursorBlink:!0,fontSize:16,fontFamily:"'Cascadia Code', 'Fira Code', 'JetBrains Mono', Consolas, monospace",theme:{background:"#0a0a0a",foreground:"#e4e4e7",cursor:"#6366f1",selectionBackground:"#6366f133",black:"#18181b",red:"#ef4444",green:"#22c55e",yellow:"#eab308",blue:"#3b82f6",magenta:"#a855f7",cyan:"#06b6d4",white:"#e4e4e7",brightBlack:"#52525b",brightRed:"#f87171",brightGreen:"#4ade80",brightYellow:"#facc15",brightBlue:"#60a5fa",brightMagenta:"#c084fc",brightCyan:"#22d3ee",brightWhite:"#fafafa"},allowProposedApi:!0}),r=new s,i=new a;n.loadAddon(r),n.loadAddon(i),n.open(c.current);try{r.fit()}catch{}o.current=n,d.current=r;let l=()=>{try{r.fit()}catch{}};requestAnimationFrame(()=>requestAnimationFrame(l)),setTimeout(l,300);let m=()=>{let e,t,s,a,r;if(T.current)return;A.current>0&&(n.write("\x1b[2J\x1b[H"),n.clear());let i=new WebSocket((t=new URLSearchParams({paneId:(e=w.current).id,cwd:e.cwd,agentType:e.agentType||"shell",cols:String(n.cols),rows:String(n.rows)}),e.claudeSessionId&&t.set("agentSession",e.claudeSessionId),e.customCommand&&t.set("customCommand",e.customCommand),(s=j.current)&&t.set("terminalToken",s),a=f||"/ws",r="https:"===location.protocol?"wss:":"ws:",`${r}//${location.host}${a}?${t}`));u.current=i,i.onopen=()=>{h(!0),g(!1),S.current=!1,A.current=0,N()},i.onmessage=e=>{try{let t=JSON.parse(e.data);"data"===t.type?(n.write(t.data),S.current||v()):"exit"===t.type?(g(!0),S.current=!0,z(),n.write(`\r
|
|
2
|
+
\x1b[90m[Process exited with code ${t.exitCode}]\x1b[0m\r
|
|
3
|
+
`)):"error"===t.type&&n.write(`\r
|
|
4
|
+
\x1b[31m${t.data}\x1b[0m\r
|
|
5
|
+
`)}catch{}},i.onclose=()=>{if(h(!1),z(),!S.current&&!T.current){let e=A.current;if(e<20){let t=Math.min(1e3*Math.pow(1.5,e),3e4);A.current=e+1,R.current=setTimeout(m,t)}}},i.onerror=()=>{h(!1),z()}};n.onData(e=>{u.current?.readyState===WebSocket.OPEN&&(u.current.send(JSON.stringify({type:"data",data:e})),C(),y.current?.(w.current.id))}),n.onResize(({cols:e,rows:t})=>{u.current?.readyState===WebSocket.OPEN&&u.current.send(JSON.stringify({type:"resize",cols:e,rows:t}))}),m()},[N,v,C,z]);(0,s.useEffect)(()=>(E(),()=>{T.current=!0,R.current&&clearTimeout(R.current),u.current?.close(),o.current?.dispose()}),[E]),(0,s.useEffect)(()=>{let e,t=new ResizeObserver(()=>{cancelAnimationFrame(e),e=requestAnimationFrame(()=>{if(d.current)try{d.current.fit()}catch{}})});return c.current&&t.observe(c.current),()=>{cancelAnimationFrame(e),t.disconnect()}},[]),(0,s.useEffect)(()=>{if(r&&d.current){let e=setTimeout(()=>{try{d.current?.fit()}catch{}},50);return()=>clearTimeout(e)}},[r]);let I=(0,s.useCallback)(e=>{u.current?.readyState===WebSocket.OPEN&&(u.current.send(JSON.stringify({type:"data",data:e})),C(),y.current?.(w.current.id))},[C]);return(0,t.jsxs)("div",{className:r?"flex flex-col flex-1 min-h-0":"invisible absolute inset-0 pointer-events-none flex flex-col flex-1 min-h-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-1.5 bg-zinc-900 border-b border-zinc-800 text-xs flex-shrink-0",children:[(0,t.jsx)("span",{className:"w-2 h-2 rounded-full",style:{backgroundColor:a.color}}),(0,t.jsx)("span",{className:"font-medium truncate flex-1",children:a.title}),!x&&!b&&(0,t.jsx)("span",{className:"text-yellow-500",children:"connecting..."}),b&&(0,t.jsx)("button",{onClick:()=>{T.current=!0,R.current&&clearTimeout(R.current),u.current?.close(),o.current?.dispose(),g(!1),S.current=!1,setTimeout(E,100)},className:"text-indigo-400 text-xs",children:"Restart"})]}),(0,t.jsx)("div",{ref:c,className:"flex-1 bg-[#0a0a0a]",style:{minHeight:"200px"}}),(0,t.jsx)(m,{onSend:I}),(0,t.jsx)(p,{onSend:I})]})}var g=e.i(34623),w=e.i(73359),j=e.i(9165),y=e.i(29320);function k(){return(0,t.jsx)(g.TotpGate,{children:e=>(0,t.jsx)(N,{terminalToken:e})})}function N({terminalToken:e}){let{basePath:o}=(0,y.useTier)(),[u,d]=(0,s.useState)([]),[m,x]=(0,s.useState)(!0),[p,f]=(0,s.useState)(!0),[g,k]=(0,s.useState)([]),[N,v]=(0,s.useState)(null),[C,z]=(0,s.useState)(!1),[S,T]=(0,s.useState)(null),[R,A]=(0,s.useState)(!1),[E,I]=(0,s.useState)(!1),[M,P]=(0,s.useState)({}),[O,F]=(0,s.useState)(!0),L=(0,s.useRef)(null),$=(0,s.useRef)(!1),G=(0,s.useCallback)(async()=>{let e=await fetch((0,j.api)("/api/workspaces")),t=await e.json();k(t);let s=t.find(e=>e.isActive);return v(s||null),f(!1),s||null},[]),J=(0,s.useCallback)(async()=>{let e=await fetch((0,j.api)("/api/panes")),t=await e.json();d(t),t.length>0&&!S&&T(t[0].id),x(!1)},[S]);(0,s.useEffect)(()=>{G().then(e=>{e&&z(!0)})},[G]),(0,s.useEffect)(()=>{C&&J()},[C,J]);let _=(0,s.useCallback)(async e=>{await fetch((0,j.api)("/api/workspaces"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"switch",workspaceId:e})}),await G(),T(null),x(!0),P({});let t=await fetch((0,j.api)("/api/panes")),s=await t.json();d(s),s.length>0&&T(s[0].id),x(!1),z(!0),I(!1)},[G]),B=(0,s.useCallback)(async()=>{let e=await fetch((0,j.api)("/api/workspaces"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"New Space",color:"#6366f1"})}),t=await e.json();await _(t.id)},[_]),[D,V]=(0,s.useState)("/");(0,s.useEffect)(()=>{fetch((0,j.api)("/api/config")).then(e=>e.json()).then(e=>{let t=e.devDirectories||[];t.length>0&&V(t[0])}).catch(()=>{})},[]);let H=(0,s.useCallback)(async e=>{let t=w.AGENT_TYPES[e],s="shell"===e?"Terminal":t?.name||"Agent",a=await fetch((0,j.api)("/api/panes"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:s,color:t?.color||"#6366f1",cwd:D,claudeSessionId:"shell"!==e?"new":void 0,agentType:e})}),n=await a.json();d(e=>[...e,n]),T(n.id),A(!1)},[D]),U=(0,s.useCallback)(async e=>{await fetch((0,j.api)(`/api/panes/${e}`),{method:"DELETE"}),P(t=>{let s={...t};return delete s[e],s}),d(t=>{let s=t.filter(t=>t.id!==e);return S===e&&T(s.length>0?s[0].id:null),s})},[S]),W=(0,s.useCallback)((e,t)=>{P(s=>({...s,[e]:t}))},[]),q=(0,s.useCallback)(e=>{if(O){if($.current){$.current=!1;return}L.current&&clearTimeout(L.current),L.current=setTimeout(()=>{P(t=>(d(s=>{let a=s.find(s=>s.id!==e&&"idle"===t[s.id]);return a&&T(a.id),s}),t))},800)}},[O]),Y=(0,s.useCallback)(e=>{L.current&&(clearTimeout(L.current),L.current=null),$.current=!0,T(e)},[]);(0,s.useEffect)(()=>()=>{L.current&&clearTimeout(L.current)},[]);let K=u.filter(e=>e.id!==S&&"idle"===M[e.id]).length;if(!C)return(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center h-[80dvh] px-6",children:[(0,t.jsx)("img",{src:`${o}/spaces_icon.png`,alt:"Spaces",className:"w-14 h-14 mb-4 opacity-60"}),(0,t.jsx)("h1",{className:"text-lg font-bold mb-1",children:"Spaces"}),(0,t.jsx)("p",{className:"text-zinc-500 text-sm mb-6",children:"Choose a workspace"}),p?(0,t.jsx)(n.Loader2,{className:"w-5 h-5 animate-spin text-indigo-500"}):(0,t.jsxs)("div",{className:"w-full max-w-sm space-y-2",children:[g.map(e=>(0,t.jsxs)("button",{onClick:()=>_(e.id),className:"flex items-center gap-3 w-full p-3.5 bg-zinc-900 border border-zinc-800 rounded-lg active:bg-zinc-800",children:[(0,t.jsx)("span",{className:"w-3 h-3 rounded-full flex-shrink-0",style:{backgroundColor:e.color}}),(0,t.jsx)("span",{className:"text-sm font-medium flex-1 text-left truncate",children:e.name}),(0,t.jsxs)("span",{className:"text-[11px] text-zinc-500",children:[e.paneCount||0," panes"]})]},e.id)),(0,t.jsxs)("button",{onClick:B,className:"flex items-center justify-center gap-2 w-full p-3 text-sm text-zinc-400 border border-zinc-800 border-dashed rounded-lg",children:[(0,t.jsx)(a.Plus,{className:"w-4 h-4"}),"New Workspace"]})]})]});if(m)return(0,t.jsx)("div",{className:"flex items-center justify-center h-[80dvh]",children:(0,t.jsx)(n.Loader2,{className:"w-5 h-5 animate-spin text-indigo-500"})});let X=u.find(e=>e.id===S);return(0,t.jsxs)("div",{className:"flex flex-col h-[calc(100dvh-64px)]",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 border-b border-zinc-800 flex-shrink-0 bg-zinc-950",children:[(0,t.jsx)("button",{onClick:()=>z(!1),className:"p-1.5 text-zinc-500 hover:text-white",children:(0,t.jsx)(l.Home,{className:"w-4 h-4"})}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsxs)("button",{onClick:()=>I(!E),className:"flex items-center gap-1.5 px-2 py-1 text-xs bg-zinc-900 border border-zinc-800 rounded-md",children:[N&&(0,t.jsx)("span",{className:"w-2 h-2 rounded-full",style:{backgroundColor:N.color}}),(0,t.jsx)("span",{className:"max-w-[80px] truncate",children:N?.name||"Space"}),(0,t.jsx)(r.ChevronDown,{className:"w-3 h-3 text-zinc-500"})]}),E&&(0,t.jsx)("div",{className:"absolute z-50 top-full left-0 mt-1 w-56 bg-zinc-800 border border-zinc-700 rounded-lg shadow-xl overflow-hidden",children:g.map(e=>(0,t.jsxs)("button",{onClick:()=>_(e.id),className:"flex items-center gap-2 w-full px-3 py-2.5 text-xs text-left hover:bg-zinc-700",children:[(0,t.jsx)("span",{className:"w-2 h-2 rounded-full",style:{backgroundColor:e.color}}),(0,t.jsx)("span",{className:"truncate flex-1",children:e.name}),(0,t.jsx)("span",{className:"text-zinc-500",children:e.paneCount||0})]},e.id))})]}),(0,t.jsxs)("div",{className:"flex-1 flex items-center gap-1 overflow-x-auto",children:[u.map(e=>{let s=S===e.id,a=!s&&"idle"===M[e.id];return(0,t.jsxs)("button",{onClick:()=>Y(e.id),className:(0,h.cn)("flex items-center gap-1.5 px-2.5 py-1 text-xs rounded-full flex-shrink-0 border transition-shadow",s?"bg-zinc-800 border-zinc-600 text-white":a?"border-transparent text-zinc-300 animate-idle-pulse":"border-transparent text-zinc-500"),style:a?{"--pulse-color":e.color}:void 0,children:[(0,t.jsx)("span",{className:(0,h.cn)("w-1.5 h-1.5 rounded-full",a&&"animate-ping-slow"),style:{backgroundColor:e.color}}),(0,t.jsx)("span",{className:"max-w-[60px] truncate",children:e.title})]},e.id)}),K>0&&(0,t.jsx)("span",{className:"flex-shrink-0 ml-1 px-1.5 py-0.5 text-[10px] font-bold rounded-full bg-amber-500/20 text-amber-400 border border-amber-500/30",children:K})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-shrink-0",children:[(0,t.jsx)("button",{onClick:()=>F(!O),className:(0,h.cn)("p-1.5 rounded-md transition-colors",O?"text-amber-400 bg-amber-500/10":"text-zinc-600"),title:O?"Auto-switch: on":"Auto-switch: off",children:(0,t.jsx)(c.Layers,{className:"w-3.5 h-3.5"})}),X&&(0,t.jsx)("button",{onClick:()=>U(X.id),className:"p-1.5 text-zinc-500 hover:text-red-400",title:"Close pane",children:(0,t.jsx)(i.Trash2,{className:"w-3.5 h-3.5"})}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("button",{onClick:()=>A(!R),className:"p-1.5 bg-indigo-600 text-white rounded-md",children:(0,t.jsx)(a.Plus,{className:"w-3.5 h-3.5"})}),R&&(0,t.jsx)("div",{className:"absolute z-50 top-full right-0 mt-1 w-48 bg-zinc-800 border border-zinc-700 rounded-lg shadow-xl overflow-hidden",children:w.AGENT_LIST.map(e=>(0,t.jsxs)("button",{onClick:()=>H(e.id),className:"flex items-center gap-2 w-full px-3 py-2.5 text-xs text-left hover:bg-zinc-700",children:[(0,t.jsx)("span",{className:"w-2 h-2 rounded-full",style:{backgroundColor:e.color}}),(0,t.jsx)("span",{children:e.name})]},e.id))})]})]})]}),u.length>0?(0,t.jsx)("div",{className:"flex-1 relative min-h-0",children:u.map(s=>(0,t.jsx)(b,{pane:s,isVisible:s.id===S,onIdleChange:W,onUserInput:q,terminalToken:e},s.id))}):(0,t.jsxs)("div",{className:"flex-1 flex flex-col items-center justify-center gap-3",children:[(0,t.jsx)("img",{src:`${o}/spaces_icon.png`,alt:"",className:"w-12 h-12 opacity-20"}),(0,t.jsx)("p",{className:"text-zinc-500 text-sm",children:"No panes."}),(0,t.jsxs)("button",{onClick:()=>H("shell"),className:"px-4 py-2 text-sm bg-indigo-600 text-white rounded-lg flex items-center gap-2",children:[(0,t.jsx)(a.Plus,{className:"w-4 h-4"}),"Add Terminal"]})]})]})}e.s(["default",()=>k],19027)},16049,e=>{e.v(t=>Promise.all(["static/chunks/e40d2bd3b4ce8192.js"].map(t=>e.l(t))).then(()=>t(44908)))},59439,e=>{e.v(t=>Promise.all(["static/chunks/af8bfb72187b7cbf.js"].map(t=>e.l(t))).then(()=>t(93309)))},16091,e=>{e.v(t=>Promise.all(["static/chunks/9768207ca0a51abd.js"].map(t=>e.l(t))).then(()=>t(52216)))}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,33525,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"warnOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},75254,e=>{"use strict";var t=e.i(71645);let r=(...e)=>e.filter((e,t,r)=>!!e&&""!==e.trim()&&r.indexOf(e)===t).join(" ").trim(),n=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,r)=>r?r.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)};var a={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let i=(0,t.forwardRef)(({color:e="currentColor",size:n=24,strokeWidth:i=2,absoluteStrokeWidth:o,className:s="",children:l,iconNode:u,...c},d)=>(0,t.createElement)("svg",{ref:d,...a,width:n,height:n,stroke:e,strokeWidth:o?24*Number(i)/Number(n):i,className:r("lucide",s),...!l&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(c)&&{"aria-hidden":"true"},...c},[...u.map(([e,r])=>(0,t.createElement)(e,r)),...Array.isArray(l)?l:[l]])),o=(e,a)=>{let o=(0,t.forwardRef)(({className:o,...s},l)=>(0,t.createElement)(i,{ref:l,iconNode:a,className:r(`lucide-${n(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,o),...s}));return o.displayName=n(e),o};e.s(["default",()=>o],75254)},7670,e=>{"use strict";function t(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=function e(t){var r,n,a="";if("string"==typeof t||"number"==typeof t)a+=t;else if("object"==typeof t)if(Array.isArray(t)){var i=t.length;for(r=0;r<i;r++)t[r]&&(n=e(t[r]))&&(a&&(a+=" "),a+=n)}else for(n in t)t[n]&&(a&&(a+=" "),a+=n);return a}(e))&&(n&&(n+=" "),n+=t);return n}e.s(["clsx",()=>t])},18566,(e,t,r)=>{t.exports=e.r(76562)},39616,e=>{"use strict";let t=(0,e.i(75254).default)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Settings",()=>t],39616)},86311,e=>{"use strict";let t=(0,e.i(75254).default)("message-square",[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]);e.s(["MessageSquare",()=>t],86311)},75505,e=>{"use strict";let t=(0,e.i(75254).default)("folder-open",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);e.s(["FolderOpen",()=>t],75505)},98183,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={assign:function(){return l},searchParamsToUrlQuery:function(){return i},urlQueryToSearchParams:function(){return s}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});function i(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function o(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function s(e){let t=new URLSearchParams;for(let[r,n]of Object.entries(e))if(Array.isArray(n))for(let e of n)t.append(r,o(e));else t.set(r,o(n));return t}function l(e,...t){for(let r of t){for(let t of r.keys())e.delete(t);for(let[t,n]of r.entries())e.append(t,n)}return e}},95057,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return s},formatWithValidation:function(){return u},urlObjectKeys:function(){return l}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let i=e.r(90809)._(e.r(98183)),o=/https?|ftp|gopher|file/;function s(e){let{auth:t,hostname:r}=e,n=e.protocol||"",a=e.pathname||"",s=e.hash||"",l=e.query||"",u=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?u=t+e.host:r&&(u=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(u+=":"+e.port)),l&&"object"==typeof l&&(l=String(i.urlQueryToSearchParams(l)));let c=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||o.test(n))&&!1!==u?(u="//"+(u||""),a&&"/"!==a[0]&&(a="/"+a)):u||(u=""),s&&"#"!==s[0]&&(s="#"+s),c&&"?"!==c[0]&&(c="?"+c),a=a.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${n}${u}${a}${c}${s}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return s(e)}},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return a}});let n=e.r(71645);function a(e,t){let r=(0,n.useRef)(null),a=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=a.current;t&&(a.current=null,t())}else e&&(r.current=i(e,n)),t&&(a.current=i(t,n))},[e,t])}function i(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18967,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={DecodeError:function(){return m},MiddlewareNotFoundError:function(){return v},MissingStaticPage:function(){return k},NormalizeError:function(){return b},PageNotFoundError:function(){return x},SP:function(){return y},ST:function(){return g},WEB_VITALS:function(){return i},execOnce:function(){return o},getDisplayName:function(){return d},getLocationOrigin:function(){return u},getURL:function(){return c},isAbsoluteUrl:function(){return l},isResSent:function(){return f},loadGetInitialProps:function(){return p},normalizeRepeatedSlashes:function(){return h},stringifyError:function(){return j}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let i=["CLS","FCP","FID","INP","LCP","TTFB"];function o(e){let t,r=!1;return(...n)=>(r||(r=!0,t=e(...n)),t)}let s=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>s.test(e);function u(){let{protocol:e,hostname:t,port:r}=window.location;return`${e}//${t}${r?":"+r:""}`}function c(){let{href:e}=window.location,t=u();return e.substring(t.length)}function d(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function f(e){return e.finished||e.headersSent}function h(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?`?${t.slice(1).join("?")}`:"")}async function p(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await p(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&f(r))return n;if(!n)throw Object.defineProperty(Error(`"${d(e)}.getInitialProps()" should resolve to an object. But found "${n}" instead.`),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return n}let y="u">typeof performance,g=y&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class m extends Error{}class b extends Error{}class x extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message=`Cannot find module for page: ${e}`}}class k extends Error{constructor(e,t){super(),this.message=`Failed to load static file for page: ${e} ${t}`}}class v extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function j(e){return JSON.stringify({message:e.message,stack:e.stack})}},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return i}});let n=e.r(18967),a=e.r(52817);function i(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,a.hasBasePath)(r.pathname)}catch(e){return!1}}},84508,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},22016,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return m},useLinkStatus:function(){return x}};for(var a in n)Object.defineProperty(r,a,{enumerable:!0,get:n[a]});let i=e.r(90809),o=e.r(18050),s=i._(e.r(71645)),l=e.r(95057),u=e.r(8372),c=e.r(18581),d=e.r(18967),f=e.r(5550);e.r(33525);let h=e.r(91949),p=e.r(73668),y=e.r(9396);function g(e){return"string"==typeof e?e:(0,l.formatUrl)(e)}function m(t){var r;let n,a,i,[l,m]=(0,s.useOptimistic)(h.IDLE_LINK_STATUS),x=(0,s.useRef)(null),{href:k,as:v,children:j,prefetch:w=null,passHref:P,replace:O,shallow:_,scroll:S,onClick:z,onMouseEnter:N,onTouchStart:E,legacyBehavior:M=!1,onNavigate:C,ref:A,unstable_dynamicOnHover:L,...T}=t;n=j,M&&("string"==typeof n||"number"==typeof n)&&(n=(0,o.jsx)("a",{children:n}));let R=s.default.useContext(u.AppRouterContext),U=!1!==w,$=!1!==w?null===(r=w)||"auto"===r?y.FetchStrategy.PPR:y.FetchStrategy.Full:y.FetchStrategy.PPR,{href:I,as:F}=s.default.useMemo(()=>{let e=g(k);return{href:e,as:v?g(v):e}},[k,v]);if(M){if(n?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});a=s.default.Children.only(n)}let B=M?a&&"object"==typeof a&&a.ref:A,D=s.default.useCallback(e=>(null!==R&&(x.current=(0,h.mountLinkInstance)(e,I,R,$,U,m)),()=>{x.current&&((0,h.unmountLinkForCurrentNavigation)(x.current),x.current=null),(0,h.unmountPrefetchableInstance)(e)}),[U,I,R,$,m]),K={ref:(0,c.useMergedRef)(D,B),onClick(t){M||"function"!=typeof z||z(t),M&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(t),!R||t.defaultPrevented||function(t,r,n,a,i,o,l){if("u">typeof window){let u,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((u=t.currentTarget.getAttribute("target"))&&"_self"!==u||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,p.isLocalURL)(r)){i&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),l){let e=!1;if(l({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(99781);s.default.startTransition(()=>{d(n||r,i?"replace":"push",o??!0,a.current)})}}(t,I,F,x,O,S,C)},onMouseEnter(e){M||"function"!=typeof N||N(e),M&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),R&&U&&(0,h.onNavigationIntent)(e.currentTarget,!0===L)},onTouchStart:function(e){M||"function"!=typeof E||E(e),M&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),R&&U&&(0,h.onNavigationIntent)(e.currentTarget,!0===L)}};return(0,d.isAbsoluteUrl)(F)?K.href=F:M&&!P&&("a"!==a.type||"href"in a.props)||(K.href=(0,f.addBasePath)(F)),i=M?s.default.cloneElement(a,K):(0,o.jsx)("a",{...T,...K,children:n}),(0,o.jsx)(b.Provider,{value:l,children:i})}e.r(84508);let b=(0,s.createContext)(h.IDLE_LINK_STATUS),x=()=>(0,s.useContext)(b);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},61911,e=>{"use strict";let t=(0,e.i(75254).default)("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]);e.s(["Users",()=>t],61911)},52008,e=>{"use strict";let t=(0,e.i(75254).default)("layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]);e.s(["Layers",()=>t],52008)},48256,e=>{"use strict";let t=(0,e.i(75254).default)("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);e.s(["Globe",()=>t],48256)},55436,e=>{"use strict";let t=(0,e.i(75254).default)("search",[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]);e.s(["Search",()=>t],55436)},21218,e=>{"use strict";let t=(0,e.i(75254).default)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);e.s(["Activity",()=>t],21218)},60289,e=>{"use strict";let t=(0,e.i(75254).default)("layout-dashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);e.s(["LayoutDashboard",()=>t],60289)},17923,e=>{"use strict";let t=(0,e.i(75254).default)("chart-column",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);e.s(["BarChart3",()=>t],17923)},92270,e=>{"use strict";let t=(0,e.i(75254).default)("log-out",[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]);e.s(["LogOut",()=>t],92270)},95914,e=>{"use strict";var t=e.i(18050),r=e.i(71645),n=e.i(22016),a=e.i(18566),i=e.i(60289),o=e.i(86311),s=e.i(75505),l=e.i(52008),u=e.i(17923),c=e.i(39616),d=e.i(55436),f=e.i(61911),h=e.i(21218),p=e.i(92270),y=e.i(48256),g=e.i(75157),m=e.i(9593),b=e.i(9165),x=e.i(29320);let k=[{href:"/terminal",label:"Spaces",icon:l.Layers},{href:"/",label:"Dashboard",icon:i.LayoutDashboard},{href:"/sessions",label:"Sessions",icon:o.MessageSquare},{href:"/projects",label:"Projects",icon:s.FolderOpen},{href:"/analytics",label:"Analytics",icon:u.BarChart3},{href:"/network",label:"Network",icon:y.Globe},{href:"/settings",label:"Settings",icon:c.Settings}],v={"/":"dashboard","/terminal":"terminal","/sessions":"sessions","/projects":"projects","/analytics":"analytics","/network":"network","/settings":"settings","/admin/users":"admin_users","/admin/analytics":"admin_analytics"};function j(){let e=(0,a.usePathname)(),i=(0,a.useRouter)(),{hasAuth:o,hasAdmin:s,hasNetwork:l,basePath:u}=(0,x.useTier)(),[c,y]=(0,r.useState)(null);(0,r.useEffect)(()=>{let t=v[e]||(e.startsWith("/sessions/")?"session_detail":e.slice(1));(0,m.trackPageView)(t)},[e]),(0,r.useEffect)(()=>{o&&fetch((0,b.api)("/api/auth/me")).then(e=>e.json()).then(e=>y(e.role)).catch(()=>{})},[o]);let j=async()=>{await fetch((0,b.api)("/api/auth/logout"),{method:"POST"}),i.push("/login")};return(0,t.jsxs)("aside",{className:"w-56 border-r border-zinc-200 dark:border-zinc-800 bg-zinc-50 dark:bg-zinc-950 flex flex-col h-screen fixed left-0 top-0",children:[(0,t.jsx)("div",{className:"p-4 border-b border-zinc-200 dark:border-zinc-800",children:(0,t.jsx)(n.default,{href:"/",children:(0,t.jsx)("img",{src:`${u}/spaces_logo.png`,alt:"Spaces",width:180,height:60})})}),(0,t.jsxs)("nav",{className:"flex-1 p-2 space-y-1",children:[k.filter(({href:e})=>"/network"!==e||l).map(({href:r,label:a,icon:i})=>{let o="/"===r?"/"===e:e.startsWith(r);return(0,t.jsxs)(n.default,{href:r,className:(0,g.cn)("flex items-center gap-3 px-3 py-2 rounded-md text-sm transition-colors",o?"bg-indigo-50 text-indigo-700 dark:bg-indigo-950 dark:text-indigo-300 font-medium":"text-zinc-600 dark:text-zinc-400 hover:bg-zinc-100 dark:hover:bg-zinc-900"),children:[(0,t.jsx)(i,{className:"w-4 h-4"}),a]},r)}),s&&"admin"===c&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.default,{href:"/admin/users",className:(0,g.cn)("flex items-center gap-3 px-3 py-2 rounded-md text-sm transition-colors",e.startsWith("/admin/users")?"bg-indigo-50 text-indigo-700 dark:bg-indigo-950 dark:text-indigo-300 font-medium":"text-zinc-600 dark:text-zinc-400 hover:bg-zinc-100 dark:hover:bg-zinc-900"),children:[(0,t.jsx)(f.Users,{className:"w-4 h-4"}),"Users"]}),(0,t.jsxs)(n.default,{href:"/admin/analytics",className:(0,g.cn)("flex items-center gap-3 px-3 py-2 rounded-md text-sm transition-colors",e.startsWith("/admin/analytics")?"bg-indigo-50 text-indigo-700 dark:bg-indigo-950 dark:text-indigo-300 font-medium":"text-zinc-600 dark:text-zinc-400 hover:bg-zinc-100 dark:hover:bg-zinc-900"),children:[(0,t.jsx)(h.Activity,{className:"w-4 h-4"}),"Activity"]})]})]}),(0,t.jsxs)("div",{className:"p-3 border-t border-zinc-200 dark:border-zinc-800 space-y-1",children:[(0,t.jsxs)(n.default,{href:"/sessions?search=true",className:"flex items-center gap-2 px-3 py-2 text-sm text-zinc-500 dark:text-zinc-400 hover:bg-zinc-100 dark:hover:bg-zinc-900 rounded-md",children:[(0,t.jsx)(d.Search,{className:"w-4 h-4"}),(0,t.jsx)("span",{children:"Search"}),(0,t.jsx)("kbd",{className:"ml-auto text-[10px] bg-zinc-200 dark:bg-zinc-800 px-1.5 py-0.5 rounded",children:"Ctrl+K"})]}),o&&(0,t.jsxs)("button",{onClick:j,className:"flex items-center gap-2 px-3 py-2 text-sm text-zinc-500 dark:text-zinc-400 hover:bg-zinc-100 dark:hover:bg-zinc-900 rounded-md w-full",children:[(0,t.jsx)(p.LogOut,{className:"w-4 h-4"}),(0,t.jsx)("span",{children:"Sign out"})]})]})]})}e.s(["Sidebar",()=>j])}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,9799,e=>{"use strict";var t=e.i(18050),s=e.i(71645),n=e.i(7233),a=e.i(31278),i=e.i(68054),r=e.i(55436),c=e.i(86311),l=e.i(75505),o=e.i(3116),d=e.i(64659),x=e.i(63059),p=e.i(75254);let m=(0,p.default)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);var h=e.i(27612),u=e.i(88699),b=e.i(43531),g=e.i(37727),f=e.i(74886),j=e.i(94351);let w=(0,p.default)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]),N=(0,p.default)("arrow-left-to-line",[["path",{d:"M3 19V5",key:"rwsyhb"}],["path",{d:"m13 6-6 6 6 6",key:"1yhaz7"}],["path",{d:"M7 12h14",key:"uoisry"}]]);var v=e.i(48256),y=e.i(63209),z=e.i(61911),k=e.i(18566),C=e.i(24134),S=e.i(98003);let T=(0,p.default)("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);var E=e.i(55900),P=e.i(39616),$=e.i(9165);function L({value:e,onChange:n}){let[i,r]=(0,s.useState)(!1),[c,o]=(0,s.useState)([]),[d,p]=(0,s.useState)(!1),[m,h]=(0,s.useState)(""),[u,b]=(0,s.useState)(null),[g,f]=(0,s.useState)(!1),[j,w]=(0,s.useState)("list"),N=(0,s.useRef)(null);(0,s.useEffect)(()=>{fetch((0,$.api)("/api/config")).then(e=>e.json()).then(e=>{o(e.devDirectories||[]),p(!0)}).catch(()=>p(!0))},[]),(0,s.useEffect)(()=>{i&&"browse"===j&&m&&(f(!0),fetch((0,$.api)(`/api/folders?path=${encodeURIComponent(m)}`)).then(e=>e.json()).then(e=>{b(e),f(!1)}).catch(()=>f(!1)))},[i,j,m]),(0,s.useEffect)(()=>{let e=e=>{N.current&&!N.current.contains(e.target)&&r(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let v=()=>{i?r(!1):(1===c.length?(w("browse"),h(c[0])):w("list"),r(!0))},y=e=>{n(e),r(!1)},z=e=>{h(e)},k=c.find(e=>u?.current===e||u?.current?.startsWith(e+"/")),C=k?.split("/").pop()||"",S=k&&u?.current?u.current.slice(k.length):"",L=S?S.split("/").filter(Boolean):[];return(0,t.jsxs)("div",{ref:N,className:"relative",children:[(0,t.jsxs)("div",{className:"flex items-center gap-0",children:[(0,t.jsx)("input",{type:"text",placeholder:"Working directory",value:e,onChange:e=>n(e.target.value),onFocus:()=>{i||v()},className:"flex-1 px-3 py-2 text-sm bg-zinc-800 border border-zinc-700 rounded-l-md focus:outline-none focus:border-indigo-500 text-white font-mono"}),(0,t.jsx)("button",{type:"button",onClick:v,className:"px-3 py-2 text-sm bg-zinc-700 border border-zinc-700 border-l-0 rounded-r-md hover:bg-zinc-600 text-zinc-300 hover:text-white transition-colors",title:"Browse folders",children:(0,t.jsx)(l.FolderOpen,{className:"w-4 h-4"})})]}),i&&(0,t.jsxs)("div",{className:"absolute z-50 top-full left-0 right-0 mt-1 bg-zinc-800 border border-zinc-700 rounded-md shadow-xl overflow-hidden",children:[d?0===c.length&&"list"===j?(0,t.jsxs)("div",{className:"py-6 px-4 text-center",children:[(0,t.jsx)(P.Settings,{className:"w-5 h-5 text-zinc-500 mx-auto mb-2"}),(0,t.jsx)("p",{className:"text-xs text-zinc-400 mb-1",children:"No development directories configured"}),(0,t.jsx)("p",{className:"text-[11px] text-zinc-500",children:"Add them in Settings to browse project folders here."})]}):"list"===j?(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"px-3 py-1.5 border-b border-zinc-700/50 text-[11px] text-zinc-500 font-medium",children:"Development Directories"}),(0,t.jsx)("div",{className:"max-h-[250px] overflow-y-auto",children:c.map(e=>(0,t.jsxs)("button",{className:"w-full flex items-center gap-2 px-3 py-2 text-xs hover:bg-zinc-700 transition-colors group",onClick:()=>{w("browse"),h(e)},onDoubleClick:()=>y(e),title:"Click to browse, double-click to select",children:[(0,t.jsx)(T,{className:"w-3.5 h-3.5 text-amber-500/70"}),(0,t.jsx)("span",{className:"font-mono text-white truncate flex-1 text-left",children:e}),(0,t.jsx)(x.ChevronRight,{className:"w-3 h-3 text-zinc-600 group-hover:text-zinc-400"})]},e))})]}):(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-0.5 px-2 py-1.5 border-b border-zinc-700/50 overflow-x-auto text-[11px] flex-nowrap",children:[c.length>1&&(0,t.jsx)("button",{onClick:()=>{w("list"),b(null)},className:"text-zinc-400 hover:text-white flex-shrink-0 p-0.5 mr-0.5",title:"Back to dev directories",children:(0,t.jsx)(E.ChevronUp,{className:"w-3 h-3"})}),(0,t.jsx)("button",{onClick:()=>k&&z(k),className:"text-zinc-400 hover:text-white flex-shrink-0",children:C}),L.map((e,s)=>{let n=k+"/"+L.slice(0,s+1).join("/");return(0,t.jsxs)("span",{className:"flex items-center gap-0.5 flex-shrink-0",children:[(0,t.jsx)(x.ChevronRight,{className:"w-2.5 h-2.5 text-zinc-600"}),(0,t.jsx)("button",{onClick:()=>z(n),className:"text-zinc-400 hover:text-white hover:underline",children:e})]},s)})]}),(0,t.jsx)("div",{className:"max-h-[250px] overflow-y-auto",children:g||!u?(0,t.jsx)("div",{className:"flex items-center justify-center py-6",children:(0,t.jsx)(a.Loader2,{className:"w-4 h-4 animate-spin text-zinc-400"})}):u.error?(0,t.jsx)("div",{className:"py-4 px-3 text-xs text-red-400 text-center",children:u.error}):(0,t.jsxs)(t.Fragment,{children:[u?.parent&&(0,t.jsxs)("button",{onClick:()=>z(u.parent),className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-zinc-400 hover:text-white hover:bg-zinc-700/50 transition-colors border-b border-zinc-700/30",children:[(0,t.jsx)(E.ChevronUp,{className:"w-3.5 h-3.5"}),(0,t.jsx)("span",{children:".."})]}),(0,t.jsxs)("button",{onClick:()=>y(u.current),className:"w-full flex items-center gap-2 px-3 py-2 text-xs text-indigo-400 hover:bg-indigo-500/10 transition-colors border-b border-zinc-700/30 font-medium",children:[(0,t.jsx)(l.FolderOpen,{className:"w-3.5 h-3.5"}),(0,t.jsx)("span",{children:"Select this folder"}),(0,t.jsx)("span",{className:"ml-auto text-[10px] text-zinc-500 font-mono truncate max-w-[200px]",children:u.current.split("/").pop()})]}),u?.folders.length===0?(0,t.jsx)("div",{className:"py-3 px-3 text-[11px] text-zinc-500 text-center",children:"No subfolders"}):u?.folders.map(e=>(0,t.jsxs)("button",{onClick:()=>z(e.path),onDoubleClick:()=>y(e.path),className:"w-full flex items-center gap-2 px-3 py-1.5 text-xs text-white hover:bg-zinc-700 transition-colors",title:"Click to open, double-click to select",children:[(0,t.jsx)(T,{className:"w-3.5 h-3.5 text-amber-500/70"}),(0,t.jsx)("span",{className:"truncate",children:e.name})]},e.path))]})})]}):(0,t.jsx)("div",{className:"flex items-center justify-center py-6",children:(0,t.jsx)(a.Loader2,{className:"w-4 h-4 animate-spin text-zinc-400"})}),(0,t.jsx)("div",{className:"border-t border-zinc-700/50 px-2 py-1 flex justify-end",children:(0,t.jsx)("button",{onClick:()=>r(!1),className:"text-[11px] text-zinc-500 hover:text-white px-2 py-0.5",children:"Close"})})]})]})}var A=e.i(68407),I=e.i(29320);function R({value:e,onChange:s}){let{hasNetwork:n}=(0,I.useTier)(),{data:a}=(0,A.useNodes)(n);return Array.isArray(a)&&0!==a.length?(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-[11px] text-zinc-400 mb-1.5 block",children:"Node"}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(v.Globe,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-zinc-500"}),(0,t.jsxs)("select",{value:e,onChange:e=>s(e.target.value),className:"w-full pl-8 pr-3 py-2 text-sm bg-zinc-800 border border-zinc-700 rounded-md focus:outline-none focus:border-indigo-500 text-white appearance-none",children:[(0,t.jsx)("option",{value:"",children:"Local (this machine)"}),a.map(e=>(0,t.jsx)("option",{value:e.id,disabled:"offline"===e.status,children:"offline"===e.status?`${e.name} (offline)`:e.name},e.id))]})]})]}):null}var D=e.i(34623),M=e.i(73359),O=e.i(3999),F=e.i(14764);let U=(0,p.default)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);var q=e.i(66027),K=e.i(54616),Q=e.i(12598);function _({workspaceId:e,panes:n,collapsed:a,onToggle:i}){let r,l,o,d,[p,m]=(0,s.useState)("messages"),[u,b]=(0,s.useState)(""),g=(0,s.useRef)(null),{data:f=[]}=(0,q.useQuery)({queryKey:["workspace-messages",e,void 0],queryFn:async()=>{let t=new URLSearchParams;return(await fetch((0,$.api)(`/api/workspaces/${e}/messages?${t}`))).json()},enabled:!!e,refetchInterval:3e3}),{data:j=[]}=(0,q.useQuery)({queryKey:["workspace-context",e],queryFn:async()=>(await fetch((0,$.api)(`/api/workspaces/${e}/context`))).json(),enabled:!!e}),w=(r=(0,Q.useQueryClient)(),(0,K.useMutation)({mutationFn:async t=>(await fetch((0,$.api)(`/api/workspaces/${e}/messages`),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...t,senderName:t.senderName||"User",type:t.type||"message"})})).json(),onSuccess:()=>{r.invalidateQueries({queryKey:["workspace-messages",e]})}})),N=(l=(0,Q.useQueryClient)(),(0,K.useMutation)({mutationFn:async({messageId:t,status:s})=>(await fetch((0,$.api)(`/api/workspaces/${e}/messages/${t}`),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:s})})).json(),onSuccess:()=>{l.invalidateQueries({queryKey:["workspace-messages",e]})}})),v=(o=(0,Q.useQueryClient)(),(0,K.useMutation)({mutationFn:async()=>{await fetch((0,$.api)(`/api/workspaces/${e}/messages`),{method:"DELETE"})},onSuccess:()=>{o.invalidateQueries({queryKey:["workspace-messages",e]})}})),y=(d=(0,Q.useQueryClient)(),(0,K.useMutation)({mutationFn:async()=>{await fetch((0,$.api)(`/api/workspaces/${e}/context`),{method:"DELETE"})},onSuccess:()=>{d.invalidateQueries({queryKey:["workspace-context",e]})}})),z=f.filter(e=>"pending_approval"===e.status).length;(0,s.useEffect)(()=>{g.current&&(g.current.scrollTop=g.current.scrollHeight)},[f]);let k=()=>{u.trim()&&e&&(w.mutate({content:u.trim()}),b(""))};return a?(0,t.jsxs)("button",{onClick:i,className:"flex-shrink-0 w-10 border-l border-zinc-800 bg-zinc-900 flex flex-col items-center pt-3 gap-2",children:[(0,t.jsx)(U,{className:"w-4 h-4 text-zinc-400"}),(0,t.jsx)(c.MessageSquare,{className:"w-4 h-4 text-zinc-400"}),z>0&&(0,t.jsx)("span",{className:"bg-amber-500 text-black text-xs font-bold rounded-full w-5 h-5 flex items-center justify-center",children:z})]}):(0,t.jsxs)("div",{className:"flex-shrink-0 w-80 border-l border-zinc-800 bg-zinc-900 flex flex-col",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-3 py-2 border-b border-zinc-800",children:[(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsxs)("button",{onClick:()=>m("messages"),className:`px-2 py-1 text-xs rounded ${"messages"===p?"bg-zinc-700 text-white":"text-zinc-400 hover:text-zinc-300"}`,children:["Messages",z>0&&(0,t.jsx)("span",{className:"ml-1 bg-amber-500 text-black text-xs font-bold rounded-full px-1.5",children:z})]}),(0,t.jsx)("button",{onClick:()=>m("context"),className:`px-2 py-1 text-xs rounded ${"context"===p?"bg-zinc-700 text-white":"text-zinc-400 hover:text-zinc-300"}`,children:"Context"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("button",{onClick:()=>"messages"===p?v.mutate():y.mutate(),className:"text-zinc-500 hover:text-red-400",title:"messages"===p?"Clear all messages":"Clear all context",children:(0,t.jsx)(h.Trash2,{className:"w-3.5 h-3.5"})}),(0,t.jsx)("button",{onClick:i,className:"text-zinc-400 hover:text-zinc-300",children:(0,t.jsx)(x.ChevronRight,{className:"w-4 h-4"})})]})]}),"messages"===p&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{ref:g,className:"flex-1 overflow-y-auto p-2 space-y-2",children:[[...f].reverse().map(e=>(0,t.jsx)(J,{message:e,panes:n,onApprove:()=>N.mutate({messageId:e.id,status:"approved"}),onReject:()=>N.mutate({messageId:e.id,status:"rejected"})},e.id)),0===f.length&&(0,t.jsx)("p",{className:"text-zinc-500 text-xs text-center py-8",children:"No messages yet. Agents will appear here."})]}),(0,t.jsx)("div",{className:"border-t border-zinc-800 p-2",children:(0,t.jsxs)("div",{className:"flex gap-1",children:[(0,t.jsx)("input",{value:u,onChange:e=>b(e.target.value),onKeyDown:e=>"Enter"===e.key&&!e.shiftKey&&k(),placeholder:"Message workspace...",className:"flex-1 bg-zinc-800 border border-zinc-700 rounded px-2 py-1 text-sm text-zinc-200 placeholder-zinc-500 focus:outline-none focus:border-zinc-600"}),(0,t.jsx)("button",{onClick:k,disabled:!u.trim(),className:"px-2 py-1 bg-indigo-600 hover:bg-indigo-500 disabled:bg-zinc-700 disabled:text-zinc-500 rounded text-sm",children:(0,t.jsx)(F.Send,{className:"w-3.5 h-3.5"})})]})})]}),"context"===p&&(0,t.jsx)(H,{workspaceId:e,context:j})]})}function J({message:e,panes:s,onApprove:n,onReject:a}){let i=s.find(t=>t.id===e.paneId),r="pending_approval"===e.status,c="rejected"===e.status;return(0,t.jsxs)("div",{className:`rounded p-2 text-xs ${r?"bg-amber-950/50 border border-amber-800/50":c?"bg-zinc-800/50 opacity-50":"bg-zinc-800/50"}`,children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,t.jsxs)("span",{className:"font-medium text-zinc-300",children:[i&&(0,t.jsx)("span",{className:"inline-block w-2 h-2 rounded-full mr-1",style:{backgroundColor:i.color||"#6366f1"}}),e.senderName]}),(0,t.jsx)("span",{className:"text-zinc-500",children:new Date(e.created).toLocaleTimeString()})]}),(0,t.jsx)("p",{className:"text-zinc-300 whitespace-pre-wrap",children:e.content}),r&&(0,t.jsxs)("div",{className:"flex gap-1 mt-2",children:[(0,t.jsxs)("button",{onClick:n,className:"flex items-center gap-1 px-2 py-0.5 bg-green-700 hover:bg-green-600 rounded text-white text-xs",children:[(0,t.jsx)(b.Check,{className:"w-3 h-3"})," Approve"]}),(0,t.jsxs)("button",{onClick:a,className:"flex items-center gap-1 px-2 py-0.5 bg-zinc-700 hover:bg-zinc-600 rounded text-zinc-300 text-xs",children:[(0,t.jsx)(g.X,{className:"w-3 h-3"})," Reject"]})]}),"rejected"===e.status&&(0,t.jsx)("span",{className:"text-red-400 text-xs mt-1 block",children:"Rejected"})]})}function H({workspaceId:e,context:n}){let a,i,[r,c]=(0,s.useState)(""),[l,o]=(0,s.useState)(""),d=(a=(0,Q.useQueryClient)(),(0,K.useMutation)({mutationFn:async({key:t,value:s})=>(await fetch((0,$.api)(`/api/workspaces/${e}/context/${encodeURIComponent(t)}`),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({value:s})})).json(),onSuccess:()=>{a.invalidateQueries({queryKey:["workspace-context",e]})}})),x=(i=(0,Q.useQueryClient)(),(0,K.useMutation)({mutationFn:async t=>{await fetch((0,$.api)(`/api/workspaces/${e}/context/${encodeURIComponent(t)}`),{method:"DELETE"})},onSuccess:()=>{i.invalidateQueries({queryKey:["workspace-context",e]})}})),p=()=>{r.trim()&&l.trim()&&(d.mutate({key:r.trim(),value:l.trim()}),c(""),o(""))};return(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto p-2 space-y-2",children:[n.map(e=>(0,t.jsxs)("div",{className:"bg-zinc-800/50 rounded p-2 text-xs",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,t.jsx)("span",{className:"font-mono font-medium text-indigo-300",children:e.key}),(0,t.jsx)("button",{onClick:()=>x.mutate(e.key),className:"text-zinc-500 hover:text-red-400",children:(0,t.jsx)(g.X,{className:"w-3 h-3"})})]}),(0,t.jsx)("p",{className:"text-zinc-300 whitespace-pre-wrap font-mono text-xs",children:e.value}),(0,t.jsxs)("span",{className:"text-zinc-500 text-xs",children:["by ",e.updatedBy]})]},e.key)),(0,t.jsxs)("div",{className:"border-t border-zinc-800 pt-2 space-y-1",children:[(0,t.jsx)("input",{value:r,onChange:e=>c(e.target.value),placeholder:"Key",className:"w-full bg-zinc-800 border border-zinc-700 rounded px-2 py-1 text-xs text-zinc-200 placeholder-zinc-500 focus:outline-none"}),(0,t.jsx)("input",{value:l,onChange:e=>o(e.target.value),placeholder:"Value",onKeyDown:e=>"Enter"===e.key&&p(),className:"w-full bg-zinc-800 border border-zinc-700 rounded px-2 py-1 text-xs text-zinc-200 placeholder-zinc-500 focus:outline-none"}),(0,t.jsx)("button",{onClick:p,disabled:!r.trim()||!l.trim(),className:"w-full px-2 py-1 bg-indigo-600 hover:bg-indigo-500 disabled:bg-zinc-700 disabled:text-zinc-500 rounded text-xs",children:"Add Entry"})]})]})}var G=e.i(9593);function B(){return(0,t.jsx)(D.TotpGate,{children:e=>(0,t.jsx)(W,{terminalToken:e})})}function W({terminalToken:e}){let p=(0,k.useRouter)(),{basePath:T,hasNetwork:E,hasCollaboration:P}=(0,I.useTier)(),[A,D]=(0,s.useState)([]),[F,U]=(0,s.useState)(!0),[q,K]=(0,s.useState)(!0),[J,H]=(0,s.useState)(!1),[B,W]=(0,s.useState)(null),[V,X]=(0,s.useState)(new Set),[Y,Z]=(0,s.useState)(!1),[ee,et]=(0,s.useState)(!0);!function(){let e=(0,Q.useQueryClient)(),{hasCollaboration:t}=(0,I.useTier)();(0,s.useEffect)(()=>{if(!t)return;let s=new EventSource((0,$.api)("/api/events")),n=()=>{e.invalidateQueries({queryKey:["workspace-messages"]})},a=()=>{e.invalidateQueries({queryKey:["workspace-context"]})};return s.addEventListener("workspace:message",n),s.addEventListener("workspace:request",n),s.addEventListener("workspace:context_updated",a),()=>{s.removeEventListener("workspace:message",n),s.removeEventListener("workspace:request",n),s.removeEventListener("workspace:context_updated",a),s.close()}},[e,t])}();let[es,en]=(0,s.useState)([]),[ea,ei]=(0,s.useState)(null),[er,ec]=(0,s.useState)(!1),[el,eo]=(0,s.useState)(!1),[ed,ex]=(0,s.useState)(""),[ep,em]=(0,s.useState)("#6366f1"),[eh,eu]=(0,s.useState)(null),[eb,eg]=(0,s.useState)(""),[ef,ej]=(0,s.useState)(""),[ew,eN]=(0,s.useState)(""),[ev,ey]=(0,s.useState)("#6366f1"),[ez,ek]=(0,s.useState)(""),[eC,eS]=(0,s.useState)("shell"),[eT,eE]=(0,s.useState)("new"),[eP,e$]=(0,s.useState)(""),[eL,eA]=(0,s.useState)(""),eI=(0,O.useRemoteWorkspaces)(),[eR,eD]=(0,s.useState)(new Set),eM=(0,s.useCallback)(e=>{eD(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},[]),[eO,eF]=(0,s.useState)(""),[eU,eq]=(0,s.useState)([]),[eK,eQ]=(0,s.useState)(!1),[e_,eJ]=(0,s.useState)(!1),[eH,eG]=(0,s.useState)(null),[eB,eW]=(0,s.useState)(!0),eV=(0,s.useRef)(null),eX=(0,s.useRef)(null),eY=(0,s.useRef)(null),eZ=(0,s.useCallback)(async()=>{let e=await fetch((0,$.api)("/api/workspaces")),t=await e.json();en(t);let s=t.find(e=>e.isActive);return ei(s||null),K(!1),s||null},[]),e0=(0,s.useCallback)(async()=>{let e=await fetch((0,$.api)("/api/panes")),t=await e.json();D(t);let s=new Set;for(let e of t)e.isPopout&&s.add(e.id);X(s),U(!1)},[]);(0,s.useEffect)(()=>{eZ().then(e=>{e&&Z(!0)})},[eZ]),(0,s.useEffect)(()=>{Y&&e0()},[Y,e0]),(0,s.useEffect)(()=>{let e=new BroadcastChannel("spaces-panes");return eY.current=e,e.onmessage=e=>{let t=e.data;"popout-opened"===t.type?X(e=>new Set(e).add(t.paneId)):"popout-closed"===t.type?(X(e=>{let s=new Set(e);return s.delete(t.paneId),s}),e0()):"pane-updated"===t.type&&D(e=>e.map(e=>e.id===t.paneId?{...e,...t.data}:e))},()=>e.close()},[e0]);let[e1,e5]=(0,s.useState)(0);(0,s.useEffect)(()=>{if(!F)for(let e of A)e.isPopout&&e7(e)},[F,e1]),(0,s.useEffect)(()=>{if("claude"!==eC||"resume"!==eT)return;eQ(!0);let e=setTimeout(()=>{let e=new URLSearchParams({sortBy:"modified",sortDir:"DESC",limit:"200"});eO&&e.set("search",eO),eB&&ew&&e.set("projectPath",ew),e.set("agentType",eC),fetch((0,$.api)(`/api/sessions?${e}`)).then(e=>e.json()).then(e=>{eq(e.sessions||[]),eQ(!1)}).catch(()=>eQ(!1))},300*!!eO);return()=>clearTimeout(e)},[eC,eT,eO,eB,ew]),(0,s.useEffect)(()=>{function e(e){eV.current&&!eV.current.contains(e.target)&&eJ(!1),eX.current&&!eX.current.contains(e.target)&&ec(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let e2=(0,s.useCallback)(async()=>{let e,t=M.AGENT_TYPES[eC],s=ew||eH?.projectPath||"/";"shell"!==eC&&(e="resume"===eT&&t?.supportsResume?eH?.sessionId||ez:"new");let n=ef||(eH?eH.customName||eH.firstPrompt?.slice(0,50)||t?.name||"Agent":"")||("shell"===eC?"Terminal":t?.name||"Agent"),a=ea?.collaboration&&"shell"!==eC,i=await fetch((0,$.api)("/api/panes"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:n,color:ev,cwd:s,claudeSessionId:e,agentType:eC,customCommand:"custom"===eC?eP:void 0,nodeId:eL||void 0,isCollaborating:a||void 0})}),r=await i.json();D(e=>[...e,r]),(0,G.track)("pane_created",{agentType:eC}),H(!1),ej(""),eN(""),ey("#6366f1"),ek(""),eS("shell"),eE("new"),e$(""),eA(""),eG(null),eF("")},[ef,ew,ev,ez,eC,eT,eP,eL,eH]),e3=(0,s.useCallback)(async e=>{let t=A.find(t=>t.id===e);await fetch((0,$.api)(`/api/panes/${e}`),{method:"DELETE"}),D(t=>t.filter(t=>t.id!==e)),t&&(0,G.track)("pane_closed",{agentType:t.agentType}),B===e&&W(null),X(t=>{let s=new Set(t);return s.delete(e),s})},[B,A]),e4=(0,s.useCallback)(async(e,t)=>{await fetch((0,$.api)(`/api/panes/${e}`),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),D(s=>s.map(s=>s.id===e?{...s,...t}:s))},[]),e6=(0,s.useCallback)(e=>{W(t=>t===e?null:e)},[]),e7=(0,s.useCallback)(e=>{let t=e.winWidth||900,s=e.winHeight||600,n=e.winX??Math.round(screen.width/2-t/2),a=e.winY??Math.round(screen.height/2-s/2),i=`left=${n},top=${a},width=${t},height=${s},menubar=no,toolbar=no,location=no,status=no`;window.open((0,$.api)(`/terminal/pane/${e.id}`),`spaces-pane-${e.id}`,i),X(t=>new Set(t).add(e.id)),fetch((0,$.api)(`/api/panes/${e.id}`),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isPopout:!0,winX:n,winY:a,winWidth:t,winHeight:s})})},[]),e8=(0,s.useCallback)(e=>{let t=A.find(t=>t.id===e);t&&e7(t)},[A,e7]),e9=(0,s.useCallback)(async e=>{eY.current?.postMessage({type:"close-popouts"}),await fetch((0,$.api)(`/api/panes/${e}`),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isPopout:!1})}),X(t=>{let s=new Set(t);return s.delete(e),s})},[]),te=(0,s.useCallback)(()=>{V.size>0&&(eY.current?.postMessage({type:"close-popouts"}),X(new Set))},[V]),tt=(0,s.useCallback)(async e=>{te(),await fetch((0,$.api)("/api/workspaces"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"switch",workspaceId:e})}),W(null),await eZ(),await e0(),ec(!1),Y?(0,G.track)("workspace_switched"):(0,G.track)("workspace_entered"),Z(!0),e5(e=>e+1)},[eZ,e0,te,Y]),ts=(0,s.useCallback)(async()=>{ed.trim()&&ea&&(await fetch((0,$.api)("/api/workspaces"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"duplicate",sourceId:ea.id,name:ed.trim(),color:ep})}),ex(""),em("#6366f1"),eo(!1),await eZ())},[ed,ep,ea,eZ]),tn=(0,s.useCallback)(async()=>{let e=await fetch((0,$.api)("/api/workspaces"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"New Space",color:"#6366f1"})}),t=await e.json();(0,G.track)("workspace_created"),await tt(t.id)},[tt]),ta=(0,s.useCallback)(async e=>{te(),await fetch((0,$.api)(`/api/workspaces/${e}`),{method:"DELETE"}),(0,G.track)("workspace_deleted"),await eZ(),await e0(),ec(!1)},[eZ,e0,te]),ti=(0,s.useCallback)(()=>{te(),D([]),Z(!1)},[te]),tr=(0,s.useCallback)(async(e,t)=>{await fetch((0,$.api)(`/api/workspaces/${e}`),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t})}),eu(null),await eZ()},[eZ]),tc=A.filter(e=>!V.has(e.id));return Y?F?(0,t.jsx)("div",{className:"flex items-center justify-center h-screen bg-zinc-950",children:(0,t.jsx)(a.Loader2,{className:"w-6 h-6 animate-spin text-indigo-500"})}):(0,t.jsxs)("div",{className:"h-screen flex flex-col bg-zinc-950 text-zinc-100",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between px-4 py-2 border-b border-zinc-800 flex-shrink-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("button",{onClick:ti,className:"p-1.5 -ml-1 text-zinc-500 hover:text-white hover:bg-zinc-800 rounded-md transition-colors",title:"Close space and go home",children:(0,t.jsx)(j.Home,{className:"w-4 h-4"})}),(0,t.jsx)("div",{className:"w-px h-4 bg-zinc-800"}),(0,t.jsx)("h1",{className:"text-sm font-semibold",children:"Spaces"}),(0,t.jsxs)("div",{ref:eX,className:"relative",children:[(0,t.jsxs)("button",{onClick:()=>ec(!er),className:"flex items-center gap-1.5 px-2.5 py-1 text-xs bg-zinc-800 border border-zinc-700 rounded-md hover:border-zinc-600 transition-colors",children:[ea&&(0,t.jsx)("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:ea.color}}),(0,t.jsx)("span",{className:"max-w-[150px] truncate",children:ea?.name||"No space"}),(0,t.jsx)(d.ChevronDown,{className:"w-3 h-3 text-zinc-500"})]}),er&&(0,t.jsxs)("div",{className:"absolute z-50 top-full left-0 mt-1 w-72 bg-zinc-800 border border-zinc-700 rounded-md shadow-xl overflow-hidden",children:[(0,t.jsx)("div",{className:"p-2 border-b border-zinc-700/50 text-[10px] text-zinc-500 uppercase tracking-wider font-medium",children:"Switch Space"}),(0,t.jsx)("div",{className:"max-h-[300px] overflow-y-auto",children:es.map(e=>(0,t.jsx)("div",{className:"flex items-center gap-2 hover:bg-zinc-700/50 transition-colors group",children:eh===e.id?(0,t.jsxs)("div",{className:"flex items-center gap-1 flex-1 px-3 py-2",children:[(0,t.jsx)("input",{autoFocus:!0,value:eb,onChange:e=>eg(e.target.value),onKeyDown:t=>{"Enter"===t.key&&tr(e.id,eb),"Escape"===t.key&&eu(null)},className:"flex-1 bg-transparent border border-zinc-600 rounded px-1.5 py-0.5 text-xs focus:outline-none focus:border-indigo-400"}),(0,t.jsx)("button",{onClick:()=>tr(e.id,eb),className:"text-green-400 hover:text-green-300",children:(0,t.jsx)(b.Check,{className:"w-3 h-3"})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{onClick:()=>tt(e.id),className:"flex items-center gap-2 flex-1 px-3 py-2 text-left",children:[(0,t.jsx)("span",{className:"w-2.5 h-2.5 rounded-full flex-shrink-0",style:{backgroundColor:e.color}}),(0,t.jsx)("span",{className:"text-xs text-white truncate flex-1",children:e.name}),(0,t.jsxs)("span",{className:"text-[10px] text-zinc-500",children:[e.paneCount||0," panes"]}),e.isActive&&(0,t.jsx)("span",{className:"text-[10px] text-indigo-400",children:"active"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-0.5 pr-2 opacity-0 group-hover:opacity-100",children:[(0,t.jsx)("button",{onClick:t=>{t.stopPropagation(),eu(e.id),eg(e.name)},className:"p-1 text-zinc-500 hover:text-white rounded",title:"Rename",children:(0,t.jsx)(u.Pencil,{className:"w-2.5 h-2.5"})}),!e.isActive&&es.length>1&&(0,t.jsx)("button",{onClick:t=>{t.stopPropagation(),confirm(`Delete space "${e.name}" and all its panes?`)&&ta(e.id)},className:"p-1 text-zinc-500 hover:text-red-400 rounded",title:"Delete",children:(0,t.jsx)(h.Trash2,{className:"w-2.5 h-2.5"})})]})]})},e.id))}),(0,t.jsxs)("div",{className:"border-t border-zinc-700/50 p-1.5 flex gap-1",children:[(0,t.jsxs)("button",{onClick:tn,className:"flex items-center gap-1.5 px-2.5 py-1.5 text-[11px] text-zinc-400 hover:text-white hover:bg-zinc-700 rounded transition-colors flex-1",children:[(0,t.jsx)(n.Plus,{className:"w-3 h-3"})," New Empty"]}),(0,t.jsxs)("button",{onClick:()=>{eo(!0),ec(!1)},className:"flex items-center gap-1.5 px-2.5 py-1.5 text-[11px] text-zinc-400 hover:text-white hover:bg-zinc-700 rounded transition-colors flex-1",children:[(0,t.jsx)(f.Copy,{className:"w-3 h-3"})," Duplicate Current"]})]})]})]}),(0,t.jsxs)("span",{className:"text-[11px] text-zinc-500",children:[tc.length," pane",1!==tc.length?"s":"",V.size>0&&` + ${V.size} popped out`]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[P&&ea&&(0,t.jsxs)("button",{onClick:async()=>{let e=!ea.collaboration;await fetch((0,$.api)(`/api/workspaces/${ea.id}`),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({collaboration:e})}),ei(t=>t?{...t,collaboration:e}:t),en(t=>t.map(t=>t.id===ea.id?{...t,collaboration:e}:t))},className:`flex items-center gap-1.5 px-2.5 py-1.5 text-xs rounded-md border transition-colors ${ea.collaboration?"border-indigo-500/50 bg-indigo-600/20 text-indigo-400":"border-zinc-700 text-zinc-500 hover:text-zinc-300 hover:border-zinc-600"}`,title:ea.collaboration?"Collaboration enabled — click to disable":"Enable collaboration for this workspace",children:[(0,t.jsx)(z.Users,{className:"w-3.5 h-3.5"}),"Collab"]}),(0,t.jsxs)("button",{onClick:ti,className:"flex items-center gap-1.5 px-3 py-1.5 text-xs border border-zinc-700 text-zinc-400 rounded-md hover:text-white hover:border-zinc-600 transition-colors",title:"Close space and return home",children:[(0,t.jsx)(w,{className:"w-3.5 h-3.5"}),"Close"]}),(0,t.jsxs)("button",{onClick:()=>H(!0),className:"flex items-center gap-1.5 px-3 py-1.5 text-xs bg-indigo-600 text-white rounded-md hover:bg-indigo-500 transition-colors",children:[(0,t.jsx)(n.Plus,{className:"w-3.5 h-3.5"}),"Add Pane"]})]})]}),el&&(0,t.jsx)("div",{className:"border-b border-zinc-800 bg-zinc-900 px-4 py-3",children:(0,t.jsxs)("div",{className:"max-w-md flex items-center gap-2",children:[(0,t.jsx)(m,{className:"w-4 h-4 text-indigo-400 flex-shrink-0"}),(0,t.jsx)("input",{autoFocus:!0,type:"text",placeholder:"New space name...",value:ed,onChange:e=>ex(e.target.value),onKeyDown:e=>"Enter"===e.key&&ts(),className:"flex-1 px-3 py-1.5 text-sm bg-zinc-800 border border-zinc-700 rounded-md focus:outline-none focus:border-indigo-500 text-white"}),(0,t.jsx)(S.ColorPicker,{value:ep,onChange:em}),(0,t.jsx)("button",{onClick:ts,disabled:!ed.trim(),className:"px-3 py-1.5 text-xs bg-indigo-600 text-white rounded-md hover:bg-indigo-500 disabled:opacity-50",children:"Save"}),(0,t.jsx)("button",{onClick:()=>eo(!1),className:"p-1.5 text-zinc-400 hover:text-white",children:(0,t.jsx)(g.X,{className:"w-4 h-4"})})]})}),J&&(0,t.jsx)("div",{className:"border-b border-zinc-800 bg-zinc-900 px-4 py-4",children:(0,t.jsxs)("div",{className:"max-w-lg space-y-3",children:[(0,t.jsx)("h3",{className:"text-sm font-semibold",children:"Add Pane"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-[11px] text-zinc-400 mb-1.5 block",children:"Agent"}),(0,t.jsx)("div",{className:"grid grid-cols-3 gap-1.5",children:M.AGENT_LIST.map(e=>(0,t.jsxs)("button",{onClick:()=>{eS(e.id),eE("new"),eG(null),ek("")},className:`flex items-center gap-2 px-3 py-2 rounded-md border text-left transition-colors ${eC===e.id?"border-indigo-500 bg-indigo-600/20 text-white":"border-zinc-700 text-zinc-400 hover:text-white hover:border-zinc-600"}`,children:[(0,t.jsx)("span",{className:"w-2.5 h-2.5 rounded-full flex-shrink-0",style:{backgroundColor:e.color}}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("div",{className:"text-xs font-medium truncate",children:e.name}),(0,t.jsx)("div",{className:"text-[10px] text-zinc-500 truncate",children:e.description})]})]},e.id))})]}),M.AGENT_TYPES[eC]?.supportsResume&&(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)("button",{onClick:()=>{eE("new"),eG(null),ek("")},className:`px-3 py-1.5 text-xs rounded-md border transition-colors ${"new"===eT?"bg-indigo-600 border-indigo-500 text-white":"border-zinc-700 text-zinc-400 hover:text-white hover:border-zinc-600"}`,children:"New Session"}),(0,t.jsx)("button",{onClick:()=>eE("resume"),className:`px-3 py-1.5 text-xs rounded-md border transition-colors ${"resume"===eT?"bg-indigo-600 border-indigo-500 text-white":"border-zinc-700 text-zinc-400 hover:text-white hover:border-zinc-600"}`,children:"Resume Session"})]}),"custom"===eC&&(0,t.jsx)("input",{type:"text",placeholder:"Command to run (e.g. python agent.py)",value:eP,onChange:e=>e$(e.target.value),className:"w-full px-3 py-2 text-sm bg-zinc-800 border border-zinc-700 rounded-md focus:outline-none focus:border-indigo-500 text-white font-mono"}),(0,t.jsx)(R,{value:eL,onChange:eA}),(0,t.jsx)("input",{type:"text",placeholder:"Title (optional)",value:ef,onChange:e=>ej(e.target.value),className:"w-full px-3 py-2 text-sm bg-zinc-800 border border-zinc-700 rounded-md focus:outline-none focus:border-indigo-500 text-white"}),eL?(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-[11px] text-zinc-400 mb-1.5 block",children:"Working directory (on remote node)"}),(0,t.jsx)("input",{type:"text",placeholder:"e.g. /home/user/project or ~ for home",value:ew,onChange:e=>eN(e.target.value),className:"w-full px-3 py-2 text-sm bg-zinc-800 border border-zinc-700 rounded-md focus:outline-none focus:border-indigo-500 text-white font-mono"})]}):(0,t.jsx)(L,{value:ew,onChange:eN}),"claude"===eC&&"resume"===eT&&(0,t.jsxs)("div",{ref:eV,className:"relative",children:[eH?(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 text-sm bg-zinc-800 border border-zinc-700 rounded-md",children:[(0,t.jsx)(c.MessageSquare,{className:"w-3.5 h-3.5 text-indigo-400 flex-shrink-0"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"text-white truncate",children:eH.customName||eH.firstPrompt?.slice(0,60)||"Untitled"}),(0,t.jsxs)("div",{className:"text-[10px] text-zinc-500 flex items-center gap-2",children:[(0,t.jsx)("span",{children:eH.projectName}),(0,t.jsxs)("span",{children:[eH.messageCount," msgs"]}),(0,t.jsxs)("span",{className:"font-mono",children:[eH.sessionId.slice(0,8),"..."]})]})]}),(0,t.jsx)("button",{onClick:()=>{eG(null),eJ(!0)},className:"text-zinc-400 hover:text-white text-xs",children:"Change"})]}):(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 text-sm bg-zinc-800 border border-zinc-700 rounded-md cursor-text",onClick:()=>eJ(!0),children:[(0,t.jsx)(r.Search,{className:"w-3.5 h-3.5 text-zinc-500"}),(0,t.jsx)("input",{type:"text",placeholder:"Search sessions by name, prompt, or project...",value:eO,onChange:e=>{eF(e.target.value),eJ(!0)},onFocus:()=>eJ(!0),className:"flex-1 bg-transparent focus:outline-none text-white placeholder:text-zinc-500"}),ew&&(0,t.jsx)("button",{onClick:e=>{e.stopPropagation(),eW(!eB)},className:`flex-shrink-0 px-1.5 py-0.5 text-[10px] rounded border transition-colors ${eB?"border-indigo-500/50 bg-indigo-600/20 text-indigo-400":"border-zinc-600 text-zinc-500 hover:text-zinc-400"}`,title:eB?"Showing sessions for this directory — click to show all":"Showing all sessions — click to filter by directory",children:eB?ew.split("/").pop():"All"}),(0,t.jsx)(d.ChevronDown,{className:"w-3.5 h-3.5 text-zinc-500"})]}),e_&&!eH&&(0,t.jsx)("div",{className:"absolute z-50 top-full left-0 right-0 mt-1 max-h-[300px] overflow-y-auto bg-zinc-800 border border-zinc-700 rounded-md shadow-xl",children:eK?(0,t.jsxs)("div",{className:"flex items-center justify-center py-6",children:[(0,t.jsx)(a.Loader2,{className:"w-4 h-4 animate-spin text-zinc-400"}),(0,t.jsx)("span",{className:"text-xs text-zinc-400 ml-2",children:"Loading sessions..."})]}):0===eU.length?(0,t.jsx)("div",{className:"py-4 px-3 text-xs text-zinc-500 text-center",children:eO?"No sessions match your search":"No sessions found"}):eU.map(e=>(0,t.jsx)("button",{onClick:()=>{eG(e),ek(e.sessionId),!ew&&e.projectPath&&eN(e.projectPath),ef||ej(e.customName||""),eJ(!1)},className:"w-full text-left px-3 py-2.5 hover:bg-zinc-700 border-b border-zinc-700/50 last:border-0 transition-colors",children:(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[(0,t.jsx)(c.MessageSquare,{className:"w-3.5 h-3.5 text-indigo-400 mt-0.5 flex-shrink-0"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"text-xs text-white truncate",children:e.customName||e.firstPrompt?.slice(0,70)||"Untitled session"}),(0,t.jsxs)("div",{className:"flex items-center gap-2 mt-0.5",children:[(0,t.jsxs)("span",{className:"text-[10px] text-indigo-400/70 flex items-center gap-0.5",children:[(0,t.jsx)(l.FolderOpen,{className:"w-2.5 h-2.5"}),e.projectName]}),(0,t.jsxs)("span",{className:"text-[10px] text-zinc-500",children:[e.messageCount," msgs"]}),(0,t.jsxs)("span",{className:"text-[10px] text-zinc-500 flex items-center gap-0.5",children:[(0,t.jsx)(o.Clock,{className:"w-2.5 h-2.5"}),new Date(e.modified).toLocaleDateString()]}),e.starred&&(0,t.jsx)("span",{className:"text-[10px]",children:"★"})]}),e.tags?.length>0&&(0,t.jsx)("div",{className:"flex gap-1 mt-1",children:e.tags.map(e=>(0,t.jsx)("span",{className:"text-[9px] px-1.5 py-0.5 bg-zinc-700 rounded text-zinc-400",children:e},e))})]})]})},e.sessionId))})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"text-[11px] text-zinc-400 mb-1.5 block",children:"Color"}),(0,t.jsx)(S.ColorPicker,{value:ev,onChange:ey})]}),(0,t.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,t.jsx)("button",{onClick:e2,disabled:"custom"===eC&&!eP.trim(),className:"px-4 py-2 text-sm bg-indigo-600 text-white rounded-md hover:bg-indigo-500 disabled:opacity-50 disabled:cursor-not-allowed",children:"Create"}),(0,t.jsx)("button",{onClick:()=>H(!1),className:"px-4 py-2 text-sm border border-zinc-700 text-zinc-400 rounded-md hover:text-white hover:border-zinc-600",children:"Cancel"})]})]})}),V.size>0&&(0,t.jsxs)("div",{className:"flex items-center gap-2 px-4 py-1.5 border-b border-zinc-800 bg-zinc-900/50",children:[(0,t.jsx)("span",{className:"text-[10px] text-zinc-500",children:"Popped out:"}),A.filter(e=>V.has(e.id)).map(e=>(0,t.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,t.jsxs)("button",{onClick:()=>e7(e),className:"flex items-center gap-1 px-2 py-0.5 text-[10px] bg-zinc-800 border border-zinc-700 rounded-l text-zinc-400 hover:text-white hover:border-zinc-600",title:"Focus popout window",children:[(0,t.jsx)("span",{className:"w-1.5 h-1.5 rounded-full",style:{backgroundColor:e.color}}),e.title]}),(0,t.jsx)("button",{onClick:()=>e9(e.id),className:"px-1 py-0.5 text-[10px] bg-zinc-800 border border-zinc-700 border-l-0 rounded-r text-zinc-500 hover:text-white hover:border-zinc-600",title:"Pop back into grid",children:(0,t.jsx)(N,{className:"w-2.5 h-2.5"})})]},e.id))]}),(0,t.jsxs)("div",{className:"flex-1 flex overflow-hidden min-h-0",children:[0===tc.length&&0===V.size?(0,t.jsx)("div",{className:"flex-1 flex items-center justify-center",children:(0,t.jsxs)("div",{className:"text-center space-y-3",children:[(0,t.jsx)("img",{src:`${T}/spaces_icon.png`,alt:"Spaces",className:"w-16 h-16 mx-auto opacity-30"}),(0,t.jsx)("p",{className:"text-zinc-500",children:"No panes yet."}),(0,t.jsx)("p",{className:"text-zinc-600 text-xs",children:"Add a pane to start a shell, Claude, Codex, Gemini, or any agent."}),(0,t.jsxs)("button",{onClick:()=>H(!0),className:"px-4 py-2 text-sm bg-indigo-600 text-white rounded-md hover:bg-indigo-500 inline-flex items-center gap-2",children:[(0,t.jsx)(n.Plus,{className:"w-4 h-4"}),"Add your first pane"]})]})}):0===tc.length?(0,t.jsx)("div",{className:"flex-1 flex items-center justify-center",children:(0,t.jsxs)("div",{className:"text-center space-y-2",children:[(0,t.jsx)("p",{className:"text-zinc-500 text-sm",children:"All panes are popped out to separate windows."}),(0,t.jsxs)("button",{onClick:()=>H(!0),className:"px-3 py-1.5 text-xs text-zinc-400 hover:text-white border border-zinc-700 rounded-md hover:border-zinc-600 inline-flex items-center gap-1.5",children:[(0,t.jsx)(n.Plus,{className:"w-3.5 h-3.5"}),"Add another pane"]})]})}):(0,t.jsx)("div",{className:"flex-1 p-2 gap-2 overflow-auto h-full",style:{display:"grid",gridTemplateColumns:1===tc.length?"1fr":tc.length<=2||tc.length<=4?"repeat(2, 1fr)":"repeat(3, 1fr)",gridAutoRows:tc.length<=2?"1fr":"minmax(300px, 1fr)"},children:tc.map(s=>B&&B!==s.id?null:(0,t.jsx)(C.TerminalPane,{pane:s,onClose:e3,onUpdate:e4,isMaximized:B===s.id,onToggleMaximize:e6,onPopout:e8,terminalToken:e,workspaceCollaboration:ea?.collaboration},s.id))}),ea?.collaboration&&(0,t.jsx)(_,{workspaceId:ea?.id??null,panes:tc.map(e=>({id:e.id,title:e.title,agentType:e.agentType,color:e.color})),collapsed:ee,onToggle:()=>et(!ee)})]})]}):(0,t.jsxs)("div",{className:"h-screen flex flex-col bg-zinc-950 text-zinc-100",children:[(0,t.jsx)("div",{className:"absolute top-4 left-4",children:(0,t.jsxs)("button",{onClick:()=>p.push("/"),className:"flex items-center gap-2 px-3 py-1.5 text-xs text-zinc-500 hover:text-white hover:bg-zinc-800 rounded-md transition-colors",children:[(0,t.jsx)(j.Home,{className:"w-3.5 h-3.5"}),"Home"]})}),(0,t.jsx)("div",{className:"flex-1 flex items-center justify-center p-8",children:(0,t.jsxs)("div",{className:"w-full max-w-2xl",children:[(0,t.jsxs)("div",{className:"text-center mb-10",children:[(0,t.jsx)("img",{src:`${T}/spaces_icon.png`,alt:"Spaces",className:"w-16 h-16 mx-auto mb-4"}),(0,t.jsx)("h1",{className:"text-2xl font-bold mb-2",children:"Spaces"}),(0,t.jsx)("p",{className:"text-zinc-400 text-sm",children:"Choose a workspace to open, or create a new one."})]}),q?(0,t.jsx)("div",{className:"flex justify-center py-12",children:(0,t.jsx)(a.Loader2,{className:"w-6 h-6 animate-spin text-indigo-500"})}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"grid grid-cols-2 gap-3 mb-6",children:es.map(e=>(0,t.jsxs)("button",{onClick:()=>tt(e.id),className:"flex items-center gap-3 p-4 bg-zinc-900 border border-zinc-800 rounded-lg hover:border-zinc-600 hover:bg-zinc-800/50 transition-colors text-left group",children:[(0,t.jsx)("span",{className:"w-3.5 h-3.5 rounded-full flex-shrink-0",style:{backgroundColor:e.color}}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"text-sm font-medium text-white truncate",children:e.name}),(0,t.jsxs)("div",{className:"text-xs text-zinc-500 mt-0.5",children:[e.paneCount||0," pane",1!==(e.paneCount||0)?"s":"",e.isActive&&(0,t.jsx)("span",{className:"text-indigo-400 ml-2",children:"last active"})]})]}),(0,t.jsx)(i.Terminal,{className:"w-4 h-4 text-zinc-600 group-hover:text-zinc-400 transition-colors"})]},e.id))}),(0,t.jsx)("div",{className:"flex justify-center",children:(0,t.jsxs)("button",{onClick:tn,className:"flex items-center gap-2 px-4 py-2.5 text-sm border border-zinc-700 text-zinc-400 rounded-lg hover:text-white hover:border-zinc-500 transition-colors",children:[(0,t.jsx)(n.Plus,{className:"w-4 h-4"}),"New Workspace"]})}),E&&eI.isLoading&&(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2 py-4 mt-6 border-t border-zinc-800",children:[(0,t.jsx)(a.Loader2,{className:"w-4 h-4 animate-spin text-zinc-500"}),(0,t.jsx)("span",{className:"text-xs text-zinc-500",children:"Loading network spaces..."})]}),E&&eI.data?.remote&&eI.data.remote.length>0&&(0,t.jsxs)("div",{className:"mt-6 border-t border-zinc-800 pt-6",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,t.jsx)(v.Globe,{className:"w-4 h-4 text-zinc-500"}),(0,t.jsx)("h2",{className:"text-sm font-medium text-zinc-400",children:"Network Spaces"})]}),eI.data.remote.map(e=>(0,t.jsxs)("div",{className:"mb-3",children:[(0,t.jsxs)("button",{onClick:()=>eM(e.nodeId),className:"flex items-center gap-2 w-full px-2 py-1.5 text-left text-xs text-zinc-400 hover:text-white rounded-md hover:bg-zinc-800/50 transition-colors",children:[eR.has(e.nodeId)?(0,t.jsx)(x.ChevronRight,{className:"w-3.5 h-3.5 text-zinc-600"}):(0,t.jsx)(d.ChevronDown,{className:"w-3.5 h-3.5 text-zinc-600"}),(0,t.jsx)(v.Globe,{className:"w-3 h-3 text-zinc-600"}),(0,t.jsx)("span",{className:"font-medium",children:e.nodeName}),(0,t.jsxs)("span",{className:"text-zinc-600",children:[e.workspaces.length," space",1!==e.workspaces.length?"s":""]})]}),!eR.has(e.nodeId)&&(0,t.jsx)("div",{className:"grid grid-cols-2 gap-2 mt-2 ml-5",children:e.workspaces.map(s=>(0,t.jsxs)("button",{onClick:()=>{p.push(`/terminal/remote/${e.nodeId}/${s.id}`)},className:"flex items-center gap-3 p-3 bg-zinc-900/50 border border-zinc-800/50 rounded-lg hover:border-zinc-600 hover:bg-zinc-800/30 transition-colors text-left group",children:[(0,t.jsx)("span",{className:"w-3 h-3 rounded-full flex-shrink-0 ring-1 ring-zinc-700",style:{backgroundColor:s.color}}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-zinc-300 truncate",children:s.name}),(0,t.jsxs)("div",{className:"text-[10px] text-zinc-600 mt-0.5",children:[s.paneCount||0," pane",1!==(s.paneCount||0)?"s":""]})]}),(0,t.jsx)(v.Globe,{className:"w-3 h-3 text-zinc-700 group-hover:text-zinc-500 transition-colors"})]},`${e.nodeId}-${s.id}`))})]},e.nodeId)),eI.data.errors&&eI.data.errors.length>0&&(0,t.jsx)("div",{className:"mt-3 space-y-1",children:eI.data.errors.map(e=>(0,t.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 text-[10px] text-zinc-600",children:[(0,t.jsx)(y.AlertCircle,{className:"w-3 h-3 text-red-500/50"}),(0,t.jsxs)("span",{children:[e.nodeName,": ",e.error]})]},e.nodeId))})]})]})]})})]})}e.s(["default",()=>B],9799)}]);
|