@rsalmn/extremerouter 0.8.5 → 0.8.7

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 (1221) hide show
  1. package/README.id.md +130 -0
  2. package/README.md +73 -32
  3. package/README.zh-CN.md +130 -0
  4. package/app/.next-cli-build/BUILD_ID +1 -1
  5. package/app/.next-cli-build/app-path-routes-manifest.json +31 -14
  6. package/app/.next-cli-build/build-manifest.json +2 -2
  7. package/app/.next-cli-build/prerender-manifest.json +3 -3
  8. package/app/.next-cli-build/routes-manifest.json +106 -0
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page.js +2 -2
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page.js.nft.json +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +3 -3
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +2 -2
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +3 -3
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +2 -2
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page.js +2 -2
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page.js.nft.json +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +2 -2
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +2 -2
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +3 -3
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page.js +2 -2
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page.js.nft.json +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/page_client-reference-manifest.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +2 -2
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +2 -2
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page.js +2 -2
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page.js.nft.json +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page_client-reference-manifest.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js +2 -2
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +4 -4
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +2 -2
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  75. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +2 -2
  76. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  77. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  78. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +2 -2
  79. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  80. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  81. package/app/.next-cli-build/server/app/(dashboard)/dashboard/smart-routing/page.js +2 -0
  82. package/app/.next-cli-build/server/app/(dashboard)/dashboard/smart-routing/page.js.nft.json +1 -0
  83. package/app/.next-cli-build/server/app/(dashboard)/dashboard/smart-routing/page_client-reference-manifest.js +1 -0
  84. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page.js +2 -2
  85. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page.js.nft.json +1 -1
  86. package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page_client-reference-manifest.js +1 -1
  87. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +2 -2
  88. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  89. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  90. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +2 -2
  91. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  92. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  93. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +2 -2
  94. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  95. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  96. package/app/.next-cli-build/server/app/_global-error/page.js +3 -3
  97. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  98. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  99. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  100. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  101. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  102. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  103. package/app/.next-cli-build/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  104. package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
  105. package/app/.next-cli-build/server/app/_global-error.segments/_index.segment.rsc +1 -1
  106. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  107. package/app/.next-cli-build/server/app/_not-found/page.js +2 -2
  108. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  109. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  110. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  111. package/app/.next-cli-build/server/app/_not-found.rsc +6 -6
  112. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +6 -6
  113. package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
  114. package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +6 -6
  115. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  116. package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  117. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  118. package/app/.next-cli-build/server/app/api/alerts/test/route.js +2 -2
  119. package/app/.next-cli-build/server/app/api/alerts/test/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  121. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  122. package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
  123. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  124. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  125. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  127. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  128. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  129. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  130. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  131. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
  133. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/breaker/route.js +1 -1
  135. package/app/.next-cli-build/server/app/api/breaker/route.js.nft.json +1 -1
  136. package/app/.next-cli-build/server/app/api/cache/route.js +1 -1
  137. package/app/.next-cli-build/server/app/api/cache/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +9 -11
  139. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
  141. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
  143. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +5 -2
  145. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +5 -2
  147. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +4 -1
  149. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +5 -2
  151. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
  153. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  155. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +2 -2
  157. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +7 -4
  159. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  160. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +5 -2
  161. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  162. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +10 -9
  163. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  164. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +5 -2
  165. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  166. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +5 -2
  167. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +5 -2
  169. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  170. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +5 -2
  171. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  172. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  173. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/combos/lab/route.js +1 -0
  175. package/app/.next-cli-build/server/app/api/combos/lab/route.js.nft.json +1 -0
  176. package/app/.next-cli-build/server/app/api/combos/lab/route_client-reference-manifest.js +1 -0
  177. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  178. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/combos/simulate/route.js +1 -0
  180. package/app/.next-cli-build/server/app/api/combos/simulate/route.js.nft.json +1 -0
  181. package/app/.next-cli-build/server/app/api/combos/simulate/route_client-reference-manifest.js +1 -0
  182. package/app/.next-cli-build/server/app/api/combos/validate-roles/route.js +1 -1
  183. package/app/.next-cli-build/server/app/api/combos/validate-roles/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/dashboard/stream/route.js +2 -2
  185. package/app/.next-cli-build/server/app/api/dashboard/stream/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  187. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  188. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  189. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/headroom/stop/route.js +2 -2
  191. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/health/overview/route.js +1 -0
  193. package/app/.next-cli-build/server/app/api/health/overview/route.js.nft.json +1 -0
  194. package/app/.next-cli-build/server/app/api/health/overview/route_client-reference-manifest.js +1 -0
  195. package/app/.next-cli-build/server/app/api/health/providers/route.js +1 -1
  196. package/app/.next-cli-build/server/app/api/health/providers/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/health/route.js +1 -1
  198. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/health/stream/route.js +2 -2
  200. package/app/.next-cli-build/server/app/api/health/stream/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/init/route.js +1 -1
  202. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  203. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  204. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  205. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  206. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
  208. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  209. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
  210. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  211. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +5 -5
  212. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  214. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  215. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  216. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  217. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  218. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  220. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  221. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  222. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  224. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  226. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js +1 -0
  228. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -0
  229. package/app/.next-cli-build/server/app/api/models/catalog-sync/route_client-reference-manifest.js +1 -0
  230. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  231. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  233. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  235. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  237. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/oauth/1min/import/route.js +1 -1
  239. package/app/.next-cli-build/server/app/api/oauth/1min/import/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  241. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  243. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  244. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  245. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +2 -2
  247. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  248. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  249. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  250. package/app/.next-cli-build/server/app/api/oauth/freebuff/import/route.js +1 -0
  251. package/app/.next-cli-build/server/app/api/oauth/freebuff/import/route.js.nft.json +1 -0
  252. package/app/.next-cli-build/server/app/api/oauth/freebuff/import/route_client-reference-manifest.js +1 -0
  253. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  254. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  256. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  257. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/auto-import/route.js +1 -1
  258. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/auto-import/route.js.nft.json +1 -1
  259. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/import/route.js +1 -1
  260. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/import/route.js.nft.json +1 -1
  261. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/quota/route.js +1 -1
  262. package/app/.next-cli-build/server/app/api/oauth/kimi-desktop/quota/route.js.nft.json +1 -1
  263. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  264. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
  266. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  267. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  268. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  269. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  270. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  271. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  272. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  274. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  275. package/app/.next-cli-build/server/app/api/oauth/qwen/import/route.js +1 -1
  276. package/app/.next-cli-build/server/app/api/oauth/qwen/import/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/oauth/wp-studio/import/route.js +1 -1
  278. package/app/.next-cli-build/server/app/api/oauth/wp-studio/import/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/oauth/zcode/import/route.js +1 -0
  280. package/app/.next-cli-build/server/app/api/oauth/zcode/import/route.js.nft.json +1 -0
  281. package/app/.next-cli-build/server/app/api/oauth/zcode/import/route_client-reference-manifest.js +1 -0
  282. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js +2 -2
  283. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
  284. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
  285. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  287. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
  289. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  290. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  291. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  292. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  293. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  294. package/app/.next-cli-build/server/app/api/providers/[id]/agnes-profile/route.js +1 -1
  295. package/app/.next-cli-build/server/app/api/providers/[id]/agnes-profile/route.js.nft.json +1 -1
  296. package/app/.next-cli-build/server/app/api/providers/[id]/felo-profile/route.js +3 -0
  297. package/app/.next-cli-build/server/app/api/providers/[id]/felo-profile/route.js.nft.json +1 -0
  298. package/app/.next-cli-build/server/app/api/providers/[id]/felo-profile/route_client-reference-manifest.js +1 -0
  299. package/app/.next-cli-build/server/app/api/providers/[id]/freebuff-profile/route.js +1 -1
  300. package/app/.next-cli-build/server/app/api/providers/[id]/freebuff-profile/route.js.nft.json +1 -1
  301. package/app/.next-cli-build/server/app/api/providers/[id]/health-timeline/route.js +1 -1
  302. package/app/.next-cli-build/server/app/api/providers/[id]/health-timeline/route.js.nft.json +1 -1
  303. package/app/.next-cli-build/server/app/api/providers/[id]/inxora-profile/route.js +1 -1
  304. package/app/.next-cli-build/server/app/api/providers/[id]/inxora-profile/route.js.nft.json +1 -1
  305. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +3 -1
  306. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  307. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-api-profile/route.js +1 -1
  308. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-api-profile/route.js.nft.json +1 -1
  309. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-profile/route.js +1 -1
  310. package/app/.next-cli-build/server/app/api/providers/[id]/onemin-profile/route.js.nft.json +1 -1
  311. package/app/.next-cli-build/server/app/api/providers/[id]/qwencloud-profile/route.js +1 -1
  312. package/app/.next-cli-build/server/app/api/providers/[id]/qwencloud-profile/route.js.nft.json +1 -1
  313. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  314. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  315. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  316. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  317. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  318. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  319. package/app/.next-cli-build/server/app/api/providers/[id]/v0-profile/route.js +1 -1
  320. package/app/.next-cli-build/server/app/api/providers/[id]/v0-profile/route.js.nft.json +1 -1
  321. package/app/.next-cli-build/server/app/api/providers/[id]/vault-pool/route.js +1 -1
  322. package/app/.next-cli-build/server/app/api/providers/[id]/vault-pool/route.js.nft.json +1 -1
  323. package/app/.next-cli-build/server/app/api/providers/[id]/zai-profile/route.js +1 -0
  324. package/app/.next-cli-build/server/app/api/providers/[id]/zai-profile/route.js.nft.json +1 -0
  325. package/app/.next-cli-build/server/app/api/providers/[id]/zai-profile/route_client-reference-manifest.js +1 -0
  326. package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/route.js +1 -1
  327. package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/route.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/api/providers/capture/launch/route.js +1 -0
  329. package/app/.next-cli-build/server/app/api/providers/capture/launch/route.js.nft.json +1 -0
  330. package/app/.next-cli-build/server/app/api/providers/capture/launch/route_client-reference-manifest.js +1 -0
  331. package/app/.next-cli-build/server/app/api/providers/capture/route.js +1 -0
  332. package/app/.next-cli-build/server/app/api/providers/capture/route.js.nft.json +1 -0
  333. package/app/.next-cli-build/server/app/api/providers/capture/route_client-reference-manifest.js +1 -0
  334. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  335. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/api/providers/felo-capture/launch/route.js +1 -0
  337. package/app/.next-cli-build/server/app/api/providers/felo-capture/launch/route.js.nft.json +1 -0
  338. package/app/.next-cli-build/server/app/api/providers/felo-capture/launch/route_client-reference-manifest.js +1 -0
  339. package/app/.next-cli-build/server/app/api/providers/felo-capture/route.js +1 -0
  340. package/app/.next-cli-build/server/app/api/providers/felo-capture/route.js.nft.json +1 -0
  341. package/app/.next-cli-build/server/app/api/providers/felo-capture/route_client-reference-manifest.js +1 -0
  342. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
  343. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  344. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  345. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  346. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
  347. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  348. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  349. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  350. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  351. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  352. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  353. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  354. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  355. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  356. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +2 -2
  357. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  358. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
  359. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  360. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  361. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  362. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
  363. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  364. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
  365. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  366. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +1 -1
  367. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  368. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  369. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  370. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
  371. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  372. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  373. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  374. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  375. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  376. package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
  377. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  378. package/app/.next-cli-build/server/app/api/smart-routing/active/route.js +1 -0
  379. package/app/.next-cli-build/server/app/api/smart-routing/active/route.js.nft.json +1 -0
  380. package/app/.next-cli-build/server/app/api/smart-routing/active/route_client-reference-manifest.js +1 -0
  381. package/app/.next-cli-build/server/app/api/smart-routing/history/route.js +17 -0
  382. package/app/.next-cli-build/server/app/api/smart-routing/history/route.js.nft.json +1 -0
  383. package/app/.next-cli-build/server/app/api/smart-routing/history/route_client-reference-manifest.js +1 -0
  384. package/app/.next-cli-build/server/app/api/smart-routing/lab/route.js +16 -0
  385. package/app/.next-cli-build/server/app/api/smart-routing/lab/route.js.nft.json +1 -0
  386. package/app/.next-cli-build/server/app/api/smart-routing/lab/route_client-reference-manifest.js +1 -0
  387. package/app/.next-cli-build/server/app/api/smart-routing/stream/route.js +7 -0
  388. package/app/.next-cli-build/server/app/api/smart-routing/stream/route.js.nft.json +1 -0
  389. package/app/.next-cli-build/server/app/api/smart-routing/stream/route_client-reference-manifest.js +1 -0
  390. package/app/.next-cli-build/server/app/api/swarm/active/route.js +1 -1
  391. package/app/.next-cli-build/server/app/api/swarm/active/route.js.nft.json +1 -1
  392. package/app/.next-cli-build/server/app/api/swarm/stream/route.js +4 -2
  393. package/app/.next-cli-build/server/app/api/swarm/stream/route.js.nft.json +1 -1
  394. package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
  395. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  396. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  397. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  398. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
  399. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  400. package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
  401. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  402. package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
  403. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  404. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  405. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  406. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  407. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  408. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  409. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  410. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  411. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  412. package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
  413. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  414. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
  415. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  416. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  417. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  418. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  419. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  420. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
  421. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  422. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  423. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  424. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  425. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  426. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  427. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  428. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  429. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  430. package/app/.next-cli-build/server/app/api/usage/leaderboard/route.js +1 -1
  431. package/app/.next-cli-build/server/app/api/usage/leaderboard/route.js.nft.json +1 -1
  432. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  433. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  434. package/app/.next-cli-build/server/app/api/usage/meta/route.js +1 -1
  435. package/app/.next-cli-build/server/app/api/usage/meta/route.js.nft.json +1 -1
  436. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  437. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  438. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  439. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  440. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  441. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  442. package/app/.next-cli-build/server/app/api/usage/retry-stats/route.js +1 -1
  443. package/app/.next-cli-build/server/app/api/usage/retry-stats/route.js.nft.json +1 -1
  444. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  445. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  446. package/app/.next-cli-build/server/app/api/usage/stream/route.js +2 -2
  447. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  448. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  449. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  450. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  451. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  452. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  453. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  454. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  455. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  456. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  457. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  458. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  459. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  460. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  461. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  462. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
  463. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  464. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  465. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  466. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js +1 -1
  467. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  468. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  469. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  470. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  471. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  472. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  473. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  474. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  475. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  476. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  477. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  478. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  479. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  480. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  481. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  482. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  483. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  484. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  485. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  486. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  487. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  488. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  489. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  490. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  491. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  492. package/app/.next-cli-build/server/app/callback/page.js +2 -2
  493. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  494. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  495. package/app/.next-cli-build/server/app/callback.html +1 -1
  496. package/app/.next-cli-build/server/app/callback.rsc +6 -6
  497. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +6 -6
  498. package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
  499. package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +6 -6
  500. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  501. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
  502. package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
  503. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
  504. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  505. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  506. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  507. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +7 -7
  508. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +7 -7
  509. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
  510. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +6 -6
  511. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  512. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +2 -2
  513. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
  514. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
  515. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
  516. package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
  517. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  518. package/app/.next-cli-build/server/app/index.html +1 -1
  519. package/app/.next-cli-build/server/app/index.rsc +6 -6
  520. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  521. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +6 -6
  522. package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
  523. package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +6 -6
  524. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  525. package/app/.next-cli-build/server/app/landing/page.js +2 -2
  526. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  527. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  528. package/app/.next-cli-build/server/app/landing.html +1 -1
  529. package/app/.next-cli-build/server/app/landing.rsc +6 -6
  530. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +6 -6
  531. package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
  532. package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +6 -6
  533. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  534. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
  535. package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
  536. package/app/.next-cli-build/server/app/login/page.js +2 -2
  537. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  538. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  539. package/app/.next-cli-build/server/app/login.html +1 -1
  540. package/app/.next-cli-build/server/app/login.rsc +7 -7
  541. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +7 -7
  542. package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
  543. package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +6 -6
  544. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  545. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
  546. package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
  547. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
  548. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  549. package/app/.next-cli-build/server/app/page.js +2 -2
  550. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  551. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  552. package/app/.next-cli-build/server/app-paths-manifest.json +31 -14
  553. package/app/.next-cli-build/server/chunks/1194.js +1 -1
  554. package/app/.next-cli-build/server/chunks/1241.js +1 -1
  555. package/app/.next-cli-build/server/chunks/1350.js +5 -2
  556. package/app/.next-cli-build/server/chunks/1411.js +9 -0
  557. package/app/.next-cli-build/server/chunks/1429.js +1 -1
  558. package/app/.next-cli-build/server/chunks/1719.js +1 -1
  559. package/app/.next-cli-build/server/chunks/1891.js +1 -1
  560. package/app/.next-cli-build/server/chunks/212.js +1 -1
  561. package/app/.next-cli-build/server/chunks/2409.js +1 -1
  562. package/app/.next-cli-build/server/chunks/3520.js +1 -0
  563. package/app/.next-cli-build/server/chunks/3535.js +1 -1
  564. package/app/.next-cli-build/server/chunks/3552.js +1 -0
  565. package/app/.next-cli-build/server/chunks/3593.js +1 -1
  566. package/app/.next-cli-build/server/chunks/{8873.js → 3735.js} +1 -1
  567. package/app/.next-cli-build/server/chunks/3841.js +1 -0
  568. package/app/.next-cli-build/server/chunks/4046.js +1 -1
  569. package/app/.next-cli-build/server/chunks/4109.js +4 -0
  570. package/app/.next-cli-build/server/chunks/412.js +5 -5
  571. package/app/.next-cli-build/server/chunks/4502.js +16 -0
  572. package/app/.next-cli-build/server/chunks/4739.js +1 -1
  573. package/app/.next-cli-build/server/chunks/4780.js +1 -1
  574. package/app/.next-cli-build/server/chunks/4957.js +1 -0
  575. package/app/.next-cli-build/server/chunks/5050.js +2 -0
  576. package/app/.next-cli-build/server/chunks/507.js +1 -1
  577. package/app/.next-cli-build/server/chunks/5253.js +17 -0
  578. package/app/.next-cli-build/server/chunks/5258.js +1 -1
  579. package/app/.next-cli-build/server/chunks/5330.js +37 -28
  580. package/app/.next-cli-build/server/chunks/5473.js +9 -0
  581. package/app/.next-cli-build/server/chunks/5604.js +13 -0
  582. package/app/.next-cli-build/server/chunks/5612.js +1 -1
  583. package/app/.next-cli-build/server/chunks/5615.js +1 -1
  584. package/app/.next-cli-build/server/chunks/5628.js +1 -1
  585. package/app/.next-cli-build/server/chunks/5699.js +1 -1
  586. package/app/.next-cli-build/server/chunks/5961.js +1 -1
  587. package/app/.next-cli-build/server/chunks/6182.js +1 -1
  588. package/app/.next-cli-build/server/chunks/6488.js +1 -0
  589. package/app/.next-cli-build/server/chunks/6630.js +1 -1
  590. package/app/.next-cli-build/server/chunks/6777.js +1 -1
  591. package/app/.next-cli-build/server/chunks/6878.js +1 -0
  592. package/app/.next-cli-build/server/chunks/698.js +1 -1
  593. package/app/.next-cli-build/server/chunks/7016.js +3 -0
  594. package/app/.next-cli-build/server/chunks/7410.js +1 -1
  595. package/app/.next-cli-build/server/chunks/7765.js +13 -0
  596. package/app/.next-cli-build/server/chunks/7815.js +1 -0
  597. package/app/.next-cli-build/server/chunks/7965.js +1 -1
  598. package/app/.next-cli-build/server/chunks/8048.js +1 -0
  599. package/app/.next-cli-build/server/chunks/809.js +1 -0
  600. package/app/.next-cli-build/server/chunks/8238.js +1 -1
  601. package/app/.next-cli-build/server/chunks/8266.js +1 -0
  602. package/app/.next-cli-build/server/chunks/8271.js +1 -1
  603. package/app/.next-cli-build/server/chunks/8520.js +1 -1
  604. package/app/.next-cli-build/server/chunks/8802.js +2 -2
  605. package/app/.next-cli-build/server/chunks/885.js +17 -13
  606. package/app/.next-cli-build/server/chunks/8895.js +6 -6
  607. package/app/.next-cli-build/server/chunks/9365.js +9 -0
  608. package/app/.next-cli-build/server/chunks/9609.js +1 -1
  609. package/app/.next-cli-build/server/chunks/9903.js +2 -2
  610. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  611. package/app/.next-cli-build/server/middleware.js +5 -5
  612. package/app/.next-cli-build/server/pages/404.html +1 -1
  613. package/app/.next-cli-build/server/pages/500.html +1 -1
  614. package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
  615. package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
  616. package/app/.next-cli-build/static/BmLJ5bmQbpsF-jvZIwr9t/_buildManifest.js +1 -0
  617. package/app/.next-cli-build/static/chunks/1321-184fe0dd34faf680.js +1 -0
  618. package/app/.next-cli-build/static/chunks/2563-a547c8ef699e1791.js +1 -0
  619. package/app/.next-cli-build/static/chunks/5497-9caed03337b37e47.js +7 -0
  620. package/app/.next-cli-build/static/chunks/705-eaa2de0fd5964be4.js +1 -0
  621. package/app/.next-cli-build/static/chunks/{9622-fcd7c93a94eaa38f.js → 9622-d0f22be4f1ef8011.js} +6 -6
  622. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/alerts/{page-c263cd784e69e6f1.js → page-3527fe022102a692.js} +1 -1
  623. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-fe59538aa4add719.js +1 -0
  624. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/{page-3c3074cf3f61df46.js → page-1849f671db0f9fe9.js} +1 -1
  625. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-f7cdc992cb310077.js → page-0e903eb34158c8a8.js} +1 -1
  626. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-8406e79b31e512bb.js +3 -0
  627. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-81ef4c324f201832.js +1 -0
  628. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-72670cb4cac6b97d.js +1 -0
  629. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/health/page-d71cb9f910cb5d13.js +1 -0
  630. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-7d472b122fb182f0.js → page-94341b277cf27462.js} +1 -1
  631. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/{page-83272baae17d38f1.js → page-558f5601f8df1d4d.js} +1 -1
  632. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/combo/[id]/{page-f36e5ac11783fd1e.js → page-6effc5c0f2b1d72e.js} +1 -1
  633. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/{page-4069e1d40a3c70a6.js → page-05b05e6f6136829d.js} +1 -1
  634. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/web/{page-e794909abbc7a09a.js → page-95375c7b40f99306.js} +1 -1
  635. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/{page-1d972fd3baee7474.js → page-4549c187375b9192.js} +1 -1
  636. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/overview/{page-839ed70e115af9c9.js → page-bb459e518dfa9f70.js} +1 -1
  637. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-cc5141ff81040e89.js +1 -0
  638. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/page-625485e32264e15b.js +1 -0
  639. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-09b1b5beae8435cd.js +1 -0
  640. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-776433cfd87f123a.js +10 -0
  641. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/new/{page-bcf9d97ab4dc20d9.js → page-1f67fe5d69805df2.js} +1 -1
  642. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-5d9d7d47216375ea.js +1 -0
  643. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-58d8d0fa5523ff95.js → page-c561cab29785310a.js} +1 -1
  644. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-140fef4b235b4792.js +1 -0
  645. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/skills/{page-a8b151d5ae9004ea.js → page-acf6cde3210c179a.js} +1 -1
  646. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/smart-routing/page-5c8e7b3b71579268.js +1 -0
  647. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/swarm/page-6cda956597418bd9.js +1 -0
  648. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/token-saver/{page-d57c129c03c9cb36.js → page-c3ae0ab7f0d0634d.js} +1 -1
  649. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/{page-61d162d7a7f88a11.js → page-cb12854a23416b01.js} +1 -1
  650. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-55b0738c2d201462.js +1 -0
  651. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-66efb163e888cd6b.js +1 -0
  652. package/app/.next-cli-build/static/chunks/app/_global-error/page-bf747ebfcd7e601c.js +1 -0
  653. package/app/.next-cli-build/static/chunks/app/api/alerts/test/route-bf747ebfcd7e601c.js +1 -0
  654. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-bf747ebfcd7e601c.js +1 -0
  655. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-bf747ebfcd7e601c.js +1 -0
  656. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-bf747ebfcd7e601c.js +1 -0
  657. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-bf747ebfcd7e601c.js +1 -0
  658. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-bf747ebfcd7e601c.js +1 -0
  659. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-bf747ebfcd7e601c.js +1 -0
  660. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-bf747ebfcd7e601c.js +1 -0
  661. package/app/.next-cli-build/static/chunks/app/api/breaker/route-bf747ebfcd7e601c.js +1 -0
  662. package/app/.next-cli-build/static/chunks/app/api/cache/route-bf747ebfcd7e601c.js +1 -0
  663. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-bf747ebfcd7e601c.js +1 -0
  664. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-bf747ebfcd7e601c.js +1 -0
  665. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-bf747ebfcd7e601c.js +1 -0
  666. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-bf747ebfcd7e601c.js +1 -0
  667. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-bf747ebfcd7e601c.js +1 -0
  668. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-bf747ebfcd7e601c.js +1 -0
  669. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-bf747ebfcd7e601c.js +1 -0
  670. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-bf747ebfcd7e601c.js +1 -0
  671. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-bf747ebfcd7e601c.js +1 -0
  672. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-bf747ebfcd7e601c.js +1 -0
  673. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-bf747ebfcd7e601c.js +1 -0
  674. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-bf747ebfcd7e601c.js +1 -0
  675. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-bf747ebfcd7e601c.js +1 -0
  676. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-bf747ebfcd7e601c.js +1 -0
  677. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-bf747ebfcd7e601c.js +1 -0
  678. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-bf747ebfcd7e601c.js +1 -0
  679. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-bf747ebfcd7e601c.js +1 -0
  680. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-bf747ebfcd7e601c.js +1 -0
  681. package/app/.next-cli-build/static/chunks/app/api/combos/lab/route-bf747ebfcd7e601c.js +1 -0
  682. package/app/.next-cli-build/static/chunks/app/api/combos/route-bf747ebfcd7e601c.js +1 -0
  683. package/app/.next-cli-build/static/chunks/app/api/combos/simulate/route-bf747ebfcd7e601c.js +1 -0
  684. package/app/.next-cli-build/static/chunks/app/api/combos/validate-roles/route-bf747ebfcd7e601c.js +1 -0
  685. package/app/.next-cli-build/static/chunks/app/api/dashboard/stream/route-bf747ebfcd7e601c.js +1 -0
  686. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-bf747ebfcd7e601c.js +1 -0
  687. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-bf747ebfcd7e601c.js +1 -0
  688. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-bf747ebfcd7e601c.js +1 -0
  689. package/app/.next-cli-build/static/chunks/app/api/health/overview/route-bf747ebfcd7e601c.js +1 -0
  690. package/app/.next-cli-build/static/chunks/app/api/health/providers/route-bf747ebfcd7e601c.js +1 -0
  691. package/app/.next-cli-build/static/chunks/app/api/health/route-bf747ebfcd7e601c.js +1 -0
  692. package/app/.next-cli-build/static/chunks/app/api/health/stream/route-bf747ebfcd7e601c.js +1 -0
  693. package/app/.next-cli-build/static/chunks/app/api/init/route-bf747ebfcd7e601c.js +1 -0
  694. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-bf747ebfcd7e601c.js +1 -0
  695. package/app/.next-cli-build/static/chunks/app/api/keys/route-bf747ebfcd7e601c.js +1 -0
  696. package/app/.next-cli-build/static/chunks/app/api/locale/route-bf747ebfcd7e601c.js +1 -0
  697. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-bf747ebfcd7e601c.js +1 -0
  698. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-bf747ebfcd7e601c.js +1 -0
  699. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-bf747ebfcd7e601c.js +1 -0
  700. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-bf747ebfcd7e601c.js +1 -0
  701. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-bf747ebfcd7e601c.js +1 -0
  702. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-bf747ebfcd7e601c.js +1 -0
  703. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-bf747ebfcd7e601c.js +1 -0
  704. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-bf747ebfcd7e601c.js +1 -0
  705. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-bf747ebfcd7e601c.js +1 -0
  706. package/app/.next-cli-build/static/chunks/app/api/models/catalog-sync/route-bf747ebfcd7e601c.js +1 -0
  707. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-bf747ebfcd7e601c.js +1 -0
  708. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-bf747ebfcd7e601c.js +1 -0
  709. package/app/.next-cli-build/static/chunks/app/api/models/route-bf747ebfcd7e601c.js +1 -0
  710. package/app/.next-cli-build/static/chunks/app/api/models/test/route-bf747ebfcd7e601c.js +1 -0
  711. package/app/.next-cli-build/static/chunks/app/api/oauth/1min/import/route-bf747ebfcd7e601c.js +1 -0
  712. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-bf747ebfcd7e601c.js +1 -0
  713. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-bf747ebfcd7e601c.js +1 -0
  714. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-bf747ebfcd7e601c.js +1 -0
  715. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-bf747ebfcd7e601c.js +1 -0
  716. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-bf747ebfcd7e601c.js +1 -0
  717. package/app/.next-cli-build/static/chunks/app/api/oauth/freebuff/import/route-bf747ebfcd7e601c.js +1 -0
  718. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-bf747ebfcd7e601c.js +1 -0
  719. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-bf747ebfcd7e601c.js +1 -0
  720. package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/auto-import/route-bf747ebfcd7e601c.js +1 -0
  721. package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/import/route-bf747ebfcd7e601c.js +1 -0
  722. package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/quota/route-bf747ebfcd7e601c.js +1 -0
  723. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-bf747ebfcd7e601c.js +1 -0
  724. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-bf747ebfcd7e601c.js +1 -0
  725. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-bf747ebfcd7e601c.js +1 -0
  726. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-bf747ebfcd7e601c.js +1 -0
  727. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-bf747ebfcd7e601c.js +1 -0
  728. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-bf747ebfcd7e601c.js +1 -0
  729. package/app/.next-cli-build/static/chunks/app/api/oauth/qwen/import/route-bf747ebfcd7e601c.js +1 -0
  730. package/app/.next-cli-build/static/chunks/app/api/oauth/wp-studio/import/route-bf747ebfcd7e601c.js +1 -0
  731. package/app/.next-cli-build/static/chunks/app/api/oauth/zcode/import/route-bf747ebfcd7e601c.js +1 -0
  732. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-bf747ebfcd7e601c.js +1 -0
  733. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-bf747ebfcd7e601c.js +1 -0
  734. package/app/.next-cli-build/static/chunks/app/api/pricing/route-bf747ebfcd7e601c.js +1 -0
  735. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-bf747ebfcd7e601c.js +1 -0
  736. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-bf747ebfcd7e601c.js +1 -0
  737. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-bf747ebfcd7e601c.js +1 -0
  738. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/agnes-profile/route-bf747ebfcd7e601c.js +1 -0
  739. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/felo-profile/route-bf747ebfcd7e601c.js +1 -0
  740. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/freebuff-profile/route-bf747ebfcd7e601c.js +1 -0
  741. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/health-timeline/route-bf747ebfcd7e601c.js +1 -0
  742. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/inxora-profile/route-bf747ebfcd7e601c.js +1 -0
  743. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-bf747ebfcd7e601c.js +1 -0
  744. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-api-profile/route-bf747ebfcd7e601c.js +1 -0
  745. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-profile/route-bf747ebfcd7e601c.js +1 -0
  746. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/qwencloud-profile/route-bf747ebfcd7e601c.js +1 -0
  747. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-bf747ebfcd7e601c.js +1 -0
  748. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-bf747ebfcd7e601c.js +1 -0
  749. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-bf747ebfcd7e601c.js +1 -0
  750. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/v0-profile/route-bf747ebfcd7e601c.js +1 -0
  751. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/vault-pool/route-bf747ebfcd7e601c.js +1 -0
  752. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zai-profile/route-bf747ebfcd7e601c.js +1 -0
  753. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zenmux-plans/route-bf747ebfcd7e601c.js +1 -0
  754. package/app/.next-cli-build/static/chunks/app/api/providers/capture/launch/route-bf747ebfcd7e601c.js +1 -0
  755. package/app/.next-cli-build/static/chunks/app/api/providers/capture/route-bf747ebfcd7e601c.js +1 -0
  756. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-bf747ebfcd7e601c.js +1 -0
  757. package/app/.next-cli-build/static/chunks/app/api/providers/felo-capture/launch/route-bf747ebfcd7e601c.js +1 -0
  758. package/app/.next-cli-build/static/chunks/app/api/providers/felo-capture/route-bf747ebfcd7e601c.js +1 -0
  759. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-bf747ebfcd7e601c.js +1 -0
  760. package/app/.next-cli-build/static/chunks/app/api/providers/route-bf747ebfcd7e601c.js +1 -0
  761. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-bf747ebfcd7e601c.js +1 -0
  762. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-bf747ebfcd7e601c.js +1 -0
  763. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-bf747ebfcd7e601c.js +1 -0
  764. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-bf747ebfcd7e601c.js +1 -0
  765. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-bf747ebfcd7e601c.js +1 -0
  766. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-bf747ebfcd7e601c.js +1 -0
  767. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-bf747ebfcd7e601c.js +1 -0
  768. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-bf747ebfcd7e601c.js +1 -0
  769. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-bf747ebfcd7e601c.js +1 -0
  770. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-bf747ebfcd7e601c.js +1 -0
  771. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-bf747ebfcd7e601c.js +1 -0
  772. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-bf747ebfcd7e601c.js +1 -0
  773. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-bf747ebfcd7e601c.js +1 -0
  774. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-bf747ebfcd7e601c.js +1 -0
  775. package/app/.next-cli-build/static/chunks/app/api/settings/route-bf747ebfcd7e601c.js +1 -0
  776. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-bf747ebfcd7e601c.js +1 -0
  777. package/app/.next-cli-build/static/chunks/app/api/smart-routing/active/route-bf747ebfcd7e601c.js +1 -0
  778. package/app/.next-cli-build/static/chunks/app/api/smart-routing/history/route-bf747ebfcd7e601c.js +1 -0
  779. package/app/.next-cli-build/static/chunks/app/api/smart-routing/lab/route-bf747ebfcd7e601c.js +1 -0
  780. package/app/.next-cli-build/static/chunks/app/api/smart-routing/stream/route-bf747ebfcd7e601c.js +1 -0
  781. package/app/.next-cli-build/static/chunks/app/api/swarm/active/route-bf747ebfcd7e601c.js +1 -0
  782. package/app/.next-cli-build/static/chunks/app/api/swarm/stream/route-bf747ebfcd7e601c.js +1 -0
  783. package/app/.next-cli-build/static/chunks/app/api/tags/route-bf747ebfcd7e601c.js +1 -0
  784. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-bf747ebfcd7e601c.js +1 -0
  785. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-bf747ebfcd7e601c.js +1 -0
  786. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-bf747ebfcd7e601c.js +1 -0
  787. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-bf747ebfcd7e601c.js +1 -0
  788. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-bf747ebfcd7e601c.js +1 -0
  789. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-bf747ebfcd7e601c.js +1 -0
  790. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-bf747ebfcd7e601c.js +1 -0
  791. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-bf747ebfcd7e601c.js +1 -0
  792. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-bf747ebfcd7e601c.js +1 -0
  793. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-bf747ebfcd7e601c.js +1 -0
  794. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-bf747ebfcd7e601c.js +1 -0
  795. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-bf747ebfcd7e601c.js +1 -0
  796. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-bf747ebfcd7e601c.js +1 -0
  797. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-bf747ebfcd7e601c.js +1 -0
  798. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-bf747ebfcd7e601c.js +1 -0
  799. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-bf747ebfcd7e601c.js +1 -0
  800. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-bf747ebfcd7e601c.js +1 -0
  801. package/app/.next-cli-build/static/chunks/app/api/usage/leaderboard/route-bf747ebfcd7e601c.js +1 -0
  802. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-bf747ebfcd7e601c.js +1 -0
  803. package/app/.next-cli-build/static/chunks/app/api/usage/meta/route-bf747ebfcd7e601c.js +1 -0
  804. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-bf747ebfcd7e601c.js +1 -0
  805. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-bf747ebfcd7e601c.js +1 -0
  806. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-bf747ebfcd7e601c.js +1 -0
  807. package/app/.next-cli-build/static/chunks/app/api/usage/retry-stats/route-bf747ebfcd7e601c.js +1 -0
  808. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-bf747ebfcd7e601c.js +1 -0
  809. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-bf747ebfcd7e601c.js +1 -0
  810. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-bf747ebfcd7e601c.js +1 -0
  811. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-bf747ebfcd7e601c.js +1 -0
  812. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-bf747ebfcd7e601c.js +1 -0
  813. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-bf747ebfcd7e601c.js +1 -0
  814. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-bf747ebfcd7e601c.js +1 -0
  815. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-bf747ebfcd7e601c.js +1 -0
  816. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-bf747ebfcd7e601c.js +1 -0
  817. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-bf747ebfcd7e601c.js +1 -0
  818. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-bf747ebfcd7e601c.js +1 -0
  819. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-bf747ebfcd7e601c.js +1 -0
  820. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-bf747ebfcd7e601c.js +1 -0
  821. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-bf747ebfcd7e601c.js +1 -0
  822. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-bf747ebfcd7e601c.js +1 -0
  823. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-bf747ebfcd7e601c.js +1 -0
  824. package/app/.next-cli-build/static/chunks/app/api/v1/route-bf747ebfcd7e601c.js +1 -0
  825. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-bf747ebfcd7e601c.js +1 -0
  826. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-bf747ebfcd7e601c.js +1 -0
  827. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-bf747ebfcd7e601c.js +1 -0
  828. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-bf747ebfcd7e601c.js +1 -0
  829. package/app/.next-cli-build/static/chunks/app/api/version/route-bf747ebfcd7e601c.js +1 -0
  830. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-bf747ebfcd7e601c.js +1 -0
  831. package/app/.next-cli-build/static/chunks/app/api/version/update/route-bf747ebfcd7e601c.js +1 -0
  832. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-baf12d16760e9b90.js +1 -0
  833. package/app/.next-cli-build/static/chunks/app/{layout-10bff7b57a2a3c2c.js → layout-155acd4a482252b8.js} +1 -1
  834. package/app/.next-cli-build/static/chunks/app/login/{page-32ab5d7c75651107.js → page-089f2be5081e9c05.js} +1 -1
  835. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-bf747ebfcd7e601c.js +1 -0
  836. package/app/.next-cli-build/static/chunks/app/page-bf747ebfcd7e601c.js +1 -0
  837. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-bf747ebfcd7e601c.js +1 -0
  838. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-bf747ebfcd7e601c.js +1 -0
  839. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-bf747ebfcd7e601c.js +1 -0
  840. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-bf747ebfcd7e601c.js +1 -0
  841. package/app/.next-cli-build/static/css/8a8ea9ee79a01730.css +1 -0
  842. package/app/node_modules/playwright-core/browsers.json +75 -0
  843. package/app/node_modules/playwright-core/index.js +17 -0
  844. package/app/node_modules/playwright-core/index.mjs +28 -0
  845. package/app/node_modules/playwright-core/lib/bootstrap.js +88 -0
  846. package/app/node_modules/playwright-core/lib/coreBundle.js +74830 -0
  847. package/app/node_modules/playwright-core/lib/utilsBundle.js +90764 -0
  848. package/app/node_modules/playwright-core/package.json +34 -0
  849. package/app/package.json +2 -5
  850. package/app/public/providers/ai21.png +0 -0
  851. package/app/public/providers/aihorde.png +0 -0
  852. package/app/public/providers/aimlapi.png +0 -0
  853. package/app/public/providers/ainative.png +0 -0
  854. package/app/public/providers/aion.png +0 -0
  855. package/app/public/providers/alibaba-cn.svg +1 -11
  856. package/app/public/providers/alibaba.svg +1 -11
  857. package/app/public/providers/alitp-intl.svg +1 -0
  858. package/app/public/providers/anyapi.png +0 -0
  859. package/app/public/providers/arcee-ai.png +0 -0
  860. package/app/public/providers/auriko.svg +61 -0
  861. package/app/public/providers/azure-ai.svg +23 -0
  862. package/app/public/providers/bai.png +0 -0
  863. package/app/public/providers/baseten.png +0 -0
  864. package/app/public/providers/bazaarlink.svg +8 -0
  865. package/app/public/providers/blackbox-web.png +0 -0
  866. package/app/public/providers/bluesminds.png +0 -0
  867. package/app/public/providers/bytez.png +0 -0
  868. package/app/public/providers/charm-hyper.png +0 -0
  869. package/app/public/providers/chat-oripe.svg +4 -0
  870. package/app/public/providers/chatanywhere.svg +1 -0
  871. package/app/public/providers/cheaperinference.png +0 -0
  872. package/app/public/providers/chenzk.png +0 -0
  873. package/app/public/providers/clarifai.svg +1 -0
  874. package/app/public/providers/cloudcode-one.svg +13 -0
  875. package/app/public/providers/conol-web.png +0 -0
  876. package/app/public/providers/crof.png +0 -0
  877. package/app/public/providers/dahl.png +0 -0
  878. package/app/public/providers/datarobot.png +0 -0
  879. package/app/public/providers/dgrid.png +0 -0
  880. package/app/public/providers/digitalocean.svg +1 -0
  881. package/app/public/providers/dit.svg +10 -0
  882. package/app/public/providers/docker-model-runner.svg +1 -0
  883. package/app/public/providers/duckduckgo-web.svg +1 -7
  884. package/app/public/providers/dxnt.svg +10 -0
  885. package/app/public/providers/electronhub.svg +4 -0
  886. package/app/public/providers/empower.svg +4 -0
  887. package/app/public/providers/factory.svg +4 -0
  888. package/app/public/providers/fastrouter.svg +4 -0
  889. package/app/public/providers/felo-web.svg +50 -0
  890. package/app/public/providers/fireworks.svg +3 -0
  891. package/app/public/providers/fishaudio.svg +1 -0
  892. package/app/public/providers/free-ai.svg +4 -0
  893. package/app/public/providers/freeaiapikey.svg +4 -0
  894. package/app/public/providers/freebuff.svg +6 -0
  895. package/app/public/providers/freeinference.svg +4 -0
  896. package/app/public/providers/freemodel-dev.svg +4 -0
  897. package/app/public/providers/freetheai.svg +4 -0
  898. package/app/public/providers/friendliai.svg +4 -0
  899. package/app/public/providers/g4f-gemini.png +0 -0
  900. package/app/public/providers/g4f-groq.png +0 -0
  901. package/app/public/providers/g4f-nvidia.png +0 -0
  902. package/app/public/providers/g4f-ollama.png +0 -0
  903. package/app/public/providers/g4f-pollinations.svg +9 -0
  904. package/app/public/providers/gemini-business.svg +1 -0
  905. package/app/public/providers/getgoapi.svg +4 -0
  906. package/app/public/providers/gitlab.png +0 -0
  907. package/app/public/providers/gitlab.svg +1 -0
  908. package/app/public/providers/gitlawb-gmi.svg +4 -0
  909. package/app/public/providers/gitlawb.svg +4 -0
  910. package/app/public/providers/gladia.svg +1 -0
  911. package/app/public/providers/hackclub.png +0 -0
  912. package/app/public/providers/hailuo-web.svg +1 -0
  913. package/app/public/providers/helixmind.svg +4 -0
  914. package/app/public/providers/heroku.svg +16 -0
  915. package/app/public/providers/huggingchat.svg +1 -9
  916. package/app/public/providers/hyperagent.svg +1 -0
  917. package/app/public/providers/inception.svg +4 -0
  918. package/app/public/providers/inference-net.svg +4 -0
  919. package/app/public/providers/inner-ai.svg +1 -0
  920. package/app/public/providers/kenari.svg +4 -0
  921. package/app/public/providers/kilo-gateway.svg +4 -0
  922. package/app/public/providers/kimi-desktop.svg +1 -9
  923. package/app/public/providers/kimi-web.svg +1 -8
  924. package/app/public/providers/lambda-ai.svg +4 -0
  925. package/app/public/providers/laozhang.svg +4 -0
  926. package/app/public/providers/lemonade.svg +1 -0
  927. package/app/public/providers/liquid.svg +4 -0
  928. package/app/public/providers/literouter.svg +4 -0
  929. package/app/public/providers/llama-cpp.svg +1 -0
  930. package/app/public/providers/llamafile.svg +1 -0
  931. package/app/public/providers/llamagate.svg +4 -0
  932. package/app/public/providers/llm-kiwi.svg +4 -0
  933. package/app/public/providers/llm7.png +0 -0
  934. package/app/public/providers/llmgateway.svg +4 -0
  935. package/app/public/providers/lm-studio.svg +1 -0
  936. package/app/public/providers/maritalk.svg +4 -0
  937. package/app/public/providers/meganova-ai.svg +4 -0
  938. package/app/public/providers/meta-ai.svg +68 -0
  939. package/app/public/providers/meta-llama.svg +1 -0
  940. package/app/public/providers/mimocode.png +0 -0
  941. package/app/public/providers/mixlayer.svg +4 -0
  942. package/app/public/providers/mnn-ai.svg +4 -0
  943. package/app/public/providers/modal.svg +1 -0
  944. package/app/public/providers/modelscope.svg +1 -0
  945. package/app/public/providers/morph.svg +4 -0
  946. package/app/public/providers/naga-ac.svg +4 -0
  947. package/app/public/providers/naga-ai.svg +4 -0
  948. package/app/public/providers/nanogpt.svg +4 -0
  949. package/app/public/providers/nara.svg +4 -0
  950. package/app/public/providers/navy.svg +4 -0
  951. package/app/public/providers/notion-web.svg +1 -0
  952. package/app/public/providers/nous-research.svg +4 -0
  953. package/app/public/providers/nscale.svg +4 -0
  954. package/app/public/providers/nube.svg +4 -0
  955. package/app/public/providers/oci.svg +20 -0
  956. package/app/public/providers/ofoxai.svg +4 -0
  957. package/app/public/providers/ollama-cloud.svg +1 -0
  958. package/app/public/providers/oobabooga.svg +1 -0
  959. package/app/public/providers/openadapter.svg +4 -0
  960. package/app/public/providers/opencode-zen.svg +4 -0
  961. package/app/public/providers/openference-api.svg +4 -0
  962. package/app/public/providers/orcarouter.png +0 -0
  963. package/app/public/providers/ovhcloud.svg +1 -0
  964. package/app/public/providers/perplexity-agent.svg +1 -13
  965. package/app/public/providers/piapi.svg +4 -0
  966. package/app/public/providers/pioneer.svg +4 -0
  967. package/app/public/providers/poe-web.svg +1 -8
  968. package/app/public/providers/poixe-ai.svg +4 -0
  969. package/app/public/providers/poolside.svg +4 -0
  970. package/app/public/providers/predibase.svg +4 -0
  971. package/app/public/providers/publicai.svg +4 -0
  972. package/app/public/providers/qiniu.svg +4 -0
  973. package/app/public/providers/qwen-cloud.svg +1 -1
  974. package/app/public/providers/qwen-web.svg +1 -6
  975. package/app/public/providers/qwencloud.svg +1 -6
  976. package/app/public/providers/regolo.svg +4 -0
  977. package/app/public/providers/reka.svg +4 -0
  978. package/app/public/providers/requesty.svg +4 -0
  979. package/app/public/providers/rev-ai.svg +1 -0
  980. package/app/public/providers/routeway.svg +4 -0
  981. package/app/public/providers/sambanova.svg +4 -0
  982. package/app/public/providers/sap.svg +1 -0
  983. package/app/public/providers/scaleway.svg +1 -0
  984. package/app/public/providers/snowflake.svg +1 -0
  985. package/app/public/providers/soniox.svg +1 -0
  986. package/app/public/providers/speechmatics.svg +1 -0
  987. package/app/public/providers/speka.svg +4 -0
  988. package/app/public/providers/sumopod.svg +4 -0
  989. package/app/public/providers/synthetic.svg +4 -0
  990. package/app/public/providers/tencent-aistudio-web.png +0 -0
  991. package/app/public/providers/thebai.svg +4 -0
  992. package/app/public/providers/theoldllm.png +0 -0
  993. package/app/public/providers/tokenreply.svg +4 -0
  994. package/app/public/providers/triton.svg +1 -0
  995. package/app/public/providers/uncloseai.png +0 -0
  996. package/app/public/providers/unorouter.svg +4 -0
  997. package/app/public/providers/upstage.svg +4 -0
  998. package/app/public/providers/vllm.svg +1 -0
  999. package/app/public/providers/void-ai.svg +4 -0
  1000. package/app/public/providers/wafer.svg +4 -0
  1001. package/app/public/providers/wandb.svg +1 -0
  1002. package/app/public/providers/watsonx.svg +51 -0
  1003. package/app/public/providers/writer.svg +4 -0
  1004. package/app/public/providers/x5lab.svg +4 -0
  1005. package/app/public/providers/xinference.svg +1 -0
  1006. package/app/public/providers/yolo-auto.svg +4 -0
  1007. package/app/public/providers/zai-web.svg +1 -0
  1008. package/app/public/providers/zcode.png +0 -0
  1009. package/app/public/providers/zerolimitai.svg +4 -0
  1010. package/app/public/providers/zylo-api.svg +4 -0
  1011. package/app/src/lib/db/migrate.js +6 -3
  1012. package/app/src/mitm/server.js +2 -2
  1013. package/package.json +3 -1
  1014. package/src/cli/menus/providers.js +6 -0
  1015. package/app/.next-cli-build/server/chunks/2231.js +0 -1
  1016. package/app/.next-cli-build/server/chunks/422.js +0 -9
  1017. package/app/.next-cli-build/server/chunks/5102.js +0 -1
  1018. package/app/.next-cli-build/server/chunks/6070.js +0 -1
  1019. package/app/.next-cli-build/server/chunks/6306.js +0 -1
  1020. package/app/.next-cli-build/server/chunks/6560.js +0 -1
  1021. package/app/.next-cli-build/server/chunks/7187.js +0 -1
  1022. package/app/.next-cli-build/server/chunks/7218.js +0 -1
  1023. package/app/.next-cli-build/server/chunks/7872.js +0 -1
  1024. package/app/.next-cli-build/server/chunks/874.js +0 -9
  1025. package/app/.next-cli-build/server/chunks/8955.js +0 -16
  1026. package/app/.next-cli-build/server/chunks/9422.js +0 -13
  1027. package/app/.next-cli-build/server/chunks/9703.js +0 -14
  1028. package/app/.next-cli-build/static/7zgJjF0BTyl0D0ZYIuDWj/_buildManifest.js +0 -1
  1029. package/app/.next-cli-build/static/chunks/1321-3b1aef2827d68b60.js +0 -1
  1030. package/app/.next-cli-build/static/chunks/5497-51105899e4e24c89.js +0 -7
  1031. package/app/.next-cli-build/static/chunks/705-6dadbd8815279945.js +0 -1
  1032. package/app/.next-cli-build/static/chunks/8105-76bf5c11dd3bc8ce.js +0 -1
  1033. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-ecd3a85a40e51c66.js +0 -1
  1034. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-b4a78d784383253c.js +0 -3
  1035. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/console-log/page-959b3ee3c662de33.js +0 -1
  1036. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/endpoint/page-5689c88f2746c37a.js +0 -1
  1037. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/health/page-133cf1aa2ce53c87.js +0 -1
  1038. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/page-7325c65533e4cf60.js +0 -1
  1039. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/page-e7ba910803086460.js +0 -1
  1040. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/profile/page-0f877a8a2550a1ea.js +0 -1
  1041. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-6b500acebeff856b.js +0 -10
  1042. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-5b11b61863963cad.js +0 -1
  1043. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/page-c02ccb0fd35970d1.js +0 -1
  1044. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/swarm/page-594a59006196a03a.js +0 -1
  1045. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-483f01fd35d212f5.js +0 -1
  1046. package/app/.next-cli-build/static/chunks/app/(dashboard)/layout-0a63db83d5e05667.js +0 -1
  1047. package/app/.next-cli-build/static/chunks/app/_global-error/page-158df2528a1edacc.js +0 -1
  1048. package/app/.next-cli-build/static/chunks/app/api/alerts/test/route-158df2528a1edacc.js +0 -1
  1049. package/app/.next-cli-build/static/chunks/app/api/auth/login/route-158df2528a1edacc.js +0 -1
  1050. package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-158df2528a1edacc.js +0 -1
  1051. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-158df2528a1edacc.js +0 -1
  1052. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-158df2528a1edacc.js +0 -1
  1053. package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-158df2528a1edacc.js +0 -1
  1054. package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-158df2528a1edacc.js +0 -1
  1055. package/app/.next-cli-build/static/chunks/app/api/auth/status/route-158df2528a1edacc.js +0 -1
  1056. package/app/.next-cli-build/static/chunks/app/api/breaker/route-158df2528a1edacc.js +0 -1
  1057. package/app/.next-cli-build/static/chunks/app/api/cache/route-158df2528a1edacc.js +0 -1
  1058. package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-158df2528a1edacc.js +0 -1
  1059. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-158df2528a1edacc.js +0 -1
  1060. package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-158df2528a1edacc.js +0 -1
  1061. package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-158df2528a1edacc.js +0 -1
  1062. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-158df2528a1edacc.js +0 -1
  1063. package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-158df2528a1edacc.js +0 -1
  1064. package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-158df2528a1edacc.js +0 -1
  1065. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-158df2528a1edacc.js +0 -1
  1066. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-158df2528a1edacc.js +0 -1
  1067. package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-158df2528a1edacc.js +0 -1
  1068. package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-158df2528a1edacc.js +0 -1
  1069. package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-158df2528a1edacc.js +0 -1
  1070. package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-158df2528a1edacc.js +0 -1
  1071. package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-158df2528a1edacc.js +0 -1
  1072. package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-158df2528a1edacc.js +0 -1
  1073. package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-158df2528a1edacc.js +0 -1
  1074. package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-158df2528a1edacc.js +0 -1
  1075. package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-158df2528a1edacc.js +0 -1
  1076. package/app/.next-cli-build/static/chunks/app/api/combos/route-158df2528a1edacc.js +0 -1
  1077. package/app/.next-cli-build/static/chunks/app/api/combos/validate-roles/route-158df2528a1edacc.js +0 -1
  1078. package/app/.next-cli-build/static/chunks/app/api/dashboard/stream/route-158df2528a1edacc.js +0 -1
  1079. package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-158df2528a1edacc.js +0 -1
  1080. package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-158df2528a1edacc.js +0 -1
  1081. package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-158df2528a1edacc.js +0 -1
  1082. package/app/.next-cli-build/static/chunks/app/api/health/providers/route-158df2528a1edacc.js +0 -1
  1083. package/app/.next-cli-build/static/chunks/app/api/health/route-158df2528a1edacc.js +0 -1
  1084. package/app/.next-cli-build/static/chunks/app/api/health/stream/route-158df2528a1edacc.js +0 -1
  1085. package/app/.next-cli-build/static/chunks/app/api/init/route-158df2528a1edacc.js +0 -1
  1086. package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-158df2528a1edacc.js +0 -1
  1087. package/app/.next-cli-build/static/chunks/app/api/keys/route-158df2528a1edacc.js +0 -1
  1088. package/app/.next-cli-build/static/chunks/app/api/locale/route-158df2528a1edacc.js +0 -1
  1089. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-158df2528a1edacc.js +0 -1
  1090. package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-158df2528a1edacc.js +0 -1
  1091. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-158df2528a1edacc.js +0 -1
  1092. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-158df2528a1edacc.js +0 -1
  1093. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-158df2528a1edacc.js +0 -1
  1094. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-158df2528a1edacc.js +0 -1
  1095. package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-158df2528a1edacc.js +0 -1
  1096. package/app/.next-cli-build/static/chunks/app/api/models/alias/route-158df2528a1edacc.js +0 -1
  1097. package/app/.next-cli-build/static/chunks/app/api/models/availability/route-158df2528a1edacc.js +0 -1
  1098. package/app/.next-cli-build/static/chunks/app/api/models/custom/route-158df2528a1edacc.js +0 -1
  1099. package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-158df2528a1edacc.js +0 -1
  1100. package/app/.next-cli-build/static/chunks/app/api/models/route-158df2528a1edacc.js +0 -1
  1101. package/app/.next-cli-build/static/chunks/app/api/models/test/route-158df2528a1edacc.js +0 -1
  1102. package/app/.next-cli-build/static/chunks/app/api/oauth/1min/import/route-158df2528a1edacc.js +0 -1
  1103. package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-158df2528a1edacc.js +0 -1
  1104. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-158df2528a1edacc.js +0 -1
  1105. package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-158df2528a1edacc.js +0 -1
  1106. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-158df2528a1edacc.js +0 -1
  1107. package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-158df2528a1edacc.js +0 -1
  1108. package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-158df2528a1edacc.js +0 -1
  1109. package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-158df2528a1edacc.js +0 -1
  1110. package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/auto-import/route-158df2528a1edacc.js +0 -1
  1111. package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/import/route-158df2528a1edacc.js +0 -1
  1112. package/app/.next-cli-build/static/chunks/app/api/oauth/kimi-desktop/quota/route-158df2528a1edacc.js +0 -1
  1113. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-158df2528a1edacc.js +0 -1
  1114. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-158df2528a1edacc.js +0 -1
  1115. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-158df2528a1edacc.js +0 -1
  1116. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-158df2528a1edacc.js +0 -1
  1117. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-158df2528a1edacc.js +0 -1
  1118. package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-158df2528a1edacc.js +0 -1
  1119. package/app/.next-cli-build/static/chunks/app/api/oauth/qwen/import/route-158df2528a1edacc.js +0 -1
  1120. package/app/.next-cli-build/static/chunks/app/api/oauth/wp-studio/import/route-158df2528a1edacc.js +0 -1
  1121. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/auto-import/route-158df2528a1edacc.js +0 -1
  1122. package/app/.next-cli-build/static/chunks/app/api/oauth/zed/import/route-158df2528a1edacc.js +0 -1
  1123. package/app/.next-cli-build/static/chunks/app/api/pricing/route-158df2528a1edacc.js +0 -1
  1124. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-158df2528a1edacc.js +0 -1
  1125. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-158df2528a1edacc.js +0 -1
  1126. package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-158df2528a1edacc.js +0 -1
  1127. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/agnes-profile/route-158df2528a1edacc.js +0 -1
  1128. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/freebuff-profile/route-158df2528a1edacc.js +0 -1
  1129. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/health-timeline/route-158df2528a1edacc.js +0 -1
  1130. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/inxora-profile/route-158df2528a1edacc.js +0 -1
  1131. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-158df2528a1edacc.js +0 -1
  1132. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-api-profile/route-158df2528a1edacc.js +0 -1
  1133. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/onemin-profile/route-158df2528a1edacc.js +0 -1
  1134. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/qwencloud-profile/route-158df2528a1edacc.js +0 -1
  1135. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-158df2528a1edacc.js +0 -1
  1136. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-158df2528a1edacc.js +0 -1
  1137. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-158df2528a1edacc.js +0 -1
  1138. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/v0-profile/route-158df2528a1edacc.js +0 -1
  1139. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/vault-pool/route-158df2528a1edacc.js +0 -1
  1140. package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zenmux-plans/route-158df2528a1edacc.js +0 -1
  1141. package/app/.next-cli-build/static/chunks/app/api/providers/client/route-158df2528a1edacc.js +0 -1
  1142. package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-158df2528a1edacc.js +0 -1
  1143. package/app/.next-cli-build/static/chunks/app/api/providers/route-158df2528a1edacc.js +0 -1
  1144. package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-158df2528a1edacc.js +0 -1
  1145. package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-158df2528a1edacc.js +0 -1
  1146. package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-158df2528a1edacc.js +0 -1
  1147. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-158df2528a1edacc.js +0 -1
  1148. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-158df2528a1edacc.js +0 -1
  1149. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-158df2528a1edacc.js +0 -1
  1150. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-158df2528a1edacc.js +0 -1
  1151. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-158df2528a1edacc.js +0 -1
  1152. package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-158df2528a1edacc.js +0 -1
  1153. package/app/.next-cli-build/static/chunks/app/api/pxpipe/install/route-158df2528a1edacc.js +0 -1
  1154. package/app/.next-cli-build/static/chunks/app/api/pxpipe/status/route-158df2528a1edacc.js +0 -1
  1155. package/app/.next-cli-build/static/chunks/app/api/settings/database/route-158df2528a1edacc.js +0 -1
  1156. package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-158df2528a1edacc.js +0 -1
  1157. package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-158df2528a1edacc.js +0 -1
  1158. package/app/.next-cli-build/static/chunks/app/api/settings/route-158df2528a1edacc.js +0 -1
  1159. package/app/.next-cli-build/static/chunks/app/api/shutdown/route-158df2528a1edacc.js +0 -1
  1160. package/app/.next-cli-build/static/chunks/app/api/swarm/active/route-158df2528a1edacc.js +0 -1
  1161. package/app/.next-cli-build/static/chunks/app/api/swarm/stream/route-158df2528a1edacc.js +0 -1
  1162. package/app/.next-cli-build/static/chunks/app/api/tags/route-158df2528a1edacc.js +0 -1
  1163. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-158df2528a1edacc.js +0 -1
  1164. package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-158df2528a1edacc.js +0 -1
  1165. package/app/.next-cli-build/static/chunks/app/api/translator/load/route-158df2528a1edacc.js +0 -1
  1166. package/app/.next-cli-build/static/chunks/app/api/translator/save/route-158df2528a1edacc.js +0 -1
  1167. package/app/.next-cli-build/static/chunks/app/api/translator/send/route-158df2528a1edacc.js +0 -1
  1168. package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-158df2528a1edacc.js +0 -1
  1169. package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-158df2528a1edacc.js +0 -1
  1170. package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-158df2528a1edacc.js +0 -1
  1171. package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-158df2528a1edacc.js +0 -1
  1172. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-158df2528a1edacc.js +0 -1
  1173. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-158df2528a1edacc.js +0 -1
  1174. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-158df2528a1edacc.js +0 -1
  1175. package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-158df2528a1edacc.js +0 -1
  1176. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-158df2528a1edacc.js +0 -1
  1177. package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-158df2528a1edacc.js +0 -1
  1178. package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-158df2528a1edacc.js +0 -1
  1179. package/app/.next-cli-build/static/chunks/app/api/usage/history/route-158df2528a1edacc.js +0 -1
  1180. package/app/.next-cli-build/static/chunks/app/api/usage/leaderboard/route-158df2528a1edacc.js +0 -1
  1181. package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-158df2528a1edacc.js +0 -1
  1182. package/app/.next-cli-build/static/chunks/app/api/usage/meta/route-158df2528a1edacc.js +0 -1
  1183. package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-158df2528a1edacc.js +0 -1
  1184. package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-158df2528a1edacc.js +0 -1
  1185. package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-158df2528a1edacc.js +0 -1
  1186. package/app/.next-cli-build/static/chunks/app/api/usage/retry-stats/route-158df2528a1edacc.js +0 -1
  1187. package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-158df2528a1edacc.js +0 -1
  1188. package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-158df2528a1edacc.js +0 -1
  1189. package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-158df2528a1edacc.js +0 -1
  1190. package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-158df2528a1edacc.js +0 -1
  1191. package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-158df2528a1edacc.js +0 -1
  1192. package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-158df2528a1edacc.js +0 -1
  1193. package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-158df2528a1edacc.js +0 -1
  1194. package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-158df2528a1edacc.js +0 -1
  1195. package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-158df2528a1edacc.js +0 -1
  1196. package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-158df2528a1edacc.js +0 -1
  1197. package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-158df2528a1edacc.js +0 -1
  1198. package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-158df2528a1edacc.js +0 -1
  1199. package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-158df2528a1edacc.js +0 -1
  1200. package/app/.next-cli-build/static/chunks/app/api/v1/models/route-158df2528a1edacc.js +0 -1
  1201. package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-158df2528a1edacc.js +0 -1
  1202. package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-158df2528a1edacc.js +0 -1
  1203. package/app/.next-cli-build/static/chunks/app/api/v1/route-158df2528a1edacc.js +0 -1
  1204. package/app/.next-cli-build/static/chunks/app/api/v1/search/route-158df2528a1edacc.js +0 -1
  1205. package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-158df2528a1edacc.js +0 -1
  1206. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-158df2528a1edacc.js +0 -1
  1207. package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-158df2528a1edacc.js +0 -1
  1208. package/app/.next-cli-build/static/chunks/app/api/version/route-158df2528a1edacc.js +0 -1
  1209. package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-158df2528a1edacc.js +0 -1
  1210. package/app/.next-cli-build/static/chunks/app/api/version/update/route-158df2528a1edacc.js +0 -1
  1211. package/app/.next-cli-build/static/chunks/app/dashboard/settings/pricing/page-bb9f307074c5c23a.js +0 -1
  1212. package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-158df2528a1edacc.js +0 -1
  1213. package/app/.next-cli-build/static/chunks/app/page-158df2528a1edacc.js +0 -1
  1214. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-158df2528a1edacc.js +0 -1
  1215. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-158df2528a1edacc.js +0 -1
  1216. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-158df2528a1edacc.js +0 -1
  1217. package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-158df2528a1edacc.js +0 -1
  1218. package/app/.next-cli-build/static/css/b7a8bd59db43d15e.css +0 -1
  1219. package/app/public/providers/blackbox-web.svg +0 -6
  1220. package/app/public/providers/chatglm-cn.svg +0 -7
  1221. /package/app/.next-cli-build/static/{7zgJjF0BTyl0D0ZYIuDWj → BmLJ5bmQbpsF-jvZIwr9t}/_ssgManifest.js +0 -0
