@hivemagnus/magnus-ui 1.1.0 → 1.1.2
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/dist/app/apps/dashboard/.next/BUILD_ID +1 -1
- package/dist/app/apps/dashboard/.next/build-manifest.json +3 -3
- package/dist/app/apps/dashboard/.next/prerender-manifest.json +3 -3
- package/dist/app/apps/dashboard/.next/required-server-files.json +2 -2
- package/dist/app/apps/dashboard/.next/server/app/_global-error/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_global-error.html +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_global-error.rsc +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_not-found/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/anomalies/[anomalyId]/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/anomalies/[anomalyId]/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/anomalies/[anomalyId]/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/anomalies/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/anomalies/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/anomalies/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/anomalies/remediation/page.js +4 -4
- package/dist/app/apps/dashboard/.next/server/app/anomalies/remediation/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/anomalies/remediation/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/auth/hive/callback/route.js +7 -7
- package/dist/app/apps/dashboard/.next/server/app/api/auth/hive/callback/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/auth/hive/configured/route.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/api/auth/hive/configured/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/auth/hive/start/route.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/api/auth/hive/start/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/auth/login/route.js +6 -6
- package/dist/app/apps/dashboard/.next/server/app/api/auth/login/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/auth/logout/route.js +5 -5
- package/dist/app/apps/dashboard/.next/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/auth/me/route.js +4 -4
- package/dist/app/apps/dashboard/.next/server/app/api/auth/me/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/control-nodes/[id]/route.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/control-nodes/[id]/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/control-nodes/migrate/route.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/control-nodes/migrate/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/control-nodes/route.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/api/control-nodes/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/federation/route.js +10 -10
- package/dist/app/apps/dashboard/.next/server/app/api/federation/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/health/route.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/api/health/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/hermes/dashboard/[[...path]]/route.js +10 -10
- package/dist/app/apps/dashboard/.next/server/app/api/hermes/dashboard/[[...path]]/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/hive-router/dashboard/[[...path]]/route.js +7 -7
- package/dist/app/apps/dashboard/.next/server/app/api/hive-router/dashboard/[[...path]]/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/internal/resource-enrollment/drain/route.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/api/internal/resource-enrollment/drain/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/proxy/[...path]/route.js +9 -9
- package/dist/app/apps/dashboard/.next/server/app/api/proxy/[...path]/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/close/route.js +7 -7
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/close/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/input/route.js +7 -7
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/input/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/join/route.js +5 -5
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/join/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/open/route.js +11 -11
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/open/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/promote/route.js +7 -7
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/promote/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/resize/route.js +7 -7
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/resize/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/share/route.js +7 -7
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/share/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/stream/route.js +5 -5
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/stream/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/ws/route.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api/terminal/ws/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api-docs/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/api-docs/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/api-docs/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/application-operations/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/application-operations/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/application-operations/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/installations/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/ardent/installations/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/installations/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/ardent/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/[id]/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/[id]/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/[id]/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/ardent/profiles/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/audit/page.js +7 -7
- package/dist/app/apps/dashboard/.next/server/app/audit/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/audit/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/codex/installations/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/codex/installations/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/codex/installations/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/codex/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/codex/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/codex/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/commands/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/commands/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/commands/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/cron/page/server-reference-manifest.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/cron/page.js +6 -6
- package/dist/app/apps/dashboard/.next/server/app/cron/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/cron/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/files/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/files/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/files/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/fleet-map/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/fleet-map/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/fleet-map/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/fleet-readiness/page.js +7 -7
- package/dist/app/apps/dashboard/.next/server/app/fleet-readiness/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/fleet-readiness/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/fleet-timeline/page.js +7 -7
- package/dist/app/apps/dashboard/.next/server/app/fleet-timeline/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/fleet-timeline/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/governor/operations/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/governor/operations/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/governor/operations/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/governor/share/[token]/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/governor/share/[token]/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/governor/share/[token]/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/hermes-drift/page.js +7 -7
- package/dist/app/apps/dashboard/.next/server/app/hermes-drift/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/hermes-drift/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/hermes-security/page.js +5 -5
- package/dist/app/apps/dashboard/.next/server/app/hermes-security/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/hermes-security/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/icon.svg/route.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/icon.svg/route.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/incidents/page.js +8 -8
- package/dist/app/apps/dashboard/.next/server/app/incidents/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/incidents/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/library/page.js +6 -6
- package/dist/app/apps/dashboard/.next/server/app/library/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/library/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/login/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/login/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/logs/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/logs/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/logs/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/mission-control/page.js +10 -10
- package/dist/app/apps/dashboard/.next/server/app/mission-control/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/mission-control/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/nodes/[nodeId]/page/react-loadable-manifest.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/nodes/[nodeId]/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/nodes/[nodeId]/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/nodes/[nodeId]/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/nodes/page.js +6 -6
- package/dist/app/apps/dashboard/.next/server/app/nodes/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/nodes/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/notifications/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/notifications/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/notifications/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/installations/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/orchestra/installations/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/installations/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/orchestra/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/profiles/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/orchestra/profiles/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/profiles/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/web-gateway/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/orchestra/web-gateway/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/orchestra/web-gateway/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/page/react-loadable-manifest.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/page.js +8 -8
- package/dist/app/apps/dashboard/.next/server/app/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/retention/page.js +7 -7
- package/dist/app/apps/dashboard/.next/server/app/retention/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/retention/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/roles/page.js +7 -7
- package/dist/app/apps/dashboard/.next/server/app/roles/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/roles/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/rollouts/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/rollouts/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/rollouts/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/[caseId]/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/[caseId]/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/[caseId]/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/cases/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/entities/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/entities/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/entities/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/events/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/events/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/events/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/evidence/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/evidence/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/evidence/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/page.js +8 -8
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/policies/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/policies/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/policies/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/sources/page.js +3 -3
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/sources/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/security-fusion/sources/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/skills/page/server-reference-manifest.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/skills/page.js +6 -6
- package/dist/app/apps/dashboard/.next/server/app/skills/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/webhooks/[id]/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/webhooks/[id]/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/webhooks/[id]/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/webhooks/new/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/webhooks/new/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/webhooks/new/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/app/webhooks/page.js +2 -2
- package/dist/app/apps/dashboard/.next/server/app/webhooks/page.js.nft.json +1 -1
- package/dist/app/apps/dashboard/.next/server/app/webhooks/page_client-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/{[externals]__16ij4oi2sj-rr._.js → [externals]__07125xgxxkrmn._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/{[externals]__0vlmfz9h_vir0._.js → [externals]__08j7y99hz37g-._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/{[externals]__12udgi92o71ao._.js → [externals]__0l4y89lfm51h_._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/{[externals]__187hm276lglag._.js → [externals]__0lm2eonzt5e-n._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/[externals]__0o-3eqbrxp73c._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/{[externals]__1fagjmvrmd51m._.js → [externals]__0s5d7qbbgsrbp._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/[externals]__0yh7awh74vlk6._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/{[externals]__1yeo563zmacjg._.js → [externals]__1-md0e9mkzms3._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/[externals]__13c6h55dkc77o._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/[externals]__1ke3390r2lfb7._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/[externals]__1ljkeas3ips49._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/[externals]__1v63fvy5rgicz._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__0--rxyhflqsbo._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__0-knu9bydwbtz._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/{[root-of-the-server]__0spov3xxbckem._.js → [root-of-the-server]__002uuaad37fgd._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/{[root-of-the-server]__1r73umu2qsqkz._.js → [root-of-the-server]__06wc5n9u6d01v._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__089rr-xrs6h75._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/{[root-of-the-server]__0sehen5wadgh6._.js → [root-of-the-server]__0jo0_v4a3iv6x._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__0tvu-qqx2mw-8._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__0u78z-wir0ch1._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__0us-jb6ivzh6v._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__0ywmf3079vsm1._.js +206 -0
- package/dist/app/apps/dashboard/.next/server/chunks/{[root-of-the-server]__0uj0ijk3ozu-l._.js → [root-of-the-server]__1-i40j-a5fvgn._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__10ehhrgboegrr._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__12syybvws891m._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__13gid0g7izgib._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__13sz5u4ns29is._.js +146 -0
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__1c8lf7j2769rc._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/{[root-of-the-server]__16rqx2oazfcv5._.js → [root-of-the-server]__1d_bxkf6o9et4._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__1i71tta3bd-6m._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__1l8x7rgd8-_sp._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__1lrs0igd_ft_l._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__1q7qiwntinmxz._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__1sjxxxibwo1v4._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/apps_dashboard_src_lib_hive-login_ts_0ab2iq7-rpy13._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/node_modules_0_mv4bximoofw._.js +141 -0
- package/dist/app/apps/dashboard/.next/server/chunks/node_modules_0u9pfz6tlfjqv._.js +141 -0
- package/dist/app/apps/dashboard/.next/server/chunks/node_modules_1ovxb0oub71q-._.js +141 -0
- package/dist/app/apps/dashboard/.next/server/chunks/node_modules_undici_0153f0xi5kile._.js +127 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0128_ze9pmztw._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__1cnr5ucuq-tas._.js → [root-of-the-server]__08sgyyf_y8ab8._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__1477x3csbkdfa._.js → [root-of-the-server]__0fd124732a296._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0h5dzm0rlx_z1._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0ht0ocgz-d31c._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0i-4cjf683jae._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__0l8uocvha6qpv._.js → [root-of-the-server]__0l_40ku91gj06._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__19kgtx10ey2jw._.js → [root-of-the-server]__0o-7qp27a3xh8._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__0iw2gybtg_uwp._.js → [root-of-the-server]__0rdhprzu2tmon._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__0p95c61y11y6q._.js → [root-of-the-server]__0vobkt4r9l8at._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__0z6dblsnzx20l._.js → [root-of-the-server]__11pe-l2-ko65_._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__105vglixsp00a._.js → [root-of-the-server]__12r7996-2c6t_._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__162yt_hrj1icm._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__03u0iwrsol58b._.js → [root-of-the-server]__19dmibalml_q2._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__1iieuibgbitpd._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__1s0tp902hhgv5._.js → [root-of-the-server]__1jf1vrvlq098r._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__0ryz_kj2m4sns._.js → [root-of-the-server]__1kdv551v6bnx7._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__1cdwjg6sttmzq._.js → [root-of-the-server]__1m-u4vj1e4vqm._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__1n3nkuw3uylha._.js +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__1qz7i1r5-orql._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__1sf37s9j4pls1._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__0cjs7a6nlno3a._.js → [root-of-the-server]__1vxz67uivrc4-._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__0l8hx5fmmz73w._.js → [root-of-the-server]__1x5meaufjq2k7._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{[root-of-the-server]__12tzy7fpv7mea._.js → [root-of-the-server]__1xfbgvp27t8yu._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__1xjrbdi2jn6ud._.js +4 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_1yxkpa3xs9gcg._.js → _012-2t-30l6d8._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_02sxg7r2xx3fw._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_1_5ydzz2hi9_c._.js → _03dvnngovohcl._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_0jhh2ztfg6rgb._.js → _04b4h6ckhi7bi._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_05momtnhs2or_._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_0e-s84q8eqga3._.js → _09eslmbj9l4sq._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_0eccfdt1lz-7r._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_1xymezo7pcrgb._.js → _0f2d8_ost6s2f._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_0_pjaohdsh5p9._.js → _0f89fican-_s9._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_0fge-mr3ok0j9._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_0fhe8hp2cn35w._.js → _0ksgpljzuxnqa._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_1-ysyexk6rh9t._.js → _0m10ijdnp_m7u._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_1xgz0jsq73xj8._.js → _0mrryagvuzvz1._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_10hx-gsbkebi3._.js → _0oa-ld-qc1g36._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_0pncxy--oro8t._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_1-4-xizktvrze._.js → _0raw_gngl90-7._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_1f2r0in30xk5i._.js → _0tyfybw4cwmxv._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_0vz8cqmro1opv._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_0pxjzd07f205t._.js → _0wh_e2bpxcaf4._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_080zganrbpmzz._.js → _0wo8_14v-72ut._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_0x273l378qwem._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_0zrtbhvhztqnh._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_0zsjpnu4iitoz._.js +266 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_0k4v1bddv_bdg._.js → _116hh5tv78jrt._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_168tm22non34k._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_1bmfhogvdqhft._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_0eqx_tz6b9y33._.js → _1bybbae25qp_3._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_1hu2vcfi1zpc8._.js → _1cz7r_30vhnj_._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_1crxncy8l18-2._.js → _1gea_-jzyj2pi._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_14o-myioxrzt-._.js → _1ircn2sooizal._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_1g-jay7_uu0tz._.js → _1ktxzfxegaxf2._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_1ml_bvfb1fitq._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_1nd-0is101z6p._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_1q6qxfm-22i_e._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_1t81cm4foc6ob._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_1uyq8tg0700tm._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_083obx7eqpdb6._.js → _1v0z-sm708czr._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_0l42oomzbf_88._.js → _1ws-h-7v_11t8._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{_1kv2zqgc5a63f._.js → _20ln5i8p8muqj._.js} +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_0gs_s688kgg1i._.js +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_anomalies_[anomalyId]_page_tsx_1zti_bnloknef._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_anomalies_page_tsx_1oqqex9du4yhn._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_anomalies_remediation_page_tsx_179m33swiclif._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_ardent_installations_page_tsx_0nvqgacugy6nf._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_ardent_page_tsx_1hrp-k2d3kx3m._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_ardent_profiles_page_tsx_19x7vyz9z-z1n._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_audit_audit-client_tsx_0iyab_tlw5yus._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_codex_installations_page_tsx_02-8w_tbh3lp9._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_codex_page_tsx_113aas0vmxegr._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_commands_page_tsx_1h8a4cebpdfir._.js +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_cron_page_tsx_1i3duyygc0_tg._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_dashboard-client_tsx_0o_8papeie86c._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_files_page_tsx_1kls9-qinldks._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_fleet-map_fleet-map-client_tsx_0o9ktvw_xeu8a._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_fleet-readiness_page_tsx_129clnb6oplu7._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_governor_operations_page_tsx_1tvdkgil8mlgk._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_library_library-client_tsx_066uzpkniuhuu._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_logs_page_tsx_0473-hcpj1mqr._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_mission-control_page_tsx_0crgxncex_u3w._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_nodes_[nodeId]_page_tsx_1q7fqu18oklzc._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_nodes_nodes-client_tsx_0pt4iarhpqbgn._.js +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_orchestra_installations_page_tsx_1a_r4dxubcfwl._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_orchestra_page_tsx_0qja96c0x9x9w._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_orchestra_profiles_page_tsx_0c4catjeix-_z._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_orchestra_web-gateway_page_tsx_1fz12np0wk27t._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_retention_page_tsx_10fa1z72z3kbv._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_roles_roles-client_tsx_1ivvp_kqt5io0._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_rollouts_page_tsx_0oyn4e70wmd7e._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_security-fusion_page_tsx_0d314q7yh6fx8._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_skills_page_tsx_0n5zp4xad38in._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_webhooks_[id]_page_tsx_0e3xxr7r-st04._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_webhooks_page_tsx_0fye89fc60bqf._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_app_webhooks_webhook-form_tsx_02z3be5wx7-cb._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_components_codex_codex-installation-card_tsx_20v0b-0t6my-y._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_components_nodes_tailscale-expiry-alert_tsx_1ll2-i32ej6c2._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_components_orchestra_installation-actions_tsx_1iwznlvwl10o2._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_components_ui_card_tsx_1pngl2ib-xo5t._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/apps_dashboard_src_components_ui_node-selector_tsx_1ci6ldznpaofq._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_11f8_4aw8657-._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_188b8ag_m5vfr._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/{node_modules_@xterm_0grwztx1w6mu2._.js → node_modules_@xterm_1wjdgthvv3w9h._.js} +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_Icon_mjs_0lly-em28afbk._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_08o95oocj431k._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_0eopzqivorumv._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_0fsvfwwqw-2hi._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_0h7ztf89f407u._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_0ppk2v83khj58._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_0ut3n9th3gffy._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_1_ntidsz-qo5p._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_refresh-ccw-dot_mjs_0v31ayeyeyyf8._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_save_mjs_1g6fx97wjvfzp._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_shield-alert_mjs_171qztcjn79hl._.js +3 -0
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_next_dist_0janj0i6dqko7._.js +2 -2
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_next_dist_0n6z_kn7rdm9s._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_next_dist_19r-juqja1ice._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_next_dist_1khq67j4vo9y4._.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_03y_2dlxrv10j.js +1 -1
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1_wzvdd4hmbov.js +1 -1
- package/dist/app/apps/dashboard/.next/server/middleware-build-manifest.js +3 -3
- package/dist/app/apps/dashboard/.next/server/middleware.js +2 -2
- package/dist/app/apps/dashboard/.next/server/pages/500.html +1 -1
- package/dist/app/apps/dashboard/.next/server/preview-props.json +3 -3
- package/dist/app/apps/dashboard/.next/server/server-reference-manifest.js +1 -1
- package/dist/app/apps/dashboard/.next/server/server-reference-manifest.json +3 -3
- package/dist/app/apps/dashboard/.next/static/chunks/056gjh9s9d494.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/07zeb7uafp9tj.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/0gfuowbirjzjz.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/0glmunl3umirf.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/0lt-ikcy1lvod.js +4 -0
- package/dist/app/apps/dashboard/.next/static/chunks/{3vkc9tvc198l6.js → 0qfvdc54-_wls.js} +2 -2
- package/dist/app/apps/dashboard/.next/static/chunks/0u2muyrfswytk.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/{0t2ym98wroor0.js → 0z0bk14hc80xf.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/12i2-pii2jlbk.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/14bd0r0xfbmnv.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/{1dldgklwy-d1m.js → 14r8nrwm46g5y.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/1_dc7qj6cn34y.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/1ctoa0o88h7is.js +6 -0
- package/dist/app/apps/dashboard/.next/static/chunks/1fdfjc2q68p6m.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/{0yfzqjvc48boc.js → 1ngx2zdgd1b2v.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/1u_ran46erfqh.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/{144lduiqejqn6.js → 1uazzcd91pwfh.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/1v4hz3-8oktml.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/1ybllyg38cy3-.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/25tziha662tl6.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/260f1oy-xd4cg.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/26rmh4jb1a3nq.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/29i5vf0fvu1f6.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/{1nxsjudz9ja9p.js → 29ihu80s46p9r.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/2_iljjf5r-5t5.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/2celzsawjzhy9.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/2fvlbj5gqk-mf.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/2kshtklg2en8k.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/2ksz5ltjd7lss.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/2o_4mj_bjm4ws.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/30ckv3d3pj-t7.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/347d5q-1yj217.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/36ygg8xpaqvup.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/{2f_8x6hbx8hcy.js → 3e8h01gu614n_.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/3glqu0wgtdqyv.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/{0rcfihvcupsfu.js → 3k5b0ou9_phqh.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/3lik3lhs9cb-3.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/3q0oq5yy3hszn.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/3wo0br3rxneiv.js +1 -0
- package/dist/app/apps/dashboard/.next/static/chunks/{10nhwrdj0khcw.js → 3y43u3ijms4qh.js} +1 -1
- package/dist/app/apps/dashboard/.next/static/chunks/{0rb485ohk6md7.js → 45c1z9-q8c5n4.js} +1 -1
- package/dist/app/apps/dashboard/package.json +9 -9
- package/dist/app/apps/dashboard/server.js +1 -1
- package/dist/app/node_modules/semver/package.json +16 -56
- package/package.json +9 -9
- package/dist/app/apps/dashboard/.next/server/chunks/[externals]__04mrhyqb1ufrv._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/[externals]__0c8llxdk0vw6c._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/[externals]__0hd26mrt655_4._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/[externals]__1-nhjrs611jhq._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/[externals]__12hks4v763cd5._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/[externals]__1ciog21c6gsz7._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__0-yqr0-10hc0_._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__06nhceb5uf63i._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__09q7ixy9dkn77._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__0a3vv554ltxx-._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__0cn86kzz3hpv3._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__0ftueu9gq1-i3._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__0kyzfsxt0lqmw._.js +0 -146
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__0t01oj-s15tz0._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__0tva5tfgfuthn._.js +0 -206
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__0y71f5krqzyd9._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__0y_u98zrxf02j._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__10-0ovq0m2hcb._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__150x74j-d_djz._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__1i35sr1_-chih._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__1i4965fnazzrj._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/[root-of-the-server]__1vywioi0uxxp2._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/node_modules_04l42sk4k7jqc._.js +0 -141
- package/dist/app/apps/dashboard/.next/server/chunks/node_modules_11zk8u7fu3bfa._.js +0 -141
- package/dist/app/apps/dashboard/.next/server/chunks/node_modules_1ze5f5ud32ii7._.js +0 -141
- package/dist/app/apps/dashboard/.next/server/chunks/node_modules_undici_09u721ivtvbfn._.js +0 -122
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__061k3b4f83iw_._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0bpezsts2nk27._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0oolyyzqavqsl._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0oq6lh7w1hy3l._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__0wly91np9rak4._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__10vlrswrzvf4x._.js +0 -4
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__12id2gy-xo77y._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__18_5e6gh649a3._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/[root-of-the-server]__1gi58mgwz43rm._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_033mw4lb6hg5v._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_05_jycpmoagp2._.js +0 -261
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_093r3hf6i_2kf._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_0t1utb5lqk4_i._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_0t2omtf62kwo8._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_0vzgfxv4kj10x._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_14gpaw79je78k._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_1hpxp6di3daj1._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_1jqprfuo67y8g._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_1l5vqoevjbpvy._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_1mwuy30pthijq._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_1rssd5kiif-p8._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/_1vr5dlvsx571w._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_01i0ukei4d8fh._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_0r87b6r_5hggb._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_06-0f_j6s36av._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_0cpaajci38go6._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_0tetr06-sistx._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_0un4qq2y_2_8_._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_0v64we1n7zcpj._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_1tnwtxofpzzuu._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_1x5ty7vktr96t._.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_refresh-ccw-dot_1bka5q1p8_fx4.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_save_1dink7fo0t4_j.js +0 -3
- package/dist/app/apps/dashboard/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_shield-alert_0n2jlsvjw67kb.js +0 -3
- package/dist/app/apps/dashboard/.next/static/chunks/0f1oo86rd7rn5.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/0gugng_rojb59.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/0ipsr3u6u9pis.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/0lqlei0iz2_b9.js +0 -4
- package/dist/app/apps/dashboard/.next/static/chunks/0nppv-ipbhsb6.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/0rzm17jmqcqqy.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/0vnm6vq0blkqa.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/148qc2-xospl5.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/1_lr8opl_iiee.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/1bweivbz75m-h.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/1dkvf7mh189e1.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/1tn-ycjva2199.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/1x-hg6pr64osx.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/1xbm8c-z82fvh.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/1xmiekdol4f25.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/20-k_69jglenr.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/2koijmn3fv51d.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/2kr1lerybldj1.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/2w06s_csq4lq9.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/38jwf2u4_zfwt.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/3c4h-g_w0tej7.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/3hmz5ulftjx63.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/3nj5vyc7iuek_.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/3o84wq16clu2s.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/3v5ojp4m7xio1.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/3vpeqic83hqi4.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/3x0jzyr-nzhaj.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/3zfj8uqd-vbu1.js +0 -6
- package/dist/app/apps/dashboard/.next/static/chunks/41tadp-109c8d.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/42ywc2wwm-x4l.js +0 -1
- package/dist/app/apps/dashboard/.next/static/chunks/44nuymti6rr42.js +0 -1
- package/dist/app/node_modules/semver/classes/comparator.js +0 -143
- package/dist/app/node_modules/semver/classes/range.js +0 -577
- package/dist/app/node_modules/semver/classes/semver.js +0 -350
- package/dist/app/node_modules/semver/functions/clean.js +0 -8
- package/dist/app/node_modules/semver/functions/cmp.js +0 -54
- package/dist/app/node_modules/semver/functions/coerce.js +0 -62
- package/dist/app/node_modules/semver/functions/compare-build.js +0 -9
- package/dist/app/node_modules/semver/functions/compare-loose.js +0 -5
- package/dist/app/node_modules/semver/functions/compare.js +0 -7
- package/dist/app/node_modules/semver/functions/diff.js +0 -60
- package/dist/app/node_modules/semver/functions/eq.js +0 -5
- package/dist/app/node_modules/semver/functions/gt.js +0 -5
- package/dist/app/node_modules/semver/functions/gte.js +0 -5
- package/dist/app/node_modules/semver/functions/inc.js +0 -21
- package/dist/app/node_modules/semver/functions/lt.js +0 -5
- package/dist/app/node_modules/semver/functions/lte.js +0 -5
- package/dist/app/node_modules/semver/functions/major.js +0 -5
- package/dist/app/node_modules/semver/functions/minor.js +0 -5
- package/dist/app/node_modules/semver/functions/neq.js +0 -5
- package/dist/app/node_modules/semver/functions/parse.js +0 -18
- package/dist/app/node_modules/semver/functions/patch.js +0 -5
- package/dist/app/node_modules/semver/functions/prerelease.js +0 -8
- package/dist/app/node_modules/semver/functions/rcompare.js +0 -5
- package/dist/app/node_modules/semver/functions/rsort.js +0 -5
- package/dist/app/node_modules/semver/functions/satisfies.js +0 -12
- package/dist/app/node_modules/semver/functions/sort.js +0 -5
- package/dist/app/node_modules/semver/functions/truncate.js +0 -48
- package/dist/app/node_modules/semver/functions/valid.js +0 -8
- package/dist/app/node_modules/semver/index.js +0 -93
- package/dist/app/node_modules/semver/internal/constants.js +0 -37
- package/dist/app/node_modules/semver/internal/debug.js +0 -11
- package/dist/app/node_modules/semver/internal/identifiers.js +0 -29
- package/dist/app/node_modules/semver/internal/lrucache.js +0 -42
- package/dist/app/node_modules/semver/internal/parse-options.js +0 -17
- package/dist/app/node_modules/semver/internal/re.js +0 -223
- package/dist/app/node_modules/semver/ranges/gtr.js +0 -6
- package/dist/app/node_modules/semver/ranges/intersects.js +0 -9
- package/dist/app/node_modules/semver/ranges/ltr.js +0 -6
- package/dist/app/node_modules/semver/ranges/max-satisfying.js +0 -27
- package/dist/app/node_modules/semver/ranges/min-satisfying.js +0 -26
- package/dist/app/node_modules/semver/ranges/min-version.js +0 -63
- package/dist/app/node_modules/semver/ranges/outside.js +0 -82
- package/dist/app/node_modules/semver/ranges/simplify.js +0 -49
- package/dist/app/node_modules/semver/ranges/subset.js +0 -249
- package/dist/app/node_modules/semver/ranges/to-comparators.js +0 -10
- package/dist/app/node_modules/semver/ranges/valid.js +0 -13
- /package/dist/app/apps/dashboard/.next/static/{UVwgQCUayw2aahATR0vXc → RJzcgsvLiZvGVu7o2g_Hd}/_buildManifest.js +0 -0
- /package/dist/app/apps/dashboard/.next/static/{UVwgQCUayw2aahATR0vXc → RJzcgsvLiZvGVu7o2g_Hd}/_clientMiddlewareManifest.js +0 -0
- /package/dist/app/apps/dashboard/.next/static/{UVwgQCUayw2aahATR0vXc → RJzcgsvLiZvGVu7o2g_Hd}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,[35673,e=>{var t=e.i(43476),a=e.i(64971),r=e.i(71645),n=e.i(41220),s=e.i(62368),i=e.i(32568),o=e.i(4050),l=e.i(39430),d=e.i(82983),c=e.i(58814),u=e.i(32781),p=e.i(66627),h=e.i(56420);let f={name:"wifi-off",size:24,node:[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]};f.node;let m=(0,h.f)(f);var y=e.i(68759);function g({formMode:e,name:a,setName:r,apiSecret:n,setApiSecret:s,hasStoredApiSecret:o,hostname:l,setHostname:d,controlApiPort:c,setControlApiPort:h,url:f,setUrl:x,saving:v,testResult:k,onTestConnection:b,onSave:w,onCancel:j}){return(0,t.jsxs)("div",{className:"space-y-4",children:["create"===e?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.G,{label:"Hostname",required:!0,children:(0,t.jsx)("input",{type:"text",className:i.W,placeholder:"e.g. magnus.example.com",value:l,onChange:e=>d(e.target.value)})}),(0,t.jsx)(i.G,{label:"Name",children:(0,t.jsx)("input",{type:"text",className:i.W,placeholder:l.trim()||"Defaults to hostname",value:a,onChange:e=>r(e.target.value)})}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-3",children:(0,t.jsx)(i.G,{label:"Control Port",children:(0,t.jsx)("input",{type:"text",className:i.W,placeholder:"4000",value:c,onChange:e=>h(e.target.value)})})}),l.trim()&&(0,t.jsxs)("div",{className:"rounded border border-border bg-bg/50 px-3 py-2 text-xs text-text-muted",children:["URL:"," ",(0,t.jsxs)("span",{className:"text-text",children:["https://",l.trim(),":",parseInt(c,10)||4e3]})]}),(0,t.jsx)(i.G,{label:"Control API Credential",children:(0,t.jsx)("input",{type:"password",className:i.W,placeholder:o?"Leave blank to keep stored credential":"Dedicated Control API credential",value:n,onChange:e=>s(e.target.value)})}),(0,t.jsx)("div",{className:"rounded border border-border bg-bg p-3 text-xs text-text-muted",children:"This registers an already deployed Control API. Provision hosts with the reviewed key-only release runbook."})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.G,{label:"Name",required:!0,children:(0,t.jsx)("input",{type:"text",className:i.W,placeholder:"e.g. Production East",value:a,onChange:e=>r(e.target.value)})}),(0,t.jsx)(i.G,{label:"URL",required:!0,children:(0,t.jsx)("input",{type:"text",className:i.W,placeholder:"e.g. https://magnus.example.com:4000",value:f,onChange:e=>{x(e.target.value)}})}),(0,t.jsx)(i.G,{label:"Control API Credential",children:(0,t.jsx)("input",{type:"password",className:i.W,placeholder:o?"Leave blank to keep stored credential":"Dedicated Control API credential",value:n,onChange:e=>s(e.target.value)})})]}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsx)(y.K,{variant:"ghost",size:"sm",onClick:b,disabled:"testing"===k||("create"===e?!l.trim():!f),icon:"testing"===k?(0,t.jsx)(u.f,{className:"h-3.5 w-3.5 animate-spin"}):"ok"===k?(0,t.jsx)(p.f,{className:"h-3.5 w-3.5 text-success"}):"fail"===k?(0,t.jsx)(m,{className:"h-3.5 w-3.5 text-danger"}):(0,t.jsx)(p.f,{className:"h-3.5 w-3.5"}),children:"testing"===k?"Testing…":"ok"===k?"Connected":"fail"===k?"Failed":"Test Connection"})}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 pt-2 border-t border-border",children:[(0,t.jsx)(y.K,{variant:"secondary",size:"md",onClick:j,children:"Cancel"}),(0,t.jsx)(y.K,{variant:"primary",size:"md",onClick:w,disabled:v,icon:v?(0,t.jsx)(u.f,{className:"h-4 w-4 animate-spin"}):void 0,children:v?"Saving…":"create"===e?"Add Node":"Save Changes"})]})]})}var x=e.i(41120),v=e.i(95925),k=e.i(69846);function b({updateStatus:e,updateCheck:a,updateLoading:r,updateResult:n,onCheckUpdates:i,onApplyUpdate:o,onRestart:l,onBack:d}){let c=e?.isGitRepo!==!1&&e?.legacyGitSelfUpdate===!0;return(0,t.jsxs)("div",{className:"space-y-4",children:[e&&(0,t.jsxs)("div",{className:"rounded border border-border bg-bg p-3 space-y-2 text-[11px]",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-text-muted",children:"Control API"}),(0,t.jsxs)("span",{className:"text-xs",children:["v",e.controlApiVersion]})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-text-muted",children:"Agent Version"}),(0,t.jsxs)("span",{className:"text-xs",children:["v",e.agentVersion]})]}),e.gitBranch&&(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("span",{className:"text-text-muted flex items-center gap-1.5",children:[(0,t.jsx)(k.f,{className:"h-3.5 w-3.5"})," Branch"]}),(0,t.jsx)("span",{className:"text-xs",children:e.gitBranch})]}),e.gitCommit&&(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-text-muted",children:"Commit"}),(0,t.jsx)("span",{className:"text-xs",children:e.gitCommit})]}),e.lastChecked&&(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-text-muted",children:"Last Checked"}),(0,t.jsx)("span",{className:"text-xs",children:new Date(e.lastChecked).toLocaleString()})]})]}),e&&!c&&(0,t.jsxs)("div",{className:"rounded border border-primary/30 bg-primary/10 px-3 py-2 text-[11px] text-text-muted","data-testid":"npm-upgrade-notice",children:[(0,t.jsx)("span",{className:"font-bold text-primary",children:"Upgrade on the server host"}),(0,t.jsxs)("span",{className:"ml-1",children:["with ",(0,t.jsx)("code",{className:"rounded bg-surface px-1 text-text",children:e.upgradeCommand??"magnus upgrade"}),": it backs up the database, migrates, restarts and switches back automatically if the new version is unhealthy. See UPGRADING.md."]})]}),a&&a.available&&(0,t.jsxs)("div",{className:"rounded border border-warning/30 bg-warning/10 px-3 py-2 text-[11px]",children:[(0,t.jsx)("span",{className:"font-bold text-warning",children:"Update available"}),(0,t.jsxs)("span",{className:"text-text-muted ml-1",children:["— ",a.behindBy," commit",1!==a.behindBy?"s":""," behind (",a.currentCommit," → ",a.remoteCommit,")"]})]}),n&&(0,t.jsx)("div",{className:"rounded border border-success/30 bg-success/10 px-3 py-2 text-[11px] text-success",children:n}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-2",children:[c&&(0,t.jsx)(y.K,{variant:"secondary",size:"md",onClick:i,disabled:"idle"!==r,icon:"checking"===r?(0,t.jsx)(u.f,{className:"h-4 w-4 animate-spin"}):(0,t.jsx)(x.f,{className:"h-4 w-4"}),children:"checking"===r?"Checking…":"Check for Updates"}),c&&a?.available&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.K,{variant:"primary",size:"md",onClick:()=>o(!1),disabled:"idle"!==r,icon:"applying"===r?(0,t.jsx)(u.f,{className:"h-4 w-4 animate-spin"}):(0,t.jsx)(s.f,{className:"h-4 w-4"}),children:"applying"===r?"Updating…":"Pull & Build"}),(0,t.jsx)(y.K,{variant:"primary",size:"md",onClick:()=>o(!0),disabled:"idle"!==r,icon:"applying"===r?(0,t.jsx)(u.f,{className:"h-4 w-4 animate-spin"}):(0,t.jsx)(v.f,{className:"h-4 w-4"}),children:"applying"===r?"Updating…":"Pull, Build & Restart"})]}),c&&(0,t.jsx)(y.K,{variant:"ghost",size:"md",onClick:l,disabled:"idle"!==r,icon:"restarting"===r?(0,t.jsx)(u.f,{className:"h-4 w-4 animate-spin"}):(0,t.jsx)(v.f,{className:"h-4 w-4"}),children:"restarting"===r?"Restarting…":"Restart Only"})]}),(0,t.jsx)("div",{className:"flex justify-start pt-2 border-t border-border",children:(0,t.jsx)(y.K,{variant:"ghost",size:"md",onClick:d,children:"← Back to list"})})]})}e.s(["f",0,function({open:e,onClose:u,editNodeId:p,createMode:h}){let{nodes:f,addNode:m,updateNode:y,removeNode:x,switchNode:v,activeNode:k}=(0,o.l)(),[w,j]=(0,r.useState)("list"),[N,M]=(0,r.useState)("create"),[C,z]=(0,r.useState)(null),[S,_]=(0,r.useState)(""),[A,E]=(0,r.useState)(""),[P,L]=(0,r.useState)(""),[U,R]=(0,r.useState)(""),[T,I]=(0,r.useState)("4000"),[$,O]=(0,r.useState)(!1),[q,F]=(0,r.useState)(null),[H,B]=(0,r.useState)("idle"),V=(0,r.useRef)(f);function D(){_(""),E(""),L(""),R(""),I("4000"),F(null),B("idle")}function K(){L(""),F(null),O(!1),B("idle"),u()}async function W(e){try{await x(e)}catch(e){F(e instanceof Error?e.message:"Failed to delete")}}async function G(){let e=U.trim(),t="create"===N?`https://${e}:${parseInt(T,10)||4e3}`:A;if(!t||"create"===N&&!e)return void F("Hostname/URL is required to test connection");B("testing"),F(null);try{let e=(0,l.L)(t),a=await fetch("/api/proxy/health",{method:"GET",headers:e,signal:AbortSignal.timeout(1e4)});a.ok?B("ok"):(B("fail"),F(`Connection failed: HTTP ${a.status}`))}catch(e){B("fail"),F(e instanceof Error?e.message:"Connection failed")}}async function J(){let e="create"===N?S.trim()||U.trim():S.trim(),t="create"===N?`https://${U.trim()}:${parseInt(T,10)||4e3}`:A.trim();if("create"===N&&!U.trim())return void F("Hostname is required");if("edit"===N&&!S.trim())return void F("Name is required");if("edit"===N&&!A.trim())return void F("URL is required");O(!0),F(null),L("");try{if("create"===N){let a=await m({name:e,url:t,...P?{apiSecret:P}:{}});v(a.id)}else C&&await y(C,{name:S.trim(),url:A.trim(),...P?{apiSecret:P}:{}});O(!1),0===f.length&&"create"===N?K():j("list")}catch(e){F(e instanceof Error?e.message:"Failed to save"),O(!1)}}V.current=f,(0,r.useEffect)(()=>{if(e)if(F(null),B("idle"),h)j("form"),M("create"),z(null),D();else if(p){let e=V.current.find(e=>e.id===p);e&&(j("form"),M("edit"),z(e.id),_(e.name),E(e.url),L(""))}else j("list")},[e,h,p]);let[Z,X]=(0,r.useState)(null),[Q,Y]=(0,r.useState)(null),[ee,et]=(0,r.useState)("idle"),[ea,er]=(0,r.useState)(null);async function en(){et("checking"),F(null),er(null);try{let e=await d.f.selfUpdate.check();e.success&&(Y(e.data??null),e.data.error?F(e.data.error):e.data.available||er("Already up to date."))}catch(t){let e="Failed to check for updates";if(t&&"object"==typeof t&&"response"in t)try{let r=(0,a.R)(await (0,a.O)(t));r&&(e=r)}catch{}else t instanceof Error&&(e=t.message);F(e)}finally{et("idle")}}async function es(e){et("applying"),F(null),er(null);try{let t=await d.f.selfUpdate.apply(e);if(t.success){let e=t.data;if(!e)return;e.updated?er(`Updated from v${e.previousVersion} → v${e.currentVersion}`+(e.restart?.scheduled?`. Restarting via ${e.restart.method}…`:". Restart manually to apply.")):er("Code pulled but no version change detected."),Y(null);let a=await d.f.selfUpdate.status();a.success&&X(a.data??null)}}catch(e){F(e instanceof Error?e.message:"Update failed")}finally{et("idle")}}async function ei(){et("restarting"),F(null);try{let e=await d.f.selfUpdate.restart();e.success&&er(`Restart scheduled via ${e.data.method}. Reconnecting shortly…`)}catch(e){F(e instanceof Error?e.message:"Restart failed")}finally{et("idle")}}if(!e)return null;let eo="list"===w?"Manage remote Control API endpoints":"update"===w?`Update the active Control Node (${k.name})`:"create"===N?"Connect to a remote Control API instance":"Update control node settings",el="update"===w?(0,t.jsx)(s.f,{className:"h-5 w-5 text-primary"}):(0,t.jsx)(n.f,{className:"h-5 w-5 text-primary"});return(0,t.jsxs)(i.n,{open:e,onClose:K,title:"list"===w?"Control Nodes":"update"===w?"Update Control Node":"create"===N?"Add Control Node":"Edit Control Node",description:eo,icon:el,className:"max-w-xl",children:[q&&(0,t.jsx)("div",{className:"mb-4 rounded border border-danger/30 bg-danger/10 px-3 py-2 text-[11px] text-danger",children:q}),"list"===w&&(0,t.jsx)(c.f,{nodes:f,activeNodeId:k.id,onEdit:function(e){j("form"),M("edit"),z(e.id),_(e.name),E(e.url),L(""),F(null),B("idle")},onDelete:e=>void W(e),onAdd:function(){j("form"),M("create"),z(null),D()},onUpdate:function(){j("update"),F(null),Y(null),er(null),et("idle"),(async()=>{try{let e=await d.f.selfUpdate.status();e.success&&X(e.data??null)}catch{}})()}}),"form"===w&&(0,t.jsx)(g,{formMode:N,name:S,setName:_,apiSecret:P,setApiSecret:L,hasStoredApiSecret:!!(C&&f.find(e=>e.id===C)?.hasApiSecret),hostname:U,setHostname:R,controlApiPort:T,setControlApiPort:I,url:A,setUrl:e=>{E(e),B("idle")},saving:$,testResult:H,onTestConnection:()=>void G(),onSave:()=>void J(),onCancel:()=>{f.length>0?(L(""),j("list"),F(null)):K()}}),"update"===w&&(0,t.jsx)(b,{activeNodeName:k.name,updateStatus:Z,updateCheck:Q,updateLoading:ee,updateResult:ea,onCheckUpdates:()=>void en(),onApplyUpdate:e=>void es(e),onRestart:()=>void ei(),onBack:()=>j("list")})]})}],35673)},58814,e=>{var t=e.i(43476),a=e.i(41220),r=e.i(15281),n=e.i(59659),s=e.i(77071),i=e.i(62368),o=e.i(68759);e.s(["f",0,function({nodes:e,activeNodeId:l,onEdit:d,onDelete:c,onAdd:u,onUpdate:p}){return(0,t.jsxs)("div",{className:"space-y-3",children:[0===e.length?(0,t.jsx)("div",{className:"rounded border border-border bg-bg p-6 text-center text-[11px] text-text-muted",children:"No control nodes configured. Add one to connect to a remote Control API."}):(0,t.jsx)("div",{className:"space-y-2 max-h-80 overflow-y-auto",children:e.map(e=>(0,t.jsxs)("div",{className:`flex items-center justify-between rounded border px-3 py-2.5 ${e.id===l?"border-primary/50 bg-primary/5":"border-border bg-bg"}`,children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,t.jsx)(a.f,{className:"h-4 w-4 shrink-0 text-text-muted"}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("div",{className:"text-[11px] font-bold truncate",children:e.name}),(0,t.jsx)("div",{className:"text-xs text-text-muted truncate",children:e.url})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 ml-2 shrink-0",children:[e.id===l&&(0,t.jsx)("span",{className:"mr-1 rounded-full bg-primary/20 px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider text-primary",children:"Active"}),(0,t.jsx)("button",{onClick:()=>d(e),className:"rounded-md p-1.5 text-text-muted hover:bg-surface-hover hover:text-text transition-all",title:"Edit",children:(0,t.jsx)(r.f,{className:"h-3.5 w-3.5"})}),(0,t.jsx)("button",{onClick:()=>c(e.id),className:"rounded-md p-1.5 text-text-muted hover:bg-danger/10 hover:text-danger transition-all",title:"Delete",children:(0,t.jsx)(n.f,{className:"h-3.5 w-3.5"})})]})]},e.id))}),(0,t.jsx)(o.K,{variant:"secondary",size:"md",onClick:u,icon:(0,t.jsx)(s.f,{className:"h-4 w-4"}),className:"w-full",children:"Add Control Node"}),(0,t.jsx)(o.K,{variant:"ghost",size:"md",onClick:p,icon:(0,t.jsx)(i.f,{className:"h-4 w-4"}),className:"w-full",children:"Check for Updates"})]})}])},1092,16141,e=>{var t=e.i(43476),a=e.i(71645),r=e.i(15331),n=e.i(78571);let s={connected:!1,entries:[]},i=1,o=new Set;function l(e){for(let t of(s=e,o))t()}let d={subscribe:e=>(o.add(e),()=>o.delete(e)),getSnapshot:()=>s,getServerSnapshot:()=>c,push(e){let t={...e,id:i++,at:e.at??Date.now()};l({...s,entries:[t,...s.entries].slice(0,50)})},setConnected(e){s.connected!==e&&l({...s,connected:e})}},c={connected:!1,entries:[]};e.s(["f",0,d],16141);var u=e.i(72603),p=e.i(2067);let h={info:"text-primary",success:"text-success",warning:"text-warning",error:"text-danger"},f={info:"bg-primary",success:"bg-success",warning:"bg-warning",error:"bg-danger"};function m(){return(0,a.useSyncExternalStore)(d.subscribe,d.getSnapshot,d.getServerSnapshot)}function y(e){return new Date(e).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"})}function g({entry:e}){return(0,t.jsxs)("span",{className:"inline-flex shrink-0 items-center gap-2 px-4",children:[(0,t.jsx)("span",{className:(0,n.f)("h-1.5 w-1.5 rounded-full",f[e.severity])}),(0,t.jsx)("span",{className:"num text-text-muted/70",children:y(e.at)}),(0,t.jsx)("span",{className:h[e.severity],children:e.title}),e.message&&(0,t.jsx)("span",{className:"text-text-muted",children:e.message})]})}e.s(["J",0,function({className:e}){let{entries:a}=m(),r=(0,u.p)();if(0===a.length)return null;let s=a.slice(0,8),i=s[0];return(0,t.jsxs)("div",{className:(0,n.f)("relative min-w-0 overflow-hidden text-[10px] uppercase tracking-wider",e),children:[(0,t.jsxs)("span",{className:"sr-only","aria-live":"polite",children:["Latest event: ",i.title]}),(0,t.jsx)("div",{"aria-hidden":"true",className:"[mask-image:linear-gradient(90deg,transparent,black_8%,black_92%,transparent)]",children:r||s.length<2?(0,t.jsx)(g,{entry:i}):(0,t.jsx)("div",{className:"flex w-max animate-ticker hover:[animation-play-state:paused]",children:[...s,...s].map((e,a)=>(0,t.jsx)(g,{entry:e},`${e.id}-${a}`))})})]})},"d",0,function({limit:e=8,className:a}){let{entries:s,connected:i}=m();return 0===s.length?(0,t.jsx)(p.f,{compact:!0,icon:(0,t.jsx)(r.f,{className:"h-4 w-4"}),tone:i?"primary":"muted",title:i?"Listening for fleet events":"Event stream connecting",description:"Deploys, upgrades, command results and alerts appear here as they happen.",className:a}):(0,t.jsx)("ul",{className:(0,n.f)("space-y-1.5",a),"aria-live":"off",children:s.slice(0,e).map(e=>(0,t.jsxs)("li",{className:"scan-sweep flex items-center gap-2.5 rounded-chip border border-border/60 bg-surface-raised/60 px-3 py-2 text-[11px]",children:[(0,t.jsx)("span",{className:(0,n.f)("h-1.5 w-1.5 shrink-0 rounded-full shadow-[0_0_6px_currentColor]",f[e.severity],h[e.severity])}),(0,t.jsxs)("span",{className:(0,n.f)("min-w-0 flex-1 truncate",h[e.severity]),children:[e.title,e.message&&(0,t.jsx)("span",{className:"ml-2 text-text-muted",children:e.message})]}),(0,t.jsx)("span",{className:"num shrink-0 text-[10px] text-text-muted",children:y(e.at)})]},e.id))})}],1092)},68759,e=>{var t=e.i(43476),a=e.i(78571);let r={primary:"border border-primary/60 bg-primary/10 text-primary hover:bg-primary/20 hover:border-primary hover:shadow-[0_0_12px_var(--color-glow)]",secondary:"border border-border bg-surface text-text-muted hover:border-primary/40 hover:text-text hover:shadow-[0_0_8px_var(--color-glow)]",danger:"border border-danger/60 bg-danger/10 text-danger hover:bg-danger/20 hover:border-danger hover:shadow-[0_0_12px_rgba(255,23,68,0.3)]",success:"border border-success/60 bg-success/10 text-success hover:bg-success/20 hover:border-success hover:shadow-[0_0_12px_rgba(0,230,118,0.3)]",ghost:"text-text-muted hover:text-accent hover:drop-shadow-[0_0_6px_var(--color-glow-accent)]"},n={sm:"h-8 px-3 text-[11px]",md:"h-9 px-4 text-xs",lg:"h-10 px-5 text-xs"};function s(e="primary",t="md",i){return(0,a.f)("inline-flex items-center justify-center gap-2 rounded-chip font-medium uppercase tracking-wider transition-all duration-200 disabled:opacity-50 disabled:pointer-events-none",r[e],n[t],i)}e.s(["K",0,function({variant:e="primary",size:a="md",icon:r,children:n,className:i,...o}){return(0,t.jsxs)("button",{className:s(e,a,i),...o,children:[r,n]})},"R",0,s])},2067,e=>{var t=e.i(43476),a=e.i(78571),r=e.i(35084);let n={primary:"border-primary/40 shadow-[0_0_16px_var(--color-glow)]",accent:"border-accent/40 shadow-[0_0_16px_var(--color-glow-accent)]",success:"border-success/40 shadow-[0_0_16px_var(--color-glow-success)]",warning:"border-warning/40 shadow-[0_0_16px_var(--color-glow-warning)]",danger:"border-danger/40 shadow-[0_0_16px_var(--color-glow-danger)]",info:"border-info/40 shadow-[0_0_16px_var(--color-glow)]",muted:"border-border-strong"},s={primary:"border-primary/20",accent:"border-accent/25",success:"border-success/20",warning:"border-warning/25",danger:"border-danger/25",info:"border-info/20",muted:"border-border"};e.s(["f",0,function({title:e,description:i,icon:o,action:l,tone:d="muted",compact:c=!1,className:u,testId:p}){return(0,t.jsxs)("div",{"data-testid":p,role:"danger"===d||"warning"===d?"alert":void 0,className:(0,a.f)("flex flex-col items-center justify-center rounded-panel border border-dashed bg-surface/40 text-center",s[d],c?"gap-2 px-4 py-5":"gap-3 px-6 py-10",u),children:[o&&(0,t.jsx)("span",{className:(0,a.f)("flex items-center justify-center rounded-full border bg-bg",c?"h-8 w-8":"h-12 w-12",n[d],"muted"===d?"text-text-muted":r.T[d]),children:o}),(0,t.jsx)("p",{className:(0,a.f)("font-bold uppercase tracking-wider",c?"text-[11px]":"text-xs","muted"===d?"text-text":r.T[d]),children:e}),i&&(0,t.jsx)("p",{className:"max-w-md text-[11px] leading-relaxed text-text-muted",children:i}),l&&(0,t.jsx)("div",{className:"mt-1",children:l})]})}])},72603,e=>{var t=e.i(71645);let a="(prefers-reduced-motion: reduce)";function r(){return window.matchMedia(a).matches||"low"===document.documentElement.dataset.fx}function n(e){let t=window.matchMedia(a);t.addEventListener("change",e);let r=new MutationObserver(e);return r.observe(document.documentElement,{attributes:!0,attributeFilter:["data-fx"]}),()=>{t.removeEventListener("change",e),r.disconnect()}}let s="magnus:fx";e.s(["P",0,function(){try{let e=window.localStorage.getItem(s);"low"===e?document.documentElement.dataset.fx="low":delete document.documentElement.dataset.fx}catch{}},"d",0,r,"W",0,function(){let e="low"===document.documentElement.dataset.fx?"normal":"low";"low"===e?document.documentElement.dataset.fx="low":delete document.documentElement.dataset.fx;try{window.localStorage.setItem(s,e)}catch{}return e},"p",0,function(){return(0,t.useSyncExternalStore)(n,r,()=>!1)}])},4050,15e3,e=>{var t=e.i(43476),a=e.i(71645);let r={id:"local",name:"Local",url:"",hasApiSecret:!1,apiSecretFingerprint:null,hasToken:!1,tokenFingerprint:null,createdAt:new Date().toISOString()};e.s(["f",0,r],15e3);var n=e.i(82983);let s=(0,a.createContext)(null),i="magnus_active_control_node",o="magnus_active_control_node_cache";function l(e){try{localStorage.setItem(o,JSON.stringify(e))}catch{}}e.s(["v",0,function({children:e}){let[d,c]=(0,a.useState)([]),[u,p]=(0,a.useState)(()=>localStorage.getItem(i)??"local"),[h,f]=(0,a.useState)(!0),m=(0,a.useCallback)(async()=>{try{let e=await fetch("/api/control-nodes"),t=await e.json();if(t.success)if(0===t.data.length){let e=await fetch("/api/control-nodes",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:r.name,url:r.url})}),t=await e.json();t.success&&(c([t.data]),p(t.data.id),localStorage.setItem(i,t.data.id))}else c(t.data)}catch{}finally{f(!1)}},[]);(0,a.useEffect)(()=>{localStorage.removeItem("magnus_token"),m()},[m]);let y=(0,a.useMemo)(()=>{let e=d.find(e=>e.id===u);if(e)return e;let t=function(){try{let e=localStorage.getItem(o);if(!e)return null;let t=JSON.parse(e);if("string"!=typeof t.id||"string"!=typeof t.name||"string"!=typeof t.url||"string"!=typeof t.createdAt)return null;let a={id:t.id,name:t.name,url:t.url,hasApiSecret:!0===t.hasApiSecret,apiSecretFingerprint:"string"==typeof t.apiSecretFingerprint?t.apiSecretFingerprint:null,hasToken:!0===t.hasToken,tokenFingerprint:"string"==typeof t.tokenFingerprint?t.tokenFingerprint:null,createdAt:t.createdAt};return localStorage.setItem(o,JSON.stringify(a)),a}catch{return null}}();return t&&t.id===u?t:r},[d,u]),g=(0,a.useRef)(null);"local"!==y.id&&g.current!==y.id&&(l(y),g.current=y.id);let x=(0,a.useRef)(null);x.current!==y.id&&(document.cookie=`magnus_active_node_id=${encodeURIComponent(y.id)}; path=/; max-age=31536000; samesite=lax`,x.current=y.id);let v=(0,a.useRef)(null);v.current!==y.id&&(n.f.reconfigure("local"===y.id?"":y.url),v.current=y.id);let k=(0,a.useCallback)(e=>{p(e);{localStorage.setItem(i,e),document.cookie=`magnus_active_node_id=${encodeURIComponent(e)}; path=/; max-age=31536000; samesite=lax`;let t=d.find(t=>t.id===e);t&&l(t)}},[d]),b=(0,a.useCallback)(async e=>{let t=await fetch("/api/control-nodes",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),a=await t.json();if(!a.success)throw Error(a.error??"Failed to add node");return c(e=>[...e,a.data]),a.data},[]),w=(0,a.useCallback)(async(e,t)=>{let a=await fetch(`/api/control-nodes/${e}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),r=await a.json();if(!r.success)throw Error(r.error??"Failed to update node");return c(t=>t.map(t=>t.id===e?r.data:t)),r.data},[]),j=(0,a.useCallback)(async e=>{let t=await fetch(`/api/control-nodes/${e}`,{method:"DELETE"}),a=await t.json();if(!a.success)throw Error(a.error??"Failed to delete node");c(t=>t.filter(t=>t.id!==e)),p(t=>t===e?"local":t)},[]),N=(0,a.useCallback)(async()=>{await m()},[m]),M=(0,a.useMemo)(()=>({nodes:d,activeNode:y,loading:h,switchNode:k,addNode:b,updateNode:w,removeNode:j,refreshNodes:N}),[d,y,h,k,b,w,j,N]);return(0,t.jsx)(s.Provider,{value:M,children:e})},"l",0,function(){let e=(0,a.useContext)(s);if(!e)throw Error("useControlNode must be used within <ControlNodeProvider>");return e}],4050)},64971,e=>{async function t(e){if(!e||"object"!=typeof e)return null;if("data"in e&&void 0!==e.data)return e.data;if("response"in e&&e.response instanceof Response&&!e.response.bodyUsed){let t=await e.response.clone().text().catch(()=>"");if(!t)return null;try{return JSON.parse(t)}catch{return t}}return null}e.s(["R",0,function(e){if(!e||"object"!=typeof e||!("error"in e))return;let t=e.error;if(t&&"object"==typeof t&&"message"in t&&"string"==typeof t.message)return t.message},"O",0,t])},39430,e=>{function t(e){return(e?.trim().replace(/\/+$/,"")??"")||null}e.s(["K",0,t,"L",0,function(e){let a=t(e);return a?{"x-proxy-target":a}:{}}])},35084,e=>{let t={warn:70,crit:90},a={bg:"#000000",surface:"#06060d",border:"#1a1a2e",text:"#e0e0ec",textMuted:"#8a8aab",primary:"#00e5ff",accent:"#ff006e",success:"#00ff41",warning:"#ffb300",danger:"#ff1744",info:"#00b0ff"};e.s(["q",0,t,"H",0,{primary:"bg-primary",accent:"bg-accent",success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info",muted:"bg-text-muted"},"z",0,{primary:"glow-text-primary",accent:"glow-text-accent",success:"glow-text-success",warning:"glow-text-warning",danger:"glow-text-danger",info:"glow-text-primary",muted:""},"T",0,{primary:"text-primary",accent:"text-accent",success:"text-success",warning:"text-warning",danger:"text-danger",info:"text-info",muted:"text-text-muted"},"v",0,{primary:"var(--color-primary)",accent:"var(--color-accent)",success:"var(--color-success)",warning:"var(--color-warning)",danger:"var(--color-danger)",info:"var(--color-info)",muted:"var(--color-text-muted)"},"f",0,function(e){return e>=100?"danger":e>=20?"warning":"success"},"s",0,function(){if("u"<typeof document)return a;let e=getComputedStyle(document.documentElement),t=(t,a)=>e.getPropertyValue(t).trim()||a;return{bg:t("--color-bg",a.bg),surface:t("--color-surface",a.surface),border:t("--color-border",a.border),text:t("--color-text",a.text),textMuted:t("--color-text-muted",a.textMuted),primary:t("--color-primary",a.primary),accent:t("--color-accent",a.accent),success:t("--color-success",a.success),warning:t("--color-warning",a.warning),danger:t("--color-danger",a.danger),info:t("--color-info",a.info)}},"Z",0,function(e,a=t){return e>=a.crit?"danger":e>=a.warn?"warning":"success"}])},7670,e=>{e.s(["f",0,function(){for(var e,t,a=0,r="",n=arguments.length;a<n;a++)(e=arguments[a])&&(t=function e(t){var a,r,n="";if("string"==typeof t||"number"==typeof t)n+=t;else if("object"==typeof t)if(Array.isArray(t)){var s=t.length;for(a=0;a<s;a++)t[a]&&(r=e(t[a]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}(e))&&(r&&(r+=" "),r+=t);return r}])},5014,e=>{var t=e.i(71645);let a=(...e)=>e.filter((e,t,a)=>!!e&&""!==e.trim()&&a.indexOf(e)===t).join(" ").trim(),r={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"},n=(0,t.createContext)({}),s=(0,t.forwardRef)(({color:e,size:s,width:i,height:o,strokeWidth:l,absoluteStrokeWidth:d,nonScalingStroke:c,className:u="",children:p,iconNode:h=[],icon:f={node:h,aliases:[],size:24},...m},y)=>{let{size:g=24,strokeWidth:x=2,absoluteStrokeWidth:v=!1,nonScalingStroke:k=!1,color:b="currentColor",className:w=""}=(0,t.useContext)(n)??{},j=!!p||(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(m),[N,M,C=[]]=function(e,t={}){return function(e,t={}){let n=t.attributeNames??{},s=e=>n[e]??e,i=e.size??e.width??r.width,o=e.size??e.height??r.height,l=e.aliases?.filter(e=>"string"==typeof e&&""!==e.trim()).map(e=>`lucide-${e}`)??[],d=[...e.name?[`lucide-${e.name}`]:[],...l],c=t.className?.split(" ").filter(Boolean)??[],u=!1===t.includeDefaultClasses?a(...c):a("lucide",...d,...c),p=t.absoluteStrokeWidth?Number(t.strokeWidth??r["stroke-width"])*Number(e.size??e.width??r.width)/Number(t.size??t.width??r.width):t.strokeWidth??r["stroke-width"];return["svg",{...Object.entries(r).reduce((e,[t,a])=>(e[s(t)]=a,e),{}),..."color"in t&&t.color&&{[s("stroke")]:t.color},..."size"in t&&null!=t.size&&{[s("width")]:t.size,[s("height")]:t.size},..."width"in t&&null!=t.width&&{[s("width")]:t.width},..."height"in t&&null!=t.height&&{[s("height")]:t.height},[s("stroke-width")]:p,...u&&{[s("class")]:u},[s("viewBox")]:`0 0 ${i} ${o}`,...!1===t.hasA11yProp?{[s("aria-hidden")]:"true"}:{},..."attributes"in t&&t.attributes},e.node.map(e=>{let[a,r,n]=e,i=t.nonScalingStroke?{[s("vector-effect")]:"non-scaling-stroke",...r}:r;return n?[a,i,n]:[a,i]})]}(e,{...t,attributeNames:{...t.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}(f,{color:e??b,width:i??s??g,height:o??s??g,strokeWidth:l??x,absoluteStrokeWidth:d??v,nonScalingStroke:c??k,className:a(w,u),hasA11yProp:j,attributes:m});return(0,t.createElement)(N,{ref:y,...M},[...C.map(([e,a])=>(0,t.createElement)(e,a)),...Array.isArray(p)?p:[p]])});e.s(["default",0,s],5014)},56420,e=>{var t=e.i(71645),a=e.i(5014);e.s(["f",0,function(e,r=[],n=[]){let s,i="string"==typeof e?function(e,t,a=[]){if(null==t)throw Error("[lucide]: iconNode is required when icon name is used");return{name:e?.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),size:24,node:t,...a.length>0?{aliases:a}:{}}}(e,r,n):e,o=(0,t.forwardRef)(({className:e,...r},n)=>(0,t.createElement)(a.default,{ref:n,icon:i,className:e,...r}));return i.name&&(o.displayName=(s=(e=>{let t="",a=!1;for(let r of e){if("-"===r||"_"===r||r<=" "){a=t.length>0;continue}0===t.length?t+=r.toLowerCase():t+=a?r.toUpperCase():r,a=!1}return t})(i.name)).charAt(0).toUpperCase()+s.slice(1)),o}],56420)},68877,e=>{var t=e.i(56420);let a={name:"arrow-right",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],68877)},56423,e=>{var t=e.i(56420);let a={name:"book-open",size:24,node:[["path",{d:"M12 5v16",key:"1f6ucr"}],["path",{d:"M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z",key:"1fyvmf"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],56423)},71567,e=>{var t=e.i(56420);let a={name:"bot",size:24,node:[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],71567)},89664,e=>{var t=e.i(56420);let a={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],89664)},16327,e=>{var t=e.i(56420);let a={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],16327)},67927,e=>{var t=e.i(56420);let a={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],67927)},24983,e=>{var t=e.i(56420);let a={name:"circle-alert",size:24,node:[["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"}]],aliases:["alert-circle"]};a.node;let r=(0,t.f)(a);e.s(["f",0,r])},99847,e=>{var t=e.i(24983);e.s(["f",()=>t.f])},69174,e=>{var t=e.i(56420);let a={name:"circle-arrow-up",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]],aliases:["arrow-up-circle"]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],69174)},51757,83967,e=>{var t=e.i(56420);let a={name:"circle-check",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 9-5.5 5.5L8 12",key:"xofnsj"}]],aliases:["check-circle-2"]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],51757);let n={name:"circle-x",size:24,node:[["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"}]],aliases:["x-circle"]};n.node;let s=(0,t.f)(n);e.s(["f",0,s],83967)},74544,e=>{var t=e.i(56420);let a={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],74544)},52330,e=>{var t=e.i(56420);let a={name:"code-xml",size:24,node:[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],aliases:["code-2"]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],52330)},9584,e=>{var t=e.i(56420);let a={name:"database",size:24,node:[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],9584)},62368,e=>{var t=e.i(56420);let a={name:"download",size:24,node:[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],62368)},90985,e=>{var t=e.i(56420);let a={name:"earth",size:24,node:[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],aliases:["globe-2"]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],90985)},26091,e=>{var t=e.i(56420);let a={name:"file-text",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],26091)},71028,e=>{var t=e.i(56420);let a={name:"gauge",size:24,node:[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],71028)},69846,e=>{var t=e.i(56420);let a={name:"git-branch",size:24,node:[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],69846)},10818,e=>{var t=e.i(56420);let a={name:"info",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],10818)},58925,e=>{var t=e.i(56420);let a={name:"key-round",size:24,node:[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],58925)},70533,e=>{var t=e.i(56420);let a={name:"library",size:24,node:[["path",{d:"m16 6 4 14",key:"ji33uf"}],["path",{d:"M12 6v14",key:"1n7gus"}],["path",{d:"M8 8v12",key:"1gg7y9"}],["path",{d:"M4 4v16",key:"6qkkli"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],70533)},32781,e=>{var t=e.i(56420);let a={name:"loader-circle",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],aliases:["loader-2"]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],32781)},67784,e=>{var t=e.i(56420);let a={name:"log-out",size:24,node:[["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"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],67784)},15281,e=>{var t=e.i(56420);let a={name:"pencil",size:24,node:[["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"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],15281)},77071,e=>{var t=e.i(56420);let a={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],77071)},20851,e=>{var t=e.i(56420);let a={name:"puzzle",size:24,node:[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],20851)},83892,e=>{var t=e.i(56420);let a={name:"radar",size:24,node:[["path",{d:"M19.07 4.93A10 10 0 0 0 6.99 3.34",key:"z3du51"}],["path",{d:"M4 6h.01",key:"oypzma"}],["path",{d:"M2.29 9.62A10 10 0 1 0 21.31 8.35",key:"qzzz0"}],["path",{d:"M16.24 7.76A6 6 0 1 0 8.23 16.67",key:"1yjesh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M17.99 11.66A6 6 0 0 1 15.77 16.67",key:"1u2y91"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"m13.41 10.59 5.66-5.66",key:"mhq4k0"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],83892)},15331,e=>{var t=e.i(56420);let a={name:"radio",size:24,node:[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],15331)},41120,e=>{var t=e.i(56420);let a={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],41120)},94371,e=>{var t=e.i(56420);let a={name:"rocket",size:24,node:[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",key:"u4xsad"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",key:"676m9"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05",key:"92ym6u"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],94371)},95925,e=>{var t=e.i(56420);let a={name:"rotate-ccw",size:24,node:[["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"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],95925)},66595,e=>{var t=e.i(56420);let a={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],66595)},41220,e=>{var t=e.i(56420);let a={name:"server",size:24,node:[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],41220)},66794,e=>{var t=e.i(56420);let a={name:"settings",size:24,node:[["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"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],66794)},84026,e=>{var t=e.i(56420);let a={name:"shield-check",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],84026)},82954,e=>{var t=e.i(56420);let a={name:"shield",size:24,node:[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],82954)},63644,e=>{var t=e.i(56420);let a={name:"siren",size:24,node:[["path",{d:"M7 18v-6a5 5 0 1 1 10 0v6",key:"pcx96s"}],["path",{d:"M5 21a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-1a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2z",key:"1b4s83"}],["path",{d:"M21 12h1",key:"jtio3y"}],["path",{d:"M18.5 4.5 18 5",key:"g5sp9y"}],["path",{d:"M2 12h1",key:"1uaihz"}],["path",{d:"M12 2v1",key:"11qlp1"}],["path",{d:"m4.929 4.929.707.707",key:"1i51kw"}],["path",{d:"M12 12v6",key:"3ahymv"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],63644)},12092,e=>{var t=e.i(56420);let a={name:"sliders-horizontal",size:24,node:[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],12092)},28623,e=>{var t=e.i(56420);let a={name:"sparkles",size:24,node:[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],aliases:["stars"]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],28623)},4139,e=>{var t=e.i(56420);let a={name:"terminal",size:24,node:[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],4139)},59659,e=>{var t=e.i(56420);let a={name:"trash",size:24,node:[["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"}]],aliases:["trash-2"]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],59659)},53138,e=>{var t=e.i(56420);let a={name:"triangle-alert",size:24,node:[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["alert-triangle"]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],53138)},82303,e=>{var t=e.i(56420);let a={name:"users",size:24,node:[["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"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],82303)},99835,e=>{var t=e.i(56420);let a={name:"webhook",size:24,node:[["path",{d:"M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2",key:"q3hayz"}],["path",{d:"m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06",key:"1go1hn"}],["path",{d:"m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8",key:"qlwsc0"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],99835)},66627,e=>{var t=e.i(56420);let a={name:"wifi",size:24,node:[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],66627)},63676,e=>{var t=e.i(56420);let a={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};a.node;let r=(0,t.f)(a);e.s(["X",0,r],63676)},64569,e=>{var t=e.i(56420);let a={name:"zap",size:24,node:[["path",{d:"M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z",key:"1v7up4"}]]};a.node;let r=(0,t.f)(a);e.s(["f",0,r],64569)},22016,(e,t,a)=>{e.i(47167),Object.defineProperty(a,"__esModule",{value:!0});var r={default:function(){return g},useLinkStatus:function(){return v}};for(var n in r)Object.defineProperty(a,n,{enumerable:!0,get:r[n]});let s=e.r(90809),i=e.r(43476),o=s._(e.r(71645)),l=e.r(95057),d=e.r(8372),c=e.r(18581),u=e.r(18967),p=e.r(5550),h=e.r(88540),f=e.r(91949),m=e.r(73668),y=e.r(9396);function g(t){var a;let r,n,s,[g,v]=(0,o.useOptimistic)(f.IDLE_LINK_STATUS),k=(0,o.useRef)(null),{href:b,as:w,children:j,prefetch:N=null,passHref:M,replace:C,shallow:z,scroll:S,onClick:_,onMouseEnter:A,onTouchStart:E,legacyBehavior:P=!1,onNavigate:L,transitionTypes:U,ref:R,unstable_dynamicOnHover:T,...I}=t;r=j,P&&("string"==typeof r||"number"==typeof r)&&(r=(0,i.jsx)("a",{children:r}));let $=o.default.useContext(d.AppRouterContext),O=!1!==N,q=!1===N?"none":!0===N?"full":"auto",F="none"!==q?"auto"===q?y.FetchStrategy.PPR:y.FetchStrategy.Full:y.FetchStrategy.PPR,H="string"==typeof(a=w||b)?a:(0,l.formatUrl)(a);if(P){if(r?.$$typeof===Symbol.for("react.lazy"))throw 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.");n=o.default.Children.only(r)}let B=P?n&&"object"==typeof n&&n.ref:R,V,D=o.default.useCallback(e=>(null!==$&&(k.current=(0,f.mountLinkInstance)(e,H,$,F,O,v,V)),()=>{k.current&&((0,f.unmountLinkForCurrentNavigation)(k.current),k.current=null),(0,f.unmountPrefetchableInstance)(e)}),[O,H,$,F,v,V]),K={ref:(0,c.useMergedRef)(D,B),onClick(t){P||"function"!=typeof _||_(t),P&&n.props&&"function"==typeof n.props.onClick&&n.props.onClick(t),!$||t.defaultPrevented||function(t,a,r,n,s,i,o,l="none"){if("u">typeof window){let d,{nodeName:c}=t.currentTarget;if("A"===c.toUpperCase()&&((d=t.currentTarget.getAttribute("target"))&&"_self"!==d||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(a)){n&&(t.preventDefault(),location.replace(a));return}if(t.preventDefault(),i){let e=!1;if(i({preventDefault:()=>{e=!0}}),e)return}let{navigate:u}=e.r(32916);u(a,n?"replace":"push",!1===s?h.ScrollBehavior.NoScroll:h.ScrollBehavior.Default,r.current,o,l)}}(t,H,k,C,S,L,U,q)},onMouseEnter(e){P||"function"!=typeof A||A(e),P&&n.props&&"function"==typeof n.props.onMouseEnter&&n.props.onMouseEnter(e),$&&O&&(0,f.onNavigationIntent)(e.currentTarget,!0===T)},onTouchStart:function(e){P||"function"!=typeof E||E(e),P&&n.props&&"function"==typeof n.props.onTouchStart&&n.props.onTouchStart(e),$&&O&&(0,f.onNavigationIntent)(e.currentTarget,!0===T)}};return(0,u.isAbsoluteUrl)(H)?K.href=H:P&&!M&&("a"!==n.type||"href"in n.props)||(K.href=(0,p.addBasePath)(H)),s=P?o.default.cloneElement(n,K):(0,i.jsx)("a",{...I,...K,children:r}),(0,i.jsx)(x.Provider,{value:g,children:s})}let x=(0,o.createContext)(f.IDLE_LINK_STATUS),v=()=>(0,o.useContext)(x);("function"==typeof a.default||"object"==typeof a.default&&null!==a.default)&&void 0===a.default.__esModule&&(Object.defineProperty(a.default,"__esModule",{value:!0}),Object.assign(a.default,a),t.exports=a.default)},18581,(e,t,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"useMergedRef",{enumerable:!0,get:function(){return n}});let r=e.r(71645);function n(e,t){let a=(0,r.useRef)(null),n=(0,r.useRef)(null);return(0,r.useCallback)(r=>{if(null===r){let e=a.current;e&&(a.current=null,e());let t=n.current;t&&(n.current=null,t())}else e&&(a.current=s(e,r)),t&&(n.current=s(t,r))},[e,t])}function s(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let a=e(t);return"function"==typeof a?a:()=>e(null)}}("function"==typeof a.default||"object"==typeof a.default&&null!==a.default)&&void 0===a.default.__esModule&&(Object.defineProperty(a.default,"__esModule",{value:!0}),Object.assign(a.default,a),t.exports=a.default)},95057,(e,t,a)=>{e.i(47167),Object.defineProperty(a,"__esModule",{value:!0});var r={formatUrl:function(){return o},formatWithValidation:function(){return d},urlObjectKeys:function(){return l}};for(var n in r)Object.defineProperty(a,n,{enumerable:!0,get:r[n]});let s=e.r(90809)._(e.r(98183)),i=/https?|ftp|gopher|file/;function o(e){let{auth:t,hostname:a}=e,r=e.protocol||"",n=e.pathname||"",o=e.hash||"",l=e.query||"",d=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?d=t+e.host:a&&(d=t+(~a.indexOf(":")?`[${a}]`:a),e.port&&(d+=":"+e.port)),l&&"object"==typeof l&&(l=String(s.urlQueryToSearchParams(l)));let c=e.search||l&&`?${l}`||"";return r&&!r.endsWith(":")&&(r+=":"),e.slashes||(!r||i.test(r))&&!1!==d?(d="//"+(d||""),n&&"/"!==n[0]&&(n="/"+n)):d||(d=""),o&&"#"!==o[0]&&(o="#"+o),c&&"?"!==c[0]&&(c="?"+c),n=n.replace(/[?#]/g,encodeURIComponent),c=c.replace("#","%23"),`${r}${d}${n}${c}${o}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function d(e){return o(e)}},73668,(e,t,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"isLocalURL",{enumerable:!0,get:function(){return s}});let r=e.r(18967),n=e.r(52817);function s(e){if(!(0,r.isAbsoluteUrl)(e))return!0;try{let t=(0,r.getLocationOrigin)(),a=new URL(e,t);return a.origin===t&&(0,n.hasBasePath)(a.pathname)}catch(e){return!1}}},18967,(e,t,a)=>{e.i(47167),Object.defineProperty(a,"__esModule",{value:!0});var r={DecodeError:function(){return g},MiddlewareNotFoundError:function(){return b},MissingStaticPage:function(){return k},NormalizeError:function(){return x},PageNotFoundError:function(){return v},SP:function(){return m},ST:function(){return y},WEB_VITALS:function(){return s},execOnce:function(){return i},getDisplayName:function(){return u},getLocationOrigin:function(){return d},getURL:function(){return c},isAbsoluteUrl:function(){return l},isResSent:function(){return p},loadGetInitialProps:function(){return f},normalizeRepeatedSlashes:function(){return h},stringifyError:function(){return w}};for(var n in r)Object.defineProperty(a,n,{enumerable:!0,get:r[n]});let s=["CLS","FCP","INP","LCP","TTFB"];function i(e){let t,a=!1;return(...r)=>(a||(a=!0,t=e(...r)),t)}let o=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,l=e=>{let t=e.charCodeAt(0);return!!(t>=65&&t<=90||t>=97&&t<=122)&&o.test(e)};function d(){let{protocol:e,hostname:t,port:a}=window.location;return`${e}//${t}${a?":"+a:""}`}function c(){let{href:e}=window.location,t=d();return e.substring(t.length)}function u(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function p(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 f(e,t){let a=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await f(t.Component,t.ctx)}:{};let r=await e.getInitialProps(t);if(a&&p(a))return r;if(!r)throw Error(`"${u(e)}.getInitialProps()" should resolve to an object. But found "${r}" instead.`);return r}let m="u">typeof performance,y=m&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class g extends Error{}class x extends Error{}class v 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 b extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function w(e){return JSON.stringify({message:e.message,stack:e.stack})}}],18566,(e,t,a)=>{t.exports=e.r(76562)}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,15378,e=>{var t=e.i(43476),s=e.i(71645),a=e.i(18566),r=e.i(22016),n=e.i(82983),l=e.i(46670),c=e.i(66398),d=e.i(71689),i=e.i(31343),o=e.i(64659),x=e.i(63059),u=e.i(67240);e.s(["default",0,function({params:e}){let m=(0,a.useRouter)(),[b,p]=(0,s.useState)(""),[h,g]=(0,s.useState)(null),[f,v]=(0,s.useState)([]),[N,j]=(0,s.useState)(0),[y,k]=(0,s.useState)(1),[w,C]=(0,s.useState)(null),[S,E]=(0,s.useState)(!0),[T,I]=(0,s.useState)("edit"),[R,A]=(0,s.useState)(!1),[D,L]=(0,s.useState)(null),O=(0,s.useCallback)(async e=>{try{let t=await n.f.webhooks.get(e);g(t)}catch{m.push("/webhooks")}},[m]),U=(0,s.useCallback)(async(e,t)=>{try{let s=await n.f.webhooks.deliveries(e,t);s&&(v(s.deliveries),j(s.total))}catch{}},[]);(0,s.useEffect)(()=>{e.then(({id:e})=>{p(e),E(!1),O(e),U(e,1)})},[e,O,U]);let M=async()=>{A(!0);try{let e=await n.f.webhooks.test(b);e?.success?(alert("Test webhook sent successfully!"),U(b,y)):alert(`Test failed: ${e?.error??"Unknown error"}`)}finally{A(!1)}};if(S||!h)return(0,t.jsx)("div",{className:"flex items-center justify-center py-20",children:(0,t.jsx)("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-accent border-t-transparent"})});let P=Math.ceil(N/20);return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsxs)(r.default,{href:"/webhooks",className:"text-xs text-text-muted hover:text-accent mb-3 inline-flex items-center gap-1",children:[(0,t.jsx)(d.f,{className:"h-3 w-3"})," Back to webhooks"]}),(0,t.jsxs)("div",{className:"flex items-center gap-3 mt-2",children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold text-accent",children:h.name}),(0,t.jsx)(l.t,{variant:h.active?"success":"default",children:h.active?"Active":"Inactive"})]}),(0,t.jsx)("p",{className:"text-sm mt-1 text-text-muted font-mono",children:h.url})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4 mb-6 border-b border-border/30 pb-2",children:[(0,t.jsx)("button",{onClick:()=>I("edit"),className:`text-xs uppercase tracking-wider pb-1 border-b-2 transition-colors ${"edit"===T?"border-accent text-accent":"border-transparent text-text-muted hover:text-text"}`,children:"Configuration"}),(0,t.jsxs)("button",{onClick:()=>{I("deliveries"),U(b,y)},className:`text-xs uppercase tracking-wider pb-1 border-b-2 transition-colors ${"deliveries"===T?"border-accent text-accent":"border-transparent text-text-muted hover:text-text"}`,children:["Deliveries (",N,")"]}),(0,t.jsxs)("button",{onClick:M,disabled:R,className:"ml-auto flex items-center gap-1 text-xs px-3 py-1.5 rounded bg-accent/10 text-accent hover:bg-accent/20 transition-colors disabled:opacity-50",children:[(0,t.jsx)(i.f,{className:"h-3 w-3"})," ",R?"Sending…":"Send Test"]})]}),"edit"===T&&(0,t.jsx)(c.WebhookForm,{endpoint:h}),"deliveries"===T&&(0,t.jsx)("div",{children:f.length>0?(0,t.jsxs)("div",{className:"space-y-2",children:[f.map(e=>(0,t.jsxs)("div",{className:"rounded-lg border border-border/50 bg-surface transition-all hover:border-accent/20",children:[(0,t.jsxs)("button",{onClick:()=>C(w===e.id?null:e.id),className:"w-full flex items-center gap-3 p-3 text-left",children:[w===e.id?(0,t.jsx)(o.f,{className:"h-3.5 w-3.5 text-text-muted"}):(0,t.jsx)(x.f,{className:"h-3.5 w-3.5 text-text-muted"}),(0,t.jsx)(l.t,{variant:function(e){switch(e){case"success":return"success";case"failed":return"danger";default:return"warning"}}(e.status),children:e.status}),(0,t.jsx)("code",{className:"text-xs text-accent",children:e.event}),e.httpStatus&&(0,t.jsxs)("span",{className:"text-xs text-text-muted",children:["HTTP ",e.httpStatus]}),(0,t.jsxs)("span",{className:"text-xs text-text-muted ml-auto",children:[e.attempts," attempt",1!==e.attempts?"s":""]}),(0,t.jsx)("span",{className:"text-xs text-text-muted",children:new Date(e.createdAt).toLocaleString()})]}),w===e.id&&(0,t.jsxs)("div",{className:"border-t border-border/30 p-3 space-y-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-xs uppercase tracking-wider text-text-muted",children:"Payload"}),(0,t.jsx)("pre",{className:"mt-1 text-xs font-mono text-text-muted bg-bg rounded p-2 overflow-x-auto max-h-48",children:(()=>{try{return JSON.stringify(JSON.parse(e.payload),null,2)}catch{return e.payload}})()})]}),e.response&&(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-xs uppercase tracking-wider text-text-muted",children:"Response"}),(0,t.jsx)("pre",{className:"mt-1 text-xs font-mono text-text-muted bg-bg rounded p-2 overflow-x-auto max-h-32",children:e.response})]}),e.error&&(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-xs uppercase tracking-wider text-danger",children:"Error"}),(0,t.jsx)("pre",{className:"mt-1 text-xs font-mono text-danger/80 bg-danger/5 rounded p-2",children:e.error})]}),"failed"===e.status&&(0,t.jsxs)("button",{disabled:D===e.id,onClick:async()=>{L(e.id);try{await n.f.webhooks.redeliver(b,e.id),U(b,y)}catch{alert("Redelivery failed")}finally{L(null)}},className:"flex items-center gap-1.5 text-xs px-3 py-1.5 rounded bg-accent/10 text-accent hover:bg-accent/20 transition-colors disabled:opacity-50",children:[(0,t.jsx)(u.f,{className:"h-3 w-3"}),D===e.id?"Redelivering…":"Redeliver"]})]})]},e.id)),P>1&&(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2 pt-4",children:[(0,t.jsx)("button",{disabled:y<=1,onClick:()=>{k(e=>e-1),U(b,y-1)},className:"text-xs px-3 py-1.5 rounded border border-border/50 text-text-muted hover:text-text disabled:opacity-50",children:"Previous"}),(0,t.jsxs)("span",{className:"text-xs text-text-muted",children:["Page ",y," of ",P]}),(0,t.jsx)("button",{disabled:y>=P,onClick:()=>{k(e=>e+1),U(b,y+1)},className:"text-xs px-3 py-1.5 rounded border border-border/50 text-text-muted hover:text-text disabled:opacity-50",children:"Next"})]})]}):(0,t.jsxs)("div",{className:"text-center py-16 text-text-muted border border-border/50 rounded-lg bg-surface/30",children:[(0,t.jsx)("p",{children:"No deliveries yet"}),(0,t.jsx)("p",{className:"text-xs mt-1",children:"Send a test event to see delivery results"})]})})]})}])},66398,e=>{var t=e.i(43476),s=e.i(71645),a=e.i(18566),r=e.i(82983),n=e.i(56909),l=e.i(37727),c=e.i(7233),d=e.i(27612);let i=["node.offline","node.degraded","node.recovered","command.failed","deploy.failed","upgrade.failed","ai.heartbeat","ai.anomaly"];e.s(["WebhookForm",0,function({endpoint:e}){let o=(0,a.useRouter)(),x=!!e,u=(()=>{if(!e)return[];try{return JSON.parse(e.events)}catch{return[]}})(),[m,b]=(0,s.useState)(e?.name??""),[p,h]=(0,s.useState)(""),[g,f]=(0,s.useState)(e?.type??"generic"),[v,N]=(0,s.useState)(""),[j,y]=(0,s.useState)(!1),[k,w]=(0,s.useState)(u),[C,S]=(0,s.useState)([]),[E,T]=(0,s.useState)(!1),[I,R]=(0,s.useState)(e?.retries??3),[A,D]=(0,s.useState)(e?.timeoutMs??1e4),[L,O]=(0,s.useState)(!1),[U,M]=(0,s.useState)(""),P=async t=>{if(t.preventDefault(),m.trim()&&(x||p.trim())){O(!0),M("");try{let t={};for(let e of C)e.key.trim()&&(t[e.key.trim()]=e.value);if(x){let s={name:m.trim(),...p.trim()?{url:p.trim()}:{},type:g,events:k,retries:I,timeoutMs:A};j?s.secret=null:v&&(s.secret=v),E&&(s.headers=t),await r.f.webhooks.update(e.id,s)}else{let e={name:m.trim(),url:p.trim(),type:g,events:k,headers:t,retries:I,timeoutMs:A};v&&(e.secret=v),await r.f.webhooks.create(e)}o.push("/webhooks"),o.refresh()}catch{M("Failed to save webhook. Check the URL and try again.")}finally{O(!1)}}};return(0,t.jsxs)("form",{onSubmit:P,className:"space-y-6 max-w-2xl",children:[U&&(0,t.jsx)("div",{className:"rounded-lg border border-danger/30 bg-danger/5 p-4 text-sm text-danger",children:U}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs uppercase tracking-wider text-text-muted mb-2",children:"Name"}),(0,t.jsx)("input",{type:"text",value:m,onChange:e=>b(e.target.value),required:!0,placeholder:"My Webhook",className:"w-full text-sm bg-bg border border-border/50 rounded-lg px-3 py-2 text-text focus:outline-none focus:border-accent/50"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs uppercase tracking-wider text-text-muted mb-2",children:"URL"}),(0,t.jsx)("input",{type:"url",value:p,onChange:e=>h(e.target.value),required:!0,placeholder:x?`Leave blank to keep ${e.url}`:"https://example.com/webhook",className:"w-full text-sm bg-bg border border-border/50 rounded-lg px-3 py-2 text-text font-mono focus:outline-none focus:border-accent/50"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs uppercase tracking-wider text-text-muted mb-2",children:"Type"}),(0,t.jsxs)("select",{value:g,onChange:e=>f(e.target.value),className:"text-sm bg-bg border border-border/50 rounded-lg px-3 py-2 text-text focus:outline-none focus:border-accent/50",children:[(0,t.jsx)("option",{value:"generic",children:"Generic"}),(0,t.jsx)("option",{value:"slack",children:"Slack"}),(0,t.jsx)("option",{value:"discord",children:"Discord"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-xs uppercase tracking-wider text-text-muted mb-2",children:["Secret ",x&&(0,t.jsxs)("span",{className:"normal-case text-text-muted/60",children:["(",e.secretConfigured?"configured; ":"","leave empty to keep current)"]})]}),(0,t.jsx)("input",{type:"password",value:v,onChange:e=>{N(e.target.value),y(!1)},placeholder:x?"••••••••":"HMAC signing secret (optional)",className:"w-full text-sm bg-bg border border-border/50 rounded-lg px-3 py-2 text-text focus:outline-none focus:border-accent/50"}),x&&e.secretConfigured&&(0,t.jsx)("button",{type:"button",onClick:()=>{N(""),y(!0)},className:"mt-2 text-xs text-danger hover:text-danger",children:j?"Signing secret will be cleared":"Clear saved signing secret"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-xs uppercase tracking-wider text-text-muted mb-2",children:["Events ",(0,t.jsx)("span",{className:"normal-case text-text-muted/60",children:"(empty = all events)"})]}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:i.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>{w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},className:`text-xs px-2.5 py-1 rounded-full border transition-colors ${k.includes(e)?"border-accent/50 bg-accent/10 text-accent":"border-border/50 bg-surface text-text-muted hover:text-text"}`,children:e},e))})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-xs uppercase tracking-wider text-text-muted mb-2",children:["Custom Headers",x&&e.headersConfigured&&!E&&(0,t.jsx)("span",{className:"normal-case text-text-muted/60",children:" (configured; values are write-only)"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[C.map((e,s)=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("input",{type:"text",value:e.key,onChange:e=>{S(C.map((t,a)=>a===s?{key:e.target.value,value:t.value}:t)),T(!0)},placeholder:"Header name",className:"flex-1 text-xs bg-bg border border-border/50 rounded px-2 py-1.5 text-text focus:outline-none focus:border-accent/50"}),(0,t.jsx)("input",{type:"text",value:e.value,onChange:e=>{S(C.map((t,a)=>a===s?{key:t.key,value:e.target.value}:t)),T(!0)},placeholder:"Value",className:"flex-1 text-xs bg-bg border border-border/50 rounded px-2 py-1.5 text-text focus:outline-none focus:border-accent/50"}),(0,t.jsx)("button",{type:"button",onClick:()=>{S(C.filter((e,t)=>t!==s)),T(!0)},className:"text-danger hover:text-danger p-1",children:(0,t.jsx)(d.f,{className:"h-3 w-3"})})]},s)),(0,t.jsxs)("button",{type:"button",onClick:()=>{S([...C,{key:"",value:""}]),T(!0)},className:"flex items-center gap-1 text-xs text-accent hover:text-accent/80",children:[(0,t.jsx)(c.f,{className:"h-3 w-3"})," Add header"]}),x&&e.headersConfigured&&(0,t.jsx)("button",{type:"button",onClick:()=>{S([]),T(!0)},className:"ml-3 text-xs text-danger hover:text-danger",children:"Clear saved headers"})]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs uppercase tracking-wider text-text-muted mb-2",children:"Retries"}),(0,t.jsx)("input",{type:"number",min:0,max:10,value:I,onChange:e=>R(Number(e.target.value)),className:"w-full text-sm bg-bg border border-border/50 rounded-lg px-3 py-2 text-text focus:outline-none focus:border-accent/50"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs uppercase tracking-wider text-text-muted mb-2",children:"Timeout (ms)"}),(0,t.jsx)("input",{type:"number",min:1e3,max:6e4,step:1e3,value:A,onChange:e=>D(Number(e.target.value)),className:"w-full text-sm bg-bg border border-border/50 rounded-lg px-3 py-2 text-text focus:outline-none focus:border-accent/50"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3 pt-2",children:[(0,t.jsxs)("button",{type:"submit",disabled:L||!m.trim()||!p.trim(),className:"flex items-center gap-2 text-sm px-4 py-2 rounded-lg bg-accent/20 text-accent hover:bg-accent/30 disabled:opacity-50 transition-colors",children:[(0,t.jsx)(n.f,{className:"h-4 w-4"})," ",x?"Update":"Create"]}),(0,t.jsxs)("button",{type:"button",onClick:()=>o.push("/webhooks"),className:"flex items-center gap-1 text-sm px-4 py-2 rounded-lg text-text-muted hover:text-text transition-colors",children:[(0,t.jsx)(l.X,{className:"h-4 w-4"})," Cancel"]})]})]})}])},46670,e=>{var t=e.i(43476),s=e.i(78571);let a={default:"border-border text-text-muted",success:"border-success/40 text-success bg-success/5 shadow-[0_0_6px_rgba(0,255,65,0.15)]",warning:"border-warning/40 text-warning bg-warning/5 shadow-[0_0_6px_rgba(255,179,0,0.15)]",danger:"border-danger/40 text-danger bg-danger/5 shadow-[0_0_6px_rgba(255,23,68,0.15)]",info:"border-info/40 text-info bg-info/5 shadow-[0_0_6px_rgba(0,176,255,0.15)]"},r={default:"bg-text-muted",success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info"};e.s(["t",0,function({children:e,variant:n="default",className:l,dot:c=!1,pulse:d=!1}){return(0,t.jsxs)("span",{className:(0,s.f)("inline-flex items-center gap-1.5 rounded-chip border px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider",a[n],l),children:[c&&(0,t.jsxs)("span",{"aria-hidden":"true",className:"relative inline-flex h-1.5 w-1.5",children:[d&&(0,t.jsx)("span",{className:(0,s.f)("absolute inset-0 rounded-full animate-halo",r[n])}),(0,t.jsx)("span",{className:(0,s.f)("relative inline-flex h-1.5 w-1.5 rounded-full",r[n])})]}),e]})},"k",0,function(e){switch(e.toUpperCase()){case"ONLINE":case"COMPLETED":case"ACTIVE":case"RUNNING":case"INSTALLED":case"HEALTHY":return"success";case"DEGRADED":case"PAUSED":case"QUEUED":case"PENDING":case"INSTALLING":return"warning";case"OFFLINE":case"FAILED":case"ERROR":case"TIMEOUT":case"CANCELLED":case"DECOMMISSIONED":case"CRITICAL":return"danger";case"PROVISIONING":case"UPDATING":return"info";default:return"default"}}])},71689,e=>{let t=(0,e.i(75254).f)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["f",0,t],71689)},31343,e=>{let t=(0,e.i(75254).f)("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);e.s(["f",0,t],31343)},56909,e=>{let t=(0,e.i(75254).f)("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);e.s(["f",0,t],56909)}])})();
|
|
1
|
+
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,15378,e=>{var t=e.i(43476),s=e.i(71645),a=e.i(18566),r=e.i(22016),n=e.i(82983),l=e.i(46670),c=e.i(66398),d=e.i(9347),i=e.i(21357),o=e.i(16327),x=e.i(67927),u=e.i(95925);e.s(["default",0,function({params:e}){let m=(0,a.useRouter)(),[b,p]=(0,s.useState)(""),[h,g]=(0,s.useState)(null),[f,v]=(0,s.useState)([]),[N,j]=(0,s.useState)(0),[y,k]=(0,s.useState)(1),[w,C]=(0,s.useState)(null),[S,E]=(0,s.useState)(!0),[T,I]=(0,s.useState)("edit"),[R,A]=(0,s.useState)(!1),[D,L]=(0,s.useState)(null),O=(0,s.useCallback)(async e=>{try{let t=await n.f.webhooks.get(e);g(t)}catch{m.push("/webhooks")}},[m]),M=(0,s.useCallback)(async(e,t)=>{try{let s=await n.f.webhooks.deliveries(e,t);s&&(v(s.deliveries),j(s.total))}catch{}},[]);(0,s.useEffect)(()=>{e.then(({id:e})=>{p(e),E(!1),O(e),M(e,1)})},[e,O,M]);let U=async()=>{A(!0);try{let e=await n.f.webhooks.test(b);e?.success?(alert("Test webhook sent successfully!"),M(b,y)):alert(`Test failed: ${e?.error??"Unknown error"}`)}finally{A(!1)}};if(S||!h)return(0,t.jsx)("div",{className:"flex items-center justify-center py-20",children:(0,t.jsx)("div",{className:"h-6 w-6 animate-spin rounded-full border-2 border-accent border-t-transparent"})});let _=Math.ceil(N/20);return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsxs)(r.default,{href:"/webhooks",className:"text-xs text-text-muted hover:text-accent mb-3 inline-flex items-center gap-1",children:[(0,t.jsx)(d.f,{className:"h-3 w-3"})," Back to webhooks"]}),(0,t.jsxs)("div",{className:"flex items-center gap-3 mt-2",children:[(0,t.jsx)("h1",{className:"text-2xl font-semibold text-accent",children:h.name}),(0,t.jsx)(l.t,{variant:h.active?"success":"default",children:h.active?"Active":"Inactive"})]}),(0,t.jsx)("p",{className:"text-sm mt-1 text-text-muted font-mono",children:h.url})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4 mb-6 border-b border-border/30 pb-2",children:[(0,t.jsx)("button",{onClick:()=>I("edit"),className:`text-xs uppercase tracking-wider pb-1 border-b-2 transition-colors ${"edit"===T?"border-accent text-accent":"border-transparent text-text-muted hover:text-text"}`,children:"Configuration"}),(0,t.jsxs)("button",{onClick:()=>{I("deliveries"),M(b,y)},className:`text-xs uppercase tracking-wider pb-1 border-b-2 transition-colors ${"deliveries"===T?"border-accent text-accent":"border-transparent text-text-muted hover:text-text"}`,children:["Deliveries (",N,")"]}),(0,t.jsxs)("button",{onClick:U,disabled:R,className:"ml-auto flex items-center gap-1 text-xs px-3 py-1.5 rounded bg-accent/10 text-accent hover:bg-accent/20 transition-colors disabled:opacity-50",children:[(0,t.jsx)(i.f,{className:"h-3 w-3"})," ",R?"Sending…":"Send Test"]})]}),"edit"===T&&(0,t.jsx)(c.WebhookForm,{endpoint:h}),"deliveries"===T&&(0,t.jsx)("div",{children:f.length>0?(0,t.jsxs)("div",{className:"space-y-2",children:[f.map(e=>(0,t.jsxs)("div",{className:"rounded-lg border border-border/50 bg-surface transition-all hover:border-accent/20",children:[(0,t.jsxs)("button",{onClick:()=>C(w===e.id?null:e.id),className:"w-full flex items-center gap-3 p-3 text-left",children:[w===e.id?(0,t.jsx)(o.f,{className:"h-3.5 w-3.5 text-text-muted"}):(0,t.jsx)(x.f,{className:"h-3.5 w-3.5 text-text-muted"}),(0,t.jsx)(l.t,{variant:function(e){switch(e){case"success":return"success";case"failed":return"danger";default:return"warning"}}(e.status),children:e.status}),(0,t.jsx)("code",{className:"text-xs text-accent",children:e.event}),e.httpStatus&&(0,t.jsxs)("span",{className:"text-xs text-text-muted",children:["HTTP ",e.httpStatus]}),(0,t.jsxs)("span",{className:"text-xs text-text-muted ml-auto",children:[e.attempts," attempt",1!==e.attempts?"s":""]}),(0,t.jsx)("span",{className:"text-xs text-text-muted",children:new Date(e.createdAt).toLocaleString()})]}),w===e.id&&(0,t.jsxs)("div",{className:"border-t border-border/30 p-3 space-y-3",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-xs uppercase tracking-wider text-text-muted",children:"Payload"}),(0,t.jsx)("pre",{className:"mt-1 text-xs font-mono text-text-muted bg-bg rounded p-2 overflow-x-auto max-h-48",children:(()=>{try{return JSON.stringify(JSON.parse(e.payload),null,2)}catch{return e.payload}})()})]}),e.response&&(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-xs uppercase tracking-wider text-text-muted",children:"Response"}),(0,t.jsx)("pre",{className:"mt-1 text-xs font-mono text-text-muted bg-bg rounded p-2 overflow-x-auto max-h-32",children:e.response})]}),e.error&&(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-xs uppercase tracking-wider text-danger",children:"Error"}),(0,t.jsx)("pre",{className:"mt-1 text-xs font-mono text-danger/80 bg-danger/5 rounded p-2",children:e.error})]}),"failed"===e.status&&(0,t.jsxs)("button",{disabled:D===e.id,onClick:async()=>{L(e.id);try{await n.f.webhooks.redeliver(b,e.id),M(b,y)}catch{alert("Redelivery failed")}finally{L(null)}},className:"flex items-center gap-1.5 text-xs px-3 py-1.5 rounded bg-accent/10 text-accent hover:bg-accent/20 transition-colors disabled:opacity-50",children:[(0,t.jsx)(u.f,{className:"h-3 w-3"}),D===e.id?"Redelivering…":"Redeliver"]})]})]},e.id)),_>1&&(0,t.jsxs)("div",{className:"flex items-center justify-center gap-2 pt-4",children:[(0,t.jsx)("button",{disabled:y<=1,onClick:()=>{k(e=>e-1),M(b,y-1)},className:"text-xs px-3 py-1.5 rounded border border-border/50 text-text-muted hover:text-text disabled:opacity-50",children:"Previous"}),(0,t.jsxs)("span",{className:"text-xs text-text-muted",children:["Page ",y," of ",_]}),(0,t.jsx)("button",{disabled:y>=_,onClick:()=>{k(e=>e+1),M(b,y+1)},className:"text-xs px-3 py-1.5 rounded border border-border/50 text-text-muted hover:text-text disabled:opacity-50",children:"Next"})]})]}):(0,t.jsxs)("div",{className:"text-center py-16 text-text-muted border border-border/50 rounded-lg bg-surface/30",children:[(0,t.jsx)("p",{children:"No deliveries yet"}),(0,t.jsx)("p",{className:"text-xs mt-1",children:"Send a test event to see delivery results"})]})})]})}])},66398,e=>{var t=e.i(43476),s=e.i(71645),a=e.i(18566),r=e.i(82983),n=e.i(56522),l=e.i(63676),c=e.i(77071),d=e.i(59659);let i=["node.offline","node.degraded","node.recovered","command.failed","deploy.failed","upgrade.failed","ai.heartbeat","ai.anomaly"];e.s(["WebhookForm",0,function({endpoint:e}){let o=(0,a.useRouter)(),x=!!e,u=(()=>{if(!e)return[];try{return JSON.parse(e.events)}catch{return[]}})(),[m,b]=(0,s.useState)(e?.name??""),[p,h]=(0,s.useState)(""),[g,f]=(0,s.useState)(e?.type??"generic"),[v,N]=(0,s.useState)(""),[j,y]=(0,s.useState)(!1),[k,w]=(0,s.useState)(u),[C,S]=(0,s.useState)([]),[E,T]=(0,s.useState)(!1),[I,R]=(0,s.useState)(e?.retries??3),[A,D]=(0,s.useState)(e?.timeoutMs??1e4),[L,O]=(0,s.useState)(!1),[M,U]=(0,s.useState)(""),_=async t=>{if(t.preventDefault(),m.trim()&&(x||p.trim())){O(!0),U("");try{let t={};for(let e of C)e.key.trim()&&(t[e.key.trim()]=e.value);if(x){let s={name:m.trim(),...p.trim()?{url:p.trim()}:{},type:g,events:k,retries:I,timeoutMs:A};j?s.secret=null:v&&(s.secret=v),E&&(s.headers=t),await r.f.webhooks.update(e.id,s)}else{let e={name:m.trim(),url:p.trim(),type:g,events:k,headers:t,retries:I,timeoutMs:A};v&&(e.secret=v),await r.f.webhooks.create(e)}o.push("/webhooks"),o.refresh()}catch{U("Failed to save webhook. Check the URL and try again.")}finally{O(!1)}}};return(0,t.jsxs)("form",{onSubmit:_,className:"space-y-6 max-w-2xl",children:[M&&(0,t.jsx)("div",{className:"rounded-lg border border-danger/30 bg-danger/5 p-4 text-sm text-danger",children:M}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs uppercase tracking-wider text-text-muted mb-2",children:"Name"}),(0,t.jsx)("input",{type:"text",value:m,onChange:e=>b(e.target.value),required:!0,placeholder:"My Webhook",className:"w-full text-sm bg-bg border border-border/50 rounded-lg px-3 py-2 text-text focus:outline-none focus:border-accent/50"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs uppercase tracking-wider text-text-muted mb-2",children:"URL"}),(0,t.jsx)("input",{type:"url",value:p,onChange:e=>h(e.target.value),required:!0,placeholder:x?`Leave blank to keep ${e.url}`:"https://example.com/webhook",className:"w-full text-sm bg-bg border border-border/50 rounded-lg px-3 py-2 text-text font-mono focus:outline-none focus:border-accent/50"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs uppercase tracking-wider text-text-muted mb-2",children:"Type"}),(0,t.jsxs)("select",{value:g,onChange:e=>f(e.target.value),className:"text-sm bg-bg border border-border/50 rounded-lg px-3 py-2 text-text focus:outline-none focus:border-accent/50",children:[(0,t.jsx)("option",{value:"generic",children:"Generic"}),(0,t.jsx)("option",{value:"slack",children:"Slack"}),(0,t.jsx)("option",{value:"discord",children:"Discord"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-xs uppercase tracking-wider text-text-muted mb-2",children:["Secret ",x&&(0,t.jsxs)("span",{className:"normal-case text-text-muted/60",children:["(",e.secretConfigured?"configured; ":"","leave empty to keep current)"]})]}),(0,t.jsx)("input",{type:"password",value:v,onChange:e=>{N(e.target.value),y(!1)},placeholder:x?"••••••••":"HMAC signing secret (optional)",className:"w-full text-sm bg-bg border border-border/50 rounded-lg px-3 py-2 text-text focus:outline-none focus:border-accent/50"}),x&&e.secretConfigured&&(0,t.jsx)("button",{type:"button",onClick:()=>{N(""),y(!0)},className:"mt-2 text-xs text-danger hover:text-danger",children:j?"Signing secret will be cleared":"Clear saved signing secret"})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-xs uppercase tracking-wider text-text-muted mb-2",children:["Events ",(0,t.jsx)("span",{className:"normal-case text-text-muted/60",children:"(empty = all events)"})]}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:i.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>{w(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},className:`text-xs px-2.5 py-1 rounded-full border transition-colors ${k.includes(e)?"border-accent/50 bg-accent/10 text-accent":"border-border/50 bg-surface text-text-muted hover:text-text"}`,children:e},e))})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-xs uppercase tracking-wider text-text-muted mb-2",children:["Custom Headers",x&&e.headersConfigured&&!E&&(0,t.jsx)("span",{className:"normal-case text-text-muted/60",children:" (configured; values are write-only)"})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[C.map((e,s)=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("input",{type:"text",value:e.key,onChange:e=>{S(C.map((t,a)=>a===s?{key:e.target.value,value:t.value}:t)),T(!0)},placeholder:"Header name",className:"flex-1 text-xs bg-bg border border-border/50 rounded px-2 py-1.5 text-text focus:outline-none focus:border-accent/50"}),(0,t.jsx)("input",{type:"text",value:e.value,onChange:e=>{S(C.map((t,a)=>a===s?{key:t.key,value:e.target.value}:t)),T(!0)},placeholder:"Value",className:"flex-1 text-xs bg-bg border border-border/50 rounded px-2 py-1.5 text-text focus:outline-none focus:border-accent/50"}),(0,t.jsx)("button",{type:"button",onClick:()=>{S(C.filter((e,t)=>t!==s)),T(!0)},className:"text-danger hover:text-danger p-1",children:(0,t.jsx)(d.f,{className:"h-3 w-3"})})]},s)),(0,t.jsxs)("button",{type:"button",onClick:()=>{S([...C,{key:"",value:""}]),T(!0)},className:"flex items-center gap-1 text-xs text-accent hover:text-accent/80",children:[(0,t.jsx)(c.f,{className:"h-3 w-3"})," Add header"]}),x&&e.headersConfigured&&(0,t.jsx)("button",{type:"button",onClick:()=>{S([]),T(!0)},className:"ml-3 text-xs text-danger hover:text-danger",children:"Clear saved headers"})]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs uppercase tracking-wider text-text-muted mb-2",children:"Retries"}),(0,t.jsx)("input",{type:"number",min:0,max:10,value:I,onChange:e=>R(Number(e.target.value)),className:"w-full text-sm bg-bg border border-border/50 rounded-lg px-3 py-2 text-text focus:outline-none focus:border-accent/50"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{className:"block text-xs uppercase tracking-wider text-text-muted mb-2",children:"Timeout (ms)"}),(0,t.jsx)("input",{type:"number",min:1e3,max:6e4,step:1e3,value:A,onChange:e=>D(Number(e.target.value)),className:"w-full text-sm bg-bg border border-border/50 rounded-lg px-3 py-2 text-text focus:outline-none focus:border-accent/50"})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3 pt-2",children:[(0,t.jsxs)("button",{type:"submit",disabled:L||!m.trim()||!p.trim(),className:"flex items-center gap-2 text-sm px-4 py-2 rounded-lg bg-accent/20 text-accent hover:bg-accent/30 disabled:opacity-50 transition-colors",children:[(0,t.jsx)(n.f,{className:"h-4 w-4"})," ",x?"Update":"Create"]}),(0,t.jsxs)("button",{type:"button",onClick:()=>o.push("/webhooks"),className:"flex items-center gap-1 text-sm px-4 py-2 rounded-lg text-text-muted hover:text-text transition-colors",children:[(0,t.jsx)(l.X,{className:"h-4 w-4"})," Cancel"]})]})]})}])},46670,e=>{var t=e.i(43476),s=e.i(78571);let a={default:"border-border text-text-muted",success:"border-success/40 text-success bg-success/5 shadow-[0_0_6px_rgba(0,255,65,0.15)]",warning:"border-warning/40 text-warning bg-warning/5 shadow-[0_0_6px_rgba(255,179,0,0.15)]",danger:"border-danger/40 text-danger bg-danger/5 shadow-[0_0_6px_rgba(255,23,68,0.15)]",info:"border-info/40 text-info bg-info/5 shadow-[0_0_6px_rgba(0,176,255,0.15)]"},r={default:"bg-text-muted",success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info"};e.s(["t",0,function({children:e,variant:n="default",className:l,dot:c=!1,pulse:d=!1}){return(0,t.jsxs)("span",{className:(0,s.f)("inline-flex items-center gap-1.5 rounded-chip border px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider",a[n],l),children:[c&&(0,t.jsxs)("span",{"aria-hidden":"true",className:"relative inline-flex h-1.5 w-1.5",children:[d&&(0,t.jsx)("span",{className:(0,s.f)("absolute inset-0 rounded-full animate-halo",r[n])}),(0,t.jsx)("span",{className:(0,s.f)("relative inline-flex h-1.5 w-1.5 rounded-full",r[n])})]}),e]})},"k",0,function(e){switch(e.toUpperCase()){case"ONLINE":case"COMPLETED":case"ACTIVE":case"RUNNING":case"INSTALLED":case"HEALTHY":return"success";case"DEGRADED":case"PAUSED":case"QUEUED":case"PENDING":case"INSTALLING":return"warning";case"OFFLINE":case"FAILED":case"ERROR":case"TIMEOUT":case"CANCELLED":case"DECOMMISSIONED":case"CRITICAL":return"danger";case"PROVISIONING":case"UPDATING":return"info";default:return"default"}}])},9347,e=>{var t=e.i(56420);let s={name:"arrow-left",size:24,node:[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]};s.node;let a=(0,t.f)(s);e.s(["f",0,a],9347)},21357,e=>{var t=e.i(56420);let s={name:"play",size:24,node:[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]};s.node;let a=(0,t.f)(s);e.s(["f",0,a],21357)},56522,e=>{var t=e.i(56420);let s={name:"save",size:24,node:[["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"}]]};s.node;let a=(0,t.f)(s);e.s(["f",0,a],56522)}])})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,4729,e=>{"use strict";var c=e.i(56420);let t={name:"clock-3",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]]};t.node;let o=(0,c.f)(t);e.s(["f",0,o],4729)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,5525,e=>{"use strict";var t=e.i(43476),s=e.i(71645),a=e.i(18566),n=e.i(93999),r=e.i(3062),i=e.i(54149),l=e.i(51196),d=e.i(75723),c=e.i(2067),o=e.i(65369),m=e.i(56420);let x={name:"chart-line",size:24,node:[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]],aliases:["line-chart"]};x.node;let u=(0,m.f)(x);var p=e.i(82983),h=e.i(78571),g=e.i(21176);let f=["1h","6h","24h"];function j({nodeId:e,height:a=180}){let[n,r]=(0,s.useState)("1h"),[i,l]=(0,s.useState)(null),[d,o]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{let t=!1;o(!1);let s=async()=>{try{let[s,a]=await Promise.all([p.f.get(`nodes/${e}/health/timeseries?metric=cpu&period=${n}`),p.f.get(`nodes/${e}/health/timeseries?metric=memory&period=${n}`)]);if(t)return;let r=s.data??{timestamps:[],values:[]},i=a.data??{timestamps:[],values:[]},d=new Map;r.timestamps.forEach((e,t)=>{let s=Date.parse(e);d.set(s,{t:s,cpu:r.values[t]??null,mem:null})}),i.timestamps.forEach((e,t)=>{let s=Date.parse(e),a=d.get(s)??{t:s,cpu:null,mem:null};a.mem=i.values[t]??null,d.set(s,a)}),l([...d.values()].sort((e,t)=>e.t-t.t))}catch{t||(l([]),o(!0))}};s();let a=setInterval(()=>void s(),6e4);return()=>{t=!0,clearInterval(a)}},[e,n]),(0,t.jsxs)("div",{className:"flex min-w-0 flex-col","data-testid":"node-metrics-chart",children:[(0,t.jsxs)("div",{className:"mb-2 flex items-center justify-between gap-2",children:[(0,t.jsx)("span",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-text-muted",children:"CPU / memory history"}),(0,t.jsx)("div",{role:"group","aria-label":"History period",className:"flex rounded-chip border border-border bg-bg p-0.5",children:f.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>r(e),"aria-pressed":n===e,className:(0,h.f)("rounded-chip px-2 py-0.5 text-[10px] uppercase tracking-wider transition-colors",n===e?"bg-primary/15 text-primary shadow-[0_0_8px_var(--color-glow)]":"text-text-muted hover:text-text"),children:e},e))})]}),null===i?(0,t.jsx)("div",{className:"skeleton w-full",style:{height:a}}):i.length<2?(0,t.jsx)(c.f,{compact:!0,icon:(0,t.jsx)(u,{className:"h-4 w-4"}),title:d?"History unavailable":"Not enough samples yet",description:d?"The health timeseries endpoint did not answer.":`No health snapshots in the last ${n}.`,tone:d?"warning":"muted",className:"flex-1"}):(0,t.jsx)(g.f,{data:i,xKey:"t",percent:!0,height:a,formatX:e=>new Date(Number(e)).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit"}),series:[{key:"cpu",label:"CPU",tone:"primary"},{key:"mem",label:"Memory",tone:"accent"}]})]})}var N=e.i(95925);let v={name:"shield-off",size:24,node:[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71",key:"1jlk70"}],["path",{d:"M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264",key:"18rp1v"}]]};v.node;let y=(0,m.f)(v);var b=e.i(46670);function w({metadata:e}){let s=function(e){let t=e;if("string"==typeof e)try{t=JSON.parse(e)}catch{return}return t?.agentSelfUpgrade}(e);return s?s.upgrade?.state==="reverted"?(0,t.jsx)("span",{title:s.upgrade.reason??void 0,children:(0,t.jsxs)(b.t,{variant:"danger",children:[(0,t.jsx)(N.f,{className:"mr-1 inline h-3 w-3"}),"Upgrade to ",s.upgrade.to," reverted"]})}):s.enabled?null:(0,t.jsx)("span",{title:s.reason??void 0,"data-testid":"agent-self-upgrade-off",children:(0,t.jsxs)(b.t,{variant:"default",children:[(0,t.jsx)(y,{className:"mr-1 inline h-3 w-3"}),"Self-upgrade off"]})}):null}var k=e.i(57108),S=e.i(68759),$=e.i(32568),C=e.i(71417),A=e.i(15281),P=e.i(59659),U=e.i(9347),I=e.i(25398),_=e.i(99847),E=e.i(32781),M=e.i(82022),D=e.i(84026),F=e.i(71567),R=e.i(94371),O=e.i(20851),L=e.i(66595);let z={name:"mouse-pointer-click",size:24,node:[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",key:"s0h3yz"}]]};z.node;let T=(0,m.f)(z);var H=e.i(86207),B=e.i(57665),q=e.i(41220),K=e.i(14098),G=e.i(4139),J=e.i(41120),V=e.i(82954),W=e.i(79432),Q=e.i(62368),Z=e.i(53138),X=e.i(51757),Y=e.i(83967),ee=e.i(74544);let et=[{id:"apt-update",label:"apt update",command:"sudo",args:["apt","update"],icon:(0,t.jsx)(Q.f,{className:"h-3.5 w-3.5"}),variant:"secondary",timeoutSeconds:120},{id:"apt-upgrade",label:"apt upgrade",command:"sudo",args:["apt","upgrade","-y"],icon:(0,t.jsx)(J.f,{className:"h-3.5 w-3.5"}),variant:"secondary",confirm:"This will upgrade all packages on the node. Continue?",timeoutSeconds:300},{id:"magnus-status",label:"magnus status",command:"systemctl",args:["status","magnus-agent","--no-pager"],icon:(0,t.jsx)(W.f,{className:"h-3.5 w-3.5"}),variant:"primary",timeoutSeconds:15},{id:"magnus-update",label:"magnus update",command:"sudo",args:["systemctl","restart","magnus-agent"],icon:(0,t.jsx)(V.f,{className:"h-3.5 w-3.5"}),variant:"secondary",confirm:"This will restart the Magnus agent. Continue?",timeoutSeconds:30},{id:"dmesg",label:"dmesg",command:"sudo",args:["dmesg","--time-format=reltime","-T"],icon:(0,t.jsx)(Z.f,{className:"h-3.5 w-3.5"}),variant:"secondary",timeoutSeconds:15},{id:"reboot",label:"Reboot",command:"sudo",args:["reboot"],icon:(0,t.jsx)(B.f,{className:"h-3.5 w-3.5"}),variant:"danger",confirm:"Are you sure you want to REBOOT this node? It will go offline temporarily.",timeoutSeconds:10}];function es({nodeId:e,nodeStatus:a}){let[n,r]=(0,s.useState)(!1),[i,l]=(0,s.useState)(!1),[d,c]=(0,s.useState)(null),[o,m]=(0,s.useState)(null),[x,u]=(0,s.useState)(null),h="ONLINE"!==a,g=async t=>{if(!t.confirm||confirm(t.confirm)){c(t),m(null),u(null),l(!0),r(!0);try{let s=await p.f.quickCommand.exec(e,{command:t.command,args:t.args,timeoutSeconds:t.timeoutSeconds});m(s.data)}catch(e){u(e instanceof Error?e.message:"Command execution failed")}finally{l(!1)}}};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"rounded border border-border bg-surface p-3",children:(0,t.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 text-[11px] text-text-muted mr-2",children:[(0,t.jsx)(G.f,{className:"h-4 w-4"}),(0,t.jsx)("span",{className:"font-bold uppercase tracking-wider",children:"Quick Commands"})]}),et.map(e=>(0,t.jsx)(S.K,{variant:e.variant,size:"sm",icon:e.icon,disabled:h,onClick:()=>void g(e),children:e.label},e.id)),h&&(0,t.jsx)("span",{className:"ml-2 text-xs text-text-muted",children:"Node must be ONLINE to run commands"})]})}),(0,t.jsx)($.n,{open:n,onClose:()=>r(!1),title:d?.label??"Command",description:d?`${d.command} ${(d.args??[]).join(" ")}`:void 0,icon:(0,t.jsx)(G.f,{className:"h-5 w-5 text-primary"}),className:"max-w-3xl",children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{className:"flex items-center gap-2",children:i?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(E.f,{className:"h-4 w-4 animate-spin text-primary"}),(0,t.jsx)("span",{className:"text-xs text-primary",children:"Executing…"})]}):x?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(Y.f,{className:"h-4 w-4 text-danger"}),(0,t.jsx)("span",{className:"text-xs text-danger",children:"Error"})]}):o?(0,t.jsxs)(t.Fragment,{children:[0===o.exitCode?(0,t.jsx)(X.f,{className:"h-4 w-4 text-success"}):(0,t.jsx)(Y.f,{className:"h-4 w-4 text-danger"}),(0,t.jsxs)("span",{className:`text-xs ${0===o.exitCode?"text-success":"text-danger"}`,children:["Exit code: ",o.exitCode]}),(0,t.jsxs)("span",{className:"text-xs text-text-muted flex items-center gap-1 ml-auto",children:[(0,t.jsx)(ee.f,{className:"h-3 w-3"}),(o.durationMs/1e3).toFixed(2),"s"]})]}):null}),x&&(0,t.jsx)("div",{className:"rounded bg-danger/10 border border-danger/30 p-3",children:(0,t.jsx)("p",{className:"text-xs text-danger",children:x})}),o&&(0,t.jsxs)("div",{className:"space-y-3",children:[o.stdout&&(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-[11px] font-bold uppercase tracking-wider text-text-muted mb-1",children:"stdout"}),(0,t.jsx)("pre",{className:"max-h-80 overflow-auto rounded bg-bg border border-border p-3 text-xs text-success whitespace-pre-wrap",children:o.stdout})]}),o.stderr&&(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"text-[11px] font-bold uppercase tracking-wider text-text-muted mb-1",children:"stderr"}),(0,t.jsx)("pre",{className:"max-h-40 overflow-auto rounded bg-bg border border-danger/20 p-3 text-xs text-danger whitespace-pre-wrap",children:o.stderr})]}),!o.stdout&&!o.stderr&&(0,t.jsx)("p",{className:"text-xs text-text-muted italic",children:"No output captured"}),o.truncated&&(0,t.jsx)("p",{className:"text-xs text-warning",children:"⚠ Output was truncated (exceeded 1MB)"})]}),i&&(0,t.jsx)("div",{className:"flex items-center justify-center py-8",children:(0,t.jsxs)("div",{className:"text-center",children:[(0,t.jsx)(E.f,{className:"h-8 w-8 animate-spin text-primary mx-auto mb-2"}),(0,t.jsx)("p",{className:"text-xs text-text-muted",children:"Executing command on remote node…"})]})}),(0,t.jsx)("div",{className:"flex justify-end pt-2",children:(0,t.jsx)(S.K,{variant:"ghost",size:"sm",onClick:()=>r(!1),children:"Close"})})]})})]})}var ea=e.i(55427),en=e.i(28623);let er={workhorse:{name:"Workhorse",emoji:"🐴",description:"Steady, reliable, never complains.",accent:"success"},"drama-queen":{name:"Drama Queen",emoji:"🎭",description:"High variance, loves spiking CPU for attention.",accent:"warning"},"zen-master":{name:"Zen Master",emoji:"🧘",description:"Low usage, mind always clear, never stressed.",accent:"info"},sprinter:{name:"Sprinter",emoji:"⚡",description:"Bursts of intense activity followed by calm recovery.",accent:"info"},groundhog:{name:"Groundhog",emoji:"🌀",description:"Keeps rebooting — might see its own shadow again.",accent:"warning"},ghost:{name:"Ghost",emoji:"👻",description:"Often unreachable. Is it even there?",accent:"danger"},marathoner:{name:"Marathoner",emoji:"🏃",description:"Long uptime, steady pace, built to last.",accent:"success"},rookie:{name:"Rookie",emoji:"🌱",description:"Not enough history yet — still finding its rhythm.",accent:"default"}};function ei(e){return 0===e.length?0:e.reduce((e,t)=>e+t,0)/e.length}function el({node:e}){let[a,r]=(0,s.useState)([]),[i,l]=(0,s.useState)(!0),[d,c]=(0,s.useState)(null),[o,m]=(0,s.useState)(0);(0,s.useEffect)(()=>{let t=!1;return(async()=>{l(!0),c(null);try{let s=await p.f.get(`nodes/${e.id}/health/history?limit=100`);if(t)return;let a=s.data,n=[];Array.isArray(a)?n=a:a?.items&&(n=a.items),r([...n].reverse())}catch(e){t||(r([]),c(e instanceof Error?e.message:"Failed to load history"))}finally{t||l(!1)}})(),()=>{t=!0}},[e.id,o]);let x=(0,s.useMemo)(()=>{let t,s,n,r,i,l,d,c,o;return t=a.map(e=>e.cpuUsagePercent).filter(e=>Number.isFinite(e)),s=a.map(e=>e.memoryPercent).filter(e=>Number.isFinite(e)),n=ei(t),r=function(e){if(e.length<2)return 0;let t=ei(e);return Math.sqrt(e.reduce((e,s)=>e+(s-t)*(s-t),0)/(e.length-1))}(t),i=ei(s),l=t.filter(e=>e>80).length,d="rookie",c=er[d="OFFLINE"===e.status||e.lastHeartbeatAt&&Date.now()-new Date(e.lastHeartbeatAt).getTime()>6e5?"ghost":a.length<3?"rookie":r>25||l/Math.max(1,t.length)>.25?l/Math.max(1,t.length)>.4?"drama-queen":"sprinter":n<15&&r<10?"zen-master":n>40&&n<75&&r<15?"workhorse":n<40&&r<15&&a.length>20?"marathoner":"workhorse"]??er.rookie??{name:"Rookie",emoji:"🌱",description:"",accent:"default"},o=function(e,t,s){var a;let n,r=Math.floor(Date.now()/6048e5);for(let t=0;t<e.id.length;t++)r=31*r+e.id.charCodeAt(t)|0;let i={workhorse:[`Steady as they come — averaging ${s.cpuAvg.toFixed(0)}% CPU without a single complaint this week.`,`The dependable one. ${e.hostname} just keeps grinding through the workload.`,`Quietly productive at ~${s.cpuAvg.toFixed(0)}% CPU. Gets the job done and asks for nothing.`],"drama-queen":[`Lives for the spotlight — ${s.spikes} CPU spikes this week and counting.`,`${e.hostname} likes to keep things interesting with a \xb1${s.cpuSD.toFixed(0)}% swing.`,"A connoisseur of chaos. Never a dull moment with this one."],"zen-master":[`Practices minimalism. Barely breaks a sweat at ${s.cpuAvg.toFixed(0)}% CPU.`,`${e.hostname} is in its happy place — calm, cool, collected.`,"Achieving enlightenment one idle cycle at a time."],sprinter:[`Bursts of energy, then recovery. ${s.spikes} sprints logged this week.`,`${e.hostname} runs hot, then cools down. Classic sprinter cadence.`,"Lives in intervals — full throttle, then full zen."],groundhog:["Déjà vu all over again. Might want to check the uptime.",`${e.hostname} keeps hitting the reset button.`],ghost:["Hasn't been seen in a while. Anyone home?",`${e.hostname} is currently out of contact. Check the heartbeat.`],marathoner:[`In it for the long haul — ${s.samples} data points of pure consistency.`,`${e.hostname} doesn't sprint. It endures.`],rookie:["Still new around here — gathering experience.",`${e.hostname} is just getting started. Check back soon.`]};return n=Math.abs(r)%(a=i[t.name.toLowerCase().replace(" ","-")]??i.rookie??["…"]).length,a[n]}(e,c,{cpuAvg:n,cpuSD:r,memAvg:i,samples:t.length,spikes:l}),{archetype:c,archetypeKey:d,bio:o,stats:{cpuAvg:n,cpuStdDev:r,memAvg:i,samples:t.length,spikes:l}}},[e,a]),u=a.map(e=>e.cpuUsagePercent).slice(-40),h=a.map(e=>e.memoryPercent).slice(-40);return(0,t.jsx)(n.N,{title:"Personality",action:(0,t.jsx)("button",{onClick:()=>m(e=>e+1),className:"text-text-muted hover:text-text transition p-1",title:"Refresh personality","data-testid":"node-personality-refresh",children:(0,t.jsx)(J.f,{className:"h-3.5 w-3.5"})}),children:(0,t.jsxs)("div",{className:"flex flex-col gap-4","data-testid":"node-personality-card","data-archetype":x.archetypeKey,children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("span",{className:"flex h-12 w-12 items-center justify-center rounded-full border border-accent/40 bg-bg text-2xl shadow-[0_0_16px_var(--color-glow-accent)]","aria-hidden":"true",children:x.archetype.emoji}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{"data-testid":"node-archetype-badge",children:(0,t.jsx)(b.t,{variant:x.archetype.accent,children:x.archetype.name})}),i&&(0,t.jsx)("span",{className:"text-xs text-text-muted italic",children:"analyzing…"})]}),(0,t.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:x.archetype.description})]})]}),(0,t.jsx)(en.f,{className:"h-4 w-4 text-accent mt-1"})]}),(0,t.jsxs)("blockquote",{className:"border-l-2 border-accent/40 pl-3 text-sm italic text-text","data-testid":"node-personality-bio",children:["“",x.bio,"”"]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4 pt-2 border-t border-border/30",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,t.jsx)("span",{className:"text-xs uppercase tracking-wider text-text-muted",children:"CPU trend"}),(0,t.jsxs)("span",{className:"text-xs tabular-nums text-text-muted",children:["avg ",x.stats.cpuAvg.toFixed(0),"%"]})]}),(0,t.jsx)(ea.f,{values:u,tone:"primary",percent:!0,stretch:!0,threshold:80,testId:"node-personality-cpu-sparkline",label:`CPU trend, average ${x.stats.cpuAvg.toFixed(0)}%`})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,t.jsx)("span",{className:"text-xs uppercase tracking-wider text-text-muted",children:"Memory trend"}),(0,t.jsxs)("span",{className:"text-xs tabular-nums text-text-muted",children:["avg ",x.stats.memAvg.toFixed(0),"%"]})]}),(0,t.jsx)(ea.f,{values:h,tone:"accent",percent:!0,stretch:!0,threshold:80,testId:"node-personality-mem-sparkline",label:`Memory trend, average ${x.stats.memAvg.toFixed(0)}%`})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4 text-[11px] text-text-muted",children:[(0,t.jsxs)("span",{children:[x.stats.samples," samples"]}),(0,t.jsxs)("span",{children:["σ ",x.stats.cpuStdDev.toFixed(1),"%"]}),(0,t.jsxs)("span",{children:[x.stats.spikes," spikes"]}),d&&(0,t.jsxs)("span",{className:"text-warning",children:["· ",d]})]})]})})}let ed={name:"fan",size:24,node:[["path",{d:"M10.827 16.379a6.082 6.082 0 0 1-8.618-7.002l5.412 1.45a6.082 6.082 0 0 1 7.002-8.618l-1.45 5.412a6.082 6.082 0 0 1 8.618 7.002l-5.412-1.45a6.082 6.082 0 0 1-7.002 8.618l1.45-5.412Z",key:"484a7f"}],["path",{d:"M12 12v.01",key:"u5ubse"}]]};ed.node;let ec=(0,m.f)(ed);var eo=e.i(71028);let em={name:"thermometer",size:24,node:[["path",{d:"M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z",key:"17jzev"}]]};em.node;let ex=(0,m.f)(em);function eu(e,t){let s=e.map(e=>({timestamp:new Date(e.sampledAt).getTime(),value:t(e)})).filter(e=>null!==e.value);if(0===s.length)return"";let a=s[0].timestamp,n=Math.max(1,s.at(-1).timestamp-a);return s.map(({timestamp:e,value:t})=>{let s=104-.88*Math.max(0,Math.min(100,t));return`${((e-a)/n*600).toFixed(1)},${s.toFixed(1)}`}).join(" ")}function ep(e,t="%"){return null===e?"not reported":`${e.toFixed(1)}${t}`}function eh({telemetry:e}){let s=e?.latest??null,a=s?.devices??[],r=eu(e?.history??[],e=>e.maxUtilizationPercent),i=eu(e?.history??[],e=>e.maxFanPercent);return(0,t.jsx)(n.N,{title:"GPU telemetry",description:"30-second load and cooling history",action:s?(0,t.jsxs)(b.t,{variant:"default",children:["sampled ",(0,C.C)(s.sampledAt)]}):void 0,children:s&&0!==a.length?(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{className:"grid gap-2 sm:grid-cols-2 xl:grid-cols-3",children:a.map(e=>(0,t.jsxs)("div",{className:"rounded-panel border border-border/70 bg-surface-raised/60 p-3 transition-colors hover:border-primary/30",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("p",{className:"truncate text-xs font-medium text-text",children:e.name}),(0,t.jsxs)("p",{className:"mt-0.5 text-[10px] uppercase tracking-wide text-text-muted",children:[e.vendor," · gpu ",e.index]})]}),100===e.fanPercent&&(0,t.jsx)(b.t,{variant:"danger",children:"fan saturated"})]}),(0,t.jsxs)("dl",{className:"mt-3 grid grid-cols-3 gap-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("dt",{className:"flex items-center gap-1 text-[10px] uppercase text-text-muted",children:[(0,t.jsx)(eo.f,{className:"h-3 w-3"}),"Load"]}),(0,t.jsx)("dd",{className:"mt-1 num text-sm text-primary",children:ep(e.utilizationPercent)})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("dt",{className:"flex items-center gap-1 text-[10px] uppercase text-text-muted",children:[(0,t.jsx)(ec,{className:"h-3 w-3"}),"Fan"]}),(0,t.jsx)("dd",{className:`mt-1 num text-sm ${100===e.fanPercent?"text-danger glow-text-danger":"text-warning"}`,children:ep(e.fanPercent)})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("dt",{className:"flex items-center gap-1 text-[10px] uppercase text-text-muted",children:[(0,t.jsx)(ex,{className:"h-3 w-3"}),"Temp"]}),(0,t.jsx)("dd",{className:"mt-1 num text-sm text-text",children:ep(e.temperatureCelsius,"°C")})]})]}),(0,t.jsxs)("div",{className:"mt-2 space-y-1",children:[(0,t.jsx)(l.f,{value:e.utilizationPercent,tone:"primary",label:`${e.name} load`}),(0,t.jsx)(l.f,{value:e.fanPercent,thresholds:{warn:80,crit:100},label:`${e.name} fan`})]})]},`${e.vendor}-${e.uuid??e.index}`))}),(0,t.jsxs)("div",{className:"panel-corners rounded-panel border border-border/70 bg-bg/60 p-3",children:[(0,t.jsxs)("div",{className:"mb-2 flex flex-wrap items-center justify-between gap-2",children:[(0,t.jsx)("p",{className:"text-[10px] font-medium uppercase tracking-[0.16em] text-text-muted",children:"Host maximum · last 24 hours"}),(0,t.jsxs)("div",{className:"flex items-center gap-3 text-[10px] text-text-muted",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"h-0.5 w-3 bg-primary shadow-[0_0_4px_var(--color-primary)]"}),"load"]}),(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"h-0.5 w-3 bg-warning"}),"fan"]})]})]}),(0,t.jsxs)("svg",{viewBox:"0 0 600 112",className:"h-28 w-full",role:"img","aria-label":"GPU load and fan percentage over the last 24 hours",children:[(0,t.jsx)("line",{x1:"0",y1:"16",x2:"600",y2:"16",stroke:"var(--color-danger)",strokeOpacity:"0.45",strokeDasharray:"5 5"}),(0,t.jsx)("line",{x1:"0",y1:"60",x2:"600",y2:"60",stroke:"currentColor",strokeOpacity:"0.12"}),(0,t.jsx)("line",{x1:"0",y1:"104",x2:"600",y2:"104",stroke:"currentColor",strokeOpacity:"0.2"}),(0,t.jsx)("defs",{children:(0,t.jsxs)("linearGradient",{id:"gpu-load-fill",x1:"0",x2:"0",y1:"0",y2:"1",children:[(0,t.jsx)("stop",{offset:"0%",stopColor:"var(--color-primary)",stopOpacity:"0.35"}),(0,t.jsx)("stop",{offset:"100%",stopColor:"var(--color-primary)",stopOpacity:"0"})]})}),r&&(0,t.jsx)("polygon",{points:`0,104 ${r} 600,104`,fill:"url(#gpu-load-fill)"}),r&&(0,t.jsx)("polyline",{points:r,fill:"none",stroke:"var(--color-primary)",strokeWidth:"2",vectorEffect:"non-scaling-stroke"}),i&&(0,t.jsx)("polyline",{points:i,fill:"none",stroke:"var(--color-warning)",strokeWidth:"2",vectorEffect:"non-scaling-stroke"})]}),(0,t.jsxs)("div",{className:"mt-1 flex justify-between num text-[9px] text-text-muted",children:[(0,t.jsx)("span",{children:"24h ago"}),(0,t.jsx)("span",{children:"100% saturation line"}),(0,t.jsx)("span",{children:"now"})]})]})]}):(0,t.jsx)("div",{className:"rounded-panel border border-dashed border-border px-4 py-6 text-center text-xs text-text-muted",children:s?.status==="error"?"The GPU probe did not complete. Magnus will retry on the next heartbeat.":"No supported NVIDIA or AMD GPU was detected in the latest sample."})})}function eg(e){if("string"==typeof e)try{return JSON.parse(e)}catch{return[]}return e??[]}function ef(e){if(!e)return[];if("string"==typeof e)try{return JSON.parse(e)}catch{return[]}return e}function ej(e){return!!(e&&"not_installed"!==e.status)}function eN(e){let t=e.status.toLowerCase();return t.includes("enabled")&&!t.includes("not enabled")&&!t.includes("disabled")}function ev(e,t){let s=e.filter(eN).find(e=>{let s=`${e.slug} ${e.pluginType} ${e.metadata?.description??""}`.toLowerCase();return"search"===t?/\b(search|web)\b/.test(s):/\b(crawl|browser|firecrawl|browserbase|browser-use)\b/.test(s)});return s?`${s.slug}${s.version?` ${s.version}`:""}`:"none enabled"}e.s(["default",0,function(){var e,m;let x,u,h,g=(0,a.useParams)(),f=(0,a.useRouter)(),[N,v]=(0,s.useState)(null),[y,z]=(0,s.useState)(null),[G,J]=(0,s.useState)([]),[V,W]=(0,s.useState)(null),[Q,Z]=(0,s.useState)(!0),[X,Y]=(0,s.useState)(!1),[ee,et]=(0,s.useState)(!1),[ea,en]=(0,s.useState)([]),[er,ei]=(0,s.useState)({}),[ed,ec]=(0,s.useState)(null),[eo,em]=(0,s.useState)(!1),[ex,eu]=(0,s.useState)(null),[ep,eN]=(0,s.useState)(null),[ey,eb]=(0,s.useState)(null),[ew,ek]=(0,s.useState)(!1),[eS,e$]=(0,s.useState)(null),[eC,eA]=(0,s.useState)(!1),[eP,eU]=(0,s.useState)(!1),[eI,e_]=(0,s.useState)(null),[eE,eM]=(0,s.useState)(!1),[eD,eF]=(0,s.useState)(null),[eR,eO]=(0,s.useState)(null),[eL,ez]=(0,s.useState)(!1),eT=(0,s.useRef)(null),eH=(0,s.useRef)(void 0),eB=(0,s.useCallback)(async(e=!1)=>{try{e||Z(!0);let[t,s,a,n,r]=await Promise.all([p.f.nodes.get(g.nodeId),p.f.nodes.health(g.nodeId).catch(()=>null),p.f.nodes.forecast(g.nodeId).catch(()=>null),p.f.hermes.installations().catch(()=>null),p.f.nodes.gpu(g.nodeId).catch(()=>null)]),i=t.data;i.role||void 0===eH.current?i.role&&(eH.current=i.role):i.role=eH.current,v(i),s&&z(s.data),J(a?.data?.forecasts??[]),W(r?.data??null);let l=n?.data??[];ec(l.find(e=>e.nodeId===i.id)??l.find(e=>e.hostname===i.hostname||e.hostname===i.ipAddress)??null);try{let e=await p.f.roles.applications.list({nodeId:g.nodeId});en(e.data??[])}catch{}}catch{}finally{e||Z(!1)}},[g.nodeId]);(0,s.useEffect)(()=>{eB()},[eB]);let eq=async()=>{if(N&&confirm(`Deploy Hermes Agent to "${N.name}"?`)){eM(!0),eF(null),eO(null);try{let e,t=await p.f.hermes.deploy({nodeId:N.id,hermesHome:"~/.hermes",hermesBin:"hermes",installMethod:"official-script",dashboardPort:9119,enableDashboard:!0,enableDashboardTui:!0,startGateway:!0},(e="u">typeof crypto&&"randomUUID"in crypto?crypto.randomUUID():Math.random().toString(36).slice(2),`hermes-node-deploy-${Date.now()}-${e}`));eF(`Hermes Agent deployment started. Job ${t.data?.id.slice(0,10)}...`),eB(!0)}catch(e){eO(e instanceof Error?e.message:"Hermes Agent deployment failed")}finally{eM(!1)}}};(0,s.useEffect)(()=>{let e=N?.status==="PROVISIONING"||N?.agent?.status==="UPDATING"||!!(eD&&!ej(ed));return e&&!eT.current?eT.current=setInterval(()=>{eB(!0)},4e3):!e&&eT.current&&(clearInterval(eT.current),eT.current=null),()=>{eT.current&&(clearInterval(eT.current),eT.current=null)}},[N?.status,N?.agent?.status,N?.agent?.version,eB,eD,ed]);let eK=async()=>{if(N&&confirm(`Delete node "${N.name}"? This will permanently remove it and all associated data.`))try{await p.f.nodes.delete(N.id),f.push("/nodes")}catch{}},eG=(0,s.useCallback)(async()=>{if(N?.status==="ONLINE"){em(!0),eu(null);try{let e='version_or_na() { local cmd="$1"; shift; if command -v "$cmd" >/dev/null 2>&1; then ("$@" 2>/dev/null || "$cmd" --version 2>/dev/null || "$cmd" -v 2>/dev/null || echo "unknown") | head -n 1; else echo "not installed"; fi; }; echo "node=$(version_or_na node node --version)"; echo "npm=$(version_or_na npm npm --version)"; echo "python3=$(version_or_na python3 python3 --version)"; echo "redis=$(version_or_na redis-cli redis-cli --version)"; echo "docker=$(version_or_na docker docker --version)"; echo "tailscale=$(version_or_na tailscale tailscale version)"; agent_manifest=/opt/magnus-agent/node_modules/@hivemagnus/magnus-agent/package.json; [ -f "$agent_manifest" ] || agent_manifest=/opt/magnus-agent/package.json; if [ -f "$agent_manifest" ]; then echo "magnus-agent=$(node -e \'process.stdout.write(require(process.argv[1]).version)\' "$agent_manifest" 2>/dev/null || echo unknown)"; else echo "magnus-agent=not installed"; fi'.replace(/'/g,"'\\''"),t=((await p.f.quickCommand.exec(N.id,{command:`bash -lc '${e}'`,args:[],timeoutSeconds:60})).data.stdout??"").trim(),s=Object.fromEntries(t.split("\n").map(e=>e.trim()).filter(e=>e.includes("=")).map(e=>{let[t,...s]=e.split("=");return[t,s.join("=").trim()||"unknown"]}));ei(s)}catch(e){eu(e instanceof Error?e.message:"Failed to load software revisions")}finally{em(!1)}}},[N?.id,N?.status]),eJ=(0,s.useCallback)(async()=>{if(N?.status==="ONLINE"){ek(!0),e$(null);try{let e="set -euo pipefail; (sudo apt-get update -qq || apt-get update -qq) >/dev/null 2>&1; apt list --upgradable 2>/dev/null | sed '1d' | sed '/^Listing/d' | wc -l".replace(/'/g,"'\\''"),t=((await p.f.quickCommand.exec(N.id,{command:`bash -lc '${e}'`,args:[],timeoutSeconds:180})).data.stdout??"").trim(),s=Number.parseInt(t.split("\n").at(-1)??"",10);eN(Number.isFinite(s)?s:null),eb(new Date().toISOString())}catch(e){e$(e instanceof Error?e.message:"Failed to refresh apt updates")}finally{ek(!1)}}},[N?.id,N?.status]),eV=async()=>{if(N&&confirm(`Run apt upgrade on "${N.name}"?`)){eA(!0);try{let e=`apt-upgrade-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,t=(await p.f.commands.dispatch({nodeIds:[N.id],command:"sudo",args:["apt","upgrade","-y"],timeoutSeconds:1800,idempotencyKey:e},e)).data,s=t.commands?.[0]?.id;alert(s?`APT Upgrade dispatched (command ${s.slice(0,12)}…). Check Commands for progress.`:"APT Upgrade dispatched. Check Commands for progress."),await eJ()}catch(e){alert(`APT Upgrade failed to dispatch: ${e instanceof Error?e.message:String(e)}`)}finally{eA(!1)}}},eW=async()=>{if(N&&confirm(`Enable unattended apt update and apt upgrade on "${N.name}"? Magnus will install unattended-upgrades and enable the apt timers.`)){eU(!0),e_(null);try{await p.f.nodes.enableSystemUpdates(N.id),await eB(!0)}catch(e){e_(e instanceof Error?e.message:"Failed to enable automatic updates")}finally{eU(!1)}}};if((0,s.useEffect)(()=>{eG(),eJ()},[eG,eJ]),(0,s.useEffect)(()=>{if(!N||"ONLINE"!==N.status)return;let e=setInterval(()=>{eJ()},36e5);return()=>clearInterval(e)},[N,eJ]),Q)return(0,t.jsxs)("div",{className:"space-y-6","aria-busy":"true",children:[(0,t.jsx)("div",{className:"skeleton h-56 w-full rounded-panel opacity-70"}),(0,t.jsx)(o.g,{}),(0,t.jsx)("span",{className:"sr-only",children:"Loading node details…"})]});if(!N)return(0,t.jsx)(c.f,{tone:"accent",icon:(0,t.jsx)(q.f,{className:"h-5 w-5"}),title:"Node not found",description:"It may have been decommissioned or belong to another control node.",action:(0,t.jsx)(S.K,{variant:"secondary",size:"sm",onClick:()=>f.push("/nodes"),children:"Back to nodes"}),className:"mt-12"});let eQ=ej(ed)?Array.isArray(ed.rawStatus?.skills)?ed.rawStatus.skills:[]:[],eZ=ej(ed)?Array.isArray(ed.rawStatus?.plugins)?ed.rawStatus.plugins:[]:[],eX=eQ.filter(e=>e.enabled),eY=ed?.configuration?.modelProvider??"unknown",e0=ed?.configuration?.modelName??"unknown",e1=ev(eZ,"search"),e2=ev(eZ,"crawl"),e3=function(e){if(!e)return null;try{let t="string"==typeof e?JSON.parse(e):e;if("boolean"!=typeof t.installed||!["active","inactive","failed","not_installed","unknown"].includes(t.serviceStatus)||!["enabled","disabled","static","unknown"].includes(t.enabled)||null!==t.version&&"string"!=typeof t.version||!Array.isArray(t.managerAddresses))return null;return t}catch{return null}}(y?.wazuh),e5=function(e){if(!e)return null;try{let t="string"==typeof e?JSON.parse(e):e;if("boolean"!=typeof t.supported||"string"!=typeof t.platform||!["enabled","disabled","partial","unsupported","unknown"].includes(t.automaticUpdates??"")||"boolean"!=typeof t.rebootRequired||!Array.isArray(t.timers)||!Array.isArray(t.rebootRequiredPackages))return null;return{...t,fullUpgradePolicyEnabled:!0===t.fullUpgradePolicyEnabled}}catch{return null}}(y?.systemUpdates);return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)(r.f,{hero:!0,padding:"lg",tone:"ONLINE"===N.status?"primary":"OFFLINE"===N.status?"danger":"warning",testId:"node-cockpit",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-4",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,t.jsx)(S.K,{variant:"ghost",size:"sm",onClick:()=>f.push("/nodes"),"aria-label":"Back to nodes",children:(0,t.jsx)(U.f,{className:"h-4 w-4"})}),(0,t.jsx)(d.f,{status:N.status}),(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("h1",{className:"truncate text-2xl font-bold text-primary glow-text-primary",children:N.name}),(0,t.jsxs)("p",{className:"num mt-1 truncate text-xs text-text-muted",children:[N.hostname,":",N.port,N.agent&&(0,t.jsxs)("span",{className:"ml-3 text-primary/70",children:["agent v",N.agent.version]}),y?.source&&(0,t.jsxs)("span",{className:"ml-3 uppercase tracking-wider",children:["source: ",y.source]})]})]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)(b.t,{variant:(0,b.k)(N.status),children:N.status}),N.agent?.status==="UPDATING"&&(0,t.jsxs)(b.t,{variant:"info",children:[(0,t.jsx)(E.f,{className:"h-3 w-3 animate-spin mr-1 inline"}),"Upgrading…"]}),(0,t.jsx)(w,{metadata:N.metadata}),(0,t.jsx)(S.K,{variant:"secondary",size:"sm",icon:(0,t.jsx)(A.f,{className:"h-3.5 w-3.5"}),onClick:()=>Y(!0),children:"Edit"}),(0,t.jsx)(S.K,{variant:"danger",size:"sm",icon:(0,t.jsx)(P.f,{className:"h-3.5 w-3.5"}),onClick:()=>void eK(),children:"Delete"})]})]}),(0,t.jsxs)("div",{className:"mt-6 grid gap-6 xl:grid-cols-[auto_minmax(0,1fr)]",children:[(0,t.jsxs)("div",{className:"flex flex-wrap justify-center gap-4 sm:justify-start",children:[(0,t.jsx)(i.f,{value:y?.cpuUsagePercent??null,label:"CPU Usage",size:128,testId:"node-gauge-cpu"}),(0,t.jsx)(i.f,{value:y?.memoryPercent??null,label:"Memory",size:128,sublabel:y?`${(0,C.L)(y.memoryUsedBytes)}`:void 0,testId:"node-gauge-memory"}),(h=(y?eg(y.disks):[]).reduce((e,t)=>!e||t.usagePercent>e.usagePercent?t:e,null),(0,t.jsx)(i.f,{value:h?.usagePercent??null,label:"Disk",size:128,thresholds:{warn:80,crit:90},sublabel:h?.mountPoint,testId:"node-gauge-disk"}))]}),(0,t.jsx)(j,{nodeId:N.id,height:170})]})]}),("DEGRADED"===N.status||N.agent?.status==="ERROR")&&(()=>{try{let e=JSON.parse(N.metadata),s="string"==typeof e.deployError?e.deployError:null,a="string"==typeof e.upgradeError?e.upgradeError:null,n=s??a;if(n)return(0,t.jsx)("div",{className:"rounded-panel border border-danger/40 bg-danger/5 p-4 shadow-[inset_3px_0_0_var(--color-danger),0_0_20px_var(--color-glow-danger)]",children:(0,t.jsxs)("div",{className:"flex items-start gap-3",children:[(0,t.jsx)(_.f,{className:"h-5 w-5 text-danger shrink-0 mt-0.5"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium text-danger",children:s?"Deploy Failed":"Agent Upgrade Failed"}),(0,t.jsx)("pre",{className:"mt-1 text-xs text-text-muted whitespace-pre-wrap font-mono",children:n})]})]})})}catch{}return null})(),"PROVISIONING"===N.status&&(0,t.jsx)("div",{className:"rounded-panel border border-info/40 bg-info/5 p-4 shadow-[inset_3px_0_0_var(--color-info)]",children:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(E.f,{className:"h-5 w-5 text-info animate-spin"}),(0,t.jsx)("p",{className:"text-xs uppercase tracking-wider text-info",children:"Deploying agent… Status will update automatically."})]})}),N.agent?.status==="UPDATING"&&(0,t.jsx)("div",{className:"rounded-panel border border-info/40 bg-info/5 p-4 shadow-[inset_3px_0_0_var(--color-info)]",children:(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(E.f,{className:"h-5 w-5 text-info animate-spin"}),(0,t.jsx)("p",{className:"text-xs uppercase tracking-wider text-info",children:"Agent upgrade in progress… Status will update automatically."})]})}),(0,t.jsx)(es,{nodeId:N.id,nodeStatus:N.status}),(0,t.jsx)(eh,{telemetry:V}),(0,t.jsx)(el,{node:{id:N.id,name:N.name,hostname:N.hostname,status:N.status,lastHeartbeatAt:N.lastHeartbeatAt}}),(0,t.jsxs)("div",{className:"grid grid-cols-1 gap-6 lg:grid-cols-[minmax(0,2fr)_minmax(0,1fr)]",children:[(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)(n.N,{title:"Node Information",children:(0,t.jsxs)("dl",{className:"space-y-2 text-sm",children:[[["OS",N.os],["Architecture",N.arch],["Address",`${N.ipAddress}:${N.port}`],["Tags",(()=>{try{let e=JSON.parse(N.tags);return e.length?e.join(", "):"—"}catch{return"—"}})()]].map(([e,s])=>(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)("dt",{className:"text-text-muted",children:e}),(0,t.jsx)("dd",{className:"font-medium",children:s})]},e)),(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)("dt",{className:"text-text-muted",children:"Agent Version"}),(0,t.jsx)("dd",{className:"font-medium flex items-center gap-1.5",children:N.agent?.version??"—"})]}),(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)("dt",{className:"text-text-muted",children:"Role"}),(0,t.jsx)("dd",{className:"font-medium",children:N.role?(0,t.jsxs)("button",{className:"inline-flex items-center gap-1 rounded-md bg-primary/10 px-2 py-0.5 text-xs font-medium text-primary hover:bg-primary/20 transition-colors cursor-pointer",onClick:()=>et(!0),title:"Change role",children:[(0,t.jsx)(D.f,{className:"h-3 w-3"}),N.role.name]}):(0,t.jsx)("button",{className:"text-xs text-text-muted hover:text-primary transition-colors cursor-pointer",onClick:()=>et(!0),children:"+ Assign Role"})})]}),[["Agent Status",N.agent?.status??"—"],["Last Heartbeat",(0,C.C)(N.lastHeartbeatAt)]].map(([e,s])=>(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)("dt",{className:"text-text-muted",children:e}),(0,t.jsx)("dd",{className:"font-medium",children:s})]},e)),(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)("dt",{className:"text-text-muted",children:"Cockpit"}),(0,t.jsx)("dd",{className:"font-medium",children:y?.cockpitAvailable?(0,t.jsxs)("a",{href:`https://${N.ipAddress}:9090`,target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline flex items-center gap-1",children:["Available",(0,t.jsx)(M.f,{className:"h-3 w-3"})]}):(0,t.jsx)("span",{className:"text-text-muted",children:"Not Available"})})]}),(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)("dt",{className:"text-text-muted",children:"CPU Cores"}),(0,t.jsx)("dd",{className:"font-medium",children:y?.cpuCores??"—"})]}),(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)("dt",{className:"text-text-muted",children:"Memory Used"}),(0,t.jsx)("dd",{className:"font-medium",children:y?`${(0,C.L)(y.memoryUsedBytes)} / ${(0,C.L)(y.memoryTotalBytes)}`:"—"})]}),(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)("dt",{className:"text-text-muted",children:"Swap Used"}),(0,t.jsx)("dd",{className:"font-medium",children:y&&y.swapTotalBytes?`${(0,C.L)(y.swapUsedBytes??0)} / ${(0,C.L)(y.swapTotalBytes)}`:"—"})]}),(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)("dt",{className:"text-text-muted",children:"Last Health Sample"}),(0,t.jsx)("dd",{className:"font-medium",children:y?(0,C.C)(y.timestamp):"—"})]})]})}),(0,t.jsx)(n.N,{title:"Hermes Agent",description:ej(ed)?ed.displayName??ed.hostname:"No Hermes Agent installed or found",action:ej(ed)?(0,t.jsx)(b.t,{variant:(0,b.k)(ed.status),children:ed.status}):void 0,children:ej(ed)?(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("dl",{className:"grid gap-2 text-sm sm:grid-cols-2",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{className:"text-xs uppercase tracking-wide text-text-muted",children:"Version"}),(0,t.jsx)("dd",{className:"font-mono text-xs",children:ed.version??"unknown"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{className:"text-xs uppercase tracking-wide text-text-muted",children:"Home"}),(0,t.jsx)("dd",{className:"font-mono text-xs break-all",children:ed.hermesHome})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{className:"text-xs uppercase tracking-wide text-text-muted",children:"Dashboard"}),(0,t.jsxs)("dd",{className:"mt-1 flex items-center gap-2",children:[(0,t.jsx)(b.t,{variant:(0,b.k)(ed.dashboardStatus),children:ed.dashboardStatus}),(0,t.jsx)("span",{className:"font-mono text-xs",children:(u=""===(x=(m=ed).dashboardHost.trim().toLowerCase().replace(/^\[|\]$/g,""))||"0.0.0.0"===x||"127.0.0.1"===x||"localhost"===x||"::"===x||"::1"===x?m.hostname:m.dashboardHost,`${u}:${m.dashboardPort}`)})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{className:"text-xs uppercase tracking-wide text-text-muted",children:"Gateway"}),(0,t.jsx)("dd",{className:"mt-1",children:(0,t.jsx)(b.t,{variant:(0,b.k)(ed.gatewayStatus),children:ed.gatewayStatus})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{className:"text-xs uppercase tracking-wide text-text-muted",children:"API Server"}),(0,t.jsx)("dd",{className:"font-mono text-xs",children:ed.apiServerEnabled?`${ed.apiServerHost}:${ed.apiServerPort??"—"}`:"disabled"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{className:"text-xs uppercase tracking-wide text-text-muted",children:"Primary Provider"}),(0,t.jsxs)("dd",{className:"mt-1 flex flex-wrap items-center gap-1.5",children:[(0,t.jsx)(b.t,{variant:"unknown"===eY?"warning":"success",children:eY}),ed.configuration?.magnusRouterConfigured&&(0,t.jsx)(b.t,{variant:"success",children:"Magnus routed"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{className:"text-xs uppercase tracking-wide text-text-muted",children:"Default Model"}),(0,t.jsx)("dd",{className:"font-mono text-xs break-all",children:e0})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{className:"text-xs uppercase tracking-wide text-text-muted",children:"OpenAI Runtime"}),(0,t.jsx)("dd",{className:"mt-1",children:(0,t.jsx)(b.t,{variant:ed.configuration?.openaiRuntime==="codex_app_server"?"success":"warning",children:ed.configuration?.openaiRuntime==="codex_app_server"?"Codex app-server":"Hermes default"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{className:"text-xs uppercase tracking-wide text-text-muted",children:"Web Search"}),(0,t.jsxs)("dd",{className:"mt-1 flex items-center gap-2 text-xs",children:[(0,t.jsx)(L.f,{className:"h-3.5 w-3.5 text-text-muted"}),(0,t.jsx)("span",{className:"font-mono break-all",children:e1})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{className:"text-xs uppercase tracking-wide text-text-muted",children:"Crawling"}),(0,t.jsxs)("dd",{className:"mt-1 flex items-center gap-2 text-xs",children:[(0,t.jsx)(T,{className:"h-3.5 w-3.5 text-text-muted"}),(0,t.jsx)("span",{className:"font-mono break-all",children:e2})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{className:"text-xs uppercase tracking-wide text-text-muted",children:"Memory"}),(0,t.jsxs)("dd",{className:"mt-1",children:[(0,t.jsx)(b.t,{variant:ed.configuration?.hiveMemConfigured?"success":"warning",children:ed.configuration?.memoryProvider??"not configured"}),(0,t.jsx)(k.f,{configuration:ed.configuration})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{className:"text-xs uppercase tracking-wide text-text-muted",children:"Skills"}),(0,t.jsx)("dd",{className:"mt-1",children:(0,t.jsxs)("button",{type:"button",onClick:()=>ez(!0),className:"inline-flex items-center gap-1.5 rounded border border-border px-2 py-1 text-xs text-text hover:border-primary/60 hover:text-primary disabled:cursor-not-allowed disabled:opacity-50",disabled:0===eQ.length,children:[(0,t.jsx)(O.f,{className:"h-3.5 w-3.5"}),function(e){if(0===e.length)return"0 synced";let t=e.filter(e=>e.enabled).length;return`${t} enabled / ${e.length} total`}(eQ)]})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{className:"text-xs uppercase tracking-wide text-text-muted",children:"Last Sync"}),(0,t.jsx)("dd",{className:"text-xs",children:(0,C.C)(ed.lastSyncedAt)})]})]}),(0,t.jsxs)("div",{className:"space-y-2",children:[ed.configuration?.modelBaseUrl&&(0,t.jsxs)("p",{className:"text-xs text-text-muted",children:["Base URL: ",(0,t.jsx)("span",{className:"font-mono",children:ed.configuration.modelBaseUrl})]}),ed.configuration?.configPath&&(0,t.jsxs)("p",{className:"text-xs text-text-muted",children:["Config: ",(0,t.jsx)("span",{className:"font-mono",children:ed.configuration.configPath})]})]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(ed.profiles??[]).slice(0,6).map(e=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 rounded border border-border px-2 py-1 text-[10px] text-text-muted",children:[(0,t.jsx)(F.f,{className:"h-3 w-3"}),e.name]},e.id)),(ed.profiles?.length??0)===0&&(0,t.jsx)("span",{className:"text-xs text-text-muted",children:"No profiles synced"})]}),(0,t.jsx)(S.K,{size:"sm",variant:"secondary",icon:(0,t.jsx)(M.f,{className:"h-3.5 w-3.5"}),onClick:()=>f.push(`/orchestra/web-gateway?installationId=${encodeURIComponent(ed.id)}`),children:"Open Dashboard"})]}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("p",{className:"text-sm text-text-muted",children:"No Hermes Agent is installed or currently detected on this node."}),eD&&(0,t.jsx)("p",{className:"text-xs text-success",children:eD}),eR&&(0,t.jsx)("p",{className:"text-xs text-danger",children:eR}),(0,t.jsx)(S.K,{size:"sm",variant:"secondary",icon:eE?(0,t.jsx)(E.f,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(R.f,{className:"h-3.5 w-3.5"}),disabled:!N||"ONLINE"!==N.status||eE,onClick:()=>void eq(),children:eE?"Starting Deployment...":"Deploy Hermes Agent"}),N?.status!=="ONLINE"&&(0,t.jsx)("p",{className:"text-xs text-text-muted",children:"Bring the Magnus agent online before starting automated Hermes deployment."})]})}),(0,t.jsx)(n.N,{title:"Service Checks",children:y&&ef(y.services).length>0?(0,t.jsx)("div",{className:"space-y-2 text-sm",children:ef(y.services).slice(0,8).map(e=>(0,t.jsxs)("div",{className:"flex items-center justify-between rounded border border-border px-2 py-1.5",children:[(0,t.jsx)("span",{className:"font-medium",children:e.name}),(0,t.jsx)(b.t,{variant:"active"===e.status?"success":"failed"===e.status?"danger":"default",children:e.status})]},e.name))}):(0,t.jsx)("p",{className:"text-sm text-text-muted",children:"No service checks available from this node yet."})})]}),(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)(n.N,{title:"System Update Readiness",description:"Automatic apt policy and reboot state from the latest heartbeat",action:e5?(0,t.jsx)(b.t,{variant:e5.rebootRequired?"danger":"enabled"===e5.automaticUpdates?"success":"warning",children:e5.rebootRequired?"reboot required":e5.automaticUpdates.replace("_"," ")}):void 0,children:e5?(0,t.jsxs)("div",{className:"space-y-4",children:[e5.rebootRequired&&(0,t.jsxs)("div",{className:"flex gap-3 rounded border border-danger/30 bg-danger/10 p-3",children:[(0,t.jsx)(B.f,{className:"mt-0.5 h-4 w-4 shrink-0 text-danger"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-sm font-medium text-danger",children:"Restart needed to finish installed updates"}),(0,t.jsx)("p",{className:"mt-1 text-xs text-text-muted",children:e5.rebootRequiredPackages.length?e5.rebootRequiredPackages.slice(0,5).join(", "):"The operating system has set the reboot-required marker."})]})]}),(0,t.jsxs)("dl",{className:"space-y-2 text-sm",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("dt",{className:"text-text-muted",children:"Platform"}),(0,t.jsx)("dd",{className:"font-mono text-xs",children:e5.platform})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("dt",{className:"text-text-muted",children:"Automatic updates"}),(0,t.jsx)("dd",{children:(0,t.jsx)(b.t,{variant:"enabled"===e5.automaticUpdates?"success":"warning",children:e5.automaticUpdates})})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("dt",{className:"text-text-muted",children:"unattended-upgrades"}),(0,t.jsx)("dd",{children:e5.unattendedUpgradesInstalled?"installed":"not installed"})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("dt",{className:"text-text-muted",children:"full apt upgrade policy"}),(0,t.jsx)("dd",{children:e5.fullUpgradePolicyEnabled?"enabled":"not enabled"})]}),e5.timers.map(e=>(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("dt",{className:"font-mono text-[11px] text-text-muted",children:e.name}),(0,t.jsx)("dd",{className:"font-mono text-[11px]",children:e.state})]},e.name))]}),e5.supported&&"enabled"!==e5.automaticUpdates&&(0,t.jsxs)(S.K,{size:"sm",variant:"primary",disabled:"ONLINE"!==N.status||eP,onClick:()=>void eW(),children:[eP?(0,t.jsx)(E.f,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(H.f,{className:"h-3.5 w-3.5"}),eP?"Enabling…":"Enable automatic updates"]}),eI&&(0,t.jsx)("p",{className:"text-xs text-danger",children:eI})]}):(0,t.jsx)("p",{className:"text-sm text-text-muted",children:"Update posture will appear after agent v1.6.0 reports its first heartbeat."})}),(0,t.jsx)(n.N,{title:"Wazuh Agent",description:"Endpoint-security posture from the latest node heartbeat",action:e3?(0,t.jsx)(b.t,{variant:"active"===(e=e3.serviceStatus)?"success":"failed"===e?"danger":"inactive"===e?"warning":"default",children:e3.serviceStatus.replace("_"," ")}):void 0,children:e3?(0,t.jsxs)("dl",{className:"space-y-2 text-sm",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("dt",{className:"text-text-muted",children:"Installation"}),(0,t.jsx)("dd",{children:(0,t.jsx)(b.t,{variant:e3.installed?"success":"default",children:e3.installed?"installed":"not installed"})})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("dt",{className:"text-text-muted",children:"Startup"}),(0,t.jsx)("dd",{className:"font-medium",children:e3.enabled})]}),(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("dt",{className:"text-text-muted",children:"Version"}),(0,t.jsx)("dd",{className:"font-mono text-xs",children:e3.version??"—"})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{className:"text-text-muted",children:"Managers"}),(0,t.jsx)("dd",{className:"mt-1 font-mono text-xs break-all",children:e3.managerAddresses.length?e3.managerAddresses.join(", "):"—"})]})]}):(0,t.jsx)("p",{className:"text-sm text-text-muted",children:"Wazuh posture will appear after this host reports a current Magnus agent heartbeat."})}),(0,t.jsx)(n.N,{title:"Disk Usage",children:y&&eg(y.disks).length?(0,t.jsx)("div",{className:"space-y-3",children:eg(y.disks).map(e=>(0,t.jsxs)("div",{className:"text-sm",children:[(0,t.jsxs)("div",{className:"flex justify-between text-xs",children:[(0,t.jsx)("span",{className:"text-text-muted",children:e.mountPoint}),(0,t.jsxs)("span",{className:"num",children:[(0,C.L)(e.usedBytes)," / ",(0,C.L)(e.totalBytes)]})]}),(0,t.jsx)(l.f,{value:e.usagePercent,thresholds:{warn:80,crit:90},size:"sm",label:`${e.mountPoint} disk usage`,showValue:!0,className:"mt-1"})]},e.mountPoint))}):(0,t.jsx)("p",{className:"text-sm text-text-muted",children:"No disk data available"})}),(0,t.jsx)(n.N,{title:"Capacity Forecast",description:"Per-volume 30-day growth trend and estimated time to full",children:G.length?(0,t.jsx)("div",{className:"space-y-3",children:G.map(e=>(0,t.jsxs)("div",{className:"rounded border border-border/50 p-3 text-xs",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsx)("span",{className:"font-mono text-text",children:e.mountPoint}),(0,t.jsx)(b.t,{variant:null!==e.daysUntilFull&&e.daysUntilFull<=14?"danger":null!==e.daysUntilFull&&e.daysUntilFull<=30?"warning":"default",children:null===e.daysUntilFull?e.growthRatePerDay>0?"trend uncertain":"stable/shrinking":`${e.daysUntilFull}d to full`})]}),(0,t.jsxs)("div",{className:"mt-2 text-text-muted",children:[e.currentUsagePercent.toFixed(1),"% used · ",(0,C.L)(Math.abs(e.growthRatePerDay)),"/day ",e.growthRatePerDay>=0?"growth":"reclaimed"," · confidence ",(100*e.confidence).toFixed(0),"%"]}),(0,t.jsx)("p",{className:"mt-2 text-text-muted",children:e.recommendation})]},e.mountPoint))}):(0,t.jsx)("p",{className:"text-sm text-text-muted",children:"At least three retained samples are needed for a capacity forecast."})}),(0,t.jsxs)(n.N,{title:"Software Revisions",description:"Major runtime versions and package update status",action:(0,t.jsx)(S.K,{variant:"ghost",size:"sm",onClick:()=>void eG(),children:(0,t.jsx)(I.f,{className:`h-3.5 w-3.5 ${eo?"animate-spin":""}`})}),children:[(0,t.jsxs)("div",{className:"space-y-2 text-sm",children:[["node","npm","python3","redis","docker","tailscale","magnus-agent"].map(e=>(0,t.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,t.jsx)("dt",{className:"text-text-muted uppercase text-xs tracking-wide",children:e}),(0,t.jsx)("dd",{className:"font-mono text-right text-xs break-all",children:er[e]??(eo?"Loading…":"—")})]},e)),ex&&(0,t.jsx)("p",{className:"text-xs text-danger",children:ex})]}),(0,t.jsxs)("div",{className:"mt-4 border-t border-border pt-4 space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("span",{className:"text-xs uppercase tracking-wide text-text-muted",children:"APT Updates"}),(0,t.jsx)(b.t,{variant:ep&&ep>0?"warning":"success",children:ew?"Checking…":`${ep??"—"} pending`})]}),(0,t.jsxs)("p",{className:"text-xs text-text-muted",children:["Refreshed hourly via apt update",ey?` • Last check: ${(0,C.C)(ey)}`:""]}),eS&&(0,t.jsx)("p",{className:"text-xs text-danger",children:eS}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)(S.K,{size:"sm",variant:"secondary",disabled:"ONLINE"!==N.status||ew,onClick:()=>void eJ(),children:[(0,t.jsx)(I.f,{className:`h-3.5 w-3.5 ${ew?"animate-spin":""}`}),"Refresh"]}),(0,t.jsxs)(S.K,{size:"sm",variant:"primary",disabled:"ONLINE"!==N.status||eC,onClick:()=>void eV(),children:[eC?(0,t.jsx)(E.f,{className:"h-3.5 w-3.5 animate-spin"}):null,eC?"Dispatching…":"APT Upgrade"]})]})]})]})]})]}),ea.length>0&&(0,t.jsx)(n.N,{title:"Role Applications",children:(0,t.jsx)("div",{className:"space-y-4",children:ea.map(e=>(0,t.jsxs)("div",{className:"rounded-lg border border-border p-3",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(D.f,{className:"h-4 w-4 text-primary"}),(0,t.jsxs)("span",{className:"text-sm font-medium",children:["apply"===e.action?"Apply":"Remove",": ",e.role?.name??"Unknown"]})]}),(0,t.jsx)(b.t,{variant:"completed"===e.status?"success":"failed"===e.status?"danger":"running"===e.status?"info":"default",children:e.status})]}),e.error&&(0,t.jsx)("div",{className:"mb-2 rounded border border-danger/30 bg-danger/10 px-2 py-1 text-xs text-danger font-mono",children:e.error}),(0,t.jsx)("div",{className:"space-y-1",children:e.steps.map(e=>(0,t.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,t.jsxs)("span",{className:"completed"===e.status?"text-success":"failed"===e.status?"text-danger":"running"===e.status?"text-info":"skipped"===e.status?"text-text-muted/50":"text-text-muted",children:["completed"===e.status&&"✓","failed"===e.status&&"✗","running"===e.status&&"⟳","skipped"===e.status&&"—","pending"===e.status&&"○"]}),(0,t.jsx)("span",{className:"skipped"===e.status?"text-text-muted/50 line-through":"",children:e.name}),e.error&&(0,t.jsx)("span",{className:"text-danger ml-2 truncate max-w-xs",title:e.error,children:e.error})]},e.name))}),(0,t.jsxs)("div",{className:"mt-2 text-[10px] text-text-muted",children:[e.startedAt?`Started: ${(0,C.C)(e.startedAt)}`:"",e.completedAt?` — Completed: ${(0,C.C)(e.completedAt)}`:""]})]},e.id))})}),(0,t.jsx)($.n,{open:eL,onClose:()=>ez(!1),title:"Hermes Skills",description:`${eX.length} enabled on ${N.name}`,icon:(0,t.jsx)(O.f,{className:"h-5 w-5 text-primary"}),className:"max-w-3xl",children:(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"grid gap-3 sm:grid-cols-3",children:[(0,t.jsxs)("div",{className:"rounded border border-border bg-bg/50 p-3",children:[(0,t.jsx)("p",{className:"text-[10px] uppercase tracking-wide text-text-muted",children:"Enabled"}),(0,t.jsx)("p",{className:"mt-1 text-lg font-semibold",children:eX.length})]}),(0,t.jsxs)("div",{className:"rounded border border-border bg-bg/50 p-3",children:[(0,t.jsx)("p",{className:"text-[10px] uppercase tracking-wide text-text-muted",children:"Total"}),(0,t.jsx)("p",{className:"mt-1 text-lg font-semibold",children:eQ.length})]}),(0,t.jsxs)("div",{className:"rounded border border-border bg-bg/50 p-3",children:[(0,t.jsx)("p",{className:"text-[10px] uppercase tracking-wide text-text-muted",children:"Sources"}),(0,t.jsx)("p",{className:"mt-1 text-sm font-mono",children:Array.from(new Set(eQ.map(e=>e.source))).filter(Boolean).join(", ")||"unknown"})]})]}),(0,t.jsxs)("div",{className:"max-h-[55vh] overflow-auto rounded border border-border",children:[(0,t.jsxs)("table",{className:"w-full text-left text-xs",children:[(0,t.jsx)("thead",{className:"sticky top-0 bg-surface text-[10px] uppercase tracking-wide text-text-muted",children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{className:"px-3 py-2 font-medium",children:"Skill"}),(0,t.jsx)("th",{className:"px-3 py-2 font-medium",children:"Category"}),(0,t.jsx)("th",{className:"px-3 py-2 font-medium",children:"Source"}),(0,t.jsx)("th",{className:"px-3 py-2 font-medium",children:"Status"})]})}),(0,t.jsx)("tbody",{className:"divide-y divide-border",children:eQ.slice().sort((e,t)=>Number(t.enabled)-Number(e.enabled)||e.slug.localeCompare(t.slug)).map(e=>(0,t.jsxs)("tr",{className:"bg-bg/20",children:[(0,t.jsx)("td",{className:"px-3 py-2 font-mono",children:e.slug}),(0,t.jsx)("td",{className:"px-3 py-2 text-text-muted",children:e.category??"uncategorized"}),(0,t.jsx)("td",{className:"px-3 py-2 text-text-muted",children:e.source}),(0,t.jsx)("td",{className:"px-3 py-2",children:(0,t.jsx)(b.t,{variant:e.enabled?"success":"default",children:e.enabled?"enabled":"disabled"})})]},`${e.slug}-${e.source}`))})]}),0===eQ.length&&(0,t.jsx)("div",{className:"p-6 text-sm text-text-muted",children:"No synced Hermes skills were reported for this node."})]})]})}),(0,t.jsx)(K.F,{open:X,node:N,onClose:()=>Y(!1),onSaved:()=>void eB()}),(0,t.jsx)(K.E,{open:ee,node:N?{id:N.id,name:N.name,role:N.role}:null,onClose:()=>et(!1),onSaved:e=>{eH.current=e,N&&v({...N,role:e}),eB()}})]})}],5525)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{"use strict";(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,47244,e=>{var t=e.i(43476),a=e.i(71645),r=e.i(82983),s=e.i(78571),n=e.i(35084),l=e.i(72603);let i=2*Math.PI;function c(e){let t=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})/i.exec(e.trim());return t?[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]:[255,255,255]}function o(e,t){let a=document.createElement("canvas");return a.width=e,a.height=t,a}function d({topology:e,inFlight:r=[],onSelectNode:x,selectedNodeId:h,highlightedNodeIds:u=[]}){let m=(0,a.useRef)(null),p=(0,a.useRef)(null),g=(0,a.useRef)([]),f=(0,a.useRef)(null),b=(0,a.useRef)(u);(0,a.useEffect)(()=>{b.current=u,y.current?.()},[u]);let w=(0,a.useRef)(h??null),y=(0,a.useRef)(null),[v,N]=(0,a.useState)({w:800,h:500}),[j,k]=(0,a.useState)(60),M=(0,l.p)(),[$,_]=(0,a.useState)(null);(0,a.useEffect)(()=>{_((0,n.s)())},[]),(0,a.useEffect)(()=>{let e=p.current;if(!e)return;let t=new ResizeObserver(e=>{let t=e[0];if(!t)return;let a=t.contentRect;N({w:Math.max(320,Math.floor(a.width)),h:Math.max(320,Math.floor(a.height))})});return t.observe(e),()=>t.disconnect()},[]),(0,a.useEffect)(()=>{w.current=h??null,y.current?.()},[h]),(0,a.useEffect)(()=>{var t,a;let s,n,l,d,x,h,u,p,N=m.current;if(!N||!$)return;let j=N.getContext("2d");if(!j)return;let _=Math.min(2,window.devicePixelRatio||1);N.width=Math.floor(v.w*_),N.height=Math.floor(v.h*_),N.style.width=`${v.w}px`,N.style.height=`${v.h}px`,j.setTransform(_,0,0,_,0,0);let S=getComputedStyle(document.body).fontFamily||"monospace",I=(t=v.w,a=v.h,s=e.subnets.length>0?e.subnets:[{cidr:"default",nodeCount:e.nodes.length,nodes:e.nodes.map(e=>e.id),isGateway:!1}],n=t/2,l=a/2,d=.38*Math.min(t,a),x=[],h=[],s.forEach((t,a)=>{let r=a/Math.max(1,s.length)*i,c=1===s.length,o=t.isGateway||c?n:n+Math.cos(r)*d,u=t.isGateway||c?l:l+Math.sin(r)*d,m=e.nodes.filter(e=>t.nodes.includes(e.id)),p=m.length<=1?0:Math.min(c?.75*d:80,24+8*m.length);h.push({x:o,y:u,r:p+18,cidr:t.cidr,isGateway:t.isGateway,size:m.length}),m.forEach((e,t)=>{let a=t/Math.max(1,m.length)*i,r=o+Math.cos(a)*p,s=u+Math.sin(a)*p,n=0;for(let t=0;t<e.id.length;t++)n=31*n+e.id.charCodeAt(t)|0;let l=Math.abs(n%1e3)/1e3*i;x.push({node:e,x:r,y:s,phase:l,stress:function(e){if(!e.reachable||"OFFLINE"===e.status)return 1;if("DEGRADED"===e.status)return .75;if("PROVISIONING"===e.status)return .45;let t=e.latencyMs??0;return t>100?.8:t>50?.55:t>20?.3:.12}(e)})})}),{nodes:x,clusters:h});g.current=I.nodes;let C=new Map(I.nodes.map(e=>[e.node.id,e])),E=new Set(r.map(e=>e.nodeId)),T=(u=[c($.success),c($.warning),c($.danger)],(e,t=1)=>{let a=Math.max(0,Math.min(1,e)),[r,s,n]=a<.5?[u[0],u[1],a/.5]:[u[1],u[2],(a-.5)/.5],l=e=>Math.round(r[e]+(s[e]-r[e])*n);return`rgba(${l(0)},${l(1)},${l(2)},${t})`}),R=(p=Math.ceil(64*_),Array.from({length:8},(e,t)=>{let a=o(p,p),r=a.getContext("2d");if(!r)return a;let s=t/7,n=r.createRadialGradient(p/2,p/2,0,p/2,p/2,p/2);return n.addColorStop(0,T(s,.55)),n.addColorStop(.35,T(s,.18)),n.addColorStop(1,T(s,0)),r.fillStyle=n,r.fillRect(0,0,p,p),a})),P=function(e,t,a,r,s,n){let l=o(Math.floor(e*a),Math.floor(t*a)),d=l.getContext("2d");if(!d)return l;d.setTransform(a,0,0,a,0,0),d.fillStyle=r.bg,d.fillRect(0,0,e,t);let x=e/2,h=t/2,u=Math.hypot(x,h),[m,p,g]=c(r.primary);d.lineWidth=1;for(let e=60;e<u;e+=60)d.strokeStyle=`rgba(${m},${p},${g},${e%180==0?.09:.045})`,d.beginPath(),d.arc(x,h,e,0,i),d.stroke();d.strokeStyle=`rgba(${m},${p},${g},0.04)`;for(let e=0;e<12;e++){let t=e/12*i;d.beginPath(),d.moveTo(x,h),d.lineTo(x+Math.cos(t)*u,h+Math.sin(t)*u),d.stroke()}let[f,b,w]=c(r.accent);for(let e of(d.font=`10px ${n}`,s.filter(e=>e.size>1))){let[t,a,r]=e.isGateway?[f,b,w]:[m,p,g],s=d.createRadialGradient(e.x,e.y,.2*e.r,e.x,e.y,e.r);s.addColorStop(0,`rgba(${t},${a},${r},0.05)`),s.addColorStop(1,`rgba(${t},${a},${r},0)`),d.fillStyle=s,d.beginPath(),d.arc(e.x,e.y,e.r,0,i),d.fill(),d.setLineDash([3,5]),d.strokeStyle=`rgba(${t},${a},${r},0.25)`,d.beginPath(),d.arc(e.x,e.y,e.r,0,i),d.stroke(),d.setLineDash([]),d.fillStyle=`rgba(${t},${a},${r},0.55)`,d.fillText(e.isGateway?`${e.cidr} \xb7 gateway`:e.cidr,e.x-.7*e.r,e.y-e.r-6)}return l}(v.w,v.h,_,$,I.clusters,S),[L,G,A]=c($.primary),[D,O,F]=c($.accent),U=v.w/2,z=v.h/2,V=Math.hypot(U,z),W=I.nodes.length<=32,H=Math.min(1,24/Math.max(1,e.edges.length)),Y=!M,B=t=>{if(j.drawImage(P,0,0,v.w,v.h),Y&&"function"==typeof j.createConicGradient){let e=.6*t%i,a=j.createConicGradient(e-.9,U,z);a.addColorStop(0,`rgba(${L},${G},${A},0)`),a.addColorStop(.14,`rgba(${L},${G},${A},0.08)`),a.addColorStop(.1433,`rgba(${L},${G},${A},0)`),a.addColorStop(1,`rgba(${L},${G},${A},0)`),j.fillStyle=a,j.beginPath(),j.arc(U,z,V,0,i),j.fill()}for(let t of(j.lineWidth=1,e.edges)){let e=C.get(t.from),a=C.get(t.to);e&&a&&(j.strokeStyle="same-subnet"===t.type?`rgba(${L},${G},${A},${.2*H+.04})`:`rgba(${D},${O},${F},${.16*H+.03})`,j.beginPath(),j.moveTo(e.x,e.y),j.lineTo(a.x,a.y),j.stroke())}if(E.size>0){for(let a of(j.setLineDash([6,6]),j.lineDashOffset=Y?-(60*t)%20:0,j.lineWidth=1.5,j.strokeStyle=`rgba(${L},${G},${A},0.85)`,e.edges)){if(!E.has(a.from)&&!E.has(a.to))continue;let e=C.get(a.from),r=C.get(a.to);if(e&&r&&(j.beginPath(),j.moveTo(e.x,e.y),j.lineTo(r.x,r.y),j.stroke(),Y)){let a=((.5*t+e.phase/i)%1+1)%1,s=e.x+(r.x-e.x)*a,n=e.y+(r.y-e.y)*a;j.fillStyle=`rgba(${L},${G},${A},0.95)`,j.beginPath(),j.arc(s,n,2.5,0,i),j.fill()}}j.setLineDash([]),j.lineDashOffset=0}let a=w.current;for(let e of(j.font=`11px ${S}`,I.nodes)){let{x:r,y:s,phase:n,stress:l,node:c}=e,o=a===c.id,d=f.current===c.id,x=R[Math.round(7*l)];if(x&&j.drawImage(x,r-32,s-32,64,64),b.current.includes(c.id)&&(j.save(),j.strokeStyle=$.accent,j.lineWidth=2,j.setLineDash([3,3]),j.beginPath(),j.arc(r,s,22,0,i),j.stroke(),j.restore()),c.reachable&&Y){let e=((.6*t+n/i)%1+1)%1;j.strokeStyle=T(l,.45*(1-e)),j.lineWidth=1.5,j.beginPath(),j.arc(r,s,Math.max(0,8+16*e),0,i),j.stroke()}if(j.fillStyle=$.bg,j.beginPath(),j.arc(r,s,7,0,i),j.fill(),j.fillStyle=T(l),j.beginPath(),j.arc(r,s,4.5,0,i),j.fill(),j.strokeStyle=T(l,.8),j.lineWidth=1,j.beginPath(),j.arc(r,s,7,0,i),j.stroke(),o||d){j.strokeStyle=$.primary,j.lineWidth=1.5,j.beginPath(),j.arc(r,s,12,0,i),j.stroke();for(let e=0;e<4;e++){let t=Math.PI/2*e+Math.PI/4;j.beginPath(),j.moveTo(r+15*Math.cos(t),s+15*Math.sin(t)),j.lineTo(r+19*Math.cos(t),s+19*Math.sin(t)),j.stroke()}}(d||o||W)&&(j.fillStyle=d||o?$.text:`rgba(${L},${G},${A},0.6)`,j.fillText(c.name,r+14,s+4))}},K=null,q=!0,X=performance.now(),Q=0,J=0,Z=e=>{let t=e-X;X=e,J+=t,++Q>=30&&(k(Math.min(120,Math.round(1e3/Math.max(1,J/Q)))),Q=0,J=0),B(e/1e3),K=q?requestAnimationFrame(Z):null},ee=()=>{null===K&&Y&&q&&(X=performance.now(),K=requestAnimationFrame(Z))},et=new IntersectionObserver(e=>{(q=e[0]?.isIntersecting??!0)&&ee()});return et.observe(N),Y?(y.current=null,ee()):(y.current=()=>B(0),B(0)),()=>{et.disconnect(),null!==K&&cancelAnimationFrame(K),y.current=null}},[e,v.w,v.h,r,$,M]);let S=(0,a.useCallback)((e,t)=>{for(let a of g.current){let r=a.x-e,s=a.y-t;if(r*r+s*s<196)return a.node}return null},[]);return(0,t.jsxs)("div",{ref:p,className:"panel-corners relative h-[600px] w-full overflow-hidden rounded-panel border border-primary/25 bg-bg shadow-[0_0_24px_var(--color-glow)]","data-testid":"fleet-map-canvas-container",children:[(0,t.jsx)("canvas",{ref:m,onClick:e=>{let t=m.current;if(!t)return;let a=t.getBoundingClientRect(),r=S(e.clientX-a.left,e.clientY-a.top);x?.(r)},onMouseMove:e=>{let t=m.current;if(!t)return;let a=t.getBoundingClientRect(),r=S(e.clientX-a.left,e.clientY-a.top),s=r?.id??null;s!==f.current&&(f.current=s,t.style.cursor=s?"pointer":"default",y.current?.())},onMouseLeave:()=>{f.current=null,y.current?.()},"data-testid":"fleet-map-canvas","data-node-count":e.nodes.length,role:"img","aria-label":`Fleet topology: ${e.nodes.length} nodes across ${e.subnets.length} subnets`}),(0,t.jsxs)("div",{className:"absolute left-3 top-3 flex items-center gap-2 rounded-chip border border-primary/20 bg-bg/80 px-2 py-1 text-[10px] uppercase tracking-wider text-text-muted backdrop-blur-sm","data-testid":"fleet-map-fps",children:[M?(0,t.jsx)("span",{className:"text-primary",children:"static"}):(0,t.jsxs)("span",{className:(0,s.f)("num",j>=55?"text-success":j>=30?"text-warning":"text-danger"),children:[j," fps"]}),(0,t.jsx)("span",{className:"text-border-strong",children:"·"}),(0,t.jsxs)("span",{className:"num",children:[e.nodes.length," nodes"]})]}),(0,t.jsxs)("div",{className:"absolute bottom-3 left-3 flex flex-wrap items-center gap-3 rounded-chip border border-primary/20 bg-bg/80 px-2 py-1 text-[10px] uppercase tracking-wider text-text-muted backdrop-blur-sm","data-testid":"fleet-map-legend",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"inline-block h-2 w-2 rounded-full bg-success shadow-[0_0_6px_var(--color-success)]"})," healthy"]}),(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"inline-block h-2 w-2 rounded-full bg-warning shadow-[0_0_6px_var(--color-warning)]"})," stressed"]}),(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"inline-block h-2 w-2 rounded-full bg-danger shadow-[0_0_6px_var(--color-danger)]"})," critical"]}),(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"inline-block h-px w-3 bg-primary"})," subnet"]}),(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"inline-block h-px w-3 bg-accent"})," cross-subnet"]}),r.length>0&&(0,t.jsxs)("span",{className:"flex items-center gap-1 text-primary",children:[(0,t.jsx)("span",{className:"inline-block h-2 w-2 animate-pulse rounded-full bg-primary"})," ",r.length," in-flight"]})]})]})}var x=e.i(22016),h=e.i(32781),u=e.i(56420);let m={name:"network",size:24,node:[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]};m.node;let p=(0,u.f)(m);var g=e.i(83892),f=e.i(63676),b=e.i(46670),w=e.i(68759),y=e.i(2067),v=e.i(3062),N=e.i(73404),j=e.i(75723);e.s(["default",0,function(){let[e,l]=(0,a.useState)(null),[i,c]=(0,a.useState)(!0),[o,u]=(0,a.useState)(""),[m,k]=(0,a.useState)(!1),[M,$]=(0,a.useState)(null),[_,S]=(0,a.useState)(!0),[I,C]=(0,a.useState)("canvas"),[E,T]=(0,a.useState)([]),R=(0,a.useCallback)(async()=>{try{let e=await r.f.get("topology");l(e.data??null),u("")}catch(e){u(e instanceof Error?e.message:"Failed to load topology")}finally{c(!1)}},[]),P=async()=>{k(!0);try{let e=await r.f.post("topology/scan");l(e.data??null)}catch(e){u(e instanceof Error?e.message:"Scan failed")}finally{k(!1)}};if((0,a.useEffect)(()=>{R()},[R]),(0,a.useEffect)(()=>{if(!_)return;let e=setInterval(R,3e4);return()=>clearInterval(e)},[_,R]),(0,a.useEffect)(()=>{let e=!1,t=async()=>{try{let t=await r.f.get("commands?status=running&limit=50");if(e)return;let a=t.data?.items??[];T(a.filter(e=>"running"===e.status).map(e=>({nodeId:e.nodeId})))}catch{e||T([])}};t();let a=setInterval(t,5e3);return()=>{e=!0,clearInterval(a)}},[]),i)return(0,t.jsxs)("div",{className:"space-y-6","aria-busy":"true",children:[(0,t.jsx)("div",{className:"skeleton h-10 w-72"}),(0,t.jsx)("div",{className:"skeleton h-[600px] w-full rounded-panel opacity-70"}),(0,t.jsx)("span",{className:"sr-only",children:"Loading topology…"})]});if(o&&!e)return(0,t.jsx)(y.f,{tone:"danger",icon:(0,t.jsx)(p,{className:"h-5 w-5"}),title:"Topology unavailable",description:o,action:(0,t.jsx)(w.K,{variant:"secondary",size:"sm",onClick:()=>void R(),children:"Retry"})});let L=e?.nodes.filter(e=>e.reachable).length??0,G=e?.nodes.length??0;return(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsx)(N.f,{title:"Fleet Map",eyebrow:"Topology",description:(0,t.jsxs)(t.Fragment,{children:["Real-time network topology — ",(0,t.jsxs)("span",{className:"num text-primary",children:[L,"/",G]})," nodes reachable",e?.scannedAt&&(0,t.jsxs)(t.Fragment,{children:[" · Last scan: ",(0,t.jsx)("span",{className:"num",children:new Date(e.scannedAt).toLocaleTimeString()})]})]}),actions:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{role:"group","aria-label":"View",className:"inline-flex rounded-chip border border-border bg-bg p-0.5","data-testid":"fleet-map-view-toggle",children:["canvas","grid"].map(e=>(0,t.jsx)("button",{onClick:()=>C(e),"aria-pressed":I===e,className:(0,s.f)("rounded-chip px-3 py-1 text-[11px] font-medium uppercase tracking-wider transition-colors",I===e?"bg-primary/15 text-primary shadow-[0_0_10px_var(--color-glow)]":"text-text-muted hover:text-text"),"data-testid":`fleet-map-view-${e}`,children:"canvas"===e?"Canvas":"Grid"},e))}),(0,t.jsxs)("label",{className:"flex items-center gap-2 text-[11px] uppercase tracking-wider text-text-muted",children:[(0,t.jsx)("input",{type:"checkbox",checked:_,onChange:e=>S(e.target.checked),className:"accent-[var(--color-primary)]"}),"Auto-refresh"]}),(0,t.jsx)(w.K,{size:"sm",onClick:()=>void P(),disabled:m,icon:m?(0,t.jsx)(h.f,{className:"h-3.5 w-3.5 animate-spin"}):(0,t.jsx)(g.f,{className:"h-3.5 w-3.5"}),children:m?"Scanning...":"Scan Now"})]})}),"canvas"===I&&e&&(0,t.jsx)(d,{topology:e,inFlight:E,selectedNodeId:M?.id??null,onSelectNode:e=>$(t=>t?.id===e?.id?null:e)}),"grid"===I&&(0,t.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:e?.subnets.map(a=>(0,t.jsxs)(v.f,{tone:a.isGateway?"accent":"primary",padding:"sm",className:"p-4",children:[(0,t.jsxs)("div",{className:"mb-3 flex items-center justify-between gap-2",children:[(0,t.jsx)("h3",{className:"num text-sm font-bold text-text",children:a.cidr}),a.isGateway&&(0,t.jsx)(b.t,{variant:"default",className:"border-accent/40 text-accent",children:"Gateway"}),(0,t.jsxs)("span",{className:"num text-[10px] uppercase tracking-wider text-text-muted",children:[a.nodeCount," nodes"]})]}),(0,t.jsx)("div",{className:"space-y-1.5",children:e.nodes.filter(e=>a.nodes.includes(e.id)).map(e=>(0,t.jsxs)("button",{onClick:()=>$(M?.id===e.id?null:e),className:(0,s.f)("flex w-full items-center gap-3 rounded-chip border p-2 text-left transition-colors",M?.id===e.id?"border-primary/50 bg-primary/10 shadow-[0_0_10px_var(--color-glow)]":"border-transparent hover:border-border hover:bg-surface-hover"),children:[(0,t.jsx)(j.f,{status:e.status,pulse:e.reachable&&"ONLINE"===e.status}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)("div",{className:"truncate text-xs font-medium text-text",children:e.name}),(0,t.jsxs)("div",{className:"num truncate text-[10px] text-text-muted",children:[e.ip,":",e.port]})]}),null!==e.latencyMs&&(0,t.jsxs)("span",{className:(0,s.f)("num text-[11px]",n.T[(0,n.f)(e.latencyMs)]),children:[e.latencyMs,"ms"]})]},e.id))})]},a.cidr))}),"grid"===I&&e&&e.edges.length>0&&(0,t.jsx)(v.f,{title:"Network Edges",icon:(0,t.jsx)(p,{className:"h-3.5 w-3.5"}),children:(0,t.jsx)("div",{className:"max-h-[50vh] overflow-auto",children:(0,t.jsxs)("table",{className:"w-full text-[11px]",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"sticky top-0 border-b border-primary/30 bg-surface/95 text-left text-[10px] font-bold uppercase tracking-[0.15em] text-text-muted",children:[(0,t.jsx)("th",{className:"px-3 py-2",children:"From"}),(0,t.jsx)("th",{className:"px-3 py-2",children:"To"}),(0,t.jsx)("th",{className:"px-3 py-2",children:"Type"}),(0,t.jsx)("th",{className:"px-3 py-2 text-right",children:"Latency"})]})}),(0,t.jsx)("tbody",{className:"divide-y divide-border/50",children:e.edges.map((a,r)=>{let l=e.nodes.find(e=>e.id===a.from),i=e.nodes.find(e=>e.id===a.to);return(0,t.jsxs)("tr",{className:"transition-colors hover:bg-primary/[0.03]",children:[(0,t.jsx)("td",{className:"px-3 py-2 text-text",children:l?.name??a.from}),(0,t.jsx)("td",{className:"px-3 py-2 text-text",children:i?.name??a.to}),(0,t.jsx)("td",{className:"px-3 py-2",children:(0,t.jsx)(b.t,{variant:"default",className:"same-subnet"===a.type?"border-primary/40 text-primary":"border-accent/40 text-accent",children:a.type})}),(0,t.jsx)("td",{className:(0,s.f)("num px-3 py-2 text-right",null!==a.latencyMs?n.T[(0,n.f)(a.latencyMs)]:"text-text-muted"),children:null!==a.latencyMs?`${a.latencyMs}ms`:"—"})]},r)})})]})})}),M&&(0,t.jsx)(v.f,{tone:"ONLINE"===M.status?"primary":"OFFLINE"===M.status?"danger":"warning",title:(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)(j.f,{status:M.status}),M.name]}),action:(0,t.jsx)("button",{onClick:()=>$(null),"aria-label":"Close node details",className:"text-text-muted transition-colors hover:text-text",children:(0,t.jsx)(f.X,{className:"h-4 w-4"})}),children:(0,t.jsxs)("dl",{className:"grid grid-cols-2 gap-3 text-xs sm:grid-cols-4",children:[[["Hostname",M.hostname,""],["IP",M.ip,"num"],["Port",String(M.port),"num"],["Subnet",M.subnet,"num"]].map(([e,a,r])=>(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{className:"text-[10px] uppercase tracking-wider text-text-muted",children:e}),(0,t.jsx)("dd",{className:(0,s.f)("mt-0.5 truncate text-text",r),children:a})]},e)),(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{className:"text-[10px] uppercase tracking-wider text-text-muted",children:"Status"}),(0,t.jsx)("dd",{className:"mt-0.5",children:(0,t.jsx)(b.t,{variant:(0,b.k)(M.status),children:M.status})})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{className:"text-[10px] uppercase tracking-wider text-text-muted",children:"Reachable"}),(0,t.jsx)("dd",{className:(0,s.f)("mt-0.5 font-bold",M.reachable?"text-success":"text-danger"),children:M.reachable?"Yes":"No"})]}),null!==M.latencyMs&&(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{className:"text-[10px] uppercase tracking-wider text-text-muted",children:"Latency"}),(0,t.jsxs)("dd",{className:(0,s.f)("num mt-0.5",n.T[(0,n.f)(M.latencyMs)]),children:[M.latencyMs,"ms"]})]}),(0,t.jsx)("div",{className:"flex items-end",children:(0,t.jsx)(x.default,{href:`/nodes/${M.id}`,className:"text-[11px] uppercase tracking-wider text-primary hover:underline",children:"Open node →"})})]})})]})}],47244)},46670,e=>{var t=e.i(43476),a=e.i(78571);let r={default:"border-border text-text-muted",success:"border-success/40 text-success bg-success/5 shadow-[0_0_6px_rgba(0,255,65,0.15)]",warning:"border-warning/40 text-warning bg-warning/5 shadow-[0_0_6px_rgba(255,179,0,0.15)]",danger:"border-danger/40 text-danger bg-danger/5 shadow-[0_0_6px_rgba(255,23,68,0.15)]",info:"border-info/40 text-info bg-info/5 shadow-[0_0_6px_rgba(0,176,255,0.15)]"},s={default:"bg-text-muted",success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info"};e.s(["t",0,function({children:e,variant:n="default",className:l,dot:i=!1,pulse:c=!1}){return(0,t.jsxs)("span",{className:(0,a.f)("inline-flex items-center gap-1.5 rounded-chip border px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider",r[n],l),children:[i&&(0,t.jsxs)("span",{"aria-hidden":"true",className:"relative inline-flex h-1.5 w-1.5",children:[c&&(0,t.jsx)("span",{className:(0,a.f)("absolute inset-0 rounded-full animate-halo",s[n])}),(0,t.jsx)("span",{className:(0,a.f)("relative inline-flex h-1.5 w-1.5 rounded-full",s[n])})]}),e]})},"k",0,function(e){switch(e.toUpperCase()){case"ONLINE":case"COMPLETED":case"ACTIVE":case"RUNNING":case"INSTALLED":case"HEALTHY":return"success";case"DEGRADED":case"PAUSED":case"QUEUED":case"PENDING":case"INSTALLING":return"warning";case"OFFLINE":case"FAILED":case"ERROR":case"TIMEOUT":case"CANCELLED":case"DECOMMISSIONED":case"CRITICAL":return"danger";case"PROVISIONING":case"UPDATING":return"info";default:return"default"}}])},3062,e=>{var t=e.i(43476),a=e.i(78571),r=e.i(35084);let s={primary:"[--panel-corner-color:color-mix(in_srgb,var(--color-primary)_60%,transparent)]",accent:"[--panel-corner-color:color-mix(in_srgb,var(--color-accent)_70%,transparent)]",success:"[--panel-corner-color:color-mix(in_srgb,var(--color-success)_60%,transparent)]",warning:"[--panel-corner-color:color-mix(in_srgb,var(--color-warning)_70%,transparent)]",danger:"[--panel-corner-color:color-mix(in_srgb,var(--color-danger)_70%,transparent)]",info:"[--panel-corner-color:color-mix(in_srgb,var(--color-info)_60%,transparent)]",muted:"[--panel-corner-color:var(--color-border-strong)]"},n={primary:"[--glow-hover-color:var(--color-glow)]",accent:"[--glow-hover-color:var(--color-glow-accent)]",success:"[--glow-hover-color:var(--color-glow-success)]",warning:"[--glow-hover-color:var(--color-glow-warning)]",danger:"[--glow-hover-color:var(--color-glow-danger)]",info:"[--glow-hover-color:var(--color-glow)]",muted:"[--glow-hover-color:var(--color-glow)]"},l={primary:"hover:border-primary/30",accent:"hover:border-accent/40",success:"hover:border-success/30",warning:"hover:border-warning/40",danger:"hover:border-danger/40",info:"hover:border-info/30",muted:"hover:border-border-strong"},i={none:"",sm:"p-3",md:"p-5",lg:"p-6"};e.s(["f",0,function({tone:e="primary",corners:c=!0,interactive:o=!0,hero:d=!1,title:x,description:h,icon:u,action:m,as:p="div",padding:g="md",testId:f,className:b,children:w,...y}){return(0,t.jsxs)(p,{...y,"data-testid":f??y["data-testid"],className:(0,a.f)("relative rounded-panel border border-border bg-surface transition-colors duration-300",i[g],c&&"panel-corners",c&&s[e],o&&"glow-hover",o&&n[e],o&&l[e],d&&"grid-bg overflow-hidden bg-surface/80",b),children:[(x||m||u)&&(0,t.jsxs)("div",{className:"mb-4 flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-start gap-2",children:[u&&(0,t.jsx)("span",{className:(0,a.f)("mt-0.5 shrink-0",r.T[e]),children:u}),(0,t.jsxs)("div",{className:"min-w-0",children:[x&&(0,t.jsx)("h3",{className:"text-xs font-bold uppercase tracking-wider",children:x}),h&&(0,t.jsx)("p",{className:"mt-0.5 text-[11px] text-text-muted",children:h})]})]}),m]}),w]})}])},73404,e=>{var t=e.i(43476),a=e.i(78571),r=e.i(35084);e.s(["f",0,function({title:e,eyebrow:s,description:n,icon:l,actions:i,status:c,tone:o="primary",className:d,testId:x}){return(0,t.jsxs)("div",{"data-testid":x,className:(0,a.f)("flex flex-wrap items-end justify-between gap-4",d),children:[(0,t.jsxs)("div",{className:"flex min-w-0 items-start gap-3",children:[l&&(0,t.jsx)("span",{"aria-hidden":"true",className:(0,a.f)("mt-0.5 flex h-10 w-10 shrink-0 items-center justify-center rounded-panel border bg-surface","accent"===o?"border-accent/40 shadow-[0_0_14px_var(--color-glow-accent)]":"border-primary/40 shadow-[0_0_14px_var(--color-glow)]",r.T[o]),children:l}),(0,t.jsxs)("div",{className:"min-w-0",children:[s&&(0,t.jsxs)("p",{className:(0,a.f)("mb-1 text-[10px] font-medium uppercase tracking-[0.3em]",r.T[o],"opacity-80"),children:[(0,t.jsx)("span",{"aria-hidden":"true",children:"// "}),s]}),(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,t.jsx)("h1",{className:(0,a.f)("text-xl font-bold uppercase tracking-wider",r.T[o],r.z[o]),children:e}),c]}),n&&(0,t.jsx)("p",{className:"mt-1 max-w-3xl text-xs text-text-muted",children:n})]})]}),i&&(0,t.jsx)("div",{className:"flex flex-wrap items-center gap-2",children:i})]})}])},75723,e=>{var t=e.i(43476),a=e.i(78571),r=e.i(46670);let s={success:"bg-success shadow-[0_0_6px_var(--color-success)]",warning:"bg-warning shadow-[0_0_6px_var(--color-warning)]",danger:"bg-danger shadow-[0_0_6px_var(--color-danger)]",info:"bg-info shadow-[0_0_6px_var(--color-info)]",default:"bg-text-muted"},n={success:"bg-success",warning:"bg-warning",danger:"bg-danger",info:"bg-info",default:"bg-text-muted"},l=new Set(["ONLINE","RUNNING","ACTIVE","HEALTHY","CRITICAL","UPDATING","PROVISIONING"]);e.s(["f",0,function({status:e,pulse:i,size:c="sm",className:o,label:d}){let x=(0,r.k)(e),h=i??l.has(e.toUpperCase()),u="xs"===c?"h-1.5 w-1.5":"h-2 w-2";return(0,t.jsxs)("span",{className:(0,a.f)("relative inline-flex shrink-0",u,o),role:d?"img":void 0,"aria-label":d,"aria-hidden":!d||void 0,children:[h&&(0,t.jsx)("span",{className:(0,a.f)("absolute inset-0 rounded-full animate-halo",n[x])}),(0,t.jsx)("span",{className:(0,a.f)("relative inline-flex rounded-full",u,s[x])})]})}])}])})();
|