9router 0.4.25 → 0.4.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (810) hide show
  1. package/app/.next/BUILD_ID +1 -1
  2. package/app/.next/app-path-routes-manifest.json +9 -8
  3. package/app/.next/build-manifest.json +2 -2
  4. package/app/.next/routes-manifest.json +6 -0
  5. package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  6. package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  7. package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  8. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  9. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  10. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  11. package/app/.next/server/app/(dashboard)/dashboard/combos/page.js +2 -2
  12. package/app/.next/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  13. package/app/.next/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  14. package/app/.next/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  15. package/app/.next/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  16. package/app/.next/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  17. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  18. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  19. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  20. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +2 -2
  21. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  22. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  23. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  24. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  25. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  26. package/app/.next/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +3 -3
  27. package/app/.next/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  28. package/app/.next/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  29. package/app/.next/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  30. package/app/.next/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  31. package/app/.next/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  32. package/app/.next/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  33. package/app/.next/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  34. package/app/.next/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  35. package/app/.next/server/app/(dashboard)/dashboard/page.js +2 -2
  36. package/app/.next/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  37. package/app/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  38. package/app/.next/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  39. package/app/.next/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  40. package/app/.next/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  41. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
  42. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  43. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  44. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  45. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  46. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  47. package/app/.next/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  48. package/app/.next/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  49. package/app/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  50. package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
  51. package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  52. package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  53. package/app/.next/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  54. package/app/.next/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  55. package/app/.next/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  56. package/app/.next/server/app/(dashboard)/dashboard/skills/page.js +2 -2
  57. package/app/.next/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  58. package/app/.next/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  59. package/app/.next/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  60. package/app/.next/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  61. package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  62. package/app/.next/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  63. package/app/.next/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  64. package/app/.next/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  65. package/app/.next/server/app/_global-error/page.js +2 -2
  66. package/app/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  67. package/app/.next/server/app/_global-error.html +1 -1
  68. package/app/.next/server/app/_global-error.rsc +1 -1
  69. package/app/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  70. package/app/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  71. package/app/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  72. package/app/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  73. package/app/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  74. package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  75. package/app/.next/server/app/_not-found/page.js +2 -2
  76. package/app/.next/server/app/_not-found/page.js.nft.json +1 -1
  77. package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  78. package/app/.next/server/app/_not-found.html +1 -1
  79. package/app/.next/server/app/_not-found.rsc +4 -4
  80. package/app/.next/server/app/_not-found.segments/_full.segment.rsc +4 -4
  81. package/app/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  82. package/app/.next/server/app/_not-found.segments/_index.segment.rsc +4 -4
  83. package/app/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  84. package/app/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  85. package/app/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  86. package/app/.next/server/app/api/auth/login/route.js +1 -1
  87. package/app/.next/server/app/api/auth/login/route.js.nft.json +1 -1
  88. package/app/.next/server/app/api/auth/logout/route.js +1 -1
  89. package/app/.next/server/app/api/cli-tools/all-statuses/route.js +2 -2
  90. package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  91. package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  92. package/app/.next/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  93. package/app/.next/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  94. package/app/.next/server/app/api/cli-tools/claude-settings/route.js +2 -2
  95. package/app/.next/server/app/api/cli-tools/codex-settings/route.js +1 -1
  96. package/app/.next/server/app/api/cli-tools/copilot-settings/route.js +1 -1
  97. package/app/.next/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
  98. package/app/.next/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
  99. package/app/.next/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  100. package/app/.next/server/app/api/cli-tools/droid-settings/route.js +2 -2
  101. package/app/.next/server/app/api/cli-tools/hermes-settings/route.js +2 -2
  102. package/app/.next/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
  103. package/app/.next/server/app/api/cli-tools/opencode-settings/route.js +1 -1
  104. package/app/.next/server/app/api/cloud/auth/route.js +1 -1
  105. package/app/.next/server/app/api/cloud/auth/route.js.nft.json +1 -1
  106. package/app/.next/server/app/api/cloud/credentials/update/route.js +1 -1
  107. package/app/.next/server/app/api/cloud/credentials/update/route.js.nft.json +1 -1
  108. package/app/.next/server/app/api/cloud/model/resolve/route.js +1 -1
  109. package/app/.next/server/app/api/cloud/model/resolve/route.js.nft.json +1 -1
  110. package/app/.next/server/app/api/cloud/models/alias/route.js +1 -1
  111. package/app/.next/server/app/api/cloud/models/alias/route.js.nft.json +1 -1
  112. package/app/.next/server/app/api/combos/[id]/route.js +1 -1
  113. package/app/.next/server/app/api/combos/[id]/route.js.nft.json +1 -1
  114. package/app/.next/server/app/api/combos/route.js +1 -1
  115. package/app/.next/server/app/api/combos/route.js.nft.json +1 -1
  116. package/app/.next/server/app/api/health/route.js +1 -1
  117. package/app/.next/server/app/api/init/route.js +1 -1
  118. package/app/.next/server/app/api/init/route.js.nft.json +1 -1
  119. package/app/.next/server/app/api/keys/[id]/route.js +1 -1
  120. package/app/.next/server/app/api/keys/[id]/route.js.nft.json +1 -1
  121. package/app/.next/server/app/api/keys/route.js +1 -1
  122. package/app/.next/server/app/api/keys/route.js.nft.json +1 -1
  123. package/app/.next/server/app/api/locale/route.js +1 -1
  124. package/app/.next/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  125. package/app/.next/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  126. package/app/.next/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  127. package/app/.next/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  128. package/app/.next/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  129. package/app/.next/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  130. package/app/.next/server/app/api/media-providers/tts/voices/route.js +1 -1
  131. package/app/.next/server/app/api/models/alias/route.js +1 -1
  132. package/app/.next/server/app/api/models/alias/route.js.nft.json +1 -1
  133. package/app/.next/server/app/api/models/availability/route.js +1 -1
  134. package/app/.next/server/app/api/models/availability/route.js.nft.json +1 -1
  135. package/app/.next/server/app/api/models/custom/route.js +1 -1
  136. package/app/.next/server/app/api/models/custom/route.js.nft.json +1 -1
  137. package/app/.next/server/app/api/models/disabled/route.js +1 -1
  138. package/app/.next/server/app/api/models/disabled/route.js.nft.json +1 -1
  139. package/app/.next/server/app/api/models/route.js +1 -1
  140. package/app/.next/server/app/api/models/route.js.nft.json +1 -1
  141. package/app/.next/server/app/api/models/test/route.js +1 -1
  142. package/app/.next/server/app/api/models/test/route.js.nft.json +1 -1
  143. package/app/.next/server/app/api/oauth/[provider]/[action]/route.js +2 -2
  144. package/app/.next/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  145. package/app/.next/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  146. package/app/.next/server/app/api/oauth/cursor/import/route.js +1 -1
  147. package/app/.next/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  148. package/app/.next/server/app/api/oauth/gitlab/pat/route.js +1 -1
  149. package/app/.next/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  150. package/app/.next/server/app/api/oauth/iflow/cookie/route.js +1 -1
  151. package/app/.next/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  152. package/app/.next/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  153. package/app/.next/server/app/api/oauth/kiro/import/route.js +1 -1
  154. package/app/.next/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  155. package/app/.next/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  156. package/app/.next/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  157. package/app/.next/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  158. package/app/.next/server/app/api/pricing/route.js +1 -1
  159. package/app/.next/server/app/api/pricing/route.js.nft.json +1 -1
  160. package/app/.next/server/app/api/provider-nodes/[id]/route.js +1 -1
  161. package/app/.next/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  162. package/app/.next/server/app/api/provider-nodes/route.js +1 -1
  163. package/app/.next/server/app/api/provider-nodes/route.js.nft.json +1 -1
  164. package/app/.next/server/app/api/provider-nodes/validate/route.js +1 -1
  165. package/app/.next/server/app/api/providers/[id]/models/route.js +1 -1
  166. package/app/.next/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  167. package/app/.next/server/app/api/providers/[id]/route.js +1 -1
  168. package/app/.next/server/app/api/providers/[id]/route.js.nft.json +1 -1
  169. package/app/.next/server/app/api/providers/[id]/test/route.js +1 -1
  170. package/app/.next/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  171. package/app/.next/server/app/api/providers/[id]/test-models/route.js +1 -1
  172. package/app/.next/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  173. package/app/.next/server/app/api/providers/client/route.js +1 -1
  174. package/app/.next/server/app/api/providers/client/route.js.nft.json +1 -1
  175. package/app/.next/server/app/api/providers/kilo/free-models/route.js +1 -1
  176. package/app/.next/server/app/api/providers/route.js +1 -1
  177. package/app/.next/server/app/api/providers/route.js.nft.json +1 -1
  178. package/app/.next/server/app/api/providers/suggested-models/route.js +1 -1
  179. package/app/.next/server/app/api/providers/test-batch/route.js +1 -1
  180. package/app/.next/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  181. package/app/.next/server/app/api/providers/validate/route.js +1 -1
  182. package/app/.next/server/app/api/providers/validate/route.js.nft.json +1 -1
  183. package/app/.next/server/app/api/proxy-pools/[id]/route.js +1 -1
  184. package/app/.next/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  185. package/app/.next/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  186. package/app/.next/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  187. package/app/.next/server/app/api/proxy-pools/route.js +1 -1
  188. package/app/.next/server/app/api/proxy-pools/route.js.nft.json +1 -1
  189. package/app/.next/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  190. package/app/.next/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  191. package/app/.next/server/app/api/settings/database/route.js +1 -1
  192. package/app/.next/server/app/api/settings/database/route.js.nft.json +1 -1
  193. package/app/.next/server/app/api/settings/proxy-test/route.js +1 -1
  194. package/app/.next/server/app/api/settings/require-login/route.js +1 -1
  195. package/app/.next/server/app/api/settings/require-login/route.js.nft.json +1 -1
  196. package/app/.next/server/app/api/settings/route.js +1 -1
  197. package/app/.next/server/app/api/settings/route.js.nft.json +1 -1
  198. package/app/.next/server/app/api/shutdown/route.js +1 -1
  199. package/app/.next/server/app/api/tags/route.js +1 -1
  200. package/app/.next/server/app/api/translator/console-logs/route.js +1 -1
  201. package/app/.next/server/app/api/translator/console-logs/stream/route.js +2 -2
  202. package/app/.next/server/app/api/translator/load/route.js +1 -1
  203. package/app/.next/server/app/api/translator/save/route.js +1 -1
  204. package/app/.next/server/app/api/translator/send/route.js +1 -1
  205. package/app/.next/server/app/api/translator/send/route.js.nft.json +1 -1
  206. package/app/.next/server/app/api/translator/translate/route.js +1 -1
  207. package/app/.next/server/app/api/translator/translate/route.js.nft.json +1 -1
  208. package/app/.next/server/app/api/tunnel/disable/route.js +1 -1
  209. package/app/.next/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  210. package/app/.next/server/app/api/tunnel/enable/route.js +1 -1
  211. package/app/.next/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  212. package/app/.next/server/app/api/tunnel/status/route.js +1 -1
  213. package/app/.next/server/app/api/tunnel/status/route.js.nft.json +1 -1
  214. package/app/.next/server/app/api/tunnel/tailscale-check/route.js +2 -2
  215. package/app/.next/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  216. package/app/.next/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  217. package/app/.next/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  218. package/app/.next/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  219. package/app/.next/server/app/api/tunnel/tailscale-install/route.js +2 -2
  220. package/app/.next/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  221. package/app/.next/server/app/api/tunnel/tailscale-login/route.js +2 -2
  222. package/app/.next/server/app/api/tunnel/tailscale-start-daemon/route.js +2 -2
  223. package/app/.next/server/app/api/tunnel/tailscale-start-daemon/route.js.nft.json +1 -1
  224. package/app/.next/server/app/api/usage/[connectionId]/route.js +1 -1
  225. package/app/.next/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  226. package/app/.next/server/app/api/usage/chart/route.js +1 -1
  227. package/app/.next/server/app/api/usage/chart/route.js.nft.json +1 -1
  228. package/app/.next/server/app/api/usage/history/route.js +1 -1
  229. package/app/.next/server/app/api/usage/history/route.js.nft.json +1 -1
  230. package/app/.next/server/app/api/usage/providers/route.js +1 -1
  231. package/app/.next/server/app/api/usage/providers/route.js.nft.json +1 -1
  232. package/app/.next/server/app/api/usage/request-details/route.js +1 -1
  233. package/app/.next/server/app/api/usage/request-details/route.js.nft.json +1 -1
  234. package/app/.next/server/app/api/usage/request-logs/route.js +1 -1
  235. package/app/.next/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  236. package/app/.next/server/app/api/usage/stats/route.js +1 -1
  237. package/app/.next/server/app/api/usage/stats/route.js.nft.json +1 -1
  238. package/app/.next/server/app/api/usage/stream/route.js +2 -2
  239. package/app/.next/server/app/api/usage/stream/route.js.nft.json +1 -1
  240. package/app/.next/server/app/api/v1/api/chat/route.js +1 -1
  241. package/app/.next/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  242. package/app/.next/server/app/api/v1/audio/speech/route.js +1 -1
  243. package/app/.next/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  244. package/app/.next/server/app/api/v1/audio/transcriptions/route.js +1 -1
  245. package/app/.next/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  246. package/app/.next/server/app/api/v1/audio/voices/route.js +1 -1
  247. package/app/.next/server/app/api/v1/chat/completions/route.js +1 -1
  248. package/app/.next/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  249. package/app/.next/server/app/api/v1/embeddings/route.js +1 -1
  250. package/app/.next/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  251. package/app/.next/server/app/api/v1/images/generations/route.js +2 -2
  252. package/app/.next/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  253. package/app/.next/server/app/api/v1/messages/count_tokens/route.js +1 -1
  254. package/app/.next/server/app/api/v1/messages/route.js +1 -1
  255. package/app/.next/server/app/api/v1/messages/route.js.nft.json +1 -1
  256. package/app/.next/server/app/api/v1/models/[kind]/route.js +1 -1
  257. package/app/.next/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  258. package/app/.next/server/app/api/v1/models/info/route.js +1 -1
  259. package/app/.next/server/app/api/v1/models/route.js +1 -1
  260. package/app/.next/server/app/api/v1/models/route.js.nft.json +1 -1
  261. package/app/.next/server/app/api/v1/responses/compact/route.js +1 -1
  262. package/app/.next/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  263. package/app/.next/server/app/api/v1/responses/route.js +1 -1
  264. package/app/.next/server/app/api/v1/responses/route.js.nft.json +1 -1
  265. package/app/.next/server/app/api/v1/route.js +1 -1
  266. package/app/.next/server/app/api/v1/route.js.nft.json +1 -1
  267. package/app/.next/server/app/api/v1/search/route.js +1 -1
  268. package/app/.next/server/app/api/v1/search/route.js.nft.json +1 -1
  269. package/app/.next/server/app/api/v1/web/fetch/route.js +1 -1
  270. package/app/.next/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  271. package/app/.next/server/app/api/v1beta/models/[...path]/route.js +1 -1
  272. package/app/.next/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  273. package/app/.next/server/app/api/v1beta/models/route.js +1 -1
  274. package/app/.next/server/app/api/version/route.js +1 -1
  275. package/app/.next/server/app/api/version/shutdown/route.js +1 -0
  276. package/app/.next/server/app/api/version/shutdown/route.js.nft.json +1 -0
  277. package/app/.next/server/app/api/version/shutdown/route_client-reference-manifest.js +1 -0
  278. package/app/.next/server/app/api/version/update/route.js +1 -1
  279. package/app/.next/server/app/callback/page.js +2 -2
  280. package/app/.next/server/app/callback/page.js.nft.json +1 -1
  281. package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
  282. package/app/.next/server/app/callback.html +1 -1
  283. package/app/.next/server/app/callback.rsc +4 -4
  284. package/app/.next/server/app/callback.segments/_full.segment.rsc +4 -4
  285. package/app/.next/server/app/callback.segments/_head.segment.rsc +1 -1
  286. package/app/.next/server/app/callback.segments/_index.segment.rsc +4 -4
  287. package/app/.next/server/app/callback.segments/_tree.segment.rsc +2 -2
  288. package/app/.next/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  289. package/app/.next/server/app/callback.segments/callback.segment.rsc +1 -1
  290. package/app/.next/server/app/dashboard/basic-chat.html +1 -1
  291. package/app/.next/server/app/dashboard/basic-chat.rsc +6 -6
  292. package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
  293. package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
  294. package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  295. package/app/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  296. package/app/.next/server/app/dashboard/basic-chat.segments/_full.segment.rsc +6 -6
  297. package/app/.next/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
  298. package/app/.next/server/app/dashboard/basic-chat.segments/_index.segment.rsc +4 -4
  299. package/app/.next/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  300. package/app/.next/server/app/dashboard/cli-tools.html +1 -1
  301. package/app/.next/server/app/dashboard/cli-tools.rsc +6 -6
  302. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
  303. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
  304. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  305. package/app/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  306. package/app/.next/server/app/dashboard/cli-tools.segments/_full.segment.rsc +6 -6
  307. package/app/.next/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
  308. package/app/.next/server/app/dashboard/cli-tools.segments/_index.segment.rsc +4 -4
  309. package/app/.next/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  310. package/app/.next/server/app/dashboard/combos.html +1 -1
  311. package/app/.next/server/app/dashboard/combos.rsc +6 -6
  312. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
  313. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
  314. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  315. package/app/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  316. package/app/.next/server/app/dashboard/combos.segments/_full.segment.rsc +6 -6
  317. package/app/.next/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
  318. package/app/.next/server/app/dashboard/combos.segments/_index.segment.rsc +4 -4
  319. package/app/.next/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  320. package/app/.next/server/app/dashboard/endpoint.html +1 -1
  321. package/app/.next/server/app/dashboard/endpoint.rsc +6 -6
  322. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
  323. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
  324. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  325. package/app/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  326. package/app/.next/server/app/dashboard/endpoint.segments/_full.segment.rsc +6 -6
  327. package/app/.next/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
  328. package/app/.next/server/app/dashboard/endpoint.segments/_index.segment.rsc +4 -4
  329. package/app/.next/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  330. package/app/.next/server/app/dashboard/media-providers/web.html +1 -1
  331. package/app/.next/server/app/dashboard/media-providers/web.rsc +6 -6
  332. package/app/.next/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
  333. package/app/.next/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
  334. package/app/.next/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
  335. package/app/.next/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  336. package/app/.next/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  337. package/app/.next/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +6 -6
  338. package/app/.next/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
  339. package/app/.next/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +4 -4
  340. package/app/.next/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  341. package/app/.next/server/app/dashboard/mitm.html +1 -1
  342. package/app/.next/server/app/dashboard/mitm.rsc +6 -6
  343. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
  344. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
  345. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  346. package/app/.next/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  347. package/app/.next/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
  348. package/app/.next/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
  349. package/app/.next/server/app/dashboard/mitm.segments/_index.segment.rsc +4 -4
  350. package/app/.next/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  351. package/app/.next/server/app/dashboard/profile.html +1 -1
  352. package/app/.next/server/app/dashboard/profile.rsc +6 -6
  353. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
  354. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
  355. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  356. package/app/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  357. package/app/.next/server/app/dashboard/profile.segments/_full.segment.rsc +6 -6
  358. package/app/.next/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
  359. package/app/.next/server/app/dashboard/profile.segments/_index.segment.rsc +4 -4
  360. package/app/.next/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  361. package/app/.next/server/app/dashboard/providers/new.html +1 -1
  362. package/app/.next/server/app/dashboard/providers/new.rsc +6 -6
  363. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
  364. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
  365. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  366. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  367. package/app/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  368. package/app/.next/server/app/dashboard/providers/new.segments/_full.segment.rsc +6 -6
  369. package/app/.next/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
  370. package/app/.next/server/app/dashboard/providers/new.segments/_index.segment.rsc +4 -4
  371. package/app/.next/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  372. package/app/.next/server/app/dashboard/providers.html +1 -1
  373. package/app/.next/server/app/dashboard/providers.rsc +6 -6
  374. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
  375. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
  376. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  377. package/app/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  378. package/app/.next/server/app/dashboard/providers.segments/_full.segment.rsc +6 -6
  379. package/app/.next/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
  380. package/app/.next/server/app/dashboard/providers.segments/_index.segment.rsc +4 -4
  381. package/app/.next/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  382. package/app/.next/server/app/dashboard/proxy-pools.html +1 -1
  383. package/app/.next/server/app/dashboard/proxy-pools.rsc +6 -6
  384. package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
  385. package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
  386. package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  387. package/app/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  388. package/app/.next/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +6 -6
  389. package/app/.next/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
  390. package/app/.next/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +4 -4
  391. package/app/.next/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  392. package/app/.next/server/app/dashboard/quota.html +2 -2
  393. package/app/.next/server/app/dashboard/quota.rsc +7 -7
  394. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
  395. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
  396. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  397. package/app/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  398. package/app/.next/server/app/dashboard/quota.segments/_full.segment.rsc +7 -7
  399. package/app/.next/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
  400. package/app/.next/server/app/dashboard/quota.segments/_index.segment.rsc +4 -4
  401. package/app/.next/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  402. package/app/.next/server/app/dashboard/settings/pricing/page.js +2 -2
  403. package/app/.next/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  404. package/app/.next/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  405. package/app/.next/server/app/dashboard/settings/pricing.html +1 -1
  406. package/app/.next/server/app/dashboard/settings/pricing.rsc +4 -4
  407. package/app/.next/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
  408. package/app/.next/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  409. package/app/.next/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +4 -4
  410. package/app/.next/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  411. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
  412. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  413. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  414. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  415. package/app/.next/server/app/dashboard/skills.html +1 -1
  416. package/app/.next/server/app/dashboard/skills.rsc +6 -6
  417. package/app/.next/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
  418. package/app/.next/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
  419. package/app/.next/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  420. package/app/.next/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  421. package/app/.next/server/app/dashboard/skills.segments/_full.segment.rsc +6 -6
  422. package/app/.next/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
  423. package/app/.next/server/app/dashboard/skills.segments/_index.segment.rsc +4 -4
  424. package/app/.next/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
  425. package/app/.next/server/app/dashboard/translator.html +1 -1
  426. package/app/.next/server/app/dashboard/translator.rsc +6 -6
  427. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
  428. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
  429. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  430. package/app/.next/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  431. package/app/.next/server/app/dashboard/translator.segments/_full.segment.rsc +6 -6
  432. package/app/.next/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
  433. package/app/.next/server/app/dashboard/translator.segments/_index.segment.rsc +4 -4
  434. package/app/.next/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  435. package/app/.next/server/app/dashboard/usage.html +1 -1
  436. package/app/.next/server/app/dashboard/usage.rsc +6 -6
  437. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
  438. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
  439. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  440. package/app/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  441. package/app/.next/server/app/dashboard/usage.segments/_full.segment.rsc +6 -6
  442. package/app/.next/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
  443. package/app/.next/server/app/dashboard/usage.segments/_index.segment.rsc +4 -4
  444. package/app/.next/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  445. package/app/.next/server/app/dashboard.html +1 -1
  446. package/app/.next/server/app/dashboard.rsc +6 -6
  447. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
  448. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
  449. package/app/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
  450. package/app/.next/server/app/dashboard.segments/_full.segment.rsc +6 -6
  451. package/app/.next/server/app/dashboard.segments/_head.segment.rsc +1 -1
  452. package/app/.next/server/app/dashboard.segments/_index.segment.rsc +4 -4
  453. package/app/.next/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  454. package/app/.next/server/app/favicon.ico/route.js +1 -1
  455. package/app/.next/server/app/index.html +1 -1
  456. package/app/.next/server/app/index.rsc +4 -4
  457. package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  458. package/app/.next/server/app/index.segments/_full.segment.rsc +4 -4
  459. package/app/.next/server/app/index.segments/_head.segment.rsc +1 -1
  460. package/app/.next/server/app/index.segments/_index.segment.rsc +4 -4
  461. package/app/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  462. package/app/.next/server/app/landing/page.js +2 -2
  463. package/app/.next/server/app/landing/page.js.nft.json +1 -1
  464. package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
  465. package/app/.next/server/app/landing.html +1 -1
  466. package/app/.next/server/app/landing.rsc +5 -5
  467. package/app/.next/server/app/landing.segments/_full.segment.rsc +5 -5
  468. package/app/.next/server/app/landing.segments/_head.segment.rsc +1 -1
  469. package/app/.next/server/app/landing.segments/_index.segment.rsc +4 -4
  470. package/app/.next/server/app/landing.segments/_tree.segment.rsc +2 -2
  471. package/app/.next/server/app/landing.segments/landing/__PAGE__.segment.rsc +2 -2
  472. package/app/.next/server/app/landing.segments/landing.segment.rsc +1 -1
  473. package/app/.next/server/app/login/page.js +2 -2
  474. package/app/.next/server/app/login/page.js.nft.json +1 -1
  475. package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
  476. package/app/.next/server/app/login.html +1 -1
  477. package/app/.next/server/app/login.rsc +5 -5
  478. package/app/.next/server/app/login.segments/_full.segment.rsc +5 -5
  479. package/app/.next/server/app/login.segments/_head.segment.rsc +1 -1
  480. package/app/.next/server/app/login.segments/_index.segment.rsc +4 -4
  481. package/app/.next/server/app/login.segments/_tree.segment.rsc +2 -2
  482. package/app/.next/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  483. package/app/.next/server/app/login.segments/login.segment.rsc +1 -1
  484. package/app/.next/server/app/manifest.webmanifest/route.js +2 -2
  485. package/app/.next/server/app/page.js +2 -2
  486. package/app/.next/server/app/page.js.nft.json +1 -1
  487. package/app/.next/server/app/page_client-reference-manifest.js +1 -1
  488. package/app/.next/server/app-paths-manifest.json +9 -8
  489. package/app/.next/server/chunks/1574.js +1 -1
  490. package/app/.next/server/chunks/2049.js +1 -1
  491. package/app/.next/server/chunks/3774.js +2 -2
  492. package/app/.next/server/chunks/450.js +1 -1
  493. package/app/.next/server/chunks/4892.js +2 -2
  494. package/app/.next/server/chunks/499.js +9 -0
  495. package/app/.next/server/chunks/6263.js +1 -1
  496. package/app/.next/server/chunks/6283.js +1 -1
  497. package/app/.next/server/chunks/6890.js +1 -1
  498. package/app/.next/server/chunks/7292.js +9 -0
  499. package/app/.next/server/chunks/7810.js +1 -1
  500. package/app/.next/server/chunks/8035.js +1 -1
  501. package/app/.next/server/chunks/8367.js +2 -2
  502. package/app/.next/server/middleware-build-manifest.js +1 -1
  503. package/app/.next/server/middleware.js +3 -3
  504. package/app/.next/server/pages/404.html +1 -1
  505. package/app/.next/server/pages/500.html +1 -1
  506. package/app/.next/static/chunks/{1939-5f1c000b260c0698.js → 1939-d9b80a9e484ae21d.js} +1 -1
  507. package/app/.next/static/chunks/{4156-773921135dfe2c75.js → 4156-3a7b60c65001de9a.js} +3 -3
  508. package/app/.next/static/chunks/505-618f19b62fafd836.js +1 -0
  509. package/app/.next/static/chunks/8035-ecd24cc76e55f5ba.js +3 -0
  510. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-7890b74e481f9d92.js → page-29ce6662637d64e4.js} +1 -1
  511. package/app/.next/static/chunks/app/_global-error/page-5ea305bd1a1dc348.js +1 -0
  512. package/app/.next/static/chunks/app/api/auth/login/route-5ea305bd1a1dc348.js +1 -0
  513. package/app/.next/static/chunks/app/api/auth/logout/route-5ea305bd1a1dc348.js +1 -0
  514. package/app/.next/static/chunks/app/api/cli-tools/all-statuses/route-5ea305bd1a1dc348.js +1 -0
  515. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-5ea305bd1a1dc348.js +1 -0
  516. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-5ea305bd1a1dc348.js +1 -0
  517. package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-5ea305bd1a1dc348.js +1 -0
  518. package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-5ea305bd1a1dc348.js +1 -0
  519. package/app/.next/static/chunks/app/api/cli-tools/copilot-settings/route-5ea305bd1a1dc348.js +1 -0
  520. package/app/.next/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-5ea305bd1a1dc348.js +1 -0
  521. package/app/.next/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-5ea305bd1a1dc348.js +1 -0
  522. package/app/.next/static/chunks/app/api/cli-tools/cowork-settings/route-5ea305bd1a1dc348.js +1 -0
  523. package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-5ea305bd1a1dc348.js +1 -0
  524. package/app/.next/static/chunks/app/api/cli-tools/hermes-settings/route-5ea305bd1a1dc348.js +1 -0
  525. package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-5ea305bd1a1dc348.js +1 -0
  526. package/app/.next/static/chunks/app/api/cli-tools/opencode-settings/route-5ea305bd1a1dc348.js +1 -0
  527. package/app/.next/static/chunks/app/api/cloud/auth/route-5ea305bd1a1dc348.js +1 -0
  528. package/app/.next/static/chunks/app/api/cloud/credentials/update/route-5ea305bd1a1dc348.js +1 -0
  529. package/app/.next/static/chunks/app/api/cloud/model/resolve/route-5ea305bd1a1dc348.js +1 -0
  530. package/app/.next/static/chunks/app/api/cloud/models/alias/route-5ea305bd1a1dc348.js +1 -0
  531. package/app/.next/static/chunks/app/api/combos/[id]/route-5ea305bd1a1dc348.js +1 -0
  532. package/app/.next/static/chunks/app/api/combos/route-5ea305bd1a1dc348.js +1 -0
  533. package/app/.next/static/chunks/app/api/health/route-5ea305bd1a1dc348.js +1 -0
  534. package/app/.next/static/chunks/app/api/init/route-5ea305bd1a1dc348.js +1 -0
  535. package/app/.next/static/chunks/app/api/keys/[id]/route-5ea305bd1a1dc348.js +1 -0
  536. package/app/.next/static/chunks/app/api/keys/route-5ea305bd1a1dc348.js +1 -0
  537. package/app/.next/static/chunks/app/api/locale/route-5ea305bd1a1dc348.js +1 -0
  538. package/app/.next/static/chunks/app/api/media-providers/tts/deepgram/voices/route-5ea305bd1a1dc348.js +1 -0
  539. package/app/.next/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-5ea305bd1a1dc348.js +1 -0
  540. package/app/.next/static/chunks/app/api/media-providers/tts/inworld/voices/route-5ea305bd1a1dc348.js +1 -0
  541. package/app/.next/static/chunks/app/api/media-providers/tts/voices/route-5ea305bd1a1dc348.js +1 -0
  542. package/app/.next/static/chunks/app/api/models/alias/route-5ea305bd1a1dc348.js +1 -0
  543. package/app/.next/static/chunks/app/api/models/availability/route-5ea305bd1a1dc348.js +1 -0
  544. package/app/.next/static/chunks/app/api/models/custom/route-5ea305bd1a1dc348.js +1 -0
  545. package/app/.next/static/chunks/app/api/models/disabled/route-5ea305bd1a1dc348.js +1 -0
  546. package/app/.next/static/chunks/app/api/models/route-5ea305bd1a1dc348.js +1 -0
  547. package/app/.next/static/chunks/app/api/models/test/route-5ea305bd1a1dc348.js +1 -0
  548. package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-5ea305bd1a1dc348.js +1 -0
  549. package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-5ea305bd1a1dc348.js +1 -0
  550. package/app/.next/static/chunks/app/api/oauth/cursor/import/route-5ea305bd1a1dc348.js +1 -0
  551. package/app/.next/static/chunks/app/api/oauth/gitlab/pat/route-5ea305bd1a1dc348.js +1 -0
  552. package/app/.next/static/chunks/app/api/oauth/iflow/cookie/route-5ea305bd1a1dc348.js +1 -0
  553. package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-5ea305bd1a1dc348.js +1 -0
  554. package/app/.next/static/chunks/app/api/oauth/kiro/import/route-5ea305bd1a1dc348.js +1 -0
  555. package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-5ea305bd1a1dc348.js +1 -0
  556. package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-5ea305bd1a1dc348.js +1 -0
  557. package/app/.next/static/chunks/app/api/pricing/route-5ea305bd1a1dc348.js +1 -0
  558. package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-5ea305bd1a1dc348.js +1 -0
  559. package/app/.next/static/chunks/app/api/provider-nodes/route-5ea305bd1a1dc348.js +1 -0
  560. package/app/.next/static/chunks/app/api/provider-nodes/validate/route-5ea305bd1a1dc348.js +1 -0
  561. package/app/.next/static/chunks/app/api/providers/[id]/models/route-5ea305bd1a1dc348.js +1 -0
  562. package/app/.next/static/chunks/app/api/providers/[id]/route-5ea305bd1a1dc348.js +1 -0
  563. package/app/.next/static/chunks/app/api/providers/[id]/test/route-5ea305bd1a1dc348.js +1 -0
  564. package/app/.next/static/chunks/app/api/providers/[id]/test-models/route-5ea305bd1a1dc348.js +1 -0
  565. package/app/.next/static/chunks/app/api/providers/client/route-5ea305bd1a1dc348.js +1 -0
  566. package/app/.next/static/chunks/app/api/providers/kilo/free-models/route-5ea305bd1a1dc348.js +1 -0
  567. package/app/.next/static/chunks/app/api/providers/route-5ea305bd1a1dc348.js +1 -0
  568. package/app/.next/static/chunks/app/api/providers/suggested-models/route-5ea305bd1a1dc348.js +1 -0
  569. package/app/.next/static/chunks/app/api/providers/test-batch/route-5ea305bd1a1dc348.js +1 -0
  570. package/app/.next/static/chunks/app/api/providers/validate/route-5ea305bd1a1dc348.js +1 -0
  571. package/app/.next/static/chunks/app/api/proxy-pools/[id]/route-5ea305bd1a1dc348.js +1 -0
  572. package/app/.next/static/chunks/app/api/proxy-pools/[id]/test/route-5ea305bd1a1dc348.js +1 -0
  573. package/app/.next/static/chunks/app/api/proxy-pools/route-5ea305bd1a1dc348.js +1 -0
  574. package/app/.next/static/chunks/app/api/proxy-pools/vercel-deploy/route-5ea305bd1a1dc348.js +1 -0
  575. package/app/.next/static/chunks/app/api/settings/database/route-5ea305bd1a1dc348.js +1 -0
  576. package/app/.next/static/chunks/app/api/settings/proxy-test/route-5ea305bd1a1dc348.js +1 -0
  577. package/app/.next/static/chunks/app/api/settings/require-login/route-5ea305bd1a1dc348.js +1 -0
  578. package/app/.next/static/chunks/app/api/settings/route-5ea305bd1a1dc348.js +1 -0
  579. package/app/.next/static/chunks/app/api/shutdown/route-5ea305bd1a1dc348.js +1 -0
  580. package/app/.next/static/chunks/app/api/tags/route-5ea305bd1a1dc348.js +1 -0
  581. package/app/.next/static/chunks/app/api/translator/console-logs/route-5ea305bd1a1dc348.js +1 -0
  582. package/app/.next/static/chunks/app/api/translator/console-logs/stream/route-5ea305bd1a1dc348.js +1 -0
  583. package/app/.next/static/chunks/app/api/translator/load/route-5ea305bd1a1dc348.js +1 -0
  584. package/app/.next/static/chunks/app/api/translator/save/route-5ea305bd1a1dc348.js +1 -0
  585. package/app/.next/static/chunks/app/api/translator/send/route-5ea305bd1a1dc348.js +1 -0
  586. package/app/.next/static/chunks/app/api/translator/translate/route-5ea305bd1a1dc348.js +1 -0
  587. package/app/.next/static/chunks/app/api/tunnel/disable/route-5ea305bd1a1dc348.js +1 -0
  588. package/app/.next/static/chunks/app/api/tunnel/enable/route-5ea305bd1a1dc348.js +1 -0
  589. package/app/.next/static/chunks/app/api/tunnel/status/route-5ea305bd1a1dc348.js +1 -0
  590. package/app/.next/static/chunks/app/api/tunnel/tailscale-check/route-5ea305bd1a1dc348.js +1 -0
  591. package/app/.next/static/chunks/app/api/tunnel/tailscale-disable/route-5ea305bd1a1dc348.js +1 -0
  592. package/app/.next/static/chunks/app/api/tunnel/tailscale-enable/route-5ea305bd1a1dc348.js +1 -0
  593. package/app/.next/static/chunks/app/api/tunnel/tailscale-install/route-5ea305bd1a1dc348.js +1 -0
  594. package/app/.next/static/chunks/app/api/tunnel/tailscale-login/route-5ea305bd1a1dc348.js +1 -0
  595. package/app/.next/static/chunks/app/api/tunnel/tailscale-start-daemon/route-5ea305bd1a1dc348.js +1 -0
  596. package/app/.next/static/chunks/app/api/usage/[connectionId]/route-5ea305bd1a1dc348.js +1 -0
  597. package/app/.next/static/chunks/app/api/usage/chart/route-5ea305bd1a1dc348.js +1 -0
  598. package/app/.next/static/chunks/app/api/usage/history/route-5ea305bd1a1dc348.js +1 -0
  599. package/app/.next/static/chunks/app/api/usage/providers/route-5ea305bd1a1dc348.js +1 -0
  600. package/app/.next/static/chunks/app/api/usage/request-details/route-5ea305bd1a1dc348.js +1 -0
  601. package/app/.next/static/chunks/app/api/usage/request-logs/route-5ea305bd1a1dc348.js +1 -0
  602. package/app/.next/static/chunks/app/api/usage/stats/route-5ea305bd1a1dc348.js +1 -0
  603. package/app/.next/static/chunks/app/api/usage/stream/route-5ea305bd1a1dc348.js +1 -0
  604. package/app/.next/static/chunks/app/api/v1/api/chat/route-5ea305bd1a1dc348.js +1 -0
  605. package/app/.next/static/chunks/app/api/v1/audio/speech/route-5ea305bd1a1dc348.js +1 -0
  606. package/app/.next/static/chunks/app/api/v1/audio/transcriptions/route-5ea305bd1a1dc348.js +1 -0
  607. package/app/.next/static/chunks/app/api/v1/audio/voices/route-5ea305bd1a1dc348.js +1 -0
  608. package/app/.next/static/chunks/app/api/v1/chat/completions/route-5ea305bd1a1dc348.js +1 -0
  609. package/app/.next/static/chunks/app/api/v1/embeddings/route-5ea305bd1a1dc348.js +1 -0
  610. package/app/.next/static/chunks/app/api/v1/images/generations/route-5ea305bd1a1dc348.js +1 -0
  611. package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-5ea305bd1a1dc348.js +1 -0
  612. package/app/.next/static/chunks/app/api/v1/messages/route-5ea305bd1a1dc348.js +1 -0
  613. package/app/.next/static/chunks/app/api/v1/models/[kind]/route-5ea305bd1a1dc348.js +1 -0
  614. package/app/.next/static/chunks/app/api/v1/models/info/route-5ea305bd1a1dc348.js +1 -0
  615. package/app/.next/static/chunks/app/api/v1/models/route-5ea305bd1a1dc348.js +1 -0
  616. package/app/.next/static/chunks/app/api/v1/responses/compact/route-5ea305bd1a1dc348.js +1 -0
  617. package/app/.next/static/chunks/app/api/v1/responses/route-5ea305bd1a1dc348.js +1 -0
  618. package/app/.next/static/chunks/app/api/v1/route-5ea305bd1a1dc348.js +1 -0
  619. package/app/.next/static/chunks/app/api/v1/search/route-5ea305bd1a1dc348.js +1 -0
  620. package/app/.next/static/chunks/app/api/v1/web/fetch/route-5ea305bd1a1dc348.js +1 -0
  621. package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-5ea305bd1a1dc348.js +1 -0
  622. package/app/.next/static/chunks/app/api/v1beta/models/route-5ea305bd1a1dc348.js +1 -0
  623. package/app/.next/static/chunks/app/api/version/route-5ea305bd1a1dc348.js +1 -0
  624. package/app/.next/static/chunks/app/api/version/shutdown/route-5ea305bd1a1dc348.js +1 -0
  625. package/app/.next/static/chunks/app/api/version/update/route-5ea305bd1a1dc348.js +1 -0
  626. package/app/.next/static/chunks/app/landing/{page-34e119eac6b7e1a4.js → page-0084367666bd9046.js} +1 -1
  627. package/app/.next/static/chunks/app/manifest.webmanifest/route-5ea305bd1a1dc348.js +1 -0
  628. package/app/.next/static/chunks/app/page-5ea305bd1a1dc348.js +1 -0
  629. package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-5ea305bd1a1dc348.js +1 -0
  630. package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-5ea305bd1a1dc348.js +1 -0
  631. package/app/.next/static/chunks/next/dist/client/components/builtin/not-found-5ea305bd1a1dc348.js +1 -0
  632. package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-5ea305bd1a1dc348.js +1 -0
  633. package/app/.next/static/css/180855a9ef4ea7f9.css +1 -0
  634. package/app/.next/static/eJ_F0cODdJRrmD-63IF09/_buildManifest.js +1 -0
  635. package/app/node_modules/sql.js/.devcontainer/Dockerfile +76 -0
  636. package/app/node_modules/sql.js/.devcontainer/devcontainer.json +20 -0
  637. package/app/node_modules/sql.js/.eslintrc.js +68 -0
  638. package/app/node_modules/sql.js/.jsdoc.config.json +38 -0
  639. package/app/node_modules/sql.js/.nojekyll +0 -0
  640. package/app/node_modules/sql.js/AUTHORS +8 -0
  641. package/app/node_modules/sql.js/CONTRIBUTING.md +66 -0
  642. package/app/node_modules/sql.js/LICENSE +44 -0
  643. package/app/node_modules/sql.js/README.md +357 -0
  644. package/app/node_modules/sql.js/dist/sql-asm-debug.js +140890 -0
  645. package/app/node_modules/sql.js/dist/sql-asm-memory-growth.js +204 -0
  646. package/app/node_modules/sql.js/dist/sql-asm.js +202 -0
  647. package/app/node_modules/sql.js/dist/sql-wasm-browser-debug.js +7157 -0
  648. package/app/node_modules/sql.js/dist/sql-wasm-browser-debug.wasm +0 -0
  649. package/app/node_modules/sql.js/dist/sql-wasm-browser.js +183 -0
  650. package/app/node_modules/sql.js/dist/sql-wasm-browser.wasm +0 -0
  651. package/app/node_modules/sql.js/dist/sql-wasm-debug.js +7265 -0
  652. package/app/node_modules/sql.js/dist/sql-wasm-debug.wasm +0 -0
  653. package/app/node_modules/sql.js/dist/sql-wasm.js +185 -0
  654. package/app/node_modules/sql.js/dist/sql-wasm.wasm +0 -0
  655. package/app/node_modules/sql.js/dist/worker.sql-asm-debug.js +141011 -0
  656. package/app/node_modules/sql.js/dist/worker.sql-asm.js +323 -0
  657. package/app/node_modules/sql.js/dist/worker.sql-wasm-debug.js +7386 -0
  658. package/app/node_modules/sql.js/dist/worker.sql-wasm.js +306 -0
  659. package/app/node_modules/sql.js/documentation_index.md +26 -0
  660. package/app/node_modules/sql.js/eslint.config.cjs +57 -0
  661. package/app/node_modules/sql.js/logo.svg +13 -0
  662. package/app/node_modules/sql.js/package.json +58 -0
  663. package/app/package.json +2 -2
  664. package/app/src/lib/db/adapters/nodeSqliteAdapter.js +83 -0
  665. package/app/src/lib/updater/updater.js +25 -0
  666. package/app/src/mitm/server.js +1 -1
  667. package/cli.js +22 -14
  668. package/hooks/postinstall.js +10 -68
  669. package/hooks/sqliteRuntime.js +115 -0
  670. package/package.json +2 -1
  671. package/app/.next/static/chunks/505-cb7fd622c7ae02af.js +0 -1
  672. package/app/.next/static/chunks/8035-c87b74c7e1a7cf78.js +0 -3
  673. package/app/.next/static/chunks/app/_global-error/page-20fa0affdf8859be.js +0 -1
  674. package/app/.next/static/chunks/app/api/auth/login/route-20fa0affdf8859be.js +0 -1
  675. package/app/.next/static/chunks/app/api/auth/logout/route-20fa0affdf8859be.js +0 -1
  676. package/app/.next/static/chunks/app/api/cli-tools/all-statuses/route-20fa0affdf8859be.js +0 -1
  677. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-20fa0affdf8859be.js +0 -1
  678. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-20fa0affdf8859be.js +0 -1
  679. package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-20fa0affdf8859be.js +0 -1
  680. package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-20fa0affdf8859be.js +0 -1
  681. package/app/.next/static/chunks/app/api/cli-tools/copilot-settings/route-20fa0affdf8859be.js +0 -1
  682. package/app/.next/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-20fa0affdf8859be.js +0 -1
  683. package/app/.next/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-20fa0affdf8859be.js +0 -1
  684. package/app/.next/static/chunks/app/api/cli-tools/cowork-settings/route-20fa0affdf8859be.js +0 -1
  685. package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-20fa0affdf8859be.js +0 -1
  686. package/app/.next/static/chunks/app/api/cli-tools/hermes-settings/route-20fa0affdf8859be.js +0 -1
  687. package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-20fa0affdf8859be.js +0 -1
  688. package/app/.next/static/chunks/app/api/cli-tools/opencode-settings/route-20fa0affdf8859be.js +0 -1
  689. package/app/.next/static/chunks/app/api/cloud/auth/route-20fa0affdf8859be.js +0 -1
  690. package/app/.next/static/chunks/app/api/cloud/credentials/update/route-20fa0affdf8859be.js +0 -1
  691. package/app/.next/static/chunks/app/api/cloud/model/resolve/route-20fa0affdf8859be.js +0 -1
  692. package/app/.next/static/chunks/app/api/cloud/models/alias/route-20fa0affdf8859be.js +0 -1
  693. package/app/.next/static/chunks/app/api/combos/[id]/route-20fa0affdf8859be.js +0 -1
  694. package/app/.next/static/chunks/app/api/combos/route-20fa0affdf8859be.js +0 -1
  695. package/app/.next/static/chunks/app/api/health/route-20fa0affdf8859be.js +0 -1
  696. package/app/.next/static/chunks/app/api/init/route-20fa0affdf8859be.js +0 -1
  697. package/app/.next/static/chunks/app/api/keys/[id]/route-20fa0affdf8859be.js +0 -1
  698. package/app/.next/static/chunks/app/api/keys/route-20fa0affdf8859be.js +0 -1
  699. package/app/.next/static/chunks/app/api/locale/route-20fa0affdf8859be.js +0 -1
  700. package/app/.next/static/chunks/app/api/media-providers/tts/deepgram/voices/route-20fa0affdf8859be.js +0 -1
  701. package/app/.next/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-20fa0affdf8859be.js +0 -1
  702. package/app/.next/static/chunks/app/api/media-providers/tts/inworld/voices/route-20fa0affdf8859be.js +0 -1
  703. package/app/.next/static/chunks/app/api/media-providers/tts/voices/route-20fa0affdf8859be.js +0 -1
  704. package/app/.next/static/chunks/app/api/models/alias/route-20fa0affdf8859be.js +0 -1
  705. package/app/.next/static/chunks/app/api/models/availability/route-20fa0affdf8859be.js +0 -1
  706. package/app/.next/static/chunks/app/api/models/custom/route-20fa0affdf8859be.js +0 -1
  707. package/app/.next/static/chunks/app/api/models/disabled/route-20fa0affdf8859be.js +0 -1
  708. package/app/.next/static/chunks/app/api/models/route-20fa0affdf8859be.js +0 -1
  709. package/app/.next/static/chunks/app/api/models/test/route-20fa0affdf8859be.js +0 -1
  710. package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-20fa0affdf8859be.js +0 -1
  711. package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-20fa0affdf8859be.js +0 -1
  712. package/app/.next/static/chunks/app/api/oauth/cursor/import/route-20fa0affdf8859be.js +0 -1
  713. package/app/.next/static/chunks/app/api/oauth/gitlab/pat/route-20fa0affdf8859be.js +0 -1
  714. package/app/.next/static/chunks/app/api/oauth/iflow/cookie/route-20fa0affdf8859be.js +0 -1
  715. package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-20fa0affdf8859be.js +0 -1
  716. package/app/.next/static/chunks/app/api/oauth/kiro/import/route-20fa0affdf8859be.js +0 -1
  717. package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-20fa0affdf8859be.js +0 -1
  718. package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-20fa0affdf8859be.js +0 -1
  719. package/app/.next/static/chunks/app/api/pricing/route-20fa0affdf8859be.js +0 -1
  720. package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-20fa0affdf8859be.js +0 -1
  721. package/app/.next/static/chunks/app/api/provider-nodes/route-20fa0affdf8859be.js +0 -1
  722. package/app/.next/static/chunks/app/api/provider-nodes/validate/route-20fa0affdf8859be.js +0 -1
  723. package/app/.next/static/chunks/app/api/providers/[id]/models/route-20fa0affdf8859be.js +0 -1
  724. package/app/.next/static/chunks/app/api/providers/[id]/route-20fa0affdf8859be.js +0 -1
  725. package/app/.next/static/chunks/app/api/providers/[id]/test/route-20fa0affdf8859be.js +0 -1
  726. package/app/.next/static/chunks/app/api/providers/[id]/test-models/route-20fa0affdf8859be.js +0 -1
  727. package/app/.next/static/chunks/app/api/providers/client/route-20fa0affdf8859be.js +0 -1
  728. package/app/.next/static/chunks/app/api/providers/kilo/free-models/route-20fa0affdf8859be.js +0 -1
  729. package/app/.next/static/chunks/app/api/providers/route-20fa0affdf8859be.js +0 -1
  730. package/app/.next/static/chunks/app/api/providers/suggested-models/route-20fa0affdf8859be.js +0 -1
  731. package/app/.next/static/chunks/app/api/providers/test-batch/route-20fa0affdf8859be.js +0 -1
  732. package/app/.next/static/chunks/app/api/providers/validate/route-20fa0affdf8859be.js +0 -1
  733. package/app/.next/static/chunks/app/api/proxy-pools/[id]/route-20fa0affdf8859be.js +0 -1
  734. package/app/.next/static/chunks/app/api/proxy-pools/[id]/test/route-20fa0affdf8859be.js +0 -1
  735. package/app/.next/static/chunks/app/api/proxy-pools/route-20fa0affdf8859be.js +0 -1
  736. package/app/.next/static/chunks/app/api/proxy-pools/vercel-deploy/route-20fa0affdf8859be.js +0 -1
  737. package/app/.next/static/chunks/app/api/settings/database/route-20fa0affdf8859be.js +0 -1
  738. package/app/.next/static/chunks/app/api/settings/proxy-test/route-20fa0affdf8859be.js +0 -1
  739. package/app/.next/static/chunks/app/api/settings/require-login/route-20fa0affdf8859be.js +0 -1
  740. package/app/.next/static/chunks/app/api/settings/route-20fa0affdf8859be.js +0 -1
  741. package/app/.next/static/chunks/app/api/shutdown/route-20fa0affdf8859be.js +0 -1
  742. package/app/.next/static/chunks/app/api/tags/route-20fa0affdf8859be.js +0 -1
  743. package/app/.next/static/chunks/app/api/translator/console-logs/route-20fa0affdf8859be.js +0 -1
  744. package/app/.next/static/chunks/app/api/translator/console-logs/stream/route-20fa0affdf8859be.js +0 -1
  745. package/app/.next/static/chunks/app/api/translator/load/route-20fa0affdf8859be.js +0 -1
  746. package/app/.next/static/chunks/app/api/translator/save/route-20fa0affdf8859be.js +0 -1
  747. package/app/.next/static/chunks/app/api/translator/send/route-20fa0affdf8859be.js +0 -1
  748. package/app/.next/static/chunks/app/api/translator/translate/route-20fa0affdf8859be.js +0 -1
  749. package/app/.next/static/chunks/app/api/tunnel/disable/route-20fa0affdf8859be.js +0 -1
  750. package/app/.next/static/chunks/app/api/tunnel/enable/route-20fa0affdf8859be.js +0 -1
  751. package/app/.next/static/chunks/app/api/tunnel/status/route-20fa0affdf8859be.js +0 -1
  752. package/app/.next/static/chunks/app/api/tunnel/tailscale-check/route-20fa0affdf8859be.js +0 -1
  753. package/app/.next/static/chunks/app/api/tunnel/tailscale-disable/route-20fa0affdf8859be.js +0 -1
  754. package/app/.next/static/chunks/app/api/tunnel/tailscale-enable/route-20fa0affdf8859be.js +0 -1
  755. package/app/.next/static/chunks/app/api/tunnel/tailscale-install/route-20fa0affdf8859be.js +0 -1
  756. package/app/.next/static/chunks/app/api/tunnel/tailscale-login/route-20fa0affdf8859be.js +0 -1
  757. package/app/.next/static/chunks/app/api/tunnel/tailscale-start-daemon/route-20fa0affdf8859be.js +0 -1
  758. package/app/.next/static/chunks/app/api/usage/[connectionId]/route-20fa0affdf8859be.js +0 -1
  759. package/app/.next/static/chunks/app/api/usage/chart/route-20fa0affdf8859be.js +0 -1
  760. package/app/.next/static/chunks/app/api/usage/history/route-20fa0affdf8859be.js +0 -1
  761. package/app/.next/static/chunks/app/api/usage/providers/route-20fa0affdf8859be.js +0 -1
  762. package/app/.next/static/chunks/app/api/usage/request-details/route-20fa0affdf8859be.js +0 -1
  763. package/app/.next/static/chunks/app/api/usage/request-logs/route-20fa0affdf8859be.js +0 -1
  764. package/app/.next/static/chunks/app/api/usage/stats/route-20fa0affdf8859be.js +0 -1
  765. package/app/.next/static/chunks/app/api/usage/stream/route-20fa0affdf8859be.js +0 -1
  766. package/app/.next/static/chunks/app/api/v1/api/chat/route-20fa0affdf8859be.js +0 -1
  767. package/app/.next/static/chunks/app/api/v1/audio/speech/route-20fa0affdf8859be.js +0 -1
  768. package/app/.next/static/chunks/app/api/v1/audio/transcriptions/route-20fa0affdf8859be.js +0 -1
  769. package/app/.next/static/chunks/app/api/v1/audio/voices/route-20fa0affdf8859be.js +0 -1
  770. package/app/.next/static/chunks/app/api/v1/chat/completions/route-20fa0affdf8859be.js +0 -1
  771. package/app/.next/static/chunks/app/api/v1/embeddings/route-20fa0affdf8859be.js +0 -1
  772. package/app/.next/static/chunks/app/api/v1/images/generations/route-20fa0affdf8859be.js +0 -1
  773. package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-20fa0affdf8859be.js +0 -1
  774. package/app/.next/static/chunks/app/api/v1/messages/route-20fa0affdf8859be.js +0 -1
  775. package/app/.next/static/chunks/app/api/v1/models/[kind]/route-20fa0affdf8859be.js +0 -1
  776. package/app/.next/static/chunks/app/api/v1/models/info/route-20fa0affdf8859be.js +0 -1
  777. package/app/.next/static/chunks/app/api/v1/models/route-20fa0affdf8859be.js +0 -1
  778. package/app/.next/static/chunks/app/api/v1/responses/compact/route-20fa0affdf8859be.js +0 -1
  779. package/app/.next/static/chunks/app/api/v1/responses/route-20fa0affdf8859be.js +0 -1
  780. package/app/.next/static/chunks/app/api/v1/route-20fa0affdf8859be.js +0 -1
  781. package/app/.next/static/chunks/app/api/v1/search/route-20fa0affdf8859be.js +0 -1
  782. package/app/.next/static/chunks/app/api/v1/web/fetch/route-20fa0affdf8859be.js +0 -1
  783. package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-20fa0affdf8859be.js +0 -1
  784. package/app/.next/static/chunks/app/api/v1beta/models/route-20fa0affdf8859be.js +0 -1
  785. package/app/.next/static/chunks/app/api/version/route-20fa0affdf8859be.js +0 -1
  786. package/app/.next/static/chunks/app/api/version/update/route-20fa0affdf8859be.js +0 -1
  787. package/app/.next/static/chunks/app/manifest.webmanifest/route-20fa0affdf8859be.js +0 -1
  788. package/app/.next/static/chunks/app/page-20fa0affdf8859be.js +0 -1
  789. package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-20fa0affdf8859be.js +0 -1
  790. package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-20fa0affdf8859be.js +0 -1
  791. package/app/.next/static/chunks/next/dist/client/components/builtin/not-found-20fa0affdf8859be.js +0 -1
  792. package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-20fa0affdf8859be.js +0 -1
  793. package/app/.next/static/css/5d8cd780e73c8876.css +0 -1
  794. package/app/.next/static/kiS7vH5c59DJK3b2ti1jN/_buildManifest.js +0 -1
  795. package/app/node_modules/better-sqlite3/build/Release/better_sqlite3.node +0 -0
  796. package/app/node_modules/better-sqlite3/lib/database.js +0 -90
  797. package/app/node_modules/better-sqlite3/lib/index.js +0 -3
  798. package/app/node_modules/better-sqlite3/lib/methods/aggregate.js +0 -43
  799. package/app/node_modules/better-sqlite3/lib/methods/backup.js +0 -67
  800. package/app/node_modules/better-sqlite3/lib/methods/function.js +0 -31
  801. package/app/node_modules/better-sqlite3/lib/methods/inspect.js +0 -7
  802. package/app/node_modules/better-sqlite3/lib/methods/pragma.js +0 -12
  803. package/app/node_modules/better-sqlite3/lib/methods/serialize.js +0 -16
  804. package/app/node_modules/better-sqlite3/lib/methods/table.js +0 -189
  805. package/app/node_modules/better-sqlite3/lib/methods/transaction.js +0 -78
  806. package/app/node_modules/better-sqlite3/lib/methods/wrappers.js +0 -54
  807. package/app/node_modules/better-sqlite3/lib/sqlite-error.js +0 -20
  808. package/app/node_modules/better-sqlite3/lib/util.js +0 -12
  809. package/app/node_modules/better-sqlite3/package.json +0 -59
  810. /package/app/.next/static/{kiS7vH5c59DJK3b2ti1jN → eJ_F0cODdJRrmD-63IF09}/_ssgManifest.js +0 -0
