9router 0.2.92 → 0.2.94
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/app/.next/BUILD_ID +1 -1
- package/app/.next/app-path-routes-manifest.json +35 -35
- package/app/.next/build-manifest.json +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js +3 -3
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/combos/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/profile/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/translator/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/usage/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_global-error.html +2 -2
- package/app/.next/server/app/_global-error.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/_not-found/page.js +2 -2
- package/app/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_not-found.html +1 -1
- package/app/.next/server/app/_not-found.rsc +2 -2
- package/app/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/app/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/app/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/app/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/route.js +2 -5
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/claude-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/codex-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/droid-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/openclaw-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/auth/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/credentials/update/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/model/resolve/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/models/alias/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/combos/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/combos/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/init/route.js +1 -1
- package/app/.next/server/app/api/init/route.js.nft.json +1 -1
- package/app/.next/server/app/api/init/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/keys/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/keys/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/alias/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/[provider]/[action]/route.js +1 -1
- package/app/.next/server/app/api/oauth/[provider]/[action]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/cursor/auto-import/route.js +7 -1
- package/app/.next/server/app/api/oauth/cursor/auto-import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/cursor/import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/auto-import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/social-authorize/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/social-exchange/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/pricing/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-nodes/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-nodes/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-nodes/validate/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/[id]/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/[id]/test/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/client/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/test-batch/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/validate/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/require-login/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/tags/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/load/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/save/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/send/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/translate/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/tunnel/disable/route.js +1 -1
- package/app/.next/server/app/api/tunnel/disable/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/tunnel/enable/route.js +1 -1
- package/app/.next/server/app/api/tunnel/enable/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/tunnel/status/route.js +1 -1
- package/app/.next/server/app/api/tunnel/status/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/[connectionId]/route.js +1 -1
- package/app/.next/server/app/api/usage/[connectionId]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/chart/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/history/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/providers/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/request-details/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/request-logs/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/stream/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/api/chat/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/chat/completions/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/embeddings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/messages/count_tokens/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/messages/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/responses/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1beta/models/[...path]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1beta/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/callback/page.js +2 -2
- package/app/.next/server/app/callback/page.js.nft.json +1 -1
- package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/callback.html +1 -1
- package/app/.next/server/app/callback.rsc +2 -2
- package/app/.next/server/app/callback.segments/_full.segment.rsc +2 -2
- package/app/.next/server/app/callback.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/callback.segments/_index.segment.rsc +2 -2
- package/app/.next/server/app/callback.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/callback.segments/callback.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next/server/app/dashboard/cli-tools.rsc +4 -4
- package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/cli-tools.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/cli-tools.segments/_index.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/combos.html +1 -1
- package/app/.next/server/app/dashboard/combos.rsc +4 -4
- package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/combos.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/combos.segments/_index.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/endpoint.html +1 -1
- package/app/.next/server/app/dashboard/endpoint.rsc +4 -4
- package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/endpoint.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/endpoint.segments/_index.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/profile.html +1 -1
- package/app/.next/server/app/dashboard/profile.rsc +4 -4
- package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/profile.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/profile.segments/_index.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers/new.html +1 -1
- package/app/.next/server/app/dashboard/providers/new.rsc +4 -4
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers/new.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers/new.segments/_index.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers.html +1 -1
- package/app/.next/server/app/dashboard/providers.rsc +4 -4
- package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/providers.segments/_index.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing/page.js +1 -1
- package/app/.next/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
- package/app/.next/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.rsc +3 -3
- package/app/.next/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +3 -3
- package/app/.next/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/translator.html +1 -1
- package/app/.next/server/app/dashboard/translator.rsc +4 -4
- package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/translator.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/translator.segments/_index.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/usage.html +1 -1
- package/app/.next/server/app/dashboard/usage.rsc +4 -4
- package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/usage.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard/usage.segments/_index.segment.rsc +2 -2
- package/app/.next/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/dashboard.html +1 -1
- package/app/.next/server/app/dashboard.rsc +4 -4
- package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next/server/app/dashboard.segments/_full.segment.rsc +4 -4
- package/app/.next/server/app/dashboard.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/dashboard.segments/_index.segment.rsc +2 -2
- package/app/.next/server/app/dashboard.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/index.html +1 -1
- package/app/.next/server/app/index.rsc +2 -2
- package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/index.segments/_full.segment.rsc +2 -2
- package/app/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/index.segments/_index.segment.rsc +2 -2
- package/app/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/landing/page.js +2 -2
- package/app/.next/server/app/landing/page.js.nft.json +1 -1
- package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/landing.html +1 -1
- package/app/.next/server/app/landing.rsc +2 -2
- package/app/.next/server/app/landing.segments/_full.segment.rsc +2 -2
- package/app/.next/server/app/landing.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/landing.segments/_index.segment.rsc +2 -2
- package/app/.next/server/app/landing.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/landing.segments/landing.segment.rsc +1 -1
- package/app/.next/server/app/login/page.js +2 -2
- package/app/.next/server/app/login/page.js.nft.json +1 -1
- package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/login.html +1 -1
- package/app/.next/server/app/login.rsc +3 -3
- package/app/.next/server/app/login.segments/_full.segment.rsc +3 -3
- package/app/.next/server/app/login.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/login.segments/_index.segment.rsc +2 -2
- package/app/.next/server/app/login.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/app/.next/server/app/login.segments/login.segment.rsc +1 -1
- package/app/.next/server/app/page.js +2 -2
- package/app/.next/server/app/page.js.nft.json +1 -1
- package/app/.next/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app-paths-manifest.json +35 -35
- package/app/.next/server/chunks/2044.js +2 -0
- package/app/.next/server/chunks/2243.js +1 -1
- package/app/.next/server/chunks/3110.js +6 -2
- package/app/.next/server/chunks/6186.js +4 -0
- package/app/.next/server/chunks/7189.js +5 -5
- package/app/.next/server/chunks/7341.js +1 -1
- package/app/.next/server/chunks/8694.js +1 -0
- package/app/.next/server/chunks/9201.js +1 -0
- package/app/.next/server/chunks/9489.js +2 -2
- package/app/.next/server/pages/404.html +1 -1
- package/app/.next/server/pages/500.html +2 -2
- package/app/.next/server/server-reference-manifest.js +1 -1
- package/app/.next/server/server-reference-manifest.json +1 -1
- package/app/.next/static/chunks/8729-a400665e59674a47.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-64adecc2f3ed9dd3.js → page-64d91a290c68fb09.js} +1 -1
- package/app/.next/static/chunks/app/dashboard/settings/pricing/page-d8e891687abeea66.js +1 -0
- package/app/package.json +1 -1
- package/app/src/mitm/manager.js +321 -99
- package/app/src/mitm/server.js +14 -10
- package/package.json +1 -1
- package/app/.next/server/chunks/8954.js +0 -1
- package/app/.next/static/chunks/8729-f0c4f2fa30fbd381.js +0 -1
- package/app/.next/static/chunks/app/dashboard/settings/pricing/page-2fbbb9dee6ce7c09.js +0 -1
- /package/app/.next/static/{jZwrCvsLGufeXsRxxj1hX → BrLPf6yJlpsLD6WkIP0hO}/_buildManifest.js +0 -0
- /package/app/.next/static/{jZwrCvsLGufeXsRxxj1hX → BrLPf6yJlpsLD6WkIP0hO}/_ssgManifest.js +0 -0
package/app/.next/BUILD_ID
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
BrLPf6yJlpsLD6WkIP0hO
|
|
@@ -1,86 +1,86 @@
|
|
|
1
1
|
{
|
|
2
|
-
"/_global-error/page": "/_global-error",
|
|
3
2
|
"/_not-found/page": "/_not-found",
|
|
3
|
+
"/_global-error/page": "/_global-error",
|
|
4
4
|
"/api/auth/logout/route": "/api/auth/logout",
|
|
5
|
-
"/api/cli-tools/
|
|
5
|
+
"/api/cli-tools/antigravity-mitm/alias/route": "/api/cli-tools/antigravity-mitm/alias",
|
|
6
6
|
"/api/auth/login/route": "/api/auth/login",
|
|
7
|
+
"/api/cli-tools/codex-settings/route": "/api/cli-tools/codex-settings",
|
|
8
|
+
"/api/cli-tools/openclaw-settings/route": "/api/cli-tools/openclaw-settings",
|
|
7
9
|
"/api/cli-tools/claude-settings/route": "/api/cli-tools/claude-settings",
|
|
8
10
|
"/api/cli-tools/droid-settings/route": "/api/cli-tools/droid-settings",
|
|
9
|
-
"/api/cloud/auth/route": "/api/cloud/auth",
|
|
10
11
|
"/api/cloud/model/resolve/route": "/api/cloud/model/resolve",
|
|
12
|
+
"/api/cloud/auth/route": "/api/cloud/auth",
|
|
11
13
|
"/api/cloud/credentials/update/route": "/api/cloud/credentials/update",
|
|
12
14
|
"/api/cloud/models/alias/route": "/api/cloud/models/alias",
|
|
13
|
-
"/api/cli-tools/antigravity-mitm/alias/route": "/api/cli-tools/antigravity-mitm/alias",
|
|
14
|
-
"/api/cli-tools/openclaw-settings/route": "/api/cli-tools/openclaw-settings",
|
|
15
15
|
"/api/combos/[id]/route": "/api/combos/[id]",
|
|
16
|
+
"/api/init/route": "/api/init",
|
|
16
17
|
"/api/combos/route": "/api/combos",
|
|
17
18
|
"/api/keys/[id]/route": "/api/keys/[id]",
|
|
18
|
-
"/api/keys/route": "/api/keys",
|
|
19
19
|
"/api/models/alias/route": "/api/models/alias",
|
|
20
|
+
"/api/keys/route": "/api/keys",
|
|
20
21
|
"/api/models/route": "/api/models",
|
|
21
|
-
"/api/oauth/kiro/import/route": "/api/oauth/kiro/import",
|
|
22
|
-
"/api/oauth/[provider]/[action]/route": "/api/oauth/[provider]/[action]",
|
|
23
22
|
"/api/oauth/cursor/auto-import/route": "/api/oauth/cursor/auto-import",
|
|
23
|
+
"/api/oauth/cursor/import/route": "/api/oauth/cursor/import",
|
|
24
|
+
"/api/oauth/[provider]/[action]/route": "/api/oauth/[provider]/[action]",
|
|
24
25
|
"/api/oauth/kiro/auto-import/route": "/api/oauth/kiro/auto-import",
|
|
25
26
|
"/api/oauth/kiro/social-authorize/route": "/api/oauth/kiro/social-authorize",
|
|
26
27
|
"/api/oauth/kiro/social-exchange/route": "/api/oauth/kiro/social-exchange",
|
|
27
|
-
"/api/provider-nodes/[id]/route": "/api/provider-nodes/[id]",
|
|
28
28
|
"/api/pricing/route": "/api/pricing",
|
|
29
|
-
"/api/provider-nodes/validate/route": "/api/provider-nodes/validate",
|
|
30
|
-
"/api/init/route": "/api/init",
|
|
31
29
|
"/api/providers/[id]/models/route": "/api/providers/[id]/models",
|
|
32
|
-
"/api/
|
|
30
|
+
"/api/provider-nodes/validate/route": "/api/provider-nodes/validate",
|
|
33
31
|
"/api/providers/[id]/test/route": "/api/providers/[id]/test",
|
|
34
|
-
"/api/providers/route": "/api/providers",
|
|
35
|
-
"/api/
|
|
32
|
+
"/api/providers/client/route": "/api/providers/client",
|
|
33
|
+
"/api/providers/test-batch/route": "/api/providers/test-batch",
|
|
36
34
|
"/api/providers/validate/route": "/api/providers/validate",
|
|
37
|
-
"/api/translator/save/route": "/api/translator/save",
|
|
38
|
-
"/api/oauth/cursor/import/route": "/api/oauth/cursor/import",
|
|
39
|
-
"/api/shutdown/route": "/api/shutdown",
|
|
40
35
|
"/api/settings/require-login/route": "/api/settings/require-login",
|
|
36
|
+
"/api/provider-nodes/[id]/route": "/api/provider-nodes/[id]",
|
|
41
37
|
"/api/tags/route": "/api/tags",
|
|
38
|
+
"/api/shutdown/route": "/api/shutdown",
|
|
39
|
+
"/api/translator/save/route": "/api/translator/save",
|
|
40
|
+
"/api/translator/load/route": "/api/translator/load",
|
|
42
41
|
"/api/translator/send/route": "/api/translator/send",
|
|
43
|
-
"/api/tunnel/enable/route": "/api/tunnel/enable",
|
|
44
|
-
"/api/translator/translate/route": "/api/translator/translate",
|
|
45
|
-
"/api/settings/route": "/api/settings",
|
|
46
42
|
"/api/tunnel/disable/route": "/api/tunnel/disable",
|
|
43
|
+
"/api/oauth/kiro/import/route": "/api/oauth/kiro/import",
|
|
47
44
|
"/api/tunnel/status/route": "/api/tunnel/status",
|
|
48
|
-
"/api/
|
|
45
|
+
"/api/providers/route": "/api/providers",
|
|
46
|
+
"/api/translator/translate/route": "/api/translator/translate",
|
|
47
|
+
"/api/settings/route": "/api/settings",
|
|
48
|
+
"/api/usage/history/route": "/api/usage/history",
|
|
49
49
|
"/api/usage/[connectionId]/route": "/api/usage/[connectionId]",
|
|
50
50
|
"/api/usage/logs/route": "/api/usage/logs",
|
|
51
|
-
"/api/usage/history/route": "/api/usage/history",
|
|
52
|
-
"/api/usage/providers/route": "/api/usage/providers",
|
|
53
51
|
"/api/usage/request-logs/route": "/api/usage/request-logs",
|
|
54
|
-
"/api/usage/
|
|
52
|
+
"/api/usage/chart/route": "/api/usage/chart",
|
|
55
53
|
"/api/v1/api/chat/route": "/api/v1/api/chat",
|
|
54
|
+
"/api/usage/request-details/route": "/api/usage/request-details",
|
|
55
|
+
"/api/providers/[id]/route": "/api/providers/[id]",
|
|
56
56
|
"/api/v1/chat/completions/route": "/api/v1/chat/completions",
|
|
57
57
|
"/api/v1/messages/count_tokens/route": "/api/v1/messages/count_tokens",
|
|
58
58
|
"/api/v1/responses/route": "/api/v1/responses",
|
|
59
|
+
"/api/v1/models/route": "/api/v1/models",
|
|
60
|
+
"/api/usage/providers/route": "/api/usage/providers",
|
|
59
61
|
"/api/v1/route": "/api/v1",
|
|
60
62
|
"/api/v1/messages/route": "/api/v1/messages",
|
|
63
|
+
"/api/v1beta/models/route": "/api/v1beta/models",
|
|
61
64
|
"/api/v1beta/models/[...path]/route": "/api/v1beta/models/[...path]",
|
|
62
|
-
"/api/providers/test-batch/route": "/api/providers/test-batch",
|
|
63
|
-
"/favicon.ico/route": "/favicon.ico",
|
|
64
|
-
"/api/providers/client/route": "/api/providers/client",
|
|
65
|
-
"/api/v1/models/route": "/api/v1/models",
|
|
66
65
|
"/api/v1/embeddings/route": "/api/v1/embeddings",
|
|
67
|
-
"/api/v1beta/models/route": "/api/v1beta/models",
|
|
68
66
|
"/api/cli-tools/antigravity-mitm/route": "/api/cli-tools/antigravity-mitm",
|
|
67
|
+
"/favicon.ico/route": "/favicon.ico",
|
|
68
|
+
"/api/tunnel/enable/route": "/api/tunnel/enable",
|
|
69
69
|
"/api/provider-nodes/route": "/api/provider-nodes",
|
|
70
70
|
"/api/usage/stream/route": "/api/usage/stream",
|
|
71
|
-
"/callback/page": "/callback",
|
|
72
|
-
"/landing/page": "/landing",
|
|
73
71
|
"/dashboard/settings/pricing/page": "/dashboard/settings/pricing",
|
|
72
|
+
"/landing/page": "/landing",
|
|
74
73
|
"/page": "/",
|
|
74
|
+
"/callback/page": "/callback",
|
|
75
75
|
"/login/page": "/login",
|
|
76
|
+
"/(dashboard)/dashboard/combos/page": "/dashboard/combos",
|
|
76
77
|
"/(dashboard)/dashboard/cli-tools/page": "/dashboard/cli-tools",
|
|
77
|
-
"/(dashboard)/dashboard/page": "/dashboard",
|
|
78
78
|
"/(dashboard)/dashboard/endpoint/page": "/dashboard/endpoint",
|
|
79
|
-
"/(dashboard)/dashboard/
|
|
79
|
+
"/(dashboard)/dashboard/profile/page": "/dashboard/profile",
|
|
80
|
+
"/(dashboard)/dashboard/page": "/dashboard",
|
|
81
|
+
"/(dashboard)/dashboard/providers/[id]/page": "/dashboard/providers/[id]",
|
|
80
82
|
"/(dashboard)/dashboard/providers/new/page": "/dashboard/providers/new",
|
|
81
83
|
"/(dashboard)/dashboard/translator/page": "/dashboard/translator",
|
|
82
84
|
"/(dashboard)/dashboard/usage/page": "/dashboard/usage",
|
|
83
|
-
"/(dashboard)/dashboard/providers/[id]/page": "/dashboard/providers/[id]",
|
|
84
|
-
"/(dashboard)/dashboard/profile/page": "/dashboard/profile",
|
|
85
85
|
"/(dashboard)/dashboard/providers/page": "/dashboard/providers"
|
|
86
86
|
}
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
],
|
|
5
5
|
"devFiles": [],
|
|
6
6
|
"lowPriorityFiles": [
|
|
7
|
-
"static/
|
|
8
|
-
"static/
|
|
7
|
+
"static/BrLPf6yJlpsLD6WkIP0hO/_buildManifest.js",
|
|
8
|
+
"static/BrLPf6yJlpsLD6WkIP0hO/_ssgManifest.js"
|
|
9
9
|
],
|
|
10
10
|
"rootMainFiles": [
|
|
11
11
|
"static/chunks/webpack-25c43999146c934e.js",
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
(()=>{var a={};a.id=2326,a.ids=[2326],a.modules={244:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>g});var d=c(5735),e=c(87250),f=c(79518);async function g(){let a=await (0,e.D1)();return(0,d.jsx)(f.default,{machineId:a})}},261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},15608:(a,b,c)=>{Promise.resolve().then(c.bind(c,79518))},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{"use strict";a.exports=require("os")},25336:(a,b,c)=>{Promise.resolve().then(c.bind(c,89890))},26713:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/is-bot")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},43954:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/interception-routes")},48161:a=>{"use strict";a.exports=require("node:os")},51455:a=>{"use strict";a.exports=require("node:fs/promises")},54603:(a,b,c)=>{"use strict";c.d(b,{Xj:()=>e});var d=c(19713);async function e(a=null){let b=a||process.env.MACHINE_ID_SALT||"endpoint-proxy-salt";try{let a=(0,d.machineIdSync)();return(await Promise.resolve().then(c.t.bind(c,55511,23))).createHash("sha256").update(a+b).digest("hex").substring(0,16)}catch(a){return console.log("Error getting machine ID:",a),crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){let b=16*Math.random()|0;return("x"==a?b:3&b|8).toString(16)})}}},55268:(a,b,c)=>{"use strict";c.r(b),c.d(b,{GlobalError:()=>D.a,__next_app__:()=>L,handler:()=>N,routeModule:()=>M});var d=c(7553),e=c(84006),f=c(67798),g=c(34775),h=c(99373),i=c(73461),j=c(1020),k=c(26349),l=c(54365),m=c(16023),n=c(63747),o=c(24235),p=c(23938),q=c(261),r=c(66758),s=c(77243),t=c(26713),u=c(37527),v=c(22820),w=c(88216),x=c(47929),y=c(79551),z=c(89125),A=c(86439),B=c(77068),C=c(95547),D=c.n(C),E=c(61287),F=c(81494),G=c(70722),H=c(70753),I=c(43954),J={};for(let a in E)0>["default","GlobalError","__next_app__","routeModule","handler"].indexOf(a)&&(J[a]=()=>E[a]);c.d(b,J);let K={children:["",{children:["(dashboard)",{children:["dashboard",{children:["cli-tools",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(c.bind(c,244)),"/Users/Working/router4/app/src/app/(dashboard)/dashboard/cli-tools/page.js"]}]},{}]},{}]},{layout:[()=>Promise.resolve().then(c.bind(c,30508)),"/Users/Working/router4/app/src/app/(dashboard)/layout.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,55091,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,45270,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,28193,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,70440))).default(a)],apple:[],openGraph:[],twitter:[],manifest:void 0}}]},{layout:[()=>Promise.resolve().then(c.bind(c,50385)),"/Users/Working/router4/app/src/app/layout.js"],"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,55091,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,45270,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,28193,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,70440))).default(a)],apple:[],openGraph:[],twitter:[],manifest:void 0}}]}.children,L={require:c,loadChunk:()=>Promise.resolve()},M=new d.AppPageRouteModule({definition:{kind:e.RouteKind.APP_PAGE,page:"/(dashboard)/dashboard/cli-tools/page",pathname:"/dashboard/cli-tools",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:K},distDir:".next",relativeProjectDir:""});async function N(a,b,d){var C;M.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let J=!!(0,h.getRequestMeta)(a,"minimalMode"),O="/(dashboard)/dashboard/cli-tools/page";"/index"===O&&(O="/");let P=await M.prepare(a,b,{srcPage:O,multiZoneDraftMode:!1});if(!P)return b.statusCode=400,b.end("Bad Request"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let{buildId:Q,query:R,params:S,pageIsDynamic:T,buildManifest:U,nextFontManifest:V,reactLoadableManifest:W,serverActionsManifest:X,clientReferenceManifest:Y,subresourceIntegrityManifest:Z,prerenderManifest:$,isDraftMode:_,resolvedPathname:aa,revalidateOnlyGenerated:ab,routerServerContext:ac,nextConfig:ad,parsedUrl:ae,interceptionRoutePatterns:af,deploymentId:ag}=P,ah=(0,q.normalizeAppPath)(O),{isOnDemandRevalidate:ai}=P,aj=ad.experimental.ppr&&!ad.cacheComponents&&(0,I.isInterceptionRouteAppPath)(aa)?null:M.match(aa,$),ak=!!$.routes[aa],al=a.headers["user-agent"]||"",am=(0,t.getBotType)(al),an=(0,p.isHtmlBotRequest)(a),ao=(0,h.getRequestMeta)(a,"isPrefetchRSCRequest")??"1"===a.headers[s.NEXT_ROUTER_PREFETCH_HEADER],ap=(0,h.getRequestMeta)(a,"isRSCRequest")??!!a.headers[s.RSC_HEADER],aq=(0,r.getIsPossibleServerAction)(a),ar=(0,m.checkIsAppPPREnabled)(ad.experimental.ppr);if(!(0,h.getRequestMeta)(a,"postponed")&&ar&&"1"===a.headers[x.NEXT_RESUME_HEADER]&&"POST"===a.method){let b=[];for await(let c of a)b.push(c);let c=Buffer.concat(b).toString("utf8");(0,h.addRequestMeta)(a,"postponed",c)}let as=ar&&(null==(C=$.routes[ah]??$.dynamicRoutes[ah])?void 0:C.renderingMode)==="PARTIALLY_STATIC",at=!1,au=!1,av=as?(0,h.getRequestMeta)(a,"postponed"):void 0,aw=as&&ap&&!ao;J&&(aw=aw&&!!av);let ax=(0,h.getRequestMeta)(a,"segmentPrefetchRSCRequest"),ay=(!an||!as)&&(!al||(0,p.shouldServeStreamingMetadata)(al,ad.htmlLimitedBots)),az=!!((aj||ak||$.routes[ah])&&!(an&&as)),aA=as&&!0===ad.cacheComponents,aB=!0===M.isDev||!az||"string"==typeof av||(aA&&(0,h.getRequestMeta)(a,"onCacheEntryV2")?aw&&!J:aw),aC=an&&as,aD=null;_||!az||aB||aq||av||aw||(aD=aa);let aE=aD;!aE&&M.isDev&&(aE=aa),M.isDev||_||!az||!ap||aw||(0,k.d)(a.headers);let aF={...E,tree:K,GlobalError:D(),handler:N,routeModule:M,__next_app__:L};X&&Y&&(0,o.setManifestsSingleton)({page:O,clientReferenceManifest:Y,serverActionsManifest:X});let aG=a.method||"GET",aH=(0,g.getTracer)(),aI=aH.getActiveScopeSpan(),aJ=async()=>((null==ac?void 0:ac.render404)?await ac.render404(a,b,ae,!1):b.end("This page could not be found"),null);try{let f=M.getVaryHeader(aa,af);b.setHeader("Vary",f);let k=async(c,d)=>{let e=new l.NodeNextRequest(a),f=new l.NodeNextResponse(b);return M.render(e,f,d).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let a=aH.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==i.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let d=a.get("next.route");if(d){let a=`${aG} ${d}`;c.setAttributes({"next.route":d,"http.route":d,"next.span_name":a}),c.updateName(a)}else c.updateName(`${aG} ${O}`)})},m=(0,h.getRequestMeta)(a,"incrementalCache"),o=async({span:e,postponed:f,fallbackRouteParams:g,forceStaticRender:i})=>{let l={query:R,params:S,page:ah,sharedContext:{buildId:Q},serverComponentsHmrCache:(0,h.getRequestMeta)(a,"serverComponentsHmrCache"),fallbackRouteParams:g,renderOpts:{App:()=>null,Document:()=>null,pageConfig:{},ComponentMod:aF,Component:(0,j.T)(aF),params:S,routeModule:M,page:O,postponed:f,shouldWaitOnAllReady:aC,serveStreamingMetadata:ay,supportsDynamicResponse:"string"==typeof f||aB,buildManifest:U,nextFontManifest:V,reactLoadableManifest:W,subresourceIntegrityManifest:Z,setCacheStatus:null==ac?void 0:ac.setCacheStatus,setIsrStatus:null==ac?void 0:ac.setIsrStatus,setReactDebugChannel:null==ac?void 0:ac.setReactDebugChannel,sendErrorsToBrowser:null==ac?void 0:ac.sendErrorsToBrowser,dir:c(33873).join(process.cwd(),M.relativeProjectDir),isDraftMode:_,botType:am,isOnDemandRevalidate:ai,isPossibleServerAction:aq,assetPrefix:ad.assetPrefix,nextConfigOutput:ad.output,crossOrigin:ad.crossOrigin,trailingSlash:ad.trailingSlash,images:ad.images,previewProps:$.preview,deploymentId:ag,enableTainting:ad.experimental.taint,htmlLimitedBots:ad.htmlLimitedBots,reactMaxHeadersLength:ad.reactMaxHeadersLength,multiZoneDraftMode:!1,incrementalCache:m,cacheLifeProfiles:ad.cacheLife,basePath:ad.basePath,serverActions:ad.experimental.serverActions,...at||au?{nextExport:!0,supportsDynamicResponse:!1,isStaticGeneration:!0,isDebugDynamicAccesses:at}:{},cacheComponents:!!ad.cacheComponents,experimental:{isRoutePPREnabled:as,expireTime:ad.expireTime,staleTimes:ad.experimental.staleTimes,dynamicOnHover:!!ad.experimental.dynamicOnHover,inlineCss:!!ad.experimental.inlineCss,authInterrupts:!!ad.experimental.authInterrupts,clientTraceMetadata:ad.experimental.clientTraceMetadata||[],clientParamParsingOrigins:ad.experimental.clientParamParsingOrigins,maxPostponedStateSizeBytes:(0,B.parseMaxPostponedStateSize)(ad.experimental.maxPostponedStateSize)},waitUntil:d.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:()=>{},onInstrumentationRequestError:(b,c,d,e)=>M.onRequestError(a,b,d,e,ac),err:(0,h.getRequestMeta)(a,"invokeError"),dev:M.isDev}};at&&(l.renderOpts.nextExport=!0,l.renderOpts.supportsDynamicResponse=!1,l.renderOpts.isDebugDynamicAccesses=at),i&&(l.renderOpts.supportsDynamicResponse=!1);let n=await k(e,l),{metadata:o}=n,{cacheControl:p,headers:q={},fetchTags:r,fetchMetrics:s}=o;if(r&&(q[x.NEXT_CACHE_TAGS_HEADER]=r),a.fetchMetrics=s,az&&(null==p?void 0:p.revalidate)===0&&!M.isDev&&!as){let a=o.staticBailoutInfo,b=Object.defineProperty(Error(`Page changed from static to dynamic at runtime ${aa}${(null==a?void 0:a.description)?`, reason: ${a.description}`:""}
|
|
1
|
+
(()=>{var a={};a.id=2326,a.ids=[2326],a.modules={244:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>g});var d=c(5735),e=c(87250),f=c(79518);async function g(){let a=await (0,e.D1)();return(0,d.jsx)(f.default,{machineId:a})}},261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},1932:a=>{"use strict";a.exports=require("url")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},15608:(a,b,c)=>{Promise.resolve().then(c.bind(c,79518))},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{"use strict";a.exports=require("os")},25336:(a,b,c)=>{Promise.resolve().then(c.bind(c,89890))},26713:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/is-bot")},28354:a=>{"use strict";a.exports=require("util")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},41025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},43954:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/interception-routes")},48161:a=>{"use strict";a.exports=require("node:os")},51455:a=>{"use strict";a.exports=require("node:fs/promises")},54603:(a,b,c)=>{"use strict";c.d(b,{Xj:()=>e});var d=c(19713);async function e(a=null){let b=a||process.env.MACHINE_ID_SALT||"endpoint-proxy-salt";try{let a=(0,d.machineIdSync)();return(await Promise.resolve().then(c.t.bind(c,55511,23))).createHash("sha256").update(a+b).digest("hex").substring(0,16)}catch(a){return console.log("Error getting machine ID:",a),crypto.randomUUID?crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){let b=16*Math.random()|0;return("x"==a?b:3&b|8).toString(16)})}}},55268:(a,b,c)=>{"use strict";c.r(b),c.d(b,{GlobalError:()=>D.a,__next_app__:()=>L,handler:()=>N,routeModule:()=>M});var d=c(7553),e=c(84006),f=c(67798),g=c(34775),h=c(99373),i=c(73461),j=c(1020),k=c(26349),l=c(54365),m=c(16023),n=c(63747),o=c(24235),p=c(23938),q=c(261),r=c(66758),s=c(77243),t=c(26713),u=c(37527),v=c(22820),w=c(88216),x=c(47929),y=c(79551),z=c(89125),A=c(86439),B=c(77068),C=c(95547),D=c.n(C),E=c(61287),F=c(81494),G=c(70722),H=c(70753),I=c(43954),J={};for(let a in E)0>["default","GlobalError","__next_app__","routeModule","handler"].indexOf(a)&&(J[a]=()=>E[a]);c.d(b,J);let K={children:["",{children:["(dashboard)",{children:["dashboard",{children:["cli-tools",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(c.bind(c,244)),"/Users/Working/router4/app/src/app/(dashboard)/dashboard/cli-tools/page.js"]}]},{}]},{}]},{layout:[()=>Promise.resolve().then(c.bind(c,30508)),"/Users/Working/router4/app/src/app/(dashboard)/layout.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,55091,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,45270,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,28193,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,70440))).default(a)],apple:[],openGraph:[],twitter:[],manifest:void 0}}]},{layout:[()=>Promise.resolve().then(c.bind(c,50385)),"/Users/Working/router4/app/src/app/layout.js"],"global-error":[()=>Promise.resolve().then(c.t.bind(c,95547,23)),"next/dist/client/components/builtin/global-error.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,55091,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,45270,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,28193,23)),"next/dist/client/components/builtin/unauthorized.js"],metadata:{icon:[async a=>(await Promise.resolve().then(c.bind(c,70440))).default(a)],apple:[],openGraph:[],twitter:[],manifest:void 0}}]}.children,L={require:c,loadChunk:()=>Promise.resolve()},M=new d.AppPageRouteModule({definition:{kind:e.RouteKind.APP_PAGE,page:"/(dashboard)/dashboard/cli-tools/page",pathname:"/dashboard/cli-tools",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:K},distDir:".next",relativeProjectDir:""});async function N(a,b,d){var C;M.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let J=!!(0,h.getRequestMeta)(a,"minimalMode"),O="/(dashboard)/dashboard/cli-tools/page";"/index"===O&&(O="/");let P=await M.prepare(a,b,{srcPage:O,multiZoneDraftMode:!1});if(!P)return b.statusCode=400,b.end("Bad Request"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let{buildId:Q,query:R,params:S,pageIsDynamic:T,buildManifest:U,nextFontManifest:V,reactLoadableManifest:W,serverActionsManifest:X,clientReferenceManifest:Y,subresourceIntegrityManifest:Z,prerenderManifest:$,isDraftMode:_,resolvedPathname:aa,revalidateOnlyGenerated:ab,routerServerContext:ac,nextConfig:ad,parsedUrl:ae,interceptionRoutePatterns:af,deploymentId:ag}=P,ah=(0,q.normalizeAppPath)(O),{isOnDemandRevalidate:ai}=P,aj=ad.experimental.ppr&&!ad.cacheComponents&&(0,I.isInterceptionRouteAppPath)(aa)?null:M.match(aa,$),ak=!!$.routes[aa],al=a.headers["user-agent"]||"",am=(0,t.getBotType)(al),an=(0,p.isHtmlBotRequest)(a),ao=(0,h.getRequestMeta)(a,"isPrefetchRSCRequest")??"1"===a.headers[s.NEXT_ROUTER_PREFETCH_HEADER],ap=(0,h.getRequestMeta)(a,"isRSCRequest")??!!a.headers[s.RSC_HEADER],aq=(0,r.getIsPossibleServerAction)(a),ar=(0,m.checkIsAppPPREnabled)(ad.experimental.ppr);if(!(0,h.getRequestMeta)(a,"postponed")&&ar&&"1"===a.headers[x.NEXT_RESUME_HEADER]&&"POST"===a.method){let b=[];for await(let c of a)b.push(c);let c=Buffer.concat(b).toString("utf8");(0,h.addRequestMeta)(a,"postponed",c)}let as=ar&&(null==(C=$.routes[ah]??$.dynamicRoutes[ah])?void 0:C.renderingMode)==="PARTIALLY_STATIC",at=!1,au=!1,av=as?(0,h.getRequestMeta)(a,"postponed"):void 0,aw=as&&ap&&!ao;J&&(aw=aw&&!!av);let ax=(0,h.getRequestMeta)(a,"segmentPrefetchRSCRequest"),ay=(!an||!as)&&(!al||(0,p.shouldServeStreamingMetadata)(al,ad.htmlLimitedBots)),az=!!((aj||ak||$.routes[ah])&&!(an&&as)),aA=as&&!0===ad.cacheComponents,aB=!0===M.isDev||!az||"string"==typeof av||(aA&&(0,h.getRequestMeta)(a,"onCacheEntryV2")?aw&&!J:aw),aC=an&&as,aD=null;_||!az||aB||aq||av||aw||(aD=aa);let aE=aD;!aE&&M.isDev&&(aE=aa),M.isDev||_||!az||!ap||aw||(0,k.d)(a.headers);let aF={...E,tree:K,GlobalError:D(),handler:N,routeModule:M,__next_app__:L};X&&Y&&(0,o.setManifestsSingleton)({page:O,clientReferenceManifest:Y,serverActionsManifest:X});let aG=a.method||"GET",aH=(0,g.getTracer)(),aI=aH.getActiveScopeSpan(),aJ=async()=>((null==ac?void 0:ac.render404)?await ac.render404(a,b,ae,!1):b.end("This page could not be found"),null);try{let f=M.getVaryHeader(aa,af);b.setHeader("Vary",f);let k=async(c,d)=>{let e=new l.NodeNextRequest(a),f=new l.NodeNextResponse(b);return M.render(e,f,d).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let a=aH.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==i.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let d=a.get("next.route");if(d){let a=`${aG} ${d}`;c.setAttributes({"next.route":d,"http.route":d,"next.span_name":a}),c.updateName(a)}else c.updateName(`${aG} ${O}`)})},m=(0,h.getRequestMeta)(a,"incrementalCache"),o=async({span:e,postponed:f,fallbackRouteParams:g,forceStaticRender:i})=>{let l={query:R,params:S,page:ah,sharedContext:{buildId:Q},serverComponentsHmrCache:(0,h.getRequestMeta)(a,"serverComponentsHmrCache"),fallbackRouteParams:g,renderOpts:{App:()=>null,Document:()=>null,pageConfig:{},ComponentMod:aF,Component:(0,j.T)(aF),params:S,routeModule:M,page:O,postponed:f,shouldWaitOnAllReady:aC,serveStreamingMetadata:ay,supportsDynamicResponse:"string"==typeof f||aB,buildManifest:U,nextFontManifest:V,reactLoadableManifest:W,subresourceIntegrityManifest:Z,setCacheStatus:null==ac?void 0:ac.setCacheStatus,setIsrStatus:null==ac?void 0:ac.setIsrStatus,setReactDebugChannel:null==ac?void 0:ac.setReactDebugChannel,sendErrorsToBrowser:null==ac?void 0:ac.sendErrorsToBrowser,dir:c(33873).join(process.cwd(),M.relativeProjectDir),isDraftMode:_,botType:am,isOnDemandRevalidate:ai,isPossibleServerAction:aq,assetPrefix:ad.assetPrefix,nextConfigOutput:ad.output,crossOrigin:ad.crossOrigin,trailingSlash:ad.trailingSlash,images:ad.images,previewProps:$.preview,deploymentId:ag,enableTainting:ad.experimental.taint,htmlLimitedBots:ad.htmlLimitedBots,reactMaxHeadersLength:ad.reactMaxHeadersLength,multiZoneDraftMode:!1,incrementalCache:m,cacheLifeProfiles:ad.cacheLife,basePath:ad.basePath,serverActions:ad.experimental.serverActions,...at||au?{nextExport:!0,supportsDynamicResponse:!1,isStaticGeneration:!0,isDebugDynamicAccesses:at}:{},cacheComponents:!!ad.cacheComponents,experimental:{isRoutePPREnabled:as,expireTime:ad.expireTime,staleTimes:ad.experimental.staleTimes,dynamicOnHover:!!ad.experimental.dynamicOnHover,inlineCss:!!ad.experimental.inlineCss,authInterrupts:!!ad.experimental.authInterrupts,clientTraceMetadata:ad.experimental.clientTraceMetadata||[],clientParamParsingOrigins:ad.experimental.clientParamParsingOrigins,maxPostponedStateSizeBytes:(0,B.parseMaxPostponedStateSize)(ad.experimental.maxPostponedStateSize)},waitUntil:d.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:()=>{},onInstrumentationRequestError:(b,c,d,e)=>M.onRequestError(a,b,d,e,ac),err:(0,h.getRequestMeta)(a,"invokeError"),dev:M.isDev}};at&&(l.renderOpts.nextExport=!0,l.renderOpts.supportsDynamicResponse=!1,l.renderOpts.isDebugDynamicAccesses=at),i&&(l.renderOpts.supportsDynamicResponse=!1);let n=await k(e,l),{metadata:o}=n,{cacheControl:p,headers:q={},fetchTags:r,fetchMetrics:s}=o;if(r&&(q[x.NEXT_CACHE_TAGS_HEADER]=r),a.fetchMetrics=s,az&&(null==p?void 0:p.revalidate)===0&&!M.isDev&&!as){let a=o.staticBailoutInfo,b=Object.defineProperty(Error(`Page changed from static to dynamic at runtime ${aa}${(null==a?void 0:a.description)?`, reason: ${a.description}`:""}
|
|
2
2
|
see more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`),"__NEXT_ERROR_CODE",{value:"E132",enumerable:!1,configurable:!0});if(null==a?void 0:a.stack){let c=a.stack;b.stack=b.message+c.substring(c.indexOf("\n"))}throw b}return{value:{kind:u.CachedRouteKind.APP_PAGE,html:n,headers:q,rscData:o.flightData,postponed:o.postponed,status:o.statusCode,segmentData:o.segmentData},cacheControl:p}},p=async({hasResolved:c,previousCacheEntry:f,isRevalidating:g,span:i,forceStaticRender:j=!1})=>{let k,l=!1===M.isDev,q=c||b.writableEnded;if(ai&&ab&&!f&&!J)return(null==ac?void 0:ac.render404)?await ac.render404(a,b):(b.statusCode=404,b.end("This page could not be found")),null;if(aj&&(k=(0,v.parseFallbackField)(aj.fallback)),k===v.FallbackMode.PRERENDER&&(0,t.isBot)(al)&&(!as||an)&&(k=v.FallbackMode.BLOCKING_STATIC_RENDER),(null==f?void 0:f.isStale)===-1&&(ai=!0),ai&&(k!==v.FallbackMode.NOT_FOUND||f)&&(k=v.FallbackMode.BLOCKING_STATIC_RENDER),!J&&k!==v.FallbackMode.BLOCKING_STATIC_RENDER&&aE&&!q&&!_&&T&&(l||!ak)){if((l||aj)&&k===v.FallbackMode.NOT_FOUND){if(ad.experimental.adapterPath)return await aJ();throw new A.NoFallbackError}if(as&&(ad.cacheComponents?!aw:!ap)){let b=l&&"string"==typeof(null==aj?void 0:aj.fallback)?aj.fallback:ah,c=l&&(null==aj?void 0:aj.fallbackRouteParams)?(0,n.createOpaqueFallbackRouteParams)(aj.fallbackRouteParams):au?(0,n.getFallbackRouteParams)(ah,M):null,f=await M.handleResponse({cacheKey:b,req:a,nextConfig:ad,routeKind:e.RouteKind.APP_PAGE,isFallback:!0,prerenderManifest:$,isRoutePPREnabled:as,responseGenerator:async()=>o({span:i,postponed:void 0,fallbackRouteParams:c,forceStaticRender:!1}),waitUntil:d.waitUntil,isMinimalMode:J});if(null===f)return null;if(f)return delete f.cacheControl,f}}let r=ai||g||!av?void 0:av;if(aA&&!J&&m&&aw&&!j){let b=await m.get(aa,{kind:u.IncrementalCacheKind.APP_PAGE,isRoutePPREnabled:!0,isFallback:!1});b&&b.value&&b.value.kind===u.CachedRouteKind.APP_PAGE&&(r=b.value.postponed,b&&(-1===b.isStale||!0===b.isStale)&&(0,H.scheduleOnNextTick)(async()=>{let b=M.getResponseCache(a);try{await b.revalidate(aa,m,as,!1,a=>p({...a,forceStaticRender:!0}),null,c,d.waitUntil)}catch(a){console.error("Error revalidating the page in the background",a)}}))}if(at&&void 0!==r)return{cacheControl:{revalidate:1,expire:void 0},value:{kind:u.CachedRouteKind.PAGES,html:w.default.EMPTY,pageData:{},headers:void 0,status:void 0}};let s=l&&(null==aj?void 0:aj.fallbackRouteParams)&&(0,h.getRequestMeta)(a,"renderFallbackShell")?(0,n.createOpaqueFallbackRouteParams)(aj.fallbackRouteParams):au?(0,n.getFallbackRouteParams)(ah,M):null;return o({span:i,postponed:r,fallbackRouteParams:s,forceStaticRender:j})},q=async c=>{var f,g,i,j,k;let l,m=await M.handleResponse({cacheKey:aD,responseGenerator:a=>p({span:c,...a}),routeKind:e.RouteKind.APP_PAGE,isOnDemandRevalidate:ai,isRoutePPREnabled:as,req:a,nextConfig:ad,prerenderManifest:$,waitUntil:d.waitUntil,isMinimalMode:J});if(_&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate"),M.isDev&&b.setHeader("Cache-Control","no-store, must-revalidate"),!m){if(aD)throw Object.defineProperty(Error("invariant: cache entry required but not generated"),"__NEXT_ERROR_CODE",{value:"E62",enumerable:!1,configurable:!0});return null}if((null==(f=m.value)?void 0:f.kind)!==u.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant app-page handler received invalid cache entry ${null==(i=m.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E707",enumerable:!1,configurable:!0});let n="string"==typeof m.value.postponed;az&&!aw&&(!n||ao)&&(J||b.setHeader("x-nextjs-cache",ai?"REVALIDATED":m.isMiss?"MISS":m.isStale?"STALE":"HIT"),b.setHeader(s.NEXT_IS_PRERENDER_HEADER,"1"));let{value:q}=m;if(av)l={revalidate:0,expire:void 0};else if(aw)l={revalidate:0,expire:void 0};else if(!M.isDev)if(_)l={revalidate:0,expire:void 0};else if(az){if(m.cacheControl)if("number"==typeof m.cacheControl.revalidate){if(m.cacheControl.revalidate<1)throw Object.defineProperty(Error(`Invalid revalidate configuration provided: ${m.cacheControl.revalidate} < 1`),"__NEXT_ERROR_CODE",{value:"E22",enumerable:!1,configurable:!0});l={revalidate:m.cacheControl.revalidate,expire:(null==(j=m.cacheControl)?void 0:j.expire)??ad.expireTime}}else l={revalidate:x.CACHE_ONE_YEAR,expire:void 0}}else b.getHeader("Cache-Control")||(l={revalidate:0,expire:void 0});if(m.cacheControl=l,"string"==typeof ax&&(null==q?void 0:q.kind)===u.CachedRouteKind.APP_PAGE&&q.segmentData){b.setHeader(s.NEXT_DID_POSTPONE_HEADER,"2");let c=null==(k=q.headers)?void 0:k[x.NEXT_CACHE_TAGS_HEADER];J&&az&&c&&"string"==typeof c&&b.setHeader(x.NEXT_CACHE_TAGS_HEADER,c);let d=q.segmentData.get(ax);return void 0!==d?(0,z.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:w.default.fromStatic(d,s.RSC_CONTENT_TYPE_HEADER),cacheControl:m.cacheControl}):(b.statusCode=204,(0,z.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:w.default.EMPTY,cacheControl:m.cacheControl}))}let r=aA?(0,h.getRequestMeta)(a,"onCacheEntryV2")??(0,h.getRequestMeta)(a,"onCacheEntry"):(0,h.getRequestMeta)(a,"onCacheEntry");if(r&&await r(m,{url:(0,h.getRequestMeta)(a,"initURL")??a.url}))return null;if(q.headers){let a={...q.headers};for(let[c,d]of(J&&az||delete a[x.NEXT_CACHE_TAGS_HEADER],Object.entries(a)))if(void 0!==d)if(Array.isArray(d))for(let a of d)b.appendHeader(c,a);else"number"==typeof d&&(d=d.toString()),b.appendHeader(c,d)}let t=null==(g=q.headers)?void 0:g[x.NEXT_CACHE_TAGS_HEADER];if(J&&az&&t&&"string"==typeof t&&b.setHeader(x.NEXT_CACHE_TAGS_HEADER,t),!q.status||ap&&as||(b.statusCode=q.status),!J&&q.status&&F.RedirectStatusCode[q.status]&&ap&&(b.statusCode=200),n&&!aw&&b.setHeader(s.NEXT_DID_POSTPONE_HEADER,"1"),ap&&!_){if(void 0===q.rscData){if(q.html.contentType!==s.RSC_CONTENT_TYPE_HEADER)if(ad.cacheComponents)return b.statusCode=404,(0,z.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:w.default.EMPTY,cacheControl:m.cacheControl});else throw Object.defineProperty(new G.InvariantError(`Expected RSC response, got ${q.html.contentType}`),"__NEXT_ERROR_CODE",{value:"E789",enumerable:!1,configurable:!0});return(0,z.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:q.html,cacheControl:m.cacheControl})}return(0,z.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:w.default.fromStatic(q.rscData,s.RSC_CONTENT_TYPE_HEADER),cacheControl:m.cacheControl})}let v=q.html;if(!n||J||ap)return(0,z.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:v,cacheControl:m.cacheControl});if(at)return v.push(new ReadableStream({start(a){a.enqueue(y.ENCODED_TAGS.CLOSED.BODY_AND_HTML),a.close()}})),(0,z.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:v,cacheControl:{revalidate:0,expire:void 0}});let A=new TransformStream;return v.push(A.readable),o({span:c,postponed:q.postponed,fallbackRouteParams:null,forceStaticRender:!1}).then(async a=>{var b,c;if(!a)throw Object.defineProperty(Error("Invariant: expected a result to be returned"),"__NEXT_ERROR_CODE",{value:"E463",enumerable:!1,configurable:!0});if((null==(b=a.value)?void 0:b.kind)!==u.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant: expected a page response, got ${null==(c=a.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E305",enumerable:!1,configurable:!0});await a.value.html.pipeTo(A.writable)}).catch(a=>{A.writable.abort(a).catch(a=>{console.error("couldn't abort transformer",a)})}),(0,z.sendRenderResult)({req:a,res:b,generateEtags:ad.generateEtags,poweredByHeader:ad.poweredByHeader,result:v,cacheControl:{revalidate:0,expire:void 0}})};if(!aI)return await aH.withPropagatedContext(a.headers,()=>aH.trace(i.BaseServerSpan.handleRequest,{spanName:`${aG} ${O}`,kind:g.SpanKind.SERVER,attributes:{"http.method":aG,"http.target":a.url}},q));await q(aI)}catch(b){throw b instanceof A.NoFallbackError||await M.onRequestError(a,b,{routerKind:"App Router",routePath:O,routeType:"render",revalidateReason:(0,f.c)({isStaticGeneration:az,isOnDemandRevalidate:ai})},!1,ac),b}}},55511:a=>{"use strict";a.exports=require("crypto")},55591:a=>{"use strict";a.exports=require("https")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},70722:a=>{"use strict";a.exports=require("next/dist/shared/lib/invariant-error")},73024:a=>{"use strict";a.exports=require("node:fs")},73136:a=>{"use strict";a.exports=require("node:url")},76760:a=>{"use strict";a.exports=require("node:path")},77068:a=>{"use strict";a.exports=require("next/dist/shared/lib/size-limit")},77598:a=>{"use strict";a.exports=require("node:crypto")},79518:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/app/(dashboard)/dashboard/cli-tools/CLIToolsPageClient.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/Users/Working/router4/app/src/app/(dashboard)/dashboard/cli-tools/CLIToolsPageClient.js","default")},79646:a=>{"use strict";a.exports=require("child_process")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87250:(a,b,c)=>{"use strict";c.d(b,{D1:()=>e});var d=c(54603);async function e(){return await (0,d.Xj)()}},89890:(a,b,c)=>{"use strict";c.d(b,{default:()=>s});var d=c(48249),e=c(67484),f=c(50412);let g={claude:{id:"claude",name:"Claude Code",icon:"terminal",color:"#D97757",description:"Anthropic Claude Code CLI",configType:"env",envVars:{baseUrl:"ANTHROPIC_BASE_URL",model:"ANTHROPIC_MODEL",opusModel:"ANTHROPIC_DEFAULT_OPUS_MODEL",sonnetModel:"ANTHROPIC_DEFAULT_SONNET_MODEL",haikuModel:"ANTHROPIC_DEFAULT_HAIKU_MODEL"},modelAliases:["default","sonnet","opus","haiku","opusplan"],settingsFile:"~/.claude/settings.json",defaultModels:[{id:"opus",name:"Claude Opus",alias:"opus",envKey:"ANTHROPIC_DEFAULT_OPUS_MODEL",defaultValue:"cc/claude-opus-4-5-20251101"},{id:"sonnet",name:"Claude Sonnet",alias:"sonnet",envKey:"ANTHROPIC_DEFAULT_SONNET_MODEL",defaultValue:"cc/claude-sonnet-4-5-20250929"},{id:"haiku",name:"Claude Haiku",alias:"haiku",envKey:"ANTHROPIC_DEFAULT_HAIKU_MODEL",defaultValue:"cc/claude-haiku-4-5-20251001"}]},codex:{id:"codex",name:"OpenAI Codex CLI",image:"/providers/codex.png",color:"#10A37F",description:"OpenAI Codex CLI",configType:"custom"},droid:{id:"droid",name:"Factory Droid",image:"/providers/droid.png",color:"#00D4FF",description:"Factory Droid AI Assistant",configType:"custom"},openclaw:{id:"openclaw",name:"Open Claw",image:"/providers/openclaw.png",color:"#FF6B35",description:"Open Claw AI Assistant",configType:"custom"},cursor:{id:"cursor",name:"Cursor",image:"/providers/cursor.png",color:"#000000",description:"Cursor AI Code Editor",configType:"guide",requiresCloud:!0,notes:[{type:"warning",text:"Requires Cursor Pro account to use this feature."},{type:"cloudCheck",text:"Cursor routes requests through its own server, so local endpoint is not supported. Please enable Cloud Endpoint in Settings."}],guideSteps:[{step:1,title:"Open Settings",desc:"Go to Settings → Models"},{step:2,title:"Enable OpenAI API",desc:'Enable "OpenAI API key" option'},{step:3,title:"Base URL",value:"{{baseUrl}}",copyable:!0},{step:4,title:"API Key",type:"apiKeySelector"},{step:5,title:"Add Custom Model",desc:'Click "View All Model" → "Add Custom Model"'},{step:6,title:"Select Model",type:"modelSelector"}]},cline:{id:"cline",name:"Cline",image:"/providers/cline.png",color:"#00D1B2",description:"CLINE AI Assistant",configType:"guide",guideSteps:[{step:1,title:"Open Settings",desc:"Go to CLINE Settings panel"},{step:2,title:"Select Provider",desc:"Choose API Provider → Ollama"},{step:3,title:"Base URL",value:"{{baseUrl}}",copyable:!0},{step:4,title:"API Key",type:"apiKeySelector"},{step:5,title:"Select Model",type:"modelSelector"}]},roo:{id:"roo",name:"Roo",image:"/providers/roo.png",color:"#FF6B6B",description:"Roo AI Assistant",configType:"guide",guideSteps:[{step:1,title:"Open Settings",desc:"Go to Roo Settings panel"},{step:2,title:"Select Provider",desc:"Choose API Provider → Ollama"},{step:3,title:"Base URL",value:"{{baseUrl}}",copyable:!0},{step:4,title:"API Key",type:"apiKeySelector"},{step:5,title:"Select Model",type:"modelSelector"}]},continue:{id:"continue",name:"Continue",image:"/providers/continue.png",color:"#7C3AED",description:"Continue AI Assistant",configType:"guide",guideSteps:[{step:1,title:"Open Config",desc:"Open Continue configuration file"},{step:2,title:"API Key",type:"apiKeySelector"},{step:3,title:"Select Model",type:"modelSelector"},{step:4,title:"Add Model Config",desc:"Add the following configuration to your models array:"}],codeBlock:{language:"json",code:`{
|
|
3
3
|
"apiBase": "{{baseUrl}}",
|
|
4
4
|
"title": "{{model}}",
|
|
5
5
|
"model": "{{model}}",
|
|
6
6
|
"provider": "openai",
|
|
7
7
|
"apiKey": "{{apiKey}}"
|
|
8
|
-
}`}},antigravity:{id:"antigravity",name:"Antigravity",image:"/providers/antigravity.png",color:"#4285F4",description:"Google Antigravity IDE with MITM",configType:"mitm",modelAliases:["claude-opus-4-6-thinking","claude-sonnet-4-6","gemini-3-flash","gpt-oss-120b-medium","gemini-3-pro-high","gemini-3-pro-low"],defaultModels:[{id:"gemini-3-pro-high",name:"Gemini 3 Pro High",alias:"gemini-3-pro-high"},{id:"gemini-3-pro-low",name:"Gemini 3 Pro Low",alias:"gemini-3-pro-low"},{id:"gemini-3-flash",name:"Gemini 3 Flash",alias:"gemini-3-flash"},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6",alias:"claude-sonnet-4-6"},{id:"claude-opus-4-6-thinking",name:"Claude Opus 4.6 Thinking",alias:"claude-opus-4-6-thinking"},{id:"gpt-oss-120b-medium",name:"GPT OSS 120B Medium",alias:"gpt-oss-120b-medium"}]}};var h=c(91431),i=c(81220);let j="https://9router.com";function k({tool:a,isExpanded:b,onToggle:c,activeProviders:g,modelMappings:h,onModelMappingChange:k,baseUrl:l,hasActiveProviders:m,apiKeys:n,cloudEnabled:o}){let p,q,r,[s,t]=(0,e.useState)(null),[u,v]=(0,e.useState)(!1),[w,x]=(0,e.useState)(!1),[y,z]=(0,e.useState)(!1),[A,B]=(0,e.useState)(null),[C,D]=(0,e.useState)(!1),[E,F]=(0,e.useState)(!1),[G,H]=(0,e.useState)(null),[I,J]=(0,e.useState)(""),[K,L]=(0,e.useState)({}),[M,N]=(0,e.useState)(!1),[O,P]=(0,e.useState)("");(0,e.useRef)(!1);let Q=(()=>{if(!s?.installed)return null;let a=s.settings?.env?.ANTHROPIC_BASE_URL;if(!a)return"not_configured";let b=a.includes("localhost")||a.includes("127.0.0.1"),c=o&&j&&a.startsWith(j),d=l&&a.startsWith(l);return b||c||d?"configured":"other"})(),R=()=>{let a=O||l;return a.endsWith("/v1")?a:`${a}/v1`},S=async()=>{x(!0),B(null);try{let b={ANTHROPIC_BASE_URL:R()},c=I?.trim()||(n?.length>0?n[0].key:null)||(o?null:"sk_9router");c&&(b.ANTHROPIC_AUTH_TOKEN=c),a.defaultModels.forEach(a=>{let c=h[a.alias];c&&a.envKey&&(b[a.envKey]=c)});let d=await fetch("/api/cli-tools/claude-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({env:b})}),e=await d.json();d.ok?(B({type:"success",text:"Settings applied successfully!"}),t(a=>({...a,hasBackup:!0,settings:{...a?.settings,env:b}}))):B({type:"error",text:e.error||"Failed to apply settings"})}catch(a){B({type:"error",text:a.message})}finally{x(!1)}},T=async()=>{z(!0),B(null);try{let b=await fetch("/api/cli-tools/claude-settings",{method:"DELETE"}),c=await b.json();b.ok?(B({type:"success",text:"Settings reset successfully!"}),a.defaultModels.forEach(a=>k(a.alias,a.defaultValue||"")),J("")):B({type:"error",text:c.error||"Failed to reset settings"})}catch(a){B({type:"error",text:a.message})}finally{z(!1)}};return(0,d.jsxs)(f.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:c,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(i.default,{src:"/providers/claude.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===Q&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===Q&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===Q&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[u&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking Claude CLI..."})]}),!u&&s&&!s.installed&&(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Claude CLI not installed"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Please install Claude CLI to use this feature."})]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:()=>D(!C),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:C?"expand_less":"help"}),C?"Hide":"How to Install"]})]}),C&&(0,d.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,d.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,d.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-text-muted mb-1",children:"macOS / Linux / Windows:"}),(0,d.jsx)("code",{className:"block px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs",children:"npm install -g @anthropic-ai/claude-code"})]}),(0,d.jsxs)("p",{className:"text-text-muted",children:["After installation, run ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"claude"})," to verify."]})]})]})]}),!u&&s?.installed&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[s?.settings?.env?.ANTHROPIC_BASE_URL&&(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Current"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("span",{className:"flex-1 px-2 py-1.5 text-xs text-text-muted truncate",children:s.settings.env.ANTHROPIC_BASE_URL})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Base URL"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:(p=O||l).endsWith("/v1")?p:`${p}/v1`,onChange:a=>P(a.target.value),placeholder:"https://.../v1",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),O&&O!==l&&(0,d.jsx)("button",{onClick:()=>P(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),n.length>0?(0,d.jsx)("select",{value:I,onChange:a=>J(a.target.value),className:"flex-1 px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:n.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))}):(0,d.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:o?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),a.defaultModels.map(a=>(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:a.name}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:h[a.alias]||"",onChange:b=>k(a.alias,b.target.value),placeholder:"provider/model-id",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,d.jsx)("button",{onClick:()=>{H(a.alias),F(!0)},disabled:!m,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${m?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),h[a.alias]&&(0,d.jsx)("button",{onClick:()=>k(a.alias,""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]},a.alias))]}),A&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===A.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===A.type?"check_circle":"error"}),(0,d.jsx)("span",{children:A.text})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:S,disabled:!m,loading:w,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:T,disabled:!s?.has9Router,loading:y,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>N(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,d.jsx)(f.rq,{isOpen:E,onClose:()=>F(!1),onSelect:a=>{G&&k(G,a.value)},selectedModel:G?h[G]:null,activeProviders:g,modelAliases:K,title:`Select model for ${G}`}),(0,d.jsx)(f.uR,{isOpen:M,onClose:()=>N(!1),title:"Claude CLI - Manual Configuration",configs:(q=I&&I.trim()?I:o?"<API_KEY_FROM_DASHBOARD>":"sk_9router",r={ANTHROPIC_BASE_URL:R(),ANTHROPIC_AUTH_TOKEN:q},a.defaultModels.forEach(a=>{let b=h[a.alias];b&&a.envKey&&(r[a.envKey]=b)}),[{filename:"~/.claude/settings.json",content:JSON.stringify({env:r},null,2)}])})]})}function l({tool:a,isExpanded:b,onToggle:c,baseUrl:g,apiKeys:h,activeProviders:j,cloudEnabled:k}){let l,m,n,[o,p]=(0,e.useState)(null),[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(!1),[u,v]=(0,e.useState)(!1),[w,x]=(0,e.useState)(null),[y,z]=(0,e.useState)(!1),[A,B]=(0,e.useState)(""),[C,D]=(0,e.useState)(""),[E,F]=(0,e.useState)(!1),[G,H]=(0,e.useState)({}),[I,J]=(0,e.useState)(!1),[K,L]=(0,e.useState)(""),M=o?.installed?o.config?o.config.includes(g)||o.config.includes("localhost")||o.config.includes("127.0.0.1")?"configured":"other":"not_configured":null,N=()=>{let a=K||`${g}/v1`;return a.endsWith("/v1")?a:`${a}/v1`},O=async()=>{r(!0);try{let a=await fetch("/api/cli-tools/codex-settings"),b=await a.json();p(b)}catch(a){p({installed:!1,error:a.message})}finally{r(!1)}},P=async()=>{t(!0),x(null);try{let a=A&&A.trim()||k?A:"sk_9router",b=await fetch("/api/cli-tools/codex-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:N(),apiKey:a,model:C})}),c=await b.json();b.ok?(x({type:"success",text:"Settings applied successfully!"}),O()):x({type:"error",text:c.error||"Failed to apply settings"})}catch(a){x({type:"error",text:a.message})}finally{t(!1)}},Q=async()=>{v(!0),x(null);try{let a=await fetch("/api/cli-tools/codex-settings",{method:"DELETE"}),b=await a.json();a.ok?(x({type:"success",text:"Settings reset successfully!"}),D(""),O()):x({type:"error",text:b.error||"Failed to reset settings"})}catch(a){x({type:"error",text:a.message})}finally{v(!1)}};return(0,d.jsxs)(f.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:c,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(i.default,{src:"/providers/codex.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===M&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===M&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===M&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[q&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking Codex CLI..."})]}),!q&&o&&!o.installed&&(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Codex CLI not installed"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Please install Codex CLI to use auto-apply feature."})]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:()=>z(!y),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:y?"expand_less":"help"}),y?"Hide":"How to Install"]})]}),y&&(0,d.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,d.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,d.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-text-muted mb-1",children:"macOS / Linux / Windows:"}),(0,d.jsx)("code",{className:"block px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs",children:"npm install -g @openai/codex"})]}),(0,d.jsxs)("p",{className:"text-text-muted",children:["After installation, run ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"codex"})," to verify."]}),(0,d.jsx)("div",{className:"pt-2 border-t border-border",children:(0,d.jsxs)("p",{className:"text-text-muted text-xs",children:["Codex uses ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"~/.codex/auth.json"})," with ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"OPENAI_API_KEY"}),'. Click "Apply" to auto-configure.']})})]})]})]}),!q&&o?.installed&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[o?.config&&((m=(l=o.config.match(/base_url\s*=\s*"([^"]+)"/))?l[1]:null)?(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Current"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("span",{className:"flex-1 px-2 py-1.5 text-xs text-text-muted truncate",children:m})]}):null),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Base URL"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:K||`${g}/v1`,onChange:a=>L(a.target.value),placeholder:"https://.../v1",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),K&&K!==`${g}/v1`&&(0,d.jsx)("button",{onClick:()=>L(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),h.length>0?(0,d.jsx)("select",{value:A,onChange:a=>B(a.target.value),className:"flex-1 px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:h.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))}):(0,d.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:k?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Model"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:C,onChange:a=>D(a.target.value),placeholder:"provider/model-id",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,d.jsx)("button",{onClick:()=>F(!0),disabled:!j?.length,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${j?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),C&&(0,d.jsx)("button",{onClick:()=>D(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),w&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===w.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===w.type?"check_circle":"error"}),(0,d.jsx)("span",{children:w.text})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:P,disabled:!A||!C,loading:s,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:Q,disabled:!o.has9Router,loading:u,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>J(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,d.jsx)(f.rq,{isOpen:E,onClose:()=>F(!1),onSelect:a=>{D(a.value),F(!1)},selectedModel:C,activeProviders:j,modelAliases:G,title:"Select Model for Codex"}),(0,d.jsx)(f.uR,{isOpen:I,onClose:()=>J(!1),title:"Codex CLI - Manual Configuration",configs:(n=A&&A.trim()?A:k?"<API_KEY_FROM_DASHBOARD>":"sk_9router",[{filename:"~/.codex/config.toml",content:`# 9Router Configuration for Codex CLI
|
|
8
|
+
}`}},antigravity:{id:"antigravity",name:"Antigravity",image:"/providers/antigravity.png",color:"#4285F4",description:"Google Antigravity IDE with MITM",configType:"mitm",modelAliases:["claude-opus-4-6-thinking","claude-sonnet-4-6","gemini-3-flash","gpt-oss-120b-medium","gemini-3-pro-high","gemini-3-pro-low"],defaultModels:[{id:"gemini-3.1-pro-high",name:"Gemini 3.1 Pro High",alias:"gemini-3.1-pro-high"},{id:"gemini-3.1-pro-low",name:"Gemini 3.1 Pro Low",alias:"gemini-3.1-pro-low"},{id:"gemini-3-flash",name:"Gemini 3 Flash",alias:"gemini-3-flash"},{id:"claude-sonnet-4-6",name:"Claude Sonnet 4.6",alias:"claude-sonnet-4-6"},{id:"claude-opus-4-6-thinking",name:"Claude Opus 4.6 Thinking",alias:"claude-opus-4-6-thinking"},{id:"gpt-oss-120b-medium",name:"GPT OSS 120B Medium",alias:"gpt-oss-120b-medium"}]}};var h=c(91431),i=c(81220);let j="https://9router.com";function k({tool:a,isExpanded:b,onToggle:c,activeProviders:g,modelMappings:h,onModelMappingChange:k,baseUrl:l,hasActiveProviders:m,apiKeys:n,cloudEnabled:o}){let p,q,r,[s,t]=(0,e.useState)(null),[u,v]=(0,e.useState)(!1),[w,x]=(0,e.useState)(!1),[y,z]=(0,e.useState)(!1),[A,B]=(0,e.useState)(null),[C,D]=(0,e.useState)(!1),[E,F]=(0,e.useState)(!1),[G,H]=(0,e.useState)(null),[I,J]=(0,e.useState)(""),[K,L]=(0,e.useState)({}),[M,N]=(0,e.useState)(!1),[O,P]=(0,e.useState)("");(0,e.useRef)(!1);let Q=(()=>{if(!s?.installed)return null;let a=s.settings?.env?.ANTHROPIC_BASE_URL;if(!a)return"not_configured";let b=a.includes("localhost")||a.includes("127.0.0.1"),c=o&&j&&a.startsWith(j),d=l&&a.startsWith(l);return b||c||d?"configured":"other"})(),R=()=>{let a=O||l;return a.endsWith("/v1")?a:`${a}/v1`},S=async()=>{x(!0),B(null);try{let b={ANTHROPIC_BASE_URL:R()},c=I?.trim()||(n?.length>0?n[0].key:null)||(o?null:"sk_9router");c&&(b.ANTHROPIC_AUTH_TOKEN=c),a.defaultModels.forEach(a=>{let c=h[a.alias];c&&a.envKey&&(b[a.envKey]=c)});let d=await fetch("/api/cli-tools/claude-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({env:b})}),e=await d.json();d.ok?(B({type:"success",text:"Settings applied successfully!"}),t(a=>({...a,hasBackup:!0,settings:{...a?.settings,env:b}}))):B({type:"error",text:e.error||"Failed to apply settings"})}catch(a){B({type:"error",text:a.message})}finally{x(!1)}},T=async()=>{z(!0),B(null);try{let b=await fetch("/api/cli-tools/claude-settings",{method:"DELETE"}),c=await b.json();b.ok?(B({type:"success",text:"Settings reset successfully!"}),a.defaultModels.forEach(a=>k(a.alias,a.defaultValue||"")),J("")):B({type:"error",text:c.error||"Failed to reset settings"})}catch(a){B({type:"error",text:a.message})}finally{z(!1)}};return(0,d.jsxs)(f.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:c,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(i.default,{src:"/providers/claude.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===Q&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===Q&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===Q&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[u&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking Claude CLI..."})]}),!u&&s&&!s.installed&&(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Claude CLI not installed"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Please install Claude CLI to use this feature."})]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:()=>D(!C),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:C?"expand_less":"help"}),C?"Hide":"How to Install"]})]}),C&&(0,d.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,d.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,d.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-text-muted mb-1",children:"macOS / Linux / Windows:"}),(0,d.jsx)("code",{className:"block px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs",children:"npm install -g @anthropic-ai/claude-code"})]}),(0,d.jsxs)("p",{className:"text-text-muted",children:["After installation, run ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"claude"})," to verify."]})]})]})]}),!u&&s?.installed&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[s?.settings?.env?.ANTHROPIC_BASE_URL&&(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Current"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("span",{className:"flex-1 px-2 py-1.5 text-xs text-text-muted truncate",children:s.settings.env.ANTHROPIC_BASE_URL})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Base URL"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:(p=O||l).endsWith("/v1")?p:`${p}/v1`,onChange:a=>P(a.target.value),placeholder:"https://.../v1",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),O&&O!==l&&(0,d.jsx)("button",{onClick:()=>P(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),n.length>0?(0,d.jsx)("select",{value:I,onChange:a=>J(a.target.value),className:"flex-1 px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:n.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))}):(0,d.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:o?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),a.defaultModels.map(a=>(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:a.name}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:h[a.alias]||"",onChange:b=>k(a.alias,b.target.value),placeholder:"provider/model-id",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,d.jsx)("button",{onClick:()=>{H(a.alias),F(!0)},disabled:!m,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${m?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),h[a.alias]&&(0,d.jsx)("button",{onClick:()=>k(a.alias,""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]},a.alias))]}),A&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===A.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===A.type?"check_circle":"error"}),(0,d.jsx)("span",{children:A.text})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:S,disabled:!m,loading:w,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:T,disabled:!s?.has9Router,loading:y,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>N(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,d.jsx)(f.rq,{isOpen:E,onClose:()=>F(!1),onSelect:a=>{G&&k(G,a.value)},selectedModel:G?h[G]:null,activeProviders:g,modelAliases:K,title:`Select model for ${G}`}),(0,d.jsx)(f.uR,{isOpen:M,onClose:()=>N(!1),title:"Claude CLI - Manual Configuration",configs:(q=I&&I.trim()?I:o?"<API_KEY_FROM_DASHBOARD>":"sk_9router",r={ANTHROPIC_BASE_URL:R(),ANTHROPIC_AUTH_TOKEN:q},a.defaultModels.forEach(a=>{let b=h[a.alias];b&&a.envKey&&(r[a.envKey]=b)}),[{filename:"~/.claude/settings.json",content:JSON.stringify({env:r},null,2)}])})]})}function l({tool:a,isExpanded:b,onToggle:c,baseUrl:g,apiKeys:h,activeProviders:j,cloudEnabled:k}){let l,m,n,[o,p]=(0,e.useState)(null),[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(!1),[u,v]=(0,e.useState)(!1),[w,x]=(0,e.useState)(null),[y,z]=(0,e.useState)(!1),[A,B]=(0,e.useState)(""),[C,D]=(0,e.useState)(""),[E,F]=(0,e.useState)(!1),[G,H]=(0,e.useState)({}),[I,J]=(0,e.useState)(!1),[K,L]=(0,e.useState)(""),M=o?.installed?o.config?o.config.includes(g)||o.config.includes("localhost")||o.config.includes("127.0.0.1")?"configured":"other":"not_configured":null,N=()=>{let a=K||`${g}/v1`;return a.endsWith("/v1")?a:`${a}/v1`},O=async()=>{r(!0);try{let a=await fetch("/api/cli-tools/codex-settings"),b=await a.json();p(b)}catch(a){p({installed:!1,error:a.message})}finally{r(!1)}},P=async()=>{t(!0),x(null);try{let a=A&&A.trim()||k?A:"sk_9router",b=await fetch("/api/cli-tools/codex-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:N(),apiKey:a,model:C})}),c=await b.json();b.ok?(x({type:"success",text:"Settings applied successfully!"}),O()):x({type:"error",text:c.error||"Failed to apply settings"})}catch(a){x({type:"error",text:a.message})}finally{t(!1)}},Q=async()=>{v(!0),x(null);try{let a=await fetch("/api/cli-tools/codex-settings",{method:"DELETE"}),b=await a.json();a.ok?(x({type:"success",text:"Settings reset successfully!"}),D(""),O()):x({type:"error",text:b.error||"Failed to reset settings"})}catch(a){x({type:"error",text:a.message})}finally{v(!1)}};return(0,d.jsxs)(f.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:c,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(i.default,{src:"/providers/codex.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===M&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===M&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===M&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[q&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking Codex CLI..."})]}),!q&&o&&!o.installed&&(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Codex CLI not installed"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Please install Codex CLI to use auto-apply feature."})]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:()=>z(!y),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:y?"expand_less":"help"}),y?"Hide":"How to Install"]})]}),y&&(0,d.jsxs)("div",{className:"p-4 bg-surface border border-border rounded-lg",children:[(0,d.jsx)("h4",{className:"font-medium mb-3",children:"Installation Guide"}),(0,d.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"text-text-muted mb-1",children:"macOS / Linux / Windows:"}),(0,d.jsx)("code",{className:"block px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs",children:"npm install -g @openai/codex"})]}),(0,d.jsxs)("p",{className:"text-text-muted",children:["After installation, run ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"codex"})," to verify."]}),(0,d.jsx)("div",{className:"pt-2 border-t border-border",children:(0,d.jsxs)("p",{className:"text-text-muted text-xs",children:["Codex uses ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"~/.codex/auth.json"})," with ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/5 rounded",children:"OPENAI_API_KEY"}),'. Click "Apply" to auto-configure.']})})]})]})]}),!q&&o?.installed&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[o?.config&&((m=(l=o.config.match(/base_url\s*=\s*"([^"]+)"/))?l[1]:null)?(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Current"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("span",{className:"flex-1 px-2 py-1.5 text-xs text-text-muted truncate",children:m})]}):null),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Base URL"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:K||`${g}/v1`,onChange:a=>L(a.target.value),placeholder:"https://.../v1",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),K&&K!==`${g}/v1`&&(0,d.jsx)("button",{onClick:()=>L(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),h.length>0?(0,d.jsx)("select",{value:A,onChange:a=>B(a.target.value),className:"flex-1 px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:h.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))}):(0,d.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:k?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Model"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:C,onChange:a=>D(a.target.value),placeholder:"provider/model-id",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,d.jsx)("button",{onClick:()=>F(!0),disabled:!j?.length,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${j?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),C&&(0,d.jsx)("button",{onClick:()=>D(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),w&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===w.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===w.type?"check_circle":"error"}),(0,d.jsx)("span",{children:w.text})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:P,disabled:!A||!C,loading:s,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:Q,disabled:!o.has9Router,loading:u,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>J(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,d.jsx)(f.rq,{isOpen:E,onClose:()=>F(!1),onSelect:a=>{D(a.value),F(!1)},selectedModel:C,activeProviders:j,modelAliases:G,title:"Select Model for Codex"}),(0,d.jsx)(f.uR,{isOpen:I,onClose:()=>J(!1),title:"Codex CLI - Manual Configuration",configs:(n=A&&A.trim()?A:k?"<API_KEY_FROM_DASHBOARD>":"sk_9router",[{filename:"~/.codex/config.toml",content:`# 9Router Configuration for Codex CLI
|
|
9
9
|
model = "${C}"
|
|
10
10
|
model_provider = "9router"
|
|
11
11
|
|
|
@@ -13,4 +13,4 @@ model_provider = "9router"
|
|
|
13
13
|
name = "9Router"
|
|
14
14
|
base_url = "${N()}"
|
|
15
15
|
wire_api = "responses"
|
|
16
|
-
`},{filename:"~/.codex/auth.json",content:JSON.stringify({OPENAI_API_KEY:n},null,2)}])})]})}let m="https://9router.com";function n({tool:a,isExpanded:b,onToggle:c,baseUrl:g,hasActiveProviders:h,apiKeys:j,activeProviders:k,cloudEnabled:l}){let n,o,p,q,[r,s]=(0,e.useState)(null),[t,u]=(0,e.useState)(!1),[v,w]=(0,e.useState)(!1),[x,y]=(0,e.useState)(!1),[z,A]=(0,e.useState)(null),[B,C]=(0,e.useState)(""),[D,E]=(0,e.useState)(""),[F,G]=(0,e.useState)(!1),[H,I]=(0,e.useState)({}),[J,K]=(0,e.useState)(!1),[L,M]=(0,e.useState)("");(0,e.useRef)(!1);let N=(()=>{if(!r?.installed)return null;let a=r.settings?.customModels?.find(a=>"custom:9Router-0"===a.id);if(!a)return"not_configured";let b=a.baseUrl?.includes("localhost")||a.baseUrl?.includes("127.0.0.1"),c=l&&m&&a.baseUrl?.startsWith(m),d=g&&a.baseUrl?.startsWith(g);return b||c||d?"configured":"other"})(),O=async()=>{u(!0);try{let a=await fetch("/api/cli-tools/droid-settings"),b=await a.json();s(b)}catch(a){s({installed:!1,error:a.message})}finally{u(!1)}},P=()=>{let a=L||g;return a.endsWith("/v1")?a:`${a}/v1`},Q=async()=>{w(!0),A(null);try{let a=B?.trim()||(j?.length>0?j[0].key:null)||(l?null:"sk_9router"),b=await fetch("/api/cli-tools/droid-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:P(),apiKey:a,model:D})}),c=await b.json();b.ok?(A({type:"success",text:"Settings applied successfully!"}),O()):A({type:"error",text:c.error||"Failed to apply settings"})}catch(a){A({type:"error",text:a.message})}finally{w(!1)}},R=async()=>{y(!0),A(null);try{let a=await fetch("/api/cli-tools/droid-settings",{method:"DELETE"}),b=await a.json();a.ok?(A({type:"success",text:"Settings reset successfully!"}),E(""),C(""),O()):A({type:"error",text:b.error||"Failed to reset settings"})}catch(a){A({type:"error",text:a.message})}finally{y(!1)}};return(0,d.jsxs)(f.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:c,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(i.default,{src:"/providers/droid.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===N&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===N&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===N&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[t&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking Factory Droid CLI..."})]}),!t&&r&&!r.installed&&(0,d.jsxs)("div",{className:"flex items-center gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Factory Droid CLI not installed"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Please install Factory Droid CLI to use this feature."})]})]}),!t&&r?.installed&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[r?.settings?.customModels?.find(a=>"custom:9Router-0"===a.id)?.baseUrl&&(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Current"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("span",{className:"flex-1 px-2 py-1.5 text-xs text-text-muted truncate",children:r.settings.customModels.find(a=>"custom:9Router-0"===a.id).baseUrl})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Base URL"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:(n=L||g).endsWith("/v1")?n:`${n}/v1`,onChange:a=>M(a.target.value),placeholder:"https://.../v1",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),L&&L!==g&&(0,d.jsx)("button",{onClick:()=>M(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),j.length>0?(0,d.jsx)("select",{value:B,onChange:a=>C(a.target.value),className:"flex-1 px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:j.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))}):(0,d.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:l?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Model"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:D,onChange:a=>E(a.target.value),placeholder:"provider/model-id",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,d.jsx)("button",{onClick:()=>G(!0),disabled:!h,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${h?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),D&&(0,d.jsx)("button",{onClick:()=>E(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),z&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===z.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===z.type?"check_circle":"error"}),(0,d.jsx)("span",{children:z.text})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:Q,disabled:!D,loading:v,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:R,disabled:!r?.has9Router,loading:x,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>K(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,d.jsx)(f.rq,{isOpen:F,onClose:()=>G(!1),onSelect:a=>{E(a.value),G(!1)},selectedModel:D,activeProviders:k,modelAliases:H,title:"Select Model for Factory Droid"}),(0,d.jsx)(f.uR,{isOpen:J,onClose:()=>K(!1),title:"Factory Droid - Manual Configuration",configs:(o=B&&B.trim()?B:l?"<API_KEY_FROM_DASHBOARD>":"sk_9router",p={customModels:[{model:D||"provider/model-id",id:"custom:9Router-0",index:0,baseUrl:P(),apiKey:o,displayName:D||"provider/model-id",maxOutputTokens:131072,noImageSupport:!1,provider:"openai"}]},q="u">typeof navigator&&navigator.platform,[{filename:q?.toLowerCase().includes("win")?"%USERPROFILE%\\.factory\\settings.json":"~/.factory/settings.json",content:JSON.stringify(p,null,2)}])})]})}function o({tool:a,isExpanded:b,onToggle:c,baseUrl:g,hasActiveProviders:h,apiKeys:j,activeProviders:k,cloudEnabled:l}){let m,n,[o,p]=(0,e.useState)(null),[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(!1),[u,v]=(0,e.useState)(!1),[w,x]=(0,e.useState)(null),[y,z]=(0,e.useState)(""),[A,B]=(0,e.useState)(""),[C,D]=(0,e.useState)(!1),[E,F]=(0,e.useState)({}),[G,H]=(0,e.useState)(!1),[I,J]=(0,e.useState)("");(0,e.useRef)(!1);let K=(()=>{if(!o?.installed)return null;let a=o.settings?.models?.providers?.["9router"];if(!a)return"not_configured";let b=a.baseUrl?.includes("localhost")||a.baseUrl?.includes("127.0.0.1")||a.baseUrl?.includes("0.0.0.0"),c=g&&a.baseUrl?.startsWith(g);return b||c?"configured":"other"})(),L=async()=>{r(!0);try{let a=await fetch("/api/cli-tools/openclaw-settings"),b=await a.json();p(b)}catch(a){p({installed:!1,error:a.message})}finally{r(!1)}},M=()=>{let a=I||"http://127.0.0.1:20128";return a.endsWith("/v1")?a:`${a}/v1`},N=async()=>{t(!0),x(null);try{let a=y?.trim()||(j?.length>0?j[0].key:null)||(l?null:"sk_9router"),b=await fetch("/api/cli-tools/openclaw-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:M(),apiKey:a,model:A})}),c=await b.json();b.ok?(x({type:"success",text:"Settings applied successfully!"}),L()):x({type:"error",text:c.error||"Failed to apply settings"})}catch(a){x({type:"error",text:a.message})}finally{t(!1)}},O=async()=>{v(!0),x(null);try{let a=await fetch("/api/cli-tools/openclaw-settings",{method:"DELETE"}),b=await a.json();a.ok?(x({type:"success",text:"Settings reset successfully!"}),B(""),z(""),L()):x({type:"error",text:b.error||"Failed to reset settings"})}catch(a){x({type:"error",text:a.message})}finally{v(!1)}};return(0,d.jsxs)(f.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:c,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(i.default,{src:"/providers/openclaw.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===K&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===K&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===K&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[q&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking Open Claw CLI..."})]}),!q&&o&&!o.installed&&(0,d.jsxs)("div",{className:"flex items-center gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Open Claw CLI not installed"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Please install Open Claw CLI to use this feature."})]})]}),!q&&o?.installed&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[o?.settings?.models?.providers?.["9router"]?.baseUrl&&(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Current"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("span",{className:"flex-1 px-2 py-1.5 text-xs text-text-muted truncate",children:o.settings.models.providers["9router"].baseUrl})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Base URL"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:(m=I||"http://127.0.0.1:20128").endsWith("/v1")?m:`${m}/v1`,onChange:a=>J(a.target.value),placeholder:"https://.../v1",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),I&&I!==g&&(0,d.jsx)("button",{onClick:()=>J(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),j.length>0?(0,d.jsx)("select",{value:y,onChange:a=>z(a.target.value),className:"flex-1 px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:j.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))}):(0,d.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:l?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Model"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:A,onChange:a=>B(a.target.value),placeholder:"provider/model-id",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,d.jsx)("button",{onClick:()=>D(!0),disabled:!h,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${h?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),A&&(0,d.jsx)("button",{onClick:()=>B(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),w&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===w.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===w.type?"check_circle":"error"}),(0,d.jsx)("span",{children:w.text})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:N,disabled:!A,loading:s,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:O,disabled:!o?.has9Router,loading:u,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>H(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,d.jsx)(f.rq,{isOpen:C,onClose:()=>D(!1),onSelect:a=>{B(a.value),D(!1)},selectedModel:A,activeProviders:k,modelAliases:E,title:"Select Model for Open Claw"}),(0,d.jsx)(f.uR,{isOpen:G,onClose:()=>H(!1),title:"Open Claw - Manual Configuration",configs:(n=y&&y.trim()?y:l?"<API_KEY_FROM_DASHBOARD>":"sk_9router",[{filename:"~/.openclaw/openclaw.json",content:JSON.stringify({agents:{defaults:{model:{primary:`9router/${A||"provider/model-id"}`}}},models:{providers:{"9router":{baseUrl:M(),apiKey:n,api:"openai-completions",models:[{id:A||"provider/model-id",name:(A||"provider/model-id").split("/").pop()}]}}}},null,2)}])})]})}function p({toolId:a,tool:b,isExpanded:c,onToggle:g,baseUrl:h,apiKeys:j,activeProviders:k=[],cloudEnabled:l=!1}){let[m,n]=(0,e.useState)(null),[o,p]=(0,e.useState)(!1),[q,r]=(0,e.useState)(""),[s,t]=(0,e.useState)(()=>j?.length>0?j[0].key:""),u=a=>{let b=s&&s.trim()?s:l?"your-api-key":"sk_9router",c=h||"http://localhost:20128",d=c.endsWith("/v1")?c:`${c}/v1`;return a.replace(/\{\{baseUrl\}\}/g,d).replace(/\{\{apiKey\}\}/g,b).replace(/\{\{model\}\}/g,q||"provider/model-id")},v=async(a,b)=>{await navigator.clipboard.writeText(u(a)),n(b),setTimeout(()=>n(null),2e3)},w=k.length>0,x=()=>!b.requiresCloud||!!l;return(0,d.jsxs)(f.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:g,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",children:b.image?(0,d.jsx)(i.default,{src:b.image,alt:b.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"}}):b.icon?(0,d.jsx)("span",{className:"material-symbols-outlined text-xl",style:{color:b.color},children:b.icon}):(0,d.jsx)(i.default,{src:`/providers/${a}.png`,alt:b.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:b.name}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:b.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${c?"rotate-180":""}`,children:"expand_more"})]}),c&&(0,d.jsx)("div",{className:"mt-6 pt-6 border-t border-border",children:b.guideSteps?(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[b.notes&&0!==b.notes.length?(0,d.jsx)("div",{className:"flex flex-col gap-2 mb-4",children:b.notes.map((a,b)=>{if("cloudCheck"===a.type&&l)return null;let c="warning"===a.type,e="cloudCheck"===a.type&&!l,f="bg-blue-500/10 border-blue-500/30",g="text-blue-600 dark:text-blue-400",h="text-blue-500",i="info";return c?(f="bg-yellow-500/10 border-yellow-500/30",g="text-yellow-600 dark:text-yellow-400",h="text-yellow-500",i="warning"):e&&(f="bg-red-500/10 border-red-500/30",g="text-red-600 dark:text-red-400",h="text-red-500",i="error"),(0,d.jsxs)("div",{className:`flex items-start gap-3 p-3 rounded-lg border ${f}`,children:[(0,d.jsx)("span",{className:`material-symbols-outlined text-lg ${h}`,children:i}),(0,d.jsx)("p",{className:`text-sm ${g}`,children:a.text})]},b)})}):null,x()&&b.guideSteps.map(a=>(0,d.jsxs)("div",{className:"flex items-start gap-4",children:[(0,d.jsx)("div",{className:"size-8 rounded-full flex items-center justify-center shrink-0 text-sm font-semibold text-white",style:{backgroundColor:b.color},children:a.step}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"font-medium text-text",children:a.title}),a.desc&&(0,d.jsx)("p",{className:"text-sm text-text-muted mt-0.5",children:a.desc}),"apiKeySelector"===a.type&&(0,d.jsx)("div",{className:"mt-2 flex items-center gap-2",children:j&&j.length>0?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("select",{value:s,onChange:a=>t(a.target.value),className:"flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:j.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))}),(0,d.jsx)("button",{onClick:()=>v(s,"apiKey"),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:"apiKey"===m?"check":"content_copy"})})]}):(0,d.jsx)("span",{className:"text-sm text-text-muted",children:l?"No API keys - Create one in Keys page":"sk_9router"})}),"modelSelector"===a.type&&(0,d.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,d.jsx)("input",{type:"text",value:q,onChange:a=>r(a.target.value),placeholder:"provider/model-id",className:"flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm border border-border focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,d.jsx)("button",{onClick:()=>p(!0),disabled:!w,className:`shrink-0 px-3 py-2 rounded-lg border text-sm transition-colors ${w?"bg-bg-secondary border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),q&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("button",{onClick:()=>v(q,"model"),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:"model"===m?"check":"content_copy"})}),(0,d.jsx)("button",{onClick:()=>r(""),className:"p-2 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:"close"})})]})]}),a.value&&(0,d.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,d.jsx)("code",{className:"flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm font-mono border border-border truncate",children:u(a.value)}),a.copyable&&(0,d.jsx)("button",{onClick:()=>v(a.value,`${a.step}-${a.title}`),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:m===`${a.step}-${a.title}`?"check":"content_copy"})})]})]})]},a.step)),x()&&b.codeBlock&&(0,d.jsxs)("div",{className:"mt-2",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted uppercase tracking-wide",children:b.codeBlock.language}),(0,d.jsxs)("button",{onClick:()=>v(b.codeBlock.code,"codeblock"),className:"flex items-center gap-1 px-2 py-1 text-xs bg-bg-secondary hover:bg-bg-tertiary rounded border border-border transition-colors",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"codeblock"===m?"check":"content_copy"}),"codeblock"===m?"Copied!":"Copy"]})]}),(0,d.jsx)("pre",{className:"p-4 bg-bg-secondary rounded-lg border border-border overflow-x-auto",children:(0,d.jsx)("code",{className:"text-sm font-mono whitespace-pre",children:u(b.codeBlock.code)})})]})]}):(0,d.jsx)("p",{className:"text-text-muted text-sm",children:"Coming soon..."})}),(0,d.jsx)(f.rq,{isOpen:o,onClose:()=>p(!1),onSelect:a=>{r(a.value)},selectedModel:q,activeProviders:k,title:"Select Model"})]})}function q({tool:a,isExpanded:b,onToggle:c,baseUrl:g,apiKeys:h,activeProviders:j,hasActiveProviders:k,cloudEnabled:l}){let[m,n]=(0,e.useState)(null),[o,p]=(0,e.useState)(!1),[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(""),[u,v]=(0,e.useState)(""),[w,x]=(0,e.useState)(null),[y,z]=(0,e.useState)({}),[A,B]=(0,e.useState)(!1),[C,D]=(0,e.useState)(null),E=async()=>{try{let a=await fetch("/api/cli-tools/antigravity-mitm");if(a.ok){let b=await a.json();n(b)}}catch(a){console.log("Error fetching status:",a),n({running:!1})}},F="u">typeof navigator&&navigator.userAgent?.includes("Windows"),G=async a=>{p(!0),x(null);try{let b=u?.trim()||(h?.length>0?h[0].key:null)||(l?null:"sk_9router"),c=await fetch("/api/cli-tools/antigravity-mitm",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:b,sudoPassword:a})}),d=await c.json();c.ok?(x({type:"success",text:"MITM started"}),r(!1),t(""),E()):x({type:"error",text:d.error||"Failed to start"})}catch(a){x({type:"error",text:a.message})}finally{p(!1)}},H=async a=>{p(!0),x(null);try{let b=await fetch("/api/cli-tools/antigravity-mitm",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({sudoPassword:a})}),c=await b.json();b.ok?(x({type:"success",text:"MITM stopped"}),r(!1),t(""),E()):x({type:"error",text:c.error||"Failed to stop"})}catch(a){x({type:"error",text:a.message})}finally{p(!1)}},I=()=>{s.trim()?m?.running?H(s):G(s):x({type:"error",text:"Sudo password is required"})},J=(a,b)=>{z(c=>({...c,[a]:b}))},K=async()=>{p(!0),x(null);try{let a=await fetch("/api/cli-tools/antigravity-mitm/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:"antigravity",mappings:y})});if(!a.ok){let b=await a.json();throw Error(b.error||"Failed to save mappings")}x({type:"success",text:"Mappings saved!"})}catch(a){x({type:"error",text:a.message})}finally{p(!1)}},L=m?.running;return(0,d.jsxs)(f.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:c,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(i.default,{src:"/providers/antigravity.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),L?(0,d.jsx)(f.Ex,{variant:"success",size:"sm",children:"Active"}):(0,d.jsx)(f.Ex,{variant:"default",size:"sm",children:"Inactive"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[(0,d.jsx)("div",{className:"flex items-center gap-2",children:L?(0,d.jsxs)("button",{onClick:()=>{F||m?.hasCachedPassword?H(""):(r(!0),x(null))},disabled:o,className:"px-4 py-2 rounded-lg bg-red-500/10 border border-red-500/30 text-red-500 font-medium text-sm flex items-center gap-2 hover:bg-red-500/20 transition-colors disabled:opacity-50",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"stop_circle"}),"Stop MITM"]}):(0,d.jsxs)("button",{onClick:()=>{F||m?.hasCachedPassword?G(""):(r(!0),x(null))},disabled:o||!k,className:"px-4 py-2 rounded-lg bg-primary/10 border border-primary/30 text-primary font-medium text-sm flex items-center gap-2 hover:bg-primary/20 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"play_circle"}),"Start MITM"]})}),w?.type==="error"&&(0,d.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 rounded text-xs bg-red-500/10 text-red-600",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),(0,d.jsx)("span",{children:w.text})]}),L&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),h.length>0?(0,d.jsx)("select",{value:u,onChange:a=>v(a.target.value),className:"flex-1 px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:h.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))}):(0,d.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:l?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),a.defaultModels.map(a=>(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:a.name}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:y[a.alias]||"",onChange:b=>J(a.alias,b.target.value),placeholder:"provider/model-id",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,d.jsx)("button",{onClick:()=>{D(a.alias),B(!0)},disabled:!k,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${k?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select"}),y[a.alias]&&(0,d.jsx)("button",{onClick:()=>J(a.alias,""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]},a.alias)),(0,d.jsx)("div",{className:"flex items-center gap-2",children:(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:K,disabled:o||0===Object.keys(y).length,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Save Mappings"]})})]}),!L&&(0,d.jsxs)("div",{className:"flex flex-col gap-1.5 px-1",children:[(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:[(0,d.jsx)("span",{className:"font-medium text-text-main",children:"How it works:"})," Intercepts Antigravity traffic via DNS redirect, letting you reroute models through 9Router."]}),(0,d.jsxs)("div",{className:"flex flex-col gap-0.5 text-[11px] text-text-muted",children:[(0,d.jsx)("span",{children:"1. Generates SSL cert & adds to system keychain"}),(0,d.jsxs)("span",{children:["2. Redirects ",(0,d.jsx)("code",{className:"text-[10px] bg-surface px-1 rounded",children:"daily-cloudcode-pa.googleapis.com"})," → localhost"]}),(0,d.jsx)("span",{children:"3. Maps Antigravity models to any provider via 9Router"})]})]})]}),(0,d.jsx)(f.aF,{isOpen:q,onClose:()=>{r(!1),t(""),x(null)},title:"Sudo Password Required",size:"sm",children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500 text-[20px]",children:"warning"}),(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Required for SSL certificate and DNS configuration"})]}),(0,d.jsx)(f.pd,{type:"password",placeholder:"Enter sudo password",value:s,onChange:a=>t(a.target.value),onKeyDown:a=>{"Enter"!==a.key||o||I()}}),w&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===w.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===w.type?"check_circle":"error"}),(0,d.jsx)("span",{children:w.text})]}),(0,d.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,d.jsx)(f.$n,{variant:"ghost",size:"sm",onClick:()=>{r(!1),t(""),x(null)},disabled:o,children:"Cancel"}),(0,d.jsx)(f.$n,{variant:"primary",size:"sm",onClick:I,loading:o,children:"Confirm"})]})]})}),(0,d.jsx)(f.rq,{isOpen:A,onClose:()=>B(!1),onSelect:a=>{C&&z(b=>({...b,[C]:a.value}))},selectedModel:C?y[C]:null,activeProviders:j,title:`Select model for ${C}`})]})}let r="https://9router.com";function s({machineId:a}){let b,c,i,[j,m]=(0,e.useState)([]),[s,t]=(0,e.useState)(!0),[u,v]=(0,e.useState)(null),[w,x]=(0,e.useState)({}),[y,z]=(0,e.useState)(!1),[A,B]=(0,e.useState)(!1),[C,D]=(0,e.useState)(""),[E,F]=(0,e.useState)([]),G=()=>j.filter(a=>!1!==a.isActive),H=(0,e.useCallback)((a,b,c)=>{x(d=>d[a]?.[b]===c?d:{...d,[a]:{...d[a],[b]:c}})},[]);if(s)return(0,d.jsx)("div",{className:"flex flex-col gap-6",children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(f.Qv,{}),(0,d.jsx)(f.Qv,{}),(0,d.jsx)(f.Qv,{})]})});let I=(b=G(),c=[],i=new Set,b.forEach(a=>{let b=h.Xg[a.provider]||a.provider;(0,h.KC)(a.provider).forEach(d=>{let e=`${b}/${d.id}`;i.has(e)||(i.add(e),c.push({value:e,label:`${b}/${d.id}`,provider:a.provider,alias:b,connectionName:a.name,modelId:d.id}))})}),c).length>0;return(0,d.jsxs)("div",{className:"flex flex-col gap-6",children:[!I&&(0,d.jsx)(f.Zp,{className:"border-yellow-500/50 bg-yellow-500/5",children:(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"No active providers"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Please add and connect providers first to configure CLI tools."})]})]})}),(0,d.jsx)("div",{className:"flex flex-col gap-4",children:Object.entries(g).map(([a,b])=>((a,b)=>{let c={tool:b,isExpanded:u===a,onToggle:()=>v(u===a?null:a),baseUrl:A&&C?C:y&&r?r:"http://localhost:20128",apiKeys:E};switch(a){case"claude":return(0,d.jsx)(k,{...c,activeProviders:G(),modelMappings:w[a]||{},onModelMappingChange:(b,c)=>H(a,b,c),hasActiveProviders:I,cloudEnabled:y},a);case"codex":return(0,d.jsx)(l,{...c,activeProviders:G(),cloudEnabled:y},a);case"droid":return(0,d.jsx)(n,{...c,activeProviders:G(),hasActiveProviders:I,cloudEnabled:y},a);case"openclaw":return(0,d.jsx)(o,{...c,activeProviders:G(),hasActiveProviders:I,cloudEnabled:y},a);case"antigravity":return(0,d.jsx)(q,{...c,activeProviders:G(),hasActiveProviders:I,cloudEnabled:y},a);default:return(0,d.jsx)(p,{toolId:a,...c,activeProviders:G(),cloudEnabled:y},a)}})(a,b))})]})}}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,5270,7471,3919,4822,6943,9718,8954,412,1164],()=>b(b.s=55268));module.exports=c})();
|
|
16
|
+
`},{filename:"~/.codex/auth.json",content:JSON.stringify({OPENAI_API_KEY:n},null,2)}])})]})}let m="https://9router.com";function n({tool:a,isExpanded:b,onToggle:c,baseUrl:g,hasActiveProviders:h,apiKeys:j,activeProviders:k,cloudEnabled:l}){let n,o,p,q,[r,s]=(0,e.useState)(null),[t,u]=(0,e.useState)(!1),[v,w]=(0,e.useState)(!1),[x,y]=(0,e.useState)(!1),[z,A]=(0,e.useState)(null),[B,C]=(0,e.useState)(""),[D,E]=(0,e.useState)(""),[F,G]=(0,e.useState)(!1),[H,I]=(0,e.useState)({}),[J,K]=(0,e.useState)(!1),[L,M]=(0,e.useState)("");(0,e.useRef)(!1);let N=(()=>{if(!r?.installed)return null;let a=r.settings?.customModels?.find(a=>"custom:9Router-0"===a.id);if(!a)return"not_configured";let b=a.baseUrl?.includes("localhost")||a.baseUrl?.includes("127.0.0.1"),c=l&&m&&a.baseUrl?.startsWith(m),d=g&&a.baseUrl?.startsWith(g);return b||c||d?"configured":"other"})(),O=async()=>{u(!0);try{let a=await fetch("/api/cli-tools/droid-settings"),b=await a.json();s(b)}catch(a){s({installed:!1,error:a.message})}finally{u(!1)}},P=()=>{let a=L||g;return a.endsWith("/v1")?a:`${a}/v1`},Q=async()=>{w(!0),A(null);try{let a=B?.trim()||(j?.length>0?j[0].key:null)||(l?null:"sk_9router"),b=await fetch("/api/cli-tools/droid-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:P(),apiKey:a,model:D})}),c=await b.json();b.ok?(A({type:"success",text:"Settings applied successfully!"}),O()):A({type:"error",text:c.error||"Failed to apply settings"})}catch(a){A({type:"error",text:a.message})}finally{w(!1)}},R=async()=>{y(!0),A(null);try{let a=await fetch("/api/cli-tools/droid-settings",{method:"DELETE"}),b=await a.json();a.ok?(A({type:"success",text:"Settings reset successfully!"}),E(""),C(""),O()):A({type:"error",text:b.error||"Failed to reset settings"})}catch(a){A({type:"error",text:a.message})}finally{y(!1)}};return(0,d.jsxs)(f.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:c,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(i.default,{src:"/providers/droid.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===N&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===N&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===N&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[t&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking Factory Droid CLI..."})]}),!t&&r&&!r.installed&&(0,d.jsxs)("div",{className:"flex items-center gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Factory Droid CLI not installed"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Please install Factory Droid CLI to use this feature."})]})]}),!t&&r?.installed&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[r?.settings?.customModels?.find(a=>"custom:9Router-0"===a.id)?.baseUrl&&(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Current"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("span",{className:"flex-1 px-2 py-1.5 text-xs text-text-muted truncate",children:r.settings.customModels.find(a=>"custom:9Router-0"===a.id).baseUrl})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Base URL"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:(n=L||g).endsWith("/v1")?n:`${n}/v1`,onChange:a=>M(a.target.value),placeholder:"https://.../v1",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),L&&L!==g&&(0,d.jsx)("button",{onClick:()=>M(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),j.length>0?(0,d.jsx)("select",{value:B,onChange:a=>C(a.target.value),className:"flex-1 px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:j.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))}):(0,d.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:l?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Model"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:D,onChange:a=>E(a.target.value),placeholder:"provider/model-id",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,d.jsx)("button",{onClick:()=>G(!0),disabled:!h,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${h?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),D&&(0,d.jsx)("button",{onClick:()=>E(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),z&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===z.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===z.type?"check_circle":"error"}),(0,d.jsx)("span",{children:z.text})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:Q,disabled:!D,loading:v,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:R,disabled:!r?.has9Router,loading:x,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>K(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,d.jsx)(f.rq,{isOpen:F,onClose:()=>G(!1),onSelect:a=>{E(a.value),G(!1)},selectedModel:D,activeProviders:k,modelAliases:H,title:"Select Model for Factory Droid"}),(0,d.jsx)(f.uR,{isOpen:J,onClose:()=>K(!1),title:"Factory Droid - Manual Configuration",configs:(o=B&&B.trim()?B:l?"<API_KEY_FROM_DASHBOARD>":"sk_9router",p={customModels:[{model:D||"provider/model-id",id:"custom:9Router-0",index:0,baseUrl:P(),apiKey:o,displayName:D||"provider/model-id",maxOutputTokens:131072,noImageSupport:!1,provider:"openai"}]},q="u">typeof navigator&&navigator.platform,[{filename:q?.toLowerCase().includes("win")?"%USERPROFILE%\\.factory\\settings.json":"~/.factory/settings.json",content:JSON.stringify(p,null,2)}])})]})}function o({tool:a,isExpanded:b,onToggle:c,baseUrl:g,hasActiveProviders:h,apiKeys:j,activeProviders:k,cloudEnabled:l}){let m,n,[o,p]=(0,e.useState)(null),[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(!1),[u,v]=(0,e.useState)(!1),[w,x]=(0,e.useState)(null),[y,z]=(0,e.useState)(""),[A,B]=(0,e.useState)(""),[C,D]=(0,e.useState)(!1),[E,F]=(0,e.useState)({}),[G,H]=(0,e.useState)(!1),[I,J]=(0,e.useState)("");(0,e.useRef)(!1);let K=(()=>{if(!o?.installed)return null;let a=o.settings?.models?.providers?.["9router"];if(!a)return"not_configured";let b=a.baseUrl?.includes("localhost")||a.baseUrl?.includes("127.0.0.1")||a.baseUrl?.includes("0.0.0.0"),c=g&&a.baseUrl?.startsWith(g);return b||c?"configured":"other"})(),L=async()=>{r(!0);try{let a=await fetch("/api/cli-tools/openclaw-settings"),b=await a.json();p(b)}catch(a){p({installed:!1,error:a.message})}finally{r(!1)}},M=()=>{let a=I||"http://127.0.0.1:20128";return a.endsWith("/v1")?a:`${a}/v1`},N=async()=>{t(!0),x(null);try{let a=y?.trim()||(j?.length>0?j[0].key:null)||(l?null:"sk_9router"),b=await fetch("/api/cli-tools/openclaw-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:M(),apiKey:a,model:A})}),c=await b.json();b.ok?(x({type:"success",text:"Settings applied successfully!"}),L()):x({type:"error",text:c.error||"Failed to apply settings"})}catch(a){x({type:"error",text:a.message})}finally{t(!1)}},O=async()=>{v(!0),x(null);try{let a=await fetch("/api/cli-tools/openclaw-settings",{method:"DELETE"}),b=await a.json();a.ok?(x({type:"success",text:"Settings reset successfully!"}),B(""),z(""),L()):x({type:"error",text:b.error||"Failed to reset settings"})}catch(a){x({type:"error",text:a.message})}finally{v(!1)}};return(0,d.jsxs)(f.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:c,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(i.default,{src:"/providers/openclaw.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===K&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-green-500/10 text-green-600 dark:text-green-400 rounded-full",children:"Connected"}),"not_configured"===K&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-yellow-500/10 text-yellow-600 dark:text-yellow-400 rounded-full",children:"Not configured"}),"other"===K&&(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-blue-500/10 text-blue-600 dark:text-blue-400 rounded-full",children:"Other"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[q&&(0,d.jsxs)("div",{className:"flex items-center gap-2 text-text-muted",children:[(0,d.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),(0,d.jsx)("span",{children:"Checking Open Claw CLI..."})]}),!q&&o&&!o.installed&&(0,d.jsxs)("div",{className:"flex items-center gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{className:"flex-1",children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"Open Claw CLI not installed"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Please install Open Claw CLI to use this feature."})]})]}),!q&&o?.installed&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[o?.settings?.models?.providers?.["9router"]?.baseUrl&&(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Current"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("span",{className:"flex-1 px-2 py-1.5 text-xs text-text-muted truncate",children:o.settings.models.providers["9router"].baseUrl})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Base URL"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:(m=I||"http://127.0.0.1:20128").endsWith("/v1")?m:`${m}/v1`,onChange:a=>J(a.target.value),placeholder:"https://.../v1",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),I&&I!==g&&(0,d.jsx)("button",{onClick:()=>J(""),className:"p-1 text-text-muted hover:text-primary rounded transition-colors",title:"Reset to default",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"restart_alt"})})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),j.length>0?(0,d.jsx)("select",{value:y,onChange:a=>z(a.target.value),className:"flex-1 px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:j.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))}):(0,d.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:l?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"Model"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:A,onChange:a=>B(a.target.value),placeholder:"provider/model-id",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,d.jsx)("button",{onClick:()=>D(!0),disabled:!h,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${h?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),A&&(0,d.jsx)("button",{onClick:()=>B(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),w&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===w.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===w.type?"check_circle":"error"}),(0,d.jsx)("span",{children:w.text})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:N,disabled:!A,loading:s,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Apply"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:O,disabled:!o?.has9Router,loading:u,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"restore"}),"Reset"]}),(0,d.jsxs)(f.$n,{variant:"ghost",size:"sm",onClick:()=>H(!0),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,d.jsx)(f.rq,{isOpen:C,onClose:()=>D(!1),onSelect:a=>{B(a.value),D(!1)},selectedModel:A,activeProviders:k,modelAliases:E,title:"Select Model for Open Claw"}),(0,d.jsx)(f.uR,{isOpen:G,onClose:()=>H(!1),title:"Open Claw - Manual Configuration",configs:(n=y&&y.trim()?y:l?"<API_KEY_FROM_DASHBOARD>":"sk_9router",[{filename:"~/.openclaw/openclaw.json",content:JSON.stringify({agents:{defaults:{model:{primary:`9router/${A||"provider/model-id"}`}}},models:{providers:{"9router":{baseUrl:M(),apiKey:n,api:"openai-completions",models:[{id:A||"provider/model-id",name:(A||"provider/model-id").split("/").pop()}]}}}},null,2)}])})]})}function p({toolId:a,tool:b,isExpanded:c,onToggle:g,baseUrl:h,apiKeys:j,activeProviders:k=[],cloudEnabled:l=!1}){let[m,n]=(0,e.useState)(null),[o,p]=(0,e.useState)(!1),[q,r]=(0,e.useState)(""),[s,t]=(0,e.useState)(()=>j?.length>0?j[0].key:""),u=a=>{let b=s&&s.trim()?s:l?"your-api-key":"sk_9router",c=h||"http://localhost:20128",d=c.endsWith("/v1")?c:`${c}/v1`;return a.replace(/\{\{baseUrl\}\}/g,d).replace(/\{\{apiKey\}\}/g,b).replace(/\{\{model\}\}/g,q||"provider/model-id")},v=async(a,b)=>{await navigator.clipboard.writeText(u(a)),n(b),setTimeout(()=>n(null),2e3)},w=k.length>0,x=()=>!b.requiresCloud||!!l;return(0,d.jsxs)(f.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:g,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 rounded-lg flex items-center justify-center shrink-0",children:b.image?(0,d.jsx)(i.default,{src:b.image,alt:b.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"}}):b.icon?(0,d.jsx)("span",{className:"material-symbols-outlined text-xl",style:{color:b.color},children:b.icon}):(0,d.jsx)(i.default,{src:`/providers/${a}.png`,alt:b.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:b.name}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:b.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${c?"rotate-180":""}`,children:"expand_more"})]}),c&&(0,d.jsx)("div",{className:"mt-6 pt-6 border-t border-border",children:b.guideSteps?(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[b.notes&&0!==b.notes.length?(0,d.jsx)("div",{className:"flex flex-col gap-2 mb-4",children:b.notes.map((a,b)=>{if("cloudCheck"===a.type&&l)return null;let c="warning"===a.type,e="cloudCheck"===a.type&&!l,f="bg-blue-500/10 border-blue-500/30",g="text-blue-600 dark:text-blue-400",h="text-blue-500",i="info";return c?(f="bg-yellow-500/10 border-yellow-500/30",g="text-yellow-600 dark:text-yellow-400",h="text-yellow-500",i="warning"):e&&(f="bg-red-500/10 border-red-500/30",g="text-red-600 dark:text-red-400",h="text-red-500",i="error"),(0,d.jsxs)("div",{className:`flex items-start gap-3 p-3 rounded-lg border ${f}`,children:[(0,d.jsx)("span",{className:`material-symbols-outlined text-lg ${h}`,children:i}),(0,d.jsx)("p",{className:`text-sm ${g}`,children:a.text})]},b)})}):null,x()&&b.guideSteps.map(a=>(0,d.jsxs)("div",{className:"flex items-start gap-4",children:[(0,d.jsx)("div",{className:"size-8 rounded-full flex items-center justify-center shrink-0 text-sm font-semibold text-white",style:{backgroundColor:b.color},children:a.step}),(0,d.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,d.jsx)("p",{className:"font-medium text-text",children:a.title}),a.desc&&(0,d.jsx)("p",{className:"text-sm text-text-muted mt-0.5",children:a.desc}),"apiKeySelector"===a.type&&(0,d.jsx)("div",{className:"mt-2 flex items-center gap-2",children:j&&j.length>0?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("select",{value:s,onChange:a=>t(a.target.value),className:"flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:j.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))}),(0,d.jsx)("button",{onClick:()=>v(s,"apiKey"),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:"apiKey"===m?"check":"content_copy"})})]}):(0,d.jsx)("span",{className:"text-sm text-text-muted",children:l?"No API keys - Create one in Keys page":"sk_9router"})}),"modelSelector"===a.type&&(0,d.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,d.jsx)("input",{type:"text",value:q,onChange:a=>r(a.target.value),placeholder:"provider/model-id",className:"flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm border border-border focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,d.jsx)("button",{onClick:()=>p(!0),disabled:!w,className:`shrink-0 px-3 py-2 rounded-lg border text-sm transition-colors ${w?"bg-bg-secondary border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),q&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("button",{onClick:()=>v(q,"model"),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:"model"===m?"check":"content_copy"})}),(0,d.jsx)("button",{onClick:()=>r(""),className:"p-2 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:"close"})})]})]}),a.value&&(0,d.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,d.jsx)("code",{className:"flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm font-mono border border-border truncate",children:u(a.value)}),a.copyable&&(0,d.jsx)("button",{onClick:()=>v(a.value,`${a.step}-${a.title}`),className:"shrink-0 px-3 py-2 bg-bg-secondary hover:bg-bg-tertiary rounded-lg border border-border transition-colors",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-lg",children:m===`${a.step}-${a.title}`?"check":"content_copy"})})]})]})]},a.step)),x()&&b.codeBlock&&(0,d.jsxs)("div",{className:"mt-2",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,d.jsx)("span",{className:"text-xs text-text-muted uppercase tracking-wide",children:b.codeBlock.language}),(0,d.jsxs)("button",{onClick:()=>v(b.codeBlock.code,"codeblock"),className:"flex items-center gap-1 px-2 py-1 text-xs bg-bg-secondary hover:bg-bg-tertiary rounded border border-border transition-colors",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-sm",children:"codeblock"===m?"check":"content_copy"}),"codeblock"===m?"Copied!":"Copy"]})]}),(0,d.jsx)("pre",{className:"p-4 bg-bg-secondary rounded-lg border border-border overflow-x-auto",children:(0,d.jsx)("code",{className:"text-sm font-mono whitespace-pre",children:u(b.codeBlock.code)})})]})]}):(0,d.jsx)("p",{className:"text-text-muted text-sm",children:"Coming soon..."})}),(0,d.jsx)(f.rq,{isOpen:o,onClose:()=>p(!1),onSelect:a=>{r(a.value)},selectedModel:q,activeProviders:k,title:"Select Model"})]})}function q({tool:a,isExpanded:b,onToggle:c,baseUrl:g,apiKeys:h,activeProviders:j,hasActiveProviders:k,cloudEnabled:l}){let[m,n]=(0,e.useState)(null),[o,p]=(0,e.useState)(!1),[q,r]=(0,e.useState)(!1),[s,t]=(0,e.useState)(""),[u,v]=(0,e.useState)(""),[w,x]=(0,e.useState)(null),[y,z]=(0,e.useState)({}),[A,B]=(0,e.useState)(!1),[C,D]=(0,e.useState)(null),E=async()=>{try{let a=await fetch("/api/cli-tools/antigravity-mitm");if(a.ok){let b=await a.json();n(b)}}catch(a){console.log("Error fetching status:",a),n({running:!1})}},F="u">typeof navigator&&navigator.userAgent?.includes("Windows"),G=async a=>{p(!0),x(null);try{let b=u?.trim()||(h?.length>0?h[0].key:null)||(l?null:"sk_9router"),c=await fetch("/api/cli-tools/antigravity-mitm",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:b,sudoPassword:a})}),d=await c.json();c.ok?(x({type:"success",text:"MITM started"}),r(!1),t(""),E()):x({type:"error",text:d.error||"Failed to start"})}catch(a){x({type:"error",text:a.message})}finally{p(!1)}},H=async a=>{p(!0),x(null);try{let b=await fetch("/api/cli-tools/antigravity-mitm",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({sudoPassword:a})}),c=await b.json();b.ok?(x({type:"success",text:"MITM stopped"}),r(!1),t(""),E()):x({type:"error",text:c.error||"Failed to stop"})}catch(a){x({type:"error",text:a.message})}finally{p(!1)}},I=()=>{s.trim()?m?.running?H(s):G(s):x({type:"error",text:"Sudo password is required"})},J=(a,b)=>{z(c=>({...c,[a]:b}))},K=async()=>{p(!0),x(null);try{let a=await fetch("/api/cli-tools/antigravity-mitm/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:"antigravity",mappings:y})});if(!a.ok){let b=await a.json();throw Error(b.error||"Failed to save mappings")}x({type:"success",text:"Mappings saved!"})}catch(a){x({type:"error",text:a.message})}finally{p(!1)}},L=m?.running;return(0,d.jsxs)(f.Zp,{padding:"sm",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:c,children:[(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(i.default,{src:"/providers/antigravity.png",alt:a.name,width:32,height:32,className:"size-8 object-contain rounded-lg",sizes:"32px",onError:a=>{a.target.style.display="none"}})}),(0,d.jsxs)("div",{className:"min-w-0",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),L?(0,d.jsx)(f.Ex,{variant:"success",size:"sm",children:"Active"}):(0,d.jsx)(f.Ex,{variant:"default",size:"sm",children:"Inactive"})]}),(0,d.jsx)("p",{className:"text-xs text-text-muted truncate",children:a.description})]})]}),(0,d.jsx)("span",{className:`material-symbols-outlined text-text-muted text-[20px] transition-transform ${b?"rotate-180":""}`,children:"expand_more"})]}),b&&(0,d.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex flex-col gap-4",children:[(0,d.jsx)("div",{className:"flex items-center gap-2",children:L?(0,d.jsxs)("button",{onClick:()=>{F||m?.hasCachedPassword?H(""):(r(!0),x(null))},disabled:o,className:"px-4 py-2 rounded-lg bg-red-500/10 border border-red-500/30 text-red-500 font-medium text-sm flex items-center gap-2 hover:bg-red-500/20 transition-colors disabled:opacity-50",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"stop_circle"}),"Stop MITM"]}):(0,d.jsxs)("button",{onClick:()=>{F||m?.hasCachedPassword?G(""):(r(!0),x(null))},disabled:o||!k,className:"px-4 py-2 rounded-lg bg-primary/10 border border-primary/30 text-primary font-medium text-sm flex items-center gap-2 hover:bg-primary/20 transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"play_circle"}),"Start MITM"]})}),w?.type==="error"&&(0,d.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 rounded text-xs bg-red-500/10 text-red-600",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),(0,d.jsx)("span",{children:w.text})]}),L&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),h.length>0?(0,d.jsx)("select",{value:u,onChange:a=>v(a.target.value),className:"flex-1 px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:h.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))}):(0,d.jsx)("span",{className:"flex-1 text-xs text-text-muted px-2 py-1.5",children:l?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),a.defaultModels.map(a=>(0,d.jsxs)("div",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right",children:a.name}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px]",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:y[a.alias]||"",onChange:b=>J(a.alias,b.target.value),placeholder:"provider/model-id",className:"flex-1 px-2 py-1.5 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,d.jsx)("button",{onClick:()=>{D(a.alias),B(!0)},disabled:!k,className:`px-2 py-1.5 rounded border text-xs transition-colors shrink-0 whitespace-nowrap ${k?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select"}),y[a.alias]&&(0,d.jsx)("button",{onClick:()=>J(a.alias,""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]},a.alias)),(0,d.jsx)("div",{className:"flex items-center gap-2",children:(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:K,disabled:o||0===Object.keys(y).length,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"save"}),"Save Mappings"]})})]}),!L&&(0,d.jsxs)("div",{className:"flex flex-col gap-1.5 px-1",children:[(0,d.jsxs)("p",{className:"text-xs text-text-muted",children:[(0,d.jsx)("span",{className:"font-medium text-text-main",children:"How it works:"})," Intercepts Antigravity traffic via DNS redirect, letting you reroute models through 9Router."]}),(0,d.jsxs)("div",{className:"flex flex-col gap-0.5 text-[11px] text-text-muted",children:[(0,d.jsx)("span",{children:"1. Generates SSL cert & adds to system keychain"}),(0,d.jsxs)("span",{children:["2. Redirects ",(0,d.jsx)("code",{className:"text-[10px] bg-surface px-1 rounded",children:"daily-cloudcode-pa.googleapis.com"})," → localhost"]}),(0,d.jsx)("span",{children:"3. Maps Antigravity models to any provider via 9Router"})]})]})]}),(0,d.jsx)(f.aF,{isOpen:q,onClose:()=>{r(!1),t(""),x(null)},title:"Sudo Password Required",size:"sm",children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500 text-[20px]",children:"warning"}),(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Required for SSL certificate and DNS configuration"})]}),(0,d.jsx)(f.pd,{type:"password",placeholder:"Enter sudo password",value:s,onChange:a=>t(a.target.value),onKeyDown:a=>{"Enter"!==a.key||o||I()}}),w&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===w.type?"bg-green-500/10 text-green-600":"bg-red-500/10 text-red-600"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"success"===w.type?"check_circle":"error"}),(0,d.jsx)("span",{children:w.text})]}),(0,d.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,d.jsx)(f.$n,{variant:"ghost",size:"sm",onClick:()=>{r(!1),t(""),x(null)},disabled:o,children:"Cancel"}),(0,d.jsx)(f.$n,{variant:"primary",size:"sm",onClick:I,loading:o,children:"Confirm"})]})]})}),(0,d.jsx)(f.rq,{isOpen:A,onClose:()=>B(!1),onSelect:a=>{C&&z(b=>({...b,[C]:a.value}))},selectedModel:C?y[C]:null,activeProviders:j,title:`Select model for ${C}`})]})}let r="https://9router.com";function s({machineId:a}){let b,c,i,[j,m]=(0,e.useState)([]),[s,t]=(0,e.useState)(!0),[u,v]=(0,e.useState)(null),[w,x]=(0,e.useState)({}),[y,z]=(0,e.useState)(!1),[A,B]=(0,e.useState)(!1),[C,D]=(0,e.useState)(""),[E,F]=(0,e.useState)([]),G=()=>j.filter(a=>!1!==a.isActive),H=(0,e.useCallback)((a,b,c)=>{x(d=>d[a]?.[b]===c?d:{...d,[a]:{...d[a],[b]:c}})},[]);if(s)return(0,d.jsx)("div",{className:"flex flex-col gap-6",children:(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsx)(f.Qv,{}),(0,d.jsx)(f.Qv,{}),(0,d.jsx)(f.Qv,{})]})});let I=(b=G(),c=[],i=new Set,b.forEach(a=>{let b=h.Xg[a.provider]||a.provider;(0,h.KC)(a.provider).forEach(d=>{let e=`${b}/${d.id}`;i.has(e)||(i.add(e),c.push({value:e,label:`${b}/${d.id}`,provider:a.provider,alias:b,connectionName:a.name,modelId:d.id}))})}),c).length>0;return(0,d.jsxs)("div",{className:"flex flex-col gap-6",children:[!I&&(0,d.jsx)(f.Zp,{className:"border-yellow-500/50 bg-yellow-500/5",children:(0,d.jsxs)("div",{className:"flex items-center gap-3",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-yellow-500",children:"warning"}),(0,d.jsxs)("div",{children:[(0,d.jsx)("p",{className:"font-medium text-yellow-600 dark:text-yellow-400",children:"No active providers"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Please add and connect providers first to configure CLI tools."})]})]})}),(0,d.jsx)("div",{className:"flex flex-col gap-4",children:Object.entries(g).map(([a,b])=>((a,b)=>{let c={tool:b,isExpanded:u===a,onToggle:()=>v(u===a?null:a),baseUrl:A&&C?C:y&&r?r:"http://localhost:20128",apiKeys:E};switch(a){case"claude":return(0,d.jsx)(k,{...c,activeProviders:G(),modelMappings:w[a]||{},onModelMappingChange:(b,c)=>H(a,b,c),hasActiveProviders:I,cloudEnabled:y},a);case"codex":return(0,d.jsx)(l,{...c,activeProviders:G(),cloudEnabled:y},a);case"droid":return(0,d.jsx)(n,{...c,activeProviders:G(),hasActiveProviders:I,cloudEnabled:y},a);case"openclaw":return(0,d.jsx)(o,{...c,activeProviders:G(),hasActiveProviders:I,cloudEnabled:y},a);case"antigravity":return(0,d.jsx)(q,{...c,activeProviders:G(),hasActiveProviders:I,cloudEnabled:y},a);default:return(0,d.jsx)(p,{toolId:a,...c,activeProviders:G(),cloudEnabled:y},a)}})(a,b))})]})}},91645:a=>{"use strict";a.exports=require("net")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,5270,2044,7471,3919,4822,6943,9718,6186,9201,8694,412,1164],()=>b(b.s=55268));module.exports=c})();
|