@yina-npm/openrouterx 0.4.80 → 0.5.10

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 (1621) hide show
  1. package/LICENSE +22 -1
  2. package/README.md +72 -420
  3. package/app/.next-cli-build/BUILD_ID +1 -0
  4. package/app/.next-cli-build/app-path-routes-manifest.json +170 -0
  5. package/app/.next-cli-build/build-manifest.json +20 -0
  6. package/app/.next-cli-build/prerender-manifest.json +239 -0
  7. package/app/.next-cli-build/required-server-files.json +380 -0
  8. package/app/.next-cli-build/routes-manifest.json +1131 -0
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/admin/keys/page.js +2 -0
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/admin/keys/page.js.nft.json +1 -0
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/admin/keys/page_client-reference-manifest.js +1 -0
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/admin/users/page.js +2 -0
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/admin/users/page.js.nft.json +1 -0
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/admin/users/page_client-reference-manifest.js +1 -0
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -0
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -0
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -0
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +24 -0
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -0
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -0
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -0
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -0
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -0
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +2 -0
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -0
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -0
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -0
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -0
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -0
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -0
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -0
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -0
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +60 -0
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -0
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -0
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -0
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -0
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -0
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +5 -0
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -0
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -0
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -0
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -0
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -0
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -0
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -0
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -0
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -0
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -0
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -0
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -0
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -0
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -0
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +11 -0
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -0
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -0
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -0
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -0
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -0
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -0
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -0
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -0
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +5 -0
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -0
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -0
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +3 -0
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -0
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -0
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -0
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -0
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -0
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -0
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -0
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -0
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -0
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -0
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -0
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/user/page.js +5 -0
  79. package/app/.next-cli-build/server/app/(dashboard)/dashboard/user/page.js.nft.json +1 -0
  80. package/app/.next-cli-build/server/app/(dashboard)/dashboard/user/page_client-reference-manifest.js +1 -0
  81. package/app/.next-cli-build/server/app/_global-error/page.js +32 -0
  82. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -0
  83. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -0
  84. package/app/.next-cli-build/server/app/_global-error.html +1 -0
  85. package/app/.next-cli-build/server/app/_global-error.rsc +14 -0
  86. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +14 -0
  87. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +5 -0
  88. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +5 -0
  89. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +5 -0
  90. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +5 -0
  91. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -0
  92. package/app/.next-cli-build/server/app/_not-found/page.js +2 -0
  93. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -0
  94. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -0
  95. package/app/.next-cli-build/server/app/_not-found.html +1 -0
  96. package/app/.next-cli-build/server/app/_not-found.rsc +21 -0
  97. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +21 -0
  98. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +6 -0
  99. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +9 -0
  100. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -0
  101. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +5 -0
  102. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +4 -0
  103. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -0
  104. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -0
  105. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -0
  106. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -0
  107. package/app/.next-cli-build/server/app/api/auth/me/route.js +1 -0
  108. package/app/.next-cli-build/server/app/api/auth/me/route.js.nft.json +1 -0
  109. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -0
  110. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -0
  111. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -0
  112. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -0
  113. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -0
  114. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -0
  115. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -0
  116. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -0
  117. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -0
  118. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -0
  119. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +17 -0
  120. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -0
  121. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -0
  122. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -0
  123. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -0
  124. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -0
  125. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -0
  126. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -0
  127. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -0
  128. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -0
  129. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/activate-account/route.js +2 -0
  130. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/activate-account/route.js.nft.json +1 -0
  131. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -0
  132. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -0
  133. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -0
  134. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -0
  135. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -0
  136. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -0
  137. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -0
  138. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -0
  139. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -0
  140. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -0
  141. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +9 -0
  142. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -0
  143. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -0
  144. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -0
  145. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +10 -0
  146. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -0
  147. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +3 -0
  148. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -0
  149. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -0
  150. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -0
  151. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -0
  152. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -0
  153. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -0
  154. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -0
  155. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -0
  156. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -0
  157. package/app/.next-cli-build/server/app/api/combos/route.js +1 -0
  158. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -0
  159. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -0
  160. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -0
  161. package/app/.next-cli-build/server/app/api/headroom/start/route_client-reference-manifest.js +1 -0
  162. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -0
  163. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -0
  164. package/app/.next-cli-build/server/app/api/headroom/status/route_client-reference-manifest.js +1 -0
  165. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -0
  166. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -0
  167. package/app/.next-cli-build/server/app/api/headroom/stop/route_client-reference-manifest.js +1 -0
  168. package/app/.next-cli-build/server/app/api/health/route.js +1 -0
  169. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -0
  170. package/app/.next-cli-build/server/app/api/init/route.js +1 -0
  171. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -0
  172. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -0
  173. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -0
  174. package/app/.next-cli-build/server/app/api/keys/route.js +1 -0
  175. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -0
  176. package/app/.next-cli-build/server/app/api/locale/route.js +1 -0
  177. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -0
  178. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +7 -0
  179. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -0
  180. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +10 -0
  181. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -0
  182. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -0
  183. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -0
  184. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -0
  185. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -0
  186. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -0
  187. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -0
  188. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -0
  189. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -0
  190. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -0
  191. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -0
  192. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -0
  193. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -0
  194. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -0
  195. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -0
  196. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -0
  197. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -0
  198. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -0
  199. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -0
  200. package/app/.next-cli-build/server/app/api/models/route.js +1 -0
  201. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -0
  202. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -0
  203. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -0
  204. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -0
  205. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -0
  206. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -0
  207. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -0
  208. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -0
  209. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -0
  210. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +4 -0
  211. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -0
  212. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -0
  213. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -0
  214. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -0
  215. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -0
  216. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -0
  217. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -0
  218. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -0
  219. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -0
  220. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route_client-reference-manifest.js +1 -0
  221. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -0
  222. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -0
  223. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -0
  224. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -0
  225. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -0
  226. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -0
  227. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -0
  228. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -0
  229. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -0
  230. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -0
  231. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -0
  232. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -0
  233. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -0
  234. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -0
  235. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -0
  236. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -0
  237. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -0
  238. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -0
  239. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -0
  240. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -0
  241. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -0
  242. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -0
  243. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -0
  244. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -0
  245. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -0
  246. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -0
  247. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -0
  248. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -0
  249. package/app/.next-cli-build/server/app/api/providers/route.js +1 -0
  250. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -0
  251. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -0
  252. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -0
  253. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -0
  254. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -0
  255. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -0
  256. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -0
  257. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -0
  258. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -0
  259. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -0
  260. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -0
  261. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +43 -0
  262. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -0
  263. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +40 -0
  264. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -0
  265. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -0
  266. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -0
  267. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +33 -0
  268. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -0
  269. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -0
  270. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -0
  271. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -0
  272. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -0
  273. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -0
  274. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -0
  275. package/app/.next-cli-build/server/app/api/settings/route.js +1 -0
  276. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -0
  277. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -0
  278. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -0
  279. package/app/.next-cli-build/server/app/api/tags/route.js +1 -0
  280. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -0
  281. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -0
  282. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -0
  283. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +7 -0
  284. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -0
  285. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -0
  286. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -0
  287. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -0
  288. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -0
  289. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -0
  290. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -0
  291. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -0
  292. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -0
  293. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -0
  294. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -0
  295. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -0
  296. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -0
  297. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -0
  298. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -0
  299. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -0
  300. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -0
  301. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -0
  302. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -0
  303. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -0
  304. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -0
  305. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +5 -0
  306. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -0
  307. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -0
  308. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -0
  309. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route_client-reference-manifest.js +1 -0
  310. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -0
  311. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -0
  312. package/app/.next-cli-build/server/app/api/usage/api-keys/route.js +1 -0
  313. package/app/.next-cli-build/server/app/api/usage/api-keys/route.js.nft.json +1 -0
  314. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -0
  315. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -0
  316. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -0
  317. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -0
  318. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -0
  319. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -0
  320. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -0
  321. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -0
  322. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -0
  323. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -0
  324. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -0
  325. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -0
  326. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -0
  327. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -0
  328. package/app/.next-cli-build/server/app/api/usage/stream/route.js +7 -0
  329. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -0
  330. package/app/.next-cli-build/server/app/api/users/[id]/route.js +1 -0
  331. package/app/.next-cli-build/server/app/api/users/[id]/route.js.nft.json +1 -0
  332. package/app/.next-cli-build/server/app/api/users/route.js +1 -0
  333. package/app/.next-cli-build/server/app/api/users/route.js.nft.json +1 -0
  334. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -0
  335. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -0
  336. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -0
  337. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -0
  338. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -0
  339. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -0
  340. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -0
  341. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -0
  342. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -0
  343. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -0
  344. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -0
  345. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -0
  346. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +4 -0
  347. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -0
  348. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -0
  349. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -0
  350. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -0
  351. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -0
  352. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -0
  353. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -0
  354. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -0
  355. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -0
  356. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -0
  357. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -0
  358. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -0
  359. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -0
  360. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -0
  361. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -0
  362. package/app/.next-cli-build/server/app/api/v1/route.js +1 -0
  363. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -0
  364. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -0
  365. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -0
  366. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -0
  367. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -0
  368. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -0
  369. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -0
  370. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -0
  371. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -0
  372. package/app/.next-cli-build/server/app/api/version/route.js +1 -0
  373. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -0
  374. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -0
  375. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -0
  376. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -0
  377. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -0
  378. package/app/.next-cli-build/server/app/callback/page.js +2 -0
  379. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -0
  380. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -0
  381. package/app/.next-cli-build/server/app/callback.html +1 -0
  382. package/app/.next-cli-build/server/app/callback.rsc +25 -0
  383. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +25 -0
  384. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +6 -0
  385. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +9 -0
  386. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +4 -0
  387. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +9 -0
  388. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +5 -0
  389. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -0
  390. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -0
  391. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -0
  392. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -0
  393. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +25 -0
  394. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +25 -0
  395. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +6 -0
  396. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +9 -0
  397. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +4 -0
  398. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +9 -0
  399. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +5 -0
  400. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +5 -0
  401. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +5 -0
  402. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -0
  403. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -0
  404. package/app/.next-cli-build/server/app/index.html +1 -0
  405. package/app/.next-cli-build/server/app/index.rsc +20 -0
  406. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +6 -0
  407. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +20 -0
  408. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +6 -0
  409. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +9 -0
  410. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +4 -0
  411. package/app/.next-cli-build/server/app/landing/page.js +2 -0
  412. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -0
  413. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -0
  414. package/app/.next-cli-build/server/app/landing.html +1 -0
  415. package/app/.next-cli-build/server/app/landing.rsc +25 -0
  416. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +25 -0
  417. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +6 -0
  418. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +9 -0
  419. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +4 -0
  420. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +9 -0
  421. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +5 -0
  422. package/app/.next-cli-build/server/app/login/page.js +2 -0
  423. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -0
  424. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -0
  425. package/app/.next-cli-build/server/app/login.html +1 -0
  426. package/app/.next-cli-build/server/app/login.rsc +26 -0
  427. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +26 -0
  428. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +6 -0
  429. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +9 -0
  430. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +5 -0
  431. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +10 -0
  432. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +5 -0
  433. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +16 -0
  434. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -0
  435. package/app/.next-cli-build/server/app/page.js +2 -0
  436. package/app/.next-cli-build/server/app/page.js.nft.json +1 -0
  437. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -0
  438. package/app/.next-cli-build/server/app-paths-manifest.json +170 -0
  439. package/app/.next-cli-build/server/chunks/1220.js +3 -0
  440. package/app/.next-cli-build/server/chunks/1241.js +1 -0
  441. package/app/.next-cli-build/server/chunks/1275.js +73 -0
  442. package/app/.next-cli-build/server/chunks/1350.js +2 -0
  443. package/app/.next-cli-build/server/chunks/1832.js +1 -0
  444. package/app/.next-cli-build/server/chunks/2059.js +1 -0
  445. package/app/.next-cli-build/server/chunks/2944.js +1 -0
  446. package/app/.next-cli-build/server/chunks/319.js +45 -0
  447. package/app/.next-cli-build/server/chunks/3412.js +1 -0
  448. package/app/.next-cli-build/server/chunks/3428.js +1 -0
  449. package/app/.next-cli-build/server/chunks/3535.js +1 -0
  450. package/app/.next-cli-build/server/chunks/3546.js +1 -0
  451. package/app/.next-cli-build/server/chunks/3913.js +64 -0
  452. package/app/.next-cli-build/server/chunks/412.js +7 -0
  453. package/app/.next-cli-build/server/chunks/4632.js +1 -0
  454. package/app/.next-cli-build/server/chunks/4922.js +9 -0
  455. package/app/.next-cli-build/server/chunks/5118.js +1 -0
  456. package/app/.next-cli-build/server/chunks/5296.js +1 -0
  457. package/app/.next-cli-build/server/chunks/5592.js +1 -0
  458. package/app/.next-cli-build/server/chunks/5615.js +43 -0
  459. package/app/.next-cli-build/server/chunks/5699.js +1 -0
  460. package/app/.next-cli-build/server/chunks/5816.js +1 -0
  461. package/app/.next-cli-build/server/chunks/5961.js +1 -0
  462. package/app/.next-cli-build/server/chunks/6001.js +1 -0
  463. package/app/.next-cli-build/server/chunks/602.js +1 -0
  464. package/app/.next-cli-build/server/chunks/6070.js +1 -0
  465. package/app/.next-cli-build/server/chunks/615.js +1 -0
  466. package/app/.next-cli-build/server/chunks/6151.js +1 -0
  467. package/app/.next-cli-build/server/chunks/6182.js +63 -0
  468. package/app/.next-cli-build/server/chunks/6306.js +1 -0
  469. package/app/.next-cli-build/server/chunks/6327.js +1 -0
  470. package/app/.next-cli-build/server/chunks/6482.js +11 -0
  471. package/app/.next-cli-build/server/chunks/6688.js +1 -0
  472. package/app/.next-cli-build/server/chunks/6763.js +1 -0
  473. package/app/.next-cli-build/server/chunks/6777.js +1 -0
  474. package/app/.next-cli-build/server/chunks/7244.js +1 -0
  475. package/app/.next-cli-build/server/chunks/7259.js +53 -0
  476. package/app/.next-cli-build/server/chunks/7774.js +120 -0
  477. package/app/.next-cli-build/server/chunks/7879.js +10 -0
  478. package/app/.next-cli-build/server/chunks/7937.js +170 -0
  479. package/app/.next-cli-build/server/chunks/801.js +3 -0
  480. package/app/.next-cli-build/server/chunks/8271.js +1 -0
  481. package/app/.next-cli-build/server/chunks/8895.js +58 -0
  482. package/app/.next-cli-build/server/chunks/8910.js +2 -0
  483. package/app/.next-cli-build/server/chunks/8920.js +1 -0
  484. package/app/.next-cli-build/server/chunks/9718.js +1 -0
  485. package/app/.next-cli-build/server/chunks/9787.js +31 -0
  486. package/app/.next-cli-build/server/chunks/9833.js +1 -0
  487. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -0
  488. package/app/.next-cli-build/server/middleware.js +18 -0
  489. package/app/.next-cli-build/server/next-font-manifest.js +1 -0
  490. package/app/.next-cli-build/server/next-font-manifest.json +1 -0
  491. package/app/.next-cli-build/server/pages/404.html +1 -0
  492. package/app/.next-cli-build/server/pages/500.html +1 -0
  493. package/app/.next-cli-build/server/server-reference-manifest.js +1 -0
  494. package/app/.next-cli-build/server/server-reference-manifest.json +1 -0
  495. package/app/.next-cli-build/static/DLZR81Hq9OqOrl2Xc2iHn/_buildManifest.js +1 -0
  496. package/app/.next-cli-build/static/chunks/1321-7d926378b0f39749.js +1 -0
  497. package/app/.next-cli-build/static/chunks/4072-932473fbd266d3f5.js +3 -0
  498. package/app/.next-cli-build/static/chunks/5497-53b71597ca1b53f8.js +7 -0
  499. package/app/.next-cli-build/static/chunks/6069-b72e6803d5df6bb0.js +53 -0
  500. package/app/.next-cli-build/static/chunks/705-979ff3eb195b9023.js +1 -0
  501. package/app/.next-cli-build/static/chunks/8982-6d1803817450bcd4.js +11 -0
  502. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/admin/keys/page-770d25a6e4c1c16b.js +1 -0
  503. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/admin/users/page-c02ec2a52cb81f6c.js +1 -0
  504. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-00067a1ed47e8a1a.js +1 -0
  505. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-6b52a6040f91175e.js +1 -0
  506. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-7e1032515aa7b846.js +1 -0
  507. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-b0ea71f0ee7d3f0d.js +1 -0
  508. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-3255488cfa30dbe8.js +1 -0
  509. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-a803dd8339e39a59.js +1 -0
  510. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-248f90bb1f8438b5.js +59 -0
  511. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/page-f2ad20d24fffaed1.js +1 -0
  512. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/page-9b1c19519a3fcdd6.js +4 -0
  513. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/page-c9d255cd986ec35f.js +1 -0
  514. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/page-6783a97fcd89ff19.js +1 -0
  515. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-35bb7f0efeba6102.js +1 -0
  516. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-5cfb7ca8b362af6f.js +1 -0
  517. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-1e127be17d25ddd8.js +10 -0
  518. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/page-7c91743514149c71.js +1 -0
  519. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-929ab76c6137174e.js +1 -0
  520. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/page-022d3cf41ae7126d.js +4 -0
  521. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-561f95b84b06ae49.js +2 -0
  522. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/page-88a024a500d543fa.js +1 -0
  523. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/page-f514bcc6e633f162.js +1 -0
  524. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-2551a48ef918b89b.js +1 -0
  525. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/user/page-2bb3871609a94258.js +4 -0
  526. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-8151b85461a99f83.js +1 -0
  527. package/app/.next-cli-build/static/chunks/app/_global-error/page-f514bcc6e633f162.js +1 -0
  528. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-f514bcc6e633f162.js +1 -0
  529. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-f514bcc6e633f162.js +1 -0
  530. package/app/.next-cli-build/static/chunks/app/api/auth/me/route-f514bcc6e633f162.js +1 -0
  531. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-f514bcc6e633f162.js +1 -0
  532. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-f514bcc6e633f162.js +1 -0
  533. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-f514bcc6e633f162.js +1 -0
  534. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-f514bcc6e633f162.js +1 -0
  535. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-f514bcc6e633f162.js +1 -0
  536. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-f514bcc6e633f162.js +1 -0
  537. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-f514bcc6e633f162.js +1 -0
  538. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-f514bcc6e633f162.js +1 -0
  539. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-f514bcc6e633f162.js +1 -0
  540. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-f514bcc6e633f162.js +1 -0
  541. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/activate-account/route-f514bcc6e633f162.js +1 -0
  542. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-f514bcc6e633f162.js +1 -0
  543. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-f514bcc6e633f162.js +1 -0
  544. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-f514bcc6e633f162.js +1 -0
  545. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-f514bcc6e633f162.js +1 -0
  546. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-f514bcc6e633f162.js +1 -0
  547. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-f514bcc6e633f162.js +1 -0
  548. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-f514bcc6e633f162.js +1 -0
  549. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-f514bcc6e633f162.js +1 -0
  550. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-f514bcc6e633f162.js +1 -0
  551. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-f514bcc6e633f162.js +1 -0
  552. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-f514bcc6e633f162.js +1 -0
  553. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-f514bcc6e633f162.js +1 -0
  554. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-f514bcc6e633f162.js +1 -0
  555. package/app/.next-cli-build/static/chunks/app/api/combos/route-f514bcc6e633f162.js +1 -0
  556. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-f514bcc6e633f162.js +1 -0
  557. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-f514bcc6e633f162.js +1 -0
  558. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-f514bcc6e633f162.js +1 -0
  559. package/app/.next-cli-build/static/chunks/app/api/health/route-f514bcc6e633f162.js +1 -0
  560. package/app/.next-cli-build/static/chunks/app/api/init/route-f514bcc6e633f162.js +1 -0
  561. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-f514bcc6e633f162.js +1 -0
  562. package/app/.next-cli-build/static/chunks/app/api/keys/route-f514bcc6e633f162.js +1 -0
  563. package/app/.next-cli-build/static/chunks/app/api/locale/route-f514bcc6e633f162.js +1 -0
  564. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-f514bcc6e633f162.js +1 -0
  565. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-f514bcc6e633f162.js +1 -0
  566. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-f514bcc6e633f162.js +1 -0
  567. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-f514bcc6e633f162.js +1 -0
  568. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-f514bcc6e633f162.js +1 -0
  569. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-f514bcc6e633f162.js +1 -0
  570. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-f514bcc6e633f162.js +1 -0
  571. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-f514bcc6e633f162.js +1 -0
  572. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-f514bcc6e633f162.js +1 -0
  573. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-f514bcc6e633f162.js +1 -0
  574. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-f514bcc6e633f162.js +1 -0
  575. package/app/.next-cli-build/static/chunks/app/api/models/route-f514bcc6e633f162.js +1 -0
  576. package/app/.next-cli-build/static/chunks/app/api/models/test/route-f514bcc6e633f162.js +1 -0
  577. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-f514bcc6e633f162.js +1 -0
  578. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-f514bcc6e633f162.js +1 -0
  579. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-f514bcc6e633f162.js +1 -0
  580. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-f514bcc6e633f162.js +1 -0
  581. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-f514bcc6e633f162.js +1 -0
  582. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-f514bcc6e633f162.js +1 -0
  583. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-f514bcc6e633f162.js +1 -0
  584. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-f514bcc6e633f162.js +1 -0
  585. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-f514bcc6e633f162.js +1 -0
  586. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-f514bcc6e633f162.js +1 -0
  587. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-f514bcc6e633f162.js +1 -0
  588. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-f514bcc6e633f162.js +1 -0
  589. package/app/.next-cli-build/static/chunks/app/api/pricing/route-f514bcc6e633f162.js +1 -0
  590. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-f514bcc6e633f162.js +1 -0
  591. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-f514bcc6e633f162.js +1 -0
  592. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-f514bcc6e633f162.js +1 -0
  593. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-f514bcc6e633f162.js +1 -0
  594. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-f514bcc6e633f162.js +1 -0
  595. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-f514bcc6e633f162.js +1 -0
  596. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-f514bcc6e633f162.js +1 -0
  597. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-f514bcc6e633f162.js +1 -0
  598. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-f514bcc6e633f162.js +1 -0
  599. package/app/.next-cli-build/static/chunks/app/api/providers/route-f514bcc6e633f162.js +1 -0
  600. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-f514bcc6e633f162.js +1 -0
  601. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-f514bcc6e633f162.js +1 -0
  602. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-f514bcc6e633f162.js +1 -0
  603. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-f514bcc6e633f162.js +1 -0
  604. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-f514bcc6e633f162.js +1 -0
  605. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-f514bcc6e633f162.js +1 -0
  606. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-f514bcc6e633f162.js +1 -0
  607. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-f514bcc6e633f162.js +1 -0
  608. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-f514bcc6e633f162.js +1 -0
  609. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-f514bcc6e633f162.js +1 -0
  610. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-f514bcc6e633f162.js +1 -0
  611. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-f514bcc6e633f162.js +1 -0
  612. package/app/.next-cli-build/static/chunks/app/api/settings/route-f514bcc6e633f162.js +1 -0
  613. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-f514bcc6e633f162.js +1 -0
  614. package/app/.next-cli-build/static/chunks/app/api/tags/route-f514bcc6e633f162.js +1 -0
  615. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-f514bcc6e633f162.js +1 -0
  616. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-f514bcc6e633f162.js +1 -0
  617. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-f514bcc6e633f162.js +1 -0
  618. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-f514bcc6e633f162.js +1 -0
  619. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-f514bcc6e633f162.js +1 -0
  620. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-f514bcc6e633f162.js +1 -0
  621. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-f514bcc6e633f162.js +1 -0
  622. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-f514bcc6e633f162.js +1 -0
  623. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-f514bcc6e633f162.js +1 -0
  624. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-f514bcc6e633f162.js +1 -0
  625. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-f514bcc6e633f162.js +1 -0
  626. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-f514bcc6e633f162.js +1 -0
  627. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-f514bcc6e633f162.js +1 -0
  628. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-f514bcc6e633f162.js +1 -0
  629. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-f514bcc6e633f162.js +1 -0
  630. package/app/.next-cli-build/static/chunks/app/api/usage/api-keys/route-f514bcc6e633f162.js +1 -0
  631. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-f514bcc6e633f162.js +1 -0
  632. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-f514bcc6e633f162.js +1 -0
  633. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-f514bcc6e633f162.js +1 -0
  634. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-f514bcc6e633f162.js +1 -0
  635. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-f514bcc6e633f162.js +1 -0
  636. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-f514bcc6e633f162.js +1 -0
  637. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-f514bcc6e633f162.js +1 -0
  638. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-f514bcc6e633f162.js +1 -0
  639. package/app/.next-cli-build/static/chunks/app/api/users/[id]/route-f514bcc6e633f162.js +1 -0
  640. package/app/.next-cli-build/static/chunks/app/api/users/route-f514bcc6e633f162.js +1 -0
  641. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-f514bcc6e633f162.js +1 -0
  642. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-f514bcc6e633f162.js +1 -0
  643. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-f514bcc6e633f162.js +1 -0
  644. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-f514bcc6e633f162.js +1 -0
  645. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-f514bcc6e633f162.js +1 -0
  646. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-f514bcc6e633f162.js +1 -0
  647. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-f514bcc6e633f162.js +1 -0
  648. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-f514bcc6e633f162.js +1 -0
  649. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-f514bcc6e633f162.js +1 -0
  650. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-f514bcc6e633f162.js +1 -0
  651. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-f514bcc6e633f162.js +1 -0
  652. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-f514bcc6e633f162.js +1 -0
  653. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-f514bcc6e633f162.js +1 -0
  654. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-f514bcc6e633f162.js +1 -0
  655. package/app/.next-cli-build/static/chunks/app/api/v1/route-f514bcc6e633f162.js +1 -0
  656. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-f514bcc6e633f162.js +1 -0
  657. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-f514bcc6e633f162.js +1 -0
  658. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-f514bcc6e633f162.js +1 -0
  659. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-f514bcc6e633f162.js +1 -0
  660. package/app/.next-cli-build/static/chunks/app/api/version/route-f514bcc6e633f162.js +1 -0
  661. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-f514bcc6e633f162.js +1 -0
  662. package/app/.next-cli-build/static/chunks/app/api/version/update/route-f514bcc6e633f162.js +1 -0
  663. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-fa3a6585ef16a942.js +1 -0
  664. package/app/.next-cli-build/static/chunks/app/layout-666059e0e271094b.js +1 -0
  665. package/app/.next-cli-build/static/chunks/app/login/page-fc66d6d071e3bcf3.js +1 -0
  666. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-f514bcc6e633f162.js +1 -0
  667. package/app/.next-cli-build/static/chunks/app/page-f514bcc6e633f162.js +1 -0
  668. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-f514bcc6e633f162.js +1 -0
  669. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-f514bcc6e633f162.js +1 -0
  670. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-f514bcc6e633f162.js +1 -0
  671. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-f514bcc6e633f162.js +1 -0
  672. package/app/.next-cli-build/static/chunks/webpack-786de0e184ffd859.js +1 -0
  673. package/app/.next-cli-build/static/css/d477f23f99f30ee7.css +1 -0
  674. package/app/.next-cli-build/static/css/e60401d99e3ceca2.css +1 -0
  675. package/app/.next-cli-build/static/media/19cfc7226ec3afaa-s.woff2 +0 -0
  676. package/app/.next-cli-build/static/media/21350d82a1f187e9-s.woff2 +0 -0
  677. package/app/.next-cli-build/static/media/8e9860b6e62d6359-s.woff2 +0 -0
  678. package/app/.next-cli-build/static/media/ba9851c3c22cd980-s.woff2 +0 -0
  679. package/app/.next-cli-build/static/media/c5fe6dc8356a8c31-s.woff2 +0 -0
  680. package/app/.next-cli-build/static/media/df0a9ae256c0569c-s.woff2 +0 -0
  681. package/app/.next-cli-build/static/media/e4af272ccee01ff0-s.p.woff2 +0 -0
  682. package/app/cli/.build-home/.openrouterx/db.json +43 -0
  683. package/app/cli/.build-home/.openrouterx/jwt-secret +1 -0
  684. package/app/cli/.build-home/.openrouterx/machine-id +1 -0
  685. package/app/cli/.build-home/Library/Preferences/nextjs-nodejs/config.json +7 -0
  686. package/app/custom-server.js +32 -0
  687. package/app/package.json +11 -8
  688. package/app/public/providers/codebuddy-cn.png +0 -0
  689. package/app/server.js +1 -1
  690. package/app/src/lib/updater/updater.js +2 -2
  691. package/app/src/mitm/server.js +60 -435
  692. package/cli.js +728 -415
  693. package/hooks/postinstall.js +15 -48
  694. package/hooks/sqliteRuntime.js +156 -0
  695. package/hooks/trayRuntime.js +107 -0
  696. package/package.json +18 -7
  697. package/src/cli/api/client.js +88 -10
  698. package/src/cli/menus/cliTools.js +164 -8
  699. package/src/cli/menus/providers.js +249 -12
  700. package/src/cli/menus/settings.js +138 -31
  701. package/src/cli/terminalUI.js +37 -25
  702. package/src/cli/tray/autostart.js +168 -184
  703. package/src/cli/tray/tray.js +226 -108
  704. package/src/cli/tray/tray.ps1 +79 -0
  705. package/src/cli/tray/trayWin.js +89 -0
  706. package/src/cli/utils/input.js +64 -137
  707. package/src/cli/utils/modelSelector.js +7 -4
  708. package/app/.next/BUILD_ID +0 -1
  709. package/app/.next/app-path-routes-manifest.json +0 -165
  710. package/app/.next/build-manifest.json +0 -20
  711. package/app/.next/prerender-manifest.json +0 -239
  712. package/app/.next/required-server-files.json +0 -376
  713. package/app/.next/routes-manifest.json +0 -1094
  714. package/app/.next/server/app/(dashboard)/dashboard/admin/keys/page.js +0 -2
  715. package/app/.next/server/app/(dashboard)/dashboard/admin/keys/page.js.nft.json +0 -1
  716. package/app/.next/server/app/(dashboard)/dashboard/admin/keys/page_client-reference-manifest.js +0 -1
  717. package/app/.next/server/app/(dashboard)/dashboard/admin/users/page.js +0 -2
  718. package/app/.next/server/app/(dashboard)/dashboard/admin/users/page.js.nft.json +0 -1
  719. package/app/.next/server/app/(dashboard)/dashboard/admin/users/page_client-reference-manifest.js +0 -1
  720. package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page.js +0 -2
  721. package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +0 -1
  722. package/app/.next/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +0 -1
  723. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +0 -24
  724. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +0 -1
  725. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +0 -1
  726. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js +0 -2
  727. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +0 -1
  728. package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +0 -1
  729. package/app/.next/server/app/(dashboard)/dashboard/combos/page.js +0 -2
  730. package/app/.next/server/app/(dashboard)/dashboard/combos/page.js.nft.json +0 -1
  731. package/app/.next/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +0 -1
  732. package/app/.next/server/app/(dashboard)/dashboard/console-log/page.js +0 -2
  733. package/app/.next/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +0 -1
  734. package/app/.next/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +0 -1
  735. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js +0 -2
  736. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +0 -1
  737. package/app/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +0 -1
  738. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +0 -60
  739. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +0 -1
  740. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +0 -1
  741. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +0 -2
  742. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +0 -1
  743. package/app/.next/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +0 -1
  744. package/app/.next/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +0 -5
  745. package/app/.next/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +0 -1
  746. package/app/.next/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +0 -1
  747. package/app/.next/server/app/(dashboard)/dashboard/media-providers/web/page.js +0 -2
  748. package/app/.next/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +0 -1
  749. package/app/.next/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +0 -1
  750. package/app/.next/server/app/(dashboard)/dashboard/mitm/page.js +0 -2
  751. package/app/.next/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +0 -1
  752. package/app/.next/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +0 -1
  753. package/app/.next/server/app/(dashboard)/dashboard/page.js +0 -2
  754. package/app/.next/server/app/(dashboard)/dashboard/page.js.nft.json +0 -1
  755. package/app/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +0 -1
  756. package/app/.next/server/app/(dashboard)/dashboard/profile/page.js +0 -2
  757. package/app/.next/server/app/(dashboard)/dashboard/profile/page.js.nft.json +0 -1
  758. package/app/.next/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +0 -1
  759. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js +0 -11
  760. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +0 -1
  761. package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +0 -1
  762. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js +0 -2
  763. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +0 -1
  764. package/app/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +0 -1
  765. package/app/.next/server/app/(dashboard)/dashboard/providers/page.js +0 -2
  766. package/app/.next/server/app/(dashboard)/dashboard/providers/page.js.nft.json +0 -1
  767. package/app/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +0 -1
  768. package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page.js +0 -5
  769. package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +0 -1
  770. package/app/.next/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +0 -1
  771. package/app/.next/server/app/(dashboard)/dashboard/quota/page.js +0 -3
  772. package/app/.next/server/app/(dashboard)/dashboard/quota/page.js.nft.json +0 -1
  773. package/app/.next/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +0 -1
  774. package/app/.next/server/app/(dashboard)/dashboard/skills/page.js +0 -2
  775. package/app/.next/server/app/(dashboard)/dashboard/skills/page.js.nft.json +0 -1
  776. package/app/.next/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +0 -1
  777. package/app/.next/server/app/(dashboard)/dashboard/translator/page.js +0 -2
  778. package/app/.next/server/app/(dashboard)/dashboard/translator/page.js.nft.json +0 -1
  779. package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +0 -1
  780. package/app/.next/server/app/(dashboard)/dashboard/usage/page.js +0 -2
  781. package/app/.next/server/app/(dashboard)/dashboard/usage/page.js.nft.json +0 -1
  782. package/app/.next/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +0 -1
  783. package/app/.next/server/app/(dashboard)/dashboard/user/page.js +0 -5
  784. package/app/.next/server/app/(dashboard)/dashboard/user/page.js.nft.json +0 -1
  785. package/app/.next/server/app/(dashboard)/dashboard/user/page_client-reference-manifest.js +0 -1
  786. package/app/.next/server/app/_global-error/page.js +0 -32
  787. package/app/.next/server/app/_global-error/page.js.nft.json +0 -1
  788. package/app/.next/server/app/_global-error/page_client-reference-manifest.js +0 -1
  789. package/app/.next/server/app/_global-error.html +0 -1
  790. package/app/.next/server/app/_global-error.rsc +0 -14
  791. package/app/.next/server/app/_global-error.segments/_full.segment.rsc +0 -14
  792. package/app/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +0 -5
  793. package/app/.next/server/app/_global-error.segments/_global-error.segment.rsc +0 -5
  794. package/app/.next/server/app/_global-error.segments/_head.segment.rsc +0 -5
  795. package/app/.next/server/app/_global-error.segments/_index.segment.rsc +0 -5
  796. package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +0 -1
  797. package/app/.next/server/app/_not-found/page.js +0 -2
  798. package/app/.next/server/app/_not-found/page.js.nft.json +0 -1
  799. package/app/.next/server/app/_not-found/page_client-reference-manifest.js +0 -1
  800. package/app/.next/server/app/_not-found.html +0 -1
  801. package/app/.next/server/app/_not-found.rsc +0 -19
  802. package/app/.next/server/app/_not-found.segments/_full.segment.rsc +0 -19
  803. package/app/.next/server/app/_not-found.segments/_head.segment.rsc +0 -6
  804. package/app/.next/server/app/_not-found.segments/_index.segment.rsc +0 -8
  805. package/app/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +0 -5
  806. package/app/.next/server/app/_not-found.segments/_not-found.segment.rsc +0 -5
  807. package/app/.next/server/app/_not-found.segments/_tree.segment.rsc +0 -3
  808. package/app/.next/server/app/api/auth/login/route.js +0 -1
  809. package/app/.next/server/app/api/auth/login/route.js.nft.json +0 -1
  810. package/app/.next/server/app/api/auth/logout/route.js +0 -1
  811. package/app/.next/server/app/api/auth/logout/route.js.nft.json +0 -1
  812. package/app/.next/server/app/api/auth/me/route.js +0 -1
  813. package/app/.next/server/app/api/auth/me/route.js.nft.json +0 -1
  814. package/app/.next/server/app/api/auth/oidc/callback/route.js +0 -1
  815. package/app/.next/server/app/api/auth/oidc/callback/route.js.nft.json +0 -1
  816. package/app/.next/server/app/api/auth/oidc/start/route.js +0 -1
  817. package/app/.next/server/app/api/auth/oidc/start/route.js.nft.json +0 -1
  818. package/app/.next/server/app/api/auth/oidc/test/route.js +0 -1
  819. package/app/.next/server/app/api/auth/oidc/test/route.js.nft.json +0 -1
  820. package/app/.next/server/app/api/auth/reset-password/route.js +0 -1
  821. package/app/.next/server/app/api/auth/reset-password/route.js.nft.json +0 -1
  822. package/app/.next/server/app/api/auth/status/route.js +0 -1
  823. package/app/.next/server/app/api/auth/status/route.js.nft.json +0 -1
  824. package/app/.next/server/app/api/cli-tools/all-statuses/route.js +0 -17
  825. package/app/.next/server/app/api/cli-tools/all-statuses/route.js.nft.json +0 -1
  826. package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route.js +0 -2
  827. package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +0 -1
  828. package/app/.next/server/app/api/cli-tools/antigravity-mitm/route.js +0 -1
  829. package/app/.next/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +0 -1
  830. package/app/.next/server/app/api/cli-tools/claude-settings/route.js +0 -2
  831. package/app/.next/server/app/api/cli-tools/claude-settings/route.js.nft.json +0 -1
  832. package/app/.next/server/app/api/cli-tools/cline-settings/route.js +0 -2
  833. package/app/.next/server/app/api/cli-tools/cline-settings/route.js.nft.json +0 -1
  834. package/app/.next/server/app/api/cli-tools/codex-settings/activate-account/route.js +0 -2
  835. package/app/.next/server/app/api/cli-tools/codex-settings/activate-account/route.js.nft.json +0 -1
  836. package/app/.next/server/app/api/cli-tools/codex-settings/route.js +0 -1
  837. package/app/.next/server/app/api/cli-tools/codex-settings/route.js.nft.json +0 -1
  838. package/app/.next/server/app/api/cli-tools/copilot-settings/route.js +0 -2
  839. package/app/.next/server/app/api/cli-tools/copilot-settings/route.js.nft.json +0 -1
  840. package/app/.next/server/app/api/cli-tools/cowork-mcp-registry/route.js +0 -2
  841. package/app/.next/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +0 -1
  842. package/app/.next/server/app/api/cli-tools/cowork-mcp-tools/route.js +0 -2
  843. package/app/.next/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +0 -1
  844. package/app/.next/server/app/api/cli-tools/cowork-settings/route.js +0 -1
  845. package/app/.next/server/app/api/cli-tools/cowork-settings/route.js.nft.json +0 -1
  846. package/app/.next/server/app/api/cli-tools/deepseek-tui-settings/route.js +0 -9
  847. package/app/.next/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +0 -1
  848. package/app/.next/server/app/api/cli-tools/droid-settings/route.js +0 -2
  849. package/app/.next/server/app/api/cli-tools/droid-settings/route.js.nft.json +0 -1
  850. package/app/.next/server/app/api/cli-tools/hermes-settings/route.js +0 -10
  851. package/app/.next/server/app/api/cli-tools/hermes-settings/route.js.nft.json +0 -1
  852. package/app/.next/server/app/api/cli-tools/jcode-settings/route.js +0 -3
  853. package/app/.next/server/app/api/cli-tools/jcode-settings/route.js.nft.json +0 -1
  854. package/app/.next/server/app/api/cli-tools/kilo-settings/route.js +0 -2
  855. package/app/.next/server/app/api/cli-tools/kilo-settings/route.js.nft.json +0 -1
  856. package/app/.next/server/app/api/cli-tools/openclaw-settings/route.js +0 -2
  857. package/app/.next/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +0 -1
  858. package/app/.next/server/app/api/cli-tools/opencode-settings/route.js +0 -2
  859. package/app/.next/server/app/api/cli-tools/opencode-settings/route.js.nft.json +0 -1
  860. package/app/.next/server/app/api/combos/[id]/route.js +0 -1
  861. package/app/.next/server/app/api/combos/[id]/route.js.nft.json +0 -1
  862. package/app/.next/server/app/api/combos/route.js +0 -1
  863. package/app/.next/server/app/api/combos/route.js.nft.json +0 -1
  864. package/app/.next/server/app/api/health/route.js +0 -1
  865. package/app/.next/server/app/api/health/route.js.nft.json +0 -1
  866. package/app/.next/server/app/api/init/route.js +0 -1
  867. package/app/.next/server/app/api/init/route.js.nft.json +0 -1
  868. package/app/.next/server/app/api/keys/[id]/route.js +0 -1
  869. package/app/.next/server/app/api/keys/[id]/route.js.nft.json +0 -1
  870. package/app/.next/server/app/api/keys/route.js +0 -1
  871. package/app/.next/server/app/api/keys/route.js.nft.json +0 -1
  872. package/app/.next/server/app/api/locale/route.js +0 -1
  873. package/app/.next/server/app/api/locale/route.js.nft.json +0 -1
  874. package/app/.next/server/app/api/mcp/[plugin]/message/route.js +0 -7
  875. package/app/.next/server/app/api/mcp/[plugin]/message/route.js.nft.json +0 -1
  876. package/app/.next/server/app/api/mcp/[plugin]/sse/route.js +0 -10
  877. package/app/.next/server/app/api/mcp/[plugin]/sse/route.js.nft.json +0 -1
  878. package/app/.next/server/app/api/media-providers/tts/deepgram/voices/route.js +0 -1
  879. package/app/.next/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +0 -1
  880. package/app/.next/server/app/api/media-providers/tts/elevenlabs/voices/route.js +0 -1
  881. package/app/.next/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +0 -1
  882. package/app/.next/server/app/api/media-providers/tts/inworld/voices/route.js +0 -1
  883. package/app/.next/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +0 -1
  884. package/app/.next/server/app/api/media-providers/tts/minimax/voices/route.js +0 -1
  885. package/app/.next/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +0 -1
  886. package/app/.next/server/app/api/media-providers/tts/voices/route.js +0 -1
  887. package/app/.next/server/app/api/media-providers/tts/voices/route.js.nft.json +0 -1
  888. package/app/.next/server/app/api/models/alias/route.js +0 -1
  889. package/app/.next/server/app/api/models/alias/route.js.nft.json +0 -1
  890. package/app/.next/server/app/api/models/availability/route.js +0 -1
  891. package/app/.next/server/app/api/models/availability/route.js.nft.json +0 -1
  892. package/app/.next/server/app/api/models/custom/route.js +0 -1
  893. package/app/.next/server/app/api/models/custom/route.js.nft.json +0 -1
  894. package/app/.next/server/app/api/models/disabled/route.js +0 -1
  895. package/app/.next/server/app/api/models/disabled/route.js.nft.json +0 -1
  896. package/app/.next/server/app/api/models/route.js +0 -1
  897. package/app/.next/server/app/api/models/route.js.nft.json +0 -1
  898. package/app/.next/server/app/api/models/test/route.js +0 -1
  899. package/app/.next/server/app/api/models/test/route.js.nft.json +0 -1
  900. package/app/.next/server/app/api/oauth/[provider]/[action]/route.js +0 -1
  901. package/app/.next/server/app/api/oauth/[provider]/[action]/route.js.nft.json +0 -1
  902. package/app/.next/server/app/api/oauth/codex/bulk-import/route.js +0 -1
  903. package/app/.next/server/app/api/oauth/codex/bulk-import/route.js.nft.json +0 -1
  904. package/app/.next/server/app/api/oauth/codex/import-token/route.js +0 -1
  905. package/app/.next/server/app/api/oauth/codex/import-token/route.js.nft.json +0 -1
  906. package/app/.next/server/app/api/oauth/cursor/auto-import/route.js +0 -4
  907. package/app/.next/server/app/api/oauth/cursor/auto-import/route.js.nft.json +0 -1
  908. package/app/.next/server/app/api/oauth/cursor/import/route.js +0 -1
  909. package/app/.next/server/app/api/oauth/cursor/import/route.js.nft.json +0 -1
  910. package/app/.next/server/app/api/oauth/gitlab/pat/route.js +0 -1
  911. package/app/.next/server/app/api/oauth/gitlab/pat/route.js.nft.json +0 -1
  912. package/app/.next/server/app/api/oauth/iflow/cookie/route.js +0 -1
  913. package/app/.next/server/app/api/oauth/iflow/cookie/route.js.nft.json +0 -1
  914. package/app/.next/server/app/api/oauth/kiro/auto-import/route.js +0 -1
  915. package/app/.next/server/app/api/oauth/kiro/auto-import/route.js.nft.json +0 -1
  916. package/app/.next/server/app/api/oauth/kiro/import/route.js +0 -1
  917. package/app/.next/server/app/api/oauth/kiro/import/route.js.nft.json +0 -1
  918. package/app/.next/server/app/api/oauth/kiro/social-authorize/route.js +0 -1
  919. package/app/.next/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +0 -1
  920. package/app/.next/server/app/api/oauth/kiro/social-exchange/route.js +0 -1
  921. package/app/.next/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +0 -1
  922. package/app/.next/server/app/api/pricing/route.js +0 -1
  923. package/app/.next/server/app/api/pricing/route.js.nft.json +0 -1
  924. package/app/.next/server/app/api/provider-nodes/[id]/route.js +0 -1
  925. package/app/.next/server/app/api/provider-nodes/[id]/route.js.nft.json +0 -1
  926. package/app/.next/server/app/api/provider-nodes/route.js +0 -1
  927. package/app/.next/server/app/api/provider-nodes/route.js.nft.json +0 -1
  928. package/app/.next/server/app/api/provider-nodes/validate/route.js +0 -1
  929. package/app/.next/server/app/api/provider-nodes/validate/route.js.nft.json +0 -1
  930. package/app/.next/server/app/api/providers/[id]/models/route.js +0 -1
  931. package/app/.next/server/app/api/providers/[id]/models/route.js.nft.json +0 -1
  932. package/app/.next/server/app/api/providers/[id]/route.js +0 -1
  933. package/app/.next/server/app/api/providers/[id]/route.js.nft.json +0 -1
  934. package/app/.next/server/app/api/providers/[id]/test/route.js +0 -1
  935. package/app/.next/server/app/api/providers/[id]/test/route.js.nft.json +0 -1
  936. package/app/.next/server/app/api/providers/[id]/test-models/route.js +0 -1
  937. package/app/.next/server/app/api/providers/[id]/test-models/route.js.nft.json +0 -1
  938. package/app/.next/server/app/api/providers/client/route.js +0 -1
  939. package/app/.next/server/app/api/providers/client/route.js.nft.json +0 -1
  940. package/app/.next/server/app/api/providers/kilo/free-models/route.js +0 -1
  941. package/app/.next/server/app/api/providers/kilo/free-models/route.js.nft.json +0 -1
  942. package/app/.next/server/app/api/providers/route.js +0 -1
  943. package/app/.next/server/app/api/providers/route.js.nft.json +0 -1
  944. package/app/.next/server/app/api/providers/suggested-models/route.js +0 -1
  945. package/app/.next/server/app/api/providers/suggested-models/route.js.nft.json +0 -1
  946. package/app/.next/server/app/api/providers/test-batch/route.js +0 -1
  947. package/app/.next/server/app/api/providers/test-batch/route.js.nft.json +0 -1
  948. package/app/.next/server/app/api/providers/validate/route.js +0 -1
  949. package/app/.next/server/app/api/providers/validate/route.js.nft.json +0 -1
  950. package/app/.next/server/app/api/proxy-pools/[id]/route.js +0 -1
  951. package/app/.next/server/app/api/proxy-pools/[id]/route.js.nft.json +0 -1
  952. package/app/.next/server/app/api/proxy-pools/[id]/test/route.js +0 -1
  953. package/app/.next/server/app/api/proxy-pools/[id]/test/route.js.nft.json +0 -1
  954. package/app/.next/server/app/api/proxy-pools/cloudflare-deploy/route.js +0 -43
  955. package/app/.next/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +0 -1
  956. package/app/.next/server/app/api/proxy-pools/deno-deploy/route.js +0 -40
  957. package/app/.next/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +0 -1
  958. package/app/.next/server/app/api/proxy-pools/route.js +0 -1
  959. package/app/.next/server/app/api/proxy-pools/route.js.nft.json +0 -1
  960. package/app/.next/server/app/api/proxy-pools/vercel-deploy/route.js +0 -33
  961. package/app/.next/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +0 -1
  962. package/app/.next/server/app/api/settings/database/route.js +0 -1
  963. package/app/.next/server/app/api/settings/database/route.js.nft.json +0 -1
  964. package/app/.next/server/app/api/settings/proxy-test/route.js +0 -1
  965. package/app/.next/server/app/api/settings/proxy-test/route.js.nft.json +0 -1
  966. package/app/.next/server/app/api/settings/require-login/route.js +0 -1
  967. package/app/.next/server/app/api/settings/require-login/route.js.nft.json +0 -1
  968. package/app/.next/server/app/api/settings/route.js +0 -1
  969. package/app/.next/server/app/api/settings/route.js.nft.json +0 -1
  970. package/app/.next/server/app/api/shutdown/route.js +0 -1
  971. package/app/.next/server/app/api/shutdown/route.js.nft.json +0 -1
  972. package/app/.next/server/app/api/tags/route.js +0 -1
  973. package/app/.next/server/app/api/tags/route.js.nft.json +0 -1
  974. package/app/.next/server/app/api/translator/console-logs/route.js +0 -1
  975. package/app/.next/server/app/api/translator/console-logs/route.js.nft.json +0 -1
  976. package/app/.next/server/app/api/translator/console-logs/stream/route.js +0 -7
  977. package/app/.next/server/app/api/translator/console-logs/stream/route.js.nft.json +0 -1
  978. package/app/.next/server/app/api/translator/load/route.js +0 -1
  979. package/app/.next/server/app/api/translator/load/route.js.nft.json +0 -1
  980. package/app/.next/server/app/api/translator/save/route.js +0 -1
  981. package/app/.next/server/app/api/translator/save/route.js.nft.json +0 -1
  982. package/app/.next/server/app/api/translator/send/route.js +0 -1
  983. package/app/.next/server/app/api/translator/send/route.js.nft.json +0 -1
  984. package/app/.next/server/app/api/translator/translate/route.js +0 -1
  985. package/app/.next/server/app/api/translator/translate/route.js.nft.json +0 -1
  986. package/app/.next/server/app/api/tunnel/disable/route.js +0 -1
  987. package/app/.next/server/app/api/tunnel/disable/route.js.nft.json +0 -1
  988. package/app/.next/server/app/api/tunnel/enable/route.js +0 -1
  989. package/app/.next/server/app/api/tunnel/enable/route.js.nft.json +0 -1
  990. package/app/.next/server/app/api/tunnel/status/route.js +0 -1
  991. package/app/.next/server/app/api/tunnel/status/route.js.nft.json +0 -1
  992. package/app/.next/server/app/api/tunnel/tailscale-check/route.js +0 -1
  993. package/app/.next/server/app/api/tunnel/tailscale-check/route.js.nft.json +0 -1
  994. package/app/.next/server/app/api/tunnel/tailscale-disable/route.js +0 -1
  995. package/app/.next/server/app/api/tunnel/tailscale-disable/route.js.nft.json +0 -1
  996. package/app/.next/server/app/api/tunnel/tailscale-enable/route.js +0 -1
  997. package/app/.next/server/app/api/tunnel/tailscale-enable/route.js.nft.json +0 -1
  998. package/app/.next/server/app/api/tunnel/tailscale-install/route.js +0 -5
  999. package/app/.next/server/app/api/tunnel/tailscale-install/route.js.nft.json +0 -1
  1000. package/app/.next/server/app/api/usage/[connectionId]/route.js +0 -1
  1001. package/app/.next/server/app/api/usage/[connectionId]/route.js.nft.json +0 -1
  1002. package/app/.next/server/app/api/usage/api-keys/route.js +0 -1
  1003. package/app/.next/server/app/api/usage/api-keys/route.js.nft.json +0 -1
  1004. package/app/.next/server/app/api/usage/chart/route.js +0 -1
  1005. package/app/.next/server/app/api/usage/chart/route.js.nft.json +0 -1
  1006. package/app/.next/server/app/api/usage/history/route.js +0 -1
  1007. package/app/.next/server/app/api/usage/history/route.js.nft.json +0 -1
  1008. package/app/.next/server/app/api/usage/logs/route.js +0 -1
  1009. package/app/.next/server/app/api/usage/logs/route.js.nft.json +0 -1
  1010. package/app/.next/server/app/api/usage/providers/route.js +0 -1
  1011. package/app/.next/server/app/api/usage/providers/route.js.nft.json +0 -1
  1012. package/app/.next/server/app/api/usage/request-details/route.js +0 -1
  1013. package/app/.next/server/app/api/usage/request-details/route.js.nft.json +0 -1
  1014. package/app/.next/server/app/api/usage/request-logs/route.js +0 -1
  1015. package/app/.next/server/app/api/usage/request-logs/route.js.nft.json +0 -1
  1016. package/app/.next/server/app/api/usage/stats/route.js +0 -1
  1017. package/app/.next/server/app/api/usage/stats/route.js.nft.json +0 -1
  1018. package/app/.next/server/app/api/usage/stream/route.js +0 -7
  1019. package/app/.next/server/app/api/usage/stream/route.js.nft.json +0 -1
  1020. package/app/.next/server/app/api/users/[id]/route.js +0 -1
  1021. package/app/.next/server/app/api/users/[id]/route.js.nft.json +0 -1
  1022. package/app/.next/server/app/api/users/route.js +0 -1
  1023. package/app/.next/server/app/api/users/route.js.nft.json +0 -1
  1024. package/app/.next/server/app/api/v1/api/chat/route.js +0 -1
  1025. package/app/.next/server/app/api/v1/api/chat/route.js.nft.json +0 -1
  1026. package/app/.next/server/app/api/v1/audio/speech/route.js +0 -1
  1027. package/app/.next/server/app/api/v1/audio/speech/route.js.nft.json +0 -1
  1028. package/app/.next/server/app/api/v1/audio/transcriptions/route.js +0 -1
  1029. package/app/.next/server/app/api/v1/audio/transcriptions/route.js.nft.json +0 -1
  1030. package/app/.next/server/app/api/v1/audio/voices/route.js +0 -1
  1031. package/app/.next/server/app/api/v1/audio/voices/route.js.nft.json +0 -1
  1032. package/app/.next/server/app/api/v1/chat/completions/route.js +0 -1
  1033. package/app/.next/server/app/api/v1/chat/completions/route.js.nft.json +0 -1
  1034. package/app/.next/server/app/api/v1/embeddings/route.js +0 -1
  1035. package/app/.next/server/app/api/v1/embeddings/route.js.nft.json +0 -1
  1036. package/app/.next/server/app/api/v1/images/generations/route.js +0 -4
  1037. package/app/.next/server/app/api/v1/images/generations/route.js.nft.json +0 -1
  1038. package/app/.next/server/app/api/v1/messages/count_tokens/route.js +0 -1
  1039. package/app/.next/server/app/api/v1/messages/count_tokens/route.js.nft.json +0 -1
  1040. package/app/.next/server/app/api/v1/messages/route.js +0 -1
  1041. package/app/.next/server/app/api/v1/messages/route.js.nft.json +0 -1
  1042. package/app/.next/server/app/api/v1/models/[kind]/route.js +0 -1
  1043. package/app/.next/server/app/api/v1/models/[kind]/route.js.nft.json +0 -1
  1044. package/app/.next/server/app/api/v1/models/info/route.js +0 -1
  1045. package/app/.next/server/app/api/v1/models/info/route.js.nft.json +0 -1
  1046. package/app/.next/server/app/api/v1/models/route.js +0 -1
  1047. package/app/.next/server/app/api/v1/models/route.js.nft.json +0 -1
  1048. package/app/.next/server/app/api/v1/responses/compact/route.js +0 -1
  1049. package/app/.next/server/app/api/v1/responses/compact/route.js.nft.json +0 -1
  1050. package/app/.next/server/app/api/v1/responses/route.js +0 -1
  1051. package/app/.next/server/app/api/v1/responses/route.js.nft.json +0 -1
  1052. package/app/.next/server/app/api/v1/route.js +0 -1
  1053. package/app/.next/server/app/api/v1/route.js.nft.json +0 -1
  1054. package/app/.next/server/app/api/v1/search/route.js +0 -1
  1055. package/app/.next/server/app/api/v1/search/route.js.nft.json +0 -1
  1056. package/app/.next/server/app/api/v1/web/fetch/route.js +0 -1
  1057. package/app/.next/server/app/api/v1/web/fetch/route.js.nft.json +0 -1
  1058. package/app/.next/server/app/api/v1beta/models/[...path]/route.js +0 -1
  1059. package/app/.next/server/app/api/v1beta/models/[...path]/route.js.nft.json +0 -1
  1060. package/app/.next/server/app/api/v1beta/models/route.js +0 -1
  1061. package/app/.next/server/app/api/v1beta/models/route.js.nft.json +0 -1
  1062. package/app/.next/server/app/api/version/route.js +0 -1
  1063. package/app/.next/server/app/api/version/route.js.nft.json +0 -1
  1064. package/app/.next/server/app/api/version/shutdown/route.js +0 -1
  1065. package/app/.next/server/app/api/version/shutdown/route.js.nft.json +0 -1
  1066. package/app/.next/server/app/api/version/update/route.js +0 -1
  1067. package/app/.next/server/app/api/version/update/route.js.nft.json +0 -1
  1068. package/app/.next/server/app/callback/page.js +0 -2
  1069. package/app/.next/server/app/callback/page.js.nft.json +0 -1
  1070. package/app/.next/server/app/callback/page_client-reference-manifest.js +0 -1
  1071. package/app/.next/server/app/callback.html +0 -1
  1072. package/app/.next/server/app/callback.rsc +0 -23
  1073. package/app/.next/server/app/callback.segments/_full.segment.rsc +0 -23
  1074. package/app/.next/server/app/callback.segments/_head.segment.rsc +0 -6
  1075. package/app/.next/server/app/callback.segments/_index.segment.rsc +0 -8
  1076. package/app/.next/server/app/callback.segments/_tree.segment.rsc +0 -3
  1077. package/app/.next/server/app/callback.segments/callback/__PAGE__.segment.rsc +0 -9
  1078. package/app/.next/server/app/callback.segments/callback.segment.rsc +0 -5
  1079. package/app/.next/server/app/dashboard/settings/pricing/page.js +0 -2
  1080. package/app/.next/server/app/dashboard/settings/pricing/page.js.nft.json +0 -1
  1081. package/app/.next/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +0 -1
  1082. package/app/.next/server/app/dashboard/settings/pricing.html +0 -1
  1083. package/app/.next/server/app/dashboard/settings/pricing.rsc +0 -23
  1084. package/app/.next/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +0 -23
  1085. package/app/.next/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +0 -6
  1086. package/app/.next/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +0 -8
  1087. package/app/.next/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +0 -3
  1088. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +0 -9
  1089. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +0 -5
  1090. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +0 -5
  1091. package/app/.next/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +0 -5
  1092. package/app/.next/server/app/favicon.ico/route.js +0 -1
  1093. package/app/.next/server/app/favicon.ico/route.js.nft.json +0 -1
  1094. package/app/.next/server/app/index.html +0 -1
  1095. package/app/.next/server/app/index.rsc +0 -18
  1096. package/app/.next/server/app/index.segments/__PAGE__.segment.rsc +0 -6
  1097. package/app/.next/server/app/index.segments/_full.segment.rsc +0 -18
  1098. package/app/.next/server/app/index.segments/_head.segment.rsc +0 -6
  1099. package/app/.next/server/app/index.segments/_index.segment.rsc +0 -8
  1100. package/app/.next/server/app/index.segments/_tree.segment.rsc +0 -3
  1101. package/app/.next/server/app/landing/page.js +0 -2
  1102. package/app/.next/server/app/landing/page.js.nft.json +0 -1
  1103. package/app/.next/server/app/landing/page_client-reference-manifest.js +0 -1
  1104. package/app/.next/server/app/landing.html +0 -1
  1105. package/app/.next/server/app/landing.rsc +0 -23
  1106. package/app/.next/server/app/landing.segments/_full.segment.rsc +0 -23
  1107. package/app/.next/server/app/landing.segments/_head.segment.rsc +0 -6
  1108. package/app/.next/server/app/landing.segments/_index.segment.rsc +0 -8
  1109. package/app/.next/server/app/landing.segments/_tree.segment.rsc +0 -3
  1110. package/app/.next/server/app/landing.segments/landing/__PAGE__.segment.rsc +0 -9
  1111. package/app/.next/server/app/landing.segments/landing.segment.rsc +0 -5
  1112. package/app/.next/server/app/login/page.js +0 -2
  1113. package/app/.next/server/app/login/page.js.nft.json +0 -1
  1114. package/app/.next/server/app/login/page_client-reference-manifest.js +0 -1
  1115. package/app/.next/server/app/login.html +0 -1
  1116. package/app/.next/server/app/login.rsc +0 -24
  1117. package/app/.next/server/app/login.segments/_full.segment.rsc +0 -24
  1118. package/app/.next/server/app/login.segments/_head.segment.rsc +0 -6
  1119. package/app/.next/server/app/login.segments/_index.segment.rsc +0 -8
  1120. package/app/.next/server/app/login.segments/_tree.segment.rsc +0 -4
  1121. package/app/.next/server/app/login.segments/login/__PAGE__.segment.rsc +0 -10
  1122. package/app/.next/server/app/login.segments/login.segment.rsc +0 -5
  1123. package/app/.next/server/app/manifest.webmanifest/route.js +0 -16
  1124. package/app/.next/server/app/manifest.webmanifest/route.js.nft.json +0 -1
  1125. package/app/.next/server/app/page.js +0 -2
  1126. package/app/.next/server/app/page.js.nft.json +0 -1
  1127. package/app/.next/server/app/page_client-reference-manifest.js +0 -1
  1128. package/app/.next/server/app-paths-manifest.json +0 -165
  1129. package/app/.next/server/chunks/1172.js +0 -1
  1130. package/app/.next/server/chunks/1350.js +0 -2
  1131. package/app/.next/server/chunks/1476.js +0 -1
  1132. package/app/.next/server/chunks/1531.js +0 -1
  1133. package/app/.next/server/chunks/1813.js +0 -1
  1134. package/app/.next/server/chunks/2059.js +0 -1
  1135. package/app/.next/server/chunks/2409.js +0 -1
  1136. package/app/.next/server/chunks/2560.js +0 -1
  1137. package/app/.next/server/chunks/2722.js +0 -53
  1138. package/app/.next/server/chunks/2750.js +0 -31
  1139. package/app/.next/server/chunks/3104.js +0 -43
  1140. package/app/.next/server/chunks/319.js +0 -45
  1141. package/app/.next/server/chunks/3205.js +0 -1
  1142. package/app/.next/server/chunks/365.js +0 -1
  1143. package/app/.next/server/chunks/3663.js +0 -1
  1144. package/app/.next/server/chunks/3913.js +0 -64
  1145. package/app/.next/server/chunks/412.js +0 -7
  1146. package/app/.next/server/chunks/4177.js +0 -1
  1147. package/app/.next/server/chunks/4404.js +0 -1
  1148. package/app/.next/server/chunks/4565.js +0 -3
  1149. package/app/.next/server/chunks/4922.js +0 -9
  1150. package/app/.next/server/chunks/5681.js +0 -1
  1151. package/app/.next/server/chunks/6001.js +0 -1
  1152. package/app/.next/server/chunks/6108.js +0 -1
  1153. package/app/.next/server/chunks/6327.js +0 -1
  1154. package/app/.next/server/chunks/7221.js +0 -1
  1155. package/app/.next/server/chunks/7341.js +0 -1
  1156. package/app/.next/server/chunks/7540.js +0 -67
  1157. package/app/.next/server/chunks/7774.js +0 -120
  1158. package/app/.next/server/chunks/7879.js +0 -10
  1159. package/app/.next/server/chunks/7937.js +0 -186
  1160. package/app/.next/server/chunks/8220.js +0 -1
  1161. package/app/.next/server/chunks/8238.js +0 -1
  1162. package/app/.next/server/chunks/8342.js +0 -1
  1163. package/app/.next/server/chunks/8895.js +0 -55
  1164. package/app/.next/server/chunks/9203.js +0 -1
  1165. package/app/.next/server/chunks/9259.js +0 -3
  1166. package/app/.next/server/chunks/9489.js +0 -1
  1167. package/app/.next/server/chunks/9501.js +0 -63
  1168. package/app/.next/server/chunks/9660.js +0 -1
  1169. package/app/.next/server/chunks/9713.js +0 -1
  1170. package/app/.next/server/chunks/9718.js +0 -1
  1171. package/app/.next/server/chunks/9856.js +0 -1
  1172. package/app/.next/server/middleware-build-manifest.js +0 -1
  1173. package/app/.next/server/middleware.js +0 -18
  1174. package/app/.next/server/next-font-manifest.js +0 -1
  1175. package/app/.next/server/next-font-manifest.json +0 -1
  1176. package/app/.next/server/pages/404.html +0 -1
  1177. package/app/.next/server/pages/500.html +0 -1
  1178. package/app/.next/server/server-reference-manifest.js +0 -1
  1179. package/app/.next/server/server-reference-manifest.json +0 -1
  1180. package/app/.next/static/MxcY0EY8eMa4ouCwsP4Cl/_buildManifest.js +0 -1
  1181. package/app/.next/static/chunks/1321-134c6f0196307f47.js +0 -1
  1182. package/app/.next/static/chunks/4072-e3cbc885320b3535.js +0 -3
  1183. package/app/.next/static/chunks/5497-61f5cbbdfc3da704.js +0 -7
  1184. package/app/.next/static/chunks/6069-130fdae38088e4e7.js +0 -53
  1185. package/app/.next/static/chunks/app/(dashboard)/dashboard/admin/keys/page-0d5b57da4abb6962.js +0 -1
  1186. package/app/.next/static/chunks/app/(dashboard)/dashboard/admin/users/page-972703d59d2a3986.js +0 -1
  1187. package/app/.next/static/chunks/app/(dashboard)/dashboard/basic-chat/page-e1bd21507327d2bc.js +0 -1
  1188. package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/page-ba3be29df191769b.js +0 -1
  1189. package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/page-a0eaec978d93b101.js +0 -1
  1190. package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/page-ca6a0263fcfc70df.js +0 -1
  1191. package/app/.next/static/chunks/app/(dashboard)/dashboard/console-log/page-57065ce85ec52703.js +0 -1
  1192. package/app/.next/static/chunks/app/(dashboard)/dashboard/endpoint/page-c8f75b084231c080.js +0 -1
  1193. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page-e43ee64cc1f1547c.js +0 -59
  1194. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/page-c64dd1d0b2bd9caf.js +0 -1
  1195. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/page-9586c0b67f30a21b.js +0 -4
  1196. package/app/.next/static/chunks/app/(dashboard)/dashboard/media-providers/web/page-c7fbf29bdbdabee9.js +0 -1
  1197. package/app/.next/static/chunks/app/(dashboard)/dashboard/mitm/page-b52d2279e8eff62d.js +0 -1
  1198. package/app/.next/static/chunks/app/(dashboard)/dashboard/page-8fceba7ec6407143.js +0 -1
  1199. package/app/.next/static/chunks/app/(dashboard)/dashboard/profile/page-96d7ec789592a2ec.js +0 -1
  1200. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-a2ec9b595a5c5600.js +0 -10
  1201. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/new/page-0bf3048423ab0128.js +0 -1
  1202. package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/page-979e3e3663264d2b.js +0 -1
  1203. package/app/.next/static/chunks/app/(dashboard)/dashboard/proxy-pools/page-77e1358581cbeecd.js +0 -4
  1204. package/app/.next/static/chunks/app/(dashboard)/dashboard/quota/page-51f915ba68f44424.js +0 -2
  1205. package/app/.next/static/chunks/app/(dashboard)/dashboard/skills/page-9202b5ce0650c3ab.js +0 -1
  1206. package/app/.next/static/chunks/app/(dashboard)/dashboard/translator/page-8d41d89fe12ae485.js +0 -1
  1207. package/app/.next/static/chunks/app/(dashboard)/dashboard/usage/page-18d6399108c458a6.js +0 -1
  1208. package/app/.next/static/chunks/app/(dashboard)/dashboard/user/page-12765c664b3c1f6d.js +0 -4
  1209. package/app/.next/static/chunks/app/(dashboard)/layout-2b26025389c75878.js +0 -1
  1210. package/app/.next/static/chunks/app/_global-error/page-8d41d89fe12ae485.js +0 -1
  1211. package/app/.next/static/chunks/app/api/auth/login/route-8d41d89fe12ae485.js +0 -1
  1212. package/app/.next/static/chunks/app/api/auth/logout/route-8d41d89fe12ae485.js +0 -1
  1213. package/app/.next/static/chunks/app/api/auth/me/route-8d41d89fe12ae485.js +0 -1
  1214. package/app/.next/static/chunks/app/api/auth/oidc/callback/route-8d41d89fe12ae485.js +0 -1
  1215. package/app/.next/static/chunks/app/api/auth/oidc/start/route-8d41d89fe12ae485.js +0 -1
  1216. package/app/.next/static/chunks/app/api/auth/oidc/test/route-8d41d89fe12ae485.js +0 -1
  1217. package/app/.next/static/chunks/app/api/auth/reset-password/route-8d41d89fe12ae485.js +0 -1
  1218. package/app/.next/static/chunks/app/api/auth/status/route-8d41d89fe12ae485.js +0 -1
  1219. package/app/.next/static/chunks/app/api/cli-tools/all-statuses/route-8d41d89fe12ae485.js +0 -1
  1220. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-8d41d89fe12ae485.js +0 -1
  1221. package/app/.next/static/chunks/app/api/cli-tools/antigravity-mitm/route-8d41d89fe12ae485.js +0 -1
  1222. package/app/.next/static/chunks/app/api/cli-tools/claude-settings/route-8d41d89fe12ae485.js +0 -1
  1223. package/app/.next/static/chunks/app/api/cli-tools/cline-settings/route-8d41d89fe12ae485.js +0 -1
  1224. package/app/.next/static/chunks/app/api/cli-tools/codex-settings/activate-account/route-8d41d89fe12ae485.js +0 -1
  1225. package/app/.next/static/chunks/app/api/cli-tools/codex-settings/route-8d41d89fe12ae485.js +0 -1
  1226. package/app/.next/static/chunks/app/api/cli-tools/copilot-settings/route-8d41d89fe12ae485.js +0 -1
  1227. package/app/.next/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-8d41d89fe12ae485.js +0 -1
  1228. package/app/.next/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-8d41d89fe12ae485.js +0 -1
  1229. package/app/.next/static/chunks/app/api/cli-tools/cowork-settings/route-8d41d89fe12ae485.js +0 -1
  1230. package/app/.next/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-8d41d89fe12ae485.js +0 -1
  1231. package/app/.next/static/chunks/app/api/cli-tools/droid-settings/route-8d41d89fe12ae485.js +0 -1
  1232. package/app/.next/static/chunks/app/api/cli-tools/hermes-settings/route-8d41d89fe12ae485.js +0 -1
  1233. package/app/.next/static/chunks/app/api/cli-tools/jcode-settings/route-8d41d89fe12ae485.js +0 -1
  1234. package/app/.next/static/chunks/app/api/cli-tools/kilo-settings/route-8d41d89fe12ae485.js +0 -1
  1235. package/app/.next/static/chunks/app/api/cli-tools/openclaw-settings/route-8d41d89fe12ae485.js +0 -1
  1236. package/app/.next/static/chunks/app/api/cli-tools/opencode-settings/route-8d41d89fe12ae485.js +0 -1
  1237. package/app/.next/static/chunks/app/api/combos/[id]/route-8d41d89fe12ae485.js +0 -1
  1238. package/app/.next/static/chunks/app/api/combos/route-8d41d89fe12ae485.js +0 -1
  1239. package/app/.next/static/chunks/app/api/health/route-8d41d89fe12ae485.js +0 -1
  1240. package/app/.next/static/chunks/app/api/init/route-8d41d89fe12ae485.js +0 -1
  1241. package/app/.next/static/chunks/app/api/keys/[id]/route-8d41d89fe12ae485.js +0 -1
  1242. package/app/.next/static/chunks/app/api/keys/route-8d41d89fe12ae485.js +0 -1
  1243. package/app/.next/static/chunks/app/api/locale/route-8d41d89fe12ae485.js +0 -1
  1244. package/app/.next/static/chunks/app/api/mcp/[plugin]/message/route-8d41d89fe12ae485.js +0 -1
  1245. package/app/.next/static/chunks/app/api/mcp/[plugin]/sse/route-8d41d89fe12ae485.js +0 -1
  1246. package/app/.next/static/chunks/app/api/media-providers/tts/deepgram/voices/route-8d41d89fe12ae485.js +0 -1
  1247. package/app/.next/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-8d41d89fe12ae485.js +0 -1
  1248. package/app/.next/static/chunks/app/api/media-providers/tts/inworld/voices/route-8d41d89fe12ae485.js +0 -1
  1249. package/app/.next/static/chunks/app/api/media-providers/tts/minimax/voices/route-8d41d89fe12ae485.js +0 -1
  1250. package/app/.next/static/chunks/app/api/media-providers/tts/voices/route-8d41d89fe12ae485.js +0 -1
  1251. package/app/.next/static/chunks/app/api/models/alias/route-8d41d89fe12ae485.js +0 -1
  1252. package/app/.next/static/chunks/app/api/models/availability/route-8d41d89fe12ae485.js +0 -1
  1253. package/app/.next/static/chunks/app/api/models/custom/route-8d41d89fe12ae485.js +0 -1
  1254. package/app/.next/static/chunks/app/api/models/disabled/route-8d41d89fe12ae485.js +0 -1
  1255. package/app/.next/static/chunks/app/api/models/route-8d41d89fe12ae485.js +0 -1
  1256. package/app/.next/static/chunks/app/api/models/test/route-8d41d89fe12ae485.js +0 -1
  1257. package/app/.next/static/chunks/app/api/oauth/[provider]/[action]/route-8d41d89fe12ae485.js +0 -1
  1258. package/app/.next/static/chunks/app/api/oauth/codex/bulk-import/route-8d41d89fe12ae485.js +0 -1
  1259. package/app/.next/static/chunks/app/api/oauth/codex/import-token/route-8d41d89fe12ae485.js +0 -1
  1260. package/app/.next/static/chunks/app/api/oauth/cursor/auto-import/route-8d41d89fe12ae485.js +0 -1
  1261. package/app/.next/static/chunks/app/api/oauth/cursor/import/route-8d41d89fe12ae485.js +0 -1
  1262. package/app/.next/static/chunks/app/api/oauth/gitlab/pat/route-8d41d89fe12ae485.js +0 -1
  1263. package/app/.next/static/chunks/app/api/oauth/iflow/cookie/route-8d41d89fe12ae485.js +0 -1
  1264. package/app/.next/static/chunks/app/api/oauth/kiro/auto-import/route-8d41d89fe12ae485.js +0 -1
  1265. package/app/.next/static/chunks/app/api/oauth/kiro/import/route-8d41d89fe12ae485.js +0 -1
  1266. package/app/.next/static/chunks/app/api/oauth/kiro/social-authorize/route-8d41d89fe12ae485.js +0 -1
  1267. package/app/.next/static/chunks/app/api/oauth/kiro/social-exchange/route-8d41d89fe12ae485.js +0 -1
  1268. package/app/.next/static/chunks/app/api/pricing/route-8d41d89fe12ae485.js +0 -1
  1269. package/app/.next/static/chunks/app/api/provider-nodes/[id]/route-8d41d89fe12ae485.js +0 -1
  1270. package/app/.next/static/chunks/app/api/provider-nodes/route-8d41d89fe12ae485.js +0 -1
  1271. package/app/.next/static/chunks/app/api/provider-nodes/validate/route-8d41d89fe12ae485.js +0 -1
  1272. package/app/.next/static/chunks/app/api/providers/[id]/models/route-8d41d89fe12ae485.js +0 -1
  1273. package/app/.next/static/chunks/app/api/providers/[id]/route-8d41d89fe12ae485.js +0 -1
  1274. package/app/.next/static/chunks/app/api/providers/[id]/test/route-8d41d89fe12ae485.js +0 -1
  1275. package/app/.next/static/chunks/app/api/providers/[id]/test-models/route-8d41d89fe12ae485.js +0 -1
  1276. package/app/.next/static/chunks/app/api/providers/client/route-8d41d89fe12ae485.js +0 -1
  1277. package/app/.next/static/chunks/app/api/providers/kilo/free-models/route-8d41d89fe12ae485.js +0 -1
  1278. package/app/.next/static/chunks/app/api/providers/route-8d41d89fe12ae485.js +0 -1
  1279. package/app/.next/static/chunks/app/api/providers/suggested-models/route-8d41d89fe12ae485.js +0 -1
  1280. package/app/.next/static/chunks/app/api/providers/test-batch/route-8d41d89fe12ae485.js +0 -1
  1281. package/app/.next/static/chunks/app/api/providers/validate/route-8d41d89fe12ae485.js +0 -1
  1282. package/app/.next/static/chunks/app/api/proxy-pools/[id]/route-8d41d89fe12ae485.js +0 -1
  1283. package/app/.next/static/chunks/app/api/proxy-pools/[id]/test/route-8d41d89fe12ae485.js +0 -1
  1284. package/app/.next/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-8d41d89fe12ae485.js +0 -1
  1285. package/app/.next/static/chunks/app/api/proxy-pools/deno-deploy/route-8d41d89fe12ae485.js +0 -1
  1286. package/app/.next/static/chunks/app/api/proxy-pools/route-8d41d89fe12ae485.js +0 -1
  1287. package/app/.next/static/chunks/app/api/proxy-pools/vercel-deploy/route-8d41d89fe12ae485.js +0 -1
  1288. package/app/.next/static/chunks/app/api/settings/database/route-8d41d89fe12ae485.js +0 -1
  1289. package/app/.next/static/chunks/app/api/settings/proxy-test/route-8d41d89fe12ae485.js +0 -1
  1290. package/app/.next/static/chunks/app/api/settings/require-login/route-8d41d89fe12ae485.js +0 -1
  1291. package/app/.next/static/chunks/app/api/settings/route-8d41d89fe12ae485.js +0 -1
  1292. package/app/.next/static/chunks/app/api/shutdown/route-8d41d89fe12ae485.js +0 -1
  1293. package/app/.next/static/chunks/app/api/tags/route-8d41d89fe12ae485.js +0 -1
  1294. package/app/.next/static/chunks/app/api/translator/console-logs/route-8d41d89fe12ae485.js +0 -1
  1295. package/app/.next/static/chunks/app/api/translator/console-logs/stream/route-8d41d89fe12ae485.js +0 -1
  1296. package/app/.next/static/chunks/app/api/translator/load/route-8d41d89fe12ae485.js +0 -1
  1297. package/app/.next/static/chunks/app/api/translator/save/route-8d41d89fe12ae485.js +0 -1
  1298. package/app/.next/static/chunks/app/api/translator/send/route-8d41d89fe12ae485.js +0 -1
  1299. package/app/.next/static/chunks/app/api/translator/translate/route-8d41d89fe12ae485.js +0 -1
  1300. package/app/.next/static/chunks/app/api/tunnel/disable/route-8d41d89fe12ae485.js +0 -1
  1301. package/app/.next/static/chunks/app/api/tunnel/enable/route-8d41d89fe12ae485.js +0 -1
  1302. package/app/.next/static/chunks/app/api/tunnel/status/route-8d41d89fe12ae485.js +0 -1
  1303. package/app/.next/static/chunks/app/api/tunnel/tailscale-check/route-8d41d89fe12ae485.js +0 -1
  1304. package/app/.next/static/chunks/app/api/tunnel/tailscale-disable/route-8d41d89fe12ae485.js +0 -1
  1305. package/app/.next/static/chunks/app/api/tunnel/tailscale-enable/route-8d41d89fe12ae485.js +0 -1
  1306. package/app/.next/static/chunks/app/api/tunnel/tailscale-install/route-8d41d89fe12ae485.js +0 -1
  1307. package/app/.next/static/chunks/app/api/usage/[connectionId]/route-8d41d89fe12ae485.js +0 -1
  1308. package/app/.next/static/chunks/app/api/usage/api-keys/route-8d41d89fe12ae485.js +0 -1
  1309. package/app/.next/static/chunks/app/api/usage/chart/route-8d41d89fe12ae485.js +0 -1
  1310. package/app/.next/static/chunks/app/api/usage/history/route-8d41d89fe12ae485.js +0 -1
  1311. package/app/.next/static/chunks/app/api/usage/logs/route-8d41d89fe12ae485.js +0 -1
  1312. package/app/.next/static/chunks/app/api/usage/providers/route-8d41d89fe12ae485.js +0 -1
  1313. package/app/.next/static/chunks/app/api/usage/request-details/route-8d41d89fe12ae485.js +0 -1
  1314. package/app/.next/static/chunks/app/api/usage/request-logs/route-8d41d89fe12ae485.js +0 -1
  1315. package/app/.next/static/chunks/app/api/usage/stats/route-8d41d89fe12ae485.js +0 -1
  1316. package/app/.next/static/chunks/app/api/usage/stream/route-8d41d89fe12ae485.js +0 -1
  1317. package/app/.next/static/chunks/app/api/users/[id]/route-8d41d89fe12ae485.js +0 -1
  1318. package/app/.next/static/chunks/app/api/users/route-8d41d89fe12ae485.js +0 -1
  1319. package/app/.next/static/chunks/app/api/v1/api/chat/route-8d41d89fe12ae485.js +0 -1
  1320. package/app/.next/static/chunks/app/api/v1/audio/speech/route-8d41d89fe12ae485.js +0 -1
  1321. package/app/.next/static/chunks/app/api/v1/audio/transcriptions/route-8d41d89fe12ae485.js +0 -1
  1322. package/app/.next/static/chunks/app/api/v1/audio/voices/route-8d41d89fe12ae485.js +0 -1
  1323. package/app/.next/static/chunks/app/api/v1/chat/completions/route-8d41d89fe12ae485.js +0 -1
  1324. package/app/.next/static/chunks/app/api/v1/embeddings/route-8d41d89fe12ae485.js +0 -1
  1325. package/app/.next/static/chunks/app/api/v1/images/generations/route-8d41d89fe12ae485.js +0 -1
  1326. package/app/.next/static/chunks/app/api/v1/messages/count_tokens/route-8d41d89fe12ae485.js +0 -1
  1327. package/app/.next/static/chunks/app/api/v1/messages/route-8d41d89fe12ae485.js +0 -1
  1328. package/app/.next/static/chunks/app/api/v1/models/[kind]/route-8d41d89fe12ae485.js +0 -1
  1329. package/app/.next/static/chunks/app/api/v1/models/info/route-8d41d89fe12ae485.js +0 -1
  1330. package/app/.next/static/chunks/app/api/v1/models/route-8d41d89fe12ae485.js +0 -1
  1331. package/app/.next/static/chunks/app/api/v1/responses/compact/route-8d41d89fe12ae485.js +0 -1
  1332. package/app/.next/static/chunks/app/api/v1/responses/route-8d41d89fe12ae485.js +0 -1
  1333. package/app/.next/static/chunks/app/api/v1/route-8d41d89fe12ae485.js +0 -1
  1334. package/app/.next/static/chunks/app/api/v1/search/route-8d41d89fe12ae485.js +0 -1
  1335. package/app/.next/static/chunks/app/api/v1/web/fetch/route-8d41d89fe12ae485.js +0 -1
  1336. package/app/.next/static/chunks/app/api/v1beta/models/[...path]/route-8d41d89fe12ae485.js +0 -1
  1337. package/app/.next/static/chunks/app/api/v1beta/models/route-8d41d89fe12ae485.js +0 -1
  1338. package/app/.next/static/chunks/app/api/version/route-8d41d89fe12ae485.js +0 -1
  1339. package/app/.next/static/chunks/app/api/version/shutdown/route-8d41d89fe12ae485.js +0 -1
  1340. package/app/.next/static/chunks/app/api/version/update/route-8d41d89fe12ae485.js +0 -1
  1341. package/app/.next/static/chunks/app/dashboard/settings/pricing/page-9d24273d41fadd28.js +0 -1
  1342. package/app/.next/static/chunks/app/layout-2f20e93bb64f203d.js +0 -1
  1343. package/app/.next/static/chunks/app/login/page-3192fc777d7b8d4d.js +0 -1
  1344. package/app/.next/static/chunks/app/manifest.webmanifest/route-8d41d89fe12ae485.js +0 -1
  1345. package/app/.next/static/chunks/app/page-8d41d89fe12ae485.js +0 -1
  1346. package/app/.next/static/chunks/next/dist/client/components/builtin/app-error-8d41d89fe12ae485.js +0 -1
  1347. package/app/.next/static/chunks/next/dist/client/components/builtin/forbidden-8d41d89fe12ae485.js +0 -1
  1348. package/app/.next/static/chunks/next/dist/client/components/builtin/not-found-8d41d89fe12ae485.js +0 -1
  1349. package/app/.next/static/chunks/next/dist/client/components/builtin/unauthorized-8d41d89fe12ae485.js +0 -1
  1350. package/app/.next/static/chunks/webpack-b9b0d264958323b9.js +0 -1
  1351. package/app/.next/static/css/f240ded5456043a2.css +0 -1
  1352. package/app/.next/static/css/fe3b2b4e527f4e99.css +0 -1
  1353. package/app/node_modules/@img/colour/color.cjs +0 -1596
  1354. package/app/node_modules/@img/colour/index.cjs +0 -1
  1355. package/app/node_modules/@img/colour/package.json +0 -58
  1356. package/app/node_modules/@img/sharp-darwin-arm64/LICENSE +0 -191
  1357. package/app/node_modules/@img/sharp-darwin-arm64/lib/sharp-darwin-arm64.node +0 -0
  1358. package/app/node_modules/@img/sharp-darwin-arm64/package.json +0 -40
  1359. package/app/node_modules/@img/sharp-libvips-darwin-arm64/lib/index.js +0 -1
  1360. package/app/node_modules/@img/sharp-libvips-darwin-arm64/lib/libvips-cpp.8.17.3.dylib +0 -0
  1361. package/app/node_modules/@img/sharp-libvips-darwin-arm64/package.json +0 -36
  1362. package/app/node_modules/@img/sharp-libvips-darwin-arm64/versions.json +0 -30
  1363. package/app/node_modules/better-sqlite3/build/Release/better_sqlite3.node +0 -0
  1364. package/app/node_modules/better-sqlite3/lib/database.js +0 -90
  1365. package/app/node_modules/better-sqlite3/lib/index.js +0 -3
  1366. package/app/node_modules/better-sqlite3/lib/methods/aggregate.js +0 -43
  1367. package/app/node_modules/better-sqlite3/lib/methods/backup.js +0 -67
  1368. package/app/node_modules/better-sqlite3/lib/methods/function.js +0 -31
  1369. package/app/node_modules/better-sqlite3/lib/methods/inspect.js +0 -7
  1370. package/app/node_modules/better-sqlite3/lib/methods/pragma.js +0 -12
  1371. package/app/node_modules/better-sqlite3/lib/methods/serialize.js +0 -16
  1372. package/app/node_modules/better-sqlite3/lib/methods/table.js +0 -189
  1373. package/app/node_modules/better-sqlite3/lib/methods/transaction.js +0 -78
  1374. package/app/node_modules/better-sqlite3/lib/methods/wrappers.js +0 -54
  1375. package/app/node_modules/better-sqlite3/lib/sqlite-error.js +0 -20
  1376. package/app/node_modules/better-sqlite3/lib/util.js +0 -12
  1377. package/app/node_modules/better-sqlite3/package.json +0 -59
  1378. package/app/node_modules/detect-libc/lib/detect-libc.js +0 -313
  1379. package/app/node_modules/detect-libc/lib/elf.js +0 -39
  1380. package/app/node_modules/detect-libc/lib/filesystem.js +0 -51
  1381. package/app/node_modules/detect-libc/lib/process.js +0 -24
  1382. package/app/node_modules/detect-libc/package.json +0 -44
  1383. package/app/node_modules/sharp/lib/channel.js +0 -177
  1384. package/app/node_modules/sharp/lib/colour.js +0 -195
  1385. package/app/node_modules/sharp/lib/composite.js +0 -212
  1386. package/app/node_modules/sharp/lib/constructor.js +0 -499
  1387. package/app/node_modules/sharp/lib/index.js +0 -16
  1388. package/app/node_modules/sharp/lib/input.js +0 -809
  1389. package/app/node_modules/sharp/lib/is.js +0 -143
  1390. package/app/node_modules/sharp/lib/libvips.js +0 -207
  1391. package/app/node_modules/sharp/lib/operation.js +0 -1016
  1392. package/app/node_modules/sharp/lib/output.js +0 -1666
  1393. package/app/node_modules/sharp/lib/resize.js +0 -595
  1394. package/app/node_modules/sharp/lib/sharp.js +0 -121
  1395. package/app/node_modules/sharp/lib/utility.js +0 -291
  1396. package/app/node_modules/sharp/node_modules/semver/classes/comparator.js +0 -143
  1397. package/app/node_modules/sharp/node_modules/semver/classes/range.js +0 -557
  1398. package/app/node_modules/sharp/node_modules/semver/classes/semver.js +0 -333
  1399. package/app/node_modules/sharp/node_modules/semver/functions/cmp.js +0 -54
  1400. package/app/node_modules/sharp/node_modules/semver/functions/coerce.js +0 -62
  1401. package/app/node_modules/sharp/node_modules/semver/functions/compare.js +0 -7
  1402. package/app/node_modules/sharp/node_modules/semver/functions/eq.js +0 -5
  1403. package/app/node_modules/sharp/node_modules/semver/functions/gt.js +0 -5
  1404. package/app/node_modules/sharp/node_modules/semver/functions/gte.js +0 -5
  1405. package/app/node_modules/sharp/node_modules/semver/functions/lt.js +0 -5
  1406. package/app/node_modules/sharp/node_modules/semver/functions/lte.js +0 -5
  1407. package/app/node_modules/sharp/node_modules/semver/functions/neq.js +0 -5
  1408. package/app/node_modules/sharp/node_modules/semver/functions/parse.js +0 -18
  1409. package/app/node_modules/sharp/node_modules/semver/functions/satisfies.js +0 -12
  1410. package/app/node_modules/sharp/node_modules/semver/internal/constants.js +0 -37
  1411. package/app/node_modules/sharp/node_modules/semver/internal/debug.js +0 -11
  1412. package/app/node_modules/sharp/node_modules/semver/internal/identifiers.js +0 -29
  1413. package/app/node_modules/sharp/node_modules/semver/internal/lrucache.js +0 -42
  1414. package/app/node_modules/sharp/node_modules/semver/internal/parse-options.js +0 -17
  1415. package/app/node_modules/sharp/node_modules/semver/internal/re.js +0 -223
  1416. package/app/node_modules/sharp/node_modules/semver/package.json +0 -78
  1417. package/app/node_modules/sharp/package.json +0 -202
  1418. package/app/src/mitm/antigravityIdeVersion.js +0 -50
  1419. package/app/src/mitm/cert/generate.js +0 -32
  1420. package/app/src/mitm/cert/install.js +0 -269
  1421. package/app/src/mitm/cert/rootCA.js +0 -173
  1422. package/app/src/mitm/config.js +0 -89
  1423. package/app/src/mitm/dbReader.js +0 -22
  1424. package/app/src/mitm/dns/dnsConfig.js +0 -266
  1425. package/app/src/mitm/handlers/antigravity.js +0 -33
  1426. package/app/src/mitm/handlers/base.js +0 -226
  1427. package/app/src/mitm/handlers/copilot.js +0 -35
  1428. package/app/src/mitm/handlers/cursor.js +0 -15
  1429. package/app/src/mitm/handlers/kiro.js +0 -526
  1430. package/app/src/mitm/logger.js +0 -106
  1431. package/app/src/mitm/manager.js +0 -851
  1432. package/app/src/mitm/paths.js +0 -32
  1433. package/app/src/mitm/winElevated.js +0 -81
  1434. package/app/src/shared/constants/mitmToolHosts.js +0 -12
  1435. /package/app/{.next → .next-cli-build}/package.json +0 -0
  1436. /package/app/{.next → .next-cli-build}/react-loadable-manifest.json +0 -0
  1437. /package/app/{.next → .next-cli-build}/server/app/_global-error.meta +0 -0
  1438. /package/app/{.next → .next-cli-build}/server/app/_not-found.meta +0 -0
  1439. /package/app/{.next → .next-cli-build}/server/app/api/auth/login/route_client-reference-manifest.js +0 -0
  1440. /package/app/{.next → .next-cli-build}/server/app/api/auth/logout/route_client-reference-manifest.js +0 -0
  1441. /package/app/{.next → .next-cli-build}/server/app/api/auth/me/route_client-reference-manifest.js +0 -0
  1442. /package/app/{.next → .next-cli-build}/server/app/api/auth/oidc/callback/route_client-reference-manifest.js +0 -0
  1443. /package/app/{.next → .next-cli-build}/server/app/api/auth/oidc/start/route_client-reference-manifest.js +0 -0
  1444. /package/app/{.next → .next-cli-build}/server/app/api/auth/oidc/test/route_client-reference-manifest.js +0 -0
  1445. /package/app/{.next → .next-cli-build}/server/app/api/auth/reset-password/route_client-reference-manifest.js +0 -0
  1446. /package/app/{.next → .next-cli-build}/server/app/api/auth/status/route_client-reference-manifest.js +0 -0
  1447. /package/app/{.next → .next-cli-build}/server/app/api/cli-tools/all-statuses/route_client-reference-manifest.js +0 -0
  1448. /package/app/{.next → .next-cli-build}/server/app/api/cli-tools/antigravity-mitm/alias/route_client-reference-manifest.js +0 -0
  1449. /package/app/{.next → .next-cli-build}/server/app/api/cli-tools/antigravity-mitm/route_client-reference-manifest.js +0 -0
  1450. /package/app/{.next → .next-cli-build}/server/app/api/cli-tools/claude-settings/route_client-reference-manifest.js +0 -0
  1451. /package/app/{.next → .next-cli-build}/server/app/api/cli-tools/cline-settings/route_client-reference-manifest.js +0 -0
  1452. /package/app/{.next → .next-cli-build}/server/app/api/cli-tools/codex-settings/activate-account/route_client-reference-manifest.js +0 -0
  1453. /package/app/{.next → .next-cli-build}/server/app/api/cli-tools/codex-settings/route_client-reference-manifest.js +0 -0
  1454. /package/app/{.next → .next-cli-build}/server/app/api/cli-tools/copilot-settings/route_client-reference-manifest.js +0 -0
  1455. /package/app/{.next → .next-cli-build}/server/app/api/cli-tools/cowork-mcp-registry/route_client-reference-manifest.js +0 -0
  1456. /package/app/{.next → .next-cli-build}/server/app/api/cli-tools/cowork-mcp-tools/route_client-reference-manifest.js +0 -0
  1457. /package/app/{.next → .next-cli-build}/server/app/api/cli-tools/cowork-settings/route_client-reference-manifest.js +0 -0
  1458. /package/app/{.next → .next-cli-build}/server/app/api/cli-tools/deepseek-tui-settings/route_client-reference-manifest.js +0 -0
  1459. /package/app/{.next → .next-cli-build}/server/app/api/cli-tools/droid-settings/route_client-reference-manifest.js +0 -0
  1460. /package/app/{.next → .next-cli-build}/server/app/api/cli-tools/hermes-settings/route_client-reference-manifest.js +0 -0
  1461. /package/app/{.next → .next-cli-build}/server/app/api/cli-tools/jcode-settings/route_client-reference-manifest.js +0 -0
  1462. /package/app/{.next → .next-cli-build}/server/app/api/cli-tools/kilo-settings/route_client-reference-manifest.js +0 -0
  1463. /package/app/{.next → .next-cli-build}/server/app/api/cli-tools/openclaw-settings/route_client-reference-manifest.js +0 -0
  1464. /package/app/{.next → .next-cli-build}/server/app/api/cli-tools/opencode-settings/route_client-reference-manifest.js +0 -0
  1465. /package/app/{.next → .next-cli-build}/server/app/api/combos/[id]/route_client-reference-manifest.js +0 -0
  1466. /package/app/{.next → .next-cli-build}/server/app/api/combos/route_client-reference-manifest.js +0 -0
  1467. /package/app/{.next → .next-cli-build}/server/app/api/health/route_client-reference-manifest.js +0 -0
  1468. /package/app/{.next → .next-cli-build}/server/app/api/init/route_client-reference-manifest.js +0 -0
  1469. /package/app/{.next → .next-cli-build}/server/app/api/keys/[id]/route_client-reference-manifest.js +0 -0
  1470. /package/app/{.next → .next-cli-build}/server/app/api/keys/route_client-reference-manifest.js +0 -0
  1471. /package/app/{.next → .next-cli-build}/server/app/api/locale/route_client-reference-manifest.js +0 -0
  1472. /package/app/{.next → .next-cli-build}/server/app/api/mcp/[plugin]/message/route_client-reference-manifest.js +0 -0
  1473. /package/app/{.next → .next-cli-build}/server/app/api/mcp/[plugin]/sse/route_client-reference-manifest.js +0 -0
  1474. /package/app/{.next → .next-cli-build}/server/app/api/media-providers/tts/deepgram/voices/route_client-reference-manifest.js +0 -0
  1475. /package/app/{.next → .next-cli-build}/server/app/api/media-providers/tts/elevenlabs/voices/route_client-reference-manifest.js +0 -0
  1476. /package/app/{.next → .next-cli-build}/server/app/api/media-providers/tts/inworld/voices/route_client-reference-manifest.js +0 -0
  1477. /package/app/{.next → .next-cli-build}/server/app/api/media-providers/tts/minimax/voices/route_client-reference-manifest.js +0 -0
  1478. /package/app/{.next → .next-cli-build}/server/app/api/media-providers/tts/voices/route_client-reference-manifest.js +0 -0
  1479. /package/app/{.next → .next-cli-build}/server/app/api/models/alias/route_client-reference-manifest.js +0 -0
  1480. /package/app/{.next → .next-cli-build}/server/app/api/models/availability/route_client-reference-manifest.js +0 -0
  1481. /package/app/{.next → .next-cli-build}/server/app/api/models/custom/route_client-reference-manifest.js +0 -0
  1482. /package/app/{.next → .next-cli-build}/server/app/api/models/disabled/route_client-reference-manifest.js +0 -0
  1483. /package/app/{.next → .next-cli-build}/server/app/api/models/route_client-reference-manifest.js +0 -0
  1484. /package/app/{.next → .next-cli-build}/server/app/api/models/test/route_client-reference-manifest.js +0 -0
  1485. /package/app/{.next → .next-cli-build}/server/app/api/oauth/[provider]/[action]/route_client-reference-manifest.js +0 -0
  1486. /package/app/{.next → .next-cli-build}/server/app/api/oauth/codex/bulk-import/route_client-reference-manifest.js +0 -0
  1487. /package/app/{.next → .next-cli-build}/server/app/api/oauth/codex/import-token/route_client-reference-manifest.js +0 -0
  1488. /package/app/{.next → .next-cli-build}/server/app/api/oauth/cursor/auto-import/route_client-reference-manifest.js +0 -0
  1489. /package/app/{.next → .next-cli-build}/server/app/api/oauth/cursor/import/route_client-reference-manifest.js +0 -0
  1490. /package/app/{.next → .next-cli-build}/server/app/api/oauth/gitlab/pat/route_client-reference-manifest.js +0 -0
  1491. /package/app/{.next → .next-cli-build}/server/app/api/oauth/iflow/cookie/route_client-reference-manifest.js +0 -0
  1492. /package/app/{.next → .next-cli-build}/server/app/api/oauth/kiro/auto-import/route_client-reference-manifest.js +0 -0
  1493. /package/app/{.next → .next-cli-build}/server/app/api/oauth/kiro/import/route_client-reference-manifest.js +0 -0
  1494. /package/app/{.next → .next-cli-build}/server/app/api/oauth/kiro/social-authorize/route_client-reference-manifest.js +0 -0
  1495. /package/app/{.next → .next-cli-build}/server/app/api/oauth/kiro/social-exchange/route_client-reference-manifest.js +0 -0
  1496. /package/app/{.next → .next-cli-build}/server/app/api/pricing/route_client-reference-manifest.js +0 -0
  1497. /package/app/{.next → .next-cli-build}/server/app/api/provider-nodes/[id]/route_client-reference-manifest.js +0 -0
  1498. /package/app/{.next → .next-cli-build}/server/app/api/provider-nodes/route_client-reference-manifest.js +0 -0
  1499. /package/app/{.next → .next-cli-build}/server/app/api/provider-nodes/validate/route_client-reference-manifest.js +0 -0
  1500. /package/app/{.next → .next-cli-build}/server/app/api/providers/[id]/models/route_client-reference-manifest.js +0 -0
  1501. /package/app/{.next → .next-cli-build}/server/app/api/providers/[id]/route_client-reference-manifest.js +0 -0
  1502. /package/app/{.next → .next-cli-build}/server/app/api/providers/[id]/test/route_client-reference-manifest.js +0 -0
  1503. /package/app/{.next → .next-cli-build}/server/app/api/providers/[id]/test-models/route_client-reference-manifest.js +0 -0
  1504. /package/app/{.next → .next-cli-build}/server/app/api/providers/client/route_client-reference-manifest.js +0 -0
  1505. /package/app/{.next → .next-cli-build}/server/app/api/providers/kilo/free-models/route_client-reference-manifest.js +0 -0
  1506. /package/app/{.next → .next-cli-build}/server/app/api/providers/route_client-reference-manifest.js +0 -0
  1507. /package/app/{.next → .next-cli-build}/server/app/api/providers/suggested-models/route_client-reference-manifest.js +0 -0
  1508. /package/app/{.next → .next-cli-build}/server/app/api/providers/test-batch/route_client-reference-manifest.js +0 -0
  1509. /package/app/{.next → .next-cli-build}/server/app/api/providers/validate/route_client-reference-manifest.js +0 -0
  1510. /package/app/{.next → .next-cli-build}/server/app/api/proxy-pools/[id]/route_client-reference-manifest.js +0 -0
  1511. /package/app/{.next → .next-cli-build}/server/app/api/proxy-pools/[id]/test/route_client-reference-manifest.js +0 -0
  1512. /package/app/{.next → .next-cli-build}/server/app/api/proxy-pools/cloudflare-deploy/route_client-reference-manifest.js +0 -0
  1513. /package/app/{.next → .next-cli-build}/server/app/api/proxy-pools/deno-deploy/route_client-reference-manifest.js +0 -0
  1514. /package/app/{.next → .next-cli-build}/server/app/api/proxy-pools/route_client-reference-manifest.js +0 -0
  1515. /package/app/{.next → .next-cli-build}/server/app/api/proxy-pools/vercel-deploy/route_client-reference-manifest.js +0 -0
  1516. /package/app/{.next → .next-cli-build}/server/app/api/settings/database/route_client-reference-manifest.js +0 -0
  1517. /package/app/{.next → .next-cli-build}/server/app/api/settings/proxy-test/route_client-reference-manifest.js +0 -0
  1518. /package/app/{.next → .next-cli-build}/server/app/api/settings/require-login/route_client-reference-manifest.js +0 -0
  1519. /package/app/{.next → .next-cli-build}/server/app/api/settings/route_client-reference-manifest.js +0 -0
  1520. /package/app/{.next → .next-cli-build}/server/app/api/shutdown/route_client-reference-manifest.js +0 -0
  1521. /package/app/{.next → .next-cli-build}/server/app/api/tags/route_client-reference-manifest.js +0 -0
  1522. /package/app/{.next → .next-cli-build}/server/app/api/translator/console-logs/route_client-reference-manifest.js +0 -0
  1523. /package/app/{.next → .next-cli-build}/server/app/api/translator/console-logs/stream/route_client-reference-manifest.js +0 -0
  1524. /package/app/{.next → .next-cli-build}/server/app/api/translator/load/route_client-reference-manifest.js +0 -0
  1525. /package/app/{.next → .next-cli-build}/server/app/api/translator/save/route_client-reference-manifest.js +0 -0
  1526. /package/app/{.next → .next-cli-build}/server/app/api/translator/send/route_client-reference-manifest.js +0 -0
  1527. /package/app/{.next → .next-cli-build}/server/app/api/translator/translate/route_client-reference-manifest.js +0 -0
  1528. /package/app/{.next → .next-cli-build}/server/app/api/tunnel/disable/route_client-reference-manifest.js +0 -0
  1529. /package/app/{.next → .next-cli-build}/server/app/api/tunnel/enable/route_client-reference-manifest.js +0 -0
  1530. /package/app/{.next → .next-cli-build}/server/app/api/tunnel/status/route_client-reference-manifest.js +0 -0
  1531. /package/app/{.next → .next-cli-build}/server/app/api/tunnel/tailscale-check/route_client-reference-manifest.js +0 -0
  1532. /package/app/{.next → .next-cli-build}/server/app/api/tunnel/tailscale-disable/route_client-reference-manifest.js +0 -0
  1533. /package/app/{.next → .next-cli-build}/server/app/api/tunnel/tailscale-enable/route_client-reference-manifest.js +0 -0
  1534. /package/app/{.next → .next-cli-build}/server/app/api/tunnel/tailscale-install/route_client-reference-manifest.js +0 -0
  1535. /package/app/{.next → .next-cli-build}/server/app/api/usage/[connectionId]/route_client-reference-manifest.js +0 -0
  1536. /package/app/{.next → .next-cli-build}/server/app/api/usage/api-keys/route_client-reference-manifest.js +0 -0
  1537. /package/app/{.next → .next-cli-build}/server/app/api/usage/chart/route_client-reference-manifest.js +0 -0
  1538. /package/app/{.next → .next-cli-build}/server/app/api/usage/history/route_client-reference-manifest.js +0 -0
  1539. /package/app/{.next → .next-cli-build}/server/app/api/usage/logs/route_client-reference-manifest.js +0 -0
  1540. /package/app/{.next → .next-cli-build}/server/app/api/usage/providers/route_client-reference-manifest.js +0 -0
  1541. /package/app/{.next → .next-cli-build}/server/app/api/usage/request-details/route_client-reference-manifest.js +0 -0
  1542. /package/app/{.next → .next-cli-build}/server/app/api/usage/request-logs/route_client-reference-manifest.js +0 -0
  1543. /package/app/{.next → .next-cli-build}/server/app/api/usage/stats/route_client-reference-manifest.js +0 -0
  1544. /package/app/{.next → .next-cli-build}/server/app/api/usage/stream/route_client-reference-manifest.js +0 -0
  1545. /package/app/{.next → .next-cli-build}/server/app/api/users/[id]/route_client-reference-manifest.js +0 -0
  1546. /package/app/{.next → .next-cli-build}/server/app/api/users/route_client-reference-manifest.js +0 -0
  1547. /package/app/{.next → .next-cli-build}/server/app/api/v1/api/chat/route_client-reference-manifest.js +0 -0
  1548. /package/app/{.next → .next-cli-build}/server/app/api/v1/audio/speech/route_client-reference-manifest.js +0 -0
  1549. /package/app/{.next → .next-cli-build}/server/app/api/v1/audio/transcriptions/route_client-reference-manifest.js +0 -0
  1550. /package/app/{.next → .next-cli-build}/server/app/api/v1/audio/voices/route_client-reference-manifest.js +0 -0
  1551. /package/app/{.next → .next-cli-build}/server/app/api/v1/chat/completions/route_client-reference-manifest.js +0 -0
  1552. /package/app/{.next → .next-cli-build}/server/app/api/v1/embeddings/route_client-reference-manifest.js +0 -0
  1553. /package/app/{.next → .next-cli-build}/server/app/api/v1/images/generations/route_client-reference-manifest.js +0 -0
  1554. /package/app/{.next → .next-cli-build}/server/app/api/v1/messages/count_tokens/route_client-reference-manifest.js +0 -0
  1555. /package/app/{.next → .next-cli-build}/server/app/api/v1/messages/route_client-reference-manifest.js +0 -0
  1556. /package/app/{.next → .next-cli-build}/server/app/api/v1/models/[kind]/route_client-reference-manifest.js +0 -0
  1557. /package/app/{.next → .next-cli-build}/server/app/api/v1/models/info/route_client-reference-manifest.js +0 -0
  1558. /package/app/{.next → .next-cli-build}/server/app/api/v1/models/route_client-reference-manifest.js +0 -0
  1559. /package/app/{.next → .next-cli-build}/server/app/api/v1/responses/compact/route_client-reference-manifest.js +0 -0
  1560. /package/app/{.next → .next-cli-build}/server/app/api/v1/responses/route_client-reference-manifest.js +0 -0
  1561. /package/app/{.next → .next-cli-build}/server/app/api/v1/route_client-reference-manifest.js +0 -0
  1562. /package/app/{.next → .next-cli-build}/server/app/api/v1/search/route_client-reference-manifest.js +0 -0
  1563. /package/app/{.next → .next-cli-build}/server/app/api/v1/web/fetch/route_client-reference-manifest.js +0 -0
  1564. /package/app/{.next → .next-cli-build}/server/app/api/v1beta/models/[...path]/route_client-reference-manifest.js +0 -0
  1565. /package/app/{.next → .next-cli-build}/server/app/api/v1beta/models/route_client-reference-manifest.js +0 -0
  1566. /package/app/{.next → .next-cli-build}/server/app/api/version/route_client-reference-manifest.js +0 -0
  1567. /package/app/{.next → .next-cli-build}/server/app/api/version/shutdown/route_client-reference-manifest.js +0 -0
  1568. /package/app/{.next → .next-cli-build}/server/app/api/version/update/route_client-reference-manifest.js +0 -0
  1569. /package/app/{.next → .next-cli-build}/server/app/callback.meta +0 -0
  1570. /package/app/{.next → .next-cli-build}/server/app/dashboard/settings/pricing.meta +0 -0
  1571. /package/app/{.next → .next-cli-build}/server/app/favicon.ico.body +0 -0
  1572. /package/app/{.next → .next-cli-build}/server/app/favicon.ico.meta +0 -0
  1573. /package/app/{.next → .next-cli-build}/server/app/index.meta +0 -0
  1574. /package/app/{.next → .next-cli-build}/server/app/landing.meta +0 -0
  1575. /package/app/{.next → .next-cli-build}/server/app/login.meta +0 -0
  1576. /package/app/{.next → .next-cli-build}/server/app/manifest.webmanifest/route_client-reference-manifest.js +0 -0
  1577. /package/app/{.next → .next-cli-build}/server/app/manifest.webmanifest.body +0 -0
  1578. /package/app/{.next → .next-cli-build}/server/app/manifest.webmanifest.meta +0 -0
  1579. /package/app/{.next → .next-cli-build}/server/chunks/1679.js +0 -0
  1580. /package/app/{.next → .next-cli-build}/server/chunks/1998.js +0 -0
  1581. /package/app/{.next → .next-cli-build}/server/chunks/241.js +0 -0
  1582. /package/app/{.next → .next-cli-build}/server/chunks/3593.js +0 -0
  1583. /package/app/{.next → .next-cli-build}/server/chunks/4013.js +0 -0
  1584. /package/app/{.next → .next-cli-build}/server/chunks/4739.js +0 -0
  1585. /package/app/{.next → .next-cli-build}/server/chunks/4741.js +0 -0
  1586. /package/app/{.next → .next-cli-build}/server/chunks/4989.js +0 -0
  1587. /package/app/{.next → .next-cli-build}/server/chunks/5217.js +0 -0
  1588. /package/app/{.next → .next-cli-build}/server/chunks/5258.js +0 -0
  1589. /package/app/{.next → .next-cli-build}/server/chunks/5573.js +0 -0
  1590. /package/app/{.next → .next-cli-build}/server/chunks/6457.js +0 -0
  1591. /package/app/{.next → .next-cli-build}/server/chunks/6844.js +0 -0
  1592. /package/app/{.next → .next-cli-build}/server/chunks/6936.js +0 -0
  1593. /package/app/{.next → .next-cli-build}/server/chunks/7502.js +0 -0
  1594. /package/app/{.next → .next-cli-build}/server/chunks/8473.js +0 -0
  1595. /package/app/{.next → .next-cli-build}/server/chunks/8520.js +0 -0
  1596. /package/app/{.next → .next-cli-build}/server/chunks/8971.js +0 -0
  1597. /package/app/{.next → .next-cli-build}/server/chunks/9460.js +0 -0
  1598. /package/app/{.next → .next-cli-build}/server/functions-config-manifest.json +0 -0
  1599. /package/app/{.next → .next-cli-build}/server/middleware-manifest.json +0 -0
  1600. /package/app/{.next → .next-cli-build}/server/middleware-react-loadable-manifest.js +0 -0
  1601. /package/app/{.next → .next-cli-build}/server/pages-manifest.json +0 -0
  1602. /package/app/{.next → .next-cli-build}/server/prefetch-hints.json +0 -0
  1603. /package/app/{.next → .next-cli-build}/server/webpack-runtime.js +0 -0
  1604. /package/app/{.next/static/MxcY0EY8eMa4ouCwsP4Cl → .next-cli-build/static/DLZR81Hq9OqOrl2Xc2iHn}/_ssgManifest.js +0 -0
  1605. /package/app/{.next → .next-cli-build}/static/chunks/1051-a02f07646d97d6ca.js +0 -0
  1606. /package/app/{.next → .next-cli-build}/static/chunks/1a258343-5938f676ed376386.js +0 -0
  1607. /package/app/{.next → .next-cli-build}/static/chunks/3794-ba2500baa4c52d55.js +0 -0
  1608. /package/app/{.next → .next-cli-build}/static/chunks/4bd1b696-e356ca5ba0218e27.js +0 -0
  1609. /package/app/{.next → .next-cli-build}/static/chunks/5242-bb1a1a7ec3bfb62f.js +0 -0
  1610. /package/app/{.next → .next-cli-build}/static/chunks/5772-901f1092d831ec37.js +0 -0
  1611. /package/app/{.next → .next-cli-build}/static/chunks/7055-e60e20f43bfbe5f8.js +0 -0
  1612. /package/app/{.next → .next-cli-build}/static/chunks/app/_not-found/page-7927650ca4037264.js +0 -0
  1613. /package/app/{.next → .next-cli-build}/static/chunks/app/callback/page-97a750f0d51c3dbe.js +0 -0
  1614. /package/app/{.next → .next-cli-build}/static/chunks/app/landing/page-bf42a9c80c1e6776.js +0 -0
  1615. /package/app/{.next → .next-cli-build}/static/chunks/framework-711ef29bc66f648c.js +0 -0
  1616. /package/app/{.next → .next-cli-build}/static/chunks/main-app-d5f2701c08554961.js +0 -0
  1617. /package/app/{.next → .next-cli-build}/static/chunks/main-b8d198db3858ff3e.js +0 -0
  1618. /package/app/{.next → .next-cli-build}/static/chunks/next/dist/client/components/builtin/global-error-8d51a00b6c966622.js +0 -0
  1619. /package/app/{.next → .next-cli-build}/static/chunks/polyfills-42372ed130431b0a.js +0 -0
  1620. /package/app/{.next → .next-cli-build}/static/css/599369d853c61df7.css +0 -0
  1621. /package/app/{.next → .next-cli-build}/static/media/material-symbols-outlined.1060ac06.woff2 +0 -0
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3471],{64561:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>j});var a=s(95155),r=s(12115),o=s(73321),i=s(35497),l=s(81127),n=s(21931),d=s(1620),c=s(31474),m=s(90620),x=s(93308),u=s(38202);let p=[{id:"openai",label:"OpenAI / Codex",targets:["api.openai.com","chatgpt.com"]},{id:"anthropic",label:"Anthropic",targets:["api.anthropic.com"]},{id:"google",label:"Google / Gemini",targets:["generativelanguage.googleapis.com","aiplatform.googleapis.com"]},{id:"antigravity",label:"Antigravity",targets:["cloudcode-pa.googleapis.com","daily-cloudcode-pa.googleapis.com","daily-cloudcode-pa.sandbox.googleapis.com"]},{id:"copilot",label:"GitHub Copilot",targets:["api.individual.githubcopilot.com"]},{id:"openrouter",label:"OpenRouter",targets:["openrouter.ai","api.openrouter.ai"]},{id:"cursor",label:"Cursor",targets:["api2.cursor.sh"]},{id:"kiro",label:"Kiro / AWS",targets:["q.us-east-1.amazonaws.com","codewhisperer.us-east-1.amazonaws.com"]}],h=new Set(p.flatMap(e=>e.targets));function b(e){return Array.from(new Set(e.map(e=>String(e||"").trim()).filter(Boolean)))}function g(e,t,s){let a=String(e||"").trim();if(!a||!t&&!s)return a;try{let e=/^[a-z][a-z0-9+.-]*:\/\//i.test(a),r=new URL(e?a:`http://${a}`);return r.username=t||"",r.password=s||"",r.toString()}catch{return a}}function y(e){try{return decodeURIComponent(e||"")}catch{return e||""}}function f(e){let t=String(e||"").trim();if(!t)return{proxyUrl:"",username:"",password:""};try{let e=/^[a-z][a-z0-9+.-]*:\/\//i.test(t),s=new URL(e?t:`http://${t}`),a=y(s.username),r=y(s.password);s.username="",s.password="";let o=e?s.toString():s.toString().replace(/^http:\/\//i,"");return"/"!==s.pathname||s.search||s.hash||(o=o.replace(/\/$/,"")),{proxyUrl:o,username:a,password:r}}catch{return{proxyUrl:t,username:"",password:""}}}function j(){let e=(0,o.useRouter)(),{theme:t,setTheme:s,isDark:y}=(0,d.D)(),[j,w]=(0,r.useState)("en"),[v,N]=(0,r.useState)(!1),[C,P]=(0,r.useState)(!1),[S,k]=(0,r.useState)(!1),[O,I]=(0,r.useState)({fallbackStrategy:"fill-first"}),[U,L]=(0,r.useState)(!0),[T,R]=(0,r.useState)({current:"",new:"",confirm:""}),[A,D]=(0,r.useState)({type:"",message:""}),[$,M]=(0,r.useState)(!1),[E,F]=(0,r.useState)(!1),[q,J]=(0,r.useState)({type:"",message:""}),[_,H]=(0,r.useState)({open:!1,mode:"",password:""}),z=(0,r.useRef)(null),[K,Z]=(0,r.useState)({authMode:"password",oidcIssuerUrl:"",oidcClientId:"",oidcScopes:"openid profile email",oidcLoginLabel:"Sign in with OIDC"}),[B,W]=(0,r.useState)(""),[G,Q]=(0,r.useState)({type:"",message:""}),[V,Y]=(0,r.useState)(!1),[X,ee]=(0,r.useState)(!1),[et,es]=(0,r.useState)({type:"",message:""}),[ea,er]=(0,r.useState)("/api/auth/oidc/callback"),[eo,ei]=(0,r.useState)(!1),el=(0,r.useRef)(null),[en,ed]=(0,r.useState)({outboundProxyEnabled:!1,outboundProxyUrl:"",outboundNoProxy:"",outboundProxyTargets:[],outboundProxyCustomTargets:"",outboundProxyUsername:"",outboundProxyPassword:"",outboundProxySavedUsername:"",outboundProxySavedPassword:""}),[ec,em]=(0,r.useState)({type:"",message:""}),[ex,eu]=(0,r.useState)(!1),[ep,eh]=(0,r.useState)(!1);(0,r.useEffect)(()=>{fetch("/api/auth/me").then(e=>e.json()).then(e=>{"sub_user"===e.role&&(window.location.href="/dashboard/usage")}).catch(()=>{}),w(function(){if("u"<typeof document)return"en";let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${x.CL}=`)),t=e?decodeURIComponent(e.split("=")[1]):"en";return(0,x.QC)(t)}())},[v]),(0,r.useEffect)(()=>{fetch("/api/settings").then(e=>e.json()).then(e=>{let t=f(e?.outboundProxyUrl);I(e),Z({authMode:e?.authMode||"password",oidcIssuerUrl:e?.oidcIssuerUrl||"",oidcClientId:e?.oidcClientId||"",oidcScopes:e?.oidcScopes||"openid profile email",oidcLoginLabel:e?.oidcLoginLabel||"Sign in with OIDC"}),W(""),(e?.authMode==="oidc"||e?.authMode==="both")&&ei(!0),ed({outboundProxyEnabled:e?.outboundProxyEnabled===!0,outboundProxyUrl:t.proxyUrl,outboundNoProxy:e?.outboundNoProxy||"",outboundProxyTargets:Array.isArray(e?.outboundProxyTargets)?e.outboundProxyTargets:[],outboundProxyCustomTargets:Array.isArray(e?.outboundProxyTargets)?e.outboundProxyTargets.filter(e=>!h.has(e)).join(","):"",outboundProxyUsername:t.username,outboundProxyPassword:"",outboundProxySavedUsername:t.username,outboundProxySavedPassword:t.password}),L(!1)}).catch(e=>{console.error("Failed to fetch settings:",e),L(!1)})},[]),(0,r.useEffect)(()=>{er(`${window.location.origin}/api/auth/oidc/callback`)},[]);let eb=async e=>{if(e.preventDefault(),!0!==O.outboundProxyEnabled)return;eu(!0),em({type:"",message:""});let t=ef(),s=en.outboundProxyPassword||(en.outboundProxyUsername===en.outboundProxySavedUsername?en.outboundProxySavedPassword:""),a=g(en.outboundProxyUrl,en.outboundProxyUsername,s);try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyUrl:a,outboundProxyTargets:t})}),s=await e.json();if(e.ok){let e=f(s?.outboundProxyUrl||a);I(e=>({...e,...s})),ed(a=>({...a,outboundProxyUrl:e.proxyUrl,outboundProxyTargets:Array.isArray(s?.outboundProxyTargets)?s.outboundProxyTargets:t,outboundProxyUsername:e.username,outboundProxyPassword:"",outboundProxySavedUsername:e.username,outboundProxySavedPassword:e.password})),em({type:"success",message:"Proxy settings applied"})}else em({type:"error",message:s.error||"Failed to update proxy settings"})}catch(e){em({type:"error",message:"An error occurred"})}finally{eu(!1)}},eg=async()=>{if(!0!==O.outboundProxyEnabled)return;let e=en.outboundProxyPassword||(en.outboundProxyUsername===en.outboundProxySavedUsername?en.outboundProxySavedPassword:""),t=g(en.outboundProxyUrl,en.outboundProxyUsername,e);if(!t)return void em({type:"error",message:"Please enter a Proxy URL to test"});eh(!0),em({type:"",message:""});try{let e=await fetch("/api/settings/proxy-test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyUrl:t})}),s=await e.json();e.ok&&s?.ok?em({type:"success",message:`Proxy test OK (${s.status}) in ${s.elapsedMs}ms`}):em({type:"error",message:s?.error||"Proxy test failed"})}catch(e){em({type:"error",message:"An error occurred"})}finally{eh(!1)}},ey=async e=>{eu(!0),em({type:"",message:""});try{let t=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({outboundProxyEnabled:e})}),s=await t.json();t.ok?(I(e=>({...e,...s})),ed(e=>({...e,outboundProxyEnabled:s?.outboundProxyEnabled===!0})),em({type:"success",message:e?"Proxy enabled":"Proxy disabled"})):em({type:"error",message:s.error||"Failed to update proxy settings"})}catch(e){em({type:"error",message:"An error occurred"})}finally{eu(!1)}},ef=()=>b([...Array.isArray(en.outboundProxyTargets)?en.outboundProxyTargets:[],...b(String(en.outboundProxyCustomTargets||"").split(","))]),ej=async e=>{if(e.preventDefault(),T.new!==T.confirm)return void D({type:"error",message:"Passwords do not match"});M(!0),D({type:"",message:""});try{let e=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({currentPassword:T.current,newPassword:T.new})}),t=await e.json();e.ok?(D({type:"success",message:"Password updated successfully"}),R({current:"",new:"",confirm:""})):D({type:"error",message:t.error||"Failed to update password"})}catch(e){D({type:"error",message:"An error occurred"})}finally{M(!1)}},ew=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({fallbackStrategy:e})})).ok&&I(t=>({...t,fallbackStrategy:e}))}catch(e){console.error("Failed to update settings:",e)}},ev=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStrategy:e})})).ok&&I(t=>({...t,comboStrategy:e}))}catch(e){console.error("Failed to update combo strategy:",e)}},eN=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({stickyRoundRobinLimit:t})})).ok&&I(e=>({...e,stickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update sticky limit:",e)}},eC=async e=>{let t=parseInt(e);if(!isNaN(t)&&!(t<1))try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({comboStickyRoundRobinLimit:t})})).ok&&I(e=>({...e,comboStickyRoundRobinLimit:t}))}catch(e){console.error("Failed to update combo sticky limit:",e)}},eP=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({requireLogin:e})})).ok&&I(t=>({...t,requireLogin:e}))}catch(e){console.error("Failed to update require login:",e)}},eS=(e,t)=>{Z(s=>({...s,[e]:t}))},ek=async(e=K.authMode||"password")=>{let t=K.oidcIssuerUrl.trim(),s=K.oidcClientId.trim(),a=K.oidcScopes.trim(),r=K.oidcLoginLabel.trim(),o=B.trim();if("password"!==e&&(!t||!s||!o)&&!O.oidcConfigured)return void Q({type:"error",message:"Issuer URL, client ID, and client secret are required to enable OIDC."});Y(!0),Q({type:"",message:""}),es({type:"",message:""});try{let i={authMode:e,oidcIssuerUrl:t,oidcClientId:s,oidcScopes:a||"openid profile email",oidcLoginLabel:r||"Sign in with OIDC"};o&&(i.oidcClientSecret=o);let l=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)}),n=await l.json();l.ok?(I(e=>({...e,...n})),Z({authMode:n?.authMode||e,oidcIssuerUrl:n?.oidcIssuerUrl||t,oidcClientId:n?.oidcClientId||s,oidcScopes:n?.oidcScopes||a||"openid profile email",oidcLoginLabel:n?.oidcLoginLabel||r||"Sign in with OIDC"}),W(""),Q({type:"success",message:"oidc"===e?"OIDC login enabled":"both"===e?"Password and OIDC login enabled":"OIDC settings saved"})):Q({type:"error",message:n.error||"Failed to save OIDC settings"})}catch(e){Q({type:"error",message:"An error occurred"})}finally{Y(!1)}},eO=async()=>{let e=K.oidcIssuerUrl.trim(),t=K.oidcClientId.trim(),s=K.oidcScopes.trim(),a=B.trim();if(!e||!t)return void es({type:"error",message:"Issuer URL and client ID are required to test the connection."});ee(!0),Q({type:"",message:""}),es({type:"",message:""});try{let r=await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({authMode:K.authMode||O.authMode||"password",oidcIssuerUrl:e,oidcClientId:t,oidcScopes:s||"openid profile email",oidcLoginLabel:K.oidcLoginLabel.trim()||"Sign in with OIDC",...a?{oidcClientSecret:a}:{}})}),o=await r.json().catch(()=>({}));if(!r.ok)return void es({type:"error",message:o.error||"Failed to save OIDC settings before testing"});let i=await fetch("/api/auth/oidc/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({issuerUrl:o.oidcIssuerUrl||e,clientId:o.oidcClientId||t,scopes:o.oidcScopes||s||"openid profile email"})}),l=await i.json().catch(()=>({}));if(i.ok&&l?.ok){let e=l.clientSecretTested?!0===l.clientSecretValid?`Connection OK. Discovery loaded from ${l.issuerUrl}. Client secret validated too.`:`Connection OK. Discovery loaded from ${l.issuerUrl}. Client secret was not checked.`:`Connection OK. Discovery loaded from ${l.issuerUrl}.`;es({type:"success",message:e})}else es({type:"error",message:l.error||"OIDC connection test failed"})}catch(e){es({type:"error",message:"An error occurred"})}finally{ee(!1)}},eI=async e=>{try{(await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({enableObservability:e})})).ok&&I(t=>({...t,enableObservability:e}))}catch(e){console.error("Failed to update enableObservability:",e)}},eU=async()=>{try{let e=await fetch("/api/settings");if(!e.ok)return;let t=await e.json();I(t)}catch(e){console.error("Failed to reload settings:",e)}},eL=async e=>{F(!0),J({type:"",message:""});try{let t=await fetch("/api/settings/database",{headers:{"x-9r-password":e}});if(!t.ok){let e=await t.json().catch(()=>({}));throw Error(e.error||"Failed to export database")}let s=await t.json(),a=JSON.stringify(s,null,2),r=new Blob([a],{type:"application/json"}),o=URL.createObjectURL(r),i=document.createElement("a"),l=new Date().toISOString().replace(/[.:]/g,"-");i.href=o,i.download=`openrouterx-backup-${l}.json`,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(o),J({type:"success",message:"Database backup downloaded"})}catch(e){J({type:"error",message:e.message||"Failed to export database"})}finally{F(!1)}},eT=async e=>{let t=z.current;if(t){F(!0);try{let s=await t.text(),a=JSON.parse(s),r=await fetch("/api/settings/database",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...a,password:e})}),o=await r.json().catch(()=>({}));if(!r.ok)throw Error(o.error||"Failed to import database");await eU(),J({type:"success",message:"Database imported successfully"})}catch(e){J({type:"error",message:e.message||"Invalid backup file"})}finally{z.current=null,F(!1)}}},eR=async()=>{let{mode:e,password:t}=_;H({open:!1,mode:"",password:""}),"export"===e?await eL(t):"import"===e&&await eT(t)},eA=!0===O.enableObservability,eD=async()=>{k(!0);try{await fetch("/api/version/shutdown",{method:"POST"})}catch(e){}k(!1),P(!1)},e$=async()=>{try{(await fetch("/api/auth/logout",{method:"POST"})).ok&&(e.push("/login"),e.refresh())}catch(e){console.error("Failed to logout:",e)}};return(0,a.jsxs)("div",{className:"max-w-2xl mx-auto px-4 sm:px-0",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"size-10 sm:size-12 rounded-lg bg-green-500/10 text-green-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-xl sm:text-2xl",children:"computer"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"text-lg sm:text-xl font-semibold",children:"Local Mode"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Running on your machine"})]})]}),(0,a.jsx)("div",{className:"inline-flex p-1 rounded-lg bg-black/5 dark:bg-white/5 w-full sm:w-auto",children:["light","dark","system"].map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>s(e),className:(0,c.cn)("flex items-center justify-center gap-1 sm:gap-1.5 px-2 sm:px-3 py-1.5 rounded-md font-medium transition-all flex-1 sm:flex-initial",t===e?"bg-white dark:bg-white/10 text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"light"===e?"light_mode":"dark"===e?"dark_mode":"contrast"}),(0,a.jsx)("span",{className:"capitalize text-xs sm:text-sm",children:e})]},e))})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 pt-4 border-t border-border",children:[(0,a.jsx)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between p-3 rounded-lg bg-bg border border-border gap-2",children:(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Database Location"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted font-mono break-all",children:O.databasePath||"~/.openrouterx/db.json"})]})}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsx)(i.$n,{variant:"secondary",icon:"download",onClick:()=>H({open:!0,mode:"export",password:""}),loading:E,className:"w-full sm:w-auto",children:"Download Backup"}),(0,a.jsx)(i.$n,{variant:"outline",icon:"upload",onClick:()=>el.current?.click(),disabled:E,className:"w-full sm:w-auto",children:"Import Backup"}),(0,a.jsx)("input",{ref:el,type:"file",accept:"application/json,.json",className:"hidden",onChange:e=>{let t=e.target.files?.[0];el.current&&(el.current.value=""),t&&(z.current=t,J({type:"",message:""}),H({open:!0,mode:"import",password:""}))}})]}),q.message&&(0,a.jsx)("p",{className:`text-sm ${"error"===q.type?"text-red-500":"text-green-600 dark:text-green-400"}`,children:q.message})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg bg-blue-500/10 text-blue-500 flex items-center justify-center shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"language"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Language"})]}),(0,a.jsxs)("button",{onClick:()=>N(!0),className:"flex items-center justify-between w-full p-3 rounded-lg bg-bg border border-border hover:border-primary/50 transition-colors","data-i18n-skip":"true",children:[(0,a.jsx)("span",{className:"text-sm text-text-muted",children:"Display language"}),(0,a.jsx)("span",{className:"text-2xl",children:u.h[j]||"\uD83C\uDF10"})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-primary/10 text-primary shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"shield"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Security"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Require login"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"When ON, dashboard requires password. When OFF, access without login."})]}),(0,a.jsx)(i.lM,{checked:!0===O.requireLogin,onChange:()=>eP(!O.requireLogin),disabled:U})]}),!0===O.requireLogin&&(0,a.jsxs)("form",{onSubmit:ej,className:"flex flex-col gap-4 pt-4 border-t border-border/50",children:[O.hasPassword&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"Current Password"}),(0,a.jsx)(i.pd,{type:"password",placeholder:"Enter current password",value:T.current,onChange:e=>R({...T,current:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"New Password"}),(0,a.jsx)(i.pd,{type:"password",placeholder:"Enter new password",value:T.new,onChange:e=>R({...T,new:e.target.value}),required:!0})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"text-xs sm:text-sm font-medium",children:"Confirm New Password"}),(0,a.jsx)(i.pd,{type:"password",placeholder:"Confirm new password",value:T.confirm,onChange:e=>R({...T,confirm:e.target.value}),required:!0})]})]}),A.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===A.type?"text-red-500":"text-green-500"}`,children:A.message}),(0,a.jsx)("div",{className:"pt-2",children:(0,a.jsx)(i.$n,{type:"submit",variant:"primary",loading:$,className:"w-full sm:w-auto",children:O.hasPassword?"Update Password":"Set Password"})})]})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("button",{type:"button",onClick:()=>ei(e=>!e),className:"w-full flex items-center gap-3 text-left",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-indigo-500/10 text-indigo-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"lock_open"})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"OIDC Dashboard Login"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"oidc"===O.authMode?"OIDC active":"both"===O.authMode?"Password + OIDC active":"Optional SSO via Authentik/Keycloak/Google"})]}),(0,a.jsx)("span",{className:"material-symbols-outlined text-text-muted shrink-0",children:eo?"expand_less":"expand_more"})]}),eo&&(0,a.jsxs)("div",{className:"flex flex-col gap-4 mt-4",children:[(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Use Authentik or any OIDC provider to sign in to the dashboard. You can enable password-only, OIDC-only, or both for the dashboard; model API access still uses API keys."}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Auth Mode"}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:[{value:"password",title:"Password only",desc:"Keep the legacy password login."},{value:"oidc",title:"OIDC only",desc:"Require OIDC for dashboard access."},{value:"both",title:"Both",desc:"Allow either password or OIDC."}].map(e=>{let t=K.authMode===e.value;return(0,a.jsxs)("button",{type:"button",onClick:()=>eS("authMode",e.value),className:(0,c.cn)("text-left rounded-lg border p-3 transition-colors",t?"border-primary bg-primary/5":"border-border bg-bg hover:bg-black/5 dark:hover:bg-white/5"),disabled:U||V,children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:e.title}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted mt-1",children:e.desc})]},e.value)})})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Issuer URL"}),(0,a.jsx)(i.pd,{placeholder:"https://auth.example.com/application/o/9router/",value:K.oidcIssuerUrl,onChange:e=>eS("oidcIssuerUrl",e.target.value),disabled:U||V})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Client ID"}),(0,a.jsx)(i.pd,{placeholder:"9router-dashboard",value:K.oidcClientId,onChange:e=>eS("oidcClientId",e.target.value),disabled:U||V})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Client Secret"}),(0,a.jsx)(i.pd,{type:"password",placeholder:"Leave blank to keep existing secret",value:B,onChange:e=>W(e.target.value),disabled:U||V}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"This value is write-only after saving."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Scopes"}),(0,a.jsx)(i.pd,{placeholder:"openid profile email",value:K.oidcScopes,onChange:e=>eS("oidcScopes",e.target.value),disabled:U||V})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Login Button Label"}),(0,a.jsx)(i.pd,{placeholder:"Sign in with OIDC",value:K.oidcLoginLabel,onChange:e=>eS("oidcLoginLabel",e.target.value),disabled:U||V})]})]}),(0,a.jsxs)("div",{className:"rounded-lg border border-border bg-bg p-3 text-xs sm:text-sm text-text-muted",children:[(0,a.jsx)("p",{className:"font-medium text-text-main mb-1",children:"Redirect URI"}),(0,a.jsx)("code",{className:"block break-all font-mono",children:ea})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2 pt-2 border-t border-border/50",children:[(0,a.jsx)(i.$n,{type:"button",variant:"primary",loading:V,onClick:()=>ek(),className:"w-full sm:w-auto",children:"Save auth mode"}),(0,a.jsx)(i.$n,{type:"button",variant:"outline",loading:X,onClick:eO,className:"w-full sm:w-auto",children:"Test connection"})]}),et.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===et.type?"text-red-500":"text-green-500"}`,children:et.message}),G.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===G.type?"text-red-500":"text-green-500"}`,children:G.message}),"oidc"===O.authMode&&(0,a.jsx)("p",{className:"text-xs sm:text-sm text-amber-600 dark:text-amber-400",children:"OIDC login is currently active. Password login is disabled until you switch back."}),"both"===O.authMode&&(0,a.jsx)("p",{className:"text-xs sm:text-sm text-amber-600 dark:text-amber-400",children:"Password and OIDC login are both active."})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-blue-500/10 text-blue-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"route"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Routing Strategy"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through accounts to distribute load"})]}),(0,a.jsx)(i.lM,{checked:"round-robin"===O.fallbackStrategy,onChange:()=>ew("round-robin"===O.fallbackStrategy?"fill-first":"round-robin"),disabled:U})]}),"round-robin"===O.fallbackStrategy&&(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Sticky Limit"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Calls per account before switching"})]}),(0,a.jsx)(i.pd,{type:"number",min:"1",max:"10",value:O.stickyRoundRobinLimit||3,onChange:e=>eN(e.target.value),disabled:U,className:"w-16 sm:w-20 text-center shrink-0"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4 pt-4 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Combo Round Robin"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Cycle through providers in combos instead of always starting with first"})]}),(0,a.jsx)(i.lM,{checked:"round-robin"===O.comboStrategy,onChange:()=>ev("round-robin"===O.comboStrategy?"fallback":"round-robin"),disabled:U})]}),"round-robin"===O.comboStrategy&&(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Combo Sticky Limit"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Calls per combo model before switching"})]}),(0,a.jsx)(i.pd,{type:"number",min:"1",max:"100",value:O.comboStickyRoundRobinLimit||1,onChange:e=>eC(e.target.value),disabled:U,className:"w-20 text-center"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted italic pt-2 border-t border-border/50",children:["round-robin"===O.fallbackStrategy?`Currently distributing requests across all available accounts with ${O.stickyRoundRobinLimit||3} calls per account.`:"Currently using accounts in priority order (Fill First).","round-robin"===O.comboStrategy?` Combos rotate after ${O.comboStickyRoundRobinLimit||1} call${1===(O.comboStickyRoundRobinLimit||1)?"":"s"} per model.`:" Combos always start with their first model."]})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-purple-500/10 text-purple-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"wifi"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Network"})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Outbound Proxy"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Enable proxy for OAuth + provider outbound requests."})]}),(0,a.jsx)(i.lM,{checked:!0===O.outboundProxyEnabled,onChange:()=>ey(!0!==O.outboundProxyEnabled),disabled:U||ex})]}),!0===O.outboundProxyEnabled&&(0,a.jsxs)("form",{onSubmit:eb,className:"flex flex-col gap-4 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Proxy URL"}),(0,a.jsx)(i.pd,{placeholder:"socks5://127.0.0.1:1080",value:en.outboundProxyUrl,onChange:e=>ed(t=>({...t,outboundProxyUrl:e.target.value})),disabled:U||ex}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Supports http, https, socks4, socks4a, socks5, and socks5h."})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Proxy Username"}),(0,a.jsx)(i.pd,{placeholder:"optional",value:en.outboundProxyUsername,onChange:e=>ed(t=>({...t,outboundProxyUsername:e.target.value})),disabled:U||ex})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Proxy Password"}),(0,a.jsx)(i.pd,{type:"password",placeholder:en.outboundProxySavedPassword?"saved (hidden)":"optional",value:en.outboundProxyPassword,onChange:e=>ed(t=>({...t,outboundProxyPassword:e.target.value})),disabled:U||ex})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 pt-2 border-t border-border/50",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Use Proxy For"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Default is direct. Checked targets use the proxy."})]}),(0,a.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-2",children:p.map(e=>{let t=new Set(en.outboundProxyTargets||[]),s=e.targets.every(e=>t.has(e));return(0,a.jsxs)("label",{className:(0,c.cn)("flex items-center gap-2 rounded-lg border px-3 py-2 text-sm cursor-pointer transition-colors",s?"border-primary bg-primary/5 text-text-main":"border-border bg-surface text-text-muted hover:border-primary/50"),children:[(0,a.jsx)("input",{type:"checkbox",checked:s,onChange:()=>{ed(t=>{let s=new Set(t.outboundProxyTargets||[]),a=e.targets.every(e=>s.has(e));for(let t of e.targets)a?s.delete(t):s.add(t);return{...t,outboundProxyTargets:Array.from(s)}})},disabled:U||ex,className:"h-4 w-4 accent-primary"}),(0,a.jsx)("span",{className:"truncate",children:e.label})]},e.id)})}),(0,a.jsx)("label",{className:"font-medium text-sm sm:text-base",children:"Custom Proxy Hosts"}),(0,a.jsx)(i.pd,{placeholder:"api.example.com,.example.org",value:en.outboundProxyCustomTargets,onChange:e=>ed(t=>({...t,outboundProxyCustomTargets:e.target.value})),disabled:U||ex})]}),(0,a.jsxs)("div",{className:"pt-2 border-t border-border/50 flex flex-col sm:flex-row items-stretch sm:items-center gap-2",children:[(0,a.jsx)(i.$n,{type:"button",variant:"secondary",loading:ep,disabled:U||ex,onClick:eg,className:"w-full sm:w-auto",children:"Test proxy URL"}),(0,a.jsx)(i.$n,{type:"submit",variant:"primary",loading:ex,className:"w-full sm:w-auto",children:"Apply"})]})]}),ec.message&&(0,a.jsx)("p",{className:`text-xs sm:text-sm ${"error"===ec.type?"text-red-500":"text-green-500"} pt-2 border-t border-border/50`,children:ec.message})]})]}),(0,a.jsxs)(i.Zp,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,a.jsx)("div",{className:"p-2 rounded-lg bg-orange-500/10 text-orange-500 shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"monitoring"})}),(0,a.jsx)("h3",{className:"text-base sm:text-lg font-semibold",children:"Observability"})]}),(0,a.jsxs)("div",{className:"flex items-start sm:items-center justify-between gap-4",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"font-medium text-sm sm:text-base",children:"Enable Observability"}),(0,a.jsx)("p",{className:"text-xs sm:text-sm text-text-muted",children:"Record request details for inspection in the logs view"})]}),(0,a.jsx)(i.lM,{checked:eA,onChange:eI,disabled:U})]})]}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-2",children:[(0,a.jsx)(i.$n,{variant:"outline",fullWidth:!0,icon:"power_settings_new",onClick:()=>P(!0),className:"text-red-500 border-red-200 hover:bg-red-50 hover:border-red-300",children:"Shutdown"}),(0,a.jsx)(i.$n,{variant:"outline",fullWidth:!0,icon:"logout",onClick:e$,children:"Logout"})]}),(0,a.jsxs)("div",{className:"text-center text-xs sm:text-sm text-text-muted py-4",children:[(0,a.jsxs)("p",{children:[m.vQ.name," v",m.vQ.version]}),(0,a.jsx)("p",{className:"mt-1",children:"Local Mode - All data stored on your machine"})]})]}),(0,a.jsx)(n.default,{hideTrigger:!0,isOpen:v,onClose:e=>{N(!1),w(e)}}),(0,a.jsx)(l.ConfirmModal,{isOpen:C,onClose:()=>P(!1),onConfirm:eD,title:"Close Proxy",message:"Are you sure you want to close the proxy server?",confirmText:"Close",cancelText:"Cancel",variant:"danger",loading:S}),(0,a.jsxs)(l.default,{isOpen:_.open,onClose:()=>H({open:!1,mode:"",password:""}),title:"Confirm Password",size:"sm",footer:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.$n,{variant:"ghost",onClick:()=>H({open:!1,mode:"",password:""}),disabled:E,children:"Cancel"}),(0,a.jsx)(i.$n,{variant:"primary",onClick:eR,loading:E,disabled:!_.password,children:"Confirm"})]}),children:[(0,a.jsxs)("p",{className:"text-text-muted mb-3 text-sm",children:["Enter your current password to ","export"===_.mode?"export":"import"," the database."]}),(0,a.jsx)(i.pd,{type:"password",value:_.password,onChange:e=>H(t=>({...t,password:e.target.value})),onKeyDown:e=>{"Enter"===e.key&&_.password&&eR()},placeholder:"Current password",autoFocus:!0})]})]})}},95747:(e,t,s)=>{Promise.resolve().then(s.bind(s,64561))}},e=>{e.O(0,[2574,3862,1051,1321,5497,8441,3794,7358],()=>e(e.s=95747)),_N_E=e.O()}]);
@@ -1,10 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2134],{29610:(e,t,s)=>{Promise.resolve().then(s.bind(s,79326))},79326:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>O});var a=s(95155),i=s(12115),l=s(73321),r=s(98500),n=s.n(r),o=s(5772),d=s(35497),c=s(52679),p=s(28777),m=s(11059),x=s(73006);let u=new Map;async function h(e){if(!e?.url||!e?.type)return[];let t=u.get(e.url);if(t&&Date.now()<t.expiresAt)return t.data;try{let t=new URLSearchParams({url:e.url,type:e.type}),s=await fetch(`/api/providers/suggested-models?${t}`);if(!s.ok)return[];let a=(await s.json()).data??[];return u.set(e.url,{data:a,expiresAt:Date.now()+6e5}),a}catch{return[]}}var f=s(14051),g=s.n(f);function y({model:e,fullModel:t,displayModel:s,alias:i,copied:l,onCopy:r,testStatus:n,isCustom:o,isFree:d,onDeleteAlias:c,onTest:p,isTesting:m,onDisable:x}){let u="ok"===n?"#22c55e":"error"===n?"#ef4444":void 0;return(0,a.jsx)("div",{className:`group min-w-0 max-w-full rounded-lg border px-3 py-2 ${"ok"===n?"border-green-500/40":"error"===n?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:(0,a.jsxs)("div",{className:"flex min-w-0 items-start gap-2 sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base",style:u?{color:u}:void 0,children:"ok"===n?"check_circle":"error"===n?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[(0,a.jsx)("code",{className:"max-w-[72vw] truncate rounded bg-sidebar px-1.5 py-0.5 font-mono text-xs text-text-muted sm:max-w-[360px]",children:s||t}),e.name&&(0,a.jsx)("span",{className:"truncate pl-1 text-[9px] italic text-text-muted/70",children:e.name})]}),p&&(0,a.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,a.jsx)("button",{onClick:p,disabled:m,className:`rounded p-0.5 text-text-muted transition-opacity hover:bg-sidebar hover:text-primary ${m?"opacity-100":"opacity-100 sm:opacity-0 sm:group-hover:opacity-100"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:m?{animation:"spin 1s linear infinite"}:void 0,children:m?"progress_activity":"science"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:m?"Testing...":"Test"})]}),(0,a.jsxs)("div",{className:"relative shrink-0 group/btn",children:[(0,a.jsx)("button",{onClick:()=>r(t,`model-${e.id}`),className:"rounded p-0.5 text-text-muted hover:bg-sidebar hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:l===`model-${e.id}`?"check":"content_copy"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute mt-1 top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:l===`model-${e.id}`?"Copied!":"Copy"})]}),o?(0,a.jsx)("button",{onClick:c,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Remove custom model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):x?(0,a.jsx)("button",{onClick:x,className:"ml-auto rounded p-0.5 text-text-muted opacity-100 transition-opacity hover:bg-red-500/10 hover:text-red-500 sm:opacity-0 sm:group-hover:opacity-100",title:"Disable this model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"close"})}):null]})})}function b({modelId:e,fullModel:t,copied:s,onCopy:i,onDeleteAlias:l,onTest:r,testStatus:n,isTesting:o}){let d="ok"===n?"#22c55e":"error"===n?"#ef4444":void 0;return(0,a.jsxs)("div",{className:`flex items-center gap-3 p-3 rounded-lg border ${"ok"===n?"border-green-500/40":"error"===n?"border-red-500/40":"border-border"} hover:bg-sidebar/50`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base text-text-muted",style:d?{color:d}:void 0,children:"ok"===n?"check_circle":"error"===n?"cancel":"smart_toy"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:e}),(0,a.jsxs)("div",{className:"flex items-center gap-1 mt-1",children:[(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono bg-sidebar px-1.5 py-0.5 rounded",children:t}),(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:()=>i(t,`model-${e}`),className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:s===`model-${e}`?"check":"content_copy"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:s===`model-${e}`?"Copied!":"Copy"})]}),r&&(0,a.jsxs)("div",{className:"relative group/btn",children:[(0,a.jsx)("button",{onClick:r,disabled:o,className:"p-0.5 hover:bg-sidebar rounded text-text-muted hover:text-primary transition-colors",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:o?{animation:"spin 1s linear infinite"}:void 0,children:o?"progress_activity":"science"})}),(0,a.jsx)("span",{className:"pointer-events-none absolute top-5 left-1/2 -translate-x-1/2 text-[10px] text-text-muted whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity",children:o?"Testing...":"Test"})]})]})]}),(0,a.jsx)("button",{onClick:l,className:"p-1 hover:bg-red-50 rounded text-red-500",title:"Remove model",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"delete"})})]})}function v({providerStorageAlias:e,providerDisplayAlias:t,modelAliases:s,copied:l,onCopy:r,onSetAlias:n,onDeleteAlias:o,connections:c,isAnthropic:p}){let[m,x]=(0,i.useState)(""),[u,h]=(0,i.useState)(!1),[f,g]=(0,i.useState)(!1),[y,j]=(0,i.useState)(null),[N,w]=(0,i.useState)({}),k=async t=>{if(!y){j(t);try{let s=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${e}/${t}`})}),a=await s.json();w(e=>({...e,[t]:a.ok?"ok":"error"}))}catch{w(e=>({...e,[t]:"error"}))}finally{j(null)}}},C=Object.entries(s).filter(([,t])=>t.startsWith(`${e}/`)).map(([t,s])=>({modelId:s.replace(`${e}/`,""),fullModel:s,alias:t})),S=a=>{let i,l=`${e}/${a}`;if(Object.values(s).includes(l))return null;let r=(i=a.split("/"))[i.length-1];if(!s[r])return r;let n=`${t}-${r}`;return s[n]?null:n},$=async()=>{if(!m.trim()||u)return;let t=m.trim(),s=S(t);if(!s)return void alert("All suggested aliases already exist. Please choose a different model or remove conflicting aliases.");h(!0);try{await n(t,s,e),x("")}catch(e){console.log("Error adding model:",e)}finally{h(!1)}},A=async()=>{if(f)return;let t=c.find(e=>!1!==e.isActive);if(t){g(!0);try{let s=await fetch(`/api/providers/${t.id}/models`),a=await s.json();if(!s.ok)return void alert(a.error||"Failed to import models");let i=a.models||[];if(0===i.length)return void alert("No models returned from /models.");let l=0;for(let t of i){let s=t.id||t.name||t.model;if(!s)continue;let a=S(s);a&&(await n(s,a,e),l+=1)}0===l&&alert("No new models were added.")}catch(e){console.log("Error importing models:",e)}finally{g(!1)}}},T=c.some(e=>!1!==e.isActive);return(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("p",{className:"text-sm text-text-muted",children:["Add ",p?"Anthropic":"OpenAI","-compatible models manually or import them from the /models endpoint."]}),(0,a.jsxs)("div",{className:"flex items-end gap-2 flex-wrap",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-[240px]",children:[(0,a.jsx)("label",{htmlFor:"new-compatible-model-input",className:"text-xs text-text-muted mb-1 block",children:"Model ID"}),(0,a.jsx)("input",{id:"new-compatible-model-input",type:"text",value:m,onChange:e=>x(e.target.value),onKeyDown:e=>"Enter"===e.key&&$(),placeholder:p?"claude-3-opus-20240229":"gpt-4o",className:"w-full px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary"})]}),(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:$,disabled:!m.trim()||u,children:u?"Adding...":"Add"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"download",onClick:A,disabled:!T||f,children:f?"Importing...":"Import from /models"})]}),!T&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Add a connection to enable importing models."}),C.length>0&&(0,a.jsx)("div",{className:"flex flex-col gap-3",children:C.map(({modelId:e,fullModel:s,alias:i})=>(0,a.jsx)(b,{modelId:e,fullModel:`${t}/${e}`,copied:l,onCopy:r,onDeleteAlias:()=>o(i),onTest:c.length>0?()=>k(e):void 0,testStatus:N[e],isTesting:y===e},s))})]})}function j({until:e}){let[t,s]=(0,i.useState)("");return((0,i.useEffect)(()=>{let t=()=>{let t=new Date(e).getTime()-Date.now();if(t<=0)return void s("");let a=Math.floor(t/1e3);if(a<60)s(`${a}s`);else if(a<3600)s(`${Math.floor(a/60)}m ${a%60}s`);else{let e=Math.floor(a/3600),t=Math.floor(a%3600/60);s(`${e}h ${t}m`)}};t();let a=setInterval(t,1e3);return()=>clearInterval(a)},[e]),t)?(0,a.jsxs)("span",{className:"text-xs text-orange-500 font-mono",children:["⏱ ",t]}):null}function N({connection:e,proxyPools:t,isOAuth:s,isFirst:l,isLast:r,onMoveUp:n,onMoveDown:o,onToggleActive:c,onUpdateProxy:p,onEdit:m,onDelete:x,oneByOneStatus:u=null}){let[h,f]=(0,i.useState)(!1),[g,y]=(0,i.useState)(!1),b=(0,i.useRef)(null),v=new Map((t||[]).map(e=>[e.id,e])),w=e.providerSpecificData?.proxyPoolId||null,k=w?v.get(w):null,C=e.providerSpecificData?.connectionProxyEnabled===!0&&!!e.providerSpecificData?.connectionProxyUrl,S=!!w||C,$=k?`Pool: ${k.name}`:w?`Pool: ${w} (inactive/missing)`:C?`Legacy: ${e.providerSpecificData?.connectionProxyUrl}`:"",A="";if(k?.proxyUrl||e.providerSpecificData?.connectionProxyUrl){let t=k?.proxyUrl||e.providerSpecificData?.connectionProxyUrl;try{let e=new URL(t);A=`${e.protocol}//${e.hostname}${e.port?`:${e.port}`:""}`}catch{A=t}}let T=k?.noProxy||e.providerSpecificData?.connectionNoProxy||"",O="default";k?.isActive===!0?O="success":(w||C)&&(O="error"),(0,i.useEffect)(()=>{if(!h)return;let e=e=>{b.current&&!b.current.contains(e.target)&&f(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[h]);let P=async e=>{y(!0);try{await p("__none__"===e?null:e)}finally{y(!1),f(!1)}},I=e.authType||(s?"oauth":"apikey"),E="oauth"===I,R="cookie"===I,_=e=>"string"==typeof e&&/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),U=E?_(e.email)?e.email:_(e.name)?e.name:e.name||e.email||e.displayName||"OAuth Account":e.name||e.email||e.displayName||"API Key",[D,z]=(0,i.useState)(!1),q=Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>!!e).sort()[0]||null;(0,i.useEffect)(()=>{let t=()=>{z(!!Object.entries(e).filter(([e])=>e.startsWith("modelLock_")).map(([,e])=>e).filter(e=>e&&new Date(e).getTime()>Date.now()).sort()[0])};t();let s=q?setInterval(t,1e3):null;return()=>{s&&clearInterval(s)}},[q]);let M="unavailable"!==e.testStatus||D?e.testStatus:"active",F=()=>u?"queued"===u.state?"queued":"testing"===u.state?"testing":"success"===u.state?"success":"failed"===u.state?u.error?`failed: ${u.error}`:"failed":null:null;return(0,a.jsxs)("div",{className:`group flex min-w-0 flex-col gap-3 rounded-lg p-2 transition-colors hover:bg-black/[0.02] dark:hover:bg-white/[0.02] sm:flex-row sm:items-center sm:justify-between ${!1===e.isActive?"opacity-60":""}`,children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2 sm:items-center sm:gap-3",children:[(0,a.jsxs)("div",{className:"flex shrink-0 flex-col",children:[(0,a.jsx)("button",{onClick:n,disabled:l,className:`p-0.5 rounded ${l?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_up"})}),(0,a.jsx)("button",{onClick:o,disabled:r,className:`p-0.5 rounded ${r?"text-text-muted/30 cursor-not-allowed":"hover:bg-sidebar text-text-muted hover:text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"keyboard_arrow_down"})})]}),(0,a.jsx)("span",{className:"material-symbols-outlined shrink-0 text-base text-text-muted",children:R?"cookie":E?"lock":"key"}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium truncate",children:U}),(0,a.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-1.5 sm:gap-2",children:[(0,a.jsx)(d.Ex,{variant:!1===e.isActive?"default":"active"===M||"success"===M?"success":"error"===M||"expired"===M||"unavailable"===M?"error":"default",size:"sm",dot:!0,children:!1===e.isActive?"disabled":M||"Unknown"}),(0,a.jsx)(d.Ex,{variant:"default",size:"sm",children:E?"OAuth":R?"Cookie":"API Key"}),S&&(0,a.jsx)(d.Ex,{variant:O,size:"sm",children:"Proxy"}),D&&!1!==e.isActive&&(0,a.jsx)(j,{until:q}),e.lastError&&!1!==e.isActive&&(0,a.jsx)("span",{className:"max-w-full truncate text-xs text-red-500 sm:max-w-[300px]",title:e.lastError,children:e.lastError}),(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["#",e.priority]}),e.globalPriority&&(0,a.jsxs)("span",{className:"text-xs text-text-muted",children:["Auto: ",e.globalPriority]}),F()&&(0,a.jsx)(d.Ex,{variant:u?"success"===u.state?"success":"failed"===u.state?"error":"testing"===u.state?"primary":"default":"default",size:"sm",children:F()})]}),S&&(0,a.jsxs)("div",{className:"mt-1 flex items-center gap-2 flex-wrap",children:[(0,a.jsx)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[420px]",title:$,children:$}),A&&(0,a.jsx)("code",{className:"max-w-full truncate rounded bg-black/5 px-1 py-0.5 font-mono text-[10px] text-text-muted dark:bg-white/5 sm:max-w-[260px]",children:A}),T&&(0,a.jsxs)("span",{className:"max-w-full truncate text-[11px] text-text-muted sm:max-w-[320px]",title:T,children:["no_proxy: ",T]})]})]})]}),(0,a.jsxs)("div",{className:"flex w-full items-center justify-between gap-2 sm:w-auto sm:justify-end",children:[(0,a.jsxs)("div",{className:"grid flex-1 grid-cols-3 gap-1 sm:flex sm:flex-none",children:[(t||[]).length>0&&(0,a.jsxs)("div",{className:"relative",ref:b,children:[(0,a.jsxs)("button",{onClick:()=>f(e=>!e),className:`flex w-full flex-col items-center rounded px-2 py-1 transition-colors hover:bg-black/5 dark:hover:bg-white/5 ${S?"text-primary":"text-text-muted hover:text-primary"}`,disabled:g,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:g?"progress_activity":"lan"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Proxy"})]}),h&&(0,a.jsxs)("div",{className:"absolute right-0 top-full z-50 mt-1 max-w-[78vw] min-w-[160px] rounded-lg border border-border bg-bg py-1 shadow-lg",children:[(0,a.jsx)("button",{onClick:()=>P("__none__"),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${!w?"text-primary font-medium":"text-text-main"}`,children:"None"}),(t||[]).map(e=>(0,a.jsx)("button",{onClick:()=>P(e.id),className:`w-full text-left px-3 py-1.5 text-sm hover:bg-black/5 dark:hover:bg-white/5 ${w===e.id?"text-primary font-medium":"text-text-main"}`,children:e.name},e.id))]})]}),(0,a.jsxs)("button",{onClick:m,className:"flex flex-col items-center rounded px-2 py-1 text-text-muted hover:bg-black/5 hover:text-primary dark:hover:bg-white/5",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Edit"})]}),(0,a.jsxs)("button",{onClick:x,className:"flex flex-col items-center rounded px-2 py-1 text-red-500 hover:bg-red-500/10",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"}),(0,a.jsx)("span",{className:"text-[10px] leading-tight",children:"Delete"})]})]}),(0,a.jsx)(d.lM,{size:"sm",checked:e.isActive??!0,onChange:c,title:e.isActive??!0?"Disable connection":"Enable connection"})]})]})}y.propTypes={model:g().shape({id:g().string.isRequired}).isRequired,fullModel:g().string.isRequired,displayModel:g().string,alias:g().string,copied:g().string,onCopy:g().func.isRequired,testStatus:g().oneOf(["ok","error"]),isCustom:g().bool,isFree:g().bool,onDeleteAlias:g().func,onTest:g().func,isTesting:g().bool,onDisable:g().func},g().string.isRequired,g().string.isRequired,g().string,g().func.isRequired,g().func.isRequired,g().func,g().oneOf(["ok","error"]),g().bool,g().string.isRequired,g().object.isRequired,g().string,g().func.isRequired,g().func.isRequired,g().func.isRequired,v.propTypes={providerStorageAlias:g().string.isRequired,providerDisplayAlias:g().string.isRequired,modelAliases:g().object.isRequired,copied:g().string,onCopy:g().func.isRequired,onSetAlias:g().func.isRequired,onDeleteAlias:g().func.isRequired,connections:g().arrayOf(g().shape({id:g().string,isActive:g().bool})).isRequired,isAnthropic:g().bool},j.propTypes={until:g().string.isRequired},N.propTypes={connection:g().shape({id:g().string,name:g().string,email:g().string,displayName:g().string,modelLockUntil:g().string,testStatus:g().string,isActive:g().bool,lastError:g().string,priority:g().number,globalPriority:g().number}).isRequired,proxyPools:g().arrayOf(g().shape({id:g().string,name:g().string,proxyUrl:g().string,noProxy:g().string,isActive:g().bool})),isOAuth:g().bool.isRequired,isFirst:g().bool.isRequired,isLast:g().bool.isRequired,onMoveUp:g().func.isRequired,onMoveDown:g().func.isRequired,onToggleActive:g().func.isRequired,onUpdateProxy:g().func,onEdit:g().func.isRequired,onDelete:g().func.isRequired,oneByOneStatus:g().shape({state:g().string,error:g().string})};let w=`Production|sk-...
2
- Backup|sk-...
3
- sk-...`;function k({isOpen:e,provider:t,providerName:s,isCompatible:l,isAnthropic:r,authType:n,authHint:o,website:p,proxyPools:m,onSave:x,onBulkDone:u,onClose:h}){let f="__none__",g="ollama-local"===t,y="cookie"===n,b="xai"===t&&!y,v=y?"Cookie Value":"API Key",j=y?"grok-web"===t?"sso=xxxxx... or just the raw value":"eyJhbGciOi...":b?"xai-...":"",N="azure"===t,C="cloudflare-ai"===t,S=c.Q2?.[t]?.regions||null,$=c.Q2?.[t]?.defaultRegion||S?.[0]?.id||"",[A,T]=(0,i.useState)({name:"",apiKey:"",priority:1,proxyPoolId:f,ollamaHostUrl:""}),[O,P]=(0,i.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[I,E]=(0,i.useState)({accountId:""}),[R,_]=(0,i.useState)($),[U,D]=(0,i.useState)(!1),[z,q]=(0,i.useState)(null),[M,F]=(0,i.useState)(!1),[J,K]=(0,i.useState)("single"),[L,W]=(0,i.useState)(""),[B,H]=(0,i.useState)(null),V=g?"Ollama Local":y?`${s||t} Cookie`:"Production Key";(0,i.useEffect)(()=>{e&&(T({name:l?V:"",apiKey:"",priority:1,proxyPoolId:f,ollamaHostUrl:""}),P({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),E({accountId:""}),D(!1),q(null),F(!1),K("single"),W(""),H(null))},[V,l,e]);let G=()=>g&&A.ollamaHostUrl.trim()?{baseUrl:A.ollamaHostUrl.trim()}:N?{azureEndpoint:O.azureEndpoint,apiVersion:O.apiVersion,deployment:O.deployment,organization:O.organization}:C?{accountId:I.accountId}:S&&R?{region:R}:void 0,Q=async()=>{D(!0);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:A.apiKey,providerSpecificData:G()})}),s=await e.json();q(s.valid?"success":"failed")}catch{q("failed")}finally{D(!1)}},Z=async()=>{if(!t||!g&&!A.apiKey)return;let e=A.name.trim()||V;F(!0);try{let s=!1;try{D(!0),q(null);let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:A.apiKey,providerSpecificData:G()})});s=!!(await e.json()).valid,q(s?"success":"failed")}catch{q("failed")}finally{D(!1)}await x({name:e,apiKey:A.apiKey,priority:A.priority,proxyPoolId:A.proxyPoolId===f?null:A.proxyPoolId,testStatus:s?"active":"unknown",providerSpecificData:G()})}finally{F(!1)}},X=async()=>{let e=L.split("\n").map(e=>e.trim()).filter(Boolean);if(!e.length)return;F(!0),H(null);let s=0,a=0;for(let i=0;i<e.length;i++){let l=e[i].split("|"),r=l.length>=2?l.slice(1).join("|").trim():l[0].trim(),n=l.length>=2?l[0].trim():"Key",o=`${n} ${i+1}`;try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t,apiKey:r,name:o,priority:1,testStatus:"unknown"})})).ok?s++:a++}catch{a++}}F(!1),H({success:s,failed:a}),s>0&&u&&u()};return t?(0,a.jsx)(d.aF,{isOpen:e,title:`Add ${s||t} ${v}`,onClose:h,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{size:"sm",variant:"single"===J?"primary":"ghost",onClick:()=>{K("single"),H(null)},children:"Single"}),(0,a.jsx)(d.$n,{size:"sm",variant:"bulk"===J?"primary":"ghost",onClick:()=>{K("bulk"),H(null)},children:"Bulk Add"})]}),"bulk"===J&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["One key per line. Format: ",(0,a.jsx)("code",{children:"name|apiKey"})," or just ",(0,a.jsx)("code",{children:"apiKey"})," (auto-named by index)."]}),(0,a.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[140px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:w,value:L,onChange:e=>W(e.target.value)}),B&&(0,a.jsxs)("div",{className:`text-sm font-medium ${B.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",B.success," added",B.failed>0?`, ✗ ${B.failed} failed`:""]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:X,fullWidth:!0,disabled:M||!L.trim(),children:M?"Adding...":"Add All Keys"}),(0,a.jsx)(d.$n,{onClick:h,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"single"===J&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.pd,{label:"Name",value:A.name,onChange:e=>T({...A,name:e.target.value}),placeholder:V}),g&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:"Ollama Host URL",value:A.ollamaHostUrl,onChange:e=>T({...A,ollamaHostUrl:e.target.value}),placeholder:"http://localhost:11434",className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:Q,disabled:U||M,variant:"secondary",children:U?"Checking...":"Check"})})]}),!g&&(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:v,type:y?"text":"password",value:A.apiKey,onChange:e=>T({...A,apiKey:e.target.value}),placeholder:j,className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:Q,disabled:!A.apiKey||U||M,variant:"secondary",children:U?"Checking...":"Check"})})]}),b&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Use a direct xAI API key from console.x.ai. This is separate from Grok Build OAuth."}),y&&o&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:[o,p&&(0,a.jsxs)(a.Fragment,{children:[" ",(0,a.jsxs)("a",{href:p,target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:["Open ",p.replace(/^https?:\/\//,"")]})]})]}),S&&(0,a.jsx)(d.l6,{label:"Region",value:R,onChange:e=>_(e.target.value),options:S.map(e=>({value:e.id,label:e.label}))}),l&&(0,a.jsx)(d.pd,{label:"Default Model",value:A.defaultModel,onChange:e=>T({...A,defaultModel:e.target.value}),placeholder:r?"claude-3-5-sonnet-latest":"gpt-4o-mini"}),g&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Leave blank to use ",(0,a.jsx)("code",{children:"http://localhost:11434"}),". For remote Ollama, enter the full host URL (e.g. ",(0,a.jsx)("code",{children:"http://192.168.1.10:11434"}),")."]}),z&&(0,a.jsx)(d.Ex,{variant:"success"===z?"success":"error",children:"success"===z?"Valid":"Invalid"}),l&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:r?`Validation checks ${s||"Anthropic Compatible"} by verifying the API key.`:`Validation checks ${s||"OpenAI Compatible"} via /models on your base URL.`}),C&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Cloudflare Workers AI"}),(0,a.jsx)(d.pd,{label:"Account ID",value:I.accountId,onChange:e=>E({...I,accountId:e.target.value}),placeholder:"abc123def456..."}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-2",children:["Find your Account ID in the right sidebar of ",(0,a.jsx)("a",{href:"https://dash.cloudflare.com",target:"_blank",rel:"noopener noreferrer",className:"text-primary underline",children:"dash.cloudflare.com"})]})]}),N&&(0,a.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,a.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)(d.pd,{label:"Azure Endpoint",value:O.azureEndpoint,onChange:e=>P({...O,azureEndpoint:e.target.value}),placeholder:"https://your-resource.openai.azure.com"}),(0,a.jsx)(d.pd,{label:"Deployment Name",value:O.deployment,onChange:e=>P({...O,deployment:e.target.value}),placeholder:"gpt-4"}),(0,a.jsx)(d.pd,{label:"API Version",value:O.apiVersion,onChange:e=>P({...O,apiVersion:e.target.value}),placeholder:"2024-10-01-preview"}),(0,a.jsx)(d.pd,{label:"Organization",value:O.organization,onChange:e=>P({...O,organization:e.target.value}),placeholder:"Organization ID"})]})]}),(0,a.jsx)(d.pd,{label:"Priority",type:"number",value:A.priority,onChange:e=>T({...A,priority:Number.parseInt(e.target.value)||1})}),(0,a.jsx)(d.l6,{label:"Proxy Pool",value:A.proxyPoolId,onChange:e=>T({...A,proxyPoolId:e.target.value}),options:[{value:f,label:"None"},...(m||[]).map(e=>({value:e.id,label:e.name}))],placeholder:"None"}),0===(m||[]).length&&(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"No active proxy pools available. Create one in Proxy Pools page first."}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Legacy manual proxy fields are still accepted by API for backward compatibility."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:Z,fullWidth:!0,disabled:M||!g&&!A.apiKey||N&&(!O.azureEndpoint||!O.deployment||!O.organization)||C&&!I.accountId,children:M?"Saving...":"Save"}),(0,a.jsx)(d.$n,{onClick:h,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})}):null}function C({isOpen:e,node:t,onSave:s,onClose:l,isAnthropic:r}){let[n,o]=(0,i.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[c,p]=(0,i.useState)(!1),[m,x]=(0,i.useState)(""),[u,h]=(0,i.useState)(""),[f,g]=(0,i.useState)(!1),[y,b]=(0,i.useState)(null);(0,i.useEffect)(()=>{t&&o({name:t.name||"",prefix:t.prefix||"",apiType:t.apiType||"chat",baseUrl:t.baseUrl||(r?"https://api.anthropic.com/v1":"https://api.openai.com/v1")})},[t,r]);let v=async()=>{if(n.name.trim()&&n.prefix.trim()&&n.baseUrl.trim()){p(!0);try{let e={name:n.name,prefix:n.prefix,baseUrl:n.baseUrl};r||(e.apiType=n.apiType),await s(e)}finally{p(!1)}}},j=async()=>{g(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:n.baseUrl,apiKey:m,type:r?"anthropic-compatible":"openai-compatible",modelId:u.trim()||void 0})}),t=await e.json();b(t.valid?"success":"failed")}catch{b("failed")}finally{g(!1)}};return t?(0,a.jsx)(d.aF,{isOpen:e,title:`Edit ${r?"Anthropic":"OpenAI"} Compatible`,onClose:l,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(d.pd,{label:"Name",value:n.name,onChange:e=>o({...n,name:e.target.value}),placeholder:`${r?"Anthropic":"OpenAI"} Compatible (Prod)`,hint:"Required. A friendly label for this node."}),(0,a.jsx)(d.pd,{label:"Prefix",value:n.prefix,onChange:e=>o({...n,prefix:e.target.value}),placeholder:r?"ac-prod":"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),!r&&(0,a.jsx)(d.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:n.apiType,onChange:e=>o({...n,apiType:e.target.value})}),(0,a.jsx)(d.pd,{label:"Base URL",value:n.baseUrl,onChange:e=>o({...n,baseUrl:e.target.value}),placeholder:r?"https://api.anthropic.com/v1":"https://api.openai.com/v1",hint:`Use the base URL (ending in /v1) for your ${r?"Anthropic":"OpenAI"}-compatible API.`}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.pd,{label:"API Key (for Check)",type:"password",value:m,onChange:e=>x(e.target.value),className:"flex-1"}),(0,a.jsx)("div",{className:"pt-6",children:(0,a.jsx)(d.$n,{onClick:j,disabled:!m||f||!n.baseUrl.trim(),variant:"secondary",children:f?"Checking...":"Check"})})]}),(0,a.jsx)(d.pd,{label:"Model ID (optional)",value:u,onChange:e=>h(e.target.value),placeholder:"e.g. my-model-id",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),y&&(0,a.jsx)(d.Ex,{variant:"success"===y?"success":"error",children:"success"===y?"Valid":"Invalid"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:v,fullWidth:!0,disabled:!n.name.trim()||!n.prefix.trim()||!n.baseUrl.trim()||c,children:c?"Saving...":"Save"}),(0,a.jsx)(d.$n,{onClick:l,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}function S({isOpen:e,providerAlias:t,providerDisplayAlias:s,onSave:l,onClose:r}){var n;let o,[c,p]=(0,i.useState)(""),[m,x]=(0,i.useState)(null),[u,h]=(0,i.useState)(""),[f,g]=(0,i.useState)(!1);(0,i.useEffect)(()=>{e&&(p(""),x(null),h(""),g(!1))},[e]);let y=(n=c.trim(),o=`${t}/`,n.startsWith(o)?n.slice(o.length):n),b=async()=>{if(y){x("testing"),h("");try{let e=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${t}/${y}`})}),s=await e.json();x(s.ok?"ok":"error"),h(s.error||"")}catch(e){x("error"),h(e.message)}}},v=async()=>{if(y&&!f){g(!0);try{await l(y)}finally{g(!1)}}};return(0,a.jsx)(d.aF,{isOpen:e,onClose:r,title:"Add Custom Model",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Model ID"}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("input",{type:"text",value:c,onChange:e=>{p(e.target.value),x(null),h("")},onKeyDown:e=>{"Enter"===e.key&&b()},placeholder:"e.g. claude-opus-4-5",className:"flex-1 px-3 py-2 text-sm border border-border rounded-lg bg-background focus:outline-none focus:border-primary",autoFocus:!0}),(0,a.jsx)(d.$n,{type:"button",variant:"secondary",icon:"science",loading:"testing"===m,onClick:b,disabled:!y||"testing"===m,children:"testing"===m?"Testing...":"Test"})]}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Sent to provider as: ",(0,a.jsx)("code",{className:"font-mono bg-sidebar px-1 rounded",children:y||"model-id"})]})]}),"ok"===m&&(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base",children:"check_circle"}),"Model is reachable"]}),"error"===m&&(0,a.jsxs)("div",{className:"flex items-start gap-2 text-sm text-red-500",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-base shrink-0",children:"cancel"}),(0,a.jsx)("span",{children:u||"Model not reachable"})]}),(0,a.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,a.jsx)(d.$n,{type:"button",onClick:r,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,a.jsx)(d.$n,{type:"button",onClick:v,fullWidth:!0,size:"sm",disabled:!y||f,children:f?"Adding...":"Add Model"})]})]})})}function $({isOpen:e,onClose:t,onSuccess:s}){let[l,r]=(0,i.useState)([]),[n,o]=(0,i.useState)(""),[c,p]=(0,i.useState)(!1),[m,x]=(0,i.useState)(null),[u,h]=(0,i.useState)(null),f=()=>{r([]),o(""),x(null),h(null),t()},g=async()=>{p(!0),x(null),h(null);try{let e=await Promise.all(l.map(async e=>({filename:e.name,jsonText:await e.text()}))),t=n.trim()?[{filename:"pasted JSON",jsonText:n.trim()}]:[],a=[...e,...t];if(0===a.length)throw Error("Select JSON files or paste JSON first");let i=await fetch("/api/oauth/codex/import-batch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({items:a})}),r=await i.json();if(!i.ok)throw Error(r.error||"Failed to import accounts");x(r),r.imported?.length>0&&s?.()}catch(e){h(e.message||"Failed to import accounts")}finally{p(!1)}},y=m?.imported?.length||0,b=m?.skipped?.length||0;return(0,a.jsx)(d.aF,{isOpen:e,title:"Import Codex Accounts",onClose:f,size:"lg",children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"rounded-lg border border-border bg-surface/50 p-3",children:[(0,a.jsx)("label",{className:"mb-2 block text-sm font-medium",children:"JSON files"}),(0,a.jsx)("input",{type:"file",accept:".json,application/json",multiple:!0,onChange:e=>r(Array.from(e.target.files||[])),className:"block w-full text-sm text-text-muted file:mr-3 file:rounded-md file:border-0 file:bg-primary file:px-3 file:py-1.5 file:text-sm file:font-medium file:text-white hover:file:bg-primary/90"}),l.length>0&&(0,a.jsx)("div",{className:"mt-2 flex flex-wrap gap-1.5",children:l.map(e=>(0,a.jsx)("span",{className:"rounded bg-primary/10 px-2 py-0.5 text-xs text-primary",children:e.name},`${e.name}-${e.size}`))})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{className:"mb-2 block text-sm font-medium",children:"Paste JSON"}),(0,a.jsx)("textarea",{value:n,onChange:e=>o(e.target.value),placeholder:'[{ "type": "codex", "access_token": "...", "refresh_token": "..." }]',className:"h-36 w-full resize-none rounded-md border border-black/10 bg-white px-3 py-2 font-mono text-xs text-text-main shadow-inner transition-all placeholder-text-muted/60 focus:border-primary/50 focus:outline-none focus:ring-1 focus:ring-primary/30 dark:border-white/10 dark:bg-white/5"})]}),(0,a.jsx)("div",{className:"rounded-lg border border-border bg-background/60 px-3 py-2 text-xs text-text-muted",children:"Auto-detects Codex Session JSON, CLI Proxy API Auth JSON, and Sub2API JSON."}),u&&(0,a.jsx)("div",{className:"rounded-lg border border-red-500/30 bg-red-500/10 px-3 py-2 text-sm text-red-600",children:u}),m&&(0,a.jsxs)("div",{className:"rounded-lg border border-border bg-surface/40 p-3",children:[(0,a.jsxs)("div",{className:"mb-2 flex flex-wrap items-center gap-2 text-sm",children:[(0,a.jsxs)("span",{className:"font-medium text-green-600",children:[y," imported"]}),b>0&&(0,a.jsxs)("span",{className:"text-text-muted",children:[b," skipped"]})]}),m.imported?.length>0&&(0,a.jsx)("div",{className:"max-h-32 overflow-auto rounded border border-border/70",children:m.imported.map(e=>(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 border-b border-border/70 px-2 py-1.5 last:border-b-0",children:[(0,a.jsx)("span",{className:"min-w-0 truncate text-xs",children:e.email||e.displayName||e.name||e.id}),(0,a.jsx)("span",{className:"shrink-0 text-xs text-text-muted",children:e.sourceFormat})]},e.id))}),m.skipped?.length>0&&(0,a.jsx)("div",{className:"mt-2 max-h-28 overflow-auto rounded border border-border/70",children:m.skipped.map((e,t)=>(0,a.jsxs)("div",{className:"border-b border-border/70 px-2 py-1.5 text-xs last:border-b-0",children:[(0,a.jsx)("span",{className:"font-medium",children:e.filename}),(0,a.jsxs)("span",{className:"text-text-muted",children:[" \xb7 ",e.reason]})]},`${e.filename}-${t}`))})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:g,loading:c,disabled:c||!l.length&&!n.trim(),fullWidth:!0,children:"Import"}),(0,a.jsx)(d.$n,{onClick:f,variant:"ghost",fullWidth:!0,children:"Close"})]})]})})}k.propTypes={isOpen:g().bool.isRequired,provider:g().string,providerName:g().string,isCompatible:g().bool,isAnthropic:g().bool,authType:g().string,authHint:g().string,website:g().string,proxyPools:g().arrayOf(g().shape({id:g().string,name:g().string})),onSave:g().func.isRequired,onBulkDone:g().func,onClose:g().func.isRequired},C.propTypes={isOpen:g().bool.isRequired,node:g().shape({id:g().string,name:g().string,prefix:g().string,apiType:g().string,baseUrl:g().string}),onSave:g().func.isRequired,onClose:g().func.isRequired,isAnthropic:g().bool},S.propTypes={isOpen:g().bool.isRequired,providerAlias:g().string.isRequired,providerDisplayAlias:g().string.isRequired,onSave:g().func.isRequired,onClose:g().func.isRequired},$.propTypes={isOpen:g().bool.isRequired,onClose:g().func.isRequired,onSuccess:g().func};let A=`[
4
- {
5
- "accessToken": "eyJhbGc...",
6
- "refreshToken": "rt_...",
7
- "idToken": "eyJhbGc...",
8
- "email": "user@example.com"
9
- }
10
- ]`;function T({isOpen:e,onClose:t,onSuccess:s}){let[l,r]=(0,i.useState)(""),[n,o]=(0,i.useState)(!1),[c,p]=(0,i.useState)(""),[m,u]=(0,i.useState)(null),h=()=>{n||(r(""),p(""),u(null),t())},f=async()=>{var e;let t;p(""),u(null);let a=l.trim();if(!a)return;try{t=JSON.parse(a)}catch(e){p(`${(0,x.Tl)("Invalid JSON")}: ${e.message}`);return}let i=Array.isArray(e=t)?e:e&&"object"==typeof e?Array.isArray(e.accounts)?e.accounts:[e]:null;if(!i||0===i.length)return void p((0,x.Tl)("No accounts found in input"));o(!0);try{let e=await fetch("/api/oauth/codex/bulk-import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accounts:i})}),t=await e.json();if(!e.ok)return void p(t?.error||`Request failed: ${e.status}`);u(t),t.success>0&&"function"==typeof s&&s()}catch(e){p(e.message||(0,x.Tl)("Request failed"))}finally{o(!1)}},g=m?.results?.filter(e=>!e.ok)||[];return(0,a.jsx)(d.aF,{isOpen:e,title:(0,x.Tl)("Bulk Add Codex Accounts"),onClose:h,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted",children:(0,x.Tl)("Paste an array of codex account JSON objects. Each must include accessToken (and ideally refreshToken, idToken).")}),(0,a.jsx)("textarea",{className:"w-full rounded border border-accent/30 bg-sidebar p-2 text-sm font-mono resize-y min-h-[240px] focus:outline-none focus:ring-1 focus:ring-primary",placeholder:A,value:l,onChange:e=>r(e.target.value),disabled:n}),c&&(0,a.jsx)("p",{className:"text-xs text-red-500 break-words",children:c}),m&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:`text-sm font-medium ${m.failed>0?"text-yellow-400":"text-green-400"}`,children:["✓ ",m.success," ",(0,x.Tl)("added"),m.failed>0?`, ✗ ${m.failed} ${(0,x.Tl)("failed")}`:""]}),g.length>0&&(0,a.jsx)("ul",{className:"rounded border border-accent/20 bg-sidebar/50 p-2 text-xs font-mono max-h-40 overflow-y-auto",children:g.map(e=>(0,a.jsxs)("li",{className:"text-red-400",children:["[",e.index,"] ",e.error]},e.index))})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(d.$n,{onClick:f,fullWidth:!0,disabled:n||!l.trim(),children:n?(0,x.Tl)("Importing..."):(0,x.Tl)("Import All")}),(0,a.jsx)(d.$n,{onClick:h,variant:"ghost",fullWidth:!0,disabled:n,children:(0,x.Tl)("Close")})]})]})})}function O(){let e,t=(0,l.useParams)(),s=(0,l.useRouter)(),r=t.id,[u,f]=(0,i.useState)([]),[g,b]=(0,i.useState)(!0),[j,w]=(0,i.useState)(null),[A,O]=(0,i.useState)([]),[P,I]=(0,i.useState)(!1),[E,R]=(0,i.useState)(!1),[_,U]=(0,i.useState)(!1),[D,z]=(0,i.useState)(!1),[q,M]=(0,i.useState)(null),[F,J]=(0,i.useState)(!1),[K,L]=(0,i.useState)(!1),[W,B]=(0,i.useState)(!1),[H,V]=(0,i.useState)(!1),[G,Q]=(0,i.useState)(!1),[Z,X]=(0,i.useState)(null),[Y,ee]=(0,i.useState)({}),[et,es]=(0,i.useState)(!1),[ea,ei]=(0,i.useState)({}),[el,er]=(0,i.useState)(""),[en,eo]=(0,i.useState)(null),[ed,ec]=(0,i.useState)(!1),[ep,em]=(0,i.useState)([]),[ex,eu]=(0,i.useState)("__none__"),[eh,ef]=(0,i.useState)(!1),[eg,ey]=(0,i.useState)(null),[eb,ev]=(0,i.useState)(""),[ej,eN]=(0,i.useState)("auto"),[ew,ek]=(0,i.useState)(!1),[eC,eS]=(0,i.useState)(!1),[e$,eA]=(0,i.useState)("super_admin"),[eT,eO]=(0,i.useState)([]),[eP,eI]=(0,i.useState)([]),[eE,eR]=(0,i.useState)([]),[e_,eU]=(0,i.useState)(null),[eD,ez]=(0,i.useState)(!1),[eq,eM]=(0,i.useState)(!1),[eF,eJ]=(0,i.useState)(!1),[eK,eL]=(0,i.useState)(null),[eW,eB]=(0,i.useState)({}),[eH,eV]=(0,i.useState)(null),eG=(0,i.useRef)(!1),[eQ,eZ]=(0,i.useState)(!1),{copied:eX,copy:eY}=(0,m.C)(),e0="ag_risk_confirmed",e1=()=>{I(!0)},e2=()=>{"antigravity"===r&&"true"!==window.localStorage.getItem(e0)?ez(!0):e7?e1():J(!0)},e5=()=>{J(!0)},e3=()=>{e7?e2():e5()},e4=j?{id:j.id,name:j.name||("anthropic-compatible"===j.type?"Anthropic Compatible":"OpenAI Compatible"),color:"anthropic-compatible"===j.type?"#D97757":"#10A37F",textIcon:"anthropic-compatible"===j.type?"AC":"OC",apiType:j.apiType,baseUrl:j.baseUrl,type:j.type}:c.zN[r]||c.fg[r]||c.IS[r]||c.nJ[r]||c.br[r],e6=e4?.authModes||[],e7=!!c.zN[r]||!!c.IS[r]||e6.includes("oauth"),e9=!!c.fg[r]||e6.includes("apikey"),e8=!!c.IS[r]?.noAuth,te=(0,p.KC)(r),tt=(0,c.wG)(r),ts=(0,c.mq)(r),ta=(0,c.gb)(r),ti=ts||ta,tl=!ti&&e7&&e9,tr="xai"===r?"Grok Build OAuth":"OAuth",tn="xai"===r?"xAI API Key":"API Key",to=c.Q2[r]?.thinkingConfig||c.s9.extended,td=ti?r:tt,tc=ti?j?.prefix||r:tt,tp="codex"===r,tm=(to?.options||[]).map(e=>({value:e,label:"auto"===e?"codex"===r?"Auto (Medium)":"Auto":"xhigh"===e?"XHigh":e.charAt(0).toUpperCase()+e.slice(1)})),tx=(0,i.useCallback)(async()=>{try{let e=await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(td)}`,{cache:"no-store"}),t=await e.json();e.ok&&eR(t.ids||[])}catch(e){console.log("Error fetching disabled models:",e)}},[td]),tu=async e=>{try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:td,ids:[e]})})).ok&&await tx()}catch(e){console.log("Error disabling model:",e)}},th=async e=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(td)}&id=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await tx()}catch(e){console.log("Error enabling model:",e)}},tf=async e=>{e.length&&eU({title:"Disable All Models",message:`Disable all ${e.length} model(s)?`,onConfirm:async()=>{eU(null);try{(await fetch("/api/models/disabled",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerAlias:td,ids:e})})).ok&&await tx()}catch(e){console.log("Error disabling all models:",e)}}})},tg=async()=>{try{(await fetch(`/api/models/disabled?providerAlias=${encodeURIComponent(td)}`,{method:"DELETE"})).ok&&await tx()}catch(e){console.log("Error enabling all models:",e)}},ty=(0,i.useCallback)(async()=>{try{let e=await fetch("/api/models/alias"),t=await e.json();e.ok&&ee(t.aliases||{})}catch(e){console.log("Error fetching aliases:",e)}},[]);(0,i.useEffect)(()=>{"kilocode"===r&&fetch("/api/providers/kilo/free-models").then(e=>e.json()).then(e=>{e.models?.length&&eI(e.models)}).catch(()=>{})},[r]);let tb=(0,i.useCallback)(async()=>{try{let[e,t,s,a,i]=await Promise.all([fetch("/api/providers",{cache:"no-store"}),fetch("/api/provider-nodes",{cache:"no-store"}),fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}),fetch("/api/settings",{cache:"no-store"}),fetch("/api/auth/me",{cache:"no-store"})]),l=await e.json(),n=await t.json(),o=await s.json(),d=a.ok?await a.json():{},c=i.ok?await i.json():{};if(e.ok){let e=(l.connections||[]).filter(e=>e.provider===r);f(e)}s.ok&&O(o.proxyPools||[]);let p=(d.providerStrategies||{})[r]||{};ey(p.fallbackStrategy||null),ev(null!=p.stickyRoundRobinLimit?String(p.stickyRoundRobinLimit):"1");let m=(d.providerThinking||{})[r]||{},x=c.providerThinkingScopeKey||c.userId||"super_admin",u="sub_user"===c.role?(c.providerThinking||{})[r]||{}:(d.userProviderThinking||{})[x]?.[r]||{};if(eN(m.mode||"auto"),ek(!0===m.fastMode),eA(x),eS(Object.prototype.hasOwnProperty.call(u,"fastMode")?!0===u.fastMode:!0===m.fastMode),t.ok){let e=(n.nodes||[]).find(e=>e.id===r)||null;if(!e&&ti)for(let t=0;t<3;t+=1){await new Promise(e=>setTimeout(e,150));let t=await fetch("/api/provider-nodes",{cache:"no-store"});if(t.ok&&(e=((await t.json()).nodes||[]).find(e=>e.id===r)||null))break}w(e)}}catch(e){console.log("Error fetching connections:",e)}finally{b(!1)}},[r,ti]),tv=async e=>{try{let t=await fetch(`/api/provider-nodes/${r}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json();t.ok&&(w(s.node),await tb(),V(!1))}catch(e){console.log("Error updating provider node:",e)}},tj=async(e,t)=>{try{let s=await fetch("/api/settings",{cache:"no-store"}),a=(s.ok?await s.json():{}).providerStrategies||{},i={};e&&(i.fallbackStrategy=e),"round-robin"===e&&""!==t&&(i.stickyRoundRobinLimit=Number(t)||3);let l={...a};0===Object.keys(i).length?delete l[r]:l[r]=i,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:l})})}catch(e){console.log("Error saving provider strategy:",e)}},tN=async(e,t=ew)=>{try{let s=await fetch("/api/settings",{cache:"no-store"}),a={...(s.ok?await s.json():{}).providerThinking||{}},i={};e&&"auto"!==e&&(i.mode=e),"codex"===r&&!0===t&&(i.fastMode=!0),0===Object.keys(i).length?delete a[r]:a[r]=i,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerThinking:a})})}catch(e){console.log("Error saving thinking config:",e)}},tw=async e=>{try{let t=await fetch("/api/settings",{cache:"no-store"}),s=(t.ok?await t.json():{}).userProviderThinking||{},a=e$||"super_admin",i=s[a]||{},l=i[r]||{},n={...s,[a]:{...i,[r]:{...l,fastMode:e}}};await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({userProviderThinking:n})})}catch(e){console.log("Error saving account fast mode:",e)}};(0,i.useEffect)(()=>{(async()=>{await Promise.all([tb(),ty(),tx()])})()},[tb,ty,tx]),(0,i.useEffect)(()=>{let e=(c.zN[r]||c.fg[r]||c.IS[r]||c.nJ[r])?.modelsFetcher;e&&h(e).then(eO)},[r]);let tk=async(e,t,s=tt)=>{let a=`${s}/${e}`;try{let e=await fetch("/api/models/alias",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:a,alias:t})});if(e.ok)await ty();else{let t=await e.json();alert(t.error||"Failed to set alias")}}catch(e){console.log("Error setting alias:",e)}},tC=async e=>{try{(await fetch(`/api/models/alias?alias=${encodeURIComponent(e)}`,{method:"DELETE"})).ok&&await ty()}catch(e){console.log("Error deleting alias:",e)}},tS=async()=>{if(eQ)return;let e=u.find(e=>!1!==e.isActive);if(!e)return void alert((0,x.Tl)("Please add an active Qoder connection first"));eZ(!0);try{let t=await fetch(`/api/providers/${e.id}/models`),s=await t.json();if(!t.ok)return void alert(s.error||(0,x.Tl)("Failed to fetch models"));let a=s.models||[];if(0===a.length)return void alert((0,x.Tl)("No models returned"));let i=0;for(let e of a){let t=e.id||e.name;if(!t)continue;let s=t.replace(/^qoder\//,""),a=`${td}/${s}`;!Object.values(Y).includes(a)&&(Y[s]||(await tk(s,s,td),i+=1))}0===i?alert((0,x.Tl)("All models already exist, no new models added")):alert((0,x.Tl)("Successfully added")+` ${i} `+(0,x.Tl)("models"))}catch(e){console.log("Error importing Qoder models:",e),alert((0,x.Tl)("Error fetching models")+": "+e.message)}finally{eZ(!1)}},t$=async()=>{if(eq||0===u.length)return;let e=Object.fromEntries(u.map(e=>[e.id,{state:"queued",error:null}]));eG.current=!1,eM(!0),eJ(!1),eL(null),eB(e),eV({total:u.length,completed:0,passed:0,failed:0,stopped:!1});let t=0,s=0;try{for(let e=0;e<u.length;e+=1){if(eG.current){eV({total:u.length,completed:e,passed:t,failed:s,stopped:!0});break}let a=u[e];eL(a.id),eB(e=>({...e,[a.id]:{state:"testing",error:null}}));try{let e=await fetch(`/api/providers/${a.id}/test`,{method:"POST"}),i=await e.json(),l=!!i.valid;l?t+=1:s+=1,eB(e=>({...e,[a.id]:{state:l?"success":"failed",error:l?null:i.error||null}}))}catch(e){s+=1,eB(t=>({...t,[a.id]:{state:"failed",error:e.message||"Test failed"}}))}eV({total:u.length,completed:e+1,passed:t,failed:s,stopped:!1}),e<u.length-1&&await new Promise(e=>setTimeout(e,1e3))}}finally{eL(null),eM(!1),eJ(!1),eG.current=!1}},tA=async e=>{eU({title:"Delete Connection",message:"Delete this connection?",onConfirm:async()=>{eU(null);try{(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok&&f(u.filter(t=>t.id!==e))}catch(e){console.log("Error deleting connection:",e)}}})},tT=()=>{tb(),I(!1)},tO=async()=>{if(!D){z(!0),M(null);try{let e=await fetch("/api/oauth/codex/refresh-all",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})}),t=await e.json();if(!e.ok&&!t?.refreshed?.length)throw Error(t.error||"Failed to refresh Codex tokens");M(t),await tb()}catch(e){M({error:e.message,refreshed:[],failed:[],skipped:[]})}finally{z(!1)}}},tP=async e=>{try{(await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:r,...e})})).ok&&(await tb(),J(!1))}catch(e){console.log("Error saving connection:",e)}},tI=async e=>{try{(await fetch(`/api/providers/${Z.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok&&(await tb(),B(!1))}catch(e){console.log("Error updating connection:",e)}},tE=async(e,t)=>{try{(await fetch(`/api/providers/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok&&f(s=>s.map(s=>s.id===e?{...s,isActive:t}:s))}catch(e){console.log("Error updating connection status:",e)}},tR=async(e,t)=>{let s=[...u];[s[e],s[t]]=[s[t],s[e]],f(s);try{await Promise.all([fetch(`/api/providers/${s[e].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:e})}),fetch(`/api/providers/${s[t].id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({priority:t})})])}catch(e){console.log("Error swapping priority:",e),await tb()}},t_=(0,i.useMemo)(()=>new Set(u.map(e=>e.id)),[u]),tU=(0,i.useMemo)(()=>ep.filter(e=>t_.has(e)),[ep,t_]),tD=u.filter(e=>tU.includes(e.id));u.length>0&&(tU.length,u.length);let tz=(()=>{if(0===tD.length)return"";let e=new Set(tD.map(e=>e.providerSpecificData?.proxyPoolId||"__none__"));if(1===e.size){let t=[...e][0];if("__none__"===t)return"All selected currently unbound";let s=A.find(e=>e.id===t);return`All selected currently bound to ${s?.name||t}`}return"Selected connections have mixed proxy bindings"})(),tq=()=>{eh||Q(!1)},tM=async()=>{if(0===tU.length)return;let e="__none__"===ex?null:ex;ef(!0);try{let t=[];for(let s of tU)try{let a=await fetch(`/api/providers/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:e})});t.push(a.ok)}catch(e){console.log("Error applying bulk proxy pool for",s,e),t.push(!1)}let s=t.filter(e=>!e).length;s>0&&alert(`Updated with ${s} failed request(s).`),await tb(),em([]),eu("__none__"),Q(!1)}catch(e){console.log("Error applying bulk proxy pool:",e)}finally{ef(!1)}},tF=(0,a.jsx)("div",{className:"flex min-w-0 flex-col divide-y divide-black/3 dark:divide-white/3",children:u.map((e,t)=>(0,a.jsx)("div",{className:"flex min-w-0 items-stretch",children:(0,a.jsx)("div",{className:"flex-1 min-w-0",children:(0,a.jsx)(N,{connection:e,proxyPools:A,isOAuth:e7,isFirst:0===t,isLast:t===u.length-1,onMoveUp:()=>tR(t,t-1),onMoveDown:()=>tR(t,t+1),onToggleActive:t=>tE(e.id,t),onUpdateProxy:async t=>{try{(await fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({proxyPoolId:t||null})})).ok&&f(s=>s.map(s=>s.id===e.id?{...s,providerSpecificData:{...s.providerSpecificData,proxyPoolId:t||null}}:s))}catch(e){console.log("Error updating proxy:",e)}},onEdit:()=>{X(e),B(!0)},onDelete:()=>tA(e.id),oneByOneStatus:eW[e.id]||null})})},e.id))}),tJ=[{value:"__none__",label:"None"},...A.map(e=>({value:e.id,label:e.name}))],tK=0===tU.length?"Select one or more connections, then click Proxy Action.":tz,tL=tU.length>0&&!eh,tW=(0,a.jsx)(d.aF,{isOpen:G,onClose:tq,title:`Proxy Action (${tU.length} selected)`,children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(d.l6,{label:"Proxy Pool",value:ex,onChange:e=>eu(e.target.value),options:tJ,placeholder:"None"}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:tK}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Selecting None will unbind selected connections from proxy pool."}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[(0,a.jsx)(d.$n,{onClick:tM,fullWidth:!0,disabled:!tL,children:eh?"Applying...":"Apply"}),(0,a.jsx)(d.$n,{onClick:tq,variant:"ghost",fullWidth:!0,disabled:eh,children:"Cancel"})]})]})}),tB=async e=>{if(!en){eo(e);try{let t=await fetch("/api/models/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:`${td}/${e}`})}),s=await t.json();ei(t=>({...t,[e]:s.ok?"ok":"error"})),er(s.ok?"":s.error||"Model not reachable")}catch{ei(t=>({...t,[e]:"error"})),er("Network error")}finally{eo(null)}}};return g?(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(d.Qv,{}),(0,a.jsx)(d.Qv,{})]}):e4?(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:gap-8 sm:px-0",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)(n(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-3 sm:gap-4",children:[(0,a.jsx)("div",{className:"flex size-12 shrink-0 items-center justify-center rounded-lg",style:{backgroundColor:`${e4.color}15`},children:et?(0,a.jsx)("span",{className:"text-sm font-bold",style:{color:e4.color},children:e4.textIcon||e4.id.slice(0,2).toUpperCase()}):(0,a.jsx)(o.default,{src:ts&&e4.apiType?"responses"===e4.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":ta?"/providers/anthropic-m.png":`/providers/${e4.id}.png`,alt:e4.name,width:48,height:48,className:"max-h-12 max-w-12 rounded-lg object-contain",sizes:"48px",onError:()=>es(!0)})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 flex-wrap",children:[(0,a.jsx)("h1",{className:"truncate text-2xl font-semibold tracking-tight sm:text-3xl",children:e4.name}),(e4.notice?.apiKeyUrl||e4.notice?.signupUrl||e4.website)&&(0,a.jsxs)("a",{href:e4.notice?.apiKeyUrl||e4.notice?.signupUrl||e4.website,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),e4.notice?.apiKeyUrl?"Get API Key":"Sign up / Learn more"]})]}),(0,a.jsxs)("p",{className:"text-text-muted",children:[u.length," connection",1===u.length?"":"s"]})]})]})]}),e4.deprecated&&(0,a.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-yellow-500/10 border border-yellow-500/30",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-yellow-500 mt-0.5 shrink-0",children:"warning"}),(0,a.jsx)("p",{className:"text-xs text-red-600 dark:text-yellow-400 leading-relaxed",children:e4.deprecationNotice})]}),e4.notice?.text&&!e4.deprecated&&(0,a.jsxs)("div",{className:"flex flex-col gap-2 rounded-lg border border-blue-500/30 bg-blue-500/10 px-3 py-2 sm:flex-row sm:items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] text-blue-500 shrink-0",children:"info"}),(0,a.jsx)("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-blue-600 dark:text-blue-400",children:e4.notice.text}),e4.notice.apiKeyUrl&&(0,a.jsx)("a",{href:e4.notice.apiKeyUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex justify-center rounded bg-blue-500 px-2 py-1 text-xs font-medium text-white transition-colors hover:bg-blue-600 sm:py-0.5",children:"Get API Key →"})]}),ti&&j&&(0,a.jsx)(d.Zp,{children:(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:ta?"Anthropic Compatible Details":"OpenAI Compatible Details"}),(0,a.jsxs)("p",{className:"break-all text-sm text-text-muted",children:[ta?"Messages API":"responses"===j.apiType?"Responses API":"Chat Completions"," \xb7 ",(j.baseUrl||"").replace(/\/$/,""),"/",ta?"messages":"responses"===j.apiType?"responses":"chat/completions"]})]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:()=>J(!0),disabled:u.length>0,className:"w-full sm:w-auto",children:"Add"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"edit",onClick:()=>V(!0),className:"w-full sm:w-auto",children:"Edit"}),(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:async()=>{eU({title:"Delete Compatible Node",message:`Delete this ${ta?"Anthropic":"OpenAI"} Compatible node?`,onConfirm:async()=>{eU(null);try{(await fetch(`/api/provider-nodes/${r}`,{method:"DELETE"})).ok&&s.push("/dashboard/providers")}catch(e){console.log("Error deleting provider node:",e)}}})},className:"w-full sm:w-auto",children:"Delete"})]})]})}),e8?(0,a.jsx)(d.gw,{providerId:r}):(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Connections"}),(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-4",children:[u.length>0&&A.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"lan",onClick:()=>Q(!0),children:"Apply Proxy"}),u.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"sync",onClick:t$,disabled:eq,children:eq?"Testing Connection One-by-One...":"Test Connection One-by-One"}),eq&&(0,a.jsx)(d.$n,{size:"sm",variant:"ghost",icon:"stop",onClick:()=>{eq&&(eG.current=!0,eJ(!0))},disabled:eF,children:eF?"Stopping...":"Stop"})]}),"codex"===r&&(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,a.jsxs)("label",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-text-muted whitespace-nowrap",children:"Global Fast"}),(0,a.jsx)(d.lM,{checked:ew,onChange:e=>{ek(e),tN(ej,e)}})]}),(0,a.jsxs)("label",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs font-medium text-text-muted whitespace-nowrap",children:"My Fast"}),(0,a.jsx)(d.lM,{checked:eC,onChange:e=>{eS(e),tw(e)}})]})]}),to&&(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("label",{htmlFor:"provider-default-reasoning",className:"text-xs font-medium text-text-muted whitespace-nowrap",children:"Default Reasoning"}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("select",{id:"provider-default-reasoning",value:ej,onChange:e=>{var t;eN(t=e.target.value),tN(t)},disabled:g,className:"h-6 w-28 appearance-none rounded-full border border-border/60 bg-surface-2 pl-3 pr-7 text-xs font-medium text-text-main transition-colors focus:border-primary/50 focus:outline-none focus:ring-2 focus:ring-primary/20 disabled:cursor-not-allowed disabled:opacity-50",children:tm.map(e=>(0,a.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,a.jsx)("span",{className:"material-symbols-outlined pointer-events-none absolute right-2 top-1/2 -translate-y-1/2 text-[16px] text-text-muted",children:"expand_more"})]})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted font-medium",children:"Round Robin"}),(0,a.jsx)(d.lM,{checked:"round-robin"===eg,onChange:e=>{let t=e?"round-robin":null,s=e?eb||"1":eb;e&&!eb&&ev("1"),ey(t),tj(t,s)}}),"round-robin"===eg&&(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"Sticky:"}),(0,a.jsx)("input",{type:"number",min:1,value:eb,onChange:e=>{var t;ev(t=e.target.value),tj("round-robin",t)},placeholder:"1",className:"w-14 px-2 py-1 text-xs border border-border rounded-md bg-background focus:outline-none focus:border-primary"})]})]})]})]}),0===u.length?(0,a.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"inline-flex items-center justify-center w-9 h-9 rounded-full bg-primary/10 text-primary shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:e7?"lock":"key"})}),(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"No connections yet"}),tl&&(0,a.jsxs)("p",{className:"text-xs text-text-muted",children:["Choose ",tr," or ",tn,"."]})]})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[tl?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:e2,children:tr}),(0,a.jsx)(d.$n,{size:"sm",icon:"key",onClick:e5,children:tn})]}):(0,a.jsxs)(a.Fragment,{children:[!ti&&"iflow"===r&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>R(!0),children:"Cookie"}),"codex"===r&&(0,a.jsx)(d.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>L(!0),children:(0,x.Tl)("Bulk Add")}),(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:e3,children:ti?"Add API Key":"iflow"===r?"OAuth":"Add Connection"})]}),"codex"===r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",icon:"upload_file",variant:"secondary",onClick:()=>U(!0),children:"Batch Import"}),(0,a.jsx)(d.$n,{size:"sm",icon:"sync",variant:"secondary",onClick:tO,loading:D,children:"Refresh Tokens"})]})]})]}):(0,a.jsxs)(a.Fragment,{children:[eH&&(0,a.jsx)("div",{className:"mb-4 rounded-lg border border-black/10 bg-black/[0.02] px-3 py-2 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,a.jsxs)("span",{children:["Total: ",eH.total]}),(0,a.jsxs)("span",{children:["Completed: ",eH.completed]}),(0,a.jsxs)("span",{children:["Passed: ",eH.passed]}),(0,a.jsxs)("span",{children:["Failed: ",eH.failed]}),eH.stopped&&(0,a.jsx)("span",{className:"text-amber-600 dark:text-amber-400",children:"Stopped"}),eq&&eK&&(0,a.jsxs)("span",{children:["Running: ",u.find(e=>e.id===eK)?.name||eK]})]})}),tF,!ti&&(0,a.jsxs)("div",{className:"mt-4 grid grid-cols-1 gap-2 sm:flex",children:["iflow"===r&&(0,a.jsx)(d.$n,{size:"sm",icon:"cookie",variant:"secondary",onClick:()=>R(!0),title:"Add connection using browser cookie",className:"w-full sm:w-auto",children:"Cookie"}),"codex"===r&&(0,a.jsx)(d.$n,{size:"sm",icon:"playlist_add",variant:"secondary",onClick:()=>L(!0),title:(0,x.Tl)("Bulk import codex accounts from JSON"),className:"w-full sm:w-auto",children:(0,x.Tl)("Bulk Add")}),tl?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",icon:"lock",variant:"secondary",onClick:e2,className:"w-full sm:w-auto",children:tr}),(0,a.jsx)(d.$n,{size:"sm",icon:"key",onClick:e5,className:"w-full sm:w-auto",children:tn})]}):(0,a.jsx)(d.$n,{size:"sm",icon:"add",onClick:e3,className:"w-full sm:w-auto",children:"Add"}),"codex"===r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.$n,{size:"sm",icon:"upload_file",variant:"secondary",onClick:()=>U(!0),className:"w-full sm:w-auto",children:"Batch Import"}),(0,a.jsx)(d.$n,{size:"sm",icon:"sync",variant:"secondary",onClick:tO,loading:D,className:"w-full sm:w-auto",children:"Refresh Tokens"})]})]})]}),"codex"===r&&q&&(0,a.jsx)("div",{className:`mt-4 rounded-lg border px-3 py-2 text-sm ${q.error?"border-red-500/30 bg-red-500/10 text-red-600":"border-green-500/30 bg-green-500/10 text-green-700 dark:text-green-300"}`,children:q.error?q.error:`Token refresh complete: ${q.refreshed?.length||0} refreshed, ${q.failed?.length||0} failed, ${q.skipped?.length||0} skipped.`})]}),(0,a.jsxs)(d.Zp,{children:[(0,a.jsxs)("div",{className:"mb-4 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:"Available Models"}),!ti&&(e=[...te,...eP.filter(e=>!te.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type).map(e=>e.id).filter(e=>!eE.includes(e)),(0,a.jsxs)("div",{className:"flex gap-2",children:[eE.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"restart_alt",onClick:tg,children:"Active All"}),e.length>0&&(0,a.jsx)(d.$n,{size:"sm",variant:"secondary",icon:"block",onClick:()=>tf(e),children:"Disable All"})]}))]}),!!el&&(0,a.jsx)("p",{className:"text-xs text-red-500 mb-3 wrap-break-word",children:el}),(()=>{let e,t,s;if(ti)return(0,a.jsx)(v,{providerStorageAlias:td,providerDisplayAlias:tc,modelAliases:Y,copied:eX,onCopy:eY,onSetAlias:tk,onDeleteAlias:tC,connections:u,isAnthropic:ta});let i=[...te,...eP.filter(e=>!te.some(t=>t.id===e.id))].filter(e=>!e.type||"llm"===e.type),l=new Set(eE),n=i.filter(e=>!l.has(e.id)),o=i.filter(e=>l.has(e.id)),d=Object.entries(Y).filter(([e,t])=>{let s=`${td}/`;if(!t.startsWith(s))return!1;let a=t.slice(s.length);return e4.passthroughModels?!te.some(e=>e.id===a):!te.some(e=>e.id===a)&&e===a}).map(([e,t])=>({id:t.slice(`${td}/`.length),alias:e,fullModel:t}));return(0,a.jsxs)("div",{className:"flex flex-wrap gap-3",children:[d.map(e=>(0,a.jsx)(y,{model:{id:e.id},fullModel:`${tc}/${e.id}`,displayModel:tp?e.id:`${tc}/${e.id}`,alias:e.alias,copied:eX,onCopy:eY,onSetAlias:()=>{},onDeleteAlias:()=>tC(e.alias),testStatus:ea[e.id],onTest:u.length>0||e8?()=>tB(e.id):void 0,isTesting:en===e.id,isCustom:!0,isFree:!1},e.id)),n.map(e=>{let t=`${td}/${e.id}`,s=`${r}/${e.id}`,i=Object.entries(Y).find(([,e])=>e===t||e===s)?.[0];return(0,a.jsx)(y,{model:e,fullModel:`${tc}/${e.id}`,displayModel:tp?e.id:`${tc}/${e.id}`,alias:i,copied:eX,onCopy:eY,onSetAlias:t=>tk(e.id,t,td),onDeleteAlias:()=>tC(i),testStatus:ea[e.id],onTest:u.length>0||e8?()=>tB(e.id):void 0,isTesting:en===e.id,isFree:e.isFree,onDisable:()=>tu(e.id)},e.id)}),(0,a.jsxs)("button",{onClick:()=>ec(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-primary/40 px-3 py-2 text-xs text-primary transition-colors hover:border-primary hover:bg-primary/5 sm:w-auto",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"add"}),"Add Model"]}),"qoder"===r&&u.some(e=>!1!==e.isActive)&&(0,a.jsxs)("button",{onClick:tS,disabled:eQ,className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-blue-500/40 px-3 py-2 text-xs text-blue-600 dark:text-blue-400 transition-colors hover:border-blue-500 hover:bg-blue-500/5 sm:w-auto disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",style:eQ?{animation:"spin 1s linear infinite"}:void 0,children:eQ?"progress_activity":"download"}),eQ?(0,x.Tl)("Fetching..."):(0,x.Tl)("Fetch Qoder Models")]}),eT.length>0&&(e=new Set(Object.values(Y)),t=new Set(te.map(e=>e.id)),0===(s=eT.filter(s=>!e.has(`${td}/${s.id}`)&&!t.has(s.id))).length?null:(0,a.jsxs)("div",{className:"w-full mt-2",children:[(0,a.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"Suggested free models (≥200k context):"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:s.map(e=>(0,a.jsxs)("button",{onClick:async()=>{let t=e.id.split("/").pop();await tk(e.id,t,td)},className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:`${e.name} \xb7 ${(e.contextLength/1e3).toFixed(0)}k ctx`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id.split("/").pop()]},e.id))})]})),o.length>0&&(0,a.jsxs)("div",{className:"w-full mt-2",children:[(0,a.jsxs)("p",{className:"text-xs text-text-muted mb-2",children:["Disabled models (",o.length,"):"]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:o.map(e=>(0,a.jsxs)("button",{onClick:()=>th(e.id),className:"flex items-center gap-1 px-2.5 py-1.5 rounded-lg border border-dashed border-black/10 dark:border-white/10 text-xs text-text-muted hover:text-primary hover:border-primary/40 hover:bg-primary/5 transition-colors",title:"Restore model",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:"add"}),e.id]},e.id))})]})]})})()]}),tW,"kiro"===r?(0,a.jsx)(d.Mh,{isOpen:P,providerInfo:e4,onSuccess:tT,onClose:()=>I(!1)}):"cursor"===r?(0,a.jsx)(d.G9,{isOpen:P,onSuccess:tT,onClose:()=>I(!1)}):"gitlab"===r?(0,a.jsx)(d.vj,{isOpen:P,providerInfo:e4,onSuccess:tT,onClose:()=>I(!1)}):(0,a.jsx)(d.LF,{isOpen:P,provider:r,providerInfo:e4,onSuccess:tT,onClose:()=>I(!1)}),"iflow"===r&&(0,a.jsx)(d.vE,{isOpen:E,onSuccess:()=>{tb(),R(!1)},onClose:()=>R(!1)}),"codex"===r&&(0,a.jsx)($,{isOpen:_,onSuccess:tb,onClose:()=>U(!1)}),(0,a.jsx)(k,{isOpen:F,provider:r,providerName:e4.name,isCompatible:ti,isAnthropic:ta,authType:e4?.authType,authHint:e4?.authHint,website:e4?.website,proxyPools:A,onSave:tP,onClose:()=>J(!1)}),(0,a.jsx)(d.wI,{isOpen:W,connection:Z,proxyPools:A,onSave:tI,onClose:()=>B(!1)}),ti&&(0,a.jsx)(C,{isOpen:H,node:j,onSave:tv,onClose:()=>V(!1),isAnthropic:ta}),!ti&&(0,a.jsx)(S,{isOpen:ed,providerAlias:td,providerDisplayAlias:tc,onSave:async e=>{let t=e4?.passthroughModels?e.split("/").pop():e;await tk(e,t,td),ec(!1)},onClose:()=>ec(!1)}),"codex"===r&&(0,a.jsx)(T,{isOpen:K,onClose:()=>L(!1),onSuccess:tb}),(0,a.jsx)(d.uo,{isOpen:eD,onClose:()=>ez(!1),onConfirm:()=>{(window.localStorage.setItem(e0,"true"),ez(!1),e7)?e1():e5()},title:"Risk Notice",message:e4?.deprecationNotice,confirmText:"I Understand, Continue",cancelText:"Cancel",variant:"danger"}),(0,a.jsx)(d.uo,{isOpen:!!e_,onClose:()=>eU(null),onConfirm:e_?.onConfirm,title:e_?.title||"Confirm",message:e_?.message,variant:"danger"})]}):(0,a.jsxs)("div",{className:"text-center py-20",children:[(0,a.jsx)("p",{className:"text-text-muted",children:"Provider not found"}),(0,a.jsx)(n(),{href:"/dashboard/providers",className:"text-primary mt-4 inline-block",children:"Back to Providers"})]})}T.propTypes={isOpen:g().bool.isRequired,onClose:g().func.isRequired,onSuccess:g().func}}},e=>{e.O(0,[2574,3862,1051,5772,1321,5497,8441,3794,7358],()=>e(e.s=29610)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9089],{15615:(e,r,t)=>{"use strict";t.r(r),t.d(r,{default:()=>u});var a=t(95155),s=t(12115),i=t(73321),l=t(98500),d=t.n(l),o=t(35497),n=t(90620);let c=Object.values(n.Q2).map(e=>({value:e.id,label:e.name})),p=Object.values(n.MA).map(e=>({value:e.id,label:e.name}));function u(){let e=(0,i.useRouter)(),[r,t]=(0,s.useState)(!1),[l,u]=(0,s.useState)({provider:"",authMethod:"api_key",apiKey:"",displayName:"",isActive:!0}),[h,m]=(0,s.useState)({}),x=(e,r)=>{u(t=>({...t,[e]:r})),h[e]&&m(r=>({...r,[e]:null}))},b=async r=>{let a;if(r.preventDefault(),a={},l.provider||(a.provider="Please select a provider"),"api_key"!==l.authMethod||l.apiKey||(a.apiKey="API Key is required"),m(a),0===Object.keys(a).length){t(!0);try{let r=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)});if(r.ok)e.push("/dashboard/providers");else{let e=await r.json();m({submit:e.error||"Failed to create provider"})}}catch(e){m({submit:"An error occurred. Please try again."})}finally{t(!1)}}},v=n.Q2[l.provider];return(0,a.jsxs)("div",{className:"max-w-2xl mx-auto",children:[(0,a.jsxs)("div",{className:"mb-8",children:[(0,a.jsxs)(d(),{href:"/dashboard/providers",className:"inline-flex items-center gap-1 text-sm text-text-muted hover:text-primary transition-colors mb-4",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-lg",children:"arrow_back"}),"Back to Providers"]}),(0,a.jsx)("h1",{className:"text-3xl font-semibold tracking-tight",children:"Add New Provider"}),(0,a.jsx)("p",{className:"text-text-muted mt-2",children:"Configure a new AI provider to use with your applications."})]}),(0,a.jsx)(o.Zp,{children:(0,a.jsxs)("form",{onSubmit:b,className:"flex flex-col gap-6",children:[(0,a.jsx)(o.l6,{label:"Provider",options:c,value:l.provider,onChange:e=>x("provider",e.target.value),placeholder:"Select a provider",error:h.provider,required:!0}),v&&(0,a.jsxs)(o.Zp.Section,{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"size-10 rounded-lg flex items-center justify-center bg-bg border border-border",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-xl",style:{color:v.color},children:v.icon})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:v.name}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Selected provider"})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("label",{className:"text-sm font-medium",children:["Authentication Method ",(0,a.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,a.jsx)("div",{className:"flex gap-3",children:p.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>x("authMethod",e.value),className:`flex-1 flex items-center justify-center gap-2 p-4 rounded-lg border transition-all ${l.authMethod===e.value?"border-primary bg-primary/5 text-primary":"border-border hover:border-primary/50"}`,children:[(0,a.jsx)("span",{className:"material-symbols-outlined",children:"api_key"===e.value?"key":"lock"}),(0,a.jsx)("span",{className:"font-medium",children:e.label})]},e.value))})]}),"api_key"===l.authMethod&&(0,a.jsx)(o.pd,{label:"API Key",type:"password",placeholder:"Enter your API key",value:l.apiKey,onChange:e=>x("apiKey",e.target.value),error:h.apiKey,hint:"Your API key will be encrypted and stored securely.",required:!0}),"oauth2"===l.authMethod&&(0,a.jsxs)(o.Zp.Section,{children:[(0,a.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Connect your account using OAuth2 authentication."}),(0,a.jsx)(o.$n,{type:"button",variant:"secondary",icon:"link",children:"Connect with OAuth2"})]}),(0,a.jsx)(o.pd,{label:"Display Name",placeholder:"e.g., Production API, Dev Environment",value:l.displayName,onChange:e=>x("displayName",e.target.value),hint:"Optional. A friendly name to identify this configuration."}),(0,a.jsx)(o.lM,{checked:l.isActive,onChange:e=>x("isActive",e),label:"Active",description:"Enable this provider for use in your applications"}),h.submit&&(0,a.jsx)("div",{className:"p-4 rounded-lg bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 text-red-600 dark:text-red-400 text-sm",children:h.submit}),(0,a.jsxs)("div",{className:"flex gap-3 pt-4 border-t border-border",children:[(0,a.jsx)(d(),{href:"/dashboard/providers",className:"flex-1",children:(0,a.jsx)(o.$n,{type:"button",variant:"ghost",fullWidth:!0,children:"Cancel"})}),(0,a.jsx)(o.$n,{type:"submit",loading:r,fullWidth:!0,className:"flex-1",children:"Create Provider"})]})]})})]})}},57267:(e,r,t)=>{Promise.resolve().then(t.bind(t,15615))}},e=>{e.O(0,[2574,3862,1051,1321,5497,8441,3794,7358],()=>e(e.s=57267)),_N_E=e.O()}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8460],{12572:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>N});var s=a(95155),r=a(12115),l=a(14051),i=a.n(l),n=a(35497),o=a(57250),d=a(90620),c=a(52679),p=a(98500),m=a.n(p),x=a(65921),u=a(38003);let h={available:{icon:"check_circle",color:"#22c55e",label:"Available"},cooldown:{icon:"schedule",color:"#f59e0b",label:"Cooldown"},unavailable:{icon:"error",color:"#ef4444",label:"Unavailable"},unknown:{icon:"help",color:"#6b7280",label:"Unknown"}};function f(){let[e,t]=(0,r.useState)(null),[a,l]=(0,r.useState)(!0),[i,o]=(0,r.useState)(!1),[d,c]=(0,r.useState)(null),p=(0,r.useRef)(null),m=(0,x.i)(),u=(0,r.useCallback)(async()=>{try{let e=await fetch("/api/models/availability");if(e.ok){let a=await e.json();t(a)}}catch{}finally{l(!1)}},[]);(0,r.useEffect)(()=>{u();let e=setInterval(u,3e4);return()=>clearInterval(e)},[u]),(0,r.useEffect)(()=>{let e=e=>{p.current&&!p.current.contains(e.target)&&o(!1)};return i&&document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[i]);let f=async(e,t)=>{c(`${e}:${t}`);try{(await fetch("/api/models/availability",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({action:"clearCooldown",provider:e,model:t})})).ok?(m.success(`Cooldown cleared for ${t}`),await u()):m.error("Failed to clear cooldown")}catch{m.error("Failed to clear cooldown")}finally{c(null)}};if(a)return null;let b=e?.models||[],g=0===(e?.unavailableCount||b.filter(e=>"available"!==e.status).length),v={};return b.forEach(e=>{if("available"===e.status)return;let t=e.provider||"unknown";v[t]||(v[t]=[]),v[t].push(e)}),(0,s.jsx)("div",{className:"relative",ref:p,children:i&&(0,s.jsxs)("div",{className:"absolute top-full right-0 mt-2 w-80 bg-surface border border-border rounded-xl shadow-2xl z-50 overflow-hidden",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border bg-bg",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",style:{color:g?"#22c55e":"#f59e0b"},children:g?"verified":"warning"}),(0,s.jsx)("span",{className:"text-sm font-semibold text-text-main",children:"Model Status"})]}),(0,s.jsx)("button",{onClick:u,className:"p-1 rounded-lg hover:bg-surface text-text-muted hover:text-text-main transition-colors",title:"Refresh",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"refresh"})})]}),(0,s.jsx)("div",{className:"px-4 py-3 max-h-60 overflow-y-auto",children:g?(0,s.jsx)("p",{className:"text-sm text-text-muted text-center py-2",children:"All models are responding normally."}):(0,s.jsx)("div",{className:"flex flex-col gap-2.5",children:Object.entries(v).map(([e,t])=>(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs font-semibold text-text-main mb-1.5 capitalize",children:e}),(0,s.jsx)("div",{className:"flex flex-col gap-1",children:t.map(e=>{let t=h[e.status]||h.unknown,a=d===`${e.provider}:${e.model}`;return(0,s.jsxs)("div",{className:"flex items-center justify-between px-2.5 py-1.5 rounded-lg bg-surface/30",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[14px] shrink-0",style:{color:t.color},children:t.icon}),(0,s.jsx)("span",{className:"font-mono text-xs text-text-main truncate",children:e.model})]}),"cooldown"===e.status&&(0,s.jsx)(n.$n,{size:"sm",variant:"ghost",onClick:()=>f(e.provider,e.model),disabled:a,className:"text-[10px] px-1.5! py-0.5! ml-2",children:a?"...":"Clear"})]},`${e.provider}-${e.model}`)})})]},e))})})]})})}var b=a(68828);let g=[{value:"openai-compatible",label:"OpenAI Compatible"},{value:"anthropic-compatible",label:"Anthropic Compatible"}],v=[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}];function y({isOpen:e,onClose:t,onImported:a,notify:l}){let[i,o]=(0,r.useState)(""),[d,c]=(0,r.useState)(null),[p,m]=(0,r.useState)(!1),[x,u]=(0,r.useState)(""),[h,f]=(0,r.useState)({type:"openai-compatible",apiType:"chat",name:"",prefix:"",baseUrl:"",connectionName:"Imported Key",apiKey:"",modelId:""}),j=()=>{o(""),c(null),m(!1),u(""),f({type:"openai-compatible",apiType:"chat",name:"",prefix:"",baseUrl:"",connectionName:"Imported Key",apiKey:"",modelId:""}),t()},N=async()=>{if(h.name.trim()&&h.prefix.trim()&&h.baseUrl.trim()){m(!0);try{let e={name:h.name.trim(),prefix:h.prefix.trim(),baseUrl:h.baseUrl.trim(),type:h.type};"openai-compatible"===h.type&&(e.apiType=h.apiType);let t=await fetch("/api/provider-nodes",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),s=await t.json();if(!t.ok)throw Error(s.error||"Failed to create compatible provider");let r=null;if(h.apiKey.trim()){let e=await fetch("/api/providers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:s.node.id,apiKey:h.apiKey.trim(),name:h.connectionName.trim()||"Imported Key",testStatus:"unknown"})}),t=await e.json();if(!e.ok)throw Error(t.error||"Compatible provider created, but API key import failed");r=t.connection}l.success("Compatible provider imported from cURL"),a?.({node:s.node,connection:r}),j()}catch(e){l.error(e.message||"Failed to import curl")}finally{m(!1)}}};return(0,s.jsx)(n.aF,{isOpen:e,title:"Import Compatible Provider From cURL",onClose:j,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)("label",{className:"text-sm font-medium text-text-main",children:"Paste cURL"}),(0,s.jsx)("textarea",{value:i,onChange:e=>o(e.target.value),placeholder:'curl --request POST --url https://api.example.com/v1/chat/completions --header \'Authorization: Bearer sk-xxx\' --header \'Content-Type: application/json\' --data \'{"model":"gpt-4o-mini","messages":[{"role":"user","content":"Hello"}]}\'',className:"min-h-40 w-full rounded-lg border border-border bg-surface px-3 py-2 text-sm focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)("p",{className:"text-xs text-text-muted",children:"Supports full endpoint URLs like `/v1/chat/completions`, `/responses`, or `/v1/messages`."}),(0,s.jsx)(n.$n,{onClick:()=>{try{let e=(0,b.Sq)(i);c(e),u(""),f({type:e.type,apiType:e.apiType||"chat",name:e.defaultName,prefix:e.defaultPrefix,baseUrl:e.baseUrl,connectionName:e.defaultConnectionName,apiKey:e.apiKey,modelId:e.modelId})}catch(e){c(null),u(e.message||"Failed to parse curl")}},variant:"secondary",className:"w-full sm:w-auto",children:"Parse cURL"})]}),x&&(0,s.jsx)("p",{className:"text-sm text-red-500",children:x})]}),d&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsx)(n.Ex,{variant:"success",children:"Detected"}),(0,s.jsx)(n.Ex,{variant:"default",children:"anthropic-compatible"===h.type?"Anthropic Compatible":"OpenAI Compatible"}),"openai-compatible"===h.type&&(0,s.jsx)(n.Ex,{variant:"default",children:"responses"===h.apiType?"Responses API":"Chat Completions"})]}),(0,s.jsx)(n.l6,{label:"Provider Type",value:h.type,options:g,onChange:e=>f(t=>({...t,type:e.target.value,apiType:"anthropic-compatible"===e.target.value?"chat":t.apiType}))}),"openai-compatible"===h.type&&(0,s.jsx)(n.l6,{label:"API Type",value:h.apiType,options:v,onChange:e=>f(t=>({...t,apiType:e.target.value}))}),(0,s.jsx)(n.pd,{label:"Provider Name",value:h.name,onChange:e=>f(t=>({...t,name:e.target.value})),placeholder:"Compatible Provider"}),(0,s.jsx)(n.pd,{label:"Prefix",value:h.prefix,onChange:e=>f(t=>({...t,prefix:e.target.value})),placeholder:"oc-example"}),(0,s.jsx)(n.pd,{label:"Base URL",value:h.baseUrl,onChange:e=>f(t=>({...t,baseUrl:e.target.value})),placeholder:"https://api.example.com/v1"}),(0,s.jsx)(n.pd,{label:"Connection Name",value:h.connectionName,onChange:e=>f(t=>({...t,connectionName:e.target.value})),placeholder:"Imported Key"}),(0,s.jsx)(n.pd,{label:"API Key",type:"password",value:h.apiKey,onChange:e=>f(t=>({...t,apiKey:e.target.value})),placeholder:"Bearer token from curl"}),(0,s.jsx)(n.pd,{label:"Detected Model",value:h.modelId,onChange:e=>f(t=>({...t,modelId:e.target.value})),placeholder:"Optional"})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(n.$n,{onClick:N,fullWidth:!0,disabled:!d||!h.name.trim()||!h.prefix.trim()||!h.baseUrl.trim()||p,children:p?"Importing...":"Create Provider"}),(0,s.jsx)(n.$n,{onClick:j,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function j(e,t,a){let r=[];if(e>0&&r.push((0,s.jsxs)(n.Ex,{variant:"success",size:"sm",dot:!0,children:[e," Connected"]},"connected")),t>0){let e=a?`${t} Error (${a})`:`${t} Error`;r.push((0,s.jsx)(n.Ex,{variant:"error",size:"sm",dot:!0,children:e},"error"))}return 0===r.length?(0,s.jsx)("span",{className:"text-text-muted",children:"No connections"}):r}function N(){let e,t,[a,l]=(0,r.useState)([]),[i,o]=(0,r.useState)([]),[p,m]=(0,r.useState)(!0),[h,b]=(0,r.useState)(!1),[g,v]=(0,r.useState)(!1),[j,N]=(0,r.useState)(!1),[A,U]=(0,r.useState)(!1),[S,R]=(0,r.useState)(null),[O,P]=(0,r.useState)(null),E=(0,x.i)(),$=(0,u.C)(e=>e.query),q=(0,u.C)(e=>e.register),_=(0,u.C)(e=>e.unregister);(0,r.useEffect)(()=>(q("Search providers..."),()=>_()),[q,_]);let z=e=>!$.trim()||e.toLowerCase().includes($.trim().toLowerCase());(0,r.useEffect)(()=>{let e=async()=>{try{let[e,t]=await Promise.all([fetch("/api/providers"),fetch("/api/provider-nodes")]),a=await e.json(),s=await t.json();e.ok&&l(a.connections||[]),t.ok&&o(s.nodes||[])}catch(e){console.log("Error fetching data:",e)}finally{m(!1)}};fetch("/api/auth/me").then(e=>e.json()).then(e=>{"sub_user"===e.role&&(window.location.href="/dashboard/usage")}).catch(()=>{}),e()},[]);let K=(e,t)=>{let s=a.filter(a=>a.provider===e&&a.authType===t),r=e=>{let t=Object.entries(e).some(([e,t])=>e.startsWith("modelLock_")&&t&&new Date(t).getTime()>Date.now());return"unavailable"!==e.testStatus||t?e.testStatus:"active"},l=s.filter(e=>{let t=r(e);return"active"===t||"success"===t}).length,i=s.filter(e=>{let t=r(e);return"error"===t||"expired"===t||"unavailable"===t}),n=i.length,o=s.length,d=o>0&&s.every(e=>!1===e.isActive),c=i.sort((e,t)=>new Date(t.lastErrorAt||0)-new Date(e.lastErrorAt||0))[0];return{connected:l,error:n,total:o,errorCode:c?function(e){if(!e)return null;let t=e.lastErrorType;if("runtime_error"===t)return"RUNTIME";if("upstream_auth_error"===t||"auth_missing"===t||"token_refresh_failed"===t||"token_expired"===t)return"AUTH";if("upstream_rate_limited"===t)return"429";if("upstream_unavailable"===t)return"5XX";if("network_error"===t)return"NET";let a=Number(e.errorCode);if(Number.isFinite(a)&&a>=400)return String(a);let s=function(e){if(!e)return null;let t=e.match(/\b([45]\d{2})\b/);return t?t[1]:"ERR"}(e.lastError);if("401"===s||"403"===s)return"AUTH";if(s&&"ERR"!==s)return s;let r=(e.lastError||"").toLowerCase();return r.includes("runtime")||r.includes("not runnable")||r.includes("not installed")?"RUNTIME":r.includes("invalid api key")||r.includes("token invalid")||r.includes("revoked")||r.includes("unauthorized")?"AUTH":"ERR"}(c):null,errorTime:c?.lastErrorAt?function(e){if(!e)return"";let t=Math.floor((Date.now()-new Date(e).getTime())/6e4);if(t<1)return"just now";if(t<60)return`${t}m ago`;let a=Math.floor(t/60);if(a<24)return`${a}h ago`;let s=Math.floor(a/24);return`${s}d ago`}(c.lastErrorAt):null,allDisabled:d}},D=async(e,t,s)=>{let r=a.filter(a=>a.provider===e&&a.authType===t);l(a=>a.map(a=>a.provider===e&&a.authType===t?{...a,isActive:s}:a)),await Promise.allSettled(r.map(e=>fetch(`/api/providers/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:s})})))},F=async(e,t=null)=>{if(!S){R("provider"===e?t:e),P(null);try{let a=await fetch("/api/providers/test-batch",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({mode:e,providerId:t})}),s=await a.json();if(P(s),s.summary){let{passed:e,failed:t,total:a}=s.summary;0===t?E.success(`All ${a} tests passed`):E.warning(`${e}/${a} passed, ${t} failed`)}}catch(e){P({error:"Test request failed"}),E.error("Provider test failed")}finally{R(null)}}},L=i.filter(e=>"openai-compatible"===e.type).map(e=>({id:e.id,name:e.name||"OpenAI Compatible",color:"#10A37F",textIcon:"OC",apiType:e.apiType})).filter(e=>z(e.name)),M=i.filter(e=>"anthropic-compatible"===e.type).map(e=>({id:e.id,name:e.name||"Anthropic Compatible",color:"#D97757",textIcon:"AC"})).filter(e=>z(e.name)),J=Object.entries(d.zN).filter(([,e])=>!e.hidden&&z(e.name)),B=Object.entries(c.IS).filter(([,e])=>!e.hidden&&z(e.name)),W=Object.entries(c.nJ).filter(([,e])=>!e.hidden&&z(e.name)),H=(e=Object.entries(d.fg).filter(([,e])=>!e.hidden&&(e.serviceKinds??["llm"]).includes("llm")&&z(e.name)),t="apikey",[...e].sort(([e,a],[s,r])=>{let l=K(e,t),i=K(s,t),n=+(l.connected>0),o=+(i.connected>0);return n!==o?o-n:(a.name||"").localeCompare(r.name||"")})),Q=!!$.trim(),V=Q||h?H:H.slice(0,20),X=H.length-20;if(p)return(0,s.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,s.jsx)(n.Qv,{}),(0,s.jsx)(n.Qv,{})]});let Z=J.length>0||B.length>0||W.length>0||H.length>0||L.length>0||M.length>0;return(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-6 px-1 sm:px-0",children:[!Z&&(0,s.jsxs)("div",{className:"text-center py-8 border border-dashed border-border rounded-xl",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[32px] text-text-muted mb-2",children:"search_off"}),(0,s.jsx)("p",{className:"text-text-muted text-sm",children:"No providers match your search"})]}),J.length>0&&(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)("h2",{className:"text-lg sm:text-xl font-semibold flex items-center gap-2 leading-tight",children:"OAuth Providers"}),(0,s.jsxs)("div",{className:"flex w-full flex-col gap-2 sm:w-auto sm:flex-row sm:items-center",children:[(0,s.jsx)(f,{}),(0,s.jsxs)("button",{onClick:()=>F("oauth"),disabled:!!S,className:`flex w-full items-center justify-center gap-1.5 rounded-lg border px-3 py-2 text-xs font-medium transition-colors sm:w-auto sm:py-1.5 ${"oauth"===S?"bg-primary/20 border-primary/40 text-primary animate-pulse":"bg-bg border-border text-text-muted hover:text-text-main hover:border-primary/40"}`,title:"Test all OAuth connections","aria-label":"Test all OAuth connections",children:[(0,s.jsx)("span",{className:`material-symbols-outlined text-[14px]${"oauth"===S?" animate-spin":""}`,children:"play_arrow"}),"oauth"===S?"Testing...":"Test All"]})]})]}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3 xl:grid-cols-4",children:J.map(([e,t])=>(0,s.jsx)(w,{providerId:e,provider:t,stats:K(e,"oauth"),authType:"oauth",onToggle:t=>D(e,"oauth",t)},e))})]}),(B.length>0||W.length>0)&&(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)("h2",{className:"text-lg sm:text-xl font-semibold flex items-center gap-2 leading-tight",children:"Free Tier Providers"}),(0,s.jsxs)("button",{onClick:()=>F("free"),disabled:!!S,className:`flex w-full items-center justify-center gap-1.5 rounded-lg border px-3 py-2 text-xs font-medium transition-colors sm:w-auto sm:py-1.5 ${"free"===S?"bg-primary/20 border-primary/40 text-primary animate-pulse":"bg-bg border-border text-text-muted hover:text-text-main hover:border-primary/40"}`,title:"Test all Free connections","aria-label":"Test all Free provider connections",children:[(0,s.jsx)("span",{className:`material-symbols-outlined text-[14px]${"free"===S?" animate-spin":""}`,children:"play_arrow"}),"free"===S?"Testing...":"Test All"]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3 xl:grid-cols-4",children:[B.map(([e,t])=>(0,s.jsx)(w,{providerId:e,provider:t,stats:K(e,"oauth"),authType:"free",onToggle:t=>D(e,"oauth",t)},e)),W.map(([e,t])=>(0,s.jsx)(C,{providerId:e,provider:t,stats:K(e,"apikey"),authType:"apikey",onToggle:t=>D(e,"apikey",t)},e))]})]}),H.length>0&&(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("h2",{className:"text-lg sm:text-xl font-semibold flex items-center gap-2 leading-tight",children:["API Key Providers"," "]}),(0,s.jsxs)("button",{onClick:()=>F("apikey"),disabled:!!S,className:`flex w-full items-center justify-center gap-1.5 rounded-lg border px-3 py-2 text-xs font-medium transition-colors sm:w-auto sm:py-1.5 ${"apikey"===S?"bg-primary/20 border-primary/40 text-primary animate-pulse":"bg-bg border-border text-text-muted hover:text-text-main hover:border-primary/40"}`,title:"Test all API Key connections","aria-label":"Test all API Key connections",children:[(0,s.jsx)("span",{className:`material-symbols-outlined text-[14px]${"apikey"===S?" animate-spin":""}`,children:"play_arrow"}),"apikey"===S?"Testing...":"Test All"]})]}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3 xl:grid-cols-4",children:V.map(([e,t])=>(0,s.jsx)(C,{providerId:e,provider:t,stats:K(e,"apikey"),authType:"apikey",onToggle:t=>D(e,"apikey",t)},e))}),!Q&&!h&&X>0&&(0,s.jsxs)("button",{onClick:()=>b(!0),className:"flex w-full items-center justify-center gap-1.5 rounded-lg border border-dashed border-primary/40 px-3 py-2.5 text-sm font-medium text-primary transition-colors hover:border-primary hover:bg-primary/5",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"expand_more"}),"Show all ",H.length," providers"]})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsxs)("h2",{className:"text-lg sm:text-xl font-semibold flex items-center gap-2 leading-tight",children:["API Key Compatible Providers"," "]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:w-auto",children:[(0,s.jsx)(n.$n,{size:"sm",variant:"secondary",icon:"upload",onClick:()=>U(!0),className:"w-full sm:w-auto",children:"Import cURL"}),(0,s.jsx)(n.$n,{size:"sm",icon:"add",onClick:()=>N(!0),className:"w-full sm:w-auto",children:"Add Anthropic Compatible"}),(0,s.jsx)(n.$n,{size:"sm",variant:"secondary",icon:"add",onClick:()=>v(!0),className:"w-full !bg-white !text-black hover:!bg-gray-100 sm:w-auto",children:"Add OpenAI Compatible"})]})]}),0===L.length&&0===M.length?(0,s.jsxs)("div",{className:"text-center py-8 border border-dashed border-border rounded-xl",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[32px] text-text-muted mb-2",children:"extension"}),(0,s.jsx)("p",{className:"text-text-muted text-sm",children:"No compatible providers added yet"}),(0,s.jsx)("p",{className:"text-text-muted text-xs mt-1",children:"Use the buttons above to add OpenAI or Anthropic compatible endpoints"})]}):(0,s.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 sm:gap-4 lg:grid-cols-3 xl:grid-cols-4",children:[...L,...M].map(e=>(0,s.jsx)(C,{providerId:e.id,provider:e,stats:K(e.id,"apikey"),authType:"compatible",onToggle:t=>D(e.id,"apikey",t)},e.id))})]}),(0,s.jsx)(k,{isOpen:g,onClose:()=>v(!1),onCreated:e=>{o(t=>[...t,e]),v(!1)}}),(0,s.jsx)(T,{isOpen:j,onClose:()=>N(!1),onCreated:e=>{o(t=>[...t,e]),N(!1)}}),(0,s.jsx)(y,{isOpen:A,onClose:()=>U(!1),notify:E,onImported:({node:e,connection:t})=>{o(t=>[...t,e]),t&&l(e=>[...e,t]),U(!1)}}),O&&(0,s.jsxs)("div",{className:"fixed inset-0 z-50 flex items-start justify-center px-3 pt-[6vh] sm:pt-[10vh]",onClick:()=>P(null),children:[(0,s.jsx)("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm"}),(0,s.jsxs)("div",{className:"relative bg-surface border border-border rounded-xl w-full max-w-[600px] max-h-[86vh] sm:max-h-[80vh] overflow-y-auto shadow-2xl",onClick:e=>e.stopPropagation(),children:[(0,s.jsxs)("div",{className:"sticky top-0 z-10 flex items-center justify-between px-5 py-3 border-b border-border bg-surface/95 backdrop-blur-sm rounded-t-xl",children:[(0,s.jsx)("h3",{className:"font-semibold",children:"Test Results"}),(0,s.jsx)("button",{onClick:()=>P(null),className:"p-1 rounded-lg hover:bg-bg text-text-muted hover:text-text-main transition-colors","aria-label":"Close test results",children:(0,s.jsx)("span",{className:"material-symbols-outlined text-lg",children:"close"})})]}),(0,s.jsx)("div",{className:"p-5",children:(0,s.jsx)(I,{results:O})})]})]})]})}function w({providerId:e,provider:t,stats:a,authType:r,onToggle:l}){let{connected:i,error:d,errorCode:c,errorTime:p,allDisabled:x}=a,u=!!t.noAuth;return(0,s.jsx)(m(),{href:`/dashboard/providers/${e}`,className:"group min-w-0",children:(0,s.jsx)(n.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${x?"opacity-50":""}`,children:(0,s.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3",children:[(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,s.jsx)("div",{className:"size-8 shrink-0 rounded-lg flex items-center justify-center",style:{backgroundColor:`${t.color?.length>7?t.color:t.color+"15"}`},children:(0,s.jsx)(o.A,{src:`/providers/${t.id}.png`,alt:t.name,size:30,className:"object-contain rounded-lg max-w-[32px] max-h-[32px]",fallbackText:t.textIcon||t.id.slice(0,2).toUpperCase(),fallbackColor:t.color})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("h3",{className:"truncate font-semibold",children:t.name}),(0,s.jsx)("div",{className:"flex min-w-0 items-center gap-1.5 text-xs flex-wrap",children:x?(0,s.jsx)(n.Ex,{variant:"default",size:"sm",children:(0,s.jsxs)("span",{className:"flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"pause_circle"}),"Disabled"]})}):u?(0,s.jsx)(n.Ex,{variant:"success",size:"sm",dot:!0,children:"Ready"}):(0,s.jsxs)(s.Fragment,{children:[j(i,d,c),p&&(0,s.jsx)("span",{className:"text-text-muted",children:p})]})})]})]}),(0,s.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:a.total>0&&(0,s.jsx)("div",{className:"opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:e=>{e.preventDefault(),e.stopPropagation(),l(!!x)},children:(0,s.jsx)(n.lM,{size:"sm",checked:!x,onChange:()=>{},title:x?"Enable provider":"Disable provider"})})})]})})})}function C({providerId:e,provider:t,stats:a,authType:r,onToggle:l}){let{connected:i,error:d,errorCode:p,errorTime:x,allDisabled:u}=a,h=e.startsWith(c.JH),f=e.startsWith(c.DI);return(0,s.jsx)(m(),{href:`/dashboard/providers/${e}`,className:"group min-w-0",children:(0,s.jsx)(n.Zp,{padding:"xs",className:`h-full hover:bg-black/[0.01] dark:hover:bg-white/[0.01] transition-colors cursor-pointer ${u?"opacity-50":""}`,children:(0,s.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3",children:[(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,s.jsx)("div",{className:"size-8 shrink-0 rounded-lg flex items-center justify-center",style:{backgroundColor:`${t.color?.length>7?t.color:t.color+"15"}`},children:(0,s.jsx)(o.A,{src:h?"responses"===t.apiType?"/providers/oai-r.png":"/providers/oai-cc.png":f?"/providers/anthropic-m.png":`/providers/${t.id}.png`,alt:t.name,size:30,className:"object-contain rounded-lg max-w-[30px] max-h-[30px]",fallbackText:t.textIcon||t.id.slice(0,2).toUpperCase(),fallbackColor:t.color})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("h3",{className:"truncate font-semibold",children:t.name}),(0,s.jsx)("div",{className:"flex min-w-0 items-center gap-1.5 text-xs flex-wrap",children:u?(0,s.jsx)(n.Ex,{variant:"default",size:"sm",children:(0,s.jsxs)("span",{className:"flex items-center gap-1",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"pause_circle"}),"Disabled"]})}):(0,s.jsxs)(s.Fragment,{children:[j(i,d,p),h&&(0,s.jsx)(n.Ex,{variant:"default",size:"sm",children:"responses"===t.apiType?"Responses":"Chat"}),f&&(0,s.jsx)(n.Ex,{variant:"default",size:"sm",children:"Messages"}),x&&(0,s.jsx)("span",{className:"text-text-muted",children:x})]})})]})]}),(0,s.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:a.total>0&&(0,s.jsx)("div",{className:"opacity-100 transition-opacity sm:opacity-0 sm:group-hover:opacity-100",onClick:e=>{e.preventDefault(),e.stopPropagation(),l(!!u)},children:(0,s.jsx)(n.lM,{size:"sm",checked:!u,onChange:()=>{},title:u?"Enable provider":"Disable provider"})})})]})})})}function k({isOpen:e,onClose:t,onCreated:a}){let[l,i]=(0,r.useState)({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),[o,d]=(0,r.useState)(!1),[c,p]=(0,r.useState)(""),[m,x]=(0,r.useState)(""),[u,h]=(0,r.useState)(!1),[f,b]=(0,r.useState)(null);(0,r.useEffect)(()=>{i(e=>({...e,baseUrl:"https://api.openai.com/v1"}))},[l.apiType]);let g=async()=>{if(l.name.trim()&&l.prefix.trim()&&l.baseUrl.trim()){d(!0);try{let e=await fetch("/api/provider-nodes",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:l.name,prefix:l.prefix,apiType:l.apiType,baseUrl:l.baseUrl,type:"openai-compatible"})}),t=await e.json();e.ok&&(a(t.node),i({name:"",prefix:"",apiType:"chat",baseUrl:"https://api.openai.com/v1"}),p(""),b(null))}catch(e){console.log("Error creating OpenAI Compatible node:",e)}finally{d(!1)}}},v=async()=>{h(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:l.baseUrl,apiKey:c,type:"openai-compatible",modelId:m.trim()||void 0})}),t=await e.json();t.normalizedBaseUrl&&i(e=>({...e,baseUrl:t.normalizedBaseUrl,apiType:t.inferredApiType||e.apiType})),b(t)}catch{b({valid:!1,error:"Network error"})}finally{h(!1)}};return(0,s.jsx)(n.aF,{isOpen:e,title:"Add OpenAI Compatible",onClose:t,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)(n.pd,{label:"Name",value:l.name,onChange:e=>i({...l,name:e.target.value}),placeholder:"OpenAI Compatible (Prod)",hint:"Required. A friendly label for this node."}),(0,s.jsx)(n.pd,{label:"Prefix",value:l.prefix,onChange:e=>i({...l,prefix:e.target.value}),placeholder:"oc-prod",hint:"Required. Used as the provider prefix for model IDs."}),(0,s.jsx)(n.l6,{label:"API Type",options:[{value:"chat",label:"Chat Completions"},{value:"responses",label:"Responses API"}],value:l.apiType,onChange:e=>i({...l,apiType:e.target.value})}),(0,s.jsx)(n.pd,{label:"Base URL",value:l.baseUrl,onChange:e=>i({...l,baseUrl:e.target.value}),placeholder:"https://api.openai.com/v1",hint:"Use the base URL (ending in /v1) for your OpenAI-compatible API."}),(0,s.jsx)(n.pd,{label:"API Key (for Check)",type:"password",value:c,onChange:e=>p(e.target.value)}),(0,s.jsx)(n.pd,{label:"Model ID (optional)",value:m,onChange:e=>x(e.target.value),placeholder:"e.g. gpt-4, claude-3-opus",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[(0,s.jsx)(n.$n,{onClick:v,disabled:!c||u||!l.baseUrl.trim(),variant:"secondary",className:"w-full sm:w-auto",children:u?"Checking...":"Check"}),(()=>{if(!f)return null;let{valid:e,error:t,method:a}=f;return e?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.Ex,{variant:"success",children:"Valid"}),"chat"===a&&(0,s.jsx)("span",{className:"text-sm text-text-muted",children:"(via inference test)"})]}):(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)(n.Ex,{variant:"error",children:"Invalid"}),t&&(0,s.jsx)("span",{className:"text-sm text-red-500",children:t})]})})()]}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[(0,s.jsx)(n.$n,{onClick:g,fullWidth:!0,disabled:!l.name.trim()||!l.prefix.trim()||!l.baseUrl.trim()||o,children:o?"Creating...":"Create"}),(0,s.jsx)(n.$n,{onClick:t,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function T({isOpen:e,onClose:t,onCreated:a}){let[l,i]=(0,r.useState)({name:"",prefix:"",baseUrl:"https://api.anthropic.com/v1"}),[o,d]=(0,r.useState)(!1),[c,p]=(0,r.useState)(""),[m,x]=(0,r.useState)(""),[u,h]=(0,r.useState)(!1),[f,b]=(0,r.useState)(null);(0,r.useEffect)(()=>{e&&(b(null),p(""),x(""))},[e]);let g=async()=>{if(l.name.trim()&&l.prefix.trim()&&l.baseUrl.trim()){d(!0);try{let e=await fetch("/api/provider-nodes",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:l.name,prefix:l.prefix,baseUrl:l.baseUrl,type:"anthropic-compatible"})}),t=await e.json();e.ok&&(a(t.node),i({name:"",prefix:"",baseUrl:"https://api.anthropic.com/v1"}),p(""),b(null))}catch(e){console.log("Error creating Anthropic Compatible node:",e)}finally{d(!1)}}},v=async()=>{h(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:l.baseUrl,apiKey:c,type:"anthropic-compatible",modelId:m.trim()||void 0})}),t=await e.json();t.normalizedBaseUrl&&i(e=>({...e,baseUrl:t.normalizedBaseUrl})),b(t)}catch{b({valid:!1,error:"Network error"})}finally{h(!1)}};return(0,s.jsx)(n.aF,{isOpen:e,title:"Add Anthropic Compatible",onClose:t,children:(0,s.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,s.jsx)(n.pd,{label:"Name",value:l.name,onChange:e=>i({...l,name:e.target.value}),placeholder:"Anthropic Compatible (Prod)",hint:"Required. A friendly label for this node."}),(0,s.jsx)(n.pd,{label:"Prefix",value:l.prefix,onChange:e=>i({...l,prefix:e.target.value}),placeholder:"ac-prod",hint:"Required. Used as the provider prefix for model IDs."}),(0,s.jsx)(n.pd,{label:"Base URL",value:l.baseUrl,onChange:e=>i({...l,baseUrl:e.target.value}),placeholder:"https://api.anthropic.com/v1",hint:"Use the base URL (ending in /v1) for your Anthropic-compatible API. The system will append /messages."}),(0,s.jsx)(n.pd,{label:"API Key (for Check)",type:"password",value:c,onChange:e=>p(e.target.value)}),(0,s.jsx)(n.pd,{label:"Model ID (optional)",value:m,onChange:e=>x(e.target.value),placeholder:"e.g. claude-3-opus",hint:"If provider lacks /models endpoint, enter a model ID to validate via chat/completions instead."}),(0,s.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center",children:[(0,s.jsx)(n.$n,{onClick:v,disabled:!c||u||!l.baseUrl.trim(),variant:"secondary",className:"w-full sm:w-auto",children:u?"Checking...":"Check"}),(()=>{if(!f)return null;let{valid:e,error:t,method:a}=f;return e?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.Ex,{variant:"success",children:"Valid"}),"chat"===a&&(0,s.jsx)("span",{className:"text-sm text-text-muted",children:"(via inference test)"})]}):(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)(n.Ex,{variant:"error",children:"Invalid"}),t&&(0,s.jsx)("span",{className:"text-sm text-red-500",children:t})]})})()]}),(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[(0,s.jsx)(n.$n,{onClick:g,fullWidth:!0,disabled:!l.name.trim()||!l.prefix.trim()||!l.baseUrl.trim()||o,children:o?"Creating...":"Create"}),(0,s.jsx)(n.$n,{onClick:t,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}function I({results:e}){if(e.error&&!e.results)return(0,s.jsxs)("div",{className:"text-center py-6",children:[(0,s.jsx)("span",{className:"material-symbols-outlined text-red-500 text-[32px] mb-2 block",children:"error"}),(0,s.jsx)("p",{className:"text-sm text-red-400",children:e.error})]});let{summary:t,mode:a}=e,r=e.results||[];return(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-3",children:[t&&(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs mb-1 sm:gap-3",children:[(0,s.jsxs)("span",{className:"text-text-muted",children:[{oauth:"OAuth",free:"Free",apikey:"API Key",provider:"Provider",all:"All"}[a]||a," Test"]}),(0,s.jsxs)("span",{className:"px-2 py-0.5 rounded bg-emerald-500/15 text-emerald-400 font-medium",children:[t.passed," passed"]}),t.failed>0&&(0,s.jsxs)("span",{className:"px-2 py-0.5 rounded bg-red-500/15 text-red-400 font-medium",children:[t.failed," failed"]}),(0,s.jsxs)("span",{className:"text-text-muted sm:ml-auto",children:[t.total," tested"]})]}),r.map((e,t)=>(0,s.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2 rounded-lg bg-black/[0.03] px-3 py-2 text-xs dark:bg-white/[0.03] sm:flex-nowrap",children:[(0,s.jsx)("span",{className:`material-symbols-outlined text-[16px] ${e.valid?"text-emerald-500":"text-red-500"}`,children:e.valid?"check_circle":"error"}),(0,s.jsxs)("div",{className:"min-w-0 flex-[1_1_160px]",children:[(0,s.jsx)("span",{className:"block truncate font-medium sm:inline",children:e.connectionName}),(0,s.jsxs)("span",{className:"block truncate text-text-muted sm:ml-1.5 sm:inline",children:["(",e.provider,")"]})]}),void 0!==e.latencyMs&&(0,s.jsxs)("span",{className:"shrink-0 text-text-muted font-mono tabular-nums",children:[e.latencyMs,"ms"]}),(0,s.jsx)("span",{className:`shrink-0 text-[10px] uppercase font-bold px-1.5 py-0.5 rounded ${e.valid?"bg-emerald-500/15 text-emerald-400":"bg-red-500/15 text-red-400"}`,children:e.valid?"OK":e.diagnosis?.type||"ERROR"})]},e.connectionId||t)),0===r.length&&(0,s.jsx)("div",{className:"text-center py-4 text-text-muted text-sm",children:"No active connections found for this group."})]})}y.propTypes={isOpen:i().bool.isRequired,onClose:i().func.isRequired,onImported:i().func,notify:i().shape({success:i().func.isRequired,error:i().func.isRequired}).isRequired},w.propTypes={providerId:i().string.isRequired,provider:i().shape({id:i().string.isRequired,name:i().string.isRequired,color:i().string,textIcon:i().string}).isRequired,stats:i().shape({connected:i().number,error:i().number,errorCode:i().string,errorTime:i().string}).isRequired,authType:i().string,onToggle:i().func},C.propTypes={providerId:i().string.isRequired,provider:i().shape({id:i().string.isRequired,name:i().string.isRequired,color:i().string,textIcon:i().string,apiType:i().string}).isRequired,stats:i().shape({connected:i().number,error:i().number,errorCode:i().string,errorTime:i().string}).isRequired,authType:i().string,onToggle:i().func},k.propTypes={isOpen:i().bool.isRequired,onClose:i().func.isRequired,onCreated:i().func.isRequired},T.propTypes={isOpen:i().bool.isRequired,onClose:i().func.isRequired,onCreated:i().func.isRequired},I.propTypes={results:i().shape({mode:i().string,results:i().array,summary:i().shape({total:i().number,passed:i().number,failed:i().number}),error:i().string}).isRequired}},67096:(e,t,a)=>{Promise.resolve().then(a.bind(a,12572))}},e=>{e.O(0,[2574,3862,1051,1321,5497,8441,3794,7358],()=>e(e.s=67096)),_N_E=e.O()}]);
@@ -1,4 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6812],{22248:(e,t,r)=>{Promise.resolve().then(r.bind(r,57076))},57076:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>n});var l=r(95155),s=r(12115),o=r(35497),a=r(65921);function i(e={}){return{name:e.name||"",proxyUrl:e.proxyUrl||"",noProxy:e.noProxy||"",isActive:!1!==e.isActive,strictProxy:!0===e.strictProxy}}function n(){let[e,t]=(0,s.useState)([]),[r,n]=(0,s.useState)(!0),[d,c]=(0,s.useState)(!1),[x,p]=(0,s.useState)(!1),[m,h]=(0,s.useState)(!1),[u,y]=(0,s.useState)(!1),[f,g]=(0,s.useState)(!1),[j,b]=(0,s.useState)(!1),[v,k]=(0,s.useState)(null),[N,w]=(0,s.useState)(i()),[C,P]=(0,s.useState)(""),[$,D]=(0,s.useState)({vercelToken:"",projectName:"vercel-relay"}),[S,T]=(0,s.useState)({accountId:"",apiToken:"",projectName:"cloudflare-relay"}),[A,E]=(0,s.useState)({denoToken:"",orgDomain:"",projectName:""}),[I,U]=(0,s.useState)(!1),[O,z]=(0,s.useState)(!1),[F,W]=(0,s.useState)(!1),[R,_]=(0,s.useState)(null),[L,q]=(0,s.useState)([]),[V,J]=(0,s.useState)(!1),[B,G]=(0,s.useState)({current:0,total:0}),[M,H]=(0,s.useState)(!1),[Y,Q]=(0,s.useState)(null),K=(0,s.useRef)(null),Z=(0,a.i)();(0,s.useEffect)(()=>{let e=e=>{K.current&&!K.current.contains(e.target)&&b(!1)};return j&&document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[j]);let X=(0,s.useCallback)(async()=>{try{let e=await fetch("/api/proxy-pools?includeUsage=true",{cache:"no-store"}),r=await e.json();e.ok&&t(r.proxyPools||[])}catch(e){console.log("Error fetching proxy pools:",e)}finally{n(!1)}},[]);(0,s.useEffect)(()=>{fetch("/api/auth/me").then(e=>e.json()).then(e=>{"sub_user"===e.role&&(window.location.href="/dashboard/usage")}).catch(()=>{}),X()},[X]);let ee=()=>{k(null),w(i())},et=()=>{ee(),c(!0)},er=()=>{c(!1),ee()},el=async()=>{let e={name:N.name.trim(),proxyUrl:N.proxyUrl.trim(),noProxy:N.noProxy.trim(),isActive:!0===N.isActive,strictProxy:!0===N.strictProxy};if(e.name&&e.proxyUrl){U(!0);try{let t=!!v,r=await fetch(t?`/api/proxy-pools/${v.id}`:"/api/proxy-pools",{method:t?"PUT":"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(r.ok)await X(),er(),Z.success(v?"Proxy pool updated":"Proxy pool created");else{let e=await r.json();Z.error(e.error||"Failed to save proxy pool")}}catch(e){console.log("Error saving proxy pool:",e)}finally{U(!1)}}},es=async e=>{Q({title:"Delete Proxy Pool",message:`Delete proxy pool "${e.name}"?`,onConfirm:async()=>{Q(null);try{let r=await fetch(`/api/proxy-pools/${e.id}`,{method:"DELETE"});if(r.ok){t(t=>t.filter(t=>t.id!==e.id)),Z.success("Proxy pool deleted");return}let l=await r.json();409===r.status?Z.warning(`Cannot delete: ${l.boundConnectionCount||0} connection(s) are still using this pool.`):Z.error(l.error||"Failed to delete proxy pool")}catch(e){console.log("Error deleting proxy pool:",e),Z.error("Failed to delete proxy pool")}}})},eo=async e=>{_(e);try{let t=await fetch(`/api/proxy-pools/${e}/test`,{method:"POST"}),r=await t.json();if(!t.ok)return void Z.error(r.error||"Failed to test proxy");await X(),Z.success(r.ok?"Proxy test passed":"Proxy test failed")}catch(e){console.log("Error testing proxy pool:",e),Z.error("Failed to test proxy")}finally{_(null)}},ea=async e=>{let r=!e.isActive;t(t=>t.map(t=>t.id===e.id?{...t,isActive:r}:t));try{(await fetch(`/api/proxy-pools/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:r})})).ok||(t(t=>t.map(t=>t.id===e.id?{...t,isActive:e.isActive}:t)),Z.error("Failed to update active state"))}catch(r){console.log("Error toggling active:",r),t(t=>t.map(t=>t.id===e.id?{...t,isActive:e.isActive}:t))}},ei=e.length>0&&L.length===e.length,en=()=>q([]),ed=async t=>{let r=L.length>0?L:e.map(e=>e.id);if(0!==r.length){H(!0);try{let e=0,l=0;for(let s of r)try{(await fetch(`/api/proxy-pools/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:t})})).ok?e+=1:l+=1}catch{l+=1}await X(),Z.success(`${t?"Activated":"Deactivated"} ${e}${l?`, failed ${l}`:""}`)}finally{H(!1)}}},ec=async()=>{0!==L.length&&Q({title:"Delete Proxy Pools",message:`Delete ${L.length} proxy pool(s)?`,onConfirm:async()=>{Q(null),H(!0);try{let e=0,t=0,r=0;for(let l of L)try{let s=await fetch(`/api/proxy-pools/${l}`,{method:"DELETE"});s.ok?e+=1:409===s.status?t+=1:r+=1}catch{r+=1}await X(),en(),Z.success(`Deleted ${e}${t?`, ${t} bound`:""}${r?`, ${r} failed`:""}`)}finally{H(!1)}}})},ex=async()=>{let t=L.length>0?e.filter(e=>L.includes(e.id)):e;if(0===t.length)return;J(!0),G({current:0,total:t.length});let r=0,l=[],s=0,o=[...t],a=async()=>{for(;o.length>0;){let e=o.shift();if(!e)break;try{let t=await fetch(`/api/proxy-pools/${e.id}/test`,{method:"POST"}),s=await t.json();t.ok&&s.ok?r+=1:l.push(e.id)}catch{l.push(e.id)}finally{G({current:s+=1,total:t.length})}}};await Promise.all(Array.from({length:Math.min(10,t.length)},a)),await X(),J(!1),G({current:0,total:0}),l.length>0?Q({title:"Disable Dead Proxies",message:`Alive: ${r}, Dead: ${l.length}.
2
-
3
- Disable ${l.length} dead proxies?`,onConfirm:async()=>{Q(null),H(!0);try{for(let e of l)try{await fetch(`/api/proxy-pools/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:!1})})}catch{}await X(),Z.success(`Disabled ${l.length} dead proxies`)}finally{H(!1)}}}):Z.success(`Health check done. Alive: ${r}, Dead: ${l.length}`)};(0,s.useEffect)(()=>{q(t=>t.filter(t=>e.some(e=>e.id===t)))},[e]);let ep=()=>{O||p(!1)},em=()=>{F||h(!1)},eh=()=>{F||y(!1)},eu=()=>{F||g(!1)},ey=async()=>{if($.vercelToken.trim()){W(!0);try{let e=await fetch("/api/proxy-pools/vercel-deploy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify($)}),t=await e.json();e.ok?(await X(),em(),Z.success(`Deployed: ${t.deployUrl}`)):Z.error(t.error||"Deploy failed")}catch(e){console.log("Error deploying Vercel relay:",e),Z.error("Deploy failed")}finally{W(!1)}}},ef=async()=>{if(S.accountId.trim()&&S.apiToken.trim()){W(!0);try{let e=await fetch("/api/proxy-pools/cloudflare-deploy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(S)}),t=await e.json();e.ok?(await X(),eh(),Z.success(`Deployed: ${t.deployUrl}`)):Z.error(t.error||"Deploy failed")}catch(e){console.log("Error deploying Cloudflare relay:",e),Z.error("Deploy failed")}finally{W(!1)}}},eg=async()=>{if(A.denoToken.trim()){W(!0);try{let e=await fetch("/api/proxy-pools/deno-deploy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(A)}),t=await e.json();e.ok?(await X(),eu(),Z.success(`Deployed: ${t.deployUrl}`)):Z.error(t.error||"Deploy failed")}catch(e){console.log("Error deploying Deno relay:",e),Z.error("Deploy failed")}finally{W(!1)}}},ej=async()=>{let t=C.split(/\r?\n/).map(e=>e.trim()).filter(Boolean);if(0===t.length)return void Z.warning("Please paste at least one proxy line.");let r=[],l=[];if(t.forEach((e,t)=>{try{let l=(e=>{let t=e.trim();if(!t)return null;if(t.includes("://")){let e=new URL(t),r=e.port?`${e.hostname}:${e.port}`:e.hostname;return{proxyUrl:e.toString(),name:`Imported ${r}`}}let r=t.split(":");if(4===r.length){let[e,t,l,s]=r;if(!e||!t||!l||!s)throw Error("Invalid host:port:user:pass format");return{proxyUrl:new URL(`http://${encodeURIComponent(l)}:${encodeURIComponent(s)}@${e}:${t}`).toString(),name:`Imported ${e}:${t}`}}throw Error("Unsupported format")})(e);l&&r.push({...l,lineNumber:t+1})}catch(e){l.push(`Line ${t+1}: ${e.message}`)}}),l.length>0)return void Z.error(`Invalid proxy format:
4
- ${l.join("\n")}`);z(!0);try{let t=new Set(e.map(e=>`${(e.proxyUrl||"").trim()}|||${(e.noProxy||"").trim()}`)),l=0,s=0,o=0;for(let e of r){let r=`${e.proxyUrl}|||`;if(t.has(r)){s+=1;continue}(await fetch("/api/proxy-pools",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e.name,proxyUrl:e.proxyUrl,noProxy:"",isActive:!0})})).ok?(l+=1,t.add(r)):o+=1}await X(),p(!1),Z.success(`Batch import completed: Created ${l}, Skipped ${s}, Failed ${o}`)}catch(e){console.log("Error batch importing proxies:",e),Z.error("Batch import failed")}finally{z(!1)}},eb=(0,s.useMemo)(()=>e.filter(e=>!0===e.isActive).length,[e]);return r?(0,l.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:gap-6 sm:px-0",children:[(0,l.jsx)(o.Qv,{}),(0,l.jsx)(o.Qv,{})]}):(0,l.jsxs)("div",{className:"mx-auto flex w-full max-w-5xl flex-col gap-4 px-1 sm:gap-6 sm:px-0",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,l.jsx)("div",{className:"min-w-0",children:(0,l.jsx)("h1",{className:"text-xl font-semibold sm:text-2xl",children:"Proxy Pools"})}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:flex sm:items-center",children:[(0,l.jsxs)("div",{className:"relative",ref:K,children:[(0,l.jsxs)(o.$n,{size:"sm",variant:"secondary",icon:"rocket_launch",onClick:()=>b(!j),children:["Deploy Relay",(0,l.jsx)("span",{className:"material-symbols-outlined ml-1 text-[18px]",children:j?"expand_less":"expand_more"})]}),j&&(0,l.jsxs)("div",{className:"absolute left-0 top-full z-50 mt-1 w-48 rounded-xl border border-black/10 bg-white p-1 shadow-xl dark:border-white/10 dark:bg-zinc-900 sm:left-auto sm:right-0",children:[(0,l.jsxs)("button",{onClick:()=>{T({accountId:"",apiToken:"",projectName:"cloudflare-relay"}),y(!0),b(!1)},className:"flex w-full items-center gap-2 rounded-lg px-3 py-2 text-sm text-text-main transition-colors hover:bg-black/5 dark:hover:bg-white/5",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[20px] text-orange-500",children:"cloud"}),"Cloudflare Relay"]}),(0,l.jsxs)("button",{onClick:()=>{D({vercelToken:"",projectName:"vercel-relay"}),h(!0),b(!1)},className:"flex w-full items-center gap-2 rounded-lg px-3 py-2 text-sm text-text-main transition-colors hover:bg-black/5 dark:hover:bg-white/5",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[20px] text-blue-500",children:"cloud_upload"}),"Vercel Relay"]}),(0,l.jsxs)("button",{onClick:()=>{E({denoToken:"",orgDomain:"",projectName:""}),g(!0),b(!1)},className:"flex w-full items-center gap-2 rounded-lg px-3 py-2 text-sm text-text-main transition-colors hover:bg-black/5 dark:hover:bg-white/5",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[20px] text-green-500",children:"terminal"}),"Deno Relay"]})]})]}),(0,l.jsx)(o.$n,{size:"sm",variant:"secondary",icon:"upload",onClick:()=>{P(""),p(!0)},children:"Batch Import"}),(0,l.jsx)(o.$n,{size:"sm",icon:"add",onClick:et,children:"Add Proxy Pool"})]})]}),(0,l.jsxs)(o.Zp,{children:[(0,l.jsxs)("div",{className:"mb-4 flex flex-wrap items-center gap-2",children:[e.length>0&&(0,l.jsxs)("label",{className:"flex items-center gap-1.5 text-xs text-text-muted cursor-pointer",children:[(0,l.jsx)("input",{type:"checkbox",checked:ei,onChange:()=>q(ei?[]:e.map(e=>e.id)),className:"size-4 rounded border-black/20 dark:border-white/20"}),ei?"Unselect all":"Select all"]}),(0,l.jsxs)(o.Ex,{variant:"default",children:["Total: ",e.length]}),(0,l.jsxs)(o.Ex,{variant:"success",children:["Active: ",eb]})]}),(L.length>0||V)&&(0,l.jsxs)("div",{className:"mb-4 flex flex-wrap items-center gap-2 rounded-lg border border-primary/30 bg-primary/5 px-3 py-2",children:[(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px] text-primary",children:"checklist"}),(0,l.jsx)("span",{className:"text-xs font-medium text-primary",children:L.length>0?`${L.length} selected`:"All pools"}),(0,l.jsxs)("div",{className:"ml-auto flex flex-wrap items-center gap-2",children:[(0,l.jsx)(o.$n,{size:"sm",icon:V?"progress_activity":"health_and_safety",onClick:ex,disabled:V||M||0===e.length,children:V?`Checking ${B.current}/${B.total}`:"Health Check"}),L.length>0&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(o.$n,{size:"sm",variant:"secondary",icon:"toggle_on",onClick:()=>ed(!0),disabled:M||V,children:"Activate"}),(0,l.jsx)(o.$n,{size:"sm",variant:"secondary",icon:"toggle_off",onClick:()=>ed(!1),disabled:M||V,children:"Deactivate"}),(0,l.jsx)(o.$n,{size:"sm",variant:"secondary",icon:"delete",onClick:ec,disabled:M||V,children:"Delete"}),(0,l.jsx)(o.$n,{size:"sm",variant:"ghost",onClick:en,disabled:M||V,children:"Clear"})]})]})]}),0===e.length?(0,l.jsxs)("div",{className:"text-center py-10",children:[(0,l.jsx)("p",{className:"text-text-main font-medium mb-1",children:"No proxy pool entries yet"}),(0,l.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Create a proxy pool entry, then assign it to connections."}),(0,l.jsx)(o.$n,{icon:"add",onClick:et,children:"Add Proxy Pool"})]}):(0,l.jsx)("div",{className:"flex flex-col divide-y divide-black/[0.04] dark:divide-white/[0.05]",children:e.map(e=>{var t;return(0,l.jsxs)("div",{className:"flex flex-col gap-3 py-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsxs)("div",{className:"flex items-start gap-3 min-w-0 flex-1",children:[(0,l.jsx)("input",{type:"checkbox",checked:L.includes(e.id),onChange:()=>{let t;return t=e.id,q(e=>e.includes(t)?e.filter(e=>e!==t):[...e,t])},className:"mt-1 size-4 shrink-0 rounded border-black/20 dark:border-white/20"}),(0,l.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,l.jsx)("p",{className:"min-w-0 max-w-full truncate text-sm font-medium sm:max-w-[18rem]",children:e.name}),(0,l.jsx)(o.Ex,{variant:"active"===(t=e.testStatus)?"success":"error"===t?"error":"default",size:"sm",dot:!0,children:e.testStatus||"unknown"}),(0,l.jsx)(o.Ex,{variant:e.isActive?"success":"default",size:"sm",children:e.isActive?"active":"inactive"}),"vercel"===e.type&&(0,l.jsx)(o.Ex,{variant:"default",size:"sm",children:"vercel relay"}),"cloudflare"===e.type&&(0,l.jsx)(o.Ex,{variant:"default",size:"sm",children:"cloudflare relay"}),(0,l.jsxs)(o.Ex,{variant:"default",size:"sm",children:[e.boundConnectionCount||0," bound"]})]}),(0,l.jsx)("p",{className:"text-xs text-text-muted truncate mt-1",children:e.proxyUrl}),e.noProxy?(0,l.jsxs)("p",{className:"text-xs text-text-muted truncate",children:["No proxy: ",e.noProxy]}):null,(0,l.jsxs)("p",{className:"text-[11px] text-text-muted mt-1",children:["Last tested: ",function(e){if(!e)return"Never";let t=new Date(e);return Number.isNaN(t.getTime())?"Never":t.toLocaleString()}(e.lastTestedAt),e.lastError?` \xb7 ${e.lastError}`:""]})]})]}),(0,l.jsxs)("div",{className:"flex items-center justify-end gap-1",children:[(0,l.jsx)(o.lM,{size:"sm",checked:!0===e.isActive,onChange:()=>ea(e),title:e.isActive?"Disable":"Enable"}),(0,l.jsx)("button",{onClick:()=>eo(e.id),className:"p-2 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary",title:"Test proxy",disabled:R===e.id,children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",style:R===e.id?{animation:"spin 1s linear infinite"}:void 0,children:R===e.id?"progress_activity":"science"})}),(0,l.jsx)("button",{onClick:()=>{k(e),w(i(e)),c(!0)},className:"p-2 rounded hover:bg-black/5 dark:hover:bg-white/5 text-text-muted hover:text-primary",title:"Edit",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"edit"})}),(0,l.jsx)("button",{onClick:()=>es(e),className:"p-2 rounded hover:bg-red-500/10 text-red-500",title:"Delete",children:(0,l.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]})]},e.id)})})]}),(0,l.jsx)(o.aF,{isOpen:x,title:"Batch Import Proxies",onClose:ep,children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("label",{className:"text-sm font-medium text-text-main mb-1 block",children:"Paste Proxy List (One per line)"}),(0,l.jsx)("textarea",{value:C,onChange:e=>P(e.target.value),placeholder:"http://user:pass@127.0.0.1:7897\n127.0.0.1:7897:user:pass",className:"w-full min-h-[180px] py-2 px-3 text-sm text-text-main bg-white dark:bg-white/5 border border-black/10 dark:border-white/10 rounded-md focus:ring-1 focus:ring-primary/30 focus:border-primary/50 focus:outline-none transition-all"}),(0,l.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Supported formats: protocol://user:pass@host:port, host:port:user:pass"})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,l.jsx)(o.$n,{fullWidth:!0,onClick:ej,disabled:!C.trim()||O,children:O?"Importing...":"Import"}),(0,l.jsx)(o.$n,{fullWidth:!0,variant:"ghost",onClick:ep,disabled:O,children:"Cancel"})]})]})}),(0,l.jsx)(o.aF,{isOpen:m,title:"Deploy Vercel Relay",onClose:em,children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"rounded-lg bg-blue-500/5 border border-blue-500/10 p-3 flex flex-col gap-1.5",children:[(0,l.jsx)("p",{className:"text-sm text-text-main font-medium",children:"What is Vercel Relay?"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"Deploys an edge relay function to Vercel. All AI provider requests will be forwarded through Vercel's edge network, masking your real IP from providers."}),(0,l.jsxs)("ul",{className:"text-xs text-text-muted list-disc pl-4 space-y-0.5",children:[(0,l.jsx)("li",{children:"Your IP is replaced by Vercel's dynamic edge IPs (hundreds of IPs across 20+ global regions)"}),(0,l.jsx)("li",{children:"Vercel serves millions of apps — providers can't block Vercel IPs without affecting legitimate traffic"}),(0,l.jsx)("li",{children:"Free tier: 100GB bandwidth/month, 500K edge invocations"}),(0,l.jsx)("li",{children:"Deploy multiple relays on different accounts for more IP diversity"})]})]}),(0,l.jsx)(o.pd,{label:"Vercel API Token",value:$.vercelToken,onChange:e=>D(t=>({...t,vercelToken:e.target.value})),placeholder:"your-vercel-api-token",hint:(0,l.jsxs)(l.Fragment,{children:["Token is used once for deployment and not stored. ",(0,l.jsx)("a",{href:"https://vercel.com/account/tokens",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Get token →"})]}),type:"password"}),(0,l.jsx)(o.pd,{label:"Project Name",value:$.projectName,onChange:e=>D(t=>({...t,projectName:e.target.value})),placeholder:"my-relay",hint:"Unique name for your Vercel project. Leave empty for auto-generated name."}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,l.jsx)(o.$n,{fullWidth:!0,onClick:ey,disabled:!$.vercelToken.trim()||F,children:F?"Deploying... (may take ~1 min)":"Deploy"}),(0,l.jsx)(o.$n,{fullWidth:!0,variant:"ghost",onClick:em,disabled:F,children:"Cancel"})]})]})}),(0,l.jsx)(o.aF,{isOpen:u,title:"Deploy Cloudflare Relay",onClose:eh,children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"rounded-lg bg-orange-500/5 border border-orange-500/10 p-3 flex flex-col gap-1.5",children:[(0,l.jsx)("p",{className:"text-sm text-text-main font-medium",children:"What is Cloudflare Relay?"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"Deploys a Cloudflare Worker as a proxy relay. All AI provider requests will be forwarded through Cloudflare's global edge network."}),(0,l.jsxs)("ul",{className:"text-xs text-text-muted list-disc pl-4 space-y-0.5",children:[(0,l.jsx)("li",{children:"High performance global routing and IP masking via Cloudflare Workers"}),(0,l.jsx)("li",{children:"Free tier: 100,000 requests per day"}),(0,l.jsx)("li",{children:"Requires Cloudflare Account ID and a Workers API Token (Edit Workers permission)"})]}),(0,l.jsxs)("div",{className:"mt-2 pt-2 border-t border-orange-500/10 text-xs text-text-muted",children:[(0,l.jsx)("p",{className:"font-medium text-text-main mb-1",children:"How to generate your API Token:"}),(0,l.jsxs)("ol",{className:"list-decimal pl-4 space-y-0.5",children:[(0,l.jsxs)("li",{children:["Go to ",(0,l.jsx)("b",{children:"My Profile"})," → ",(0,l.jsx)("b",{children:"API Tokens"})," → ",(0,l.jsx)("b",{children:"Create Token"})]}),(0,l.jsxs)("li",{children:["Scroll down to ",(0,l.jsx)("b",{children:"Custom Token"})," and click ",(0,l.jsx)("b",{children:"Get started"})]}),(0,l.jsxs)("li",{children:["Under ",(0,l.jsx)("b",{children:"Permissions"}),": Account | Workers Scripts | Edit"]}),(0,l.jsxs)("li",{children:["Under ",(0,l.jsx)("b",{children:"Account Resources"}),": Include | Account | ",(0,l.jsx)("i",{children:"Your Account Name"})]}),(0,l.jsxs)("li",{children:["Click ",(0,l.jsx)("b",{children:"Continue to summary"})," → ",(0,l.jsx)("b",{children:"Create Token"})]})]})]})]}),(0,l.jsx)(o.pd,{label:"Account ID",value:S.accountId,onChange:e=>T(t=>({...t,accountId:e.target.value})),placeholder:"your-cloudflare-account-id",hint:(0,l.jsx)(l.Fragment,{children:"Found on the right side of the Cloudflare dashboard overview page."})}),(0,l.jsx)(o.pd,{label:"API Token",value:S.apiToken,onChange:e=>T(t=>({...t,apiToken:e.target.value})),placeholder:"your-cloudflare-api-token",hint:(0,l.jsxs)(l.Fragment,{children:['Requires "Workers Scripts: Edit" permission. ',(0,l.jsx)("a",{href:"https://dash.cloudflare.com/profile/api-tokens",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"Get token →"})]}),type:"password"}),(0,l.jsx)(o.pd,{label:"Worker Name",value:S.projectName,onChange:e=>T(t=>({...t,projectName:e.target.value})),placeholder:"my-relay",hint:"Unique name for your Cloudflare Worker. Leave empty for auto-generated name."}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,l.jsx)(o.$n,{fullWidth:!0,onClick:ef,disabled:!S.accountId.trim()||!S.apiToken.trim()||F,children:F?"Deploying...":"Deploy Worker"}),(0,l.jsx)(o.$n,{fullWidth:!0,variant:"ghost",onClick:eh,disabled:F,children:"Cancel"})]})]})}),(0,l.jsx)(o.aF,{isOpen:f,title:"Deploy Deno Relay",onClose:eu,children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"rounded-lg bg-black/5 dark:bg-white/5 border border-black/10 dark:border-white/10 p-3 flex flex-col gap-1.5",children:[(0,l.jsx)("p",{className:"text-sm text-text-main font-medium",children:"What is Deno Relay?"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"Deploys a relay worker to Deno Deploy's global edge network. All AI provider requests are forwarded through Deno's edge, masking your real IP."}),(0,l.jsxs)("ul",{className:"text-xs text-text-muted list-disc pl-4 space-y-0.5",children:[(0,l.jsx)("li",{children:"Deno Deploy v2 runs on a high-performance global edge network"}),(0,l.jsx)("li",{children:"Free tier: 1M requests & 100GiB outbound traffic per month"}),(0,l.jsx)("li",{children:"No per-request CPU time limits (unlike Vercel/Cloudflare)"}),(0,l.jsx)("li",{children:"Support up to 20 active apps & 50 custom domains"}),(0,l.jsx)("li",{children:"Deploy multiple relays for maximum IP diversity"})]}),(0,l.jsxs)("div",{className:"mt-2 pt-2 border-t border-black/10 dark:border-white/10 text-xs text-text-muted",children:[(0,l.jsx)("p",{className:"font-medium text-text-main mb-1",children:"How to generate API token:"}),(0,l.jsxs)("ol",{className:"list-decimal pl-4 space-y-0.5",children:[(0,l.jsxs)("li",{children:["Go to ",(0,l.jsx)("b",{children:"console.deno.com"})]}),(0,l.jsxs)("li",{children:["Select your ",(0,l.jsx)("b",{children:"Organization"})," → ",(0,l.jsx)("b",{children:"Settings"})," → ",(0,l.jsx)("b",{children:"Organization Tokens"})]}),(0,l.jsxs)("li",{children:["Create a ",(0,l.jsx)("b",{children:"Organization Token"})," (prefix ",(0,l.jsx)("b",{children:"ddo_"}),")"]})]})]})]}),(0,l.jsx)(o.pd,{label:"Deno Deploy API Token",value:A.denoToken,onChange:e=>E(t=>({...t,denoToken:e.target.value})),placeholder:"ddo_xxxxxxxxxxxxxxxx",hint:(0,l.jsx)(l.Fragment,{children:"Token is used once for deployment, not stored. Found in Organization Settings."}),type:"password"}),(0,l.jsx)(o.pd,{label:"Organization Domain",value:A.orgDomain,onChange:e=>E(t=>({...t,orgDomain:e.target.value})),placeholder:"your-org.deno.net",hint:"Organization's default domain. Your relay URL will be in the format: https://my-relay.your-org.deno.net"}),(0,l.jsx)(o.pd,{label:"App Name",value:A.projectName,onChange:e=>E(t=>({...t,projectName:e.target.value})),placeholder:"deno-relay",hint:"Unique app name. Leave empty for auto-generated name."}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,l.jsx)(o.$n,{fullWidth:!0,onClick:eg,disabled:!A.denoToken.trim()||!A.orgDomain.trim()||F,children:F?"Deploying...":"Deploy Relay"}),(0,l.jsx)(o.$n,{fullWidth:!0,variant:"ghost",onClick:eu,disabled:F,children:"Cancel"})]})]})}),(0,l.jsx)(o.aF,{isOpen:d,title:v?"Edit Proxy Pool":"Add Proxy Pool",onClose:er,children:(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsx)(o.pd,{label:"Name",value:N.name,onChange:e=>w(t=>({...t,name:e.target.value})),placeholder:"Office Proxy"}),(0,l.jsx)(o.pd,{label:"Proxy URL",value:N.proxyUrl,onChange:e=>w(t=>({...t,proxyUrl:e.target.value})),placeholder:"http://127.0.0.1:7897"}),(0,l.jsx)(o.pd,{label:"No Proxy",value:N.noProxy,onChange:e=>w(t=>({...t,noProxy:e.target.value})),placeholder:"localhost,127.0.0.1,.internal",hint:"Comma-separated hosts/domains to bypass proxy"}),(0,l.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-border/50 p-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"font-medium text-sm",children:"Active"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"Inactive pools are ignored by runtime resolution."})]}),(0,l.jsx)(o.lM,{checked:!0===N.isActive,onChange:()=>w(e=>({...e,isActive:!e.isActive})),disabled:I})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-3 rounded-lg border border-border/50 p-3 sm:flex-row sm:items-center sm:justify-between",children:[(0,l.jsxs)("div",{children:[(0,l.jsx)("p",{className:"font-medium text-sm",children:"Strict Proxy"}),(0,l.jsx)("p",{className:"text-xs text-text-muted",children:"Fail request if proxy is unreachable instead of falling back to direct."})]}),(0,l.jsx)(o.lM,{checked:!0===N.strictProxy,onChange:()=>w(e=>({...e,strictProxy:!e.strictProxy})),disabled:I})]}),(0,l.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,l.jsx)(o.$n,{fullWidth:!0,onClick:el,disabled:!N.name.trim()||!N.proxyUrl.trim()||I,children:I?"Saving...":"Save"}),(0,l.jsx)(o.$n,{fullWidth:!0,variant:"ghost",onClick:er,disabled:I,children:"Cancel"})]})]})}),(0,l.jsx)(o.uo,{isOpen:!!Y,onClose:()=>Q(null),onConfirm:Y?.onConfirm,title:Y?.title||"Confirm",message:Y?.message,variant:"danger"})]})}}},e=>{e.O(0,[2574,3862,1051,1321,5497,8441,3794,7358],()=>e(e.s=22248)),_N_E=e.O()}]);