@@ -20,4 +20,4 @@ model = "${w}"
20
20
  provider: "custom"
21
21
  base_url: "${U()}"
22
22
  `},{filename:"~/.hermes/.env",content:`OPENAI_API_KEY=${t}
23
- `}])})]})}var w=c(93617);function x({toolId:a,tool:b,isExpanded:c,onToggle:h,baseUrl:i,apiKeys:j,activeProviders:k=[],cloudEnabled:l=!1,tunnelEnabled:m=!1}){let[n,o]=(0,e.useState)(null),[p,q]=(0,e.useState)(!1),[r,s]=(0,e.useState)(""),[t,u]=(0,e.useState)(()=>j?.length>0?j[0].key:""),v=a=>{let b=t&&t.trim()?t:l?"your-api-key":"sk_9router",c=i||"http://127.0.0.1:20128",d=c.endsWith("/v1")?c:`${c}/v1`;return a.replace(/\{\{baseUrl\}\}/g,d).replace(/\{\{apiKey\}\}/g,b).replace(/\{\{model\}\}/g,r||"provider/model-id")},{copy:y}=(0,w.C)(),z=async(a,b)=>{await y(v(a),`toolcard-${b}`),o(b),setTimeout(()=>o(null),2e3)},A=k.length>0,B=()=>(!b.requiresExternalUrl||!!l||!!m)&&(!b.requiresCloud||!!l);return(0,d.jsxs)(f.Zp,{padding:"xs",className:"overflow-hidden overflow-x-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:h,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)(g.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)(g.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||m))return null;let c="warning"===a.type,e="cloudCheck"===a.type&&!l&&!m,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,B()&&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 flex-col sm:flex-row sm:items-center gap-2",children:j&&j.length>0?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("select",{value:t,onChange:a=>u(a.target.value),className:"w-full sm:w-auto 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:()=>z(t,"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"===n?"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 flex-col sm:flex-row sm:items-center gap-2",children:[(0,d.jsx)("input",{type:"text",value:r,onChange:a=>s(a.target.value),placeholder:"provider/model-id",className:"w-full sm:w-auto 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:()=>q(!0),disabled:!A,className:`shrink-0 px-3 py-2 rounded-lg border text-sm transition-colors ${A?"bg-bg-secondary border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),r&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("button",{onClick:()=>z(r,"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"===n?"check":"content_copy"})}),(0,d.jsx)("button",{onClick:()=>s(""),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 flex-col sm:flex-row sm:items-center gap-2",children:[(0,d.jsx)("code",{className:"w-full sm:w-auto flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm font-mono border border-border truncate",children:v(a.value)}),a.copyable&&(0,d.jsx)("button",{onClick:()=>z(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:n===`${a.step}-${a.title}`?"check":"content_copy"})})]})]})]},a.step)),B()&&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:()=>z(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"===n?"check":"content_copy"}),"codeblock"===n?"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:v(b.codeBlock.code)})})]})]}):(0,d.jsx)("p",{className:"text-text-muted text-sm",children:"Coming soon..."})}),(0,d.jsx)(f.rq,{isOpen:p,onClose:()=>q(!1),onSelect:a=>{s(a.value)},selectedModel:r,activeProviders:k,title:"Select Model"})]})}function y({tool:a,isExpanded:b,onToggle:c,baseUrl:h,apiKeys:i,activeProviders:j,cloudEnabled:k,initialStatus:m,tunnelEnabled:o,tunnelPublicUrl:p,tailscaleEnabled:q,tailscaleUrl:r}){let s,t,u,v,w,[x,z]=(0,e.useState)(m||null),[A,B]=(0,e.useState)(!1),[C,D]=(0,e.useState)(!1),[E,F]=(0,e.useState)(!1),[G,H]=(0,e.useState)(null),[I,J]=(0,e.useState)(!1),[K,L]=(0,e.useState)(""),[M,N]=(0,e.useState)(""),[O,P]=(0,e.useState)(""),[Q,R]=(0,e.useState)(!1),[S,T]=(0,e.useState)(!1),[U,V]=(0,e.useState)({}),[W,X]=(0,e.useState)(!1),[Y,Z]=(0,e.useState)(""),[$,_]=(0,e.useState)([]),[aa,ab]=(0,e.useState)(""),ac=x?.installed?x.config&&x.has9Router?n(x.config?.provider?.["9router"]?.options?.baseURL||"",{tunnelPublicUrl:p,tailscaleUrl:r})?"configured":"other":"not_configured":null,ad=()=>{let a=Y||h;return a.endsWith("/v1")?a:`${a}/v1`},ae=K&&!i.some(a=>a.key===K),af=async()=>{B(!0);try{let a=await fetch("/api/cli-tools/opencode-settings"),b=await a.json();z(b)}catch(a){z({installed:!1,error:a.message})}finally{B(!1)}},ag=async()=>{D(!0),H(null);try{let a=K&&K.trim()||k?K:"sk_9router",b=await fetch("/api/cli-tools/opencode-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:ad(),apiKey:a,models:$,activeModel:""===aa?"":aa||$[0],subagentModel:O})}),c=await b.json();b.ok?(H({type:"success",text:"Settings applied successfully!"}),af()):H({type:"error",text:c.error||"Failed to apply settings"})}catch(a){H({type:"error",text:a.message})}finally{D(!1)}},ah=async()=>{F(!0),H(null);try{let a=await fetch("/api/cli-tools/opencode-settings",{method:"DELETE"}),b=await a.json();a.ok?(H({type:"success",text:"Settings reset successfully!"}),N(""),P(""),_([]),ab(""),af()):H({type:"error",text:b.error||"Failed to reset settings"})}catch(a){H({type:"error",text:a.message})}finally{F(!1)}};return(0,d.jsxs)(f.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:c,children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(g.default,{src:"/providers/opencode.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 min-w-0 flex-wrap items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===ac&&(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"===ac&&(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"===ac&&(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:[A&&(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 OpenCode CLI..."})]}),!A&&x&&!x.installed&&(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsxs)("div",{className:"flex items-start gap-3",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:"OpenCode CLI not detected locally"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Manual configuration is still available if 9router is deployed on a remote server."})]})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2 pl-9",children:[(0,d.jsxs)(f.$n,{variant:"secondary",size:"sm",onClick:()=>X(!0),className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:()=>J(!I),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:I?"expand_less":"help"}),I?"Hide":"How to Install"]})]})]}),I&&(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:"}),(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 opencode-ai"})]}),(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:"opencode"})," to verify."]})]})]})]}),!A&&x?.installed&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(l,{value:Y||Y||`${h}/v1`,onChange:Z,requiresExternalUrl:a.requiresExternalUrl,tunnelEnabled:o,tunnelPublicUrl:p,tailscaleEnabled:q,tailscaleUrl:r})]}),x?.config?.provider?.["9router"]?.options?.baseURL&&(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Current"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)("span",{className:"min-w-0 truncate rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5",children:x.config.provider["9router"].options.baseURL})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),i.length>0||K?(0,d.jsxs)("select",{value:K,onChange:a=>L(a.target.value),className:"w-full min-w-0 px-2 py-2 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5",children:[ae&&(0,d.jsx)("option",{value:K,children:K}),i.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))]}):(0,d.jsx)("span",{className:"min-w-0 rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5",children:k?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-start sm:gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right pt-1",children:"Models"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px] mt-1.5",children:"arrow_forward"}),(0,d.jsxs)("div",{className:"flex-1 flex flex-col gap-2",children:[(0,d.jsx)("div",{className:"flex flex-wrap gap-1.5 min-h-[28px] px-2 py-1.5 bg-surface rounded border border-border",children:0===$.length?(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"No models selected"}):$.map(a=>(0,d.jsxs)("span",{onClick:async()=>{if(a===aa)try{(await fetch("/api/cli-tools/opencode-settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({clearActiveModel:!0})})).ok&&(ab(""),af())}catch(a){console.log("Error clearing active model:",a)}else ab(a)},className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs cursor-pointer transition-colors ${a===aa?"bg-primary/10 text-primary border border-primary":"bg-black/5 dark:bg-white/5 text-text-muted border border-transparent hover:border-border"}`,title:a===aa?"Click to clear active model":"Click to set as active",children:[a===aa&&(0,d.jsx)("span",{className:"material-symbols-outlined text-[10px]",children:"star"}),a,(0,d.jsx)("button",{onClick:async b=>{b.stopPropagation();try{if((await fetch(`/api/cli-tools/opencode-settings?model=${encodeURIComponent(a)}`,{method:"DELETE"})).ok){let b=$.filter(b=>b!==a);_(b),aa===a&&ab(""),af()}}catch(a){console.log("Error removing model:",a)}},className:"ml-0.5 hover:text-red-500",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},a))}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("button",{onClick:()=>R(!0),disabled:!j?.length,className:`px-2 py-1 rounded border text-xs transition-colors ${j?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Add Model"}),(0,d.jsx)("span",{className:"text-xs text-text-muted",children:$.length>0&&aa?(0,d.jsxs)(d.Fragment,{children:["Active: ",(0,d.jsx)("span",{className:"text-primary",children:aa})]}):$.length>0?(0,d.jsx)("span",{className:"text-yellow-500",children:"Click a model to set/clear active"}):"Select models to add"})]})]})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Subagent Model"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:O,onChange:a=>P(a.target.value),placeholder:M||"provider/model-id (defaults to main model)",className:"w-full min-w-0 px-2 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5"}),(0,d.jsx)("button",{onClick:()=>T(!0),disabled:!j?.length,className:`w-full sm:w-auto rounded border px-2 py-2 text-xs transition-colors sm:py-1.5 whitespace-nowrap sm:shrink-0 ${j?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),O&&(0,d.jsx)("button",{onClick:()=>P(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear (will use main model)",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),G&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===G.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"===G.type?"check_circle":"error"}),(0,d.jsx)("span",{children:G.text})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:ag,disabled:0===$.length,loading:C,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:ah,disabled:!x.has9Router,loading:E,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:()=>X(!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:Q,onClose:()=>R(!1),onSelect:a=>{!$.includes(a.value)&&(_([...$,a.value]),aa||ab(a.value)),R(!1)},selectedModel:null,activeProviders:j,modelAliases:U,title:"Add Model for OpenCode"}),(0,d.jsx)(f.rq,{isOpen:S,onClose:()=>T(!1),onSelect:a=>{P(a.value),T(!1)},selectedModel:O,activeProviders:j,modelAliases:U,title:"Select Subagent Model for OpenCode"}),(0,d.jsx)(f.uR,{isOpen:W,onClose:()=>X(!1),title:"OpenCode - Manual Configuration",configs:(s=K&&K.trim()?K:k?"<API_KEY_FROM_DASHBOARD>":"sk_9router",t=$.length>0?$:["provider/model-id"],u=aa||$[0]||t[0],v=O||u,w={},t.forEach(a=>{w[a]={name:a}}),[{filename:"~/.config/opencode/opencode.json",content:JSON.stringify({provider:{"9router":{npm:"@ai-sdk/openai-compatible",options:{baseURL:ad(),apiKey:s},models:w}},model:`9router/${u}`,agent:{explorer:{description:"Fast explorer subagent for codebase exploration",mode:"subagent",model:`9router/${v}`}}},null,2)}])})]})}let z="/api/cli-tools/cowork-settings";function A({tool:a,isExpanded:b,onToggle:c,baseUrl:h,apiKeys:i,activeProviders:j,hasActiveProviders:k,cloudEnabled:m,cloudUrl:n,tunnelEnabled:o,tunnelPublicUrl:p,tailscaleEnabled:q,tailscaleUrl:r,initialStatus:s}){let t,u,[v,w]=(0,e.useState)(s||null),[x,y]=(0,e.useState)(!1),[B,C]=(0,e.useState)(!1),[D,E]=(0,e.useState)(!1),[F,G]=(0,e.useState)(null),[H,I]=(0,e.useState)(""),[J,K]=(0,e.useState)([]),[L,M]=(0,e.useState)(!1),[N,O]=(0,e.useState)(""),[P,Q]=(0,e.useState)([]),[R,S]=(0,e.useState)(!1),[T,U]=(0,e.useState)(!1),V=async()=>{y(!0);try{let a=await fetch(z),b=await a.json();w(b)}catch(a){w({installed:!1,error:a.message})}finally{y(!1)}},W=()=>{let a;return(a=(N||"").replace(/\/+$/,""))?/\/v1$/.test(a)?a:`${a}/v1`:""},X=v?.installed?v?.cowork?.baseUrl?v.has9Router?"configured":"other":"not_configured":null,Y=H&&!i.some(a=>a.key===H),Z=async()=>{G(null);let a=W();if(0===J.length)return void G({type:"error",text:"Please select at least one model"});C(!0);try{let b=H?.trim()||(i?.length>0?i[0].key:null)||(m?null:"sk_9router"),c=await fetch(z,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:a,apiKey:b,models:J,plugins:P})}),d=await c.json();c.ok?(G({type:"success",text:"Settings applied. Quit & reopen Claude Desktop to load."}),V()):G({type:"error",text:d.error||"Failed to apply settings"})}catch(a){G({type:"error",text:a.message})}finally{C(!1)}},$=async({name:a,models:b})=>{try{let c=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:a,models:b})});if(!c.ok){let a=await c.json();G({type:"error",text:a.error||"Failed to create combo"});return}J.includes(a)||K([...J,a]),S(!1),G({type:"success",text:`Combo "${a}" created and added.`})}catch(a){G({type:"error",text:a.message})}},_=async()=>{E(!0),G(null);try{let a=await fetch(z,{method:"DELETE"}),b=await a.json();a.ok?(G({type:"success",text:"Settings reset successfully"}),K([]),Q(v?.defaultPlugins||[]),V()):G({type:"error",text:b.error||"Failed to reset"})}catch(a){G({type:"error",text:a.message})}finally{E(!1)}};return(0,d.jsxs)(f.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:c,children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(g.default,{src:a.image,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 min-w-0 flex-wrap items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===X&&(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"===X&&(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"===X&&(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:[x&&(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 Cowork..."})]}),!x&&v&&!v.installed&&(0,d.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsxs)("div",{className:"flex items-start gap-3",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 Desktop (Cowork mode) not detected"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Open Claude Desktop → Help → Troubleshooting → Enable Developer mode → Configure third-party inference, then return here."})]})]}),(0,d.jsx)("div",{className:"pl-9",children:(0,d.jsxs)(f.$n,{variant:"secondary",size:"sm",onClick:()=>M(!0),className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]})})]}),!x&&v?.installed&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(l,{value:W(),onChange:a=>O((a||"").replace(/\/v1\/?$/,"")),tunnelEnabled:o,tunnelPublicUrl:p,tailscaleEnabled:q,tailscaleUrl:r,cloudEnabled:m,cloudUrl:n})]}),v?.cowork?.baseUrl&&(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Current"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)("span",{className:"min-w-0 truncate rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5",children:v.cowork.baseUrl})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),i.length>0||H?(0,d.jsxs)("select",{value:H,onChange:a=>I(a.target.value),className:"w-full min-w-0 px-2 py-2 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5",children:[Y&&(0,d.jsx)("option",{value:H,children:H}),i.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))]}):(0,d.jsx)("span",{className:"min-w-0 rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5",children:m?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-start sm:gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right pt-1",children:"Models"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px] mt-1.5",children:"arrow_forward"}),(0,d.jsxs)("div",{className:"flex-1 flex flex-col gap-2",children:[(0,d.jsx)("div",{className:"flex flex-wrap gap-1.5 min-h-[28px] px-2 py-1.5 bg-surface rounded border border-border",children:0===J.length?(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"No models selected"}):J.map(a=>(0,d.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs bg-black/5 dark:bg-white/5 text-text-muted border border-transparent hover:border-border",children:[a,(0,d.jsx)("button",{onClick:()=>K(b=>b.filter(b=>b!==a)),className:"ml-0.5 hover:text-red-500",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},a))}),(0,d.jsx)("button",{onClick:()=>S(!0),disabled:!k,className:`self-start px-2 py-1 rounded border text-xs transition-colors ${k?"bg-primary/10 border-primary/40 text-primary hover:bg-primary/20 cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"+ Add Combo (claude-)"})]})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-start sm:gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right pt-1",children:"Plugins"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px] mt-1.5",children:"arrow_forward"}),(0,d.jsxs)("div",{className:"flex-1 flex flex-col gap-2",children:[(0,d.jsx)("div",{className:"flex flex-wrap gap-1.5 min-h-[28px] px-2 py-1.5 bg-surface rounded border border-border",children:0===P.filter(a=>"exa"!==a.name).length?(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"No plugins"}):P.filter(a=>"exa"!==a.name).map(a=>(0,d.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs bg-black/5 dark:bg-white/5 text-text-muted border border-transparent hover:border-border",children:[a.title||a.name,a.oauth&&(0,d.jsx)("span",{className:"text-[8px] text-amber-600",children:"OAuth"}),(0,d.jsx)("button",{onClick:()=>{var b;return b=a.name,void Q(P.filter(a=>a.name!==b))},className:"ml-0.5 hover:text-red-500",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},a.name))}),(0,d.jsx)("button",{onClick:()=>U(!0),className:"self-start px-2 py-1 rounded border text-xs bg-primary/10 border-primary/40 text-primary hover:bg-primary/20 cursor-pointer",children:"+ Browse MCP marketplace"}),(0,d.jsxs)("p",{className:"text-[10px] text-text-muted leading-snug",children:["\uD83D\uDCA1 Exa is auto-installed. Prefer ",(0,d.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/5",children:"web_search_exa"})," for web search and ",(0,d.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/5",children:"web_fetch_exa"})," for reading pages."]})]})]})]}),F&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===F.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"===F.type?"check_circle":"error"}),(0,d.jsx)("span",{children:F.text})]}),(0,d.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center gap-2",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:Z,disabled:0===J.length,loading:B,className:"w-full sm:w-auto",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:_,disabled:!v.has9Router,loading:D,className:"w-full sm:w-auto",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:()=>M(!0),className:"w-full sm:w-auto",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,d.jsx)(f.uR,{isOpen:L,onClose:()=>M(!1),title:"Claude Cowork - Manual Configuration",configs:(t=H&&H.trim()?H:m?"<API_KEY_FROM_DASHBOARD>":"sk_9router",u=J.length>0?J:["provider/model-id"],[{filename:"~/Library/Application Support/Claude-3p/configLibrary/<appliedId>.json",content:JSON.stringify({inferenceProvider:"gateway",inferenceGatewayBaseUrl:W()||"https://your-public-host/v1",inferenceGatewayApiKey:t,inferenceModels:u.map(a=>({name:a}))},null,2)}])}),(0,d.jsx)(f.CK,{isOpen:R,combo:null,onClose:()=>S(!1),onSave:$,activeProviders:j,forcePrefix:"claude-",title:"Create Cowork Combo"}),(0,d.jsx)(f.Nf,{isOpen:T,onClose:()=>U(!1),onAdd:a=>{P.some(b=>b.name===a.name)||Q([...P,a])},addedNames:P.map(a=>a.name)})]})}function B({tool:a,isExpanded:b,onToggle:c,baseUrl:h,apiKeys:i,activeProviders:j,cloudEnabled:k,initialStatus:m,tunnelEnabled:o,tunnelPublicUrl:p,tailscaleEnabled:q,tailscaleUrl:r}){let s,t,[u,v]=(0,e.useState)(m||null),[w,x]=(0,e.useState)(!1),[y,z]=(0,e.useState)(!1),[A,C]=(0,e.useState)(!1),[D,E]=(0,e.useState)(null),[F,G]=(0,e.useState)(""),[H,I]=(0,e.useState)(""),[J,K]=(0,e.useState)({}),[L,M]=(0,e.useState)(!1),[N,O]=(0,e.useState)([]),[P,Q]=(0,e.useState)(!1),R=u?u.has9Router?n(u.currentUrl||"",{tunnelPublicUrl:p,tailscaleUrl:r})?"configured":"other":"not_configured":null,S=()=>{let a=H||h;return a.endsWith("/v1")?a:`${a}/v1`},T=F&&!i.some(a=>a.key===F),U=async()=>{x(!0);try{let a=await fetch("/api/cli-tools/copilot-settings"),b=await a.json();v(b)}catch(a){v({error:a.message})}finally{x(!1)}},V=async()=>{z(!0),E(null);try{let a=F&&F.trim()||k?F:"sk_9router",b=await fetch("/api/cli-tools/copilot-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:S(),apiKey:a,models:N})}),c=await b.json();b.ok?(E({type:"success",text:c.message||"Settings applied! Reload VS Code."}),U()):E({type:"error",text:c.error||"Failed to apply settings"})}catch(a){E({type:"error",text:a.message})}finally{z(!1)}},W=async()=>{C(!0),E(null);try{let a=await fetch("/api/cli-tools/copilot-settings",{method:"DELETE"}),b=await a.json();a.ok?(E({type:"success",text:"Settings reset successfully!"}),O([]),U()):E({type:"error",text:b.error||"Failed to reset settings"})}catch(a){E({type:"error",text:a.message})}finally{C(!1)}};return(0,d.jsxs)(f.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:c,children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(g.default,{src:"/providers/copilot.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 min-w-0 flex-wrap items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===R&&(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"===R&&(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"===R&&(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:[w&&(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 Copilot config..."})]}),!w&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-blue-500/10 border border-blue-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-blue-500 text-lg",children:"info"}),(0,d.jsxs)("div",{className:"text-xs text-blue-700 dark:text-blue-300",children:[(0,d.jsxs)("p",{className:"font-medium",children:["Writes to ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/10 rounded",children:"chatLanguageModels.json"})]}),(0,d.jsx)("p",{className:"mt-0.5 opacity-80",children:"Reload VS Code after applying for changes to take effect."})]})]}),(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(l,{value:H||H||`${h}/v1`,onChange:I,requiresExternalUrl:a.requiresExternalUrl,tunnelEnabled:o,tunnelPublicUrl:p,tailscaleEnabled:q,tailscaleUrl:r})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),i.length>0||F?(0,d.jsxs)("select",{value:F,onChange:a=>G(a.target.value),className:"w-full min-w-0 px-2 py-2 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5",children:[T&&(0,d.jsx)("option",{value:F,children:F}),i.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))]}):(0,d.jsx)("span",{className:"min-w-0 rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5",children:k?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-start sm:gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right pt-1",children:"Models"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px] mt-1.5",children:"arrow_forward"}),(0,d.jsxs)("div",{className:"flex-1 flex flex-col gap-2",children:[(0,d.jsx)("div",{className:"flex flex-wrap gap-1.5 min-h-[28px] px-2 py-1.5 bg-surface rounded border border-border",children:0===N.length?(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"No models selected"}):N.map(a=>(0,d.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs bg-black/5 dark:bg-white/5 text-text-muted border border-transparent hover:border-border",children:[a,(0,d.jsx)("button",{onClick:b=>{b.stopPropagation(),O(b=>b.filter(b=>b!==a))},className:"ml-0.5 hover:text-red-500",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},a))}),(0,d.jsx)("div",{children:(0,d.jsx)("button",{onClick:()=>Q(!0),disabled:!j?.length,className:`px-2 py-1 rounded border text-xs transition-colors ${j?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Add Model"})})]})]})]}),D&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===D.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"===D.type?"check_circle":"error"}),(0,d.jsx)("span",{children:D.text})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:V,disabled:0===N.length,loading:y,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:W,disabled:!u?.has9Router,loading:A,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:()=>M(!0),disabled:0===N.length,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,d.jsx)(f.rq,{isOpen:P,onClose:()=>Q(!1),onSelect:a=>{N.includes(a.value)||O([...N,a.value]),Q(!1)},selectedModel:null,activeProviders:j,modelAliases:J,title:"Add Model for GitHub Copilot"}),(0,d.jsx)(f.uR,{isOpen:L,onClose:()=>M(!1),title:"GitHub Copilot - Manual Configuration",configs:(s=F&&F.trim()?F:k?"<API_KEY_FROM_DASHBOARD>":"sk_9router",t=S(),[{filename:"~/Library/Application Support/Code/User/chatLanguageModels.json",content:JSON.stringify([{name:"9Router",vendor:"azure",apiKey:s,models:(N.length>0?N:["provider/model-id"]).map(a=>({id:a,name:a,url:`${t}/chat/completions#models.ai.azure.com`,toolCalling:!0,vision:!1,maxInputTokens:128e3,maxOutputTokens:16e3}))}],null,2)}])})]})}let C="http://127.0.0.1:20128";function D({apiKeys:a,cloudEnabled:b,onStatusChange:c}){let[g,h]=(0,e.useState)(null),[i,j]=(0,e.useState)(!1),[k,l]=(0,e.useState)(!1),[m,n]=(0,e.useState)(""),[o,p]=(0,e.useState)(()=>a?.[0]?.key||""),[q,r]=(0,e.useState)(null),[s,t]=(0,e.useState)(null),[u,v]=(0,e.useState)(null),[w,x]=(0,e.useState)(C),[y,z]=(0,e.useState)(null),A=g?.isWin===!0,B=A||g?.hasCachedPassword||g?.needsSudoPassword===!1,E=g?.isAdmin!==!1;!E&&(A||g?.hasCachedPassword||g?.needsSudoPassword);let F=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/cli-tools/antigravity-mitm");if(a.ok){let b=await a.json();h(b),b.mitmRouterBaseUrl&&x(b.mitmRouterBaseUrl),c?.(b)}}catch{h({running:!1,certExists:!1,dnsStatus:{}})}},[c]),G=a=>{v(null),g&&(B?H(a,""):(r(a),l(!0),t(null)))},H=async(c,d,e=!1)=>{j(!0),v(null);try{let f;if("trust-cert"===c)f=await fetch("/api/cli-tools/antigravity-mitm",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"trust-cert",sudoPassword:d})});else if("start"===c){let c=o?.trim()||(a?.length>0?a[0].key:null)||(b?null:"sk_9router");f=await fetch("/api/cli-tools/antigravity-mitm",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:c,sudoPassword:d,mitmRouterBaseUrl:w.trim()||C,forceKillPort443:e})})}else f=await fetch("/api/cli-tools/antigravity-mitm",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({sudoPassword:d})});if(!f.ok){let a=await f.json().catch(()=>({}));if("PORT_443_BUSY"===a.code&&a.portOwner){l(!1),z({owner:a.portOwner,password:d});return}v(a.error||`Failed to ${c} MITM server`);return}l(!1),n(""),z(null),await F()}catch(a){v(a.message||"Network error")}finally{j(!1),r(null)}},I=()=>{m.trim()?H(q,m):t("Sudo password is required")},J=g?.running;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(f.Zp,{padding:"sm",className:"border-primary/20 bg-primary/5",children:(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-primary text-[20px]",children:"security"}),(0,d.jsx)("span",{className:"font-semibold text-sm text-text-main",children:"MITM Server"}),J?(0,d.jsx)(f.Ex,{variant:"success",size:"sm",children:"Running"}):(0,d.jsx)(f.Ex,{variant:"default",size:"sm",children:"Stopped"})]}),(0,d.jsx)("div",{className:"flex flex-wrap items-center gap-1 text-xs text-text-muted","data-i18n-skip":"true",children:[{label:"Cert",ok:g?.certExists},{label:"Trusted",ok:g?.certTrusted},{label:"Server",ok:J}].map(({label:a,ok:b})=>(0,d.jsxs)("span",{className:`flex items-center gap-0.5 px-1.5 py-0.5 rounded ${b?"text-green-600":"text-text-muted"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:b?"check_circle":"cancel"}),a]},a))})]}),(0,d.jsxs)("div",{className:"px-2 py-2 rounded-lg bg-surface/50 border border-border/50 flex flex-col gap-2",children:[(0,d.jsxs)("p",{className:"text-[11px] text-text-muted leading-relaxed",children:[(0,d.jsx)("span",{className:"font-medium text-text-main",children:"Purpose:"})," Use Antigravity IDE & GitHub Copilot → with ANY provider/model from 9Router"]}),(0,d.jsxs)("p",{className:"text-[11px] text-text-muted leading-relaxed",children:[(0,d.jsx)("span",{className:"font-medium text-text-main",children:"How it works:"})," Antigravity/Copilot IDE request → DNS redirect to localhost:443 → MITM proxy intercepts → 9Router → response to Antigravity/Copilot"]})]}),(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"grid gap-1 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"9Router Base URL"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:w,onChange:a=>x(a.target.value),placeholder:C,disabled:J,className:"flex-1 min-w-0 px-2 py-1.5 bg-surface rounded border border-border text-xs text-text-main focus:outline-none focus:ring-1 focus:ring-primary/50 disabled:opacity-50"})]}),!J&&(0,d.jsxs)("div",{className:"grid gap-1 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",list:"mitm-api-keys",value:o,onChange:a=>p(a.target.value),placeholder:b?"Enter or pick API key":"sk_9router (default)",className:"flex-1 min-w-0 px-2 py-1.5 bg-surface rounded border border-border text-xs text-text-main focus:outline-none focus:ring-1 focus:ring-primary/50"}),a?.length>0&&(0,d.jsx)("datalist",{id:"mitm-api-keys",children:a.map(a=>(0,d.jsx)("option",{value:a.key,children:a.name||a.key},a.id))})]})]}),(0,d.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:flex-wrap sm:items-center","data-i18n-skip":"true",children:[g?.certExists&&!g?.certTrusted&&(0,d.jsxs)("button",{onClick:()=>G("trust-cert"),disabled:i,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-yellow-500/30 bg-yellow-500/10 px-4 py-2 text-xs font-medium text-yellow-600 transition-colors hover:bg-yellow-500/20 disabled:opacity-50 sm:w-auto sm:py-1.5",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"verified_user"}),"Trust Cert"]}),J?(0,d.jsxs)("button",{onClick:()=>G("stop"),disabled:i,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-red-500/30 bg-red-500/10 px-4 py-2 text-xs font-medium text-red-500 transition-colors hover:bg-red-500/20 disabled:opacity-50 sm:w-auto sm:py-1.5",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"stop_circle"}),"Stop Server"]}):(0,d.jsxs)("button",{onClick:()=>G("start"),disabled:i||!g||A&&!E,title:A&&!E?"Administrator required":void 0,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-primary/30 bg-primary/10 px-4 py-2 text-xs font-medium text-primary transition-colors hover:bg-primary/20 disabled:opacity-50 sm:w-auto sm:py-1.5",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"play_circle"}),"Start Server"]}),J&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Enable DNS per tool below to activate interception"})]}),u&&(0,d.jsxs)("div",{className:"flex items-start gap-2 px-2 py-1.5 rounded text-xs bg-red-500/10 text-red-600 dark:text-red-400 border border-red-500/20",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mt-0.5 shrink-0",children:"error"}),(0,d.jsx)("span",{children:u})]}),A&&!E&&(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 border border-red-500/20",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"shield_lock"}),(0,d.jsx)("span",{children:"Administrator required — restart 9Router as Administrator to use MITM"})]})]})}),k&&(0,d.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",children:(0,d.jsxs)("div",{className:"mx-4 flex w-full max-w-sm flex-col gap-4 rounded-xl border border-border bg-surface p-5 shadow-xl sm:p-6",children:[(0,d.jsx)("h3",{className:"font-semibold text-text-main",children:"Sudo Password Required"}),(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 server startup"})]}),(0,d.jsx)(f.pd,{type:"password",placeholder:"Enter sudo password",value:m,onChange:a=>n(a.target.value),onKeyDown:a=>{"Enter"!==a.key||i||I()}}),s&&(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:s})]}),(0,d.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,d.jsx)(f.$n,{variant:"ghost",size:"sm",onClick:()=>{l(!1),n(""),t(null)},disabled:i,children:"Cancel"}),(0,d.jsx)(f.$n,{variant:"primary",size:"sm",onClick:I,loading:i,children:"Confirm"})]})]})}),y&&(0,d.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",children:(0,d.jsxs)("div",{className:"mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border border-border bg-surface p-5 shadow-xl sm:p-6",children:[(0,d.jsx)("h3",{className:"font-semibold text-text-main",children:"Port 443 Already In Use"}),(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.jsxs)("div",{className:"flex flex-col gap-1 text-xs text-text-muted",children:[(0,d.jsx)("p",{children:"Port 443 đang bị process kh\xe1c chiếm:"}),(0,d.jsxs)("p",{className:"font-mono text-text-main","data-i18n-skip":"true",children:[y.owner.name," (PID ",y.owner.pid,")"]}),(0,d.jsx)("p",{children:"Kill process n\xe0y để chạy MITM Server?"})]})]}),(0,d.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,d.jsx)(f.$n,{variant:"ghost",size:"sm",onClick:()=>{z(null),j(!1)},disabled:i,children:"Cancel"}),(0,d.jsx)(f.$n,{variant:"primary",size:"sm",onClick:()=>{H("start",y?.password||"",!0)},loading:i,children:"Kill & Start"})]})]})})]})}var E=c(5683);function F({tool:a,isExpanded:b,onToggle:c,serverRunning:h,dnsActive:i,hasCachedPassword:j,needsSudoPassword:k,isWin:l,apiKeys:m,activeProviders:n,hasActiveProviders:o,modelAliases:p={},cloudEnabled:q,onDnsChange:r}){let[s,t]=(0,e.useState)(!1),[u,v]=(0,e.useState)(null),[w,x]=(0,e.useState)(!1),[y,z]=(0,e.useState)(""),[A,B]=(0,e.useState)(null),[C,D]=(0,e.useState)(null),[G,H]=(0,e.useState)({}),[I,J]=(0,e.useState)(!1),[K,L]=(0,e.useState)(null),M=E.TOOL_HOSTS[a.id]??[],N=l||j||!1===k,O=(0,e.useCallback)(async b=>{try{await fetch("/api/cli-tools/antigravity-mitm/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:a.id,mappings:b})})}catch{}},[a.id]),P=(a,b)=>{H(c=>({...c,[a]:b}))},Q=()=>{if(!h)return;let a=i?"disable":"enable";N?R(a,""):(B(a),x(!0),D(null))},R=async(b,c)=>{t(!0),v(null);try{let d=await fetch("/api/cli-tools/antigravity-mitm",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:a.id,action:b,sudoPassword:c})}),e=await d.json();if(!d.ok)throw Error(e.error||"Failed to toggle DNS");"enable"===b&&v(`Restart ${a.name} to apply changes`),x(!1),z(""),r?.(e)}catch{}finally{t(!1),B(null)}},S=()=>{y.trim()?R(A,y):D("Sudo password is required")};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(f.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:c,children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(g.default,{src:a.image,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 flex-wrap items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),h?i?(0,d.jsx)(f.Ex,{variant:"success",size:"sm",children:"Active"}):(0,d.jsx)(f.Ex,{variant:"warning",size:"sm",children:"DNS off"}):(0,d.jsx)(f.Ex,{variant:"default",size:"sm",children:"Server off"})]}),(0,d.jsxs)("p",{className:"text-xs text-text-muted sm:truncate",children:["Intercept ",a.name," requests via MITM proxy"]})]})]}),(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:[M.length>0&&(0,d.jsxs)("div",{className:"mt-2 rounded-md border border-border bg-surface/50 px-2 py-1.5",children:[(0,d.jsx)("p",{className:"text-[10px] font-medium tracking-wide text-text-main/80 mb-1",children:"Edit hosts file manually to add the following entries:"}),(0,d.jsx)("ul",{className:"list-none space-y-0.5 font-mono text-[10px] text-text-muted break-all",children:M.map(a=>(0,d.jsxs)("li",{children:["127.0.0.1 ",a]},a))})]}),(0,d.jsxs)("div",{className:"flex flex-col gap-0.5 text-[11px] text-text-muted px-1",children:[(0,d.jsxs)("p",{children:["Toggle DNS to redirect ",a.name," traffic through 9Router via MITM."]}),!i&&(0,d.jsx)("p",{className:"text-amber-600 text-[10px] mt-1",children:"⚠️ Enable DNS to edit model mappings"})]}),a.defaultModels?.length>0&&(0,d.jsx)("div",{className:"flex flex-col gap-2",children:a.defaultModels.map(a=>(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[9rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right",children:a.name}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsxs)("div",{className:"relative w-full min-w-0",children:[(0,d.jsx)("input",{type:"text",value:G[a.alias]||"",onChange:b=>P(a.alias,b.target.value),onBlur:b=>{var c,d;return c=a.alias,d=b.target.value,void O({...G,[c]:d})},placeholder:"provider/model-id",disabled:!i,className:`w-full min-w-0 pl-2 pr-7 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5 ${!i?"opacity-50 cursor-not-allowed":""}`}),G[a.alias]&&(0,d.jsx)("button",{onClick:()=>{P(a.alias,""),O({...G,[a.alias]:""})},className:"absolute right-1 top-1/2 -translate-y-1/2 p-0.5 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"})})]}),(0,d.jsx)("button",{onClick:()=>{L(a.alias),J(!0)},disabled:!o||!i,className:`rounded border px-2 py-2 text-xs transition-colors sm:py-1.5 ${o&&i?"bg-surface border-border hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select"})]},a.alias))}),a.defaultModels?.length===0&&(0,d.jsx)("p",{className:"text-xs text-text-muted px-1",children:"Model mappings will be available soon."}),(0,d.jsxs)("div",{className:"flex flex-col gap-2 sm:items-start",children:[i?(0,d.jsxs)("button",{onClick:Q,disabled:!h||s,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-red-500/30 bg-red-500/10 px-4 py-2 text-xs font-medium text-red-500 transition-colors hover:bg-red-500/20 disabled:cursor-not-allowed disabled:opacity-50 sm:w-auto sm:py-1.5",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"stop_circle"}),"Stop DNS"]}):(0,d.jsxs)("button",{onClick:Q,disabled:!h||s,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-primary/30 bg-primary/10 px-4 py-2 text-xs font-medium text-primary transition-colors hover:bg-primary/20 disabled:cursor-not-allowed disabled:opacity-50 sm:w-auto sm:py-1.5",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"play_circle"}),"Start DNS"]}),u&&(0,d.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 rounded text-xs text-amber-500",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"warning"}),(0,d.jsx)("span",{children:u})]})]})]})]}),w&&(0,d.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",children:(0,d.jsxs)("div",{className:"mx-4 flex w-full max-w-sm flex-col gap-4 rounded-xl border border-border bg-surface p-5 shadow-xl sm:p-6",children:[(0,d.jsx)("h3",{className:"font-semibold text-text-main",children:"Sudo Password Required"}),(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 to modify /etc/hosts and flush DNS cache"})]}),(0,d.jsx)(f.pd,{type:"password",placeholder:"Enter sudo password",value:y,onChange:a=>z(a.target.value),onKeyDown:a=>{"Enter"!==a.key||s||S()}}),C&&(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:C})]}),(0,d.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,d.jsx)(f.$n,{variant:"ghost",size:"sm",onClick:()=>{x(!1),z(""),D(null)},disabled:s,children:"Cancel"}),(0,d.jsx)(f.$n,{variant:"primary",size:"sm",onClick:S,loading:s,children:"Confirm"})]})]})}),(0,d.jsx)(f.rq,{isOpen:I,onClose:()=>J(!1),onSelect:a=>{if(!K||a.isPlaceholder)return;let b={...G,[K]:a.value};H(b),O(b)},selectedModel:K?G[K]:null,activeProviders:n,modelAliases:p,title:`Select model for ${K}`})]})}var G=c(30978),H=c.n(G);function I({tool:a}){return(0,d.jsx)(H(),{href:"/dashboard/mitm",className:"block",children:(0,d.jsx)(f.Zp,{padding:"sm",className:"overflow-hidden hover:border-primary/50 transition-colors cursor-pointer",children:(0,d.jsxs)("div",{className:"flex items-center justify-between",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)(g.default,{src:a.image,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}),(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-purple-500/10 text-purple-600 dark:text-purple-400 rounded-full",children:"MITM"})]}),(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]",children:"chevron_right"})]})})})}}};
23
+ `}])})]})}var w=c(93617);function x({toolId:a,tool:b,isExpanded:c,onToggle:h,baseUrl:i,apiKeys:j,activeProviders:k=[],cloudEnabled:l=!1,tunnelEnabled:m=!1}){let[n,o]=(0,e.useState)(null),[p,q]=(0,e.useState)(!1),[r,s]=(0,e.useState)(""),[t,u]=(0,e.useState)(()=>j?.length>0?j[0].key:""),v=a=>{let b=t&&t.trim()?t:l?"your-api-key":"sk_9router",c=i||"http://localhost:20128",d=c.endsWith("/v1")?c:`${c}/v1`;return a.replace(/\{\{baseUrl\}\}/g,d).replace(/\{\{apiKey\}\}/g,b).replace(/\{\{model\}\}/g,r||"provider/model-id")},{copy:y}=(0,w.C)(),z=async(a,b)=>{await y(v(a),`toolcard-${b}`),o(b),setTimeout(()=>o(null),2e3)},A=k.length>0,B=()=>(!b.requiresExternalUrl||!!l||!!m)&&(!b.requiresCloud||!!l);return(0,d.jsxs)(f.Zp,{padding:"xs",className:"overflow-hidden overflow-x-hidden",children:[(0,d.jsxs)("div",{className:"flex items-center justify-between hover:cursor-pointer",onClick:h,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)(g.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)(g.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||m))return null;let c="warning"===a.type,e="cloudCheck"===a.type&&!l&&!m,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,B()&&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 flex-col sm:flex-row sm:items-center gap-2",children:j&&j.length>0?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("select",{value:t,onChange:a=>u(a.target.value),className:"w-full sm:w-auto 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:()=>z(t,"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"===n?"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 flex-col sm:flex-row sm:items-center gap-2",children:[(0,d.jsx)("input",{type:"text",value:r,onChange:a=>s(a.target.value),placeholder:"provider/model-id",className:"w-full sm:w-auto 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:()=>q(!0),disabled:!A,className:`shrink-0 px-3 py-2 rounded-lg border text-sm transition-colors ${A?"bg-bg-secondary border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),r&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("button",{onClick:()=>z(r,"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"===n?"check":"content_copy"})}),(0,d.jsx)("button",{onClick:()=>s(""),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 flex-col sm:flex-row sm:items-center gap-2",children:[(0,d.jsx)("code",{className:"w-full sm:w-auto flex-1 px-3 py-2 bg-bg-secondary rounded-lg text-sm font-mono border border-border truncate",children:v(a.value)}),a.copyable&&(0,d.jsx)("button",{onClick:()=>z(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:n===`${a.step}-${a.title}`?"check":"content_copy"})})]})]})]},a.step)),B()&&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:()=>z(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"===n?"check":"content_copy"}),"codeblock"===n?"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:v(b.codeBlock.code)})})]})]}):(0,d.jsx)("p",{className:"text-text-muted text-sm",children:"Coming soon..."})}),(0,d.jsx)(f.rq,{isOpen:p,onClose:()=>q(!1),onSelect:a=>{s(a.value)},selectedModel:r,activeProviders:k,title:"Select Model"})]})}function y({tool:a,isExpanded:b,onToggle:c,baseUrl:h,apiKeys:i,activeProviders:j,cloudEnabled:k,initialStatus:m,tunnelEnabled:o,tunnelPublicUrl:p,tailscaleEnabled:q,tailscaleUrl:r}){let s,t,u,v,w,[x,z]=(0,e.useState)(m||null),[A,B]=(0,e.useState)(!1),[C,D]=(0,e.useState)(!1),[E,F]=(0,e.useState)(!1),[G,H]=(0,e.useState)(null),[I,J]=(0,e.useState)(!1),[K,L]=(0,e.useState)(""),[M,N]=(0,e.useState)(""),[O,P]=(0,e.useState)(""),[Q,R]=(0,e.useState)(!1),[S,T]=(0,e.useState)(!1),[U,V]=(0,e.useState)({}),[W,X]=(0,e.useState)(!1),[Y,Z]=(0,e.useState)(""),[$,_]=(0,e.useState)([]),[aa,ab]=(0,e.useState)(""),ac=x?.installed?x.config&&x.has9Router?n(x.config?.provider?.["9router"]?.options?.baseURL||"",{tunnelPublicUrl:p,tailscaleUrl:r})?"configured":"other":"not_configured":null,ad=()=>{let a=Y||h;return a.endsWith("/v1")?a:`${a}/v1`},ae=K&&!i.some(a=>a.key===K),af=async()=>{B(!0);try{let a=await fetch("/api/cli-tools/opencode-settings"),b=await a.json();z(b)}catch(a){z({installed:!1,error:a.message})}finally{B(!1)}},ag=async()=>{D(!0),H(null);try{let a=K&&K.trim()||k?K:"sk_9router",b=await fetch("/api/cli-tools/opencode-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:ad(),apiKey:a,models:$,activeModel:""===aa?"":aa||$[0],subagentModel:O})}),c=await b.json();b.ok?(H({type:"success",text:"Settings applied successfully!"}),af()):H({type:"error",text:c.error||"Failed to apply settings"})}catch(a){H({type:"error",text:a.message})}finally{D(!1)}},ah=async()=>{F(!0),H(null);try{let a=await fetch("/api/cli-tools/opencode-settings",{method:"DELETE"}),b=await a.json();a.ok?(H({type:"success",text:"Settings reset successfully!"}),N(""),P(""),_([]),ab(""),af()):H({type:"error",text:b.error||"Failed to reset settings"})}catch(a){H({type:"error",text:a.message})}finally{F(!1)}};return(0,d.jsxs)(f.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:c,children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(g.default,{src:"/providers/opencode.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 min-w-0 flex-wrap items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===ac&&(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"===ac&&(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"===ac&&(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:[A&&(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 OpenCode CLI..."})]}),!A&&x&&!x.installed&&(0,d.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsxs)("div",{className:"flex items-start gap-3",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:"OpenCode CLI not detected locally"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Manual configuration is still available if 9router is deployed on a remote server."})]})]}),(0,d.jsxs)("div",{className:"flex items-center gap-2 pl-9",children:[(0,d.jsxs)(f.$n,{variant:"secondary",size:"sm",onClick:()=>X(!0),className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]}),(0,d.jsxs)(f.$n,{variant:"outline",size:"sm",onClick:()=>J(!I),children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:I?"expand_less":"help"}),I?"Hide":"How to Install"]})]})]}),I&&(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:"}),(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 opencode-ai"})]}),(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:"opencode"})," to verify."]})]})]})]}),!A&&x?.installed&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(l,{value:Y||Y||`${h}/v1`,onChange:Z,requiresExternalUrl:a.requiresExternalUrl,tunnelEnabled:o,tunnelPublicUrl:p,tailscaleEnabled:q,tailscaleUrl:r})]}),x?.config?.provider?.["9router"]?.options?.baseURL&&(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Current"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)("span",{className:"min-w-0 truncate rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5",children:x.config.provider["9router"].options.baseURL})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),i.length>0||K?(0,d.jsxs)("select",{value:K,onChange:a=>L(a.target.value),className:"w-full min-w-0 px-2 py-2 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5",children:[ae&&(0,d.jsx)("option",{value:K,children:K}),i.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))]}):(0,d.jsx)("span",{className:"min-w-0 rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5",children:k?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-start sm:gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right pt-1",children:"Models"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px] mt-1.5",children:"arrow_forward"}),(0,d.jsxs)("div",{className:"flex-1 flex flex-col gap-2",children:[(0,d.jsx)("div",{className:"flex flex-wrap gap-1.5 min-h-[28px] px-2 py-1.5 bg-surface rounded border border-border",children:0===$.length?(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"No models selected"}):$.map(a=>(0,d.jsxs)("span",{onClick:async()=>{if(a===aa)try{(await fetch("/api/cli-tools/opencode-settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({clearActiveModel:!0})})).ok&&(ab(""),af())}catch(a){console.log("Error clearing active model:",a)}else ab(a)},className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs cursor-pointer transition-colors ${a===aa?"bg-primary/10 text-primary border border-primary":"bg-black/5 dark:bg-white/5 text-text-muted border border-transparent hover:border-border"}`,title:a===aa?"Click to clear active model":"Click to set as active",children:[a===aa&&(0,d.jsx)("span",{className:"material-symbols-outlined text-[10px]",children:"star"}),a,(0,d.jsx)("button",{onClick:async b=>{b.stopPropagation();try{if((await fetch(`/api/cli-tools/opencode-settings?model=${encodeURIComponent(a)}`,{method:"DELETE"})).ok){let b=$.filter(b=>b!==a);_(b),aa===a&&ab(""),af()}}catch(a){console.log("Error removing model:",a)}},className:"ml-0.5 hover:text-red-500",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},a))}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("button",{onClick:()=>R(!0),disabled:!j?.length,className:`px-2 py-1 rounded border text-xs transition-colors ${j?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Add Model"}),(0,d.jsx)("span",{className:"text-xs text-text-muted",children:$.length>0&&aa?(0,d.jsxs)(d.Fragment,{children:["Active: ",(0,d.jsx)("span",{className:"text-primary",children:aa})]}):$.length>0?(0,d.jsx)("span",{className:"text-yellow-500",children:"Click a model to set/clear active"}):"Select models to add"})]})]})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Subagent Model"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:O,onChange:a=>P(a.target.value),placeholder:M||"provider/model-id (defaults to main model)",className:"w-full min-w-0 px-2 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5"}),(0,d.jsx)("button",{onClick:()=>T(!0),disabled:!j?.length,className:`w-full sm:w-auto rounded border px-2 py-2 text-xs transition-colors sm:py-1.5 whitespace-nowrap sm:shrink-0 ${j?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select Model"}),O&&(0,d.jsx)("button",{onClick:()=>P(""),className:"p-1 text-text-muted hover:text-red-500 rounded transition-colors",title:"Clear (will use main model)",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})]}),G&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===G.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"===G.type?"check_circle":"error"}),(0,d.jsx)("span",{children:G.text})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:ag,disabled:0===$.length,loading:C,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:ah,disabled:!x.has9Router,loading:E,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:()=>X(!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:Q,onClose:()=>R(!1),onSelect:a=>{!$.includes(a.value)&&(_([...$,a.value]),aa||ab(a.value)),R(!1)},selectedModel:null,activeProviders:j,modelAliases:U,title:"Add Model for OpenCode"}),(0,d.jsx)(f.rq,{isOpen:S,onClose:()=>T(!1),onSelect:a=>{P(a.value),T(!1)},selectedModel:O,activeProviders:j,modelAliases:U,title:"Select Subagent Model for OpenCode"}),(0,d.jsx)(f.uR,{isOpen:W,onClose:()=>X(!1),title:"OpenCode - Manual Configuration",configs:(s=K&&K.trim()?K:k?"<API_KEY_FROM_DASHBOARD>":"sk_9router",t=$.length>0?$:["provider/model-id"],u=aa||$[0]||t[0],v=O||u,w={},t.forEach(a=>{w[a]={name:a}}),[{filename:"~/.config/opencode/opencode.json",content:JSON.stringify({provider:{"9router":{npm:"@ai-sdk/openai-compatible",options:{baseURL:ad(),apiKey:s},models:w}},model:`9router/${u}`,agent:{explorer:{description:"Fast explorer subagent for codebase exploration",mode:"subagent",model:`9router/${v}`}}},null,2)}])})]})}let z="/api/cli-tools/cowork-settings";function A({tool:a,isExpanded:b,onToggle:c,baseUrl:h,apiKeys:i,activeProviders:j,hasActiveProviders:k,cloudEnabled:m,cloudUrl:n,tunnelEnabled:o,tunnelPublicUrl:p,tailscaleEnabled:q,tailscaleUrl:r,initialStatus:s}){let t,u,[v,w]=(0,e.useState)(s||null),[x,y]=(0,e.useState)(!1),[B,C]=(0,e.useState)(!1),[D,E]=(0,e.useState)(!1),[F,G]=(0,e.useState)(null),[H,I]=(0,e.useState)(""),[J,K]=(0,e.useState)([]),[L,M]=(0,e.useState)(!1),[N,O]=(0,e.useState)(""),[P,Q]=(0,e.useState)([]),[R,S]=(0,e.useState)(!1),[T,U]=(0,e.useState)(!1),V=async()=>{y(!0);try{let a=await fetch(z),b=await a.json();w(b)}catch(a){w({installed:!1,error:a.message})}finally{y(!1)}},W=()=>{let a;return(a=(N||"").replace(/\/+$/,""))?/\/v1$/.test(a)?a:`${a}/v1`:""},X=v?.installed?v?.cowork?.baseUrl?v.has9Router?"configured":"other":"not_configured":null,Y=H&&!i.some(a=>a.key===H),Z=async()=>{G(null);let a=W();if(0===J.length)return void G({type:"error",text:"Please select at least one model"});C(!0);try{let b=H?.trim()||(i?.length>0?i[0].key:null)||(m?null:"sk_9router"),c=await fetch(z,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:a,apiKey:b,models:J,plugins:P})}),d=await c.json();c.ok?(G({type:"success",text:"Settings applied. Quit & reopen Claude Desktop to load."}),V()):G({type:"error",text:d.error||"Failed to apply settings"})}catch(a){G({type:"error",text:a.message})}finally{C(!1)}},$=async({name:a,models:b})=>{try{let c=await fetch("/api/combos",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:a,models:b})});if(!c.ok){let a=await c.json();G({type:"error",text:a.error||"Failed to create combo"});return}J.includes(a)||K([...J,a]),S(!1),G({type:"success",text:`Combo "${a}" created and added.`})}catch(a){G({type:"error",text:a.message})}},_=async()=>{E(!0),G(null);try{let a=await fetch(z,{method:"DELETE"}),b=await a.json();a.ok?(G({type:"success",text:"Settings reset successfully"}),K([]),Q(v?.defaultPlugins||[]),V()):G({type:"error",text:b.error||"Failed to reset"})}catch(a){G({type:"error",text:a.message})}finally{E(!1)}};return(0,d.jsxs)(f.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:c,children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(g.default,{src:a.image,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 min-w-0 flex-wrap items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===X&&(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"===X&&(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"===X&&(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:[x&&(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 Cowork..."})]}),!x&&v&&!v.installed&&(0,d.jsxs)("div",{className:"flex flex-col gap-3 p-4 bg-yellow-500/10 border border-yellow-500/30 rounded-lg",children:[(0,d.jsxs)("div",{className:"flex items-start gap-3",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 Desktop (Cowork mode) not detected"}),(0,d.jsx)("p",{className:"text-sm text-text-muted",children:"Open Claude Desktop → Help → Troubleshooting → Enable Developer mode → Configure third-party inference, then return here."})]})]}),(0,d.jsx)("div",{className:"pl-9",children:(0,d.jsxs)(f.$n,{variant:"secondary",size:"sm",onClick:()=>M(!0),className:"!bg-yellow-500/20 !border-yellow-500/40 !text-yellow-700 dark:!text-yellow-300 hover:!bg-yellow-500/30",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[18px] mr-1",children:"content_copy"}),"Manual Config"]})})]}),!x&&v?.installed&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(l,{value:W(),onChange:a=>O((a||"").replace(/\/v1\/?$/,"")),tunnelEnabled:o,tunnelPublicUrl:p,tailscaleEnabled:q,tailscaleUrl:r,cloudEnabled:m,cloudUrl:n})]}),v?.cowork?.baseUrl&&(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Current"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)("span",{className:"min-w-0 truncate rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5",children:v.cowork.baseUrl})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),i.length>0||H?(0,d.jsxs)("select",{value:H,onChange:a=>I(a.target.value),className:"w-full min-w-0 px-2 py-2 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5",children:[Y&&(0,d.jsx)("option",{value:H,children:H}),i.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))]}):(0,d.jsx)("span",{className:"min-w-0 rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5",children:m?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-start sm:gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right pt-1",children:"Models"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px] mt-1.5",children:"arrow_forward"}),(0,d.jsxs)("div",{className:"flex-1 flex flex-col gap-2",children:[(0,d.jsx)("div",{className:"flex flex-wrap gap-1.5 min-h-[28px] px-2 py-1.5 bg-surface rounded border border-border",children:0===J.length?(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"No models selected"}):J.map(a=>(0,d.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs bg-black/5 dark:bg-white/5 text-text-muted border border-transparent hover:border-border",children:[a,(0,d.jsx)("button",{onClick:()=>K(b=>b.filter(b=>b!==a)),className:"ml-0.5 hover:text-red-500",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},a))}),(0,d.jsx)("button",{onClick:()=>S(!0),disabled:!k,className:`self-start px-2 py-1 rounded border text-xs transition-colors ${k?"bg-primary/10 border-primary/40 text-primary hover:bg-primary/20 cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"+ Add Combo (claude-)"})]})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-start sm:gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right pt-1",children:"Plugins"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px] mt-1.5",children:"arrow_forward"}),(0,d.jsxs)("div",{className:"flex-1 flex flex-col gap-2",children:[(0,d.jsx)("div",{className:"flex flex-wrap gap-1.5 min-h-[28px] px-2 py-1.5 bg-surface rounded border border-border",children:0===P.filter(a=>"exa"!==a.name).length?(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"No plugins"}):P.filter(a=>"exa"!==a.name).map(a=>(0,d.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs bg-black/5 dark:bg-white/5 text-text-muted border border-transparent hover:border-border",children:[a.title||a.name,a.oauth&&(0,d.jsx)("span",{className:"text-[8px] text-amber-600",children:"OAuth"}),(0,d.jsx)("button",{onClick:()=>{var b;return b=a.name,void Q(P.filter(a=>a.name!==b))},className:"ml-0.5 hover:text-red-500",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},a.name))}),(0,d.jsx)("button",{onClick:()=>U(!0),className:"self-start px-2 py-1 rounded border text-xs bg-primary/10 border-primary/40 text-primary hover:bg-primary/20 cursor-pointer",children:"+ Browse MCP marketplace"}),(0,d.jsxs)("p",{className:"text-[10px] text-text-muted leading-snug",children:["\uD83D\uDCA1 Exa is auto-installed. Prefer ",(0,d.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/5",children:"web_search_exa"})," for web search and ",(0,d.jsx)("code",{className:"px-1 py-0.5 rounded bg-black/5 dark:bg-white/5",children:"web_fetch_exa"})," for reading pages."]})]})]})]}),F&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===F.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"===F.type?"check_circle":"error"}),(0,d.jsx)("span",{children:F.text})]}),(0,d.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center gap-2",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:Z,disabled:0===J.length,loading:B,className:"w-full sm:w-auto",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:_,disabled:!v.has9Router,loading:D,className:"w-full sm:w-auto",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:()=>M(!0),className:"w-full sm:w-auto",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,d.jsx)(f.uR,{isOpen:L,onClose:()=>M(!1),title:"Claude Cowork - Manual Configuration",configs:(t=H&&H.trim()?H:m?"<API_KEY_FROM_DASHBOARD>":"sk_9router",u=J.length>0?J:["provider/model-id"],[{filename:"~/Library/Application Support/Claude-3p/configLibrary/<appliedId>.json",content:JSON.stringify({inferenceProvider:"gateway",inferenceGatewayBaseUrl:W()||"https://your-public-host/v1",inferenceGatewayApiKey:t,inferenceModels:u.map(a=>({name:a}))},null,2)}])}),(0,d.jsx)(f.CK,{isOpen:R,combo:null,onClose:()=>S(!1),onSave:$,activeProviders:j,forcePrefix:"claude-",title:"Create Cowork Combo"}),(0,d.jsx)(f.Nf,{isOpen:T,onClose:()=>U(!1),onAdd:a=>{P.some(b=>b.name===a.name)||Q([...P,a])},addedNames:P.map(a=>a.name)})]})}function B({tool:a,isExpanded:b,onToggle:c,baseUrl:h,apiKeys:i,activeProviders:j,cloudEnabled:k,initialStatus:m,tunnelEnabled:o,tunnelPublicUrl:p,tailscaleEnabled:q,tailscaleUrl:r}){let s,t,[u,v]=(0,e.useState)(m||null),[w,x]=(0,e.useState)(!1),[y,z]=(0,e.useState)(!1),[A,C]=(0,e.useState)(!1),[D,E]=(0,e.useState)(null),[F,G]=(0,e.useState)(""),[H,I]=(0,e.useState)(""),[J,K]=(0,e.useState)({}),[L,M]=(0,e.useState)(!1),[N,O]=(0,e.useState)([]),[P,Q]=(0,e.useState)(!1),R=u?u.has9Router?n(u.currentUrl||"",{tunnelPublicUrl:p,tailscaleUrl:r})?"configured":"other":"not_configured":null,S=()=>{let a=H||h;return a.endsWith("/v1")?a:`${a}/v1`},T=F&&!i.some(a=>a.key===F),U=async()=>{x(!0);try{let a=await fetch("/api/cli-tools/copilot-settings"),b=await a.json();v(b)}catch(a){v({error:a.message})}finally{x(!1)}},V=async()=>{z(!0),E(null);try{let a=F&&F.trim()||k?F:"sk_9router",b=await fetch("/api/cli-tools/copilot-settings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:S(),apiKey:a,models:N})}),c=await b.json();b.ok?(E({type:"success",text:c.message||"Settings applied! Reload VS Code."}),U()):E({type:"error",text:c.error||"Failed to apply settings"})}catch(a){E({type:"error",text:a.message})}finally{z(!1)}},W=async()=>{C(!0),E(null);try{let a=await fetch("/api/cli-tools/copilot-settings",{method:"DELETE"}),b=await a.json();a.ok?(E({type:"success",text:"Settings reset successfully!"}),O([]),U()):E({type:"error",text:b.error||"Failed to reset settings"})}catch(a){E({type:"error",text:a.message})}finally{C(!1)}};return(0,d.jsxs)(f.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:c,children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(g.default,{src:"/providers/copilot.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 min-w-0 flex-wrap items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),"configured"===R&&(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"===R&&(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"===R&&(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:[w&&(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 Copilot config..."})]}),!w&&(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex items-start gap-3 p-3 bg-blue-500/10 border border-blue-500/30 rounded-lg",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-blue-500 text-lg",children:"info"}),(0,d.jsxs)("div",{className:"text-xs text-blue-700 dark:text-blue-300",children:[(0,d.jsxs)("p",{className:"font-medium",children:["Writes to ",(0,d.jsx)("code",{className:"px-1 bg-black/5 dark:bg-white/10 rounded",children:"chatLanguageModels.json"})]}),(0,d.jsx)("p",{className:"mt-0.5 opacity-80",children:"Reload VS Code after applying for changes to take effect."})]})]}),(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"Select Endpoint"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)(l,{value:H||H||`${h}/v1`,onChange:I,requiresExternalUrl:a.requiresExternalUrl,tunnelEnabled:o,tunnelPublicUrl:p,tailscaleEnabled:q,tailscaleUrl:r})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),i.length>0||F?(0,d.jsxs)("select",{value:F,onChange:a=>G(a.target.value),className:"w-full min-w-0 px-2 py-2 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5",children:[T&&(0,d.jsx)("option",{value:F,children:F}),i.map(a=>(0,d.jsx)("option",{value:a.key,children:a.key},a.id))]}):(0,d.jsx)("span",{className:"min-w-0 rounded bg-surface/40 px-2 py-2 text-xs text-text-muted sm:py-1.5",children:k?"No API keys - Create one in Keys page":"sk_9router (default)"})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[8rem_auto_1fr] sm:items-start sm:gap-2",children:[(0,d.jsx)("span",{className:"w-32 shrink-0 text-sm font-semibold text-text-main text-right pt-1",children:"Models"}),(0,d.jsx)("span",{className:"material-symbols-outlined text-text-muted text-[14px] mt-1.5",children:"arrow_forward"}),(0,d.jsxs)("div",{className:"flex-1 flex flex-col gap-2",children:[(0,d.jsx)("div",{className:"flex flex-wrap gap-1.5 min-h-[28px] px-2 py-1.5 bg-surface rounded border border-border",children:0===N.length?(0,d.jsx)("span",{className:"text-xs text-text-muted",children:"No models selected"}):N.map(a=>(0,d.jsxs)("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs bg-black/5 dark:bg-white/5 text-text-muted border border-transparent hover:border-border",children:[a,(0,d.jsx)("button",{onClick:b=>{b.stopPropagation(),O(b=>b.filter(b=>b!==a))},className:"ml-0.5 hover:text-red-500",children:(0,d.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]},a))}),(0,d.jsx)("div",{children:(0,d.jsx)("button",{onClick:()=>Q(!0),disabled:!j?.length,className:`px-2 py-1 rounded border text-xs transition-colors ${j?.length?"bg-surface border-border text-text-main hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Add Model"})})]})]})]}),D&&(0,d.jsxs)("div",{className:`flex items-center gap-2 px-2 py-1.5 rounded text-xs ${"success"===D.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"===D.type?"check_circle":"error"}),(0,d.jsx)("span",{children:D.text})]}),(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,d.jsxs)(f.$n,{variant:"primary",size:"sm",onClick:V,disabled:0===N.length,loading:y,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:W,disabled:!u?.has9Router,loading:A,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:()=>M(!0),disabled:0===N.length,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:"content_copy"}),"Manual Config"]})]})]})]}),(0,d.jsx)(f.rq,{isOpen:P,onClose:()=>Q(!1),onSelect:a=>{N.includes(a.value)||O([...N,a.value]),Q(!1)},selectedModel:null,activeProviders:j,modelAliases:J,title:"Add Model for GitHub Copilot"}),(0,d.jsx)(f.uR,{isOpen:L,onClose:()=>M(!1),title:"GitHub Copilot - Manual Configuration",configs:(s=F&&F.trim()?F:k?"<API_KEY_FROM_DASHBOARD>":"sk_9router",t=S(),[{filename:"~/Library/Application Support/Code/User/chatLanguageModels.json",content:JSON.stringify([{name:"9Router",vendor:"azure",apiKey:s,models:(N.length>0?N:["provider/model-id"]).map(a=>({id:a,name:a,url:`${t}/chat/completions#models.ai.azure.com`,toolCalling:!0,vision:!1,maxInputTokens:128e3,maxOutputTokens:16e3}))}],null,2)}])})]})}let C="http://localhost:20128";function D({apiKeys:a,cloudEnabled:b,onStatusChange:c}){let[g,h]=(0,e.useState)(null),[i,j]=(0,e.useState)(!1),[k,l]=(0,e.useState)(!1),[m,n]=(0,e.useState)(""),[o,p]=(0,e.useState)(()=>a?.[0]?.key||""),[q,r]=(0,e.useState)(null),[s,t]=(0,e.useState)(null),[u,v]=(0,e.useState)(null),[w,x]=(0,e.useState)(C),[y,z]=(0,e.useState)(null),A=g?.isWin===!0,B=A||g?.hasCachedPassword||g?.needsSudoPassword===!1,E=g?.isAdmin!==!1;!E&&(A||g?.hasCachedPassword||g?.needsSudoPassword);let F=(0,e.useCallback)(async()=>{try{let a=await fetch("/api/cli-tools/antigravity-mitm");if(a.ok){let b=await a.json();h(b),b.mitmRouterBaseUrl&&x(b.mitmRouterBaseUrl),c?.(b)}}catch{h({running:!1,certExists:!1,dnsStatus:{}})}},[c]),G=a=>{v(null),g&&(B?H(a,""):(r(a),l(!0),t(null)))},H=async(c,d,e=!1)=>{j(!0),v(null);try{let f;if("trust-cert"===c)f=await fetch("/api/cli-tools/antigravity-mitm",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"trust-cert",sudoPassword:d})});else if("start"===c){let c=o?.trim()||(a?.length>0?a[0].key:null)||(b?null:"sk_9router");f=await fetch("/api/cli-tools/antigravity-mitm",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:c,sudoPassword:d,mitmRouterBaseUrl:w.trim()||C,forceKillPort443:e})})}else f=await fetch("/api/cli-tools/antigravity-mitm",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({sudoPassword:d})});if(!f.ok){let a=await f.json().catch(()=>({}));if("PORT_443_BUSY"===a.code&&a.portOwner){l(!1),z({owner:a.portOwner,password:d});return}v(a.error||`Failed to ${c} MITM server`);return}l(!1),n(""),z(null),await F()}catch(a){v(a.message||"Network error")}finally{j(!1),r(null)}},I=()=>{m.trim()?H(q,m):t("Sudo password is required")},J=g?.running;return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(f.Zp,{padding:"sm",className:"border-primary/20 bg-primary/5",children:(0,d.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,d.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,d.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-primary text-[20px]",children:"security"}),(0,d.jsx)("span",{className:"font-semibold text-sm text-text-main",children:"MITM Server"}),J?(0,d.jsx)(f.Ex,{variant:"success",size:"sm",children:"Running"}):(0,d.jsx)(f.Ex,{variant:"default",size:"sm",children:"Stopped"})]}),(0,d.jsx)("div",{className:"flex flex-wrap items-center gap-1 text-xs text-text-muted","data-i18n-skip":"true",children:[{label:"Cert",ok:g?.certExists},{label:"Trusted",ok:g?.certTrusted},{label:"Server",ok:J}].map(({label:a,ok:b})=>(0,d.jsxs)("span",{className:`flex items-center gap-0.5 px-1.5 py-0.5 rounded ${b?"text-green-600":"text-text-muted"}`,children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:b?"check_circle":"cancel"}),a]},a))})]}),(0,d.jsxs)("div",{className:"px-2 py-2 rounded-lg bg-surface/50 border border-border/50 flex flex-col gap-2",children:[(0,d.jsxs)("p",{className:"text-[11px] text-text-muted leading-relaxed",children:[(0,d.jsx)("span",{className:"font-medium text-text-main",children:"Purpose:"})," Use Antigravity IDE & GitHub Copilot → with ANY provider/model from 9Router"]}),(0,d.jsxs)("p",{className:"text-[11px] text-text-muted leading-relaxed",children:[(0,d.jsx)("span",{className:"font-medium text-text-main",children:"How it works:"})," Antigravity/Copilot IDE request → DNS redirect to localhost:443 → MITM proxy intercepts → 9Router → response to Antigravity/Copilot"]})]}),(0,d.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,d.jsxs)("div",{className:"grid gap-1 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"9Router Base URL"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",value:w,onChange:a=>x(a.target.value),placeholder:C,disabled:J,className:"flex-1 min-w-0 px-2 py-1.5 bg-surface rounded border border-border text-xs text-text-main focus:outline-none focus:ring-1 focus:ring-primary/50 disabled:opacity-50"})]}),!J&&(0,d.jsxs)("div",{className:"grid gap-1 sm:grid-cols-[8rem_auto_1fr] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right sm:text-sm",children:"API Key"}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsx)("input",{type:"text",list:"mitm-api-keys",value:o,onChange:a=>p(a.target.value),placeholder:b?"Enter or pick API key":"sk_9router (default)",className:"flex-1 min-w-0 px-2 py-1.5 bg-surface rounded border border-border text-xs text-text-main focus:outline-none focus:ring-1 focus:ring-primary/50"}),a?.length>0&&(0,d.jsx)("datalist",{id:"mitm-api-keys",children:a.map(a=>(0,d.jsx)("option",{value:a.key,children:a.name||a.key},a.id))})]})]}),(0,d.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:flex-wrap sm:items-center","data-i18n-skip":"true",children:[g?.certExists&&!g?.certTrusted&&(0,d.jsxs)("button",{onClick:()=>G("trust-cert"),disabled:i,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-yellow-500/30 bg-yellow-500/10 px-4 py-2 text-xs font-medium text-yellow-600 transition-colors hover:bg-yellow-500/20 disabled:opacity-50 sm:w-auto sm:py-1.5",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"verified_user"}),"Trust Cert"]}),J?(0,d.jsxs)("button",{onClick:()=>G("stop"),disabled:i,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-red-500/30 bg-red-500/10 px-4 py-2 text-xs font-medium text-red-500 transition-colors hover:bg-red-500/20 disabled:opacity-50 sm:w-auto sm:py-1.5",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"stop_circle"}),"Stop Server"]}):(0,d.jsxs)("button",{onClick:()=>G("start"),disabled:i||!g||A&&!E,title:A&&!E?"Administrator required":void 0,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-primary/30 bg-primary/10 px-4 py-2 text-xs font-medium text-primary transition-colors hover:bg-primary/20 disabled:opacity-50 sm:w-auto sm:py-1.5",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"play_circle"}),"Start Server"]}),J&&(0,d.jsx)("p",{className:"text-xs text-text-muted",children:"Enable DNS per tool below to activate interception"})]}),u&&(0,d.jsxs)("div",{className:"flex items-start gap-2 px-2 py-1.5 rounded text-xs bg-red-500/10 text-red-600 dark:text-red-400 border border-red-500/20",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px] mt-0.5 shrink-0",children:"error"}),(0,d.jsx)("span",{children:u})]}),A&&!E&&(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 border border-red-500/20",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"shield_lock"}),(0,d.jsx)("span",{children:"Administrator required — restart 9Router as Administrator to use MITM"})]})]})}),k&&(0,d.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",children:(0,d.jsxs)("div",{className:"mx-4 flex w-full max-w-sm flex-col gap-4 rounded-xl border border-border bg-surface p-5 shadow-xl sm:p-6",children:[(0,d.jsx)("h3",{className:"font-semibold text-text-main",children:"Sudo Password Required"}),(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 server startup"})]}),(0,d.jsx)(f.pd,{type:"password",placeholder:"Enter sudo password",value:m,onChange:a=>n(a.target.value),onKeyDown:a=>{"Enter"!==a.key||i||I()}}),s&&(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:s})]}),(0,d.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,d.jsx)(f.$n,{variant:"ghost",size:"sm",onClick:()=>{l(!1),n(""),t(null)},disabled:i,children:"Cancel"}),(0,d.jsx)(f.$n,{variant:"primary",size:"sm",onClick:I,loading:i,children:"Confirm"})]})]})}),y&&(0,d.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",children:(0,d.jsxs)("div",{className:"mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border border-border bg-surface p-5 shadow-xl sm:p-6",children:[(0,d.jsx)("h3",{className:"font-semibold text-text-main",children:"Port 443 Already In Use"}),(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.jsxs)("div",{className:"flex flex-col gap-1 text-xs text-text-muted",children:[(0,d.jsx)("p",{children:"Port 443 đang bị process kh\xe1c chiếm:"}),(0,d.jsxs)("p",{className:"font-mono text-text-main","data-i18n-skip":"true",children:[y.owner.name," (PID ",y.owner.pid,")"]}),(0,d.jsx)("p",{children:"Kill process n\xe0y để chạy MITM Server?"})]})]}),(0,d.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,d.jsx)(f.$n,{variant:"ghost",size:"sm",onClick:()=>{z(null),j(!1)},disabled:i,children:"Cancel"}),(0,d.jsx)(f.$n,{variant:"primary",size:"sm",onClick:()=>{H("start",y?.password||"",!0)},loading:i,children:"Kill & Start"})]})]})})]})}var E=c(5683);function F({tool:a,isExpanded:b,onToggle:c,serverRunning:h,dnsActive:i,hasCachedPassword:j,needsSudoPassword:k,isWin:l,apiKeys:m,activeProviders:n,hasActiveProviders:o,modelAliases:p={},cloudEnabled:q,onDnsChange:r}){let[s,t]=(0,e.useState)(!1),[u,v]=(0,e.useState)(null),[w,x]=(0,e.useState)(!1),[y,z]=(0,e.useState)(""),[A,B]=(0,e.useState)(null),[C,D]=(0,e.useState)(null),[G,H]=(0,e.useState)({}),[I,J]=(0,e.useState)(!1),[K,L]=(0,e.useState)(null),M=E.TOOL_HOSTS[a.id]??[],N=l||j||!1===k,O=(0,e.useCallback)(async b=>{try{await fetch("/api/cli-tools/antigravity-mitm/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:a.id,mappings:b})})}catch{}},[a.id]),P=(a,b)=>{H(c=>({...c,[a]:b}))},Q=()=>{if(!h)return;let a=i?"disable":"enable";N?R(a,""):(B(a),x(!0),D(null))},R=async(b,c)=>{t(!0),v(null);try{let d=await fetch("/api/cli-tools/antigravity-mitm",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({tool:a.id,action:b,sudoPassword:c})}),e=await d.json();if(!d.ok)throw Error(e.error||"Failed to toggle DNS");"enable"===b&&v(`Restart ${a.name} to apply changes`),x(!1),z(""),r?.(e)}catch{}finally{t(!1),B(null)}},S=()=>{y.trim()?R(A,y):D("Sudo password is required")};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(f.Zp,{padding:"xs",className:"overflow-hidden",children:[(0,d.jsxs)("div",{className:"flex items-start justify-between gap-3 hover:cursor-pointer sm:items-center",onClick:c,children:[(0,d.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,d.jsx)("div",{className:"size-8 flex items-center justify-center shrink-0",children:(0,d.jsx)(g.default,{src:a.image,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 flex-wrap items-center gap-2",children:[(0,d.jsx)("h3",{className:"font-medium text-sm",children:a.name}),h?i?(0,d.jsx)(f.Ex,{variant:"success",size:"sm",children:"Active"}):(0,d.jsx)(f.Ex,{variant:"warning",size:"sm",children:"DNS off"}):(0,d.jsx)(f.Ex,{variant:"default",size:"sm",children:"Server off"})]}),(0,d.jsxs)("p",{className:"text-xs text-text-muted sm:truncate",children:["Intercept ",a.name," requests via MITM proxy"]})]})]}),(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:[M.length>0&&(0,d.jsxs)("div",{className:"mt-2 rounded-md border border-border bg-surface/50 px-2 py-1.5",children:[(0,d.jsx)("p",{className:"text-[10px] font-medium tracking-wide text-text-main/80 mb-1",children:"Edit hosts file manually to add the following entries:"}),(0,d.jsx)("ul",{className:"list-none space-y-0.5 font-mono text-[10px] text-text-muted break-all",children:M.map(a=>(0,d.jsxs)("li",{children:["127.0.0.1 ",a]},a))})]}),(0,d.jsxs)("div",{className:"flex flex-col gap-0.5 text-[11px] text-text-muted px-1",children:[(0,d.jsxs)("p",{children:["Toggle DNS to redirect ",a.name," traffic through 9Router via MITM."]}),!i&&(0,d.jsx)("p",{className:"text-amber-600 text-[10px] mt-1",children:"⚠️ Enable DNS to edit model mappings"})]}),a.defaultModels?.length>0&&(0,d.jsx)("div",{className:"flex flex-col gap-2",children:a.defaultModels.map(a=>(0,d.jsxs)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-[9rem_auto_1fr_auto] sm:items-center sm:gap-2",children:[(0,d.jsx)("span",{className:"text-xs font-semibold text-text-main sm:text-right",children:a.name}),(0,d.jsx)("span",{className:"material-symbols-outlined hidden text-text-muted text-[14px] sm:inline",children:"arrow_forward"}),(0,d.jsxs)("div",{className:"relative w-full min-w-0",children:[(0,d.jsx)("input",{type:"text",value:G[a.alias]||"",onChange:b=>P(a.alias,b.target.value),onBlur:b=>{var c,d;return c=a.alias,d=b.target.value,void O({...G,[c]:d})},placeholder:"provider/model-id",disabled:!i,className:`w-full min-w-0 pl-2 pr-7 py-2 bg-surface rounded border border-border text-xs focus:outline-none focus:ring-1 focus:ring-primary/50 sm:py-1.5 ${!i?"opacity-50 cursor-not-allowed":""}`}),G[a.alias]&&(0,d.jsx)("button",{onClick:()=>{P(a.alias,""),O({...G,[a.alias]:""})},className:"absolute right-1 top-1/2 -translate-y-1/2 p-0.5 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"})})]}),(0,d.jsx)("button",{onClick:()=>{L(a.alias),J(!0)},disabled:!o||!i,className:`rounded border px-2 py-2 text-xs transition-colors sm:py-1.5 ${o&&i?"bg-surface border-border hover:border-primary cursor-pointer":"opacity-50 cursor-not-allowed border-border"}`,children:"Select"})]},a.alias))}),a.defaultModels?.length===0&&(0,d.jsx)("p",{className:"text-xs text-text-muted px-1",children:"Model mappings will be available soon."}),(0,d.jsxs)("div",{className:"flex flex-col gap-2 sm:items-start",children:[i?(0,d.jsxs)("button",{onClick:Q,disabled:!h||s,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-red-500/30 bg-red-500/10 px-4 py-2 text-xs font-medium text-red-500 transition-colors hover:bg-red-500/20 disabled:cursor-not-allowed disabled:opacity-50 sm:w-auto sm:py-1.5",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"stop_circle"}),"Stop DNS"]}):(0,d.jsxs)("button",{onClick:Q,disabled:!h||s,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-primary/30 bg-primary/10 px-4 py-2 text-xs font-medium text-primary transition-colors hover:bg-primary/20 disabled:cursor-not-allowed disabled:opacity-50 sm:w-auto sm:py-1.5",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"play_circle"}),"Start DNS"]}),u&&(0,d.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1.5 rounded text-xs text-amber-500",children:[(0,d.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"warning"}),(0,d.jsx)("span",{children:u})]})]})]})]}),w&&(0,d.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm",children:(0,d.jsxs)("div",{className:"mx-4 flex w-full max-w-sm flex-col gap-4 rounded-xl border border-border bg-surface p-5 shadow-xl sm:p-6",children:[(0,d.jsx)("h3",{className:"font-semibold text-text-main",children:"Sudo Password Required"}),(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 to modify /etc/hosts and flush DNS cache"})]}),(0,d.jsx)(f.pd,{type:"password",placeholder:"Enter sudo password",value:y,onChange:a=>z(a.target.value),onKeyDown:a=>{"Enter"!==a.key||s||S()}}),C&&(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:C})]}),(0,d.jsxs)("div",{className:"flex items-center justify-end gap-2",children:[(0,d.jsx)(f.$n,{variant:"ghost",size:"sm",onClick:()=>{x(!1),z(""),D(null)},disabled:s,children:"Cancel"}),(0,d.jsx)(f.$n,{variant:"primary",size:"sm",onClick:S,loading:s,children:"Confirm"})]})]})}),(0,d.jsx)(f.rq,{isOpen:I,onClose:()=>J(!1),onSelect:a=>{if(!K||a.isPlaceholder)return;let b={...G,[K]:a.value};H(b),O(b)},selectedModel:K?G[K]:null,activeProviders:n,modelAliases:p,title:`Select model for ${K}`})]})}var G=c(30978),H=c.n(G);function I({tool:a}){return(0,d.jsx)(H(),{href:"/dashboard/mitm",className:"block",children:(0,d.jsx)(f.Zp,{padding:"sm",className:"overflow-hidden hover:border-primary/50 transition-colors cursor-pointer",children:(0,d.jsxs)("div",{className:"flex items-center justify-between",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)(g.default,{src:a.image,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}),(0,d.jsx)("span",{className:"px-1.5 py-0.5 text-[10px] font-medium bg-purple-500/10 text-purple-600 dark:text-purple-400 rounded-full",children:"MITM"})]}),(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]",children:"chevron_right"})]})})})}}};
@@ -0,0 +1,9 @@
1
+ "use strict";exports.id=7292,exports.ids=[7292],exports.modules={37292:(a,b,c)=>{c.d(b,{createNodeSqliteAdapter:()=>e});var d=c(64035);async function e(a){let b=process.emit;process.emit=function(a,c,...d){return!("warning"===a&&c?.name==="ExperimentalWarning"&&/SQLite/i.test(c.message||""))&&b.call(process,a,c,...d)};let e=new(await Promise.resolve().then(c.t.bind(c,80099,23))).DatabaseSync(a);e.exec(d.oG);let f=new Map;function g(a){let b=f.get(a);return b||(b=e.prepare(a),f.set(a,b)),b}let h=setInterval(()=>{try{e.exec("PRAGMA wal_checkpoint(TRUNCATE)")}catch{}},6e4);function i(){try{e.exec("PRAGMA wal_checkpoint(TRUNCATE)")}catch{}try{f.clear()}catch{}try{e.close()}catch{}}"function"==typeof h.unref&&h.unref();let j=()=>i();return process.once("beforeExit",j),process.once("SIGINT",()=>{j(),process.exit(0)}),process.once("SIGTERM",()=>{j(),process.exit(0)}),{driver:"node:sqlite",run(a,b=[]){let c=g(a).run(...b);return{changes:Number(c.changes??0),lastInsertRowid:Number(c.lastInsertRowid??0)}},get:(a,b=[])=>g(a).get(...b),all:(a,b=[])=>g(a).all(...b),exec:a=>e.exec(a),transaction(a){e.exec("BEGIN");try{let b=a();return e.exec("COMMIT"),b}catch(a){try{e.exec("ROLLBACK")}catch{}throw a}},checkpoint(){try{e.exec("PRAGMA wal_checkpoint(TRUNCATE)")}catch{}},close(){clearInterval(h),i()},raw:e}}},64035:(a,b,c)=>{c.d(b,{CG:()=>e,oG:()=>d,zE:()=>f});let d=`
2
+ PRAGMA journal_mode = WAL;
3
+ PRAGMA synchronous = NORMAL;
4
+ PRAGMA temp_store = MEMORY;
5
+ PRAGMA mmap_size = 30000000;
6
+ PRAGMA cache_size = -64000;
7
+ PRAGMA foreign_keys = ON;
8
+ PRAGMA busy_timeout = 5000;
9
+ `,e={_meta:{columns:{key:"TEXT PRIMARY KEY",value:"TEXT NOT NULL"}},settings:{columns:{id:"INTEGER PRIMARY KEY CHECK (id = 1)",data:"TEXT NOT NULL"}},providerConnections:{columns:{id:"TEXT PRIMARY KEY",provider:"TEXT NOT NULL",authType:"TEXT NOT NULL",name:"TEXT",email:"TEXT",priority:"INTEGER",isActive:"INTEGER DEFAULT 1",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pc_provider ON providerConnections(provider)","CREATE INDEX IF NOT EXISTS idx_pc_provider_active ON providerConnections(provider, isActive)","CREATE INDEX IF NOT EXISTS idx_pc_priority ON providerConnections(provider, priority)"]},providerNodes:{columns:{id:"TEXT PRIMARY KEY",type:"TEXT",name:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pn_type ON providerNodes(type)"]},proxyPools:{columns:{id:"TEXT PRIMARY KEY",isActive:"INTEGER DEFAULT 1",testStatus:"TEXT",data:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_pp_active ON proxyPools(isActive)","CREATE INDEX IF NOT EXISTS idx_pp_status ON proxyPools(testStatus)"]},apiKeys:{columns:{id:"TEXT PRIMARY KEY",key:"TEXT UNIQUE NOT NULL",name:"TEXT",machineId:"TEXT",isActive:"INTEGER DEFAULT 1",createdAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_ak_key ON apiKeys(key)"]},combos:{columns:{id:"TEXT PRIMARY KEY",name:"TEXT UNIQUE NOT NULL",kind:"TEXT",models:"TEXT NOT NULL",createdAt:"TEXT NOT NULL",updatedAt:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_combo_name ON combos(name)"]},kv:{columns:{scope:"TEXT NOT NULL",key:"TEXT NOT NULL",value:"TEXT NOT NULL"},primaryKey:"PRIMARY KEY (scope, key)",indexes:["CREATE INDEX IF NOT EXISTS idx_kv_scope ON kv(scope)"]},usageHistory:{columns:{id:"INTEGER PRIMARY KEY AUTOINCREMENT",timestamp:"TEXT NOT NULL",provider:"TEXT",model:"TEXT",connectionId:"TEXT",apiKey:"TEXT",endpoint:"TEXT",promptTokens:"INTEGER DEFAULT 0",completionTokens:"INTEGER DEFAULT 0",cost:"REAL DEFAULT 0",status:"TEXT",tokens:"TEXT",meta:"TEXT"},indexes:["CREATE INDEX IF NOT EXISTS idx_uh_ts ON usageHistory(timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_uh_provider ON usageHistory(provider)","CREATE INDEX IF NOT EXISTS idx_uh_model ON usageHistory(model)","CREATE INDEX IF NOT EXISTS idx_uh_conn ON usageHistory(connectionId)"]},usageDaily:{columns:{dateKey:"TEXT PRIMARY KEY",data:"TEXT NOT NULL"}},requestDetails:{columns:{id:"TEXT PRIMARY KEY",timestamp:"TEXT NOT NULL",provider:"TEXT",model:"TEXT",connectionId:"TEXT",status:"TEXT",data:"TEXT NOT NULL"},indexes:["CREATE INDEX IF NOT EXISTS idx_rd_ts ON requestDetails(timestamp DESC)","CREATE INDEX IF NOT EXISTS idx_rd_provider ON requestDetails(provider)","CREATE INDEX IF NOT EXISTS idx_rd_model ON requestDetails(model)","CREATE INDEX IF NOT EXISTS idx_rd_conn ON requestDetails(connectionId)"]}};function f(a,b){let c=Object.entries(b.columns).map(([a,b])=>`${a} ${b}`);return b.primaryKey&&c.push(b.primaryKey),`CREATE TABLE IF NOT EXISTS ${a} (${c.join(", ")})`}}};
@@ -1 +1 @@
1
- exports.id=7810,exports.ids=[7810],exports.modules={932:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/KiroAuthModal.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/shared/components/KiroAuthModal.js","default")},8114:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/Input.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/shared/components/Input.js","default")},13377:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/KiroOAuthWrapper.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/shared/components/KiroOAuthWrapper.js","default")},15044:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/OAuthModal.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/shared/components/OAuthModal.js","default")},20535:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/ChangelogModal.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/shared/components/ChangelogModal.js","default")},22252:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/Select.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/shared/components/Select.js","default")},29576:(a,b,c)=>{Promise.resolve().then(c.bind(c,66610)),Promise.resolve().then(c.bind(c,93447)),Promise.resolve().then(c.bind(c,92251)),Promise.resolve().then(c.bind(c,55590)),Promise.resolve().then(c.bind(c,75012)),Promise.resolve().then(c.bind(c,52149)),Promise.resolve().then(c.bind(c,49871)),Promise.resolve().then(c.bind(c,37421)),Promise.resolve().then(c.bind(c,18649)),Promise.resolve().then(c.bind(c,4565)),Promise.resolve().then(c.bind(c,61094)),Promise.resolve().then(c.bind(c,46411)),Promise.resolve().then(c.bind(c,27452)),Promise.resolve().then(c.bind(c,14504)),Promise.resolve().then(c.bind(c,31288)),Promise.resolve().then(c.bind(c,82774)),Promise.resolve().then(c.bind(c,60835)),Promise.resolve().then(c.bind(c,33446)),Promise.resolve().then(c.bind(c,60115)),Promise.resolve().then(c.bind(c,53142)),Promise.resolve().then(c.bind(c,77410)),Promise.resolve().then(c.bind(c,11892)),Promise.resolve().then(c.bind(c,44037)),Promise.resolve().then(c.bind(c,5948)),Promise.resolve().then(c.bind(c,33809)),Promise.resolve().then(c.bind(c,9904)),Promise.resolve().then(c.bind(c,85600)),Promise.resolve().then(c.bind(c,16081)),Promise.resolve().then(c.bind(c,7274)),Promise.resolve().then(c.bind(c,37545)),Promise.resolve().then(c.bind(c,15769)),Promise.resolve().then(c.bind(c,39907)),Promise.resolve().then(c.bind(c,62490)),Promise.resolve().then(c.bind(c,71708)),Promise.resolve().then(c.bind(c,7268)),Promise.resolve().then(c.bind(c,81101)),Promise.resolve().then(c.bind(c,37922)),Promise.resolve().then(c.bind(c,11747)),Promise.resolve().then(c.bind(c,33265))},33335:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/ManualConfigModal.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/shared/components/ManualConfigModal.js","default")},37218:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/ModelSelectModal.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/shared/components/ModelSelectModal.js","default")},38868:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/Button.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/shared/components/Button.js","default")},39623:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/EditConnectionModal.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/shared/components/EditConnectionModal.js","default")},44846:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/Sidebar.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/shared/components/Sidebar.js","default")},46127:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/ThemeToggle.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/shared/components/ThemeToggle.js","default")},50258:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/IFlowCookieModal.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/shared/components/IFlowCookieModal.js","default")},51283:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/CursorAuthModal.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/shared/components/CursorAuthModal.js","default")},59062:(a,b,c)=>{"use strict";c.d(b,{CardSkeleton:()=>h,PageLoading:()=>f,Skeleton:()=>g,Spinner:()=>e,default:()=>i});var d=c(92713);let e=(0,d.registerClientReference)(function(){throw Error("Attempted to call Spinner() from the server but Spinner is 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/shared/components/Loading.js","Spinner"),f=(0,d.registerClientReference)(function(){throw Error("Attempted to call PageLoading() from the server but PageLoading is 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/shared/components/Loading.js","PageLoading"),g=(0,d.registerClientReference)(function(){throw Error("Attempted to call Skeleton() from the server but Skeleton is 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/shared/components/Loading.js","Skeleton"),h=(0,d.registerClientReference)(function(){throw Error("Attempted to call CardSkeleton() from the server but CardSkeleton is 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/shared/components/Loading.js","CardSkeleton"),i=(0,d.registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/Loading.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/shared/components/Loading.js","default")},60864:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/layouts/DashboardLayout.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/shared/components/layouts/DashboardLayout.js","default")},61357:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/SegmentedControl.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/shared/components/SegmentedControl.js","default")},65024:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/KiroSocialOAuthModal.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/shared/components/KiroSocialOAuthModal.js","default")},66024:(a,b,c)=>{Promise.resolve().then(c.bind(c,89468)),Promise.resolve().then(c.bind(c,97617)),Promise.resolve().then(c.bind(c,69385)),Promise.resolve().then(c.bind(c,38868)),Promise.resolve().then(c.bind(c,82934)),Promise.resolve().then(c.bind(c,20535)),Promise.resolve().then(c.bind(c,91329)),Promise.resolve().then(c.bind(c,51283)),Promise.resolve().then(c.bind(c,39623)),Promise.resolve().then(c.bind(c,80959)),Promise.resolve().then(c.bind(c,78472)),Promise.resolve().then(c.bind(c,90537)),Promise.resolve().then(c.bind(c,87030)),Promise.resolve().then(c.bind(c,50258)),Promise.resolve().then(c.bind(c,8114)),Promise.resolve().then(c.bind(c,932)),Promise.resolve().then(c.bind(c,13377)),Promise.resolve().then(c.bind(c,65024)),Promise.resolve().then(c.bind(c,86241)),Promise.resolve().then(c.bind(c,68480)),Promise.resolve().then(c.bind(c,60864)),Promise.resolve().then(c.bind(c,59062)),Promise.resolve().then(c.bind(c,33335)),Promise.resolve().then(c.bind(c,96142)),Promise.resolve().then(c.bind(c,73723)),Promise.resolve().then(c.bind(c,37218)),Promise.resolve().then(c.bind(c,69270)),Promise.resolve().then(c.bind(c,89439)),Promise.resolve().then(c.bind(c,15044)),Promise.resolve().then(c.bind(c,95031)),Promise.resolve().then(c.bind(c,81567)),Promise.resolve().then(c.bind(c,61357)),Promise.resolve().then(c.bind(c,22252)),Promise.resolve().then(c.bind(c,44846)),Promise.resolve().then(c.bind(c,87050)),Promise.resolve().then(c.bind(c,46127)),Promise.resolve().then(c.bind(c,86672)),Promise.resolve().then(c.bind(c,78249)),Promise.resolve().then(c.bind(c,85634))},68480:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/layouts/AuthLayout.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/shared/components/layouts/AuthLayout.js","default")},69270:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/NineRemoteButton.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/shared/components/NineRemoteButton.js","default")},69385:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/Badge.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/shared/components/Badge.js","default")},73723:(a,b,c)=>{"use strict";c.d(b,{ConfirmModal:()=>f,default:()=>e});var d=c(92713);let e=(0,d.registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/Modal.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/shared/components/Modal.js","default"),f=(0,d.registerClientReference)(function(){throw Error("Attempted to call ConfirmModal() from the server but ConfirmModal is 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/shared/components/Modal.js","ConfirmModal")},78249:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/Tooltip.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/shared/components/Tooltip.js","default")},78472:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/GitLabAuthModal.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/shared/components/GitLabAuthModal.js","default")},80959:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/Footer.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/shared/components/Footer.js","default")},81567:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/RequestLogger.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/shared/components/RequestLogger.js","default")},82934:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/Card.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/shared/components/Card.js","default")},85634:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/UsageStats.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/shared/components/UsageStats.js","default")},86241:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/LanguageSwitcher.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/shared/components/LanguageSwitcher.js","default")},86672:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/Toggle.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/shared/components/Toggle.js","default")},87030:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/HeaderMenu.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/shared/components/HeaderMenu.js","default")},89439:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/NoAuthProxyCard.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/shared/components/NoAuthProxyCard.js","default")},89468:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/AddCustomEmbeddingModal.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/shared/components/AddCustomEmbeddingModal.js","default")},90537:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/Header.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/shared/components/Header.js","default")},91329:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/ComboFormModal.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/shared/components/ComboFormModal.js","default")},95031:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/ProviderInfoCard.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/shared/components/ProviderInfoCard.js","default")},96142:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/McpMarketplaceModal.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/shared/components/McpMarketplaceModal.js","default")},97617:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/Avatar.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/shared/components/Avatar.js","default")},97934:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>f});var d=c(22037);c(38868),c(8114),c(22252),c(82934),c(73723),c(59062),c(97617),c(69385),c(86672),c(46127),c(87050),c(44846),c(90537),c(80959),c(15044),c(37218),c(33335),c(91329),c(96142),c(85634),c(86241),c(69270),c(87030),c(20535),c(81567),c(932),c(13377),c(65024),c(51283),c(50258),c(78472),c(39623),c(89468),c(89439),c(61357),c(78249),c(95031);var e=c(60864);function f({children:a}){return(0,d.jsx)(e.default,{children:a})}c(68480)}};
1
+ exports.id=7810,exports.ids=[7810],exports.modules={932:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/KiroAuthModal.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/shared/components/KiroAuthModal.js","default")},8114:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/Input.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/shared/components/Input.js","default")},13377:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/KiroOAuthWrapper.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/shared/components/KiroOAuthWrapper.js","default")},15044:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/OAuthModal.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/shared/components/OAuthModal.js","default")},20535:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/ChangelogModal.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/shared/components/ChangelogModal.js","default")},22252:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/Select.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/shared/components/Select.js","default")},29576:(a,b,c)=>{Promise.resolve().then(c.bind(c,66610)),Promise.resolve().then(c.bind(c,93447)),Promise.resolve().then(c.bind(c,92251)),Promise.resolve().then(c.bind(c,55590)),Promise.resolve().then(c.bind(c,75012)),Promise.resolve().then(c.bind(c,52149)),Promise.resolve().then(c.bind(c,49871)),Promise.resolve().then(c.bind(c,37421)),Promise.resolve().then(c.bind(c,18649)),Promise.resolve().then(c.bind(c,4565)),Promise.resolve().then(c.bind(c,61094)),Promise.resolve().then(c.bind(c,46411)),Promise.resolve().then(c.bind(c,27452)),Promise.resolve().then(c.bind(c,14504)),Promise.resolve().then(c.bind(c,31288)),Promise.resolve().then(c.bind(c,60393)),Promise.resolve().then(c.bind(c,60835)),Promise.resolve().then(c.bind(c,33446)),Promise.resolve().then(c.bind(c,60115)),Promise.resolve().then(c.bind(c,53142)),Promise.resolve().then(c.bind(c,77410)),Promise.resolve().then(c.bind(c,11892)),Promise.resolve().then(c.bind(c,44037)),Promise.resolve().then(c.bind(c,5948)),Promise.resolve().then(c.bind(c,33809)),Promise.resolve().then(c.bind(c,9904)),Promise.resolve().then(c.bind(c,85600)),Promise.resolve().then(c.bind(c,16081)),Promise.resolve().then(c.bind(c,7274)),Promise.resolve().then(c.bind(c,37545)),Promise.resolve().then(c.bind(c,15769)),Promise.resolve().then(c.bind(c,39907)),Promise.resolve().then(c.bind(c,62490)),Promise.resolve().then(c.bind(c,71708)),Promise.resolve().then(c.bind(c,7268)),Promise.resolve().then(c.bind(c,81101)),Promise.resolve().then(c.bind(c,37922)),Promise.resolve().then(c.bind(c,11747)),Promise.resolve().then(c.bind(c,33265))},33335:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/ManualConfigModal.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/shared/components/ManualConfigModal.js","default")},37218:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/ModelSelectModal.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/shared/components/ModelSelectModal.js","default")},38868:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/Button.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/shared/components/Button.js","default")},39623:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/EditConnectionModal.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/shared/components/EditConnectionModal.js","default")},44846:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/Sidebar.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/shared/components/Sidebar.js","default")},46127:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/ThemeToggle.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/shared/components/ThemeToggle.js","default")},50258:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/IFlowCookieModal.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/shared/components/IFlowCookieModal.js","default")},51283:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/CursorAuthModal.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/shared/components/CursorAuthModal.js","default")},59062:(a,b,c)=>{"use strict";c.d(b,{CardSkeleton:()=>h,PageLoading:()=>f,Skeleton:()=>g,Spinner:()=>e,default:()=>i});var d=c(92713);let e=(0,d.registerClientReference)(function(){throw Error("Attempted to call Spinner() from the server but Spinner is 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/shared/components/Loading.js","Spinner"),f=(0,d.registerClientReference)(function(){throw Error("Attempted to call PageLoading() from the server but PageLoading is 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/shared/components/Loading.js","PageLoading"),g=(0,d.registerClientReference)(function(){throw Error("Attempted to call Skeleton() from the server but Skeleton is 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/shared/components/Loading.js","Skeleton"),h=(0,d.registerClientReference)(function(){throw Error("Attempted to call CardSkeleton() from the server but CardSkeleton is 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/shared/components/Loading.js","CardSkeleton"),i=(0,d.registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/Loading.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/shared/components/Loading.js","default")},60864:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/layouts/DashboardLayout.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/shared/components/layouts/DashboardLayout.js","default")},61357:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/SegmentedControl.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/shared/components/SegmentedControl.js","default")},65024:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/KiroSocialOAuthModal.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/shared/components/KiroSocialOAuthModal.js","default")},66024:(a,b,c)=>{Promise.resolve().then(c.bind(c,89468)),Promise.resolve().then(c.bind(c,97617)),Promise.resolve().then(c.bind(c,69385)),Promise.resolve().then(c.bind(c,38868)),Promise.resolve().then(c.bind(c,82934)),Promise.resolve().then(c.bind(c,20535)),Promise.resolve().then(c.bind(c,91329)),Promise.resolve().then(c.bind(c,51283)),Promise.resolve().then(c.bind(c,39623)),Promise.resolve().then(c.bind(c,80959)),Promise.resolve().then(c.bind(c,78472)),Promise.resolve().then(c.bind(c,90537)),Promise.resolve().then(c.bind(c,87030)),Promise.resolve().then(c.bind(c,50258)),Promise.resolve().then(c.bind(c,8114)),Promise.resolve().then(c.bind(c,932)),Promise.resolve().then(c.bind(c,13377)),Promise.resolve().then(c.bind(c,65024)),Promise.resolve().then(c.bind(c,86241)),Promise.resolve().then(c.bind(c,68480)),Promise.resolve().then(c.bind(c,60864)),Promise.resolve().then(c.bind(c,59062)),Promise.resolve().then(c.bind(c,33335)),Promise.resolve().then(c.bind(c,96142)),Promise.resolve().then(c.bind(c,73723)),Promise.resolve().then(c.bind(c,37218)),Promise.resolve().then(c.bind(c,69270)),Promise.resolve().then(c.bind(c,89439)),Promise.resolve().then(c.bind(c,15044)),Promise.resolve().then(c.bind(c,95031)),Promise.resolve().then(c.bind(c,81567)),Promise.resolve().then(c.bind(c,61357)),Promise.resolve().then(c.bind(c,22252)),Promise.resolve().then(c.bind(c,44846)),Promise.resolve().then(c.bind(c,87050)),Promise.resolve().then(c.bind(c,46127)),Promise.resolve().then(c.bind(c,86672)),Promise.resolve().then(c.bind(c,78249)),Promise.resolve().then(c.bind(c,85634))},68480:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/layouts/AuthLayout.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/shared/components/layouts/AuthLayout.js","default")},69270:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/NineRemoteButton.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/shared/components/NineRemoteButton.js","default")},69385:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/Badge.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/shared/components/Badge.js","default")},73723:(a,b,c)=>{"use strict";c.d(b,{ConfirmModal:()=>f,default:()=>e});var d=c(92713);let e=(0,d.registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/Modal.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/shared/components/Modal.js","default"),f=(0,d.registerClientReference)(function(){throw Error("Attempted to call ConfirmModal() from the server but ConfirmModal is 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/shared/components/Modal.js","ConfirmModal")},78249:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/Tooltip.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/shared/components/Tooltip.js","default")},78472:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/GitLabAuthModal.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/shared/components/GitLabAuthModal.js","default")},80959:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/Footer.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/shared/components/Footer.js","default")},81567:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/RequestLogger.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/shared/components/RequestLogger.js","default")},82934:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/Card.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/shared/components/Card.js","default")},85634:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/UsageStats.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/shared/components/UsageStats.js","default")},86241:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/LanguageSwitcher.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/shared/components/LanguageSwitcher.js","default")},86672:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/Toggle.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/shared/components/Toggle.js","default")},87030:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/HeaderMenu.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/shared/components/HeaderMenu.js","default")},89439:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/NoAuthProxyCard.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/shared/components/NoAuthProxyCard.js","default")},89468:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/AddCustomEmbeddingModal.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/shared/components/AddCustomEmbeddingModal.js","default")},90537:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/Header.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/shared/components/Header.js","default")},91329:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/ComboFormModal.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/shared/components/ComboFormModal.js","default")},95031:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/ProviderInfoCard.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/shared/components/ProviderInfoCard.js","default")},96142:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/McpMarketplaceModal.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/shared/components/McpMarketplaceModal.js","default")},97617:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(92713).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/Users/Working/router4/app/src/shared/components/Avatar.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/shared/components/Avatar.js","default")},97934:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>f});var d=c(22037);c(38868),c(8114),c(22252),c(82934),c(73723),c(59062),c(97617),c(69385),c(86672),c(46127),c(87050),c(44846),c(90537),c(80959),c(15044),c(37218),c(33335),c(91329),c(96142),c(85634),c(86241),c(69270),c(87030),c(20535),c(81567),c(932),c(13377),c(65024),c(51283),c(50258),c(78472),c(39623),c(89468),c(89439),c(61357),c(78249),c(95031);var e=c(60864);function f({children:a}){return(0,d.jsx)(e.default,{children:a})}c(68480)}};
@@ -1 +1 @@
1
- "use strict";exports.id=8035,exports.ids=[8035],exports.modules={50304:(a,b,c)=>{c.d(b,{DA:()=>h,Lh:()=>f,Ux:()=>d,cw:()=>g,rI:()=>i,t1:()=>e});let d={intervalMs:2e3,timeoutMs:18e4,fetchTimeoutMs:5e3,dnsTimeoutMs:2e3},e={host:"1.1.1.1",port:443,timeoutMs:3e3},f=6e4,g=2500,h=6e4,i=5e3},54495:(a,b,c)=>{c.d(b,{Al:()=>A,Dd:()=>y,es:()=>E,fn:()=>F,nN:()=>H,ss:()=>G});var d=c(29021),e=c.n(d),f=c(33873),g=c.n(f),h=c(55591),i=c.n(h),j=c(21820),k=c.n(j),l=c(79646),m=c(19931),n=c(81372);let o=g().join(n.n,"bin"),p="cloudflared",q="win32"===k().platform(),r=q?`${p}.exe`:p,s=g().join(o,r),t="http2",u=new Set(["http2","quic","auto"]),v={darwin:{x64:"cloudflared-darwin-amd64.tgz",arm64:"cloudflared-darwin-arm64.tgz"},win32:{x64:"cloudflared-windows-amd64.exe",ia32:"cloudflared-windows-386.exe",arm64:"cloudflared-windows-386.exe"},linux:{x64:"cloudflared-linux-amd64",arm64:"cloudflared-linux-arm64"}},w={darwin:"cloudflared-darwin-amd64.tgz",win32:"cloudflared-windows-386.exe",linux:"cloudflared-linux-amd64"},x={downloading:!1,progress:0};function y(){return{downloading:x.downloading,progress:x.progress}}let z=null;async function A(){return z||(z=B().finally(()=>{z=null}))}async function B(){e().existsSync(o)||e().mkdirSync(o,{recursive:!0});let a=`${s}.tmp`;if(e().existsSync(a))try{e().unlinkSync(a)}catch{}if(e().existsSync(s))if(function(a){try{if(e().statSync(a).size<1048576)return!1;let b=e().openSync(a,"r"),c=Buffer.alloc(4);e().readSync(b,c,0,4,0),e().closeSync(b);let d=c.toString("hex");if(q)return d.startsWith("4d5a");if("darwin"===k().platform())return d.startsWith("cffaedfe")||d.startsWith("cefaedfe");return d.startsWith("7f454c46")}catch{return!1}}(s))return q||e().chmodSync(s,"755"),s;else console.log("[cloudflared] Invalid binary detected, re-downloading..."),e().unlinkSync(s);let b=function(){let a=k().platform(),b=k().arch(),c=v[a];if(!c)throw Error(`Unsupported platform: ${a}`);let d=c[b]||w[a];return`https://github.com/cloudflare/cloudflared/releases/latest/download/${d}`}(),c=b.endsWith(".tgz"),d=c?g().join(o,"cloudflared.tgz.tmp"):a;return await function a(b,c){return new Promise((d,f)=>{let g=e().createWriteStream(c);i().get(b,b=>{if([301,302,303,307,308].includes(b.statusCode)){g.close(),e().unlinkSync(c),a(b.headers.location,c).then(d).catch(f);return}if(200!==b.statusCode){g.close(),e().unlinkSync(c),f(Error(`Download failed with status ${b.statusCode}`));return}let h=parseInt(b.headers["content-length"],10)||0,i=0;x.downloading=!0,x.progress=0,b.on("data",a=>{i+=a.length,h>0&&(x.progress=Math.round(i/h*100))}),b.pipe(g),g.on("finish",()=>{x.downloading=!1,x.progress=100,g.close(()=>d(c))}),g.on("error",a=>{x.downloading=!1,x.progress=0,g.close(),e().unlinkSync(c),f(a)})}).on("error",a=>{x.downloading=!1,x.progress=0,g.close(),e().existsSync(c)&&e().unlinkSync(c),f(a)})})}(b,d),c?((0,l.execSync)(`tar -xzf "${d}" -C "${o}"`,{stdio:"pipe",windowsHide:!0}),e().unlinkSync(d)):e().renameSync(d,s),q||e().chmodSync(s,"755"),s}let C=null,D=null;function E(a){D=a}async function F(a,b){let c=await A(),d=e().mkdtempSync(g().join(k().tmpdir(),"cloudflared-quick-")),f=g().join(d,"config.yml");e().writeFileSync(f,"# quick-tunnel config placeholder\n","utf8");let h=!1,i=()=>{if(!h){h=!0;try{e().rmSync(d,{recursive:!0,force:!0})}catch(a){}}},j=String(process.env.TUNNEL_TRANSPORT_PROTOCOL||process.env.CLOUDFLARED_PROTOCOL||t).trim().toLowerCase(),n=u.has(j)?j:t,o=(0,l.spawn)(c,["tunnel","--url",`http://127.0.0.1:${a}`,"--config",f,"--no-autoupdate"],{detached:!1,windowsHide:!0,env:{...process.env,TUNNEL_TRANSPORT_PROTOCOL:n},stdio:["ignore","pipe","pipe"]});return C=o,(0,m.xS)(o.pid),new Promise((a,c)=>{let d=!1,e=setTimeout(()=>{d||(d=!0,i(),c(Error("Quick tunnel timed out")))},9e4),f=null,g=c=>{let g=function(a){let b=[];for(let c of a.matchAll(/https:\/\/([a-z0-9-]+)\.trycloudflare\.com/gi)){let a=c[1];"api"!==a&&b.push(`https://${a}.trycloudflare.com`)}return b.length?b[b.length-1]:null}(c.toString());if(g){if(!d){d=!0,f=g,clearTimeout(e),i(),a({child:o,tunnelUrl:g});return}g!==f&&(f=g,b&&b(g))}};o.stdout.on("data",g),o.stderr.on("data",g),o.on("error",a=>{d||(d=!0,clearTimeout(e),i(),c(a))}),o.on("exit",(a,b)=>{if(C=null,(0,m.r4)(),!d){d=!0,clearTimeout(e),i(),1===a?c(Error(`cloudflared exited with code ${a}. This often means: (1) the tunnel token is invalid or expired, (2) network connectivity issues, or (3) cloudflared cannot reach the local server.`)):2===a?c(Error(`cloudflared exited with code ${a}. Check that arguments are correct.`)):c(Error(`cloudflared exited with code ${a}`));return}D&&D(),i()})})}function G(a){if(C){try{C.kill()}catch(a){}C=null}let b=(0,m.Cr)();if(b){try{process.kill(b)}catch(a){}(0,m.r4)()}if(a)try{if(q){let b=`Get-CimInstance Win32_Process -Filter \\"Name='cloudflared.exe'\\" | Where-Object { $_.CommandLine -match ':${a}(\\D|$)' } | ForEach-Object { Stop-Process -Id $_.ProcessId -Force }`;(0,l.execSync)(`powershell -NoProfile -NonInteractive -WindowStyle Hidden -Command "${b}"`,{stdio:"ignore",windowsHide:!0})}else(0,l.execSync)(`pkill -f "cloudflared.*:${a}([^0-9]|$)" 2>/dev/null || true`,{stdio:"ignore",windowsHide:!0})}catch(a){}}function H(){let a=(0,m.Cr)();if(!a)return!1;try{return process.kill(a,0),!0}catch(a){return!1}}},88035:(a,b,c)=>{c.d(b,{H4:()=>A,Jv:()=>x,Qn:()=>o,Rg:()=>w,cb:()=>v,mh:()=>y,oN:()=>p,rH:()=>z});var d=c(55511),e=c.n(d),f=c(19931),g=c(54495),h=c(13774),i=c(37770),j=c(50514),k=c(91160);(0,j.initDbHooks)(i.mt,i.Xx);let l=process.env.TUNNEL_WORKER_URL||"https://9router.com",m={cancelToken:{cancelled:!1},spawnInProgress:!1,lastRestartAt:0,activeLocalPort:null},n={cancelToken:{cancelled:!1},spawnInProgress:!1,lastRestartAt:0,activeLocalPort:null};function o(){return m}function p(){return n}let q={value:!1,url:null,fetchedAt:0,refreshing:!1},r={value:!1,url:null,fetchedAt:0,refreshing:!1};function s(a,b){return a.url!==b&&(a.value=!1,a.fetchedAt=0),Date.now()-a.fetchedAt>3e4&&function(a,b){if(!a.refreshing){if(!b){a.value=!1,a.url=null,a.fetchedAt=Date.now();return}a.refreshing=!0,(0,k.$c)(b).then(b=>{a.value=b}).catch(()=>{a.value=!1}).finally(()=>{a.url=b,a.fetchedAt=Date.now(),a.refreshing=!1})}}(a,b),a.value}async function t(a,b){await fetch(`${l}/api/tunnel/register`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({shortId:a,tunnelUrl:b})})}function u(a,b){if(a.cancelled)throw Error(`${b} cancelled`)}async function v(a=20128){m.cancelToken={cancelled:!1},m.activeLocalPort=a,m.spawnInProgress=!0;let b=m.cancelToken;try{if((0,g.nN)()){let a=(0,f.C7)();if(a?.tunnelUrl&&await (0,k.$c)(a.tunnelUrl)){let b=`https://r${a.shortId}.9router.com`;return{success:!0,tunnelUrl:a.tunnelUrl,shortId:a.shortId,publicUrl:b,alreadyRunning:!0}}}(0,g.ss)(a),u(b,"tunnel");let d=function(){try{let{machineIdSync:a}=c(20243),b=a();return e().createHash("sha256").update(b+"9router-tunnel-salt").digest("hex").substring(0,16)}catch(a){return e().randomUUID().replace(/-/g,"").substring(0,16)}}(),h=(0,f.C7)(),j=h?.shortId||(0,f.jd)(),l=async a=>{b.cancelled||(await t(j,a),(0,f.LZ)({shortId:j,machineId:d,tunnelUrl:a}),await (0,i.Xx)({tunnelEnabled:!0,tunnelUrl:a}))},{tunnelUrl:m}=await (0,g.fn)(a,l);u(b,"tunnel");let n=`https://r${j}.9router.com`;return await t(j,m),(0,f.LZ)({shortId:j,machineId:d,tunnelUrl:m}),await (0,i.Xx)({tunnelEnabled:!0,tunnelUrl:m}),await (0,k.tm)(m,b),await (0,k.tm)(n,b),q.value=!0,q.url=m,q.fetchedAt=Date.now(),{success:!0,tunnelUrl:m,shortId:j,publicUrl:n}}finally{m.spawnInProgress=!1}}async function w(){m.cancelToken.cancelled=!0,(0,g.es)(null),(0,g.ss)(m.activeLocalPort);let a=(0,f.C7)();return a&&(0,f.LZ)({shortId:a.shortId,machineId:a.machineId,tunnelUrl:null}),await (0,i.Xx)({tunnelEnabled:!1,tunnelUrl:""}),q.value=!1,q.url=null,q.fetchedAt=Date.now(),{success:!0}}async function x(){let a=!0===(await (0,i.mt)()).tunnelEnabled,b=(0,f.C7)(),c=b?.shortId||"",d=c?`https://r${c}.9router.com`:"",e=b?.tunnelUrl||"",h=!!a&&(0,g.nN)(),j=!!a&&!!h&&s(q,e);return{enabled:a&&h,settingsEnabled:a,tunnelUrl:e,shortId:c,publicUrl:d,running:h,reachable:j}}async function y(a=20128){n.cancelToken={cancelled:!1},n.activeLocalPort=a,n.spawnInProgress=!0;let b=n.cancelToken;try{let c=(0,j.getCachedPassword)()||await (0,j.loadEncryptedPassword)()||"";await (0,h.OZ)(c),u(b,"tailscale");let d=(0,f.C7)(),e=d?.shortId||(0,f.jd)();if(!(0,h.a$)()){let a=await (0,h.c$)(e);if(a.authUrl)return{success:!1,needsLogin:!0,authUrl:a.authUrl}}u(b,"tailscale"),(0,h.PZ)();let g=await (0,h.LC)(a);if(u(b,"tailscale"),g.funnelNotEnabled)return{success:!1,funnelNotEnabled:!0,enableUrl:g.enableUrl};if(!(0,h.a$)()||!(0,h.hp)())return(0,h.PZ)(),{success:!1,error:"Tailscale not connected. Device may have been removed. Please re-login."};return await (0,i.Xx)({tailscaleEnabled:!0,tailscaleUrl:g.tunnelUrl}),await (0,k.tm)(g.tunnelUrl,b),r.value=!0,r.url=g.tunnelUrl,r.fetchedAt=Date.now(),{success:!0,tunnelUrl:g.tunnelUrl}}finally{n.spawnInProgress=!1}}async function z(){return n.cancelToken.cancelled=!0,(0,h.PZ)(),await (0,i.Xx)({tailscaleEnabled:!1,tailscaleUrl:""}),r.value=!1,r.url=null,r.fetchedAt=Date.now(),{success:!0}}async function A(){let a=await (0,i.mt)(),b=!0===a.tailscaleEnabled,c=a.tailscaleUrl||"",d=!!b&&(0,h.Kp)(),e=!!b&&!!d&&s(r,c);return{enabled:b&&d,settingsEnabled:b,tunnelUrl:c,running:d,reachable:e}}},91160:(a,b,c)=>{c.d(b,{$c:()=>l,tm:()=>m,u7:()=>j});var d=c(91645),e=c.n(d),f=c(14985),g=c.n(f),h=c(50304);let i=new(g()).promises.Resolver;function j(){return new Promise(a=>{let b=new(e()).Socket,c=!1,d=d=>{if(!c){c=!0;try{b.destroy()}catch{}a(d)}};b.setTimeout(h.t1.timeoutMs),b.once("connect",()=>d(!0)),b.once("timeout",()=>d(!1)),b.once("error",()=>d(!1));try{b.connect(h.t1.port,h.t1.host)}catch{d(!1)}})}async function k(a,b){let c=a=>Promise.race([a(),new Promise((a,c)=>setTimeout(()=>c(Error("dns timeout")),b))]).then(()=>!0).catch(()=>!1);return!!await c(()=>i.resolve4(a))||c(()=>g().promises.resolve4(a))}async function l(a){let b;if(!a)return!1;try{b=new URL(a).hostname}catch{return!1}if(!await k(b,h.Ux.dnsTimeoutMs))return!1;try{return(await fetch(`${a}/api/health`,{signal:AbortSignal.timeout(h.Ux.fetchTimeoutMs)})).ok}catch{return!1}}async function m(a,b={cancelled:!1}){let c=Date.now();for(;Date.now()-c<h.Ux.timeoutMs;){if(b.cancelled)throw Error("cancelled");if(await l(a))return!0;await new Promise(a=>setTimeout(a,h.Ux.intervalMs))}throw Error(`Health check timeout after ${h.Ux.timeoutMs}ms`)}i.setServers(["1.1.1.1","1.0.0.1","8.8.8.8"])}};
1
+ "use strict";exports.id=8035,exports.ids=[8035],exports.modules={50304:(a,b,c)=>{c.d(b,{DA:()=>h,Lh:()=>f,Ux:()=>d,cw:()=>g,rI:()=>i,t1:()=>e});let d={intervalMs:2e3,timeoutMs:18e4,fetchTimeoutMs:5e3,dnsTimeoutMs:2e3},e={host:"1.1.1.1",port:443,timeoutMs:3e3},f=6e4,g=2500,h=6e4,i=5e3},54495:(a,b,c)=>{c.d(b,{Al:()=>A,Dd:()=>y,es:()=>E,fn:()=>F,nN:()=>H,ss:()=>G});var d=c(29021),e=c.n(d),f=c(33873),g=c.n(f),h=c(55591),i=c.n(h),j=c(21820),k=c.n(j),l=c(79646),m=c(19931),n=c(81372);let o=g().join(n.n,"bin"),p="cloudflared",q="win32"===k().platform(),r=q?`${p}.exe`:p,s=g().join(o,r),t="http2",u=new Set(["http2","quic","auto"]),v={darwin:{x64:"cloudflared-darwin-amd64.tgz",arm64:"cloudflared-darwin-arm64.tgz"},win32:{x64:"cloudflared-windows-amd64.exe",ia32:"cloudflared-windows-386.exe",arm64:"cloudflared-windows-386.exe"},linux:{x64:"cloudflared-linux-amd64",arm64:"cloudflared-linux-arm64"}},w={darwin:"cloudflared-darwin-amd64.tgz",win32:"cloudflared-windows-386.exe",linux:"cloudflared-linux-amd64"},x={downloading:!1,progress:0};function y(){return{downloading:x.downloading,progress:x.progress}}let z=null;async function A(){return z||(z=B().finally(()=>{z=null}))}async function B(){e().existsSync(o)||e().mkdirSync(o,{recursive:!0});let a=`${s}.tmp`;if(e().existsSync(a))try{e().unlinkSync(a)}catch{}if(e().existsSync(s))if(function(a){try{if(e().statSync(a).size<1048576)return!1;let b=e().openSync(a,"r"),c=Buffer.alloc(4);e().readSync(b,c,0,4,0),e().closeSync(b);let d=c.toString("hex");if(q)return d.startsWith("4d5a");if("darwin"===k().platform())return d.startsWith("cffaedfe")||d.startsWith("cefaedfe");return d.startsWith("7f454c46")}catch{return!1}}(s))return q||e().chmodSync(s,"755"),s;else console.log("[cloudflared] Invalid binary detected, re-downloading..."),e().unlinkSync(s);let b=function(){let a=k().platform(),b=k().arch(),c=v[a];if(!c)throw Error(`Unsupported platform: ${a}`);let d=c[b]||w[a];return`https://github.com/cloudflare/cloudflared/releases/latest/download/${d}`}(),c=b.endsWith(".tgz"),d=c?g().join(o,"cloudflared.tgz.tmp"):a;return await function a(b,c){return new Promise((d,f)=>{let g=e().createWriteStream(c);i().get(b,b=>{if([301,302,303,307,308].includes(b.statusCode)){g.close(),e().unlinkSync(c),a(b.headers.location,c).then(d).catch(f);return}if(200!==b.statusCode){g.close(),e().unlinkSync(c),f(Error(`Download failed with status ${b.statusCode}`));return}let h=parseInt(b.headers["content-length"],10)||0,i=0;x.downloading=!0,x.progress=0,b.on("data",a=>{i+=a.length,h>0&&(x.progress=Math.round(i/h*100))}),b.pipe(g),g.on("finish",()=>{x.downloading=!1,x.progress=100,g.close(()=>d(c))}),g.on("error",a=>{x.downloading=!1,x.progress=0,g.close(),e().unlinkSync(c),f(a)})}).on("error",a=>{x.downloading=!1,x.progress=0,g.close(),e().existsSync(c)&&e().unlinkSync(c),f(a)})})}(b,d),c?((0,l.execSync)(`tar -xzf "${d}" -C "${o}"`,{stdio:"pipe",windowsHide:!0}),e().unlinkSync(d)):e().renameSync(d,s),q||e().chmodSync(s,"755"),s}let C=null,D=null;function E(a){D=a}async function F(a,b){let c=await A(),d=e().mkdtempSync(g().join(k().tmpdir(),"cloudflared-quick-")),f=g().join(d,"config.yml");e().writeFileSync(f,"# quick-tunnel config placeholder\n","utf8");let h=!1,i=()=>{if(!h){h=!0;try{e().rmSync(d,{recursive:!0,force:!0})}catch(a){}}},j=String(process.env.TUNNEL_TRANSPORT_PROTOCOL||process.env.CLOUDFLARED_PROTOCOL||t).trim().toLowerCase(),n=u.has(j)?j:t,o=(0,l.spawn)(c,["tunnel","--url",`http://127.0.0.1:${a}`,"--config",f,"--no-autoupdate"],{detached:!1,windowsHide:!0,cwd:k().tmpdir(),env:{...process.env,TUNNEL_TRANSPORT_PROTOCOL:n},stdio:["ignore","pipe","pipe"]});return C=o,(0,m.xS)(o.pid),new Promise((a,c)=>{let d=!1,e=setTimeout(()=>{d||(d=!0,i(),c(Error("Quick tunnel timed out")))},9e4),f=null,g=c=>{let g=function(a){let b=[];for(let c of a.matchAll(/https:\/\/([a-z0-9-]+)\.trycloudflare\.com/gi)){let a=c[1];"api"!==a&&b.push(`https://${a}.trycloudflare.com`)}return b.length?b[b.length-1]:null}(c.toString());if(g){if(!d){d=!0,f=g,clearTimeout(e),i(),console.log(`[Tunnel] cloudflared URL: ${g}`),a({child:o,tunnelUrl:g});return}g!==f&&(console.log(`[Tunnel] cloudflared URL changed: ${g}`),f=g,b&&b(g))}};o.stdout.on("data",g),o.stderr.on("data",g),o.on("error",a=>{d||(d=!0,clearTimeout(e),i(),c(a))}),o.on("exit",(a,b)=>{if(C=null,(0,m.r4)(),console.log(`[Tunnel] cloudflared exit code=${a} signal=${b}`),!d){d=!0,clearTimeout(e),i(),1===a?c(Error(`cloudflared exited with code ${a}. This often means: (1) the tunnel token is invalid or expired, (2) network connectivity issues, or (3) cloudflared cannot reach the local server.`)):2===a?c(Error(`cloudflared exited with code ${a}. Check that arguments are correct.`)):c(Error(`cloudflared exited with code ${a}`));return}D&&D(),i()})})}function G(a){if(C){try{C.kill()}catch(a){}C=null}let b=(0,m.Cr)();if(b){try{process.kill(b)}catch(a){}(0,m.r4)()}if(a)try{if(q){let b=`Get-CimInstance Win32_Process -Filter \\"Name='cloudflared.exe'\\" | Where-Object { $_.CommandLine -match ':${a}(\\D|$)' } | ForEach-Object { Stop-Process -Id $_.ProcessId -Force }`;(0,l.execSync)(`powershell -NoProfile -NonInteractive -WindowStyle Hidden -Command "${b}"`,{stdio:"ignore",windowsHide:!0})}else(0,l.execSync)(`pkill -f "cloudflared.*:${a}([^0-9]|$)" 2>/dev/null || true`,{stdio:"ignore",windowsHide:!0})}catch(a){}}function H(){let a=(0,m.Cr)();if(!a)return!1;try{return process.kill(a,0),!0}catch(a){return!1}}},88035:(a,b,c)=>{c.d(b,{H4:()=>A,Jv:()=>x,Qn:()=>o,Rg:()=>w,cb:()=>v,mh:()=>y,oN:()=>p,rH:()=>z});var d=c(55511),e=c.n(d),f=c(19931),g=c(54495),h=c(13774),i=c(37770),j=c(50514),k=c(91160);(0,j.initDbHooks)(i.mt,i.Xx);let l=process.env.TUNNEL_WORKER_URL||"https://9router.com",m={cancelToken:{cancelled:!1},spawnInProgress:!1,lastRestartAt:0,activeLocalPort:null},n={cancelToken:{cancelled:!1},spawnInProgress:!1,lastRestartAt:0,activeLocalPort:null};function o(){return m}function p(){return n}let q={value:!1,url:null,fetchedAt:0,refreshing:!1},r={value:!1,url:null,fetchedAt:0,refreshing:!1};function s(a,b){return a.url!==b&&(a.value=!1,a.fetchedAt=0),Date.now()-a.fetchedAt>3e4&&function(a,b){if(!a.refreshing){if(!b){a.value=!1,a.url=null,a.fetchedAt=Date.now();return}a.refreshing=!0,(0,k.$c)(b).then(b=>{a.value=b}).catch(()=>{a.value=!1}).finally(()=>{a.url=b,a.fetchedAt=Date.now(),a.refreshing=!1})}}(a,b),a.value}async function t(a,b){await fetch(`${l}/api/tunnel/register`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({shortId:a,tunnelUrl:b})})}function u(a,b){if(a.cancelled)throw Error(`${b} cancelled`)}async function v(a=20128){console.log(`[Tunnel] enable start (port=${a})`),m.cancelToken={cancelled:!1},m.activeLocalPort=a,m.spawnInProgress=!0;let b=m.cancelToken;try{if((0,g.nN)()){let a=(0,f.C7)();if(a?.tunnelUrl&&await (0,k.$c)(a.tunnelUrl)){let b=`https://r${a.shortId}.9router.com`;return console.log(`[Tunnel] already running, reuse: ${a.tunnelUrl}`),{success:!0,tunnelUrl:a.tunnelUrl,shortId:a.shortId,publicUrl:b,alreadyRunning:!0}}}(0,g.ss)(a),console.log("[Tunnel] killed existing cloudflared"),u(b,"tunnel");let d=function(){try{let{machineIdSync:a}=c(20243),b=a();return e().createHash("sha256").update(b+"9router-tunnel-salt").digest("hex").substring(0,16)}catch(a){return e().randomUUID().replace(/-/g,"").substring(0,16)}}(),h=(0,f.C7)(),j=h?.shortId||(0,f.jd)(),l=async a=>{b.cancelled||(console.log(`[Tunnel] url updated: ${a}`),await t(j,a),(0,f.LZ)({shortId:j,machineId:d,tunnelUrl:a}),await (0,i.Xx)({tunnelEnabled:!0,tunnelUrl:a}))},{tunnelUrl:m}=await (0,g.fn)(a,l);console.log(`[Tunnel] spawned: ${m}`),u(b,"tunnel");let n=`https://r${j}.9router.com`;return await t(j,m),(0,f.LZ)({shortId:j,machineId:d,tunnelUrl:m}),await (0,i.Xx)({tunnelEnabled:!0,tunnelUrl:m}),console.log(`[Tunnel] registered shortId=${j} publicUrl=${n}`),await (0,k.tm)(m,b),console.log("[Tunnel] direct URL healthy"),await (0,k.tm)(n,b),console.log("[Tunnel] public URL healthy"),q.value=!0,q.url=m,q.fetchedAt=Date.now(),console.log("[Tunnel] enable success"),{success:!0,tunnelUrl:m,shortId:j,publicUrl:n}}catch(a){throw console.error(`[Tunnel] enable error: ${a.message}`),a}finally{m.spawnInProgress=!1}}async function w(){console.log("[Tunnel] disable"),m.cancelToken.cancelled=!0,(0,g.es)(null),(0,g.ss)(m.activeLocalPort);let a=(0,f.C7)();return a&&(0,f.LZ)({shortId:a.shortId,machineId:a.machineId,tunnelUrl:null}),await (0,i.Xx)({tunnelEnabled:!1,tunnelUrl:""}),q.value=!1,q.url=null,q.fetchedAt=Date.now(),{success:!0}}async function x(){let a=!0===(await (0,i.mt)()).tunnelEnabled,b=(0,f.C7)(),c=b?.shortId||"",d=c?`https://r${c}.9router.com`:"",e=b?.tunnelUrl||"",h=!!a&&(0,g.nN)(),j=!!a&&!!h&&s(q,e);return{enabled:a&&h,settingsEnabled:a,tunnelUrl:e,shortId:c,publicUrl:d,running:h,reachable:j}}async function y(a=20128){console.log(`[Tailscale] enable start (port=${a})`),n.cancelToken={cancelled:!1},n.activeLocalPort=a,n.spawnInProgress=!0;let b=n.cancelToken;try{let c,d=(0,j.getCachedPassword)()||await (0,j.loadEncryptedPassword)()||"";await (0,h.OZ)(d),console.log("[Tailscale] daemon ready"),u(b,"tailscale");let e=(0,f.C7)(),g=e?.shortId||(0,f.jd)(),l=(0,h.a$)();if(console.log(`[Tailscale] loggedIn=${l}`),!l){let a=await (0,h.c$)(g);if(a.authUrl)return console.log(`[Tailscale] needs login, authUrl=${a.authUrl}`),{success:!1,needsLogin:!0,authUrl:a.authUrl};console.log("[Tailscale] login resolved alreadyLoggedIn")}u(b,"tailscale"),(0,h.PZ)();try{console.log("[Tailscale] starting funnel"),c=await (0,h.LC)(a)}catch(a){if(console.error(`[Tailscale] funnel error: ${a.message}`),/NoState|unexpected state|not logged in|Logged ?out|NeedsLogin/i.test(a.message||"")){console.log("[Tailscale] retry via startLogin");let a=await (0,h.c$)(g);if(a.authUrl)return{success:!1,needsLogin:!0,authUrl:a.authUrl}}throw a}if(u(b,"tailscale"),c.funnelNotEnabled)return console.log(`[Tailscale] funnel not enabled, enableUrl=${c.enableUrl}`),{success:!1,funnelNotEnabled:!0,enableUrl:c.enableUrl};if(!(0,h.a$)()||!(0,h.hp)())return console.error("[Tailscale] strict probe failed (device removed?)"),(0,h.PZ)(),{success:!1,error:"Tailscale not connected. Device may have been removed. Please re-login."};return await (0,i.Xx)({tailscaleEnabled:!0,tailscaleUrl:c.tunnelUrl}),console.log(`[Tailscale] funnel up: ${c.tunnelUrl}`),await (0,k.tm)(c.tunnelUrl,b),console.log("[Tailscale] enable success"),r.value=!0,r.url=c.tunnelUrl,r.fetchedAt=Date.now(),{success:!0,tunnelUrl:c.tunnelUrl}}catch(a){throw console.error(`[Tailscale] enable error: ${a.message}`),a}finally{n.spawnInProgress=!1}}async function z(){return console.log("[Tailscale] disable"),n.cancelToken.cancelled=!0,(0,h.PZ)(),await (0,i.Xx)({tailscaleEnabled:!1,tailscaleUrl:""}),r.value=!1,r.url=null,r.fetchedAt=Date.now(),{success:!0}}async function A(){let a=await (0,i.mt)(),b=!0===a.tailscaleEnabled,c=a.tailscaleUrl||"",d=!!b&&(0,h.Kp)(),e=!!b&&!!d&&s(r,c);return{enabled:b&&d,settingsEnabled:b,tunnelUrl:c,running:d,reachable:e}}},91160:(a,b,c)=>{c.d(b,{$c:()=>l,tm:()=>m,u7:()=>j});var d=c(91645),e=c.n(d),f=c(14985),g=c.n(f),h=c(50304);let i=new(g()).promises.Resolver;function j(){return new Promise(a=>{let b=new(e()).Socket,c=!1,d=d=>{if(!c){c=!0;try{b.destroy()}catch{}a(d)}};b.setTimeout(h.t1.timeoutMs),b.once("connect",()=>d(!0)),b.once("timeout",()=>d(!1)),b.once("error",()=>d(!1));try{b.connect(h.t1.port,h.t1.host)}catch{d(!1)}})}async function k(a,b){let c=a=>Promise.race([a(),new Promise((a,c)=>setTimeout(()=>c(Error("dns timeout")),b))]).then(()=>!0).catch(()=>!1);return!!await c(()=>i.resolve4(a))||c(()=>g().promises.resolve4(a))}async function l(a){let b;if(!a)return!1;try{b=new URL(a).hostname}catch{return!1}if(!await k(b,h.Ux.dnsTimeoutMs))return!1;try{return(await fetch(`${a}/api/health`,{signal:AbortSignal.timeout(h.Ux.fetchTimeoutMs)})).ok}catch{return!1}}async function m(a,b={cancelled:!1}){let c=Date.now();for(;Date.now()-c<h.Ux.timeoutMs;){if(b.cancelled)throw Error("cancelled");if(await l(a))return!0;await new Promise(a=>setTimeout(a,h.Ux.intervalMs))}throw Error(`Health check timeout after ${h.Ux.timeoutMs}ms`)}i.setServers(["1.1.1.1","1.0.0.1","8.8.8.8"])}};