@@ -0,0 +1,7 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5497],{98:(e,t,a)=>{a.d(t,{default:()=>i});var n=a(95155),r=a(31474);function i({label:e,options:t=[],value:a,onChange:s,placeholder:o="Select an option",error:l,hint:d,disabled:c=!1,required:m=!1,className:u,selectClassName:x,...p}){return(0,n.jsxs)("div",{className:(0,r.cn)("flex flex-col gap-1.5",u),children:[e&&(0,n.jsxs)("label",{className:"text-xs font-semibold text-text-main",children:[e,m&&(0,n.jsx)("span",{className:"ml-1 text-danger",children:"*"})]}),(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsxs)("select",{value:a,onChange:s,disabled:c,className:(0,r.cn)("w-full appearance-none rounded-brand border border-border bg-surface-2 py-2 pl-3 pr-10 text-sm text-text-main","[-webkit-appearance:none] [-moz-appearance:none]","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/35 focus-visible:ring-offset-2 focus-visible:ring-offset-bg","transition-all duration-150 disabled:opacity-50 disabled:cursor-not-allowed","text-[16px] sm:text-sm",l&&"border-danger ring-1 ring-danger/20",x),...p,children:[(0,n.jsx)("option",{value:"",disabled:!0,children:o}),t.map(e=>(0,n.jsx)("option",{value:e.value,children:e.label},e.value))]}),(0,n.jsx)("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center pr-3 text-text-muted",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"expand_more"})})]}),l&&(0,n.jsxs)("p",{className:"flex items-center gap-1 text-xs text-danger",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),l]}),d&&!l&&(0,n.jsx)("p",{className:"text-xs text-text-muted",children:d})]})}},1620:(e,t,a)=>{a.d(t,{D:()=>l});var n=a(12115),r=a(90085);function i(e){let t=window.matchMedia("(prefers-color-scheme: dark)");return t.addEventListener("change",e),()=>t.removeEventListener("change",e)}function s(){return window.matchMedia("(prefers-color-scheme: dark)").matches}function o(){return!1}function l(){let{theme:e,setTheme:t,toggleTheme:a,initTheme:l}=(0,r.A)(),d=(0,n.useSyncExternalStore)(i,s,o);(0,n.useEffect)(()=>{l()},[l]),(0,n.useEffect)(()=>{if("system"!==e)return;let t=window.matchMedia("(prefers-color-scheme: dark)"),a=()=>l();return t.addEventListener("change",a),()=>t.removeEventListener("change",a)},[e,l]);let c="glass"===e,m="dark"===e||c||"system"===e&&d,u="system"===e?d?"dark":"light":e;return{theme:e,setTheme:t,toggleTheme:a,isDark:m,isGlass:c,effectiveTheme:u}}},2106:(e,t,a)=>{a.d(t,{y:()=>O});var n=a(12115),r=a(62630),i=a(82563);let s=(()=>{let e={};for(let t of i.A)if(Array.isArray(t.models))for(let a of t.models){if("string"==typeof a)continue;let n=a.contextWindow??a.contextLength,r=a.maxOutput??a.maxOutputTokens,i="number"==typeof n&&Number.isFinite(n)&&n>0,s="number"==typeof r&&Number.isFinite(r)&&r>0;if(!i&&!s)continue;let o={};i&&(o.contextWindow=n),s&&(o.maxOutput=i?Math.min(r,n):r),(e[t.id]||={})[a.id]=o}return e})();var o=a(35417);let l={vision:!1,pdf:!1,audioInput:!1,videoInput:!1,imageOutput:!1,audioOutput:!1,search:!1,tools:!0,reasoning:!1,thinkingFormat:null,thinkingCanDisable:!0,thinkingRange:null,thinkingMaxEffort:!1,thinkingLevels:null,contextWindow:2e5,maxOutput:64e3},d={"claude-opus-4.6":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-opus-4.7":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-opus-4-7":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-opus-4.8":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-opus-4-6":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-opus-4-8":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-opus-4.8-thinking":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-opus-4-8-thinking":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-sonnet-4.6":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-sonnet-4-6":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-sonnet-5":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-sonnet-5-thinking":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-sonnet-5-agentic":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-sonnet-5-thinking-agentic":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"gpt-image-1":{imageOutput:!0,tools:!1},"glm-4.6v":{vision:!0,reasoning:!0,thinkingFormat:"zai",contextWindow:128e3},"vision-model":{vision:!0,reasoning:!0,thinkingFormat:"qwen",contextWindow:1e6},"coder-model":{reasoning:!0,thinkingFormat:"qwen",contextWindow:1e6}},c={vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:372e3,maxOutput:128e3,thinkingMaxEffort:!0,thinkingLevels:["none","minimal","low","medium","high","xhigh","max","ultra"]},m={vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:272e3,maxOutput:128e3,thinkingMaxEffort:!0,thinkingLevels:["none","minimal","low","medium","high","xhigh","max"]},u={codex:{"gpt-5.6-sol":c,"gpt-5.6-sol-review":c,"gpt-5.6-terra":m,"gpt-5.6-terra-review":m,"gpt-5.6-luna":m,"gpt-5.6-luna-review":m},fireworks:{"accounts/fireworks/models/glm-5p2":{reasoning:!0,thinkingFormat:"openai",contextWindow:1048575,maxOutput:131072},"accounts/fireworks/models/kimi-k2p6":{vision:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:262e3,maxOutput:262e3},"accounts/fireworks/models/kimi-k2-instruct-0905":{vision:!1,reasoning:!1,contextWindow:262144,maxOutput:262144},"accounts/fireworks/models/deepseek-v3p1":{vision:!1,reasoning:!1,contextWindow:128e3,maxOutput:16384},"accounts/fireworks/models/qwen3-235b-a22b":{reasoning:!0,thinkingFormat:"openai",contextWindow:128e3,maxOutput:32768}},nvidia:{"minimaxai/minimax-m2.7":{reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:2e5,maxOutput:131072},"minimaxai/minimax-m3":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:512e3,maxOutput:131072},"z-ai/glm-5.2":{reasoning:!0,thinkingFormat:"openai",contextWindow:2e5,maxOutput:128e3},"deepseek-ai/deepseek-v4-pro":{reasoning:!0,thinkingFormat:"openai",contextWindow:1e6,maxOutput:65536},"deepseek-ai/deepseek-v4-flash":{reasoning:!0,thinkingFormat:"openai",contextWindow:1e6,maxOutput:65536}},"codebuddy-cn":{"glm-5.2":{reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:48e3},"glm-5.1":{reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:2e5,maxOutput:48e3},"glm-5.0":{reasoning:!0,thinkingFormat:"openai",contextWindow:2e5,maxOutput:48e3},"glm-5.0-turbo":{reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:2e5,maxOutput:48e3},"glm-5v-turbo":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:2e5,maxOutput:38e3},hy3:{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:192e3,maxOutput:64e3},"minimax-m3":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:512e3,maxOutput:48e3},"minimax-m2.7":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:2e5,maxOutput:48e3},"kimi-k2.7":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:256e3,maxOutput:32e3},"kimi-k2.6":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:256e3,maxOutput:32e3},"kimi-k2.5":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:164e3,maxOutput:32e3},"hy3-preview":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:192e3,maxOutput:64e3},"deepseek-v4-pro":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:5e4},"deepseek-v4-flash":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:5e4},"deepseek-v3-2-volc":{reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:96e3,maxOutput:32e3}},bynara:{"agnes-2.0-flash":{vision:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:512e3},"agnes-2.5-flash":{vision:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:512e3},"glm-5.3-flash-free":{vision:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:128e3},"grok-4.5-free":{vision:!0,contextWindow:212e3},"laguna-s-2.1":{reasoning:!0,thinkingFormat:"openai",contextWindow:262e3},"ling-3.0-flash-free":{reasoning:!0,thinkingFormat:"openai",contextWindow:262e3},"minimax-m3-free":{vision:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:1e6},"mistral-large":{contextWindow:252e3},"mistral-medium-3-5":{vision:!0,contextWindow:256e3},"nemotron-3-ultra":{contextWindow:1e6},"qwen-3.8-max-free":{contextWindow:262144},"qwen3.8-27b":{reasoning:!0,thinkingFormat:"openai",contextWindow:1e6},"qwen3.8-flash-free":{vision:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:1e6},"stepfun-3.7-flash":{vision:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:262e3},"tencent-hy3-free":{contextWindow:262e3},"deepseek-v4-pro":{vision:!1,reasoning:!0,thinkingFormat:"openai",thinkingMaxEffort:!0,contextWindow:1e6,maxOutput:384e3},"deepseek-v4-pro-free":{vision:!1,reasoning:!0,thinkingFormat:"openai",thinkingMaxEffort:!0,contextWindow:1e6,maxOutput:384e3},"deepseek-v4-flash":{vision:!1,reasoning:!0,thinkingFormat:"openai",thinkingMaxEffort:!0,contextWindow:1e6,maxOutput:384e3},"deepseek-v4-flash-free":{vision:!1,reasoning:!0,thinkingFormat:"openai",thinkingMaxEffort:!0,contextWindow:1e6,maxOutput:384e3}},orcarouter:{"orcarouter/free":{contextWindow:1e6,maxOutput:64e3},"orcarouter/fusion":{reasoning:!0,thinkingFormat:"openai",contextWindow:1e6,maxOutput:64e3},"orcarouter/fusion-flash":{reasoning:!0,thinkingFormat:"openai",contextWindow:1e6,maxOutput:64e3},"orcarouter/fusion-mini":{reasoning:!0,thinkingFormat:"openai",contextWindow:1e6,maxOutput:64e3},"qwen/qwen3.8-27b-free":{vision:!1,reasoning:!0,thinkingFormat:"openai",contextWindow:65536,maxOutput:65536},"qwen/qwen3.8-27b":{vision:!1,reasoning:!0,thinkingFormat:"openai",contextWindow:65536,maxOutput:65536},"qwen/qwen3.7-max":{vision:!1,reasoning:!0,thinkingFormat:"openai",contextWindow:1e6,maxOutput:64e3},"qwen/qwen3.5-27b":{vision:!0,videoInput:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:32768,maxOutput:32768},"deepseek/deepseek-v4-pro":{vision:!1,reasoning:!0,thinkingFormat:"openai",thinkingMaxEffort:!0,contextWindow:1048576,maxOutput:384e3},"deepseek/deepseek-v4-pro-free":{vision:!1,reasoning:!0,thinkingFormat:"openai",thinkingMaxEffort:!0,contextWindow:1048576,maxOutput:384e3},"deepseek/deepseek-v4-flash":{vision:!1,reasoning:!0,thinkingFormat:"openai",thinkingMaxEffort:!0,contextWindow:1048576,maxOutput:384e3},"deepseek/deepseek-v4-flash-free":{vision:!1,reasoning:!0,thinkingFormat:"openai",thinkingMaxEffort:!0,contextWindow:1048576,maxOutput:384e3},"deepseek/deepseek-reasoner":{vision:!1,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:1048576,maxOutput:384e3},"minimax/minimax-m2.7":{vision:!1,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:204800,maxOutput:131072},"openai/gpt-5.5":{vision:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:4e5,maxOutput:128e3},"tencent/hy3-free":{vision:!1,contextWindow:262e3}},tokenharbor:{"claude-opus-5":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3},"claude-fable-5":{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive",contextWindow:1e6,maxOutput:128e3}},"meta-ai":{"muse-spark-1.2":{vision:!0,pdf:!0,audioInput:!0,videoInput:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,thinkingLevels:["minimal","low","medium","high","xhigh"],contextWindow:1048576,maxOutput:131072},"muse-spark-1.2-contributor":{vision:!0,pdf:!0,audioInput:!0,videoInput:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,thinkingLevels:["minimal","low","medium","high","xhigh"],contextWindow:1048576,maxOutput:131072},"muse-spark-1.1":{vision:!0,pdf:!0,audioInput:!0,videoInput:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,thinkingLevels:["minimal","low","medium","high","xhigh"],contextWindow:1048576,maxOutput:131072}},opencode:{"muse-spark-1.2-contributor-free":{vision:!0,pdf:!0,audioInput:!0,videoInput:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,thinkingLevels:["minimal","low","medium","high","xhigh"],contextWindow:1048576,maxOutput:131072}},"codebuddy-intl":{"glm-5.2":{reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:48e3},"glm-5.1":{reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:2e5,maxOutput:48e3},"glm-5.0":{reasoning:!0,thinkingFormat:"openai",contextWindow:2e5,maxOutput:48e3},"glm-5.0-turbo":{reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:2e5,maxOutput:48e3},"glm-5v-turbo":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:2e5,maxOutput:38e3},"glm-4.7":{reasoning:!0,thinkingFormat:"openai",contextWindow:2e5,maxOutput:48e3},"minimax-m3":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:512e3,maxOutput:48e3},"minimax-m2.7":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:2e5,maxOutput:48e3},"kimi-k2.7":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:256e3,maxOutput:32e3},"kimi-k2.6":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:256e3,maxOutput:32e3},"kimi-k2.5":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:164e3,maxOutput:32e3},"hy3-preview":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:192e3,maxOutput:64e3},"deepseek-v4-pro":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:5e4},"deepseek-v4-flash":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:5e4},"deepseek-v3-2-volc":{reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:96e3,maxOutput:32e3}},workbuddy:{hy3:{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:2e5,maxOutput:64e3},"glm-5.2":{reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:48e3},"glm-5.1":{reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:2e5,maxOutput:48e3},"glm-5.0":{reasoning:!0,thinkingFormat:"openai",contextWindow:2e5,maxOutput:48e3},"glm-5.0-turbo":{reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:2e5,maxOutput:48e3},"glm-5v-turbo":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:2e5,maxOutput:38e3},"glm-4.7":{reasoning:!0,thinkingFormat:"openai",contextWindow:2e5,maxOutput:48e3},"minimax-m3":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:512e3,maxOutput:48e3},"minimax-m2.7":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:2e5,maxOutput:48e3},"kimi-k2.7":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:256e3,maxOutput:32e3},"kimi-k2.6":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:256e3,maxOutput:32e3},"kimi-k2.5":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:164e3,maxOutput:32e3},"hy3-preview":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:192e3,maxOutput:64e3},"deepseek-v4-pro":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:5e4},"deepseek-v4-flash":{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:1e6,maxOutput:5e4},"deepseek-v3-2-volc":{reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,contextWindow:96e3,maxOutput:32e3}}},x=[{pattern:"*claude*opus-4.6*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive"}},{pattern:"*claude*opus-4.7*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive"}},{pattern:"*claude*opus-4.8*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive"}},{pattern:"*claude*sonnet-4.6*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive"}},{pattern:"*claude*sonnet-4.7*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-adaptive"}},{pattern:"*claude*haiku*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-budget"}},{pattern:"*claude*opus*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-budget"}},{pattern:"*claude*sonnet*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-budget"}},{pattern:"*claude*fable*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-budget",contextWindow:1e6,maxOutput:128e3}},{pattern:"*claude*mythos*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-budget",contextWindow:1e6,maxOutput:128e3}},{pattern:"*claude-3*",caps:{vision:!0}},{pattern:"*claude-*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"claude-budget"}},{pattern:"*gemini*image*",caps:{vision:!0,imageOutput:!0,contextWindow:1048576}},{pattern:"*gemini-3.7*",caps:{vision:!0,audioInput:!0,videoInput:!0,reasoning:!0,search:!0,thinkingFormat:"gemini-level",thinkingCanDisable:!1,contextWindow:1048576,maxOutput:65536}},{pattern:"*gemini-3*pro*",caps:{vision:!0,audioInput:!0,videoInput:!0,reasoning:!0,search:!0,thinkingFormat:"gemini-level",thinkingCanDisable:!1,contextWindow:1048576,maxOutput:65535}},{pattern:"*gemini-3*",caps:{vision:!0,audioInput:!0,videoInput:!0,reasoning:!0,search:!0,thinkingFormat:"gemini-level",thinkingCanDisable:!1,contextWindow:1048576,maxOutput:65536}},{pattern:"*gemini-2.5*",caps:{vision:!0,audioInput:!0,videoInput:!0,reasoning:!0,search:!0,thinkingFormat:"gemini-budget",thinkingRange:{min:1024,max:24576},contextWindow:1048576,maxOutput:65536}},{pattern:"*gemini-2*",caps:{vision:!0,audioInput:!0,videoInput:!0,search:!0,contextWindow:1048576,maxOutput:65536}},{pattern:"*gemini*",caps:{vision:!0,search:!0,contextWindow:1048576}},{pattern:"*gemma*",caps:{vision:!0,contextWindow:128e3}},{pattern:"*nanobanana*",caps:{vision:!0,imageOutput:!0}},{pattern:"*gpt-5*image*",caps:{imageOutput:!0}},{pattern:"*gpt-5.6-sol*",caps:{reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:272e3,maxOutput:128e3,thinkingMaxEffort:!0}},{pattern:"*gpt-5.6-terra*",caps:{reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:272e3,maxOutput:128e3}},{pattern:"*gpt-5.6-luna*",caps:{reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:272e3,maxOutput:128e3}},{pattern:"*kimi-k3*",caps:{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingCanDisable:!1,thinkingLevels:["low","high","max"],thinkingMaxEffort:!0,contextWindow:1048576,maxOutput:1048576}},{pattern:"*gpt-5*codex*",caps:{reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:4e5,maxOutput:128e3}},{pattern:"*gpt-5*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:4e5,maxOutput:128e3}},{pattern:"*gpt-4o*",caps:{vision:!0,search:!0,contextWindow:128e3,maxOutput:16384}},{pattern:"*mai-code*",caps:{reasoning:!0,thinkingFormat:"openai",contextWindow:256e3,maxOutput:128e3}},{pattern:"*gpt-4.1*",caps:{vision:!0,contextWindow:1e6,maxOutput:32768}},{pattern:"*gpt-4-turbo*",caps:{vision:!0,contextWindow:128e3}},{pattern:"*gpt-4*",caps:{contextWindow:128e3}},{pattern:"*gpt-3.5*",caps:{contextWindow:16385,maxOutput:4096}},{pattern:"*gpt-oss*",caps:{reasoning:!0,thinkingFormat:"openai",contextWindow:128e3}},{pattern:"*o1-mini*",caps:{reasoning:!0,thinkingFormat:"openai",contextWindow:128e3}},{pattern:"*o1-*",caps:{vision:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:2e5,maxOutput:1e5}},{pattern:"*o1_*",caps:{vision:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:2e5,maxOutput:1e5}},{pattern:"*o3-*",caps:{vision:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:2e5,maxOutput:1e5}},{pattern:"*o3_*",caps:{vision:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:2e5,maxOutput:1e5}},{pattern:"*o4-*",caps:{vision:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:2e5,maxOutput:1e5}},{pattern:"*o4_*",caps:{vision:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:2e5,maxOutput:1e5}},{pattern:"o1*",caps:{vision:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:2e5,maxOutput:1e5}},{pattern:"o3*",caps:{vision:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:2e5,maxOutput:1e5}},{pattern:"o4*",caps:{vision:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:2e5,maxOutput:1e5}},{pattern:"*grok-imagine-video*",caps:{videoOutput:!0}},{pattern:"*grok*image*",caps:{imageOutput:!0}},{pattern:"*grok-code*",caps:{reasoning:!0,thinkingFormat:"openai",contextWindow:256e3}},{pattern:"*grok-4.6*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:5e5,thinkingLevels:["low","medium","high","xhigh"]}},{pattern:"*grok-4.5*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:5e5,thinkingLevels:["low","medium","high"]}},{pattern:"*grok-4*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:256e3}},{pattern:"*grok-3*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:131072}},{pattern:"*grok*",caps:{vision:!0,reasoning:!0,search:!0,thinkingFormat:"openai",contextWindow:256e3}},{provider:"tokenrouter",pattern:"*qwen*",caps:{vision:!0,reasoning:!0,thinkingFormat:"openai",thinkingLevels:["low","medium"],thinkingCanDisable:!1,thinkingMaxEffort:!1,contextWindow:262144,maxOutput:65536}},{pattern:"*qwen*vl*",caps:{vision:!0,reasoning:!0,thinkingFormat:"qwen",contextWindow:262144}},{pattern:"*qwen*omni*",caps:{vision:!0,audioInput:!0,videoInput:!0,reasoning:!0,thinkingFormat:"qwen",contextWindow:262144,maxOutput:65536}},{pattern:"*qwen*coder*",caps:{reasoning:!0,thinkingFormat:"qwen",contextWindow:1e6}},{pattern:"*qwen*max*",caps:{reasoning:!0,thinkingFormat:"qwen",contextWindow:1e6,maxOutput:65536}},{pattern:"*qwen3.5*",caps:{vision:!0,videoInput:!0,reasoning:!0,thinkingFormat:"qwen",contextWindow:1e6,maxOutput:65536}},{pattern:"*qwen3.6*",caps:{vision:!0,videoInput:!0,reasoning:!0,thinkingFormat:"qwen",contextWindow:1e6,maxOutput:65536}},{pattern:"*qwen3.7*",caps:{vision:!0,videoInput:!0,reasoning:!0,thinkingFormat:"qwen",contextWindow:1e6,maxOutput:65536}},{pattern:"*qwen3.8*",caps:{reasoning:!0,thinkingFormat:"qwen",contextWindow:262144,maxOutput:65536}},{pattern:"*qwen*plus*",caps:{vision:!0,reasoning:!0,thinkingFormat:"qwen",contextWindow:1e6,maxOutput:65536}},{pattern:"*qwen*235b*",caps:{reasoning:!0,thinkingFormat:"qwen",contextWindow:262144}},{pattern:"*qwq*",caps:{reasoning:!0,thinkingFormat:"qwen",thinkingCanDisable:!1,contextWindow:131072}},{pattern:"*qwen*",caps:{reasoning:!0,thinkingFormat:"qwen",contextWindow:262144}},{pattern:"*kimi*k2.7*code*",caps:{vision:!0,reasoning:!0,thinkingFormat:"kimi",thinkingCanDisable:!1,contextWindow:262144,maxOutput:262144}},{pattern:"*kimi*k2*",caps:{vision:!0,reasoning:!0,thinkingFormat:"kimi",contextWindow:262144,maxOutput:262144}},{pattern:"*kimi-latest*",caps:{vision:!0,reasoning:!0,thinkingFormat:"kimi",contextWindow:262144}},{pattern:"*kimi*",caps:{reasoning:!0,thinkingFormat:"kimi",contextWindow:262144}},{pattern:"*glm-5.3*",caps:{reasoning:!0,thinkingFormat:"zai",thinkingLevels:["low","high","max"],contextWindow:1e6,maxOutput:128e3}},{pattern:"*glm-5.2*",caps:{reasoning:!0,thinkingFormat:"zai",thinkingLevels:["high","max"],contextWindow:1e6,maxOutput:128e3}},{pattern:"*glm-5*",caps:{reasoning:!0,thinkingFormat:"zai",contextWindow:2e5,maxOutput:128e3}},{pattern:"*glm-4.7*",caps:{reasoning:!0,thinkingFormat:"zai",contextWindow:2e5,maxOutput:128e3}},{pattern:"*glm-4*",caps:{reasoning:!0,thinkingFormat:"zai",contextWindow:2e5}},{pattern:"*glm*",caps:{reasoning:!0,thinkingFormat:"zai",contextWindow:2e5}},{pattern:"*deepseek-v4*",caps:{reasoning:!0,thinkingFormat:"deepseek",thinkingMaxEffort:!0,contextWindow:1e6,maxOutput:384e3}},{pattern:"*reasoner*",caps:{reasoning:!0,thinkingFormat:"deepseek",thinkingCanDisable:!1,contextWindow:128e3}},{pattern:"*deepseek-r*",caps:{reasoning:!0,thinkingFormat:"deepseek",thinkingCanDisable:!1,contextWindow:128e3}},{pattern:"*deepseek-chat*",caps:{contextWindow:128e3}},{pattern:"*deepseek*",caps:{reasoning:!0,thinkingFormat:"deepseek",contextWindow:128e3}},{pattern:"*minimax*image*",caps:{imageOutput:!0}},{pattern:"*minimax-m3*",caps:{vision:!0,reasoning:!0,thinkingFormat:"minimax",contextWindow:1048576,maxOutput:512e3}},{pattern:"*minimax-m2.7*",caps:{reasoning:!0,thinkingFormat:"minimax",thinkingCanDisable:!1,contextWindow:204800,maxOutput:131072}},{pattern:"*minimax*",caps:{reasoning:!0,thinkingFormat:"minimax",thinkingCanDisable:!1,contextWindow:2e5,maxOutput:131072}},{pattern:"*mimo*v2.5*",caps:{vision:!0,audioInput:!0,videoInput:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:1048576,maxOutput:131072}},{pattern:"*mimo*auto*",caps:{vision:!0,reasoning:!0,thinkingFormat:"openai",contextWindow:262144,maxOutput:131072}},{pattern:"*mimo*omni*",caps:{vision:!0,audioInput:!0,contextWindow:262144,maxOutput:131072}},{pattern:"*mimo*",caps:{vision:!0,contextWindow:262144,maxOutput:131072}},{pattern:"*llama-4*",caps:{vision:!0,contextWindow:1e6}},{pattern:"*llama*",caps:{contextWindow:128e3}},{pattern:"*codestral*",caps:{contextWindow:256e3}},{pattern:"*mistral-large*",caps:{vision:!0,contextWindow:256e3}},{pattern:"*mistral*",caps:{contextWindow:128e3}},{pattern:"*command-a-reasoning*",caps:{reasoning:!0,thinkingFormat:"openai",contextWindow:256e3,maxOutput:32e3}},{pattern:"*command-a-vision*",caps:{vision:!0,contextWindow:128e3}},{pattern:"*command*",caps:{contextWindow:128e3}},{pattern:"*sonar*",caps:{search:!0,contextWindow:128e3}},{pattern:"*pplx*",caps:{search:!0,contextWindow:128e3}},{pattern:"*perplexity*",caps:{search:!0,contextWindow:128e3}},{pattern:"*laguna*",caps:{reasoning:!0,thinkingFormat:"openai",thinkingLevels:["low","medium","high","xhigh"],contextWindow:1048576,maxOutput:131072}},{pattern:"*ox-alpha*",caps:{reasoning:!0,thinkingFormat:"openai",thinkingLevels:["low","medium","high","xhigh"],contextWindow:1048576,maxOutput:131072}},{pattern:"*0x*alpha*",caps:{reasoning:!0,thinkingFormat:"openai",thinkingLevels:["low","medium","high","xhigh"],contextWindow:1048576,maxOutput:131072}},{pattern:"*x-preview*",caps:{reasoning:!0,thinkingFormat:"openai",thinkingLevels:["low","medium","high","xhigh"],contextWindow:1048576,maxOutput:131072}},{pattern:"*step-3.7*",caps:{reasoning:!0,thinkingFormat:"step",thinkingLevels:["low","medium","high"],contextWindow:256e3,maxOutput:256e3}},{pattern:"*hunyuan*",caps:{reasoning:!0,thinkingFormat:"hunyuan",contextWindow:262144,maxOutput:262144}},{pattern:"hy3*",caps:{reasoning:!0,thinkingFormat:"hunyuan",contextWindow:262144,maxOutput:262144}},{pattern:"*step-*",caps:{reasoning:!0,thinkingFormat:"step",contextWindow:128e3}},{pattern:"*nemotron*",caps:{reasoning:!0,thinkingFormat:"openai",contextWindow:128e3}},{pattern:"*ling-*",caps:{reasoning:!0,thinkingFormat:"openai",contextWindow:128e3}}],p="provider-model",h="provider-registry",g="model-exact",f="family-pattern",b="dynamic-catalog",v="default-floor",k="verified",j="inferred",y="unknown",w={[p]:k,[g]:k,[h]:j,[f]:j,[b]:j,[v]:y};function N(e,t,a,n,r){return{result:e,catalogLimits:null,catalogProvenance:null}}function C(e,t){let a=w[t];return{...e,sourceType:t,confidence:a,known:a!==y}}function S(e,t,a,n=h){if(!t)return C(e,a);let r={...e,...t};return r.maxOutput>r.contextWindow&&(r.maxOutput=r.contextWindow),C(r,n)}function O(){let[e,t]=(0,n.useState)({}),[a,i]=(0,n.useState)({});return(0,n.useEffect)(()=>{let e=!0;return(async()=>{try{let a=await fetch("/api/models");if(!a.ok)return;let n=await a.json(),r={},s={};for(let e of n.models||[])e.caps&&(e.fullModel&&(r[e.fullModel]=e.caps),e.model&&(s[e.model]=e.caps));e&&(t(r),i(s))}catch{}})(),()=>{e=!1}},[]),{getCaps:t=>{if(!t)return null;let n="string"==typeof t?t:String(t);if(e[n])return e[n];let i=n.includes("/")?n.slice(n.indexOf("/")+1):n;if(a[i])return a[i];var c=function(e,t){var a;if(!t)return C({...l},v);if((e=(0,o.g2)(e))&&u[e]?.[t])return C({...l,...u[e][t]},p);let n=(a=e)&&t?s[a]?.[t]??null:null,i=t.includes("/")?t.split("/").pop():t,c=d[i]??d[t];if(c){let{result:a,catalogLimits:r,catalogProvenance:s}=N({...l,...c},Object.keys(c),e,t,i),o=S(a,n??r,g,n?h:b);return s?{...o,catalog:s}:o}for(let{pattern:a,caps:s,provider:o}of x)if((!o||o===e)&&((0,r.gH)(a,i)||(0,r.gH)(a,t))){let{result:a,catalogLimits:r,catalogProvenance:o}=N({...l,...s},Object.keys(s),e,t,i),d=S(a,n??r,f,n?h:b);return o?{...d,catalog:o}:d}let{result:m,catalogLimits:k,catalogProvenance:j}=N({...l},[],e,t,i),y=n?h:j?b:v,w=S(m,n??k,y,y);return j?{...w,catalog:j}:w}(n.includes("/")?n.slice(0,n.indexOf("/")):null,i);if(!c)return{};let m={vision:!!c.vision,search:!!c.search,reasoning:!!c.reasoning,pdf:!!c.pdf,audioInput:!!c.audioInput,videoInput:!!c.videoInput};return"number"==typeof c.maxOutput&&c.maxOutput>0&&(m.maxOutput=c.maxOutput),c.confidence&&"verified"!==c.confidence&&(m.confidence=c.confidence),!1===c.known&&(m.known=!1),c.thinkingMaxEffort&&(m.thinkingMaxEffort=!0),Array.isArray(c.thinkingLevels)&&c.thinkingLevels.length>0&&(m.thinkingLevels=c.thinkingLevels),!1===c.thinkingCanDisable&&(m.thinkingCanDisable=!1),c.thinkingFormat&&(m.thinkingFormat=c.thinkingFormat),m}}}},3544:(e,t,a)=>{a.d(t,{default:()=>s});var n=a(95155),r=a(12115);function i(e){return null==e||""===e?"—":String(e)}function s(){let[e,t]=(0,r.useState)(null),[a,s]=(0,r.useState)(null);return((0,r.useEffect)(()=>{let e=!1;return(async()=>{try{let a=await fetch("/api/oauth/kimi-desktop/quota",{cache:"no-store"});if(!a.ok)throw Error("Quota endpoint unavailable");let n=await a.json();if(!n.found)throw Error(n.error||"Token store not found");e||t(n.quota)}catch(t){e||s(t.message)}})(),()=>{e=!0}},[]),a)?(0,n.jsxs)("div",{className:"rounded-xl border border-border bg-black/[0.02] px-4 py-3 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[14px] align-middle mr-1",children:"info"}),a]}):e?(0,n.jsxs)("div",{className:"rounded-xl border border-border bg-black/[0.02] px-4 py-3 dark:border-white/10 dark:bg-white/[0.03]",children:[(0,n.jsx)("h4",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-text-muted",children:"Kimi Desktop Quota"}),(0,n.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-3",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"text-[10px] uppercase tracking-wide text-text-muted",children:"Tier"}),(0,n.jsx)("p",{className:"mt-0.5 text-sm font-medium text-text-primary",children:i(e.tier)})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"text-[10px] uppercase tracking-wide text-text-muted",children:"Usage Detail"}),(0,n.jsxs)("p",{className:"mt-0.5 text-xs text-text-primary",children:["Subscription Quota: ",(0,n.jsx)("span",{className:"font-medium",children:i(e.usageDetail?.subscriptionQuota)})]}),(0,n.jsxs)("p",{className:"text-xs text-text-primary",children:["Gift Quota: ",(0,n.jsx)("span",{className:"font-medium",children:i(e.usageDetail?.giftQuota)})]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"text-[10px] uppercase tracking-wide text-text-muted",children:"My Quota"}),(0,n.jsxs)("p",{className:"mt-0.5 text-xs text-text-primary",children:["Total Usage: ",(0,n.jsx)("span",{className:"font-medium",children:i(e.myQuota?.totalUsage)})]}),(0,n.jsxs)("p",{className:"text-xs text-text-primary",children:["Gift Usage: ",(0,n.jsx)("span",{className:"font-medium",children:i(e.myQuota?.giftUsage)})]})]})]})]}):(0,n.jsx)("div",{className:"rounded-xl border border-border bg-black/[0.02] px-4 py-3 text-xs text-text-muted dark:border-white/10 dark:bg-white/[0.03]",children:"Loading quota…"})}},4823:(e,t,a)=>{a.d(t,{default:()=>u});var n=a(95155),r=a(12115),i=a(14051),s=a.n(i),o=a(84588),l=a(98),d=a(56061);let c="__none__",m=[{value:"none",label:"None (single pool)"},{value:"round-robin",label:"Round Robin — cycle through all pools"},{value:"random",label:"Random — pick a random pool each request"}];function u({providerId:e}){let[t,a]=(0,r.useState)([]),[i,s]=(0,r.useState)(c),[x,p]=(0,r.useState)("none"),[h,g]=(0,r.useState)(!1),[f,b]=(0,r.useState)(!1);(0,r.useEffect)(()=>{let t=!1;return Promise.all([fetch("/api/proxy-pools?isActive=true",{cache:"no-store"}).then(e=>e.ok?e.json():{proxyPools:[]}),fetch("/api/settings",{cache:"no-store"}).then(e=>e.ok?e.json():{})]).then(([n,r])=>{if(t)return;a(n.proxyPools||[]);let i=(r.providerStrategies||{})[e]||{};s(i.proxyPoolId||c),p(i.rotateStrategy||"none")}).catch(()=>{}),()=>{t=!0}},[e]);let v=async t=>{g(!0);try{let a=await fetch("/api/settings",{cache:"no-store"}),n=(a.ok?await a.json():{}).providerStrategies||{},r={...n[e]||{}},i={...n};Object.assign(r,t),r.proxyPoolId||delete r.proxyPoolId,r.rotateStrategy&&"none"!==r.rotateStrategy||delete r.rotateStrategy,0===Object.keys(r).length?delete i[e]:i[e]=r,await fetch("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({providerStrategies:i})}),b(!0),setTimeout(()=>b(!1),1500)}catch(e){console.log("Save settings error:",e)}finally{g(!1)}},k="none"!==x,j=t.length>=2;return(0,n.jsxs)(o.default,{children:[(0,n.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,n.jsx)("div",{className:"inline-flex items-center justify-center w-10 h-10 rounded-full bg-green-500/10 text-green-500",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"lock_open"})}),(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsx)("p",{className:"text-sm font-medium",children:"No authentication required"}),(0,n.jsx)("p",{className:"text-xs text-text-muted",children:"This provider is ready to use. Optionally route requests through a proxy pool to bypass IP-based limits."})]}),f&&(0,n.jsx)(d.default,{variant:"success",size:"sm",children:"Saved"})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,n.jsx)(l.default,{label:"Rotation Strategy",value:x,onChange:e=>{var t;p(t=e.target.value),v({rotateStrategy:t})},disabled:h,hint:k?j?`Rotating across ${t.length} active pools`:"Need ≥2 active pools for rotation":"Distribute requests across all active proxy pools",options:m.map(e=>({...e,..."none"!==e.value&&!j?{label:`${e.label} (need ≥2 pools)`}:{}}))}),(0,n.jsx)(l.default,{label:"Proxy Pool",value:i,onChange:e=>{var t;s(t=e.target.value),v({proxyPoolId:t===c?"":t})},disabled:h||k,hint:k?"Disabled — rotation auto-selects from all pools":void 0,options:[{value:c,label:"None (direct)"},...t.map(e=>({value:e.id,label:e.name}))]})]})]})}u.propTypes={providerId:s().string.isRequired}},5507:(e,t,a)=>{function n(e,t={}){let a=Array(e.length),r=0;for(let n=0;n<e.length;n++){a[n]=r;let[i,s]=e[n];r+=t[i]??34+30*Math.max(1,Math.ceil((s?.models?.length||0)/6))+12}return{offsets:a,total:r}}function r(e,t,a,n,i=2){let s=e.length;if(0===s)return{start:0,end:-1};let o=Math.max(0,a),l=a+Math.max(1,n),d=s,c=-1;for(let a=0;a<s;a++){let n=e[a];(a+1<s?e[a+1]:t)<=o||n>=l||(a<d&&(d=a),a>c&&(c=a))}if(c<d){let a=Math.max(0,Math.min(o,t-Math.max(1,n)));for(let n=0;n<s;n++){let r=e[n],i=n+1<s?e[n+1]:t;if(a>=r&&a<i){d=n,c=n;break}}c<d&&(d=s-1,c=s-1)}return{start:d=Math.max(0,d-i),end:c=Math.min(s-1,c+i)}}a.d(t,{$7:()=>r,r0:()=>n})},6394:(e,t,a)=>{a.d(t,{default:()=>d});var n=a(95155),r=a(12115),i=a(14051),s=a.n(i),o=a(92542),l=a(79668);function d({provider:e,label:t="Capture",onCaptured:a}){let[i,s]=(0,r.useState)(!1),[c,m]=(0,r.useState)(!1),[u,x]=(0,r.useState)(null),[p,h]=(0,r.useState)(null),g=async()=>{s(!0),x(null),h(null);try{let t=await fetch("/api/providers/capture",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:e})}),n=await t.json();t.ok&&n.credential?(x({ok:!0,message:n.captured?.length?`Captured — ${n.captured.join(", ")}`:"Captured — session found"}),h((0,l.Y)(n.cdpUpSinceMs)),a?.(n.credential,n)):x({ok:!1,message:n.message||n.error||"Capture failed",canLaunch:"browser_not_reachable"===n.error})}catch{x({ok:!1,message:"Capture failed — is the app server running?"})}finally{s(!1)}},f=async()=>{m(!0),x(null);try{let e=await fetch("/api/providers/capture/launch",{method:"POST"}),t=await e.json();e.ok&&(t.alreadyRunning||t.launched)?await g():x({ok:!1,message:t.message||t.error||"Launch failed"})}catch{x({ok:!1,message:"Launch failed — is the app server running?"})}finally{m(!1)}};return(0,n.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,n.jsx)(o.default,{onClick:g,variant:"outline",size:"sm",icon:"language",loading:i,disabled:i||c,children:i?"Capturing...":t}),u?.canLaunch&&!i&&(0,n.jsx)(o.default,{onClick:f,variant:"primary",size:"sm",icon:"open_in_new",loading:c,disabled:c,children:c?"Launching...":"Launch browser"}),(0,n.jsx)("span",{className:"text-xs text-text-muted",children:"reads your session from the running browser tab"})]}),u&&(0,n.jsx)("div",{className:u.ok?"text-xs text-green-400":"text-xs text-yellow-400 break-words",children:u.message}),p&&(0,n.jsxs)("div",{className:"flex items-start gap-1.5 text-xs text-yellow-400 break-words",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[14px] mt-px",children:"warning"}),(0,n.jsx)("span",{children:p.text})]})]})}d.propTypes={provider:s().string.isRequired,label:s().string,onCaptured:s().func}},6587:(e,t,a)=>{a.d(t,{default:()=>s});var n=a(95155),r=a(31474),i=a(97677);function s({icon:e,onClick:t,tooltip:a,variant:o="ghost",size:l="md",disabled:d,loading:c,className:m,...u}){let x=(0,n.jsx)("button",{onClick:t,disabled:d||c,"aria-label":a||e,className:(0,r.cn)("flex shrink-0 items-center justify-center transition-all disabled:opacity-50 disabled:cursor-not-allowed","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/35",{ghost:"text-text-muted hover:bg-surface-2 hover:text-text-main",primary:"text-primary hover:bg-primary/10",danger:"text-danger hover:bg-danger/10",outline:"border border-border text-text-muted hover:border-primary/45 hover:bg-surface-2 hover:text-text-main"}[o],{sm:"size-6 rounded text-[14px]",md:"size-8 rounded-md text-[16px]",lg:"size-10 rounded-lg text-[20px]"}[l],m),...u,children:(0,n.jsx)("span",{className:(0,r.cn)("material-symbols-outlined",c&&"animate-spin"),children:c?"progress_activity":e})});return a?(0,n.jsx)(i.default,{text:a,position:"top",children:x}):x}},7648:(e,t,a)=>{a.d(t,{default:()=>l});var n=a(95155),r=a(12115),i=a(65921),s=a(31852),o=a(17729);function l({children:e}){let[t,a]=(0,r.useState)(!1),d=(0,i.i)(e=>e.notifications),c=(0,i.i)(e=>e.removeNotification);return(0,n.jsxs)("div",{className:"flex h-screen w-full overflow-hidden bg-bg text-text-main",children:[(0,n.jsx)("div",{className:"pointer-events-none fixed inset-0 bg-[radial-gradient(circle_at_top_left,rgba(139,92,246,0.16),transparent_32rem),radial-gradient(circle_at_top_right,rgba(34,211,238,0.10),transparent_28rem)]","aria-hidden":"true"}),(0,n.jsx)("div",{className:"fixed right-4 top-4 z-[80] flex w-[min(92vw,380px)] flex-col gap-2",children:d.map(e=>{var t;let a="success"===(t=e.type)?{wrapper:"border-success/25 bg-success/10 text-success",icon:"check_circle"}:"error"===t?{wrapper:"border-danger/25 bg-danger/10 text-danger",icon:"error"}:"warning"===t?{wrapper:"border-warning/25 bg-warning/10 text-warning",icon:"warning"}:{wrapper:"border-info/25 bg-info/10 text-info",icon:"info"};return(0,n.jsx)("div",{className:`rounded-brand border px-3 py-2 shadow-[var(--shadow-elev)] backdrop-blur-md ${a.wrapper}`,children:(0,n.jsxs)("div",{className:"flex items-start gap-2",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[18px] leading-5",children:a.icon}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[e.title?(0,n.jsx)("p",{className:"mb-0.5 text-xs font-semibold",children:e.title}):null,(0,n.jsx)("p",{className:"whitespace-pre-wrap break-words text-xs",children:e.message})]}),e.dismissible?(0,n.jsx)("button",{type:"button",onClick:()=>c(e.id),className:"text-current/70 hover:text-current","aria-label":"Dismiss notification",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"close"})}):null]})},e.id)})}),t&&(0,n.jsx)("div",{className:"fixed inset-0 z-40 bg-black/40 backdrop-blur-sm lg:hidden",onClick:()=>a(!1)}),(0,n.jsx)("div",{className:"relative hidden lg:flex",children:(0,n.jsx)(s.default,{})}),(0,n.jsx)("div",{className:`fixed inset-y-0 left-0 z-50 transform transition-transform duration-200 ease-out lg:hidden ${t?"translate-x-0":"-translate-x-full"}`,children:(0,n.jsx)(s.default,{onClose:()=>a(!1)})}),(0,n.jsxs)("main",{className:"relative isolate flex h-full min-w-0 flex-1 flex-col",children:[(0,n.jsx)(o.default,{onMenuClick:()=>a(!0)}),(0,n.jsx)("div",{className:"custom-scrollbar flex-1 overflow-y-auto px-4 py-6 sm:px-6 lg:px-8 lg:py-8",children:(0,n.jsx)("div",{className:"mx-auto w-full max-w-7xl",children:e})})]})]})}},8247:(e,t,a)=>{a.d(t,{k:()=>i});var n=a(88105);let r=new Set(["windsurf","trae","cody","kimchi","zai-web","puter","adapta-web","deepseek-web","chatgpt-web","doubao-web","gemini-web","copilot-web","muse-spark-web","duckduckgo-web","venice-web","t3-web","lmarena","veoaifree-web","claude-web","pollinations","poe-web","v0-vercel-web","qwen-web","kimi-web","huggingchat","api-airforce","openvecta","freebuff-web","zenmux-free","perplexity-agent","featherless","moonshot","qwencloud","devin","forge","tokenrouter","qwen-cloud","alibaba","alibaba-cn","alitp-intl","hcnsec","cline","clinepass","grok-web","inxorastudio","inxorastudio-web","bynara","infron","1min","zed","wp-studio","agnes-web","agnes-api","stepfun","unimodel","1min-api","deepinfra","codestral","databricks","venice","vercel-ai-gateway","marathon","qwen2api","kimi-desktop","novita","inferx","tokenharbor","felo-web","bazaarlink","meta-ai","freebuff","g4f-pollinations","fireworks","reka","pioneer","meta-llama","morph","upstage","maritalk","nous-research","liquid","inception","writer","modal","scaleway","ovhcloud","heroku","clarifai","azure-ai","watsonx","oci","sap","snowflake","auriko","chat-oripe","chatanywhere","cloudcode-one","digitalocean","dit","dxnt","electronhub","empower","factory","fastrouter","free-ai","freeaiapikey","freeinference","freemodel-dev","freetheai","friendliai","getgoapi","gitlawb-gmi","gitlawb","helixmind","inference-net","kenari","kilo-gateway","lambda-ai","laozhang","literouter","llamagate","llm-kiwi","llmgateway","meganova-ai","mixlayer","mnn-ai","modelscope","naga-ac","naga-ai","nanogpt","nara","navy","nscale","nube","ofoxai","ollama-cloud","openadapter","opencode-zen","openference-api","piapi","poixe-ai","poolside","predibase","publicai","qiniu","regolo","requesty","routeway","sambanova","speka","sumopod","synthetic","thebai","tokenreply","unorouter","void-ai","wafer","wandb","x5lab","yolo-auto","zerolimitai","zylo-api","lm-studio","vllm","lemonade","llamafile","llama-cpp","triton","docker-model-runner","xinference","oobabooga","soniox","gladia","fishaudio","rev-ai","speechmatics","hailuo-web","gemini-business","inner-ai","notion-web","hyperagent"]);function i(e,t){if(e?.startsWith(n.JH))return"responses"===t?"/providers/oai-r.png":"/providers/oai-cc.png";if(e?.startsWith(n.DI))return"/providers/anthropic-m.png";let a=r.has(e)?"svg":"png";return`/providers/${e}.${a}`}},11059:(e,t,a)=>{a.d(t,{C:()=>r});var n=a(12115);function r(e=2e3){let[t,a]=(0,n.useState)(null),i=(0,n.useRef)(null);return{copied:t,copy:(0,n.useCallback)((t,n="default")=>{(async()=>{if(navigator?.clipboard?.writeText)await navigator.clipboard.writeText(t);else{let e=document.createElement("textarea");e.value=t,e.style.position="fixed",e.style.opacity="0",document.body.appendChild(e),e.select(),document.execCommand("copy"),document.body.removeChild(e)}})(),a(n),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{a(null)},e)},[e])}}},11910:(e,t,a)=>{a.d(t,{default:()=>i});var n=a(95155),r=a(31474);function i({label:e,type:t="text",placeholder:a,value:s,onChange:o,error:l,hint:d,icon:c,disabled:m=!1,required:u=!1,className:x,inputClassName:p,...h}){return(0,n.jsxs)("div",{className:(0,r.cn)("flex flex-col gap-1.5",x),children:[e&&(0,n.jsxs)("label",{className:"text-xs font-semibold text-text-main",children:[e,u&&(0,n.jsx)("span",{className:"ml-1 text-danger",children:"*"})]}),(0,n.jsxs)("div",{className:"relative",children:[c&&(0,n.jsx)("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3 text-text-muted",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:c})}),(0,n.jsx)("input",{type:t,placeholder:a,value:s,onChange:o,disabled:m,className:(0,r.cn)("w-full rounded-brand border border-border bg-surface-2 px-3 py-2 text-sm text-text-main placeholder:text-text-muted/70","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/35 focus-visible:ring-offset-2 focus-visible:ring-offset-bg","transition-all duration-150 ease-out disabled:opacity-50 disabled:cursor-not-allowed","text-[16px] sm:text-sm",c&&"pl-10",l&&"border-danger ring-1 ring-danger/20",p),...h})]}),l&&(0,n.jsxs)("p",{className:"flex items-center gap-1 text-xs text-danger",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"error"}),l]}),d&&!l&&(0,n.jsx)("p",{className:"text-xs text-text-muted",children:d})]})}},13282:(e,t,a)=>{a.d(t,{default:()=>l});var n=a(95155),r=a(12115),i=a(14051),s=a.n(i),o=a(35497);function l({isOpen:e,onSuccess:t,onClose:a}){let[i,s]=(0,r.useState)(!1),[d,c]=(0,r.useState)(!1),[m,u]=(0,r.useState)(!1),[x,p]=(0,r.useState)(""),[h,g]=(0,r.useState)(""),[f,b]=(0,r.useState)(null),v=async()=>{s(!0),b(null),u(!1);try{let e=await fetch("/api/oauth/wp-studio/import"),t=await e.json();t.found?(u(!0),p(t.email||""),g(t.expiresAt||"")):b(t.error||"Studio Code credentials not found")}catch{b("Failed to check Studio Code credentials")}finally{s(!1)}};(0,r.useEffect)(()=>{e&&v()},[e]);let k=async()=>{c(!0),b(null);try{let e=await fetch("/api/oauth/wp-studio/import",{method:"POST"}),n=await e.json();if(!e.ok)throw Error(n.error||"Import failed");t?.(),a()}catch(e){b(e.message)}finally{c(!1)}};return(0,n.jsx)(o.aF,{isOpen:e,title:"Connect WordPress Studio Code",onClose:a,children:(0,n.jsxs)("div",{className:"flex flex-col gap-4",children:[i&&(0,n.jsxs)("div",{className:"text-center py-6",children:[(0,n.jsx)("div",{className:"size-12 mx-auto mb-3 rounded-full bg-primary/10 flex items-center justify-center",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-2xl text-primary animate-spin",children:"progress_activity"})}),(0,n.jsx)("p",{className:"text-sm text-text-muted",children:"Checking for Studio Code..."})]}),!i&&m&&(0,n.jsx)("div",{className:"bg-green-50 dark:bg-green-900/20 p-3 rounded-lg border border-green-200 dark:border-green-800",children:(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-green-600 dark:text-green-400",children:"check_circle"}),(0,n.jsxs)("div",{className:"text-sm text-green-800 dark:text-green-200",children:[(0,n.jsx)("p",{className:"font-medium",children:"Studio Code detected!"}),x&&(0,n.jsx)("p",{className:"text-xs mt-0.5",children:x}),h&&(0,n.jsxs)("p",{className:"text-xs mt-0.5 text-green-600 dark:text-green-400",children:["Token expires: ",new Date(h).toLocaleDateString()]})]})]})}),!i&&!m&&!f&&(0,n.jsx)("div",{className:"bg-amber-50 dark:bg-amber-900/20 p-3 rounded-lg border border-amber-200 dark:border-amber-800",children:(0,n.jsxs)("p",{className:"text-sm text-amber-800 dark:text-amber-200",children:["Studio Code credentials not found. Install"," ",(0,n.jsx)("a",{href:"https://developer.wordpress.com/studio/",target:"_blank",rel:"noopener noreferrer",className:"underline font-medium",children:"WordPress Studio Code"})," ","and log in, then click Retry."]})}),f&&(0,n.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-lg border border-red-200 dark:border-red-800",children:(0,n.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:f})}),(0,n.jsx)("div",{className:"bg-blue-50 dark:bg-blue-900/20 p-3 rounded-lg border border-blue-200 dark:border-blue-800",children:(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-blue-600 dark:text-blue-400 text-[18px]",children:"info"}),(0,n.jsxs)("div",{className:"text-xs text-blue-800 dark:text-blue-200 space-y-1",children:[(0,n.jsx)("p",{children:(0,n.jsx)("strong",{children:"How it works:"})}),(0,n.jsxs)("ol",{className:"list-decimal list-inside space-y-0.5",children:[(0,n.jsxs)("li",{children:["Install ",(0,n.jsx)("a",{href:"https://developer.wordpress.com/studio/",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"WordPress Studio Code"})]}),(0,n.jsx)("li",{children:"Log in with your WordPress.com account (free)"}),(0,n.jsx)("li",{children:'Click "Import" — we read your token automatically'})]}),(0,n.jsx)("p",{className:"mt-1",children:"Token expires in 14 days. Re-import after expiry."})]})]})}),(0,n.jsxs)("div",{className:"flex gap-2",children:[!i&&!m&&(0,n.jsx)(o.$n,{onClick:v,variant:"outline",fullWidth:!0,children:"Retry"}),m&&(0,n.jsx)(o.$n,{onClick:k,fullWidth:!0,disabled:d,children:d?"Importing...":"Import Credentials"}),(0,n.jsx)(o.$n,{onClick:a,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}l.propTypes={isOpen:s().bool.isRequired,onSuccess:s().func,onClose:s().func.isRequired}},17729:(e,t,a)=>{a.d(t,{default:()=>v});var n=a(95155),r=a(12115),i=a(73321),s=a(14051),o=a.n(s),l=a(80752),d=a(93308),c=a(38202),m=a(21931);function u(){let[e,t]=(0,r.useState)(!1),[a,i]=(0,r.useState)("en");return(0,r.useEffect)(()=>{i(function(){if("u"<typeof document)return"en";let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${d.CL}=`)),t=e?decodeURIComponent(e.split("=")[1]):"en";return(0,d.QC)(t)}())},[e]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("button",{onClick:()=>t(!0),className:"flex items-center justify-center p-2 rounded-lg text-text-muted hover:text-text-main hover:bg-black/5 dark:hover:bg-white/5 transition-all",title:"Language","data-i18n-skip":"true",children:(0,n.jsx)("span",{className:"text-lg leading-none",children:c.h[a]||"\uD83C\uDF10"})}),(0,n.jsx)(m.default,{hideTrigger:!0,isOpen:e,onClose:e=>{t(!1),i(e)}})]})}var x=a(38587),p=a(65921);let h={error:{icon:"error",color:"#EF4444"},success:{icon:"check_circle",color:"#10B981"},warning:{icon:"warning",color:"#F59E0B"},info:{icon:"info",color:"#3B82F6"}};function g(){let[e,t]=(0,r.useState)(!1),a=(0,r.useRef)(null),s=(0,r.useRef)(0),o=(0,i.useRouter)(),{events:l}=function(){let[e,t]=(0,r.useState)(!1),[a,n]=(0,r.useState)(null),[i,s]=(0,r.useState)([]),o=(0,r.useRef)(null),l=(0,r.useRef)(null),d=(0,r.useRef)(0),c=(0,r.useCallback)(()=>{o.current&&o.current.close();let e=new EventSource("/api/dashboard/stream");o.current=e,e.onopen=()=>{t(!0),d.current=0},e.onmessage=e=>{try{let t=JSON.parse(e.data);if(!t||!t.type)return;"snapshot"===t.type?fetch("/api/usage/meta").then(e=>e.json()).then(e=>{e.error||n(e)}).catch(()=>{}):"usage_update"===t.type?fetch("/api/usage/meta").then(e=>e.json()).then(e=>{e.error||n(e)}).catch(()=>{}):("provider_down"===t.type||"provider_recovered"===t.type||"health_update"===t.type)&&s(e=>[{...t,ts:Date.now()},...e].slice(0,20))}catch{}},e.onerror=()=>{t(!1),e.close(),o.current=null,l.current&&clearTimeout(l.current);let a=Math.min(2e3*Math.pow(2,d.current),3e4);d.current++,l.current=setTimeout(c,a)}},[]);return(0,r.useEffect)(()=>(c(),()=>{o.current&&o.current.close(),l.current&&clearTimeout(l.current)}),[c]),{connected:e,stats:a,events:i,clearEvents:(0,r.useCallback)(()=>s([]),[])}}(),{history:d,unreadCount:c,markAllRead:m,clearHistory:u}=(0,p.i)(),x=new Set(["provider_down","provider_recovered","health_degraded","rate_limited","budget_exceeded"]);return(0,r.useEffect)(()=>{if(0===l.length)return;let e=l[0];x.has(e.type)&&e.ts&&e.ts>s.current&&(s.current=e.ts,p.i.getState().addServerEvent(e))},[l]),(0,r.useEffect)(()=>{if(!e)return;let n=e=>{a.current&&!a.current.contains(e.target)&&t(!1)};return document.addEventListener("mousedown",n),()=>document.removeEventListener("mousedown",n)},[e]),(0,n.jsxs)("div",{className:"relative",ref:a,children:[(0,n.jsxs)("button",{onClick:()=>{let a=!e;t(a),a&&requestAnimationFrame(()=>m())},className:"relative flex size-9 items-center justify-center rounded-lg text-text-muted transition-colors hover:bg-surface-2 hover:text-text-primary","aria-label":"Notifications",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"notifications"}),c>0&&(0,n.jsx)("span",{className:"absolute -right-0.5 -top-0.5 flex size-4 items-center justify-center rounded-full bg-red-500 text-[9px] font-bold text-white",children:c>9?"9+":c})]}),e&&(0,n.jsxs)("div",{className:"absolute right-0 top-full z-50 mt-2 w-80 overflow-hidden rounded-xl border border-border bg-surface shadow-lg",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between border-b border-border-subtle px-3 py-2",children:[(0,n.jsx)("span",{className:"text-xs font-semibold uppercase tracking-wide text-text-muted",children:"Notifications"}),d.length>0&&(0,n.jsx)("button",{onClick:u,className:"text-[10px] text-text-muted transition-colors hover:text-danger",children:"Clear all"})]}),(0,n.jsx)("div",{className:"max-h-[400px] overflow-y-auto",children:0===d.length?(0,n.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 py-8",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[32px] text-text-muted opacity-20",children:"notifications_off"}),(0,n.jsx)("span",{className:"text-xs text-text-muted",children:"No notifications yet"})]}):d.map(e=>{var a;let r,i=h[e.type]||h.info;return(0,n.jsxs)("button",{onClick:()=>{e.provider&&o.push(`/dashboard/providers/${e.provider}`),t(!1)},className:"flex w-full items-start gap-2.5 border-b border-border-subtle px-3 py-2.5 text-left transition-colors hover:bg-surface-2/50",children:[(0,n.jsx)("div",{className:"mt-0.5 flex size-6 shrink-0 items-center justify-center rounded-full",style:{backgroundColor:`${i.color}15`},children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[14px]",style:{color:i.color},children:i.icon})}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[e.title&&(0,n.jsx)("p",{className:"truncate text-xs font-medium text-text-primary",children:e.title}),(0,n.jsx)("p",{className:"text-xs text-text-muted line-clamp-2",children:e.message}),(0,n.jsx)("p",{className:"mt-0.5 text-[10px] text-text-muted/60",children:(a=e.createdAt,(r=Date.now()-a)<6e4?"just now":r<36e5?`${Math.floor(r/6e4)}m ago`:r<864e5?`${Math.floor(r/36e5)}h ago`:`${Math.floor(r/864e5)}d ago`)})]})]},e.id)})})]})]})}var f=a(38003);let b=[["/dashboard/endpoint",{title:"Endpoint",description:"Gateway URL, tunnels, and API keys",icon:"api"}],["/dashboard/providers",{title:"Providers",description:"Provider registry and account health",icon:"dns"}],["/dashboard/combos",{title:"Combos",description:"Model routing strategies and fallback chains",icon:"layers"}],["/dashboard/usage",{title:"Activity",description:"Requests, analytics, and request details",icon:"bar_chart"}],["/dashboard/quota",{title:"Quota",description:"Capacity, resets, and account availability",icon:"data_usage"}],["/dashboard/token-saver",{title:"Token Saver",description:"Compression policies for prompt and tool output",icon:"savings"}],["/dashboard/cli-tools",{title:"CLI Tools",description:"Configure developer tools to use ExtremeRouter",icon:"terminal"}],["/dashboard/proxy-pools",{title:"Proxy Pools",description:"Outbound proxy routing and health checks",icon:"lan"}],["/dashboard/skills",{title:"Skills",description:"Reusable agent skills and install links",icon:"extension"}],["/dashboard/profile",{title:"Settings",description:"Security, routing, network, and account settings",icon:"settings"}],["/dashboard/translator",{title:"Translator",description:"Inspect format conversion between clients and providers",icon:"translate"}],["/dashboard/console-log",{title:"Console",description:"Live server logs",icon:"monitor"}],["/dashboard/mitm",{title:"MITM Proxy",description:"Intercept selected IDE traffic through the gateway",icon:"security"}],["/dashboard/media-providers",{title:"Media Providers",description:"Image, audio, embedding, and web providers",icon:"perm_media"}]];function v({onMenuClick:e,showMenuButton:t=!0}){let a=(0,i.usePathname)(),[s,o]=(0,r.useState)(""),[d,c]=(0,r.useState)(""),m=(0,r.useMemo)(()=>(function(e){if(!e||"/dashboard"===e)return b[0][1];let t=b.find(([t])=>e.startsWith(t));return t?t[1]:{title:"ExtremeRouter",description:"Gateway Console",icon:"hub"}})(a),[a]);(0,r.useEffect)(()=>{let e=!1;return async function(){try{let t=await fetch("/api/auth/status",{cache:"no-store"});if(!t.ok)return;let a=await t.json();e||(o(a?.displayName||a?.oidcName||a?.oidcEmail||""),c(a?.loginMethod||""))}catch{e||(o(""),c(""))}}(),()=>{e=!0}},[]);let p=async()=>{try{(await fetch("/api/auth/logout",{method:"POST"})).ok&&window.location.assign("/login")}catch(e){console.error("Failed to logout:",e)}};return(0,n.jsx)("header",{className:"shrink-0 border-b border-border-subtle bg-bg/70 px-4 py-3 backdrop-blur-xl lg:px-6",children:(0,n.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,n.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[t&&(0,n.jsx)("button",{onClick:e,className:"rounded p-1.5 text-text-muted transition-colors hover:bg-surface-2 hover:text-text-main lg:hidden","aria-label":"Open sidebar",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"menu"})}),(0,n.jsx)("div",{className:"hidden size-8 shrink-0 items-center justify-center rounded-brand bg-primary/10 text-primary ring-1 ring-primary/15 sm:flex",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:m.icon})}),(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsx)("h1",{className:"truncate text-sm font-semibold tracking-tight text-text-main sm:text-base",children:m.title}),(0,n.jsx)("p",{className:"hidden truncate text-xs text-text-muted md:block",children:m.description})]})]}),(0,n.jsxs)("div",{className:"flex shrink-0 items-center gap-1.5",children:[s&&"OIDC"===d&&(0,n.jsxs)("div",{className:"hidden max-w-[220px] items-center rounded-full border border-border bg-surface-2 px-3 py-1 text-xs text-text-muted sm:flex",children:[(0,n.jsx)("span",{className:"truncate",children:s}),(0,n.jsx)("span",{className:"ml-2 rounded-full bg-primary/10 px-1.5 py-0.5 text-[10px] font-semibold text-primary",children:"OIDC"})]}),(0,n.jsx)(k,{}),(0,n.jsx)(g,{}),(0,n.jsx)(x.default,{}),(0,n.jsx)(u,{}),(0,n.jsx)(l.default,{onLogout:p})]})]})})}function k(){let e=(0,f.C)(e=>e.visible),t=(0,f.C)(e=>e.query),a=(0,f.C)(e=>e.placeholder),r=(0,f.C)(e=>e.setQuery);return e?(0,n.jsxs)("div",{className:"relative hidden w-[220px] md:block",children:[(0,n.jsx)("span",{className:"material-symbols-outlined pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-[16px] text-text-muted",children:"search"}),(0,n.jsx)("input",{type:"text",value:t,onChange:e=>r(e.target.value),placeholder:a,className:"h-8 w-full rounded-brand border border-border bg-surface-2 pl-8 pr-7 text-xs text-text-main placeholder:text-text-muted/70 focus:outline-none focus:ring-2 focus:ring-primary/30"}),t&&(0,n.jsx)("button",{type:"button",onClick:()=>r(""),className:"absolute right-1.5 top-1/2 -translate-y-1/2 rounded p-0.5 text-text-muted hover:bg-surface-3 hover:text-text-main","aria-label":"Clear search",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]}):null}v.propTypes={onMenuClick:o().func,showMenuButton:o().bool}},17969:(e,t,a)=>{a.d(t,{default:()=>l});var n=a(95155),r=a(12115),i=a(14051),s=a.n(i),o=a(35497);function l({isOpen:e,onSuccess:t,onClose:a}){let[i,s]=(0,r.useState)(""),[d,c]=(0,r.useState)(""),[m,u]=(0,r.useState)(""),[x,p]=(0,r.useState)(null),[h,g]=(0,r.useState)(!1),f=async()=>{if(!i.trim())return void p("Please enter your JWT token");if(!d.trim())return void p("Please enter your Team ID");g(!0),p(null);try{let e=await fetch("/api/oauth/1min/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jwt:i.trim(),teamId:d.trim(),cookies:m.trim()})}),n=await e.json();if(!e.ok)throw Error(n.error||"Import failed");t?.(),a()}catch(e){p(e.message)}finally{g(!1)}};return(0,n.jsx)(o.aF,{isOpen:e,title:"Connect 1min.ai",onClose:a,children:(0,n.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,n.jsx)("div",{className:"bg-blue-50 dark:bg-blue-900/20 p-3 rounded-lg border border-blue-200 dark:border-blue-800",children:(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-blue-600 dark:text-blue-400 text-[18px]",children:"info"}),(0,n.jsxs)("div",{className:"text-xs text-blue-800 dark:text-blue-200 space-y-1",children:[(0,n.jsxs)("p",{children:["Log in at ",(0,n.jsx)("a",{href:"https://app.1min.ai/code-generator",target:"_blank",rel:"noopener noreferrer",className:"underline font-medium",children:"app.1min.ai/code-generator"}),", open DevTools → Network."]}),(0,n.jsxs)("p",{children:["Find any request to ",(0,n.jsx)("code",{className:"bg-blue-100 dark:bg-blue-900/40 px-1 rounded",children:"api.1min.ai/teams/..."})," and copy:"]})]})]})}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["JWT Token ",(0,n.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,n.jsx)("textarea",{value:i,onChange:e=>s(e.target.value),placeholder:"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",rows:3,className:"w-full px-3 py-2 text-sm font-mono border border-border rounded-lg bg-background focus:outline-none focus:border-primary resize-none"}),(0,n.jsxs)("p",{className:"text-[11px] text-text-muted mt-1",children:["From the ",(0,n.jsx)("code",{className:"bg-black/5 dark:bg-white/5 px-1 rounded",children:"x-auth-token"}),'request header (starts with "Bearer eyJ...")']})]}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["Team ID ",(0,n.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,n.jsx)(o.pd,{value:d,onChange:e=>c(e.target.value),placeholder:"3cf6f69c-2006-4ce2-93d5-de493365e967",className:"font-mono text-sm"}),(0,n.jsxs)("p",{className:"text-[11px] text-text-muted mt-1",children:["The UUID in the API URL path: ",(0,n.jsxs)("code",{className:"bg-black/5 dark:bg-white/5 px-1 rounded",children:["api.1min.ai/teams/","<Team ID>","/..."]})]})]}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["Cookies ",(0,n.jsx)("span",{className:"text-text-muted font-normal",children:"(optional)"})]}),(0,n.jsx)("textarea",{value:m,onChange:e=>u(e.target.value),placeholder:"cf_clearance=...; mp_..._mixpanel=...",rows:2,className:"w-full px-3 py-2 text-sm font-mono border border-border rounded-lg bg-background focus:outline-none focus:border-primary resize-none"}),(0,n.jsx)("p",{className:"text-[11px] text-text-muted mt-1",children:"Full Cookie header — needed if api.1min.ai is behind Cloudflare for your region"})]}),x&&(0,n.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-lg border border-red-200 dark:border-red-800",children:(0,n.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:x})}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(o.$n,{onClick:f,fullWidth:!0,disabled:h||!i.trim()||!d.trim(),children:h?"Importing...":"Import Credentials"}),(0,n.jsx)(o.$n,{onClick:a,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}l.propTypes={isOpen:s().bool.isRequired,onSuccess:s().func,onClose:s().func.isRequired}},20476:(e,t,a)=>{a.d(t,{default:()=>d});var n=a(95155),r=a(12115),i=a(14051),s=a.n(i),o=a(92542),l=a(79668);function d({onCaptured:e}){let[t,a]=(0,r.useState)(!1),[i,s]=(0,r.useState)(!1),[c,m]=(0,r.useState)(null),[u,x]=(0,r.useState)(null),p=async()=>{a(!0),m(null),x(null);try{let t=await fetch("/api/providers/felo-capture",{method:"POST"}),a=await t.json();t.ok&&a.credential?(m({ok:!0,message:a.profile?"Captured — session valid":"Captured — session cookie found",profile:a.profile}),x((0,l.Y)(a.cdpUpSinceMs)),e?.(a.credential,a.profile)):m({ok:!1,message:a.message||a.error||"Capture failed",canLaunch:"browser_not_reachable"===a.error})}catch{m({ok:!1,message:"Capture failed — is the app server running?"})}finally{a(!1)}},h=async()=>{s(!0),m(null);try{let e=await fetch("/api/providers/felo-capture/launch",{method:"POST"}),t=await e.json();e.ok&&(t.alreadyRunning||t.launched)?await p():m({ok:!1,message:t.message||t.error||"Launch failed"})}catch{m({ok:!1,message:"Launch failed — is the app server running?"})}finally{s(!1)}};return(0,n.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,n.jsx)(o.default,{onClick:p,variant:"outline",size:"sm",icon:"language",loading:t,disabled:t||i,children:t?"Capturing...":"Capture from Felo"}),c?.canLaunch&&!t&&(0,n.jsx)(o.default,{onClick:h,variant:"primary",size:"sm",icon:"open_in_new",loading:i,disabled:i,children:i?"Launching...":"Launch browser"}),(0,n.jsx)("span",{className:"text-xs text-text-muted",children:"reads your session from the running browser tab"})]}),c&&(0,n.jsxs)("div",{className:c.ok?"text-xs text-green-400":"text-xs text-yellow-400 break-words",children:[c.ok&&c.profile&&(0,n.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[c.profile.image&&(0,n.jsx)("img",{src:c.profile.image,alt:"",className:"h-5 w-5 rounded-full"}),(0,n.jsx)("span",{className:"font-medium",children:c.profile.name}),c.profile.email&&(0,n.jsxs)("span",{className:"text-text-muted",children:["(",c.profile.email,")"]})]}),c.message]}),u&&(0,n.jsxs)("div",{className:"flex items-start gap-1.5 text-xs text-yellow-400 break-words",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[14px] mt-px",children:"warning"}),(0,n.jsx)("span",{children:u.text})]})]})}d.propTypes={onCaptured:s().func}},21931:(e,t,a)=>{a.d(t,{default:()=>d});var n=a(95155),r=a(12115),i=a(47650),s=a(93308),o=a(73006);let l=e=>({en:{name:"English",flag:"\uD83C\uDDFA\uD83C\uDDF8"},vi:{name:"Tiếng Việt",flag:"\uD83C\uDDFB\uD83C\uDDF3"},"zh-CN":{name:"简体中文",flag:"\uD83C\uDDE8\uD83C\uDDF3"},"zh-TW":{name:"繁體中文",flag:"\uD83C\uDDF9\uD83C\uDDFC"},ja:{name:"日本語",flag:"\uD83C\uDDEF\uD83C\uDDF5"},"pt-BR":{name:"Portugu\xeas (Brasil)",flag:"\uD83C\uDDE7\uD83C\uDDF7"},"pt-PT":{name:"Portugu\xeas (Portugal)",flag:"\uD83C\uDDF5\uD83C\uDDF9"},ko:{name:"한국어",flag:"\uD83C\uDDF0\uD83C\uDDF7"},es:{name:"Espa\xf1ol",flag:"\uD83C\uDDEA\uD83C\uDDF8"},de:{name:"Deutsch",flag:"\uD83C\uDDE9\uD83C\uDDEA"},fr:{name:"Fran\xe7ais",flag:"\uD83C\uDDEB\uD83C\uDDF7"},he:{name:"עברית",flag:"\uD83C\uDDEE\uD83C\uDDF1"},ar:{name:"العربية",flag:"\uD83C\uDDF8\uD83C\uDDE6"},ru:{name:"Русский",flag:"\uD83C\uDDF7\uD83C\uDDFA"},pl:{name:"Polski",flag:"\uD83C\uDDF5\uD83C\uDDF1"},cs:{name:"Čeština",flag:"\uD83C\uDDE8\uD83C\uDDFF"},nl:{name:"Nederlands",flag:"\uD83C\uDDF3\uD83C\uDDF1"},tr:{name:"T\xfcrk\xe7e",flag:"\uD83C\uDDF9\uD83C\uDDF7"},uk:{name:"Українська",flag:"\uD83C\uDDFA\uD83C\uDDE6"},tl:{name:"Tagalog",flag:"\uD83C\uDDF5\uD83C\uDDED"},id:{name:"Indonesia",flag:"\uD83C\uDDEE\uD83C\uDDE9"},th:{name:"ไทย",flag:"\uD83C\uDDF9\uD83C\uDDED"},hi:{name:"हिन्दी",flag:"\uD83C\uDDEE\uD83C\uDDF3"},bn:{name:"বাংলা",flag:"\uD83C\uDDE7\uD83C\uDDE9"},ur:{name:"اردو",flag:"\uD83C\uDDF5\uD83C\uDDF0"},ro:{name:"Rom\xe2nă",flag:"\uD83C\uDDF7\uD83C\uDDF4"},sv:{name:"Svenska",flag:"\uD83C\uDDF8\uD83C\uDDEA"},it:{name:"Italiano",flag:"\uD83C\uDDEE\uD83C\uDDF9"},el:{name:"Ελληνικά",flag:"\uD83C\uDDEC\uD83C\uDDF7"},hu:{name:"Magyar",flag:"\uD83C\uDDED\uD83C\uDDFA"},fi:{name:"Suomi",flag:"\uD83C\uDDEB\uD83C\uDDEE"},da:{name:"Dansk",flag:"\uD83C\uDDE9\uD83C\uDDF0"},no:{name:"Norsk",flag:"\uD83C\uDDF3\uD83C\uDDF4"}})[e]||{name:e,flag:"\uD83C\uDF10"};function d({className:e="",isOpen:t,onClose:a,hideTrigger:c=!1}){let[m,u]=(0,r.useState)("en"),[x,p]=(0,r.useState)(!1),[h,g]=(0,r.useState)(!1),f=(0,r.useRef)(null),b="boolean"==typeof t,v=b?t:h,k=e=>{b?!e&&a&&a(m):g(e)};(0,r.useEffect)(()=>{u(function(){if("u"<typeof document)return"en";let e=document.cookie.split(";").find(e=>e.trim().startsWith(`${s.CL}=`)),t=e?decodeURIComponent(e.split("=")[1]):"en";return(0,s.QC)(t)}())},[]),(0,r.useEffect)(()=>{function e(e){f.current&&!f.current.contains(e.target)&&k(!1)}if(v)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[v]);let j=async e=>{if(e!==m&&!x){p(!0),k(!1);try{await fetch("/api/locale",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({locale:e})}),await (0,o.wn)(),u(e)}catch(e){console.error("Failed to set locale:",e)}finally{p(!1)}}};return(0,n.jsxs)("div",{className:e,children:[!c&&(0,n.jsxs)("button",{onClick:()=>k(!v),disabled:x,className:"flex items-center gap-2 px-3 py-2 rounded-lg text-text-muted hover:text-text-main hover:bg-surface/60 transition-colors",title:"Language","data-i18n-skip":"true",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"language"}),(0,n.jsx)("span",{className:"text-sm font-medium",children:l(m).name}),(0,n.jsx)("span",{className:"text-lg",children:l(m).flag})]}),v&&(0,i.createPortal)((0,n.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4","data-i18n-skip":"true",children:[(0,n.jsx)("div",{className:"absolute inset-0 bg-black/30 backdrop-blur-sm",onClick:()=>k(!1)}),(0,n.jsxs)("div",{ref:f,className:"relative w-full bg-surface border border-black/10 dark:border-white/10 rounded-xl shadow-2xl animate-in fade-in zoom-in-95 duration-200 max-w-2xl flex flex-col max-h-[80vh]",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between p-3 border-b border-black/5 dark:border-white/5",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Select Language"}),(0,n.jsx)("button",{onClick:()=>k(!1),className:"p-1.5 rounded-lg text-text-muted hover:bg-black/5 dark:hover:bg-white/5 transition-colors","aria-label":"Close",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,n.jsx)("div",{className:"p-6 overflow-y-auto flex-1",children:(0,n.jsx)("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(100px,1fr))] gap-2",children:s.YZ.map(e=>{let t=m===e,a=l(e);return(0,n.jsxs)("button",{onClick:()=>j(e),disabled:x,className:`flex flex-col items-center justify-start gap-1 px-2 py-3 rounded-lg text-xs font-medium transition-colors w-full ${t?"bg-primary/15 text-primary ring-2 ring-primary":"text-text-main hover:bg-black/5 dark:hover:bg-white/5"} ${x?"opacity-70 cursor-wait":""}`,title:a.name,children:[(0,n.jsx)("span",{className:"text-2xl",children:a.flag}),(0,n.jsx)("span",{className:"text-center leading-tight line-clamp-2 h-8 flex items-center",children:a.name}),t&&(0,n.jsx)("span",{className:"material-symbols-outlined text-sm",children:"check"})]},e)})})})]})]}),document.body)]})}},22269:(e,t,a)=>{a.d(t,{S:()=>n});let n={"chatgpt-web":{label:"Capture from ChatGPT",domains:["chatgpt.com"],cookies:["__Secure-next-auth.session-token"]},"claude-web":{label:"Capture from Claude",domains:["claude.ai"],cookies:["sessionKey","cf_clearance"]},"gemini-web":{label:"Capture from Gemini",domains:["gemini.google.com"],cookies:["__Secure-1PSID","__Secure-1PSIDTS"]},"deepseek-web":{label:"Capture from DeepSeek",domains:["chat.deepseek.com"],localStorage:["userToken"],mode:"bare"},"kimi-web":{label:"Capture from Kimi",domains:["www.kimi.com"],cookies:["kimi-auth"]},"grok-web":{label:"Capture from Grok",domains:["grok.com"],cookies:["sso"]},"poe-web":{label:"Capture from Poe",domains:["poe.com"],cookies:["p-b"]},"perplexity-web":{label:"Capture from Perplexity",domains:["perplexity.ai"],cookies:["__Secure-next-auth.session-token"]},"blackbox-web":{label:"Capture from Blackbox",domains:["app.blackbox.ai"],cookies:["next-auth.session-token"]},"freebuff-web":{label:"Capture from FreeBuff",domains:["freebuff.com"],cookies:["__Secure-next-auth.session-token"]},"muse-spark-web":{label:"Capture from Meta AI",domains:["meta.ai"],cookies:["ecto_1_sess"]},puter:{label:"Capture from Puter",domains:["puter.com"],cookies:["puter_auth_token"]},"api-airforce":{label:"Capture from API Airforce",domains:["api.airforce"],cookies:["airforce_session"],mode:"bare"},"adapta-web":{label:"Capture from Adapta",domains:["clerk.agent.adapta.one"],cookies:["__client"],mode:"bare"},"agnes-web":{label:"Capture from Agnes",domains:["app.agnes-ai.com"],cookies:["token"],mode:"bare"},"1min":{label:"Capture from 1min.ai",domains:["app.1min.ai"],authorization:!0,mode:"bare"},"inxorastudio-web":{label:"Capture from Inxora Studio",domains:["labs.inxorastudio.com"],authorization:!0,mode:"bare"},"zai-web":{label:"Capture from Z.ai",domains:["chat.z.ai"],localStorage:["token"],mode:"bare"},"doubao-web":{label:"Capture from Doubao",domains:["doubao.com"],fullCookieHeader:!0},huggingchat:{label:"Capture from HuggingChat",domains:["huggingface.co"],fullCookieHeader:!0},lmarena:{label:"Capture from LMArena",domains:["lmarena.ai"],fullCookieHeader:!0},"t3-web":{label:"Capture from T3",domains:["t3.chat"],fullCookieHeader:!0},"v0-vercel-web":{label:"Capture from v0",domains:["v0.app"],fullCookieHeader:!0},"venice-web":{label:"Capture from Venice",domains:["venice.ai"],fullCookieHeader:!0},"zenmux-free":{label:"Capture from ZenMux",domains:["zenmux.ai"],fullCookieHeader:!0},"qwen-web":{label:"Capture from Qwen",domains:["chat.qwen.ai"],fullCookieHeader:!0},qwencloud:{label:"Capture from QwenCloud",domains:["qwencloud.com"],fullCookieHeader:!0},"tencent-aistudio-web":{label:"Capture from Tencent AI Studio",domains:["aistudio.tencent.ai"],fullCookieHeader:!0}}},23936:(e,t,a)=>{a.d(t,{default:()=>l});var n=a(95155),r=a(12115),i=a(14051),s=a.n(i),o=a(35497);function l({isOpen:e,onSuccess:t,onClose:a}){let[i,s]=(0,r.useState)(""),[d,c]=(0,r.useState)(!1),[m,u]=(0,r.useState)(null),[x,p]=(0,r.useState)(!1),h=async()=>{if(!i.trim())return void u("Please paste your cookie");c(!0),u(null);try{let e=await fetch("/api/oauth/iflow/cookie",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cookie:i.trim()})}),a=await e.json();if(!e.ok)throw Error(a.error||"Authentication failed");p(!0),setTimeout(()=>{t?.(),g()},1500)}catch(e){u(e.message)}finally{c(!1)}},g=()=>{s(""),u(null),p(!1),a?.()};return(0,n.jsx)(o.aF,{isOpen:e,onClose:g,title:"iFlow Cookie Authentication",children:(0,n.jsx)("div",{className:"space-y-4",children:x?(0,n.jsxs)("div",{className:"text-center py-8",children:[(0,n.jsx)("div",{className:"text-6xl mb-4",children:"✅"}),(0,n.jsx)("p",{className:"text-lg font-medium text-text-primary",children:"Authentication Successful!"}),(0,n.jsx)("p",{className:"text-sm text-text-muted mt-2",children:"Fresh API key obtained"})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsxs)("p",{className:"text-sm text-text-muted",children:["To get a fresh API key, paste your browser cookie from"," ",(0,n.jsx)("a",{href:"https://platform.iflow.cn",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"platform.iflow.cn"})]}),(0,n.jsxs)("div",{className:"bg-surface-secondary p-3 rounded-lg text-xs space-y-2",children:[(0,n.jsx)("p",{className:"font-medium text-text-primary",children:"How to get cookie:"}),(0,n.jsxs)("ol",{className:"list-decimal list-inside space-y-1 text-text-muted",children:[(0,n.jsx)("li",{children:"Open platform.iflow.cn in your browser"}),(0,n.jsx)("li",{children:"Login to your account"}),(0,n.jsx)("li",{children:"Open DevTools (F12) → Application/Storage → Cookies"}),(0,n.jsx)("li",{children:"Copy the entire cookie string (must include BXAuth)"}),(0,n.jsx)("li",{children:"Paste it below"})]})]})]}),(0,n.jsxs)("div",{className:"space-y-2",children:[(0,n.jsx)("label",{className:"block text-sm font-medium text-text-primary",children:"Cookie String"}),(0,n.jsx)("textarea",{value:i,onChange:e=>s(e.target.value),placeholder:"BXAuth=xxx; ...",className:"w-full px-3 py-2 bg-surface-secondary border border-border rounded-lg text-sm text-text-primary placeholder-text-muted focus:outline-none focus:ring-2 focus:ring-primary resize-none",rows:4,disabled:d})]}),m&&(0,n.jsx)("div",{className:"p-3 bg-error/10 border border-error/20 rounded-lg",children:(0,n.jsx)("p",{className:"text-sm text-error",children:m})}),(0,n.jsxs)("div",{className:"flex gap-3 pt-2",children:[(0,n.jsx)(o.$n,{variant:"secondary",onClick:g,disabled:d,fullWidth:!0,children:"Cancel"}),(0,n.jsx)(o.$n,{onClick:h,loading:d,fullWidth:!0,children:"Authenticate"})]})]})})})}l.propTypes={isOpen:s().bool.isRequired,onSuccess:s().func,onClose:s().func}},25086:(e,t,a)=>{a.d(t,{CardSkeleton:()=>l,PageLoading:()=>s,Skeleton:()=>o,Spinner:()=>i,default:()=>d});var n=a(95155),r=a(31474);function i({size:e="md",className:t}){return(0,n.jsx)("span",{className:(0,r.cn)("material-symbols-outlined animate-spin text-brand-500",{sm:"size-4",md:"size-6",lg:"size-8",xl:"size-12"}[e],t),children:"progress_activity"})}function s({message:e="Loading..."}){return(0,n.jsxs)("div",{className:"fixed inset-0 z-50 flex flex-col items-center justify-center bg-bg",children:[(0,n.jsx)(i,{size:"xl"}),(0,n.jsx)("p",{className:"mt-4 text-text-muted",children:e})]})}function o({className:e,...t}){return(0,n.jsx)("div",{className:(0,r.cn)("animate-pulse rounded-[10px] bg-surface-2",e),...t})}function l(){return(0,n.jsxs)("div",{className:"p-6 rounded-[14px] border border-border-subtle bg-surface shadow-[var(--shadow-soft)]",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,n.jsx)(o,{className:"h-4 w-24"}),(0,n.jsx)(o,{className:"size-10 rounded-[10px]"})]}),(0,n.jsx)(o,{className:"h-8 w-16 mb-2"}),(0,n.jsx)(o,{className:"h-3 w-20"})]})}function d({type:e="spinner",...t}){switch(e){case"page":return(0,n.jsx)(s,{...t});case"skeleton":return(0,n.jsx)(o,{...t});case"card":return(0,n.jsx)(l,{...t});default:return(0,n.jsx)(i,{...t})}}},28058:(e,t,a)=>{a.d(t,{default:()=>s});var n=a(95155),r=a(12115),i=a(81127);function s({isOpen:e,onClose:t,onAdd:a,addedNames:o=[]}){let[l,d]=(0,r.useState)([]),[c,m]=(0,r.useState)(!1),[u,x]=(0,r.useState)(""),[p,h]=(0,r.useState)("all"),[g,f]=(0,r.useState)(null),[b,v]=(0,r.useState)(null),[k,j]=(0,r.useState)({}),[y,w]=(0,r.useState)({}),[N,C]=(0,r.useState)({});(0,r.useEffect)(()=>{!e||l.length>0||(m(!0),fetch("/api/cli-tools/cowork-mcp-registry").then(e=>e.json()).then(e=>{e.error?f(e.error):d(e.servers||[])}).catch(e=>f(e.message)).finally(()=>m(!1)))},[e]);let S=(0,r.useMemo)(()=>new Set(o),[o]),O=(0,r.useMemo)(()=>{let e=u.trim().toLowerCase();return l.filter(t=>("authless"!==p||!t.oauth)&&("oauth"!==p||!!t.oauth)&&(!e||(t.title||"").toLowerCase().includes(e)||(t.description||"").toLowerCase().includes(e)||(t.name||"").toLowerCase().includes(e)))},[l,u,p]),W=async e=>{if(!k[e.url]){w(t=>({...t,[e.url]:!0}));try{let t=await fetch("/api/cli-tools/cowork-mcp-tools",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:e.url})}),a=await t.json(),n=a.tools||[],r=Array.isArray(e.toolNames)?e.toolNames:[],i=n.length>0?n.map(e=>e.name):r;j(t=>({...t,[e.url]:{tools:n,requiresAuth:!!a.requiresAuth,error:a.error}})),C(t=>({...t,[e.url]:Object.fromEntries(i.map(e=>[e,!0]))}))}catch(t){j(a=>({...a,[e.url]:{tools:[],error:t.message}}))}finally{w(t=>({...t,[e.url]:!1}))}}},F=(e,t)=>{let a=N[e]||{};C(n=>({...n,[e]:Object.fromEntries(Object.keys(a).map(e=>[e,t]))}))};return(0,n.jsx)(i.default,{isOpen:e,onClose:t,title:"Browse MCP Marketplace",size:"lg",children:(0,n.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("input",{type:"text",value:u,onChange:e=>x(e.target.value),placeholder:"Search by name or description...",className:"flex-1 px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50"}),(0,n.jsxs)("select",{value:p,onChange:e=>h(e.target.value),className:"px-2 py-1.5 bg-surface rounded text-xs border border-border focus:outline-none focus:ring-1 focus:ring-primary/50",children:[(0,n.jsx)("option",{value:"all",children:"All"}),(0,n.jsx)("option",{value:"authless",children:"Authless"}),(0,n.jsx)("option",{value:"oauth",children:"OAuth"})]})]}),g&&(0,n.jsx)("div",{className:"px-2 py-1.5 rounded text-xs bg-red-500/10 text-red-600",children:g}),c&&(0,n.jsxs)("div",{className:"flex items-center gap-2 text-text-muted text-xs py-4 justify-center",children:[(0,n.jsx)("span",{className:"material-symbols-outlined animate-spin text-[18px]",children:"progress_activity"}),(0,n.jsx)("span",{children:"Loading registry..."})]}),!c&&(0,n.jsxs)("div",{className:"flex flex-col gap-1 max-h-[60vh] overflow-y-auto",children:[0===O.length&&(0,n.jsx)("div",{className:"text-center text-xs text-text-muted py-6",children:"No servers match filter"}),O.map(e=>{let t=S.has(e.slug||e.name),r=b===e.url,i=k[e.url],s=y[e.url],o=N[e.url]||{},l=Object.keys(o),d=Object.values(o).filter(Boolean).length;return(0,n.jsxs)("div",{className:"rounded border border-transparent hover:border-border",children:[(0,n.jsxs)("div",{className:"flex items-start gap-2 px-2 py-2 hover:bg-black/5 dark:hover:bg-white/5",children:[e.iconUrl?(0,n.jsx)("img",{src:e.iconUrl,alt:"",className:"size-7 rounded shrink-0 object-contain",onError:e=>{e.target.style.display="none"}}):(0,n.jsx)("div",{className:"size-7 rounded bg-surface shrink-0"}),(0,n.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,n.jsxs)("div",{className:"flex items-center gap-1.5 flex-wrap",children:[(0,n.jsx)("span",{className:"font-medium text-xs",children:e.title}),e.oauth?(0,n.jsx)("span",{className:"px-1 py-0.5 text-[9px] rounded bg-amber-500/10 text-amber-600",children:"OAuth"}):(0,n.jsx)("span",{className:"px-1 py-0.5 text-[9px] rounded bg-green-500/10 text-green-600",children:"Authless"}),e.toolCount>0&&(0,n.jsxs)("span",{className:"text-[10px] text-text-muted",children:[e.toolCount," tools"]})]}),e.description&&(0,n.jsx)("p",{className:"text-[10px] text-text-muted line-clamp-2 mt-0.5",children:e.description})]}),(0,n.jsx)("button",{onClick:()=>t?null:void(b===e.url?v(null):(v(e.url),W(e))),disabled:t,className:`shrink-0 px-2 py-1 rounded text-[10px] font-medium transition-colors ${t?"bg-green-500/10 text-green-600 cursor-default":r?"bg-surface border border-border text-text-muted hover:bg-black/5":"bg-primary/10 border border-primary/40 text-primary hover:bg-primary/20"}`,children:t?"Added":r?"Cancel":"+ Add"})]}),r&&(0,n.jsxs)("div",{className:"px-3 py-2 bg-surface/40 border-t border-border flex flex-col gap-2",children:[s&&(0,n.jsxs)("div",{className:"flex items-center gap-2 text-text-muted text-[10px] py-1",children:[(0,n.jsx)("span",{className:"material-symbols-outlined animate-spin text-[14px]",children:"progress_activity"}),(0,n.jsx)("span",{children:"Probing server for tools..."})]}),!s&&i?.requiresAuth&&(0,n.jsx)("p",{className:"text-[10px] text-amber-600 bg-amber-500/10 px-2 py-1 rounded",children:"\uD83D\uDD10 OAuth required. Add now and authenticate after Apply; tool list will be discovered after first connect."}),!s&&i?.error&&!i?.requiresAuth&&(0,n.jsxs)("p",{className:"text-[10px] text-red-600 bg-red-500/10 px-2 py-1 rounded",children:["Probe failed: ",i.error]}),!s&&0===l.length&&!i?.requiresAuth&&!i?.error&&(0,n.jsx)("p",{className:"text-[10px] text-text-muted",children:"No tools advertised by server."}),!s&&l.length>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsxs)("span",{className:"text-[10px] text-text-muted",children:[d,"/",l.length," tools enabled"]}),(0,n.jsxs)("div",{className:"flex gap-1",children:[(0,n.jsx)("button",{onClick:()=>F(e.url,!0),className:"text-[10px] text-primary hover:underline",children:"All"}),(0,n.jsx)("span",{className:"text-[10px] text-text-muted",children:"\xb7"}),(0,n.jsx)("button",{onClick:()=>F(e.url,!1),className:"text-[10px] text-primary hover:underline",children:"None"})]})]}),(0,n.jsx)("div",{className:"grid grid-cols-2 gap-1 max-h-40 overflow-y-auto",children:l.map(t=>(0,n.jsxs)("label",{className:"flex items-center gap-1.5 text-[10px] cursor-pointer hover:bg-black/5 dark:hover:bg-white/5 px-1 rounded",children:[(0,n.jsx)("input",{type:"checkbox",checked:!!o[t],onChange:()=>{var a;return a=e.url,void C(e=>({...e,[a]:{...e[a],[t]:!e[a]?.[t]}}))},className:"size-3"}),(0,n.jsx)("span",{className:"truncate",children:t})]},t))})]}),(0,n.jsx)("button",{onClick:()=>{let t,n;return n=Object.keys(t=N[e.url]||{}).filter(e=>t[e]),void(a?.({name:e.slug||e.name,title:e.title,description:e.description,url:e.url,transport:e.transport,oauth:e.oauth,toolNames:n}),v(null))},className:"self-end px-2 py-1 rounded text-[10px] font-medium bg-primary text-white hover:bg-primary/90",children:"✓ Confirm Add"})]})]},e.url)})]}),(0,n.jsxs)("div",{className:"text-[10px] text-text-muted text-right",children:[O.length," of ",l.length," servers"]})]})})}},28067:(e,t,a)=>{a.d(t,{default:()=>i});var n=a(95155),r=a(31474);function i({options:e=[],value:t,onChange:a,size:s="md",className:o}){let l={sm:"h-7 text-xs",md:"h-9 text-sm",lg:"h-11 text-base"};return(0,n.jsx)("div",{className:(0,r.cn)("inline-flex items-center p-1 rounded-[10px] overflow-x-auto","bg-surface-2",o),children:e.map(e=>(0,n.jsxs)("button",{onClick:()=>a(e.value),className:(0,r.cn)("shrink-0 px-4 rounded-[8px] font-medium transition-all",l[s],t===e.value?"bg-surface text-text-main shadow-sm":"text-text-muted hover:text-text-main"),children:[e.icon&&(0,n.jsx)("span",{className:"material-symbols-outlined text-[16px] mr-1.5",children:e.icon}),e.label]},e.value))})}},28815:(e,t,a)=>{a.d(t,{default:()=>l});var n=a(95155),r=a(12115),i=a(81127),s=a(92542),o=a(11059);function l({isOpen:e,onClose:t,title:a="Manual Configuration",configs:d=[]}){let{copy:c}=(0,o.C)(),[m,u]=(0,r.useState)(null);return(0,n.jsx)(i.default,{isOpen:e,onClose:t,title:a,size:"xl",children:(0,n.jsx)("div",{className:"flex flex-col gap-4",children:d.map((e,t)=>(0,n.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsx)("span",{className:"text-sm font-medium text-text-main",children:e.filename}),(0,n.jsxs)(s.default,{variant:"ghost",size:"sm",onClick:()=>{var a;return a=e.content,void(c(a,`manualconfig-${t}`),u(t),setTimeout(()=>u(null),2e3))},children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[14px] mr-1",children:m===t?"check":"content_copy"}),m===t?"Copied!":"Copy"]})]}),(0,n.jsx)("pre",{className:"px-3 py-2 bg-black/5 dark:bg-white/5 rounded font-mono text-xs overflow-x-auto whitespace-pre-wrap break-all max-h-60 overflow-y-auto border border-border",children:e.content})]},t))})})}},29366:(e,t,a)=>{a.d(t,{default:()=>s});var n=a(95155),r=a(28777),i=a(97677);function s({caps:e,className:t="",colorOverride:a,size:o=16}){if(!e)return null;let l=Object.keys(r.bs).filter(t=>e[t]);return 0===l.length?null:(0,n.jsx)("span",{className:`inline-flex items-center gap-0.5 ${t}`,children:l.map(e=>(0,n.jsx)(i.default,{text:`${r.bs[e].label} — ${r.bs[e].desc}`,children:(0,n.jsx)("span",{className:`material-symbols-outlined leading-none cursor-help ${a||r.bs[e].color}`,style:{fontSize:`${o}px`},children:r.bs[e].icon})},e))})}},30312:(e,t,a)=>{a.d(t,{default:()=>l});var n=a(95155),r=a(12115),i=a(14051),s=a.n(i),o=a(35497);function l({isOpen:e,onSuccess:t,onClose:a}){let[i,s]=(0,r.useState)(""),[d,c]=(0,r.useState)(""),[m,u]=(0,r.useState)(null),[x,p]=(0,r.useState)(!1),[h,g]=(0,r.useState)(!1),[f,b]=(0,r.useState)(!1),[v,k]=(0,r.useState)(!1),j=async()=>{g(!0),u(null),b(!1),k(!1);try{let e=await fetch("/api/oauth/zed/auto-import"),t=await e.json();t.found?(s(t.userId),c(t.accessToken),b(!0)):t.windowsManual?k(!0):u(t.error||"Could not auto-detect Zed credentials")}catch{u("Failed to auto-detect Zed credentials")}finally{g(!1)}};(0,r.useEffect)(()=>{e&&j()},[e]);let y=async()=>{if(!i.trim())return void u("Please enter your Zed user ID");if(!d.trim())return void u("Please enter your Zed access token");p(!0),u(null);try{let e=await fetch("/api/oauth/zed/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userId:i.trim(),accessToken:d.trim()})}),n=await e.json();if(!e.ok)throw Error(n.error||"Import failed");t?.(),a()}catch(e){u(e.message)}finally{p(!1)}};return(0,n.jsx)(o.aF,{isOpen:e,title:"Connect Zed Hosted AI",onClose:a,children:(0,n.jsxs)("div",{className:"flex flex-col gap-4",children:[h&&(0,n.jsxs)("div",{className:"text-center py-6",children:[(0,n.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,n.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Auto-detecting credentials..."}),(0,n.jsx)("p",{className:"text-sm text-text-muted",children:"Reading from Zed Editor keychain"})]}),!h&&(0,n.jsxs)(n.Fragment,{children:[f&&(0,n.jsx)("div",{className:"bg-green-50 dark:bg-green-900/20 p-3 rounded-lg border border-green-200 dark:border-green-800",children:(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-green-600 dark:text-green-400",children:"check_circle"}),(0,n.jsx)("p",{className:"text-sm text-green-800 dark:text-green-200",children:"Credentials auto-detected from Zed Editor successfully!"})]})}),v&&(0,n.jsxs)("div",{className:"bg-amber-50 dark:bg-amber-900/20 p-3 rounded-lg border border-amber-200 dark:border-amber-800 flex flex-col gap-2",children:[(0,n.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-amber-600 dark:text-amber-400",children:"info"}),(0,n.jsx)("p",{className:"text-sm font-medium text-amber-800 dark:text-amber-200",children:"Could not read Zed credentials automatically."})]}),(0,n.jsxs)("p",{className:"text-xs text-amber-700 dark:text-amber-300",children:["Make sure Zed Editor is installed and you've logged in at least once, then click ",(0,n.jsx)("strong",{children:"Retry"}),". If the problem persists, paste your credentials manually below."]}),(0,n.jsx)(o.$n,{onClick:j,variant:"outline",fullWidth:!0,children:"Retry"})]}),!f&&!v&&!m&&(0,n.jsx)("div",{className:"bg-blue-50 dark:bg-blue-900/20 p-3 rounded-lg border border-blue-200 dark:border-blue-800",children:(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-blue-600 dark:text-blue-400",children:"info"}),(0,n.jsx)("p",{className:"text-sm text-blue-800 dark:text-blue-200",children:"Zed Editor not detected. Please paste your credentials manually."})]})}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["User ID ",(0,n.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,n.jsx)(o.pd,{value:i,onChange:e=>s(e.target.value),placeholder:"Numeric Zed user id (e.g. 123456)",className:"font-mono text-sm"})]}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["Access Token ",(0,n.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,n.jsx)("textarea",{value:d,onChange:e=>c(e.target.value),placeholder:"Zed access token (or keyring JSON v2 blob)",rows:3,className:"w-full px-3 py-2 text-sm font-mono border border-border rounded-lg bg-background focus:outline-none focus:border-primary resize-none"})]}),m&&(0,n.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-lg border border-red-200 dark:border-red-800",children:(0,n.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:m})}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(o.$n,{onClick:y,fullWidth:!0,disabled:x||!i.trim()||!d.trim(),children:x?"Importing...":"Import Credentials"}),(0,n.jsx)(o.$n,{onClick:a,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})})}l.propTypes={isOpen:s().bool.isRequired,onSuccess:s().func,onClose:s().func.isRequired}},30815:(e,t,a)=>{a.d(t,{default:()=>l});var n=a(95155),r=a(12115),i=a(14051),s=a.n(i),o=a(35497);function l({isOpen:e,onSuccess:t,onClose:a}){let[i,s]=(0,r.useState)(""),[d,c]=(0,r.useState)(""),[m,u]=(0,r.useState)(null),[x,p]=(0,r.useState)(!1),[h,g]=(0,r.useState)(!1),[f,b]=(0,r.useState)(!1),[v,k]=(0,r.useState)(!1),j=async()=>{g(!0),u(null),b(!1),k(!1);try{let e=await fetch("/api/oauth/cursor/auto-import"),t=await e.json();t.found?(s(t.accessToken),c(t.machineId),b(!0)):t.windowsManual?k(!0):u(t.error||"Could not auto-detect tokens")}catch(e){u("Failed to auto-detect tokens")}finally{g(!1)}};(0,r.useEffect)(()=>{e&&j()},[e]);let y=async()=>{if(!i.trim())return void u("Please enter an access token");if(!d.trim())return void u("Please enter a machine ID");p(!0),u(null);try{let e=await fetch("/api/oauth/cursor/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accessToken:i.trim(),machineId:d.trim()})}),n=await e.json();if(!e.ok)throw Error(n.error||"Import failed");t?.(),a()}catch(e){u(e.message)}finally{p(!1)}};return(0,n.jsx)(o.aF,{isOpen:e,title:"Connect Cursor IDE",onClose:a,children:(0,n.jsxs)("div",{className:"flex flex-col gap-4",children:[h&&(0,n.jsxs)("div",{className:"text-center py-6",children:[(0,n.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,n.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Auto-detecting tokens..."}),(0,n.jsx)("p",{className:"text-sm text-text-muted",children:"Reading from Cursor IDE database"})]}),!h&&(0,n.jsxs)(n.Fragment,{children:[f&&(0,n.jsx)("div",{className:"bg-green-50 dark:bg-green-900/20 p-3 rounded-lg border border-green-200 dark:border-green-800",children:(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-green-600 dark:text-green-400",children:"check_circle"}),(0,n.jsx)("p",{className:"text-sm text-green-800 dark:text-green-200",children:"Tokens auto-detected from Cursor IDE successfully!"})]})}),v&&(0,n.jsxs)("div",{className:"bg-amber-50 dark:bg-amber-900/20 p-3 rounded-lg border border-amber-200 dark:border-amber-800 flex flex-col gap-2",children:[(0,n.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-amber-600 dark:text-amber-400",children:"info"}),(0,n.jsx)("p",{className:"text-sm font-medium text-amber-800 dark:text-amber-200",children:"Could not read Cursor database automatically."})]}),(0,n.jsxs)("p",{className:"text-xs text-amber-700 dark:text-amber-300",children:["Make sure Cursor IDE has been opened at least once, then click ",(0,n.jsx)("strong",{children:"Retry"}),". If the problem persists, paste your tokens manually below."]}),(0,n.jsx)(o.$n,{onClick:j,variant:"outline",fullWidth:!0,children:"Retry"})]}),!f&&!v&&!m&&(0,n.jsx)("div",{className:"bg-blue-50 dark:bg-blue-900/20 p-3 rounded-lg border border-blue-200 dark:border-blue-800",children:(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-blue-600 dark:text-blue-400",children:"info"}),(0,n.jsx)("p",{className:"text-sm text-blue-800 dark:text-blue-200",children:"Cursor IDE not detected. Please paste your tokens manually."})]})}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["Access Token ",(0,n.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,n.jsx)("textarea",{value:i,onChange:e=>s(e.target.value),placeholder:"Access token will be auto-filled...",rows:3,className:"w-full px-3 py-2 text-sm font-mono border border-border rounded-lg bg-background focus:outline-none focus:border-primary resize-none"})]}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["Machine ID ",(0,n.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,n.jsx)(o.pd,{value:d,onChange:e=>c(e.target.value),placeholder:"Machine ID will be auto-filled...",className:"font-mono text-sm"})]}),m&&(0,n.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-lg border border-red-200 dark:border-red-800",children:(0,n.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:m})}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(o.$n,{onClick:y,fullWidth:!0,disabled:x||!i.trim()||!d.trim(),children:x?"Importing...":"Import Token"}),(0,n.jsx)(o.$n,{onClick:a,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})})}l.propTypes={isOpen:s().bool.isRequired,onSuccess:s().func,onClose:s().func.isRequired}},31852:(e,t,a)=>{a.d(t,{default:()=>b});var n=a(95155),r=a(12115),i=a(98500),s=a.n(i),o=a(73321),l=a(14051),d=a.n(l),c=a(31474),m=a(90620),u=a(67098),x=a(47650);let p=[{id:"paypal",label:"PayPal",description:"paypal.me/XYOURZONE",icon:"account_balance_wallet",color:"#0070BA",url:"https://paypal.me/XYOURZONE",qr:"https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://paypal.me/XYOURZONE"},{id:"kofi",label:"Ko-fi",description:"ko-fi.com/rsalman",icon:"coffee",color:"#FF5E5B",url:"https://ko-fi.com/rsalman",qr:"https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://ko-fi.com/rsalman"},{id:"saweria",label:"Saweria (APAC)",description:"saweria.co/rsalman",icon:"savings",color:"#6E45E2",url:"https://saweria.co/rsalman",qr:"https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://saweria.co/rsalman"}];function h({isOpen:e,onClose:t}){let a=(0,r.useRef)(null);return((0,r.useEffect)(()=>{if(!e)return;let a=e=>{"Escape"===e.key&&t()};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[e,t]),(0,r.useEffect)(()=>{if(!e)return;let n=e=>{a.current&&!a.current.contains(e.target)&&t()};return document.addEventListener("mousedown",n),()=>document.removeEventListener("mousedown",n)},[e,t]),(0,r.useEffect)(()=>{if(!e)return;let t=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=t}},[e]),!e||"u"<typeof document)?null:(0,x.createPortal)((0,n.jsxs)("div",{className:"fixed inset-0 z-[90] flex items-center justify-center p-4",children:[(0,n.jsx)("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-sm",onClick:t}),(0,n.jsxs)("div",{ref:a,className:"relative w-full max-w-2xl rounded-2xl border border-border bg-surface shadow-2xl flex flex-col max-h-[88vh] animate-in fade-in zoom-in-95 duration-200",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between border-b border-border-subtle p-4",children:[(0,n.jsxs)("h2",{className:"flex items-center gap-2 text-lg font-semibold text-text-main",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-pink-500",children:"volunteer_activism"}),"Support ExtremeRouter"]}),(0,n.jsx)("button",{onClick:t,className:"rounded-lg p-1.5 text-text-muted transition-colors hover:bg-surface-2 hover:text-text-main","aria-label":"Close",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,n.jsxs)("div",{className:"flex-1 overflow-y-auto p-5",children:[(0,n.jsx)("p",{className:"mx-auto mb-6 max-w-md text-center text-sm text-text-muted",children:"ExtremeRouter is free and open source. If it saves you time or money, consider buying me a coffee — every bit keeps development going. \uD83D\uDC9C"}),(0,n.jsx)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-3",children:p.map(e=>(0,n.jsx)(g,{channel:e},e.id))})]})]})]}),document.body)}function g({channel:e}){let{label:t,description:a,icon:r,color:i,url:s,qr:o}=e;return(0,n.jsxs)("div",{className:"flex flex-col items-center rounded-xl border border-border bg-surface-2 p-4 text-center transition-colors hover:border-primary/40",children:[(0,n.jsx)("div",{className:"mb-3 flex size-12 items-center justify-center rounded-full",style:{backgroundColor:`${i}20`,color:i},children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[26px]",children:r})}),(0,n.jsx)("div",{className:"mb-1 font-semibold text-text-main",children:t}),a&&(0,n.jsx)("div",{className:"mb-3 text-xs text-text-muted",children:a}),o&&(0,n.jsx)("img",{src:o,alt:`${t} QR code`,loading:"lazy",className:"mb-3 aspect-square w-full max-w-[180px] rounded-lg bg-white p-1"}),s&&(0,n.jsxs)("a",{href:s,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 rounded-lg px-3 py-1.5 text-sm font-medium text-white transition-opacity hover:opacity-90",style:{backgroundColor:i},children:["Open",(0,n.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"open_in_new"})]})]})}h.propTypes={isOpen:d().bool.isRequired,onClose:d().func.isRequired};let f=[{label:"Homepage",items:[{href:"/dashboard/endpoint",label:"Endpoint",icon:"api"},{href:"/dashboard/overview",label:"Overview",icon:"dashboard"},{href:"/dashboard/playground",label:"Playground",icon:"science"}]},{label:"Gateway",items:[{href:"/dashboard/providers",label:"Providers",icon:"dns"},{href:"/dashboard/media-providers",label:"Media Providers",icon:"perm_media"},{href:"/dashboard/combos",label:"Combos",icon:"layers"},{href:"/dashboard/token-saver",label:"Token Saver",icon:"savings"}]},{label:"Observe",items:[{href:"/dashboard/usage",label:"Activity",icon:"bar_chart"},{href:"/dashboard/health",label:"Health",icon:"monitor_heart"},{href:"/dashboard/quota",label:"Quota",icon:"data_usage"},{href:"/dashboard/swarm",label:"Swarm",icon:"hub"},{href:"/dashboard/smart-routing",label:"Smart Routing",icon:"alt_route"},{href:"/dashboard/console-log",label:"Console",icon:"terminal"}]},{label:"Tools",items:[{href:"/dashboard/cli-tools",label:"CLI Tools",icon:"terminal"},{href:"/dashboard/translator",label:"Translator",icon:"translate"},{href:"/dashboard/mitm",label:"MITM Proxy",icon:"security"}]},{label:"Configure",items:[{href:"/dashboard/proxy-pools",label:"Proxy Pools",icon:"lan"},{href:"/dashboard/alerts",label:"Alerts",icon:"notifications"},{href:"/dashboard/skills",label:"Skills",icon:"extension"},{href:"/dashboard/profile",label:"Settings",icon:"settings"}]}];function b({onClose:e}){let t=(0,o.usePathname)(),{isNew:a,markSeen:i}=(0,u.P)("features");(0,r.useEffect)(()=>{t&&i(t)},[t,i]);let[l,d]=(0,r.useState)(!1);return(0,n.jsxs)("aside",{className:"flex h-full w-72 shrink-0 flex-col border-r border-border-subtle bg-sidebar backdrop-blur-xl",children:[(0,n.jsx)("div",{className:"border-b border-border-subtle p-4",children:(0,n.jsxs)(s(),{href:"/dashboard",onClick:e,className:"group flex items-center gap-3",children:[(0,n.jsx)("div",{className:"flex size-9 items-center justify-center rounded-brand bg-primary text-white shadow-[var(--shadow-warm)]",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"hub"})}),(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsx)("div",{className:"truncate text-sm font-semibold tracking-tight text-text-main",children:"ExtremeRouter"}),(0,n.jsxs)("div",{className:"text-xs text-text-muted",children:["Gateway Console \xb7 v",m.vQ.version]})]})]})}),(0,n.jsx)("div",{className:"p-3",children:(0,n.jsxs)(s(),{href:"/dashboard/providers",onClick:e,className:"flex h-9 items-center gap-2 rounded-brand border border-border bg-surface-2 px-3 text-xs text-text-muted transition-colors hover:border-primary/40 hover:text-text-main",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"search"}),"Search providers, models, keys…"]})}),(0,n.jsx)("nav",{className:"custom-scrollbar flex-1 overflow-y-auto px-3 pb-4",children:f.map(r=>(0,n.jsxs)("div",{className:"mb-5",children:[(0,n.jsx)("div",{className:"mb-2 px-2 text-[11px] font-semibold uppercase tracking-[0.16em] text-text-subtle",children:r.label}),(0,n.jsx)("div",{className:"space-y-1",children:r.items.map(r=>{var i;let o=(i=r.href,!!t&&(t===i||("/dashboard/endpoint"===i?"/dashboard"===t:t===i||t.startsWith(i+"/")))),l=!o&&a(r.href);return(0,n.jsxs)(s(),{href:r.href,onClick:e,className:(0,c.cn)("group flex h-9 items-center gap-3 rounded-brand px-3 text-sm transition-colors",o?"bg-primary/15 text-text-main ring-1 ring-primary/20":"text-text-muted hover:bg-surface-2 hover:text-text-main"),children:[(0,n.jsx)("span",{className:(0,c.cn)("material-symbols-outlined text-[18px]",o&&"text-primary fill-1"),children:r.icon}),(0,n.jsx)("span",{className:"truncate font-medium",children:r.label}),l&&(0,n.jsx)("span",{className:"ml-auto inline-flex items-center rounded-full bg-primary/12 px-1.5 py-0.5 text-[9px] font-bold text-primary ring-1 ring-primary/20",children:"NEW"}),o&&(0,n.jsx)("span",{className:"ml-auto size-1.5 rounded-full bg-primary"})]},r.href)})})]},r.label))}),(0,n.jsxs)("div",{className:"border-t border-border-subtle p-3",children:[(0,n.jsxs)("button",{type:"button",onClick:()=>d(!0),className:"mb-2 flex h-9 w-full items-center gap-3 rounded-brand px-3 text-sm text-text-muted transition-colors hover:bg-surface-2 hover:text-text-main",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"volunteer_activism"}),(0,n.jsx)("span",{className:"font-medium",children:"Support"})]}),(0,n.jsxs)("div",{className:"rounded-brand border border-border-subtle bg-surface-2 p-3",children:[(0,n.jsxs)("div",{className:"mb-1 flex items-center gap-2 text-xs font-semibold text-text-main",children:[(0,n.jsx)("span",{className:"size-2 rounded-full bg-success"}),"Local Gateway"]}),(0,n.jsx)("div",{className:"font-mono text-[11px] text-text-muted",children:"localhost:20128/v1"})]})]}),(0,n.jsx)(h,{isOpen:l,onClose:()=>d(!1)})]})}b.propTypes={onClose:d().func}},34325:(e,t,a)=>{a.d(t,{default:()=>i});var n=a(95155),r=a(31474);function i({children:e,className:t}){return(0,n.jsx)("div",{className:(0,r.cn)("mb-4 flex flex-col gap-2 rounded-brand border border-border-subtle bg-panel/60 p-2 backdrop-blur-md sm:flex-row sm:items-center sm:justify-between",t),children:e})}i.Group=function({children:e,className:t}){return(0,n.jsx)("div",{className:(0,r.cn)("flex flex-wrap items-center gap-2",t),children:e})},i.Search=function({value:e,onChange:t,placeholder:a="Search…",className:i}){return(0,n.jsxs)("div",{className:(0,r.cn)("relative",i),children:[(0,n.jsx)("span",{className:"pointer-events-none absolute left-2.5 top-1/2 -translate-y-1/2 text-text-muted",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"search"})}),(0,n.jsx)("input",{type:"text",value:e,onChange:e=>t?.(e.target.value),placeholder:a,className:"h-8 w-full rounded bg-surface-2 pl-8 pr-7 text-xs text-text-main placeholder:text-text-muted/70 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/35 sm:w-56"}),e&&(0,n.jsx)("button",{onClick:()=>t?.(""),"aria-label":"Clear search",className:"absolute right-1.5 top-1/2 -translate-y-1/2 rounded p-0.5 text-text-muted transition-colors hover:bg-surface-3 hover:text-text-main",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[14px]",children:"close"})})]})}},35497:(e,t,a)=>{a.d(t,{x0:()=>O.default,Ex:()=>d.default,$n:()=>n.default,nh:()=>E.default,Zp:()=>s.default,Qv:()=>l.CardSkeleton,CK:()=>p.default,uo:()=>o.ConfirmModal,HU:()=>_.default,G9:()=>f.default,wI:()=>S.default,pp:()=>L.default,v$:()=>F.default,vj:()=>C.default,vE:()=>N.default,pd:()=>r.default,QT:()=>v.default,P1:()=>k.default,Mh:()=>g.default,uR:()=>x.default,Nf:()=>h.default,aF:()=>o.default,rq:()=>u.default,gw:()=>W.default,LF:()=>m.default,CG:()=>j.default,zY:()=>z.default,Wx:()=>P.default,F8:()=>y.default,Iz:()=>I.default,l6:()=>i.default,lM:()=>c.default,m_:()=>T.default,V1:()=>w.default,TE:()=>b.default});var n=a(92542),r=a(11910),i=a(98),s=a(84588),o=a(81127),l=a(25086);a(56319);var d=a(56061),c=a(98542);a(38587),a(21110),a(31852),a(17729),a(92173);var m=a(90882),u=a(72908),x=a(28815),p=a(45455),h=a(28058);a(21931),a(67968),a(80752),a(40197),a(61500);var g=a(62899);a(94230);var f=a(30815),b=a(30312),v=a(55807),k=a(3544),j=a(17969),y=a(55288),w=a(13282),N=a(23936),C=a(95088),S=a(73579),O=a(96748),W=a(4823),F=a(20476),_=a(6394),I=a(28067),T=a(97677),P=a(51825),E=a(29366),z=a(54960);a(34325),a(6587);var L=a(99312);a(7648),a(91450)},38003:(e,t,a)=>{a.d(t,{C:()=>n});let n=(0,a(1934).v)(e=>({query:"",placeholder:"",visible:!1,setQuery:t=>e({query:t}),register:(t="Search...")=>e({visible:!0,placeholder:t,query:""}),unregister:()=>e({visible:!1,placeholder:"",query:""})}))},38202:(e,t,a)=>{a.d(t,{h:()=>n});let n={en:"\uD83C\uDDFA\uD83C\uDDF8",vi:"\uD83C\uDDFB\uD83C\uDDF3","zh-CN":"\uD83C\uDDE8\uD83C\uDDF3","zh-TW":"\uD83C\uDDF9\uD83C\uDDFC",ja:"\uD83C\uDDEF\uD83C\uDDF5","pt-BR":"\uD83C\uDDE7\uD83C\uDDF7","pt-PT":"\uD83C\uDDF5\uD83C\uDDF9",ko:"\uD83C\uDDF0\uD83C\uDDF7",es:"\uD83C\uDDEA\uD83C\uDDF8",de:"\uD83C\uDDE9\uD83C\uDDEA",fr:"\uD83C\uDDEB\uD83C\uDDF7",he:"\uD83C\uDDEE\uD83C\uDDF1",ar:"\uD83C\uDDF8\uD83C\uDDE6",ru:"\uD83C\uDDF7\uD83C\uDDFA",pl:"\uD83C\uDDF5\uD83C\uDDF1",cs:"\uD83C\uDDE8\uD83C\uDDFF",nl:"\uD83C\uDDF3\uD83C\uDDF1",tr:"\uD83C\uDDF9\uD83C\uDDF7",uk:"\uD83C\uDDFA\uD83C\uDDE6",tl:"\uD83C\uDDF5\uD83C\uDDED",id:"\uD83C\uDDEE\uD83C\uDDE9",th:"\uD83C\uDDF9\uD83C\uDDED",hi:"\uD83C\uDDEE\uD83C\uDDF3",bn:"\uD83C\uDDE7\uD83C\uDDE9",ur:"\uD83C\uDDF5\uD83C\uDDF0",ro:"\uD83C\uDDF7\uD83C\uDDF4",sv:"\uD83C\uDDF8\uD83C\uDDEA",it:"\uD83C\uDDEE\uD83C\uDDF9",el:"\uD83C\uDDEC\uD83C\uDDF7",hu:"\uD83C\uDDED\uD83C\uDDFA",fi:"\uD83C\uDDEB\uD83C\uDDEE",da:"\uD83C\uDDE9\uD83C\uDDF0",no:"\uD83C\uDDF3\uD83C\uDDF4"}},38587:(e,t,a)=>{a.d(t,{default:()=>l});var n=a(95155),r=a(1620),i=a(31474);let s=["light","dark","glass"],o={light:"light_mode",dark:"dark_mode",glass:"blur_on"};function l({className:e,variant:t="default"}){let{effectiveTheme:a,setTheme:d}=(0,r.D)(),c=s[(s.indexOf(a)+1)%s.length],m={default:(0,i.cn)("flex items-center justify-center size-10 rounded-full","text-text-muted hover:text-text-main","hover:bg-surface-2 transition-colors"),card:(0,i.cn)("flex items-center justify-center size-11 rounded-full","bg-surface/60 hover:bg-surface","border border-border","backdrop-blur-md shadow-sm hover:shadow-[var(--shadow-warm)]","text-text-muted hover:text-brand-500","transition-all group")};return(0,n.jsx)("button",{onClick:()=>d(c),className:(0,i.cn)(m[t],e),"aria-label":`Switch to ${c} mode`,title:`Switch to ${c} mode`,children:(0,n.jsx)("span",{className:(0,i.cn)("material-symbols-outlined text-[22px]","card"===t&&"transition-transform duration-300 group-hover:rotate-12"),children:o[a]||"dark_mode"})})}},40197:(e,t,a)=>{a.d(t,{default:()=>c});var n=a(95155),r=a(12115),i=a(47650),s=a(14051),o=a.n(s),l=a(9233),d=a(90620);function c({isOpen:e,onClose:t}){let[a,s]=(0,r.useState)(""),[o,m]=(0,r.useState)(!1),[u,x]=(0,r.useState)(""),p=(0,r.useRef)(null);return((0,r.useEffect)(()=>{e&&!a&&(m(!0),x(""),fetch(d.Nu.changelogUrl).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e.text()}).then(e=>s(l.xI.parse(e))).catch(e=>x(e.message||"Failed to load")).finally(()=>m(!1)))},[e,a]),(0,r.useEffect)(()=>{let a=e=>{p.current&&!p.current.contains(e.target)&&t()};if(e)return document.addEventListener("mousedown",a),()=>document.removeEventListener("mousedown",a)},[e,t]),!e||"u"<typeof document)?null:(0,i.createPortal)((0,n.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,n.jsx)("div",{className:"absolute inset-0 bg-black/30 backdrop-blur-sm",onClick:t}),(0,n.jsxs)("div",{ref:p,className:"relative w-full bg-surface border border-black/10 dark:border-white/10 rounded-xl shadow-2xl animate-in fade-in zoom-in-95 duration-200 max-w-3xl flex flex-col max-h-[85vh]",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between p-3 border-b border-black/5 dark:border-white/5",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold text-text-main",children:"Change Log"}),(0,n.jsx)("button",{onClick:t,className:"p-1.5 rounded-lg text-text-muted hover:bg-black/5 dark:hover:bg-white/5 transition-colors","aria-label":"Close",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,n.jsxs)("div",{className:"p-6 overflow-y-auto flex-1",children:[o&&(0,n.jsxs)("div",{className:"flex items-center justify-center py-10 text-text-muted",children:[(0,n.jsx)("span",{className:"material-symbols-outlined animate-spin mr-2",children:"progress_activity"}),"Loading..."]}),u&&(0,n.jsxs)("div",{className:"text-red-500 py-4",children:["Failed to load changelog: ",u]}),!o&&!u&&a&&(0,n.jsx)("div",{className:"changelog-body text-text-main",dangerouslySetInnerHTML:{__html:a}})]})]})]}),document.body)}l.xI.setOptions({gfm:!0,breaks:!0}),c.propTypes={isOpen:o().bool.isRequired,onClose:o().func.isRequired}},45455:(e,t,a)=>{a.d(t,{default:()=>m});var n=a(95155),r=a(12115),i=a(81127),s=a(11910),o=a(92542),l=a(72908);let d=/^[a-zA-Z0-9_.\-]+$/;function c({index:e,model:t,isFirst:a,isLast:i,onEdit:s,onMoveUp:o,onMoveDown:l,onRemove:d}){let[m,u]=(0,r.useState)(!1),[x,p]=(0,r.useState)(t),h=()=>{let e=x.trim();e&&e!==t?s(e):p(t),u(!1)};return(0,n.jsxs)("div",{className:"group flex min-w-0 items-center gap-1.5 rounded-md bg-black/[0.02] px-2 py-1 transition-colors hover:bg-black/[0.04] dark:bg-white/[0.02] dark:hover:bg-white/[0.04]",children:[(0,n.jsx)("span",{className:"text-[10px] font-medium text-text-muted w-3 text-center shrink-0",children:e+1}),m?(0,n.jsx)("input",{autoFocus:!0,value:x,onChange:e=>p(e.target.value),onBlur:h,onKeyDown:e=>{"Enter"===e.key&&h(),"Escape"===e.key&&(p(t),u(!1))},className:"min-w-0 flex-1 rounded border border-primary/40 bg-white px-1.5 py-0.5 font-mono text-xs text-text-main outline-none dark:bg-black/20"}):(0,n.jsx)("div",{className:"min-w-0 flex-1 cursor-text truncate rounded px-1.5 py-0.5 font-mono text-xs text-text-main hover:bg-black/5 dark:hover:bg-white/5",onClick:()=>u(!0),title:"Click to edit",children:t}),(0,n.jsxs)("div",{className:"flex shrink-0 items-center gap-0.5",children:[(0,n.jsx)("button",{onClick:o,disabled:a,className:`p-0.5 rounded ${a?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move up",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_upward"})}),(0,n.jsx)("button",{onClick:l,disabled:i,className:`p-0.5 rounded ${i?"text-text-muted/20 cursor-not-allowed":"text-text-muted hover:text-primary hover:bg-black/5 dark:hover:bg-white/5"}`,title:"Move down",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"arrow_downward"})})]}),(0,n.jsx)("button",{onClick:d,className:"p-0.5 hover:bg-red-500/10 rounded text-text-muted hover:text-red-500 transition-all",title:"Remove",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[12px]",children:"close"})})]})}function m({isOpen:e,combo:t,onClose:a,onSave:u,activeProviders:x,kindFilter:p=null,forcePrefix:h="",title:g}){let f=t?.name?h&&t.name.startsWith(h)?t.name.slice(h.length):t.name:"",[b,v]=(0,r.useState)(f),[k,j]=(0,r.useState)(t?.models||[]),[y,w]=(0,r.useState)(!1),[N,C]=(0,r.useState)(!1),[S,O]=(0,r.useState)(""),[W,F]=(0,r.useState)({});(0,r.useEffect)(()=>{e&&fetch("/api/models/alias").then(e=>e.ok?e.json():null).then(e=>e&&F(e.aliases||{})).catch(()=>{})},[e]);let _=e=>{if(!e.trim())return O("Name is required"),!1;let t=h+e;return d.test(t)?(O(""),!0):(O("Only letters, numbers, -, _ and . allowed"),!1)},I=e=>{let t=e.target.value;h&&t.startsWith(h)&&(t=t.slice(h.length)),v(t),t?_(t):O("")},T=async()=>{_(b)&&(C(!0),await u({name:h+b.trim(),models:k}),C(!1))},P=!!t;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(i.default,{isOpen:e,onClose:a,title:g||(P?"Edit Combo":"Create Combo"),children:(0,n.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,n.jsxs)("div",{children:[h?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("label",{className:"text-sm font-medium mb-1 block",children:"Combo Name"}),(0,n.jsxs)("div",{className:"flex items-stretch",children:[(0,n.jsx)("span",{className:"inline-flex items-center px-2 rounded-l border border-r-0 border-black/10 dark:border-white/10 bg-black/[0.04] dark:bg-white/[0.04] text-text-muted font-mono text-sm",children:h}),(0,n.jsx)("input",{value:b,onChange:I,placeholder:"my-combo",className:"flex-1 min-w-0 rounded-r border border-black/10 dark:border-white/10 bg-white dark:bg-black/20 px-2 py-1.5 font-mono text-sm outline-none focus:border-primary"})]}),S&&(0,n.jsx)("p",{className:"text-[11px] text-red-500 mt-0.5",children:S})]}):(0,n.jsx)(s.default,{label:"Combo Name",value:b,onChange:I,placeholder:"my-combo",error:S}),(0,n.jsxs)("p",{className:"text-[10px] text-text-muted mt-0.5",children:[h?`Auto-prefixed with "${h}". `:"","Only letters, numbers, -, _ and . allowed"]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:"text-sm font-medium mb-1.5 block",children:"Models"}),0===k.length?(0,n.jsxs)("div",{className:"text-center py-4 border border-dashed border-black/10 dark:border-white/10 rounded-lg bg-black/[0.01] dark:bg-white/[0.01]",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-text-muted text-xl mb-1",children:"layers"}),(0,n.jsx)("p",{className:"text-xs text-text-muted",children:"No models added yet"})]}):(0,n.jsx)("div",{className:"flex max-h-[55vh] min-w-0 flex-col gap-1 overflow-y-auto sm:max-h-[350px]",children:k.map((e,t)=>(0,n.jsx)(c,{index:t,model:e,isFirst:0===t,isLast:t===k.length-1,onEdit:e=>{let a=[...k];a[t]=e,j(a)},onMoveUp:()=>(e=>{if(0===e)return;let t=[...k];[t[e-1],t[e]]=[t[e],t[e-1]],j(t)})(t),onMoveDown:()=>(e=>{if(e===k.length-1)return;let t=[...k];[t[e],t[e+1]]=[t[e+1],t[e]],j(t)})(t),onRemove:()=>j(k.filter((e,a)=>a!==t))},t))}),(0,n.jsxs)("button",{onClick:()=>w(!0),className:"w-full mt-2 py-2 border border-dashed border-black/10 dark:border-white/10 rounded-lg text-xs text-primary font-medium hover:text-primary hover:border-primary/50 transition-colors flex items-center justify-center gap-1",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"add"}),"Add Model"]})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-2 pt-1 sm:flex-row",children:[(0,n.jsx)(o.default,{onClick:a,variant:"ghost",fullWidth:!0,size:"sm",children:"Cancel"}),(0,n.jsx)(o.default,{onClick:T,fullWidth:!0,size:"sm",disabled:!b.trim()||!!S||N,children:N?"Saving...":P?"Save":"Create"})]})]})}),(0,n.jsx)(l.default,{isOpen:y,onClose:()=>w(!1),onSelect:e=>{k.includes(e.value)||j([...k,e.value])},onDeselect:e=>{j(k.filter(t=>t!==e.value))},activeProviders:x,modelAliases:W,title:"Add Model to Combo",kindFilter:p,addedModelValues:k,closeOnSelect:!1})]})}},51825:(e,t,a)=>{a.d(t,{default:()=>s});var n=a(95155),r=a(84588);let i={mode:{label:"Mode",format:e=>e},defaultModel:{label:"Model",format:e=>e,mono:!0},baseUrl:{label:"Endpoint",format:e=>e,isLink:!0,mono:!0},costPerQuery:{label:"Cost / call",format:e=>0===e?"Free":`$${e.toFixed(4)}`},pricingUrl:{label:"Pricing",format:()=>"View pricing",isLink:!0},freeTier:{label:"Free tier",format:e=>e},freeMonthlyQuota:{label:"Free quota",format:e=>0===e?"—":e>=999999?"Unlimited":`${e.toLocaleString()} / mo`},searchTypes:{label:"Types",format:e=>e.join(", ")},formats:{label:"Formats",format:e=>e.join(", ")},maxMaxResults:{label:"Max results",format:e=>e},maxCharacters:{label:"Max chars",format:e=>e.toLocaleString()}};function s({config:e,provider:t,title:a="Provider Info"}){if(!e)return null;let o=Object.entries(i).filter(([t])=>void 0!==e[t]&&null!==e[t]&&""!==e[t]).map(([t,a])=>({key:t,label:a.label,value:a.format(e[t]),isLink:a.isLink,mono:a.mono,raw:e[t]})),l=t?.notice?.apiKeyUrl||t?.website,d=t?.notice?.text;return(0,n.jsxs)(r.default,{children:[(0,n.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,n.jsx)("h2",{className:"text-lg font-semibold",children:a}),l&&(0,n.jsxs)("a",{href:l,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-primary hover:underline inline-flex items-center gap-1",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-sm",children:"open_in_new"}),"Get API Key"]})]}),(0,n.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-x-6 gap-y-2",children:[o.map(e=>(0,n.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,n.jsx)("span",{className:"text-xs text-text-muted w-28 shrink-0",children:e.label}),e.isLink?(0,n.jsx)("a",{href:e.raw,target:"_blank",rel:"noopener noreferrer",className:`text-sm text-primary hover:underline truncate ${e.mono?"font-mono":""}`,children:e.value}):(0,n.jsx)("span",{className:`text-sm text-text-main truncate ${e.mono?"font-mono":""}`,children:e.value})]},e.key)),d&&(0,n.jsxs)("div",{className:"flex items-start gap-3 min-w-0 sm:col-span-2",children:[(0,n.jsx)("span",{className:"text-xs text-text-muted w-28 shrink-0 mt-0.5",children:"Notice"}),(0,n.jsx)("span",{className:"text-sm text-text-main leading-relaxed",children:d})]})]})]})}},54960:(e,t,a)=>{a.d(t,{default:()=>i});var n=a(95155),r=a(31474);function i({title:e,description:t,icon:a,iconNode:s,actions:o,breadcrumbs:l,className:d}){return(0,n.jsxs)("div",{className:(0,r.cn)("mb-6",d),children:[l?.length>0&&(0,n.jsx)("nav",{className:"mb-2 flex items-center gap-1.5 text-xs text-text-muted",children:l.map((e,t)=>(0,n.jsxs)("span",{className:"flex items-center gap-1.5",children:[t>0&&(0,n.jsx)("span",{className:"material-symbols-outlined text-[12px] opacity-60",children:"chevron_right"}),e.href?(0,n.jsx)("a",{href:e.href,className:"transition-colors hover:text-primary",children:e.label}):(0,n.jsx)("span",{className:"font-medium text-text-main",children:e.label})]},t))}),(0,n.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between",children:[(0,n.jsxs)("div",{className:"flex min-w-0 items-start gap-3",children:[s?(0,n.jsx)("div",{className:"mt-0.5 shrink-0",children:s}):a&&(0,n.jsx)("div",{className:"mt-0.5 flex size-9 shrink-0 items-center justify-center rounded-brand bg-primary/10 text-primary ring-1 ring-primary/15",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:a})}),(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsx)("h1",{className:"truncate text-xl font-semibold tracking-tight text-text-main",children:e}),t&&(0,n.jsx)("p",{className:"mt-0.5 text-sm text-text-muted",children:t})]})]}),o&&(0,n.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:o})]})]})}},55288:(e,t,a)=>{a.d(t,{default:()=>l});var n=a(95155),r=a(12115),i=a(14051),s=a.n(i),o=a(35497);function l({isOpen:e,onSuccess:t,onClose:a}){let[i,s]=(0,r.useState)(""),[d,c]=(0,r.useState)(""),[m,u]=(0,r.useState)(null),[x,p]=(0,r.useState)(!1),h=async()=>{if(!i.trim())return void u("Please enter your full Cookie header from chat.qwen.ai");if(!i.includes("token="))return void u("Cookie jar is missing the 'token' cookie — did you copy the full Cookie header?");p(!0),u(null);try{let e=await fetch("/api/oauth/qwen/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cookies:i.trim(),umidToken:d.trim()})}),n=await e.json();if(!e.ok)throw Error(n.error||"Import failed");t?.(),a()}catch(e){u(e.message)}finally{p(!1)}};return(0,n.jsx)(o.aF,{isOpen:e,title:"Connect Qwen Web",onClose:a,children:(0,n.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,n.jsx)("div",{className:"bg-blue-50 dark:bg-blue-900/20 p-3 rounded-lg border border-blue-200 dark:border-blue-800",children:(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-blue-600 dark:text-blue-400 text-[18px]",children:"info"}),(0,n.jsxs)("div",{className:"text-xs text-blue-800 dark:text-blue-200 space-y-1",children:[(0,n.jsxs)("p",{children:["Log in at ",(0,n.jsx)("a",{href:"https://chat.qwen.ai",target:"_blank",rel:"noopener noreferrer",className:"underline font-medium",children:"chat.qwen.ai"}),", open DevTools → Network."]}),(0,n.jsxs)("p",{children:["Find any request to ",(0,n.jsx)("code",{className:"bg-blue-100 dark:bg-blue-900/40 px-1 rounded",children:"api/v2/"})," and copy the full Cookie header."]}),(0,n.jsxs)("p",{children:["Optionally copy the ",(0,n.jsx)("code",{className:"bg-blue-100 dark:bg-blue-900/40 px-1 rounded",children:"bx-umidtoken"})," request header value — this bypasses the anti-bot check."]})]})]})}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["Cookie Header ",(0,n.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,n.jsx)("textarea",{value:i,onChange:e=>s(e.target.value),placeholder:"cna=xxx; ssxmod_itna=xxx; token=eyJ...; isg=xxx; ...",rows:3,className:"w-full px-3 py-2 text-sm font-mono border border-border rounded-lg bg-background focus:outline-none focus:border-primary resize-none"}),(0,n.jsxs)("p",{className:"text-[11px] text-text-muted mt-1",children:["Must include ",(0,n.jsx)("code",{className:"bg-black/5 dark:bg-white/5 px-1 rounded",children:"cna"}),", ",(0,n.jsx)("code",{className:"bg-black/5 dark:bg-white/5 px-1 rounded",children:"ssxmod_itna"}),", and ",(0,n.jsx)("code",{className:"bg-black/5 dark:bg-white/5 px-1 rounded",children:"token"})," cookies"]})]}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["bx-umidtoken ",(0,n.jsx)("span",{className:"text-text-muted font-normal",children:"(optional)"})]}),(0,n.jsx)(o.pd,{value:d,onChange:e=>c(e.target.value),placeholder:"T2gAnGqZ6RnL7evLHLylTWRk83L4vDr6l04...",className:"font-mono text-sm"}),(0,n.jsx)("p",{className:"text-[11px] text-text-muted mt-1",children:'Copy from DevTools → Network → request headers. Without a valid value, the API may return "unauthorized".'})]}),m&&(0,n.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-lg border border-red-200 dark:border-red-800",children:(0,n.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:m})}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(o.$n,{onClick:h,fullWidth:!0,disabled:x||!i.trim(),children:x?"Importing...":"Import Credentials"}),(0,n.jsx)(o.$n,{onClick:a,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}l.propTypes={isOpen:s().bool.isRequired,onSuccess:s().func,onClose:s().func.isRequired}},55807:(e,t,a)=>{a.d(t,{default:()=>l});var n=a(95155),r=a(12115),i=a(14051),s=a.n(i),o=a(35497);function l({isOpen:e,onSuccess:t,onClose:a}){let[i,s]=(0,r.useState)(""),[d,c]=(0,r.useState)(null),[m,u]=(0,r.useState)(null),[x,p]=(0,r.useState)(!1),[h,g]=(0,r.useState)(!1),[f,b]=(0,r.useState)(!1),[v,k]=(0,r.useState)(!1),j=async()=>{g(!0),u(null),b(!1),k(!1),c(null);try{let e=await fetch("/api/oauth/kimi-desktop/auto-import"),t=await e.json();t.found?(s(t.accessToken),c(t.label||null),b(!0)):t.windowsManual?k(!0):u(t.error||"Could not auto-detect Kimi desktop session")}catch{u("Failed to auto-detect Kimi desktop session")}finally{g(!1)}};(0,r.useEffect)(()=>{e&&j()},[e]);let y=async()=>{if(!i.trim())return void u("Please enter the Kimi session JWT");p(!0),u(null);try{let e=await fetch("/api/oauth/kimi-desktop/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accessToken:i.trim(),label:d||void 0})}),n=await e.json();if(!e.ok)throw Error(n.error||"Import failed");t?.(),a()}catch(e){u(e.message)}finally{p(!1)}};return(0,n.jsx)(o.aF,{isOpen:e,title:"Connect Kimi Desktop",onClose:a,children:(0,n.jsxs)("div",{className:"flex flex-col gap-4",children:[h&&(0,n.jsxs)("div",{className:"text-center py-6",children:[(0,n.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,n.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Auto-detecting session..."}),(0,n.jsx)("p",{className:"text-sm text-text-muted",children:"Reading from Kimi desktop app token store"})]}),!h&&(0,n.jsxs)(n.Fragment,{children:[f&&(0,n.jsx)("div",{className:"bg-green-50 dark:bg-green-900/20 p-3 rounded-lg border border-green-200 dark:border-green-800",children:(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-green-600 dark:text-green-400",children:"check_circle"}),(0,n.jsxs)("p",{className:"text-sm text-green-800 dark:text-green-200",children:["Session auto-detected from Kimi Desktop",d?` (${d})`:"","!"]})]})}),v&&(0,n.jsxs)("div",{className:"bg-amber-50 dark:bg-amber-900/20 p-3 rounded-lg border border-amber-200 dark:border-amber-800 flex flex-col gap-2",children:[(0,n.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-amber-600 dark:text-amber-400",children:"info"}),(0,n.jsx)("p",{className:"text-sm font-medium text-amber-800 dark:text-amber-200",children:"Could not read the Kimi desktop token store automatically."})]}),(0,n.jsxs)("p",{className:"text-xs text-amber-700 dark:text-amber-300",children:["Make sure the Kimi desktop app is installed and you've logged in at least once, then click ",(0,n.jsx)("strong",{children:"Retry"}),". If the problem persists, paste the session JWT manually below."]}),(0,n.jsx)(o.$n,{onClick:j,variant:"outline",fullWidth:!0,children:"Retry"})]}),!f&&!v&&!m&&(0,n.jsx)("div",{className:"bg-blue-50 dark:bg-blue-900/20 p-3 rounded-lg border border-blue-200 dark:border-blue-800",children:(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-blue-600 dark:text-blue-400",children:"info"}),(0,n.jsx)("p",{className:"text-sm text-blue-800 dark:text-blue-200",children:"Kimi desktop app not detected. Please paste your session JWT manually."})]})}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["Kimi Session JWT ",(0,n.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,n.jsx)("textarea",{value:i,onChange:e=>s(e.target.value),placeholder:"kimi-auth JWT from the desktop app (auto-filled if detected)",rows:3,className:"w-full px-3 py-2 text-sm font-mono border border-border rounded-lg bg-background focus:outline-none focus:border-primary resize-none"})]}),m&&(0,n.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-lg border border-red-200 dark:border-red-800",children:(0,n.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:m})}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(o.$n,{onClick:y,fullWidth:!0,disabled:x||!i.trim(),children:x?"Importing...":"Import Session"}),(0,n.jsx)(o.$n,{onClick:a,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})})}l.propTypes={isOpen:s().bool.isRequired,onSuccess:s().func,onClose:s().func.isRequired}},56061:(e,t,a)=>{a.d(t,{default:()=>l});var n=a(95155),r=a(31474);let i={default:"bg-surface-2 text-text-muted ring-1 ring-border-subtle",primary:"bg-primary/12 text-primary ring-1 ring-primary/20",success:"bg-success/12 text-success ring-1 ring-success/20",warning:"bg-warning/12 text-warning ring-1 ring-warning/20",error:"bg-danger/12 text-danger ring-1 ring-danger/20",info:"bg-info/12 text-info ring-1 ring-info/20",cyan:"bg-cyan/12 text-cyan ring-1 ring-cyan/20"},s={default:"bg-text-subtle",primary:"bg-primary",success:"bg-success",warning:"bg-warning",error:"bg-danger",info:"bg-info",cyan:"bg-cyan"},o={sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-1 text-xs",lg:"px-3 py-1.5 text-sm"};function l({children:e,variant:t="default",size:a="md",dot:d=!1,icon:c,className:m}){return(0,n.jsxs)("span",{className:(0,r.cn)("inline-flex items-center gap-1.5 rounded-full font-semibold leading-none",i[t],o[a],m),children:[d&&(0,n.jsx)("span",{className:(0,r.cn)("size-1.5 rounded-full",s[t])}),c&&(0,n.jsx)("span",{className:"material-symbols-outlined text-[13px]",children:c}),e]})}},56319:(e,t,a)=>{a.d(t,{default:()=>i});var n=a(95155),r=a(31474);function i({src:e,alt:t="Avatar",name:a,size:s="md",className:o}){let l={xs:"size-6 text-xs",sm:"size-8 text-sm",md:"size-10 text-base",lg:"size-12 text-lg",xl:"size-16 text-xl"};return e?(0,n.jsx)("div",{className:(0,r.cn)("rounded-full bg-cover bg-center bg-no-repeat","ring-2 ring-white dark:ring-surface-dark shadow-sm",l[s],o),style:{backgroundImage:`url(${e})`},role:"img","aria-label":t}):(0,n.jsx)("div",{className:(0,r.cn)("rounded-full flex items-center justify-center font-semibold text-white","ring-2 ring-white dark:ring-surface-dark shadow-sm",l[s],(e=>{if(!e)return"bg-primary";let t=["bg-red-500","bg-orange-500","bg-amber-500","bg-yellow-500","bg-lime-500","bg-green-500","bg-emerald-500","bg-teal-500","bg-cyan-500","bg-sky-500","bg-blue-500","bg-indigo-500","bg-violet-500","bg-purple-500","bg-fuchsia-500","bg-pink-500","bg-rose-500"],a=e.charCodeAt(0)%t.length;return t[a]})(a),o),role:"img","aria-label":t,children:(e=>{if(!e)return"?";let t=e.split(" ");return t.length>=2?`${t[0][0]}${t[1][0]}`.toUpperCase():e.substring(0,2).toUpperCase()})(a)})}},57250:(e,t,a)=>{a.d(t,{A:()=>o});var n=a(95155),r=a(12115),i=a(14051),s=a.n(i);function o({src:e,alt:t,size:a=32,className:i="",fallbackText:s="?",fallbackColor:l}){let[d,c]=(0,r.useState)(!1);return!e||d?(0,n.jsx)("span",{className:`inline-flex items-center justify-center font-bold rounded-lg ${i}`.trim(),style:{width:a,height:a,color:l,fontSize:Math.max(10,Math.floor(.38*a))},children:s}):(0,n.jsx)("img",{src:e,alt:t,width:a,height:a,className:i,onError:()=>c(!0)})}o.propTypes={src:s().string,alt:s().string,size:s().number,className:s().string,fallbackText:s().string,fallbackColor:s().string}},61500:(e,t,a)=>{a.d(t,{default:()=>l});var n=a(95155),r=a(12115),i=a(14051),s=a.n(i),o=a(35497);function l({isOpen:e,onMethodSelect:t,onClose:a}){let[i,s]=(0,r.useState)(null),[d,c]=(0,r.useState)(""),[m,u]=(0,r.useState)("us-east-1"),[x,p]=(0,r.useState)(""),[h,g]=(0,r.useState)(""),[f,b]=(0,r.useState)(""),[v,k]=(0,r.useState)("us-east-1"),[j,y]=(0,r.useState)(null),[w,N]=(0,r.useState)(!1),[C,S]=(0,r.useState)(!1),[O,W]=(0,r.useState)(!1),[F,_]=(0,r.useState)(null);(0,r.useEffect)(()=>{"import"===i&&e&&(async()=>{S(!0),y(null),W(!1),_(null);try{let e=await fetch("/api/oauth/kiro/auto-import"),t=await e.json();t.found?(p(t.refreshToken),W(!0),t.clientId&&t.clientSecret&&_({clientId:t.clientId,clientSecret:t.clientSecret,region:t.region,authMethod:t.authMethod,profileArn:t.profileArn})):y(t.error||"Could not auto-detect token")}catch(e){y("Failed to auto-detect token")}finally{S(!1)}})()},[i,e]);let I=e=>{s(e),y(null)},T=()=>{s(null),y(null)},P=async()=>{if(!x.trim())return void y("Please enter a refresh token");N(!0),y(null);try{let e=await fetch("/api/oauth/kiro/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({refreshToken:x.trim(),...F||{}})}),a=await e.json();if(!e.ok)throw Error(a.error||"Import failed");t("import")}catch(e){y(e.message)}finally{N(!1)}},E=async()=>{if(!h.trim())return void y("Please paste CLIProxyAPI auth JSON");N(!0),y(null);try{let e=await fetch("/api/oauth/kiro/import-cli-proxy",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({json:h.trim()})}),a=await e.json();if(!e.ok)throw Error(a.error||"CLIProxyAPI import failed");t("import-cli-proxy")}catch(e){y(e.message)}finally{N(!1)}},z=async()=>{if(!f.trim())return void y("Please enter an API key");N(!0),y(null);try{let e=await fetch("/api/oauth/kiro/api-key",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:f.trim(),region:v.trim()||"us-east-1"})}),a=await e.json();if(!e.ok)throw Error(a.error||"Import failed");t("api-key")}catch(e){y(e.message)}finally{N(!1)}},L=e=>{t("social",{provider:e})};return(0,n.jsx)(o.aF,{isOpen:e,title:"Connect Kiro",onClose:a,size:"lg",children:(0,n.jsxs)("div",{className:"flex flex-col gap-4",children:[!i&&(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Choose your authentication method:"}),(0,n.jsx)("button",{onClick:()=>t("builder-id"),className:"w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,n.jsxs)("div",{className:"flex items-start gap-3",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"shield"}),(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsx)("h3",{className:"font-semibold mb-1",children:"AWS Builder ID"}),(0,n.jsx)("p",{className:"text-sm text-text-muted",children:"Recommended for most users. Free AWS account required."})]})]})}),(0,n.jsx)("button",{onClick:()=>I("idc"),className:"w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,n.jsxs)("div",{className:"flex items-start gap-3",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"business"}),(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsx)("h3",{className:"font-semibold mb-1",children:"AWS IAM Identity Center"}),(0,n.jsx)("p",{className:"text-sm text-text-muted",children:"For enterprise users with custom AWS IAM Identity Center."})]})]})}),(0,n.jsx)("button",{onClick:()=>I("api-key"),className:"w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,n.jsxs)("div",{className:"flex items-start gap-3",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"key"}),(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsx)("h3",{className:"font-semibold mb-1",children:"API Key"}),(0,n.jsx)("p",{className:"text-sm text-text-muted",children:"Use a long-lived Kiro/CodeWhisperer API key (headless auth)."})]})]})}),(0,n.jsx)("button",{onClick:()=>I("social-google"),className:"hidden w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,n.jsxs)("div",{className:"flex items-start gap-3",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"account_circle"}),(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsx)("h3",{className:"font-semibold mb-1",children:"Google Account"}),(0,n.jsx)("p",{className:"text-sm text-text-muted",children:"Login with your Google account (manual callback)."})]})]})}),(0,n.jsx)("button",{onClick:()=>I("social-github"),className:"hidden w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,n.jsxs)("div",{className:"flex items-start gap-3",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"code"}),(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsx)("h3",{className:"font-semibold mb-1",children:"GitHub Account"}),(0,n.jsx)("p",{className:"text-sm text-text-muted",children:"Login with your GitHub account (manual callback)."})]})]})}),(0,n.jsx)("button",{onClick:()=>I("import"),className:"w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,n.jsxs)("div",{className:"flex items-start gap-3",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"file_upload"}),(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsx)("h3",{className:"font-semibold mb-1",children:"Import Token"}),(0,n.jsx)("p",{className:"text-sm text-text-muted",children:"Paste refresh token from Kiro IDE."})]})]})}),(0,n.jsx)("button",{onClick:()=>I("import-cli-proxy"),className:"w-full p-4 text-left border border-border rounded-lg hover:bg-sidebar transition-colors",children:(0,n.jsxs)("div",{className:"flex items-start gap-3",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-primary mt-0.5",children:"data_object"}),(0,n.jsxs)("div",{className:"flex-1",children:[(0,n.jsx)("h3",{className:"font-semibold mb-1",children:"Import CLIProxyAPI JSON"}),(0,n.jsx)("p",{className:"text-sm text-text-muted",children:"Paste external_idp auth JSON from CLIProxyAPI/Kiro Microsoft login."})]})]})})]}),"idc"===i&&(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["IDC Start URL ",(0,n.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,n.jsx)(o.pd,{value:d,onChange:e=>c(e.target.value),placeholder:"https://your-org.awsapps.com/start",className:"font-mono text-sm"}),(0,n.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"Your organization's AWS IAM Identity Center URL"})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:"block text-sm font-medium mb-2",children:"AWS Region"}),(0,n.jsx)(o.pd,{value:m,onChange:e=>u(e.target.value),placeholder:"us-east-1",className:"font-mono text-sm"}),(0,n.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"AWS region for your Identity Center (default: us-east-1)"})]}),j&&(0,n.jsx)("p",{className:"text-sm text-red-600",children:j}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(o.$n,{onClick:()=>{d.trim()?t("idc",{startUrl:d.trim(),region:m}):y("Please enter your IDC start URL")},fullWidth:!0,children:"Continue"}),(0,n.jsx)(o.$n,{onClick:T,variant:"ghost",fullWidth:!0,children:"Back"})]})]}),"api-key"===i&&(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsx)("div",{className:"bg-blue-50 dark:bg-blue-900/20 p-3 rounded-lg border border-blue-200 dark:border-blue-800",children:(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-blue-600 dark:text-blue-400",children:"info"}),(0,n.jsx)("p",{className:"text-sm text-blue-800 dark:text-blue-200",children:"Paste a long-lived Kiro/CodeWhisperer API key. It is validated against AWS and stored directly as a bearer credential (no refresh)."})]})}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["API Key ",(0,n.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,n.jsx)(o.pd,{value:f,onChange:e=>b(e.target.value),placeholder:"Paste your Kiro API key...",className:"font-mono text-sm"})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:"block text-sm font-medium mb-2",children:"AWS Region"}),(0,n.jsx)(o.pd,{value:v,onChange:e=>k(e.target.value),placeholder:"us-east-1",className:"font-mono text-sm"}),(0,n.jsx)("p",{className:"text-xs text-text-muted mt-1",children:"AWS region for the key (default: us-east-1)"})]}),j&&(0,n.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-lg border border-red-200 dark:border-red-800",children:(0,n.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:j})}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(o.$n,{onClick:z,fullWidth:!0,disabled:w||!f.trim(),children:w?"Validating...":"Add API Key"}),(0,n.jsx)(o.$n,{onClick:T,variant:"ghost",fullWidth:!0,children:"Back"})]})]}),"social-google"===i&&(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsx)("div",{className:"bg-amber-50 dark:bg-amber-900/20 p-4 rounded-lg border border-amber-200 dark:border-amber-800",children:(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-amber-600 dark:text-amber-400",children:"info"}),(0,n.jsxs)("div",{className:"flex-1 text-sm",children:[(0,n.jsx)("p",{className:"font-medium text-amber-900 dark:text-amber-100 mb-1",children:"Manual Callback Required"}),(0,n.jsx)("p",{className:"text-amber-800 dark:text-amber-200",children:"After login, you'll need to copy the callback URL from your browser and paste it back here."})]})]})}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(o.$n,{onClick:()=>L("google"),fullWidth:!0,children:"Continue with Google"}),(0,n.jsx)(o.$n,{onClick:T,variant:"ghost",fullWidth:!0,children:"Back"})]})]}),"social-github"===i&&(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsx)("div",{className:"bg-amber-50 dark:bg-amber-900/20 p-4 rounded-lg border border-amber-200 dark:border-amber-800",children:(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-amber-600 dark:text-amber-400",children:"info"}),(0,n.jsxs)("div",{className:"flex-1 text-sm",children:[(0,n.jsx)("p",{className:"font-medium text-amber-900 dark:text-amber-100 mb-1",children:"Manual Callback Required"}),(0,n.jsx)("p",{className:"text-amber-800 dark:text-amber-200",children:"After login, you'll need to copy the callback URL from your browser and paste it back here."})]})]})}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(o.$n,{onClick:()=>L("github"),fullWidth:!0,children:"Continue with GitHub"}),(0,n.jsx)(o.$n,{onClick:T,variant:"ghost",fullWidth:!0,children:"Back"})]})]}),"import"===i&&(0,n.jsxs)("div",{className:"space-y-4",children:[C&&(0,n.jsxs)("div",{className:"text-center py-6",children:[(0,n.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,n.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Auto-detecting token..."}),(0,n.jsx)("p",{className:"text-sm text-text-muted",children:"Reading from AWS SSO cache"})]}),!C&&(0,n.jsxs)(n.Fragment,{children:[O&&(0,n.jsx)("div",{className:"bg-green-50 dark:bg-green-900/20 p-3 rounded-lg border border-green-200 dark:border-green-800",children:(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-green-600 dark:text-green-400",children:"check_circle"}),(0,n.jsx)("p",{className:"text-sm text-green-800 dark:text-green-200",children:"Token auto-detected from Kiro IDE successfully!"})]})}),!O&&!j&&(0,n.jsx)("div",{className:"bg-blue-50 dark:bg-blue-900/20 p-3 rounded-lg border border-blue-200 dark:border-blue-800",children:(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-blue-600 dark:text-blue-400",children:"info"}),(0,n.jsx)("p",{className:"text-sm text-blue-800 dark:text-blue-200",children:"Kiro IDE not detected. Please paste your refresh token manually."})]})}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["Refresh Token ",(0,n.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,n.jsx)(o.pd,{value:x,onChange:e=>p(e.target.value),placeholder:"Token will be auto-filled...",className:"font-mono text-sm"})]}),j&&(0,n.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-lg border border-red-200 dark:border-red-800",children:(0,n.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:j})}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(o.$n,{onClick:P,fullWidth:!0,disabled:w||!x.trim(),children:w?"Importing...":"Import Token"}),(0,n.jsx)(o.$n,{onClick:T,variant:"ghost",fullWidth:!0,children:"Back"})]})]})]}),"import-cli-proxy"===i&&(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsx)("div",{className:"bg-blue-50 dark:bg-blue-900/20 p-3 rounded-lg border border-blue-200 dark:border-blue-800",children:(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-blue-600 dark:text-blue-400",children:"info"}),(0,n.jsx)("p",{className:"text-sm text-blue-800 dark:text-blue-200",children:"Paste the Kiro CLIProxyAPI auth JSON containing auth_method=external_idp. Only Microsoft login token endpoints are accepted."})]})}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("label",{className:"block text-sm font-medium mb-2",children:["CLIProxyAPI Auth JSON ",(0,n.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,n.jsx)("textarea",{value:h,onChange:e=>g(e.target.value),placeholder:'{"auth_method":"external_idp","access_token":"...","refresh_token":"...","client_id":"...","token_endpoint":"https://login.microsoftonline.com/.../oauth2/v2.0/token","profile_arn":"...","scopes":"..."}',className:"min-h-40 w-full rounded-md border border-border bg-background p-3 font-mono text-sm outline-none focus:border-primary"})]}),j&&(0,n.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 p-3 rounded-lg border border-red-200 dark:border-red-800",children:(0,n.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:j})}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(o.$n,{onClick:E,fullWidth:!0,disabled:w||!h.trim(),children:w?"Importing...":"Import CLIProxyAPI JSON"}),(0,n.jsx)(o.$n,{onClick:T,variant:"ghost",fullWidth:!0,children:"Back"})]})]})]})})}l.propTypes={isOpen:s().bool.isRequired,onMethodSelect:s().func.isRequired,onClose:s().func.isRequired}},62899:(e,t,a)=>{a.d(t,{default:()=>c});var n=a(95155),r=a(12115),i=a(14051),s=a.n(i),o=a(90882),l=a(61500),d=a(94230);function c({isOpen:e,providerInfo:t,onSuccess:a,onClose:i}){let[s,m]=(0,r.useState)(null),[u,x]=(0,r.useState)(null),[p,h]=(0,r.useState)(null),g=(0,r.useCallback)((e,t)=>{"builder-id"===e?m("builder-id"):"idc"===e?(m("idc"),h(t)):"social"===e?(m("social"),x(t.provider)):("import"===e||"api-key"===e)&&a?.()},[a]),f=()=>{m(null),x(null),h(null)};return s?"builder-id"===s||"idc"===s?(0,n.jsx)(o.default,{isOpen:e,provider:"kiro",providerInfo:t,onSuccess:()=>{m(null),h(null),a?.(),i?.()},onClose:f,idcConfig:p}):"social"===s&&u?(0,n.jsx)(d.default,{isOpen:e,provider:u,onSuccess:()=>{m(null),x(null),a?.(),i?.()},onClose:f}):null:(0,n.jsx)(l.default,{isOpen:e,onMethodSelect:g,onClose:i})}c.propTypes={isOpen:s().bool.isRequired,providerInfo:s().shape({name:s().string}),onSuccess:s().func,onClose:s().func.isRequired}},65921:(e,t,a)=>{a.d(t,{i:()=>o});var n=a(1934);let r=Date.now(),i="er_notification_history";function s(e){try{window.localStorage.setItem(i,JSON.stringify(e.slice(0,50)))}catch{}}let o=(0,n.v)((e,t)=>({notifications:[],history:function(){try{let e=window.localStorage.getItem(i),t=e?JSON.parse(e):[];for(let e of t)"number"==typeof e.id&&e.id>r&&(r=e.id);return t}catch{return[]}}(),unreadCount:0,addNotification:a=>{let n=++r,i={id:n,type:a.type||"info",message:a.message,title:a.title||null,duration:a.duration??5e3,dismissible:a.dismissible??!0,createdAt:Date.now(),source:a.source||"user"};return e(e=>({notifications:[...e.notifications,i]})),i.duration>0&&setTimeout(()=>t().removeNotification(n),i.duration),n},addServerEvent:a=>{let n=a.message||function(e){let t=e.provider||"Unknown";switch(e.type){case"provider_down":return`${t} circuit breaker opened — requests blocked temporarily.`;case"provider_recovered":return`${t} recovered — circuit breaker closed.`;case"health_degraded":return`${t} success rate dropped below 70%.`;case"rate_limited":return`${t} hit rate limit (429/403).`;case"budget_exceeded":return`Budget limit reached for ${t}.`;case"health_update":if(null!=e.successRate&&e.successRate<.5)return`${t} is unhealthy — ${Math.round(100*e.successRate)}% success rate (${e.failures||0} failures).`;return null;default:return null}}(a);if(!n)return null;let i=++r,o={id:i,type:"provider_down"===a.type?"error":"provider_recovered"===a.type?"success":"health_degraded"===a.type?"warning":"info",message:n,title:a.title||function(e){switch(e.type){case"provider_down":return"Provider Down";case"provider_recovered":return"Provider Recovered";case"health_degraded":return"Health Degraded";case"rate_limited":return"Rate Limited";case"budget_exceeded":return"Budget Exceeded";default:return"Notification"}}(a),duration:a.duration??8e3,dismissible:!0,createdAt:Date.now(),source:"server",eventType:a.type,provider:a.provider};return e(e=>{let t=[o,...e.history].slice(0,50);return s(t),{notifications:[...e.notifications,o],history:t,unreadCount:e.unreadCount+1}}),o.duration>0&&setTimeout(()=>t().removeNotification(i),o.duration),i},removeNotification:t=>{e(e=>({notifications:e.notifications.filter(e=>e.id!==t)}))},clearAll:()=>e({notifications:[]}),markAllRead:()=>e({unreadCount:0}),clearHistory:()=>{s([]),e({history:[],unreadCount:0})},success:(e,a)=>t().addNotification({type:"success",message:e,title:a}),error:(e,a)=>t().addNotification({type:"error",message:e,title:a,duration:8e3}),warning:(e,a)=>t().addNotification({type:"warning",message:e,title:a}),info:(e,a)=>t().addNotification({type:"info",message:e,title:a})}))},67098:(e,t,a)=>{a.d(t,{P:()=>i});var n=a(12115);function r(e,t){try{window.localStorage.setItem(`seen:${e}`,JSON.stringify(t))}catch{}}function i(e){let[t,a]=(0,n.useState)({});(0,n.useEffect)(()=>{a(function(e){try{let t=window.localStorage.getItem(`seen:${e}`);return t?JSON.parse(t):{}}catch{return{}}}(e))},[e]);let i=(0,n.useCallback)(e=>!t[e],[t]);return{isNew:i,markSeen:(0,n.useCallback)(t=>{a(a=>{if(a[t])return a;let n={...a,[t]:new Date().toISOString()};return r(e,n),n})},[e]),markAllSeen:(0,n.useCallback)(t=>{a(a=>{let n=!1,i={...a};for(let e of t)i[e]||(i[e]=new Date().toISOString(),n=!0);return n&&r(e,i),n?i:a})},[e])}}},67968:(e,t,a)=>{a.d(t,{default:()=>d});var n=a(95155),r=a(12115),i=a(47650);let s=[{icon:"terminal",label:"Terminal",desc:"Full shell access"},{icon:"cast",label:"Desktop",desc:"Screen sharing"},{icon:"folder_open",label:"Files",desc:"Browse & edit files"}],o=[{icon:"qr_code_scanner",text:"Scan QR to connect instantly"},{icon:"wifi_off",text:"No port forwarding needed"},{icon:"devices",text:"Works on any device"}];function l({isOpen:e,onClose:t}){return((0,r.useEffect)(()=>{if(!e)return;document.body.style.overflow="hidden";let a=e=>{"Escape"===e.key&&t()};return document.addEventListener("keydown",a),()=>{document.body.style.overflow="",document.removeEventListener("keydown",a)}},[e,t]),e)?(0,i.createPortal)((0,n.jsxs)("div",{className:"fixed inset-0 z-[9999] flex items-center justify-center p-4",children:[(0,n.jsx)("div",{className:"absolute inset-0 bg-black/50 backdrop-blur-[2px] fade-in",onClick:t}),(0,n.jsxs)("div",{className:"relative w-full max-w-sm rounded-[14px] overflow-hidden shadow-[var(--shadow-elev)] fade-in flex flex-col bg-surface border border-border-subtle",children:[(0,n.jsxs)("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border-subtle",children:[(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[(0,n.jsx)("div",{className:"w-7 h-7 rounded-[8px] flex items-center justify-center bg-primary",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-white text-base",children:"terminal"})}),(0,n.jsx)("span",{className:"text-xs font-bold uppercase tracking-wider text-primary font-mono",children:"9Remote"})]}),(0,n.jsx)("button",{onClick:t,className:"p-1.5 rounded-[10px] text-text-muted hover:bg-surface-2 hover:text-text-main transition-colors",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-base",children:"close"})})]}),(0,n.jsxs)("div",{className:"px-7 py-7 pb-9 flex flex-col gap-6",children:[(0,n.jsxs)("div",{className:"flex flex-col items-center gap-2 text-center mt-2",children:[(0,n.jsx)("div",{className:"w-14 h-14 rounded-[14px] flex items-center justify-center mb-1 bg-primary shadow-[var(--shadow-warm)]",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-white text-[30px]",children:"terminal"})}),(0,n.jsx)("h1",{className:"text-lg font-bold text-text-main tracking-tight",children:"9Remote"}),(0,n.jsx)("p",{className:"text-xs text-text-muted leading-5 max-w-[220px]",children:"Access your terminal, desktop & files from anywhere"})]}),(0,n.jsx)("div",{className:"flex gap-2 w-full",children:s.map(({icon:e,label:t,desc:a})=>(0,n.jsxs)("div",{className:"flex-1 flex flex-col items-center gap-1.5 py-4 px-1 rounded-[10px] border border-border-subtle bg-surface-2",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-primary text-[22px]",children:e}),(0,n.jsx)("p",{className:"text-xs font-semibold text-text-main",children:t}),(0,n.jsx)("p",{className:"text-[10px] text-text-muted text-center leading-4",children:a})]},t))}),(0,n.jsx)("div",{className:"flex flex-col gap-3 w-full",children:o.map(({icon:e,text:t})=>(0,n.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,n.jsx)("span",{className:"material-symbols-outlined flex-shrink-0 text-primary text-[16px]",children:e}),(0,n.jsx)("span",{className:"text-xs text-text-muted",children:t})]},e))}),(0,n.jsxs)("button",{onClick:()=>window.open("https://9remote.cc","_blank"),className:"w-full py-3 flex items-center justify-center gap-2 text-sm font-semibold text-white rounded-[10px] bg-primary hover:bg-primary-hover shadow-[var(--shadow-warm)] active:scale-[0.98] transition-all",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-base",children:"open_in_new"}),"Get 9Remote"]})]})]})]}),document.body):null}function d(){let[e,t]=(0,r.useState)(!1);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("button",{onClick:()=>t(!0),className:"relative flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg transition-all text-text-muted hover:text-text-main hover:bg-black/5 dark:hover:bg-white/5",title:"9Remote",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"computer"}),(0,n.jsx)("span",{className:"text-xs font-medium",children:"Remote"})]}),(0,n.jsx)(l,{isOpen:e,onClose:()=>t(!1)})]})}},72908:(e,t,a)=>{a.d(t,{default:()=>f});var n=a(95155),r=a(12115),i=a(14051),s=a.n(i),o=a(81127),l=a(57250),d=a(29366),c=a(2106),m=a(28777),u=a(88105),x=a(8247),p=a(5507);let h=[...Object.keys(u.zN),...Object.keys(u.IS),...Object.keys(u.nJ),...Object.keys(u.fg)],g=Object.keys(u.IS).filter(e=>u.IS[e].noAuth);function f({isOpen:e,onClose:t,onSelect:a,onDeselect:i,selectedModel:s,activeProviders:b=[],title:v="Select Model",modelAliases:k={},kindFilter:j=null,addedModelValues:y=[],closeOnSelect:w=!0}){let N=(0,r.useMemo)(()=>j?b.filter(e=>{let t=u.Q2[e.provider];return(t?.serviceKinds||["llm"]).includes(j)}):b,[b,j]),{getCaps:C}=(0,c.y)(),[S,O]=(0,r.useState)(""),[W,F]=(0,r.useState)([]),[_,I]=(0,r.useState)([]),[T,P]=(0,r.useState)([]),[E,z]=(0,r.useState)({}),L=async()=>{try{let e=await fetch("/api/combos");if(!e.ok)throw Error(`Failed to fetch combos: ${e.status}`);let t=await e.json();F(t.combos||[])}catch(e){console.error("Error fetching combos:",e),F([])}};(0,r.useEffect)(()=>{e&&L()},[e]);let A=async()=>{try{let e=await fetch("/api/provider-nodes");if(!e.ok)throw Error(`Failed to fetch provider nodes: ${e.status}`);let t=await e.json();I(t.nodes||[])}catch(e){console.error("Error fetching provider nodes:",e),I([])}};(0,r.useEffect)(()=>{e&&A()},[e]);let R=async()=>{try{let e=await fetch("/api/models/custom");if(!e.ok)throw Error(`Failed to fetch custom models: ${e.status}`);let t=await e.json();P(t.models||[])}catch(e){console.error("Error fetching custom models:",e),P([])}};(0,r.useEffect)(()=>{e&&R()},[e]);let q=async()=>{try{let e=await fetch("/api/models/disabled");if(!e.ok)throw Error(`Failed to fetch disabled models: ${e.status}`);let t=await e.json();z(t.disabled||{})}catch(e){console.error("Error fetching disabled models:",e),z({})}};(0,r.useEffect)(()=>{e&&q()},[e]);let D=(0,r.useMemo)(()=>({...u.zN,...u.IS,...u.nJ,...u.fg}),[]),$=(0,r.useMemo)(()=>{let e={},t=new Set(["webSearch","webFetch"]),a=new Set(["image","tts","stt","embedding","imageToText"]),n=new Set(["tts","image","webFetch"]);return[...new Set([...N.map(e=>e.provider),...j?g.filter(e=>(u.Q2[e]?.serviceKinds||["llm"]).includes(j)):g])].sort((e,t)=>{let a=h.indexOf(e),n=h.indexOf(t);return(-1===a?999:a)-(-1===n?999:n)}).forEach(r=>{let i=(0,u.wG)(r),s=D[r]||{name:r,color:"#666"},o=(0,u.mq)(r)||(0,u.gb)(r);if(j&&t.has(j)){e[r]={name:s.name,alias:i,color:s.color,models:[{id:r,name:s.name,value:r}]};return}if(s.passthroughModels){let t=Object.entries(k).filter(([,e])=>e.startsWith(`${i}/`)).map(([e,t])=>({id:t.replace(`${i}/`,""),name:e,value:t})),o=T.filter(e=>e.providerAlias===i).map(e=>({id:e.id,name:e.name||e.id,value:`${i}/${e.id}`,kind:(0,m.CP)(e),isCustom:!0})),l=t;if(j&&a.has(j)){let e=o.filter(e=>(0,m.CP)(e)===j);0===(l=[...e,...(0,m.KC)(r).filter(e=>(0,m.CP)(e)===j).map(e=>({id:e.id,name:e.name,value:`${i}/${e.id}`,kind:(0,m.CP)(e)})).filter(t=>!e.some(e=>e.value===t.value))]).length&&n.has(j)&&(s.serviceKinds||["llm"]).includes(j)&&(l=[{id:r,name:s.name,value:i}])}else{let e=o.filter(e=>!(0,m.CP)(e)||"llm"===(0,m.CP)(e)),a=new Set([...t,...e].map(e=>e.value)),n=(0,m.KC)(r).filter(e=>!(0,m.CP)(e)||"llm"===(0,m.CP)(e)).map(e=>({id:e.id,name:e.name,value:`${i}/${e.id}`,kind:(0,m.CP)(e)})).filter(e=>!a.has(e.value));l=[...e,...t.filter(t=>!e.some(e=>e.value===t.value)),...n]}if(l.length>0){let t=_.find(e=>e.id===r),a=t?.name||s.name;e[r]={name:a,alias:i,color:s.color,models:l}}}else if(o){if(j&&a.has(j))return;let t=b.find(e=>e.provider===r),n=_.find(e=>e.id===r),i=n?.name||t?.name||s.name,o=t?.providerSpecificData?.prefix||n?.prefix||r,l=Object.entries(k).filter(([,e])=>e.startsWith(`${r}/`)).map(([e,t])=>({id:t.replace(`${r}/`,""),name:e,value:`${o}/${t.replace(`${r}/`,"")}`})),d=T.filter(e=>e.providerAlias===r).map(e=>({id:e.id,name:e.name||e.id,value:`${o}/${e.id}`,isCustom:!0})),c=new Set(l.map(e=>e.value)),m=[...l,...d.filter(e=>!c.has(e.value))],u=m.length>0?m:[{id:`__placeholder__${r}`,name:`${o}/model-id`,value:`${o}/model-id`,isPlaceholder:!0}];e[r]={name:i,alias:o,color:s.color,models:u,isCustom:!0,hasModels:m.length>0}}else{var l;let t=(0,m.KC)(r),o=new Set(t.map(e=>e.id)),d=t.length>0,c=Object.entries(k).filter(([e,t])=>t.startsWith(`${i}/`)&&(!d||e===t.replace(`${i}/`,""))&&!o.has(t.replace(`${i}/`,""))).map(([e,t])=>({id:t.replace(`${i}/`,""),name:e,value:t,isCustom:!0})),u=new Set(c.map(e=>e.id)),x=T.filter(e=>e.providerAlias===i&&!o.has(e.id)&&!u.has(e.id)).map(e=>({id:e.id,name:e.name||e.id,value:`${i}/${e.id}`,isCustom:!0})),p=[...t.map(e=>({id:e.id,name:e.name,value:`${i}/${e.id}`,kind:(0,m.CP)(e)})),...c,...x],h=new Set,g=(l=p.filter(e=>!h.has(e.value)&&(h.add(e.value),!0)),j?a.has(j)?l.filter(e=>e.isPlaceholder||(0,m.CP)(e)===j):l:l.filter(e=>e.isPlaceholder||e.isCustom||!(0,m.CP)(e)||"llm"===(0,m.CP)(e)));0===g.length&&j&&n.has(j)&&(s.serviceKinds||["llm"]).includes(j)&&(g=[{id:r,name:s.name,value:i}]),g.length>0&&(e[r]={name:s.name,alias:i,color:s.color,models:g})}}),Object.entries(e).forEach(([t,a])=>{let n=new Set([...E[(0,u.wG)(t)]||[],...E[t]||[]]);0!==n.size&&(a.models=a.models.filter(e=>!n.has(e.id)),0===a.models.length&&delete e[t])}),e},[N,k,D,_,T,E,j,b]),M=(0,r.useMemo)(()=>{if(j)return[];if(!S.trim())return W;let e=S.toLowerCase();return W.filter(t=>t.name.toLowerCase().includes(e))},[W,S,j]),U=(0,r.useMemo)(()=>{let e=S.trim().toLowerCase(),t={};return Object.entries($).forEach(([a,n])=>{var r;let i=n.models;if(e){let t=n.name.toLowerCase().includes(e);if(0===(i=i.filter(t=>t.name.toLowerCase().includes(e)||t.id.toLowerCase().includes(e))).length&&!t)return}t[a]={...n,models:[...(r=i).filter(e=>y.includes(e.value)).sort((e,t)=>e.name.localeCompare(t.name)),...r.filter(e=>!y.includes(e.value)).sort((e,t)=>e.name.localeCompare(t.name))]}}),t},[$,S,y]),K=(0,r.useMemo)(()=>Object.entries(U),[U]),J=(0,r.useRef)(null),[H,B]=(0,r.useState)(0),[G,V]=(0,r.useState)(400),[Q,Z]=(0,r.useState)({});(0,r.useEffect)(()=>{e&&(B(0),J.current&&(J.current.scrollTop=0))},[e]),(0,r.useEffect)(()=>{let e=J.current;if(!e||"u"<typeof ResizeObserver)return;let t=()=>V(e.clientHeight||400);t();let a=new ResizeObserver(t);return a.observe(e),()=>a.disconnect()},[e,K.length]);let{offsets:Y,total:X}=(0,r.useMemo)(()=>(0,p.r0)(K,Q),[K,Q]);(0,r.useEffect)(()=>{let e=J.current;if(!e)return;let t=Math.max(0,X-G);e.scrollTop>t&&(e.scrollTop=t,B(t))},[X,G,H]);let{start:ee,end:et}=(0,r.useMemo)(()=>(0,p.$7)(Y,X,H,G,2),[Y,X,H,G]),ea=(0,r.useRef)(new Map),en=(0,r.useCallback)(e=>{let t=ea.current.get(e);return t||(t=t=>{t&&t.offsetHeight>0&&Z(a=>a[e]===t.offsetHeight?a:{...a,[e]:t.offsetHeight})},ea.current.set(e,t)),t},[]),er=(0,r.useCallback)(e=>B(e.currentTarget.scrollTop),[]),ei=Math.min(ee,K.length),es=Math.min(et,K.length-1),eo=ei>=K.length?X:Y[ei],el=es+1<K.length?Math.max(0,X-Y[es+1]):0,ed=e=>{let n=e?.value||e?.name||e;y.includes(n)&&i?i(e):a(e),w&&(t(),O(""))};return(0,n.jsxs)(o.default,{isOpen:e,onClose:()=>{t(),O("")},title:v,size:"md",className:"p-4!",footer:null,children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 mb-3 px-2.5 py-2 bg-primary/8 border border-primary/20 rounded-lg text-xs text-text-muted",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-primary shrink-0",style:{fontSize:"14px"},children:"info"}),(0,n.jsx)("span",{children:"Click to add, click again to remove. Changes are saved automatically."})]}),(0,n.jsx)("div",{className:"mb-3",children:(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)("span",{className:"material-symbols-outlined absolute left-2.5 top-1/2 -translate-y-1/2 text-text-muted text-[16px]",children:"search"}),(0,n.jsx)("input",{type:"text",placeholder:"Search...",value:S,onChange:e=>O(e.target.value),className:"w-full pl-8 pr-3 py-1.5 bg-surface border border-border rounded text-xs focus:outline-none focus:ring-1 focus:ring-primary/50"})]})}),(0,n.jsxs)("div",{ref:J,onScroll:er,className:"max-h-[400px] overflow-y-auto",children:[M.length>0&&(0,n.jsxs)("div",{className:"mb-3",children:[(0,n.jsxs)("div",{className:"flex items-center gap-1.5 mb-1.5 sticky top-0 bg-surface py-0.5",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-primary text-[14px]",children:"layers"}),(0,n.jsx)("span",{className:"text-xs font-medium text-primary",children:"Combos"}),(0,n.jsxs)("span",{className:"text-[10px] text-text-muted",children:["(",M.length,")"]})]}),(0,n.jsx)("div",{className:"flex flex-wrap gap-1.5",children:M.map(e=>{let t=s===e.name;return(0,n.jsxs)("button",{onClick:()=>ed({id:e.name,name:e.name,value:e.name}),className:`
2
+ px-2 py-1 rounded-xl text-xs font-medium transition-all border hover:cursor-pointer flex items-center gap-1
3
+ ${t?"bg-primary text-white border-primary":y.includes(e.name)?"bg-primary border-primary text-white hover:bg-primary-hover":"bg-surface border-border text-text-main hover:border-primary/50 hover:bg-primary/5"}
4
+ `,children:[y.includes(e.name)&&(0,n.jsx)("span",{className:"material-symbols-outlined leading-none",style:{fontSize:"10px"},children:"check"}),e.name]},e.id)})})]}),eo>0&&(0,n.jsx)("div",{style:{height:eo},"aria-hidden":!0}),K.slice(ei,es+1).map(([e,t])=>(0,n.jsxs)("div",{ref:en(e),className:"pb-3",children:[(0,n.jsxs)("div",{className:"flex items-center gap-1.5 mb-1.5 sticky top-0 bg-surface py-0.5",children:[(0,n.jsx)(l.A,{src:(0,x.k)(e,t.apiType),alt:t.name,size:14,fallbackText:(t.name||e).slice(0,2).toUpperCase(),fallbackColor:t.color}),(0,n.jsx)("span",{className:"text-xs font-medium text-primary",children:t.name}),(0,n.jsxs)("span",{className:"text-[10px] text-text-muted",children:["(",t.models.length,")"]})]}),(0,n.jsx)("div",{className:"flex flex-wrap gap-1.5",children:t.models.map(e=>{let t=s===e.value,a=e.isPlaceholder;return(0,n.jsx)("button",{onClick:()=>ed(e),title:a?"Select to pre-fill, then edit model ID in the input":void 0,className:`
5
+ px-2 py-1 rounded-xl text-xs font-medium transition-all border hover:cursor-pointer
6
+ ${a?"border-dashed border-border text-text-muted hover:border-primary/50 hover:text-primary bg-surface italic":t?"bg-primary text-white border-primary":y.includes(e.value)?"bg-primary border-primary text-white hover:bg-primary-hover":"bg-surface border-border text-text-main hover:border-primary/50 hover:bg-primary/5"}
7
+ `,children:(0,n.jsxs)("span",{className:"flex items-center gap-1",children:[y.includes(e.value)&&!a&&(0,n.jsx)("span",{className:"material-symbols-outlined leading-none",style:{fontSize:"10px"},children:"check"}),a?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-[11px]",children:"edit"}),e.name]}):e.isCustom?(0,n.jsxs)(n.Fragment,{children:[e.name,(0,n.jsx)("span",{className:"text-[9px] opacity-60 font-normal",children:"custom"}),(0,n.jsx)(d.default,{caps:C(e.value)})]}):(0,n.jsxs)(n.Fragment,{children:[e.name,(0,n.jsx)(d.default,{caps:C(e.value)})]})]})},e.value)})})]},e)),el>0&&(0,n.jsx)("div",{style:{height:el},"aria-hidden":!0}),0===Object.keys(U).length&&0===M.length&&(0,n.jsxs)("div",{className:"text-center py-4 text-text-muted",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-2xl mb-1 block",children:"search_off"}),(0,n.jsx)("p",{className:"text-xs",children:"No models found"})]})]})]})}f.propTypes={isOpen:s().bool.isRequired,onClose:s().func.isRequired,onSelect:s().func.isRequired,onDeselect:s().func,selectedModel:s().string,activeProviders:s().arrayOf(s().shape({provider:s().string.isRequired})),title:s().string,modelAliases:s().object,kindFilter:s().string,addedModelValues:s().arrayOf(s().string),closeOnSelect:s().bool}},73579:(e,t,a)=>{a.d(t,{default:()=>g});var n=a(95155),r=a(12115),i=a(14051),s=a.n(i),o=a(81127),l=a(11910),d=a(92542),c=a(56061),m=a(88105),u=a(20476),x=a(6394),p=a(22269),h=a(98);function g({isOpen:e,connection:t,proxyPools:a,onSave:i,onClose:s}){let[f,b]=(0,r.useState)({name:"",priority:1,apiKey:""}),[v,k]=(0,r.useState)({azureEndpoint:"",apiVersion:"2024-10-01-preview",deployment:"",organization:""}),[j,y]=(0,r.useState)({accountId:""}),[w,N]=(0,r.useState)(""),[C,S]=(0,r.useState)(!1),[O,W]=(0,r.useState)(null),[F,_]=(0,r.useState)(!1),[I,T]=(0,r.useState)(null),[P,E]=(0,r.useState)(!1);(0,r.useEffect)(()=>{if(t){b({name:t.name||"",priority:t.priority||1,apiKey:""}),"azure"===t.provider&&t.providerSpecificData&&k({azureEndpoint:t.providerSpecificData.azureEndpoint||"",apiVersion:t.providerSpecificData.apiVersion||"2024-10-01-preview",deployment:t.providerSpecificData.deployment||"",organization:t.providerSpecificData.organization||""}),"cloudflare-ai"===t.provider&&t.providerSpecificData&&y({accountId:t.providerSpecificData.accountId||""});let e=m.Q2?.[t.provider];e?.regions&&N(t.providerSpecificData?.region||e.defaultRegion||e.regions[0]?.id||""),W(null),T(null)}},[t]);let z=t?.authType==="oauth",L=t?.provider==="azure",A=t?.provider==="cloudflare-ai",R=!!t&&((0,m.mq)(t.provider)||(0,m.gb)(t.provider)),q=t&&m.Q2?.[t.provider]?.regions||null,D=()=>{if(q&&w)return{...t?.providerSpecificData||{},region:w}},$=async()=>{if(t?.provider){S(!0),W(null);try{let e=await fetch(`/api/providers/${t.id}/test`,{method:"POST"}),a=await e.json();W(a.valid?"success":"failed")}catch{W("failed")}finally{S(!1)}}},M=async()=>{if(t?.provider&&f.apiKey){_(!0),T(null);try{let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t.provider,apiKey:f.apiKey,...L?{providerSpecificData:v}:{},...A?{providerSpecificData:j}:{},...q?{providerSpecificData:D()}:{}})}),a=await e.json();T(a.valid?"success":"failed")}catch{T("failed")}finally{_(!1)}}},U=async()=>{if(t){E(!0);try{let e={name:f.name,priority:f.priority};if(!z&&f.apiKey){e.apiKey=f.apiKey;let a="success"===I;if(!a)try{_(!0),T(null);let e=await fetch("/api/providers/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:t.provider,apiKey:f.apiKey,...L?{providerSpecificData:v}:{},...A?{providerSpecificData:j}:{},...q?{providerSpecificData:D()}:{}})});a=!!(await e.json()).valid,T(a?"success":"failed")}catch{T("failed")}finally{_(!1)}a&&(e.testStatus="active",e.lastError=null,e.lastErrorAt=null)}L&&(e.providerSpecificData={azureEndpoint:v.azureEndpoint,apiVersion:v.apiVersion,deployment:v.deployment,organization:v.organization}),A&&(e.providerSpecificData={accountId:j.accountId}),q&&w&&(e.providerSpecificData=D()),await i(e)}finally{E(!1)}}};return t?(0,n.jsx)(o.default,{isOpen:e,title:"Edit Connection",onClose:s,children:(0,n.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,n.jsx)(l.default,{label:"Name",value:f.name,onChange:e=>b({...f,name:e.target.value}),placeholder:z?"Account name":"Production Key"}),z&&t.email&&(0,n.jsxs)("div",{className:"bg-sidebar/50 p-3 rounded-lg",children:[(0,n.jsx)("p",{className:"text-sm text-text-muted mb-1",children:"Email"}),(0,n.jsx)("p",{className:"font-medium",children:t.email})]}),(0,n.jsx)(l.default,{label:"Priority",type:"number",value:f.priority,onChange:e=>b({...f,priority:Number.parseInt(e.target.value,10)||1})}),!z&&(0,n.jsxs)(n.Fragment,{children:["felo-web"===t.provider?(0,n.jsx)(u.default,{onCaptured:e=>b(t=>({...t,apiKey:e}))}):p.S[t.provider]?(0,n.jsx)(x.default,{provider:t.provider,label:p.S[t.provider].label,onCaptured:e=>b(t=>({...t,apiKey:e}))}):null,(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(l.default,{label:"API Key",type:"password",value:f.apiKey,onChange:e=>b({...f,apiKey:e.target.value}),placeholder:"Enter new API key",hint:"Leave blank to keep the current API key.",className:"flex-1"}),(0,n.jsx)("div",{className:"pt-6",children:(0,n.jsx)(d.default,{onClick:M,disabled:!f.apiKey||F||P,variant:"secondary",children:F?"Checking...":"Check"})})]}),I&&(0,n.jsx)(c.default,{variant:"success"===I?"success":"error",children:"success"===I?"Valid":"Invalid"})]}),L&&(0,n.jsxs)("div",{className:"bg-sidebar/50 p-4 rounded-lg border border-accent/20",children:[(0,n.jsx)("h3",{className:"font-semibold mb-3 text-sm",children:"Azure OpenAI Configuration"}),(0,n.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,n.jsx)(l.default,{label:"Azure Endpoint",value:v.azureEndpoint,onChange:e=>k({...v,azureEndpoint:e.target.value}),placeholder:"https://your-resource.openai.azure.com",hint:"Your Azure OpenAI resource endpoint URL"}),(0,n.jsx)(l.default,{label:"Deployment Name",value:v.deployment,onChange:e=>k({...v,deployment:e.target.value}),placeholder:"gpt-4",hint:"The deployment name in your Azure resource"}),(0,n.jsx)(l.default,{label:"API Version",value:v.apiVersion,onChange:e=>k({...v,apiVersion:e.target.value}),placeholder:"2024-10-01-preview",hint:"Azure OpenAI API version to use"}),(0,n.jsx)(l.default,{label:"Organization",value:v.organization,onChange:e=>k({...v,organization:e.target.value}),placeholder:"Organization ID",hint:"Required for billing"})]})]}),q&&(0,n.jsx)(h.default,{label:"Region",value:w,onChange:e=>N(e.target.value),options:q.map(e=>({value:e.id,label:e.label}))}),!R&&!L&&!A&&(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[(0,n.jsx)(d.default,{onClick:$,variant:"secondary",disabled:C,children:C?"Testing...":"Test Connection"}),O&&(0,n.jsx)(c.default,{variant:"success"===O?"success":"error",children:"success"===O?"Valid":"Failed"})]}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(d.default,{onClick:U,fullWidth:!0,disabled:P,children:P?"Saving...":"Save"}),(0,n.jsx)(d.default,{onClick:s,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}):null}g.propTypes={isOpen:s().bool.isRequired,connection:s().shape({id:s().string,name:s().string,email:s().string,priority:s().number,authType:s().string,provider:s().string,providerSpecificData:s().object}),proxyPools:s().arrayOf(s().shape({id:s().string,name:s().string})),onSave:s().func.isRequired,onClose:s().func.isRequired}},79668:(e,t,a)=>{a.d(t,{Y:()=>n});function n(e,t=Date.now()){if("number"!=typeof e||!Number.isFinite(e)||e<=0)return null;let a=t-e,r=a>=6e5,i=Math.max(0,Math.round(a/6e4)),s=r?`Debug browser has been running for ${i} min. `:"";return{stale:r,minutes:i,text:`${s}While it runs with the debug port, any local process can read its cookies — close it (or restart it without the debug port) when done capturing.`}}},80752:(e,t,a)=>{a.d(t,{default:()=>m});var n=a(95155),r=a(12115),i=a(14051),s=a.n(i),o=a(1620),l=a(40197),d=a(81127);function c({icon:e,label:t,onClick:a,trailing:r,danger:i}){return(0,n.jsxs)("button",{onClick:a,className:`flex items-center gap-3 w-full px-4 py-2.5 text-sm transition-colors ${i?"text-red-500 hover:bg-red-500/10":"text-text-main hover:bg-black/5 dark:hover:bg-white/5"}`,children:[(0,n.jsx)("span",{className:`material-symbols-outlined text-[20px] ${i?"":"text-text-muted"}`,children:e}),(0,n.jsx)("span",{className:"flex-1 text-left",children:t}),r&&(0,n.jsx)("span",{className:"text-base",children:r})]})}function m({onLogout:e}){let[t,a]=(0,r.useState)(!1),[i,s]=(0,r.useState)(!1),[u,x]=(0,r.useState)(!1),[p,h]=(0,r.useState)(!1),{toggleTheme:g,isDark:f}=(0,o.D)(),b=(0,r.useRef)(null),v=async()=>{h(!0);try{await fetch("/api/version/shutdown",{method:"POST"})}catch(e){}h(!1),x(!1)};return(0,r.useEffect)(()=>{let e=e=>{b.current&&!b.current.contains(e.target)&&a(!1)};if(t)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[t]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"relative",ref:b,children:[(0,n.jsx)("button",{onClick:()=>a(e=>!e),className:"flex items-center justify-center p-2 rounded-lg text-text-muted hover:text-text-main hover:bg-black/5 dark:hover:bg-white/5 transition-all",title:"Menu",children:(0,n.jsx)("span",{className:"material-symbols-outlined",children:"grid_view"})}),t&&(0,n.jsxs)("div",{className:"absolute right-0 top-full mt-2 w-60 bg-surface border border-black/10 dark:border-white/10 rounded-xl shadow-2xl z-50 animate-in fade-in zoom-in-95 duration-150 overflow-hidden py-1",children:[(0,n.jsx)(c,{icon:"history",label:"Change Log",onClick:()=>{a(!1),s(!0)}}),(0,n.jsx)(c,{icon:f?"light_mode":"dark_mode",label:"Theme",onClick:()=>{g(),a(!1)}}),(0,n.jsx)(c,{icon:"power_settings_new",label:"Shutdown",danger:!0,onClick:()=>{a(!1),x(!0)}}),(0,n.jsx)(c,{icon:"logout",label:"Logout",danger:!0,onClick:()=>{a(!1),e()}})]})]}),(0,n.jsx)(l.default,{isOpen:i,onClose:()=>s(!1)}),(0,n.jsx)(d.ConfirmModal,{isOpen:u,onClose:()=>x(!1),onConfirm:v,title:"Close Proxy",message:"Are you sure you want to close the proxy server?",confirmText:"Close",cancelText:"Cancel",variant:"danger",loading:p})]})}c.propTypes={icon:s().string.isRequired,label:s().string.isRequired,onClick:s().func.isRequired,trailing:s().node,danger:s().bool},m.propTypes={onLogout:s().func.isRequired}},81127:(e,t,a)=>{a.d(t,{ConfirmModal:()=>d,default:()=>l});var n=a(95155),r=a(12115),i=a(31474),s=a(92542),o=a(97677);function l({isOpen:e,onClose:t,title:a,children:s,footer:d,size:c="md",closeOnOverlay:m=!0,showTrafficLights:u=!0,className:x}){return((0,r.useEffect)(()=>(e?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[e]),(0,r.useEffect)(()=>{let a=a=>{"Escape"===a.key&&e&&t()};return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)},[e,t]),e)?(0,n.jsxs)("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:[(0,n.jsx)("div",{className:"fixed inset-0 bg-black/60 backdrop-blur-[2px] transition-opacity",onClick:m?t:void 0}),(0,n.jsxs)("div",{className:(0,i.cn)("relative w-full bg-surface border border-border-subtle rounded-panel shadow-[var(--shadow-elev)] transition-all",{sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl",full:"max-w-3xl"}[c],x),children:[(a||u)&&(0,n.jsxs)("div",{className:"border-b border-border-subtle px-5 py-3.5",children:[(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[u&&(0,n.jsxs)("div",{className:"hidden md:flex items-center gap-2 mr-3",children:[(0,n.jsx)(o.default,{text:"Close",position:"top",color:"#ef4444",children:(0,n.jsx)("button",{onClick:t,"aria-label":"Close",className:"group w-2.5 h-2.5 rounded-full bg-[#ef4444] hover:brightness-90 transition-all flex items-center justify-center",children:(0,n.jsx)("span",{className:"text-[7px] font-bold text-white opacity-0 group-hover:opacity-100 transition-opacity leading-none",children:"✕"})})}),(0,n.jsx)("div",{className:"w-2.5 h-2.5 rounded-full bg-surface-2 border border-border cursor-not-allowed"}),(0,n.jsx)("div",{className:"w-2.5 h-2.5 rounded-full bg-surface-2 border border-border cursor-not-allowed"})]}),a&&(0,n.jsx)("h2",{className:"text-sm font-semibold text-text-main",children:a})]}),(0,n.jsx)("button",{onClick:t,"aria-label":"Close",className:"md:hidden -mr-2 p-1.5 rounded text-text-muted hover:bg-surface-2 hover:text-text-main transition-colors",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[20px]",children:"close"})})]}),(0,n.jsx)("div",{className:"p-6 max-h-[85vh] overflow-y-auto custom-scrollbar",children:s}),d&&(0,n.jsx)("div",{className:"flex items-center justify-end gap-3 border-t border-border-subtle p-5",children:d})]})]}):null}function d({isOpen:e,onClose:t,onConfirm:a,title:r="Confirm",message:i,confirmText:o="Confirm",cancelText:c="Cancel",variant:m="danger",loading:u=!1}){return(0,n.jsx)(l,{isOpen:e,onClose:t,title:r,size:"sm",footer:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.default,{variant:"ghost",onClick:t,disabled:u,children:c}),(0,n.jsx)(s.default,{variant:m,onClick:a,loading:u,children:o})]}),children:(0,n.jsx)("p",{className:"text-sm text-text-muted",children:i})})}},90882:(e,t,a)=>{a.d(t,{default:()=>d});var n=a(95155),r=a(12115),i=a(14051),s=a.n(i),o=a(35497),l=a(11059);function d({isOpen:e,provider:t,providerInfo:a,onSuccess:i,onClose:s,oauthMeta:c,idcConfig:m}){let[u,x]=(0,r.useState)("waiting"),[p,h]=(0,r.useState)(null),[g,f]=(0,r.useState)(""),[b,v]=(0,r.useState)(null),[k,j]=(0,r.useState)(!1),[y,w]=(0,r.useState)(null),[N,C]=(0,r.useState)(!1),[S,O]=(0,r.useState)(!1),[W,F]=(0,r.useState)(!1),_=(0,r.useRef)(null),I=(0,r.useRef)(!1),T=(0,r.useRef)(!1),{copied:P,copy:E}=(0,l.C)(),[z,L]=(0,r.useState)(!1),[A,R]=(0,r.useState)("/callback?code=..."),q=(0,r.useRef)(!1);(0,r.useEffect)(()=>{L("localhost"===window.location.hostname||"127.0.0.1"===window.location.hostname),R(`${window.location.origin}/callback?code=...`)},[]);let D=(0,r.useCallback)(async(e,a)=>{if(p||"freebuff"===t)try{let n=await fetch(`/api/oauth/${t}/exchange`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:e,redirectUri:p?.redirectUri||`${window.location.origin}/callback`,codeVerifier:p?.codeVerifier,state:a,...c?{meta:c}:{}})}),r=await n.json();if(!n.ok)throw Error(r.error);x("success"),i?.()}catch(e){v(e.message),x("error")}},[p,t,i,c]),$=(0,r.useCallback)(async e=>{if(p?.state)try{let t=await fetch("/api/oauth/xai/manual-code",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:e,state:p.state})}),a=await t.json();if(!t.ok)throw Error(a.error);x("success"),i?.()}catch(e){v(e.message),x("error")}},[p,i]),M=(0,r.useCallback)(async(e,a,n,r,s)=>{I.current=!1,C(!0);let o=Date.now()+(Number.isFinite(s)&&s>0?s:12e4);for(;Date.now()<o;){if(I.current){console.log("[OAuthModal] Polling aborted"),C(!1);return}if(await new Promise(e=>setTimeout(e,1e3*n)),I.current){console.log("[OAuthModal] Polling aborted after sleep"),C(!1);return}try{let s=await fetch(`/api/oauth/${t}/poll`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({deviceCode:e,codeVerifier:a,extraData:r})}),o=await s.json();if(o.success){I.current=!0,x("success"),C(!1),i?.();return}if("expired_token"===o.error||"access_denied"===o.error)throw Error(o.errorDescription||o.error);"slow_down"===o.error&&(n=Math.min(n+5,30))}catch(e){v(e.message),x("error"),C(!1);return}}v("Authorization timeout"),x("error"),C(!1)},[t,i]),U=(0,r.useCallback)(async()=>{if(t)try{let e;if(v(null),["github","qwen","kiro","kimi-coding","kilocode","codebuddy-cn","codebuddy-intl","workbuddy","qoder","freebuff","zcode"].includes(t)){j(!0),x("waiting");let e=new URL(`/api/oauth/${t}/device-code`,window.location.origin);"kiro"===t&&m?.startUrl&&(e.searchParams.set("start_url",m.startUrl),m.region&&e.searchParams.set("region",m.region),e.searchParams.set("auth_method","idc"));let a=await fetch(e.toString()),n=await a.json();if(!a.ok)throw Error(n.error);w(n);let r=n.verification_uri_complete||n.verification_uri;r&&window.open(r,"_blank","noopener,noreferrer");let i="kiro"===t?{_clientId:n._clientId,_clientSecret:n._clientSecret,_region:n._region,_authMethod:n._authMethod,_startUrl:n._startUrl}:"qoder"===t?{_qoderNonce:n._qoderNonce,_qoderMachineId:n._qoderMachineId,_qoderVerifier:n.codeVerifier}:"freebuff"===t?{_fingerprintHash:n.fingerprintHash,_expiresAt:n.expiresAt}:"zcode"===t?{_zcodePollToken:n._zcodePollToken}:null;M(n.device_code,n.codeVerifier,n.interval||5,i,Number.isFinite(n.expires_in)&&n.expires_in>0?1e3*n.expires_in:void 0);return}let a=window.location.port||("https:"===window.location.protocol?"443":"80");e="codex"===t?"http://localhost:1455/auth/callback":"xai"===t?"http://127.0.0.1:56121/callback":`http://localhost:${a}/callback`;let n=new URL(`/api/oauth/${t}/authorize`,window.location.origin);n.searchParams.set("redirect_uri",e),c&&Object.entries(c).forEach(([e,t])=>{t&&n.searchParams.set(e,t)});let r=await fetch(n.toString()),i=await r.json();if(!r.ok)throw Error(i.error);let s=!1,o=!1;if("codex"===t)try{let t=new URL("/api/oauth/codex/start-proxy",window.location.origin);t.searchParams.set("app_port",a),t.searchParams.set("state",i.state),t.searchParams.set("code_verifier",i.codeVerifier),t.searchParams.set("redirect_uri",e);let n=await fetch(t.toString()),r=await n.json();s=r.success,o=!!r.serverSide}catch{s=!1}let l=!1,d=!1;if("xai"===t)try{let t=new URL("/api/oauth/xai/start-proxy",window.location.origin);t.searchParams.set("app_port",a),t.searchParams.set("state",i.state),t.searchParams.set("code_verifier",i.codeVerifier),t.searchParams.set("redirect_uri",e);let n=await fetch(t.toString()),r=await n.json();if(l=r.success,d=!!r.serverSide,!l&&"port_busy"===r.reason)throw Error("Port 56121 in use; close the conflicting process and retry")}catch(e){if(e?.message)throw e;l=!1}h({...i,redirectUri:e,codexServerSide:o,xaiServerSide:d}),"codex"===t&&s||"xai"===t&&l||z&&"codex"!==t&&"xai"!==t?(x("waiting"),_.current=window.open(i.authUrl,"oauth_popup","width=600,height=700"),_.current||x("input")):(x("input"),window.open(i.authUrl,"_blank"))}catch(e){v(e.message),x("error")}},[t,z,M,c,m]);(0,r.useEffect)(()=>{e&&t?T.current||(T.current=!0,h(null),f(""),v(null),j(!1),w(null),C(!1),I.current=!1,U()):e||(I.current=!0,T.current=!1,"codex"===t?fetch("/api/oauth/codex/stop-proxy").catch(()=>{}):"xai"===t&&fetch("/api/oauth/xai/stop-proxy").catch(()=>{}))},[e,t,U]),(0,r.useEffect)(()=>{let e=p?.codexServerSide?"codex":p?.xaiServerSide?"xai":null;if(!e||!p?.state||q.current)return;let t=!1,a=0,n=async()=>{if(!t&&!q.current){a+=1;try{let a=await fetch(`/api/oauth/${e}/poll-status?state=${encodeURIComponent(p.state)}`),n=await a.json();if(t||q.current)return;if("done"===n.status){q.current=!0,x("success"),i?.();return}if("error"===n.status){q.current=!0,v(n.error||"Authentication failed"),x("error");return}}catch{}if(a>=200){q.current=!0,v("Authentication timeout"),x("error");return}setTimeout(n,1500)}};return setTimeout(n,1500),()=>{t=!0}},[p,i]),(0,r.useEffect)(()=>{let e;if(!p)return;q.current=!1;let t=async e=>{if(q.current)return;let{code:t,token:a,state:n,error:r,errorDescription:i}=e;if(r){q.current=!0,v(i||r),x("error");return}(a||t)&&(q.current=!0,await D(a||t,n))},a=e=>{let a=e.origin.includes("localhost")||e.origin.includes("127.0.0.1"),n=e.origin===window.location.origin;(a||n)&&e.data?.type==="oauth_callback"&&t(e.data.data)};window.addEventListener("message",a);try{(e=new BroadcastChannel("oauth_callback")).onmessage=e=>t(e.data)}catch(e){console.log("BroadcastChannel not supported")}let n=e=>{if("oauth_callback"===e.key&&e.newValue)try{let a=JSON.parse(e.newValue);t(a),localStorage.removeItem("oauth_callback")}catch(e){console.log("Failed to parse localStorage data")}};window.addEventListener("storage",n);try{let e=localStorage.getItem("oauth_callback");if(e){let a=JSON.parse(e);a.timestamp&&Date.now()-a.timestamp<3e4&&t(a),localStorage.removeItem("oauth_callback")}}catch{}return()=>{window.removeEventListener("message",a),window.removeEventListener("storage",n),e&&e.close()}},[p,D]);let K=async()=>{if("freebuff"===t){O(!0);try{let e=await fetch("/api/oauth/freebuff/import"),t=await e.json();t?.tokenFound&&t.token?(f(t.token),v(null)):v(t?.error||"No Freebuff token found — log in with the Freebuff CLI once, or copy your token from freebuff.llm.pm.")}catch(e){v(e.message)}finally{O(!1)}}},J=async()=>{if("zcode"===t){F(!0);try{let e=await fetch("/api/oauth/zcode/import",{method:"POST"}),t=await e.json();e.ok&&t?.success?(v(null),x("success"),i?.()):v(t?.error||"No ZCode credential found — log in to the ZCode desktop app first.")}catch(e){v(e.message)}finally{F(!1)}}},H=async()=>{try{v(null);let e=g.trim();if(e.startsWith("eyJ")&&e.includes("."))return void await D(e,null);if("xai"===t&&e&&!e.includes("://")&&!e.includes("?")&&!e.includes("code="))return void await $(e);if("kimchi"===t&&e&&!e.includes("://")&&!e.includes("?")||"freebuff"===t&&e&&!e.includes("://")&&!e.includes("?"))return void await D(e,null);let a=new URL(e),n=a.searchParams.get("code"),r=a.searchParams.get("token"),i=a.searchParams.get("state"),s=a.searchParams.get("error");if(s)throw Error(a.searchParams.get("error_description")||s);if(!n&&!r)throw Error("xai"===t?"Paste the callback URL or copied xAI code":"kimchi"===t?"No Kimchi token found in URL":"No authorization code found in URL");await D(r||n,i)}catch(e){v(e.message),x("error")}},B=(0,r.useCallback)(()=>{"codex"===t?fetch("/api/oauth/codex/stop-proxy").catch(()=>{}):"xai"===t&&fetch("/api/oauth/xai/stop-proxy").catch(()=>{}),s()},[s,t]);if(!t||!a)return null;let G="xai"===t,V="kimchi"===t,Q="freebuff"===t,Z=y?.verification_uri_complete||y?.verification_uri||"",Y=G?"Connect Grok Build OAuth":`Connect ${a.name}`,X=G?"http://127.0.0.1:56121/callback?code=... or copied code":V?`${A.replace("code=...","token=...")} or copied token`:Q?"Paste your Freebuff authToken (from freebuff.llm.pm or ~/.config/manicode/credentials.json)":A;return(0,n.jsx)(o.aF,{isOpen:e,title:Y,onClose:B,size:"lg",children:(0,n.jsxs)("div",{className:"flex flex-col gap-4",children:[("waiting"===u||"input"===u)&&!k&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 border border-border rounded-lg bg-sidebar/50",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-base text-primary animate-spin",children:"progress_activity"}),(0,n.jsx)("span",{className:"text-sm",children:G?"Waiting for Grok Build OAuth…":"Waiting for popup authorization…"})]}),(0,n.jsxs)("div",{className:"flex items-center gap-3 my-1",children:[(0,n.jsx)("div",{className:"flex-1 h-px bg-border"}),(0,n.jsx)("span",{className:"text-xs text-text-muted uppercase tracking-wider",children:"Or paste callback URL manually"}),(0,n.jsx)("div",{className:"flex-1 h-px bg-border"})]}),(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsxs)("p",{className:"text-sm font-medium mb-2",children:["Step 1: Open this ",G?"Grok Build OAuth URL":Q?"URL and copy your token":"URL"," in your browser"]}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(o.pd,{value:p?.authUrl||"",readOnly:!0,className:"flex-1 font-mono text-xs"}),(0,n.jsx)(o.$n,{variant:"secondary",icon:"auth_url"===P?"check":"content_copy",onClick:()=>E(p?.authUrl,"auth_url"),disabled:!p?.authUrl,children:"Copy"})]}),Q&&(0,n.jsxs)("div",{className:"mt-2",children:[(0,n.jsx)(o.$n,{variant:"secondary",icon:"download",fullWidth:!0,onClick:K,disabled:S,children:S?"Detecting…":"Import token from Freebuff CLI"}),(0,n.jsx)("p",{className:"mt-1 text-[10px] text-text-muted",children:"Reads authToken from ~/.config/manicode/credentials.json"})]})]}),(0,n.jsxs)("div",{children:[(0,n.jsxs)("p",{className:"text-sm font-medium mb-2",children:["Step 2: Paste the ","xai"===t?"callback URL or copied code":V?"callback URL or copied token":Q?"copied authToken":"callback URL"," here"]}),(0,n.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"xai"===t?"If xAI shows a code instead of redirecting, paste that code here.":V?"After authorization, copy the full callback URL or token from your browser.":Q?"After logging in on freebuff.llm.pm, copy the authToken shown on the page and paste it here.":"After authorization, copy the full URL from your browser."}),(0,n.jsx)(o.pd,{value:g,onChange:e=>f(e.target.value),placeholder:X,className:"font-mono text-xs"})]})]}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(o.$n,{onClick:H,fullWidth:!0,disabled:!g,children:"Connect"}),(0,n.jsx)(o.$n,{onClick:B,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"waiting"===u&&k&&y&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"text-center py-4",children:[(0,n.jsx)("p",{className:"text-sm text-text-muted mb-4",children:"Visit the login URL below and authorize:"}),(0,n.jsxs)("div",{className:"bg-sidebar p-4 rounded-lg mb-4",children:[(0,n.jsx)("p",{className:"text-xs text-text-muted mb-1",children:"Login URL"}),(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("code",{className:"flex-1 text-sm break-all",children:Z}),(0,n.jsx)(o.$n,{size:"sm",variant:"ghost",icon:"login_url"===P?"check":"content_copy",onClick:()=>E(Z,"login_url"),disabled:!Z}),(0,n.jsx)(o.$n,{size:"sm",variant:"ghost",icon:"open_in_new",onClick:()=>window.open(Z,"_blank","noopener,noreferrer"),disabled:!Z,children:"Open"})]})]}),(0,n.jsxs)("div",{className:"bg-primary/10 p-4 rounded-lg",children:[(0,n.jsx)("p",{className:"text-xs text-text-muted mb-1",children:"Your Code"}),(0,n.jsxs)("div",{className:"flex items-center justify-center gap-2",children:[(0,n.jsx)("p",{className:"text-2xl font-mono font-bold text-primary",children:y.user_code}),(0,n.jsx)(o.$n,{size:"sm",variant:"ghost",icon:"user_code"===P?"check":"content_copy",onClick:()=>E(y.user_code,"user_code")})]})]})]}),N&&(0,n.jsxs)("div",{className:"flex items-center justify-center gap-2 text-sm text-text-muted",children:[(0,n.jsx)("span",{className:"material-symbols-outlined animate-spin",children:"progress_activity"}),"Waiting for authorization..."]}),"zcode"===t&&(0,n.jsxs)("div",{className:"mt-2",children:[(0,n.jsxs)("div",{className:"flex items-center gap-3 my-1",children:[(0,n.jsx)("div",{className:"flex-1 h-px bg-border"}),(0,n.jsx)("span",{className:"text-xs text-text-muted uppercase tracking-wider",children:"Or"}),(0,n.jsx)("div",{className:"flex-1 h-px bg-border"})]}),(0,n.jsx)(o.$n,{variant:"secondary",icon:"download",fullWidth:!0,onClick:J,disabled:W,children:W?"Detecting…":"Import from ZCode desktop app"}),(0,n.jsx)("p",{className:"mt-1 text-[10px] text-text-muted",children:"Reads the session credential from ~/.zcode/v2/config.json"})]})]}),Q&&"waiting"===u&&k&&y&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"flex items-center gap-3 my-1",children:[(0,n.jsx)("div",{className:"flex-1 h-px bg-border"}),(0,n.jsx)("span",{className:"text-xs text-text-muted uppercase tracking-wider",children:"Or paste an existing Freebuff authToken"}),(0,n.jsx)("div",{className:"flex-1 h-px bg-border"})]}),(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"text-sm font-medium mb-2",children:"Paste your Freebuff authToken (from freebuff.llm.pm or ~/.config/manicode/credentials.json)"}),(0,n.jsx)(o.pd,{value:g,onChange:e=>f(e.target.value),placeholder:X,className:"font-mono text-xs"})]}),(0,n.jsx)(o.$n,{variant:"secondary",icon:"download",fullWidth:!0,onClick:K,disabled:S,children:S?"Detecting…":"Import token from Freebuff CLI"}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(o.$n,{onClick:H,fullWidth:!0,disabled:!g,children:"Connect"}),(0,n.jsx)(o.$n,{onClick:B,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]}),"success"===u&&(0,n.jsxs)("div",{className:"text-center py-6",children:[(0,n.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-3xl text-green-600",children:"check_circle"})}),(0,n.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connected Successfully!"}),(0,n.jsxs)("p",{className:"text-sm text-text-muted mb-4",children:["Your ",a.name," account has been connected."]}),(0,n.jsx)(o.$n,{onClick:B,fullWidth:!0,children:"Done"})]}),"error"===u&&(0,n.jsxs)("div",{className:"text-center py-6",children:[(0,n.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-red-100 dark:bg-red-900/30 flex items-center justify-center",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-3xl text-red-600",children:"error"})}),(0,n.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connection Failed"}),(0,n.jsx)("p",{className:"text-sm text-red-600 mb-4",children:b}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(o.$n,{onClick:U,variant:"secondary",fullWidth:!0,children:"Try Again"}),(0,n.jsx)(o.$n,{onClick:B,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})})}d.propTypes={isOpen:s().bool.isRequired,provider:s().string,providerInfo:s().shape({name:s().string}),onSuccess:s().func,onClose:s().func.isRequired,oauthMeta:s().object,idcConfig:s().shape({startUrl:s().string,region:s().string})}},91450:(e,t,a)=>{a.d(t,{default:()=>o});var n=a(95155),r=a(14051),i=a.n(r),s=a(38587);function o({children:e}){return(0,n.jsxs)("div",{className:"min-h-screen flex flex-col relative bg-bg transition-colors duration-500 overflow-x-hidden selection:bg-primary/20 selection:text-primary",children:[(0,n.jsx)("div",{className:"fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[800px] h-[800px] bg-primary/5 dark:bg-primary/5 rounded-full blur-[100px] pointer-events-none z-0"}),(0,n.jsx)("div",{className:"fixed bottom-0 right-0 w-[600px] h-[600px] bg-orange-200/20 dark:bg-orange-900/10 rounded-full blur-[120px] pointer-events-none z-0 translate-y-1/3 translate-x-1/3"}),(0,n.jsx)("div",{className:"absolute top-6 right-6 z-20",children:(0,n.jsx)(s.default,{variant:"card"})}),(0,n.jsx)("main",{className:"flex-1 flex flex-col items-center justify-center p-4 sm:p-6 z-10 w-full h-full",children:e})]})}o.propTypes={children:i().node.isRequired}},92173:(e,t,a)=>{a.d(t,{default:()=>c});var n=a(95155),r=a(98500),i=a.n(r),s=a(90620);let o=[{label:"Features",href:"#features"},{label:"Pricing",href:"#pricing"},{label:"Changelog",href:"#"}],l=[{label:"Documentation",href:"#"},{label:"API Reference",href:"#"},{label:"Help Center",href:"#"}],d=[{label:"About",href:"#"},{label:"Blog",href:"#"},{label:"Contact",href:"#"}];function c(){return(0,n.jsx)("footer",{className:"bg-bg border-t border-border pt-16 pb-12",children:(0,n.jsxs)("div",{className:"container mx-auto px-4 sm:px-6 lg:px-8",children:[(0,n.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 lg:grid-cols-5 gap-10 mb-12",children:[(0,n.jsxs)("div",{className:"col-span-2 lg:col-span-2",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 mb-6",children:[(0,n.jsx)("div",{className:"size-6 text-primary",children:(0,n.jsx)("svg",{className:"w-full h-full",fill:"currentColor",viewBox:"0 0 48 48",children:(0,n.jsx)("path",{clipRule:"evenodd",d:"M12.0799 24L4 19.2479L9.95537 8.75216L18.04 13.4961L18.0446 4H29.9554L29.96 13.4961L38.0446 8.75216L44 19.2479L35.92 24L44 28.7521L38.0446 39.2479L29.96 34.5039L29.9554 44H18.0446L18.04 34.5039L9.95537 39.2479L4 28.7521L12.0799 24Z",fillRule:"evenodd"})})}),(0,n.jsx)("span",{className:"text-xl font-bold text-text-main",children:s.vQ.name})]}),(0,n.jsx)("p",{className:"text-text-muted mb-6 max-w-sm font-light",children:"The unified interface for modern AI infrastructure. Secure, observable, and scalable."}),(0,n.jsxs)("div",{className:"flex gap-4",children:[(0,n.jsx)("a",{href:"#",className:"text-gray-400 hover:text-primary transition-colors","aria-label":"Twitter",children:(0,n.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M22.46 6c-.77.35-1.6.58-2.46.69.88-.53 1.56-1.37 1.88-2.38-.83.5-1.75.85-2.72 1.05C18.37 4.5 17.26 4 16 4c-2.35 0-4.27 1.92-4.27 4.29 0 .34.04.67.11.98C8.28 9.09 5.11 7.38 3 4.79c-.37.63-.58 1.37-.58 2.15 0 1.49.75 2.81 1.91 3.56-.71 0-1.37-.2-1.95-.5v.03c0 2.08 1.48 3.82 3.44 4.21a4.22 4.22 0 0 1-1.93.07 4.28 4.28 0 0 0 4 2.98 8.521 8.521 0 0 1-5.33 1.84c-.34 0-.68-.02-1.02-.06C3.44 20.29 5.7 21 8.12 21 16 21 20.33 14.46 20.33 8.79c0-.19 0-.37-.01-.56.84-.6 1.56-1.36 2.14-2.23z"})})}),(0,n.jsx)("a",{href:"#",className:"text-gray-400 hover:text-primary transition-colors","aria-label":"GitHub",children:(0,n.jsx)("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0 1 12 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0 0 22 12.017C22 6.484 17.522 2 12 2z"})})})]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h4",{className:"font-semibold text-text-main mb-4",children:"Product"}),(0,n.jsx)("ul",{className:"flex flex-col gap-3 text-sm text-text-muted font-light",children:o.map(e=>(0,n.jsx)("li",{children:(0,n.jsx)(i(),{href:e.href,className:"hover:text-primary transition-colors",children:e.label})},e.label))})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h4",{className:"font-semibold text-text-main mb-4",children:"Resources"}),(0,n.jsx)("ul",{className:"flex flex-col gap-3 text-sm text-text-muted font-light",children:l.map(e=>(0,n.jsx)("li",{children:(0,n.jsx)(i(),{href:e.href,className:"hover:text-primary transition-colors",children:e.label})},e.label))})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h4",{className:"font-semibold text-text-main mb-4",children:"Company"}),(0,n.jsx)("ul",{className:"flex flex-col gap-3 text-sm text-text-muted font-light",children:d.map(e=>(0,n.jsx)("li",{children:(0,n.jsx)(i(),{href:e.href,className:"hover:text-primary transition-colors",children:e.label})},e.label))})]})]}),(0,n.jsxs)("div",{className:"border-t border-border pt-8 flex flex-col md:flex-row justify-between items-center gap-4",children:[(0,n.jsxs)("p",{className:"text-sm text-text-muted",children:["\xa9 ",new Date().getFullYear()," ",s.vQ.name," Inc. All rights reserved."]}),(0,n.jsxs)("div",{className:"flex gap-6 text-sm text-text-muted",children:[(0,n.jsx)(i(),{href:"#",className:"hover:text-primary transition-colors",children:"Privacy Policy"}),(0,n.jsx)(i(),{href:"#",className:"hover:text-primary transition-colors",children:"Terms of Service"})]})]})]})})}},92542:(e,t,a)=>{a.d(t,{default:()=>o});var n=a(95155),r=a(31474);let i={primary:"bg-primary hover:bg-primary-hover text-white shadow-[0_0_0_1px_rgba(255,255,255,0.08)_inset,0_10px_30px_-18px_rgba(139,92,246,0.75)] disabled:bg-surface-3 disabled:text-text-muted",secondary:"bg-surface-2 hover:bg-surface-3 text-text-main border border-border disabled:opacity-50",outline:"border border-border text-text-main hover:bg-surface-2 hover:border-primary/45",ghost:"text-text-muted hover:bg-surface-2 hover:text-text-main",danger:"bg-danger hover:brightness-110 text-white shadow-sm disabled:bg-surface-3 disabled:text-text-muted",success:"bg-success hover:brightness-110 text-white shadow-sm disabled:bg-surface-3 disabled:text-text-muted"},s={sm:"h-7 px-3 text-xs rounded-brand",md:"h-9 px-4 text-sm rounded-brand",lg:"h-10 px-5 text-sm rounded-brand"};function o({children:e,variant:t="primary",size:a="md",icon:l,iconRight:d,disabled:c=!1,loading:m=!1,fullWidth:u=!1,className:x,...p}){return(0,n.jsxs)("button",{className:(0,r.cn)("inline-flex items-center justify-center gap-2 font-semibold transition-all duration-150 ease-out cursor-pointer","active:scale-[0.98] disabled:opacity-50 disabled:cursor-not-allowed disabled:active:scale-100","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/35 focus-visible:ring-offset-2 focus-visible:ring-offset-bg",i[t],s[a],u&&"w-full",x),disabled:c||m,...p,children:[m?(0,n.jsx)("span",{className:"material-symbols-outlined animate-spin text-[16px]",children:"progress_activity"}):l?(0,n.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:l}):null,e,d&&!m&&(0,n.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:d})]})}},94230:(e,t,a)=>{a.d(t,{default:()=>d});var n=a(95155),r=a(12115),i=a(14051),s=a.n(i),o=a(35497),l=a(11059);function d({isOpen:e,provider:t,onSuccess:a,onClose:i}){let[s,c]=(0,r.useState)("loading"),[m,u]=(0,r.useState)(""),[x,p]=(0,r.useState)(null),[h,g]=(0,r.useState)(""),[f,b]=(0,r.useState)(null),{copied:v,copy:k}=(0,l.C)(),j=(0,r.useRef)(!1);(0,r.useEffect)(()=>{e||(j.current=!1)},[e]),(0,r.useEffect)(()=>{e&&t&&(async()=>{try{b(null),c("loading");let e=await fetch(`/api/oauth/kiro/social-authorize?provider=${t}`),a=await e.json();if(!e.ok)throw Error(a.error);p(a),u(a.authUrl),c("input"),j.current||(j.current=!0,window.open(a.authUrl,"_blank"))}catch(e){b(e.message),c("error")}})()},[e,t]);let y=async()=>{try{let e;b(null);try{e=new URL(h)}catch(e){throw Error("Invalid callback URL format")}let n=e.searchParams.get("code");e.searchParams.get("state");let r=e.searchParams.get("error");if(r)throw Error(e.searchParams.get("error_description")||r);if(!n)throw Error("No authorization code found in URL");let i=await fetch("/api/oauth/kiro/social-exchange",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:n,codeVerifier:x.codeVerifier,provider:t})}),s=await i.json();if(!i.ok)throw Error(s.error);c("success"),a?.()}catch(e){b(e.message),c("error")}},w="google"===t?"Google":"GitHub";return(0,n.jsx)(o.aF,{isOpen:e,title:`Connect Kiro via ${w}`,onClose:i,size:"lg",children:(0,n.jsxs)("div",{className:"flex flex-col gap-4",children:["loading"===s&&(0,n.jsxs)("div",{className:"text-center py-6",children:[(0,n.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-primary/10 flex items-center justify-center",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-3xl text-primary animate-spin",children:"progress_activity"})}),(0,n.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Initializing..."}),(0,n.jsxs)("p",{className:"text-sm text-text-muted",children:["Setting up ",w," authentication"]})]}),"input"===s&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"space-y-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"text-sm font-medium mb-2",children:"Step 1: Open this URL in your browser"}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(o.pd,{value:m,readOnly:!0,className:"flex-1 font-mono text-xs"}),(0,n.jsx)(o.$n,{variant:"secondary",icon:"auth_url"===v?"check":"content_copy",onClick:()=>k(m,"auth_url"),children:"Copy"})]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"text-sm font-medium mb-2",children:"Step 2: Paste the callback URL here"}),(0,n.jsx)("p",{className:"text-xs text-text-muted mb-2",children:"After authorization, copy the full URL from your browser address bar."}),(0,n.jsx)(o.pd,{value:h,onChange:e=>g(e.target.value),placeholder:"kiro://kiro.kiroAgent/authenticate-success?code=...",className:"font-mono text-xs"})]})]}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(o.$n,{onClick:y,fullWidth:!0,disabled:!h,children:"Connect"}),(0,n.jsx)(o.$n,{onClick:i,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),"success"===s&&(0,n.jsxs)("div",{className:"text-center py-6",children:[(0,n.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-3xl text-green-600",children:"check_circle"})}),(0,n.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connected Successfully!"}),(0,n.jsxs)("p",{className:"text-sm text-text-muted mb-4",children:["Your Kiro account via ",w," has been connected."]}),(0,n.jsx)(o.$n,{onClick:i,fullWidth:!0,children:"Done"})]}),"error"===s&&(0,n.jsxs)("div",{className:"text-center py-6",children:[(0,n.jsx)("div",{className:"size-16 mx-auto mb-4 rounded-full bg-red-100 dark:bg-red-900/30 flex items-center justify-center",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-3xl text-red-600",children:"error"})}),(0,n.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Connection Failed"}),(0,n.jsx)("p",{className:"text-sm text-red-600 mb-4",children:f}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(o.$n,{onClick:()=>c("input"),variant:"secondary",fullWidth:!0,children:"Try Again"}),(0,n.jsx)(o.$n,{onClick:i,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})]})})}d.propTypes={isOpen:s().bool.isRequired,provider:s().oneOf(["google","github"]).isRequired,onSuccess:s().func,onClose:s().func.isRequired}},95088:(e,t,a)=>{a.d(t,{default:()=>d});var n=a(95155),r=a(12115),i=a(14051),s=a.n(i),o=a(35497);let l="https://gitlab.com";function d({isOpen:e,providerInfo:t,onSuccess:a,onClose:i}){let s,[c,m]=(0,r.useState)(null),[u,x]=(0,r.useState)(l),[p,h]=(0,r.useState)(""),[g,f]=(0,r.useState)(""),[b,v]=(0,r.useState)(""),[k,j]=(0,r.useState)(!1),[y,w]=(0,r.useState)(null),[N,C]=(0,r.useState)(!1),[S,O]=(0,r.useState)(null),W=()=>{m(null),x(l),h(""),f(""),v(""),w(null),j(!1),C(!1),O(null),i()},F=async()=>{if(!b.trim())return void w("Personal Access Token is required");j(!0),w(null);try{let e=await fetch("/api/oauth/gitlab/pat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:b.trim(),baseUrl:u.trim()||l})}),t=await e.json();if(!e.ok)throw Error(t.error||"Authentication failed");a?.(),W()}catch(e){w(e.message)}finally{j(!1)}};return e?N&&S?(0,n.jsx)(o.LF,{isOpen:!0,provider:"gitlab",providerInfo:t,oauthMeta:S,onSuccess:()=>{a?.(),W()},onClose:()=>{C(!1),O(null)}}):(0,n.jsx)(o.aF,{isOpen:e,title:"Connect GitLab Duo",onClose:W,size:"lg",children:(0,n.jsxs)("div",{className:"flex flex-col gap-4",children:[!c&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{className:"text-sm text-text-muted",children:"Choose how to authenticate with GitLab Duo:"}),(0,n.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,n.jsxs)("button",{onClick:()=>m("oauth"),className:"flex flex-col items-center gap-2 p-4 rounded-lg border border-border hover:border-primary hover:bg-primary/5 transition-colors text-left",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-2xl text-primary",children:"lock_open"}),(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"text-sm font-medium",children:"OAuth App"}),(0,n.jsx)("p",{className:"text-xs text-text-muted",children:"Use a GitLab OAuth application"})]})]}),(0,n.jsxs)("button",{onClick:()=>m("pat"),className:"flex flex-col items-center gap-2 p-4 rounded-lg border border-border hover:border-primary hover:bg-primary/5 transition-colors text-left",children:[(0,n.jsx)("span",{className:"material-symbols-outlined text-2xl text-primary",children:"key"}),(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"text-sm font-medium",children:"Personal Access Token"}),(0,n.jsx)("p",{className:"text-xs text-text-muted",children:"Use a GitLab PAT with api scope"})]})]})]})]}),"oauth"===c&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("p",{className:"text-xs text-text-muted",children:["Create an OAuth app at"," ",(0,n.jsx)("a",{href:`${u.trim()||l}/-/profile/applications`,target:"_blank",rel:"noreferrer",className:"text-primary underline",children:"GitLab Applications"})," ","with redirect URI"," ",(0,n.jsx)("code",{className:"bg-sidebar px-1 rounded text-xs",children:(s=window.location.port||("https:"===window.location.protocol?"443":"80"),`http://localhost:${s}/callback`)})]}),(0,n.jsx)(o.pd,{label:"GitLab Base URL",value:u,onChange:e=>x(e.target.value),placeholder:l}),(0,n.jsx)(o.pd,{label:"Client ID",value:p,onChange:e=>h(e.target.value),placeholder:"Your OAuth application client ID"}),(0,n.jsx)(o.pd,{label:"Client Secret (optional for PKCE)",value:g,onChange:e=>f(e.target.value),placeholder:"Leave empty for public PKCE app"}),y&&(0,n.jsx)("p",{className:"text-sm text-red-500",children:y}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(o.$n,{onClick:()=>{p.trim()?(w(null),O({baseUrl:u.trim()||l,clientId:p.trim(),clientSecret:g.trim()}),C(!0)):w("Client ID is required")},fullWidth:!0,disabled:!p.trim(),children:"Authorize"}),(0,n.jsx)(o.$n,{onClick:()=>{m(null),w(null)},variant:"ghost",fullWidth:!0,children:"Back"})]})]}),"pat"===c&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("p",{className:"text-xs text-text-muted",children:["Create a PAT at"," ",(0,n.jsx)("a",{href:`${u.trim()||l}/-/user_settings/personal_access_tokens`,target:"_blank",rel:"noreferrer",className:"text-primary underline",children:"GitLab Access Tokens"})," ","with scopes: ",(0,n.jsx)("code",{className:"bg-sidebar px-1 rounded text-xs",children:"api"}),","," ",(0,n.jsx)("code",{className:"bg-sidebar px-1 rounded text-xs",children:"read_user"}),", and"," ",(0,n.jsx)("code",{className:"bg-sidebar px-1 rounded text-xs",children:"ai_features"}),"."]}),(0,n.jsx)(o.pd,{label:"GitLab Base URL",value:u,onChange:e=>x(e.target.value),placeholder:l}),(0,n.jsx)(o.pd,{label:"Personal Access Token",value:b,onChange:e=>v(e.target.value),placeholder:"glpat-xxxxxxxxxxxxxxxxxxxx",type:"password"}),y&&(0,n.jsx)("p",{className:"text-sm text-red-500",children:y}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(o.$n,{onClick:F,fullWidth:!0,disabled:!b.trim()||k,loading:k,children:"Connect"}),(0,n.jsx)(o.$n,{onClick:()=>{m(null),w(null)},variant:"ghost",fullWidth:!0,children:"Back"})]})]})]})}):null}d.propTypes={isOpen:s().bool.isRequired,providerInfo:s().shape({name:s().string}),onSuccess:s().func,onClose:s().func.isRequired}},96748:(e,t,a)=>{a.d(t,{default:()=>c});var n=a(95155),r=a(12115),i=a(14051),s=a.n(i),o=a(35497);let l="https://api.openai.com/v1",d={"custom-embedding":{label:"Embedding",add:"Add Custom Embedding",edit:"Edit Custom Embedding",modelHint:"e.g. voyage-3, embed-english-v3.0, text-embedding-3-small",modelRequired:!0},"custom-stt":{label:"STT",add:"Add Custom STT",edit:"Edit Custom STT",modelHint:"e.g. whisper-large-v3, whisper-1",modelRequired:!0},"custom-tts":{label:"TTS",add:"Add Custom TTS",edit:"Edit Custom TTS",modelHint:"e.g. kokoro-v1, af_heart",modelRequired:!1}};function c({isOpen:e,onClose:t,onCreated:a,onSaved:i,node:s,nodeType:m="custom-embedding"}){let u=!!s,x=d[m]||d["custom-embedding"],[p,h]=(0,r.useState)({name:"",prefix:"",baseUrl:l}),[g,f]=(0,r.useState)(!1),[b,v]=(0,r.useState)(""),[k,j]=(0,r.useState)(""),[y,w]=(0,r.useState)(!1),[N,C]=(0,r.useState)(null);(0,r.useEffect)(()=>{e&&(C(null),v(""),j(""),u?h({name:s.name||"",prefix:s.prefix||"",baseUrl:s.baseUrl||l}):h({name:"",prefix:"",baseUrl:l}))},[e,u,s]);let S=async()=>{if(p.name.trim()&&p.prefix.trim()&&p.baseUrl.trim()){f(!0);try{let e=u?`/api/provider-nodes/${s.id}`:"/api/provider-nodes",t=u?"PUT":"POST",n={name:p.name,prefix:p.prefix,baseUrl:p.baseUrl};u||(n.type=m);let r=await fetch(e,{method:t,headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}),o=await r.json();r.ok&&(u?i?.(o.node):a?.(o.node))}catch(e){console.log("Error saving custom node:",e)}finally{f(!1)}}},O=async()=>{w(!0);try{let e=await fetch("/api/provider-nodes/validate",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({baseUrl:p.baseUrl,apiKey:b||void 0,type:m,modelId:k.trim()||void 0})}),t=await e.json();C(t)}catch{C({valid:!1,error:"Network error"})}finally{w(!1)}};return(0,n.jsx)(o.aF,{isOpen:e,title:u?x.edit:x.add,onClose:t,children:(0,n.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,n.jsx)(o.pd,{label:"Name",value:p.name,onChange:e=>h({...p,name:e.target.value}),placeholder:"Voyage AI",hint:"Required. A friendly label for this provider."}),(0,n.jsx)(o.pd,{label:"Prefix",value:p.prefix,onChange:e=>h({...p,prefix:e.target.value}),placeholder:"voyage",hint:"Required. Used as the provider prefix for model IDs (e.g. voyage/voyage-3)."}),(0,n.jsx)(o.pd,{label:"Base URL",value:p.baseUrl,onChange:e=>h({...p,baseUrl:e.target.value}),placeholder:"http://localhost:8000",hint:"Self-hosted OpenAI-compatible endpoint. One node can front several machines."}),(0,n.jsx)(o.pd,{label:"API Key (for Check)",type:"password",value:b,onChange:e=>v(e.target.value),hint:"Optional. Leave empty if your server runs keyless."}),(0,n.jsx)(o.pd,{label:"Model ID (for Check)",value:k,onChange:e=>j(e.target.value),placeholder:x.modelHint,hint:x.modelRequired?"Required for validation. Will send a test request.":"Optional. Will send a test request."}),(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[(0,n.jsx)(o.$n,{onClick:O,disabled:!p.baseUrl.trim()||x.modelRequired&&!k.trim()||y,variant:"secondary",children:y?"Checking...":"Check"}),(()=>{if(!N)return null;let{valid:e,error:t,dimensions:a}=N;return e?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.Ex,{variant:"success",children:"Valid"}),a&&(0,n.jsxs)("span",{className:"text-sm text-text-muted",children:[a," dims"]})]}):(0,n.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,n.jsx)(o.Ex,{variant:"error",children:"Invalid"}),t&&(0,n.jsx)("span",{className:"text-sm text-red-500",children:t})]})})()]}),(0,n.jsxs)("div",{className:"flex gap-2",children:[(0,n.jsx)(o.$n,{onClick:S,fullWidth:!0,disabled:!p.name.trim()||!p.prefix.trim()||!p.baseUrl.trim()||g,children:g?u?"Saving...":"Creating...":u?"Save":"Create"}),(0,n.jsx)(o.$n,{onClick:t,variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})})}c.propTypes={isOpen:s().bool.isRequired,onClose:s().func.isRequired,onCreated:s().func,onSaved:s().func,node:s().shape({id:s().string,name:s().string,prefix:s().string,baseUrl:s().string}),nodeType:s().oneOf(["custom-embedding","custom-stt","custom-tts"])}},97677:(e,t,a)=>{a.d(t,{default:()=>r});var n=a(95155);function r({text:e,children:t,position:a="top",color:i}){let s=i?"":"bg-gray-900";return(0,n.jsxs)("div",{className:"relative inline-flex group/tt",children:[t,(0,n.jsx)("div",{className:`pointer-events-none absolute ${{top:"bottom-full left-1/2 -translate-x-1/2 mb-1.5",bottom:"top-full left-1/2 -translate-x-1/2 mt-1.5",left:"right-full top-1/2 -translate-y-1/2 mr-1.5",right:"left-full top-1/2 -translate-y-1/2 ml-1.5"}[a]} z-50 w-max max-w-56 rounded px-2 py-1 text-[11px] leading-snug ${s} text-white opacity-0 group-hover/tt:opacity-100 transition-opacity duration-150 whitespace-normal`,style:i?{backgroundColor:i}:{},children:e})]})}},98542:(e,t,a)=>{a.d(t,{default:()=>i});var n=a(95155),r=a(31474);function i({checked:e=!1,onChange:t,label:a,description:s,disabled:o=!1,size:l="md",className:d}){let c={sm:{track:"w-8 h-4",thumb:"size-3",translate:"translate-x-4"},md:{track:"w-11 h-6",thumb:"size-5",translate:"translate-x-5"},lg:{track:"w-14 h-7",thumb:"size-6",translate:"translate-x-7"}};return(0,n.jsxs)("div",{className:(0,r.cn)("flex items-center gap-3",o&&"opacity-50 cursor-not-allowed",d),children:[(0,n.jsx)("button",{type:"button",role:"switch","aria-checked":e,disabled:o,onClick:()=>{!o&&t&&t(!e)},className:(0,r.cn)("relative inline-flex shrink-0 cursor-pointer rounded-full","transition-colors duration-200 ease-in-out","focus:outline-none focus:ring-2 focus:ring-brand-500/30",e?"bg-brand-500":"bg-surface-3",c[l].track,o&&"cursor-not-allowed"),children:(0,n.jsx)("span",{className:(0,r.cn)("pointer-events-none inline-block rounded-full bg-white shadow-sm","transform transition duration-200 ease-in-out",e?c[l].translate:"translate-x-0.5",c[l].thumb,"mt-0.5")})}),(a||s)&&(0,n.jsxs)("div",{className:"flex flex-col",children:[a&&(0,n.jsx)("span",{className:"text-sm font-medium text-text-main",children:a}),s&&(0,n.jsx)("span",{className:"text-xs text-text-muted",children:s})]})]})}},99312:(e,t,a)=>{a.d(t,{default:()=>s});var n=a(95155),r=a(31474),i=a(92542);function s({icon:e="inbox",title:t="No items found",description:a="There's nothing here yet.",action:o,actionText:l,onAction:d,className:c}){return(0,n.jsxs)("div",{className:(0,r.cn)("flex flex-col items-center justify-center rounded-panel border border-dashed border-border p-12 text-center",c),children:[(0,n.jsx)("div",{className:"mb-4 flex size-12 items-center justify-center rounded-full bg-surface-2 text-text-muted ring-1 ring-border-subtle",children:(0,n.jsx)("span",{className:"material-symbols-outlined text-[24px]",children:e})}),(0,n.jsx)("h3",{className:"mb-1.5 text-sm font-semibold text-text-main",children:t}),(0,n.jsx)("p",{className:"mb-6 max-w-sm text-xs text-text-muted",children:a}),o||l&&d&&(0,n.jsx)(i.default,{variant:"outline",size:"sm",onClick:d,children:l})]})}}}]);